[Libreoffice-commits] .: Branch 'libreoffice-3-4' - ucb/source
Michael Meeks
michael at kemper.freedesktop.org
Mon Sep 19 04:29:21 PDT 2011
ucb/source/ucp/odma/odma_lib.cxx | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
New commits:
commit 299ada910665c38cc9ccd7a20fb54f8b15229f8c
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Mon Sep 19 12:29:40 2011 +0100
Improve windows odma library location
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
diff --git a/ucb/source/ucp/odma/odma_lib.cxx b/ucb/source/ucp/odma/odma_lib.cxx
index 074c585..f998358 100644
--- a/ucb/source/ucp/odma/odma_lib.cxx
+++ b/ucb/source/ucp/odma/odma_lib.cxx
@@ -80,16 +80,25 @@ namespace odma
if (bBeenHere)
return bLoaded;
+ bBeenHere = sal_True;
+
::rtl::OUString sPath;
#ifdef WNT
- sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA32.DLL"));
+ OSL_ASSERT( sizeof( wchar_t ) == sizeof( sal_Unicode ) );
+
+ wchar_t system32[MAX_PATH];
+ UINT n = GetSystemDirectoryW( system32, MAX_PATH );
+
+ if (n == 0)
+ return sal_False;
+
+ sPath = ::rtl::OUString( reinterpret_cast< const sal_Unicode* >( system32 ), n ) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\\ODMA32.DLL"));
+
#endif
#ifdef UNX
sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libodma.so"));
#endif
- bBeenHere = sal_True;
-
pODMA = osl_loadModule( sPath.pData,SAL_LOADMODULE_NOW );
if( !pODMA)
return sal_False;
More information about the Libreoffice-commits
mailing list