LibreOffice Module ucb (master)  1
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
tdoc_ucp::StorageElementFactory Class Reference

#include <tdoc_storage.hxx>

Inheritance diagram for tdoc_ucp::StorageElementFactory:
[legend]
Collaboration diagram for tdoc_ucp::StorageElementFactory:
[legend]

Classes

struct  ltstrbool
 

Public Member Functions

 StorageElementFactory (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const rtl::Reference< OfficeDocumentsManager > &xDocsMgr)
 
virtual ~StorageElementFactory () override
 
css::uno::Reference< css::embed::XStorage > createTemporaryStorage ()
 
css::uno::Reference< css::embed::XStorage > createStorage (const OUString &rUri, StorageAccessMode eMode)
 
css::uno::Reference< css::io::XInputStream > createInputStream (const OUString &rUri, const OUString &rPassword)
 
css::uno::Reference< css::io::XOutputStream > createOutputStream (const OUString &rUri, const OUString &rPassword, bool bTruncate)
 
css::uno::Reference< css::io::XStream > createStream (const OUString &rUri, const OUString &rPassword, bool bTruncate)
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Types

typedef std::map< std::pair< OUString, bool >, Storage *, ltstrboolStorageMap
 

Private Member Functions

void releaseElement (Storage const *pElement)
 
css::uno::Reference< css::embed::XStorage > queryParentStorage (const OUString &rUri, StorageAccessMode eMode)
 
css::uno::Reference< css::embed::XStorage > queryStorage (const css::uno::Reference< css::embed::XStorage > &xParentStorage, const OUString &rUri, StorageAccessMode eMode)
 
css::uno::Reference< css::io::XStream > queryStream (const css::uno::Reference< css::embed::XStorage > &xParentStorage, const OUString &rUri, const OUString &rPassword, StorageAccessMode eMode, bool bTruncate)
 

Private Attributes

StorageMap m_aMap
 
osl::Mutex m_aMutex
 
rtl::Reference< OfficeDocumentsManagerm_xDocsMgr
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 

Friends

class Storage
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static voidoperator new (std::size_t nSize)
 
static voidoperator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 43 of file tdoc_storage.hxx.

Member Typedef Documentation

typedef std::map< std::pair< OUString, bool >, Storage *, ltstrbool > tdoc_ucp::StorageElementFactory::StorageMap
private

Definition at line 152 of file tdoc_storage.hxx.

Constructor & Destructor Documentation

StorageElementFactory::StorageElementFactory ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const rtl::Reference< OfficeDocumentsManager > &  xDocsMgr 
)

Definition at line 46 of file tdoc_storage.cxx.

References m_xContext.

StorageElementFactory::~StorageElementFactory ( )
overridevirtual

Definition at line 55 of file tdoc_storage.cxx.

References m_aMap.

Member Function Documentation

uno::Reference< io::XInputStream > StorageElementFactory::createInputStream ( const OUString &  rUri,
const OUString &  rPassword 
)
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::io::IOException
css::embed::StorageWrappedTargetException
css::packages::WrongPasswordException
css::uno::RuntimeException

Definition at line 229 of file tdoc_storage.cxx.

References m_aMutex, queryParentStorage(), queryStream(), tdoc_ucp::READ, and xStream.

uno::Reference< io::XOutputStream > StorageElementFactory::createOutputStream ( const OUString &  rUri,
const OUString &  rPassword,
bool  bTruncate 
)
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::io::IOException
css::embed::StorageWrappedTargetException
css::packages::WrongPasswordException
css::uno::RuntimeException

Definition at line 252 of file tdoc_storage.cxx.

References m_aMutex, m_xContext, queryParentStorage(), queryStream(), tdoc_ucp::READ_WRITE_CREATE, and xStream.

uno::Reference< embed::XStorage > StorageElementFactory::createStorage ( const OUString &  rUri,
StorageAccessMode  eMode 
)
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::io::IOException
css::embed::StorageWrappedTargetException
css::uno::RuntimeException

Definition at line 84 of file tdoc_storage.cxx.

References first(), tdoc_ucp::Uri::isDocument(), tdoc_ucp::Uri::isRoot(), m_aMap, m_aMutex, m_xContext, queryParentStorage(), queryStorage(), tdoc_ucp::READ, tdoc_ucp::READ_WRITE_CREATE, tdoc_ucp::READ_WRITE_NOCREATE, and Storage.

Referenced by queryParentStorage().

uno::Reference< io::XStream > StorageElementFactory::createStream ( const OUString &  rUri,
const OUString &  rPassword,
bool  bTruncate 
)
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::io::IOException
css::embed::StorageWrappedTargetException
css::packages::WrongPasswordException
css::uno::RuntimeException

Definition at line 291 of file tdoc_storage.cxx.

References m_aMutex, m_xContext, queryParentStorage(), queryStream(), tdoc_ucp::READ_WRITE_CREATE, tdoc_ucp::READ_WRITE_NOCREATE, and xStream.

uno::Reference< embed::XStorage > StorageElementFactory::createTemporaryStorage ( )
Exceptions
css::uno::Exception
css::uno::RuntimeException

Definition at line 63 of file tdoc_storage.cxx.

References m_xContext.

Referenced by queryStorage().

uno::Reference< embed::XStorage > StorageElementFactory::queryParentStorage ( const OUString &  rUri,
StorageAccessMode  eMode 
)
private
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::io::IOException
css::embed::StorageWrappedTargetException
css::uno::RuntimeException

Definition at line 336 of file tdoc_storage.cxx.

References createStorage(), tdoc_ucp::Uri::getParentUri(), and tdoc_ucp::READ_WRITE_CREATE.

Referenced by createInputStream(), createOutputStream(), createStorage(), and createStream().

uno::Reference< embed::XStorage > StorageElementFactory::queryStorage ( const css::uno::Reference< css::embed::XStorage > &  xParentStorage,
const OUString &  rUri,
StorageAccessMode  eMode 
)
private
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::io::IOException
css::embed::StorageWrappedTargetException
css::uno::RuntimeException

Definition at line 355 of file tdoc_storage.cxx.

References createTemporaryStorage(), cppu::getCaughtException(), tdoc_ucp::Uri::getDecodedName(), tdoc_ucp::Uri::getDocumentId(), m_xDocsMgr, tdoc_ucp::READ, tdoc_ucp::READ_WRITE_CREATE, and tdoc_ucp::READ_WRITE_NOCREATE.

Referenced by createStorage().

uno::Reference< io::XStream > StorageElementFactory::queryStream ( const css::uno::Reference< css::embed::XStorage > &  xParentStorage,
const OUString &  rUri,
const OUString &  rPassword,
StorageAccessMode  eMode,
bool  bTruncate 
)
private
Exceptions
css::embed::InvalidStorageException
css::lang::IllegalArgumentException
css::io::IOException
css::embed::StorageWrappedTargetException
css::packages::WrongPasswordException
css::uno::RuntimeException

Definition at line 491 of file tdoc_storage.cxx.

References tdoc_ucp::Uri::getDecodedName(), tdoc_ucp::Uri::isDocument(), tdoc_ucp::Uri::isRoot(), m_aMutex, tdoc_ucp::READ, tdoc_ucp::READ_WRITE_CREATE, tdoc_ucp::READ_WRITE_NOCREATE, and xStream.

Referenced by createInputStream(), createOutputStream(), and createStream().

void StorageElementFactory::releaseElement ( Storage const *  pElement)
private

Definition at line 324 of file tdoc_storage.cxx.

References tdoc_ucp::Storage::m_aContainerIt, m_aMap, and m_aMutex.

Friends And Related Function Documentation

friend class Storage
friend

Definition at line 97 of file tdoc_storage.hxx.

Referenced by createStorage().

Member Data Documentation

StorageMap tdoc_ucp::StorageElementFactory::m_aMap
private

Definition at line 154 of file tdoc_storage.hxx.

Referenced by createStorage(), releaseElement(), and ~StorageElementFactory().

osl::Mutex tdoc_ucp::StorageElementFactory::m_aMutex
private
css::uno::Reference< css::uno::XComponentContext > tdoc_ucp::StorageElementFactory::m_xContext
private
rtl::Reference< OfficeDocumentsManager > tdoc_ucp::StorageElementFactory::m_xDocsMgr
private

Definition at line 156 of file tdoc_storage.hxx.

Referenced by queryStorage().


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