sd/source/ui/view/drtxtob.cxx | 7 ++----- sd/source/ui/view/drviewsf.cxx | 10 ++-------- 2 files changed, 4 insertions(+), 13 deletions(-)
New commits: commit 745122c0446c4cda0acdaf16e058f70509364831 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Nov 11 20:43:27 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Nov 12 10:51:02 2019 +0100 Related: tdf#121239 super/sub not shown as toggles in draw/impress Change-Id: Ibb4a8a638bdba0ec0b2a859c685233d36b6c852e Reviewed-on: https://gerrit.libreoffice.org/82468 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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<SvxEscapement>(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<SvxEscapement>(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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits