sc/inc/stylehelper.hxx              |   19 +++++++++++++++++++
 sc/source/core/tool/stylehelper.cxx |   19 -------------------
 2 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit b9e43ab25fe2d93c2487fd33ed3c0f583009b968
Author:     Kevin Suo <suokunl...@126.com>
AuthorDate: Wed Nov 3 19:44:45 2021 +0800
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 4 09:03:21 2021 +0100

    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.gran...@collabora.co.uk>

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

Reply via email to