[Libreoffice-commits] core.git: xmloff/source

Takeshi Abe tabe at fixedpoint.jp
Wed Nov 22 06:47:03 UTC 2017


 xmloff/source/core/xmluconv.cxx       |    2 +-
 xmloff/source/forms/elementexport.cxx |    8 ++++----
 xmloff/source/style/csmaphdl.cxx      |    2 +-
 xmloff/source/text/txtstyli.cxx       |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 02393281b6964b6657985a453c6f1a43ac77411c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Nov 22 09:31:01 2017 +0900

    xmloff: These arrays are constant
    
    Change-Id: I834e23610facb8b4b35f0a377e33b744e7725d1f
    Reviewed-on: https://gerrit.libreoffice.org/45066
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 0285aa3f7a3f..bd0d53e79567 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -264,7 +264,7 @@ static int lcl_gethex( int nChar )
         return 0;
 }
 
-static sal_Char aHexTab[] = "0123456789abcdef";
+static const sal_Char aHexTab[] = "0123456789abcdef";
 
 
 /** convert double number to string (using ::rtl::math) */
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 8e8b7aaa559f..ba1eb56f5d79 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -599,7 +599,7 @@ namespace xmloff
         // some integer properties
         {
             // now the common handling
-            static CCAFlags nIntegerPropertyAttributeIds[] =
+            static const CCAFlags nIntegerPropertyAttributeIds[] =
             {   // attribute flags
                 CCAFlags::Size, CCAFlags::TabIndex
             };
@@ -998,7 +998,7 @@ namespace xmloff
 
         // the integer properties
         {
-            static SCAFlags nIntegerPropertyAttributeIds[] =
+            static const SCAFlags nIntegerPropertyAttributeIds[] =
             {   // attribute flags
                 SCAFlags::PageStepSize
             };
@@ -1862,11 +1862,11 @@ namespace xmloff
             }
             else
             {
-                XMLTokenEnum eXmlImagePositions[] =
+                const XMLTokenEnum eXmlImagePositions[] =
                 {
                     XML_START, XML_END, XML_TOP, XML_BOTTOM
                 };
-                XMLTokenEnum eXmlImageAligns[] =
+                const XMLTokenEnum eXmlImageAligns[] =
                 {
                     XML_START, XML_CENTER, XML_END
                 };
diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx
index 2e88f798594b..f24b0806f0c5 100644
--- a/xmloff/source/style/csmaphdl.cxx
+++ b/xmloff/source/style/csmaphdl.cxx
@@ -27,7 +27,7 @@
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
 
-static SvXMLEnumMapEntry<sal_uInt16> pXML_Casemap_Enum[] =
+static const SvXMLEnumMapEntry<sal_uInt16> pXML_Casemap_Enum[] =
 {
     { XML_NONE,                 style::CaseMap::NONE },
     { XML_CASEMAP_LOWERCASE,    style::CaseMap::LOWERCASE },
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 2d4746a77ad3..128cd618ad35 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -417,7 +417,7 @@ void XMLTextStyleContext::FillPropertySet(
     };
 
     // the style families associated with the same index modulo 4
-    static sal_uInt16 aFamilies[] =
+    static const sal_uInt16 aFamilies[] =
     {
         XML_STYLE_FAMILY_SD_GRADIENT_ID,
         XML_STYLE_FAMILY_SD_GRADIENT_ID,


More information about the Libreoffice-commits mailing list