summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appinit.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-10-07 07:52:26 +0300
committerTor Lillqvist <tml@iki.fi>2012-10-07 07:59:15 +0300
commit97593ae24a98daca89fad176dc2492e582b3a821 (patch)
treef52189545a5c5ffbc7cece7bca595b2cd18c9cc0 /sfx2/source/appl/appinit.cxx
parent1691752dd29d661552700d9bcac5d3a3953fb91a (diff)
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
Diffstat (limited to 'sfx2/source/appl/appinit.cxx')
-rw-r--r--sfx2/source/appl/appinit.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 4d53e49d5fc5..d79f838118f6 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -166,8 +166,16 @@ typedef bool ( *PFunc_getSpecialCharsForEdit)( Window* i_pParent, const Font& i_
// a library above us.
//====================================================================
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" bool GetSpecialCharsForEdit( Window* i_pParent, const Font& i_rFont, String& o_rOutString );
+
+#endif
+
String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
{
static bool bDetermineFunction = false;
@@ -178,6 +186,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
{
bDetermineFunction = true;
+#ifndef DISABLE_DYNLOADING
static ::rtl::OUString aLibName( SVLIBRARY( "cui" ) );
oslModule handleMod = osl_loadModuleRelative(
&thisModule, aLibName.pData, 0 );
@@ -186,6 +195,9 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
::rtl::OUString aSymbol( "GetSpecialCharsForEdit" );
pfunc_getSpecialCharsForEdit = (PFunc_getSpecialCharsForEdit)osl_getFunctionSymbol( handleMod, aSymbol.pData );
DBG_ASSERT( pfunc_getSpecialCharsForEdit, "GetSpecialCharsForEdit() not found!" );
+#else
+ pfunc_getSpecialCharsForEdit = GetSpecialCharsForEdit;
+#endif
}
String aRet;