vcl/inc/win/saldata.hxx | 2 +- vcl/win/source/app/saldata.cxx | 5 +++-- vcl/win/source/gdi/salprn.cxx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)
New commits: commit 6089121ebd075bb6422d33d6bff69dff2e88efb2 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 12 23:13:10 2013 +0200 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 (cherry picked from commit 82f742f65d35896c69be38fa3b1c78a22226f71c) Reviewed-on: https://gerrit.libreoffice.org/4875 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx index 4361448..fdf2faf 100644 --- a/vcl/inc/win/saldata.hxx +++ b/vcl/inc/win/saldata.hxx @@ -196,7 +196,7 @@ void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult ); void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ); rtl_TextEncoding ImplSalGetSystemEncoding(); -OUString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN ); +OUString ImplSalGetUniString(const sal_Char* pStr, sal_Int32 nLen = -1); int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); #define SAL_FRAME_WNDEXTRA sizeof( DWORD ) diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index 2a3ea09..fc99674 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 113fb18..94af77c 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();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits