[Libreoffice-commits] core.git: Branch 'libreoffice-4-1-0' - vcl/inc vcl/win
Michael Stahl
mstahl at redhat.com
Tue Jul 16 03:03:59 PDT 2013
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 bf352cd0ed5a94859f9163fcaa2089a93c9e938e
Author: Michael Stahl <mstahl at 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 <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 6089121ebd075bb6422d33d6bff69dff2e88efb2)
Reviewed-on: https://gerrit.libreoffice.org/4932
Reviewed-by: David Tardon <dtardon at redhat.com>
Reviewed-by: Petr Mladek <pmladek at suse.cz>
Tested-by: Petr Mladek <pmladek at suse.cz>
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();
More information about the Libreoffice-commits
mailing list