LibreOffice Module package (master) 1
Public Member Functions | Public Attributes | Private Member Functions | Friends | List of all members
OWriteStream_Impl Struct Reference

#include <owriteablestream.hxx>

Collaboration diagram for OWriteStream_Impl:
[legend]

Public Member Functions

 OWriteStream_Impl (OStorage_Impl *pParent, const css::uno::Reference< css::packages::XDataSinkEncrSupport > &xPackageStream, const css::uno::Reference< css::lang::XSingleServiceFactory > &xPackage, css::uno::Reference< css::uno::XComponentContext > xContext, bool bForceEncrypted, sal_Int32 nStorageType, bool bDefaultCompress, css::uno::Reference< css::io::XInputStream > xRelInfoStream=css::uno::Reference< css::io::XInputStream >())
 
 ~OWriteStream_Impl ()
 
void CleanCacheStream ()
 
bool UsesCommonEncryption_Impl () const
 
bool HasTempFile_Impl () const
 
bool IsTransacted ()
 
bool HasWriteOwner_Impl () const
 
void InsertIntoPackageFolder (const OUString &aName, const css::uno::Reference< css::container::XNameContainer > &xParentPackageFolder)
 
void SetToBeCommited ()
 
bool HasCachedEncryptionData () const
 
::comphelper::SequenceAsHashMapGetCachedEncryptionData ()
 
bool IsModified () const
 
bool IsEncrypted ()
 
void SetDecrypted ()
 
void SetEncrypted (const ::comphelper::SequenceAsHashMap &aEncryptionData)
 
void DisposeWrappers ()
 
void InsertStreamDirectly (const css::uno::Reference< css::io::XInputStream > &xInStream, const css::uno::Sequence< css::beans::PropertyValue > &aProps)
 
void Commit ()
 
void Revert ()
 
css::uno::Sequence< css::beans::PropertyValue > const & GetStreamProperties ()
 
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > GetAllRelationshipsIfAny ()
 
void CopyInternallyTo_Impl (const css::uno::Reference< css::io::XStream > &xDestStream, const ::comphelper::SequenceAsHashMap &aEncryptionData)
 
void CopyInternallyTo_Impl (const css::uno::Reference< css::io::XStream > &xDestStream)
 
css::uno::Reference< css::io::XStream > GetStream (sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap &aEncryptionData, bool bHierarchyAccess)
 
css::uno::Reference< css::io::XStream > GetStream (sal_Int32 nStreamMode, bool bHierarchyAccess)
 
css::uno::Reference< css::io::XInputStream > GetRawInStream ()
 
css::uno::Reference< css::io::XInputStream > GetPlainRawInStream ()
 
void InputStreamDisposed (OInputCompStream *pStream)
 
void CreateReadonlyCopyBasedOnData (const css::uno::Reference< css::io::XInputStream > &xDataToCopy, const css::uno::Sequence< css::beans::PropertyValue > &aProps, css::uno::Reference< css::io::XStream > &xTargetStream)
 
void GetCopyOfLastCommit (css::uno::Reference< css::io::XStream > &xTargetStream)
 
void GetCopyOfLastCommit (css::uno::Reference< css::io::XStream > &xTargetStream, const ::comphelper::SequenceAsHashMap &aEncryptionData)
 
void CommitStreamRelInfo (const css::uno::Reference< css::embed::XStorage > &xRelStorage, std::u16string_view aOrigStreamName, std::u16string_view aNewStreamName)
 
void ReadRelInfoIfNecessary ()
 
sal_Int32 GetNewRelId ()
 

Public Attributes

rtl::Reference< comphelper::RefCountedMutexm_xMutex
 
OWriteStreamm_pAntiImpl
 
std::optional< utl::TempFileFastm_oTempFile
 
css::uno::Reference< css::io::XStream > m_xCacheStream
 
css::uno::Reference< css::io::XSeekable > m_xCacheSeek
 
std::vector< OInputCompStream * > m_aInputStreamsVector
 
bool m_bHasDataToFlush
 
bool m_bFlushed
 
css::uno::Reference< css::packages::XDataSinkEncrSupport > m_xPackageStream
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
OStorage_Implm_pParent
 
css::uno::Sequence< css::beans::PropertyValue > m_aProps
 
bool m_bForceEncrypted
 
bool m_bUseCommonEncryption
 
bool m_bHasCachedEncryptionData
 
::comphelper::SequenceAsHashMap m_aEncryptionData
 
bool m_bCompressedSetExplicit
 
css::uno::Reference< css::lang::XSingleServiceFactory > m_xPackage
 
bool m_bHasInsertedStreamOptimization
 
sal_Int32 m_nStorageType
 
css::uno::Reference< css::io::XInputStream > m_xOrigRelInfoStream
 
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > m_aOrigRelInfo
 
bool m_bOrigRelInfoBroken
 
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > m_aNewRelInfo
 
css::uno::Reference< css::io::XInputStream > m_xNewRelInfoStream
 
sal_Int16 m_nRelInfoStatus
 
sal_Int32 m_nRelId
 

Private Member Functions

void GetFilledTempFileIfNo (const css::uno::Reference< css::io::XInputStream > &xStream)
 
void FillTempGetFileName ()
 
css::uno::Reference< css::io::XStream > GetTempFileAsStream ()
 
css::uno::Reference< css::io::XInputStream > GetTempFileAsInputStream ()
 
css::uno::Reference< css::io::XStream > GetStream_Impl (sal_Int32 nStreamMode, bool bHierarchyAccess)
 
::comphelper::SequenceAsHashMap GetCommonRootEncryptionData ()
 
css::uno::Sequence< css::beans::PropertyValue > ReadPackageStreamProperties ()
 
css::uno::Sequence< css::beans::PropertyValue > InsertOwnProps (const css::uno::Sequence< css::beans::PropertyValue > &aProps, bool bUseCommonEncryption)
 

Friends

struct OStorage_Impl
 
class OWriteStream
 
class OInputCompStream
 

Detailed Description

Definition at line 67 of file owriteablestream.hxx.

Constructor & Destructor Documentation

◆ OWriteStream_Impl()

OWriteStream_Impl::OWriteStream_Impl ( OStorage_Impl pParent,
const css::uno::Reference< css::packages::XDataSinkEncrSupport > &  xPackageStream,
const css::uno::Reference< css::lang::XSingleServiceFactory > &  xPackage,
css::uno::Reference< css::uno::XComponentContext >  xContext,
bool  bForceEncrypted,
sal_Int32  nStorageType,
bool  bDefaultCompress,
css::uno::Reference< css::io::XInputStream >  xRelInfoStream = css::uno::Reference< css::io::XInputStream >() 
)

◆ ~OWriteStream_Impl()

OWriteStream_Impl::~OWriteStream_Impl ( )

Definition at line 265 of file owriteablestream.cxx.

References CleanCacheStream(), DisposeWrappers(), and m_oTempFile.

Member Function Documentation

◆ CleanCacheStream()

void OWriteStream_Impl::CleanCacheStream ( )

Definition at line 274 of file owriteablestream.cxx.

References m_xCacheSeek, and m_xCacheStream.

Referenced by GetFilledTempFileIfNo(), GetStream_Impl(), and ~OWriteStream_Impl().

◆ Commit()

void OWriteStream_Impl::Commit ( )

◆ CommitStreamRelInfo()

void OWriteStream_Impl::CommitStreamRelInfo ( const css::uno::Reference< css::embed::XStorage > &  xRelStorage,
std::u16string_view  aOrigStreamName,
std::u16string_view  aNewStreamName 
)

◆ CopyInternallyTo_Impl() [1/2]

void OWriteStream_Impl::CopyInternallyTo_Impl ( const css::uno::Reference< css::io::XStream > &  xDestStream)

◆ CopyInternallyTo_Impl() [2/2]

void OWriteStream_Impl::CopyInternallyTo_Impl ( const css::uno::Reference< css::io::XStream > &  xDestStream,
const ::comphelper::SequenceAsHashMap aEncryptionData 
)

◆ CreateReadonlyCopyBasedOnData()

void OWriteStream_Impl::CreateReadonlyCopyBasedOnData ( const css::uno::Reference< css::io::XInputStream > &  xDataToCopy,
const css::uno::Sequence< css::beans::PropertyValue > &  aProps,
css::uno::Reference< css::io::XStream > &  xTargetStream 
)

◆ DisposeWrappers()

void OWriteStream_Impl::DisposeWrappers ( )

◆ FillTempGetFileName()

void OWriteStream_Impl::FillTempGetFileName ( )
private

◆ GetAllRelationshipsIfAny()

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

◆ GetCachedEncryptionData()

::comphelper::SequenceAsHashMap & OWriteStream_Impl::GetCachedEncryptionData ( )
inline

Definition at line 164 of file owriteablestream.hxx.

References m_aEncryptionData.

◆ GetCommonRootEncryptionData()

comphelper::SequenceAsHashMap OWriteStream_Impl::GetCommonRootEncryptionData ( )
private
Exceptions
css::packages::NoEncryptionException

Definition at line 1282 of file owriteablestream.cxx.

References OStorage_Impl::GetCommonRootEncryptionData(), m_nStorageType, m_pParent, and m_xMutex.

Referenced by GetStream().

◆ GetCopyOfLastCommit() [1/2]

void OWriteStream_Impl::GetCopyOfLastCommit ( css::uno::Reference< css::io::XStream > &  xTargetStream)

◆ GetCopyOfLastCommit() [2/2]

void OWriteStream_Impl::GetCopyOfLastCommit ( css::uno::Reference< css::io::XStream > &  xTargetStream,
const ::comphelper::SequenceAsHashMap aEncryptionData 
)

◆ GetFilledTempFileIfNo()

void OWriteStream_Impl::GetFilledTempFileIfNo ( const css::uno::Reference< css::io::XInputStream > &  xStream)
private

◆ GetNewRelId()

sal_Int32 OWriteStream_Impl::GetNewRelId ( )
inline

Definition at line 220 of file owriteablestream.hxx.

References m_nRelId.

Referenced by OWriteStream::getPropertyValue().

◆ GetPlainRawInStream()

uno::Reference< io::XInputStream > OWriteStream_Impl::GetPlainRawInStream ( )

Definition at line 1253 of file owriteablestream.cxx.

References m_xMutex, m_xPackageStream, and SAL_WARN_IF.

◆ GetRawInStream()

uno::Reference< io::XInputStream > OWriteStream_Impl::GetRawInStream ( )

Definition at line 1266 of file owriteablestream.cxx.

References IsEncrypted(), m_pAntiImpl, m_xMutex, m_xPackageStream, and SAL_WARN_IF.

◆ GetStream() [1/2]

uno::Reference< io::XStream > OWriteStream_Impl::GetStream ( sal_Int32  nStreamMode,
bool  bHierarchyAccess 
)

◆ GetStream() [2/2]

uno::Reference< io::XStream > OWriteStream_Impl::GetStream ( sal_Int32  nStreamMode,
const ::comphelper::SequenceAsHashMap aEncryptionData,
bool  bHierarchyAccess 
)

◆ GetStream_Impl()

uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl ( sal_Int32  nStreamMode,
bool  bHierarchyAccess 
)
private

◆ GetStreamProperties()

uno::Sequence< beans::PropertyValue > const & OWriteStream_Impl::GetStreamProperties ( )

◆ GetTempFileAsInputStream()

uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream ( )
private

◆ GetTempFileAsStream()

uno::Reference< io::XStream > OWriteStream_Impl::GetTempFileAsStream ( )
private

◆ HasCachedEncryptionData()

bool OWriteStream_Impl::HasCachedEncryptionData ( ) const
inline

Definition at line 163 of file owriteablestream.hxx.

References m_bHasCachedEncryptionData.

◆ HasTempFile_Impl()

bool OWriteStream_Impl::HasTempFile_Impl ( ) const
inline

Definition at line 152 of file owriteablestream.hxx.

References m_oTempFile.

◆ HasWriteOwner_Impl()

bool OWriteStream_Impl::HasWriteOwner_Impl ( ) const
inline

Definition at line 155 of file owriteablestream.hxx.

References m_pAntiImpl.

◆ InputStreamDisposed()

void OWriteStream_Impl::InputStreamDisposed ( OInputCompStream pStream)

Definition at line 1292 of file owriteablestream.cxx.

References m_aInputStreamsVector, and m_xMutex.

Referenced by OInputCompStream::dispose().

◆ InsertIntoPackageFolder()

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

◆ InsertOwnProps()

uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps ( const css::uno::Sequence< css::beans::PropertyValue > &  aProps,
bool  bUseCommonEncryption 
)
private

◆ InsertStreamDirectly()

void OWriteStream_Impl::InsertStreamDirectly ( const css::uno::Reference< css::io::XInputStream > &  xInStream,
const css::uno::Sequence< css::beans::PropertyValue > &  aProps 
)

◆ IsEncrypted()

bool OWriteStream_Impl::IsEncrypted ( )

◆ IsModified()

bool OWriteStream_Impl::IsModified ( ) const
inline

Definition at line 166 of file owriteablestream.hxx.

References m_bFlushed, and m_bHasDataToFlush.

◆ IsTransacted()

bool OWriteStream_Impl::IsTransacted ( )

Definition at line 905 of file owriteablestream.cxx.

References OWriteStream::m_bTransacted, m_pAntiImpl, and m_xMutex.

◆ ReadPackageStreamProperties()

uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProperties ( )
private

Definition at line 961 of file owriteablestream.cxx.

References m_nStorageType, m_xPackageStream, sMediaType, TOOLS_WARN_EXCEPTION, and u.

Referenced by GetStreamProperties().

◆ ReadRelInfoIfNecessary()

void OWriteStream_Impl::ReadRelInfoIfNecessary ( )

◆ Revert()

void OWriteStream_Impl::Revert ( )

◆ SetDecrypted()

void OWriteStream_Impl::SetDecrypted ( )

◆ SetEncrypted()

void OWriteStream_Impl::SetEncrypted ( const ::comphelper::SequenceAsHashMap aEncryptionData)

◆ SetToBeCommited()

void OWriteStream_Impl::SetToBeCommited ( )
inline

Definition at line 161 of file owriteablestream.hxx.

References m_bFlushed.

◆ UsesCommonEncryption_Impl()

bool OWriteStream_Impl::UsesCommonEncryption_Impl ( ) const
inline

Definition at line 151 of file owriteablestream.hxx.

References m_bUseCommonEncryption.

Friends And Related Function Documentation

◆ OInputCompStream

friend class OInputCompStream
friend

Definition at line 73 of file owriteablestream.hxx.

Referenced by GetStream_Impl().

◆ OStorage_Impl

friend struct OStorage_Impl
friend

Definition at line 71 of file owriteablestream.hxx.

◆ OWriteStream

friend class OWriteStream
friend

Definition at line 72 of file owriteablestream.hxx.

Referenced by GetStream_Impl().

Member Data Documentation

◆ m_aEncryptionData

::comphelper::SequenceAsHashMap OWriteStream_Impl::m_aEncryptionData

◆ m_aInputStreamsVector

std::vector< OInputCompStream* > OWriteStream_Impl::m_aInputStreamsVector

Definition at line 81 of file owriteablestream.hxx.

Referenced by DisposeWrappers(), GetStream_Impl(), and InputStreamDisposed().

◆ m_aNewRelInfo

css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > OWriteStream_Impl::m_aNewRelInfo

◆ m_aOrigRelInfo

css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > OWriteStream_Impl::m_aOrigRelInfo

◆ m_aProps

css::uno::Sequence< css::beans::PropertyValue > OWriteStream_Impl::m_aProps

◆ m_bCompressedSetExplicit

bool OWriteStream_Impl::m_bCompressedSetExplicit

Definition at line 100 of file owriteablestream.hxx.

Referenced by InsertStreamDirectly(), and OWriteStream::setPropertyValue().

◆ m_bFlushed

bool OWriteStream_Impl::m_bFlushed

◆ m_bForceEncrypted

bool OWriteStream_Impl::m_bForceEncrypted

Definition at line 94 of file owriteablestream.hxx.

Referenced by IsEncrypted(), and SetDecrypted().

◆ m_bHasCachedEncryptionData

bool OWriteStream_Impl::m_bHasCachedEncryptionData

◆ m_bHasDataToFlush

bool OWriteStream_Impl::m_bHasDataToFlush

◆ m_bHasInsertedStreamOptimization

bool OWriteStream_Impl::m_bHasInsertedStreamOptimization

◆ m_bOrigRelInfoBroken

bool OWriteStream_Impl::m_bOrigRelInfoBroken

Definition at line 111 of file owriteablestream.hxx.

Referenced by CommitStreamRelInfo(), ReadRelInfoIfNecessary(), and Revert().

◆ m_bUseCommonEncryption

bool OWriteStream_Impl::m_bUseCommonEncryption

◆ m_nRelId

sal_Int32 OWriteStream_Impl::m_nRelId

Definition at line 116 of file owriteablestream.hxx.

Referenced by GetNewRelId(), and OWriteStream::setPropertyValue().

◆ m_nRelInfoStatus

sal_Int16 OWriteStream_Impl::m_nRelInfoStatus

◆ m_nStorageType

sal_Int32 OWriteStream_Impl::m_nStorageType

◆ m_oTempFile

std::optional<utl::TempFileFast> OWriteStream_Impl::m_oTempFile

◆ m_pAntiImpl

OWriteStream* OWriteStream_Impl::m_pAntiImpl

◆ m_pParent

OStorage_Impl* OWriteStream_Impl::m_pParent

◆ m_xCacheSeek

css::uno::Reference< css::io::XSeekable > OWriteStream_Impl::m_xCacheSeek

◆ m_xCacheStream

css::uno::Reference< css::io::XStream > OWriteStream_Impl::m_xCacheStream

◆ m_xContext

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

◆ m_xMutex

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

◆ m_xNewRelInfoStream

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

◆ m_xOrigRelInfoStream

css::uno::Reference< css::io::XInputStream > OWriteStream_Impl::m_xOrigRelInfoStream

◆ m_xPackage

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

Definition at line 102 of file owriteablestream.hxx.

Referenced by Commit().

◆ m_xPackageStream

css::uno::Reference< css::packages::XDataSinkEncrSupport > OWriteStream_Impl::m_xPackageStream

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