LibreOffice Module ucb (master)  1
bc.cxx
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 
20 #include <rtl/uri.hxx>
21 #include <rtl/ustrbuf.hxx>
22 #include <rtl/ref.hxx>
23 
24 #include <tools/diagnose_ex.h>
25 #include <com/sun/star/lang/NoSupportException.hpp>
26 #include <com/sun/star/sdbc/SQLException.hpp>
27 #include <com/sun/star/ucb/IllegalIdentifierException.hpp>
28 #include <com/sun/star/ucb/OpenMode.hpp>
29 #include <com/sun/star/beans/IllegalTypeException.hpp>
30 #include <com/sun/star/io/XActiveDataStreamer.hpp>
31 #include <com/sun/star/io/XOutputStream.hpp>
32 #include <com/sun/star/io/XActiveDataSink.hpp>
33 #include <com/sun/star/ucb/NameClash.hpp>
34 #include <comphelper/fileurl.hxx>
36 #include "filglob.hxx"
37 #include "filid.hxx"
38 #include "filrow.hxx"
39 #include "bc.hxx"
40 #include "prov.hxx"
41 #include "filerror.hxx"
42 #include "filinsreq.hxx"
43 
44 using namespace fileaccess;
45 using namespace com::sun::star;
46 using namespace com::sun::star::uno;
47 using namespace com::sun::star::ucb;
48 
49 #if OSL_DEBUG_LEVEL > 0
50 #define THROW_WHERE SAL_WHERE
51 #else
52 #define THROW_WHERE ""
53 #endif
54 
56 {
58  std::unordered_map<OUString, ContainerHelper> m_aMap;
59 
60 public:
61  void disposeAndClear(std::unique_lock<std::mutex>& rGuard, const lang::EventObject& rEvt)
62  {
63  // create a copy, because do not fire event in a guarded section
64  std::unordered_map<OUString, ContainerHelper> tempMap = std::move(m_aMap);
65  for (auto& rPair : tempMap)
66  rPair.second.disposeAndClear(rGuard, rEvt);
67  }
68  void addInterface(std::unique_lock<std::mutex>& rGuard, const OUString& rKey, const uno::Reference<beans::XPropertiesChangeListener>& rListener)
69  {
70  m_aMap[rKey].addInterface(rGuard, rListener);
71  }
72  void removeInterface(std::unique_lock<std::mutex>& rGuard, const OUString& rKey, const uno::Reference<beans::XPropertiesChangeListener>& rListener)
73  {
74  // search container with id rKey
75  auto iter = m_aMap.find(rKey);
76  // container found?
77  if (iter != m_aMap.end())
78  iter->second.removeInterface(rGuard, rListener);
79  }
80  std::vector< OUString > getContainedTypes(std::unique_lock<std::mutex>& rGuard) const
81  {
82  std::vector<OUString> aInterfaceTypes;
83  aInterfaceTypes.reserve(m_aMap.size());
84  for (const auto& rPair : m_aMap)
85  // are interfaces added to this container?
86  if (rPair.second.getLength(rGuard))
87  // yes, put the type in the array
88  aInterfaceTypes.push_back(rPair.first);
89  return aInterfaceTypes;
90  }
91  comphelper::OInterfaceContainerHelper4<beans::XPropertiesChangeListener>* getContainer(std::unique_lock<std::mutex>& , const OUString& rKey)
92  {
93  auto iter = m_aMap.find(rKey);
94  if (iter != m_aMap.end())
95  return &iter->second;
96  return nullptr;
97  }
98 };
99 
100 
101 /****************************************************************************************/
102 /* */
103 /* BaseContent */
104 /* */
105 /****************************************************************************************/
106 
107 
108 // Private Constructor for just inserted Contents
109 
111  const OUString& parentName,
112  bool bFolder )
113  : m_pMyShell( pMyShell ),
114  m_aUncPath( parentName ),
115  m_bFolder( bFolder ),
116  m_nState( JustInserted )
117 {
118  m_pMyShell->m_pProvider->acquire();
119  // No registering, since we have no name
120 }
121 
122 
123 // Constructor for full featured Contents
124 
126  const Reference< XContentIdentifier >& xContentIdentifier,
127  const OUString& aUncPath )
128  : m_pMyShell( pMyShell ),
129  m_xContentIdentifier( xContentIdentifier ),
130  m_aUncPath( aUncPath ),
131  m_bFolder( false ),
132  m_nState( FullFeatured )
133 {
134  m_pMyShell->m_pProvider->acquire();
137 }
138 
139 
141 {
142  if( ( m_nState & FullFeatured ) || ( m_nState & Deleted ) )
143  {
145  }
146  m_pMyShell->m_pProvider->release();
147 }
148 
149 
150 // XComponent
151 
152 
153 void SAL_CALL
155 {
156  std::unique_lock aGuard( m_aMutex );
157 
158  m_aDisposeEventListeners.addInterface( aGuard, Listener );
159 }
160 
161 
162 void SAL_CALL
164 {
165  std::unique_lock aGuard( m_aMutex );
166 
167  m_aDisposeEventListeners.removeInterface( aGuard, Listener );
168 }
169 
170 
171 void SAL_CALL
173 {
174  lang::EventObject aEvt;
175  aEvt.Source = static_cast< XContent* >( this );
176 
177  std::unique_lock aGuard( m_aMutex );
178 
179  std::unique_ptr<PropertyListeners> pPropertyListener = std::move(m_pPropertyListener);
180 
183 
184  if( pPropertyListener )
185  pPropertyListener->disposeAndClear( aGuard, aEvt );
186 
188 }
189 
190 // XServiceInfo
191 OUString SAL_CALL
193 {
194  return "com.sun.star.comp.ucb.FileContent";
195 }
196 
197 sal_Bool SAL_CALL
198 BaseContent::supportsService( const OUString& ServiceName )
199 {
200  return cppu::supportsService( this, ServiceName );
201 }
202 
203 Sequence< OUString > SAL_CALL
205 {
206  Sequence<OUString> ret { "com.sun.star.ucb.FileContent" };
207  return ret;
208 }
209 
210 // XCommandProcessor
211 
212 
213 sal_Int32 SAL_CALL
215 {
216  return m_pMyShell->getCommandId();
217 }
218 
219 
220 void SAL_CALL
221 BaseContent::abort( sal_Int32 /*CommandId*/ )
222 {
223 }
224 
225 
226 Any SAL_CALL
227 BaseContent::execute( const Command& aCommand,
228  sal_Int32 CommandId,
229  const Reference< XCommandEnvironment >& Environment )
230 {
231  if( ! CommandId )
232  // A Command with commandid zero cannot be aborted
233  CommandId = createCommandIdentifier();
234 
235  m_pMyShell->startTask( CommandId,
236  Environment );
237 
238  Any aAny;
239 
240  if (aCommand.Name == "getPropertySetInfo") // No exceptions
241  {
242  aAny <<= getPropertySetInfo();
243  }
244  else if (aCommand.Name == "getCommandInfo") // no exceptions
245  {
246  aAny <<= getCommandInfo();
247  }
248  else if ( aCommand.Name == "setPropertyValues" )
249  {
250  Sequence< beans::PropertyValue > sPropertyValues;
251 
252  if( ! ( aCommand.Argument >>= sPropertyValues ) )
253  m_pMyShell->installError( CommandId,
255  else
256  aAny <<= setPropertyValues( CommandId,sPropertyValues ); // calls endTask by itself
257  }
258  else if ( aCommand.Name == "getPropertyValues" )
259  {
260  Sequence< beans::Property > ListOfRequestedProperties;
261 
262  if( ! ( aCommand.Argument >>= ListOfRequestedProperties ) )
263  m_pMyShell->installError( CommandId,
265  else
266  aAny <<= getPropertyValues( CommandId,
267  ListOfRequestedProperties );
268  }
269  else if ( aCommand.Name == "open" )
270  {
271  OpenCommandArgument2 aOpenArgument;
272  if( ! ( aCommand.Argument >>= aOpenArgument ) )
273  m_pMyShell->installError( CommandId,
275  else
276  {
277  Reference< XDynamicResultSet > result = open( CommandId,aOpenArgument );
278  if( result.is() )
279  aAny <<= result;
280  }
281  }
282  else if ( aCommand.Name == "delete" )
283  {
284  if( ! aCommand.Argument.has< bool >() )
285  m_pMyShell->installError( CommandId,
287  else
288  deleteContent( CommandId );
289  }
290  else if ( aCommand.Name == "transfer" )
291  {
292  TransferInfo aTransferInfo;
293  if( ! ( aCommand.Argument >>= aTransferInfo ) )
294  m_pMyShell->installError( CommandId,
296  else
297  transfer( CommandId, aTransferInfo );
298  }
299  else if ( aCommand.Name == "insert" )
300  {
301  InsertCommandArgument aInsertArgument;
302  if( ! ( aCommand.Argument >>= aInsertArgument ) )
303  m_pMyShell->installError( CommandId,
305  else
306  insert( CommandId,aInsertArgument );
307  }
308  else if ( aCommand.Name == "getCasePreservingURL" )
309  {
310  Reference< sdbc::XRow > xRow = getPropertyValues( CommandId, { { "CasePreservingURL", -1, cppu::UnoType<sal_Bool>::get(), 0 } });
311  OUString CasePreservingURL = xRow->getString(1);
312  if(!xRow->wasNull())
313  aAny <<= CasePreservingURL;
314  }
315  else if ( aCommand.Name == "createNewContent" )
316  {
317  ucb::ContentInfo aArg;
318  if ( !( aCommand.Argument >>= aArg ) )
319  m_pMyShell->installError( CommandId,
321  else
322  aAny <<= createNewContent( aArg );
323  }
324  else
325  m_pMyShell->installError( CommandId,
327 
328 
329  // This is the only function allowed to throw an exception
330  endTask( CommandId );
331 
332  return aAny;
333 }
334 
335 
336 void SAL_CALL
338  const Sequence< OUString >& PropertyNames,
340 {
341  if( ! Listener.is() )
342  return;
343 
344  std::unique_lock aGuard( m_aMutex );
345 
346  if( ! m_pPropertyListener )
348 
349 
350  if( !PropertyNames.hasElements() )
351  m_pPropertyListener->addInterface( aGuard, OUString(),Listener );
352  else
353  {
355  for( const auto& rName : PropertyNames )
356  if( xProp->hasPropertyByName( rName ) )
357  m_pPropertyListener->addInterface( aGuard, rName,Listener );
358  }
359 }
360 
361 
362 void SAL_CALL
365 {
366  if( ! Listener.is() )
367  return;
368 
369  std::unique_lock aGuard( m_aMutex );
370 
371  if( ! m_pPropertyListener )
372  return;
373 
374  for( const auto& rName : PropertyNames )
375  m_pPropertyListener->removeInterface( aGuard, rName,Listener );
376 
377  m_pPropertyListener->removeInterface( aGuard, OUString(), Listener );
378 }
379 
380 
381 // XContent
382 
383 
386 {
387  return m_xContentIdentifier;
388 }
389 
390 
391 OUString SAL_CALL
393 {
394  if( !( m_nState & Deleted ) )
395  {
396  if( m_nState & JustInserted )
397  {
398  if ( m_bFolder )
400  else
402  }
403  else
404  {
405  try
406  {
407  // Who am I ?
408  Reference< sdbc::XRow > xRow = getPropertyValues( -1, { { "IsDocument", -1, cppu::UnoType<sal_Bool>::get(), 0 } });
409  bool IsDocument = xRow->getBoolean( 1 );
410 
411  if ( !xRow->wasNull() )
412  {
413  if ( IsDocument )
415  else
417  }
418  else
419  {
420  OSL_FAIL( "BaseContent::getContentType - Property value was null!" );
421  }
422  }
423  catch (const sdbc::SQLException&)
424  {
425  TOOLS_WARN_EXCEPTION("ucb.ucp.file", "");
426  }
427  }
428  }
429 
430  return OUString();
431 }
432 
433 
434 void SAL_CALL
436  const Reference< XContentEventListener >& Listener )
437 {
438  std::unique_lock aGuard( m_aMutex );
439 
440  m_aContentEventListeners.addInterface( aGuard, Listener );
441 }
442 
443 
444 void SAL_CALL
446  const Reference< XContentEventListener >& Listener )
447 {
448  std::unique_lock aGuard( m_aMutex );
449 
450  m_aContentEventListeners.removeInterface( aGuard, Listener );
451 }
452 
453 
454 // XPropertyContainer
455 
456 
457 void SAL_CALL
459  const OUString& Name,
460  sal_Int16 Attributes,
461  const Any& DefaultValue )
462 {
463  if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || Name.isEmpty() )
464  {
465  throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
466  }
467 
468  m_pMyShell->associate( m_aUncPath,Name,DefaultValue,Attributes );
469 }
470 
471 
472 void SAL_CALL
473 BaseContent::removeProperty( const OUString& Name )
474 {
475 
476  if( m_nState & Deleted )
477  throw beans::UnknownPropertyException( Name );
478 
480 }
481 
482 
483 // XContentCreator
484 
485 
488 {
490 }
491 
492 
493 Reference< XContent > SAL_CALL
495 {
496  // Check type.
497  if ( Info.Type.isEmpty() )
498  return Reference< XContent >();
499 
500  bool bFolder = Info.Type == TaskManager::FolderContentType;
501  if ( !bFolder )
502  {
503  if ( Info.Type != TaskManager::FileContentType )
504  {
505  // Neither folder nor file to create!
506  return Reference< XContent >();
507  }
508  }
509 
510  // Who am I ?
511  bool IsDocument = false;
512 
513  try
514  {
515  Reference< sdbc::XRow > xRow = getPropertyValues( -1, { { "IsDocument", -1, cppu::UnoType<sal_Bool>::get(), 0 } });
516  IsDocument = xRow->getBoolean( 1 );
517 
518  if ( xRow->wasNull() )
519  {
520  IsDocument = false;
521 // OSL_FAIL( // "BaseContent::createNewContent - Property value was null!" );
522 // return Reference< XContent >();
523  }
524  }
525  catch (const sdbc::SQLException&)
526  {
527  TOOLS_WARN_EXCEPTION("ucb.ucp.file", "");
528  return Reference< XContent >();
529  }
530 
531  OUString dstUncPath;
532 
533  if( IsDocument )
534  {
535  // KSO: Why is a document a XContentCreator? This is quite unusual.
536  dstUncPath = getParentName( m_aUncPath );
537  }
538  else
539  dstUncPath = m_aUncPath;
540 
541  return new BaseContent( m_pMyShell, dstUncPath, bFolder );
542 }
543 
544 
545 // XPropertySetInfoChangeNotifier
546 
547 
548 void SAL_CALL
551 {
552  std::unique_lock aGuard( m_aMutex );
553 
555 }
556 
557 
558 void SAL_CALL
561 {
562  std::unique_lock aGuard( m_aMutex );
563 
565 }
566 
567 
568 // XChild
569 
570 
573 {
574  OUString ParentUnq = getParentName( m_aUncPath );
575  OUString ParentUrl;
576 
577 
578  bool err = fileaccess::TaskManager::getUrlFromUnq( ParentUnq, ParentUrl );
579  if( err )
580  return Reference< XInterface >( nullptr );
581 
583 
584  try
585  {
586  return Reference<XInterface>( m_pMyShell->m_pProvider->queryContent( Identifier ), UNO_QUERY );
587  }
588  catch (const IllegalIdentifierException&)
589  {
590  return Reference< XInterface >();
591  }
592 }
593 
594 
595 void SAL_CALL
597  const Reference< XInterface >& )
598 {
599  throw lang::NoSupportException( THROW_WHERE );
600 }
601 
602 
603 // Private Methods
604 
605 
608 {
609  if( m_nState & Deleted )
610  return Reference< XCommandInfo >();
611 
612  return m_pMyShell->info_c();
613 }
614 
615 
618 {
619  if( m_nState & Deleted )
621 
622  return m_pMyShell->info_p( m_aUncPath );
623 }
624 
627  sal_Int32 nMyCommandIdentifier,
628  const Sequence< beans::Property >& PropertySet )
629 {
630  sal_Int32 nProps = PropertySet.getLength();
631  if ( !nProps )
632  return Reference< sdbc::XRow >();
633 
634  if( m_nState & Deleted )
635  {
636  Sequence< Any > aValues( nProps );
637  return Reference< sdbc::XRow >( new XRow_impl( m_pMyShell, aValues ) );
638  }
639 
640  if( m_nState & JustInserted )
641  {
642  Sequence< Any > aValues( nProps );
643  Any* pValues = aValues.getArray();
644 
645  const beans::Property* pProps = PropertySet.getConstArray();
646 
647  for ( sal_Int32 n = 0; n < nProps; ++n )
648  {
649  const beans::Property& rProp = pProps[ n ];
650  Any& rValue = pValues[ n ];
651 
652  if ( rProp.Name == "ContentType" )
653  {
654  rValue <<= (m_bFolder ? OUString(TaskManager::FolderContentType)
655  : OUString(TaskManager::FileContentType));
656  }
657  else if ( rProp.Name == "IsFolder" )
658  {
659  rValue <<= m_bFolder;
660  }
661  else if ( rProp.Name == "IsDocument" )
662  {
663  rValue <<= !m_bFolder;
664  }
665  }
666 
668  new XRow_impl( m_pMyShell, aValues ) );
669  }
670 
671  return m_pMyShell->getv( nMyCommandIdentifier,
672  m_aUncPath,
673  PropertySet );
674 }
675 
676 
679  sal_Int32 nMyCommandIdentifier,
680  const Sequence< beans::PropertyValue >& Values )
681 {
682  if( m_nState & Deleted )
683  { // To do
684  return Sequence< Any >( Values.getLength() );
685  }
686 
687  static const OUStringLiteral Title(u"Title");
688 
689  // Special handling for files which have to be inserted
690  if( m_nState & JustInserted )
691  {
692  for( const auto& rValue : Values )
693  {
694  if( rValue.Name == Title )
695  {
696  OUString NewTitle;
697  if( rValue.Value >>= NewTitle )
698  {
700  {
701  // User wants to set another Title before "insert".
702  // m_aUncPath contains previous own URI.
703 
704  sal_Int32 nLastSlash = m_aUncPath.lastIndexOf( '/' );
705  bool bTrailingSlash = false;
706  if ( nLastSlash == m_aUncPath.getLength() - 1 )
707  {
708  bTrailingSlash = true;
709  nLastSlash
710  = m_aUncPath.lastIndexOf( '/', nLastSlash );
711  }
712 
713  OSL_ENSURE( nLastSlash != -1,
714  "BaseContent::setPropertyValues: "
715  "Invalid URL!" );
716 
717  OUStringBuffer aBuf(
718  m_aUncPath.subView( 0, nLastSlash + 1 ) );
719 
720  if ( !NewTitle.isEmpty() )
721  {
722  aBuf.append( NewTitle );
723  if ( bTrailingSlash )
724  aBuf.append( '/' );
725  }
726  else
727  {
728  m_nState &= ~NameForInsertionSet;
729  }
730 
731  m_aUncPath = aBuf.makeStringAndClear();
732  }
733  else
734  {
735  if ( !NewTitle.isEmpty() )
736  {
737  // Initial Title before "insert".
738  // m_aUncPath contains parent's URI.
739 
740  if( !m_aUncPath.endsWith( "/" ) )
741  m_aUncPath += "/";
742 
743  m_aUncPath += rtl::Uri::encode( NewTitle,
744  rtl_UriCharClassPchar,
745  rtl_UriEncodeIgnoreEscapes,
746  RTL_TEXTENCODING_UTF8 );
748  }
749  }
750  }
751  }
752  }
753 
754  return Sequence< Any >( Values.getLength() );
755  }
756  else
757  {
758  Sequence< Any > ret = m_pMyShell->setv( m_aUncPath, // Does not handle Title
759  Values );
760  auto retRange = asNonConstRange(ret);
761 
762  // Special handling Title: Setting Title is equivalent to a renaming of the underlying file
763  for( sal_Int32 i = 0; i < Values.getLength(); ++i )
764  {
765  if( Values[i].Name != Title )
766  continue; // handled by setv
767 
768  OUString NewTitle;
769  if( !( Values[i].Value >>= NewTitle ) )
770  {
771  retRange[i] <<= beans::IllegalTypeException( THROW_WHERE );
772  break;
773  }
774  else if( NewTitle.isEmpty() )
775  {
776  retRange[i] <<= lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
777  break;
778  }
779 
780 
781  OUString aDstName = getParentName( m_aUncPath );
782  if( !aDstName.endsWith("/") )
783  aDstName += "/";
784 
785  aDstName += rtl::Uri::encode( NewTitle,
786  rtl_UriCharClassPchar,
787  rtl_UriEncodeIgnoreEscapes,
788  RTL_TEXTENCODING_UTF8 );
789 
790  m_pMyShell->move( nMyCommandIdentifier, // move notifies the children also;
791  m_aUncPath,
792  aDstName,
793  NameClash::KEEP );
794 
795  try
796  {
797  endTask( nMyCommandIdentifier );
798  }
799  catch(const Exception& e)
800  {
801  retRange[i] <<= e;
802  }
803 
804  // NameChanges come back through a ContentEvent
805  break; // only handling Title
806  } // end for
807 
808  return ret;
809  }
810 }
811 
812 
815  sal_Int32 nMyCommandIdentifier,
816  const OpenCommandArgument2& aCommandArgument )
817 {
819 
820  if( m_nState & Deleted )
821  {
822  m_pMyShell->installError( nMyCommandIdentifier,
824  }
825  else if( m_nState & JustInserted )
826  {
827  m_pMyShell->installError( nMyCommandIdentifier,
829  }
830  else
831  {
832  if( aCommandArgument.Mode == OpenMode::DOCUMENT ||
833  aCommandArgument.Mode == OpenMode::DOCUMENT_SHARE_DENY_NONE )
834 
835  {
836  Reference< io::XOutputStream > outputStream( aCommandArgument.Sink,UNO_QUERY );
837  if( outputStream.is() )
838  {
839  m_pMyShell->page( nMyCommandIdentifier,
840  m_aUncPath,
841  outputStream );
842  }
843 
844  bool bLock = ( aCommandArgument.Mode != OpenMode::DOCUMENT_SHARE_DENY_NONE );
845 
846  Reference< io::XActiveDataSink > activeDataSink( aCommandArgument.Sink,UNO_QUERY );
847  if( activeDataSink.is() )
848  {
849  activeDataSink->setInputStream( m_pMyShell->open( nMyCommandIdentifier,
850  m_aUncPath,
851  bLock ) );
852  }
853 
854  Reference< io::XActiveDataStreamer > activeDataStreamer( aCommandArgument.Sink,UNO_QUERY );
855  if( activeDataStreamer.is() )
856  {
857  activeDataStreamer->setStream( m_pMyShell->open_rw( nMyCommandIdentifier,
858  m_aUncPath,
859  bLock ) );
860  }
861  }
862  else if ( aCommandArgument.Mode == OpenMode::ALL ||
863  aCommandArgument.Mode == OpenMode::FOLDERS ||
864  aCommandArgument.Mode == OpenMode::DOCUMENTS )
865  {
866  retValue = m_pMyShell->ls( nMyCommandIdentifier,
867  m_aUncPath,
868  aCommandArgument.Mode,
869  aCommandArgument.Properties,
870  aCommandArgument.SortingInfo );
871  }
872 // else if( aCommandArgument.Mode ==
873 // OpenMode::DOCUMENT_SHARE_DENY_NONE ||
874 // aCommandArgument.Mode ==
875 // OpenMode::DOCUMENT_SHARE_DENY_WRITE )
876 // m_pMyShell->installError( nMyCommandIdentifier,
877 // TASKHANDLING_UNSUPPORTED_OPEN_MODE,
878 // aCommandArgument.Mode);
879  else
880  m_pMyShell->installError( nMyCommandIdentifier,
882  aCommandArgument.Mode);
883  }
884 
885  return retValue;
886 }
887 
888 
889 void
890 BaseContent::deleteContent( sal_Int32 nMyCommandIdentifier )
891 {
892  if( m_nState & Deleted )
893  return;
894 
895  if( m_pMyShell->remove( nMyCommandIdentifier,m_aUncPath ) )
896  {
897  std::unique_lock aGuard( m_aMutex );
898  m_nState |= Deleted;
899  }
900 }
901 
902 
903 void
904 BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
905  const TransferInfo& aTransferInfo )
906 {
907  if( m_nState & Deleted )
908  return;
909 
910  if( !comphelper::isFileUrl(aTransferInfo.SourceURL) )
911  {
912  m_pMyShell->installError( nMyCommandIdentifier,
914  return;
915  }
916 
917  OUString srcUnc;
918  if( fileaccess::TaskManager::getUnqFromUrl( aTransferInfo.SourceURL,srcUnc ) )
919  {
920  m_pMyShell->installError( nMyCommandIdentifier,
922  return;
923  }
924 
925  OUString srcUncPath = srcUnc;
926 
927  // Determine the new title !
928  OUString NewTitle;
929  if( !aTransferInfo.NewTitle.isEmpty() )
930  NewTitle = rtl::Uri::encode( aTransferInfo.NewTitle,
931  rtl_UriCharClassPchar,
932  rtl_UriEncodeIgnoreEscapes,
933  RTL_TEXTENCODING_UTF8 );
934  else
935  NewTitle = srcUncPath.copy( 1 + srcUncPath.lastIndexOf( '/' ) );
936 
937  // Is destination a document or a folder ?
938  Reference< sdbc::XRow > xRow = getPropertyValues( nMyCommandIdentifier,{ { "IsDocument", -1, cppu::UnoType<sal_Bool>::get(), 0 } } );
939  bool IsDocument = xRow->getBoolean( 1 );
940  if( xRow->wasNull() )
941  { // Destination file type could not be determined
942  m_pMyShell->installError( nMyCommandIdentifier,
944  return;
945  }
946 
947  OUString dstUncPath;
948  if( IsDocument )
949  { // as sibling
950  sal_Int32 lastSlash = m_aUncPath.lastIndexOf( '/' );
951  dstUncPath = m_aUncPath.copy(0,lastSlash );
952  }
953  else
954  // as child
955  dstUncPath = m_aUncPath;
956 
957  dstUncPath += "/" + NewTitle;
958 
959  sal_Int32 NameClash = aTransferInfo.NameClash;
960 
961  if( aTransferInfo.MoveData )
962  m_pMyShell->move( nMyCommandIdentifier,srcUncPath,dstUncPath,NameClash );
963  else
964  m_pMyShell->copy( nMyCommandIdentifier,srcUncPath,dstUncPath,NameClash );
965 }
966 
967 
968 void BaseContent::insert( sal_Int32 nMyCommandIdentifier,
969  const InsertCommandArgument& aInsertArgument )
970 {
971  if( m_nState & FullFeatured )
972  {
973  m_pMyShell->write( nMyCommandIdentifier,
974  m_aUncPath,
975  aInsertArgument.ReplaceExisting,
976  aInsertArgument.Data );
977  return;
978  }
979 
980  if( ! ( m_nState & JustInserted ) )
981  {
982  m_pMyShell->installError( nMyCommandIdentifier,
984  return;
985  }
986 
987  // Inserts the content, which has the flag m_bIsFresh
988 
989  if( ! (m_nState & NameForInsertionSet) )
990  {
991  m_pMyShell->installError( nMyCommandIdentifier,
993  return;
994  }
995 
996  // Inserting a document or a file?
997  bool bDocument = false;
998 
999  Reference< sdbc::XRow > xRow = getPropertyValues( -1, { { "IsDocument", -1, cppu::UnoType<sal_Bool>::get(), 0 } });
1000 
1001  bool contentTypeSet = true; // is set to false, if contentType not set
1002  try
1003  {
1004  bDocument = xRow->getBoolean( 1 );
1005  if( xRow->wasNull() )
1006  contentTypeSet = false;
1007 
1008  }
1009  catch (const sdbc::SQLException&)
1010  {
1011  TOOLS_WARN_EXCEPTION("ucb.ucp.file", "");
1012  contentTypeSet = false;
1013  }
1014 
1015  if( ! contentTypeSet )
1016  {
1017  m_pMyShell->installError( nMyCommandIdentifier,
1019  return;
1020  }
1021 
1022 
1023  bool success = false;
1024  if( bDocument )
1025  success = m_pMyShell->mkfil( nMyCommandIdentifier,
1026  m_aUncPath,
1027  aInsertArgument.ReplaceExisting,
1028  aInsertArgument.Data );
1029  else
1030  {
1031  while( ! success )
1032  {
1033  success = m_pMyShell->mkdir( nMyCommandIdentifier,
1034  m_aUncPath,
1035  aInsertArgument.ReplaceExisting );
1036  if( success )
1037  break;
1038 
1039  XInteractionRequestImpl aRequestImpl(
1040  rtl::Uri::decode(
1041  OUString(getTitle(m_aUncPath)),
1042  rtl_UriDecodeWithCharset,
1043  RTL_TEXTENCODING_UTF8),
1044  static_cast<cppu::OWeakObject*>(this),
1045  m_pMyShell,nMyCommandIdentifier);
1046  uno::Reference<task::XInteractionRequest> const& xReq(aRequestImpl.getRequest());
1047 
1048  m_pMyShell->handleTask( nMyCommandIdentifier, xReq );
1049  if (aRequestImpl.aborted() || aRequestImpl.newName().isEmpty())
1050  // means aborting
1051  break;
1052 
1053  // determine new uncpath
1054  m_pMyShell->clearError( nMyCommandIdentifier );
1056  if( !m_aUncPath.endsWith( "/" ) )
1057  m_aUncPath += "/";
1058 
1059  m_aUncPath += rtl::Uri::encode( aRequestImpl.newName(),
1060  rtl_UriCharClassPchar,
1061  rtl_UriEncodeIgnoreEscapes,
1062  RTL_TEXTENCODING_UTF8 );
1063  }
1064  }
1065 
1066  if ( ! success )
1067  return;
1068 
1070 
1073 
1074  std::unique_lock aGuard( m_aMutex );
1076 }
1077 
1078 
1079 void BaseContent::endTask( sal_Int32 CommandId )
1080 {
1081  // This is the only function allowed to throw an exception
1082  m_pMyShell->endTask( CommandId,m_aUncPath,this );
1083 }
1084 
1085 
1086 std::optional<ContentEventNotifier>
1088 {
1089  std::unique_lock aGuard( m_aMutex );
1090 
1091  m_nState |= Deleted;
1092 
1093  if( m_aContentEventListeners.getLength(aGuard) == 0 )
1094  return {};
1095 
1097  this,
1100 }
1101 
1102 
1103 std::optional<ContentEventNotifier>
1104 BaseContent::cEXC( const OUString& aNewName )
1105 {
1106  std::unique_lock aGuard( m_aMutex );
1107 
1109  m_aUncPath = aNewName;
1110  m_xContentIdentifier = new FileContentIdentifier( aNewName );
1111 
1112  if( m_aContentEventListeners.getLength(aGuard) == 0 )
1113  return {};
1115  this,
1117  xOldRef,
1119 }
1120 
1121 
1122 std::optional<ContentEventNotifier>
1124 {
1125  std::unique_lock aGuard( m_aMutex );
1126  if( m_aContentEventListeners.getLength(aGuard) == 0 )
1127  return {};
1129  this,
1132 }
1133 
1134 std::optional<PropertySetInfoChangeNotifier>
1136 {
1137  std::unique_lock aGuard( m_aMutex );
1138  if( m_aPropertySetInfoChangeListeners.getLength(aGuard) == 0 )
1139  return {};
1141 }
1142 
1143 
1144 std::optional<PropertyChangeNotifier>
1146 {
1147  std::unique_lock aGuard( m_aMutex );
1148 
1149  if (!m_pPropertyListener)
1150  return {};
1151 
1152  const std::vector< OUString > seqNames = m_pPropertyListener->getContainedTypes(aGuard);
1153  if( seqNames.empty() )
1154  return {};
1155 
1156  ListenerMap listener;
1157  for( const auto& rName : seqNames )
1158  {
1160  if (!pContainer)
1161  continue;
1162  listener[rName] = pContainer->getElements(aGuard);
1163  }
1164 
1165  return PropertyChangeNotifier( this, std::move(listener) );
1166 }
1167 
1168 
1169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
#define TASKHANDLING_WRONG_GETPROPERTYVALUES_ARGUMENT
Definition: filerror.hxx:29
std::mutex m_aMutex
Definition: bc.hxx:206
#define TASKHANDLING_WRONG_TRANSFER_ARGUMENT
Definition: filerror.hxx:32
css::uno::Reference< css::ucb::XCommandInfo > getCommandInfo()
Definition: bc.cxx:607
constexpr OUStringLiteral IsDocument(u"IsDocument")
#define TASKHANDLING_WRONG_DELETE_ARGUMENT
Definition: filerror.hxx:31
css::uno::Reference< css::ucb::XContentIdentifier > m_xContentIdentifier
Definition: bc.hxx:196
#define TASKHANDLING_WRONG_SETPROPERTYVALUES_ARGUMENT
Definition: filerror.hxx:28
Reference< XRow > xRow
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
Definition: bc.cxx:596
void endTask(sal_Int32 CommandId, const OUString &aUnqPath, BaseContent *pContent)
Deinstalls the task and evaluates a possibly set error code.
Definition: filtask.cxx:382
std::optional< ContentEventNotifier > cCEL() override
Definition: bc.cxx:1123
void deleteContent(sal_Int32 nMyCommandIdentifier)
Definition: bc.cxx:890
#define TASKHANDLING_UNSUPPORTED_OPEN_MODE
Definition: filerror.hxx:35
friend class ContentEventNotifier
Definition: bc.hxx:252
virtual void SAL_CALL abort(sal_Int32 CommandId) override
Definition: bc.cxx:221
std::unordered_map< OUString, std::vector< css::uno::Reference< css::beans::XPropertiesChangeListener > > > ListenerMap
Definition: filnot.hxx:81
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: bc.cxx:198
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
Definition: bc.cxx:227
sal_Int64 n
aBuf
css::uno::Reference< css::ucb::XDynamicResultSet > open(sal_Int32 nMyCommandIdentifier, const css::ucb::OpenCommandArgument2 &aCommandArgument)
Definition: bc.cxx:814
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void deassociate(const OUString &UnqPath, const OUString &PropertyName)
Definition: filtask.cxx:568
virtual void SAL_CALL addContentEventListener(const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
Definition: bc.cxx:435
OUString Name
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
void insertDefaultProperties(const OUString &aUnqPath)
Definition: filtask.cxx:1923
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
Definition: bc.cxx:337
Title
#define TASKHANDLING_INSERTED_STATE_IN_OPEN_COMMAND
Definition: filerror.hxx:38
#define TASKHANDLING_TRANSFER_INVALIDURL
Definition: filerror.hxx:81
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aDisposeEventListeners
Definition: bc.hxx:207
virtual void SAL_CALL addProperty(const OUString &Name, sal_Int16 Attributes, const css::uno::Any &DefaultValue) override
Definition: bc.cxx:458
static constexpr OUStringLiteral FolderContentType
Definition: filtask.hxx:630
#define TASKHANDLING_DELETED_STATE_IN_OPEN_COMMAND
Definition: filerror.hxx:37
#define TASKHANDLER_UNSUPPORTED_COMMAND
Definition: filerror.hxx:27
virtual void SAL_CALL dispose() override
Definition: bc.cxx:172
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: bc.cxx:163
Value
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
virtual sal_Int32 SAL_CALL createCommandIdentifier() override
Definition: bc.cxx:214
FileProvider * m_pProvider
Definition: filtask.hxx:483
std::unique_ptr< PropertyListeners > m_pPropertyListener
Definition: bc.hxx:210
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: bc.cxx:154
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
comphelper::OInterfaceContainerHelper4< css::beans::XPropertySetInfoChangeListener > m_aPropertySetInfoChangeListeners
Definition: bc.hxx:209
void disposeAndClear(std::unique_lock< std::mutex > &rGuard, const lang::EventObject &rEvt)
Definition: bc.cxx:61
#define TASKHANDLING_TRANSFER_DESTFILETYPE
Definition: filerror.hxx:82
virtual void SAL_CALL addPropertySetInfoChangeListener(const css::uno::Reference< css::beans::XPropertySetInfoChangeListener > &Listener) override
Definition: bc.cxx:549
comphelper::OInterfaceContainerHelper4< css::ucb::XContentEventListener > m_aContentEventListeners
Definition: bc.hxx:208
virtual OUString SAL_CALL getContentType() override
Definition: bc.cxx:392
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent(const css::ucb::ContentInfo &Info) override
Definition: bc.cxx:494
void transfer(sal_Int32 nMyCommandIdentifier, const css::ucb::TransferInfo &aTransferInfo)
Definition: bc.cxx:904
static bool getUrlFromUnq(const OUString &Unq, OUString &Url)
Definition: filtask.cxx:1974
static constexpr OUStringLiteral FileContentType
Definition: filtask.hxx:632
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
#define TASKHANDLING_NOCONTENTTYPE_INSERT_COMMAND
Definition: filerror.hxx:52
err
#define TASKHANDLING_TRANSFER_INVALIDSCHEME
Definition: filerror.hxx:80
#define TOOLS_WARN_EXCEPTION(area, stream)
comphelper::OInterfaceContainerHelper4< beans::XPropertiesChangeListener > * getContainer(std::unique_lock< std::mutex > &, const OUString &rKey)
Definition: bc.cxx:91
std::unordered_map< OUString, ContainerHelper > m_aMap
Definition: bc.cxx:58
int i
virtual OUString SAL_CALL getImplementationName() override
Definition: bc.cxx:192
#define TASKHANDLING_WRONG_CREATENEWCONTENT_ARGUMENT
Definition: filerror.hxx:34
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: bc.cxx:204
std::optional< PropertyChangeNotifier > cPCL() override
Definition: bc.cxx:1145
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
css::uno::Reference< css::task::XInteractionRequest > const & getRequest() const
Definition: filinsreq.hxx:124
float u
unsigned char sal_Bool
sal_uInt16 m_nState
Definition: bc.hxx:204
static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo()
Definition: filtask.cxx:2903
OUString m_aUncPath
Definition: bc.hxx:197
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier) override
Definition: prov.cxx:112
css::uno::Type const & get()
virtual void SAL_CALL removePropertySetInfoChangeListener(const css::uno::Reference< css::beans::XPropertySetInfoChangeListener > &Listener) override
Definition: bc.cxx:559
OUString getParentName(std::u16string_view aFileName)
Definition: filglob.cxx:193
void insert(sal_Int32 nMyCommandIdentifier, const css::ucb::InsertCommandArgument &aInsertArgument)
Definition: bc.cxx:968
sal_Int32 getCommandId()
Definition: filtask.cxx:448
void deregisterNotifier(const OUString &aUnqPath, Notifier *pNotifier)
Definition: filtask.cxx:502
constexpr OUStringLiteral CasePreservingURL(u"CasePreservingURL")
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
virtual void SAL_CALL removeContentEventListener(const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
Definition: bc.cxx:445
virtual ~BaseContent() override
Definition: bc.cxx:140
std::vector< css::uno::Reference< ListenerT > > getElements(std::unique_lock< std::mutex > &rGuard) const
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...
const PropertyValue * pValues
std::u16string_view getTitle(std::u16string_view aPath)
Definition: filglob.cxx:186
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
Definition: bc.cxx:572
css::uno::Sequence< css::uno::Any > setPropertyValues(sal_Int32 nMyCommandIdentifier, const css::uno::Sequence< css::beans::PropertyValue > &Values)
Definition: bc.cxx:678
css::uno::Reference< css::ucb::XCommandInfo > info_c()
Info methods.
Definition: filtask.cxx:804
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
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo() override
Definition: bc.cxx:487
#define TASKHANDLING_WRONG_OPEN_ARGUMENT
Definition: filerror.hxx:30
std::vector< OUString > getContainedTypes(std::unique_lock< std::mutex > &rGuard) const
Definition: bc.cxx:80
static bool getUnqFromUrl(const OUString &Url, OUString &Unq)
Definition: filtask.cxx:1953
COMPHELPER_DLLPUBLIC bool isFileUrl(OUString const &url)
virtual void SAL_CALL removeProperty(const OUString &Name) override
Definition: bc.cxx:473
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::optional< ContentEventNotifier > cEXC(const OUString &aNewName) override
Definition: bc.cxx:1104
comphelper::OInterfaceContainerHelper4< beans::XPropertiesChangeListener > ContainerHelper
Definition: bc.cxx:57
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 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
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier() override
Definition: bc.cxx:385
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
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
Any result
#define THROW_WHERE
Definition: bc.cxx:50
css::uno::Reference< css::beans::XPropertySetInfo > info_p(const OUString &aUnqPath)
Definition: filtask.cxx:818
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
BaseContent(TaskManager *pMyShell, const OUString &parentName, bool bFolder)
Definition: bc.cxx:110
void endTask(sal_Int32 CommandId)
Definition: bc.cxx:1079
std::optional< PropertySetInfoChangeNotifier > cPSL() override
Definition: bc.cxx:1135
std::optional< ContentEventNotifier > cDEL() override
Definition: bc.cxx:1087
#define TASKHANDLING_WRONG_INSERT_ARGUMENT
Definition: filerror.hxx:33
css::uno::Reference< css::beans::XPropertySetInfo > getPropertySetInfo()
Definition: bc.cxx:617
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
#define TASKHANDLING_NONAMESET_INSERT_COMMAND
Definition: filerror.hxx:51
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
#define TASKHANDLING_NOFRESHINSERT_IN_INSERT_COMMAND
Definition: filerror.hxx:50
void startTask(sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &xCommandEnv)
Definition: filtask.cxx:367
css::uno::Reference< css::sdbc::XRow > getPropertyValues(sal_Int32 nMyCommandIdentifier, const css::uno::Sequence< css::beans::Property > &PropertySet)
Definition: bc.cxx:626
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
Definition: bc.cxx:363
void clearError(sal_Int32)
Clears any error which are set on the commandid.
Definition: filtask.cxx:413
void handleTask(sal_Int32 CommandId, const css::uno::Reference< css::task::XInteractionRequest > &request)
Handles an interactionrequest.
Definition: filtask.cxx:455
void removeInterface(std::unique_lock< std::mutex > &rGuard, const OUString &rKey, const uno::Reference< beans::XPropertiesChangeListener > &rListener)
Definition: bc.cxx:72
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
bool m_bDetectedRangeSegmentation false
TaskManager * m_pMyShell
Definition: bc.hxx:195
void addInterface(std::unique_lock< std::mutex > &rGuard, const OUString &rKey, const uno::Reference< beans::XPropertiesChangeListener > &rListener)
Definition: bc.cxx:68