summaryrefslogtreecommitdiff
path: root/vcl/qt5
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/qt5
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/qt5')
-rw-r--r--vcl/qt5/Qt5Graphics_Text.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 9f6392435083..79b5c8fe1f8e 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -154,11 +154,7 @@ void Qt5Graphics::GetGlyphWidths(const PhysicalFontFace* /*pPFF*/, bool /*bVerti
bool Qt5Graphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
- const int nLevel = rGlyph.m_nFallbackLevel;
- if (nLevel >= MAX_FALLBACK)
- return false;
-
- Qt5Font* pFont = m_pTextStyle[nLevel].get();
+ Qt5Font* pFont = static_cast<Qt5Font*>(rGlyph.m_pFontInstance);
if (!pFont)
return false;