summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-09-30 16:07:16 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-25 19:53:22 +0200
commite194f597ae5882e1cda2cac2925577fff609f101 (patch)
tree5607412d62d9f40415992255e849b8425e4cd6a3 /vcl/win
parentb5a6865a67dc6223dc164d2fe68dfdaf4dab5c39 (diff)
Change GlyphItem::nFallbackLevel to font instance
No need for a real reference, as GlyphItems are bound to their GenericSalLayout, which holds the valid reference and doesn't allow font change. Change-Id: I8e1129ef99f576e43d55f39aee040ceeb635d51d Reviewed-on: https://gerrit.libreoffice.org/62359 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/salfont.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 8ee9c60e2537..b5a0efbf047e 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1328,7 +1328,7 @@ void WinSalGraphics::ClearDevFontCache()
bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
- rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.m_nFallbackLevel];
+ rtl::Reference<WinFontInstance> pFont = static_cast<WinFontInstance*>(rGlyph.m_pFontInstance);
assert(pFont.is());
if (pFont.is() && pFont->GetCachedGlyphBoundRect(rGlyph.m_aGlyphId, rRect))
@@ -1546,7 +1546,7 @@ bool WinSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph,
// rescaling needed for the tools::PolyPolygon conversion
if( rB2DPolyPoly.count() )
{
- rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.m_nFallbackLevel];
+ rtl::Reference<WinFontInstance> pFont = static_cast<WinFontInstance*>(rGlyph.m_pFontInstance);
assert(pFont.is());
float fFontScale = pFont.is() ? pFont->GetScale() : 1.0;
const double fFactor(fFontScale/256);