[Libreoffice-commits] .: Branch 'feature/android-single-dso' - 9 commits - android/experimental configure.in 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 solenv/gbuild svtools/source svx/source sw/inc sw/source toolkit/source vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 7 00:27:44 PDT 2012


 android/experimental/DocumentLoader/Makefile                                                 |    4 
 android/experimental/DocumentLoader/native-code.cxx                                          |    4 
 android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java |    3 
 configure.in                                                                                 |    2 
 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                                                                  |   19 +-
 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 +++
 solenv/gbuild/UnoApiTarget.mk                                                                |   23 ++
 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 
 62 files changed, 668 insertions(+), 63 deletions(-)

New commits:
commit 32c8a23022d6110dcc7a06f547e2277beaa503a3
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Oct 7 08:10:54 2012 +0300

    Let's use only comprehensive UDKAPI headers for Clang on OS X
    
    Change-Id: Ie5969a0f5772676f91c29fe946217d8d31bf514a

diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index bfbebab..7e0ff8c 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -298,9 +298,28 @@ endef
 # harm, by accident or careful design, on platforms where shared
 # libraries are used.)
 
+# We are experimenting with static linking on Android, too. There for
+# technical reasons to get around silly limitations in the OS, sigh.
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+gb_UnoApiHeadersTarget_UDKAPI_always_comprehensive = TRUE
+endif
+
+# It seems that when using the latest Xcode and Clang for OS X, we
+# also neeed to always generate comprehensive headers for
+# udkapi. Otherwise we get assertion failures in saxparser when doing
+# i18npool, at least.
+
+ifeq ($(OS),MACOSX)
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
+gb_UnoApiHeadersTarget_UDKAPI_always_comprehensive = TRUE
+endif
+endif
+
+
 $(call gb_UnoApiHeadersTarget_get_bootstrap_target,%) : \
 		$(gb_UnoApiHeadersTarget_CPPUMAKERTARGET)
-	$(if $(filter TRUEudkapi,$(DISABLE_DYNLOADING)$*), \
+	$(if $(filter TRUEudkapi,$(gb_UnoApiHeadersTarget_UDKAPI_always_comprehensive)$*), \
 		$(call gb_Output_announce,$*,$(true),HPB,3) \
 		$(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$*),-C), \
 	\
@@ -315,7 +334,7 @@ $(call gb_UnoApiHeadersTarget_get_comprehensive_target,%) : \
 
 $(call gb_UnoApiHeadersTarget_get_target,%) : \
 		$(gb_UnoApiHeadersTarget_CPPUMAKERTARGET)
-	$(if $(filter TRUEudkapi,$(DISABLE_DYNLOADING)$*), \
+	$(if $(filter TRUEudkapi,$(gb_UnoApiHeadersTarget_UDKAPI_always_comprehensive)$*), \
 		$(call gb_Output_announce,$*,$(true),HPP,3) \
 		$(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_dir,$*),-C), \
 	\
commit 88959de770f6db87117a2db94eb17290213933ca
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 686b005..1468ef7 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 070b1d8..6da2759 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -606,7 +606,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 0891d8b..18535e5 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -567,6 +567,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 f25b1b5..147fd97 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -198,6 +198,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 fd1e89c..5cb6523 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -223,6 +223,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 0b114e6..bc2e8d4 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -231,6 +231,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 a22c1b4..51e191e 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -278,6 +278,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 efd69b6..cebb76b 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -608,6 +608,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 6ffc6ff..a18920f 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -259,6 +259,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 2e6e613..15e484c 100644
--- a/filter/source/graphicfilter/idxf/idxf.cxx
+++ b/filter/source/graphicfilter/idxf/idxf.cxx
@@ -36,6 +36,10 @@
 
 //================== 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 008e7f7..578e854 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -503,6 +503,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 ec79336..64f6cf8 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2727,6 +2727,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 5848227..1357196 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -528,6 +528,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 211ad60..fd4bfaa 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -376,6 +376,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 0fd6d16..2ab5371 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -408,6 +408,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 879300b..f7d2baf 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1872,6 +1872,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 2066a15..bd4f421 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -727,6 +727,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 6298b9f..e61cc20 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -346,6 +346,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 080b0b9..c3f92b4 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -750,6 +750,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 76b1156..ac8a09e 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1373,6 +1373,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 28276b8..2bb8f77 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 47e6bc6..4a12002 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -168,8 +168,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;
@@ -180,6 +188,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 );
@@ -188,6 +197,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 217f9a2..8d0f2e2 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -913,7 +913,9 @@ class ImpFilterLibCache;
 struct ImpFilterLibCacheEntry
 {
     ImpFilterLibCacheEntry* mpNext;
+#ifndef DISABLE_DYNLOADING
     osl::Module             maLibrary;
+#endif
     String                  maFiltername;
     PFilterCall             mpfnImport;
     PFilterDlgCall          mpfnImportDlg;
@@ -928,19 +930,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;
 }
@@ -1001,19 +1051,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;
 };
@@ -1733,6 +1786,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 )
 {
@@ -2048,11 +2116,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 dcda126..4a88dfb 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 da1ef37..c79173e 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 4a80df1..35adb69 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 349eb36..f4a5087 100644
--- a/toolkit/source/helper/accessibilityclient.cxx
+++ b/toolkit/source/helper/accessibilityclient.cxx
@@ -187,7 +187,11 @@ namespace toolkit
     }
 
     //--------------------------------------------------------------------
+#ifndef DISABLE_DYNLOADING
     extern "C" { static void SAL_CALL thisModule() {} }
+#else
+    extern "C" void *getStandardAccessibleFactory();
+#endif
 
     void AccessibilityClient::ensureInitialized()
     {
@@ -203,6 +207,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 )
@@ -214,6 +219,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;
commit 05cdc0efc88975a59de2c84ed808310fbc2bd5f9
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 a1a4a67..52af499 100644
--- a/sal/inc/osl/module.h
+++ b/sal/inc/osl/module.h
@@ -67,6 +67,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.
@@ -126,6 +128,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.
@@ -148,10 +152,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 c61c6a2d2d3c4a5daacb4bc7be884f0a7c4c8ee7
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 c76389b864c82dc700234da057446fe41f485809
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 2c6649a..25514c9 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 \
commit b15dff422097b32612478621f5cda5c76c0b8e41
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Oct 7 10:14:08 2012 +0300

    Unset HAVE_THREADSAFE_STATICS for Android too, for now
    
    The code generated by cppumaker in the comprehensive case is in fact
    broken, says sberg, and this is a way around it until it is fixed.
    
    Change-Id: I0a3950d28e39a83f293f04fad9e0be80e131e3e9

diff --git a/configure.in b/configure.in
index 5b4b390..4335a6e 100644
--- a/configure.in
+++ b/configure.in
@@ -5061,7 +5061,7 @@ if test "$GCC" = "yes"; then
         dnl __cxa_guard_acquire in GCC's libstdc++-v3/libsupc++/guard.cc for
         dnl what #ifdefs actually make a difference there.  Conservative advice
         dnl from Jakub Jelinek is to assume it working in GCC >= 4.3:
-        if test "$_os" = "Darwin" -o "${GCCVER?}" -lt 040300; then
+        if test "$_os" = "Darwin" -o $_os = Android -o "${GCCVER?}" -lt 040300; then
             unset HAVE_THREADSAFE_STATICS
             AC_MSG_RESULT([broken (i.e., no)])
         else
commit 2342522f8710953c6e77d72b9d8ffd79951fa0d1
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Oct 7 10:13:28 2012 +0300

    Update library names for DISABLE_DYNLOADING
    
    Change-Id: I2b5e4abdceea25180c9caafabc49c22077016a05

diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index f6a93f7..070b1d8 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -462,6 +462,7 @@ extern "C"
     extern void * filterconfig1_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * fwk_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * introspection_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * localebe1_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * package2_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * reflection_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * sfx_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
@@ -534,18 +535,26 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
 
     // First test library names that aren't app-specific.
     static lib_to_component_mapping non_app_specific_map[] = {
+        // Sigh, the name under which the bootstrap component is looked for
+        // varies a lot? Or then I just have been confused by some mixed-up
+        // incremental build.
         { "bootstrap.uno" SAL_DLLEXTENSION, bootstrap_component_getFactory },
         { "bootstrap.uno.a", bootstrap_component_getFactory },
-        { "configmgr.uno.a", configmgr_component_getFactory },
-        { "i18npool.uno.a", i18npool_component_getFactory },
-        { "introspection.uno.a", introspection_component_getFactory },
+        { "libbootstrap.uno.a", bootstrap_component_getFactory },
+        // The rest seems to consistently have a "lib" prefix now
+        { "libconfigmgr.uno.a", configmgr_component_getFactory },
         { "libcomphelp" CPPU_STRINGIFY(CPPU_ENV) ".a", comphelp_component_getFactory },
         { "libexpwrap.uno.a", expwrap_component_getFactory },
         { "libfastsax.uno.a", fastsax_component_getFactory },
         { "libfilterconfiglo.a", filterconfig1_component_getFactory },
         { "libfwklo.a", fwk_component_getFactory },
+        { "libi18npool.uno.a", i18npool_component_getFactory },
+        { "libintrospection.uno.a", introspection_component_getFactory },
+        { "liblocalebe1.uno.a", localebe1_component_getFactory },
         { "libpackage2.a", package2_component_getFactory },
+        { "libreflection.uno.a", reflection_component_getFactory },
         { "libsfxlo.a", sfx_component_getFactory },
+        { "libstocservices.uno.a", stocservices_component_getFactory },
         { "libsvllo.a", svl_component_getFactory },
         { "libtklo.a", tk_component_getFactory },
         { "libucb1.a", ucb_component_getFactory },
@@ -553,8 +562,6 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
         { "libutllo.a", utl_component_getFactory },
         { "libvcllo.a", vcl_component_getFactory },
         { "libxstor.a", xstor_component_getFactory },
-        { "reflection.uno.a", reflection_component_getFactory },
-        { "stocservices.uno.a", stocservices_component_getFactory },
         { NULL, NULL }
     };
     for (int i = 0; pSym == NULL && non_app_specific_map[i].lib != NULL; ++i)
commit a93c0d572f50b5bb58a7cf0696844b75dc5a1187
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Oct 7 10:12:32 2012 +0300

    More libs
    
    Change-Id: I4f717cfdf8e13044931e6820cc9fe6f74fc8aa7f

diff --git a/android/experimental/DocumentLoader/Makefile b/android/experimental/DocumentLoader/Makefile
index 3919144..5addd20 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -85,6 +85,7 @@ LIBS = \
 	libotouchlo \
 	lnglo \
 	lo-bootstrap \
+	localebe1.uno \
 	localedata_en \
 	localedata_es \
 	localedata_euro \
@@ -99,6 +100,9 @@ LIBS = \
 	ooxlo \
 	orcus \
 	package2 \
+	raptor \
+	rasqal \
+	rdf \
 	reflection.uno \
 	reg \
 	saxlo \
diff --git a/android/experimental/DocumentLoader/native-code.cxx b/android/experimental/DocumentLoader/native-code.cxx
index 48b0727..cae7b52 100644
--- a/android/experimental/DocumentLoader/native-code.cxx
+++ b/android/experimental/DocumentLoader/native-code.cxx
@@ -32,9 +32,11 @@ extern "C"
     extern void * t602filter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * textfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * unoxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * unordf_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * wpftdraw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * wpftwriter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * xmlfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * xmlsecurity_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * xo_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
     extern void * xof_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
 }
@@ -65,10 +67,12 @@ lo_get_libmap(void)
         { "libswlo.a", sw_component_getFactory },
         { "libt602filterlo.a", t602filter_component_getFactory },
         { "libtextfdlo.a", textfd_component_getFactory },
+        { "libunordflo.a", unordf_component_getFactory },
         { "libunoxmllo.a", unoxml_component_getFactory },
         { "libwpftdrawlo.a", wpftdraw_component_getFactory },
         { "libwpftwriterlo.a", wpftwriter_component_getFactory },
         { "libxmlfdlo.a", xmlfd_component_getFactory },
+        { "libxmlsecurity.a", xmlsecurity_component_getFactory },
         { "libxoflo.a", xof_component_getFactory },
         { "libxolo.a", xo_component_getFactory },
         { NULL, NULL }
commit c231f685b363ef88675cfe16428c745fdba8a189
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Oct 7 10:12:22 2012 +0300

    Some more logging
    
    Change-Id: Ib901de4a10cb18ce8e1f5d0293c61ab0eed2a4e8

diff --git a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index c4ffcfe..ea7d21b 100644
--- a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -597,6 +597,7 @@ public class DocumentLoader
                           final int level,
                           final int location)
     {
+        Log.i(TAG, "renderPage(" + number + ", " + level + ", " + location + ")");
         try {
             // Use dummySmallDevice with no scale or offset just to find out
             // the paper size of this page.
@@ -727,6 +728,8 @@ public class DocumentLoader
             {
                 int number = params[0];
 
+                Log.i(TAG, "doInBackground(" + number + ")");
+
                 if (number >= pageCount)
                     return -1;
 


More information about the Libreoffice-commits mailing list