summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 91b6a66f3add..5621dc1f0a86 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -598,7 +598,10 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
Size aPixelSize( pDevice->LogicToPixel( aFontSize, pShell->GetMapUnit() ) );
// setup the font properties
- Font aFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), aPixelSize );
+ SvxFont aFont;
+ aFont.SetName(pFontItem->GetFamilyName());
+ aFont.SetStyleName(pFontItem->GetStyleName());
+ aFont.SetSize(aPixelSize);
const SfxPoolItem *pItem = aItemSet.GetItem( SID_ATTR_CHAR_WEIGHT );
if ( pItem )
@@ -634,7 +637,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
pItem = aItemSet.GetItem( SID_ATTR_CHAR_CASEMAP );
if ( pItem )
- ((SvxFont &)aFont).SetCaseMap( static_cast< const SvxCaseMapItem* >( pItem )->GetCaseMap() );
+ aFont.SetCaseMap(static_cast<const SvxCaseMapItem*>(pItem)->GetCaseMap());
pItem = aItemSet.GetItem( SID_ATTR_CHAR_EMPHASISMARK );
if ( pItem )