diff options
author | Eike Rathke <erack@redhat.com> | 2011-11-28 03:03:42 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-11-28 15:25:33 +0100 |
commit | 549df99fdc19ad5a67e9f76f379804051656b019 (patch) | |
tree | 11e15f77982336e58801c9b88fb784c382c6b61d /sc | |
parent | d8a85d728f45826c485eb3d250a394e3462e37a1 (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
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<const SvxTextLineItem&>(rUnderline); + SvxUnderlineItem aNewItem( rTextLineItem.GetLineStyle(), rTextLineItem.Which() ); + aNewItem.SetColor( rTextLineItem.GetColor() ); + pTabViewShell->ApplyAttr( aNewItem ); + pNewSet->Put( aNewItem, aNewItem.Which() ); + } } else { |