summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-09 20:39:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-09 22:40:33 +0100
commit2eb56f0fee54e25c2c194d6801861f18240a37be (patch)
tree231eea5151a90262a471e89ebf7865c5c5f481d3 /sc/source
parent72f1f04bb62bbe66105ce00228e1713bb0703cab (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx14
-rw-r--r--sc/source/ui/view/editsh.cxx14
-rw-r--r--sc/source/ui/view/formatsh.cxx14
3 files changed, 12 insertions, 30 deletions
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