setFontAttribute on TextLayouterDevice for templateview title.

Change-Id: I963994f6c20995ea9d1037cadb6c17a43e8a28c9
This commit is contained in:
Rafael Dominguez 2012-08-21 13:35:20 -04:30
parent 1bdccc596a
commit 6f37f7f06b

View file

@ -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());