[Libreoffice-commits] .: ucb/source
Tor Lillqvist
tml at kemper.freedesktop.org
Thu Sep 15 07:38:44 PDT 2011
ucb/source/ucp/odma/odma_lib.cxx | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 31526bc15e409fb3260b465d928ddcb855266278
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Thu Sep 15 17:05:58 2011 +0300
Improve the Windows code a bit
diff --git a/ucb/source/ucp/odma/odma_lib.cxx b/ucb/source/ucp/odma/odma_lib.cxx
index 91cd79e..a7f3170 100644
--- a/ucb/source/ucp/odma/odma_lib.cxx
+++ b/ucb/source/ucp/odma/odma_lib.cxx
@@ -80,16 +80,23 @@ namespace odma
if (bBeenHere)
return bLoaded;
+ bBeenHere = sal_True;
+
::rtl::OUString sPath;
#ifdef WNT
- sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA32.DLL"));
+ wchar_t system32[MAX_PATH];
+ UINT n = GetSystemDirectoryW( system32, MAX_PATH );
+
+ if (n == 0)
+ return sal_False;
+
+ sPath = ::rtl::OUString( 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