summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-10-04 07:08:51 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-10-04 07:23:25 +0300
commitbd24ac7cb585392d42c113e3547c3074ca3f745c (patch)
treec97b26e02726663e5077309d15320a27220649ce /toolkit
parent0c1553a86e837b7538dc0f80316ed0798747756b (diff)
Link directly to CreateWindow (in svtools) when DISABLE_DYNLOADING
Change-Id: Iaf1f6c0fc76b97b1cfca63edfb91d5a39988c8c0
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 827b360beadb..4ee90412da7a 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -499,12 +499,14 @@ VCLXToolkit::~VCLXToolkit()
void SAL_CALL VCLXToolkit::disposing()
{
+#ifndef DISABLE_DYNLOADING
if ( hSvToolsLib )
{
osl_unloadModule( hSvToolsLib );
hSvToolsLib = NULL;
fnSvtCreateWindow = NULL;
}
+#endif
{
osl::Guard< osl::Mutex > aGuard( getInitMutex() );
@@ -1036,8 +1038,16 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
return pNewWindow;
}
+#ifndef DISABLE_DYNLOADING
+
extern "C" { static void SAL_CALL thisModule() {} }
+#else
+
+extern "C" Window* SAL_CALL CreateWindow( VCLXWindow** ppNewComp, const ::com::sun::star::awt::WindowDescriptor* pDescriptor, Window* pParent, WinBits nWinBits );
+
+#endif
+
css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
const css::awt::WindowDescriptor& rDescriptor,
WinBits nForceWinBits )
@@ -1070,8 +1080,13 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
// (do this _before_ creating it on our own: The old mechanism (extended toolkit in SvTools) did it this way,
// and we need to stay compatible)
// try to load the lib
- if ( !fnSvtCreateWindow && !hSvToolsLib )
+ if ( !fnSvtCreateWindow
+#ifndef DISABLE_DYNLOADING
+ && !hSvToolsLib
+#endif
+ )
{
+#ifndef DISABLE_DYNLOADING
::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName(
#ifdef LIBO_MERGELIBS
"merged",
@@ -1086,6 +1101,9 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
::rtl::OUString aFunctionName( "CreateWindow" );
fnSvtCreateWindow = (FN_SvtCreateWindow)osl_getFunctionSymbol( hSvToolsLib, aFunctionName.pData );
}
+#else
+ fnSvtCreateWindow = CreateWindow;
+#endif
}
// ask the SvTool creation function
if ( fnSvtCreateWindow )