summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-11 20:43:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-12 10:51:02 +0100
commit745122c0446c4cda0acdaf16e058f70509364831 (patch)
treeb53c65e424056f974588db33637ddcbd63b600a8 /sd
parentbcc701e7c544331f0b5992df532919232b5ae5a0 (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drtxtob.cxx7
-rw-r--r--sd/source/ui/view/drviewsf.cxx10
2 files changed, 4 insertions, 13 deletions
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 )