[Libreoffice-commits] core.git: basctl/source basegfx/test basic/source chart2/source comphelper/source connectivity/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source forms/source framework/inc framework/source i18npool/source include/editeng oox/source reportdesign/source sc/qa scripting/source sc/source sdext/source sd/source sfx2/source stoc/source svgio/source svtools/source svx/source sw/qa sw/source testtools/source toolkit/source unotools/source vbahelper/source vcl/source writerfilter/source writerperfect/qa xmloff/source xmlscript/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jan 9 12:03:01 UTC 2021


 basctl/source/basicide/basides1.cxx                                     |    8 
 basctl/source/basicide/localizationmgr.cxx                              |    2 
 basctl/source/dlged/dlged.cxx                                           |    4 
 basctl/source/dlged/propbrw.cxx                                         |    2 
 basegfx/test/SvgPathImportExport.cxx                                    |   10 
 basegfx/test/boxclipper.cxx                                             |    2 
 basegfx/test/clipstate.cxx                                              |    2 
 basic/source/basmgr/basmgr.cxx                                          |   12 -
 basic/source/runtime/runtime.cxx                                        |    2 
 basic/source/uno/dlgcont.cxx                                            |    4 
 chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx |    2 
 chart2/source/controller/main/ElementSelector.cxx                       |    2 
 chart2/source/model/main/CartesianCoordinateSystem.cxx                  |    2 
 chart2/source/model/main/PolarCoordinateSystem.cxx                      |    2 
 chart2/source/tools/CachedDataSequence.cxx                              |    2 
 chart2/source/tools/ConfigColorScheme.cxx                               |    2 
 chart2/source/tools/ErrorBar.cxx                                        |    2 
 chart2/source/tools/InternalDataProvider.cxx                            |    6 
 chart2/source/tools/ReferenceSizeProvider.cxx                           |    2 
 chart2/source/tools/Scaling.cxx                                         |    8 
 chart2/source/tools/UncachedDataSequence.cxx                            |    2 
 chart2/source/view/axes/DateScaling.cxx                                 |    4 
 comphelper/source/misc/numberedcollection.cxx                           |    2 
 connectivity/source/commontools/conncleanup.cxx                         |    2 
 connectivity/source/commontools/dbtools.cxx                             |   30 +-
 connectivity/source/commontools/dbtools2.cxx                            |    2 
 connectivity/source/cpool/ZConnectionPool.cxx                           |    2 
 connectivity/source/drivers/evoab2/NResultSetMetaData.cxx               |    2 
 connectivity/source/drivers/file/FDatabaseMetaData.cxx                  |    2 
 connectivity/source/drivers/firebird/Driver.cxx                         |    8 
 connectivity/source/drivers/jdbc/JConnection.cxx                        |    2 
 connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx             |    4 
 connectivity/source/drivers/macab/MacabResultSetMetaData.cxx            |    2 
 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx         |    4 
 connectivity/source/parse/sqliterator.cxx                               |    2 
 cui/source/customize/acccfg.cxx                                         |    4 
 cui/source/customize/cfgutil.cxx                                        |    2 
 cui/source/dialogs/cuigaldlg.cxx                                        |    2 
 cui/source/inc/cfg.hxx                                                  |    8 
 cui/source/options/optasian.cxx                                         |    4 
 cui/source/options/optgdlg.cxx                                          |   10 
 cui/source/options/optinet2.cxx                                         |   16 -
 dbaccess/source/core/api/FilteredContainer.cxx                          |    2 
 dbaccess/source/core/dataaccess/databasedocument.cxx                    |    2 
 dbaccess/source/core/misc/DatabaseDataProvider.cxx                      |    2 
 dbaccess/source/core/recovery/dbdocrecovery.cxx                         |    4 
 dbaccess/source/core/recovery/storagetextstream.cxx                     |    2 
 dbaccess/source/core/recovery/subcomponentrecovery.cxx                  |    4 
 dbaccess/source/ui/app/AppController.cxx                                |    2 
 dbaccess/source/ui/app/AppControllerGen.cxx                             |    2 
 dbaccess/source/ui/dlg/queryfilter.cxx                                  |    4 
 dbaccess/source/ui/misc/indexcollection.cxx                             |    2 
 dbaccess/source/ui/querydesign/querycontroller.cxx                      |    4 
 desktop/source/app/app.cxx                                              |    4 
 desktop/source/app/check_ext_deps.cxx                                   |    2 
 desktop/source/app/cmdlinehelp.cxx                                      |    4 
 desktop/source/migration/migration.cxx                                  |    6 
 editeng/source/misc/svxacorr.cxx                                        |    6 
 extensions/source/abpilot/admininvokationimpl.cxx                       |    2 
 extensions/source/abpilot/fieldmappingimpl.cxx                          |    2 
 extensions/source/dbpilots/gridwizard.cxx                               |    4 
 extensions/source/dbpilots/optiongrouplayouter.cxx                      |    2 
 filter/source/svg/svgexport.cxx                                         |    4 
 filter/source/svg/svgfilter.cxx                                         |    4 
 forms/source/component/DatabaseForm.cxx                                 |    2 
 forms/source/component/FormattedField.cxx                               |    4 
 framework/inc/taskcreatordefs.hxx                                       |   17 -
 framework/source/accelerators/acceleratorconfiguration.cxx              |    4 
 framework/source/fwe/xml/menudocumenthandler.cxx                        |   12 -
 framework/source/fwe/xml/toolboxdocumenthandler.cxx                     |   10 
 framework/source/fwi/uielement/constitemcontainer.cxx                   |    2 
 framework/source/fwi/uielement/itemcontainer.cxx                        |    2 
 framework/source/fwi/uielement/rootitemcontainer.cxx                    |    4 
 framework/source/helper/statusindicatorfactory.cxx                      |    2 
 framework/source/helper/uiconfigelementwrapperbase.cxx                  |   16 -
 framework/source/helper/uielementwrapperbase.cxx                        |    6 
 framework/source/inc/accelerators/acceleratorconfiguration.hxx          |    6 
 framework/source/jobs/jobexecutor.cxx                                   |    4 
 framework/source/layoutmanager/layoutmanager.cxx                        |    2 
 framework/source/loadenv/loadenv.cxx                                    |    4 
 framework/source/services/autorecovery.cxx                              |   52 ++---
 framework/source/uiconfiguration/imagemanagerimpl.cxx                   |    4 
 framework/source/uielement/recentfilesmenucontroller.cxx                |    6 
 framework/source/uielement/toolbarsmenucontroller.cxx                   |    4 
 framework/source/uielement/uicommanddescription.cxx                     |    2 
 i18npool/source/collator/chaptercollator.cxx                            |    2 
 i18npool/source/collator/collator_unicode.cxx                           |    2 
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx   |    2 
 i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx           |    4 
 i18npool/source/nativenumber/nativenumbersupplier.cxx                   |    2 
 i18npool/source/ordinalsuffix/ordinalsuffix.cxx                         |    2 
 include/editeng/itemtype.hxx                                            |    2 
 oox/source/ole/oleobjecthelper.cxx                                      |    2 
 reportdesign/source/core/api/ReportDefinition.cxx                       |    2 
 reportdesign/source/core/api/ReportEngineJFree.cxx                      |    2 
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx             |    2 
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx             |    2 
 reportdesign/source/filter/xml/xmlfilter.cxx                            |    8 
 sc/qa/unit/helper/shared_test_impl.hxx                                  |    2 
 sc/source/core/tool/autoform.cxx                                        |    2 
 sc/source/ui/docshell/docsh.cxx                                         |   14 -
 sc/source/ui/docshell/impex.cxx                                         |    2 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx                    |    4 
 sc/source/ui/vba/vbaborders.cxx                                         |    2 
 sc/source/ui/vba/vbainterior.cxx                                        |    6 
 sc/source/ui/vba/vbarange.cxx                                           |    6 
 sc/source/ui/vba/vbastyle.cxx                                           |    2 
 scripting/source/dlgprov/dlgprov.cxx                                    |    2 
 sd/source/filter/html/htmlex.cxx                                        |    2 
 sd/source/ui/framework/factories/PresentationFactory.cxx                |    2 
 sd/source/ui/inc/unokywds.hxx                                           |  101 +++++-----
 sd/source/ui/sidebar/MasterPagesSelector.cxx                            |    2 
 sd/source/ui/tools/EventMultiplexer.cxx                                 |    4 
 sd/source/ui/unoidl/DrawController.cxx                                  |    2 
 sdext/source/pdfimport/test/tests.cxx                                   |    6 
 sfx2/source/control/emojicontrol.cxx                                    |   18 -
 sfx2/source/dialog/backingwindow.cxx                                    |    2 
 sfx2/source/dialog/filedlghelper.cxx                                    |    6 
 sfx2/source/doc/DocumentMetadataAccess.cxx                              |    6 
 sfx2/source/doc/Metadatable.cxx                                         |    4 
 sfx2/source/doc/SfxDocumentMetaData.cxx                                 |   12 -
 sfx2/source/doc/docfac.cxx                                              |    2 
 sfx2/source/doc/guisaveas.cxx                                           |    6 
 sfx2/source/doc/templatedlg.cxx                                         |    8 
 sfx2/source/sidebar/SidebarController.cxx                               |    2 
 stoc/source/security/access_controller.cxx                              |    2 
 svgio/source/svgreader/svgtoken.cxx                                     |    4 
 svtools/source/config/fontsubstconfig.cxx                               |   12 -
 svtools/source/misc/sampletext.cxx                                      |    4 
 svtools/source/uno/toolboxcontroller.cxx                                |    2 
 svtools/source/uno/unoevent.cxx                                         |    8 
 svx/source/accessibility/AccessibleShape.cxx                            |    4 
 svx/source/fmcomp/fmgridcl.cxx                                          |    2 
 svx/source/fmcomp/gridcell.cxx                                          |    4 
 svx/source/form/fmobj.cxx                                               |    2 
 svx/source/form/fmundo.cxx                                              |    2 
 svx/source/form/formcontroller.cxx                                      |    2 
 svx/source/gallery2/gallery1.cxx                                        |    4 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx                       |    2 
 svx/source/sidebar/line/LinePropertyPanelBase.cxx                       |    2 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx                     |    2 
 svx/source/svdraw/svdoole2.cxx                                          |    2 
 svx/source/tbxctrls/extrusioncontrols.cxx                               |   10 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx                          |   12 -
 svx/source/toolbars/extrusionbar.cxx                                    |   20 -
 svx/source/toolbars/fontworkbar.cxx                                     |    2 
 svx/source/unodraw/unoshape.cxx                                         |   86 ++++----
 sw/qa/core/uwriter.cxx                                                  |    2 
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx                               |    2 
 sw/qa/extras/ww8export/ww8export.cxx                                    |    2 
 sw/source/core/access/acccell.cxx                                       |    2 
 sw/source/core/access/acccontext.hxx                                    |    2 
 sw/source/core/access/accdoc.cxx                                        |    4 
 sw/source/core/access/accembedded.cxx                                   |    2 
 sw/source/core/access/accfootnote.cxx                                   |    4 
 sw/source/core/access/accheaderfooter.cxx                               |    4 
 sw/source/core/access/accpage.cxx                                       |    2 
 sw/source/core/access/accpara.cxx                                       |    4 
 sw/source/core/access/accpreview.cxx                                    |    2 
 sw/source/core/access/acctable.cxx                                      |    2 
 sw/source/core/crsr/crossrefbookmark.cxx                                |    2 
 sw/source/core/swg/SwXMLTextBlocks1.cxx                                 |    2 
 sw/source/core/text/EnhancedPDFExportHelper.cxx                         |    8 
 sw/source/filter/ww8/ww8scan.hxx                                        |   16 -
 sw/source/filter/xml/XMLRedlineImportHelper.cxx                         |    6 
 sw/source/ui/vba/vbalisthelper.cxx                                      |   12 -
 sw/source/uibase/app/applab.cxx                                         |    2 
 sw/source/uibase/utlui/unotools.cxx                                     |    2 
 testtools/source/bridgetest/currentcontextchecker.cxx                   |    4 
 toolkit/source/controls/stdtabcontroller.cxx                            |    2 
 toolkit/source/controls/tabpagemodel.cxx                                |    2 
 toolkit/source/helper/formpdfexport.cxx                                 |   28 +-
 unotools/source/config/historyoptions.cxx                               |   14 -
 unotools/source/config/lingucfg.cxx                                     |    2 
 unotools/source/config/saveopt.cxx                                      |    2 
 vbahelper/source/vbahelper/vbacommandbarhelper.hxx                      |   10 
 vbahelper/source/vbahelper/vbahelper.cxx                                |    9 
 vcl/source/gdi/gdimtf.cxx                                               |    2 
 writerfilter/source/dmapper/FormControlHelper.cxx                       |    2 
 writerfilter/source/dmapper/TextEffectsHandler.cxx                      |    2 
 writerperfect/qa/unit/DirectoryStreamTest.cxx                           |    6 
 writerperfect/qa/unit/WPXSvStreamTest.cxx                               |    4 
 xmloff/source/chart/SchXMLTableContext.cxx                              |    2 
 xmloff/source/draw/sdxmlexp.cxx                                         |    6 
 xmloff/source/draw/shapeimport.cxx                                      |    8 
 xmloff/source/forms/elementimport.cxx                                   |    2 
 xmloff/source/meta/xmlversion.cxx                                       |    2 
 xmloff/source/text/XMLTextFrameContext.cxx                              |    8 
 xmloff/source/text/XMLTextListBlockContext.cxx                          |    2 
 xmloff/source/text/XMLTextMarkImportContext.cxx                         |    2 
 xmloff/source/text/txtfldi.cxx                                          |   54 ++---
 xmloff/source/text/txtimp.cxx                                           |   32 +--
 xmloff/source/text/txtvfldi.cxx                                         |   18 -
 xmlscript/source/xmllib_imexp/xmllib_export.cxx                         |    4 
 194 files changed, 598 insertions(+), 595 deletions(-)

New commits:
commit ac396f2f6b058ddff8c394443669b8c5d8b97b71
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jan 8 19:54:55 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jan 9 13:01:49 2021 +0100

    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 at redhat.com>

diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 7d931a70bad4..8942d87f4ae0 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1209,11 +1209,11 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
 
 void Shell::ManageToolbars()
 {
-    static const OUStringLiteral aMacroBarResName = u"private:resource/toolbar/macrobar";
-    static const OUStringLiteral aDialogBarResName = u"private:resource/toolbar/dialogbar";
-    static const OUStringLiteral aInsertControlsBarResName
+    static constexpr OUStringLiteral aMacroBarResName = u"private:resource/toolbar/macrobar";
+    static constexpr OUStringLiteral aDialogBarResName = u"private:resource/toolbar/dialogbar";
+    static constexpr OUStringLiteral aInsertControlsBarResName
         = u"private:resource/toolbar/insertcontrolsbar";
-    static const OUStringLiteral aFormControlsBarResName
+    static constexpr OUStringLiteral aFormControlsBarResName
         = u"private:resource/toolbar/formcontrolsbar";
 
     if( !pCurWin )
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 806b3d8aacae..6dd07a021d32 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -78,7 +78,7 @@ bool LocalizationMgr::isLibraryLocalized ()
 
 void LocalizationMgr::handleTranslationbar ()
 {
-    static const OUStringLiteral aToolBarResName = u"private:resource/toolbar/translationbar";
+    static constexpr OUStringLiteral aToolBarResName = u"private:resource/toolbar/translationbar";
 
     Reference< beans::XPropertySet > xFrameProps
         ( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index ced23c5474bc..f99dab40d4c3 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -57,8 +57,8 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::io;
 
-const OUStringLiteral aResourceResolverPropName = u"ResourceResolver";
-const OUStringLiteral aDecorationPropName = u"Decoration";
+constexpr OUStringLiteral aResourceResolverPropName = u"ResourceResolver";
+constexpr OUStringLiteral aDecorationPropName = u"Decoration";
 
 
 // DlgEdHint
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 73e90e2827ac..084395ad2536 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -141,7 +141,7 @@ void PropBrw::ImplReCreateController()
 
         // create a property browser controller
         Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_SET_THROW );
-        static const OUStringLiteral s_sControllerServiceName = u"com.sun.star.awt.PropertyBrowserController";
+        static constexpr OUStringLiteral s_sControllerServiceName = u"com.sun.star.awt.PropertyBrowserController";
         m_xBrowserController.set( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
         if ( !m_xBrowserController.is() )
         {
diff --git a/basegfx/test/SvgPathImportExport.cxx b/basegfx/test/SvgPathImportExport.cxx
index 7fa0468e7042..955c47b239f2 100644
--- a/basegfx/test/SvgPathImportExport.cxx
+++ b/basegfx/test/SvgPathImportExport.cxx
@@ -116,7 +116,7 @@ public:
         CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D",
                                utils::importFromSvgD( aPoly, aPath0, false, nullptr ));
         aExport = utils::exportToSvgD( aPoly, true, true, false );
-        static const OUStringLiteral sExportString = u"m10 10h-20v-20h20z";
+        static constexpr OUStringLiteral sExportString = u"m10 10h-20v-20h20z";
         CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting rectangle to SVG-D",
                                OUString(sExportString), aExport );
         CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D (round-trip",
@@ -143,7 +143,7 @@ public:
 
         // so for correct unit test i add the new exported string here as sExportStringSimpleBezier
         // and compare to it.
-        static const OUStringLiteral sExportStringSimpleBezier =
+        static constexpr OUStringLiteral sExportStringSimpleBezier =
             u"m11430 0c-8890 3810 5715 6985 5715 6985"
             "l-17145-1905c0 0 22860-10160 16510 6350"
             "s-3810-11430-3810-11430z";
@@ -164,7 +164,7 @@ public:
 
         // same here, the corrected export with the corrected B2DPolygon is simply more efficient,
         // so i needed to change the compare string. Also adding the re-import comparison below.
-        static const OUStringLiteral sExportString1 =
+        static constexpr OUStringLiteral sExportString1 =
             u"m1917 1114c-89-189-233-284-430-284-167 0-306 91-419 273s-170 370-17"
             "0 564c0 145 33 259 98 342 65 84 150 126 257 126q115.5 0 231-57s147-97 210-176 99-143 109-190c38-199 76-398 114"
             "-598zm840 1646c-133 73-312 139-537 197-225 57-440 86-644 87-483-1-866-132-1150-392-284-261-426-619-426-1076 0-"
@@ -187,7 +187,7 @@ public:
         CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D",
                                utils::importFromSvgD( aPoly, aPath3, false, nullptr ));
         aExport = utils::exportToSvgD( aPoly, true, true, false );
-        static const OUStringLiteral sExportString2 =
+        static constexpr OUStringLiteral sExportString2 =
             u"m1598 125h306v2334h-306v-1105h-1293v1105h-305v-2334h305v973h1293"
             "zm2159 1015 78-44 85 235-91 47-91 40-90 34-90 29-89 21-88 16-88 10-88 3-102-4-97"
             "-12-91-19-85-26-40-16-39-18-38-20-36-22-34-24-33-26-32-27-30-30-29-31-27-33-25-3"
@@ -220,7 +220,7 @@ public:
             utils::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) ));
         aExport = utils::exportToSvgD( B2DPolyPolygon(aRect), false, false, false );
 
-        static const OUStringLiteral sExportStringRect = u"M0 0H4000V4000H0Z";
+        static constexpr OUStringLiteral sExportStringRect = u"M0 0H4000V4000H0Z";
         CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting to rectangle svg-d string",
                                OUString(sExportStringRect), aExport);
     }
diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx
index cca5cabf3766..8aaa45be9fbc 100644
--- a/basegfx/test/boxclipper.cxx
+++ b/basegfx/test/boxclipper.cxx
@@ -155,7 +155,7 @@ public:
             aRandomIntersections.appendElement( aRandomRange, B2VectorOrientation::Negative );
         }
 #else
-        static const OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm
 211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
+        static constexpr OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-7
 43zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
         B2DPolyPolygon randomPoly;
         CPPUNIT_ASSERT(utils::importFromSvgD(randomPoly, randomSvg, false, nullptr));
         for (auto const& aPolygon : randomPoly)
diff --git a/basegfx/test/clipstate.cxx b/basegfx/test/clipstate.cxx
index 94c0246d8312..94cb6b3a2920 100644
--- a/basegfx/test/clipstate.cxx
+++ b/basegfx/test/clipstate.cxx
@@ -127,7 +127,7 @@ public:
     {
         utils::B2DClipState aMixedClip;
 
-        static const OUStringLiteral unionSvg=u"m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
+        static constexpr OUStringLiteral unionSvg=u"m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
 
         B2DPolyPolygon aTmp1;
         CPPUNIT_ASSERT(utils::importFromSvgD(aTmp1, unionSvg, false, nullptr));
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index a3cf5b9e3ccf..03b951ffc02d 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -84,12 +84,12 @@ typedef WeakImplHelper< script::XStarBasicAccess > StarBasicAccessHelper;
 // Version 2
 //  + bool      bReference
 
-const OUStringLiteral szStdLibName = u"Standard";
-const OUStringLiteral szBasicStorage = u"StarBASIC";
-const OUStringLiteral szOldManagerStream = u"BasicManager";
-const OUStringLiteral szManagerStream = u"BasicManager2";
-const OUStringLiteral szImbedded = u"LIBIMBEDDED";
-const OStringLiteral szCryptingKey = "CryptedBasic";
+constexpr OUStringLiteral szStdLibName = u"Standard";
+constexpr OUStringLiteral szBasicStorage = u"StarBASIC";
+constexpr OUStringLiteral szOldManagerStream = u"BasicManager";
+constexpr OUStringLiteral szManagerStream = u"BasicManager2";
+constexpr OUStringLiteral szImbedded = u"LIBIMBEDDED";
+constexpr OStringLiteral szCryptingKey = "CryptedBasic";
 
 
 const StreamMode eStreamReadMode = StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL;
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index aecf2f7f9a3d..87cef46cffbe 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1786,7 +1786,7 @@ void removeDimAsNewRecoverItem( SbxVariable* pVar )
 // saving object variable
 // not-object variables will cause errors
 
-const OUStringLiteral pCollectionStr = u"Collection";
+constexpr OUStringLiteral pCollectionStr = u"Collection";
 
 void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bHandleDefaultProp )
 {
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index a8e124616910..13055cb130e1 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -342,8 +342,8 @@ SfxLibraryContainer* SfxDialogLibraryContainer::createInstanceImpl()
     return new SfxDialogLibraryContainer();
 }
 
-const OUStringLiteral aResourceFileNameBase = u"DialogStrings";
-const OUStringLiteral aResourceFileCommentBase = u"# Strings for Dialog Library ";
+constexpr OUStringLiteral aResourceFileNameBase = u"DialogStrings";
+constexpr OUStringLiteral aResourceFileCommentBase = u"# Strings for Dialog Library ";
 
 // Resource handling
 Reference< css::resource::XStringResourcePersistence >
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index 3b48c7907a4c..8551915d9c88 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -60,7 +60,7 @@ WrappedScaleTextProperty::WrappedScaleTextProperty(const std::shared_ptr<Chart2M
 
 void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
 {
-    static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
+    static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
 
     if( !xInnerPropertySet.is() )
         return;
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 91e299d4906d..aea893a66ffa 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -48,7 +48,7 @@ using ::com::sun::star::uno::Sequence;
 
 namespace
 {
-const OUStringLiteral lcl_aServiceName
+constexpr OUStringLiteral lcl_aServiceName
     = u"com.sun.star.comp.chart.ElementSelectorToolbarController";
 }
 
diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx
index f8cc8f17ad88..c65adee25829 100644
--- a/chart2/source/model/main/CartesianCoordinateSystem.cxx
+++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx
@@ -31,7 +31,7 @@ namespace com::sun::star::uno { class XComponentContext; }
 namespace
 {
 
-const OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
+constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
 
 }
 
diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx
index 2d2497bc23c9..5c891989e37f 100644
--- a/chart2/source/model/main/PolarCoordinateSystem.cxx
+++ b/chart2/source/model/main/PolarCoordinateSystem.cxx
@@ -31,7 +31,7 @@ using ::com::sun::star::uno::Sequence;
 namespace
 {
 
-const OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
+constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
     = u"com.sun.star.chart2.CoordinateSystems.Polar";
 
 }
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index dc44985589cc..6c8826701779 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -42,7 +42,7 @@ using ::chart::impl::CachedDataSequence_Base;
 
 namespace
 {
-const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
+constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
 
 enum
 {
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 466e26ae88b3..50d72a88207e 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
 namespace
 {
 
-const OUStringLiteral aSeriesPropName = u"Series";
+constexpr OUStringLiteral aSeriesPropName = u"Series";
 
 } // anonymous namespace
 
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 6dd803093365..d894b16a3ff4 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -41,7 +41,7 @@ using namespace ::com::sun::star;
 namespace
 {
 
-const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
+constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
 
 bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
 {
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index abc3aea59d8f..f1bf987fa2c6 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -57,12 +57,12 @@ namespace chart
 namespace
 {
 
-const OUStringLiteral lcl_aCategoriesRangeName = u"categories";
+constexpr OUStringLiteral lcl_aCategoriesRangeName = u"categories";
 const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level
 const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point
-const OUStringLiteral lcl_aCategoriesRoleName = u"categories";
+constexpr OUStringLiteral lcl_aCategoriesRoleName = u"categories";
 const char lcl_aLabelRangePrefix[] = "label ";
-const OUStringLiteral lcl_aCompleteRange = u"all";
+constexpr OUStringLiteral lcl_aCompleteRange = u"all";
 
 typedef std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
     lcl_tSequenceMap;
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index 8e254903929e..b5b928e9e843 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -131,7 +131,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet(
     if( ! xProp.is())
         return;
 
-    static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
+    static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
 
     try
     {
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index b61886c643e8..e10757928a99 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -27,10 +27,10 @@ namespace com::sun::star::uno { class XComponentContext; }
 namespace
 {
 
-const OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
-const OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
-const OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
-const OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
+constexpr OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
+constexpr OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
+constexpr OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
+constexpr OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
 
 }
 
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index bdffa24a458d..fee4af622126 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -41,7 +41,7 @@ using ::chart::impl::UncachedDataSequence_Base;
 
 namespace
 {
-const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
+constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
 
 enum
 {
diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx
index b5a690e203aa..a926b5a43c51 100644
--- a/chart2/source/view/axes/DateScaling.cxx
+++ b/chart2/source/view/axes/DateScaling.cxx
@@ -25,8 +25,8 @@
 namespace
 {
 
-const OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
-const OUStringLiteral lcl_aServiceName_InverseDateScaling
+constexpr OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
+constexpr OUStringLiteral lcl_aServiceName_InverseDateScaling
     = u"com.sun.star.chart2.InverseDateScaling";
 
 const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index 20ed2cc43d9d..9df6a878794b 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -24,7 +24,7 @@
 
 namespace comphelper{
 
-const OUStringLiteral ERRMSG_INVALID_COMPONENT_PARAM = u"NULL as component reference not allowed.";
+constexpr OUStringLiteral ERRMSG_INVALID_COMPONENT_PARAM = u"NULL as component reference not allowed.";
 
 
 NumberedCollection::NumberedCollection()
diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx
index f1d80581ff5a..210c618d6a60 100644
--- a/connectivity/source/commontools/conncleanup.cxx
+++ b/connectivity/source/commontools/conncleanup.cxx
@@ -35,7 +35,7 @@ namespace dbtools
     using namespace css::sdbc;
     using namespace css::lang;
 
-    const OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection";
+    constexpr OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection";
 
     OAutoConnectionDisposer::OAutoConnectionDisposer(const Reference< XRowSet >& _rxRowSet, const Reference< XConnection >& _rxConnection)
         :m_xRowSet( _rxRowSet )
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index f96e66e62c7e..cd9f2c9fc48f 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -917,7 +917,7 @@ Reference< XNumberFormatsSupplier> getNumberFormats(
     // ask the parent of the connection (should be a DatabaseAccess)
     Reference< XNumberFormatsSupplier> xReturn;
     Reference< XChild> xConnAsChild(_rxConn, UNO_QUERY);
-    static const OUStringLiteral sPropFormatsSupplier( u"NumberFormatsSupplier" );
+    static constexpr OUStringLiteral sPropFormatsSupplier( u"NumberFormatsSupplier" );
     if (xConnAsChild.is())
     {
         Reference< XPropertySet> xConnParentProps(xConnAsChild->getParent(), UNO_QUERY);
@@ -952,20 +952,20 @@ try
 
     Property* pNewProps = aNewProperties.getArray();
 
-    static const OUStringLiteral sPropFormatsSupplier(u"FormatsSupplier");
-    static const OUStringLiteral sPropCurrencySymbol(u"CurrencySymbol");
-    static const OUStringLiteral sPropDecimals(u"Decimals");
-    static const OUStringLiteral sPropEffectiveMin(u"EffectiveMin");
-    static const OUStringLiteral sPropEffectiveMax(u"EffectiveMax");
-    static const OUStringLiteral sPropEffectiveDefault(u"EffectiveDefault");
-    static const OUStringLiteral sPropDefaultText(u"DefaultText");
-    static const OUStringLiteral sPropDefaultDate(u"DefaultDate");
-    static const OUStringLiteral sPropDefaultTime(u"DefaultTime");
-    static const OUStringLiteral sPropValueMin(u"ValueMin");
-    static const OUStringLiteral sPropValueMax(u"ValueMax");
-    static const OUStringLiteral sPropDecimalAccuracy(u"DecimalAccuracy");
-    static const OUStringLiteral sPropClassId(u"ClassId");
-    static const OUStringLiteral sFormattedServiceName( u"com.sun.star.form.component.FormattedField" );
+    static constexpr OUStringLiteral sPropFormatsSupplier(u"FormatsSupplier");
+    static constexpr OUStringLiteral sPropCurrencySymbol(u"CurrencySymbol");
+    static constexpr OUStringLiteral sPropDecimals(u"Decimals");
+    static constexpr OUStringLiteral sPropEffectiveMin(u"EffectiveMin");
+    static constexpr OUStringLiteral sPropEffectiveMax(u"EffectiveMax");
+    static constexpr OUStringLiteral sPropEffectiveDefault(u"EffectiveDefault");
+    static constexpr OUStringLiteral sPropDefaultText(u"DefaultText");
+    static constexpr OUStringLiteral sPropDefaultDate(u"DefaultDate");
+    static constexpr OUStringLiteral sPropDefaultTime(u"DefaultTime");
+    static constexpr OUStringLiteral sPropValueMin(u"ValueMin");
+    static constexpr OUStringLiteral sPropValueMax(u"ValueMax");
+    static constexpr OUStringLiteral sPropDecimalAccuracy(u"DecimalAccuracy");
+    static constexpr OUStringLiteral sPropClassId(u"ClassId");
+    static constexpr OUStringLiteral sFormattedServiceName( u"com.sun.star.form.component.FormattedField" );
 
     for (const Property& rOldProp : aOldProperties)
     {
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index a57ca9749770..01cdcc03aa76 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -1014,7 +1014,7 @@ bool isAggregateColumn( const Reference< XPropertySet > &_xColumn )
 {
     bool bAgg(false);
 
-    static const OUStringLiteral sAgg = u"AggregateFunction";
+    static constexpr OUStringLiteral sAgg = u"AggregateFunction";
     if ( _xColumn->getPropertySetInfo()->hasPropertyByName(sAgg) )
         _xColumn->getPropertyValue(sAgg) >>= bAgg;
 
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx
index c0b034814deb..2917ce019700 100644
--- a/connectivity/source/cpool/ZConnectionPool.cxx
+++ b/connectivity/source/cpool/ZConnectionPool.cxx
@@ -41,7 +41,7 @@ void SAL_CALL OPoolTimer::onShot()
     m_pPool->invalidatePooledConnections();
 }
 
-const OUStringLiteral TIMEOUT_NODENAME = u"Timeout";
+constexpr OUStringLiteral TIMEOUT_NODENAME = u"Timeout";
 
 OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver,
                                  const Reference< XInterface >& _xDriverNode,
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 4c9446348681..7f196bed35e7 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -40,7 +40,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData()
 
 void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns)
 {
-        static const OUStringLiteral aName = u"Name";
+        static constexpr OUStringLiteral aName = u"Name";
 
         for (const auto& rxColumn : *xColumns)
         {
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 6a247ee8f41e..2fffb76f78e3 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -165,7 +165,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
     // check if any type is given
     // when no types are given then we have to return all tables e.g. TABLE
 
-    static const OUStringLiteral aTable = u"TABLE";
+    static constexpr OUStringLiteral aTable = u"TABLE";
 
     bool bTableFound = true;
     sal_Int32 nLength = types.getLength();
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx
index 6adeb7207ecf..55e149e9de5c 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -45,11 +45,11 @@ using namespace connectivity::firebird;
 
 // Static const variables
 namespace {
-const OUStringLiteral our_sFirebirdTmpVar = u"FIREBIRD_TMP";
-const OUStringLiteral our_sFirebirdLockVar = u"FIREBIRD_LOCK";
-const OUStringLiteral our_sFirebirdMsgVar = u"FIREBIRD_MSG";
+constexpr OUStringLiteral our_sFirebirdTmpVar = u"FIREBIRD_TMP";
+constexpr OUStringLiteral our_sFirebirdLockVar = u"FIREBIRD_LOCK";
+constexpr OUStringLiteral our_sFirebirdMsgVar = u"FIREBIRD_MSG";
 #ifdef MACOSX
-const OUStringLiteral our_sFirebirdLibVar = u"LIBREOFFICE_FIREBIRD_LIB";
+constexpr OUStringLiteral our_sFirebirdLibVar = u"LIBREOFFICE_FIREBIRD_LIB";
 #endif
 };
 
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index cf0b549b11aa..e3cd11cabb90 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -699,7 +699,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas
 
 OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString& _sDriverClass)
 {
-    static const OUStringLiteral s_sNodeName
+    static constexpr OUStringLiteral s_sNodeName
         = u"org.openoffice.Office.DataAccess/JDBC/DriverClassPaths";
     ::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
         m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index bc88b2360bd8..540e333aa639 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -739,7 +739,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes(  )
 
     static ODatabaseMetaDataResultSet::ORows aRows = [&]
     {
-        static const OUStringLiteral aTable = u"TABLE";
+        static constexpr OUStringLiteral aTable = u"TABLE";
         ODatabaseMetaDataResultSet::ORows tmp;
         ODatabaseMetaDataResultSet::ORow aRow(2);
         aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue();
@@ -925,7 +925,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables(
     // check whether we have tables in the requested types
     // for the moment, we answer only the "TABLE" table type
     // when no types are given at all, we return all the tables
-    static const OUStringLiteral aTable = u"TABLE";
+    static constexpr OUStringLiteral aTable = u"TABLE";
     bool bTableFound = false;
     const OUString* p = types.getConstArray(),
                          * pEnd = p + types.getLength();
diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
index eed17c553a72..d0ed7298f92b 100644
--- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
@@ -43,7 +43,7 @@ MacabResultSetMetaData::~MacabResultSetMetaData()
 
 void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns)
 {
-    static const OUStringLiteral aName = u"Name";
+    static constexpr OUStringLiteral aName = u"Name";
     MacabRecords *aRecords;
     MacabHeader *aHeader;
 
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index 28cb14faa981..777f4712ce96 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -1090,9 +1090,9 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(bool _bRowVer,const Any& cat
     // E.g. psqlodbc up to at least version 09.01.0100 segfaults
     if (table.empty())
     {
-        static const OUStringLiteral errMsg
+        static constexpr OUStringLiteral errMsg
             = u"ODBC: Trying to get special columns of empty table name";
-        static const OUStringLiteral SQLState = u"HY009";
+        static constexpr OUStringLiteral SQLState = u"HY009";
         throw SQLException( errMsg, *this, SQLState, -1, Any() );
     }
 
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 9f860327757c..766dcf3b8198 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -264,7 +264,7 @@ namespace
     {
         OUString sComposedName;
 
-        static const OUStringLiteral s_sWildcard = u"%" ;
+        static constexpr OUStringLiteral s_sWildcard = u"%" ;
 
         // we want all catalogues, all schemas, all tables
         Sequence< OUString > sTableTypes(3);
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)
 {
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 74b522a4b459..1b08eb8fa7ca 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -343,7 +343,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
                 }
             }
 
-            static const OUStringLiteral sAll = u"%";
+            static constexpr OUStringLiteral sAll = u"%";
             Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
             Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );
 
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index b5a789fad212..21d0d3012077 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -311,7 +311,7 @@ namespace
     }
 }
 
-const OUStringLiteral sPictures = u"Pictures";
+constexpr OUStringLiteral sPictures = u"Pictures";
 
 // base documents seem to have a different behaviour to other documents, the
 // root storage contents at least seem to be re-used over different saves, thus if there is a
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index f317bd474c38..2098f513f343 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -266,7 +266,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL DatabaseDataProvider::cre
     osl::MutexGuard g(m_aMutex);
     uno::Reference< chart2::data::XDataSequence > xData = m_xInternal->createDataSequenceByRangeRepresentation(_sRangeRepresentation);
     uno::Reference<beans::XPropertySet> xProp(xData,uno::UNO_QUERY);
-    static const OUStringLiteral s_sNumberFormatKey = u"NumberFormatKey";
+    static constexpr OUStringLiteral s_sNumberFormatKey = u"NumberFormatKey";
     if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(s_sNumberFormatKey) )
     {
         xProp->setPropertyValue(s_sNumberFormatKey,impl_getNumberFormatKey_nothrow(_sRangeRepresentation));
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index d111aa86b6cf..db7bb53bd53c 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -86,9 +86,9 @@ namespace dbaccess
             return true;
         }
 
-        const OUStringLiteral sRecoveryDataSubStorageName = u"recovery";
+        constexpr OUStringLiteral sRecoveryDataSubStorageName = u"recovery";
 
-        const OUStringLiteral sObjectMapStreamName = u"storage-component-map.ini";
+        constexpr OUStringLiteral sObjectMapStreamName = u"storage-component-map.ini";
 
         void lcl_writeObjectMap_throw( const Reference<XComponentContext> & i_rContext, const Reference< XStorage >& i_rStorage,
             const MapStringToCompDesc& i_mapStorageToCompDesc )
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx
index 1dd774bc8a31..32f68da9a087 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -36,7 +36,7 @@ namespace dbaccess
         Reference< XTextOutputStream2 >  xTextOutput;
     };
 
-    const OUStringLiteral sLineFeed = u"\n";
+    constexpr OUStringLiteral sLineFeed = u"\n";
 
     // StorageTextOutputStream
     StorageTextOutputStream::StorageTextOutputStream(   const Reference<XComponentContext>& i_rContext,
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 11dfa49d17ad..3549cd647fd8 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -160,8 +160,8 @@ namespace dbaccess
             return xCommandProcessor;
         }
 
-        const OUStringLiteral sSettingsStreamName = u"settings.xml";
-        const OUStringLiteral sCurrentQueryDesignName = u"ooo:current-query-design";
+        constexpr OUStringLiteral sSettingsStreamName = u"settings.xml";
+        constexpr OUStringLiteral sCurrentQueryDesignName = u"ooo:current-query-design";
     }
 
     namespace {
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index d75d557615a2..8905536c853d 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -674,7 +674,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
                         aReturn.bEnabled = xEnumAccess.is();
                         if ( aReturn.bEnabled )
                         {
-                            static const OUStringLiteral s_sReportDesign = u"org.libreoffice.report.pentaho.SOReportJobFactory";
+                            static constexpr OUStringLiteral s_sReportDesign = u"org.libreoffice.report.pentaho.SOReportJobFactory";
                             Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(s_sReportDesign);
                             aReturn.bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements();
                         }
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 0ce728d7fa2a..28b4c4053da3 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -639,7 +639,7 @@ void OApplicationController::onLoadedMenu(const Reference< css::frame::XLayoutMa
     if ( !_xLayoutManager.is() )
         return;
 
-    static const OUStringLiteral s_sStatusbar = u"private:resource/statusbar/statusbar";
+    static constexpr OUStringLiteral s_sStatusbar = u"private:resource/statusbar/statusbar";
     _xLayoutManager->createElement( s_sStatusbar );
     _xLayoutManager->requestElement( s_sStatusbar );
 
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index da4d61641936..1b75869cf15e 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -304,10 +304,10 @@ bool DlgFilterCrit::getCondition(const weld::ComboBox& _rField,const weld::Combo
                     }
                 }
                 xColumn->getPropertyValue(PROPERTY_REALNAME)    >>= _rFilter.Name;
-                static const OUStringLiteral sAgg = u"AggregateFunction";
+                static constexpr OUStringLiteral sAgg = u"AggregateFunction";
                 if ( xInfo->hasPropertyByName(sAgg) )
                     xColumn->getPropertyValue(sAgg) >>= bHaving;
-                static const OUStringLiteral sFunction = u"Function";
+                static constexpr OUStringLiteral sFunction = u"Function";
                 if ( xInfo->hasPropertyByName(sFunction) )
                     xColumn->getPropertyValue(sFunction) >>= bFunction;
             }
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 046a41a000ea..8a5448e623f9 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -122,7 +122,7 @@ namespace dbaui
             }
 
             // set the properties
-            static const OUStringLiteral s_sNamePropertyName = u"Name";
+            static constexpr OUStringLiteral s_sNamePropertyName = u"Name";
             // the index' own props
             xIndexDescriptor->setPropertyValue("IsUnique", css::uno::makeAny(_rPos->bUnique));
             xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 5bab3d26f30b..aa9145d5cb7a 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -149,8 +149,8 @@ namespace
             return;
 
         xLayoutManager->lock();
-        static const OUStringLiteral s_sDesignToolbar = u"private:resource/toolbar/designobjectbar";
-        static const OUStringLiteral s_sSqlToolbar = u"private:resource/toolbar/sqlobjectbar";
+        static constexpr OUStringLiteral s_sDesignToolbar = u"private:resource/toolbar/designobjectbar";
+        static constexpr OUStringLiteral s_sSqlToolbar = u"private:resource/toolbar/sqlobjectbar";
         if ( _bDesign )
         {
             xLayoutManager->destroyElement( s_sSqlToolbar );
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 2f4fcdc6904b..b6bc634757e9 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -561,7 +561,7 @@ bool Desktop::QueryExit()
     {
     }
 
-    static const OUStringLiteral SUSPEND_QUICKSTARTVETO = u"SuspendQuickstartVeto";
+    static constexpr OUStringLiteral SUSPEND_QUICKSTARTVETO = u"SuspendQuickstartVeto";
 
     Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
     Reference< XPropertySet > xPropertySet(xDesktop, UNO_QUERY_THROW);
@@ -873,7 +873,7 @@ namespace {
 #if HAVE_FEATURE_BREAKPAD
 void handleCrashReport()
 {
-    static const OUStringLiteral SERVICENAME_CRASHREPORT = u"com.sun.star.comp.svx.CrashReportUI";
+    static constexpr OUStringLiteral SERVICENAME_CRASHREPORT = u"com.sun.star.comp.svx.CrashReportUI";
 
     css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
 
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 2e667e0ad64c..3080909b484c 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -207,7 +207,7 @@ void SilentCommandEnv::pop()
 } // end namespace
 
 
-const OUStringLiteral aAccessSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
+constexpr OUStringLiteral aAccessSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
 
 static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContext > const &xContext )
 {
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 03e45b7278c0..419b03b3acda 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -35,10 +35,10 @@
 
 namespace desktop
 {
-    const OUStringLiteral aCmdLineHelp_version =
+    constexpr OUStringLiteral aCmdLineHelp_version =
         u"%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION %BUILDID\n"
         "\n";
-    const OUStringLiteral aCmdLineHelp =
+    constexpr OUStringLiteral aCmdLineHelp =
         u"Usage: %CMDNAME [argument...]\n"
         "       argument - switches, switch parameters and document URIs (filenames).   \n\n"
         "Using without special arguments:                                               \n"
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 4955c279ec32..ef4b6688d4c2 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -69,9 +69,9 @@ using namespace com::sun::star;
 namespace desktop
 {
 
-const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
-const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
-const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
 
 static OUString mapModuleShortNameToIdentifier(std::u16string_view sShortName)
 {
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index e1a28403e40e..ae6dceb33adf 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -95,9 +95,9 @@ namespace o3tl {
 }
 const sal_Unicode cNonBreakingSpace = 0xA0; // UNICODE code for no break space
 
-const OUStringLiteral pXMLImplWrdStt_ExcptLstStr = u"WordExceptList.xml";
-const OUStringLiteral pXMLImplCplStt_ExcptLstStr = u"SentenceExceptList.xml";
-const OUStringLiteral pXMLImplAutocorr_ListStr = u"DocumentList.xml";
+constexpr OUStringLiteral pXMLImplWrdStt_ExcptLstStr = u"WordExceptList.xml";
+constexpr OUStringLiteral pXMLImplCplStt_ExcptLstStr = u"SentenceExceptList.xml";
+constexpr OUStringLiteral pXMLImplAutocorr_ListStr = u"DocumentList.xml";
 
 const char
     /* also at these beginnings - Brackets and all kinds of begin characters */
diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx
index 720ef26fb90c..c8ec00b681a7 100644
--- a/extensions/source/abpilot/admininvokationimpl.cxx
+++ b/extensions/source/abpilot/admininvokationimpl.cxx
@@ -62,7 +62,7 @@ namespace abp
         {
             // the service name of the administration dialog
             static const char16_t s_sAdministrationServiceName[] = u"com.sun.star.sdb.DatasourceAdministrationDialog";
-            static const OUStringLiteral s_sDataSourceTypeChangeDialog = u"com.sun.star.sdb.DataSourceTypeChangeDialog";
+            static constexpr OUStringLiteral s_sDataSourceTypeChangeDialog = u"com.sun.star.sdb.DataSourceTypeChangeDialog";
 
             // the parameters for the call
             Sequence<Any> aArguments(comphelper::InitAnyPropertySequence(
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx
index 34d860cf3f49..8047053dc51d 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -50,7 +50,7 @@ namespace abp
 
 
     const char16_t sDriverSettingsNodeName[] = u"/org.openoffice.Office.DataAccess/DriverSettings/com.sun.star.comp.sdbc.MozabDriver";
-    const OUStringLiteral sAddressBookNodeName = u"/org.openoffice.Office.DataAccess/AddressBook";
+    constexpr OUStringLiteral sAddressBookNodeName = u"/org.openoffice.Office.DataAccess/AddressBook";
 
     namespace fieldmapping
     {
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 43d6054cdfa3..1c5f568795e0 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -93,8 +93,8 @@ namespace dbp
         if (!xColumnFactory.is() || !xColumnContainer.is())
             return;
 
-        static const OUStringLiteral s_sMouseWheelBehavior = u"MouseWheelBehavior";
-        static const OUStringLiteral s_sEmptyString = u"";
+        static constexpr OUStringLiteral s_sMouseWheelBehavior = u"MouseWheelBehavior";
+        static constexpr OUStringLiteral s_sEmptyString = u"";
 
         // collect "descriptors" for the to-be-created (grid)columns
         std::vector< OUString > aColumnServiceNames;  // service names to be used with the XGridColumnFactory
diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx
index bfd14727cfb1..14a67ada98f7 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.cxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.cxx
@@ -189,7 +189,7 @@ namespace dbp
 
     void OOptionGroupLayouter::implAnchorShape(const Reference< XPropertySet >& _rxShapeProps)
     {
-        static const OUStringLiteral s_sAnchorPropertyName = u"AnchorType";
+        static constexpr OUStringLiteral s_sAnchorPropertyName = u"AnchorType";
         Reference< XPropertySetInfo > xPropertyInfo;
         if (_rxShapeProps.is())
             xPropertyInfo = _rxShapeProps->getPropertySetInfo();
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index cb80cfd7f643..eb5da674e6c3 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -94,13 +94,13 @@ const char    aOOOAttrBackgroundVisibility[] = NSPREFIX "background-visibility";
 const char    aOOOAttrMasterObjectsVisibility[] = NSPREFIX "master-objects-visibility";
 const char    aOOOAttrSlideDuration[] = NSPREFIX "slide-duration";
 const OUString aOOOAttrDateTimeField = NSPREFIX "date-time-field";
-const OUStringLiteral aOOOAttrFooterField = u"" NSPREFIX "footer-field";
+constexpr OUStringLiteral aOOOAttrFooterField = u"" NSPREFIX "footer-field";
 const char    aOOOAttrHasTransition[] = NSPREFIX "has-transition";
 
 // ooo xml attributes for pages and shapes
 const char    aOOOAttrName[] = NSPREFIX "name";
 
-const OUStringLiteral constSvgNamespace = u"http://www.w3.org/2000/svg";
+constexpr OUStringLiteral constSvgNamespace = u"http://www.w3.org/2000/svg";
 
 
 /** Text Field Class Hierarchy
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index a15dc12f53e6..473ff510adc3 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -63,8 +63,8 @@ using namespace ::com::sun::star;
 
 namespace
 {
-    const OUStringLiteral constFilterNameDraw = u"svg_Scalable_Vector_Graphics_Draw";
-    const OUStringLiteral constFilterName = u"svg_Scalable_Vector_Graphics";
+    constexpr OUStringLiteral constFilterNameDraw = u"svg_Scalable_Vector_Graphics_Draw";
+    constexpr OUStringLiteral constFilterName = u"svg_Scalable_Vector_Graphics";
 }
 
 SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 0374c9fb956e..066eeb45e293 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1943,7 +1943,7 @@ void ODatabaseForm::reset_impl(bool _bApproveByListeners)
                 if ( xColProps.is() )
                     xPSI = xColProps->getPropertySetInfo( );
 
-                static const OUStringLiteral PROPERTY_CONTROLDEFAULT = u"ControlDefault";
+                static constexpr OUStringLiteral PROPERTY_CONTROLDEFAULT = u"ControlDefault";
                 if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) )
                 {
                     Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT );
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 1e201c7b3858..ed2f748fb7cd 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -649,7 +649,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
         Reference<XNumberFormats>  xFormats = xSupplier->getNumberFormats();
         OUString         sFormatDescription;
         LanguageType    eFormatLanguage = LANGUAGE_DONTKNOW;
-        static const OUStringLiteral s_aLocaleProp = u"Locale";
+        static constexpr OUStringLiteral s_aLocaleProp = u"Locale";
         Reference<css::beans::XPropertySet>  xFormat = xFormats->getByKey(nKey);
         if (hasProperty(s_aLocaleProp, xFormat))
         {
@@ -660,7 +660,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
                 eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false);
             }
         }
-        static const OUStringLiteral s_aFormatStringProp = u"FormatString";
+        static constexpr OUStringLiteral s_aFormatStringProp = u"FormatString";
         if (hasProperty(s_aFormatStringProp, xFormat))
             xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription;
         _rxOutStream->writeUTF(sFormatDescription);
diff --git a/framework/inc/taskcreatordefs.hxx b/framework/inc/taskcreatordefs.hxx
index 02b85221c801..df56779d4699 100644
--- a/framework/inc/taskcreatordefs.hxx
+++ b/framework/inc/taskcreatordefs.hxx
@@ -21,38 +21,39 @@
 #define INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
 
 /// [XFrame] if it's set, it will be used as parent frame for the new created frame.
-const OUStringLiteral ARGUMENT_PARENTFRAME = u"ParentFrame"; // XFrame
+constexpr OUStringLiteral ARGUMENT_PARENTFRAME = u"ParentFrame"; // XFrame
 
 /** [OUString] if it's not a special name (beginning with "_" ... which are not allowed here!)
                it will be set as the API name of the new created frame.
  */
-const OUStringLiteral ARGUMENT_FRAMENAME = u"FrameName"; // OUString
+constexpr OUStringLiteral ARGUMENT_FRAMENAME = u"FrameName"; // OUString
 
 /// [sal_Bool] If it's set to sal_True we will make the new created frame visible.
-const OUStringLiteral ARGUMENT_MAKEVISIBLE = u"MakeVisible"; // sal_Bool
+constexpr OUStringLiteral ARGUMENT_MAKEVISIBLE = u"MakeVisible"; // sal_Bool
 
 /** [sal_Bool] If not "ContainerWindow" property is set it force creation of a
                top level window as new container window.
  */
-const OUStringLiteral ARGUMENT_CREATETOPWINDOW = u"CreateTopWindow"; // sal_Bool
+constexpr OUStringLiteral ARGUMENT_CREATETOPWINDOW = u"CreateTopWindow"; // sal_Bool
 
 /// [Rectangle] Place the new created frame on this place and resize the container window.
-inline const OUStringLiteral ARGUMENT_POSSIZE = u"PosSize"; // Rectangle
+inline constexpr OUStringLiteral ARGUMENT_POSSIZE = u"PosSize"; // Rectangle
 
 /// [XWindow] an outside created window, used as container window of the new created frame.
-inline const OUStringLiteral ARGUMENT_CONTAINERWINDOW = u"ContainerWindow"; // XWindow
+inline constexpr OUStringLiteral ARGUMENT_CONTAINERWINDOW = u"ContainerWindow"; // XWindow
 
 /** [sal_Bool] enable/disable special mode, where this frame will be part of
                the persistent window state feature suitable for any office module window
  */
-const OUStringLiteral ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE
+constexpr OUStringLiteral ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE
     = u"SupportPersistentWindowState"; // sal_Bool
 
 /** [sal_Bool] enable/disable special mode, where the title bar of our
                the new created frame will be updated automatically.
                Default = ON !
  */
-inline const OUStringLiteral ARGUMENT_ENABLE_TITLEBARUPDATE = u"EnableTitleBarUpdate"; // sal_Bool
+inline constexpr OUStringLiteral ARGUMENT_ENABLE_TITLEBARUPDATE
+    = u"EnableTitleBarUpdate"; // sal_Bool
 
 #endif // INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
 
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index eb01a00c5291..85edc3833025 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -57,8 +57,8 @@
 
 namespace framework
 {
-    const OUStringLiteral CFG_ENTRY_SECONDARY = u"SecondaryKeys";
-    const OUStringLiteral CFG_PROP_COMMAND = u"Command";
+    constexpr OUStringLiteral CFG_ENTRY_SECONDARY = u"SecondaryKeys";
+    constexpr OUStringLiteral CFG_PROP_COMMAND = u"Command";
 
     static OUString lcl_getKeyString(const css::awt::KeyEvent& aKeyEvent)
     {
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index ad55be6dd213..dbc6f7a22444 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -72,12 +72,12 @@
 #define ATTRIBUTE_ITEMSTYLE_RADIO    "radio"
 
 // Property names of a menu/menu item ItemDescriptor
-const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
-const OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
-const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
-const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
-const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
-const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
 
 //  using namespaces
 
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index a829e03ad20d..8d7b9835c3f4 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -48,11 +48,11 @@ namespace framework
 {
 
 // Property names of a menu/menu item ItemDescriptor
-const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
-const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
-const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
-const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
-const OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
 
 static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
                                       OUString&                        rCommandURL,
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index 212f0a80e24b..e02fb7aa3d9a 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -33,7 +33,7 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::container;
 
 const int PROPHANDLE_UINAME     = 1;
-const OUStringLiteral PROPNAME_UINAME = u"UIName";
+constexpr OUStringLiteral PROPNAME_UINAME = u"UIName";
 
 namespace framework
 {
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index 55f6ccecfd50..de2b047653ab 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -30,7 +30,7 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::container;
 
-const OUStringLiteral WRONG_TYPE_EXCEPTION
+constexpr OUStringLiteral WRONG_TYPE_EXCEPTION
     = u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
 
 namespace framework
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index 0016789d2da6..b570154f2eb0 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -33,11 +33,11 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::container;
 
-const OUStringLiteral WRONG_TYPE_EXCEPTION
+constexpr OUStringLiteral WRONG_TYPE_EXCEPTION
     = u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
 
 const int PROPHANDLE_UINAME     = 1;
-const OUStringLiteral PROPNAME_UINAME = u"UIName";
+constexpr OUStringLiteral PROPNAME_UINAME = u"UIName";
 
 namespace framework
 {
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index ce923b2f9e55..62efba05933f 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -48,7 +48,7 @@ struct RescheduleLock: public rtl::Static<osl::Mutex, RescheduleLock> {}; ///< m
 
 }
 
-const OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
+constexpr OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
 
 StatusIndicatorFactory::StatusIndicatorFactory(const css::uno::Reference< css::uno::XComponentContext >& xContext)
     : m_xContext          (xContext )
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index f27c51186f30..399bf8bc9d8c 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -37,14 +37,14 @@ const int UIELEMENT_PROPHANDLE_TYPE             = 5;
 const int UIELEMENT_PROPHANDLE_XMENUBAR         = 6;
 const int UIELEMENT_PROPHANDLE_CONFIGLISTENER   = 7;
 const int UIELEMENT_PROPHANDLE_NOCLOSE          = 8;
-const OUStringLiteral UIELEMENT_PROPNAME_CONFIGLISTENER = u"ConfigListener";
-const OUStringLiteral UIELEMENT_PROPNAME_CONFIGSOURCE = u"ConfigurationSource";
-const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
-const OUStringLiteral UIELEMENT_PROPNAME_PERSISTENT = u"Persistent";
-const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
-const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
-const OUStringLiteral UIELEMENT_PROPNAME_XMENUBAR = u"XMenuBar";
-const OUStringLiteral UIELEMENT_PROPNAME_NOCLOSE = u"NoClose";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_CONFIGLISTENER = u"ConfigListener";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_CONFIGSOURCE = u"ConfigurationSource";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_PERSISTENT = u"Persistent";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_XMENUBAR = u"XMenuBar";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_NOCLOSE = u"NoClose";
 using namespace com::sun::star::beans;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::frame;
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 06db2788beac..829e4f9523eb 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -28,9 +28,9 @@
 const int UIELEMENT_PROPHANDLE_RESOURCEURL  = 1;
 const int UIELEMENT_PROPHANDLE_TYPE         = 2;
 const int UIELEMENT_PROPHANDLE_FRAME        = 3;
-const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
-const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
-const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
diff --git a/framework/source/inc/accelerators/acceleratorconfiguration.hxx b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
index 38d9eaff9e98..df7bed019ff2 100644
--- a/framework/source/inc/accelerators/acceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
@@ -44,9 +44,9 @@
 namespace framework
 {
 
-inline const OUStringLiteral CFG_ENTRY_PRIMARY = u"PrimaryKeys";
-inline const OUStringLiteral CFG_ENTRY_GLOBAL = u"Global";
-inline const OUStringLiteral CFG_ENTRY_MODULES = u"Modules";
+inline constexpr OUStringLiteral CFG_ENTRY_PRIMARY = u"PrimaryKeys";
+inline constexpr OUStringLiteral CFG_ENTRY_GLOBAL = u"Global";
+inline constexpr OUStringLiteral CFG_ENTRY_MODULES = u"Modules";
 
 /**
     implements a read/write access to the accelerator configuration.
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index c90a8f56a1ed..30b90cca6ec4 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -241,8 +241,8 @@ void SAL_CALL JobExecutor::trigger( const OUString& sEvent )
 
 void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent )
 {
-    static const OUStringLiteral EVENT_ON_DOCUMENT_OPENED(u"onDocumentOpened");   // Job UI  event : OnNew    or OnLoad
-    static const OUStringLiteral EVENT_ON_DOCUMENT_ADDED(u"onDocumentAdded");     // Job API event : OnCreate or OnLoadFinished
+    static constexpr OUStringLiteral EVENT_ON_DOCUMENT_OPENED(u"onDocumentOpened");   // Job UI  event : OnNew    or OnLoad
+    static constexpr OUStringLiteral EVENT_ON_DOCUMENT_ADDED(u"onDocumentAdded");     // Job API event : OnCreate or OnLoadFinished
 
     OUString aModuleIdentifier;
     ::std::vector< JobData::TJob2DocEventBinding > lJobs;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 6090cb0f9646..e080497b066b 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::ui;
 using namespace ::com::sun::star::frame;
 
-const OUStringLiteral STATUS_BAR_ALIAS = u"private:resource/statusbar/statusbar";
+constexpr OUStringLiteral STATUS_BAR_ALIAS = u"private:resource/statusbar/statusbar";
 
 namespace framework
 {
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index c24e65959cfb..159247cb2d29 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -91,8 +91,8 @@
 #include <classes/taskcreator.hxx>
 #include <tools/fileutil.hxx>
 
-const OUStringLiteral PROP_TYPES = u"Types";
-const OUStringLiteral PROP_NAME = u"Name";
+constexpr OUStringLiteral PROP_TYPES = u"Types";
+constexpr OUStringLiteral PROP_NAME = u"Name";
 
 namespace framework {
 
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 10b8574d6155..76594a4ec5f3 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -995,30 +995,30 @@ private:
 };
 
 // recovery.xcu
-const OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
+constexpr OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
 
 const char CFG_ENTRY_AUTOSAVE_ENABLED[] = "AutoSave/Enabled";
 const char CFG_ENTRY_AUTOSAVE_TIMEINTERVALL[] = "AutoSave/TimeIntervall"; //sic!
 
-const OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
+constexpr OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
 
-const OUStringLiteral CFG_ENTRY_PROP_TEMPURL = u"TempURL";
-const OUStringLiteral CFG_ENTRY_PROP_ORIGINALURL = u"OriginalURL";
-const OUStringLiteral CFG_ENTRY_PROP_TEMPLATEURL = u"TemplateURL";
-const OUStringLiteral CFG_ENTRY_PROP_FACTORYURL = u"FactoryURL";
-const OUStringLiteral CFG_ENTRY_PROP_MODULE = u"Module";
-const OUStringLiteral CFG_ENTRY_PROP_DOCUMENTSTATE = u"DocumentState";
-const OUStringLiteral CFG_ENTRY_PROP_FILTER = u"Filter";
-const OUStringLiteral CFG_ENTRY_PROP_TITLE = u"Title";
-const OUStringLiteral CFG_ENTRY_PROP_ID = u"ID";
-const OUStringLiteral CFG_ENTRY_PROP_VIEWNAMES = u"ViewNames";
+constexpr OUStringLiteral CFG_ENTRY_PROP_TEMPURL = u"TempURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_ORIGINALURL = u"OriginalURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_TEMPLATEURL = u"TemplateURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_FACTORYURL = u"FactoryURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_MODULE = u"Module";
+constexpr OUStringLiteral CFG_ENTRY_PROP_DOCUMENTSTATE = u"DocumentState";
+constexpr OUStringLiteral CFG_ENTRY_PROP_FILTER = u"Filter";
+constexpr OUStringLiteral CFG_ENTRY_PROP_TITLE = u"Title";
+constexpr OUStringLiteral CFG_ENTRY_PROP_ID = u"ID";
+constexpr OUStringLiteral CFG_ENTRY_PROP_VIEWNAMES = u"ViewNames";
 
-const OUStringLiteral FILTER_PROP_TYPE = u"Type";
-const OUStringLiteral TYPE_PROP_EXTENSIONS = u"Extensions";
+constexpr OUStringLiteral FILTER_PROP_TYPE = u"Type";
+constexpr OUStringLiteral TYPE_PROP_EXTENSIONS = u"Extensions";
 
 // setup.xcu
-const OUStringLiteral CFG_ENTRY_PROP_EMPTYDOCUMENTURL = u"ooSetupFactoryEmptyDocumentURL";
-const OUStringLiteral CFG_ENTRY_PROP_FACTORYSERVICE = u"ooSetupFactoryDocumentService";
+constexpr OUStringLiteral CFG_ENTRY_PROP_EMPTYDOCUMENTURL = u"ooSetupFactoryEmptyDocumentURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_FACTORYSERVICE = u"ooSetupFactoryDocumentService";
 
 const char EVENT_ON_NEW[] = "OnNew";
 const char EVENT_ON_LOAD[] = "OnLoad";
@@ -1034,7 +1034,7 @@ const char EVENT_ON_SAVEFAILED[] = "OnSaveFailed";
 const char EVENT_ON_SAVEASFAILED[] = "OnSaveAsFailed";
 const char EVENT_ON_SAVETOFAILED[] = "OnCopyToFailed";
 
-const OUStringLiteral RECOVERY_ITEM_BASE_IDENTIFIER = u"recovery_item_";
+constexpr OUStringLiteral RECOVERY_ITEM_BASE_IDENTIFIER = u"recovery_item_";
 
 const char CMD_PROTOCOL[] = "vnd.sun.star.autorecovery:";
 
@@ -1050,17 +1050,17 @@ const char CMD_DO_SESSION_RESTORE[] = "/doSessionRestore";    // restore a saved
 const char CMD_DO_DISABLE_RECOVERY[] = "/disableRecovery";    // disable recovery and auto save (!) temp. for this office session
 const char CMD_DO_SET_AUTOSAVE_STATE[] = "/setAutoSaveState";    // disable/enable auto save (not crash save) for this office session
 
-const OUStringLiteral REFERRER_USER = u"private:user";
+constexpr OUStringLiteral REFERRER_USER = u"private:user";
 
-const OUStringLiteral PROP_DISPATCH_ASYNCHRON = u"DispatchAsynchron";
-const OUStringLiteral PROP_PROGRESS = u"StatusIndicator";
-const OUStringLiteral PROP_SAVEPATH = u"SavePath";
-const OUStringLiteral PROP_ENTRY_ID = u"EntryID";
-const OUStringLiteral PROP_AUTOSAVE_STATE = u"AutoSaveState";
+constexpr OUStringLiteral PROP_DISPATCH_ASYNCHRON = u"DispatchAsynchron";
+constexpr OUStringLiteral PROP_PROGRESS = u"StatusIndicator";
+constexpr OUStringLiteral PROP_SAVEPATH = u"SavePath";
+constexpr OUStringLiteral PROP_ENTRY_ID = u"EntryID";
+constexpr OUStringLiteral PROP_AUTOSAVE_STATE = u"AutoSaveState";
 
-const OUStringLiteral OPERATION_START = u"start";
-const OUStringLiteral OPERATION_STOP = u"stop";
-const OUStringLiteral OPERATION_UPDATE = u"update";
+constexpr OUStringLiteral OPERATION_START = u"start";
+constexpr OUStringLiteral OPERATION_STOP = u"stop";
+constexpr OUStringLiteral OPERATION_UPDATE = u"update";
 
 const sal_Int32       MIN_DISCSPACE_DOCSAVE                  =   5; // [MB]
 const sal_Int32       MIN_DISCSPACE_CONFIGSAVE               =   1; // [MB]
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 6206aa3864f5..cfccf014f11c 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -64,8 +64,8 @@ using namespace ::cppu;
 
 const sal_Int16 MAX_IMAGETYPE_VALUE       = css::ui::ImageType::SIZE_32;
 
-const OUStringLiteral IMAGE_FOLDER = u"images";
-const OUStringLiteral BITMAPS_FOLDER = u"Bitmaps";
+constexpr OUStringLiteral IMAGE_FOLDER = u"images";
+constexpr OUStringLiteral BITMAPS_FOLDER = u"Bitmaps";
 
 const o3tl::enumarray<vcl::ImageType, const char*> IMAGELIST_XML_FILE =
 {
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index e0fd3d07f4d2..9e1d9d84bfdb 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -40,9 +40,9 @@ using namespace com::sun::star::util;
 
 namespace {
 
-const OUStringLiteral CMD_CLEAR_LIST = u".uno:ClearRecentFileList";
-const OUStringLiteral CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate";
-const OUStringLiteral CMD_OPEN_REMOTE = u".uno:OpenRemote";
+constexpr OUStringLiteral CMD_CLEAR_LIST = u".uno:ClearRecentFileList";
+constexpr OUStringLiteral CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate";
+constexpr OUStringLiteral CMD_OPEN_REMOTE = u".uno:OpenRemote";
 
 class RecentFilesMenuController :  public svt::PopupMenuControllerBase
 {
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 0689cd39aff2..8f08976528cf 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -68,9 +68,9 @@ using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::ui;
 
-const OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility";
+constexpr OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility";
 
-const OUStringLiteral STATIC_CMD_PART    = u".uno:AvailableToolbars?Toolbar:string=";
+constexpr OUStringLiteral STATIC_CMD_PART    = u".uno:AvailableToolbars?Toolbar:string=";
 const char STATIC_INTERNAL_CMD_PART[]    = ".cmd:";
 
 namespace framework
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 85a2a3e4ccc4..7fdef0eaf06d 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::frame;
 const char CONFIGURATION_ROOT_ACCESS[]           = "/org.openoffice.Office.UI.";
 
 // Special resource URLs to retrieve additional information
-const OUStringLiteral PRIVATE_RESOURCE_URL       = u"private:";
+constexpr OUStringLiteral PRIVATE_RESOURCE_URL       = u"private:";
 
 const sal_Int32   COMMAND_PROPERTY_IMAGE                = 1;
 const sal_Int32   COMMAND_PROPERTY_ROTATE               = 2;
diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx
index 153f5ff3d38d..d5d9b48bd1ba 100644
--- a/i18npool/source/collator/chaptercollator.cxx
+++ b/i18npool/source/collator/chaptercollator.cxx
@@ -72,7 +72,7 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int
     return res1.Value == res2.Value ? 0 : res1.Value > res2.Value ? 1 : -1;
 }
 
-const OUStringLiteral cChapCollator = u"com.sun.star.i18n.ChapterCollator";
+constexpr OUStringLiteral cChapCollator = u"com.sun.star.i18n.ChapterCollator";
 
 OUString SAL_CALL
 ChapterCollator::getImplementationName()
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index f3ba3c062050..8c8255a18229 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -38,7 +38,7 @@ using namespace ::com::sun::star::uno;
 
 namespace i18npool {
 
-const OUStringLiteral implementationName = u"com.sun.star.i18n.Collator_Unicode";
+constexpr OUStringLiteral implementationName = u"com.sun.star.i18n.Collator_Unicode";
 
 Collator_Unicode::Collator_Unicode()
 {
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index fd98a6bc32e3..af020c207faf 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -419,7 +419,7 @@ static
 void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
 {
     OUStringBuffer aTemp(64);
-    static const OUStringLiteral asPersianWord_conjunction_data = u" \u0648 ";
+    static constexpr OUStringLiteral asPersianWord_conjunction_data = u" \u0648 ";
     OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
     unsigned char nSection = 0;
 
diff --git a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
index b4a9f3e0cda6..2045f45f9050 100644
--- a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
@@ -63,7 +63,7 @@ sal_Int16 SAL_CALL IndexEntrySupplier_ja_phonetic::compareIndexEntry(
     return result;
 }
 
-const OUStringLiteral first = u"phonetic (alphanumeric first)";
+constexpr OUStringLiteral first = u"phonetic (alphanumeric first)";
 sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable::loadAlgorithm(
     const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
     sal_Int32 collatorOptions )
@@ -77,7 +77,7 @@ sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant
     return collator->loadCollatorAlgorithm(first, rLocale, collatorOptions) == 0;
 }
 
-const OUStringLiteral last = u"phonetic (alphanumeric last)";
+constexpr OUStringLiteral last = u"phonetic (alphanumeric last)";
 sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable::loadAlgorithm(
     const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
     sal_Int32 collatorOptions )
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index a854d279f7bf..fd487c7de0ea 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -1220,7 +1220,7 @@ OUString getCyrillicNativeNumberString(const OUString& aNumberString)
         return aNumberString;
 }
 
-const OUStringLiteral implementationName = u"com.sun.star.i18n.NativeNumberSupplier";
+constexpr OUStringLiteral implementationName = u"com.sun.star.i18n.NativeNumberSupplier";
 
 OUString SAL_CALL NativeNumberSupplierService::getImplementationName()
 {
diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 38732564fd0c..76dd0440f76f 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -134,7 +134,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffixService::getOrdinalSuffix( sal_I
     return comphelper::containerToSequence(retVec);
 }
 
-const OUStringLiteral cOrdinalSuffix = u"com.sun.star.i18n.OrdinalSuffix";
+constexpr OUStringLiteral cOrdinalSuffix = u"com.sun.star.i18n.OrdinalSuffix";
 
 OUString SAL_CALL OrdinalSuffixService::getImplementationName()
 {
diff --git a/include/editeng/itemtype.hxx b/include/editeng/itemtype.hxx
index 4338d1ff9142..117e477c8621 100644
--- a/include/editeng/itemtype.hxx
+++ b/include/editeng/itemtype.hxx
@@ -29,7 +29,7 @@ class Color;
 class IntlWrapper;
 // static and prototypes -------------------------------------------------
 
-inline const OUStringLiteral cpDelim = u", ";
+inline constexpr OUStringLiteral cpDelim = u", ";
 
 EDITENG_DLLPUBLIC OUString GetMetricText( tools::Long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper * pIntl );
 OUString GetColorString( const Color& rCol );
diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx
index 5cc2b789778a..534d8aff97ab 100644
--- a/oox/source/ole/oleobjecthelper.cxx
+++ b/oox/source/ole/oleobjecthelper.cxx
@@ -89,7 +89,7 @@ void SaveInteropProperties(uno::Reference<frame::XModel> const& xModel,
        OUString const& rObjectName, OUString const*const pOldObjectName,
        OUString const& rProgId)
 {
-    static const OUStringLiteral sEmbeddingsPropName = u"EmbeddedObjects";
+    static constexpr OUStringLiteral sEmbeddingsPropName = u"EmbeddedObjects";
 
     // get interop grab bag from document
     uno::Reference<beans::XPropertySet> const xDocProps(xModel, uno::UNO_QUERY);
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index e7f97aec9f83..378b8041cb04 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1278,7 +1278,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
     uno::Reference< beans::XPropertySet> xProp(_xStorageToSaveTo,uno::UNO_QUERY);
     if ( xProp.is() )
     {
-        static const OUStringLiteral sPropName = u"MediaType";
+        static constexpr OUStringLiteral sPropName = u"MediaType";
         OUString sOldMediaType;
         xProp->getPropertyValue(sPropName) >>= sOldMediaType;
         if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII != sOldMediaType )
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index a60c59b20fa2..13e5dacb3c70 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -130,7 +130,7 @@ OUString OReportEngineJFree::getNewOutputName()
     if ( !m_xReport.is() || !m_xActiveConnection.is() )
         throw lang::IllegalArgumentException();
 
-    static const OUStringLiteral s_sMediaType = u"MediaType";
+    static constexpr OUStringLiteral s_sMediaType = u"MediaType";
 
     MimeConfigurationHelper aConfighelper(m_xContext);
     const OUString sMimeType = m_xReport->getMimeType();
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index ed93930bebb7..b461787b08ae 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -345,7 +345,7 @@ void ExportDocumentHandler::exportTableRows()
     const OUString sRElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT) );
     const OUString sRComponent( lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT) ) ;
     const OUString sFormulaAttrib( lcl_createAttribute(XML_NP_RPT,XML_FORMULA) );
-    static const OUStringLiteral s_sFloat = u"float";
+    static constexpr OUStringLiteral s_sFloat = u"float";
 
     SvXMLAttributeList* pCellAtt = new SvXMLAttributeList();
     uno::Reference< xml::sax::XAttributeList > xCellAtt = pCellAtt;
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 72da191b0710..d9e761c2466c 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -340,7 +340,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
     m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
     if ( !m_xDatabaseDataProvider.is() )
     {
-        static const OUStringLiteral s_sDatabaseDataProvider = u"com.sun.star.chart2.data.DatabaseDataProvider";
+        static constexpr OUStringLiteral s_sDatabaseDataProvider = u"com.sun.star.chart2.data.DatabaseDataProvider";
         m_xDatabaseDataProvider.set(m_xContext->getServiceManager()->createInstanceWithContext(s_sDatabaseDataProvider
             ,m_xContext),uno::UNO_QUERY_THROW);
         m_xDatabaseDataProvider->setRowLimit(10);
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index cf9ff3c7bc02..2fbbb37992d6 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -417,7 +417,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
         aArgs[0] <<= beans::NamedValue("Storage",uno::makeAny(xStorage));
         xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments("com.sun.star.document.ImportEmbeddedObjectResolver",aArgs) , uno::UNO_QUERY);
 
-        static const OUStringLiteral s_sOld = u"OldFormat";
+        static constexpr OUStringLiteral s_sOld = u"OldFormat";
         static comphelper::PropertyMapEntry const pMap[] =
         {
             { OUString("OldFormat") , 1,    cppu::UnoType<sal_Bool>::get(),                 beans::PropertyAttribute::BOUND,     0 },
@@ -436,8 +436,8 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
         xProp->setPropertyValue("StreamRelPath", uno::makeAny(sHierarchicalDocumentName));
 
         uno::Reference<XComponent> xModel = GetModel();
-        static const OUStringLiteral s_sMeta = u"meta.xml";
-        static const OUStringLiteral s_sStreamName = u"StreamName";
+        static constexpr OUStringLiteral s_sMeta = u"meta.xml";
+        static constexpr OUStringLiteral s_sStreamName = u"StreamName";
         xProp->setPropertyValue(s_sStreamName, uno::makeAny(OUString(s_sMeta)));
         ErrCode nRet = ReadThroughComponent( xStorage
                                     ,xModel
@@ -758,7 +758,7 @@ bool ORptFilter::isOldFormat() const
     uno::Reference<beans::XPropertySet> xProp = getImportInfo();
     if ( xProp.is() )
     {
-        static const OUStringLiteral s_sOld = u"OldFormat";
+        static constexpr OUStringLiteral s_sOld = u"OldFormat";
         if ( xProp->getPropertySetInfo()->hasPropertyByName(s_sOld))
         {
             xProp->getPropertyValue(s_sOld) >>= bOldFormat;
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 )
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 62f612baa53b..d52660904471 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -555,7 +555,7 @@ namespace dlgprov
     // XDialogProvider
 
 
-    const OUStringLiteral aDecorationPropName = u"Decoration";
+    constexpr OUStringLiteral aDecorationPropName = u"Decoration";
 
     Reference < XControl > DialogProviderImpl::createDialogImpl(
         const OUString& URL, const Reference< XInterface >& xHandler,
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 88f2cd68220c..c7819eafa3a9 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2222,7 +2222,7 @@ OUString const & HtmlExport::getDocumentTitle()
     return mDocTitle;
 }
 
-const OUStringLiteral JS_NavigateAbs =
+constexpr OUStringLiteral JS_NavigateAbs =
     u"function NavigateAbs( nPage )\r\n"
     "{\r\n"
     "  frames[\"show\"].location.href = \"img\" + nPage + \".$EXT\";\r\n"

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list