LibreOffice Module package (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
OStorage_Impl Struct Reference

#include <xstorage.hxx>

Collaboration diagram for OStorage_Impl:
[legend]

Public Types

typedef std::vector< StorageHolder_ImplStorageHoldersType
 

Public Member Functions

bool HasModifiedListener () const
 
 OStorage_Impl (css::uno::Reference< css::io::XInputStream > const &xInputStream, sal_Int32 nMode, const css::uno::Sequence< css::beans::PropertyValue > &xProperties, css::uno::Reference< css::uno::XComponentContext > const &xContext, sal_Int32 nStorageType)
 
 OStorage_Impl (css::uno::Reference< css::io::XStream > const &xStream, sal_Int32 nMode, const css::uno::Sequence< css::beans::PropertyValue > &xProperties, css::uno::Reference< css::uno::XComponentContext > const &xContext, sal_Int32 nStorageType)
 
 OStorage_Impl (OStorage_Impl *pParent, sal_Int32 nMode, css::uno::Reference< css::container::XNameContainer > const &xPackageFolder, css::uno::Reference< css::lang::XSingleServiceFactory > xPackage, css::uno::Reference< css::uno::XComponentContext > const &xContext, sal_Int32 nStorageType)
 
 ~OStorage_Impl ()
 
void SetReadOnlyWrap (OStorage &aStorage)
 
void RemoveReadOnlyWrap (const OStorage &aStorage)
 
void OpenOwnPackage ()
 
void ReadContents ()
 
void ReadRelInfoIfNecessary ()
 
bool HasChildren ()
 
void GetStorageProperties ()
 
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > GetAllRelationshipsIfAny ()
 
void CopyLastCommitTo (const css::uno::Reference< css::embed::XStorage > &xNewStor)
 
void InsertIntoPackageFolder (const OUString &aName, const css::uno::Reference< css::container::XNameContainer > &xParentPackageFolder)
 
void Commit ()
 
void Revert ()
 
::comphelper::SequenceAsHashMap GetCommonRootEncryptionData ()
 
void CopyToStorage (const css::uno::Reference< css::embed::XStorage > &xDest, bool bDirect)
 
void CopyStorageElement (SotElement_Impl *pElement, const css::uno::Reference< css::embed::XStorage > &xDest, const OUString &aName, bool bDirect)
 
SotElement_ImplFindElement (const OUString &rName)
 
SotElement_ImplInsertStream (const OUString &aName, bool bEncr)
 
void InsertRawStream (const OUString &aName, const css::uno::Reference< css::io::XInputStream > &xInStream)
 
std::unique_ptr< OStorage_ImplCreateNewStorageImpl (sal_Int32 nStorageMode)
 
SotElement_ImplInsertStorage (const OUString &aName, sal_Int32 nStorageMode)
 
SotElement_ImplInsertElement (const OUString &aName, bool bIsStorage)
 
void OpenSubStorage (SotElement_Impl *pElement, sal_Int32 nStorageMode)
 
void OpenSubStream (SotElement_Impl *pElement)
 
css::uno::Sequence< OUString > GetElementNames ()
 
void RemoveElement (OUString const &rName, SotElement_Impl *pElement)
 
void CloneStreamElement (const OUString &aStreamName, bool bPassProvided, const ::comphelper::SequenceAsHashMap &aEncryptionData, css::uno::Reference< css::io::XStream > &xTargetStream)
 
void RemoveStreamRelInfo (std::u16string_view aOriginalName)
 
void CreateRelStorage ()
 
void CommitStreamRelInfo (std::u16string_view rName, SotElement_Impl const *pStreamElement)
 
css::uno::Reference< css::io::XInputStream > GetRelInfoStreamForName (std::u16string_view aName)
 
void CommitRelInfo (const css::uno::Reference< css::container::XNameContainer > &xNewPackageFolder)
 

Static Public Member Functions

static void ClearElement (SotElement_Impl *pElement)
 
static void completeStorageStreamCopy_Impl (const css::uno::Reference< css::io::XStream > &xSource, const css::uno::Reference< css::io::XStream > &xDest, sal_Int32 nStorageType, const css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > &aRelInfo)
 

Public Attributes

rtl::Reference< comphelper::RefCountedMutexm_xMutex
 
OStoragem_pAntiImpl
 
StorageHoldersType m_aReadOnlyWrapVector
 
sal_Int32 m_nStorageMode
 
bool m_bIsModified
 
bool m_bBroadcastModified
 
bool m_bCommited
 
bool m_bIsRoot
 
bool m_bListCreated
 
oslInterlockedCount m_nModifiedListenerCount
 Count of registered modification listeners. More...
 
std::unordered_map< OUString, std::vector< SotElement_Impl * > > m_aChildrenMap
 
std::vector< SotElement_Impl * > m_aDeletedVector
 
css::uno::Reference< css::container::XNameContainer > m_xPackageFolder
 
css::uno::Reference< css::lang::XSingleServiceFactory > m_xPackage
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::io::XInputStream > m_xInputStream
 
css::uno::Reference< css::io::XStream > m_xStream
 
css::uno::Sequence< css::beans::PropertyValue > m_xProperties
 
bool m_bHasCommonEncryptionData
 
::comphelper::SequenceAsHashMap m_aCommonEncryptionData
 
OStorage_Implm_pParent
 
bool m_bControlMediaType
 
OUString m_aMediaType
 
bool m_bMTFallbackUsed
 
bool m_bControlVersion
 
OUString m_aVersion
 
rtl::Reference< SwitchablePersistenceStreamm_pSwitchStream
 
sal_Int32 m_nStorageType
 
SotElement_Implm_pRelStorElement
 
css::uno::Reference< css::embed::XStorage > m_xRelStorage
 
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > m_aRelInfo
 
css::uno::Reference< css::io::XInputStream > m_xNewRelInfoStream
 
sal_Int16 m_nRelInfoStatus
 

Detailed Description

Definition at line 108 of file xstorage.hxx.

Member Typedef Documentation

◆ StorageHoldersType

Definition at line 110 of file xstorage.hxx.

Constructor & Destructor Documentation

◆ OStorage_Impl() [1/3]

OStorage_Impl::OStorage_Impl ( css::uno::Reference< css::io::XInputStream > const &  xInputStream,
sal_Int32  nMode,
const css::uno::Sequence< css::beans::PropertyValue > &  xProperties,
css::uno::Reference< css::uno::XComponentContext > const &  xContext,
sal_Int32  nStorageType 
)

◆ OStorage_Impl() [2/3]

OStorage_Impl::OStorage_Impl ( css::uno::Reference< css::io::XStream > const &  xStream,
sal_Int32  nMode,
const css::uno::Sequence< css::beans::PropertyValue > &  xProperties,
css::uno::Reference< css::uno::XComponentContext > const &  xContext,
sal_Int32  nStorageType 
)

◆ OStorage_Impl() [3/3]

OStorage_Impl::OStorage_Impl ( OStorage_Impl pParent,
sal_Int32  nMode,
css::uno::Reference< css::container::XNameContainer > const &  xPackageFolder,
css::uno::Reference< css::lang::XSingleServiceFactory >  xPackage,
css::uno::Reference< css::uno::XComponentContext > const &  xContext,
sal_Int32  nStorageType 
)

◆ ~OStorage_Impl()

OStorage_Impl::~OStorage_Impl ( )

Member Function Documentation

◆ ClearElement()

void OStorage_Impl::ClearElement ( SotElement_Impl pElement)
static

Definition at line 1512 of file xstorage.cxx.

References SotElement_Impl::m_xStorage, and SotElement_Impl::m_xStream.

Referenced by RemoveElement(), and Revert().

◆ CloneStreamElement()

void OStorage_Impl::CloneStreamElement ( const OUString &  aStreamName,
bool  bPassProvided,
const ::comphelper::SequenceAsHashMap aEncryptionData,
css::uno::Reference< css::io::XStream > &  xTargetStream 
)
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::packages::WrongPasswordException
css::packages::NoEncryptionException
css::container::NoSuchElementException
css::io::IOException
css::embed::StorageWrappedTargetException
css::uno::RuntimeException

Definition at line 1518 of file xstorage.cxx.

References FindElement(), SotElement_Impl::m_bIsStorage, SotElement_Impl::m_xStream, OpenSubStream(), and THROW_WHERE.

Referenced by OStorage::cloneEncryptedStream(), OStorage::cloneStreamElement(), and OStorage::copyStreamElementData().

◆ Commit()

void OStorage_Impl::Commit ( )

◆ CommitRelInfo()

void OStorage_Impl::CommitRelInfo ( const css::uno::Reference< css::container::XNameContainer > &  xNewPackageFolder)

◆ CommitStreamRelInfo()

void OStorage_Impl::CommitStreamRelInfo ( std::u16string_view  rName,
SotElement_Impl const *  pStreamElement 
)

◆ completeStorageStreamCopy_Impl()

void OStorage_Impl::completeStorageStreamCopy_Impl ( const css::uno::Reference< css::io::XStream > &  xSource,
const css::uno::Reference< css::io::XStream > &  xDest,
sal_Int32  nStorageType,
const css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > &  aRelInfo 
)
static

Definition at line 73 of file xstorage.cxx.

References aPropNames, comphelper::OStorageHelper::CopyInputToOutput(), and THROW_WHERE.

Referenced by CopyStorageElement().

◆ CopyLastCommitTo()

void OStorage_Impl::CopyLastCommitTo ( const css::uno::Reference< css::embed::XStorage > &  xNewStor)

◆ CopyStorageElement()

void OStorage_Impl::CopyStorageElement ( SotElement_Impl pElement,
const css::uno::Reference< css::embed::XStorage > &  xDest,
const OUString &  aName,
bool  bDirect 
)

◆ CopyToStorage()

void OStorage_Impl::CopyToStorage ( const css::uno::Reference< css::embed::XStorage > &  xDest,
bool  bDirect 
)

◆ CreateNewStorageImpl()

std::unique_ptr< OStorage_Impl > OStorage_Impl::CreateNewStorageImpl ( sal_Int32  nStorageMode)

◆ CreateRelStorage()

void OStorage_Impl::CreateRelStorage ( )

◆ FindElement()

SotElement_Impl * OStorage_Impl::FindElement ( const OUString &  rName)

◆ GetAllRelationshipsIfAny()

uno::Sequence< uno::Sequence< beans::StringPair > > OStorage_Impl::GetAllRelationshipsIfAny ( )

◆ GetCommonRootEncryptionData()

comphelper::SequenceAsHashMap OStorage_Impl::GetCommonRootEncryptionData ( )

◆ GetElementNames()

uno::Sequence< OUString > OStorage_Impl::GetElementNames ( )

Definition at line 1455 of file xstorage.cxx.

References m_aChildrenMap, m_xMutex, and ReadContents().

Referenced by OStorage::getElementNames().

◆ GetRelInfoStreamForName()

uno::Reference< io::XInputStream > OStorage_Impl::GetRelInfoStreamForName ( std::u16string_view  aName)

Definition at line 1614 of file xstorage.cxx.

References aName, m_nStorageType, m_xRelStorage, ReadContents(), and xStream.

Referenced by OpenSubStream(), and ReadRelInfoIfNecessary().

◆ GetStorageProperties()

void OStorage_Impl::GetStorageProperties ( )

◆ HasChildren()

bool OStorage_Impl::HasChildren ( )

Definition at line 455 of file xstorage.cxx.

References m_aChildrenMap, m_xMutex, and ReadContents().

Referenced by OStorage::hasElements().

◆ HasModifiedListener()

bool OStorage_Impl::HasModifiedListener ( ) const
inline

Definition at line 128 of file xstorage.hxx.

References m_nModifiedListenerCount, and m_pAntiImpl.

Referenced by OWriteStream::ModifyParentUnlockMutex_Impl().

◆ InsertElement()

SotElement_Impl * OStorage_Impl::InsertElement ( const OUString &  aName,
bool  bIsStorage 
)

◆ InsertIntoPackageFolder()

void OStorage_Impl::InsertIntoPackageFolder ( const OUString &  aName,
const css::uno::Reference< css::container::XNameContainer > &  xParentPackageFolder 
)

Definition at line 928 of file xstorage.cxx.

References aName, m_bCommited, m_xMutex, m_xPackageFolder, and SAL_WARN_IF.

◆ InsertRawStream()

void OStorage_Impl::InsertRawStream ( const OUString &  aName,
const css::uno::Reference< css::io::XInputStream > &  xInStream 
)

◆ InsertStorage()

SotElement_Impl * OStorage_Impl::InsertStorage ( const OUString &  aName,
sal_Int32  nStorageMode 
)

◆ InsertStream()

SotElement_Impl * OStorage_Impl::InsertStream ( const OUString &  aName,
bool  bEncr 
)

◆ OpenOwnPackage()

void OStorage_Impl::OpenOwnPackage ( )

◆ OpenSubStorage()

void OStorage_Impl::OpenSubStorage ( SotElement_Impl pElement,
sal_Int32  nStorageMode 
)

◆ OpenSubStream()

void OStorage_Impl::OpenSubStream ( SotElement_Impl pElement)

◆ ReadContents()

void OStorage_Impl::ReadContents ( )

◆ ReadRelInfoIfNecessary()

void OStorage_Impl::ReadRelInfoIfNecessary ( )

◆ RemoveElement()

void OStorage_Impl::RemoveElement ( OUString const &  rName,
SotElement_Impl pElement 
)

◆ RemoveReadOnlyWrap()

void OStorage_Impl::RemoveReadOnlyWrap ( const OStorage aStorage)

Definition at line 346 of file xstorage.cxx.

References m_aReadOnlyWrapVector, and TOOLS_INFO_EXCEPTION.

Referenced by OStorage::InternalDispose().

◆ RemoveStreamRelInfo()

void OStorage_Impl::RemoveStreamRelInfo ( std::u16string_view  aOriginalName)

Definition at line 1553 of file xstorage.cxx.

References m_nStorageType, and m_xRelStorage.

Referenced by Commit(), and CommitRelInfo().

◆ Revert()

void OStorage_Impl::Revert ( )

◆ SetReadOnlyWrap()

void OStorage_Impl::SetReadOnlyWrap ( OStorage aStorage)

Definition at line 339 of file xstorage.cxx.

References OStorage::GetRefCount_Impl(), and m_aReadOnlyWrapVector.

Member Data Documentation

◆ m_aChildrenMap

std::unordered_map<OUString, std::vector<SotElement_Impl*> > OStorage_Impl::m_aChildrenMap

◆ m_aCommonEncryptionData

::comphelper::SequenceAsHashMap OStorage_Impl::m_aCommonEncryptionData

◆ m_aDeletedVector

std::vector< SotElement_Impl* > OStorage_Impl::m_aDeletedVector

Definition at line 134 of file xstorage.hxx.

Referenced by Commit(), InsertElement(), Revert(), and ~OStorage_Impl().

◆ m_aMediaType

OUString OStorage_Impl::m_aMediaType

◆ m_aReadOnlyWrapVector

StorageHoldersType OStorage_Impl::m_aReadOnlyWrapVector

Definition at line 115 of file xstorage.hxx.

Referenced by RemoveReadOnlyWrap(), SetReadOnlyWrap(), and ~OStorage_Impl().

◆ m_aRelInfo

css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > OStorage_Impl::m_aRelInfo

◆ m_aVersion

OUString OStorage_Impl::m_aVersion

◆ m_bBroadcastModified

bool OStorage_Impl::m_bBroadcastModified

◆ m_bCommited

bool OStorage_Impl::m_bCommited

Definition at line 121 of file xstorage.hxx.

Referenced by Commit(), and InsertIntoPackageFolder().

◆ m_bControlMediaType

bool OStorage_Impl::m_bControlMediaType

Definition at line 151 of file xstorage.hxx.

Referenced by GetStorageProperties(), Revert(), and OStorage::setPropertyValue().

◆ m_bControlVersion

bool OStorage_Impl::m_bControlVersion

Definition at line 155 of file xstorage.hxx.

Referenced by GetStorageProperties(), Revert(), and OStorage::setPropertyValue().

◆ m_bHasCommonEncryptionData

bool OStorage_Impl::m_bHasCommonEncryptionData

◆ m_bIsModified

bool OStorage_Impl::m_bIsModified

◆ m_bIsRoot

bool OStorage_Impl::m_bIsRoot

◆ m_bListCreated

bool OStorage_Impl::m_bListCreated

Definition at line 124 of file xstorage.hxx.

Referenced by ReadContents(), and OStorage::revert().

◆ m_bMTFallbackUsed

bool OStorage_Impl::m_bMTFallbackUsed

Definition at line 153 of file xstorage.hxx.

Referenced by Commit(), OStorage::getPropertyValue(), and GetStorageProperties().

◆ m_nModifiedListenerCount

oslInterlockedCount OStorage_Impl::m_nModifiedListenerCount

Count of registered modification listeners.

Definition at line 127 of file xstorage.hxx.

Referenced by OStorage::addModifyListener(), HasModifiedListener(), OStorage::InternalDispose(), and OStorage::removeModifyListener().

◆ m_nRelInfoStatus

sal_Int16 OStorage_Impl::m_nRelInfoStatus

◆ m_nStorageMode

sal_Int32 OStorage_Impl::m_nStorageMode

◆ m_nStorageType

sal_Int32 OStorage_Impl::m_nStorageType

Definition at line 160 of file xstorage.hxx.

Referenced by OStorage::clearRelationships(), OStorage::cloneStreamElement(), Commit(), CommitRelInfo(), CommitStreamRelInfo(), OStorage::copyElementDirectlyTo(), OStorage::copyElementTo(), CopyLastCommitTo(), CopyStorageElement(), OStorage::copyStorageElementLastCommitTo(), OStorage::copyStreamElementData(), CopyToStorage(), CreateNewStorageImpl(), CreateRelStorage(), OStorage::getAllRelationships(), GetAllRelationshipsIfAny(), OStorage::getByName(), GetCommonRootEncryptionData(), OStorage::getElementPropertyValue(), OStorage::getEncryptionAlgorithms(), OStorage::getPlainRawStreamElement(), OStorage::getPropertyValue(), OStorage::getRawEncrStreamElement(), OStorage::getRelationshipByID(), OStorage::getRelationshipsByType(), GetRelInfoStreamForName(), GetStorageProperties(), OStorage::getTargetByID(), OStorage::getTypeByID(), OStorage::getTypes(), OStorage::hasByID(), OStorage::hasByName(), OStorage::insertRawEncrStreamElement(), InsertRawStream(), OStorage::insertRelationshipByID(), OStorage::insertRelationships(), InsertStream(), OStorage::insertStreamElementDirect(), OStorage::isStorageElement(), OStorage::isStreamElement(), OStorage::moveElementTo(), OStorage::openEncryptedStreamByHierarchicalName(), OpenOwnPackage(), OStorage::openStorageElement(), OStorage::openStreamElement(), OpenSubStorage(), OpenSubStream(), OStorage::queryInterface(), ReadContents(), ReadRelInfoIfNecessary(), OStorage::removeElement(), OStorage::removeEncryption(), OStorage::removeRelationshipByID(), RemoveStreamRelInfo(), OStorage::renameElement(), Revert(), OStorage::setEncryptionAlgorithms(), OStorage::setEncryptionData(), OStorage::setGpgProperties(), OStorage::setPropertyValue(), and ~OStorage_Impl().

◆ m_pAntiImpl

OStorage* OStorage_Impl::m_pAntiImpl

◆ m_pParent

OStorage_Impl* OStorage_Impl::m_pParent

Definition at line 149 of file xstorage.hxx.

Referenced by OStorage::commit(), GetCommonRootEncryptionData(), and ~OStorage_Impl().

◆ m_pRelStorElement

SotElement_Impl* OStorage_Impl::m_pRelStorElement

Definition at line 163 of file xstorage.hxx.

Referenced by CommitRelInfo(), CreateRelStorage(), ReadContents(), and ~OStorage_Impl().

◆ m_pSwitchStream

rtl::Reference<SwitchablePersistenceStream> OStorage_Impl::m_pSwitchStream

Definition at line 158 of file xstorage.hxx.

Referenced by OStorage::attachToURL(), and OStorage::writeAndAttachToStream().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > OStorage_Impl::m_xContext

◆ m_xInputStream

css::uno::Reference< css::io::XInputStream > OStorage_Impl::m_xInputStream

Definition at line 142 of file xstorage.hxx.

Referenced by Commit(), OpenOwnPackage(), and ~OStorage_Impl().

◆ m_xMutex

rtl::Reference<comphelper::RefCountedMutex> OStorage_Impl::m_xMutex

◆ m_xNewRelInfoStream

css::uno::Reference< css::io::XInputStream > OStorage_Impl::m_xNewRelInfoStream

◆ m_xPackage

css::uno::Reference< css::lang::XSingleServiceFactory > OStorage_Impl::m_xPackage

◆ m_xPackageFolder

css::uno::Reference< css::container::XNameContainer > OStorage_Impl::m_xPackageFolder

◆ m_xProperties

css::uno::Sequence< css::beans::PropertyValue > OStorage_Impl::m_xProperties

Definition at line 144 of file xstorage.hxx.

Referenced by OStorage::getPropertyValue(), OpenOwnPackage(), and ~OStorage_Impl().

◆ m_xRelStorage

css::uno::Reference< css::embed::XStorage > OStorage_Impl::m_xRelStorage

◆ m_xStream

css::uno::Reference< css::io::XStream > OStorage_Impl::m_xStream

Definition at line 143 of file xstorage.hxx.

Referenced by Commit(), OpenOwnPackage(), and ~OStorage_Impl().


The documentation for this struct was generated from the following files: