summaryrefslogtreecommitdiff
path: root/sfx2/source
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 /sfx2/source
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 'sfx2/source')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx8
-rw-r--r--sfx2/source/doc/objstor.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 6e74694d2e49..da46da4274d5 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -702,7 +702,7 @@ bool SfxHelp::Start(const OUString& rURL, weld::Widget* pWidget)
/// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org
static bool impl_showOnlineHelp( const OUString& rURL )
{
- static const OUStringLiteral aInternal(u"vnd.sun.star.help://");
+ static constexpr OUStringLiteral aInternal(u"vnd.sun.star.help://");
if ( rURL.getLength() <= aInternal.getLength() || !rURL.startsWith(aInternal) )
return false;
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index bb9b71df760a..d7c24934f89a 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -34,10 +34,10 @@ namespace
{
// Relations info related strings
-const OUStringLiteral g_sGroupListElement(u"groupuinames:template-group-list");
-const OUStringLiteral g_sGroupElement(u"groupuinames:template-group");
-const OUStringLiteral g_sNameAttr(u"groupuinames:name");
-const OUStringLiteral g_sUINameAttr(u"groupuinames:default-ui-name");
+constexpr OUStringLiteral g_sGroupListElement(u"groupuinames:template-group-list");
+constexpr OUStringLiteral g_sGroupElement(u"groupuinames:template-group");
+constexpr OUStringLiteral g_sNameAttr(u"groupuinames:name");
+constexpr OUStringLiteral g_sUINameAttr(u"groupuinames:default-ui-name");
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 83088354fad6..76e838709b20 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1106,7 +1106,7 @@ private:
static OUString lcl_strip_template(const OUString &aString)
{
- static const OUStringLiteral sPostfix(u"_template");
+ static constexpr OUStringLiteral sPostfix(u"_template");
OUString sRes(aString);
if (sRes.endsWith(sPostfix))
sRes = sRes.copy(0, sRes.getLength() - sPostfix.getLength());