diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-07-12 23:13:10 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-07-12 23:56:59 +0200 |
commit | 82f742f65d35896c69be38fa3b1c78a22226f71c (patch) | |
tree | 0fd1bf6f53323e0b14df87e49b94449c74bc52f3 /vcl/win | |
parent | d7d37d2101ce468e6ae2e1fd711cd7df321a5378 (diff) |
fdo#66811: vcl: fix broken OUString with length STRING_LEN
ImplSalGetUniString was wrongly converted and constructs OUString with
invalid length in WinSalGraphics::CreateFontSubset; this is then
implicitly converted to an empty UniString so the font names are
missing in the PDF files generated on Windows.
(regression from 9e310cc32923ceb4b18d97ce68d54a339b935f01)
Change-Id: I1603e62cf18f353f3d7de322b9111a173dc6b225
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/app/saldata.cxx | 5 | ||||
-rw-r--r-- | vcl/win/source/gdi/salprn.cxx | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index 2a3ea0994f80..fc9967459dda 100644 --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -44,9 +44,10 @@ rtl_TextEncoding ImplSalGetSystemEncoding() // ----------------------------------------------------------------------- -OUString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen ) +OUString ImplSalGetUniString(const sal_Char* pStr, sal_Int32 const nLen) { - return OUString( pStr, nLen, ImplSalGetSystemEncoding(), + return OUString( pStr, (-1 == nLen) ? strlen(pStr) : nLen, + ImplSalGetSystemEncoding(), RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT ); diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 385a15ee59b9..bc9074359a13 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -266,7 +266,7 @@ OUString WinSalInstance::GetDefaultPrinter() char* pTmp = pBuf; while ( *pTmp && (*pTmp != ',') ) pTmp++; - return ImplSalGetUniString( pBuf, (xub_StrLen)(pTmp-pBuf) ); + return ImplSalGetUniString( pBuf, static_cast<sal_Int32>(pTmp-pBuf) ); } else return OUString(); |