summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-20 12:53:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-22 12:58:14 +0200
commitde74d98c58db604aafc0ee623c252f3aa25ac4b7 (patch)
tree1ff996e3f5bc27c10c7c64313a357a5a9c2bfa86 /svx
parentbe8a33c0f03b83357d2ae37dda6bf65313267cea (diff)
OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaround
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/qa/unit/classicshapes.cxx2
-rw-r--r--svx/qa/unit/customshapes.cxx2
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/inc/datanavi.hxx6
-rw-r--r--svx/source/table/tablelayouter.cxx2
-rw-r--r--svx/source/table/tablertfexporter.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx4
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx6
9 files changed, 15 insertions, 15 deletions
diff --git a/svx/qa/unit/classicshapes.cxx b/svx/qa/unit/classicshapes.cxx
index b67222b218ed..7f02865c03d5 100644
--- a/svx/qa/unit/classicshapes.cxx
+++ b/svx/qa/unit/classicshapes.cxx
@@ -24,7 +24,7 @@ using namespace ::com::sun::star;
namespace
{
-const OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
+constexpr OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
/// Tests not about special features of custom shapes, but about shapes in general.
class ClassicshapesTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 2bd56385844a..e500c9bd2649 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -29,7 +29,7 @@ using namespace ::com::sun::star;
namespace
{
-const OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
+constexpr OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
/// Tests for svx/source/customshapes/ code.
class CustomshapesTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index e09cbe1c8cbe..1cd3a7b6ee93 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -71,7 +71,7 @@ namespace {
constexpr size_t RECENTLY_USED_LIMIT = 5;
-const OUStringLiteral constRecentlyUsedFileName(u"recentlyUsed.xml");
+constexpr OUStringLiteral constRecentlyUsedFileName(u"recentlyUsed.xml");
OUString lcl_getClassificationUserPath()
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index b9ba22286d05..1e24c6c4a946 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -3669,8 +3669,8 @@ void FmXFormShell::smartControlReset( const Reference< XIndexAccess >& _rxModels
return;
}
- static const OUStringLiteral sClassIdPropertyName = u"" FM_PROP_CLASSID;
- static const OUStringLiteral sBoundFieldPropertyName = u"" FM_PROP_BOUNDFIELD;
+ static constexpr OUStringLiteral sClassIdPropertyName = u"" FM_PROP_CLASSID;
+ static constexpr OUStringLiteral sBoundFieldPropertyName = u"" FM_PROP_BOUNDFIELD;
sal_Int32 nCount = _rxModels->getCount();
Reference< XPropertySet > xCurrent;
Reference< XPropertySetInfo > xCurrentInfo;
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index f574adc4c05a..652ce21fa876 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -82,9 +82,9 @@ namespace svxform
OUString m_sInstance_UI;
OUString m_sNone_UI;
- static constexpr OUStringLiteral const m_sDoc_API = u"all";
- static constexpr OUStringLiteral const m_sInstance_API = u"instance";
- static constexpr OUStringLiteral const m_sNone_API = u"none";
+ static constexpr OUStringLiteral m_sDoc_API = u"all";
+ static constexpr OUStringLiteral m_sInstance_API = u"instance";
+ static constexpr OUStringLiteral m_sNone_API = u"none";
ReplaceString( const ReplaceString& ) = delete;
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index f0e8c735473d..f1d74673cd03 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -46,7 +46,7 @@ namespace sdr::table {
static SvxBorderLine gEmptyBorder;
-const OUStringLiteral gsSize( u"Size" );
+constexpr OUStringLiteral gsSize( u"Size" );
TableLayouter::TableLayouter( const TableModelRef& xTableModel )
: mxTable( xTableModel )
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 528d97bd1c41..f30d4dae6d72 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -67,7 +67,7 @@ void ExportAsRTF( SvStream& rStrm, SdrTableObj& rObj )
aEx.Write();
}
-const OUStringLiteral gsSize( u"Size" );
+constexpr OUStringLiteral gsSize( u"Size" );
SdrTableRtfExporter::SdrTableRtfExporter( SvStream& rStrm, SdrTableObj& rObj )
: mrStrm( rStrm )
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 092a7ab53539..387957e95d9c 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -326,8 +326,8 @@ double ExtrusionDepthDialog::getDepth() const
double const aDepthListInch[] = { 0, 1270,2540,5080,10160 };
double const aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 };
-const OUStringLiteral gsExtrusionDepth( u".uno:ExtrusionDepth" );
-const OUStringLiteral gsMetricUnit( u".uno:MetricUnit" );
+constexpr OUStringLiteral gsExtrusionDepth( u".uno:ExtrusionDepth" );
+constexpr OUStringLiteral gsMetricUnit( u".uno:MetricUnit" );
ExtrusionDepthWindow::ExtrusionDepthWindow(svt::PopupWindowController* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/depthwindow.ui", "DepthWindow")
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index d51f2e647422..24fa16afbe39 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -278,7 +278,7 @@ private:
}
-const OUStringLiteral gsFontworkAlignment(u".uno:FontworkAlignment");
+constexpr OUStringLiteral gsFontworkAlignment(u".uno:FontworkAlignment");
FontworkAlignmentWindow::FontworkAlignmentWindow(svt::PopupWindowController* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkalignmentcontrol.ui", "FontworkAlignmentControl")
@@ -464,8 +464,8 @@ private:
}
-const OUStringLiteral gsFontworkCharacterSpacing(u".uno:FontworkCharacterSpacing");
-const OUStringLiteral gsFontworkKernCharacterPairs(u".uno:FontworkKernCharacterPairs");
+constexpr OUStringLiteral gsFontworkCharacterSpacing(u".uno:FontworkCharacterSpacing");
+constexpr OUStringLiteral gsFontworkKernCharacterPairs(u".uno:FontworkKernCharacterPairs");
FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::PopupWindowController* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkcharacterspacingcontrol.ui", "FontworkCharacterSpacingControl")