LibreOffice Module sot (master) 1
Macros | Functions
storage.cxx File Reference
#include <sal/config.h>
#include <sal/log.hxx>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <osl/file.hxx>
#include <sot/stg.hxx>
#include <sot/storinfo.hxx>
#include <sot/storage.hxx>
#include <sot/formats.hxx>
#include <sot/exchange.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbhelper.hxx>
#include <comphelper/fileformat.h>
#include <com/sun/star/uno/Reference.h>
#include <memory>
Include dependency graph for storage.cxx:

Go to the source code of this file.

Macros

#define INIT_SotStorage()
 SotStorage::SotStorage() More...
 
#define ERASEMASK   ( StreamMode::TRUNC | StreamMode::WRITE | StreamMode::SHARE_DENYALL )
 

Functions

static SvLockBytesRef MakeLockBytes_Impl (const OUString &rName, StreamMode nMode)
 
SAL_DLLPUBLIC_EXPORT bool TestImportOLE2 (SvStream &rStream)
 

Macro Definition Documentation

◆ ERASEMASK

Definition at line 225 of file storage.cxx.

◆ INIT_SotStorage

#define INIT_SotStorage ( )
Value:
: m_pOwnStg( nullptr ) \
, m_pStorStm( nullptr ) \
, m_nError( ERRCODE_NONE ) \
, m_bIsRoot( false ) \
, m_bDelStm( false ) \
, m_nVersion( SOFFICE_FILEFORMAT_CURRENT )

SotStorage::SotStorage()

A I... object must be passed to SvObject, because otherwise itself will create and define an IUnknown, so that all other I... objects would be destroyed with delete (Owner() == true). But IStorage objects are only used and not implemented by ourselves, therefore we pretend the IStorage object was passed from the outside and it will be freed with Release(). The CreateStorage methods are needed to create an IStorage object before the call of SvObject (Own, !Own automatic). If CreateStorage has created an object, then the RefCounter was already incremented. The transfer is done in pStorageCTor and the variable is NULL, if it didn't work.

Definition at line 217 of file storage.cxx.

Function Documentation

◆ MakeLockBytes_Impl()

static SvLockBytesRef MakeLockBytes_Impl ( const OUString &  rName,
StreamMode  nMode 
)
static

Definition at line 45 of file storage.cxx.

◆ TestImportOLE2()

SAL_DLLPUBLIC_EXPORT bool TestImportOLE2 ( SvStream rStream)

Definition at line 787 of file storage.cxx.

References SvStream::remainingSize().