summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2015-03-19 23:57:49 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2015-03-20 20:55:04 +0100
commit4c251ddd72af765dd9e665150176c2d931322b9c (patch)
tree238d8ace607b1880e3ce84cd34f274759ce80e0e /vcl
parentf5c74abc9fbbe8fc652a85801a87073d40a79b2d (diff)
Fix creating custom dialog windows for libmerged
Change-Id: Idb1e67d8165298faca7c9a5a2a48097d5a82b497
Diffstat (limited to 'vcl')
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/source/window/builder.cxx17
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));