diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vcl.mk | 1 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 17 |
2 files changed, 16 insertions, 2 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index a1a2d7fbd874..701766473404 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -49,6 +49,7 @@ $(eval $(call gb_Library_add_defs,vcl,\ -DCUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,cui))\" \ -DDESKTOP_DETECTOR_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,desktop_detector))\" \ -DTK_DLL_NAME=\"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,tk))\" \ + -DENABLE_MERGELIBS=$(if $(MERGELIBS),1,0) \ )) $(eval $(call gb_Library_use_sdk_api,vcl)) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 5a6475fe9afa..0d921f14f72a 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1664,14 +1664,15 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c } else { +#ifndef SAL_DLLPREFIX +#define SAL_DLLPREFIX "" +#endif sal_Int32 nDelim = name.indexOf('-'); if (nDelim != -1) { #ifndef DISABLE_DYNLOADING OUStringBuffer sModuleBuf; -#ifdef SAL_DLLPREFIX sModuleBuf.append(SAL_DLLPREFIX); -#endif sModuleBuf.append(OStringToOUString(name.copy(0, nDelim), RTL_TEXTENCODING_UTF8)); sModuleBuf.append(SAL_DLLEXTENSION); #endif @@ -1682,7 +1683,19 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c if (aI == m_aModuleMap.end()) { osl::Module* pModule = new osl::Module; +#if ENABLE_MERGELIBS + sModuleBuf.append(SAL_DLLPREFIX); + sModuleBuf.append("mergedlo"); + sModuleBuf.append(SAL_DLLEXTENSION); + OUString sMergedModule = sModuleBuf.makeStringAndClear(); + pModule->loadRelative(&thisModule, sMergedModule); + if (!pModule->getFunctionSymbol(sFunction)) + { + pModule->loadRelative(&thisModule, sModule); + } +#else pModule->loadRelative(&thisModule, sModule); +#endif aI = m_aModuleMap.insert(sModule, pModule).first; } customMakeWidget pFunction = reinterpret_cast<customMakeWidget>(aI->second->getFunctionSymbol(sFunction)); |