LibreOffice Module sot (master) 1
|
#include <storage.hxx>
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< SvMemoryStream > | CreateMemoryStream () |
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< SotStorageStream > | OpenSotStream (const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE) |
SotStorage * | OpenSotStorage (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 &) | |
SvRefBase & | operator= (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 SotStorage * | OpenOLEStorage (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 | |
BaseStorage * | m_pOwnStg |
SvStream * | m_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 |
Definition at line 73 of file storage.hxx.
|
overrideprivatevirtual |
Definition at line 395 of file storage.cxx.
References m_bDelStm, m_pOwnStg, and m_pStorStm.
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::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::SotStorage | ( | BaseStorage * | pStorage | ) |
Definition at line 319 of file storage.cxx.
References m_aName, SetError(), SOFFICE_FILEFORMAT_50, and SVSTREAM_CANNOT_MAKE.
SotStorage::SotStorage | ( | SvStream & | rStream | ) |
Definition at line 355 of file storage.cxx.
References UCBStorage::IsStorageFile(), SetError(), SOFFICE_FILEFORMAT_50, and Storage.
SotStorage::SotStorage | ( | bool | bUCBStorage, |
SvStream & | rStream | ||
) |
Definition at line 336 of file storage.cxx.
References UCBStorage::IsStorageFile(), SetError(), SOFFICE_FILEFORMAT_50, and Storage.
SotStorage::SotStorage | ( | SvStream * | rStream, |
bool | bDelete | ||
) |
Definition at line 374 of file storage.cxx.
References UCBStorage::IsStorageFile(), SetError(), SOFFICE_FILEFORMAT_50, and Storage.
bool SotStorage::Commit | ( | ) |
Definition at line 519 of file storage.cxx.
References BaseStorage::Commit(), ERRCODE_NONE, StorageBase::GetError(), GetError(), m_pOwnStg, SetError(), and SVSTREAM_GENERALERROR.
bool SotStorage::CopyTo | ( | const OUString & | rEleName, |
SotStorage * | pDest, | ||
const OUString & | rNewName | ||
) |
Definition at line 620 of file storage.cxx.
References BaseStorage::CopyTo(), ERRCODE_NONE, StorageBase::GetError(), GetError(), m_pOwnStg, SetError(), and SVSTREAM_GENERALERROR.
bool SotStorage::CopyTo | ( | SotStorage * | pDestStg | ) |
Definition at line 504 of file storage.cxx.
References BaseStorage::CopyTo(), ERRCODE_NONE, StorageBase::GetError(), GetError(), m_aKey, m_nVersion, m_pOwnStg, SetError(), and SVSTREAM_GENERALERROR.
Referenced by CreateMemoryStream().
std::unique_ptr< SvMemoryStream > SotStorage::CreateMemoryStream | ( | ) |
Definition at line 402 of file storage.cxx.
References tools::SvRef< typename T >::clear(), CopyTo(), tools::SvRef< typename T >::get(), and SotStorage().
|
private |
Definition at line 236 of file storage.cxx.
References aURL, utl::UcbStreamHelper::CreateStream(), DBG_ASSERT, ERASEMASK, ERRCODE_IO_NOTSUPPORTED, SvStream::GetError(), StorageBase::GetError(), INetURLObject::GetMainURL(), BaseStorage::GetName(), INetURLObject::GetProtocol(), BaseStorage::IsRoot(), UCBStorage::IsStorageFile(), m_aName, m_bDelStm, m_pOwnStg, m_pStorStm, INetURLObject::NONE, SetError(), INetURLObject::SetURL(), SignAsRoot(), and Storage.
void SotStorage::FillInfoList | ( | SvStorageInfoList * | pFillList | ) | const |
Definition at line 498 of file storage.cxx.
References BaseStorage::FillInfoList(), and m_pOwnStg.
SvGlobalName SotStorage::GetClassName | ( | ) |
Definition at line 468 of file storage.cxx.
References BaseStorage::GetClassName(), m_pOwnStg, SetError(), and SVSTREAM_GENERALERROR.
|
inline |
Definition at line 117 of file storage.hxx.
References ErrCode::IgnoreWarning(), and SvStream::m_nError.
SotClipboardFormatId SotStorage::GetFormat | ( | ) |
Definition at line 478 of file storage.cxx.
References BaseStorage::GetFormat(), m_pOwnStg, NONE, SetError(), and SVSTREAM_GENERALERROR.
|
static |
Definition at line 696 of file storage.cxx.
References SotExchange::GetFormat(), NONE, and TOOLS_INFO_EXCEPTION.
Referenced by GetVersion().
|
inline |
Definition at line 106 of file storage.hxx.
const OUString & SotStorage::GetName | ( | ) | const |
Definition at line 451 of file storage.cxx.
References BaseStorage::GetName(), m_aName, and m_pOwnStg.
OUString SotStorage::GetUserName | ( | ) |
Definition at line 488 of file storage.cxx.
References aName, BaseStorage::GetUserName(), m_pOwnStg, SetError(), and SVSTREAM_GENERALERROR.
|
inline |
Definition at line 112 of file storage.hxx.
References SvStream::m_nVersion.
|
static |
Definition at line 722 of file storage.cxx.
References GetFormatID(), SOFFICE_FILEFORMAT_60, SOFFICE_FILEFORMAT_8, STARCALC_60, STARCALC_8, STARCALC_8_TEMPLATE, STARCHART_60, STARCHART_8, STARCHART_8_TEMPLATE, STARDRAW_60, STARDRAW_8, STARDRAW_8_TEMPLATE, STARIMPRESS_60, STARIMPRESS_8, STARIMPRESS_8_TEMPLATE, STARMATH_60, STARMATH_8, STARMATH_8_TEMPLATE, STARWRITER_60, STARWRITER_8, STARWRITER_8_TEMPLATE, STARWRITERGLOB_60, STARWRITERGLOB_8, STARWRITERGLOB_8_TEMPLATE, STARWRITERWEB_60, and STARWRITERWEB_8.
bool SotStorage::IsContained | ( | const OUString & | rEleName | ) | const |
Definition at line 598 of file storage.cxx.
References BaseStorage::IsContained(), and m_pOwnStg.
bool SotStorage::IsOLEStorage | ( | ) | const |
Definition at line 644 of file storage.cxx.
References m_pOwnStg.
|
static |
Definition at line 650 of file storage.cxx.
|
static |
Definition at line 655 of file storage.cxx.
bool SotStorage::IsStorage | ( | const OUString & | rEleName | ) | const |
Definition at line 580 of file storage.cxx.
References BaseStorage::IsStorage(), and m_pOwnStg.
|
static |
Definition at line 418 of file storage.cxx.
References aName, aURL, utl::UcbStreamHelper::CreateStream(), INetURLObject::GetMainURL(), INetURLObject::GetProtocol(), IsStorageFile(), INetURLObject::NONE, and INetURLObject::SetURL().
Referenced by IsStorageFile().
|
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().
bool SotStorage::IsStream | ( | const OUString & | rEleName | ) | const |
Definition at line 589 of file storage.cxx.
References BaseStorage::IsStream(), and m_pOwnStg.
|
static |
Definition at line 660 of file storage.cxx.
References utl::UcbStreamHelper::CreateStream(), ERRCODE_IO_GENERAL, SotStorage(), and xStream.
SotStorage * SotStorage::OpenSotStorage | ( | const OUString & | rEleName, |
StreamMode | nMode = StreamMode::STD_READWRITE , |
||
bool | transacted = true |
||
) |
Definition at line 556 of file storage.cxx.
References StorageBase::GetError(), m_pOwnStg, BaseStorage::OpenStorage(), p, StorageBase::ResetError(), SetError(), SotStorage(), and SVSTREAM_GENERALERROR.
tools::SvRef< SotStorageStream > SotStorage::OpenSotStream | ( | const OUString & | rEleName, |
StreamMode | nMode = StreamMode::STD_READWRITE |
||
) |
Definition at line 532 of file storage.cxx.
References StorageBase::GetError(), m_pOwnStg, BaseStorage::OpenStream(), p, StorageBase::ResetError(), SetError(), SotStorageStream, and SVSTREAM_GENERALERROR.
bool SotStorage::Remove | ( | const OUString & | rEleName | ) |
Definition at line 607 of file storage.cxx.
References ERRCODE_NONE, StorageBase::GetError(), GetError(), m_pOwnStg, BaseStorage::Remove(), SetError(), and SVSTREAM_GENERALERROR.
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.
|
inline |
Definition at line 121 of file storage.hxx.
References ERRCODE_NONE, and SvStream::m_nError.
Referenced by Commit(), CopyTo(), CreateStorage(), GetClassName(), GetFormat(), GetUserName(), OpenSotStorage(), OpenSotStream(), Remove(), and SetClass().
|
inline |
Definition at line 108 of file storage.hxx.
References SvStream::m_nVersion, and nVersion.
|
inline |
Definition at line 127 of file storage.hxx.
Referenced by CreateStorage().
bool SotStorage::Validate | ( | ) |
Definition at line 635 of file storage.cxx.
References DBG_ASSERT, m_bIsRoot, m_pOwnStg, and BaseStorage::ValidateFAT().
|
friend |
Definition at line 75 of file storage.hxx.
Referenced by OpenSotStream().
|
private |
Definition at line 83 of file storage.hxx.
Referenced by CopyTo().
|
private |
Definition at line 80 of file storage.hxx.
Referenced by CreateStorage(), and GetName().
|
private |
Definition at line 82 of file storage.hxx.
Referenced by CreateStorage(), and ~SotStorage().
|
private |
Definition at line 81 of file storage.hxx.
Referenced by Validate().
|
private |
Definition at line 79 of file storage.hxx.
|
private |
Definition at line 84 of file storage.hxx.
Referenced by CopyTo().
|
private |
Definition at line 77 of file storage.hxx.
Referenced by Commit(), CopyTo(), CreateStorage(), FillInfoList(), GetClassName(), GetFormat(), GetName(), GetUserName(), IsContained(), IsOLEStorage(), IsStorage(), IsStream(), OpenSotStorage(), OpenSotStream(), Remove(), SetClass(), Validate(), and ~SotStorage().
|
private |
Definition at line 78 of file storage.hxx.
Referenced by CreateStorage(), and ~SotStorage().