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

Implements stream access for ZIP storages containing XML streams. More...

#include <zipstorage.hxx>

Inheritance diagram for oox::ZipStorage:
[legend]
Collaboration diagram for oox::ZipStorage:
[legend]

Public Member Functions

 ZipStorage (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XInputStream > &rxInStream)
 
 ZipStorage (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::io::XStream > &rxStream)
 
virtual ~ZipStorage () 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

 ZipStorage (const ZipStorage &rParentStorage, const css::uno::Reference< css::embed::XStorage > &rxStorage, const OUString &rElementName)
 
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::embed::XStorage > mxStorage
 Storage based on input or output stream. More...
 

Additional Inherited Members

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

Detailed Description

Implements stream access for ZIP storages containing XML streams.

Definition at line 41 of file zipstorage.hxx.

Constructor & Destructor Documentation

oox::ZipStorage::ZipStorage ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::io::XInputStream > &  rxInStream 
)
explicit
oox::ZipStorage::ZipStorage ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::io::XStream > &  rxStream 
)
explicit
oox::ZipStorage::~ZipStorage ( )
overridevirtual

Definition at line 97 of file zipstorage.cxx.

oox::ZipStorage::ZipStorage ( const ZipStorage rParentStorage,
const css::uno::Reference< css::embed::XStorage > &  rxStorage,
const OUString &  rElementName 
)
explicitprivate

Member Function Documentation

void oox::ZipStorage::implCommit ( ) const
overrideprivatevirtual

Commits the current storage.

Implements oox::StorageBase.

Definition at line 190 of file zipstorage.cxx.

References Exception, mxStorage, and TOOLS_WARN_EXCEPTION.

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

Returns the names of all elements of this storage.

Implements oox::StorageBase.

Definition at line 111 of file zipstorage.cxx.

References Exception, mxStorage, and TOOLS_INFO_EXCEPTION.

Reference< XStorage > oox::ZipStorage::implGetXStorage ( ) const
overrideprivatevirtual

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

Implements oox::StorageBase.

Definition at line 106 of file zipstorage.cxx.

References mxStorage.

bool oox::ZipStorage::implIsStorage ( ) const
overrideprivatevirtual

Returns true, if the object represents a valid storage.

Implements oox::StorageBase.

Definition at line 101 of file zipstorage.cxx.

References mxStorage.

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

Opens and returns the specified input stream from the storage.

Implements oox::StorageBase.

Definition at line 162 of file zipstorage.cxx.

References Exception, mxStorage, and TOOLS_INFO_EXCEPTION.

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

Opens and returns the specified output stream from the storage.

Implements oox::StorageBase.

Definition at line 176 of file zipstorage.cxx.

References Exception, mxStorage, and TOOLS_INFO_EXCEPTION.

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

Opens and returns the specified sub storage from the storage.

Implements oox::StorageBase.

Definition at line 126 of file zipstorage.cxx.

References Exception, mxStorage, and TOOLS_INFO_EXCEPTION.

Member Data Documentation

css::uno::Reference< css::embed::XStorage > oox::ZipStorage::mxStorage
private

Storage based on input or output stream.

Definition at line 86 of file zipstorage.hxx.


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