From 745122c0446c4cda0acdaf16e058f70509364831 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 11 Nov 2019 20:43:27 +0000 Subject: Related: tdf#121239 super/sub not shown as toggles in draw/impress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibb4a8a638bdba0ec0b2a859c685233d36b6c852e Reviewed-on: https://gerrit.libreoffice.org/82468 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sd/source/ui/view/drtxtob.cxx | 7 ++----- sd/source/ui/view/drviewsf.cxx | 10 ++-------- 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 34e1aa381b97..022250103593 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -590,11 +590,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) // justification (superscript, subscript) is also needed in outline-mode SvxEscapement eEsc = static_cast(aAttrSet.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue()); - - if( eEsc == SvxEscapement::Superscript ) - rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, true ) ); - else if( eEsc == SvxEscapement::Subscript ) - rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, true ) ); + rSet.Put(SfxBoolItem(SID_SET_SUPER_SCRIPT, eEsc == SvxEscapement::Superscript)); + rSet.Put(SfxBoolItem(SID_SET_SUB_SCRIPT, eEsc == SvxEscapement::Subscript)); } } // end of namespace sd diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 0ecfefece2b7..ab8a9a720131 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -714,14 +714,8 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } SvxEscapement eEsc = static_cast(pSet->Get( EE_CHAR_ESCAPEMENT ).GetEnumValue()); - if( eEsc == SvxEscapement::Superscript ) - { - rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, true ) ); - } - else if( eEsc == SvxEscapement::Subscript ) - { - rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, true ) ); - } + rSet.Put(SfxBoolItem(SID_SET_SUPER_SCRIPT, eEsc == SvxEscapement::Superscript)); + rSet.Put(SfxBoolItem(SID_SET_SUB_SCRIPT, eEsc == SvxEscapement::Subscript)); eState = pSet->GetItemState( EE_CHAR_KERNING ); if ( eState == SfxItemState::DONTCARE ) -- cgit