summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-11 21:22:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-12 09:55:07 +0100
commit9dcb9c3d6ca507c537b529a73aa645d6f69bb414 (patch)
tree6ba8caa57a76d336e4a1a5cf30416dc1b58596c7 /sc/source/ui
parentefc1eda5882e4cb6704a91eb6373a1ecdde70a4d (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx8
-rw-r--r--sc/source/ui/view/editsh.cxx10
2 files changed, 4 insertions, 14 deletions
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 );