summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2017-09-14 16:54:03 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-09-15 01:34:31 +0200
commite038dfdf05096edc0e9c38c9a686b5d23ba39352 (patch)
treea942d8bf438eb35f21bd1edc08070eb9341dc1db /sfx2
parentd3503650d048dbd4b0c28010520d01479d1aabf1 (diff)
tdf#111799 Added missing initialization of font
The font was not intialized for the TextLayouterDevice object inside ThumbnailViewItem::addTextPrimitives() method. Change-Id: I18dc9e2c6fa09c43d66f7b230133cbeb00b7f585 Reviewed-on: https://gerrit.libreoffice.org/42287 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index b90c88b2d753..4baef695440d 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -204,7 +204,13 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer& rSeq)
{
+ // adjust text drawing position according to text font
drawinglayer::primitive2d::TextLayouterDevice aTextDev;
+ aTextDev.setFontAttribute(
+ pAttrs->aFontAttr,
+ pAttrs->aFontSize.getX(),
+ pAttrs->aFontSize.getY(),
+ css::lang::Locale());
aPos.setY(aPos.getY() + aTextDev.getTextHeight());