[Libreoffice-commits] .: 4 commits - connectivity/Module_connectivity.mk cppuhelper/source cppu/source dbaccess/source extensions/Module_extensions.mk filter/source jvmfwk/source salhelper/source sal/inc sal/Module_sal.mk sal/osl sc/source sd/inc sd/source sfx2/source svtools/source svx/source sw/inc sw/source toolkit/source vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Oct 6 22:01:45 PDT 2012
connectivity/Module_connectivity.mk | 5 -
cppu/source/uno/lbenv.cxx | 4 -
cppu/source/uno/loadmodule.cxx | 4 +
cppu/source/uno/loadmodule.hxx | 4 +
cppuhelper/source/shlib.cxx | 2
dbaccess/source/ui/dlg/odbcconfig.cxx | 4 +
dbaccess/source/ui/dlg/odbcconfig.hxx | 2
extensions/Module_extensions.mk | 7 +
filter/source/graphicfilter/egif/egif.cxx | 4 +
filter/source/graphicfilter/eos2met/eos2met.cxx | 4 +
filter/source/graphicfilter/epbm/epbm.cxx | 4 +
filter/source/graphicfilter/epgm/epgm.cxx | 4 +
filter/source/graphicfilter/epict/epict.cxx | 4 +
filter/source/graphicfilter/eppm/eppm.cxx | 4 +
filter/source/graphicfilter/eps/eps.cxx | 4 +
filter/source/graphicfilter/eras/eras.cxx | 4 +
filter/source/graphicfilter/etiff/etiff.cxx | 4 +
filter/source/graphicfilter/expm/expm.cxx | 4 +
filter/source/graphicfilter/idxf/idxf.cxx | 4 +
filter/source/graphicfilter/ieps/ieps.cxx | 4 +
filter/source/graphicfilter/ios2met/ios2met.cxx | 4 +
filter/source/graphicfilter/ipbm/ipbm.cxx | 4 +
filter/source/graphicfilter/ipcd/ipcd.cxx | 4 +
filter/source/graphicfilter/ipcx/ipcx.cxx | 4 +
filter/source/graphicfilter/ipict/ipict.cxx | 4 +
filter/source/graphicfilter/ipsd/ipsd.cxx | 4 +
filter/source/graphicfilter/iras/iras.cxx | 4 +
filter/source/graphicfilter/itga/itga.cxx | 4 +
filter/source/graphicfilter/itiff/itiff.cxx | 4 +
jvmfwk/source/framework.cxx | 88 +++++++++++++++++++---
sal/Module_sal.mk | 4 -
sal/inc/osl/module.h | 8 ++
sal/inc/osl/module.hxx | 10 ++
sal/osl/all/loadmodulerelative.cxx | 4 +
sal/osl/unx/module.cxx | 17 ++--
salhelper/source/dynload.cxx | 10 ++
sc/source/core/tool/callform.cxx | 24 +++++-
sc/source/ui/attrdlg/scabstdlg.cxx | 12 +++
sc/source/ui/attrdlg/scuiexp.cxx | 4 +
sd/inc/sdfilter.hxx | 3
sd/source/filter/cgm/sdcgmfilter.cxx | 47 +++++++++---
sd/source/filter/sdfilter.cxx | 3
sd/source/filter/sdpptwrp.cxx | 45 +++++++++--
sd/source/ui/dlg/sdabstdlg.cxx | 12 +++
sd/source/ui/dlg/sduiexp.cxx | 4 +
sfx2/source/appl/appinit.cxx | 12 +++
sfx2/source/appl/appserv.cxx | 33 +++++++-
svtools/source/filter/filter.cxx | 94 +++++++++++++++++++++++-
svtools/source/misc/svtaccessiblefactory.cxx | 9 ++
svx/source/form/dbtoolsclient.cxx | 15 +++
sw/inc/init.hxx | 3
sw/source/filter/basflt/fltini.cxx | 55 +++++++++++++-
sw/source/ui/dbui/swdbtoolsclient.cxx | 14 +++
sw/source/ui/dialog/swabstdlg.cxx | 12 +++
sw/source/ui/dialog/swuiexp.cxx | 4 +
toolkit/source/helper/accessibilityclient.cxx | 8 ++
vcl/source/window/abstdlg.cxx | 8 ++
vcl/source/window/builder.cxx | 12 +++
58 files changed, 635 insertions(+), 55 deletions(-)
New commits:
commit 97593ae24a98daca89fad176dc2492e582b3a821
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Oct 7 07:52:26 2012 +0300
Handle lack of module loading/unloading API when DISABLE_DYNLOADING
There are basicically two classes of cases:
1) Where the code is for obscure historical reasons or what I see as
misguided "optimization" split into a more libraries than necessary,
and these then are loaded at run-time. Instead, just use direct
linking.
2) Where dynamic loading is part of the functionality offered to some
upper (scripting etc) layer, or where some system-specific non-LO
library is loaded dynamically, as it is not necessarily present on
end-user machines. Can't have such in the DISABLE_DYNLOADING case.
Change-Id: I9eceac5fb635245def2f4f3320821447bb7cd8c0
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 439d49b..1909274 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -1054,7 +1054,7 @@ static bool loadEnv(OUString const & cLibStem,
{
#ifdef DISABLE_DYNLOADING
oslModule hMod;
- uno_initEnvironmentFunc fpInit = NULL;
+ uno_initEnvironmentFunc fpInit;
if ( cLibStem == CPPU_CURRENT_LANGUAGE_BINDING_NAME "_uno" )
fpInit = CPPU_ENV_uno_initEnvironment;
@@ -1083,13 +1083,13 @@ static bool loadEnv(OUString const & cLibStem,
OUString aSymbolName(RTL_CONSTASCII_USTRINGPARAM(UNO_INIT_ENVIRONMENT));
uno_initEnvironmentFunc fpInit = (uno_initEnvironmentFunc)
::osl_getFunctionSymbol( hMod, aSymbolName.pData );
-#endif
if (!fpInit)
{
::osl_unloadModule( hMod );
return false;
}
+#endif
(*fpInit)( pEnv ); // init of environment
::rtl_registerModuleForUnloading( hMod );
diff --git a/cppu/source/uno/loadmodule.cxx b/cppu/source/uno/loadmodule.cxx
index 75c7e54..9271a89 100644
--- a/cppu/source/uno/loadmodule.cxx
+++ b/cppu/source/uno/loadmodule.cxx
@@ -29,6 +29,8 @@
namespace cppu { namespace detail {
+#ifndef DISABLE_DYNLOADING
+
::oslModule loadModule(rtl::OUString const & name) {
rtl::OUStringBuffer b;
#if defined SAL_DLLPREFIX
@@ -42,6 +44,8 @@ namespace cppu { namespace detail {
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY);
}
+#endif
+
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppu/source/uno/loadmodule.hxx b/cppu/source/uno/loadmodule.hxx
index f7f5a25..afedb77 100644
--- a/cppu/source/uno/loadmodule.hxx
+++ b/cppu/source/uno/loadmodule.hxx
@@ -27,6 +27,8 @@ namespace rtl { class OUString; }
namespace cppu { namespace detail {
+#ifndef DISABLE_DYNLOADING
+
/** Load a module.
@param name
@@ -38,6 +40,8 @@ namespace cppu { namespace detail {
*/
::oslModule loadModule(::rtl::OUString const & name);
+#endif
+
} }
#endif
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index b89fc5b..ed140f0 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -595,7 +595,9 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
if (! xRet.is())
{
+#ifndef DISABLE_DYNLOADING
osl_unloadModule( lib );
+#endif
#if OSL_DEBUG_LEVEL > 1
out( "### cannot activate factory: " );
out( aExcMsg );
diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx
index 5adbbf3..c6047a1 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.cxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.cxx
@@ -133,6 +133,8 @@ sal_Bool OOdbcLibWrapper::load(const sal_Char* _pLibPath)
// load the module
m_pOdbcLib = osl_loadModule(m_sLibPath.pData, SAL_LOADMODULE_NOW);
return (NULL != m_pOdbcLib);
+#else
+ return sal_False;
#endif
}
@@ -289,6 +291,8 @@ void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames)
_rNames.insert(aCurrentDsn);
}
}
+#else
+ (void) _rNames;
#endif
}
diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx
index d24b57a..7ecadd2 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.hxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.hxx
@@ -22,7 +22,7 @@
#include "commontypes.hxx"
-#if defined(WNT) || defined (UNX)
+#if defined(WNT) || (defined (UNX) && !defined(ANDROID) && !defined(IOS))
#define HAVE_ODBC_SUPPORT
#endif
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 959e3a4..675f159 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -558,6 +558,10 @@ void GIFWriter::WriteTerminator()
// ------------------------------------------------------------------------
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport egiGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport( SvStream& rStream, Graphic& rGraphic,
FilterConfigItem* pConfigItem, sal_Bool )
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 08280a6..6849e54 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -2585,6 +2585,10 @@ sal_Bool METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream,
//================== GraphicExport - the exported Function ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport emeGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{ METWriter aMETWriter;
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index 1224569..6fa40f6 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -189,6 +189,10 @@ void PBMWriter::ImplWriteNumber(sal_Int32 nNumber)
// - exported function -
// ---------------------
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport epbGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index d64539c..ee15316 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -214,6 +214,10 @@ void PGMWriter::ImplWriteNumber(sal_Int32 nNumber)
// - exported function -
// ---------------------
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport epgGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index bf337c3..fe1c05c 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -2298,6 +2298,10 @@ sal_Bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStrea
//================== GraphicExport - the exported Function ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport eptGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index 2948c4d..d908002 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -222,6 +222,10 @@ void PPMWriter::ImplWriteNumber(sal_Int32 nNumber)
// - exported function -
// ---------------------
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport eppGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index ec33629..ba9f1a3 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2771,6 +2771,10 @@ sal_Bool PSWriter::ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uL
//================== GraphicExport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport epsGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index 16e20b3..350239e 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -269,6 +269,10 @@ void RASWriter::ImplPutByte( sal_uInt8 nPutThis )
// - exported function -
// ---------------------
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport eraGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index 7ca3576..ee79f50 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -599,6 +599,10 @@ void TIFFWriter::EndCompression()
// - exported function -
// ---------------------
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport etiGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx
index fd582da..51cafa0 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -250,6 +250,10 @@ void XPMWriter::ImplWriteColor( sal_uInt16 nNumber )
// - exported function -
// ---------------------
+#ifdef DISABLE_DYNLOADING
+#define GraphicExport expGraphicExport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/graphicfilter/idxf/idxf.cxx
index b40dfcc..13915ff 100644
--- a/filter/source/graphicfilter/idxf/idxf.cxx
+++ b/filter/source/graphicfilter/idxf/idxf.cxx
@@ -29,6 +29,10 @@ class FilterConfigItem;
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport idxGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index ab56b41..252dadd 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -495,6 +495,10 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport ipsGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 4da779f..21dae7b 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2719,6 +2719,10 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport imeGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index fabe4f0..abb28ef 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -520,6 +520,10 @@ sal_Bool PBMReader::ImplReadBody()
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport ipbGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 07e6711..f0928fb 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -367,6 +367,10 @@ void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
//================== GraphicImport - the exported Function ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport icdGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pConfigItem, sal_Bool)
{
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 324c8ab..b51c222 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -400,6 +400,10 @@ void PCXReader::ImplReadPalette( sal_uLong nCol )
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport ipxGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 8344a5f..97e90d7 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1864,6 +1864,10 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport iptGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 41bd66c..21597a6 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -720,6 +720,10 @@ sal_Bool PSDReader::ImplReadBody()
//================== GraphicImport - the exported function ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport ipdGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 8b69038..833d2fe 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -338,6 +338,10 @@ sal_uInt8 RASReader::ImplGetByte()
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport iraGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 4074683..7a00af4 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -742,6 +742,10 @@ sal_Bool TGAReader::ImplReadPalette()
//================== GraphicImport - die exportierte Funktion ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport itgGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 37cbf77..961acdd 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1365,6 +1365,10 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
//================== GraphicImport - the exported Function ================
+#ifdef DISABLE_DYNLOADING
+#define GraphicImport itiGraphicImport
+#endif
+
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
{
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 324b112..2f1760a 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -53,6 +53,41 @@ sal_Bool areEqualJavaInfo(
}
}
+#ifdef DISABLE_DYNLOADING
+
+extern "C"
+javaPluginError jfw_plugin_getAllJavaInfos(
+ rtl_uString *sVendor,
+ rtl_uString *sMinVersion,
+ rtl_uString *sMaxVersion,
+ rtl_uString * *arExcludeList,
+ sal_Int32 nLenList,
+ JavaInfo*** parJavaInfo,
+ sal_Int32 *nLenInfoList);
+
+extern "C"
+javaPluginError jfw_plugin_getJavaInfoByPath(
+ rtl_uString *path,
+ rtl_uString *sVendor,
+ rtl_uString *sMinVersion,
+ rtl_uString *sMaxVersion,
+ rtl_uString * *arExcludeList,
+ sal_Int32 nLenList,
+ JavaInfo ** ppInfo);
+
+extern "C"
+javaPluginError jfw_plugin_startJavaVirtualMachine(
+ const JavaInfo *pInfo,
+ const JavaVMOption* arOptions,
+ sal_Int32 cOptions,
+ JavaVM ** ppVm,
+ JNIEnv ** ppEnv);
+
+extern "C"
+javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist);
+
+#endif
+
javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSize)
{
javaFrameworkError retVal = JFW_E_NONE;
@@ -67,12 +102,13 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
//Get a list of plugins which provide Java information
std::vector<jfw::PluginLibrary> vecPlugins =
aVendorSettings.getPluginData();
-
+#ifndef DISABLE_DYNLOADING
//Create a vector that holds the libraries, which will be later
//dynamically loaded;
boost::scoped_array<osl::Module> sarModules;
sarModules.reset(new osl::Module[vecPlugins.size()]);
osl::Module * arModules = sarModules.get();
+#endif
//Add the JavaInfos found by jfw_plugin_getAllJavaInfos to the vector
//Make sure that the contents are destroyed if this
//function returns with an error
@@ -95,6 +131,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
aVendorSettings.getVersionInformation(library.sVendor);
+#ifndef DISABLE_DYNLOADING
arModules[cModule].load(library.sPath);
osl::Module & pluginLib = arModules[cModule];
@@ -109,7 +146,10 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
(jfw_plugin_getAllJavaInfos_ptr) pluginLib.getFunctionSymbol(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jfw_plugin_getAllJavaInfos")));
-
+#else
+ jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
+ jfw_plugin_getAllJavaInfos;
+#endif
OSL_ASSERT(getAllJavaFunc);
if (getAllJavaFunc == NULL)
return JFW_E_ERROR;
@@ -138,10 +178,14 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
//Check if the current plugin can detect JREs at the location
// of the paths added by jfw_setJRELocations or jfw_addJRELocation
//get the function from the plugin
+#ifndef DISABLE_DYNLOADING
jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
(jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jfw_plugin_getJavaInfoByPath")));
-
+#else
+ jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
+ jfw_plugin_getJavaInfoByPath;
+#endif
OSL_ASSERT(jfw_plugin_getJavaInfoByPathFunc);
if (jfw_plugin_getJavaInfoByPathFunc == NULL)
return JFW_E_ERROR;
@@ -347,6 +391,7 @@ javaFrameworkError SAL_CALL jfw_startVM(JavaVMOption *arOptions, sal_Int32 cOpti
if ( ! modulePlugin)
return JFW_E_NO_PLUGIN;
+#ifndef DISABLE_DYNLOADING
rtl::OUString sFunctionName(
RTL_CONSTASCII_USTRINGPARAM("jfw_plugin_startJavaVirtualMachine"));
jfw_plugin_startJavaVirtualMachine_ptr pFunc =
@@ -354,6 +399,10 @@ javaFrameworkError SAL_CALL jfw_startVM(JavaVMOption *arOptions, sal_Int32 cOpti
osl_getFunctionSymbol(modulePlugin, sFunctionName.pData);
if (pFunc == NULL)
return JFW_E_ERROR;
+#else
+ jfw_plugin_startJavaVirtualMachine_ptr pFunc =
+ jfw_plugin_startJavaVirtualMachine;
+#endif
// create JavaVMOptions array that is passed to the plugin
// it contains the classpath and all options set in the
@@ -445,12 +494,13 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
jfw::VendorSettings aVendorSettings;
std::vector<jfw::PluginLibrary> vecPlugins =
aVendorSettings.getPluginData();
+#ifndef DISABLE_DYNLOADING
//Create a vector that holds the libraries, which will be later
//dynamically loaded;
boost::scoped_array<osl::Module> sarModules;
sarModules.reset(new osl::Module[vecPlugins.size()]);
osl::Module * arModules = sarModules.get();
-
+#endif
//Use every plug-in library to get Java installations. At the first usable
//Java the loop will break
typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl;
@@ -460,7 +510,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
aVendorSettings.getVersionInformation(library.sVendor);
-
+#ifndef DISABLE_DYNLOADING
arModules[cModule].load(library.sPath);
osl::Module & pluginLib = arModules[cModule];
if (pluginLib.is() == sal_False)
@@ -469,7 +519,10 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
(jfw_plugin_getAllJavaInfos_ptr) pluginLib.getFunctionSymbol(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jfw_plugin_getAllJavaInfos")));
-
+#else
+ jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
+ jfw_plugin_getAllJavaInfos;
+#endif
OSL_ASSERT(getAllJavaFunc);
if (getAllJavaFunc == NULL)
continue;
@@ -542,7 +595,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
aVendorSettings.getVersionInformation(library.sVendor);
-
+#ifndef DISABLE_DYNLOADING
osl::Module pluginLib(library.sPath);
if (pluginLib.is() == sal_False)
return JFW_E_NO_PLUGIN;
@@ -552,7 +605,10 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
(jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jfw_plugin_getJavaInfoByPath")));
-
+#else
+ jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
+ jfw_plugin_getJavaInfoByPath;
+#endif
OSL_ASSERT(jfw_plugin_getJavaInfoByPathFunc);
if (jfw_plugin_getJavaInfoByPathFunc == NULL)
return JFW_E_ERROR;
@@ -742,12 +798,13 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
//Get a list of plugins which provide Java information
std::vector<jfw::PluginLibrary> vecPlugins =
aVendorSettings.getPluginData();
+#ifndef DISABLE_DYNLOADING
//Create a vector that holds the libraries, which will be later
//dynamically loaded;
boost::scoped_array<osl::Module> sarModules;
sarModules.reset(new osl::Module[vecPlugins.size()]);
osl::Module * arModules = sarModules.get();
-
+#endif
typedef std::vector<rtl::OUString>::const_iterator CIT_VENDOR;
std::vector<rtl::OUString> vecVendors =
aVendorSettings.getSupportedVendors();
@@ -762,6 +819,8 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
aVendorSettings.getVersionInformation(library.sVendor);
+
+#ifndef DISABLE_DYNLOADING
arModules[cModule].load(library.sPath);
osl::Module & pluginLib = arModules[cModule];
if (pluginLib.is() == sal_False)
@@ -776,7 +835,10 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
(jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jfw_plugin_getJavaInfoByPath")));
-
+#else
+ jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
+ jfw_plugin_getJavaInfoByPath;
+#endif
OSL_ASSERT(jfw_plugin_getJavaInfoByPathFunc);
if (jfw_plugin_getJavaInfoByPathFunc == NULL)
continue;
@@ -1112,6 +1174,7 @@ javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
jfw::VendorSettings aVendorSettings;
jfw::CJavaInfo aInfo;
aInfo = (const ::JavaInfo*) pInfo; //makes a copy of pInfo
+#ifndef DISABLE_DYNLOADING
rtl::OUString sLibPath = aVendorSettings.getPluginLibrary(aInfo.getVendor());
osl::Module modulePlugin(sLibPath);
if ( ! modulePlugin)
@@ -1123,7 +1186,10 @@ javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
osl_getFunctionSymbol(modulePlugin, sFunctionName.pData);
if (pFunc == NULL)
return JFW_E_ERROR;
-
+#else
+ jfw_plugin_existJRE_ptr pFunc =
+ jfw_plugin_existJRE;
+#endif
javaPluginError plerr = (*pFunc)(pInfo, exist);
javaFrameworkError ret = JFW_E_NONE;
diff --git a/salhelper/source/dynload.cxx b/salhelper/source/dynload.cxx
index 2e392af..f69ace8 100644
--- a/salhelper/source/dynload.cxx
+++ b/salhelper/source/dynload.cxx
@@ -43,6 +43,13 @@ ORealDynamicLoader* ORealDynamicLoader::newInstance(ORealDynamicLoader ** ppSetT
const rtl::OUString& moduleName,
const rtl::OUString& initFunction)
{
+#ifdef DISABLE_DYNLOADING
+ (void) ppSetToZeroInDestructor;
+ (void) moduleName;
+ (void) initFunction;
+
+ return NULL;
+#else
ApiInitFunction initFunc;
oslModule pModule = osl_loadModule(moduleName.pData, SAL_LOADMODULE_DEFAULT);
@@ -64,6 +71,7 @@ ORealDynamicLoader* ORealDynamicLoader::newInstance(ORealDynamicLoader ** ppSetT
initFunction,
initFunc(),
pModule));
+#endif
}
ORealDynamicLoader::~ORealDynamicLoader()
@@ -74,7 +82,9 @@ ORealDynamicLoader::~ORealDynamicLoader()
if (m_pModule)
{
+#ifndef DISABLE_DYNLOADING
osl_unloadModule(m_pModule);
+#endif
m_pModule = NULL;
}
}
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 5d20ad2..8ba120b 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -89,7 +89,14 @@ friend class ModuleCollection;
osl::Module* pInstance;
public:
ModuleData(const rtl::OUString& rStr, osl::Module* pInst) : aName(rStr), pInstance(pInst) {}
- ModuleData(const ModuleData& rData) : aName(rData.aName) {pInstance = new osl::Module(aName);}
+ ModuleData(const ModuleData& rData) : aName(rData.aName)
+ {
+#ifndef DISABLE_DYNLOADING
+ pInstance = new osl::Module(aName);
+#else
+ pInstance = NULL;
+#endif
+ }
~ModuleData() { delete pInstance; }
const rtl::OUString& GetName() const { return aName; }
@@ -174,6 +181,10 @@ ModuleCollection aModuleCollection;
bool InitExternalFunc(const rtl::OUString& rModuleName)
{
+#ifdef DISABLE_DYNLOADING
+ (void) rModuleName;
+ return false;
+#else
// Module already loaded?
const ModuleData* pTemp = aModuleCollection.findByName(rModuleName);
if (pTemp)
@@ -252,6 +263,7 @@ bool InitExternalFunc(const rtl::OUString& rModuleName)
else
delete pLib;
return bRet;
+#endif
}
//------------------------------------------------------------------------
@@ -265,6 +277,10 @@ void ExitExternalFunc()
bool FuncData::Call(void** ppParam) const
{
+#ifdef DISABLE_DYNLOADING
+ (void) ppParam;
+ return false;
+#else
bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(aFuncName);
@@ -354,12 +370,17 @@ bool FuncData::Call(void** ppParam) const
}
}
return bRet;
+#endif
}
//------------------------------------------------------------------------
bool FuncData::Unadvice( double nHandle )
{
+#ifdef DISABLE_DYNLOADING
+ (void) nHandle;
+ return false;
+#else
bool bRet = false;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(UNADVICE);
@@ -369,6 +390,7 @@ bool FuncData::Unadvice( double nHandle )
bRet = true;
}
return bRet;
+#endif
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index 98b0efa..654fb76 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -36,10 +36,19 @@ using ::rtl::OUStringBuffer;
typedef ScAbstractDialogFactory* (__LOADONCALLAPI *ScFuncPtrCreateDialogFactory)();
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" ScAbstractDialogFactory* ScCreateDialogFactory();
+
+#endif
+
ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
{
+#ifndef DISABLE_DYNLOADING
ScFuncPtrCreateDialogFactory fp = 0;
static ::osl::Module aDialogLibrary;
@@ -53,6 +62,9 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
if ( fp )
return fp();
return 0;
+#else
+ return ScCreateDialogFactory();
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scuiexp.cxx b/sc/source/ui/attrdlg/scuiexp.cxx
index c2581ea..77e5b2e 100644
--- a/sc/source/ui/attrdlg/scuiexp.cxx
+++ b/sc/source/ui/attrdlg/scuiexp.cxx
@@ -36,6 +36,10 @@ namespace scui
}
}
+#ifdef DISABLE_DYNLOADING
+#define CreateDialogFactory ScCreateDialogFactory
+#endif
+
extern "C"
{
SAL_DLLPUBLIC_EXPORT ScAbstractDialogFactory* CreateDialogFactory()
diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx
index 1f3ea80..d441214 100644
--- a/sd/inc/sdfilter.hxx
+++ b/sd/inc/sdfilter.hxx
@@ -57,8 +57,9 @@ protected:
SdDrawDocument& mrDocument;
sal_Bool mbIsDraw : 1;
sal_Bool mbShowProgress : 1;
-
+#ifndef DISABLE_DYNLOADING
::osl::Module* OpenLibrary( const ::rtl::OUString& rLibraryName ) const;
+#endif
void CreateStatusIndicator();
private:
diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx
index 6c6ef43..7135ee8 100644
--- a/sd/source/filter/cgm/sdcgmfilter.cxx
+++ b/sd/source/filter/cgm/sdcgmfilter.cxx
@@ -66,8 +66,16 @@ using namespace ::com::sun::star::frame;
// - Typedefs -
// ------------
-typedef sal_uInt32 ( __LOADONCALLAPI *ImportCGM )( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& );
-typedef sal_Bool ( __LOADONCALLAPI *ExportCGM )( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* );
+
+typedef sal_uInt32 ( __LOADONCALLAPI *ImportCGMPointer )( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& );
+typedef sal_Bool ( __LOADONCALLAPI *ExportCGMPointer )( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* );
+
+#ifdef DISABLE_DYNLOADING
+
+extern "C" sal_uInt32 ImportCGM( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& );
+extern "C" sal_Bool ExportCGM( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* );
+
+#endif
// ---------------
// - SdPPTFilter -
@@ -88,12 +96,22 @@ SdCGMFilter::~SdCGMFilter()
sal_Bool SdCGMFilter::Import()
{
+#ifndef DISABLE_DYNLOADING
::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
+#endif
sal_Bool bRet = sal_False;
- if( pLibrary && mxModel.is() )
+ if(
+#ifndef DISABLE_DYNLOADING
+ pLibrary &&
+#endif
+ mxModel.is() )
{
- ImportCGM FncImportCGM = reinterpret_cast< ImportCGM >( pLibrary->getFunctionSymbol( "ImportCGM" ) );
+#ifndef DISABLE_DYNLOADING
+ ImportCGMPointer FncImportCGM = reinterpret_cast< ImportCGM >( pLibrary->getFunctionSymbol( "ImportCGM" ) );
+#else
+ ImportCGMPointer FncImportCGM = ImportCGM;
+#endif
::rtl::OUString aFileURL( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
sal_uInt32 nRetValue;
@@ -122,9 +140,9 @@ sal_Bool SdCGMFilter::Import()
}
}
}
-
+#ifndef DISABLE_DYNLOADING
delete pLibrary;
-
+#endif
return bRet;
}
@@ -132,12 +150,22 @@ sal_Bool SdCGMFilter::Import()
sal_Bool SdCGMFilter::Export()
{
+#ifndef DISABLE_DYNLOADING
::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
+#endif
sal_Bool bRet = sal_False;
- if( pLibrary && mxModel.is() )
+ if(
+#ifndef DISABLE_DYNLOADING
+ pLibrary &&
+#endif
+ mxModel.is() )
{
- ExportCGM FncCGMExport = reinterpret_cast< ExportCGM >( pLibrary->getFunctionSymbol( "ExportCGM" ) );
+#ifndef DISABLE_DYNLOADING
+ ExportCGMPointer FncCGMExport = reinterpret_cast< ExportCGM >( pLibrary->getFunctionSymbol( "ExportCGM" ) );
+#else
+ ExportCGMPointer FncCGMExport = ExportCGM;
+#endif
if( FncCGMExport )
{
@@ -148,8 +176,9 @@ sal_Bool SdCGMFilter::Export()
}
}
+#ifndef DISABLE_DYNLOADING
delete pLibrary;
-
+#endif
return bRet;
}
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index ec24592..d379ffd 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -85,6 +85,7 @@ SdFilter::~SdFilter()
// -----------------------------------------------------------------------------
+#ifndef DISABLE_DYNLOADING
extern "C" { static void SAL_CALL thisModule() {} }
::osl::Module* SdFilter::OpenLibrary( const ::rtl::OUString& rLibraryName ) const
@@ -95,6 +96,8 @@ extern "C" { static void SAL_CALL thisModule() {} }
? mod.release() : 0;
}
+#endif
+
// -----------------------------------------------------------------------------
void SdFilter::CreateStatusIndicator()
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 6be40e8..c11c958 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -49,14 +49,27 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::task;
using namespace ::com::sun::star::frame;
-typedef sal_Bool ( __LOADONCALLAPI *ExportPPT )( const std::vector< com::sun::star::beans::PropertyValue >&, SvStorageRef&,
+typedef sal_Bool ( __LOADONCALLAPI *ExportPPTPointer )( const std::vector< com::sun::star::beans::PropertyValue >&, SvStorageRef&,
Reference< XModel > &,
Reference< XStatusIndicator > &,
SvMemoryStream*, sal_uInt32 nCnvrtFlags );
-typedef sal_Bool ( SAL_CALL *ImportPPT )( SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& );
+typedef sal_Bool ( SAL_CALL *ImportPPTPointer )( SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& );
-typedef sal_Bool ( __LOADONCALLAPI *SaveVBA )( SfxObjectShell&, SvMemoryStream*& );
+typedef sal_Bool ( __LOADONCALLAPI *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& );
+
+#ifdef DISABLE_DYNLOADING
+
+extern "C" sal_Bool ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >&, SvStorageRef&,
+ Reference< XModel > &,
+ Reference< XStatusIndicator > &,
+ SvMemoryStream*, sal_uInt32 nCnvrtFlags );
+
+extern "C" sal_Bool ImportPPT( SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& );
+
+extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& );
+
+#endif
// ---------------
// - SdPPTFilter -
@@ -102,16 +115,22 @@ sal_Bool SdPPTFilter::Import()
mrMedium.SetError( ERRCODE_SVX_READ_FILTER_PPOINT, OSL_LOG_PREFIX );
else
{
+#ifndef DISABLE_DYNLOADING
::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
if ( pLibrary )
{
- ImportPPT PPTImport = reinterpret_cast< ImportPPT >( pLibrary->getFunctionSymbol( "ImportPPT" ) );
+ ImportPPTPointer PPTImport = reinterpret_cast< ImportPPT >( pLibrary->getFunctionSymbol( "ImportPPT" ) );
if ( PPTImport )
bRet = PPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium );
if ( !bRet )
mrMedium.SetError( SVSTREAM_WRONGVERSION, OSL_LOG_PREFIX );
}
+#else
+ bRet = ImportPPT( &mrDocument, *pDocStream, *pStorage, mrMedium );
+ if ( !bRet )
+ mrMedium.SetError( SVSTREAM_WRONGVERSION, OSL_LOG_PREFIX );
+#endif
}
delete pDocStream;
@@ -125,15 +144,23 @@ sal_Bool SdPPTFilter::Import()
sal_Bool SdPPTFilter::Export()
{
+#ifndef DISABLE_DYNLOADING
::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
+#endif
sal_Bool bRet = sal_False;
+#ifndef DISABLE_DYNLOADING
if( pLibrary )
+#endif
{
if( mxModel.is() )
{
SotStorageRef xStorRef = new SotStorage( mrMedium.GetOutStream(), sal_False );
- ExportPPT PPTExport = reinterpret_cast<ExportPPT>(pLibrary->getFunctionSymbol( "ExportPPT" ));
+#ifndef DISABLE_DYNLOADING
+ ExportPPTPointer PPTExport = reinterpret_cast<ExportPPT>(pLibrary->getFunctionSymbol( "ExportPPT" ));
+#else
+ ExportPPTPointer PPTExport = ExportPPT;
+#endif
if( PPTExport && xStorRef.Is() )
{
@@ -166,7 +193,9 @@ sal_Bool SdPPTFilter::Export()
xStorRef->Commit();
}
}
+#ifndef DISABLE_DYNLOADING
delete pLibrary;
+#endif
}
return bRet;
}
@@ -176,15 +205,19 @@ void SdPPTFilter::PreSaveBasic()
const SvtFilterOptions& rFilterOptions = SvtFilterOptions::Get();
if( rFilterOptions.IsLoadPPointBasicStorage() )
{
+#ifndef DISABLE_DYNLOADING
::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
if( pLibrary )
{
- SaveVBA pSaveVBA= reinterpret_cast<SaveVBA>(pLibrary->getFunctionSymbol( "SaveVBA" ));
+ SaveVBAPointer pSaveVBA= reinterpret_cast<SaveVBA>(pLibrary->getFunctionSymbol( "SaveVBA" ));
if( pSaveVBA )
{
pSaveVBA( (SfxObjectShell&) mrDocShell, pBas );
}
}
+#else
+ SaveVBA( (SfxObjectShell&) mrDocShell, pBas );
+#endif
}
}
diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx
index 520f5a4..6c4951e 100644
--- a/sd/source/ui/dlg/sdabstdlg.cxx
+++ b/sd/source/ui/dlg/sdabstdlg.cxx
@@ -35,10 +35,19 @@
typedef SdAbstractDialogFactory* (__LOADONCALLAPI *SdFuncPtrCreateDialogFactory)();
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" SdAbstractDialogFactory* SdCreateDialogFactory();
+
+#endif
+
SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
{
+#ifndef DISABLE_DYNLOADING
SdFuncPtrCreateDialogFactory fp = 0;
static ::osl::Module aDialogLibrary;
static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("sdui", sal_True));
@@ -48,6 +57,9 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
if ( fp )
return fp();
return 0;
+#else
+ return SdCreateDialogFactory();
+#endif
}
diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx
index 962f86c..d9505a1 100644
--- a/sd/source/ui/dlg/sduiexp.cxx
+++ b/sd/source/ui/dlg/sduiexp.cxx
@@ -34,6 +34,10 @@
#include "sddlgfact.hxx"
#include "sal/types.h"
+#ifdef DISABLE_DYNLOADING
+#define CreateDialogFactory SdCreateDialogFactory
+#endif
+
extern "C"
{
SAL_DLLPUBLIC_EXPORT SdAbstractDialogFactory* CreateDialogFactory()
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 4d53e49..d79f838 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -166,8 +166,16 @@ typedef bool ( *PFunc_getSpecialCharsForEdit)( Window* i_pParent, const Font& i_
// a library above us.
//====================================================================
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" bool GetSpecialCharsForEdit( Window* i_pParent, const Font& i_rFont, String& o_rOutString );
+
+#endif
+
String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
{
static bool bDetermineFunction = false;
@@ -178,6 +186,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
{
bDetermineFunction = true;
+#ifndef DISABLE_DYNLOADING
static ::rtl::OUString aLibName( SVLIBRARY( "cui" ) );
oslModule handleMod = osl_loadModuleRelative(
&thisModule, aLibName.pData, 0 );
@@ -186,6 +195,9 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
::rtl::OUString aSymbol( "GetSpecialCharsForEdit" );
pfunc_getSpecialCharsForEdit = (PFunc_getSpecialCharsForEdit)osl_getFunctionSymbol( handleMod, aSymbol.pData );
DBG_ASSERT( pfunc_getSpecialCharsForEdit, "GetSpecialCharsForEdit() not found!" );
+#else
+ pfunc_getSpecialCharsForEdit = GetSpecialCharsForEdit;
+#endif
}
String aRet;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 6135f7b..08d0352 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -834,16 +834,28 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
}
}
+#ifndef DISABLE_SCRIPTING
+
typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(XModel*, sal_Bool, rtl_uString*);
typedef void (SAL_CALL *basicide_macro_organizer)( sal_Int16 );
#define DOSTRING( x ) #x
#define STRING( x ) DOSTRING( x )
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" rtl_uString* basicide_choose_macro(XModel*, sal_Bool, rtl_uString*);
+extern "C" void basicide_macro_organizer( sal_Int16 );
+
+#endif
+
::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() )
{
+#ifndef DISABLE_DYNLOADING
// get basctl dllname
static ::rtl::OUString aLibName( SVLIBRARY( "basctl" ) );
@@ -854,16 +866,24 @@ extern "C" { static void SAL_CALL thisModule() {} }
// get symbol
::rtl::OUString aSymbol( "basicide_choose_macro" );
basicide_choose_macro pSymbol = (basicide_choose_macro) osl_getFunctionSymbol( handleMod, aSymbol.pData );
+#else
+#define pSymbol basicide_choose_macro
+#endif
// call basicide_choose_macro in basctl
rtl_uString* pScriptURL = pSymbol( rxLimitToDocument.get(), bChooseOnly, rMacroDesc.pData );
::rtl::OUString aScriptURL( pScriptURL );
rtl_uString_release( pScriptURL );
return aScriptURL;
+
+#ifdef DISABLE_DYNLOADING
+#undef pSymbol
+#endif
}
void MacroOrganizer( sal_Int16 nTabId )
{
+#ifndef DISABLE_DYNLOADING
// get basctl dllname
static ::rtl::OUString aLibName( SVLIBRARY( "basctl" ) );
@@ -874,11 +894,17 @@ void MacroOrganizer( sal_Int16 nTabId )
// get symbol
::rtl::OUString aSymbol( "basicide_macro_organizer" );
basicide_macro_organizer pSymbol = (basicide_macro_organizer) osl_getFunctionSymbol( handleMod, aSymbol.pData );
-
// call basicide_macro_organizer in basctl
pSymbol( nTabId );
+#else
+ basicide_macro_organizer( nTabId );
+#endif
+
}
+#endif
+
+
#define RID_ERRBOX_MODULENOTINSTALLED (RID_OFA_START + 72)
ResMgr* SfxApplication::GetOffResManager_Impl()
@@ -890,6 +916,7 @@ ResMgr* SfxApplication::GetOffResManager_Impl()
namespace
{
+#ifndef DISABLE_SCRIPTING
Window* lcl_getDialogParent( const Reference< XFrame >& _rxFrame, Window* _pFallback )
{
if ( !_rxFrame.is() )
@@ -964,6 +991,7 @@ namespace
}
return NULL;
}
+#endif // !DISABLE_SCRIPTING
}
static ::rtl::OUString getConfigurationStringValue(
@@ -1076,7 +1104,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
}
break;
}
-
+#ifndef DISABLE_SCRIPTING
case SID_BASICIDE_APPEAR:
{
SfxViewFrame* pView = lcl_getBasicIDEViewFrame( NULL );
@@ -1258,6 +1286,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
rReq.Done();
}
break;
+#endif // !DISABLE_SCRIPTING
case SID_OFFICE_CHECK_PLZ:
{
diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index aaacb12..6428c2e 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -915,7 +915,9 @@ class ImpFilterLibCache;
struct ImpFilterLibCacheEntry
{
ImpFilterLibCacheEntry* mpNext;
+#ifndef DISABLE_DYNLOADING
osl::Module maLibrary;
+#endif
String maFiltername;
PFilterCall mpfnImport;
PFilterDlgCall mpfnImportDlg;
@@ -930,19 +932,67 @@ struct ImpFilterLibCacheEntry
ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const String& rPathname, const String& rFiltername ) :
mpNext ( NULL ),
+#ifndef DISABLE_DYNLOADING
maLibrary ( rPathname ),
+#endif
maFiltername ( rFiltername ),
mpfnImport ( NULL ),
mpfnImportDlg ( NULL )
{
+#ifdef DISABLE_DYNLOADING
+ (void) rPathname;
+#endif
}
// ------------------------------------------------------------------------
+#ifdef DISABLE_DYNLOADING
+
+extern "C" sal_Bool icdGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool idxGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool imeGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool ipbGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool ipdGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool ipsGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool iptGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool ipxGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool iraGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool itgGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool itiGraphicImport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+
+#endif
+
PFilterCall ImpFilterLibCacheEntry::GetImportFunction()
{
if( !mpfnImport )
+ {
+#ifndef DISABLE_DYNLOADING
mpfnImport = (PFilterCall) maLibrary.getFunctionSymbol(rtl::OUString(IMPORT_FUNCTION_NAME));
+#else
+ if( maFiltername.EqualsAscii( "icd" ) )
+ mpfnImport = icdGraphicImport;
+ else if( maFiltername.EqualsAscii( "idx" ) )
+ mpfnImport = idxGraphicImport;
+ else if( maFiltername.EqualsAscii( "ime" ) )
+ mpfnImport = imeGraphicImport;
+ else if( maFiltername.EqualsAscii( "ipb" ) )
+ mpfnImport = ipbGraphicImport;
+ else if( maFiltername.EqualsAscii( "ipd" ) )
+ mpfnImport = ipdGraphicImport;
+ else if( maFiltername.EqualsAscii( "ips" ) )
+ mpfnImport = ipsGraphicImport;
+ else if( maFiltername.EqualsAscii( "ipt" ) )
+ mpfnImport = iptGraphicImport;
+ else if( maFiltername.EqualsAscii( "ipx" ) )
+ mpfnImport = ipxGraphicImport;
+ else if( maFiltername.EqualsAscii( "ira" ) )
+ mpfnImport = iraGraphicImport;
+ else if( maFiltername.EqualsAscii( "itg" ) )
+ mpfnImport = itgGraphicImport;
+ else if( maFiltername.EqualsAscii( "iti" ) )
+ mpfnImport = itiGraphicImport;
+#endif
+ }
return mpfnImport;
}
@@ -1003,19 +1053,22 @@ ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter( const String& rFilterPath,
{
String aPhysicalName( ImpCreateFullFilterPath( rFilterPath, rFilterName ) );
pEntry = new ImpFilterLibCacheEntry( aPhysicalName, rFilterName );
-
+#ifndef DISABLE_DYNLOADING
if ( pEntry->maLibrary.is() )
+#endif
{
if( !mpFirst )
mpFirst = mpLast = pEntry;
else
mpLast = mpLast->mpNext = pEntry;
}
+#ifndef DISABLE_DYNLOADING
else
{
delete pEntry;
pEntry = NULL;
}
+#endif
}
return pEntry;
};
@@ -1735,6 +1788,21 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLO
// ------------------------------------------------------------------------
+#ifdef DISABLE_DYNLOADING
+
+extern "C" sal_Bool egiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool emeGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool epbGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool epgGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool eppGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool epsGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool eptGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool eraGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool etiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+extern "C" sal_Bool expGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem, sal_Bool );
+
+#endif
+
sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPath,
SvStream& rOStm, sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData )
{
@@ -2050,11 +2118,35 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
sal_Int32 i, nTokenCount = getTokenCount(aFilterPath, ';');
for ( i = 0; i < nTokenCount; i++ )
{
+#ifndef DISABLE_DYNLOADING
String aPhysicalName( ImpCreateFullFilterPath( getToken(aFilterPath, i, ';'), aFilterName ) );
osl::Module aLibrary( aPhysicalName );
PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol(rtl::OUString(EXPORT_FUNCTION_NAME));
// Dialog in DLL ausfuehren
+#else
+ PFilterCall pFunc = NULL;
+ if( aFilterName.EqualsAscii( "egi" ) )
+ pFunc = egiGraphicExport;
+ else if( aFilterName.EqualsAscii( "eme" ) )
+ pFunc = emeGraphicExport;
+ else if( aFilterName.EqualsAscii( "epb" ) )
+ pFunc = epbGraphicExport;
+ else if( aFilterName.EqualsAscii( "epg" ) )
+ pFunc = epgGraphicExport;
+ else if( aFilterName.EqualsAscii( "epp" ) )
+ pFunc = eppGraphicExport;
+ else if( aFilterName.EqualsAscii( "eps" ) )
+ pFunc = epsGraphicExport;
+ else if( aFilterName.EqualsAscii( "ept" ) )
+ pFunc = eptGraphicExport;
+ else if( aFilterName.EqualsAscii( "era" ) )
+ pFunc = eraGraphicExport;
+ else if( aFilterName.EqualsAscii( "eti" ) )
+ pFunc = etiGraphicExport;
+ else if( aFilterName.EqualsAscii( "exp" ) )
+ pFunc = expGraphicExport;
+#endif
if( pFunc )
{
if ( !(*pFunc)( rOStm, aGraphic, &aConfigItem, sal_False ) )
diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx
index f08fb7d..013e946 100644
--- a/svtools/source/misc/svtaccessiblefactory.cxx
+++ b/svtools/source/misc/svtaccessiblefactory.cxx
@@ -265,7 +265,11 @@ namespace svt
}
//--------------------------------------------------------------------
+#ifndef DISABLE_DYNLOADING
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+ extern "C" void* getSvtAccessibilityComponentFactory();
+#endif
void AccessibleFactoryAccess::ensureInitialized()
{
@@ -281,6 +285,7 @@ namespace svt
// load the library implementing the factory
if ( !s_pFactory.get() )
{
+#ifndef DISABLE_DYNLOADING
const ::rtl::OUString sModuleName( SVLIBRARY( "acc" ));
s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
if ( s_hAccessibleImplementationModule != NULL )
@@ -291,7 +296,9 @@ namespace svt
}
OSL_ENSURE( s_pAccessibleFactoryFunc, "ac_registerClient: could not load the library, or not retrieve the needed symbol!" );
-
+#else
+ s_pAccessibleFactoryFunc = getSvtAccessibilityComponentFactory;
+#endif
// get a factory instance
if ( s_pAccessibleFactoryFunc )
{
diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index a7a2b03..9d87d4b 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -105,8 +105,17 @@ namespace svxform
}
//--------------------------------------------------------------------
+
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+ extern "C" void * createDataAccessToolsFactory();
+
+#endif
+
void ODbtoolsClient::registerClient()
{
::osl::MutexGuard aGuard(theODbtoolsClientMutex::get());
@@ -115,6 +124,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!");
+#ifndef DISABLE_DYNLOADING
const ::rtl::OUString sModuleName( SVLIBRARY( "dbtools" )
);
@@ -137,6 +147,9 @@ namespace svxform
s_hDbtoolsModule = NULL;
}
}
+#else
+ s_pFactoryCreationFunc = createDataAccessToolsFactory;
+#endif
}
}
@@ -146,9 +159,11 @@ namespace svxform
::osl::MutexGuard aGuard(theODbtoolsClientMutex::get());
if (0 == --s_nClients)
{
+#ifndef DISABLE_DYNLOADING
s_pFactoryCreationFunc = NULL;
if (s_hDbtoolsModule)
osl_unloadModule(s_hDbtoolsModule);
+#endif
s_hDbtoolsModule = NULL;
}
diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx
index daad12c..9fe7fd9 100644
--- a/sw/inc/init.hxx
+++ b/sw/inc/init.hxx
@@ -47,8 +47,9 @@ public:
Filters();
~Filters();
-
+#ifndef DISABLE_DYNLOADING
oslGenericFunction GetMswordLibSymbol( const char *pSymbol );
+#endif
private:
osl::Module msword_;
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 6591775..13fb977 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -126,8 +126,12 @@ inline void _SetFltPtr( sal_uInt16 rPos, SwRead pReader )
namespace {
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#endif
+
}
namespace sw {
@@ -153,6 +157,8 @@ Filters::~Filters()
}
}
+#ifndef DISABLE_DYNLOADING
+
oslGenericFunction Filters::GetMswordLibSymbol( const char *pSymbol )
{
if (!msword_.is())
@@ -165,6 +171,8 @@ oslGenericFunction Filters::GetMswordLibSymbol( const char *pSymbol )
return NULL;
}
+#endif
+
}
namespace SwReaderWriter {
@@ -818,44 +826,75 @@ void SwAsciiOptions::WriteUserData( String& rStr )
rStr += ',';
}
+#ifdef DISABLE_DYNLOADING
+
+extern "C" {
+ Reader *ImportRTF();
+ void ExportRTF( const String&, const String& rBaseURL, WriterRef& );
+ Reader *ImportDOC();
+ void ExportDOC( const String&, const String& rBaseURL, WriterRef& );
+ sal_uLong SaveOrDelMSVBAStorage_ww8( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
+ sal_uLong GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell& );
+}
+
+#endif
+
Reader* GetRTFReader()
{
+#ifndef DISABLE_DYNLOADING
+
FnGetReader pFunction = reinterpret_cast<FnGetReader>( SwGlobals::getFilters().GetMswordLibSymbol( "ImportRTF" ) );
if ( pFunction )
return (*pFunction)();
return NULL;
+#else
+ return ImportRTF();
+#endif
+
}
void GetRTFWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
{
+#ifndef DISABLE_DYNLOADING
FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( SwGlobals::getFilters().GetMswordLibSymbol( "ExportRTF" ) );
if ( pFunction )
(*pFunction)( rFltName, rBaseURL, xRet );
else
xRet = WriterRef(0);
+#else
+ ExportRTF( rFltName, rBaseURL, xRet );
+#endif
}
Reader* GetWW8Reader()
{
+#ifndef DISABLE_DYNLOADING
FnGetReader pFunction = reinterpret_cast<FnGetReader>( SwGlobals::getFilters().GetMswordLibSymbol( "ImportDOC" ) );
if ( pFunction )
return (*pFunction)();
return NULL;
+#else
+ return ImportDOC();
+#endif
}
void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
{
+#ifndef DISABLE_DYNLOADING
FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( SwGlobals::getFilters().GetMswordLibSymbol( "ExportDOC" ) );
if ( pFunction )
(*pFunction)( rFltName, rBaseURL, xRet );
else
xRet = WriterRef(0);
+#else
+ ExportDOC( rFltName, rBaseURL, xRet );
+#endif
}
typedef sal_uLong ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
@@ -863,18 +902,26 @@ typedef sal_uLong ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
{
+#ifndef DISABLE_DYNLOADING
SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( SwGlobals::getFilters().GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDoc, rStor, bSaveInto, rStorageName );
- return ERRCODE_NONE;
+ return pFunction( rDoc, rStor, bSaveInto, rStorageName );
+ return ERRCODE_NONE;
+#else
+ return SaveOrDelMSVBAStorage_ww8( rDoc, rStor, bSaveInto, rStorageName );
+#endif
}
sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
{
+#ifndef DISABLE_DYNLOADING
GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( SwGlobals::getFilters().GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDocS );
- return ERRCODE_NONE;
+ return pFunction( rDocS );
+ return ERRCODE_NONE;
+#else
+ return GetSaveWarningOfMSVBAStorage_ww8( rDocS );
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index e18db2b..cf1ebf5 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -94,8 +94,16 @@ SwDbtoolsClient::~SwDbtoolsClient()
}
}
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" void * createDataAccessToolsFactory();
+
+#endif
+
void SwDbtoolsClient::registerClient()
{
::osl::MutexGuard aGuard(getDbtoolsClientMutex());
@@ -104,6 +112,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!");
+#ifndef DISABLE_DYNLOADING
const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(SVLIBRARY("dbtools")));
// load the dbtools library
@@ -125,6 +134,9 @@ void SwDbtoolsClient::registerClient()
getDbToolsClientModule() = NULL;
}
}
+#else
+ getDbToolsClientFactoryFunction() = createDataAccessToolsFactory;
+#endif
}
}
@@ -133,9 +145,11 @@ void SwDbtoolsClient::revokeClient()
::osl::MutexGuard aGuard(getDbtoolsClientMutex());
if (0 == --getDbToolsClientClients())
{
+#ifndef DISABLE_DYNLOADING
getDbToolsClientFactoryFunction() = NULL;
if (getDbToolsClientModule())
osl_unloadModule(getDbToolsClientModule());
+#endif
getDbToolsClientModule() = NULL;
}
}
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index 982f745..8efc77f 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -35,10 +35,19 @@
typedef SwAbstractDialogFactory* (__LOADONCALLAPI *SwFuncPtrCreateDialogFactory)();
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" SwAbstractDialogFactory* SwCreateDialogFactory();
+
+#endif
+
SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
{
+#ifndef DISABLE_DYNLOADING
SwFuncPtrCreateDialogFactory fp = 0;
static ::osl::Module aDialogLibrary;
static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True));
@@ -49,6 +58,9 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
if ( fp )
return fp();
return 0;
+#else
+ return SwCreateDialogFactory();
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index 62d92c2..7b92e89 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -33,6 +33,10 @@ namespace swui
}
}
+#ifdef DISABLE_DYNLOADING
+#define CreateDialogFactory SwCreateDialogFactory
+#endif
+
extern "C"
{
SAL_DLLPUBLIC_EXPORT SwAbstractDialogFactory* CreateDialogFactory()
diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx
index cbc7293..4a1cb99 100644
--- a/toolkit/source/helper/accessibilityclient.cxx
+++ b/toolkit/source/helper/accessibilityclient.cxx
@@ -178,7 +178,11 @@ namespace toolkit
}
//--------------------------------------------------------------------
+#ifndef DISABLE_DYNLOADING
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+ extern "C" void *getStandardAccessibleFactory();
+#endif
void AccessibilityClient::ensureInitialized()
{
@@ -194,6 +198,7 @@ namespace toolkit
// load the library implementing the factory
if ( !s_pFactory.get() )
{
+#ifndef DISABLE_DYNLOADING
const ::rtl::OUString sModuleName( SVLIBRARY( "acc" ) );
s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
if ( s_hAccessibleImplementationModule != NULL )
@@ -205,6 +210,9 @@ namespace toolkit
}
OSL_ENSURE( s_pAccessibleFactoryFunc, "AccessibilityClient::ensureInitialized: could not load the library, or not retrieve the needed symbol!" );
+#else
+ s_pAccessibleFactoryFunc = getStandardAccessibleFactory;
+#endif
// get a factory instance
if ( s_pAccessibleFactoryFunc )
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 3186ba9..6db6b95 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -34,16 +34,24 @@
typedef VclAbstractDialogFactory* (__LOADONCALLAPI *FuncPtrCreateDialogFactory)();
+#ifndef DISABLE_DYNLOADING
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+extern "C" VclAbstractDialogFactory* CreateDialogFactory();
+#endif
VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
{
FuncPtrCreateDialogFactory fp = 0;
+#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( CUI_DLL_NAME ),
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
fp = ( VclAbstractDialogFactory* (__LOADONCALLAPI*)() )
aDialogLibrary.getFunctionSymbol( ::rtl::OUString("CreateDialogFactory") );
+#else
+ fp = CreateDialogFactory;
+#endif
if ( fp )
return fp();
return 0;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 1fdad86..86c06d1 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -25,6 +25,10 @@
#include <svids.hrc>
#include <window.h>
+#ifdef DISABLE_DYNLOADING
+#include <dlfcn.h> // For RTLD_DEFAULT
+#endif
+
namespace
{
SymbolType mapStockToSymbol(OString sType)
@@ -474,7 +478,9 @@ bool VclBuilder::extractImage(const OString &id, stringmap &rMap)
return false;
}
+#ifndef DISABLE_DYNLOADING
extern "C" { static void SAL_CALL thisModule() {} }
+#endif
Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OString &id, stringmap &rMap)
{
@@ -664,6 +670,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
sal_Int32 nDelim = name.indexOf(':');
if (nDelim != -1)
{
+#ifndef DISABLE_DYNLOADING
OUStringBuffer sModule;
#ifdef SAL_DLLPREFIX
sModule.append(SAL_DLLPREFIX);
@@ -672,10 +679,15 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
#ifdef SAL_DLLEXTENSION
sModule.append(SAL_DLLEXTENSION);
#endif
+#endif
OUString sFunction(OStringToOUString(OString("make") + name.copy(nDelim+1), RTL_TEXTENCODING_UTF8));
+#ifndef DISABLE_DYNLOADING
osl::Module aModule;
aModule.loadRelative(&thisModule, sModule.makeStringAndClear());
customMakeWidget pFunction = (customMakeWidget)aModule.getFunctionSymbol(sFunction);
+#else
+ customMakeWidget pFunction = (customMakeWidget)osl_getFunctionSymbol((oslModule) RTLD_DEFAULT, sFunction.pData);
+#endif
if (pFunction)
pWindow = (*pFunction)(pParent, rMap);
}
commit 1691752dd29d661552700d9bcac5d3a3953fb91a
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Oct 7 07:45:10 2012 +0300
When DISABLE_DYNLOADING don't even provide any module loading/unloading API
Will then cause compilation errors where they are used, which will be
noticed and taken care of. (The code chanaged to either use direct
linking instead, when it makes sense, or to just bypass the
functionality that requires dynamic loading.)
Much better than waiting until run-time to notice where dynamic
loading is attempted.
Change-Id: Ib0cb5a2524b5c63f8e27670e7d72e37ce2a8e6e9
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index a144b3c..a2c937d 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -52,13 +52,13 @@ $(eval $(call gb_Module_add_targets,sal,\
endif
$(eval $(call gb_Module_add_check_targets,sal,\
- CppunitTest_Module_DLL \
+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),,CppunitTest_Module_DLL) \
CppunitTest_sal_bytesequence \
CppunitTest_sal_checkapi \
CppunitTest_sal_osl_condition \
$(if $(filter $(OS),WNT),, \
CppunitTest_sal_osl_file) \
- CppunitTest_sal_osl_module \
+ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),,CppunitTest_sal_osl_module) \
CppunitTest_sal_osl_old_test_file \
CppunitTest_sal_osl_security \
CppunitTest_sal_osl_thread \
diff --git a/sal/inc/osl/module.h b/sal/inc/osl/module.h
index f589099..1a886bf 100644
--- a/sal/inc/osl/module.h
+++ b/sal/inc/osl/module.h
@@ -70,6 +70,8 @@ typedef void* oslModule;
*/
typedef void ( SAL_CALL *oslGenericFunction )( void );
+#ifndef DISABLE_DYNLOADING
+
/** Load a shared library or module.
@param strModuleName denotes the name of the module to be loaded.
@param nRtldMode denotes the mode.
@@ -129,6 +131,8 @@ SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleRelativeAscii(
FullTextEncodingDataSingleton in sal/textenc/textenc.cxx, so can be used
in its implementation without running into circles. */
+#endif
+
/** Retrieve the handle of an already loaded module.
This function can be used to search for a function symbol in the process address space.
@@ -151,10 +155,14 @@ SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleRelativeAscii(
*/
SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult);
+#ifndef DISABLE_DYNLOADING
+
/** Release the module
*/
SAL_DLLPUBLIC void SAL_CALL osl_unloadModule(oslModule Module);
+#endif
+
/** lookup the specified symbol name.
@return address of the symbol or NULL if lookup failed.
*/
diff --git a/sal/inc/osl/module.hxx b/sal/inc/osl/module.hxx
index 0d7bca6..152db85 100644
--- a/sal/inc/osl/module.hxx
+++ b/sal/inc/osl/module.hxx
@@ -72,16 +72,24 @@ public:
Module(): m_Module(0){}
+#ifndef DISABLE_DYNLOADING
+
Module( const ::rtl::OUString& strModuleName, sal_Int32 nRtldMode = SAL_LOADMODULE_DEFAULT) : m_Module(0)
{
load( strModuleName, nRtldMode);
}
+#endif
+
~Module()
{
+#ifndef DISABLE_DYNLOADING
osl_unloadModule(m_Module);
+#endif
}
+#ifndef DISABLE_DYNLOADING
+
sal_Bool SAL_CALL load( const ::rtl::OUString& strModuleName,
sal_Int32 nRtldMode = SAL_LOADMODULE_DEFAULT)
{
@@ -119,6 +127,8 @@ public:
}
}
+#endif
+
sal_Bool SAL_CALL is() const
{
return m_Module != NULL;
diff --git a/sal/osl/all/loadmodulerelative.cxx b/sal/osl/all/loadmodulerelative.cxx
index f3ea7bf..6b7cf0e 100644
--- a/sal/osl/all/loadmodulerelative.cxx
+++ b/sal/osl/all/loadmodulerelative.cxx
@@ -43,6 +43,8 @@
extern "C" {
+#ifndef DISABLE_DYNLOADING
+
oslModule SAL_CALL osl_loadModuleRelative(
oslGenericFunction const baseModule, rtl_uString * const relativePath,
sal_Int32 const mode)
@@ -67,6 +69,8 @@ oslModule SAL_CALL osl_loadModuleRelative(
return ::osl_loadModule(abs.pData, mode);
}
+#endif // !DISABLE_DYNLOADING
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx
index 386aa0b..ed2f675 100644
--- a/sal/osl/unx/module.cxx
+++ b/sal/osl/unx/module.cxx
@@ -118,6 +118,9 @@ static sal_Bool getModulePathFromAddress(void * address, rtl_String ** path) {
return result;
}
+
+#ifndef DISABLE_DYNLOADING
+
/*****************************************************************************/
/* osl_loadModule */
/*****************************************************************************/
@@ -157,7 +160,6 @@ oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nR
"sal.osl", "only either LAZY or NOW");
if (pModuleName)
{
-#ifndef DISABLE_DYNLOADING
#ifdef ANDROID
(void) nRtldMode;
void *pLib = lo_dlopen(pModuleName);
@@ -173,11 +175,6 @@ oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nR
<< dlerror());
#endif
return ((oslModule)(pLib));
-
-#else /* DISABLE_DYNLOADING */
- (void) nRtldMode;
- fprintf(stderr, "No DL Functions, osl_loadModuleAscii(%s) does nothing\n", pModuleName);
-#endif /* DISABLE_DYNLOADING */
}
return NULL;
}
@@ -212,6 +209,8 @@ oslModule osl_loadModuleRelativeAscii(
}
}
+#endif // !DISABLE_DYNLOADING
+
/*****************************************************************************/
/* osl_getModuleHandle */
/*****************************************************************************/
@@ -227,6 +226,8 @@ osl_getModuleHandle(rtl_uString *, oslModule *pResult)
return sal_True;
}
+#ifndef DISABLE_DYNLOADING
+
/*****************************************************************************/
/* osl_unloadModule */
/*****************************************************************************/
@@ -234,7 +235,6 @@ void SAL_CALL osl_unloadModule(oslModule hModule)
{
if (hModule)
{
-#ifndef DISABLE_DYNLOADING
#ifdef ANDROID
int nRet = lo_dlclose(hModule);
#else
@@ -242,10 +242,11 @@ void SAL_CALL osl_unloadModule(oslModule hModule)
#endif
SAL_INFO_IF(
nRet != 0, "sal.osl", "dlclose(" << hModule << "): " << dlerror());
-#endif /* ifndef DISABLE_DYNLOADING */
}
}
+#endif // !DISABLE_DYNLOADING
+
/*****************************************************************************/
/* osl_getSymbol */
/*****************************************************************************/
commit 68669491ade83c395144b66a4f65cd7720f76a55
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Oct 5 12:47:18 2012 +0300
Don't do these for Android and iOS for now
Again, must of the rest of the stuff here probably doesn't make sense
for Android or iOS either, but at least it compiles. (It won't get
linked into an app anyway, so just a small waste of time to have it
compiled.)
Change-Id: I32f56a11312c6a3b5eba00d2db8f0a43dd0752e0
diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk
index 40ae09b..67133d0 100644
--- a/extensions/Module_extensions.mk
+++ b/extensions/Module_extensions.mk
@@ -31,10 +31,11 @@ $(eval $(call gb_Module_add_targets,extensions,\
AllLangResTarget_abp \
AllLangResTarget_scn \
AllLangResTarget_upd \
- Library_abp \
- Library_log \
Library_res \
- Library_scn \
+ $(if $(filter IOS ANDROID,$(OS)),, \
+ Library_abp \
+ Library_log \
+ Library_scn) \
))
ifneq ($(filter-out IOS ANDROID,$(OS)),)
commit ed95cdf4f22c40223e2829d96b9959016eb6002c
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Oct 5 12:30:49 2012 +0300
No point with ODBC for Android or iOS
Sure, little point for them with the other stuff here in connectivity
either, but those parts at least compile. If/when I get back to
getting the --disable-database-connectivity thing to work, all of
conectivity will be bypassed for Android and iOS, of course.
Change-Id: I4eeeb9ccdf46fb2e1df8bf75aef63e17cbb97bbf
diff --git a/connectivity/Module_connectivity.mk b/connectivity/Module_connectivity.mk
index beb34bd..3cd7daa 100644
--- a/connectivity/Module_connectivity.mk
+++ b/connectivity/Module_connectivity.mk
@@ -45,8 +45,9 @@ $(eval $(call gb_Module_add_targets,connectivity,\
Library_file \
Library_flat \
Library_mysql \
- Library_odbc \
- Library_odbcbase \
+ $(if $(filter ANDROID IOS,$(OS)),, \
+ Library_odbc \
+ Library_odbcbase) \
Library_sdbc2 \
Package_generated \
Package_inc \
More information about the Libreoffice-commits
mailing list