summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-05-08 17:11:09 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-05-08 17:18:01 +0300
commit02cf8bf47252cdaeaed7179ebd002692065583d0 (patch)
tree78b95b1d1c3a2d807af83045085281dfdd4c6017 /vcl/win
parent1437b877391a5c3f79bbbcab415b83e1189e5617 (diff)
Fix lookup of path to usp10.dll
Just using the identifier ScriptIsComplex apparently results in the address of its import stub, which has been linked into the calling DLL (vcllo.dll). We need to look up that symbols from the handle of usp10.dll to get the actual function's address, to be passed to osl_getModuleURLFromAddress(). (Nothing magic with ScriptIsComplex here, it is just an arbitrary function from usp10.dll.) Change-Id: I If000d0c2eae3e3e32ce0ad1c26e545304d6f6d9e
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/gdi/winlayout.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 666212e1644f..fa804d19089a 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1110,10 +1110,11 @@ static bool bManualCellAlign = true;
static bool InitUSP()
{
// get the usp10.dll version info
+ HMODULE usp10 = ::GetModuleHandle("usp10.dll");
+ void *pScriptIsComplex = ::GetProcAddress(usp10, "ScriptIsComplex");
int nUspVersion = 0;
- // TODO: there must be a simpler way to get the friggin version info from OSL?
rtl_uString* pModuleURL = NULL;
- osl_getModuleURLFromAddress( (void*)ScriptIsComplex, &pModuleURL );
+ osl_getModuleURLFromAddress( pScriptIsComplex, &pModuleURL );
rtl_uString* pModuleFileName = NULL;
if( pModuleURL )
osl_getSystemPathFromFileURL( pModuleURL, &pModuleFileName );