LibreOffice Module sot (master) 1
Public Member Functions | Public Attributes | Private Member Functions | List of all members
UCBStorageStream_Impl Class Reference
Inheritance diagram for UCBStorageStream_Impl:
[legend]
Collaboration diagram for UCBStorageStream_Impl:
[legend]

Public Member Functions

virtual std::size_t GetData (void *pData, std::size_t nSize) override
 
virtual std::size_t PutData (const void *pData, std::size_t nSize) override
 
virtual sal_uInt64 SeekPos (sal_uInt64 nPos) override
 
virtual void SetSize (sal_uInt64 nSize) override
 
virtual void FlushData () override
 
virtual void ResetError () override
 
 UCBStorageStream_Impl (const OUString &, StreamMode, UCBStorageStream *, bool, bool bRepair, Reference< XProgressHandler > const &xProgress)
 
void Free ()
 
bool Init ()
 
bool Clear ()
 
sal_Int16 Commit ()
 
void Revert ()
 
BaseStorageCreateStorage ()
 
sal_uInt64 GetSize ()
 
sal_uInt64 ReadSourceWriteTemporary (sal_uInt64 aLength)
 
void ReadSourceWriteTemporary ()
 
void CopySourceToTemporary ()
 
void SetError (ErrCode nError)
 
void PrepareCachedForReopen (StreamMode nMode)
 
void SetError (ErrCode nErrorCode)
 
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 
 SvRefBase (const SvRefBase &)
 
SvRefBaseoperator= (const SvRefBase &)
 
void RestoreNoDelete ()
 
void AddNextRef ()
 
void AddFirstRef ()
 
void ReleaseRef ()
 
unsigned int GetRefCount () const
 
- Public Member Functions inherited from SvStream
 SvStream ()
 
 SvStream (SvLockBytes *pLockBytes)
 
virtual ~SvStream ()
 
SvLockBytesGetLockBytes () const
 
ErrCode GetError () const
 
ErrCode const & GetErrorCode () const
 
void SetError (ErrCode nErrorCode)
 
virtual void ResetError ()
 
void SetEndian (SvStreamEndian SvStreamEndian)
 
SvStreamEndian GetEndian () const
 
bool IsEndianSwap () const
 
void SetCompressMode (SvStreamCompressFlags nNewMode)
 
SvStreamCompressFlags GetCompressMode () const
 
void SetCryptMaskKey (const OString &rCryptMaskKey)
 
void SetStreamCharSet (rtl_TextEncoding eCharSet)
 
rtl_TextEncoding GetStreamCharSet () const
 
void SetLineDelimiter (LineEnd eLineEnd)
 
LineEnd GetLineDelimiter () const
 
SvStreamReadUInt16 (sal_uInt16 &rUInt16)
 
SvStreamReadUInt32 (sal_uInt32 &rUInt32)
 
SvStreamReadUInt64 (sal_uInt64 &rUInt64)
 
SvStreamReadInt16 (sal_Int16 &rInt16)
 
SvStreamReadInt32 (sal_Int32 &rInt32)
 
SvStreamReadInt64 (sal_Int64 &rInt64)
 
SvStreamReadSChar (signed char &rChar)
 
SvStreamReadChar (char &rChar)
 
SvStreamReadUChar (unsigned char &rChar)
 
SvStreamReadUtf16 (sal_Unicode &rUtf16)
 
SvStreamReadCharAsBool (bool &rBool)
 
SvStreamReadFloat (float &rFloat)
 
SvStreamReadDouble (double &rDouble)
 
SvStreamReadStream (SvStream &rStream)
 
SvStreamWriteUInt16 (sal_uInt16 nUInt16)
 
SvStreamWriteUInt32 (sal_uInt32 nUInt32)
 
SvStreamWriteUInt64 (sal_uInt64 nuInt64)
 
SvStreamWriteInt16 (sal_Int16 nInt16)
 
SvStreamWriteInt32 (sal_Int32 nInt32)
 
SvStreamWriteInt64 (sal_Int64 nInt64)
 
SvStreamWriteUInt8 (sal_uInt8 nuInt8)
 
SvStreamWriteUnicode (sal_Unicode)
 
SvStreamWriteOString (std::string_view rStr)
 
SvStreamWriteStream (SvStream &rStream)
 
sal_uInt64 WriteStream (SvStream &rStream, sal_uInt64 nSize)
 
SvStreamWriteBool (bool b)
 
SvStreamWriteSChar (signed char nChar)
 
SvStreamWriteChar (char nChar)
 
SvStreamWriteUChar (unsigned char nChar)
 
SvStreamWriteFloat (float nFloat)
 
SvStreamWriteDouble (const double &rDouble)
 
SvStreamWriteNumberAsString (N n)
 
std::size_t ReadBytes (void *pData, std::size_t nSize)
 
std::size_t WriteBytes (const void *pData, std::size_t nSize)
 
sal_uInt64 Seek (sal_uInt64 nPos)
 
sal_uInt64 SeekRel (sal_Int64 nPos)
 
sal_uInt64 Tell () const
 
virtual sal_uInt64 TellEnd ()
 
sal_uInt64 remainingSize ()
 
void FlushBuffer ()
 
void Flush ()
 
bool SetStreamSize (sal_uInt64 nSize)
 
bool ReadLine (OStringBuffer &rStr, sal_Int32 nMaxBytesToRead=0xFFFE)
 
bool ReadLine (OString &rStr, sal_Int32 nMaxBytesToRead=0xFFFE)
 
bool WriteLine (std::string_view rStr)
 
bool ReadByteStringLine (OUString &rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxBytesToRead=0xFFFE)
 
bool WriteByteStringLine (std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
 
void StartWritingUnicodeText ()
 
void StartReadingUnicodeText (rtl_TextEncoding eReadBomCharSet)
 
SAL_DLLPRIVATE bool ReadUniStringLine (OUString &rStr, sal_Int32 nMaxCodepointsToRead)
 
OUString ReadUniOrByteString (rtl_TextEncoding eSrcCharSet)
 
SvStreamWriteUniOrByteString (std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
 
bool ReadUniOrByteStringLine (OUString &rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxCodepointsToRead=0xFFFE)
 
bool WriteUnicodeOrByteText (std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
 
bool WriteUnicodeOrByteText (std::u16string_view rStr)
 
bool WriteUniOrByteChar (sal_Unicode ch, rtl_TextEncoding eDestCharSet)
 
bool WriteUniOrByteChar (sal_Unicode ch)
 
void SetBufferSize (sal_uInt16 m_nBufSize)
 
sal_uInt16 GetBufferSize () const
 
void RefreshBuffer ()
 
bool IsWritable () const
 
StreamMode GetStreamMode () const
 
sal_Int32 GetVersion () const
 
void SetVersion (sal_Int32 n)
 
bool eof () const
 
bool bad () const
 
bool good () const
 

Public Attributes

UCBStorageStreamm_pAntiImpl
 
OUString m_aOriginalName
 
OUString m_aName
 
OUString m_aURL
 
OUString m_aContentType
 
OUString m_aOriginalContentType
 
OString m_aKey
 
::ucbhelper::Contentm_pContent
 
Reference< XInputStream > m_rSource
 
std::unique_ptr< SvStreamm_pStream
 
OUString m_aTempURL
 
ErrCode m_nError
 
StreamMode m_nMode
 
bool m_bSourceRead
 
bool m_bModified
 
bool m_bCommited
 
bool m_bDirect
 
bool m_bIsOLEStorage
 

Private Member Functions

virtual ~UCBStorageStream_Impl () override
 

Additional Inherited Members

- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 
- Protected Member Functions inherited from SvStream
virtual std::size_t GetData (void *pData, std::size_t nSize)
 
virtual std::size_t PutData (const void *pData, std::size_t nSize)
 
virtual sal_uInt64 SeekPos (sal_uInt64 nPos)
 
virtual void FlushData ()
 
virtual void SetSize (sal_uInt64 nSize)
 
SAL_DLLPRIVATE void ClearError ()
 
SAL_DLLPRIVATE void ClearBuffer ()
 
SAL_DLLPRIVATE std::size_t CryptAndWriteBuffer (const void *pStart, std::size_t nLen)
 
SAL_DLLPRIVATE void EncryptBuffer (void *pStart, std::size_t nLen) const
 
- Protected Attributes inherited from SvStream
sal_uInt64 m_nBufFilePos
 
StreamMode m_eStreamMode
 
bool m_isWritable
 

Detailed Description

Definition at line 389 of file ucbstorage.cxx.

Constructor & Destructor Documentation

◆ ~UCBStorageStream_Impl()

UCBStorageStream_Impl::~UCBStorageStream_Impl ( )
overrideprivatevirtual

Definition at line 662 of file ucbstorage.cxx.

References m_aTempURL, m_pContent, m_pStream, and m_rSource.

◆ UCBStorageStream_Impl()

UCBStorageStream_Impl::UCBStorageStream_Impl ( const OUString &  rName,
StreamMode  nMode,
UCBStorageStream pStream,
bool  bDirect,
bool  bRepair,
Reference< XProgressHandler > const &  xProgress 
)

Member Function Documentation

◆ Clear()

bool UCBStorageStream_Impl::Clear ( )

Definition at line 1145 of file ucbstorage.cxx.

References DBG_ASSERT, Free(), and m_pAntiImpl.

◆ Commit()

sal_Int16 UCBStorageStream_Impl::Commit ( )

◆ CopySourceToTemporary()

void UCBStorageStream_Impl::CopySourceToTemporary ( )

Definition at line 813 of file ucbstorage.cxx.

References m_bSourceRead, m_pStream, ReadSourceWriteTemporary(), and STREAM_SEEK_TO_END.

Referenced by Commit(), and FlushData().

◆ CreateStorage()

BaseStorage * UCBStorageStream_Impl::CreateStorage ( )

Definition at line 1012 of file ucbstorage.cxx.

References m_bDirect, m_bIsOLEStorage, and Storage.

◆ FlushData()

void UCBStorageStream_Impl::FlushData ( )
overridevirtual

Reimplemented from SvStream.

Definition at line 969 of file ucbstorage.cxx.

References CopySourceToTemporary(), m_bCommited, and m_pStream.

Referenced by UCBStorageStream::Commit().

◆ Free()

void UCBStorageStream_Impl::Free ( )

◆ GetData()

std::size_t UCBStorageStream_Impl::GetData ( void *  pData,
std::size_t  nSize 
)
overridevirtual

Reimplemented from SvStream.

Definition at line 827 of file ucbstorage.cxx.

References aData, Exception, Init(), m_bSourceRead, m_pStream, m_rSource, pData, and TOOLS_WARN_EXCEPTION.

Referenced by UCBStorageStream::Read().

◆ GetSize()

sal_uInt64 UCBStorageStream_Impl::GetSize ( )

Definition at line 998 of file ucbstorage.cxx.

References Init(), m_pStream, nPos, ReadSourceWriteTemporary(), and STREAM_SEEK_TO_END.

Referenced by UCBStorageStream::GetSize().

◆ Init()

bool UCBStorageStream_Impl::Init ( void  )

◆ PrepareCachedForReopen()

void UCBStorageStream_Impl::PrepareCachedForReopen ( StreamMode  nMode)

Definition at line 1173 of file ucbstorage.cxx.

References Free(), m_aTempURL, m_bSourceRead, and m_nMode.

◆ PutData()

std::size_t UCBStorageStream_Impl::PutData ( const void *  pData,
std::size_t  nSize 
)
overridevirtual

Reimplemented from SvStream.

Definition at line 864 of file ucbstorage.cxx.

References ERRCODE_IO_ACCESSDENIED, Init(), m_bModified, m_nMode, m_pStream, pData, and SetError().

Referenced by UCBStorageStream::Write().

◆ ReadSourceWriteTemporary() [1/2]

void UCBStorageStream_Impl::ReadSourceWriteTemporary ( )

◆ ReadSourceWriteTemporary() [2/2]

sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary ( sal_uInt64  aLength)

Definition at line 778 of file ucbstorage.cxx.

References aData, Exception, m_bSourceRead, m_pStream, m_rSource, and TOOLS_WARN_EXCEPTION.

◆ ResetError()

void UCBStorageStream_Impl::ResetError ( )
overridevirtual

Reimplemented from SvStream.

Definition at line 990 of file ucbstorage.cxx.

References ERRCODE_NONE, m_nError, m_pAntiImpl, SvStream::ResetError(), and StorageBase::ResetError().

◆ Revert()

void UCBStorageStream_Impl::Revert ( )

◆ SeekPos()

sal_uInt64 UCBStorageStream_Impl::SeekPos ( sal_uInt64  nPos)
overridevirtual

◆ SetError() [1/2]

void UCBStorageStream_Impl::SetError ( ErrCode  nError)

◆ SetError() [2/2]

void SvStream::SetError ( ErrCode  nErrorCode)

◆ SetSize()

void UCBStorageStream_Impl::SetSize ( sal_uInt64  nSize)
overridevirtual

Member Data Documentation

◆ m_aContentType

OUString UCBStorageStream_Impl::m_aContentType

Definition at line 406 of file ucbstorage.cxx.

Referenced by UCBStorageStream::CopyTo(), Revert(), and UCBStorageStream::SetProperty().

◆ m_aKey

OString UCBStorageStream_Impl::m_aKey

Definition at line 408 of file ucbstorage.cxx.

◆ m_aName

OUString UCBStorageStream_Impl::m_aName

Definition at line 404 of file ucbstorage.cxx.

Referenced by Commit(), UCBStorage::OpenStream(), Revert(), and UCBStorageStream_Impl().

◆ m_aOriginalContentType

OUString UCBStorageStream_Impl::m_aOriginalContentType

Definition at line 407 of file ucbstorage.cxx.

Referenced by Revert().

◆ m_aOriginalName

OUString UCBStorageStream_Impl::m_aOriginalName

Definition at line 403 of file ucbstorage.cxx.

Referenced by Revert(), and UCBStorageStream_Impl().

◆ m_aTempURL

OUString UCBStorageStream_Impl::m_aTempURL

◆ m_aURL

OUString UCBStorageStream_Impl::m_aURL

Definition at line 405 of file ucbstorage.cxx.

Referenced by Commit().

◆ m_bCommited

bool UCBStorageStream_Impl::m_bCommited

Definition at line 418 of file ucbstorage.cxx.

Referenced by Commit(), FlushData(), and Revert().

◆ m_bDirect

bool UCBStorageStream_Impl::m_bDirect

Definition at line 419 of file ucbstorage.cxx.

Referenced by Commit(), and CreateStorage().

◆ m_bIsOLEStorage

bool UCBStorageStream_Impl::m_bIsOLEStorage

Definition at line 422 of file ucbstorage.cxx.

Referenced by Commit(), and CreateStorage().

◆ m_bModified

bool UCBStorageStream_Impl::m_bModified

Definition at line 417 of file ucbstorage.cxx.

Referenced by Commit(), PutData(), Revert(), and SetSize().

◆ m_bSourceRead

bool UCBStorageStream_Impl::m_bSourceRead

◆ m_nError

ErrCode UCBStorageStream_Impl::m_nError

Definition at line 414 of file ucbstorage.cxx.

Referenced by ResetError(), SetError(), and UCBStorageStream::UCBStorageStream().

◆ m_nMode

StreamMode UCBStorageStream_Impl::m_nMode

◆ m_pAntiImpl

UCBStorageStream* UCBStorageStream_Impl::m_pAntiImpl

◆ m_pContent

::ucbhelper::Content* UCBStorageStream_Impl::m_pContent

◆ m_pStream

std::unique_ptr<SvStream> UCBStorageStream_Impl::m_pStream

◆ m_rSource

Reference<XInputStream> UCBStorageStream_Impl::m_rSource

The documentation for this class was generated from the following file: