LibreOffice Module oox (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
oox::ole::OleStorage Class Referencefinal

Implements stream access for binary OLE storages. More...

#include <olestorage.hxx>

Inheritance diagram for oox::ole::OleStorage:
[legend]
Collaboration diagram for oox::ole::OleStorage:
[legend]

Public Member Functions

 OleStorage (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XInputStream > &rxInStream, bool bBaseStreamAccess)
 
 OleStorage (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XStream > &rxOutStream, bool bBaseStreamAccess)
 
virtual ~OleStorage () override
 
- Public Member Functions inherited from oox::StorageBase
 StorageBase (const css::uno::Reference< css::io::XInputStream > &rxInStream, bool bBaseStreamAccess)
 
 StorageBase (const css::uno::Reference< css::io::XStream > &rxOutStream, bool bBaseStreamAccess)
 
virtual ~StorageBase ()
 
bool isStorage () const
 Returns true, if the object represents a valid storage. More...
 
bool isRootStorage () const
 Returns true, if the object represents the root storage. More...
 
bool isReadOnly () const
 Returns true, if the storage operates in read-only mode (based on an input stream). More...
 
css::uno::Reference< css::embed::XStorage > getXStorage () const
 Returns the com.sun.star.embed.XStorage interface of the current storage. More...
 
const OUString & getName () const
 Returns the element name of this storage. More...
 
OUString getPath () const
 Returns the full path of this storage. More...
 
void getElementNames (::std::vector< OUString > &orElementNames) const
 Fills the passed vector with the names of all direct elements of this storage. More...
 
StorageRef openSubStorage (const OUString &rStorageName, bool bCreateMissing)
 Opens and returns the specified sub storage from the storage. More...
 
css::uno::Reference< css::io::XInputStream > openInputStream (const OUString &rStreamName)
 Opens and returns the specified input stream from the storage. More...
 
css::uno::Reference< css::io::XOutputStream > openOutputStream (const OUString &rStreamName)
 Opens and returns the specified output stream from the storage. More...
 
void copyToStorage (StorageBase &rDestStrg, const OUString &rElementName)
 Copies the specified element from this storage to the passed destination storage. More...
 
void copyStorageToStorage (StorageBase &rDestStrg)
 Copies all streams of this storage and of all substorages to the passed destination. More...
 
void commit ()
 Commits the changes to the storage and all substorages. More...
 

Private Member Functions

 OleStorage (const OleStorage &rParentStorage, const css::uno::Reference< css::container::XNameContainer > &rxStorage, const OUString &rElementName, bool bReadOnly)
 
 OleStorage (const OleStorage &rParentStorage, const css::uno::Reference< css::io::XStream > &rxOutStream, const OUString &rElementName)
 
void initStorage (const css::uno::Reference< css::io::XInputStream > &rxInStream)
 Initializes the API storage object for input. More...
 
void initStorage (const css::uno::Reference< css::io::XStream > &rxOutStream)
 Initializes the API storage object for input/output. More...
 
virtual bool implIsStorage () const override
 Returns true, if the object represents a valid storage. More...
 
virtual css::uno::Reference< css::embed::XStorage > implGetXStorage () const override
 Returns the com.sun.star.embed.XStorage interface of the current storage. More...
 
virtual void implGetElementNames (::std::vector< OUString > &orElementNames) const override
 Returns the names of all elements of this storage. More...
 
virtual StorageRef implOpenSubStorage (const OUString &rElementName, bool bCreateMissing) override
 Opens and returns the specified sub storage from the storage. More...
 
virtual css::uno::Reference< css::io::XInputStream > implOpenInputStream (const OUString &rElementName) override
 Opens and returns the specified input stream from the storage. More...
 
virtual css::uno::Reference< css::io::XOutputStream > implOpenOutputStream (const OUString &rElementName) override
 Opens and returns the specified output stream from the storage. More...
 
virtual void implCommit () const override
 Commits the current storage. More...
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxContext
 Component context with service manager. More...
 
css::uno::Reference< css::container::XNameContainer > mxStorage
 Access to elements of this sub storage. More...
 
const OleStoragempParentStorage
 Parent OLE storage that contains this storage. More...
 

Additional Inherited Members

- Protected Member Functions inherited from oox::StorageBase
 StorageBase (const StorageBase &rParentStorage, OUString aStorageName, bool bReadOnly)
 Special constructor for sub storage objects. More...
 

Detailed Description

Implements stream access for binary OLE storages.

Definition at line 43 of file olestorage.hxx.

Constructor & Destructor Documentation

◆ OleStorage() [1/4]

oox::ole::OleStorage::OleStorage ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::io::XInputStream > &  rxInStream,
bool  bBaseStreamAccess 
)
explicit

◆ OleStorage() [2/4]

oox::ole::OleStorage::OleStorage ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::io::XStream > &  rxOutStream,
bool  bBaseStreamAccess 
)
explicit

◆ ~OleStorage()

oox::ole::OleStorage::~OleStorage ( )
overridevirtual

Definition at line 200 of file olestorage.cxx.

◆ OleStorage() [3/4]

oox::ole::OleStorage::OleStorage ( const OleStorage rParentStorage,
const css::uno::Reference< css::container::XNameContainer > &  rxStorage,
const OUString &  rElementName,
bool  bReadOnly 
)
explicitprivate

◆ OleStorage() [4/4]

oox::ole::OleStorage::OleStorage ( const OleStorage rParentStorage,
const css::uno::Reference< css::io::XStream > &  rxOutStream,
const OUString &  rElementName 
)
explicitprivate

Member Function Documentation

◆ implCommit()

void oox::ole::OleStorage::implCommit ( ) const
overrideprivatevirtual

Commits the current storage.

Implements oox::StorageBase.

Definition at line 351 of file olestorage.cxx.

References Any, Exception, and mxStorage.

◆ implGetElementNames()

void oox::ole::OleStorage::implGetElementNames ( ::std::vector< OUString > &  orElementNames) const
overrideprivatevirtual

Returns the names of all elements of this storage.

Implements oox::StorageBase.

Definition at line 279 of file olestorage.cxx.

References Exception, and mxStorage.

◆ implGetXStorage()

Reference< XStorage > oox::ole::OleStorage::implGetXStorage ( ) const
overrideprivatevirtual

Returns the com.sun.star.embed.XStorage interface of the current storage.

Attention: \n
This function is not implemented for binary OLE storages.

Implements oox::StorageBase.

Definition at line 273 of file olestorage.cxx.

◆ implIsStorage()

bool oox::ole::OleStorage::implIsStorage ( ) const
overrideprivatevirtual

Returns true, if the object represents a valid storage.

Implements oox::StorageBase.

Definition at line 257 of file olestorage.cxx.

References Exception, and mxStorage.

◆ implOpenInputStream()

Reference< XInputStream > oox::ole::OleStorage::implOpenInputStream ( const OUString &  rElementName)
overrideprivatevirtual

Opens and returns the specified input stream from the storage.

Implements oox::StorageBase.

Definition at line 330 of file olestorage.cxx.

References Exception, and mxStorage.

◆ implOpenOutputStream()

Reference< XOutputStream > oox::ole::OleStorage::implOpenOutputStream ( const OUString &  rElementName)
overrideprivatevirtual

Opens and returns the specified output stream from the storage.

Implements oox::StorageBase.

Definition at line 343 of file olestorage.cxx.

References mxContext, and mxStorage.

◆ implOpenSubStorage()

StorageRef oox::ole::OleStorage::implOpenSubStorage ( const OUString &  rElementName,
bool  bCreateMissing 
)
overrideprivatevirtual

Opens and returns the specified sub storage from the storage.

Implements oox::StorageBase.

Definition at line 292 of file olestorage.cxx.

References Exception, mxContext, and mxStorage.

◆ initStorage() [1/2]

void oox::ole::OleStorage::initStorage ( const css::uno::Reference< css::io::XInputStream > &  rxInStream)
private

Initializes the API storage object for input.

◆ initStorage() [2/2]

void oox::ole::OleStorage::initStorage ( const css::uno::Reference< css::io::XStream > &  rxOutStream)
private

Initializes the API storage object for input/output.

Member Data Documentation

◆ mpParentStorage

const OleStorage* oox::ole::OleStorage::mpParentStorage
private

Parent OLE storage that contains this storage.

Definition at line 107 of file olestorage.hxx.

◆ mxContext

css::uno::Reference< css::uno::XComponentContext > oox::ole::OleStorage::mxContext
private

Component context with service manager.

Definition at line 104 of file olestorage.hxx.

◆ mxStorage

css::uno::Reference< css::container::XNameContainer > oox::ole::OleStorage::mxStorage
private

Access to elements of this sub storage.

Definition at line 106 of file olestorage.hxx.


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