LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Attributes | List of all members
dbaccess::DatabaseDocumentRecovery Class Reference

#include <dbdocrecovery.hxx>

Public Member Functions

 DatabaseDocumentRecovery (const css::uno::Reference< css::uno::XComponentContext > &i_rContext)
 
 ~DatabaseDocumentRecovery ()
 
void saveModifiedSubComponents (const css::uno::Reference< css::embed::XStorage > &i_rTargetStorage, const std::vector< css::uno::Reference< css::frame::XController > > &i_rControllers)
 saves the modified sub components of the given controller(s) to the "recovery" sub storage of the document storage. More...
 
void recoverSubDocuments (const css::uno::Reference< css::embed::XStorage > &i_rDocumentStorage, const css::uno::Reference< css::frame::XController > &i_rTargetController)
 recovery sub components from the given document storage, if applicable More...
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxContext
 

Detailed Description

Definition at line 32 of file dbdocrecovery.hxx.

Constructor & Destructor Documentation

◆ DatabaseDocumentRecovery()

dbaccess::DatabaseDocumentRecovery::DatabaseDocumentRecovery ( const css::uno::Reference< css::uno::XComponentContext > &  i_rContext)

Definition at line 199 of file dbdocrecovery.cxx.

References mxContext.

◆ ~DatabaseDocumentRecovery()

dbaccess::DatabaseDocumentRecovery::~DatabaseDocumentRecovery ( )

Definition at line 204 of file dbdocrecovery.cxx.

Member Function Documentation

◆ recoverSubDocuments()

void dbaccess::DatabaseDocumentRecovery::recoverSubDocuments ( const css::uno::Reference< css::embed::XStorage > &  i_rDocumentStorage,
const css::uno::Reference< css::frame::XController > &  i_rTargetController 
)

recovery sub components from the given document storage, if applicable

If the given document storage does not contain a recovery folder, the method silently returns.

Exceptions
css::uno::Exceptionin case of an error.

Definition at line 254 of file dbdocrecovery.cxx.

References DBG_UNHANDLED_EXCEPTION, ENSURE_OR_THROW, Exception, dbaccess::FORM, dbaccess::SubComponentRecovery::getComponentsStorageName(), mxContext, dbaccess::QUERY, dbaccess::SubComponentRecovery::recoverFromStorage(), dbaccess::RELATION_DESIGN, dbaccess::REPORT, SAL_WARN, and dbaccess::TABLE.

Referenced by dbaccess::ODatabaseDocument::setCurrentController().

◆ saveModifiedSubComponents()

void dbaccess::DatabaseDocumentRecovery::saveModifiedSubComponents ( const css::uno::Reference< css::embed::XStorage > &  i_rTargetStorage,
const std::vector< css::uno::Reference< css::frame::XController > > &  i_rControllers 
)

saves the modified sub components of the given controller(s) to the "recovery" sub storage of the document storage.

Exceptions
css::uno::Exceptionin case of an error.

Definition at line 208 of file dbdocrecovery.cxx.

References dbaccess::tools::stor::commitStorageIfWriteable(), ENSURE_OR_THROW, dbaccess::SubComponentRecovery::getComponentsStorageName(), mxContext, and dbaccess::SubComponentRecovery::saveToRecoveryStorage().

Referenced by dbaccess::ODatabaseDocument::storeToRecoveryFile().

Member Data Documentation

◆ mxContext

css::uno::Reference<css::uno::XComponentContext> dbaccess::DatabaseDocumentRecovery::mxContext
private

Definition at line 64 of file dbdocrecovery.hxx.

Referenced by recoverSubDocuments(), and saveModifiedSubComponents().


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