diff options
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 14 |
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 |