summaryrefslogtreecommitdiff
path: root/forms/source/richtext/rtattributehandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/richtext/rtattributehandler.cxx')
-rw-r--r--forms/source/richtext/rtattributehandler.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 1f17b32c3396..ee7a3fe73b77 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -345,26 +345,26 @@ namespace frm
const SvxFontHeightItem* pFontHeightItem = dynamic_cast<const SvxFontHeightItem*>( _pAdditionalArg );
OSL_ENSURE( pFontHeightItem, "FontSizeHandler::executeAttribute: need a FontHeightItem!" );
- if ( pFontHeightItem )
+ if ( !pFontHeightItem )
+ return;
+
+ sal_uLong nHeight = pFontHeightItem->GetHeight();
+ if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != MapUnit::MapTwip )
{
- sal_uLong nHeight = pFontHeightItem->GetHeight();
- if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != MapUnit::MapTwip )
- {
- nHeight = OutputDevice::LogicToLogic(
- Size( 0, nHeight ),
- MapMode( MapUnit::MapTwip ),
- MapMode( _rNewAttribs.GetPool()->GetMetric( getWhich() ) )
- ).Height();
- }
+ nHeight = OutputDevice::LogicToLogic(
+ Size( 0, nHeight ),
+ MapMode( MapUnit::MapTwip ),
+ MapMode( _rNewAttribs.GetPool()->GetMetric( getWhich() ) )
+ ).Height();
+ }
- SvxFontHeightItem aNewItem( nHeight, 100, getWhich() );
- aNewItem.SetProp( pFontHeightItem->GetProp(), pFontHeightItem->GetPropUnit() );
+ SvxFontHeightItem aNewItem( nHeight, 100, getWhich() );
+ aNewItem.SetProp( pFontHeightItem->GetProp(), pFontHeightItem->GetPropUnit() );
- if ( ( getAttributeId() == SID_ATTR_CHAR_FONTHEIGHT ) && _nForScriptType != SvtScriptType::NONE)
- putItemForScript( _rNewAttribs, aNewItem, _nForScriptType );
- else
- _rNewAttribs.Put( aNewItem );
- }
+ if ( ( getAttributeId() == SID_ATTR_CHAR_FONTHEIGHT ) && _nForScriptType != SvtScriptType::NONE)
+ putItemForScript( _rNewAttribs, aNewItem, _nForScriptType );
+ else
+ _rNewAttribs.Put( aNewItem );
}
ParagraphDirectionHandler::ParagraphDirectionHandler( AttributeId _nAttributeId )