[Libreoffice-commits] core.git: sd/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 12 09:52:13 UTC 2019


 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 <caolanm at redhat.com>
AuthorDate: Mon Nov 11 20:43:27 2019 +0000
Commit:     Caolán McNamara <caolanm at 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 <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at 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 )


More information about the Libreoffice-commits mailing list