diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/app.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/getbasctlfunction.cxx | 21 |
3 files changed, 11 insertions, 17 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index d9509a4a97c0..6844f919c4b2 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -392,7 +392,7 @@ IMPL_STATIC_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBas basicide_handle_basic_error pSymbol = reinterpret_cast<basicide_handle_basic_error>(sfx2::getBasctlFunction("basicide_handle_basic_error")); // call basicide_handle_basic_error in basctl - bool bRet = pSymbol && pSymbol( pStarBasic ); + bool bRet = pSymbol( pStarBasic ); #else @@ -477,9 +477,6 @@ void SfxApplication::MacroOrganizer(weld::Window* pParent, sal_Int16 nTabId) #ifndef DISABLE_DYNLOADING basicide_macro_organizer pSymbol = reinterpret_cast<basicide_macro_organizer>(sfx2::getBasctlFunction("basicide_macro_organizer")); - if (!pSymbol) - return; - // call basicide_macro_organizer in basctl pSymbol(pParent, nTabId); diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 3658bb82cf08..912363d7da75 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -1216,8 +1216,6 @@ static OUString ChooseMacro(weld::Window* pParent, const Reference<XModel>& rxLi { #ifndef DISABLE_DYNLOADING basicide_choose_macro pSymbol = reinterpret_cast<basicide_choose_macro>(sfx2::getBasctlFunction("basicide_choose_macro")); - if (!pSymbol) - return OUString(); #else #define pSymbol basicide_choose_macro #endif diff --git a/sfx2/source/appl/getbasctlfunction.cxx b/sfx2/source/appl/getbasctlfunction.cxx index e682ae80836c..4f272919174a 100644 --- a/sfx2/source/appl/getbasctlfunction.cxx +++ b/sfx2/source/appl/getbasctlfunction.cxx @@ -19,11 +19,12 @@ #include <sal/config.h> +#include <cassert> + #include <config_features.h> #include <config_options.h> #include <osl/module.h> #include <osl/module.hxx> -#include <sal/log.hxx> #include <tools/svlibrary.h> #include "getbasctlfunction.hxx" @@ -37,22 +38,20 @@ oslGenericFunction sfx2::getBasctlFunction(char const* name) osl::Module aMod; // load basctl module - if (!aMod.loadRelative( - &thisModule, + auto const ok = aMod.loadRelative( + &thisModule, #if ENABLE_MERGELIBS - SVLIBRARY("merged") + SVLIBRARY("merged") #else - SVLIBRARY("basctl") + SVLIBRARY("basctl") #endif - )) - { - SAL_WARN("sfx.appl", "cannot load basctl"); - return nullptr; - } + ); + assert(ok); + (void) ok; // get symbol auto pSymbol = aMod.getFunctionSymbol(name); - SAL_WARN_IF(!pSymbol, "sfx.appl", "cannot get basctl function " << name); + assert(pSymbol); aMod.release(); return pSymbol; |