LibreOffice Module sot (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SotStorage Class Referencefinal

#include <storage.hxx>

Inheritance diagram for SotStorage:
[legend]
Collaboration diagram for SotStorage:
[legend]

Public Member Functions

 SotStorage (OUString const &rString, StreamMode eMode=StreamMode::STD_READWRITE)
 
 SotStorage (bool bUCBStorage, const OUString &rString, StreamMode=StreamMode::STD_READWRITE)
 
 SotStorage (BaseStorage *pStorage)
 
 SotStorage (SvStream &rStream)
 
 SotStorage (bool bUCBStorage, SvStream &rStream)
 
 SotStorage (SvStream *rStream, bool bDelete)
 
std::unique_ptr< SvMemoryStreamCreateMemoryStream ()
 
const OUString & GetName () const
 
bool Validate ()
 
const OString & GetKey () const
 
void SetVersion (sal_Int32 nVersion)
 
sal_Int32 GetVersion () const
 
ErrCode GetError () const
 
void SetError (ErrCode nErrorCode)
 
void SignAsRoot (bool bRoot)
 
void SetClass (const SvGlobalName &rClass, SotClipboardFormatId bOriginalClipFormat, const OUString &rUserTypeName)
 
SvGlobalName GetClassName ()
 
SotClipboardFormatId GetFormat ()
 
OUString GetUserName ()
 
void FillInfoList (SvStorageInfoList *) const
 
bool CopyTo (SotStorage *pDestStg)
 
bool Commit ()
 
tools::SvRef< SotStorageStreamOpenSotStream (const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE)
 
SotStorageOpenSotStorage (const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool transacted=true)
 
bool IsStream (const OUString &rEleName) const
 
bool IsStorage (const OUString &rEleName) const
 
bool IsContained (const OUString &rEleName) const
 
bool Remove (const OUString &rEleName)
 
bool CopyTo (const OUString &rEleName, SotStorage *pDest, const OUString &rNewName)
 
bool IsOLEStorage () const
 
- Public Member Functions inherited from SotObject
 SotObject ()
 
sal_uInt16 GetOwnerLockCount () const
 
void OwnerLock (bool bLock)
 When the OwnerLock is decremented to zero, the DoClose method is called. More...
 
bool DoClose ()
 
bool IsInClose () const
 
- 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
 

Static Public Member Functions

static bool IsStorageFile (OUString const &rFileName)
 
static bool IsStorageFile (SvStream *pStream)
 
static bool IsOLEStorage (const OUString &rFileName)
 
static bool IsOLEStorage (SvStream *pStream)
 
static SotStorageOpenOLEStorage (css::uno::Reference< css::embed::XStorage > const &xStorage, OUString const &rEleName, StreamMode=StreamMode::STD_READWRITE)
 
static SotClipboardFormatId GetFormatID (css::uno::Reference< css::embed::XStorage > const &xStorage)
 
static sal_Int32 GetVersion (css::uno::Reference< css::embed::XStorage > const &xStorage)
 

Private Member Functions

virtual ~SotStorage () override
 
void CreateStorage (bool bUCBStorage, StreamMode)
 

Private Attributes

BaseStoragem_pOwnStg
 
SvStreamm_pStorStm
 
ErrCode m_nError
 
OUString m_aName
 
bool m_bIsRoot
 
bool m_bDelStm
 
OString m_aKey
 
sal_Int32 m_nVersion
 

Friends

class SotStorageStream
 

Additional Inherited Members

- Protected Member Functions inherited from SotObject
virtual ~SotObject () override
 
virtual bool Close ()
 
- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 

Detailed Description

Definition at line 73 of file storage.hxx.

Constructor & Destructor Documentation

◆ ~SotStorage()

SotStorage::~SotStorage ( )
overrideprivatevirtual

Definition at line 395 of file storage.cxx.

References m_bDelStm, m_pOwnStg, and m_pStorStm.

◆ SotStorage() [1/6]

SotStorage::SotStorage ( OUString const &  rString,
StreamMode  eMode = StreamMode::STD_READWRITE 
)

Definition at line 227 of file storage.cxx.

References m_aName, and SOFFICE_FILEFORMAT_50.

Referenced by CreateMemoryStream(), OpenOLEStorage(), and OpenSotStorage().

◆ SotStorage() [2/6]

SotStorage::SotStorage ( bool  bUCBStorage,
const OUString &  rString,
StreamMode  nMode = StreamMode::STD_READWRITE 
)

Definition at line 310 of file storage.cxx.

References m_aName, and SOFFICE_FILEFORMAT_50.

◆ SotStorage() [3/6]

SotStorage::SotStorage ( BaseStorage pStorage)

Definition at line 319 of file storage.cxx.

References m_aName, SetError(), SOFFICE_FILEFORMAT_50, and SVSTREAM_CANNOT_MAKE.

◆ SotStorage() [4/6]

SotStorage::SotStorage ( SvStream rStream)

Definition at line 355 of file storage.cxx.

References UCBStorage::IsStorageFile(), SetError(), SOFFICE_FILEFORMAT_50, and Storage.

◆ SotStorage() [5/6]

SotStorage::SotStorage ( bool  bUCBStorage,
SvStream rStream 
)

Definition at line 336 of file storage.cxx.

References UCBStorage::IsStorageFile(), SetError(), SOFFICE_FILEFORMAT_50, and Storage.

◆ SotStorage() [6/6]

SotStorage::SotStorage ( SvStream rStream,
bool  bDelete 
)

Definition at line 374 of file storage.cxx.

References UCBStorage::IsStorageFile(), SetError(), SOFFICE_FILEFORMAT_50, and Storage.

Member Function Documentation

◆ Commit()

bool SotStorage::Commit ( )

◆ CopyTo() [1/2]

bool SotStorage::CopyTo ( const OUString &  rEleName,
SotStorage pDest,
const OUString &  rNewName 
)

◆ CopyTo() [2/2]

bool SotStorage::CopyTo ( SotStorage pDestStg)

◆ CreateMemoryStream()

std::unique_ptr< SvMemoryStream > SotStorage::CreateMemoryStream ( )

◆ CreateStorage()

void SotStorage::CreateStorage ( bool  bUCBStorage,
StreamMode  nMode 
)
private

◆ FillInfoList()

void SotStorage::FillInfoList ( SvStorageInfoList pFillList) const

Definition at line 498 of file storage.cxx.

References BaseStorage::FillInfoList(), and m_pOwnStg.

◆ GetClassName()

SvGlobalName SotStorage::GetClassName ( )

Definition at line 468 of file storage.cxx.

References BaseStorage::GetClassName(), m_pOwnStg, SetError(), and SVSTREAM_GENERALERROR.

◆ GetError()

ErrCode SotStorage::GetError ( ) const
inline

Definition at line 117 of file storage.hxx.

References ErrCode::IgnoreWarning(), and SvStream::m_nError.

Referenced by Commit(), CopyTo(), and Remove().

◆ GetFormat()

SotClipboardFormatId SotStorage::GetFormat ( )

Definition at line 478 of file storage.cxx.

References BaseStorage::GetFormat(), m_pOwnStg, NONE, SetError(), and SVSTREAM_GENERALERROR.

◆ GetFormatID()

SotClipboardFormatId SotStorage::GetFormatID ( css::uno::Reference< css::embed::XStorage > const &  xStorage)
static

Definition at line 696 of file storage.cxx.

References SotExchange::GetFormat(), NONE, and TOOLS_INFO_EXCEPTION.

Referenced by GetVersion().

◆ GetKey()

const OString & SotStorage::GetKey ( ) const
inline

Definition at line 106 of file storage.hxx.

◆ GetName()

const OUString & SotStorage::GetName ( ) const

Definition at line 451 of file storage.cxx.

References BaseStorage::GetName(), m_aName, and m_pOwnStg.

◆ GetUserName()

OUString SotStorage::GetUserName ( )

◆ GetVersion() [1/2]

sal_Int32 SotStorage::GetVersion ( ) const
inline

Definition at line 112 of file storage.hxx.

References SvStream::m_nVersion.

◆ GetVersion() [2/2]

sal_Int32 SotStorage::GetVersion ( css::uno::Reference< css::embed::XStorage > const &  xStorage)
static

◆ IsContained()

bool SotStorage::IsContained ( const OUString &  rEleName) const

Definition at line 598 of file storage.cxx.

References BaseStorage::IsContained(), and m_pOwnStg.

◆ IsOLEStorage() [1/3]

bool SotStorage::IsOLEStorage ( ) const

Definition at line 644 of file storage.cxx.

References m_pOwnStg.

◆ IsOLEStorage() [2/3]

bool SotStorage::IsOLEStorage ( const OUString &  rFileName)
static

Definition at line 650 of file storage.cxx.

◆ IsOLEStorage() [3/3]

bool SotStorage::IsOLEStorage ( SvStream pStream)
static

Definition at line 655 of file storage.cxx.

◆ IsStorage()

bool SotStorage::IsStorage ( const OUString &  rEleName) const

Definition at line 580 of file storage.cxx.

References BaseStorage::IsStorage(), and m_pOwnStg.

◆ IsStorageFile() [1/2]

bool SotStorage::IsStorageFile ( OUString const &  rFileName)
static

◆ IsStorageFile() [2/2]

bool SotStorage::IsStorageFile ( SvStream pStream)
static

code for new storages must come first!

Definition at line 435 of file storage.cxx.

References UCBStorage::IsStorageFile(), nPos, SvStream::Seek(), and SvStream::Tell().

◆ IsStream()

bool SotStorage::IsStream ( const OUString &  rEleName) const

Definition at line 589 of file storage.cxx.

References BaseStorage::IsStream(), and m_pOwnStg.

◆ OpenOLEStorage()

SotStorage * SotStorage::OpenOLEStorage ( css::uno::Reference< css::embed::XStorage > const &  xStorage,
OUString const &  rEleName,
StreamMode  nMode = StreamMode::STD_READWRITE 
)
static

◆ OpenSotStorage()

SotStorage * SotStorage::OpenSotStorage ( const OUString &  rEleName,
StreamMode  nMode = StreamMode::STD_READWRITE,
bool  transacted = true 
)

◆ OpenSotStream()

tools::SvRef< SotStorageStream > SotStorage::OpenSotStream ( const OUString &  rEleName,
StreamMode  nMode = StreamMode::STD_READWRITE 
)

◆ Remove()

bool SotStorage::Remove ( const OUString &  rEleName)

◆ SetClass()

void SotStorage::SetClass ( const SvGlobalName rClass,
SotClipboardFormatId  bOriginalClipFormat,
const OUString &  rUserTypeName 
)

Definition at line 458 of file storage.cxx.

References m_pOwnStg, BaseStorage::SetClass(), SetError(), and SVSTREAM_GENERALERROR.

◆ SetError()

void SotStorage::SetError ( ErrCode  nErrorCode)
inline

◆ SetVersion()

void SotStorage::SetVersion ( sal_Int32  nVersion)
inline

Definition at line 108 of file storage.hxx.

References SvStream::m_nVersion, and nVersion.

◆ SignAsRoot()

void SotStorage::SignAsRoot ( bool  bRoot)
inline

Definition at line 127 of file storage.hxx.

Referenced by CreateStorage().

◆ Validate()

bool SotStorage::Validate ( )

Definition at line 635 of file storage.cxx.

References DBG_ASSERT, m_bIsRoot, m_pOwnStg, and BaseStorage::ValidateFAT().

Friends And Related Function Documentation

◆ SotStorageStream

friend class SotStorageStream
friend

Definition at line 75 of file storage.hxx.

Referenced by OpenSotStream().

Member Data Documentation

◆ m_aKey

OString SotStorage::m_aKey
private

Definition at line 83 of file storage.hxx.

Referenced by CopyTo().

◆ m_aName

OUString SotStorage::m_aName
private

Definition at line 80 of file storage.hxx.

Referenced by CreateStorage(), and GetName().

◆ m_bDelStm

bool SotStorage::m_bDelStm
private

Definition at line 82 of file storage.hxx.

Referenced by CreateStorage(), and ~SotStorage().

◆ m_bIsRoot

bool SotStorage::m_bIsRoot
private

Definition at line 81 of file storage.hxx.

Referenced by Validate().

◆ m_nError

ErrCode SotStorage::m_nError
private

Definition at line 79 of file storage.hxx.

◆ m_nVersion

sal_Int32 SotStorage::m_nVersion
private

Definition at line 84 of file storage.hxx.

Referenced by CopyTo().

◆ m_pOwnStg

BaseStorage* SotStorage::m_pOwnStg
private

◆ m_pStorStm

SvStream* SotStorage::m_pStorStm
private

Definition at line 78 of file storage.hxx.

Referenced by CreateStorage(), and ~SotStorage().


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