From 549df99fdc19ad5a67e9f76f379804051656b019 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 28 Nov 2011 03:03:42 +0100 Subject: dr78: #i106580# handle SvxTextLineItem, base class of SvxUnderlineItem # HG changeset patch # User Niklas Nebel # Date 1297360398 -3600 # Node ID eef10dfbe87ed2caa242bea5bb505276d760cd34 # Parent bbb6341ff7ab28ffdfbd712ae51248f98a1f208c --- sc/source/ui/view/formatsh.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 7b66556ac41e..dd619fecc583 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1238,13 +1238,22 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) if( pSet ) { - const SvxUnderlineItem& rUnderline = (const SvxUnderlineItem&)pSet->Get( ATTR_FONT_UNDERLINE ); + const SfxPoolItem& rUnderline = pSet->Get( ATTR_FONT_UNDERLINE ); if( rUnderline.ISA(SvxUnderlineItem) ) { pTabViewShell->ApplyAttr( rUnderline ); pNewSet->Put( rUnderline,rUnderline.Which() ); } + else if ( rUnderline.ISA(SvxTextLineItem) ) + { + // #i106580# also allow SvxTextLineItem (base class of SvxUnderlineItem) + const SvxTextLineItem& rTextLineItem = static_cast(rUnderline); + SvxUnderlineItem aNewItem( rTextLineItem.GetLineStyle(), rTextLineItem.Which() ); + aNewItem.SetColor( rTextLineItem.GetColor() ); + pTabViewShell->ApplyAttr( aNewItem ); + pNewSet->Put( aNewItem, aNewItem.Which() ); + } } else { -- cgit