summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-04-15 12:18:34 +0200
committerJan Holesovsky <kendy@collabora.com>2014-04-15 13:10:56 +0200
commit4bc0bd734847160d3eb94d9e49d9b99f2c7c1afc (patch)
tree9479044779ad8167c4b21760fa8de8855c2f1bad
parent048d27bae87f2a39a0fc853e32b474ab58e92dde (diff)
non-desktop: Avoid dbaccess.
Change-Id: I4cabda76917cded05a2978b1a280775b7f77a0de
-rw-r--r--connectivity/source/simpledbt/dbtfactory.cxx3
-rw-r--r--include/connectivity/virtualdbtools.hxx5
-rw-r--r--svx/source/form/dbtoolsclient.cxx10
-rw-r--r--sw/source/core/uibase/dbui/swdbtoolsclient.cxx8
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
}
}