summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx45
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.hxx18
-rw-r--r--dbaccess/source/core/inc/services.hxx1
-rw-r--r--dbaccess/source/core/misc/services.cxx1
-rw-r--r--dbaccess/util/dba.component3
5 files changed, 18 insertions, 50 deletions
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 2b1913df6fe8..b6f02305b83c 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -20,34 +20,22 @@
#include "ComponentDefinition.hxx"
#include "apitools.hxx"
#include "dbastrings.hrc"
-#include "module_dba.hxx"
-#include "services.hxx"
#include <boost/noncopyable.hpp>
#include <tools/debug.hxx>
#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/property.hxx>
#include "definitioncolumn.hxx"
-#include <cppuhelper/implbase.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
-
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
-using namespace ::osl;
-using namespace ::comphelper;
using namespace ::cppu;
-extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition()
-{
- static ::dba::OAutoRegistration< ::dbaccess::OComponentDefinition > aAutoRegistration;
-}
-
namespace dbaccess
{
@@ -159,33 +147,14 @@ css::uno::Sequence<sal_Int8> OComponentDefinition::getImplementationId()
IMPLEMENT_GETTYPES3(OComponentDefinition,ODataSettings,OContentHelper,OComponentDefinition_BASE);
IMPLEMENT_FORWARD_XINTERFACE3( OComponentDefinition,OContentHelper,ODataSettings,OComponentDefinition_BASE)
-OUString OComponentDefinition::getImplementationName_static( ) throw(RuntimeException)
+OUString SAL_CALL OComponentDefinition::getImplementationName() throw(RuntimeException, std::exception)
{
return OUString("com.sun.star.comp.dba.OComponentDefinition");
}
-OUString SAL_CALL OComponentDefinition::getImplementationName( ) throw(RuntimeException, std::exception)
+Sequence< OUString > SAL_CALL OComponentDefinition::getSupportedServiceNames() throw(RuntimeException, std::exception)
{
- return getImplementationName_static();
-}
-
-Sequence< OUString > OComponentDefinition::getSupportedServiceNames_static( ) throw(RuntimeException)
-{
- Sequence< OUString > aServices(2);
- aServices[0] = "com.sun.star.sdb.TableDefinition";
- aServices[1] = "com.sun.star.ucb.Content";
-
- return aServices;
-}
-
-Sequence< OUString > SAL_CALL OComponentDefinition::getSupportedServiceNames( ) throw(RuntimeException, std::exception)
-{
- return getSupportedServiceNames_static();
-}
-
-Reference< XInterface > OComponentDefinition::Create( const Reference< XComponentContext >& _rxContext )
-{
- return *(new OComponentDefinition( _rxContext, nullptr, TContentPtr( new OComponentDefinition_Impl ) ) );
+ return { "com.sun.star.sdb.TableDefinition", "com.sun.star.ucb.Content" };
}
void SAL_CALL OComponentDefinition::disposing()
@@ -300,4 +269,12 @@ void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxS
} // namespace dbaccess
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
+com_sun_star_comp_dba_OComponentDefinition(css::uno::XComponentContext* context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new dbaccess::OComponentDefinition(
+ context, nullptr, dbaccess::TContentPtr(new dbaccess::OComponentDefinition_Impl)));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
index 01e829b0484d..98563510ddc2 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
@@ -85,8 +85,6 @@ class OComponentDefinition :public OContentHelper
,public OComponentDefinition_BASE
,public ::comphelper::OPropertyArrayUsageHelper< OComponentDefinition >
{
- OComponentDefinition();
-
protected:
css::uno::Reference< OColumns > m_xColumns;
rtl::Reference<OColumnPropertyListener> m_xColumnPropertyListener;
@@ -95,15 +93,14 @@ protected:
virtual ~OComponentDefinition();
virtual void SAL_CALL disposing() override;
-protected:
- OComponentDefinition(const css::uno::Reference< css::uno::XComponentContext >&
- ,const css::uno::Reference< css::uno::XInterface >& _xParentContainer
- ,const TContentPtr& _pImpl
- ,bool _bTable = true);
-
const OComponentDefinition_Impl& getDefinition() const { return dynamic_cast< const OComponentDefinition_Impl& >( *m_pImpl.get() ); }
OComponentDefinition_Impl& getDefinition() { return dynamic_cast< OComponentDefinition_Impl& >( *m_pImpl.get() ); }
public:
+ OComponentDefinition(
+ const css::uno::Reference< css::uno::XComponentContext >&,
+ const css::uno::Reference< css::uno::XInterface >& _xParentContainer,
+ const TContentPtr& _pImpl,
+ bool _bTable = true);
OComponentDefinition(
const css::uno::Reference< css::uno::XInterface >& _rxContainer
@@ -125,11 +122,6 @@ public:
virtual OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) override;
- static css::uno::Sequence< OUString > getSupportedServiceNames_static() throw( css::uno::RuntimeException );
- static OUString getImplementationName_static() throw( css::uno::RuntimeException );
- static css::uno::Reference< css::uno::XInterface > SAL_CALL
- Create(const css::uno::Reference< css::uno::XComponentContext >&);
-
// XInitialization
virtual void SAL_CALL initialize( css::uno::Sequence< css::uno::Any > const & rArguments) throw (css::uno::Exception, std::exception) override;
diff --git a/dbaccess/source/core/inc/services.hxx b/dbaccess/source/core/inc/services.hxx
index d861f2c8c4a9..78c6913b57dd 100644
--- a/dbaccess/source/core/inc/services.hxx
+++ b/dbaccess/source/core/inc/services.hxx
@@ -25,7 +25,6 @@
#include <sal/types.h>
extern "C" void SAL_CALL createRegistryInfo_DataAccessDescriptorFactory();
-extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition();
extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument();
#endif
diff --git a/dbaccess/source/core/misc/services.cxx b/dbaccess/source/core/misc/services.cxx
index 18850d9bedc8..ca8b4c60258f 100644
--- a/dbaccess/source/core/misc/services.cxx
+++ b/dbaccess/source/core/misc/services.cxx
@@ -58,7 +58,6 @@ extern "C" void SAL_CALL createRegistryInfo_DBA()
static bool bInit = false;
if (!bInit)
{
- createRegistryInfo_OComponentDefinition();
createRegistryInfo_ODatabaseDocument();
createRegistryInfo_DataAccessDescriptorFactory();
bInit = true;
diff --git a/dbaccess/util/dba.component b/dbaccess/util/dba.component
index 7312e8dc087b..d39391229040 100644
--- a/dbaccess/util/dba.component
+++ b/dbaccess/util/dba.component
@@ -30,7 +30,8 @@
<service name="com.sun.star.sdb.CommandDefinition"/>
<service name="com.sun.star.sdb.QueryDefinition"/>
</implementation>
- <implementation name="com.sun.star.comp.dba.OComponentDefinition">
+ <implementation name="com.sun.star.comp.dba.OComponentDefinition"
+ constructor="com_sun_star_comp_dba_OComponentDefinition">
<service name="com.sun.star.sdb.TableDefinition"/>
</implementation>
<implementation name="com.sun.star.comp.dba.ODatabaseContext">