diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-01-28 20:45:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-01-28 20:50:26 +0100 |
commit | d9896aeeedb0ca03bec65df23e2fd96f30239619 (patch) | |
tree | 6a99d846ca370fecd3d47b4856f5768bc7325b91 /svx/source | |
parent | 8676c2157a0d294dabd967b9591f48ba2ec95ac1 (diff) |
fix bad cast in SvxStyleBox_Impl::StateChanged()
This causes various JunitTest crashes on Windows, regression from
887bc4dd3e62fe6dd19dc9d1c3ba273a5b21b5ec.
Change-Id: Iab24e0d39375ac1e5ac63d32470dca1e54d518c5
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 5284816bb226..0a96bd001dc7 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -596,7 +596,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 ) @@ -632,7 +635,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 ) |