summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 16:27:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-22 12:47:37 +0200
commit76dd28afc9c0eb632a5dd20eb51704ee0bbc4b58 (patch)
tree82c51d09721476a1a6fcbf1e4cd4af8189ac55a2 /writerfilter
parent78490b45c771a4c9632b324922f2c8e83f06153b (diff)
loplugin:staticvar in various
looks for variables that can be declared const and static i.e. they can be stored in the read-only linker segment and shared between different processes Change-Id: I8ddc6e5fa0f6b10d80c75d5952df8ddd311cf892 Reviewed-on: https://gerrit.libreoffice.org/61591 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfcharsets.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfcharsets.hxx2
-rw-r--r--writerfilter/source/rtftok/rtfcontrolwords.cxx4
-rw-r--r--writerfilter/source/rtftok/rtfcontrolwords.hxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/writerfilter/source/rtftok/rtfcharsets.cxx b/writerfilter/source/rtftok/rtfcharsets.cxx
index 5168a3627d2f..4309351d9f70 100644
--- a/writerfilter/source/rtftok/rtfcharsets.cxx
+++ b/writerfilter/source/rtftok/rtfcharsets.cxx
@@ -15,7 +15,7 @@ namespace writerfilter
namespace rtftok
{
// See RTF spec v1.9.1, page 19
-RTFEncoding aRTFEncodings[] = {
+RTFEncoding const aRTFEncodings[] = {
// charset codepage Windows / Mac name
{ 0, 1252 }, // ANSI
{ 1, 0 }, // Default
diff --git a/writerfilter/source/rtftok/rtfcharsets.hxx b/writerfilter/source/rtftok/rtfcharsets.hxx
index d2d21aaa8ac5..c0a024def83c 100644
--- a/writerfilter/source/rtftok/rtfcharsets.hxx
+++ b/writerfilter/source/rtftok/rtfcharsets.hxx
@@ -20,7 +20,7 @@ struct RTFEncoding
int const charset;
int const codepage;
};
-extern RTFEncoding aRTFEncodings[];
+extern RTFEncoding const aRTFEncodings[];
extern int nRTFEncodings;
} // namespace rtftok
} // namespace writerfilter
diff --git a/writerfilter/source/rtftok/rtfcontrolwords.cxx b/writerfilter/source/rtftok/rtfcontrolwords.cxx
index b49f356d4b0f..684cedeb5637 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.cxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.cxx
@@ -15,7 +15,7 @@ namespace writerfilter
{
namespace rtftok
{
-RTFSymbol aRTFControlWords[] = {
+RTFSymbol const aRTFControlWords[] = {
// sKeyword nControlType nIndex
{ "'", CONTROL_SYMBOL, RTF_HEXCHAR, 0 },
{ "-", CONTROL_SYMBOL, RTF_OPTHYPH, 0 },
@@ -1848,7 +1848,7 @@ bool RTFSymbol::operator<(const RTFSymbol& rOther) const
return std::strcmp(sKeyword, rOther.sKeyword) < 0;
}
-RTFMathSymbol aRTFMathControlWords[] = {
+RTFMathSymbol const aRTFMathControlWords[] = {
// eKeyword nToken eDestination
{ RTF_MOMATH, M_TOKEN(oMath), Destination::MOMATH },
{ RTF_MF, M_TOKEN(f), Destination::MF },
diff --git a/writerfilter/source/rtftok/rtfcontrolwords.hxx b/writerfilter/source/rtftok/rtfcontrolwords.hxx
index ddaf123b4a77..e638d9a9a359 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.hxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.hxx
@@ -2001,7 +2001,7 @@ struct RTFSymbol
bool operator<(const RTFSymbol& rOther) const;
};
-extern RTFSymbol aRTFControlWords[];
+extern RTFSymbol const aRTFControlWords[];
extern int nRTFControlWords;
/// Represents an RTF Math Control Word
@@ -2013,7 +2013,7 @@ struct RTFMathSymbol
bool operator<(const RTFMathSymbol& rOther) const;
};
-extern RTFMathSymbol aRTFMathControlWords[];
+extern RTFMathSymbol const aRTFMathControlWords[];
extern int nRTFMathControlWords;
} // namespace rtftok