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 <unordered_map>
50#include <unordered_set>
51#include <vector>
52
53namespace fileaccess
54{
55 class BaseContent;
56 class FileProvider;
57 class XPropertySetInfo_impl;
58 class XCommandInfo_impl;
59 class XResultSet_impl;
60
61 /*
62 * The relevant methods in this class all have as first argument the CommandId,
63 * so if necessary, every method has access to its relevant XInteractionHandler and
64 * XProgressHandler.
65 */
66
67
69 {
71 friend class XResultSet_impl;
72 friend class XCommandInfo_impl;
73
74 private:
75
77 {
78 private:
79
82 css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHandler;
83 css::uno::Reference< css::ucb::XCommandEnvironment > m_xCommandEnvironment;
84
85
86 public:
87
88 explicit TaskHandling(
89 css::uno::Reference< css::ucb::XCommandEnvironment > xCommandEnv )
90 : m_bHandled( false ),
93 m_xCommandEnvironment( std::move(xCommandEnv) )
94 {
95 }
96
98 {
99 m_bHandled = true;
100 }
101
102 bool isHandled() const
103 {
104 return m_bHandled;
105 }
106
108 {
111 }
112
113 void installError( sal_Int32 nErrorCode,
114 sal_Int32 nMinorCode )
115 {
116 m_nErrorCode = nErrorCode;
117 m_nMinorCode = nMinorCode;
118 }
119
120 sal_Int32 getInstalledError() const
121 {
122 return m_nErrorCode;
123 }
124
125 sal_Int32 getMinorErrorCode() const
126 {
127 return m_nMinorCode;
128 }
129
130 css::uno::Reference< css::task::XInteractionHandler > const &
132 {
134 m_xInteractionHandler = m_xCommandEnvironment->getInteractionHandler();
135
137 }
138
139 const css::uno::Reference< css::ucb::XCommandEnvironment >&
141 {
143 }
144
145 }; // end class TaskHandling
146
147
148 typedef std::unordered_map< sal_Int32,TaskHandling > TaskMap;
149 private:
150
151 osl::Mutex m_aMutex;
152 sal_Int32 m_nCommandId;
154
155
156 public:
158 {
159 private:
160 OUString PropertyName;
161 sal_Int32 Handle;
163 css::uno::Type Typ; // Duplicates information in Value
164 css::uno::Any Value;
165 css::beans::PropertyState State;
166 sal_Int16 Attributes;
167 public:
168 explicit MyProperty( const OUString& thePropertyName );
169 MyProperty( bool theIsNative,
170 const OUString& thePropertyName,
171 sal_Int32 theHandle,
172 const css::uno::Type& theTyp,
173 const css::uno::Any& theValue,
174 const css::beans::PropertyState& theState,
175 sal_Int16 theAttributes );
176
177 inline const bool& IsNative() const;
178 const OUString& getPropertyName() const { return PropertyName; }
179 inline const sal_Int32& getHandle() const;
180 inline const css::uno::Type& getType() const;
181 inline const css::uno::Any& getValue() const;
182 inline const css::beans::PropertyState& getState() const;
183 inline const sal_Int16& getAttributes() const;
184
185 // The set* functions are declared const, because the key of "this" stays intact
186 inline void setValue( css::uno::Any theValue ) const;
187 inline void setState( const css::beans::PropertyState& theState ) const;
188 };
189
191 {
192 bool operator()( const MyProperty& rKey1, const MyProperty& rKey2 ) const
193 {
194 return rKey1.getPropertyName() < rKey2.getPropertyName();
195 }
196 };
197
199
201 {
202 public:
205 ~UnqPathData();
206
208 std::vector< Notifier* > notifier;
209
210 // Three views on the PersistentPropertySet
211 css::uno::Reference< css::ucb::XPersistentPropertySet > xS;
212 css::uno::Reference< css::beans::XPropertyContainer > xC;
213 css::uno::Reference< css::beans::XPropertyAccess > xA;
214 };
215
216 typedef std::unordered_map< OUString,UnqPathData > ContentMap;
217
218 TaskManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
219 FileProvider* pProvider, bool bWithConfig );
220 ~TaskManager();
221
223 void startTask(
224 sal_Int32 CommandId,
225 const css::uno::Reference< css::ucb::XCommandEnvironment >& xCommandEnv );
226
227 sal_Int32 getCommandId();
228
229
236 void installError( sal_Int32 CommandId,
237 sal_Int32 ErrorCode,
238 sal_Int32 minorCode = TASKHANDLER_NO_ERROR );
239
240 void retrieveError( sal_Int32 CommandId,
241 sal_Int32 &ErrorCode,
242 sal_Int32 &minorCode);
243
249 void endTask( sal_Int32 CommandId,
250 // the physical URL of the object
251 const OUString& aUnqPath,
252 BaseContent* pContent);
253
254
259 void handleTask( sal_Int32 CommandId,
260 const css::uno::Reference< css::task::XInteractionRequest >& request );
261
266 void clearError( sal_Int32 );
267
273 void registerNotifier( const OUString& aUnqPath,Notifier* pNotifier );
274
275 void deregisterNotifier( const OUString& aUnqPath,Notifier* pNotifier );
276
277
288 void associate( const OUString& UnqPath,
289 const OUString& PropertyName,
290 const css::uno::Any& DefaultValue,
291 const sal_Int16 Attributes );
292
296 void deassociate( const OUString& UnqPath,
297 const OUString& PropertyName );
298
299
300 // Every method having a command id is not allowed to throw anything,
301 // but instead must install every error code in the task handler
302
303
309 void page( sal_Int32 CommandId,
310 const OUString& aUnqPath,
311 const css::uno::Reference< css::io::XOutputStream >& xOutputStream );
312
313
318 css::uno::Reference< css::io::XInputStream >
319 open( sal_Int32 CommandId,
320 const OUString& aUnqPath,
321 bool bLock );
322
323
329 css::uno::Reference< css::io::XStream >
330 open_rw( sal_Int32 CommandId,
331 const OUString& aUnqPath,
332 bool bLock );
333
334
340 css::uno::Reference< css::ucb::XDynamicResultSet >
341 ls( sal_Int32 CommandId,
342 const OUString& aUnqPath,
343 const sal_Int32 OpenMode,
344 const css::uno::Sequence< css::beans::Property >& sProperty,
345 const css::uno::Sequence< css::ucb::NumberedSortingInfo > & sSortingInfo );
346
347
352 // Info for commands
353 css::uno::Reference< css::ucb::XCommandInfo >
354 info_c();
355
356 // Info for the properties
357 css::uno::Reference< css::beans::XPropertySetInfo >
358 info_p( const OUString& aUnqPath );
359
360
365 css::uno::Sequence< css::uno::Any >
366 setv( const OUString& aUnqPath,
367 const css::uno::Sequence< css::beans::PropertyValue >& values );
368
369
375 css::uno::Reference< css::sdbc::XRow >
376 getv( sal_Int32 CommandId,
377 const OUString& aUnqPath,
378 const css::uno::Sequence< css::beans::Property >& properties );
379
380
381 /********************************************************************************/
382 /* transfer-commands */
383 /********************************************************************************/
384
389 void
390 move( sal_Int32 CommandId,
391 const OUString& srcUnqPath, // Full file(folder)-path
392 const OUString& dstUnqPath, // Path to the destination-directory
393 const sal_Int32 NameClash );
394
399 void
400 copy( sal_Int32 CommandId, // See "move"
401 const OUString& srcUnqPath,
402 const OUString& dstUnqPath,
403 sal_Int32 NameClash );
404
405 enum class FileUrlType { Folder = 1, File = -1, Unknown = 0 };
406
411 bool
412 remove( sal_Int32 CommandId,
413 const OUString& aUnqPath,
414 FileUrlType eTypeToMove = FileUrlType::Unknown,
415 bool MustExist = true );
416
417
418 /********************************************************************************/
419 /* write and create - commandos */
420 /********************************************************************************/
421
427 bool
428 mkdir( sal_Int32 CommandId,
429 const OUString& aDirectoryName,
430 bool OverWrite );
431
432
439 bool
440 mkfil( sal_Int32 CommandId,
441 const OUString& aFileName,
442 bool OverWrite,
443 const css::uno::Reference< css::io::XInputStream >& aInputStream );
444
445
451 bool
452 write( sal_Int32 CommandId,
453 const OUString& aUnqPath,
454 bool OverWrite,
455 const css::uno::Reference< css::io::XInputStream >& aInputStream );
456
457
458 void insertDefaultProperties( const OUString& aUnqPath );
459
460 static css::uno::Sequence< css::ucb::ContentInfo >
462
463
464 /******************************************************************************/
465 /* */
466 /* mapping of file urls */
467 /* to uncpath and vice versa */
468 /* */
469 /******************************************************************************/
470
471 static bool getUnqFromUrl( const OUString& Url, OUString& Unq );
472
473 static bool getUrlFromUnq( const OUString& Unq, OUString& Url );
474
475
477 css::uno::Reference< css::uno::XComponentContext > m_xContext;
478 css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry;
479
480 private:
481
482 /********************************************************************************/
483 /* get eventListeners */
484 /********************************************************************************/
485
486 std::vector< ContentEventNotifier >
487 getContentEventListeners( const OUString& aName );
488
489 std::vector< ContentEventNotifier >
490 getContentDeletedEventListeners( const OUString& aName );
491
492 std::vector< ContentEventNotifier >
493 getContentExchangedEventListeners( const OUString& aOldPrefix,
494 const OUString& aNewPrefix,
495 bool withChildren );
496
497 std::vector< PropertyChangeNotifier >
498 getPropertyChangeNotifier( const OUString& aName );
499
500 std::vector< PropertySetInfoChangeNotifier >
501 getPropertySetListeners( const OUString& aName );
502
503
504 /********************************************************************************/
505 /* notify eventListeners */
506 /********************************************************************************/
507
508 static void notifyPropertyChanges(
509 const std::vector<PropertyChangeNotifier>& listeners,
510 const css::uno::Sequence<css::beans::PropertyChangeEvent>& seqChanged);
511
512 static void notifyContentExchanged(
513 const std::vector<ContentEventNotifier>& listeners_vec);
514
515 static void
516 notifyInsert(const std::vector<ContentEventNotifier>& listeners,
517 const OUString& aChildName);
518
519 static void
520 notifyContentDeleted(const std::vector<ContentEventNotifier>& listeners);
521
522 static void
523 notifyContentRemoved(const std::vector<ContentEventNotifier>& listeners,
524 const OUString& aChildName);
525
526 static void notifyPropertyAdded(
527 const std::vector<PropertySetInfoChangeNotifier>& listeners,
528 const OUString& aPropertyName);
529
530 static void notifyPropertyRemoved(
531 const std::vector<PropertySetInfoChangeNotifier>& listeners,
532 const OUString& aPropertyName);
533
534 /********************************************************************************/
535 /* remove persistent propertyset */
536 /********************************************************************************/
537
538 void erasePersistentSetWithoutChildren( const OUString& aUnqPath );
539 void erasePersistentSet( const OUString& aUnqPath,
540 bool withChildren = false );
541
542 /********************************************************************************/
543 /* copy persistent propertyset */
544 /* from srcUnqPath to dstUnqPath */
545 /********************************************************************************/
546
547 void copyPersistentSetWithoutChildren( const OUString& srcUnqPath,
548 const OUString& dstUnqPath );
549 void copyPersistentSet( const OUString& srcUnqPath,
550 const OUString& dstUnqPath,
551 bool withChildren );
552
553
554 // Special optimized method for getting the properties of a directoryitem, which
555 // is returned by osl::DirectoryItem::getNextItem()
556
557 bool
558 getv( const css::uno::Sequence< css::beans::Property >& properties,
559 osl::DirectoryItem& DirItem,
560 OUString& aUnqPath,
561 bool& bIsRegular,
562 css::uno::Reference< css::sdbc::XRow > & row );
563
564
570 void load( const TaskManager::ContentMap::iterator& it,
571 bool create );
572
579 void
580 commit(
581 const TaskManager::ContentMap::iterator& it,
582 const osl::FileStatus& aFileStatus );
583
590 static void
592 sal_Int32& n_Mask,
593 const css::uno::Sequence< css::beans::Property >& seq );
594
595
596 // Helper function for public copy
597
598 osl::FileBase::RC
600 const OUString& srcUnqPath,
601 const OUString& dstUnqPath,
602 FileUrlType TypeToCopy,
603 bool testExistence );
604
605
606 // Helper function for mkfil,mkdir and write
607 // Creates whole path
608 // returns success of the operation
609 // The call determines the errorCode, which should be used to install
610 // any error
611
612 bool
613 ensuredir( sal_Int32 CommandId,
614 const OUString& aDirectoryName,
615 sal_Int32 errorCode );
616
617 // General
619
620
621 public:
622
623 static constexpr OUStringLiteral FolderContentType =
624 u"application/vnd.sun.staroffice.fsys-folder";
625 static constexpr OUStringLiteral FileContentType =
626 u"application/vnd.sun.staroffice.fsys-file";
627
628
629 private:
630
632 css::uno::Sequence< css::ucb::CommandInfo > m_sCommandInfo;
633
634 public:
635 // Miscellaneous:
636 // Methods for "writeComponentInfo" and "createComponentFactory"
637
638 static void getScheme( OUString& Scheme );
639 };
640
641} // end namespace TaskHandling
642
643/* 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:178
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:165
void installError(sal_Int32 nErrorCode, sal_Int32 nMinorCode)
Definition: filtask.hxx:113
const css::uno::Reference< css::ucb::XCommandEnvironment > & getCommandEnvironment() const
Definition: filtask.hxx:140
css::uno::Reference< css::task::XInteractionHandler > const & getInteractionHandler()
Definition: filtask.hxx:131
css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHandler
Definition: filtask.hxx:82
css::uno::Reference< css::ucb::XCommandEnvironment > m_xCommandEnvironment
Definition: filtask.hxx:83
TaskHandling(css::uno::Reference< css::ucb::XCommandEnvironment > xCommandEnv)
Definition: filtask.hxx:88
css::uno::Reference< css::beans::XPropertyAccess > xA
Definition: filtask.hxx:213
std::vector< Notifier * > notifier
Definition: filtask.hxx:208
css::uno::Reference< css::ucb::XPersistentPropertySet > xS
Definition: filtask.hxx:211
css::uno::Reference< css::beans::XPropertyContainer > xC
Definition: filtask.hxx:212
std::vector< ContentEventNotifier > getContentEventListeners(const OUString &aName)
Definition: filtask.cxx:2542
static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo()
Definition: filtask.cxx:2904
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: filtask.hxx:477
void erasePersistentSetWithoutChildren(const OUString &aUnqPath)
Definition: filtask.cxx:2784
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:1673
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:835
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:1764
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:773
std::vector< ContentEventNotifier > getContentDeletedEventListeners(const OUString &aName)
Definition: filtask.cxx:2564
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:2926
o3tl::sorted_vector< MyProperty, MyPropertyLess > PropertySet
Definition: filtask.hxx:198
static void notifyContentDeleted(const std::vector< ContentEventNotifier > &listeners)
Definition: filtask.cxx:2593
std::unordered_map< sal_Int32, TaskHandling > TaskMap
Definition: filtask.hxx:148
std::vector< PropertyChangeNotifier > getPropertyChangeNotifier(const OUString &aName)
Definition: filtask.cxx:2748
static constexpr OUStringLiteral FolderContentType
Definition: filtask.hxx:623
FileProvider * m_pProvider
Definition: filtask.hxx:476
void erasePersistentSet(const OUString &aUnqPath, bool withChildren=false)
Definition: filtask.cxx:2804
css::uno::Sequence< css::ucb::CommandInfo > m_sCommandInfo
Definition: filtask.hxx:632
void copyPersistentSet(const OUString &srcUnqPath, const OUString &dstUnqPath, bool withChildren)
Definition: filtask.cxx:2872
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:1733
void deregisterNotifier(const OUString &aUnqPath, Notifier *pNotifier)
Definition: filtask.cxx:502
void commit(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:2244
static void notifyInsert(const std::vector< ContentEventNotifier > &listeners, const OUString &aChildName)
Definition: filtask.cxx:2584
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:1954
void copyPersistentSetWithoutChildren(const OUString &srcUnqPath, const OUString &dstUnqPath)
Definition: filtask.cxx:2842
static bool getUrlFromUnq(const OUString &Unq, OUString &Url)
Definition: filtask.cxx:1975
std::unordered_map< OUString, UnqPathData > ContentMap
Definition: filtask.hxx:216
static void notifyPropertyChanges(const std::vector< PropertyChangeNotifier > &listeners, const css::uno::Sequence< css::beans::PropertyChangeEvent > &seqChanged)
Definition: filtask.cxx:2768
void load(const TaskManager::ContentMap::iterator &it, bool create)
Load the properties from configuration, if create == true create them.
Definition: filtask.cxx:2192
bool ensuredir(sal_Int32 CommandId, const OUString &aDirectoryName, sal_Int32 errorCode)
Definition: filtask.cxx:2062
css::uno::Reference< css::beans::XPropertySetInfo > info_p(const OUString &aUnqPath)
Definition: filtask.cxx:818
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:742
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:2149
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:710
void insertDefaultProperties(const OUString &aUnqPath)
Definition: filtask.cxx:1923
css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry
Definition: filtask.hxx:478
PropertySet m_aDefaultProperties
Definition: filtask.hxx:631
static void notifyPropertyRemoved(const std::vector< PropertySetInfoChangeNotifier > &listeners, const OUString &aPropertyName)
Definition: filtask.cxx:2643
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:1511
static void notifyContentExchanged(const std::vector< ContentEventNotifier > &listeners_vec)
Definition: filtask.cxx:2737
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:1131
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:1339
std::vector< ContentEventNotifier > getContentExchangedEventListeners(const OUString &aOldPrefix, const OUString &aNewPrefix, bool withChildren)
Definition: filtask.cxx:2655
osl::FileBase::RC copy_recursive(const OUString &srcUnqPath, const OUString &dstUnqPath, FileUrlType TypeToCopy, bool testExistence)
Definition: filtask.cxx:1988
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:804
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:621
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:2633
static constexpr OUStringLiteral FileContentType
Definition: filtask.hxx:625
static void notifyContentRemoved(const std::vector< ContentEventNotifier > &listeners, const OUString &aChildName)
Definition: filtask.cxx:2602
std::vector< PropertySetInfoChangeNotifier > getPropertySetListeners(const OUString &aName)
Definition: filtask.cxx:2613
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:192