summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-09-27 11:59:54 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-11-04 09:07:54 +0100
commit41b99644e8913dd4797775f4931382e93fa12a00 (patch)
tree38efbda4c2c76871fa5bdae1d95954bdb72a1305 /include/editeng
parentb9e43ab25fe2d93c2487fd33ed3c0f583009b968 (diff)
tdf#48622 Add new border line width defaults
* Hairline (0.05pt) * Very thin (0.5pt) * Thin (0.75pt) * Medium (1.5pt) * Thick (2.25pt) * Extra thick (4.5pt) This unifies the default border line widths throughout the program. Users can still set any line width they want by chosing "Custom" in the "Border" tabpage. Also, existing documents won't be changed. The new defaults are just for newly added borders. Change-Id: I7af85dc189a688a749812824508c33c7814b50f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122683 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/borderline.hxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index d22e0c586317..6cf1c45120be 100644
--- a/include/editeng/borderline.hxx
+++ b/include/editeng/borderline.hxx
@@ -30,16 +30,19 @@
class IntlWrapper;
-// Line defaults in twips (former Writer defaults):
-
-#define DEF_LINE_WIDTH_0 1
-#define DEF_LINE_WIDTH_1 20
-#define DEF_LINE_WIDTH_2 50
-#define DEF_LINE_WIDTH_3 80
-#define DEF_LINE_WIDTH_4 100
-#define DEF_LINE_WIDTH_5 10
-#define DEF_LINE_WIDTH_6 5 // 0.25pt
-
+// Line width defaults in twips
+// Thin matches Excel's default values
+// See tdf#48622 for the discussion leading to these defaults.
+class SvxBorderLineWidth
+{
+public:
+ static const sal_Int16 Hairline = 1; // 0.05pt
+ static const sal_Int16 VeryThin = 10; // 0.5pt
+ static const sal_Int16 Thin = 15; // 0.75pt
+ static const sal_Int16 Medium = 30; // 1.5pt
+ static const sal_Int16 Thick = 45; // 2.25pt
+ static const sal_Int16 ExtraThick = 90; // 4.5pt
+};
// Abstracts over values from css::table::BorderLineStyle
enum class SvxBorderLineStyle : sal_Int16