From d7fbc4ad10c954e8705716721018edf546862a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 7 Jan 2013 15:23:28 +0100 Subject: [PATCH] further windows build fix for vcl changes Caused by 1e1ba8611fb134fb693354daae8931e93e46124c and not fixed in 83f684c86c22df40ff1ef5fe7dc4b829a66c2645. Change-Id: I43853f1d933a70789c4b89a22d06d2d383493758 --- vcl/win/source/gdi/salgdi3.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 69a05ee23741..d533181bf33f 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -165,7 +165,9 @@ ImplFontAttrCache::ImplFontAttrCache( const String& rFileNameURL, const String& aCacheFile >> n; aDFA.SetFamilyType(static_cast(n)); aCacheFile >> n; aDFA.SetSymbolFlag(n != 0); - aCacheFile.ReadByteStringLine( aDFA.GetStyleName(), RTL_TEXTENCODING_UTF8 ); + String styleName; + aCacheFile.ReadByteStringLine( styleName, RTL_TEXTENCODING_UTF8 ); + aDFA.SetStyleName( styleName ); aFontAttributes[ aFontFileURL ] = aDFA; } @@ -904,7 +906,7 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rE aDFA.SetSymbolFlag(rLogFont.lfCharSet == SYMBOL_CHARSET); // get the font face name - aDFA.SetFamilyName(reinterpret_cast(rLogFont.lfFaceName)); + aDFA.SetFamilyName( String().Assign(reinterpret_cast(rLogFont.lfFaceName))); // use the face's style name only if it looks reasonable const wchar_t* pStyleName = rEnumFont.elfStyle; @@ -914,7 +916,7 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rE if( *p < 0x0020 ) break; if( p < pEnd ) - aDFA.SetStyleName(reinterpret_cast(pStyleName)); + aDFA.SetStyleName( String().Assign(reinterpret_cast(pStyleName))); // get device specific font attributes aDFA.mbOrientation = (nFontType & RASTER_FONTTYPE) == 0; @@ -1679,7 +1681,7 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe wchar_t aFaceName[LF_FACESIZE+60]; if( ::GetTextFaceW( mhDC, sizeof(aFaceName)/sizeof(wchar_t), aFaceName ) ) - pMetric->SetFamilyName(reinterpret_cast(aFaceName)); + pMetric->SetFamilyName( String().Assign( reinterpret_cast(aFaceName))); // get the font metric TEXTMETRICA aWinMetric;