summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKevin Suo <suokunlong@126.com>2021-11-03 19:44:45 +0800
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-04 09:03:21 +0100
commitb9e43ab25fe2d93c2487fd33ed3c0f583009b968 (patch)
tree0c31898350a90e2ac3c7d621816dcfa072e67b54 /sc
parent85a86ba6ba34ff0dfc92c3ce38cba86daf547121 (diff)
Move these SC_STYLE_PROG_* and SC_PIVOT_STYLE_PROG_* constexpr to header
so that they can be reused in other parts of the code base. Need to change them to inline to avoid "defined but not used" compiling error. Change-Id: I44de7c2ebbc9ae57c229f89faf69a788013d7816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/stylehelper.hxx19
-rw-r--r--sc/source/core/tool/stylehelper.cxx19
2 files changed, 19 insertions, 19 deletions
diff --git a/sc/inc/stylehelper.hxx b/sc/inc/stylehelper.hxx
index 53ff810952ae..63189ccd6c77 100644
--- a/sc/inc/stylehelper.hxx
+++ b/sc/inc/stylehelper.hxx
@@ -21,6 +21,25 @@
#include <rtl/ustring.hxx>
+// conversion programmatic <-> display (visible) name
+// currently, the core always has the visible names
+// the api is required to use programmatic names for default styles
+// these programmatic names must never change!
+
+inline constexpr OUStringLiteral SC_STYLE_PROG_STANDARD = u"Default";
+inline constexpr OUStringLiteral SC_STYLE_PROG_RESULT = u"Result";
+inline constexpr OUStringLiteral SC_STYLE_PROG_RESULT1 = u"Result2";
+inline constexpr OUStringLiteral SC_STYLE_PROG_HEADING = u"Heading";
+inline constexpr OUStringLiteral SC_STYLE_PROG_HEADING1 = u"Heading1";
+inline constexpr OUStringLiteral SC_STYLE_PROG_REPORT = u"Report";
+
+inline constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_INNER = u"Pivot Table Value";
+inline constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_RESULT = u"Pivot Table Result";
+inline constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_CATEGORY = u"Pivot Table Category";
+inline constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_TITLE = u"Pivot Table Title";
+inline constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_FIELDNAME = u"Pivot Table Field";
+inline constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_TOP = u"Pivot Table Corner";
+
enum class SfxStyleFamily;
class ScStyleNameConversion
diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx
index 7caab7580dec..e9a920500e79 100644
--- a/sc/source/core/tool/stylehelper.cxx
+++ b/sc/source/core/tool/stylehelper.cxx
@@ -29,25 +29,6 @@
#include <globstr.hrc>
#include <scresid.hxx>
-// conversion programmatic <-> display (visible) name
-// currently, the core always has the visible names
-// the api is required to use programmatic names for default styles
-// these programmatic names must never change!
-
-constexpr OUStringLiteral SC_STYLE_PROG_STANDARD = u"Default";
-constexpr OUStringLiteral SC_STYLE_PROG_RESULT = u"Result";
-constexpr OUStringLiteral SC_STYLE_PROG_RESULT1 = u"Result2";
-constexpr OUStringLiteral SC_STYLE_PROG_HEADING = u"Heading";
-constexpr OUStringLiteral SC_STYLE_PROG_HEADING1 = u"Heading1";
-constexpr OUStringLiteral SC_STYLE_PROG_REPORT = u"Report";
-
-constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_INNER = u"Pivot Table Value";
-constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_RESULT = u"Pivot Table Result";
-constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_CATEGORY = u"Pivot Table Category";
-constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_TITLE = u"Pivot Table Title";
-constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_FIELDNAME = u"Pivot Table Field";
-constexpr OUStringLiteral SC_PIVOT_STYLE_PROG_TOP = u"Pivot Table Corner";
-
namespace {
struct ScDisplayNameMap