LibreOffice Module comphelper (master) 1
Static Public Member Functions | List of all members
comphelper::OStorageHelper Class Reference

#include <storagehelper.hxx>

Static Public Member Functions

static css::uno::Reference< css::lang::XSingleServiceFactory > GetStorageFactory (const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 
static css::uno::Reference< css::lang::XSingleServiceFactory > GetFileSystemStorageFactory (const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage (const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 
static css::uno::Reference< css::embed::XStorage > GetStorageFromURL (const OUString &aURL, sal_Int32 nStorageMode, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 this one will only return Storage More...
 
static css::uno::Reference< css::embed::XStorage > GetStorageFromURL2 (const OUString &aURL, sal_Int32 nStorageMode, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 this one will return either Storage or FileSystemStorage More...
 
static css::uno::Reference< css::embed::XStorage > GetStorageFromInputStream (const css::uno::Reference< css::io::XInputStream > &xStream, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 
static css::uno::Reference< css::embed::XStorage > GetStorageFromStream (const css::uno::Reference< css::io::XStream > &xStream, sal_Int32 nStorageMode=css::embed::ElementModes::READWRITE, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 
static void CopyInputToOutput (const css::uno::Reference< css::io::XInputStream > &xInput, const css::uno::Reference< css::io::XOutputStream > &xOutput)
 
static css::uno::Reference< css::io::XInputStream > GetInputStreamFromURL (const OUString &aURL, const css::uno::Reference< css::uno::XComponentContext > &context)
 
static void SetCommonStorageEncryptionData (const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Sequence< css::beans::NamedValue > &aEncryptionData)
 
static sal_Int32 GetXStorageFormat (const css::uno::Reference< css::embed::XStorage > &xStorage)
 
static css::uno::Reference< css::embed::XStorage > GetStorageOfFormatFromURL (const OUString &aFormat, const OUString &aURL, sal_Int32 nStorageMode, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
 
static css::uno::Reference< css::embed::XStorage > GetStorageOfFormatFromInputStream (const OUString &aFormat, const css::uno::Reference< css::io::XInputStream > &xStream, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >(), bool bRepairStorage=false)
 
static css::uno::Reference< css::embed::XStorage > GetStorageOfFormatFromStream (const OUString &aFormat, const css::uno::Reference< css::io::XStream > &xStream, sal_Int32 nStorageMode=css::embed::ElementModes::READWRITE, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >(), bool bRepairStorage=false)
 
static css::uno::Sequence< css::beans::NamedValue > CreatePackageEncryptionData (std::u16string_view aPassword)
 
static css::uno::Sequence< css::beans::NamedValue > CreateGpgPackageEncryptionData ()
 
static bool IsValidZipEntryFileName (std::u16string_view aName, bool bSlashAllowed)
 
static bool PathHasSegment (std::u16string_view aPath, std::u16string_view aSegment)
 
static css::uno::Reference< css::embed::XStorage > GetStorageAtPath (const css::uno::Reference< css::embed::XStorage > &xStorage, std::u16string_view aPath, sal_uInt32 nOpenMode, LifecycleProxy const &rNastiness)
 
static css::uno::Reference< css::io::XStream > GetStreamAtPath (const css::uno::Reference< css::embed::XStorage > &xStorage, std::u16string_view aPath, sal_uInt32 nOpenMode, LifecycleProxy const &rNastiness)
 
static css::uno::Reference< css::io::XStream > GetStreamAtPackageURL (const css::uno::Reference< css::embed::XStorage > &xStorage, const OUString &rURL, sal_uInt32 const nOpenMode, LifecycleProxy const &rNastiness)
 
static OUString GetODFVersionFromStorage (const css::uno::Reference< css::embed::XStorage > &xStorage)
 

Detailed Description

Definition at line 68 of file storagehelper.hxx.

Member Function Documentation

◆ CopyInputToOutput()

void comphelper::OStorageHelper::CopyInputToOutput ( const css::uno::Reference< css::io::XInputStream > &  xInput,
const css::uno::Reference< css::io::XOutputStream > &  xOutput 
)
static
Exceptions
css::uno::Exception

Definition at line 173 of file storagehelper.cxx.

References comphelper::nConstBufferSize.

Referenced by comphelper::EmbeddedObjectContainer::InsertGraphicStream().

◆ CreateGpgPackageEncryptionData()

uno::Sequence< beans::NamedValue > comphelper::OStorageHelper::CreateGpgPackageEncryptionData ( )
static

◆ CreatePackageEncryptionData()

uno::Sequence< beans::NamedValue > comphelper::OStorageHelper::CreatePackageEncryptionData ( std::u16string_view  aPassword)
static

◆ GetFileSystemStorageFactory()

uno::Reference< lang::XSingleServiceFactory > comphelper::OStorageHelper::GetFileSystemStorageFactory ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >())
static
Exceptions
css::uno::Exception

Definition at line 85 of file storagehelper.cxx.

Referenced by GetStorageFromURL2().

◆ GetInputStreamFromURL()

uno::Reference< io::XInputStream > comphelper::OStorageHelper::GetInputStreamFromURL ( const OUString &  aURL,
const css::uno::Reference< css::uno::XComponentContext > &  context 
)
static
Exceptions
css::uno::Exception

Definition at line 208 of file storagehelper.cxx.

References aURL.

◆ GetODFVersionFromStorage()

OUString comphelper::OStorageHelper::GetODFVersionFromStorage ( const css::uno::Reference< css::embed::XStorage > &  xStorage)
static

Definition at line 677 of file storagehelper.cxx.

◆ GetStorageAtPath()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageAtPath ( const css::uno::Reference< css::embed::XStorage > &  xStorage,
std::u16string_view  aPath,
sal_uInt32  nOpenMode,
LifecycleProxy const &  rNastiness 
)
static

Definition at line 638 of file storagehelper.cxx.

References comphelper::LookupStorageAtPath(), and splitPath().

◆ GetStorageFactory()

uno::Reference< lang::XSingleServiceFactory > comphelper::OStorageHelper::GetStorageFactory ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >())
static

◆ GetStorageFromInputStream()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageFromInputStream ( const css::uno::Reference< css::io::XInputStream > &  xStream,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >() 
)
static
Exceptions
css::uno::Exception

Definition at line 150 of file storagehelper.cxx.

References GetStorageFactory(), and xStream.

◆ GetStorageFromStream()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageFromStream ( const css::uno::Reference< css::io::XStream > &  xStream,
sal_Int32  nStorageMode = css::embed::ElementModes::READWRITE,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >() 
)
static
Exceptions
css::uno::Exception

Definition at line 161 of file storagehelper.cxx.

References GetStorageFactory(), and xStream.

◆ GetStorageFromURL()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageFromURL ( const OUString &  aURL,
sal_Int32  nStorageMode,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >() 
)
static

this one will only return Storage

Exceptions
css::uno::Exception

Definition at line 101 of file storagehelper.cxx.

References aURL, and GetStorageFactory().

◆ GetStorageFromURL2()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageFromURL2 ( const OUString &  aURL,
sal_Int32  nStorageMode,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >() 
)
static

this one will return either Storage or FileSystemStorage

Exceptions
css::uno::Exception

Definition at line 113 of file storagehelper.cxx.

References aURL, cppu::getCaughtException(), GetFileSystemStorageFactory(), comphelper::getProcessComponentContext(), GetStorageFactory(), and ucbhelper::Content::isDocument().

◆ GetStorageOfFormatFromInputStream()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageOfFormatFromInputStream ( const OUString &  aFormat,
const css::uno::Reference< css::io::XInputStream > &  xStream,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >(),
bool  bRepairStorage = false 
)
static
Exceptions
css::uno::Exception

Definition at line 321 of file storagehelper.cxx.

References GetStorageFactory(), and xStream.

◆ GetStorageOfFormatFromStream()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageOfFormatFromStream ( const OUString &  aFormat,
const css::uno::Reference< css::io::XStream > &  xStream,
sal_Int32  nStorageMode = css::embed::ElementModes::READWRITE,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >(),
bool  bRepairStorage = false 
)
static
Exceptions
css::uno::Exception

Definition at line 344 of file storagehelper.cxx.

References GetStorageFactory(), and xStream.

◆ GetStorageOfFormatFromURL()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetStorageOfFormatFromURL ( const OUString &  aFormat,
const OUString &  aURL,
sal_Int32  nStorageMode,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >() 
)
static
Exceptions
css::uno::Exception

Definition at line 305 of file storagehelper.cxx.

References aURL, GetStorageFactory(), and comphelper::makePropertyValue().

◆ GetStreamAtPackageURL()

uno::Reference< io::XStream > comphelper::OStorageHelper::GetStreamAtPackageURL ( const css::uno::Reference< css::embed::XStorage > &  xStorage,
const OUString &  rURL,
sal_uInt32 const  nOpenMode,
LifecycleProxy const &  rNastiness 
)
static

Definition at line 664 of file storagehelper.cxx.

◆ GetStreamAtPath()

uno::Reference< io::XStream > comphelper::OStorageHelper::GetStreamAtPath ( const css::uno::Reference< css::embed::XStorage > &  xStorage,
std::u16string_view  aPath,
sal_uInt32  nOpenMode,
LifecycleProxy const &  rNastiness 
)
static

Definition at line 648 of file storagehelper.cxx.

References aName, comphelper::LookupStorageAtPath(), and splitPath().

◆ GetTemporaryStorage()

uno::Reference< embed::XStorage > comphelper::OStorageHelper::GetTemporaryStorage ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext = css::uno::Reference< css::uno::XComponentContext >())
static
Exceptions
css::uno::Exception

Definition at line 92 of file storagehelper.cxx.

References createInstance(), and GetStorageFactory().

Referenced by comphelper::EmbeddedObjectContainer::EmbeddedObjectContainer().

◆ GetXStorageFormat()

sal_Int32 comphelper::OStorageHelper::GetXStorageFormat ( const css::uno::Reference< css::embed::XStorage > &  xStorage)
static

◆ IsValidZipEntryFileName()

bool comphelper::OStorageHelper::IsValidZipEntryFileName ( std::u16string_view  aName,
bool  bSlashAllowed 
)
static

Definition at line 545 of file storagehelper.cxx.

References aName, and i.

◆ PathHasSegment()

bool comphelper::OStorageHelper::PathHasSegment ( std::u16string_view  aPath,
std::u16string_view  aSegment 
)
static

Definition at line 572 of file storagehelper.cxx.

References o3tl::starts_with().

◆ SetCommonStorageEncryptionData()

void comphelper::OStorageHelper::SetCommonStorageEncryptionData ( const css::uno::Reference< css::embed::XStorage > &  xStorage,
const css::uno::Sequence< css::beans::NamedValue > &  aEncryptionData 
)
static
Exceptions
css::uno::Exception

Definition at line 220 of file storagehelper.cxx.

References Value.


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