20#ifndef INCLUDED_SVL_SOURCE_FSSTOR_FSSTORAGE_HXX
21#define INCLUDED_SVL_SOURCE_FSSTOR_FSSTORAGE_HXX
23#include <com/sun/star/uno/Sequence.hxx>
24#include <com/sun/star/embed/XStorage.hpp>
25#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
26#include <com/sun/star/io/XStream.hpp>
27#include <com/sun/star/beans/XPropertySet.hpp>
28#include <com/sun/star/lang/XTypeProvider.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
35class FSStorage final :
public css::lang::XTypeProvider
36 ,
public css::embed::XStorage
37 ,
public css::embed::XHierarchicalStorageAccess
38 ,
public css::beans::XPropertySet
46 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
50 FSStorage( const ::ucbhelper::Content& aContent,
52 css::uno::Reference< css::uno::XComponentContext >
const & xContext );
59 const css::uno::Reference< css::embed::XStorage >& xDest,
60 const OUString& aNewEntryName );
63 const css::uno::Reference<css::embed::XStorage>& xDest);
69 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& rType )
override;
71 virtual void SAL_CALL
acquire() noexcept override;
73 virtual
void SAL_CALL
release() noexcept override;
83 virtual
void SAL_CALL
copyToStorage( const css::
uno::Reference< css::embed::XStorage >& xDest ) override;
86 const OUString& aStreamName, sal_Int32 nOpenMode ) override;
89 const OUString& aStreamName, sal_Int32 nOpenMode, const OUString& aPass ) override;
92 const OUString& aStorName, sal_Int32 nStorageMode ) override;
95 const OUString& aStreamName ) override;
98 const OUString& aStreamName, const OUString& aPass ) override;
101 const css::
uno::Reference< css::embed::XStorage >& xTargetStorage ) override;
104 const OUString& aStorName,
105 const css::
uno::Reference< css::embed::XStorage >& xTargetStorage ) override;
111 virtual
void SAL_CALL
removeElement( const OUString& aElementName ) override;
113 virtual
void SAL_CALL
renameElement( const OUString& rEleName, const OUString& rNewName ) override;
115 virtual
void SAL_CALL
copyElementTo( const OUString& aElementName,
116 const css::
uno::Reference< css::embed::XStorage >& xDest,
117 const OUString& aNewName ) override;
119 virtual
void SAL_CALL
moveElementTo( const OUString& aElementName,
120 const css::
uno::Reference< css::embed::XStorage >& xDest,
121 const OUString& rNewName ) override;
125 virtual css::
uno::Any SAL_CALL
getByName( const OUString& aName ) override;
137 virtual
void SAL_CALL
dispose() override;
140 const css::
uno::Reference< css::lang::XEventListener >& xListener ) override;
143 const css::
uno::Reference< css::lang::XEventListener >& xListener ) override;
149 virtual
void SAL_CALL
setPropertyValue( const OUString& aPropertyName, const css::
uno::Any& aValue ) override;
154 const OUString& aPropertyName,
155 const css::
uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
158 const OUString& aPropertyName,
159 const css::
uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
162 const OUString& PropertyName,
163 const css::
uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
165 virtual
void SAL_CALL
removeVetoableChangeListener( const OUString& PropertyName, const css::
uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
177 std::unique_lock<
std::mutex>& rGuard,
178 std::u16string_view aStorName, sal_Int32 nStorageMode );
180 std::unique_lock<
std::mutex>& rGuard,
181 std::u16string_view aStreamName, sal_Int32 nOpenMode );
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