summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/dbase
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/dbase')
-rw-r--r--connectivity/source/drivers/dbase/Dservices.cxx52
-rw-r--r--connectivity/source/drivers/dbase/dbase.component35
-rw-r--r--connectivity/source/drivers/dbase/dbase.mxp.map1
-rw-r--r--connectivity/source/drivers/dbase/exports.dxp1
-rw-r--r--connectivity/source/drivers/dbase/makefile.mk8
5 files changed, 43 insertions, 54 deletions
diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx
index e3a295452c..e557f8c8bb 100644
--- a/connectivity/source/drivers/dbase/Dservices.cxx
+++ b/connectivity/source/drivers/dbase/Dservices.cxx
@@ -29,13 +29,11 @@
#include "precompiled_connectivity.hxx"
#include "dbase/DDriver.hxx"
#include <cppuhelper/factory.hxx>
-#include <osl/diagnose.h>
using namespace connectivity::dbase;
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::registry::XRegistryKey;
using ::com::sun::star::lang::XSingleServiceFactory;
using ::com::sun::star::lang::XMultiServiceFactory;
@@ -48,31 +46,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
rtl_ModuleCount* _pT
);
-//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
-//---------------------------------------------------------------------------------------
-void REGISTER_PROVIDER(
- const OUString& aServiceImplName,
- const Sequence< OUString>& Services,
- const Reference< ::com::sun::star::registry::XRegistryKey > & xKey)
-{
- OUString aMainKeyName;
- aMainKeyName = OUString::createFromAscii("/");
- aMainKeyName += aServiceImplName;
- aMainKeyName += OUString::createFromAscii("/UNO/SERVICES");
-
- Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) );
- OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !");
-
- for (sal_Int32 i=0; i<Services.getLength(); ++i)
- xNewKey->createKey(Services[i]);
-}
-
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -123,31 +96,6 @@ component_getImplementationEnvironment(
}
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* /*pServiceManager*/,
- void* pRegistryKey
- )
-{
- if (pRegistryKey)
- try
- {
- Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey));
-
- REGISTER_PROVIDER(
- ODriver::getImplementationName_Static(),
- ODriver::getSupportedServiceNames_Static(), xKey);
-
- return sal_True;
- }
- catch (::com::sun::star::registry::InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "FILE::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !");
- }
-
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/connectivity/source/drivers/dbase/dbase.component b/connectivity/source/drivers/dbase/dbase.component
new file mode 100644
index 0000000000..7f913f0836
--- /dev/null
+++ b/connectivity/source/drivers/dbase/dbase.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.sdbc.dbase.ODriver">
+ <service name="com.sun.star.sdbc.Driver"/>
+ <service name="com.sun.star.sdbcx.Driver"/>
+ </implementation>
+</component>
diff --git a/connectivity/source/drivers/dbase/dbase.mxp.map b/connectivity/source/drivers/dbase/dbase.mxp.map
index c5b4377b04..87eccc45b6 100644
--- a/connectivity/source/drivers/dbase/dbase.mxp.map
+++ b/connectivity/source/drivers/dbase/dbase.mxp.map
@@ -1,5 +1,4 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
__mh_dylib_header
___builtin_delete
diff --git a/connectivity/source/drivers/dbase/exports.dxp b/connectivity/source/drivers/dbase/exports.dxp
index 9630d7e067..f0e1c69934 100644
--- a/connectivity/source/drivers/dbase/exports.dxp
+++ b/connectivity/source/drivers/dbase/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/connectivity/source/drivers/dbase/makefile.mk b/connectivity/source/drivers/dbase/makefile.mk
index f855cf1f45..62b7ae96f8 100644
--- a/connectivity/source/drivers/dbase/makefile.mk
+++ b/connectivity/source/drivers/dbase/makefile.mk
@@ -127,3 +127,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : $(PRJ)$/target.pmk
+
+ALLTAR : $(MISC)/dbase.component
+
+$(MISC)/dbase.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ dbase.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt dbase.component