summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-08 19:54:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-09 13:01:49 +0100
commitac396f2f6b058ddff8c394443669b8c5d8b97b71 (patch)
treefc5120838a69ced58c3cd2333718ffeb6d4adf67 /sc
parent0c20b68149797c8b0779534a8e0cb9045085d451 (diff)
fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/helper/shared_test_impl.hxx2
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx14
-rw-r--r--sc/source/ui/docshell/impex.cxx2
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx4
-rw-r--r--sc/source/ui/vba/vbaborders.cxx2
-rw-r--r--sc/source/ui/vba/vbainterior.cxx6
-rw-r--r--sc/source/ui/vba/vbarange.cxx6
-rw-r--r--sc/source/ui/vba/vbastyle.cxx2
9 files changed, 20 insertions, 20 deletions
diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx
index ae77d0ebf44e..d3a2cc86400d 100644
--- a/sc/qa/unit/helper/shared_test_impl.hxx
+++ b/sc/qa/unit/helper/shared_test_impl.hxx
@@ -278,7 +278,7 @@ void testCeilingFloor_Impl( ScDocument& rDoc )
{
// Original test case document is ceiling-floor.xlsx
// Sheet1.K1 has =AND(K3:K81) to evaluate all results.
- static const OUStringLiteral pORef = u"Sheet1.K1";
+ static constexpr OUStringLiteral pORef = u"Sheet1.K1";
ScAddress aPos;
aPos.Parse(pORef, rDoc);
ASSERT_FORMULA_EQUAL(rDoc, aPos, "AND(K3:K81)", "Wrong formula.");
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index c7d70f4ac82e..484236861152 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -64,7 +64,7 @@
* be synchronized with Writer's SwTableAutoFmtTbl sw/source/core/doc/tblafmt.cxx
*/
-const OUStringLiteral sAutoTblFmtName = u"autotbl.fmt";
+constexpr OUStringLiteral sAutoTblFmtName = u"autotbl.fmt";
// till SO5PF
const sal_uInt16 AUTOFORMAT_ID_X = 9501;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index f68cc4a62a1a..feeecf885fe6 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -140,10 +140,10 @@ using ::std::vector;
// Filter names (like in sclib.cxx)
-const OUStringLiteral pFilterSc50 = u"StarCalc 5.0";
+constexpr OUStringLiteral pFilterSc50 = u"StarCalc 5.0";
const char pFilterXML[] = "StarOffice XML (Calc)";
-const OUStringLiteral pFilterAscii = u"" SC_TEXT_CSV_FILTER_NAME;
-const OUStringLiteral pFilterLotus = u"Lotus";
+constexpr OUStringLiteral pFilterAscii = u"" SC_TEXT_CSV_FILTER_NAME;
+constexpr OUStringLiteral pFilterLotus = u"Lotus";
const char pFilterQPro6[] = "Quattro Pro 6.0";
const char16_t pFilterExcel4[] = u"MS Excel 4.0";
const char16_t pFilterEx4Temp[] = u"MS Excel 4.0 Vorlage/Template";
@@ -153,11 +153,11 @@ const char pFilterExcel95[] = "MS Excel 95";
const char pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
const char pFilterExcel97[] = "MS Excel 97";
const char pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
-const OUStringLiteral pFilterDBase = u"dBase";
-const OUStringLiteral pFilterDif = u"DIF";
+constexpr OUStringLiteral pFilterDBase = u"dBase";
+constexpr OUStringLiteral pFilterDif = u"DIF";
const char16_t pFilterSylk[] = u"SYLK";
-const OUStringLiteral pFilterHtml = u"HTML (StarCalc)";
-const OUStringLiteral pFilterHtmlWebQ = u"calc_HTML_WebQuery";
+constexpr OUStringLiteral pFilterHtml = u"HTML (StarCalc)";
+constexpr OUStringLiteral pFilterHtmlWebQ = u"calc_HTML_WebQuery";
const char16_t pFilterRtf[] = u"Rich Text Format (StarCalc)";
#define ShellClass_ScDocShell
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 4835a75edabe..1087b2bcec51 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1150,7 +1150,7 @@ static bool lcl_PutString(
sal_Int16 nMonth = static_cast<sal_Int16>(aMStr.toInt32());
if (!nMonth)
{
- static const OUStringLiteral aSepShortened = u"SEP";
+ static constexpr OUStringLiteral aSepShortened = u"SEP";
uno::Sequence< i18n::CalendarItem2 > xMonths;
sal_Int32 i, nMonthCount;
// first test all month names from local international
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 5de763f8b4f4..55cf60cb08c1 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -36,8 +36,8 @@
using namespace css;
using namespace css::uno;
-const OStringLiteral SETBORDERSTYLE = "SetBorderStyle";
-const OStringLiteral LINESTYLE = "LineStyle";
+constexpr OStringLiteral SETBORDERSTYLE = "SetBorderStyle";
+constexpr OStringLiteral LINESTYLE = "LineStyle";
// namespace open
diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx
index be098444b670..34998adcbb16 100644
--- a/sc/source/ui/vba/vbaborders.cxx
+++ b/sc/source/ui/vba/vbaborders.cxx
@@ -42,7 +42,7 @@ typedef InheritedHelperInterfaceWeakImpl<excel::XBorder > ScVbaBorder_Base;
// borders, the enumeration will match the order in this list
const sal_Int16 supportedIndexTable[] = { XlBordersIndex::xlEdgeLeft, XlBordersIndex::xlEdgeTop, XlBordersIndex::xlEdgeBottom, XlBordersIndex::xlEdgeRight, XlBordersIndex::xlDiagonalDown, XlBordersIndex::xlDiagonalUp, XlBordersIndex::xlInsideVertical, XlBordersIndex::xlInsideHorizontal };
-const OUStringLiteral sTableBorder = u"TableBorder";
+constexpr OUStringLiteral sTableBorder = u"TableBorder";
// Equiv widths in 1/100 mm
const sal_Int32 OOLineThin = 35;
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index 6a38df7d8ba4..c4f83e972789 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -34,9 +34,9 @@ using namespace ::com::sun::star;
using namespace ::ooo::vba;
using namespace ::ooo::vba::excel::XlPattern;
-const OUStringLiteral BACKCOLOR = u"CellBackColor";
-const OUStringLiteral PATTERN = u"Pattern";
-const OUStringLiteral PATTERNCOLOR = u"PatternColor";
+constexpr OUStringLiteral BACKCOLOR = u"CellBackColor";
+constexpr OUStringLiteral PATTERN = u"Pattern";
+constexpr OUStringLiteral PATTERNCOLOR = u"PatternColor";
static std::map< sal_Int32, sal_Int32 > aPatternMap {
{ xlPatternAutomatic, 0 },
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index b67751245cc6..1dd212e61bb2 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -670,7 +670,7 @@ public:
}
-const OUStringLiteral ISVISIBLE = u"IsVisible";
+constexpr OUStringLiteral ISVISIBLE = u"IsVisible";
const char EQUALS[] = "=";
const char NOTEQUALS[] = "<>";
const char GREATERTHAN[] = ">";
@@ -678,7 +678,7 @@ const char GREATERTHANEQUALS[] = ">=";
const char LESSTHAN[] = "<";
const char LESSTHANEQUALS[] = "<=";
constexpr OUStringLiteral STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY(u"The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again");
-const OUStringLiteral CELLSTYLE = u"CellStyle";
+constexpr OUStringLiteral CELLSTYLE = u"CellStyle";
namespace {
@@ -967,7 +967,7 @@ public:
}
-const OUStringLiteral sNA = u"#N/A";
+constexpr OUStringLiteral sNA = u"#N/A";
namespace {
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index 638ee7bdd734..da4e756cf7b6 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -25,7 +25,7 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-const OUStringLiteral DISPLAYNAME = u"DisplayName";
+constexpr OUStringLiteral DISPLAYNAME = u"DisplayName";
uno::Reference< container::XNameAccess >
ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xModel )