Kaydet (Commit) 4bc0bd73 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

non-desktop: Avoid dbaccess.

Change-Id: I4cabda76917cded05a2978b1a280775b7f77a0de
üst 048d27ba
......@@ -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
{
......
......@@ -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
//=
......
......@@ -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" )
);
......@@ -140,6 +137,7 @@ namespace svxform
}
#else
s_pFactoryCreationFunc = createDataAccessToolsFactory;
#endif
#endif
}
}
......
......@@ -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"));
......@@ -126,6 +125,7 @@ void SwDbtoolsClient::registerClient()
}
#else
getDbToolsClientFactoryFunction() = createDataAccessToolsFactory;
#endif
#endif
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment