diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-08 19:54:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-09 13:01:49 +0100 |
commit | ac396f2f6b058ddff8c394443669b8c5d8b97b71 (patch) | |
tree | fc5120838a69ced58c3cd2333718ffeb6d4adf67 /sfx2 | |
parent | 0c20b68149797c8b0779534a8e0cb9045085d451 (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 'sfx2')
-rw-r--r-- | sfx2/source/control/emojicontrol.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/docfac.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 |
10 files changed, 33 insertions, 33 deletions
diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx index 67d097584645..c3e9910ddacd 100644 --- a/sfx2/source/control/emojicontrol.cxx +++ b/sfx2/source/control/emojicontrol.cxx @@ -26,15 +26,15 @@ #include <comphelper/dispatchcommand.hxx> #include <officecfg/Office/Common.hxx> -const OStringLiteral FILTER_PEOPLE = "people"; -const OStringLiteral FILTER_NATURE = "nature"; -const OStringLiteral FILTER_FOOD = "food"; -const OStringLiteral FILTER_ACTIVITY = "activity"; -const OStringLiteral FILTER_TRAVEL = "travel"; -const OStringLiteral FILTER_OBJECTS = "objects"; -const OStringLiteral FILTER_SYMBOLS = "symbols"; -const OStringLiteral FILTER_FLAGS = "flags"; -const OStringLiteral FILTER_UNICODE9 = "unicode9"; +constexpr OStringLiteral FILTER_PEOPLE = "people"; +constexpr OStringLiteral FILTER_NATURE = "nature"; +constexpr OStringLiteral FILTER_FOOD = "food"; +constexpr OStringLiteral FILTER_ACTIVITY = "activity"; +constexpr OStringLiteral FILTER_TRAVEL = "travel"; +constexpr OStringLiteral FILTER_OBJECTS = "objects"; +constexpr OStringLiteral FILTER_SYMBOLS = "symbols"; +constexpr OStringLiteral FILTER_FLAGS = "flags"; +constexpr OStringLiteral FILTER_UNICODE9 = "unicode9"; using namespace com::sun::star; diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index e1ed8755103f..1386ad3a641b 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -57,7 +57,7 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::document; -const OUStringLiteral SERVICENAME_CFGREADACCESS = u"com.sun.star.configuration.ConfigurationAccess"; +constexpr OUStringLiteral SERVICENAME_CFGREADACCESS = u"com.sun.star.configuration.ConfigurationAccess"; // increase size of the text in the buttons on the left fMultiplier-times float const g_fMultiplier = 1.4f; diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 87ebec96b01a..69afa482fa10 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -126,9 +126,9 @@ namespace static std::optional<OUString> GetLastFilterConfigId( FileDialogHelper::Context _eContext ) { - static const OUStringLiteral aSD_EXPORT_IDENTIFIER(u"SdExportLastFilter"); - static const OUStringLiteral aSI_EXPORT_IDENTIFIER(u"SiExportLastFilter"); - static const OUStringLiteral aSW_EXPORT_IDENTIFIER(u"SwExportLastFilter"); + static constexpr OUStringLiteral aSD_EXPORT_IDENTIFIER(u"SdExportLastFilter"); + static constexpr OUStringLiteral aSI_EXPORT_IDENTIFIER(u"SiExportLastFilter"); + static constexpr OUStringLiteral aSW_EXPORT_IDENTIFIER(u"SwExportLastFilter"); switch( _eContext ) { diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 5f109cdf3f54..13e4d0bde45b 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -85,9 +85,9 @@ bool isValidNCName(std::u16string_view i_rIdref) } -const OUStringLiteral s_content = u"content.xml"; -const OUStringLiteral s_styles = u"styles.xml"; -const OUStringLiteral s_manifest = u"manifest.rdf"; +constexpr OUStringLiteral s_content = u"content.xml"; +constexpr OUStringLiteral s_styles = u"styles.xml"; +constexpr OUStringLiteral s_manifest = u"manifest.rdf"; const char s_odfmime [] = "application/vnd.oasis.opendocument."; diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index e77546076df3..595adefd256b 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -112,8 +112,8 @@ using ::sfx2::isValidXmlId; namespace sfx2 { -const OUStringLiteral s_content = u"content.xml"; -const OUStringLiteral s_styles = u"styles.xml"; +constexpr OUStringLiteral s_content = u"content.xml"; +constexpr OUStringLiteral s_styles = u"styles.xml"; static bool isContentFile(std::u16string_view i_rPath) { diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index f26eae3b3add..0c406c76fe24 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -403,13 +403,13 @@ const char* s_stdMetaList[] = { nullptr }; -const OUStringLiteral s_nsXLink = u"http://www.w3.org/1999/xlink"; -const OUStringLiteral s_nsDC = u"http://purl.org/dc/elements/1.1/"; -const OUStringLiteral s_nsODF = u"urn:oasis:names:tc:opendocument:xmlns:office:1.0"; -const OUStringLiteral s_nsODFMeta = u"urn:oasis:names:tc:opendocument:xmlns:meta:1.0"; -// const char* s_nsOOo = "http://openoffice.org/2004/office"; // not used (yet?) +constexpr OUStringLiteral s_nsXLink = u"http://www.w3.org/1999/xlink"; +constexpr OUStringLiteral s_nsDC = u"http://purl.org/dc/elements/1.1/"; +constexpr OUStringLiteral s_nsODF = u"urn:oasis:names:tc:opendocument:xmlns:office:1.0"; +constexpr OUStringLiteral s_nsODFMeta = u"urn:oasis:names:tc:opendocument:xmlns:meta:1.0"; +// constexpr OUStringLiteral s_nsOOo = "http://openoffice.org/2004/office"; // not used (yet?) -const OUStringLiteral s_meta = u"meta.xml"; +constexpr OUStringLiteral s_meta = u"meta.xml"; bool isValidDate(const css::util::Date & i_rDate) { diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 3bc794343f8c..93c5ab52ab47 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -133,7 +133,7 @@ void SfxObjectFactory::SetSystemTemplate( const OUString& rServiceName, const OU static const int nMaxPathSize = 16000; const OUString sConfPath = "Office/Factories/" + rServiceName; - static const OUStringLiteral PROP_DEF_TEMPL_CHANGED + static constexpr OUStringLiteral PROP_DEF_TEMPL_CHANGED = u"ooSetupFactorySystemDefaultTemplateChanged"; static const char DEF_TPL_STR[] = "/soffice."; diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 18a3bd42b907..9def55f25e67 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -111,9 +111,9 @@ #define STATUS_SAVEAS 2 #define STATUS_SAVEAS_STANDARDNAME 3 -const OUStringLiteral aFilterNameString = u"FilterName"; -const OUStringLiteral aFilterOptionsString = u"FilterOptions"; -const OUStringLiteral aFilterDataString = u"FilterData"; +constexpr OUStringLiteral aFilterNameString = u"FilterName"; +constexpr OUStringLiteral aFilterOptionsString = u"FilterOptions"; +constexpr OUStringLiteral aFilterDataString = u"FilterData"; using namespace ::com::sun::star; using namespace css::system; diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 1f4bd0dccfb4..8456d4cd7e99 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -54,10 +54,10 @@ #include <sfx2/strings.hrc> -const OUStringLiteral TM_SETTING_MANAGER = u"TemplateManager"; -const OUStringLiteral TM_SETTING_LASTFOLDER = u"LastFolder"; -const OUStringLiteral TM_SETTING_LASTAPPLICATION = u"LastApplication"; -const OUStringLiteral TM_SETTING_VIEWMODE = u"ViewMode"; +constexpr OUStringLiteral TM_SETTING_MANAGER = u"TemplateManager"; +constexpr OUStringLiteral TM_SETTING_LASTFOLDER = u"LastFolder"; +constexpr OUStringLiteral TM_SETTING_LASTAPPLICATION = u"LastApplication"; +constexpr OUStringLiteral TM_SETTING_VIEWMODE = u"ViewMode"; #define MNI_ACTION_NEW_FOLDER "new" #define MNI_ACTION_RENAME_FOLDER "rename" diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index e6cf00fe376f..168719f84d23 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -65,7 +65,7 @@ using namespace css::uno; namespace { - const OUStringLiteral gsReadOnlyCommandName = u".uno:EditDoc"; + constexpr OUStringLiteral gsReadOnlyCommandName = u".uno:EditDoc"; const sal_Int32 gnWidthCloseThreshold (70); const sal_Int32 gnWidthOpenThreshold (40); |