LibreOffice Module package (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ZipPackage Class Referencefinal

#include <ZipPackage.hxx>

Inheritance diagram for ZipPackage:
[legend]
Collaboration diagram for ZipPackage:
[legend]

Public Member Functions

 ZipPackage (css::uno::Reference< css::uno::XComponentContext > xContext)
 
virtual ~ZipPackage () override
 
ZipFilegetZipFile ()
 
sal_Int32 getFormat () const
 
sal_Int32 GetStartKeyGenID () const
 
sal_Int32 GetEncAlgID () const
 
sal_Int32 GetChecksumAlgID () const
 
sal_Int32 GetDefaultDerivedKeySize () const
 
rtl::Reference< comphelper::RefCountedMutex > & GetSharedMutexRef ()
 
void ConnectTo (const css::uno::Reference< css::io::XInputStream > &xInStream)
 
css::uno::Sequence< sal_Int8GetEncryptionKey ()
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override
 
virtual css::uno::Any SAL_CALL getByHierarchicalName (const OUString &aName) override
 
virtual sal_Bool SAL_CALL hasByHierarchicalName (const OUString &aName) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance () override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments (const css::uno::Sequence< css::uno::Any > &aArguments) override
 
virtual void SAL_CALL commitChanges () override
 
virtual sal_Bool SAL_CALL hasPendingChanges () override
 
virtual css::uno::Sequence< css::util::ElementChange > SAL_CALL getPendingChanges () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &aPropertyName, const css::uno::Any &aValue) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &PropertyName) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Private Member Functions

bool isLocalFile () const
 
void parseManifest ()
 
void parseContentType ()
 
void getZipFileContents ()
 
void WriteMimetypeMagicFile (ZipOutputStream &aZipOut)
 
void WriteManifest (ZipOutputStream &aZipOut, const ::std::vector< css::uno::Sequence< css::beans::PropertyValue > > &aManList)
 
void WriteContentTypes (ZipOutputStream &aZipOut, const ::std::vector< css::uno::Sequence< css::beans::PropertyValue > > &aManList)
 
css::uno::Reference< css::io::XInputStream > writeTempFile ()
 
css::uno::Reference< css::io::XActiveDataStreamer > openOriginalForOutput ()
 
void DisconnectFromTargetAndThrowException_Impl (const css::uno::Reference< css::io::XInputStream > &xTempStream)
 

Private Attributes

rtl::Reference< comphelper::RefCountedMutexm_aMutexHolder
 
css::uno::Sequence< css::beans::NamedValue > m_aStorageEncryptionKeys
 
css::uno::Sequence< sal_Int8m_aEncryptionKey
 
css::uno::Sequence< css::uno::Sequence< css::beans::NamedValue > > m_aGpgProps
 
FolderHash m_aRecent
 
OUString m_aURL
 
sal_Int32 m_nStartKeyGenerationID
 
sal_Int32 m_nChecksumDigestID
 
sal_Int32 m_nCommonEncryptionID
 
bool m_bHasEncryptedEntries
 
bool m_bHasNonEncryptedEntries
 
bool m_bInconsistent
 
bool m_bForceRecovery
 
bool m_bMediaTypeFallbackUsed
 
sal_Int32 m_nFormat
 
bool m_bAllowRemoveOnInsert
 
InitialisationMode m_eMode
 
rtl::Reference< ZipPackageFolderm_xRootFolder
 
css::uno::Reference< css::io::XStream > m_xStream
 
css::uno::Reference< css::io::XInputStream > m_xContentStream
 
css::uno::Reference< css::io::XSeekable > m_xContentSeek
 
const css::uno::Reference< css::uno::XComponentContext > m_xContext
 
std::optional< ZipFilem_pZipFile
 
bool m_bDisableFileSync = false
 

Detailed Description

Definition at line 60 of file ZipPackage.hxx.

Constructor & Destructor Documentation

◆ ZipPackage()

ZipPackage::ZipPackage ( css::uno::Reference< css::uno::XComponentContext >  xContext)

◆ ~ZipPackage()

ZipPackage::~ZipPackage ( )
overridevirtual

Definition at line 156 of file ZipPackage.cxx.

Member Function Documentation

◆ addPropertyChangeListener()

void SAL_CALL ZipPackage::addPropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 1806 of file ZipPackage.cxx.

◆ addVetoableChangeListener()

void SAL_CALL ZipPackage::addVetoableChangeListener ( const OUString &  PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  aListener 
)
overridevirtual

Definition at line 1812 of file ZipPackage.cxx.

◆ commitChanges()

void SAL_CALL ZipPackage::commitChanges ( )
overridevirtual

◆ ConnectTo()

void ZipPackage::ConnectTo ( const css::uno::Reference< css::io::XInputStream > &  xInStream)

Definition at line 1125 of file ZipPackage.cxx.

References m_aMutexHolder, m_pZipFile, m_xContentSeek, m_xContentStream, and m_xContext.

Referenced by commitChanges(), and writeTempFile().

◆ createInstance()

uno::Reference< XInterface > SAL_CALL ZipPackage::createInstance ( )
overridevirtual

Definition at line 982 of file ZipPackage.cxx.

References m_bAllowRemoveOnInsert, m_nFormat, and m_xContext.

◆ createInstanceWithArguments()

uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments ( const css::uno::Sequence< css::uno::Any > &  aArguments)
overridevirtual

Definition at line 988 of file ZipPackage.cxx.

References aArguments, m_bAllowRemoveOnInsert, m_nFormat, and m_xContext.

◆ DisconnectFromTargetAndThrowException_Impl()

void ZipPackage::DisconnectFromTargetAndThrowException_Impl ( const css::uno::Reference< css::io::XInputStream > &  xTempStream)
private

Definition at line 1588 of file ZipPackage.cxx.

References Any, e_IMode_XInputStream, e_IMode_XStream, m_eMode, m_xStream, and THROW_WHERE.

Referenced by commitChanges().

◆ getByHierarchicalName()

Any SAL_CALL ZipPackage::getByHierarchicalName ( const OUString &  aName)
overridevirtual

◆ GetChecksumAlgID()

sal_Int32 ZipPackage::GetChecksumAlgID ( ) const
inline

Definition at line 126 of file ZipPackage.hxx.

References m_nChecksumDigestID.

Referenced by ZipPackageStream::GetEncryptionData().

◆ GetDefaultDerivedKeySize()

sal_Int32 ZipPackage::GetDefaultDerivedKeySize ( ) const
inline

Definition at line 127 of file ZipPackage.hxx.

References m_nCommonEncryptionID.

Referenced by ZipPackageStream::GetEncryptionData().

◆ GetEncAlgID()

sal_Int32 ZipPackage::GetEncAlgID ( ) const
inline

Definition at line 125 of file ZipPackage.hxx.

References m_nCommonEncryptionID.

Referenced by ZipPackageStream::GetEncryptionAlgorithm().

◆ GetEncryptionKey()

uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey ( )

◆ getFormat()

sal_Int32 ZipPackage::getFormat ( ) const
inline

Definition at line 122 of file ZipPackage.hxx.

References m_nFormat.

Referenced by ZipPackageStream::setPropertyValue().

◆ getImplementationName()

OUString ZipPackage::getImplementationName ( )
overridevirtual

Definition at line 1650 of file ZipPackage.cxx.

◆ getPendingChanges()

Sequence< ElementChange > SAL_CALL ZipPackage::getPendingChanges ( )
overridevirtual

Definition at line 1644 of file ZipPackage.cxx.

◆ getPropertySetInfo()

uno::Reference< XPropertySetInfo > SAL_CALL ZipPackage::getPropertySetInfo ( )
overridevirtual

Definition at line 1665 of file ZipPackage.cxx.

◆ getPropertyValue()

Any SAL_CALL ZipPackage::getPropertyValue ( const OUString &  PropertyName)
overridevirtual

◆ GetSharedMutexRef()

rtl::Reference< comphelper::RefCountedMutex > & ZipPackage::GetSharedMutexRef ( )
inline

◆ GetStartKeyGenID()

sal_Int32 ZipPackage::GetStartKeyGenID ( ) const
inline

◆ getSupportedServiceNames()

Sequence< OUString > ZipPackage::getSupportedServiceNames ( )
overridevirtual

Definition at line 1655 of file ZipPackage.cxx.

◆ getZipFile()

ZipFile & ZipPackage::getZipFile ( )
inline

◆ getZipFileContents()

void ZipPackage::getZipFileContents ( )
private

◆ hasByHierarchicalName()

sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName ( const OUString &  aName)
overridevirtual

◆ hasPendingChanges()

sal_Bool SAL_CALL ZipPackage::hasPendingChanges ( )
overridevirtual

Definition at line 1640 of file ZipPackage.cxx.

◆ initialize()

void SAL_CALL ZipPackage::initialize ( const css::uno::Sequence< css::uno::Any > &  aArguments)
overridevirtual

◆ isLocalFile()

bool ZipPackage::isLocalFile ( ) const
private

Definition at line 160 of file ZipPackage.cxx.

References comphelper::isFileUrl(), and m_aURL.

Referenced by commitChanges(), and writeTempFile().

◆ openOriginalForOutput()

uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput ( )
private

◆ parseContentType()

void ZipPackage::parseContentType ( )
private

◆ parseManifest()

void ZipPackage::parseManifest ( )
private

◆ removePropertyChangeListener()

void SAL_CALL ZipPackage::removePropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  aListener 
)
overridevirtual

Definition at line 1809 of file ZipPackage.cxx.

◆ removeVetoableChangeListener()

void SAL_CALL ZipPackage::removeVetoableChangeListener ( const OUString &  PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  aListener 
)
overridevirtual

Definition at line 1815 of file ZipPackage.cxx.

◆ setPropertyValue()

void SAL_CALL ZipPackage::setPropertyValue ( const OUString &  aPropertyName,
const css::uno::Any &  aValue 
)
overridevirtual

◆ supportsService()

sal_Bool SAL_CALL ZipPackage::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 1660 of file ZipPackage.cxx.

References cppu::supportsService().

◆ WriteContentTypes()

void ZipPackage::WriteContentTypes ( ZipOutputStream aZipOut,
const ::std::vector< css::uno::Sequence< css::beans::PropertyValue > > &  aManList 
)
private

◆ WriteManifest()

void ZipPackage::WriteManifest ( ZipOutputStream aZipOut,
const ::std::vector< css::uno::Sequence< css::beans::PropertyValue > > &  aManList 
)
private

◆ WriteMimetypeMagicFile()

void ZipPackage::WriteMimetypeMagicFile ( ZipOutputStream aZipOut)
private

◆ writeTempFile()

uno::Reference< io::XInputStream > ZipPackage::writeTempFile ( )
private

Member Data Documentation

◆ m_aEncryptionKey

css::uno::Sequence< sal_Int8 > ZipPackage::m_aEncryptionKey
private

Definition at line 73 of file ZipPackage.hxx.

Referenced by GetEncryptionKey(), getPropertyValue(), and setPropertyValue().

◆ m_aGpgProps

css::uno::Sequence< css::uno::Sequence< css::beans::NamedValue > > ZipPackage::m_aGpgProps
private

Definition at line 74 of file ZipPackage.hxx.

Referenced by getPropertyValue(), parseManifest(), setPropertyValue(), and writeTempFile().

◆ m_aMutexHolder

rtl::Reference<comphelper::RefCountedMutex> ZipPackage::m_aMutexHolder
private

Definition at line 70 of file ZipPackage.hxx.

Referenced by commitChanges(), ConnectTo(), GetSharedMutexRef(), and initialize().

◆ m_aRecent

FolderHash ZipPackage::m_aRecent
private

Definition at line 76 of file ZipPackage.hxx.

Referenced by getByHierarchicalName(), getZipFileContents(), and hasByHierarchicalName().

◆ m_aStorageEncryptionKeys

css::uno::Sequence< css::beans::NamedValue > ZipPackage::m_aStorageEncryptionKeys
private

Definition at line 72 of file ZipPackage.hxx.

Referenced by GetEncryptionKey(), getPropertyValue(), and setPropertyValue().

◆ m_aURL

OUString ZipPackage::m_aURL
private

Definition at line 77 of file ZipPackage.hxx.

Referenced by commitChanges(), initialize(), isLocalFile(), and openOriginalForOutput().

◆ m_bAllowRemoveOnInsert

bool ZipPackage::m_bAllowRemoveOnInsert
private

◆ m_bDisableFileSync

bool ZipPackage::m_bDisableFileSync = false
private

Definition at line 101 of file ZipPackage.hxx.

Referenced by initialize(), and writeTempFile().

◆ m_bForceRecovery

bool ZipPackage::m_bForceRecovery
private

Definition at line 86 of file ZipPackage.hxx.

Referenced by getZipFileContents(), initialize(), parseContentType(), and parseManifest().

◆ m_bHasEncryptedEntries

bool ZipPackage::m_bHasEncryptedEntries
private

Definition at line 82 of file ZipPackage.hxx.

Referenced by getPropertyValue(), and parseManifest().

◆ m_bHasNonEncryptedEntries

bool ZipPackage::m_bHasNonEncryptedEntries
private

Definition at line 83 of file ZipPackage.hxx.

Referenced by getPropertyValue(), and parseManifest().

◆ m_bInconsistent

bool ZipPackage::m_bInconsistent
private

Definition at line 85 of file ZipPackage.hxx.

Referenced by getPropertyValue(), and parseManifest().

◆ m_bMediaTypeFallbackUsed

bool ZipPackage::m_bMediaTypeFallbackUsed
private

Definition at line 88 of file ZipPackage.hxx.

Referenced by commitChanges(), getPropertyValue(), and parseManifest().

◆ m_eMode

InitialisationMode ZipPackage::m_eMode
private

◆ m_nChecksumDigestID

sal_Int32 ZipPackage::m_nChecksumDigestID
private

Definition at line 80 of file ZipPackage.hxx.

Referenced by GetChecksumAlgID(), getPropertyValue(), parseManifest(), and setPropertyValue().

◆ m_nCommonEncryptionID

sal_Int32 ZipPackage::m_nCommonEncryptionID
private

◆ m_nFormat

sal_Int32 ZipPackage::m_nFormat
private

◆ m_nStartKeyGenerationID

sal_Int32 ZipPackage::m_nStartKeyGenerationID
private

◆ m_pZipFile

std::optional<ZipFile> ZipPackage::m_pZipFile
private

◆ m_xContentSeek

css::uno::Reference< css::io::XSeekable > ZipPackage::m_xContentSeek
private

Definition at line 97 of file ZipPackage.hxx.

Referenced by ConnectTo(), and initialize().

◆ m_xContentStream

css::uno::Reference< css::io::XInputStream > ZipPackage::m_xContentStream
private

Definition at line 96 of file ZipPackage.hxx.

Referenced by ConnectTo(), and initialize().

◆ m_xContext

const css::uno::Reference< css::uno::XComponentContext > ZipPackage::m_xContext
private

◆ m_xRootFolder

rtl::Reference< ZipPackageFolder > ZipPackage::m_xRootFolder
private

◆ m_xStream

css::uno::Reference< css::io::XStream > ZipPackage::m_xStream
private

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