From 6f37f7f06b1b4810d0cee025a3502e3282c25986 Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Tue, 21 Aug 2012 13:35:20 -0430 Subject: [PATCH] setFontAttribute on TextLayouterDevice for templateview title. Change-Id: I963994f6c20995ea9d1037cadb6c17a43e8a28c9 --- sfx2/source/control/templateview.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx index bc13853cf48a..e2c7960deffd 100644 --- a/sfx2/source/control/templateview.cxx +++ b/sfx2/source/control/templateview.cxx @@ -184,6 +184,9 @@ void TemplateView::MouseButtonDown (const MouseEvent &rMEvt) else { drawinglayer::primitive2d::TextLayouterDevice aTextDev; + aTextDev.setFontAttribute(mpItemAttrs->aFontAttr, + mpItemAttrs->aFontSize.getX(), mpItemAttrs->aFontSize.getY(), + com::sun::star::lang::Locale() ); float fTextWidth = aTextDev.getTextWidth(maName,0,maName.getLength());