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>
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 60e12b1..daf58d0 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 8724e36..261b4e2 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 );