sc/source/ui/drawfunc/drtxtob.cxx | 8 ++------ sc/source/ui/view/editsh.cxx | 10 ++-------- 2 files changed, 4 insertions(+), 14 deletions(-)
New commits: commit 9dcb9c3d6ca507c537b529a73aa645d6f69bb414 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Nov 11 21:22:19 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Nov 12 09:55:07 2019 +0100 Related: tdf#121239 super/sub not shown as toggles in calc Change-Id: Ida4c5014538454b845d19f74d27548c8f9540de8 Reviewed-on: https://gerrit.libreoffice.org/82470 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 60e12b1c93fe..daf58d072eea 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -1095,15 +1095,11 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) } // super-/subscript - SvxEscapement eEsc = static_cast<SvxEscapement>(aAttrSet.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue()); - if( eEsc == SvxEscapement::Superscript ) - rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, true ) ); - else if( eEsc == SvxEscapement::Subscript ) - rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, true ) ); + rDestSet.Put(SfxBoolItem(SID_SET_SUPER_SCRIPT, eEsc == SvxEscapement::Superscript)); + rDestSet.Put(SfxBoolItem(SID_SET_SUB_SCRIPT, eEsc == SvxEscapement::Subscript)); // Underline - eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE ); if ( eState == SfxItemState::DONTCARE ) { diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 8724e3631276..261b4e2dc7d6 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -1217,14 +1217,8 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) rSet.ClearItem( EE_CHAR_WEIGHT ); // Highlighted brace not here SvxEscapement eEsc = static_cast<SvxEscapement>(aAttribs.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)); pViewData->GetBindings().Invalidate( SID_SET_SUPER_SCRIPT ); pViewData->GetBindings().Invalidate( SID_SET_SUB_SCRIPT ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits