LibreOffice Module ucb (master) 1
filtask.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
22#include <osl/file.hxx>
23#include <rtl/ustring.hxx>
24
25#include <osl/mutex.hxx>
26#include <com/sun/star/uno/Sequence.hxx>
27#include <com/sun/star/beans/PropertyChangeEvent.hpp>
28#include <com/sun/star/ucb/XCommandInfo.hpp>
29#include <com/sun/star/beans/Property.hpp>
30#include <com/sun/star/beans/PropertyValue.hpp>
31#include <com/sun/star/io/XStream.hpp>
32#include <com/sun/star/io/XOutputStream.hpp>
33#include <com/sun/star/io/XInputStream.hpp>
34#include <com/sun/star/beans/XPropertySetInfo.hpp>
35#include <com/sun/star/ucb/NumberedSortingInfo.hpp>
36#include <com/sun/star/sdbc/XRow.hpp>
37#include <com/sun/star/uno/XComponentContext.hpp>
38#include <com/sun/star/ucb/XDynamicResultSet.hpp>
39#include <com/sun/star/beans/XPropertyContainer.hpp>
40#include <com/sun/star/beans/XPropertyAccess.hpp>
41#include <com/sun/star/ucb/ContentInfo.hpp>
42#include <com/sun/star/ucb/XCommandEnvironment.hpp>
43#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
44#include <com/sun/star/ucb/XPropertySetRegistry.hpp>
45#include <com/sun/star/task/XInteractionHandler.hpp>
46#include <com/sun/star/task/XInteractionRequest.hpp>
47#include "filerror.hxx"
48#include "filnot.hxx"
49#include <mutex>
50#include <unordered_map>
51#include <unordered_set>
52#include <vector>
53
54namespace fileaccess
55{
56 class BaseContent;
57 class FileProvider;
58 class XPropertySetInfo_impl;
59 class XCommandInfo_impl;
60 class XResultSet_impl;
61
62 /*
63 * The relevant methods in this class all have as first argument the CommandId,
64 * so if necessary, every method has access to its relevant XInteractionHandler and
65 * XProgressHandler.
66 */
67
68
70 {
72 friend class XResultSet_impl;
73 friend class XCommandInfo_impl;
74
75 private:
76
78 {
79 private:
80
83 css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHandler;
84 css::uno::Reference< css::ucb::XCommandEnvironment > m_xCommandEnvironment;
85
86
87 public:
88
89 explicit TaskHandling(
90 css::uno::Reference< css::ucb::XCommandEnvironment > xCommandEnv )
91 : m_bHandled( false ),
94 m_xCommandEnvironment( std::move(xCommandEnv) )
95 {
96 }
97
99 {
100 m_bHandled = true;
101 }
102
103 bool isHandled() const
104 {
105 return m_bHandled;
106 }
107
109 {
112 }
113
114 void installError( sal_Int32 nErrorCode,
115 sal_Int32 nMinorCode )
116 {
117 m_nErrorCode = nErrorCode;
118 m_nMinorCode = nMinorCode;
119 }
120
121 sal_Int32 getInstalledError() const
122 {
123 return m_nErrorCode;
124 }
125
126 sal_Int32 getMinorErrorCode() const
127 {
128 return m_nMinorCode;
129 }
130
131 css::uno::Reference< css::task::XInteractionHandler > const &
133 {
135 m_xInteractionHandler = m_xCommandEnvironment->getInteractionHandler();
136
138 }
139
140 const css::uno::Reference< css::ucb::XCommandEnvironment >&
142 {
144 }
145
146 }; // end class TaskHandling
147
148
149 typedef std::unordered_map< sal_Int32,TaskHandling > TaskMap;
150 private:
151
152 std::mutex m_aMutex;
153 sal_Int32 m_nCommandId;
155
156
157 public:
159 {
160 private:
161 OUString PropertyName;
162 sal_Int32 Handle;
164 css::uno::Type Typ; // Duplicates information in Value
165 css::uno::Any Value;
166 css::beans::PropertyState State;
167 sal_Int16 Attributes;
168 public:
169 explicit MyProperty( const OUString& thePropertyName );
170 MyProperty( bool theIsNative,
171 const OUString& thePropertyName,
172 sal_Int32 theHandle,
173 const css::uno::Type& theTyp,
174 const css::uno::Any& theValue,
175 const css::beans::PropertyState& theState,
176 sal_Int16 theAttributes );
177
178 inline const bool& IsNative() const;
179 const OUString& getPropertyName() const { return PropertyName; }
180 inline const sal_Int32& getHandle() const;
181 inline const css::uno::Type& getType() const;
182 inline const css::uno::Any& getValue() const;
183 inline const css::beans::PropertyState& getState() const;
184 inline const sal_Int16& getAttributes() const;
185
186 // The set* functions are declared const, because the key of "this" stays intact
187 inline void setValue( css::uno::Any theValue ) const;
188 inline void setState( const css::beans::PropertyState& theState ) const;
189 };
190
192 {
193 bool operator()( const MyProperty& rKey1, const MyProperty& rKey2 ) const
194 {
195 return rKey1.getPropertyName() < rKey2.getPropertyName();
196 }
197 };
198
200
202 {
203 public:
206 ~UnqPathData();
207
209 std::vector< Notifier* > notifier;
210
211 // Three views on the PersistentPropertySet
212 css::uno::Reference< css::ucb::XPersistentPropertySet > xS;
213 css::uno::Reference< css::beans::XPropertyContainer > xC;
214 css::uno::Reference< css::beans::XPropertyAccess > xA;
215 };
216
217 typedef std::unordered_map< OUString,UnqPathData > ContentMap;
218
219 TaskManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
220 FileProvider* pProvider, bool bWithConfig );
221 ~TaskManager();
222
224 void startTask(
225 sal_Int32 CommandId,
226 const css::uno::Reference< css::ucb::XCommandEnvironment >& xCommandEnv );
227
228 sal_Int32 getCommandId();
229
230
237 void installError( sal_Int32 CommandId,
238 sal_Int32 ErrorCode,
239 sal_Int32 minorCode = TASKHANDLER_NO_ERROR );
240
241 void retrieveError( sal_Int32 CommandId,
242 sal_Int32 &ErrorCode,
243 sal_Int32 &minorCode);
244
250 void endTask( sal_Int32 CommandId,
251 // the physical URL of the object
252 const OUString& aUnqPath,
253 BaseContent* pContent);
254
255
260 void handleTask( sal_Int32 CommandId,
261 const css::uno::Reference< css::task::XInteractionRequest >& request );
262
267 void clearError( sal_Int32 );
268
274 void registerNotifier( const OUString& aUnqPath,Notifier* pNotifier );
275
276 void deregisterNotifier( const OUString& aUnqPath,Notifier* pNotifier );
277
278
289 void associate( const OUString& UnqPath,
290 const OUString& PropertyName,
291 const css::uno::Any& DefaultValue,
292 const sal_Int16 Attributes );
293
297 void deassociate( const OUString& UnqPath,
298 const OUString& PropertyName );
299
300
301 // Every method having a command id is not allowed to throw anything,
302 // but instead must install every error code in the task handler
303
304
310 void page( sal_Int32 CommandId,
311 const OUString& aUnqPath,
312 const css::uno::Reference< css::io::XOutputStream >& xOutputStream );
313
314
319 css::uno::Reference< css::io::XInputStream >
320 open( sal_Int32 CommandId,
321 const OUString& aUnqPath,
322 bool bLock );
323
324
330 css::uno::Reference< css::io::XStream >
331 open_rw( sal_Int32 CommandId,
332 const OUString& aUnqPath,
333 bool bLock );
334
335
341 css::uno::Reference< css::ucb::XDynamicResultSet >
342 ls( sal_Int32 CommandId,
343 const OUString& aUnqPath,
344 const sal_Int32 OpenMode,
345 const css::uno::Sequence< css::beans::Property >& sProperty,
346 const css::uno::Sequence< css::ucb::NumberedSortingInfo > & sSortingInfo );
347
348
353 // Info for commands
354 css::uno::Reference< css::ucb::XCommandInfo >
355 info_c();
356
357 // Info for the properties
358 css::uno::Reference< css::beans::XPropertySetInfo >
359 info_p( const OUString& aUnqPath );
360
361
366 css::uno::Sequence< css::uno::Any >
367 setv( const OUString& aUnqPath,
368 const css::uno::Sequence< css::beans::PropertyValue >& values );
369
370
376 css::uno::Reference< css::sdbc::XRow >
377 getv( sal_Int32 CommandId,
378 const OUString& aUnqPath,
379 const css::uno::Sequence< css::beans::Property >& properties );
380
381
382 /********************************************************************************/
383 /* transfer-commands */
384 /********************************************************************************/
385
390 void
391 move( sal_Int32 CommandId,
392 const OUString& srcUnqPath, // Full file(folder)-path
393 const OUString& dstUnqPath, // Path to the destination-directory
394 const sal_Int32 NameClash );
395
400 void
401 copy( sal_Int32 CommandId, // See "move"
402 const OUString& srcUnqPath,
403 const OUString& dstUnqPath,
404 sal_Int32 NameClash );
405
406 enum class FileUrlType { Folder = 1, File = -1, Unknown = 0 };
407
412 bool
413 remove( sal_Int32 CommandId,
414 const OUString& aUnqPath,
415 FileUrlType eTypeToMove = FileUrlType::Unknown,
416 bool MustExist = true );
417
418
419 /********************************************************************************/
420 /* write and create - commandos */
421 /********************************************************************************/
422
428 bool
429 mkdir( sal_Int32 CommandId,
430 const OUString& aDirectoryName,
431 bool OverWrite );
432
433
440 bool
441 mkfil( sal_Int32 CommandId,
442 const OUString& aFileName,
443 bool OverWrite,
444 const css::uno::Reference< css::io::XInputStream >& aInputStream );
445
446
452 bool
453 write( sal_Int32 CommandId,
454 const OUString& aUnqPath,
455 bool OverWrite,
456 const css::uno::Reference< css::io::XInputStream >& aInputStream );
457
458
459 void insertDefaultProperties( const OUString& aUnqPath );
460
461 static css::uno::Sequence< css::ucb::ContentInfo >
463
464
465 /******************************************************************************/
466 /* */
467 /* mapping of file urls */
468 /* to uncpath and vice versa */
469 /* */
470 /******************************************************************************/
471
472 static bool getUnqFromUrl( const OUString& Url, OUString& Unq );
473
474 static bool getUrlFromUnq( const OUString& Unq, OUString& Url );
475
476
478 css::uno::Reference< css::uno::XComponentContext > m_xContext;
479 css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry;
480
481 private:
482
483 void insertDefaultProperties( std::unique_lock<std::mutex>& rGuard, const OUString& aUnqPath );
484
485 /********************************************************************************/
486 /* get eventListeners */
487 /********************************************************************************/
488
489 std::vector< ContentEventNotifier >
490 getContentEventListeners( const OUString& aName );
491
492 std::vector< ContentEventNotifier >
493 getContentDeletedEventListeners( const OUString& aName );
494
495 std::vector< ContentEventNotifier >
496 getContentExchangedEventListeners( const OUString& aOldPrefix,
497 const OUString& aNewPrefix,
498 bool withChildren );
499
500 std::vector< PropertyChangeNotifier >
501 getPropertyChangeNotifier( const OUString& aName );
502
503 std::vector< PropertySetInfoChangeNotifier >
504 getPropertySetListeners( const OUString& aName );
505
506
507 /********************************************************************************/
508 /* notify eventListeners */
509 /********************************************************************************/
510
511 static void notifyPropertyChanges(
512 const std::vector<PropertyChangeNotifier>& listeners,
513 const css::uno::Sequence<css::beans::PropertyChangeEvent>& seqChanged);
514
515 static void notifyContentExchanged(
516 const std::vector<ContentEventNotifier>& listeners_vec);
517
518 static void
519 notifyInsert(const std::vector<ContentEventNotifier>& listeners,
520 const OUString& aChildName);
521
522 static void
523 notifyContentDeleted(const std::vector<ContentEventNotifier>& listeners);
524
525 static void
526 notifyContentRemoved(const std::vector<ContentEventNotifier>& listeners,
527 const OUString& aChildName);
528
529 static void notifyPropertyAdded(
530 const std::vector<PropertySetInfoChangeNotifier>& listeners,
531 const OUString& aPropertyName);
532
533 static void notifyPropertyRemoved(
534 const std::vector<PropertySetInfoChangeNotifier>& listeners,
535 const OUString& aPropertyName);
536
537 /********************************************************************************/
538 /* remove persistent propertyset */
539 /********************************************************************************/
540
541 void erasePersistentSetWithoutChildren( const OUString& aUnqPath );
542 void erasePersistentSet( const OUString& aUnqPath,
543 bool withChildren = false );
544
545 /********************************************************************************/
546 /* copy persistent propertyset */
547 /* from srcUnqPath to dstUnqPath */
548 /********************************************************************************/
549
550 void copyPersistentSetWithoutChildren( const OUString& srcUnqPath,
551 const OUString& dstUnqPath );
552 void copyPersistentSet( const OUString& srcUnqPath,
553 const OUString& dstUnqPath,
554 bool withChildren );
555
556
557 // Special optimized method for getting the properties of a directoryitem, which
558 // is returned by osl::DirectoryItem::getNextItem()
559
560 bool
561 getv( const css::uno::Sequence< css::beans::Property >& properties,
562 osl::DirectoryItem& DirItem,
563 OUString& aUnqPath,
564 bool& bIsRegular,
565 css::uno::Reference< css::sdbc::XRow > & row );
566
567
573 void load( const TaskManager::ContentMap::iterator& it,
574 bool create );
575
582 void
583 commit(
584 std::unique_lock<std::mutex>& rGuard,
585 const TaskManager::ContentMap::iterator& it,
586 const osl::FileStatus& aFileStatus );
587
594 static void
596 sal_Int32& n_Mask,
597 const css::uno::Sequence< css::beans::Property >& seq );
598
599
600 // Helper function for public copy
601
602 osl::FileBase::RC
604 const OUString& srcUnqPath,
605 const OUString& dstUnqPath,
606 FileUrlType TypeToCopy,
607 bool testExistence );
608
609
610 // Helper function for mkfil,mkdir and write
611 // Creates whole path
612 // returns success of the operation
613 // The call determines the errorCode, which should be used to install
614 // any error
615
616 bool
617 ensuredir( sal_Int32 CommandId,
618 const OUString& aDirectoryName,
619 sal_Int32 errorCode );
620
621 // General
623
624
625 public:
626
627 static constexpr OUStringLiteral FolderContentType =
628 u"application/vnd.sun.staroffice.fsys-folder";
629 static constexpr OUStringLiteral FileContentType =
630 u"application/vnd.sun.staroffice.fsys-file";
631
632
633 private:
634
636 css::uno::Sequence< css::ucb::CommandInfo > m_sCommandInfo;
637
638 public:
639 // Miscellaneous:
640 // Methods for "writeComponentInfo" and "createComponentFactory"
641
642 static void getScheme( OUString& Scheme );
643 };
644
645} // end namespace TaskHandling
646
647/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
MyProperty(const OUString &thePropertyName)
Definition: filtask.cxx:87
const sal_Int16 & getAttributes() const
Definition: filinl.hxx:45
const sal_Int32 & getHandle() const
Definition: filinl.hxx:29
const css::beans::PropertyState & getState() const
Definition: filinl.hxx:41
void setValue(css::uno::Any theValue) const
Definition: filinl.hxx:49
const css::uno::Type & getType() const
Definition: filinl.hxx:33
const OUString & getPropertyName() const
Definition: filtask.hxx:179
const bool & IsNative() const
Definition: filinl.hxx:25
void setState(const css::beans::PropertyState &theState) const
Definition: filinl.hxx:53
const css::uno::Any & getValue() const
Definition: filinl.hxx:37
css::beans::PropertyState State
Definition: filtask.hxx:166
void installError(sal_Int32 nErrorCode, sal_Int32 nMinorCode)
Definition: filtask.hxx:114
const css::uno::Reference< css::ucb::XCommandEnvironment > & getCommandEnvironment() const
Definition: filtask.hxx:141
css::uno::Reference< css::task::XInteractionHandler > const & getInteractionHandler()
Definition: filtask.hxx:132
css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHandler
Definition: filtask.hxx:83
css::uno::Reference< css::ucb::XCommandEnvironment > m_xCommandEnvironment
Definition: filtask.hxx:84
TaskHandling(css::uno::Reference< css::ucb::XCommandEnvironment > xCommandEnv)
Definition: filtask.hxx:89
css::uno::Reference< css::beans::XPropertyAccess > xA
Definition: filtask.hxx:214
std::vector< Notifier * > notifier
Definition: filtask.hxx:209
css::uno::Reference< css::ucb::XPersistentPropertySet > xS
Definition: filtask.hxx:212
css::uno::Reference< css::beans::XPropertyContainer > xC
Definition: filtask.hxx:213
std::vector< ContentEventNotifier > getContentEventListeners(const OUString &aName)
Definition: filtask.cxx:2550
static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo()
Definition: filtask.cxx:2912
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: filtask.hxx:478
void erasePersistentSetWithoutChildren(const OUString &aUnqPath)
Definition: filtask.cxx:2792
bool mkdir(sal_Int32 CommandId, const OUString &aDirectoryName, bool OverWrite)
Creates new directory with given URL, recursively if necessary Return:: success of operation.
Definition: filtask.cxx:1675
void endTask(sal_Int32 CommandId, const OUString &aUnqPath, BaseContent *pContent)
Deinstalls the task and evaluates a possibly set error code.
Definition: filtask.cxx:382
css::uno::Sequence< css::uno::Any > setv(const OUString &aUnqPath, const css::uno::Sequence< css::beans::PropertyValue > &values)
Sets the values of the properties belonging to fileURL aUnqPath.
Definition: filtask.cxx:836
bool write(sal_Int32 CommandId, const OUString &aUnqPath, bool OverWrite, const css::uno::Reference< css::io::XInputStream > &aInputStream)
writes to the file with given URL.
Definition: filtask.cxx:1766
void commit(std::unique_lock< std::mutex > &rGuard, const TaskManager::ContentMap::iterator &it, const osl::FileStatus &aFileStatus)
Commit inserts the determined properties in the filestatus object into the internal map,...
Definition: filtask.cxx:2250
void registerNotifier(const OUString &aUnqPath, Notifier *pNotifier)
This two methods register and deregister a change listener for the content belonging to URL aUnqPath.
Definition: filtask.cxx:483
css::uno::Reference< css::ucb::XDynamicResultSet > ls(sal_Int32 CommandId, const OUString &aUnqPath, const sal_Int32 OpenMode, const css::uno::Sequence< css::beans::Property > &sProperty, const css::uno::Sequence< css::ucb::NumberedSortingInfo > &sSortingInfo)
This method returns the result set containing the children of the directory belonging to file URL aUn...
Definition: filtask.cxx:774
std::vector< ContentEventNotifier > getContentDeletedEventListeners(const OUString &aName)
Definition: filtask.cxx:2572
bool getv(const css::uno::Sequence< css::beans::Property > &properties, osl::DirectoryItem &DirItem, OUString &aUnqPath, bool &bIsRegular, css::uno::Reference< css::sdbc::XRow > &row)
sal_Int32 getCommandId()
Definition: filtask.cxx:448
static void getScheme(OUString &Scheme)
Definition: filtask.cxx:2934
o3tl::sorted_vector< MyProperty, MyPropertyLess > PropertySet
Definition: filtask.hxx:199
static void notifyContentDeleted(const std::vector< ContentEventNotifier > &listeners)
Definition: filtask.cxx:2601
std::unordered_map< sal_Int32, TaskHandling > TaskMap
Definition: filtask.hxx:149
std::vector< PropertyChangeNotifier > getPropertyChangeNotifier(const OUString &aName)
Definition: filtask.cxx:2756
static constexpr OUStringLiteral FolderContentType
Definition: filtask.hxx:627
FileProvider * m_pProvider
Definition: filtask.hxx:477
void erasePersistentSet(const OUString &aUnqPath, bool withChildren=false)
Definition: filtask.cxx:2812
css::uno::Sequence< css::ucb::CommandInfo > m_sCommandInfo
Definition: filtask.hxx:636
void copyPersistentSet(const OUString &srcUnqPath, const OUString &dstUnqPath, bool withChildren)
Definition: filtask.cxx:2880
void installError(sal_Int32 CommandId, sal_Int32 ErrorCode, sal_Int32 minorCode=TASKHANDLER_NO_ERROR)
The error code may be one of the error codes defined in filerror.hxx.
Definition: filtask.cxx:436
bool mkfil(sal_Int32 CommandId, const OUString &aFileName, bool OverWrite, const css::uno::Reference< css::io::XInputStream > &aInputStream)
Creates new file with given URL.
Definition: filtask.cxx:1735
void deregisterNotifier(const OUString &aUnqPath, Notifier *pNotifier)
Definition: filtask.cxx:502
static void notifyInsert(const std::vector< ContentEventNotifier > &listeners, const OUString &aChildName)
Definition: filtask.cxx:2592
void handleTask(sal_Int32 CommandId, const css::uno::Reference< css::task::XInteractionRequest > &request)
Handles an interactionrequest.
Definition: filtask.cxx:455
static bool getUnqFromUrl(const OUString &Url, OUString &Unq)
Definition: filtask.cxx:1960
void copyPersistentSetWithoutChildren(const OUString &srcUnqPath, const OUString &dstUnqPath)
Definition: filtask.cxx:2850
static bool getUrlFromUnq(const OUString &Unq, OUString &Url)
Definition: filtask.cxx:1981
std::unordered_map< OUString, UnqPathData > ContentMap
Definition: filtask.hxx:217
static void notifyPropertyChanges(const std::vector< PropertyChangeNotifier > &listeners, const css::uno::Sequence< css::beans::PropertyChangeEvent > &seqChanged)
Definition: filtask.cxx:2776
void load(const TaskManager::ContentMap::iterator &it, bool create)
Load the properties from configuration, if create == true create them.
Definition: filtask.cxx:2198
bool ensuredir(sal_Int32 CommandId, const OUString &aDirectoryName, sal_Int32 errorCode)
Definition: filtask.cxx:2068
css::uno::Reference< css::beans::XPropertySetInfo > info_p(const OUString &aUnqPath)
Definition: filtask.cxx:819
css::uno::Reference< css::io::XStream > open_rw(sal_Int32 CommandId, const OUString &aUnqPath, bool bLock)
Given a file URL aUnqPath, this methods returns a XStream which can be used to read and write from/to...
Definition: filtask.cxx:743
void startTask(sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &xCommandEnv)
Definition: filtask.cxx:367
static void getMaskFromProperties(sal_Int32 &n_Mask, const css::uno::Sequence< css::beans::Property > &seq)
Given a Sequence of properties seq, this method determines the mask used to instantiate an osl::FileS...
Definition: filtask.cxx:2155
void clearError(sal_Int32)
Clears any error which are set on the commandid.
Definition: filtask.cxx:413
TaskManager(const css::uno::Reference< css::uno::XComponentContext > &rxContext, FileProvider *pProvider, bool bWithConfig)
Definition: filtask.cxx:135
css::uno::Reference< css::io::XInputStream > open(sal_Int32 CommandId, const OUString &aUnqPath, bool bLock)
Given a file URL aUnqPath, this methods returns a XInputStream which reads from the open file.
Definition: filtask.cxx:711
void insertDefaultProperties(const OUString &aUnqPath)
Definition: filtask.cxx:1925
css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry
Definition: filtask.hxx:479
PropertySet m_aDefaultProperties
Definition: filtask.hxx:635
static void notifyPropertyRemoved(const std::vector< PropertySetInfoChangeNotifier > &listeners, const OUString &aPropertyName)
Definition: filtask.cxx:2651
bool remove(sal_Int32 CommandId, const OUString &aUnqPath, FileUrlType eTypeToMove=FileUrlType::Unknown, bool MustExist=true)
Deletes the content belonging to fileURL aUnqPath( recursively in case of directory )
Definition: filtask.cxx:1513
static void notifyContentExchanged(const std::vector< ContentEventNotifier > &listeners_vec)
Definition: filtask.cxx:2745
void move(sal_Int32 CommandId, const OUString &srcUnqPath, const OUString &dstUnqPath, const sal_Int32 NameClash)
Moves the content belonging to fileURL srcUnqPath to fileURL dstUnqPath( files and directories )
Definition: filtask.cxx:1133
void retrieveError(sal_Int32 CommandId, sal_Int32 &ErrorCode, sal_Int32 &minorCode)
Definition: filtask.cxx:422
void copy(sal_Int32 CommandId, const OUString &srcUnqPath, const OUString &dstUnqPath, sal_Int32 NameClash)
Copies the content belonging to fileURL srcUnqPath to fileURL dstUnqPath ( files and directories )
Definition: filtask.cxx:1341
std::vector< ContentEventNotifier > getContentExchangedEventListeners(const OUString &aOldPrefix, const OUString &aNewPrefix, bool withChildren)
Definition: filtask.cxx:2663
osl::FileBase::RC copy_recursive(const OUString &srcUnqPath, const OUString &dstUnqPath, FileUrlType TypeToCopy, bool testExistence)
Definition: filtask.cxx:1994
void deassociate(const OUString &UnqPath, const OUString &PropertyName)
Definition: filtask.cxx:568
css::uno::Reference< css::ucb::XCommandInfo > info_c()
Info methods.
Definition: filtask.cxx:805
void page(sal_Int32 CommandId, const OUString &aUnqPath, const css::uno::Reference< css::io::XOutputStream > &xOutputStream)
Given an xOutputStream, this method writes the content of the file belonging to URL aUnqPath into the...
Definition: filtask.cxx:622
css::uno::Reference< css::sdbc::XRow > getv(sal_Int32 CommandId, const OUString &aUnqPath, const css::uno::Sequence< css::beans::Property > &properties)
Reads the values of the properties belonging to fileURL aUnqPath; Returns an XRow object containing t...
static void notifyPropertyAdded(const std::vector< PropertySetInfoChangeNotifier > &listeners, const OUString &aPropertyName)
Definition: filtask.cxx:2641
static constexpr OUStringLiteral FileContentType
Definition: filtask.hxx:629
static void notifyContentRemoved(const std::vector< ContentEventNotifier > &listeners, const OUString &aChildName)
Definition: filtask.cxx:2610
std::vector< PropertySetInfoChangeNotifier > getPropertySetListeners(const OUString &aName)
Definition: filtask.cxx:2621
void associate(const OUString &UnqPath, const OUString &PropertyName, const css::uno::Any &DefaultValue, const sal_Int16 Attributes)
Used to associate and deassociate a new property with the content belonging to URL UnqPath.
Definition: filtask.cxx:529
float u
#define TASKHANDLER_NO_ERROR
Definition: filerror.hxx:26
ErrorCode
Unknown
bool operator()(const MyProperty &rKey1, const MyProperty &rKey2) const
Definition: filtask.hxx:193