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

#include <ModelImpl.hxx>

Inheritance diagram for dbaccess::ODatabaseModelImpl:
[legend]
Collaboration diagram for dbaccess::ODatabaseModelImpl:
[legend]

Classes

struct  ResetModelAccess
 

Public Types

enum class  ObjectType {
  Form = 0 ,
  Report = 1 ,
  Query = 2 ,
  Table = 3 ,
  LAST = Table
}
 
enum class  EmbeddedMacros {
  DocumentWide ,
  SubDocument ,
  NONE
}
 

Public Member Functions

void reset ()
 
bool isEmbeddedDatabase () const
 determines whether the database document has an embedded data storage More...
 
bool commitEmbeddedStorage (bool _bPreventRootCommits=false)
 stores the embedded storage ("database") More...
 
void commitStorages ()
 commits all sub storages More...
 
 ODatabaseModelImpl (const css::uno::Reference< css::uno::XComponentContext > &_rxContext, ODatabaseContext &_pDBContext)
 
virtual ~ODatabaseModelImpl ()
 
 ODatabaseModelImpl (OUString _sRegistrationName, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, ODatabaseContext &_rDBContext)
 
void disposing (const css::lang::EventObject &Source)
 
void setModified (bool bModified)
 
void dispose ()
 
const OUString & getURL () const
 
const OUString & getDocFileLocation () const
 
css::uno::Reference< css::embed::XStorage > getStorage (const ObjectType _eType)
 
const css::uno::Reference< css::util::XNumberFormatsSupplier > & getNumberFormatsSupplier ()
 
DocumentEventsDatagetDocumentEvents ()
 
const ::comphelper::NamedValueCollectiongetMediaDescriptor () const
 
void setResource (const OUString &_rURL, const css::uno::Sequence< css::beans::PropertyValue > &_rArgs)
 
void setDocFileLocation (const OUString &i_rLoadedFrom)
 
void disposeStorages ()
 
css::uno::Reference< css::lang::XSingleServiceFactory > createStorageFactory () const
 creates a ->css::embed::StorageFactory More...
 
void commitRootStorage ()
 commits our storage More...
 
bool commitStorageIfWriteable_ignoreErrors (const css::uno::Reference< css::embed::XStorage > &_rxStorage)
 commits a given storage if it's not readonly, ignoring (but asserting) all errors More...
 
void clearConnections ()
 
css::uno::Reference< css::embed::XStorage > const & getOrCreateRootStorage ()
 
css::uno::Reference< css::embed::XStorage > const & getRootStorage () const
 
void resetRootStorage ()
 
css::uno::Reference< css::sdbc::XDataSource > getOrCreateDataSource ()
 returns the data source. More...
 
css::uno::Reference< css::frame::XModel > getModel_noCreate () const
 returns the model, if there already exists one More...
 
css::uno::Reference< css::frame::XModel > createNewModel_deliverOwnership ()
 returns a new ->ODatabaseDocument More...
 
void modelIsDisposing (const bool _wasInitialized, ResetModelAccess)
 resets the model to NULL More...
 
bool hadInitializedDocument () const
 
DocumentStorageAccessgetDocumentStorageAccess ()
 
css::uno::Reference< css::document::XDocumentSubStorageSupplier > getDocumentSubStorageSupplier ()
 
void acquire ()
 
void release ()
 
TContentPtrgetObjectContainer (const ObjectType _eType)
 retrieves the requested container of objects (forms/reports/tables/queries) More...
 
EmbeddedMacros determineEmbeddedMacros ()
 determines which kind of embedded macros are present in the document More...
 
bool checkMacrosOnLoading ()
 checks our document's macro execution mode, using the interaction handler as supplied with our load arguments More...
 
bool adjustMacroMode_AutoReject ()
 adjusts our document's macro execution mode, without using any UI, assuming the user would reject execution of macros, if she would have been asked. More...
 
void resetMacroExecutionMode ()
 resets our macro execute mode, so next time the checkMacrosOnLoading is called, it will behave as if it has never been called before More...
 
css::uno::Reference< css::script::XStorageBasedLibraryContainer > getLibraryContainer (bool _bScript)
 ensures that ->m_xBasicLibraries resp. More...
 
void storeLibraryContainersTo (const css::uno::Reference< css::embed::XStorage > &_rxToRootStorage)
 lets our library containers store themself into the given root storage More...
 
css::uno::Reference< css::embed::XStorage > switchToStorage (const css::uno::Reference< css::embed::XStorage > &_rxNewRootStorage)
 rebases the document to the given storage More...
 
sal_Int16 getImposedMacroExecMode () const
 returns the macro mode imposed by an external instance, which passed it to attachResource More...
 
void setImposedMacroExecMode (const sal_Int16 _nMacroMode)
 
virtual sal_Int16 getCurrentMacroExecMode () const override
 
virtual void setCurrentMacroExecMode (sal_uInt16) override
 
virtual OUString getDocumentLocation () const override
 
virtual bool documentStorageHasMacros () const override
 
virtual bool macroCallsSeenWhileLoading () const override
 
virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts () const override
 
virtual SignatureState getScriptingSignatureState () override
 
virtual bool hasTrustedScriptingSignature (bool bAllowUIToAddAuthor) override
 
virtual void storageIsModified () override
 
void lockModify ()
 
void unlockModify ()
 
bool isModifyLocked () const
 
weld::WindowGetFrameWeld ()
 
virtual sal_Int16 getCurrentMacroExecMode () const=0
 
virtual void setCurrentMacroExecMode (sal_uInt16)=0
 
virtual OUString getDocumentLocation () const=0
 
virtual bool documentStorageHasMacros () const=0
 
virtual bool macroCallsSeenWhileLoading () const=0
 
virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts () const=0
 
virtual SignatureState getScriptingSignatureState ()=0
 
virtual bool hasTrustedScriptingSignature (bool bAllowUIToAddAuthor)=0
 
virtual void storageIsModified ()=0
 

Static Public Member Functions

::comphelper::NamedValueCollection stripLoadArguments (const ::comphelper::NamedValueCollection &_rArguments)
 
static const AsciiPropertyValuegetDefaultDataSourceSettings ()
 returns all known data source settings, including their default values More...
 
static OUString getObjectContainerStorageName (const ObjectType _eType)
 returns the name of the storage which is used to stored objects of the given type, if applicable More...
 
static bool objectHasMacros (const css::uno::Reference< css::embed::XStorage > &_rxContainerStorage, const OUString &_rPersistentName)
 determines whether a given object storage contains macros More...
 

Public Attributes

OWeakConnectionArray m_aConnections
 
const css::uno::Reference< css::uno::XComponentContext > m_aContext
 
css::uno::WeakReference< css::container::XNameAccess > m_xCommandDefinitions
 
css::uno::WeakReference< css::container::XNameAccess > m_xTableDefinitions
 
css::uno::Reference< css::util::XNumberFormatsSupplier > m_xNumberFormatsSupplier
 
OUString m_sConnectURL
 
OUString m_sName
 
OUString m_sUser
 
OUString m_aPassword
 
OUString m_sFailedPassword
 
css::uno::Sequence< css::beans::PropertyValue > m_aLayoutInformation
 
sal_Int32 m_nLoginTimeout
 
bool m_bReadOnly: 1
 
bool m_bPasswordRequired: 1
 
bool m_bSuppressVersionColumns: 1
 
bool m_bModified: 1
 
bool m_bDocumentReadOnly: 1
 
bool m_bMacroCallsSeenWhileLoading: 1
 
css::uno::Reference< css::beans::XPropertyBag > m_xSettings
 
css::uno::Sequence< OUString > m_aTableFilter
 
css::uno::Sequence< OUString > m_aTableTypeFilter
 
OSharedConnectionManagerm_pSharedConnectionManager
 
css::uno::Reference< css::lang::XEventListener > m_xSharedConnectionManager
 
css::uno::Reference< css::awt::XWindow > m_xDialogParent
 
sal_uInt16 m_nControllerLockCount
 

Private Member Functions

void impl_construct_nothrow ()
 
css::uno::Reference< css::embed::XStorage > const & impl_switchToStorage_throw (const css::uno::Reference< css::embed::XStorage > &_rxNewRootStorage)
 
void impl_switchToLogicalURL (const OUString &i_rDocumentURL)
 switches to the given document URL, which denotes the logical URL of the document, not necessarily the URL where the doc was loaded/recovered from More...
 

Private Attributes

css::uno::WeakReference< css::frame::XModel > m_xModel
 
css::uno::WeakReference< css::sdbc::XDataSource > m_xDataSource
 
rtl::Reference< DocumentStorageAccessm_pStorageAccess
 
o3tl::enumarray< ObjectType, TContentPtrm_aContainer
 
::sfx2::DocumentMacroMode m_aMacroMode
 
sal_Int16 m_nImposedMacroExecMode
 
css::uno::Reference< css::script::XStorageBasedLibraryContainer > m_xBasicLibraries
 
css::uno::Reference< css::script::XStorageBasedLibraryContainer > m_xDialogLibraries
 
SharedStorage m_xDocumentStorage
 
::rtl::Reference< ::sfx2::DocumentStorageModifyListenerm_pStorageModifyListener
 
ODatabaseContextm_rDBContext
 
DocumentEventsData m_aDocumentEvents
 
::comphelper::NamedValueCollection m_aMediaDescriptor
 
OUString m_sDocFileLocation
 the URL the document was loaded from More...
 
oslInterlockedCount m_refCount
 
::std::optional< EmbeddedMacrosm_aEmbeddedMacros
 do we have any object (forms/reports) which contains macros? More...
 
bool m_bModificationLock
 true if setting the Modified flag of the document is currently locked More...
 
bool m_bDocumentInitialized
 true if and only if a database document existed previously (though meanwhile disposed), and was already initialized More...
 
OUString m_sDocumentURL
 the URL which the document should report as its URL More...
 
SignatureState m_nScriptingSignatureState
 

Additional Inherited Members

- Protected Member Functions inherited from sfx2::IMacroDocumentAccess
 ~IMacroDocumentAccess ()
 
- Protected Member Functions inherited from sfx2::IModifiableDocument
 ~IModifiableDocument ()
 

Detailed Description

Definition at line 98 of file ModelImpl.hxx.

Member Enumeration Documentation

◆ EmbeddedMacros

Enumerator
DocumentWide 
SubDocument 
NONE 

Definition at line 112 of file ModelImpl.hxx.

◆ ObjectType

Enumerator
Form 
Report 
Query 
Table 
LAST 

Definition at line 103 of file ModelImpl.hxx.

Constructor & Destructor Documentation

◆ ODatabaseModelImpl() [1/2]

dbaccess::ODatabaseModelImpl::ODatabaseModelImpl ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
ODatabaseContext _pDBContext 
)

◆ ~ODatabaseModelImpl()

dbaccess::ODatabaseModelImpl::~ODatabaseModelImpl ( )
virtual

Definition at line 410 of file ModelImpl.cxx.

◆ ODatabaseModelImpl() [2/2]

dbaccess::ODatabaseModelImpl::ODatabaseModelImpl ( OUString  _sRegistrationName,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
ODatabaseContext _rDBContext 
)

Member Function Documentation

◆ acquire()

void dbaccess::ODatabaseModelImpl::acquire ( )

Definition at line 1003 of file ModelImpl.cxx.

References m_refCount.

Referenced by release().

◆ adjustMacroMode_AutoReject()

bool dbaccess::ODatabaseModelImpl::adjustMacroMode_AutoReject ( )

adjusts our document's macro execution mode, without using any UI, assuming the user would reject execution of macros, if she would have been asked.

If checkMacrosOnLoading has been called before (and thus the macro execution mode is already adjusted), then the current execution mode is simply returned.

Returns
whether or not macro execution is allowed

Definition at line 1119 of file ModelImpl.cxx.

References sfx2::DocumentMacroMode::adjustMacroMode(), and m_aMacroMode.

◆ checkMacrosOnLoading()

bool dbaccess::ODatabaseModelImpl::checkMacrosOnLoading ( )

checks our document's macro execution mode, using the interaction handler as supplied with our load arguments

Definition at line 1124 of file ModelImpl.cxx.

References sfx2::DocumentMacroMode::checkMacrosOnLoading(), comphelper::NamedValueCollection::getOrDefault(), m_aMacroMode, and m_aMediaDescriptor.

◆ clearConnections()

void dbaccess::ODatabaseModelImpl::clearConnections ( )

◆ commitEmbeddedStorage()

bool dbaccess::ODatabaseModelImpl::commitEmbeddedStorage ( bool  _bPreventRootCommits = false)

stores the embedded storage ("database")

Parameters
_bPreventRootCommitsNormally, committing the embedded storage results in also committing the root storage
  • this is an automatism for data safety reasons. If you pass <TRUE> here, committing the root storage is prevented for this particular call.
Returns
<TRUE> if the storage could be committed, otherwise <FALSE>

Definition at line 831 of file ModelImpl.cxx.

References dbaccess::DocumentStorageAccess::commitEmbeddedStorage(), and getDocumentStorageAccess().

Referenced by dispose().

◆ commitRootStorage()

void dbaccess::ODatabaseModelImpl::commitRootStorage ( )

◆ commitStorageIfWriteable_ignoreErrors()

bool dbaccess::ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors ( const css::uno::Reference< css::embed::XStorage > &  _rxStorage)

◆ commitStorages()

void dbaccess::ODatabaseModelImpl::commitStorages ( )

commits all sub storages

Definition at line 1022 of file ModelImpl.cxx.

References dbaccess::DocumentStorageAccess::commitStorages(), and getDocumentStorageAccess().

◆ createNewModel_deliverOwnership()

Reference< XModel > dbaccess::ODatabaseModelImpl::createNewModel_deliverOwnership ( )

◆ createStorageFactory()

Reference< XSingleServiceFactory > dbaccess::ODatabaseModelImpl::createStorageFactory ( ) const

creates a ->css::embed::StorageFactory

Definition at line 742 of file ModelImpl.cxx.

References m_aContext.

◆ determineEmbeddedMacros()

ODatabaseModelImpl::EmbeddedMacros dbaccess::ODatabaseModelImpl::determineEmbeddedMacros ( )

determines which kind of embedded macros are present in the document

Definition at line 1320 of file ModelImpl.cxx.

References DocumentWide, Form, getOrCreateRootStorage(), m_aEmbeddedMacros, NONE, Report, sfx2::DocumentMacroMode::storageHasMacros(), and SubDocument.

Referenced by documentStorageHasMacros().

◆ dispose()

void dbaccess::ODatabaseModelImpl::dispose ( void  )

◆ disposeStorages()

void dbaccess::ODatabaseModelImpl::disposeStorages ( )

◆ disposing()

void dbaccess::ODatabaseModelImpl::disposing ( const css::lang::EventObject &  Source)
Exceptions
css::uno::RuntimeException

Definition at line 574 of file ModelImpl.cxx.

References commitRootStorage(), i, m_aConnections, and Source.

◆ documentStorageHasMacros()

bool dbaccess::ODatabaseModelImpl::documentStorageHasMacros ( ) const
overridevirtual

Implements sfx2::IMacroDocumentAccess.

Definition at line 1342 of file ModelImpl.cxx.

References determineEmbeddedMacros(), m_aEmbeddedMacros, and NONE.

◆ getCurrentMacroExecMode()

sal_Int16 dbaccess::ODatabaseModelImpl::getCurrentMacroExecMode ( ) const
overridevirtual

◆ getDefaultDataSourceSettings()

const AsciiPropertyValue * dbaccess::ODatabaseModelImpl::getDefaultDataSourceSettings ( )
static

returns all known data source settings, including their default values

Definition at line 1033 of file ModelImpl.cxx.

References Any.

Referenced by dbaccess::ODatabaseSource::buildLowLevelConnection(), and impl_construct_nothrow().

◆ getDocFileLocation()

const OUString & dbaccess::ODatabaseModelImpl::getDocFileLocation ( ) const
inline

Definition at line 242 of file ModelImpl.hxx.

References m_sDocFileLocation.

Referenced by commitStorageIfWriteable_ignoreErrors().

◆ getDocumentEvents()

DocumentEventsData & dbaccess::ODatabaseModelImpl::getDocumentEvents ( )
inline

Definition at line 252 of file ModelImpl.hxx.

References m_aDocumentEvents.

◆ getDocumentLocation()

OUString dbaccess::ODatabaseModelImpl::getDocumentLocation ( ) const
overridevirtual

Implements sfx2::IMacroDocumentAccess.

Definition at line 1309 of file ModelImpl.cxx.

References getURL().

◆ getDocumentStorageAccess()

DocumentStorageAccess * dbaccess::ODatabaseModelImpl::getDocumentStorageAccess ( )

◆ getDocumentSubStorageSupplier()

Reference< XDocumentSubStorageSupplier > dbaccess::ODatabaseModelImpl::getDocumentSubStorageSupplier ( )

Definition at line 826 of file ModelImpl.cxx.

References getDocumentStorageAccess().

◆ getEmbeddedDocumentScripts()

Reference< XEmbeddedScripts > dbaccess::ODatabaseModelImpl::getEmbeddedDocumentScripts ( ) const
overridevirtual

Implements sfx2::IMacroDocumentAccess.

Definition at line 1353 of file ModelImpl.cxx.

References getModel_noCreate().

◆ GetFrameWeld()

weld::Window * dbaccess::ODatabaseModelImpl::GetFrameWeld ( )

◆ getImposedMacroExecMode()

sal_Int16 dbaccess::ODatabaseModelImpl::getImposedMacroExecMode ( ) const
inline

returns the macro mode imposed by an external instance, which passed it to attachResource

Definition at line 405 of file ModelImpl.hxx.

References m_nImposedMacroExecMode.

◆ getLibraryContainer()

Reference< XStorageBasedLibraryContainer > dbaccess::ODatabaseModelImpl::getLibraryContainer ( bool  _bScript)

ensures that ->m_xBasicLibraries resp.

m_xDialogLibraries exists

Returns
the requested library container. Is never <NULL>.
Exceptions
RuntimeExceptionif something does wrong, which indicates a server error in the installation

Definition at line 1136 of file ModelImpl.cxx.

References Exception, getModel_noCreate(), m_aContext, m_xBasicLibraries, and m_xDialogLibraries.

◆ getMediaDescriptor()

const ::comphelper::NamedValueCollection & dbaccess::ODatabaseModelImpl::getMediaDescriptor ( ) const
inline

Definition at line 255 of file ModelImpl.hxx.

References m_aMediaDescriptor.

◆ getModel_noCreate()

Reference< XModel > dbaccess::ODatabaseModelImpl::getModel_noCreate ( ) const

returns the model, if there already exists one

Definition at line 963 of file ModelImpl.cxx.

References m_xModel.

Referenced by getEmbeddedDocumentScripts(), GetFrameWeld(), and getLibraryContainer().

◆ getNumberFormatsSupplier()

const Reference< XNumberFormatsSupplier > & dbaccess::ODatabaseModelImpl::getNumberFormatsSupplier ( )

◆ getObjectContainer()

TContentPtr & dbaccess::ODatabaseModelImpl::getObjectContainer ( const ObjectType  _eType)

retrieves the requested container of objects (forms/reports/tables/queries)

Definition at line 1106 of file ModelImpl.cxx.

References m_aContainer.

◆ getObjectContainerStorageName()

OUString dbaccess::ODatabaseModelImpl::getObjectContainerStorageName ( const ObjectType  _eType)
static

returns the name of the storage which is used to stored objects of the given type, if applicable

Definition at line 1285 of file ModelImpl.cxx.

Referenced by dbaccess::ODocumentDefinition::getFastPropertyValue(), and getStorage().

◆ getOrCreateDataSource()

Reference< XDataSource > dbaccess::ODatabaseModelImpl::getOrCreateDataSource ( )

returns the data source.

If it doesn't exist it will be created

Definition at line 952 of file ModelImpl.cxx.

References m_xDataSource.

Referenced by dbaccess::ODatabaseContext::setTransientProperties(), and dbaccess::ODatabaseContext::storeTransientProperties().

◆ getOrCreateRootStorage()

Reference< XStorage > const & dbaccess::ODatabaseModelImpl::getOrCreateRootStorage ( )

◆ getRootStorage()

css::uno::Reference< css::embed::XStorage > const & dbaccess::ODatabaseModelImpl::getRootStorage ( ) const
inline

◆ getScriptingSignatureState()

SignatureState dbaccess::ODatabaseModelImpl::getScriptingSignatureState ( )
overridevirtual

Implements sfx2::IMacroDocumentAccess.

Definition at line 1358 of file ModelImpl.cxx.

References m_nScriptingSignatureState.

Referenced by commitStorageIfWriteable_ignoreErrors().

◆ getStorage()

Reference< XStorage > dbaccess::ODatabaseModelImpl::getStorage ( const ObjectType  _eType)

◆ getURL()

const OUString & dbaccess::ODatabaseModelImpl::getURL ( ) const
inline

◆ hadInitializedDocument()

bool dbaccess::ODatabaseModelImpl::hadInitializedDocument ( ) const
inline

Definition at line 317 of file ModelImpl.hxx.

References m_bDocumentInitialized.

◆ hasTrustedScriptingSignature()

bool dbaccess::ODatabaseModelImpl::hasTrustedScriptingSignature ( bool  bAllowUIToAddAuthor)
overridevirtual

◆ impl_construct_nothrow()

void dbaccess::ODatabaseModelImpl::impl_construct_nothrow ( )
private

◆ impl_switchToLogicalURL()

void dbaccess::ODatabaseModelImpl::impl_switchToLogicalURL ( const OUString &  i_rDocumentURL)
private

switches to the given document URL, which denotes the logical URL of the document, not necessarily the URL where the doc was loaded/recovered from

Definition at line 1252 of file ModelImpl.cxx.

References aURL, dbaccess::ODatabaseContext::databaseDocumentURLChange(), m_rDBContext, m_sDocFileLocation, m_sDocumentURL, m_sName, and dbaccess::ODatabaseContext::registerDatabaseDocument().

Referenced by setResource().

◆ impl_switchToStorage_throw()

Reference< XStorage > const & dbaccess::ODatabaseModelImpl::impl_switchToStorage_throw ( const css::uno::Reference< css::embed::XStorage > &  _rxNewRootStorage)
private

◆ isEmbeddedDatabase()

bool dbaccess::ODatabaseModelImpl::isEmbeddedDatabase ( ) const
inline

determines whether the database document has an embedded data storage

Definition at line 205 of file ModelImpl.hxx.

References m_sConnectURL.

◆ isModifyLocked()

bool dbaccess::ODatabaseModelImpl::isModifyLocked ( ) const
inline

Definition at line 431 of file ModelImpl.hxx.

References m_bModificationLock.

Referenced by setModified().

◆ lockModify()

void dbaccess::ODatabaseModelImpl::lockModify ( )
inline

Definition at line 429 of file ModelImpl.hxx.

References m_bModificationLock.

◆ macroCallsSeenWhileLoading()

bool dbaccess::ODatabaseModelImpl::macroCallsSeenWhileLoading ( ) const
overridevirtual

Implements sfx2::IMacroDocumentAccess.

Definition at line 1348 of file ModelImpl.cxx.

References m_bMacroCallsSeenWhileLoading.

◆ modelIsDisposing()

void dbaccess::ODatabaseModelImpl::modelIsDisposing ( const bool  _wasInitialized,
ResetModelAccess   
)

resets the model to NULL

Only to be called when the model is being disposed

Definition at line 813 of file ModelImpl.cxx.

References m_bDocumentInitialized, m_xBasicLibraries, m_xDialogLibraries, and m_xModel.

◆ objectHasMacros()

bool dbaccess::ODatabaseModelImpl::objectHasMacros ( const css::uno::Reference< css::embed::XStorage > &  _rxContainerStorage,
const OUString &  _rPersistentName 
)
static

determines whether a given object storage contains macros

Definition at line 539 of file ModelImpl.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and sfx2::DocumentMacroMode::storageHasMacros().

◆ release()

void dbaccess::ODatabaseModelImpl::release ( )

◆ reset()

void dbaccess::ODatabaseModelImpl::reset ( )

Definition at line 561 of file ModelImpl.cxx.

References i, m_aContainer, m_bReadOnly, and m_pStorageAccess.

◆ resetMacroExecutionMode()

void dbaccess::ODatabaseModelImpl::resetMacroExecutionMode ( )

resets our macro execute mode, so next time the checkMacrosOnLoading is called, it will behave as if it has never been called before

Definition at line 1131 of file ModelImpl.cxx.

References m_aMacroMode.

◆ resetRootStorage()

void dbaccess::ODatabaseModelImpl::resetRootStorage ( )
inline

Definition at line 289 of file ModelImpl.hxx.

References impl_switchToStorage_throw().

◆ setCurrentMacroExecMode()

void dbaccess::ODatabaseModelImpl::setCurrentMacroExecMode ( sal_uInt16  nMacroMode)
overridevirtual

◆ setDocFileLocation()

void dbaccess::ODatabaseModelImpl::setDocFileLocation ( const OUString &  i_rLoadedFrom)

Definition at line 696 of file ModelImpl.cxx.

References ENSURE_OR_THROW, and m_sDocFileLocation.

◆ setImposedMacroExecMode()

void dbaccess::ODatabaseModelImpl::setImposedMacroExecMode ( const sal_Int16  _nMacroMode)
inline

Definition at line 409 of file ModelImpl.hxx.

References m_nImposedMacroExecMode.

◆ setModified()

void dbaccess::ODatabaseModelImpl::setModified ( bool  bModified)

◆ setResource()

void dbaccess::ODatabaseModelImpl::setResource ( const OUString &  _rURL,
const css::uno::Sequence< css::beans::PropertyValue > &  _rArgs 
)

◆ storageIsModified()

void dbaccess::ODatabaseModelImpl::storageIsModified ( )
overridevirtual

Implements sfx2::IModifiableDocument.

Definition at line 1418 of file ModelImpl.cxx.

References setModified().

◆ storeLibraryContainersTo()

void dbaccess::ODatabaseModelImpl::storeLibraryContainersTo ( const css::uno::Reference< css::embed::XStorage > &  _rxToRootStorage)

lets our library containers store themself into the given root storage

Definition at line 1171 of file ModelImpl.cxx.

References m_xBasicLibraries, and m_xDialogLibraries.

◆ stripLoadArguments()

comphelper::NamedValueCollection dbaccess::ODatabaseModelImpl::stripLoadArguments ( const ::comphelper::NamedValueCollection _rArguments)
static

◆ switchToStorage()

Reference< XStorage > dbaccess::ODatabaseModelImpl::switchToStorage ( const css::uno::Reference< css::embed::XStorage > &  _rxNewRootStorage)

rebases the document to the given storage

No actual committing, copying, saving, whatsoever happens. The storage is just remembered as the documents new storage, nothing more.

Exceptions
css::lang::IllegalArgumentExceptionif the given storage is <NULL>
css::lang::RuntimeExceptionif any of the invoked operations does so

Definition at line 1180 of file ModelImpl.cxx.

References impl_switchToStorage_throw().

◆ unlockModify()

void dbaccess::ODatabaseModelImpl::unlockModify ( )
inline

Definition at line 430 of file ModelImpl.hxx.

References m_bModificationLock.

Member Data Documentation

◆ m_aConnections

OWeakConnectionArray dbaccess::ODatabaseModelImpl::m_aConnections

Definition at line 167 of file ModelImpl.hxx.

Referenced by clearConnections(), and disposing().

◆ m_aContainer

o3tl::enumarray< ObjectType, TContentPtr > dbaccess::ODatabaseModelImpl::m_aContainer
private

Definition at line 127 of file ModelImpl.hxx.

Referenced by dispose(), getObjectContainer(), and reset().

◆ m_aContext

const css::uno::Reference< css::uno::XComponentContext > dbaccess::ODatabaseModelImpl::m_aContext

◆ m_aDocumentEvents

DocumentEventsData dbaccess::ODatabaseModelImpl::m_aDocumentEvents
private

Definition at line 137 of file ModelImpl.hxx.

Referenced by getDocumentEvents().

◆ m_aEmbeddedMacros

::std::optional< EmbeddedMacros > dbaccess::ODatabaseModelImpl::m_aEmbeddedMacros
private

do we have any object (forms/reports) which contains macros?

Definition at line 146 of file ModelImpl.hxx.

Referenced by determineEmbeddedMacros(), and documentStorageHasMacros().

◆ m_aLayoutInformation

css::uno::Sequence< css::beans::PropertyValue> dbaccess::ODatabaseModelImpl::m_aLayoutInformation

Definition at line 182 of file ModelImpl.hxx.

◆ m_aMacroMode

::sfx2::DocumentMacroMode dbaccess::ODatabaseModelImpl::m_aMacroMode
private

◆ m_aMediaDescriptor

::comphelper::NamedValueCollection dbaccess::ODatabaseModelImpl::m_aMediaDescriptor
private

◆ m_aPassword

OUString dbaccess::ODatabaseModelImpl::m_aPassword

Definition at line 179 of file ModelImpl.hxx.

◆ m_aTableFilter

css::uno::Sequence< OUString > dbaccess::ODatabaseModelImpl::m_aTableFilter

Definition at line 192 of file ModelImpl.hxx.

◆ m_aTableTypeFilter

css::uno::Sequence< OUString > dbaccess::ODatabaseModelImpl::m_aTableTypeFilter

Definition at line 193 of file ModelImpl.hxx.

◆ m_bDocumentInitialized

bool dbaccess::ODatabaseModelImpl::m_bDocumentInitialized
private

true if and only if a database document existed previously (though meanwhile disposed), and was already initialized

Definition at line 152 of file ModelImpl.hxx.

Referenced by createNewModel_deliverOwnership(), hadInitializedDocument(), and modelIsDisposing().

◆ m_bDocumentReadOnly

bool dbaccess::ODatabaseModelImpl::m_bDocumentReadOnly

◆ m_bMacroCallsSeenWhileLoading

bool dbaccess::ODatabaseModelImpl::m_bMacroCallsSeenWhileLoading

Definition at line 189 of file ModelImpl.hxx.

Referenced by macroCallsSeenWhileLoading().

◆ m_bModificationLock

bool dbaccess::ODatabaseModelImpl::m_bModificationLock
private

true if setting the Modified flag of the document is currently locked

Definition at line 149 of file ModelImpl.hxx.

Referenced by isModifyLocked(), lockModify(), and unlockModify().

◆ m_bModified

bool dbaccess::ODatabaseModelImpl::m_bModified

Definition at line 187 of file ModelImpl.hxx.

Referenced by setModified().

◆ m_bPasswordRequired

bool dbaccess::ODatabaseModelImpl::m_bPasswordRequired

Definition at line 185 of file ModelImpl.hxx.

◆ m_bReadOnly

bool dbaccess::ODatabaseModelImpl::m_bReadOnly

Definition at line 184 of file ModelImpl.hxx.

Referenced by impl_switchToStorage_throw(), and reset().

◆ m_bSuppressVersionColumns

bool dbaccess::ODatabaseModelImpl::m_bSuppressVersionColumns

Definition at line 186 of file ModelImpl.hxx.

◆ m_nControllerLockCount

sal_uInt16 dbaccess::ODatabaseModelImpl::m_nControllerLockCount

Definition at line 199 of file ModelImpl.hxx.

◆ m_nImposedMacroExecMode

sal_Int16 dbaccess::ODatabaseModelImpl::m_nImposedMacroExecMode
private

Definition at line 129 of file ModelImpl.hxx.

Referenced by getImposedMacroExecMode(), and setImposedMacroExecMode().

◆ m_nLoginTimeout

sal_Int32 dbaccess::ODatabaseModelImpl::m_nLoginTimeout

Definition at line 183 of file ModelImpl.hxx.

◆ m_nScriptingSignatureState

SignatureState dbaccess::ODatabaseModelImpl::m_nScriptingSignatureState
private

Definition at line 164 of file ModelImpl.hxx.

Referenced by getScriptingSignatureState(), and hasTrustedScriptingSignature().

◆ m_pSharedConnectionManager

OSharedConnectionManager* dbaccess::ODatabaseModelImpl::m_pSharedConnectionManager

Definition at line 194 of file ModelImpl.hxx.

Referenced by clearConnections().

◆ m_pStorageAccess

rtl::Reference<DocumentStorageAccess> dbaccess::ODatabaseModelImpl::m_pStorageAccess
private

Definition at line 126 of file ModelImpl.hxx.

Referenced by dispose(), getDocumentStorageAccess(), and reset().

◆ m_pStorageModifyListener

::rtl::Reference< ::sfx2::DocumentStorageModifyListener > dbaccess::ODatabaseModelImpl::m_pStorageModifyListener
private

Definition at line 135 of file ModelImpl.hxx.

Referenced by impl_switchToStorage_throw().

◆ m_rDBContext

ODatabaseContext& dbaccess::ODatabaseModelImpl::m_rDBContext
private

Definition at line 136 of file ModelImpl.hxx.

Referenced by impl_construct_nothrow(), impl_switchToLogicalURL(), and release().

◆ m_refCount

oslInterlockedCount dbaccess::ODatabaseModelImpl::m_refCount
private

Definition at line 143 of file ModelImpl.hxx.

Referenced by acquire(), and release().

◆ m_sConnectURL

OUString dbaccess::ODatabaseModelImpl::m_sConnectURL

Definition at line 176 of file ModelImpl.hxx.

Referenced by isEmbeddedDatabase().

◆ m_sDocFileLocation

OUString dbaccess::ODatabaseModelImpl::m_sDocFileLocation
private

the URL the document was loaded from

Definition at line 141 of file ModelImpl.hxx.

Referenced by getDocFileLocation(), getOrCreateRootStorage(), hasTrustedScriptingSignature(), impl_switchToLogicalURL(), and setDocFileLocation().

◆ m_sDocumentURL

OUString dbaccess::ODatabaseModelImpl::m_sDocumentURL
private

the URL which the document should report as its URL

This might differ from ->m_sDocFileLocation in case the document was loaded as part of a crash recovery process. In this case, ->m_sDocFileLocation points to the temporary file where the DB had been saved to, after a crash. ->m_sDocumentURL then is the URL of the document which actually had been recovered.

Definition at line 162 of file ModelImpl.hxx.

Referenced by getURL(), impl_switchToLogicalURL(), and release().

◆ m_sFailedPassword

OUString dbaccess::ODatabaseModelImpl::m_sFailedPassword

◆ m_sName

OUString dbaccess::ODatabaseModelImpl::m_sName

◆ m_sUser

OUString dbaccess::ODatabaseModelImpl::m_sUser

Definition at line 178 of file ModelImpl.hxx.

◆ m_xBasicLibraries

css::uno::Reference< css::script::XStorageBasedLibraryContainer > dbaccess::ODatabaseModelImpl::m_xBasicLibraries
private

◆ m_xCommandDefinitions

css::uno::WeakReference< css::container::XNameAccess > dbaccess::ODatabaseModelImpl::m_xCommandDefinitions

Definition at line 171 of file ModelImpl.hxx.

◆ m_xDataSource

css::uno::WeakReference< css::sdbc::XDataSource > dbaccess::ODatabaseModelImpl::m_xDataSource
private

Definition at line 124 of file ModelImpl.hxx.

Referenced by dispose(), and getOrCreateDataSource().

◆ m_xDialogLibraries

css::uno::Reference< css::script::XStorageBasedLibraryContainer > dbaccess::ODatabaseModelImpl::m_xDialogLibraries
private

◆ m_xDialogParent

css::uno::Reference<css::awt::XWindow> dbaccess::ODatabaseModelImpl::m_xDialogParent

Definition at line 198 of file ModelImpl.hxx.

Referenced by GetFrameWeld().

◆ m_xDocumentStorage

SharedStorage dbaccess::ODatabaseModelImpl::m_xDocumentStorage
private

◆ m_xModel

css::uno::WeakReference< css::frame::XModel > dbaccess::ODatabaseModelImpl::m_xModel
private

◆ m_xNumberFormatsSupplier

css::uno::Reference< css::util::XNumberFormatsSupplier > dbaccess::ODatabaseModelImpl::m_xNumberFormatsSupplier

Definition at line 175 of file ModelImpl.hxx.

Referenced by dispose(), and getNumberFormatsSupplier().

◆ m_xSettings

css::uno::Reference< css::beans::XPropertyBag > dbaccess::ODatabaseModelImpl::m_xSettings

Definition at line 191 of file ModelImpl.hxx.

Referenced by impl_construct_nothrow().

◆ m_xSharedConnectionManager

css::uno::Reference< css::lang::XEventListener > dbaccess::ODatabaseModelImpl::m_xSharedConnectionManager

Definition at line 196 of file ModelImpl.hxx.

Referenced by clearConnections().

◆ m_xTableDefinitions

css::uno::WeakReference< css::container::XNameAccess > dbaccess::ODatabaseModelImpl::m_xTableDefinitions

Definition at line 172 of file ModelImpl.hxx.


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