LibreOffice Module dbaccess (master) 1
|
#include <ModelImpl.hxx>
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 () |
DocumentEventsData & | getDocumentEvents () |
const ::comphelper::NamedValueCollection & | getMediaDescriptor () 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 |
DocumentStorageAccess * | getDocumentStorageAccess () |
css::uno::Reference< css::document::XDocumentSubStorageSupplier > | getDocumentSubStorageSupplier () |
void | acquire () |
void | release () |
TContentPtr & | getObjectContainer (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::Window * | GetFrameWeld () |
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 AsciiPropertyValue * | getDefaultDataSourceSettings () |
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 |
OSharedConnectionManager * | m_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< DocumentStorageAccess > | m_pStorageAccess |
o3tl::enumarray< ObjectType, TContentPtr > | m_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::DocumentStorageModifyListener > | m_pStorageModifyListener |
ODatabaseContext & | m_rDBContext |
DocumentEventsData | m_aDocumentEvents |
::comphelper::NamedValueCollection | m_aMediaDescriptor |
OUString | m_sDocFileLocation |
the URL the document was loaded from More... | |
oslInterlockedCount | m_refCount |
::std::optional< EmbeddedMacros > | m_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 () | |
Definition at line 98 of file ModelImpl.hxx.
|
strong |
Enumerator | |
---|---|
DocumentWide | |
SubDocument | |
NONE |
Definition at line 112 of file ModelImpl.hxx.
|
strong |
Enumerator | |
---|---|
Form | |
Report | |
Query | |
Table | |
LAST |
Definition at line 103 of file ModelImpl.hxx.
dbaccess::ODatabaseModelImpl::ODatabaseModelImpl | ( | const css::uno::Reference< css::uno::XComponentContext > & | _rxContext, |
ODatabaseContext & | _pDBContext | ||
) |
|
virtual |
Definition at line 410 of file ModelImpl.cxx.
dbaccess::ODatabaseModelImpl::ODatabaseModelImpl | ( | OUString | _sRegistrationName, |
const css::uno::Reference< css::uno::XComponentContext > & | _rxContext, | ||
ODatabaseContext & | _rDBContext | ||
) |
void dbaccess::ODatabaseModelImpl::acquire | ( | ) |
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.
Definition at line 1119 of file ModelImpl.cxx.
References sfx2::DocumentMacroMode::adjustMacroMode(), and m_aMacroMode.
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.
void dbaccess::ODatabaseModelImpl::clearConnections | ( | ) |
Definition at line 605 of file ModelImpl.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, m_aConnections, m_pSharedConnectionManager, and m_xSharedConnectionManager.
Referenced by dispose().
bool dbaccess::ODatabaseModelImpl::commitEmbeddedStorage | ( | bool | _bPreventRootCommits = false | ) |
stores the embedded storage ("database")
_bPreventRootCommits | Normally, committing the embedded storage results in also committing the root storage
|
Definition at line 831 of file ModelImpl.cxx.
References dbaccess::DocumentStorageAccess::commitEmbeddedStorage(), and getDocumentStorageAccess().
Referenced by dispose().
void dbaccess::ODatabaseModelImpl::commitRootStorage | ( | ) |
commits our storage
Definition at line 747 of file ModelImpl.cxx.
References commitStorageIfWriteable_ignoreErrors(), getOrCreateRootStorage(), and SAL_WARN_IF.
Referenced by dbaccess::DocumentStorageAccess::commited(), dispose(), and disposing().
bool dbaccess::ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors | ( | const css::uno::Reference< css::embed::XStorage > & | _rxStorage | ) |
commits a given storage if it's not readonly, ignoring (but asserting) all errors
Definition at line 836 of file ModelImpl.cxx.
References aInfos, dbaccess::tools::stor::commitStorageIfWriteable(), DBG_UNHANDLED_EXCEPTION, utl::TempFileNamed::EnableKillingFile(), Exception, getDocFileLocation(), comphelper::OStorageHelper::GetODFVersionFromStorage(), comphelper::getProcessComponentContext(), getScriptingSignatureState(), DocumentSignatures::getSignatureState(), comphelper::OStorageHelper::GetStorageOfFormatFromURL(), utl::TempFileNamed::GetURL(), nState, SAL_WARN, TOOLS_WARN_EXCEPTION, and ZIP_STORAGE_FORMAT_STRING.
Referenced by commitRootStorage().
void dbaccess::ODatabaseModelImpl::commitStorages | ( | ) |
commits all sub storages
Definition at line 1022 of file ModelImpl.cxx.
References dbaccess::DocumentStorageAccess::commitStorages(), and getDocumentStorageAccess().
Reference< XModel > dbaccess::ODatabaseModelImpl::createNewModel_deliverOwnership | ( | ) |
returns a new ->ODatabaseDocument
@precond No ->ODatabaseDocument exists so far
@seealso getModel_noCreate
Definition at line 968 of file ModelImpl.cxx.
References Any, dbaccess::ODatabaseDocument::createDatabaseDocument(), DBG_UNHANDLED_EXCEPTION, Exception, comphelper::NamedValueCollection::getPropertyValues(), m_aContext, m_aMediaDescriptor, m_bDocumentInitialized, m_xModel, and xModel.
Reference< XSingleServiceFactory > dbaccess::ODatabaseModelImpl::createStorageFactory | ( | ) | const |
creates a ->css::embed::StorageFactory
Definition at line 742 of file ModelImpl.cxx.
References m_aContext.
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().
void dbaccess::ODatabaseModelImpl::dispose | ( | void | ) |
Definition at line 631 of file ModelImpl.cxx.
References clearConnections(), commitEmbeddedStorage(), commitRootStorage(), DBG_UNHANDLED_EXCEPTION, disposeStorages(), Exception, i, impl_switchToStorage_throw(), m_aContainer, m_pStorageAccess, m_xDataSource, m_xModel, m_xNumberFormatsSupplier, and xModel.
Referenced by release().
void dbaccess::ODatabaseModelImpl::disposeStorages | ( | ) |
Definition at line 737 of file ModelImpl.cxx.
References dbaccess::DocumentStorageAccess::disposeStorages(), and getDocumentStorageAccess().
Referenced by dispose().
void dbaccess::ODatabaseModelImpl::disposing | ( | const css::lang::EventObject & | Source | ) |
css::uno::RuntimeException |
Definition at line 574 of file ModelImpl.cxx.
References commitRootStorage(), i, m_aConnections, and Source.
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1342 of file ModelImpl.cxx.
References determineEmbeddedMacros(), m_aEmbeddedMacros, and NONE.
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1290 of file ModelImpl.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, comphelper::NamedValueCollection::getOrDefault(), and m_aMediaDescriptor.
|
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().
|
inline |
Definition at line 242 of file ModelImpl.hxx.
References m_sDocFileLocation.
Referenced by commitStorageIfWriteable_ignoreErrors().
|
inline |
Definition at line 252 of file ModelImpl.hxx.
References m_aDocumentEvents.
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1309 of file ModelImpl.cxx.
References getURL().
DocumentStorageAccess * dbaccess::ODatabaseModelImpl::getDocumentStorageAccess | ( | ) |
Definition at line 804 of file ModelImpl.cxx.
References m_pStorageAccess.
Referenced by commitEmbeddedStorage(), commitStorages(), disposeStorages(), getDocumentSubStorageSupplier(), and getStorage().
Reference< XDocumentSubStorageSupplier > dbaccess::ODatabaseModelImpl::getDocumentSubStorageSupplier | ( | ) |
Definition at line 826 of file ModelImpl.cxx.
References getDocumentStorageAccess().
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1353 of file ModelImpl.cxx.
References getModel_noCreate().
weld::Window * dbaccess::ODatabaseModelImpl::GetFrameWeld | ( | ) |
Definition at line 580 of file datasource.cxx.
References Application::GetFrameWeld(), getModel_noCreate(), m_xDialogParent, xController, xFrame, and xModel.
|
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.
Reference< XStorageBasedLibraryContainer > dbaccess::ODatabaseModelImpl::getLibraryContainer | ( | bool | _bScript | ) |
ensures that ->m_xBasicLibraries resp.
m_xDialogLibraries exists
RuntimeException | if 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.
|
inline |
Definition at line 255 of file ModelImpl.hxx.
References m_aMediaDescriptor.
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().
const Reference< XNumberFormatsSupplier > & dbaccess::ODatabaseModelImpl::getNumberFormatsSupplier | ( | ) |
Definition at line 684 of file ModelImpl.cxx.
References LanguageTag::convertToLocale(), utl::ConfigManager::getWorkLocale(), Locale, m_aContext, and m_xNumberFormatsSupplier.
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.
|
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().
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().
Reference< XStorage > const & dbaccess::ODatabaseModelImpl::getOrCreateRootStorage | ( | ) |
Definition at line 755 of file ModelImpl.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, Exception, comphelper::NamedValueCollection::get(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::getTyped(), impl_switchToStorage_throw(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::is(), m_aContext, m_aMediaDescriptor, m_bDocumentReadOnly, m_sDocFileLocation, and m_xDocumentStorage.
Referenced by commitRootStorage(), determineEmbeddedMacros(), hasTrustedScriptingSignature(), and dbaccess::DocumentStorageAccess::impl_openSubStorage_nothrow().
|
inline |
Definition at line 288 of file ModelImpl.hxx.
References utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::getTyped(), and m_xDocumentStorage.
Referenced by dbaccess::DocumentStorageAccess::getDocumentSubStoragesNames().
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1358 of file ModelImpl.cxx.
References m_nScriptingSignatureState.
Referenced by commitStorageIfWriteable_ignoreErrors().
Reference< XStorage > dbaccess::ODatabaseModelImpl::getStorage | ( | const ObjectType | _eType | ) |
Definition at line 1027 of file ModelImpl.cxx.
References getDocumentStorageAccess(), dbaccess::DocumentStorageAccess::getDocumentSubStorage(), and getObjectContainerStorageName().
|
inline |
Definition at line 241 of file ModelImpl.hxx.
References m_sDocumentURL.
Referenced by getDocumentLocation(), dbaccess::ODatabaseContext::registerDatabaseDocument(), dbaccess::ODatabaseContext::revokeDatabaseDocument(), and dbaccess::ODatabaseContext::storeTransientProperties().
|
inline |
Definition at line 317 of file ModelImpl.hxx.
References m_bDocumentInitialized.
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1363 of file ModelImpl.cxx.
References SfxMedium::CallApproveHandler(), comphelper::OStorageHelper::GetODFVersionFromStorage(), getOrCreateRootStorage(), comphelper::NamedValueCollection::getOrDefault(), comphelper::getProcessComponentContext(), DocumentSignatures::getSignatureState(), comphelper::OStorageHelper::GetStorageOfFormatFromURL(), m_aMediaDescriptor, m_nScriptingSignatureState, m_sDocFileLocation, and ZIP_STORAGE_FORMAT_STRING.
|
private |
Definition at line 414 of file ModelImpl.cxx.
References Any, dbaccess::ODatabaseContext::appendAtTerminateListener(), dbaccess::AsciiPropertyValue::AsciiName, DBG_UNHANDLED_EXCEPTION, dbaccess::AsciiPropertyValue::DefaultValue, Exception, cppu::UnoType< typename T >::get(), getDefaultDataSourceSettings(), m_aContext, m_rDBContext, m_xSettings, Property, and dbaccess::AsciiPropertyValue::ValueType.
|
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().
|
private |
Definition at line 1231 of file ModelImpl.cxx.
References Application::GetSolarMutex(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::getTyped(), m_bReadOnly, m_pStorageModifyListener, m_xBasicLibraries, m_xDialogLibraries, m_xDocumentStorage, utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::reset(), dbaccess::tools::stor::storageIsWritable_nothrow(), and utl::SharedUNOComponent< css::embed::XStorage >::TakeOwnership.
Referenced by dispose(), getOrCreateRootStorage(), resetRootStorage(), and switchToStorage().
|
inline |
determines whether the database document has an embedded data storage
Definition at line 205 of file ModelImpl.hxx.
References m_sConnectURL.
|
inline |
Definition at line 431 of file ModelImpl.hxx.
References m_bModificationLock.
Referenced by setModified().
|
inline |
Definition at line 429 of file ModelImpl.hxx.
References m_bModificationLock.
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1348 of file ModelImpl.cxx.
References m_bMacroCallsSeenWhileLoading.
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.
|
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().
void dbaccess::ODatabaseModelImpl::release | ( | ) |
Definition at line 1008 of file ModelImpl.cxx.
References acquire(), dispose(), m_rDBContext, m_refCount, m_sDocumentURL, dbaccess::ODatabaseContext::removeFromTerminateListener(), dbaccess::ODatabaseContext::revokeDatabaseDocument(), and dbaccess::ODatabaseContext::storeTransientProperties().
void dbaccess::ODatabaseModelImpl::reset | ( | ) |
Definition at line 561 of file ModelImpl.cxx.
References i, m_aContainer, m_bReadOnly, and m_pStorageAccess.
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.
|
inline |
Definition at line 289 of file ModelImpl.hxx.
References impl_switchToStorage_throw().
|
overridevirtual |
Implements sfx2::IMacroDocumentAccess.
Definition at line 1304 of file ModelImpl.cxx.
References m_aMediaDescriptor, and comphelper::NamedValueCollection::put().
void dbaccess::ODatabaseModelImpl::setDocFileLocation | ( | const OUString & | i_rLoadedFrom | ) |
Definition at line 696 of file ModelImpl.cxx.
References ENSURE_OR_THROW, and m_sDocFileLocation.
|
inline |
Definition at line 409 of file ModelImpl.hxx.
References m_nImposedMacroExecMode.
void dbaccess::ODatabaseModelImpl::setModified | ( | bool | bModified | ) |
Definition at line 933 of file ModelImpl.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, isModifyLocked(), m_bModified, and m_xModel.
Referenced by dbaccess::DocumentStorageAccess::commited(), and storageIsModified().
void dbaccess::ODatabaseModelImpl::setResource | ( | const OUString & | _rURL, |
const css::uno::Sequence< css::beans::PropertyValue > & | _rArgs | ||
) |
Definition at line 702 of file ModelImpl.cxx.
References ENSURE_OR_THROW, comphelper::NamedValueCollection::getOrDefault(), comphelper::NamedValueCollection::has(), impl_switchToLogicalURL(), m_aMediaDescriptor, sSalvagedFile, and stripLoadArguments().
|
overridevirtual |
Implements sfx2::IModifiableDocument.
Definition at line 1418 of file ModelImpl.cxx.
References setModified().
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.
|
static |
Definition at line 726 of file ModelImpl.cxx.
References comphelper::NamedValueCollection::remove().
Referenced by dbaccess::ODatabaseDocument::impl_import_nolck_throw(), and setResource().
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.
css::lang::IllegalArgumentException | if the given storage is <NULL> |
css::lang::RuntimeException | if any of the invoked operations does so |
Definition at line 1180 of file ModelImpl.cxx.
References impl_switchToStorage_throw().
|
inline |
Definition at line 430 of file ModelImpl.hxx.
References m_bModificationLock.
OWeakConnectionArray dbaccess::ODatabaseModelImpl::m_aConnections |
Definition at line 167 of file ModelImpl.hxx.
Referenced by clearConnections(), and disposing().
|
private |
Definition at line 127 of file ModelImpl.hxx.
Referenced by dispose(), getObjectContainer(), and reset().
const css::uno::Reference< css::uno::XComponentContext > dbaccess::ODatabaseModelImpl::m_aContext |
Definition at line 168 of file ModelImpl.hxx.
Referenced by createNewModel_deliverOwnership(), createStorageFactory(), getLibraryContainer(), getNumberFormatsSupplier(), getOrCreateRootStorage(), and impl_construct_nothrow().
|
private |
Definition at line 137 of file ModelImpl.hxx.
Referenced by getDocumentEvents().
|
private |
do we have any object (forms/reports) which contains macros?
Definition at line 146 of file ModelImpl.hxx.
Referenced by determineEmbeddedMacros(), and documentStorageHasMacros().
css::uno::Sequence< css::beans::PropertyValue> dbaccess::ODatabaseModelImpl::m_aLayoutInformation |
Definition at line 182 of file ModelImpl.hxx.
|
private |
Definition at line 128 of file ModelImpl.hxx.
Referenced by adjustMacroMode_AutoReject(), checkMacrosOnLoading(), and resetMacroExecutionMode().
|
private |
Definition at line 139 of file ModelImpl.hxx.
Referenced by checkMacrosOnLoading(), createNewModel_deliverOwnership(), getCurrentMacroExecMode(), getMediaDescriptor(), getOrCreateRootStorage(), hasTrustedScriptingSignature(), setCurrentMacroExecMode(), and setResource().
OUString dbaccess::ODatabaseModelImpl::m_aPassword |
Definition at line 179 of file ModelImpl.hxx.
css::uno::Sequence< OUString > dbaccess::ODatabaseModelImpl::m_aTableFilter |
Definition at line 192 of file ModelImpl.hxx.
css::uno::Sequence< OUString > dbaccess::ODatabaseModelImpl::m_aTableTypeFilter |
Definition at line 193 of file ModelImpl.hxx.
|
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().
bool dbaccess::ODatabaseModelImpl::m_bDocumentReadOnly |
Definition at line 188 of file ModelImpl.hxx.
Referenced by getOrCreateRootStorage(), and dbaccess::DocumentStorageAccess::impl_openSubStorage_nothrow().
bool dbaccess::ODatabaseModelImpl::m_bMacroCallsSeenWhileLoading |
Definition at line 189 of file ModelImpl.hxx.
Referenced by macroCallsSeenWhileLoading().
|
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().
bool dbaccess::ODatabaseModelImpl::m_bModified |
Definition at line 187 of file ModelImpl.hxx.
Referenced by setModified().
bool dbaccess::ODatabaseModelImpl::m_bPasswordRequired |
Definition at line 185 of file ModelImpl.hxx.
bool dbaccess::ODatabaseModelImpl::m_bReadOnly |
Definition at line 184 of file ModelImpl.hxx.
Referenced by impl_switchToStorage_throw(), and reset().
bool dbaccess::ODatabaseModelImpl::m_bSuppressVersionColumns |
Definition at line 186 of file ModelImpl.hxx.
sal_uInt16 dbaccess::ODatabaseModelImpl::m_nControllerLockCount |
Definition at line 199 of file ModelImpl.hxx.
|
private |
Definition at line 129 of file ModelImpl.hxx.
Referenced by getImposedMacroExecMode(), and setImposedMacroExecMode().
sal_Int32 dbaccess::ODatabaseModelImpl::m_nLoginTimeout |
Definition at line 183 of file ModelImpl.hxx.
|
private |
Definition at line 164 of file ModelImpl.hxx.
Referenced by getScriptingSignatureState(), and hasTrustedScriptingSignature().
OSharedConnectionManager* dbaccess::ODatabaseModelImpl::m_pSharedConnectionManager |
Definition at line 194 of file ModelImpl.hxx.
Referenced by clearConnections().
|
private |
Definition at line 126 of file ModelImpl.hxx.
Referenced by dispose(), getDocumentStorageAccess(), and reset().
|
private |
Definition at line 135 of file ModelImpl.hxx.
Referenced by impl_switchToStorage_throw().
|
private |
Definition at line 136 of file ModelImpl.hxx.
Referenced by impl_construct_nothrow(), impl_switchToLogicalURL(), and release().
|
private |
Definition at line 143 of file ModelImpl.hxx.
OUString dbaccess::ODatabaseModelImpl::m_sConnectURL |
Definition at line 176 of file ModelImpl.hxx.
Referenced by isEmbeddedDatabase().
|
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().
|
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().
OUString dbaccess::ODatabaseModelImpl::m_sFailedPassword |
Definition at line 180 of file ModelImpl.hxx.
Referenced by dbaccess::ODatabaseContext::setTransientProperties(), and dbaccess::ODatabaseContext::storeTransientProperties().
OUString dbaccess::ODatabaseModelImpl::m_sName |
Definition at line 177 of file ModelImpl.hxx.
Referenced by impl_switchToLogicalURL(), and dbaccess::ODatabaseContext::storeTransientProperties().
OUString dbaccess::ODatabaseModelImpl::m_sUser |
Definition at line 178 of file ModelImpl.hxx.
|
private |
Definition at line 131 of file ModelImpl.hxx.
Referenced by getLibraryContainer(), impl_switchToStorage_throw(), modelIsDisposing(), and storeLibraryContainersTo().
css::uno::WeakReference< css::container::XNameAccess > dbaccess::ODatabaseModelImpl::m_xCommandDefinitions |
Definition at line 171 of file ModelImpl.hxx.
|
private |
Definition at line 124 of file ModelImpl.hxx.
Referenced by dispose(), and getOrCreateDataSource().
|
private |
Definition at line 132 of file ModelImpl.hxx.
Referenced by getLibraryContainer(), impl_switchToStorage_throw(), modelIsDisposing(), and storeLibraryContainersTo().
css::uno::Reference<css::awt::XWindow> dbaccess::ODatabaseModelImpl::m_xDialogParent |
Definition at line 198 of file ModelImpl.hxx.
Referenced by GetFrameWeld().
|
private |
Definition at line 134 of file ModelImpl.hxx.
Referenced by getOrCreateRootStorage(), getRootStorage(), and impl_switchToStorage_throw().
|
private |
Definition at line 123 of file ModelImpl.hxx.
Referenced by createNewModel_deliverOwnership(), dispose(), getModel_noCreate(), modelIsDisposing(), and setModified().
css::uno::Reference< css::util::XNumberFormatsSupplier > dbaccess::ODatabaseModelImpl::m_xNumberFormatsSupplier |
Definition at line 175 of file ModelImpl.hxx.
Referenced by dispose(), and getNumberFormatsSupplier().
css::uno::Reference< css::beans::XPropertyBag > dbaccess::ODatabaseModelImpl::m_xSettings |
Definition at line 191 of file ModelImpl.hxx.
Referenced by impl_construct_nothrow().
css::uno::Reference< css::lang::XEventListener > dbaccess::ODatabaseModelImpl::m_xSharedConnectionManager |
Definition at line 196 of file ModelImpl.hxx.
Referenced by clearConnections().
css::uno::WeakReference< css::container::XNameAccess > dbaccess::ODatabaseModelImpl::m_xTableDefinitions |
Definition at line 172 of file ModelImpl.hxx.