diff options
-rw-r--r-- | connectivity/source/simpledbt/dbtfactory.cxx | 3 | ||||
-rw-r--r-- | include/connectivity/virtualdbtools.hxx | 5 | ||||
-rw-r--r-- | svx/source/form/dbtoolsclient.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/uibase/dbui/swdbtoolsclient.cxx | 8 |
4 files changed, 14 insertions, 12 deletions
diff --git a/connectivity/source/simpledbt/dbtfactory.cxx b/connectivity/source/simpledbt/dbtfactory.cxx index 2f8d2fc26917..5211b763ff37 100644 --- a/connectivity/source/simpledbt/dbtfactory.cxx +++ b/connectivity/source/simpledbt/dbtfactory.cxx @@ -30,13 +30,14 @@ using namespace ::com::sun::star::lang; // the entry point for load-on-call usage of the DBTOOLS lib +#if HAVE_FEATURE_DESKTOP extern "C" void* SAL_CALL createDataAccessToolsFactory() { ::connectivity::ODataAccessToolsFactory* pFactory = new ::connectivity::ODataAccessToolsFactory; pFactory->acquire(); return pFactory; } - +#endif namespace connectivity { diff --git a/include/connectivity/virtualdbtools.hxx b/include/connectivity/virtualdbtools.hxx index 332ac8ca252b..8474dc42b850 100644 --- a/include/connectivity/virtualdbtools.hxx +++ b/include/connectivity/virtualdbtools.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_CONNECTIVITY_VIRTUALDBTOOLS_HXX #define INCLUDED_CONNECTIVITY_VIRTUALDBTOOLS_HXX +#include <config_features.h> + #include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -88,8 +90,9 @@ namespace dbtools { a pointer to an object implementing the IDataAccessToolsFactory interface, aquired exactly <em>once</em>. */ +#if HAVE_FEATURE_DESKTOP extern "C" OOO_DLLPUBLIC_DBTOOLS void* SAL_CALL createDataAccessToolsFactory(); - +#endif //= diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx index 4d6c659e4837..eabf90a42344 100644 --- a/svx/source/form/dbtoolsclient.cxx +++ b/svx/source/form/dbtoolsclient.cxx @@ -95,16 +95,12 @@ namespace svxform revokeClient(); } - - +#if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING - extern "C" { static void SAL_CALL thisModule() {} } - #else - extern "C" void * createDataAccessToolsFactory(); - +#endif #endif void ODbtoolsClient::registerClient() @@ -115,6 +111,7 @@ namespace svxform OSL_ENSURE(NULL == s_hDbtoolsModule, "ODbtoolsClient::registerClient: inconsistence: already have a module!"); OSL_ENSURE(NULL == s_pFactoryCreationFunc, "ODbtoolsClient::registerClient: inconsistence: already have a factory function!"); +#if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING const OUString sModuleName( SVLIBRARY( "dbtools" ) ); @@ -141,6 +138,7 @@ namespace svxform #else s_pFactoryCreationFunc = createDataAccessToolsFactory; #endif +#endif } } diff --git a/sw/source/core/uibase/dbui/swdbtoolsclient.cxx b/sw/source/core/uibase/dbui/swdbtoolsclient.cxx index 9fdc6a3ce930..f1bde42dcd4e 100644 --- a/sw/source/core/uibase/dbui/swdbtoolsclient.cxx +++ b/sw/source/core/uibase/dbui/swdbtoolsclient.cxx @@ -84,14 +84,12 @@ SwDbtoolsClient::~SwDbtoolsClient() } } +#if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING - extern "C" { static void SAL_CALL thisModule() {} } - #else - extern "C" void * createDataAccessToolsFactory(); - +#endif #endif void SwDbtoolsClient::registerClient() @@ -102,6 +100,7 @@ void SwDbtoolsClient::registerClient() OSL_ENSURE(NULL == getDbToolsClientModule(), "SwDbtoolsClient::registerClient: inconsistence: already have a module!"); OSL_ENSURE(NULL == getDbToolsClientFactoryFunction(), "SwDbtoolsClient::registerClient: inconsistence: already have a factory function!"); +#if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING const OUString sModuleName(SVLIBRARY("dbtools")); @@ -127,6 +126,7 @@ void SwDbtoolsClient::registerClient() #else getDbToolsClientFactoryFunction() = createDataAccessToolsFactory; #endif +#endif } } |