[Libreoffice-commits] core.git: sfx2/source
Serge Krot
Serge.Krot at cib.de
Thu Sep 14 23:34:54 UTC 2017
sfx2/source/control/thumbnailviewitem.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit e038dfdf05096edc0e9c38c9a686b5d23ba39352
Author: Serge Krot <Serge.Krot at cib.de>
Date: Thu Sep 14 16:54:03 2017 +0200
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 at cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
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());
More information about the Libreoffice-commits
mailing list