24#include <config_features.h>
30#include <com/sun/star/lang/XServiceInfo.hpp>
31#include <com/sun/star/sdb/XDatabaseContext.hpp>
32#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
33#include <com/sun/star/uno/XAggregation.hpp>
35#if HAVE_FEATURE_SCRIPTING
46 class XMultiServiceFactory;
47 class IllegalArgumentException;
53class DatabaseDocumentLoader;
55typedef ::cppu::WeakComponentImplHelper< css::lang::XServiceInfo
56 , css::sdb::XDatabaseContext
67 css::uno::Reference< css::uno::XInterface >
loadObjectFromURL(
const OUString& _rName,
const OUString& _sURL);
68 css::uno::Reference< css::uno::XInterface >
getObject(
const OUString& _rURL );
78 css::uno::Reference< css::uno::XInterface >
81#if HAVE_FEATURE_SCRIPTING
86 css::uno::Reference< css::uno::XComponentContext >
89 css::uno::Reference< css::uno::XAggregation >
91 css::uno::Reference< css::sdb::XDatabaseRegistrations >
97 typedef std::map< OUString, css::uno::Sequence< css::beans::PropertyValue > >
PropertyCache;
109 explicit ODatabaseContext(
const css::uno::Reference< css::uno::XComponentContext >& );
113 virtual void SAL_CALL
disposing()
override;
116 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
createInstance( )
override;
117 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
createInstanceWithArguments(
const css::uno::Sequence< css::uno::Any >& _rArguments )
override;
129 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
createEnumeration( )
override;
132 virtual css::uno::Any SAL_CALL
getByName(
const OUString& aName )
override;
133 virtual css::uno::Sequence< OUString > SAL_CALL
getElementNames( )
override;
137 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
getRegisteredObject(
const OUString& Name )
override;
138 virtual void SAL_CALL
registerObject(
const OUString& Name,
const css::uno::Reference< css::uno::XInterface >& Object )
override;
139 virtual void SAL_CALL
revokeObject(
const OUString& Name )
override;
147 virtual void SAL_CALL
changeDatabaseLocation(
const OUString& Name,
const OUString& NewLocation )
override;
153 virtual void SAL_CALL
addContainerListener(
const css::uno::Reference< css::container::XContainerListener >& xListener )
override;
154 virtual void SAL_CALL
removeContainerListener(
const css::uno::Reference< css::container::XContainerListener >& xListener )
override;
166 const css::uno::Reference< css::frame::XModel >& _rxForDocument,
virtual void SAL_CALL changeDatabaseLocation(const OUString &Name, const OUString &NewLocation) override
virtual void SAL_CALL registerObject(const OUString &Name, const css::uno::Reference< css::uno::XInterface > &Object) override
ODatabaseContext(const css::uno::Reference< css::uno::XComponentContext > &)
virtual void SAL_CALL removeDatabaseRegistrationsListener(const css::uno::Reference< css::sdb::XDatabaseRegistrationsListener > &Listener) override
css::uno::Reference< css::uno::XComponentContext > m_aContext
void removeFromTerminateListener(const ODatabaseModelImpl &_rDataSourceModel)
virtual css::uno::Sequence< OUString > SAL_CALL getRegistrationNames() override
css::uno::Reference< css::uno::XAggregation > m_xDBRegistrationAggregate
virtual OUString SAL_CALL getDatabaseLocation(const OUString &Name) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getRegisteredObject(const OUString &Name) override
void databaseDocumentURLChange(const OUString &_sOldName, const OUString &_sNewName)
virtual sal_Bool SAL_CALL isDatabaseRegistrationReadOnly(const OUString &Name) override
virtual void onBasicManagerCreated(const css::uno::Reference< css::frame::XModel > &_rxForDocument, BasicManager &_rBasicManager) override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
std::map< OUString, css::uno::Sequence< css::beans::PropertyValue > > PropertyCache
PropertyCache m_aDatasourceProperties
virtual void SAL_CALL addDatabaseRegistrationsListener(const css::uno::Reference< css::sdb::XDatabaseRegistrationsListener > &Listener) override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
std::map< OUString, ODatabaseModelImpl * > ObjectCache
void setTransientProperties(const OUString &_sURL, ODatabaseModelImpl &_rDataSourceModel)
sets all properties which were transient at the data source.
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL hasElements() override
void storeTransientProperties(ODatabaseModelImpl &_rModelImpl)
void registerDatabaseDocument(ODatabaseModelImpl &_rModelImpl)
virtual void SAL_CALL revokeObject(const OUString &Name) override
void revokeDatabaseDocument(const ODatabaseModelImpl &_rModelImpl)
virtual sal_Bool SAL_CALL hasRegisteredDatabase(const OUString &Name) override
css::uno::Reference< css::uno::XInterface > loadObjectFromURL(const OUString &_rName, const OUString &_sURL)
loads the given object from the given URL
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual ~ODatabaseContext() override
void appendAtTerminateListener(const ODatabaseModelImpl &_rDataSourceModel)
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance() override
virtual void SAL_CALL revokeDatabaseLocation(const OUString &Name) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL registerDatabaseLocation(const OUString &Name, const OUString &Location) override
ObjectCache m_aDatabaseObjects
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual css::uno::Type SAL_CALL getElementType() override
css::uno::Reference< css::sdb::XDatabaseRegistrations > m_xDatabaseRegistrations
css::uno::Reference< css::uno::XInterface > getObject(const OUString &_rURL)
rtl::Reference< DatabaseDocumentLoader > m_xDatabaseDocumentLoader
css::uno::Reference< css::uno::XInterface > impl_createNewDataSource()
creates a new data source
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const css::uno::Sequence< css::uno::Any > &_rArguments) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
::cppu::WeakComponentImplHelper< css::lang::XServiceInfo, css::sdb::XDatabaseContext > DatabaseAccessContext_Base