sc/source/ui/drawfunc/drtxtob.cxx |   14 ++++----------
 sc/source/ui/view/editsh.cxx      |   14 ++++----------
 sc/source/ui/view/formatsh.cxx    |   14 ++++----------
 3 files changed, 12 insertions(+), 30 deletions(-)

New commits:
commit 2eb56f0fee54e25c2c194d6801861f18240a37be
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Nov 9 20:39:02 2019 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Nov 9 22:40:33 2019 +0100

    tdf#121239 set double underline status to false when not double underlined
    
    Change-Id: I0d609b8e6cd205e4d0c530d4a9111c0640f89b2c
    Reviewed-on: https://gerrit.libreoffice.org/82360
    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 17f8321d58e2..60e12b1c93fe 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -1115,16 +1115,10 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& 
rDestSet )
     else
     {
         FontLineStyle eUnderline = 
aAttrSet.Get(EE_CHAR_UNDERLINE).GetLineStyle();
-        sal_uInt16 nId = SID_ULINE_VAL_NONE;
-        switch (eUnderline)
-        {
-            case LINESTYLE_SINGLE:  nId = SID_ULINE_VAL_SINGLE; break;
-            case LINESTYLE_DOUBLE:  nId = SID_ULINE_VAL_DOUBLE; break;
-            case LINESTYLE_DOTTED:  nId = SID_ULINE_VAL_DOTTED; break;
-            default:
-                break;
-        }
-        rDestSet.Put( SfxBoolItem( nId, true ) );
+        rDestSet.Put(SfxBoolItem(SID_ULINE_VAL_SINGLE, eUnderline == 
LINESTYLE_SINGLE));
+        rDestSet.Put(SfxBoolItem(SID_ULINE_VAL_DOUBLE, eUnderline == 
LINESTYLE_DOUBLE));
+        rDestSet.Put(SfxBoolItem(SID_ULINE_VAL_DOTTED, eUnderline == 
LINESTYLE_DOTTED));
+        rDestSet.Put(SfxBoolItem(SID_ULINE_VAL_NONE, eUnderline == 
LINESTYLE_NONE));
     }
 
     //  horizontal / vertical
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 8c1638c2ff62..8724e3631276 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -1205,16 +1205,10 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
     else
     {
         FontLineStyle eUnderline = 
aAttribs.Get(EE_CHAR_UNDERLINE).GetLineStyle();
-        sal_uInt16 nId = SID_ULINE_VAL_NONE;
-        switch (eUnderline)
-        {
-            case LINESTYLE_SINGLE:  nId = SID_ULINE_VAL_SINGLE; break;
-            case LINESTYLE_DOUBLE:  nId = SID_ULINE_VAL_DOUBLE; break;
-            case LINESTYLE_DOTTED:  nId = SID_ULINE_VAL_DOTTED; break;
-            default:
-                break;
-        }
-        rSet.Put( SfxBoolItem( nId, true ) );
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_SINGLE, eUnderline == 
LINESTYLE_SINGLE));
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_DOUBLE, eUnderline == 
LINESTYLE_DOUBLE));
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_DOTTED, eUnderline == 
LINESTYLE_DOTTED));
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_NONE, eUnderline == 
LINESTYLE_NONE));
     }
 
     //! Testing whether brace highlighting is active !!!!
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index f92273b7caf1..e9f849e07380 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2280,16 +2280,10 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
     {
         FontLineStyle eUnderline =
                     rAttrSet.Get(ATTR_FONT_UNDERLINE).GetLineStyle();
-        sal_uInt16 nId = SID_ULINE_VAL_NONE;
-        switch (eUnderline)
-        {
-            case LINESTYLE_SINGLE:  nId = SID_ULINE_VAL_SINGLE; break;
-            case LINESTYLE_DOUBLE:  nId = SID_ULINE_VAL_DOUBLE; break;
-            case LINESTYLE_DOTTED:  nId = SID_ULINE_VAL_DOTTED; break;
-            default:
-                break;
-        }
-        rSet.Put( SfxBoolItem( nId, true ) );
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_SINGLE, eUnderline == 
LINESTYLE_SINGLE));
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_DOUBLE, eUnderline == 
LINESTYLE_DOUBLE));
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_DOTTED, eUnderline == 
LINESTYLE_DOTTED));
+        rSet.Put(SfxBoolItem(SID_ULINE_VAL_NONE, eUnderline == 
LINESTYLE_NONE));
     }
 
     // horizontal alignment
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to