Kaydet (Commit) 549df99f authored tarafından Eike Rathke's avatar Eike Rathke

dr78: #i106580# handle SvxTextLineItem, base class of SvxUnderlineItem

# HG changeset patch
# User Niklas Nebel <nn@openoffice.org>
# Date 1297360398 -3600
# Node ID eef10dfbe87ed2caa242bea5bb505276d760cd34
# Parent  bbb6341ff7ab28ffdfbd712ae51248f98a1f208c
üst d8a85d72
...@@ -1238,13 +1238,22 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) ...@@ -1238,13 +1238,22 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
if( pSet ) if( pSet )
{ {
const SvxUnderlineItem& rUnderline = (const SvxUnderlineItem&)pSet->Get( ATTR_FONT_UNDERLINE ); const SfxPoolItem& rUnderline = pSet->Get( ATTR_FONT_UNDERLINE );
if( rUnderline.ISA(SvxUnderlineItem) ) if( rUnderline.ISA(SvxUnderlineItem) )
{ {
pTabViewShell->ApplyAttr( rUnderline ); pTabViewShell->ApplyAttr( rUnderline );
pNewSet->Put( rUnderline,rUnderline.Which() ); pNewSet->Put( rUnderline,rUnderline.Which() );
} }
else if ( rUnderline.ISA(SvxTextLineItem) )
{
// #i106580# also allow SvxTextLineItem (base class of SvxUnderlineItem)
const SvxTextLineItem& rTextLineItem = static_cast<const SvxTextLineItem&>(rUnderline);
SvxUnderlineItem aNewItem( rTextLineItem.GetLineStyle(), rTextLineItem.Which() );
aNewItem.SetColor( rTextLineItem.GetColor() );
pTabViewShell->ApplyAttr( aNewItem );
pNewSet->Put( aNewItem, aNewItem.Which() );
}
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment