summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/customize/acccfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/inc/cfg.hxx8
-rw-r--r--cui/source/options/optasian.cxx4
-rw-r--r--cui/source/options/optgdlg.cxx10
-rw-r--r--cui/source/options/optinet2.cxx16
7 files changed, 23 insertions, 23 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index e7aa9c83f29d..a8e780a6b008 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -65,9 +65,9 @@
using namespace css;
-const OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2";
+constexpr OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2";
-const OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType";
+constexpr OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType";
const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
KEY_F2,
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 6c81c18fb573..4d17928b3b39 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -74,7 +74,7 @@ const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
const char CMDURL_SPART_ONLY [] = "Style:string=";
const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
-const OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
+constexpr OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
OUString SfxStylesInfo_Impl::generateCommand(
std::u16string_view sFamily, std::u16string_view sStyle)
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index eae624c7e0db..aa2ccd0767c1 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -709,7 +709,7 @@ void TPGalleryThemeProperties::FillFilterList()
#if HAVE_FEATURE_AVMEDIA
// media filters
- static const OUStringLiteral aWildcard = u"*.";
+ static constexpr OUStringLiteral aWildcard = u"*.";
::avmedia::FilterNameVector aFilters= ::avmedia::MediaWindow::getMediaFilters();
for(const std::pair<OUString,OUString> & aFilter : aFilters)
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 32e19e3bd774..ecefed6578d6 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -43,18 +43,18 @@
#define notebookbarTabScope "notebookbarTabScope"
const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-inline const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
+inline constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
const char ITEM_DESCRIPTOR_LABEL[] = "Label";
const char ITEM_DESCRIPTOR_TYPE[] = "Type";
const char ITEM_DESCRIPTOR_STYLE[] = "Style";
const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
-inline const OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
+inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
-inline const OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
+inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
constexpr char16_t ITEM_TOOLBAR_URL[] = u"private:resource/toolbar/";
-inline const OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
+inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
const char aMenuSeparatorStr[] = " | ";
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index c16a533bbf9e..962cf1fc2e0a 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -43,8 +43,8 @@ using namespace com::sun::star::i18n;
using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
-const OUStringLiteral cIsKernAsianPunctuation = u"IsKernAsianPunctuation";
-const OUStringLiteral cCharacterCompressionType = u"CharacterCompressionType";
+constexpr OUStringLiteral cIsKernAsianPunctuation = u"IsKernAsianPunctuation";
+constexpr OUStringLiteral cCharacterCompressionType = u"CharacterCompressionType";
namespace {
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 21d46a879e36..f15171e38103 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1019,11 +1019,11 @@ struct LanguageConfig_Impl
static bool bLanguageCurrentDoc_Impl = false;
// some things we'll need...
-const OUStringLiteral sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess";
-const OUStringLiteral sAccessUpdSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
-const OUStringLiteral sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales";
-const OUStringLiteral sUserLocalePath = u"org.openoffice.Office.Linguistic/General";
-const OUStringLiteral sUserLocaleKey = u"UILocale";
+constexpr OUStringLiteral sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess";
+constexpr OUStringLiteral sAccessUpdSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
+constexpr OUStringLiteral sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales";
+constexpr OUStringLiteral sUserLocalePath = u"org.openoffice.Office.Linguistic/General";
+constexpr OUStringLiteral sUserLocaleKey = u"UILocale";
static Sequence< OUString > seqInstalledLanguages;
static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 5e2df9189d7a..f8648bac62a4 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -93,14 +93,14 @@ IMPL_LINK(SvxProxyTabPage, PortChangedHdl, weld::Entry&, rEdit, void)
}
}
-const OUStringLiteral g_aProxyModePN = u"ooInetProxyType";
-const OUStringLiteral g_aHttpProxyPN = u"ooInetHTTPProxyName";
-const OUStringLiteral g_aHttpPortPN = u"ooInetHTTPProxyPort";
-const OUStringLiteral g_aHttpsProxyPN = u"ooInetHTTPSProxyName";
-const OUStringLiteral g_aHttpsPortPN = u"ooInetHTTPSProxyPort";
-const OUStringLiteral g_aFtpProxyPN = u"ooInetFTPProxyName";
-const OUStringLiteral g_aFtpPortPN = u"ooInetFTPProxyPort";
-const OUStringLiteral g_aNoProxyDescPN = u"ooInetNoProxy";
+constexpr OUStringLiteral g_aProxyModePN = u"ooInetProxyType";
+constexpr OUStringLiteral g_aHttpProxyPN = u"ooInetHTTPProxyName";
+constexpr OUStringLiteral g_aHttpPortPN = u"ooInetHTTPProxyPort";
+constexpr OUStringLiteral g_aHttpsProxyPN = u"ooInetHTTPSProxyName";
+constexpr OUStringLiteral g_aHttpsPortPN = u"ooInetHTTPSProxyPort";
+constexpr OUStringLiteral g_aFtpProxyPN = u"ooInetFTPProxyName";
+constexpr OUStringLiteral g_aFtpPortPN = u"ooInetFTPProxyPort";
+constexpr OUStringLiteral g_aNoProxyDescPN = u"ooInetNoProxy";
IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString&, rTest, bool)
{