diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-10-07 11:50:10 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-10-07 11:54:14 +0300 |
commit | 5c02bb0f022ae6f51ccc07452901ad45a9a243e9 (patch) | |
tree | 54f740893e864ea379821521eb17d843c43bda5e /sfx2 | |
parent | 8226b906382a98b6680ef8b09866786f42510143 (diff) |
DISABLE_DYNLOADING fixes and minor cleanup
Change-Id: I08ce3523f259b1ace7c2a1a58b091b43a44a7d92
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/app.cxx | 33 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 7 |
2 files changed, 30 insertions, 10 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 3aa48ab14e60..a4ffed8510e7 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -468,17 +468,22 @@ void SfxApplication::Invalidate( sal_uInt16 nId ) Invalidate_Impl( pFrame->GetBindings(), nId ); } -#define DOSTRING( x ) #x -#define STRING( x ) DOSTRING( x ) - #ifndef DISABLE_SCRIPTING +#ifndef DISABLE_DYNLOADING + typedef long (SAL_CALL *basicide_handle_basic_error)(void*); -typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(void*, sal_Bool, rtl_uString*); typedef void* (SAL_CALL *basicide_macro_organizer)(sal_Int16); extern "C" { static void SAL_CALL thisModule() {} } +#else + +extern "C" long basicide_handle_basic_error(void*); +extern "C" void *basicide_macro_organizer(sal_Int16); + +#endif + #endif IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) @@ -487,6 +492,8 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) (void) pStarBasic; return 0; #else + +#ifndef DISABLE_DYNLOADING // get basctl dllname static ::rtl::OUString aLibName( SVLIBRARY( "basctl" ) ); @@ -501,7 +508,14 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) // call basicide_handle_basic_error in basctl long nRet = pSymbol ? pSymbol( pStarBasic ) : 0; +#else + + long nRet = basicide_handle_basic_error( pStarBasic ); + +#endif + return nRet; + #endif } @@ -586,6 +600,8 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId ) #ifdef DISABLE_SCRIPTING (void) nTabId; #else + +#ifndef DISABLE_DYNLOADING // get basctl dllname static ::rtl::OUString aLibName( SVLIBRARY( "basctl" ) ); @@ -597,8 +613,15 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId ) ::rtl::OUString aSymbol( "basicide_macro_organizer" ); basicide_macro_organizer pSymbol = (basicide_macro_organizer) osl_getFunctionSymbol( handleMod, aSymbol.pData ); - // call basicide_choose_macro in basctl + // call basicide_macro_organizer in basctl pSymbol( nTabId ); + +#else + + basicide_macro_organizer( nTabId ); + +#endif + #endif } diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 08d0352c6b63..450da3e9eebc 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -836,14 +836,11 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) #ifndef DISABLE_SCRIPTING +#ifndef DISABLE_DYNLOADING + 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 |