20#include <com/sun/star/embed/ElementModes.hpp>
21#include <com/sun/star/embed/InvalidStorageException.hpp>
22#include <com/sun/star/embed/StorageWrappedTargetException.hpp>
23#include <com/sun/star/embed/XTransactedObject.hpp>
24#include <com/sun/star/packages/NoEncryptionException.hpp>
25#include <com/sun/star/packages/WrongPasswordException.hpp>
26#include <com/sun/star/ucb/NameClash.hpp>
27#include <com/sun/star/ucb/SimpleFileAccess.hpp>
29#include <com/sun/star/ucb/InteractiveIOException.hpp>
30#include <com/sun/star/ucb/IOErrorCode.hpp>
31#include <com/sun/star/container/ElementExistException.hpp>
32#include <com/sun/star/lang/XComponent.hpp>
33#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
34#include <com/sun/star/io/IOException.hpp>
35#include <com/sun/star/io/XTruncate.hpp>
36#include <com/sun/star/io/TempFile.hpp>
37#include <com/sun/star/sdbc/XResultSet.hpp>
38#include <com/sun/star/sdbc/XRow.hpp>
46#include <osl/diagnose.h>
62 uno::Reference< uno::XComponentContext >
const & xContext )
63:
m_aURL( aContent.getURL() )
68 OSL_ENSURE( !
m_aURL.isEmpty(),
"The URL must not be empty" );
71 throw uno::RuntimeException();
83 catch( uno::RuntimeException& )
96 uno::Reference< ucb::XCommandEnvironment >(),
99 return ::utl::UCBContentHelper::MakeFolder( aParent, aTitle, aResultContent );
106 std::unique_lock aGuard(
m_aMutex );
111 const uno::Reference< embed::XStorage >& xDest,
112 const OUString& aNewEntryName )
115 throw uno::RuntimeException();
117 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
119 uno::Reference< io::XInputStream > xSourceInput = aSourceContent.
openStream();
121 if ( !xSourceInput.is() )
122 throw io::IOException();
124 uno::Reference< io::XStream > xSubStream = xDest->openStreamElement(
126 embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
127 if ( !xSubStream.is() )
128 throw uno::RuntimeException();
130 uno::Reference< io::XOutputStream > xDestOutput = xSubStream->getOutputStream();
131 if ( !xDestOutput.is() )
132 throw uno::RuntimeException();
135 xDestOutput->closeOutput();
139 const uno::Reference<embed::XStorage>& xDest)
143 uno::Sequence< OUString > aProps( 2 );
144 OUString* pProps = aProps.getArray();
145 pProps[0] =
"TargetURL";
146 pProps[1] =
"IsFolder";
150 uno::Reference<sdbc::XResultSet> xResultSet
151 = rContent.
createCursor(aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS);
152 uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
153 if ( xResultSet.is() )
156 while ( xResultSet->next() )
158 OUString aSourceURL( xRow->getString( 1 ) );
159 bool bIsFolder( xRow->getBoolean(2) );
167 uno::Reference< embed::XStorage > xSubStorage = xDest->openStorageElement( aNewEntryName,
168 embed::ElementModes::READWRITE );
169 if ( !xSubStorage.is() )
170 throw uno::RuntimeException();
172 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
183 uno::Reference< embed::XTransactedObject > xTransact( xDest, uno::UNO_QUERY );
184 if ( xTransact.is() )
187 catch( ucb::InteractiveIOException& r )
189 if ( r.Code == ucb::IOErrorCode_NOT_EXISTING )
190 OSL_FAIL(
"The folder does not exist!" );
200 uno::Any aReturn = ::cppu::queryInterface
202 ,
static_cast<lang::XTypeProvider*
> (
this )
203 ,
static_cast<embed::XStorage*
> (
this )
204 ,
static_cast<embed::XHierarchicalStorageAccess*
> (
this )
205 ,
static_cast<container::XNameAccess*
> (
this )
206 ,
static_cast<container::XElementAccess*
> (
this )
207 ,
static_cast<lang::XComponent*
> (
this )
208 ,
static_cast<beans::XPropertySet*
> (
this ) );
213 return OWeakObject::queryInterface( rType );
218 OWeakObject::acquire();
223 OWeakObject::release();
230 static const uno::Sequence<uno::Type>
aTypes {
240 return css::uno::Sequence<sal_Int8>();
247 std::unique_lock aGuard(
m_aMutex );
249 if ( !xDest.is() || xDest == getXWeak() )
250 throw lang::IllegalArgumentException();
256 catch( embed::InvalidStorageException& )
260 catch( lang::IllegalArgumentException& )
264 catch( embed::StorageWrappedTargetException& )
268 catch( io::IOException& )
272 catch( uno::RuntimeException& )
276 catch( uno::Exception& )
278 uno::Any aCaught( ::cppu::getCaughtException() );
279 throw embed::StorageWrappedTargetException(
"Can't copy raw stream",
280 uno::Reference< io::XInputStream >(),
286 const OUString& aStreamName, sal_Int32 nOpenMode )
288 std::unique_lock aGuard(
m_aMutex );
293 std::unique_lock<std::mutex>& ,
294 std::u16string_view aStreamName, sal_Int32 nOpenMode )
298 aFileURL.
Append( aStreamName );
301 throw io::IOException();
303 if ( ( nOpenMode & embed::ElementModes::NOCREATE )
305 throw io::IOException();
307 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
308 uno::Reference< io::XStream > xResult;
311 if ( nOpenMode & embed::ElementModes::WRITE )
313 if ( aFileURL.
GetProtocol() == INetProtocol::File )
315 uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess(
316 ucb::SimpleFileAccess::create(
m_xContext ) );
323 StreamMode::STD_WRITE );
324 if ( pStream && !pStream->GetError() )
325 xResult.set( new ::utl::OStreamWrapper( std::move(pStream) ) );
329 throw io::IOException();
331 if ( nOpenMode & embed::ElementModes::TRUNCATE )
333 uno::Reference< io::XTruncate > xTrunc( xResult->getOutputStream(), uno::UNO_QUERY_THROW );
339 if ( ( nOpenMode & embed::ElementModes::TRUNCATE )
341 throw io::IOException();
344 uno::Reference< io::XInputStream > xInStream = aResultContent.
openStream();
348 catch( embed::InvalidStorageException& )
352 catch( lang::IllegalArgumentException& )
356 catch( packages::WrongPasswordException& )
360 catch( embed::StorageWrappedTargetException& )
364 catch( io::IOException& )
368 catch( uno::RuntimeException& )
372 catch( uno::Exception& )
374 uno::Any aCaught( ::cppu::getCaughtException() );
375 throw embed::StorageWrappedTargetException(
"Can't copy raw stream",
376 uno::Reference< io::XInputStream >(),
384 const OUString&, sal_Int32,
const OUString& )
386 throw packages::NoEncryptionException();
390 const OUString& aStorName, sal_Int32 nStorageMode )
392 std::unique_lock aGuard(
m_aMutex );
397 std::unique_lock<std::mutex>& ,
398 std::u16string_view aStorName, sal_Int32 nStorageMode )
400 if ( ( nStorageMode & embed::ElementModes::WRITE )
401 && !(
m_nMode & embed::ElementModes::WRITE ) )
402 throw io::IOException();
406 aFolderURL.
Append( aStorName );
410 throw io::IOException();
412 if ( ( nStorageMode & embed::ElementModes::NOCREATE ) && !bFolderExists )
413 throw io::IOException();
415 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
416 uno::Reference< embed::XStorage > xResult;
419 if ( nStorageMode & embed::ElementModes::WRITE )
421 if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) && bFolderExists )
427 else if ( !bFolderExists )
433 else if ( nStorageMode & embed::ElementModes::TRUNCATE )
434 throw io::IOException();
436 if ( !bFolderExists )
437 throw io::IOException();
442 catch( embed::InvalidStorageException& )
446 catch( lang::IllegalArgumentException& )
450 catch( embed::StorageWrappedTargetException& )
454 catch( io::IOException& )
458 catch( uno::RuntimeException& )
462 catch( uno::Exception& )
464 uno::Any aCaught( ::cppu::getCaughtException() );
465 throw embed::StorageWrappedTargetException(
"Can't copy raw stream",
466 uno::Reference< io::XInputStream >(),
475 std::unique_lock aGuard(
m_aMutex );
479 aFileURL.
Append( aStreamName );
481 uno::Reference < io::XStream > xTempResult;
484 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
486 uno::Reference< io::XInputStream > xInStream = aResultContent.
openStream();
489 uno::Reference < io::XOutputStream > xTempOut = xTempResult->
getOutputStream();
490 uno::Reference < io::XInputStream > xTempIn = xTempResult->getInputStream();
493 xTempOut->closeOutput();
495 catch( embed::InvalidStorageException& )
499 catch( lang::IllegalArgumentException& )
503 catch( packages::WrongPasswordException& )
507 catch( io::IOException& )
511 catch( embed::StorageWrappedTargetException& )
515 catch( uno::RuntimeException& )
519 catch( uno::Exception& )
521 uno::Any aCaught( ::cppu::getCaughtException() );
522 throw embed::StorageWrappedTargetException(
"Can't copy raw stream",
523 uno::Reference< io::XInputStream >(),
534 throw packages::NoEncryptionException();
538 const uno::Reference< embed::XStorage >& xTargetStorage )
544 const OUString& aStorName,
545 const uno::Reference< embed::XStorage >& xTargetStorage )
547 std::unique_lock aGuard(
m_aMutex );
549 uno::Reference< embed::XStorage > xSourceStor(
openStorageElement( aStorName, embed::ElementModes::READ ),
550 uno::UNO_SET_THROW );
551 xSourceStor->copyToStorage( xTargetStorage );
556 std::unique_lock aGuard(
m_aMutex );
559 aURL.Append( aElementName );
566 std::unique_lock aGuard(
m_aMutex );
569 aURL.Append( aElementName );
576 std::unique_lock aGuard(
m_aMutex );
579 aURL.Append( aElementName );
583 throw container::NoSuchElementException();
590 std::unique_lock aGuard(
m_aMutex );
593 aOldURL.
Append( aElementName );
596 aNewURL.
Append( aNewName );
600 throw container::NoSuchElementException();
604 throw container::ElementExistException();
608 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
612 ucb::NameClash::ERROR);
614 catch( embed::InvalidStorageException& )
618 catch( lang::IllegalArgumentException& )
622 catch( container::NoSuchElementException& )
626 catch( container::ElementExistException& )
630 catch( io::IOException& )
634 catch( embed::StorageWrappedTargetException& )
638 catch( uno::RuntimeException& )
642 catch( uno::Exception& )
644 uno::Any aCaught( ::cppu::getCaughtException() );
645 throw embed::StorageWrappedTargetException(
"Can't copy raw stream",
646 uno::Reference< io::XInputStream >(),
652 const uno::Reference< embed::XStorage >& xDest,
653 const OUString& aNewName )
655 std::unique_lock aGuard(
m_aMutex );
658 throw uno::RuntimeException();
661 aOwnURL.
Append( aElementName );
663 if ( xDest->hasByName( aNewName ) )
664 throw container::ElementExistException();
668 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
672 uno::Reference< embed::XStorage > xDestSubStor(
673 xDest->openStorageElement( aNewName, embed::ElementModes::READWRITE ),
674 uno::UNO_SET_THROW );
683 throw container::NoSuchElementException();
685 catch( embed::InvalidStorageException& )
689 catch( lang::IllegalArgumentException& )
693 catch( container::NoSuchElementException& )
697 catch( container::ElementExistException& )
701 catch( embed::StorageWrappedTargetException& )
705 catch( io::IOException& )
709 catch( uno::RuntimeException& )
713 catch( uno::Exception& )
715 uno::Any aCaught( ::cppu::getCaughtException() );
716 throw embed::StorageWrappedTargetException(
"Can't copy raw stream",
717 uno::Reference< io::XInputStream >(),
723 const uno::Reference< embed::XStorage >& xDest,
724 const OUString& aNewName )
726 std::unique_lock aGuard(
m_aMutex );
730 aOwnURL.
Append( aElementName );
732 throw io::IOException();
739 std::unique_lock aGuard(
m_aMutex );
741 if (
aName.isEmpty() )
742 throw lang::IllegalArgumentException();
760 throw container::NoSuchElementException();
762 catch (
const container::NoSuchElementException&)
766 catch (
const lang::WrappedTargetException&)
770 catch (
const uno::RuntimeException&)
774 catch (
const uno::Exception&)
776 uno::Any aCaught( ::cppu::getCaughtException() );
777 throw lang::WrappedTargetException(
"Can not open element!",
788 std::unique_lock aGuard(
m_aMutex );
790 uno::Sequence< OUString > aResult;
794 uno::Sequence<OUString> aProps {
"Title" };
797 uno::Reference<sdbc::XResultSet> xResultSet
799 uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
800 if ( xResultSet.is() )
803 while ( xResultSet->next() )
805 OUString
aName( xRow->getString( 1 ) );
806 aResult.realloc( ++nSize );
807 aResult.getArray()[nSize-1] =
aName;
811 catch(
const ucb::InteractiveIOException& r )
813 if ( r.Code == ucb::IOErrorCode_NOT_EXISTING )
814 OSL_FAIL(
"The folder does not exist!" );
817 uno::Any aCaught( ::cppu::getCaughtException() );
818 throw lang::WrappedTargetRuntimeException(
"Can not open storage!",
823 catch (
const uno::RuntimeException&)
827 catch (
const uno::Exception&)
829 uno::Any aCaught( ::cppu::getCaughtException() );
830 throw lang::WrappedTargetRuntimeException(
"Can not open storage!",
840 std::unique_lock aGuard(
m_aMutex );
842 if (
aName.isEmpty() )
843 throw lang::IllegalArgumentException();
860 std::unique_lock aGuard(
m_aMutex );
864 uno::Sequence<OUString> aProps {
"TargetURL" };
866 uno::Reference<sdbc::XResultSet> xResultSet
868 return ( xResultSet.is() && xResultSet->next() );
870 catch (
const uno::RuntimeException&)
874 catch (
const uno::Exception&
ex)
877 throw lang::WrappedTargetRuntimeException(
ex.Message,
885 std::unique_lock aGuard(
m_aMutex );
893 lang::EventObject aSource( getXWeak() );
899 const uno::Reference< lang::XEventListener >& xListener )
901 std::unique_lock aGuard(
m_aMutex );
907 const uno::Reference< lang::XEventListener >& xListener )
909 std::unique_lock aGuard(
m_aMutex );
919 return uno::Reference< beans::XPropertySetInfo >();
925 if ( aPropertyName ==
"URL" || aPropertyName ==
"OpenMode" )
926 throw beans::PropertyVetoException();
928 throw beans::UnknownPropertyException(aPropertyName);
934 std::unique_lock aGuard(
m_aMutex );
936 if ( aPropertyName ==
"URL" )
938 else if ( aPropertyName ==
"OpenMode" )
941 throw beans::UnknownPropertyException(aPropertyName);
947 const uno::Reference< beans::XPropertyChangeListener >& )
955 const uno::Reference< beans::XPropertyChangeListener >& )
963 const uno::Reference< beans::XVetoableChangeListener >& )
971 const uno::Reference< beans::XVetoableChangeListener >& )
979 std::unique_lock aGuard(
m_aMutex );
981 if ( sStreamPath.toChar() ==
'/' )
982 throw lang::IllegalArgumentException();
986 throw uno::RuntimeException();
993 throw io::IOException();
995 if ( ( nOpenMode & embed::ElementModes::NOCREATE )
997 throw io::IOException();
999 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
1000 uno::Reference< io::XStream > xResult;
1003 if ( nOpenMode & embed::ElementModes::WRITE )
1007 uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess(
1008 ucb::SimpleFileAccess::create(
m_xContext ) );
1009 uno::Reference< io::XStream >
xStream =
1010 xSimpleFileAccess->openFileReadWrite( aFileURL );
1018 StreamMode::STD_WRITE );
1019 if ( pStream && !pStream->GetError() )
1021 uno::Reference< io::XStream >
xStream( new ::utl::OStreamWrapper( std::move(pStream) ) );
1026 if ( !xResult.is() )
1027 throw io::IOException();
1029 if ( nOpenMode & embed::ElementModes::TRUNCATE )
1031 uno::Reference< io::XTruncate > xTrunc( xResult->getOutputStream(), uno::UNO_QUERY_THROW );
1037 if ( ( nOpenMode & embed::ElementModes::TRUNCATE )
1039 throw io::IOException();
1042 uno::Reference< io::XInputStream > xInStream = aResultContent.
openStream();
1046 catch( embed::InvalidStorageException& )
1050 catch( lang::IllegalArgumentException& )
1054 catch( packages::WrongPasswordException& )
1058 catch( embed::StorageWrappedTargetException& )
1062 catch( io::IOException& )
1066 catch( uno::RuntimeException& )
1070 catch( uno::Exception& )
1072 uno::Any aCaught( ::cppu::getCaughtException() );
1073 throw embed::StorageWrappedTargetException(
"Can't copy raw stream",
1074 uno::Reference< io::XInputStream >(),
1078 return uno::Reference< embed::XExtendedStorageStream >( xResult, uno::UNO_QUERY_THROW );
1083 throw packages::NoEncryptionException();
1088 std::unique_lock aGuard(
m_aMutex );
1093 throw uno::RuntimeException();
1102 throw lang::IllegalArgumentException();
1104 throw container::NoSuchElementException();
1107 if ( !::utl::UCBContentHelper::Kill( aFileURL ) )
1108 throw io::IOException();
Reference< XComponentContext > m_xContext
virtual void SAL_CALL dispose() override
virtual sal_Bool SAL_CALL isStreamElement(const OUString &aElementName) override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aListenersContainer
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual void SAL_CALL copyStorageElementLastCommitTo(const OUString &aStorName, const css::uno::Reference< css::embed::XStorage > &xTargetStorage) override
virtual void SAL_CALL renameElement(const OUString &rEleName, const OUString &rNewName) override
css::uno::Reference< css::io::XStream > openStreamElementImpl(std::unique_lock< std::mutex > &rGuard, std::u16string_view aStreamName, sal_Int32 nOpenMode)
void disposeImpl(std::unique_lock< std::mutex > &rGuard)
virtual void SAL_CALL copyToStorage(const css::uno::Reference< css::embed::XStorage > &xDest) override
virtual css::uno::Reference< css::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName(const OUString &sStreamPath, ::sal_Int32 nOpenMode) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL removeStreamElementByHierarchicalName(const OUString &sElementPath) override
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Bool SAL_CALL isStorageElement(const OUString &aElementName) override
FSStorage(const ::ucbhelper::Content &aContent, sal_Int32 nMode, css::uno::Reference< css::uno::XComponentContext > const &xContext)
css::uno::Reference< css::embed::XStorage > openStorageElementImpl(std::unique_lock< std::mutex > &rGuard, std::u16string_view aStorName, sal_Int32 nStorageMode)
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL copyLastCommitTo(const css::uno::Reference< css::embed::XStorage > &xTargetStorage) override
virtual ~FSStorage() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
static bool MakeFolderNoUI(std::u16string_view rFolder)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL copyElementTo(const OUString &aElementName, const css::uno::Reference< css::embed::XStorage > &xDest, const OUString &aNewName) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Reference< css::io::XStream > SAL_CALL openStreamElement(const OUString &aStreamName, sal_Int32 nOpenMode) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::io::XStream > SAL_CALL cloneStreamElement(const OUString &aStreamName) override
virtual void SAL_CALL release() noexcept override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual css::uno::Reference< css::io::XStream > SAL_CALL cloneEncryptedStreamElement(const OUString &aStreamName, const OUString &aPass) override
virtual css::uno::Reference< css::embed::XStorage > SAL_CALL openStorageElement(const OUString &aStorName, sal_Int32 nStorageMode) override
void CopyContentToStorage_Impl(ucbhelper::Content &rContent, const css::uno::Reference< css::embed::XStorage > &xDest)
virtual void SAL_CALL moveElementTo(const OUString &aElementName, const css::uno::Reference< css::embed::XStorage > &xDest, const OUString &rNewName) override
ucbhelper::Content & GetContent()
static void CopyStreamToSubStream(const OUString &aSourceURL, const css::uno::Reference< css::embed::XStorage > &xDest, const OUString &aNewEntryName)
virtual void SAL_CALL removeElement(const OUString &aElementName) override
virtual css::uno::Reference< css::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamElementByHierarchicalName(const OUString &sStreamName, ::sal_Int32 nOpenMode, const OUString &sPassword) override
::ucbhelper::Content m_aContent
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Reference< css::io::XStream > SAL_CALL openEncryptedStreamElement(const OUString &aStreamName, sal_Int32 nOpenMode, const OUString &aPass) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Type SAL_CALL getElementType() override
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
static OUString GetAbsURL(std::u16string_view rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
INetProtocol GetProtocol() const
bool Append(std::u16string_view rTheSegment, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
static void CopyInputToOutput(const css::uno::Reference< css::io::XInputStream > &xInput, const css::uno::Reference< css::io::XOutputStream > &xOutput)
oslInterlockedCount m_refCount
css::uno::Type const & get()
void transferContent(const Content &rSourceContent, InsertOperation eOperation, const OUString &rTitle, const sal_Int32 nNameClashAction, const OUString &rMimeType=OUString(), bool bMajorVersion=false, const OUString &rCommentVersion=OUString(), OUString *pResultURL=nullptr, const OUString &rDocumentId=OUString()) const
static bool create(const OUString &rURL, const css::uno::Reference< css::ucb::XCommandEnvironment > &rEnv, const css::uno::Reference< css::uno::XComponentContext > &rCtx, Content &rContent)
css::uno::Reference< css::io::XInputStream > openStream()
css::uno::Reference< css::sdbc::XResultSet > createCursor(const css::uno::Sequence< OUString > &rPropertyNames, ResultSetInclude eMode=INCLUDE_FOLDERS_AND_DOCUMENTS)
virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL getOutputStream() override
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
SVL_DLLPUBLIC bool IsFolder(const OUString &rURL)
Return if under the URL a folder exist.
SVL_DLLPUBLIC bool IsDocument(const OUString &rURL)
Return if under the URL a document exist.
COMPHELPER_DLLPUBLIC bool isFileUrl(std::u16string_view url)
Reference< XComponentContext > getProcessComponentContext()
Any SAL_CALL getCaughtException()
::ucbhelper::Content m_aContent