summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-03-26 15:08:12 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-05-13 19:51:05 +0200
commitec6b6591cd9acf0c242bec8f10cfce5301f60a97 (patch)
treeb10b764ef8333e77a8e203b78aa19951abe3fa71
parent8e001487683d65b3e6765bc1b82cb77f3ca9426e (diff)
Fix windows build
After 54ac2b203a6dd974c0153996ba67b26d585e98e1 Change-Id: I805415dfa75568d843fceb5a79b637aac337ffd4
-rw-r--r--vcl/win/gdi/salfont.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index b0158f9154d5..f3d0cf97811e 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -932,6 +932,7 @@ void WinSalGraphics::SetFont( const FontSelectPattern* pFont, int nFallbackLevel
// WinSalGraphics::GetEmbedFontData does not set mpFontInstance
// since it is interested in font file data only.
mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<WinFontInstance*>( pFont->mpFontInstance.get() );
+ WinFontInstance *pFontInstance = static_cast<WinFontInstance*>(pFont->mpFontInstance.get());
HFONT hOldFont = nullptr;
HFONT hNewFont = pFontInstance ? pFontInstance->GetHFONT() : nullptr;
@@ -970,7 +971,6 @@ void WinSalGraphics::SetFont( const FontSelectPattern* pFont, int nFallbackLevel
}
if (mpWinFontEntry[i])
{
- GetWinFontEntry(i)->Release();
mpWinFontEntry[i] = nullptr;
}
mfFontScale[i] = 1.0;
@@ -1363,7 +1363,7 @@ void WinSalGraphics::ClearDevFontCache()
bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
- WinFontInstance* pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
+ rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
HFONT hNewFont = pFont ? pFont->GetHFONT() : mhFonts[rGlyph.mnFallbackLevel];
float fFontScale = pFont ? pFont->GetScale() : mfFontScale[rGlyph.mnFallbackLevel];
@@ -1572,7 +1572,7 @@ bool WinSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph,
// rescaling needed for the tools::PolyPolygon conversion
if( rB2DPolyPoly.count() )
{
- WinFontInstance *pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
+ rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
float fFontScale = pFont ? pFont->GetScale() : mfFontScale[rGlyph.mnFallbackLevel];
const double fFactor(fFontScale/256);
rB2DPolyPoly.transform(basegfx::utils::createScaleB2DHomMatrix(fFactor, fFactor));