[Libreoffice-commits] core.git: Branch 'libreoffice-4-2-5' - svx/source
Michael Stahl
mstahl at redhat.com
Tue Jun 3 01:19:40 PDT 2014
svx/source/tbxctrls/tbcontrl.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 5786c0b932e3a9cc900fa14ab17fb48f75581629
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jan 28 20:45:20 2014 +0100
fix bad cast in SvxStyleBox_Impl::StateChanged()
This causes various JunitTest crashes on Windows, regression from
887bc4dd3e62fe6dd19dc9d1c3ba273a5b21b5ec.
Change-Id: Iab24e0d39375ac1e5ac63d32470dca1e54d518c5
Reviewed-on: https://gerrit.libreoffice.org/9621
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
(cherry picked from commit 3b41dc58dc3689d4506dec0825834fbec0d1ed60)
Reviewed-on: https://gerrit.libreoffice.org/9622
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 91b6a66..5621dc1 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 )
More information about the Libreoffice-commits
mailing list