[Libreoffice-commits] core.git: avmedia/source basic/source canvas/source connectivity/source cppuhelper/source cui/source dbaccess/source extensions/source filter/source fpicker/source hwpfilter/source jvmfwk/plugins libreofficekit/source lingucomponent/source linguistic/source reportdesign/source scaddins/source sccomp/source scripting/source sd/source starmath/source stoc/source svl/source svtools/source svx/source toolkit/source ucbhelper/source ucb/source UnoControls/source unotools/source vbahelper/source vcl/source vcl/unx xmloff/source xmlsecurity/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 2 12:44:37 UTC 2021


 UnoControls/source/controls/progressmonitor.cxx        |   16 +-
 UnoControls/source/controls/statusindicator.cxx        |    8 -
 avmedia/source/framework/soundhandler.cxx              |    2 
 avmedia/source/gstreamer/gstframegrabber.cxx           |    4 
 avmedia/source/gstreamer/gstwindow.cxx                 |    4 
 avmedia/source/win/framegrabber.cxx                    |    4 
 avmedia/source/win/player.cxx                          |    4 
 avmedia/source/win/window.cxx                          |    4 
 basic/source/classes/sb.cxx                            |    2 
 basic/source/sbx/sbxform.cxx                           |   28 +--
 basic/source/sbx/sbxscan.cxx                           |   16 +-
 basic/source/uno/namecont.cxx                          |    4 
 canvas/source/cairo/cairo_canvashelper.cxx             |    2 
 connectivity/source/manager/mdrivermanager.cxx         |    2 
 cppuhelper/source/component_context.cxx                |    6 
 cppuhelper/source/macro_expander.cxx                   |    6 
 cui/source/dialogs/hlmarkwn.cxx                        |    6 
 cui/source/dialogs/showcols.cxx                        |    4 
 cui/source/options/optpath.cxx                         |   10 -
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |   26 +--
 dbaccess/source/ui/uno/composerdialogs.cxx             |    4 
 extensions/source/update/check/updatecheck.cxx         |   10 -
 extensions/source/update/check/updatecheckconfig.cxx   |   34 ++--
 extensions/source/update/check/updatehdl.cxx           |   22 +--
 extensions/source/update/ui/updatecheckui.cxx          |   12 -
 filter/source/msfilter/msdffimp.cxx                    |    2 
 filter/source/svg/svgexport.cxx                        |   12 -
 filter/source/t602/t602filter.cxx                      |   14 -
 filter/source/textfilterdetect/filterdetect.cxx        |   14 -
 fpicker/source/office/fileview.cxx                     |    2 
 hwpfilter/source/hwpreader.cxx                         |    2 
 jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx           |    4 
 libreofficekit/source/gtk/lokdocview.cxx               |    2 
 lingucomponent/source/lingutil/lingutil.cxx            |    2 
 lingucomponent/source/spellcheck/spell/sspellimp.cxx   |    2 
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx    |    2 
 linguistic/source/convdicxml.cxx                       |    6 
 linguistic/source/dicimp.cxx                           |    4 
 linguistic/source/hhconvdic.cxx                        |    2 
 reportdesign/source/core/api/ReportDefinition.cxx      |  122 ++++++++---------
 scaddins/source/analysis/analysis.cxx                  |    6 
 scaddins/source/datefunc/datefunc.cxx                  |    6 
 scaddins/source/pricing/pricing.cxx                    |    6 
 sccomp/source/solver/SolverComponent.cxx               |   10 -
 scripting/source/basprov/basmethnode.cxx               |    4 
 scripting/source/basprov/basscript.cxx                 |    2 
 scripting/source/vbaevents/eventhelper.cxx             |    2 
 sd/source/filter/html/pubdlg.cxx                       |    2 
 starmath/source/cfgitem.cxx                            |    8 -
 stoc/source/security/file_policy.cxx                   |   20 +-
 svl/source/items/srchitem.cxx                          |   28 +--
 svl/source/numbers/numfmuno.cxx                        |   70 ++++-----
 svtools/source/config/miscopt.cxx                      |    6 
 svtools/source/config/slidesorterbaropt.cxx            |    2 
 svtools/source/control/ctrlbox.cxx                     |    2 
 svtools/source/uno/addrtempuno.cxx                     |    2 
 svx/source/dialog/imapdlg.cxx                          |   16 +-
 svx/source/dialog/swframeexample.cxx                   |    2 
 svx/source/form/datanavi.cxx                           |   18 +-
 svx/source/items/viewlayoutitem.cxx                    |    4 
 svx/source/items/zoomslideritem.cxx                    |    8 -
 svx/source/sidebar/PanelFactory.cxx                    |    4 
 svx/source/svdraw/svdview.cxx                          |    2 
 svx/source/tbxctrls/fillctrl.cxx                       |    4 
 svx/source/tbxctrls/grafctrl.cxx                       |    2 
 svx/source/xml/xmleohlp.cxx                            |   18 +-
 svx/source/xml/xmlgrhlp.cxx                            |    4 
 svx/source/xoutdev/_xoutbmp.cxx                        |    8 -
 toolkit/source/controls/controlmodelcontainerbase.cxx  |    2 
 toolkit/source/controls/dialogcontrol.cxx              |    6 
 toolkit/source/controls/geometrycontrolmodel.cxx       |   18 +-
 toolkit/source/controls/tabpagecontainer.cxx           |    2 
 ucb/source/core/FileAccess.cxx                         |    2 
 ucb/source/core/ucbstore.cxx                           |    4 
 ucb/source/ucp/hierarchy/hierarchydata.cxx             |    6 
 ucb/source/ucp/hierarchy/hierarchydatasource.cxx       |   11 -
 ucb/source/ucp/hierarchy/hierarchyuri.cxx              |   33 ++--
 ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx      |    4 
 ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx     |    4 
 ucb/source/ucp/webdav/SerfSession.cxx                  |    2 
 ucbhelper/source/client/proxydecider.cxx               |   28 +--
 unotools/source/config/bootstrap.cxx                   |   16 +-
 unotools/source/config/dynamicmenuoptions.cxx          |   20 +-
 unotools/source/config/lingucfg.cxx                    |    2 
 unotools/source/config/moduleoptions.cxx               |   22 +--
 unotools/source/config/securityoptions.cxx             |   10 -
 unotools/source/config/syslocaleoptions.cxx            |   16 +-
 vbahelper/source/vbahelper/vbaapplicationbase.cxx      |    2 
 vcl/source/control/wizardmachine.cxx                   |    4 
 vcl/source/gdi/configsettings.cxx                      |    2 
 vcl/unx/generic/dtrans/config.cxx                      |    4 
 vcl/unx/generic/printer/printerinfomanager.cxx         |    8 -
 vcl/unx/gtk3/salnativewidgets-gtk.cxx                  |    4 
 xmloff/source/core/xmlexp.cxx                          |    6 
 xmloff/source/core/xmluconv.cxx                        |    2 
 xmloff/source/draw/shapeexport.cxx                     |    2 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx       |    8 -
 97 files changed, 471 insertions(+), 477 deletions(-)

New commits:
commit 1597cc5b3e07dd24cb4cb10b35b1e93545e4b929
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 29 15:08:21 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 2 14:43:58 2021 +0200

    convert #defines to OUStringLiteral
    
    mostly by doing
    
    $ git grep -l '#define.*\"' -- *.cxx
        | xargs perl -pi -e
    's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 =
    u\2;/g'
    
    Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index fa7ab1aa7098..cf9160ee4556 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -39,14 +39,14 @@ using namespace ::com::sun::star::awt;
 
 using ::std::vector;
 
-#define FIXEDTEXT_SERVICENAME                   "com.sun.star.awt.UnoControlFixedText"
-#define FIXEDTEXT_MODELNAME                     "com.sun.star.awt.UnoControlFixedTextModel"
-#define CONTROLNAME_TEXT                        "Text"   // identifier the control in container
-#define CONTROLNAME_PROGRESSBAR                 "ProgressBar"
-#define BUTTON_SERVICENAME                      "com.sun.star.awt.UnoControlButton"
-#define CONTROLNAME_BUTTON                      "Button"
-#define BUTTON_MODELNAME                        "com.sun.star.awt.UnoControlButtonModel"
-#define DEFAULT_BUTTONLABEL                     "Abbrechen"
+constexpr OUStringLiteral FIXEDTEXT_SERVICENAME = u"com.sun.star.awt.UnoControlFixedText";
+constexpr OUStringLiteral FIXEDTEXT_MODELNAME = u"com.sun.star.awt.UnoControlFixedTextModel";
+constexpr OUStringLiteral CONTROLNAME_TEXT = u"Text";   // identifier the control in container
+constexpr OUStringLiteral CONTROLNAME_PROGRESSBAR = u"ProgressBar";
+constexpr OUStringLiteral BUTTON_SERVICENAME = u"com.sun.star.awt.UnoControlButton";
+constexpr OUStringLiteral CONTROLNAME_BUTTON = u"Button";
+constexpr OUStringLiteral BUTTON_MODELNAME = u"com.sun.star.awt.UnoControlButtonModel";
+constexpr OUStringLiteral DEFAULT_BUTTONLABEL = u"Abbrechen";
 
 namespace unocontrols {
 
diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx
index 50e5b8078a27..6e5f097981df 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -34,10 +34,10 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::task;
 
-#define FIXEDTEXT_SERVICENAME                   "com.sun.star.awt.UnoControlFixedText"
-#define FIXEDTEXT_MODELNAME                     "com.sun.star.awt.UnoControlFixedTextModel"
-#define CONTROLNAME_TEXT                        "Text" // identifier the control in container
-#define CONTROLNAME_PROGRESSBAR                 "ProgressBar" //              -||-
+constexpr OUStringLiteral FIXEDTEXT_SERVICENAME = u"com.sun.star.awt.UnoControlFixedText";
+constexpr OUStringLiteral FIXEDTEXT_MODELNAME = u"com.sun.star.awt.UnoControlFixedTextModel";
+constexpr OUStringLiteral CONTROLNAME_TEXT = u"Text"; // identifier the control in container
+constexpr OUStringLiteral CONTROLNAME_PROGRESSBAR = u"ProgressBar"; //              -||-
 
 namespace unocontrols {
 
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index 7900419d2aba..0724a2729150 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -85,7 +85,7 @@ css::uno::Sequence< css::uno::Type > SAL_CALL SoundHandler::getTypes()
     return aTypeCollection.getTypes();
 }
 
-#define IMPLEMENTATIONNAME_SOUNDHANDLER "com.sun.star.comp.framework.SoundHandler"
+constexpr OUStringLiteral IMPLEMENTATIONNAME_SOUNDHANDLER = u"com.sun.star.comp.framework.SoundHandler";
 
 /*===========================================================================================================*/
 /* XServiceInfo */
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index 77cc35566bdc..15dbc6279357 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -31,8 +31,8 @@
 
 #include <string>
 
-#define AVMEDIA_GST_FRAMEGRABBER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.FrameGrabber_GStreamer"
-#define AVMEDIA_GST_FRAMEGRABBER_SERVICENAME "com.sun.star.media.FrameGrabber_GStreamer"
+constexpr OUStringLiteral AVMEDIA_GST_FRAMEGRABBER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.FrameGrabber_GStreamer";
+constexpr OUStringLiteral AVMEDIA_GST_FRAMEGRABBER_SERVICENAME = u"com.sun.star.media.FrameGrabber_GStreamer";
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx
index 61f1b6a4cb61..5f7958e723c3 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -24,8 +24,8 @@
 #include "gstwindow.hxx"
 #include "gstplayer.hxx"
 
-#define AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_GStreamer"
-#define AVMEDIA_GST_WINDOW_SERVICENAME "com.sun.star.media.Window_GStreamer"
+constexpr OUStringLiteral AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Window_GStreamer";
+constexpr OUStringLiteral AVMEDIA_GST_WINDOW_SERVICENAME = u"com.sun.star.media.Window_GStreamer";
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/win/framegrabber.cxx b/avmedia/source/win/framegrabber.cxx
index 249648f04f96..6ed07a87935a 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -39,8 +39,8 @@
 #include <vcl/dibtools.hxx>
 #include <o3tl/char16_t2wchar_t.hxx>
 
-#define AVMEDIA_WIN_FRAMEGRABBER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.FrameGrabber_DirectX"
-#define AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME "com.sun.star.media.FrameGrabber_DirectX"
+constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.FrameGrabber_DirectX";
+constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME = u"com.sun.star.media.FrameGrabber_DirectX";
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 8ff8f70c9b38..4d764d4a4fa6 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -31,8 +31,8 @@
 #include <osl/file.hxx>
 #include <rtl/ref.hxx>
 
-#define AVMEDIA_WIN_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_DirectX"
-#define AVMEDIA_WIN_PLAYER_SERVICENAME "com.sun.star.media.Player_DirectX"
+constexpr OUStringLiteral AVMEDIA_WIN_PLAYER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Player_DirectX";
+constexpr OUStringLiteral AVMEDIA_WIN_PLAYER_SERVICENAME = u"com.sun.star.media.Player_DirectX";
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx
index ad770dc691a2..a3fb5abca52c 100644
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -28,8 +28,8 @@
 #include "window.hxx"
 #include "player.hxx"
 
-#define AVMEDIA_WIN_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_DirectX"
-#define AVMEDIA_WIN_WINDOW_SERVICENAME "com.sun.star.media.Window_DirectX"
+constexpr OUStringLiteral AVMEDIA_WIN_WINDOW_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Window_DirectX";
+constexpr OUStringLiteral AVMEDIA_WIN_WINDOW_SERVICENAME = u"com.sun.star.media.Window_DirectX";
 
 using namespace ::com::sun::star;
 
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 74eacdb504c6..d394c9c8d9a1 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -52,7 +52,7 @@
 
 using namespace ::com::sun::star::script;
 
-#define SB_RTLNAME "@SBRTL"
+constexpr OUStringLiteral SB_RTLNAME = u"@SBRTL";
 //  i#i68894#
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx
index 052a2dcc159e..0123dd076d02 100644
--- a/basic/source/sbx/sbxform.cxx
+++ b/basic/source/sbx/sbxform.cxx
@@ -58,24 +58,24 @@ COMMENT: Visual-Basic treats the following (invalid) format-strings
 #define FORMAT_SEPARATOR            ';'
 
 // predefined formats for the Format$()-command:
-#define BASICFORMAT_GENERALNUMBER   "General Number"
-#define BASICFORMAT_CURRENCY        "Currency"
-#define BASICFORMAT_FIXED           "Fixed"
-#define BASICFORMAT_STANDARD        "Standard"
-#define BASICFORMAT_PERCENT         "Percent"
-#define BASICFORMAT_SCIENTIFIC      "Scientific"
-#define BASICFORMAT_YESNO           "Yes/No"
-#define BASICFORMAT_TRUEFALSE       "True/False"
-#define BASICFORMAT_ONOFF           "On/Off"
+constexpr OUStringLiteral BASICFORMAT_GENERALNUMBER = u"General Number";
+constexpr OUStringLiteral BASICFORMAT_CURRENCY = u"Currency";
+constexpr OUStringLiteral BASICFORMAT_FIXED = u"Fixed";
+constexpr OUStringLiteral BASICFORMAT_STANDARD = u"Standard";
+constexpr OUStringLiteral BASICFORMAT_PERCENT = u"Percent";
+constexpr OUStringLiteral BASICFORMAT_SCIENTIFIC = u"Scientific";
+constexpr OUStringLiteral BASICFORMAT_YESNO = u"Yes/No";
+constexpr OUStringLiteral BASICFORMAT_TRUEFALSE = u"True/False";
+constexpr OUStringLiteral BASICFORMAT_ONOFF = u"On/Off";
 
 // Comment: Visual-Basic has a maximum of 12 positions after the
 //          decimal point for floating-point-numbers.
 // all format-strings are compatible to Visual-Basic:
-#define GENERALNUMBER_FORMAT        "0.############"
-#define FIXED_FORMAT                "0.00"
-#define STANDARD_FORMAT             "@0.00"
-#define PERCENT_FORMAT              "0.00%"
-#define SCIENTIFIC_FORMAT           "#.00E+00"
+constexpr OUStringLiteral GENERALNUMBER_FORMAT = u"0.############";
+constexpr OUStringLiteral FIXED_FORMAT = u"0.00";
+constexpr OUStringLiteral STANDARD_FORMAT = u"@0.00";
+constexpr OUStringLiteral PERCENT_FORMAT = u"0.00%";
+constexpr OUStringLiteral SCIENTIFIC_FORMAT = u"#.00E+00";
 // Comment: the character @ means that thousand-separators shall
 //          be generated. That's a StarBasic 'extension'.
 
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 45375173209b..b59f948aa6d8 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -647,14 +647,14 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt )
 } // namespace
 
 #if HAVE_FEATURE_SCRIPTING
-#define VBAFORMAT_GENERALDATE       "General Date"
-#define VBAFORMAT_C                 "c"
-#define VBAFORMAT_N                 "n"
-#define VBAFORMAT_NN                "nn"
-#define VBAFORMAT_W                 "w"
-#define VBAFORMAT_Y                 "y"
-#define VBAFORMAT_LOWERCASE         "<"
-#define VBAFORMAT_UPPERCASE         ">"
+constexpr OUStringLiteral VBAFORMAT_GENERALDATE = u"General Date";
+constexpr OUStringLiteral VBAFORMAT_C = u"c";
+constexpr OUStringLiteral VBAFORMAT_N = u"n";
+constexpr OUStringLiteral VBAFORMAT_NN = u"nn";
+constexpr OUStringLiteral VBAFORMAT_W = u"w";
+constexpr OUStringLiteral VBAFORMAT_Y = u"y";
+constexpr OUStringLiteral VBAFORMAT_LOWERCASE = u"<";
+constexpr OUStringLiteral VBAFORMAT_UPPERCASE = u">";
 #endif
 
 void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 631a7623806e..98b999ecf29e 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -3143,8 +3143,8 @@ void SAL_CALL SfxLibrary::removeChangesListener( const Reference< XChangesListen
 
 // Implementation class ScriptExtensionIterator
 
-#define sBasicLibMediaType "application/vnd.sun.star.basic-library"
-#define sDialogLibMediaType "application/vnd.sun.star.dialog-library"
+constexpr OUStringLiteral sBasicLibMediaType = u"application/vnd.sun.star.basic-library";
+constexpr OUStringLiteral sDialogLibMediaType = u"application/vnd.sun.star.dialog-library";
 
 ScriptExtensionIterator::ScriptExtensionIterator()
     : m_xContext( comphelper::getProcessComponentContext() )
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index f9e197d3447a..7805da9bb56d 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -286,7 +286,7 @@ namespace cairocanvas
         cairo_restore( mpCairo.get() );
     }
 
-#define PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME "Canvas::ParametricPolyPolygon"
+constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::ParametricPolyPolygon";
 
     /** surfaceFromXBitmap Create a surface from XBitmap
      * @param xBitmap bitmap image that will be used for the surface
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index e3a0c82efca3..2c82ba66c727 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::logging;
 using namespace ::osl;
 
-#define SERVICE_SDBC_DRIVER     "com.sun.star.sdbc.Driver"
+constexpr OUStringLiteral SERVICE_SDBC_DRIVER = u"com.sun.star.sdbc.Driver";
 
 /// @throws NoSuchElementException
 static void throwNoSuchElementException()
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index c79bf6d12b2e..16264dae53c4 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -44,9 +44,9 @@
 
 #include <memory>
 
-#define SMGR_SINGLETON "/singletons/com.sun.star.lang.theServiceManager"
-#define TDMGR_SINGLETON "/singletons/com.sun.star.reflection.theTypeDescriptionManager"
-#define AC_SINGLETON "/singletons/com.sun.star.security.theAccessController"
+constexpr OUStringLiteral SMGR_SINGLETON = u"/singletons/com.sun.star.lang.theServiceManager";
+constexpr OUStringLiteral TDMGR_SINGLETON = u"/singletons/com.sun.star.reflection.theTypeDescriptionManager";
+constexpr OUStringLiteral AC_SINGLETON = u"/singletons/com.sun.star.security.theAccessController";
 
 using namespace ::osl;
 using namespace ::com::sun::star::uno;
diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx
index e9a6cce3fd43..85c649dd437c 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -34,9 +34,9 @@
 #include "macro_expander.hxx"
 #include "paths.hxx"
 
-#define SERVICE_NAME_A "com.sun.star.lang.MacroExpander"
-#define SERVICE_NAME_B "com.sun.star.lang.BootstrapMacroExpander"
-#define IMPL_NAME "com.sun.star.lang.comp.cppuhelper.BootstrapMacroExpander"
+constexpr OUStringLiteral SERVICE_NAME_A = u"com.sun.star.lang.MacroExpander";
+constexpr OUStringLiteral SERVICE_NAME_B = u"com.sun.star.lang.BootstrapMacroExpander";
+constexpr OUStringLiteral IMPL_NAME = u"com.sun.star.lang.comp.cppuhelper.BootstrapMacroExpander";
 
 using namespace ::osl;
 using namespace ::com::sun::star;
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 2d2fb8ac943d..45b9a75eb2eb 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -158,9 +158,9 @@ namespace
     }
 }
 
-#define TG_SETTING_MANAGER  "TargetInDocument"
-#define TG_SETTING_LASTMARK "LastSelectedMark"
-#define TG_SETTING_LASTPATH "LastSelectedPath"
+constexpr OUStringLiteral TG_SETTING_MANAGER = u"TargetInDocument";
+constexpr OUStringLiteral TG_SETTING_LASTMARK = u"LastSelectedMark";
+constexpr OUStringLiteral TG_SETTING_LASTPATH = u"LastSelectedPath";
 
 void SvxHlinkDlgMarkWnd::RestoreLastSelection()
 {
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index a567a84010dc..b089f5f8e14b 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -25,8 +25,8 @@
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 
-#define CUIFM_PROP_HIDDEN "Hidden"
-#define CUIFM_PROP_LABEL "Label"
+constexpr OUStringLiteral CUIFM_PROP_HIDDEN = u"Hidden";
+constexpr OUStringLiteral CUIFM_PROP_LABEL = u"Label";
 
 FmShowColsDialog::FmShowColsDialog(weld::Window* pParent)
     : GenericDialogController(pParent, "cui/ui/showcoldialog.ui", "ShowColDialog")
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 1670dfb91d82..590ff2eb05c5 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -52,11 +52,11 @@ using namespace svx;
 
 // define ----------------------------------------------------------------
 
-#define POSTFIX_INTERNAL    "_internal"
-#define POSTFIX_USER        "_user"
-#define POSTFIX_WRITABLE    "_writable"
-#define VAR_ONE             "%1"
-#define IODLG_CONFIGNAME    "FilePicker_Save"
+constexpr OUStringLiteral POSTFIX_INTERNAL = u"_internal";
+constexpr OUStringLiteral POSTFIX_USER = u"_user";
+constexpr OUStringLiteral POSTFIX_WRITABLE = u"_writable";
+constexpr OUStringLiteral VAR_ONE = u"%1";
+constexpr OUStringLiteral IODLG_CONFIGNAME = u"FilePicker_Save";
 
 // struct OptPath_Impl ---------------------------------------------------
 
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 1153fb56714e..38ff97293a99 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -77,18 +77,18 @@ namespace dbaccess {
 namespace BooleanComparisonMode = ::com::sun::star::sdb::BooleanComparisonMode;
 }
 
-#define STR_SELECT      "SELECT "
-#define STR_FROM        " FROM "
-#define STR_WHERE       " WHERE "
-#define STR_GROUP_BY    " GROUP BY "
-#define STR_HAVING      " HAVING "
-#define STR_ORDER_BY    " ORDER BY "
-#define STR_AND         " AND "
-#define STR_OR          " OR "
+constexpr OUStringLiteral STR_SELECT = u"SELECT ";
+constexpr OUStringLiteral STR_FROM = u" FROM ";
+constexpr OUStringLiteral STR_WHERE = u" WHERE ";
+constexpr OUStringLiteral STR_GROUP_BY = u" GROUP BY ";
+constexpr OUStringLiteral STR_HAVING = u" HAVING ";
+constexpr OUStringLiteral STR_ORDER_BY = u" ORDER BY ";
+constexpr OUStringLiteral STR_AND = u" AND ";
+constexpr OUStringLiteral STR_OR = u" OR ";
 constexpr OUStringLiteral STR_LIKE = u" LIKE ";
-#define L_BRACKET       "("
-#define R_BRACKET       ")"
-#define COMMA           ","
+constexpr OUStringLiteral L_BRACKET = u"(";
+constexpr OUStringLiteral R_BRACKET = u")";
+constexpr OUStringLiteral COMMA = u",";
 
 namespace
 {
@@ -752,7 +752,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns(  )
         bCase = m_xMetaData->supportsMixedCaseQuotedIdentifiers();
         aSelectColumns = m_aSqlIterator.getSelectColumns();
 
-        OUStringBuffer aSQL( m_aPureSelectSQL + STR_WHERE " ( 0 = 1 )");
+        OUStringBuffer aSQL( m_aPureSelectSQL + STR_WHERE + " ( 0 = 1 )");
 
         // preserve the original WHERE clause
         // #i102234#
@@ -1726,7 +1726,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
         if ( !sFilter.isEmpty() && !aSQL.isEmpty() )
         {
             sFilter = L_BRACKET + sFilter + R_BRACKET +
-                (andCriteria ? std::u16string_view(u"" STR_AND) : std::u16string_view(u"" STR_OR));
+                (andCriteria ? std::u16string_view(STR_AND) : std::u16string_view(STR_OR));
         }
         sFilter += aSQL;
 
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 650f1fe26932..4daafb73a9fe 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -48,8 +48,8 @@ namespace dbaui
 #define PROPERTY_ID_QUERYCOMPOSER       100
 #define PROPERTY_ID_ROWSET              101
 
-#define  PROPERTY_QUERYCOMPOSER   "QueryComposer"
-#define  PROPERTY_ROWSET          "RowSet"
+constexpr OUStringLiteral PROPERTY_QUERYCOMPOSER = u"QueryComposer";
+constexpr OUStringLiteral PROPERTY_ROWSET = u"RowSet";
 
     using namespace ::com::sun::star::uno;
     using namespace ::com::sun::star::lang;
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 4a8017a2d805..99aa5f624889 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -61,11 +61,11 @@ namespace c3s = com::sun::star::system ;
 namespace task = com::sun::star::task ;
 namespace uno = com::sun::star::uno ;
 
-#define PROPERTY_TITLE          "BubbleHeading"
-#define PROPERTY_TEXT           "BubbleText"
-#define PROPERTY_SHOW_BUBBLE    "BubbleVisible"
-#define PROPERTY_CLICK_HDL      "MenuClickHDL"
-#define PROPERTY_SHOW_MENUICON  "MenuIconVisible"
+constexpr OUStringLiteral PROPERTY_TITLE = u"BubbleHeading";
+constexpr OUStringLiteral PROPERTY_TEXT = u"BubbleText";
+constexpr OUStringLiteral PROPERTY_SHOW_BUBBLE = u"BubbleVisible";
+constexpr OUStringLiteral PROPERTY_CLICK_HDL = u"MenuClickHDL";
+constexpr OUStringLiteral PROPERTY_SHOW_MENUICON = u"MenuIconVisible";
 
 // Returns the URL of the release note for the given position
 OUString getReleaseNote(const UpdateInfo& rInfo, sal_uInt8 pos, bool autoDownloadEnabled)
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index 65c3e800702a..8e3c5b6dc9e9 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -41,23 +41,23 @@ namespace lang = com::sun::star::lang ;
 namespace util = com::sun::star::util ;
 namespace uno = com::sun::star::uno ;
 
-#define LAST_CHECK              "LastCheck"
-#define UPDATE_VERSION          "UpdateVersion"
-#define UPDATE_BUILDID          "UpdateBuildId"
-#define UPDATE_DESCRIPTION      "UpdateDescription"
-#define DOWNLOAD_URL            "DownloadURL"
-#define IS_DIRECT_DOWNLOAD      "IsDirectDownload"
-#define OLD_VERSION             "UpdateFoundFor"
-#define AUTOCHECK_ENABLED       "AutoCheckEnabled"
-#define AUTODOWNLOAD_ENABLED    "AutoDownloadEnabled"
-#define CHECK_INTERVAL          "CheckInterval"
-#define LOCAL_FILE              "LocalFile"
-#define DOWNLOAD_SIZE           "DownloadSize"
-#define DOWNLOAD_PAUSED         "DownloadPaused"
-#define DOWNLOAD_DESTINATION    "DownloadDestination"
-#define RELEASE_NOTE            "ReleaseNote"
-
-#define PROPERTY_VERSION        "Version"
+constexpr OUStringLiteral LAST_CHECK = u"LastCheck";
+constexpr OUStringLiteral UPDATE_VERSION = u"UpdateVersion";
+constexpr OUStringLiteral UPDATE_BUILDID = u"UpdateBuildId";
+constexpr OUStringLiteral UPDATE_DESCRIPTION = u"UpdateDescription";
+constexpr OUStringLiteral DOWNLOAD_URL = u"DownloadURL";
+constexpr OUStringLiteral IS_DIRECT_DOWNLOAD = u"IsDirectDownload";
+constexpr OUStringLiteral OLD_VERSION = u"UpdateFoundFor";
+constexpr OUStringLiteral AUTOCHECK_ENABLED = u"AutoCheckEnabled";
+constexpr OUStringLiteral AUTODOWNLOAD_ENABLED = u"AutoDownloadEnabled";
+constexpr OUStringLiteral CHECK_INTERVAL = u"CheckInterval";
+constexpr OUStringLiteral LOCAL_FILE = u"LocalFile";
+constexpr OUStringLiteral DOWNLOAD_SIZE = u"DownloadSize";
+constexpr OUStringLiteral DOWNLOAD_PAUSED = u"DownloadPaused";
+constexpr OUStringLiteral DOWNLOAD_DESTINATION = u"DownloadDestination";
+constexpr OUStringLiteral RELEASE_NOTE = u"ReleaseNote";
+
+constexpr OUStringLiteral PROPERTY_VERSION = u"Version";
 
 const char * const aUpdateEntryProperties[] = {
     UPDATE_VERSION,
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index e2d95bc8e84e..2f54e60dfd32 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -61,20 +61,20 @@
 #include <tools/urlobj.hxx>
 #include <tools/diagnose_ex.h>
 
-#define COMMAND_CLOSE       "close"
+constexpr OUStringLiteral COMMAND_CLOSE = u"close";
 
-#define CTRL_THROBBER       "throbber"
-#define CTRL_PROGRESS       "progress"
+constexpr OUStringLiteral CTRL_THROBBER = u"throbber";
+constexpr OUStringLiteral CTRL_PROGRESS = u"progress";
 
-#define TEXT_STATUS         "text_status"
-#define TEXT_PERCENT        "text_percent"
-#define TEXT_DESCRIPTION    "text_description"
+constexpr OUStringLiteral TEXT_STATUS = u"text_status";
+constexpr OUStringLiteral TEXT_PERCENT = u"text_percent";
+constexpr OUStringLiteral TEXT_DESCRIPTION = u"text_description";
 
-#define FIXED_LINE_MODEL    "com.sun.star.awt.UnoControlFixedLineModel"
-#define FIXED_TEXT_MODEL    "com.sun.star.awt.UnoControlFixedTextModel"
-#define EDIT_FIELD_MODEL    "com.sun.star.awt.UnoControlEditModel"
-#define BUTTON_MODEL        "com.sun.star.awt.UnoControlButtonModel"
-#define GROUP_BOX_MODEL     "com.sun.star.awt.UnoControlGroupBoxModel"
+constexpr OUStringLiteral FIXED_LINE_MODEL = u"com.sun.star.awt.UnoControlFixedLineModel";
+constexpr OUStringLiteral FIXED_TEXT_MODEL = u"com.sun.star.awt.UnoControlFixedTextModel";
+constexpr OUStringLiteral EDIT_FIELD_MODEL = u"com.sun.star.awt.UnoControlEditModel";
+constexpr OUStringLiteral BUTTON_MODEL = u"com.sun.star.awt.UnoControlButtonModel";
+constexpr OUStringLiteral GROUP_BOX_MODEL = u"com.sun.star.awt.UnoControlGroupBoxModel";
 
 using namespace com::sun::star;
 
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index a39de0bbd3cb..fbed068c3b4d 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -40,12 +40,12 @@
 
 #include <bitmaps.hlst>
 
-#define PROPERTY_TITLE          "BubbleHeading"
-#define PROPERTY_TEXT           "BubbleText"
-#define PROPERTY_IMAGE          "BubbleImageURL"
-#define PROPERTY_SHOW_BUBBLE    "BubbleVisible"
-#define PROPERTY_CLICK_HDL      "MenuClickHDL"
-#define PROPERTY_SHOW_MENUICON  "MenuIconVisible"
+constexpr OUStringLiteral PROPERTY_TITLE = u"BubbleHeading";
+constexpr OUStringLiteral PROPERTY_TEXT = u"BubbleText";
+constexpr OUStringLiteral PROPERTY_IMAGE = u"BubbleImageURL";
+constexpr OUStringLiteral PROPERTY_SHOW_BUBBLE = u"BubbleVisible";
+constexpr OUStringLiteral PROPERTY_CLICK_HDL = u"MenuClickHDL";
+constexpr OUStringLiteral PROPERTY_SHOW_MENUICON = u"MenuIconVisible";
 
 using namespace ::com::sun::star;
 
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 783609c4ca24..5df5baacbdf9 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -167,7 +167,7 @@ using namespace container           ;
 
 // static counter for OLE-Objects
 static sal_uInt32 nMSOleObjCntr = 0;
-#define MSO_OLE_Obj "MSO_OLE_Obj"
+constexpr OUStringLiteral MSO_OLE_Obj = u"MSO_OLE_Obj";
 
 namespace {
 
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index b42cc1c23b5e..fdad0ba6dd37 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -78,12 +78,12 @@ using namespace ::xmloff::token;
 
 #define NSPREFIX "ooo:"
 
-#define SVG_PROP_TINYPROFILE                "TinyMode"
-#define SVG_PROP_DTDSTRING                  "DTDString"
-#define SVG_PROP_EMBEDFONTS                 "EmbedFonts"
-#define SVG_PROP_NATIVEDECORATION           "UseNativeTextDecoration"
-#define SVG_PROP_OPACITY                    "Opacity"
-#define SVG_PROP_POSITIONED_CHARACTERS      "UsePositionedCharacters"
+constexpr OUStringLiteral SVG_PROP_TINYPROFILE = u"TinyMode";
+constexpr OUStringLiteral SVG_PROP_DTDSTRING = u"DTDString";
+constexpr OUStringLiteral SVG_PROP_EMBEDFONTS = u"EmbedFonts";
+constexpr OUStringLiteral SVG_PROP_NATIVEDECORATION = u"UseNativeTextDecoration";
+constexpr OUStringLiteral SVG_PROP_OPACITY = u"Opacity";
+constexpr OUStringLiteral SVG_PROP_POSITIONED_CHARACTERS = u"UsePositionedCharacters";
 
 // ooo xml elements
 constexpr OUStringLiteral aOOOElemTextField = u"" NSPREFIX "text_field";
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index f71d1c681af6..8fd52e72fed5 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -922,13 +922,13 @@ bool T602ImportFilterDialog::OptionsDlg()
     propInt_(xPSetDialog,"Height",90);
     propStringFromResId_(xPSetDialog,"Title", T602FILTER_STR_IMPORT_DIALOG_TITLE);
 
-#define T602DLG_OK_BUTTON    "ok_button"
-#define T602DLG_CANCEL_BUTTON    "cancel_button"
-#define T602DLG_CODE_LB        "code_lb"
-#define T602DLG_AZBUKA_CB    "azbuka_cb"
-#define T602DLG_COMMENT_CB    "comment_cb"
-#define T602DLG_REFORMAT_CB    "reformat_cb"
-#define T602DLG_CODE_TXT    "code_txt"
+    static constexpr OUStringLiteral T602DLG_OK_BUTTON = u"ok_button";
+    static constexpr OUStringLiteral T602DLG_CANCEL_BUTTON = u"cancel_button";
+    static constexpr OUStringLiteral T602DLG_CODE_LB = u"code_lb";
+    static constexpr OUStringLiteral T602DLG_AZBUKA_CB = u"azbuka_cb";
+    static constexpr OUStringLiteral T602DLG_COMMENT_CB = u"comment_cb";
+    static constexpr OUStringLiteral T602DLG_REFORMAT_CB = u"reformat_cb";
+    static constexpr OUStringLiteral T602DLG_CODE_TXT = u"code_txt";
 
     Reference < XInterface > TextModel = Inst_("com.sun.star.awt.UnoControlFixedTextModel");
     Reference < XPropertySet > xPSetText( TextModel, UNO_QUERY );
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 19696ec9fa17..5087066d552b 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -23,15 +23,15 @@
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/docfilt.hxx>
 
-#define WRITER_TEXT_FILTER "Text"
-#define CALC_TEXT_FILTER   "Text - txt - csv (StarCalc)"
+constexpr OUStringLiteral WRITER_TEXT_FILTER = u"Text";
+constexpr OUStringLiteral CALC_TEXT_FILTER = u"Text - txt - csv (StarCalc)";
 
-#define WEB_HTML_FILTER    "HTML"
-#define WRITER_HTML_FILTER "HTML (StarWriter)"
-#define CALC_HTML_FILTER   "calc_HTML_WebQuery"
+constexpr OUStringLiteral WEB_HTML_FILTER = u"HTML";
+constexpr OUStringLiteral WRITER_HTML_FILTER = u"HTML (StarWriter)";
+constexpr OUStringLiteral CALC_HTML_FILTER = u"calc_HTML_WebQuery";
 
-#define WRITER_DOCSERVICE  "com.sun.star.text.TextDocument"
-#define CALC_DOCSERVICE    "com.sun.star.sheet.SpreadsheetDocument"
+constexpr OUStringLiteral WRITER_DOCSERVICE = u"com.sun.star.text.TextDocument";
+constexpr OUStringLiteral CALC_DOCSERVICE = u"com.sun.star.sheet.SpreadsheetDocument";
 
 using namespace ::com::sun::star;
 using utl::MediaDescriptor;
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index 87d134c3edbd..cf831a080c0d 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -73,7 +73,7 @@ using namespace ::comphelper;
 using ::svt::SortingData_Impl;
 using ::svt::FolderDescriptor;
 
-#define ALL_FILES_FILTER    "*.*"
+constexpr OUStringLiteral ALL_FILES_FILTER = u"*.*";
 
 #define COLUMN_TITLE        1
 #define COLUMN_TYPE         2
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 45cb722561ca..753697ee688e 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -53,7 +53,7 @@
 #define PI 3.14159265358979323846
 
 // xmloff/xmlkyd.hxx
-#define sXML_CDATA "CDATA"
+constexpr OUStringLiteral sXML_CDATA = u"CDATA";
 
 #define STARTP  padd( "text:style-name", "CDATA", ascii(getPStyleName((para->GetParaShape()).index,buf))); \
     rstartEl( "text:p",mxList ); \
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 19cc9bf5d674..0e3682e9d99d 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -51,9 +51,9 @@ char const* const* GnuInfo::getJavaExePaths(int * size)
 }
 
 #if defined(MIPS) && defined(OSL_LITENDIAN)
-#define GCJ_JFW_PLUGIN_ARCH "mipsel"
+constexpr OUStringLiteral GCJ_JFW_PLUGIN_ARCH = u"mipsel";
 #elif defined(MIPS64) && defined(OSL_LITENDIAN)
-#define GCJ_JFW_PLUGIN_ARCH "mips64el"
+constexpr OUStringLiteral GCJ_JFW_PLUGIN_ARCH = u"mips64el";
 #else
 #define GCJ_JFW_PLUGIN_ARCH JFW_PLUGIN_ARCH
 #endif
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 156224b57351..46568b84e528 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -35,7 +35,7 @@
 #endif
 
 // Cursor bitmaps from the installation set.
-#define CURSOR_HANDLE_DIR "/../share/libreofficekit/"
+constexpr OUStringLiteral CURSOR_HANDLE_DIR = u"/../share/libreofficekit/";
 // Number of handles around a graphic selection.
 #define GRAPHIC_HANDLE_COUNT 8
 // Maximum Zoom allowed
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index a27fc37add6e..aa1fa92edd62 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -53,7 +53,7 @@ using namespace ::com::sun::star;
 #if defined(_WIN32)
 OString Win_AddLongPathPrefix( const OString &rPathName )
 {
-#define WIN32_LONG_PATH_PREFIX "\\\\?\\"
+  constexpr OStringLiteral WIN32_LONG_PATH_PREFIX = "\\\\?\\";
   if (!rPathName.match(WIN32_LONG_PATH_PREFIX)) return WIN32_LONG_PATH_PREFIX + rPathName;
   return rPathName;
 }
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index c4bb53aa14b3..2bacf9386319 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -68,7 +68,7 @@ using namespace linguistic;
 
 // XML-header of SPELLML queries
 #if !defined SPELL_XML
-#define SPELL_XML "<?xml?>"
+constexpr OUStringLiteral SPELL_XML = u"<?xml?>";
 #endif
 
 // only available in hunspell >= 1.5
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index cd3363b9fbc7..6fc64f781267 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -55,7 +55,7 @@
 #include <string.h>
 
 // XML-header to query SPELLML support
-#define SPELLML_SUPPORT "<?xml?>"
+constexpr OUStringLiteral SPELLML_SUPPORT = u"<?xml?>";
 
 using namespace osl;
 using namespace com::sun::star;
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 3549060acfeb..e9ac72be3769 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -43,9 +43,9 @@ using namespace com::sun::star::linguistic2;
 using namespace linguistic;
 
 
-#define XML_NAMESPACE_TCD_STRING        "http://openoffice.org/2003/text-conversion-dictionary"
-#define CONV_TYPE_HANGUL_HANJA          u"Hangul / Hanja"
-#define CONV_TYPE_SCHINESE_TCHINESE     u"Chinese simplified / Chinese traditional"
+constexpr OUStringLiteral XML_NAMESPACE_TCD_STRING = u"http://openoffice.org/2003/text-conversion-dictionary";
+constexpr OUStringLiteral CONV_TYPE_HANGUL_HANJA = u"Hangul / Hanja";
+constexpr OUStringLiteral CONV_TYPE_SCHINESE_TCHINESE = u"Chinese simplified / Chinese traditional";
 
 
 static OUString ConversionTypeToText( sal_Int16 nConversionType )
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index f7d4d1b3b0c4..b2d28491c41d 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -61,7 +61,7 @@ using namespace linguistic;
 
 // XML-header to query SPELLML support
 // to handle user words with "Grammar By" model words
-#define SPELLML_SUPPORT "<?xml?>"
+constexpr OUStringLiteral SPELLML_SUPPORT = u"<?xml?>";
 
 // User dictionaries can contain optional "title:" tags
 // to support custom titles with space and other characters.
@@ -72,7 +72,7 @@ using namespace linguistic;
 // The following fake file name extension will be
 // added to the text of the title: field for correct
 // text stripping and dictionary saving.
-#define EXTENSION_FOR_TITLE_TEXT "."
+constexpr OUStringLiteral EXTENSION_FOR_TITLE_TEXT = u".";
 
 const char* const pVerStr2    = "WBSWG2";
 const char* const pVerStr5    = "WBSWG5";
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index 1888e6186a81..76349a4d76ef 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -37,7 +37,7 @@ using namespace com::sun::star::linguistic2;
 using namespace linguistic;
 
 
-#define SN_HH_CONV_DICTIONARY   "com.sun.star.linguistic2.HangulHanjaConversionDictionary"
+constexpr OUStringLiteral SN_HH_CONV_DICTIONARY = u"com.sun.star.linguistic2.HangulHanjaConversionDictionary";
 
 
 #include <com/sun/star/i18n/UnicodeScript.hpp>
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index ebd735a8f296..6515672d7d5b 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -113,67 +113,67 @@
 #include <vcl/svapp.hxx>
 
 //  page styles
-#define SC_UNO_PAGE_LEFTBORDER      "LeftBorder"
-#define SC_UNO_PAGE_RIGHTBORDER     "RightBorder"
-#define SC_UNO_PAGE_BOTTBORDER      "BottomBorder"
-#define SC_UNO_PAGE_TOPBORDER       "TopBorder"
-#define SC_UNO_PAGE_LEFTBRDDIST     "LeftBorderDistance"
-#define SC_UNO_PAGE_RIGHTBRDDIST    "RightBorderDistance"
-#define SC_UNO_PAGE_BOTTBRDDIST     "BottomBorderDistance"
-#define SC_UNO_PAGE_TOPBRDDIST      "TopBorderDistance"
-#define SC_UNO_PAGE_BORDERDIST      "BorderDistance"
-#define SC_UNO_PAGE_SHADOWFORM      "ShadowFormat"
-#define SC_UNO_PAGE_PAPERTRAY       "PrinterPaperTray"
-#define SC_UNO_PAGE_SCALEVAL        "PageScale"
-#define SC_UNO_PAGE_SCALETOPAG      "ScaleToPages"
-#define SC_UNO_PAGE_SCALETOX        "ScaleToPagesX"
-#define SC_UNO_PAGE_SCALETOY        "ScaleToPagesY"
-#define SC_UNO_PAGE_HDRBACKCOL      "HeaderBackColor"
-#define SC_UNO_PAGE_HDRBACKTRAN     "HeaderBackTransparent"
-#define SC_UNO_PAGE_HDRGRFFILT      "HeaderBackGraphicFilter"
-#define SC_UNO_PAGE_HDRGRFLOC       "HeaderBackGraphicLocation"
-#define SC_UNO_PAGE_HDRGRF          "HeaderBackGraphic"
-#define SC_UNO_PAGE_HDRLEFTBOR      "HeaderLeftBorder"
-#define SC_UNO_PAGE_HDRRIGHTBOR     "HeaderRightBorder"
-#define SC_UNO_PAGE_HDRBOTTBOR      "HeaderBottomBorder"
-#define SC_UNO_PAGE_HDRTOPBOR       "HeaderTopBorder"
-#define SC_UNO_PAGE_HDRLEFTBDIS     "HeaderLeftBorderDistance"
-#define SC_UNO_PAGE_HDRRIGHTBDIS    "HeaderRightBorderDistance"
-#define SC_UNO_PAGE_HDRBOTTBDIS     "HeaderBottomBorderDistance"
-#define SC_UNO_PAGE_HDRTOPBDIS      "HeaderTopBorderDistance"
-#define SC_UNO_PAGE_HDRBRDDIST      "HeaderBorderDistance"
-#define SC_UNO_PAGE_HDRSHADOW       "HeaderShadowFormat"
-#define SC_UNO_PAGE_HDRLEFTMAR      "HeaderLeftMargin"
-#define SC_UNO_PAGE_HDRRIGHTMAR     "HeaderRightMargin"
-#define SC_UNO_PAGE_HDRBODYDIST     "HeaderBodyDistance"
-#define SC_UNO_PAGE_HDRHEIGHT       "HeaderHeight"
-#define SC_UNO_PAGE_HDRON           "HeaderIsOn"
-#define SC_UNO_PAGE_HDRDYNAMIC      "HeaderIsDynamicHeight"
-#define SC_UNO_PAGE_HDRSHARED       "HeaderIsShared"
-#define SC_UNO_PAGE_FIRSTHDRSHARED  "FirstPageHeaderIsShared"
-#define SC_UNO_PAGE_FTRBACKCOL      "FooterBackColor"
-#define SC_UNO_PAGE_FTRBACKTRAN     "FooterBackTransparent"
-#define SC_UNO_PAGE_FTRGRFFILT      "FooterBackGraphicFilter"
-#define SC_UNO_PAGE_FTRGRFLOC       "FooterBackGraphicLocation"
-#define SC_UNO_PAGE_FTRGRF          "FooterBackGraphic"
-#define SC_UNO_PAGE_FTRLEFTBOR      "FooterLeftBorder"
-#define SC_UNO_PAGE_FTRRIGHTBOR     "FooterRightBorder"
-#define SC_UNO_PAGE_FTRBOTTBOR      "FooterBottomBorder"
-#define SC_UNO_PAGE_FTRTOPBOR       "FooterTopBorder"
-#define SC_UNO_PAGE_FTRLEFTBDIS     "FooterLeftBorderDistance"
-#define SC_UNO_PAGE_FTRRIGHTBDIS    "FooterRightBorderDistance"
-#define SC_UNO_PAGE_FTRBOTTBDIS     "FooterBottomBorderDistance"
-#define SC_UNO_PAGE_FTRTOPBDIS      "FooterTopBorderDistance"
-#define SC_UNO_PAGE_FTRBRDDIST      "FooterBorderDistance"
-#define SC_UNO_PAGE_FTRSHADOW       "FooterShadowFormat"
-#define SC_UNO_PAGE_FTRLEFTMAR      "FooterLeftMargin"
-#define SC_UNO_PAGE_FTRRIGHTMAR     "FooterRightMargin"
-#define SC_UNO_PAGE_FTRBODYDIST     "FooterBodyDistance"
-#define SC_UNO_PAGE_FTRHEIGHT       "FooterHeight"
-#define SC_UNO_PAGE_FTRON           "FooterIsOn"
-#define SC_UNO_PAGE_FTRDYNAMIC      "FooterIsDynamicHeight"
-#define SC_UNO_PAGE_FTRSHARED       "FooterIsShared"
-#define SC_UNO_PAGE_FIRSTFTRSHARED  "FirstPageFooterIsShared"
+constexpr OUStringLiteral SC_UNO_PAGE_LEFTBORDER = u"LeftBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_RIGHTBORDER = u"RightBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_BOTTBORDER = u"BottomBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_TOPBORDER = u"TopBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_LEFTBRDDIST = u"LeftBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_RIGHTBRDDIST = u"RightBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_BOTTBRDDIST = u"BottomBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_TOPBRDDIST = u"TopBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_BORDERDIST = u"BorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_SHADOWFORM = u"ShadowFormat";
+constexpr OUStringLiteral SC_UNO_PAGE_PAPERTRAY = u"PrinterPaperTray";
+constexpr OUStringLiteral SC_UNO_PAGE_SCALEVAL = u"PageScale";
+constexpr OUStringLiteral SC_UNO_PAGE_SCALETOPAG = u"ScaleToPages";
+constexpr OUStringLiteral SC_UNO_PAGE_SCALETOX = u"ScaleToPagesX";
+constexpr OUStringLiteral SC_UNO_PAGE_SCALETOY = u"ScaleToPagesY";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRBACKCOL = u"HeaderBackColor";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRBACKTRAN = u"HeaderBackTransparent";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFFILT = u"HeaderBackGraphicFilter";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFLOC = u"HeaderBackGraphicLocation";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRGRF = u"HeaderBackGraphic";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTBOR = u"HeaderLeftBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTBOR = u"HeaderRightBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRBOTTBOR = u"HeaderBottomBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRTOPBOR = u"HeaderTopBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTBDIS = u"HeaderLeftBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTBDIS = u"HeaderRightBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRBOTTBDIS = u"HeaderBottomBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRTOPBDIS = u"HeaderTopBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRBRDDIST = u"HeaderBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRSHADOW = u"HeaderShadowFormat";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTMAR = u"HeaderLeftMargin";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTMAR = u"HeaderRightMargin";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRBODYDIST = u"HeaderBodyDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRHEIGHT = u"HeaderHeight";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRON = u"HeaderIsOn";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRDYNAMIC = u"HeaderIsDynamicHeight";
+constexpr OUStringLiteral SC_UNO_PAGE_HDRSHARED = u"HeaderIsShared";
+constexpr OUStringLiteral SC_UNO_PAGE_FIRSTHDRSHARED = u"FirstPageHeaderIsShared";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRBACKCOL = u"FooterBackColor";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRBACKTRAN = u"FooterBackTransparent";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFFILT = u"FooterBackGraphicFilter";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFLOC = u"FooterBackGraphicLocation";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRGRF = u"FooterBackGraphic";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTBOR = u"FooterLeftBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTBOR = u"FooterRightBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRBOTTBOR = u"FooterBottomBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRTOPBOR = u"FooterTopBorder";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTBDIS = u"FooterLeftBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTBDIS = u"FooterRightBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRBOTTBDIS = u"FooterBottomBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRTOPBDIS = u"FooterTopBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRBRDDIST = u"FooterBorderDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRSHADOW = u"FooterShadowFormat";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTMAR = u"FooterLeftMargin";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTMAR = u"FooterRightMargin";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRBODYDIST = u"FooterBodyDistance";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRHEIGHT = u"FooterHeight";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRON = u"FooterIsOn";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRDYNAMIC = u"FooterIsDynamicHeight";
+constexpr OUStringLiteral SC_UNO_PAGE_FTRSHARED = u"FooterIsShared";
+constexpr OUStringLiteral SC_UNO_PAGE_FIRSTFTRSHARED = u"FirstPageFooterIsShared";
 
 namespace reportdesign
 {
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index 0e92095bb6b1..046580e14f7e 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -32,9 +32,9 @@
 #include <cmath>
 #include <float.h>
 
-#define ADDIN_SERVICE               "com.sun.star.sheet.AddIn"
-#define MY_SERVICE                  "com.sun.star.sheet.addin.Analysis"
-#define MY_IMPLNAME                 "com.sun.star.sheet.addin.AnalysisImpl"
+constexpr OUStringLiteral ADDIN_SERVICE = u"com.sun.star.sheet.AddIn";
+constexpr OUStringLiteral MY_SERVICE = u"com.sun.star.sheet.addin.Analysis";
+constexpr OUStringLiteral MY_IMPLNAME = u"com.sun.star.sheet.addin.AnalysisImpl";
 
 using namespace                 ::com::sun::star;
 using namespace sca::analysis;
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx
index ba5f4f989627..0d1cff9e092e 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -32,9 +32,9 @@
 
 using namespace ::com::sun::star;
 
-#define ADDIN_SERVICE           "com.sun.star.sheet.AddIn"
-#define MY_SERVICE              "com.sun.star.sheet.addin.DateFunctions"
-#define MY_IMPLNAME             "com.sun.star.sheet.addin.DateFunctionsImpl"
+constexpr OUStringLiteral ADDIN_SERVICE = u"com.sun.star.sheet.AddIn";
+constexpr OUStringLiteral MY_SERVICE = u"com.sun.star.sheet.addin.DateFunctions";
+constexpr OUStringLiteral MY_IMPLNAME = u"com.sun.star.sheet.addin.DateFunctionsImpl";
 
 #define UNIQUE              false   // function name does not exist in Calc
 
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index 64b01938d0be..cc7c713fc7f0 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -39,9 +39,9 @@ using namespace ::com::sun::star;
 using namespace sca::pricing;
 
 
-#define ADDIN_SERVICE           "com.sun.star.sheet.AddIn"
-#define MY_SERVICE              "com.sun.star.sheet.addin.PricingFunctions"
-#define MY_IMPLNAME             "com.sun.star.sheet.addin.PricingFunctionsImpl"
+constexpr OUStringLiteral ADDIN_SERVICE = u"com.sun.star.sheet.AddIn";
+constexpr OUStringLiteral MY_SERVICE = u"com.sun.star.sheet.addin.PricingFunctions";
+constexpr OUStringLiteral MY_IMPLNAME = u"com.sun.star.sheet.addin.PricingFunctionsImpl";
 
 #define UNIQUE              false   // function name does not exist in Calc
 
diff --git a/sccomp/source/solver/SolverComponent.cxx b/sccomp/source/solver/SolverComponent.cxx
index 3f01c529a2cd..7c92233522d4 100644
--- a/sccomp/source/solver/SolverComponent.cxx
+++ b/sccomp/source/solver/SolverComponent.cxx
@@ -32,11 +32,11 @@
 using namespace com::sun::star;
 
 
-#define STR_NONNEGATIVE   "NonNegative"
-#define STR_INTEGER       "Integer"
-#define STR_TIMEOUT       "Timeout"
-#define STR_EPSILONLEVEL  "EpsilonLevel"
-#define STR_LIMITBBDEPTH  "LimitBBDepth"
+constexpr OUStringLiteral STR_NONNEGATIVE = u"NonNegative";
+constexpr OUStringLiteral STR_INTEGER = u"Integer";
+constexpr OUStringLiteral STR_TIMEOUT = u"Timeout";
+constexpr OUStringLiteral STR_EPSILONLEVEL = u"EpsilonLevel";
+constexpr OUStringLiteral STR_LIMITBBDEPTH = u"LimitBBDepth";
 
 
 //  Resources from tools are used for translated strings
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index 9ac68be5faf8..d053fa11b809 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -41,8 +41,8 @@ using namespace ::sf_misc;
 #define BASPROV_PROPERTY_ID_URI         1
 #define BASPROV_PROPERTY_ID_EDITABLE    2
 
-#define BASPROV_PROPERTY_URI            "URI"
-#define BASPROV_PROPERTY_EDITABLE       "Editable"
+constexpr OUStringLiteral BASPROV_PROPERTY_URI = u"URI";
+constexpr OUStringLiteral BASPROV_PROPERTY_EDITABLE = u"Editable";
 
 #define BASPROV_DEFAULT_ATTRIBS()       PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY
 
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index a22cd82f343e..9054ee4bfc27 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -44,7 +44,7 @@ namespace basprov
 {
 
 #define BASSCRIPT_PROPERTY_ID_CALLER         1
-#define BASSCRIPT_PROPERTY_CALLER            "Caller"
+constexpr OUStringLiteral BASSCRIPT_PROPERTY_CALLER = u"Caller";
 
 #define BASSCRIPT_DEFAULT_ATTRIBS()       PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT
 
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 079b0909ab3e..0726c9d02f43 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -534,7 +534,7 @@ private:
 typedef ::cppu::WeakImplHelper< XScriptListener, util::XCloseListener, lang::XInitialization, css::lang::XServiceInfo > EventListener_BASE;
 
 #define EVENTLSTNR_PROPERTY_ID_MODEL         1
-#define EVENTLSTNR_PROPERTY_MODEL            "Model"
+constexpr OUStringLiteral EVENTLSTNR_PROPERTY_MODEL = u"Model";
 
 namespace {
 
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 9bef54ae1f78..c746ad7340a9 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -56,7 +56,7 @@ using namespace com::sun::star::beans;
 const sal_uInt16 nMagic = sal_uInt16(0x1977);
 
 // Key for the soffice.ini
-#define KEY_QUALITY     "JPG-EXPORT-QUALITY"
+constexpr OUStringLiteral KEY_QUALITY = u"JPG-EXPORT-QUALITY";
 
 // The Help-IDs of the pages
 const char* const aPageHelpIds[NOOFPAGES] =
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 9b86a972a877..ce765f09a7d7 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -43,8 +43,8 @@
 using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 
-#define SYMBOL_LIST         "SymbolList"
-#define FONT_FORMAT_LIST    "FontFormatList"
+constexpr OUStringLiteral SYMBOL_LIST = u"SymbolList";
+constexpr OUStringLiteral FONT_FORMAT_LIST = u"FontFormatList";
 
 static Sequence< OUString > lcl_GetFontPropertyNames()
 {
@@ -483,7 +483,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
     rSymbols.resize( nNodes );
     for (auto& rSymbol : rSymbols)
     {
-        ReadSymbol( rSymbol, *pNode++, u"" SYMBOL_LIST );
+        ReadSymbol( rSymbol, *pNode++, SYMBOL_LIST );
     }
 }
 
@@ -567,7 +567,7 @@ void SmMathConfig::LoadFontFormatList()
     for (const OUString& rNode : aNodes)
     {
         SmFontFormat aFntFmt;
-        ReadFontFormat( aFntFmt, rNode, u"" FONT_FORMAT_LIST );
+        ReadFontFormat( aFntFmt, rNode, FONT_FORMAT_LIST );
         if (!pFontFormatList->GetFontFormat( rNode ))
             pFontFormatList->AddFontFormat( rNode, aFntFmt );
     }
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index b3789fe04e36..85825886b9ea 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -351,16 +351,16 @@ PolicyReader::~PolicyReader()
     }
 }
 
-#define s_grant "grant"
-#define s_user "user"
-#define s_permission "permission"
-#define s_openBrace "{"
-#define s_closingBrace "}"
-
-#define s_filePermission "com.sun.star.io.FilePermission"
-#define s_socketPermission "com.sun.star.connection.SocketPermission"
-#define s_runtimePermission "com.sun.star.security.RuntimePermission"
-#define s_allPermission "com.sun.star.security.AllPermission"
+constexpr OUStringLiteral s_grant = u"grant";
+constexpr OUStringLiteral s_user = u"user";
+constexpr OUStringLiteral s_permission = u"permission";
+constexpr OUStringLiteral s_openBrace = u"{";
+constexpr OUStringLiteral s_closingBrace = u"}";
+
+constexpr OUStringLiteral s_filePermission = u"com.sun.star.io.FilePermission";
+constexpr OUStringLiteral s_socketPermission = u"com.sun.star.connection.SocketPermission";
+constexpr OUStringLiteral s_runtimePermission = u"com.sun.star.security.RuntimePermission";
+constexpr OUStringLiteral s_allPermission = u"com.sun.star.security.AllPermission";
 
 
 void FilePolicy::refresh()
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index 4588d7a8bfc4..fb2c0e83047c 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -36,22 +36,22 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::util;
 
-#define CFG_ROOT_NODE       "Office.Common/SearchOptions"
+constexpr OUStringLiteral CFG_ROOT_NODE = u"Office.Common/SearchOptions";
 
 #define SRCH_PARAMS         13
-#define SRCH_PARA_OPTIONS   "Options"
-#define SRCH_PARA_FAMILY    "Family"
-#define SRCH_PARA_COMMAND   "Command"
-#define SRCH_PARA_CELLTYPE  "CellType"
-#define SRCH_PARA_APPFLAG   "AppFlag"
-#define SRCH_PARA_ROWDIR    "RowDirection"
-#define SRCH_PARA_ALLTABLES "AllTables"
-#define SRCH_PARA_SEARCHFILTERED "SearchFiltered"
-#define SRCH_PARA_SEARCHFORMATTED  "SearchFormatted"
-#define SRCH_PARA_BACKWARD  "Backward"
-#define SRCH_PARA_PATTERN   "Pattern"
-#define SRCH_PARA_CONTENT   "Content"
-#define SRCH_PARA_ASIANOPT  "AsianOptions"
+constexpr OUStringLiteral SRCH_PARA_OPTIONS = u"Options";
+constexpr OUStringLiteral SRCH_PARA_FAMILY = u"Family";
+constexpr OUStringLiteral SRCH_PARA_COMMAND = u"Command";
+constexpr OUStringLiteral SRCH_PARA_CELLTYPE = u"CellType";
+constexpr OUStringLiteral SRCH_PARA_APPFLAG = u"AppFlag";
+constexpr OUStringLiteral SRCH_PARA_ROWDIR = u"RowDirection";
+constexpr OUStringLiteral SRCH_PARA_ALLTABLES = u"AllTables";
+constexpr OUStringLiteral SRCH_PARA_SEARCHFILTERED = u"SearchFiltered";
+constexpr OUStringLiteral SRCH_PARA_SEARCHFORMATTED = u"SearchFormatted";
+constexpr OUStringLiteral SRCH_PARA_BACKWARD = u"Backward";
+constexpr OUStringLiteral SRCH_PARA_PATTERN = u"Pattern";
+constexpr OUStringLiteral SRCH_PARA_CONTENT = u"Content";
+constexpr OUStringLiteral SRCH_PARA_ASIANOPT = u"AsianOptions";
 
 SfxPoolItem* SvxSearchItem::CreateDefault() { return new  SvxSearchItem(0);}
 
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 45e12f8fab31..426663233b98 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -38,24 +38,24 @@
 
 using namespace com::sun::star;
 
-#define PROPERTYNAME_FMTSTR     "FormatString"
-#define PROPERTYNAME_LOCALE     "Locale"
-#define PROPERTYNAME_TYPE       "Type"
-#define PROPERTYNAME_COMMENT    "Comment"
-#define PROPERTYNAME_CURREXT    "CurrencyExtension"
-#define PROPERTYNAME_CURRSYM    "CurrencySymbol"
-#define PROPERTYNAME_CURRABB    "CurrencyAbbreviation"
-#define PROPERTYNAME_DECIMALS   "Decimals"
-#define PROPERTYNAME_LEADING    "LeadingZeros"
-#define PROPERTYNAME_NEGRED     "NegativeRed"
-#define PROPERTYNAME_STDFORM    "StandardFormat"
-#define PROPERTYNAME_THOUS      "ThousandsSeparator"
-#define PROPERTYNAME_USERDEF    "UserDefined"
-
-#define PROPERTYNAME_NOZERO     "NoZero"
-#define PROPERTYNAME_NULLDATE   "NullDate"
-#define PROPERTYNAME_STDDEC     "StandardDecimals"
-#define PROPERTYNAME_TWODIGIT   "TwoDigitDateStart"
+constexpr OUStringLiteral PROPERTYNAME_FMTSTR = u"FormatString";
+constexpr OUStringLiteral PROPERTYNAME_LOCALE = u"Locale";
+constexpr OUStringLiteral PROPERTYNAME_TYPE = u"Type";
+constexpr OUStringLiteral PROPERTYNAME_COMMENT = u"Comment";
+constexpr OUStringLiteral PROPERTYNAME_CURREXT = u"CurrencyExtension";
+constexpr OUStringLiteral PROPERTYNAME_CURRSYM = u"CurrencySymbol";
+constexpr OUStringLiteral PROPERTYNAME_CURRABB = u"CurrencyAbbreviation";
+constexpr OUStringLiteral PROPERTYNAME_DECIMALS = u"Decimals";
+constexpr OUStringLiteral PROPERTYNAME_LEADING = u"LeadingZeros";
+constexpr OUStringLiteral PROPERTYNAME_NEGRED = u"NegativeRed";
+constexpr OUStringLiteral PROPERTYNAME_STDFORM = u"StandardFormat";
+constexpr OUStringLiteral PROPERTYNAME_THOUS = u"ThousandsSeparator";
+constexpr OUStringLiteral PROPERTYNAME_USERDEF = u"UserDefined";
+
+constexpr OUStringLiteral PROPERTYNAME_NOZERO = u"NoZero";
+constexpr OUStringLiteral PROPERTYNAME_NULLDATE = u"NullDate";
+constexpr OUStringLiteral PROPERTYNAME_STDDEC = u"StandardDecimals";
+constexpr OUStringLiteral PROPERTYNAME_TWODIGIT = u"TwoDigitDateStart";
 
 // All without a Which-ID, Map only for PropertySetInfo
 
@@ -63,19 +63,19 @@ static const SfxItemPropertyMapEntry* lcl_GetNumberFormatPropertyMap()
 {
     static const SfxItemPropertyMapEntry aNumberFormatPropertyMap_Impl[] =
     {
-        {u"" PROPERTYNAME_FMTSTR,   0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_LOCALE,   0, cppu::UnoType<lang::Locale>::get(),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_TYPE,     0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_COMMENT,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_CURREXT,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_CURRSYM,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_DECIMALS, 0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_LEADING,  0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_NEGRED,   0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_STDFORM,  0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_THOUS,    0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_USERDEF,  0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
-        {u"" PROPERTYNAME_CURRABB,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_FMTSTR,   0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_LOCALE,   0, cppu::UnoType<lang::Locale>::get(),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_TYPE,     0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_COMMENT,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_CURREXT,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_CURRSYM,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_DECIMALS, 0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_LEADING,  0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_NEGRED,   0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_STDFORM,  0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_THOUS,    0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_USERDEF,  0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+        {PROPERTYNAME_CURRABB,  0, cppu::UnoType<OUString>::get(),    beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
         { u"", 0, css::uno::Type(), 0, 0 }
     };
     return aNumberFormatPropertyMap_Impl;
@@ -85,10 +85,10 @@ static const SfxItemPropertyMapEntry* lcl_GetNumberSettingsPropertyMap()
 {
     static const SfxItemPropertyMapEntry aNumberSettingsPropertyMap_Impl[] =
     {
-        {u"" PROPERTYNAME_NOZERO,   0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND, 0},
-        {u"" PROPERTYNAME_NULLDATE, 0, cppu::UnoType<util::Date>::get(),  beans::PropertyAttribute::BOUND, 0},
-        {u"" PROPERTYNAME_STDDEC,   0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND, 0},
-        {u"" PROPERTYNAME_TWODIGIT, 0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND, 0},
+        {PROPERTYNAME_NOZERO,   0, cppu::UnoType<bool>::get(),         beans::PropertyAttribute::BOUND, 0},
+        {PROPERTYNAME_NULLDATE, 0, cppu::UnoType<util::Date>::get(),  beans::PropertyAttribute::BOUND, 0},
+        {PROPERTYNAME_STDDEC,   0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND, 0},
+        {PROPERTYNAME_TWODIGIT, 0, cppu::UnoType<sal_Int16>::get(),   beans::PropertyAttribute::BOUND, 0},
         { u"", 0, css::uno::Type(), 0, 0 }
     };
     return aNumberSettingsPropertyMap_Impl;
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 4d1f4575d885..46c0e75841c8 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -40,12 +40,12 @@ using namespace ::osl                   ;
 using namespace ::com::sun::star::uno   ;
 using namespace ::com::sun::star;
 
-#define ROOTNODE_MISC                       "Office.Common/Misc"
+constexpr OUStringLiteral ROOTNODE_MISC = u"Office.Common/Misc";
 
 // PROPERTYHANDLE defines must be sequential from zero for Commit/Load
-#define PROPERTYNAME_SYMBOLSET              "SymbolSet"
+constexpr OUStringLiteral PROPERTYNAME_SYMBOLSET = u"SymbolSet";
 #define PROPERTYHANDLE_SYMBOLSET                0
-#define PROPERTYNAME_ICONTHEME              "SymbolStyle"
+constexpr OUStringLiteral PROPERTYNAME_ICONTHEME = u"SymbolStyle";
 #define PROPERTYHANDLE_SYMBOLSTYLE              1
 
 class SvtMiscOptions_Impl : public ConfigItem
diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx
index a3e696ad6467..2e4a4a3da587 100644
--- a/svtools/source/config/slidesorterbaropt.cxx
+++ b/svtools/source/config/slidesorterbaropt.cxx
@@ -33,7 +33,7 @@ using namespace ::osl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
 
-#define ROOTNODE_SLIDESORTERBAR                "Office.Impress/MultiPaneGUI/SlideSorterBar/Visible"
+constexpr OUStringLiteral ROOTNODE_SLIDESORTERBAR = u"Office.Impress/MultiPaneGUI/SlideSorterBar/Visible";
 
 constexpr OUStringLiteral PROPERTYNAME_VISIBLE_IMPRESSVIEW = u"ImpressView";
 #define PROPERTYHANDLE_VISIBLE_IMPRESSVIEW     0
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index b20b3cfdf703..c482d8b4a8ec 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -62,7 +62,7 @@
 #define GAPTOEXTRAPREVIEW 10
 #define MINGAPWIDTH 2
 
-#define FONTNAMEBOXMRUENTRIESFILE "/user/config/fontnameboxmruentries"
+constexpr OUStringLiteral FONTNAMEBOXMRUENTRIESFILE = u"/user/config/fontnameboxmruentries";
 
 
 BorderWidthImpl::BorderWidthImpl( BorderWidthImplFlags nFlags, double nRate1, double nRate2, double nRateGap ):
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 3d3a8c4a11e6..54cb28afc07d 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -32,7 +32,7 @@ using namespace svt;
 namespace {
 
 #define UNODIALOG_PROPERTY_ID_ALIASES       100
-#define UNODIALOG_PROPERTY_ALIASES          "FieldMapping"
+constexpr OUStringLiteral UNODIALOG_PROPERTY_ALIASES = u"FieldMapping";
 
     using namespace css::uno;
     using namespace css::lang;
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index ccc07ac3c7ff..22f9173dee1e 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -48,14 +48,14 @@
 #include "dlgunit.hxx"
 #include <memory>
 
-#define SELF_TARGET         "_self"
-#define IMAP_CERN_FILTER    "MAP - CERN"
-#define IMAP_NCSA_FILTER    "MAP - NCSA"
-#define IMAP_BINARY_FILTER  "SIP - StarView ImageMap"
-#define IMAP_ALL_TYPE       "*.*"
-#define IMAP_BINARY_TYPE    "*.sip"
-#define IMAP_CERN_TYPE      "*.map"
-#define IMAP_NCSA_TYPE      "*.map"
+constexpr OUStringLiteral SELF_TARGET = u"_self";
+constexpr OUStringLiteral IMAP_CERN_FILTER = u"MAP - CERN";
+constexpr OUStringLiteral IMAP_NCSA_FILTER = u"MAP - NCSA";
+constexpr OUStringLiteral IMAP_BINARY_FILTER = u"SIP - StarView ImageMap";
+constexpr OUStringLiteral IMAP_ALL_TYPE = u"*.*";
+constexpr OUStringLiteral IMAP_BINARY_TYPE = u"*.sip";
+constexpr OUStringLiteral IMAP_CERN_TYPE = u"*.map";
+constexpr OUStringLiteral IMAP_NCSA_TYPE = u"*.map";
 
 SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID( SvxIMapDlgChildWindow, SID_IMAP );
 
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index be970414cf8a..dbb1e0410491 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -31,7 +31,7 @@
 using namespace ::com::sun::star::text;
 
 #define FLYINFLY_BORDER 3
-#define DEMOTEXT        "Ij"
+constexpr OUStringLiteral DEMOTEXT = u"Ij";
 
 namespace {
 
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 2c32b13d7fb7..b400918b4bc8 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -57,15 +57,15 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::dom::events;
 using namespace ::svx;
 
-#define CFGNAME_DATANAVIGATOR       "DataNavigator"
-#define CFGNAME_SHOWDETAILS         "ShowDetails"
-#define MSG_VARIABLE                "%1"
-#define MODELNAME                   "$MODELNAME"
-#define INSTANCENAME                "$INSTANCENAME"
-#define ELEMENTNAME                 "$ELEMENTNAME"
-#define ATTRIBUTENAME               "$ATTRIBUTENAME"
-#define SUBMISSIONNAME              "$SUBMISSIONNAME"
-#define BINDINGNAME                 "$BINDINGNAME"
+constexpr OUStringLiteral CFGNAME_DATANAVIGATOR = u"DataNavigator";
+constexpr OUStringLiteral CFGNAME_SHOWDETAILS = u"ShowDetails";
+constexpr OUStringLiteral MSG_VARIABLE = u"%1";
+constexpr OUStringLiteral MODELNAME = u"$MODELNAME";
+constexpr OUStringLiteral INSTANCENAME = u"$INSTANCENAME";
+constexpr OUStringLiteral ELEMENTNAME = u"$ELEMENTNAME";
+constexpr OUStringLiteral ATTRIBUTENAME = u"$ATTRIBUTENAME";
+constexpr OUStringLiteral SUBMISSIONNAME = u"$SUBMISSIONNAME";
+constexpr OUStringLiteral BINDINGNAME = u"$BINDINGNAME";
 
 
 namespace svxform
diff --git a/svx/source/items/viewlayoutitem.cxx b/svx/source/items/viewlayoutitem.cxx
index 94846236cd13..32147af1f5a1 100644
--- a/svx/source/items/viewlayoutitem.cxx
+++ b/svx/source/items/viewlayoutitem.cxx
@@ -26,8 +26,8 @@
 
 SfxPoolItem* SvxViewLayoutItem::CreateDefault() { return new SvxViewLayoutItem; }
 
-#define VIEWLAYOUT_PARAM_COLUMNS    "Columns"
-#define VIEWLAYOUT_PARAM_BOOKMODE   "BookMode"
+constexpr OUStringLiteral VIEWLAYOUT_PARAM_COLUMNS = u"Columns";
+constexpr OUStringLiteral VIEWLAYOUT_PARAM_BOOKMODE = u"BookMode";
 #define VIEWLAYOUT_PARAMS           2
 
 
diff --git a/svx/source/items/zoomslideritem.cxx b/svx/source/items/zoomslideritem.cxx
index 5c1a088c4ef5..40c83cdd1655 100644
--- a/svx/source/items/zoomslideritem.cxx
+++ b/svx/source/items/zoomslideritem.cxx
@@ -25,10 +25,10 @@
 
 SfxPoolItem* SvxZoomSliderItem::CreateDefault() { return new SvxZoomSliderItem; }
 
-#define ZOOMSLIDER_PARAM_CURRENTZOOM    "Columns"
-#define ZOOMSLIDER_PARAM_SNAPPINGPOINTS "SnappingPoints"
-#define ZOOMSLIDER_PARAM_MINZOOM        "MinValue"
-#define ZOOMSLIDER_PARAM_MAXZOOM        "MaxValue"
+constexpr OUStringLiteral ZOOMSLIDER_PARAM_CURRENTZOOM = u"Columns";
+constexpr OUStringLiteral ZOOMSLIDER_PARAM_SNAPPINGPOINTS = u"SnappingPoints";
+constexpr OUStringLiteral ZOOMSLIDER_PARAM_MINZOOM = u"MinValue";
+constexpr OUStringLiteral ZOOMSLIDER_PARAM_MAXZOOM = u"MaxValue";
 #define ZOOMSLIDER_PARAMS           4
 
 
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index 163414ef4798..b839100fbcf6 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -57,8 +57,8 @@ using namespace svx::sidebar;
 namespace {
 
 /* Why this is not used ? Doesn't it need to inherit from XServiceInfo ?
-#define IMPLEMENTATION_NAME "org.apache.openoffice.comp.svx.sidebar.PanelFactory"
-#define SERVICE_NAME "com.sun.star.ui.UIElementFactory"
+constexpr OUStringLiteral IMPLEMENTATION_NAME = u"org.apache.openoffice.comp.svx.sidebar.PanelFactory";
+constexpr OUStringLiteral SERVICE_NAME = u"com.sun.star.ui.UIElementFactory";
 */
 
 typedef ::cppu::WeakComponentImplHelper< css::ui::XUIElementFactory, css::lang::XServiceInfo >
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 295992ba02cd..ba25ea976b0a 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1161,7 +1161,7 @@ PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDe
     return PointerStyle::Arrow;
 }
 
-#define STR_NOTHING "nothing"
+constexpr OUStringLiteral STR_NOTHING = u"nothing";
 OUString SdrView::GetStatusText()
 {
     OUString aName;
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 752424c34734..282f294f095a 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -29,8 +29,8 @@
 #include <svx/svxids.hrc>
 #include <tools/json_writer.hxx>
 
-#define TMP_STR_BEGIN   "["
-#define TMP_STR_END     "]"
+constexpr OUStringLiteral TMP_STR_BEGIN = u"[";
+constexpr OUStringLiteral TMP_STR_END = u"]";
 
 #include <svx/drawitem.hxx>
 #include <svx/xfillit0.hxx>
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 7a2efef8af57..e17f8e465fcd 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 
-#define TOOLBOX_NAME                u"colorbar"
+constexpr OUStringLiteral TOOLBOX_NAME = u"colorbar";
 #define RID_SVXSTR_UNDO_GRAFCROP    RID_SVXSTR_GRAFCROP
 
 namespace {
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 1e850a2c0703..679f1cb55a49 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -56,10 +56,10 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::lang;
 
-#define XML_CONTAINERSTORAGE_NAME_60        "Pictures"
-#define XML_CONTAINERSTORAGE_NAME       "ObjectReplacements"
-#define XML_EMBEDDEDOBJECT_URL_BASE     "vnd.sun.star.EmbeddedObject:"
-#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
+constexpr OUStringLiteral XML_CONTAINERSTORAGE_NAME_60 = u"Pictures";
+constexpr OUStringLiteral XML_CONTAINERSTORAGE_NAME = u"ObjectReplacements";
+constexpr OUStringLiteral XML_EMBEDDEDOBJECT_URL_BASE = u"vnd.sun.star.EmbeddedObject:";
+constexpr OUStringLiteral XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE = u"vnd.sun.star.GraphicObject:";
 
 
 class OutputStorageWrapper_Impl : public ::cppu::WeakImplHelper<XOutputStream>
@@ -117,9 +117,6 @@ void SAL_CALL OutputStorageWrapper_Impl::closeOutput()
     bStreamClosed = true;
 }
 
-const std::u16string_view gaReplacementGraphicsContainerStorageName( u"" XML_CONTAINERSTORAGE_NAME );
-const std::u16string_view gaReplacementGraphicsContainerStorageName60( u"" XML_CONTAINERSTORAGE_NAME_60 );
-
 SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() :
     WeakComponentImplHelper< XEmbeddedObjectResolver, XNameAccess >( maMutex ),
     mpDocPersist( nullptr ),
@@ -274,9 +271,10 @@ bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
         {
             bool bOASIS = mxRootStorage.is() &&
                 ( SotStorage::GetVersion( mxRootStorage ) > SOFFICE_FILEFORMAT_60 );
-            rContainerStorageName = bOASIS
-                    ? gaReplacementGraphicsContainerStorageName
-                    : gaReplacementGraphicsContainerStorageName60;
+            if (bOASIS)
+                rContainerStorageName = XML_CONTAINERSTORAGE_NAME;
+            else
+                rContainerStorageName = XML_CONTAINERSTORAGE_NAME_60;
 
             if( pGraphicRepl )
                 *pGraphicRepl = true;
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 6b671c3a245b..27db089871a2 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -60,8 +60,8 @@ using namespace com::sun::star::io;
 
 namespace com::sun::star::uno { class XComponentContext; }
 
-#define XML_GRAPHICSTORAGE_NAME     "Pictures"
-#define XML_GRAPHICOBJECT_URL_BASE  "vnd.sun.star.GraphicObject:"
+constexpr OUStringLiteral XML_GRAPHICSTORAGE_NAME = u"Pictures";
+constexpr OUStringLiteral XML_GRAPHICOBJECT_URL_BASE = u"vnd.sun.star.GraphicObject:";
 
 namespace {
 
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index a3505202310e..a2a672ede2b5 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -30,10 +30,10 @@
 #include <vcl/cvtgrf.hxx>
 #include <memory>
 
-#define FORMAT_BMP  u"bmp"
-#define FORMAT_GIF  u"gif"
-#define FORMAT_JPG  u"jpg"
-#define FORMAT_PNG  u"png"
+constexpr OUStringLiteral FORMAT_BMP = u"bmp";
+constexpr OUStringLiteral FORMAT_GIF = u"gif";
+constexpr OUStringLiteral FORMAT_JPG = u"jpg";
+constexpr OUStringLiteral FORMAT_PNG = u"png";
 
 using namespace com::sun::star;
 
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index c18f15f16495..9dcacd958c5e 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -64,7 +64,7 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
 using namespace toolkit;
 
-#define PROPERTY_RESOURCERESOLVER "ResourceResolver"
+constexpr OUStringLiteral PROPERTY_RESOURCERESOLVER = u"ResourceResolver";
 
 
 namespace
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index c53b6c808751..3b5b66b74126 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -59,9 +59,9 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
 
-#define PROPERTY_DIALOGSOURCEURL "DialogSourceURL"
-#define PROPERTY_IMAGEURL "ImageURL"
-#define PROPERTY_GRAPHIC "Graphic"
+constexpr OUStringLiteral PROPERTY_DIALOGSOURCEURL = u"DialogSourceURL";
+constexpr OUStringLiteral PROPERTY_IMAGEURL = u"ImageURL";
+constexpr OUStringLiteral PROPERTY_GRAPHIC = u"Graphic";
 
 
 // we probably will need both a hash of control models and hash of controls
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index ee6dfb6d2a07..1a24fd417bc4 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -38,15 +38,15 @@
 #define GCM_PROPERTY_ID_TAG                 8
 #define GCM_PROPERTY_ID_RESOURCERESOLVER    9
 
-#define GCM_PROPERTY_POS_X              "PositionX"
-#define GCM_PROPERTY_POS_Y              "PositionY"
-#define GCM_PROPERTY_WIDTH              "Width"
-#define GCM_PROPERTY_HEIGHT             "Height"
-#define GCM_PROPERTY_NAME               "Name"
-#define GCM_PROPERTY_TABINDEX           "TabIndex"
-#define GCM_PROPERTY_STEP               "Step"
-#define GCM_PROPERTY_TAG                "Tag"
-#define GCM_PROPERTY_RESOURCERESOLVER   "ResourceResolver"
+constexpr OUStringLiteral GCM_PROPERTY_POS_X = u"PositionX";
+constexpr OUStringLiteral GCM_PROPERTY_POS_Y = u"PositionY";
+constexpr OUStringLiteral GCM_PROPERTY_WIDTH = u"Width";
+constexpr OUStringLiteral GCM_PROPERTY_HEIGHT = u"Height";
+constexpr OUStringLiteral GCM_PROPERTY_NAME = u"Name";
+constexpr OUStringLiteral GCM_PROPERTY_TABINDEX = u"TabIndex";
+constexpr OUStringLiteral GCM_PROPERTY_STEP = u"Step";
+constexpr OUStringLiteral GCM_PROPERTY_TAG = u"Tag";
+constexpr OUStringLiteral GCM_PROPERTY_RESOURCERESOLVER = u"ResourceResolver";
 
 #define DEFAULT_ATTRIBS()       PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT
 
diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx
index 979718e73865..64354b07f5ad 100644
--- a/toolkit/source/controls/tabpagecontainer.cxx
+++ b/toolkit/source/controls/tabpagecontainer.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::view;
 using ::com::sun::star::awt::tab::XTabPageModel;
 
-#define WRONG_TYPE_EXCEPTION "Type must be css::awt::tab::XTabPageModel!"
+constexpr OUStringLiteral WRONG_TYPE_EXCEPTION = u"Type must be css::awt::tab::XTabPageModel!";
 
 
 UnoControlTabPageContainerModel::UnoControlTabPageContainerModel( const Reference< XComponentContext >& i_factory )
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index 8e93248bd192..88dfd9dadc3c 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -53,7 +53,7 @@
 
 #include <vector>
 
-#define SERVICE_NAME "com.sun.star.ucb.SimpleFileAccess"
+constexpr OUStringLiteral SERVICE_NAME = u"com.sun.star.ucb.SimpleFileAccess";
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 139faf8c2038..a038ff27222f 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -100,10 +100,10 @@ static OUString makeHierarchalNameSegment( const OUString & rIn  )
     return aBuffer.makeStringAndClear();
 }
 
-#define STORE_CONTENTPROPERTIES_KEY "/org.openoffice.ucb.Store/ContentProperties"
+constexpr OUStringLiteral STORE_CONTENTPROPERTIES_KEY = u"/org.openoffice.ucb.Store/ContentProperties";
 
 // describe path of cfg entry
-#define CFGPROPERTY_NODEPATH        "nodepath"
+constexpr OUStringLiteral CFGPROPERTY_NODEPATH = u"nodepath";
 
 class PropertySetInfo_Impl : public cppu::WeakImplHelper < XPropertySetInfo >
 {
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 8df1200f55c9..737ef9809044 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -85,11 +85,11 @@ static void makeXMLName( const OUString & rIn, OUStringBuffer & rBuffer  )
 // HierarchyEntry Implementation.
 
 
-#define READ_SERVICE_NAME      "com.sun.star.ucb.HierarchyDataReadAccess"
-#define READWRITE_SERVICE_NAME "com.sun.star.ucb.HierarchyDataReadWriteAccess"
+constexpr OUStringLiteral READ_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadAccess";
+constexpr OUStringLiteral READWRITE_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadWriteAccess";
 
 // describe path of cfg entry
-#define CFGPROPERTY_NODEPATH    "nodepath"
+constexpr OUStringLiteral CFGPROPERTY_NODEPATH = u"nodepath";
 
 
 HierarchyEntry::HierarchyEntry(
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 253a1d8e79a7..5970ba178a7d 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -46,13 +46,12 @@ using namespace hierarchy_ucp;
 
 
 // describe path of cfg entry
-#define CFGPROPERTY_NODEPATH    "nodepath"
+constexpr OUStringLiteral CFGPROPERTY_NODEPATH = u"nodepath";
 
-#define READ_SERVICE_NAME      u"com.sun.star.ucb.HierarchyDataReadAccess"
-#define READWRITE_SERVICE_NAME u"com.sun.star.ucb.HierarchyDataReadWriteAccess"
+constexpr OUStringLiteral READ_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadAccess";
+constexpr OUStringLiteral READWRITE_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadWriteAccess";
 
-#define CONFIG_DATA_ROOT_KEY          \
-                        "/org.openoffice.ucb.Hierarchy/Root"
+constexpr OUStringLiteral CONFIG_DATA_ROOT_KEY =  u"/org.openoffice.ucb.Hierarchy/Root";
 
 
 namespace hcp_impl
@@ -461,7 +460,7 @@ bool HierarchyDataSource::createConfigPath(
             return false;
         }
 
-        rOutPath = CONFIG_DATA_ROOT_KEY "/" + rInPath;
+        rOutPath = CONFIG_DATA_ROOT_KEY + "/" + rInPath;
     }
     else
     {
diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
index d936b810a3ab..90aab6235ef1 100644
--- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
@@ -28,10 +28,9 @@
 
 using namespace hierarchy_ucp;
 
-#define HIERARCHY_URL_SCHEME          "vnd.sun.star.hier"
-#define HIERARCHY_URL_SCHEME_LENGTH   17
-#define DEFAULT_DATA_SOURCE_SERVICE \
-                    "com.sun.star.ucb.DefaultHierarchyDataSource"
+constexpr OUStringLiteral HIERARCHY_URL_SCHEME = u"vnd.sun.star.hier";
+constexpr OUStringLiteral DEFAULT_DATA_SOURCE_SERVICE =
+                    u"com.sun.star.ucb.DefaultHierarchyDataSource";
 
 
 // HierarchyUri Implementation.
@@ -48,7 +47,7 @@ void HierarchyUri::init() const
     m_aParentUri.clear();
 
     // URI must match at least: <scheme>:
-    if ( m_aUri.getLength() < HIERARCHY_URL_SCHEME_LENGTH + 1 )
+    if ( m_aUri.getLength() < HIERARCHY_URL_SCHEME.getLength() + 1 )
     {
         // error, but remember that we did an init().
         m_aPath = "/";
@@ -57,7 +56,7 @@ void HierarchyUri::init() const
 
     // Scheme is case insensitive.
     OUString aScheme
-        = m_aUri.copy( 0, HIERARCHY_URL_SCHEME_LENGTH ).toAsciiLowerCase();
+        = m_aUri.copy( 0, HIERARCHY_URL_SCHEME.getLength() ).toAsciiLowerCase();
     if ( aScheme == HIERARCHY_URL_SCHEME )
     {
         m_aUri = m_aUri.replaceAt( 0, aScheme.getLength(), aScheme );
@@ -67,42 +66,42 @@ void HierarchyUri::init() const
         // If the URI has no service specifier, insert default service.
         // This is for backward compatibility and for convenience.
 
-        if ( m_aUri.getLength() == HIERARCHY_URL_SCHEME_LENGTH + 1 )
+        if ( m_aUri.getLength() == HIERARCHY_URL_SCHEME.getLength() + 1 )
         {
             // root folder URI without path and service specifier.
-            m_aUri += "//" DEFAULT_DATA_SOURCE_SERVICE "/";
+            m_aUri += "//" + DEFAULT_DATA_SOURCE_SERVICE + "/";
             m_aService = DEFAULT_DATA_SOURCE_SERVICE ;
 
             nPos = m_aUri.getLength() - 1;
         }
-        else if ( ( m_aUri.getLength() == HIERARCHY_URL_SCHEME_LENGTH + 2 )
+        else if ( ( m_aUri.getLength() == HIERARCHY_URL_SCHEME.getLength() + 2 )
                   &&
-                  ( m_aUri[ HIERARCHY_URL_SCHEME_LENGTH + 1 ] == '/' ) )
+                  ( m_aUri[ HIERARCHY_URL_SCHEME.getLength() + 1 ] == '/' ) )
         {
             // root folder URI without service specifier.
-            m_aUri += "/" DEFAULT_DATA_SOURCE_SERVICE "/";
+            m_aUri += "/" + DEFAULT_DATA_SOURCE_SERVICE + "/";
             m_aService = DEFAULT_DATA_SOURCE_SERVICE;
 
             nPos = m_aUri.getLength() - 1;
         }
-        else if ( ( m_aUri.getLength() > HIERARCHY_URL_SCHEME_LENGTH + 2 )
+        else if ( ( m_aUri.getLength() > HIERARCHY_URL_SCHEME.getLength() + 2 )
                   &&
-                  ( m_aUri[ HIERARCHY_URL_SCHEME_LENGTH + 2 ] != '/' ) )
+                  ( m_aUri[ HIERARCHY_URL_SCHEME.getLength() + 2 ] != '/' ) )
         {
             // other (no root folder) URI without service specifier.
             m_aUri = m_aUri.replaceAt(
-                        HIERARCHY_URL_SCHEME_LENGTH + 2,
+                        HIERARCHY_URL_SCHEME.getLength() + 2,
                         0,
-                        "/" DEFAULT_DATA_SOURCE_SERVICE "/" );
+                        "/" + DEFAULT_DATA_SOURCE_SERVICE + "/" );
             m_aService = DEFAULT_DATA_SOURCE_SERVICE;
 
             nPos
-                = HIERARCHY_URL_SCHEME_LENGTH + 3 + m_aService.getLength();
+                = HIERARCHY_URL_SCHEME.getLength() + 3 + m_aService.getLength();
         }
         else
         {
             // URI with service specifier.
-            sal_Int32 nStart = HIERARCHY_URL_SCHEME_LENGTH + 3;
+            sal_Int32 nStart = HIERARCHY_URL_SCHEME.getLength() + 3;
 
             // Here: - m_aUri has at least the form "<scheme>://"
             //       - nStart points to char after <scheme>:
diff --git a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
index 39a471fee893..bedf9b7e3271 100644
--- a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
@@ -80,8 +80,8 @@ SerfPropFindReqProcImpl::~SerfPropFindReqProcImpl()
 {
 }
 
-#define PROPFIND_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\"?><propfind xmlns=\"DAV:\">"
-#define PROPFIND_TRAILER "</propfind>"
+constexpr OUStringLiteral PROPFIND_HEADER = u"<?xml version=\"1.0\" encoding=\"utf-8\"?><propfind xmlns=\"DAV:\">";
+constexpr OUStringLiteral PROPFIND_TRAILER = u"</propfind>";
 
 serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t * inSerfRequest )
 {
diff --git a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
index 4540ccbd0124..1cde357ec454 100644
--- a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
@@ -39,8 +39,8 @@ SerfPropPatchReqProcImpl::~SerfPropPatchReqProcImpl()
 {
 }
 
-#define PROPPATCH_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\"?><propertyupdate xmlns=\"DAV:\">"
-#define PROPPATCH_TRAILER "</propertyupdate>"
+constexpr OUStringLiteral PROPPATCH_HEADER = u"<?xml version=\"1.0\" encoding=\"utf-8\"?><propertyupdate xmlns=\"DAV:\">";
+constexpr OUStringLiteral PROPPATCH_TRAILER = u"</propertyupdate>";
 
 serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_t * inSerfRequest )
 {
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 8f7a7e38c754..2f1b4d2626c9 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -46,7 +46,7 @@
 #include <com/sun/star/io/NotConnectedException.hpp>
 #include <com/sun/star/io/BufferSizeExceededException.hpp>
 #include <com/sun/star/io/IOException.hpp>
-#define OID_SUBJECT_ALTERNATIVE_NAME "2.5.29.17"
+constexpr OUStringLiteral OID_SUBJECT_ALTERNATIVE_NAME = u"2.5.29.17";
 
 #include <com/sun/star/ucb/Lock.hpp>
 #include <com/sun/star/xml/crypto/XSEInitializer.hpp>
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 829480e55c25..7a363a0962f7 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -47,15 +47,15 @@
 using namespace com::sun::star;
 using namespace ucbhelper;
 
-#define CONFIG_ROOT_KEY      "org.openoffice.Inet/Settings"
-#define PROXY_TYPE_KEY       "ooInetProxyType"
-#define NO_PROXY_LIST_KEY    "ooInetNoProxy"
-#define HTTP_PROXY_NAME_KEY  "ooInetHTTPProxyName"
-#define HTTP_PROXY_PORT_KEY  "ooInetHTTPProxyPort"
-#define HTTPS_PROXY_NAME_KEY "ooInetHTTPSProxyName"
-#define HTTPS_PROXY_PORT_KEY "ooInetHTTPSProxyPort"
-#define FTP_PROXY_NAME_KEY   "ooInetFTPProxyName"
-#define FTP_PROXY_PORT_KEY   "ooInetFTPProxyPort"
+constexpr OUStringLiteral CONFIG_ROOT_KEY = u"org.openoffice.Inet/Settings";
+constexpr OUStringLiteral PROXY_TYPE_KEY = u"ooInetProxyType";
+constexpr OUStringLiteral NO_PROXY_LIST_KEY = u"ooInetNoProxy";
+constexpr OUStringLiteral HTTP_PROXY_NAME_KEY = u"ooInetHTTPProxyName";
+constexpr OUStringLiteral HTTP_PROXY_PORT_KEY = u"ooInetHTTPProxyPort";
+constexpr OUStringLiteral HTTPS_PROXY_NAME_KEY = u"ooInetHTTPSProxyName";
+constexpr OUStringLiteral HTTPS_PROXY_PORT_KEY = u"ooInetHTTPSProxyPort";
+constexpr OUStringLiteral FTP_PROXY_NAME_KEY = u"ooInetFTPProxyName";
+constexpr OUStringLiteral FTP_PROXY_PORT_KEY = u"ooInetFTPProxyPort";
 
 
 namespace ucbhelper
@@ -233,13 +233,12 @@ bool WildCard::Matches( std::u16string_view rString ) const
 
 static bool getConfigStringValue(
     const uno::Reference< container::XNameAccess > & xNameAccess,
-    const char * key,
+    const OUString& key,
     OUString & value )
 {
     try
     {
-        if ( !( xNameAccess->getByName( OUString::createFromAscii( key ) )
-                >>= value ) )
+        if ( !( xNameAccess->getByName( key ) >>= value ) )
         {
             OSL_FAIL( "InternetProxyDecider - "
                         "Error getting config item value!" );
@@ -260,13 +259,12 @@ static bool getConfigStringValue(
 
 static bool getConfigInt32Value(
     const uno::Reference< container::XNameAccess > & xNameAccess,
-    const char * key,
+    const OUString& key,
     sal_Int32 & value )
 {
     try
     {
-        uno::Any aValue = xNameAccess->getByName(
-            OUString::createFromAscii( key ) );
+        uno::Any aValue = xNameAccess->getByName( key );
         if ( aValue.hasValue() && !( aValue >>= value ) )
         {
             OSL_FAIL( "InternetProxyDecider - "
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index ad6202cf1479..b11d4648383d 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -38,18 +38,18 @@
 // #define this to true, if remembering defaults is not supported properly
 #define RTL_BOOTSTRAP_DEFAULTS_BROKEN true
 
-#define BOOTSTRAP_ITEM_PRODUCT_KEY          "ProductKey"
-#define BOOTSTRAP_ITEM_VERSIONFILE          "Location"
-#define BOOTSTRAP_ITEM_BUILDID              "buildid"
+constexpr OUStringLiteral BOOTSTRAP_ITEM_PRODUCT_KEY = u"ProductKey";
+constexpr OUStringLiteral BOOTSTRAP_ITEM_VERSIONFILE = u"Location";
+constexpr OUStringLiteral BOOTSTRAP_ITEM_BUILDID = u"buildid";
 
-#define BOOTSTRAP_ITEM_BASEINSTALLATION     "BRAND_BASE_DIR"
-#define BOOTSTRAP_ITEM_USERINSTALLATION     "UserInstallation"
+constexpr OUStringLiteral BOOTSTRAP_ITEM_BASEINSTALLATION = u"BRAND_BASE_DIR";
+constexpr OUStringLiteral BOOTSTRAP_ITEM_USERINSTALLATION = u"UserInstallation";
 
-#define BOOTSTRAP_ITEM_USERDIR              "UserDataDir"
+constexpr OUStringLiteral BOOTSTRAP_ITEM_USERDIR = u"UserDataDir";
 
-#define BOOTSTRAP_DEFAULT_BASEINSTALL       "$SYSBINDIR/.."
+constexpr OUStringLiteral BOOTSTRAP_DEFAULT_BASEINSTALL = u"$SYSBINDIR/..";
 
-#define BOOTSTRAP_DIRNAME_USERDIR           u"user"
+constexpr OUStringLiteral BOOTSTRAP_DIRNAME_USERDIR = u"user";
 
 typedef char const * AsciiString;
 
diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx
index 907d91e4642a..14ce7bb87aa5 100644
--- a/unotools/source/config/dynamicmenuoptions.cxx
+++ b/unotools/source/config/dynamicmenuoptions.cxx
@@ -34,15 +34,15 @@
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 
-#define DYNAMICMENU_PROPERTYNAME_URL                    "URL"
-#define DYNAMICMENU_PROPERTYNAME_TITLE                  "Title"
-#define DYNAMICMENU_PROPERTYNAME_IMAGEIDENTIFIER        "ImageIdentifier"
-#define DYNAMICMENU_PROPERTYNAME_TARGETNAME             "TargetName"
+constexpr OUStringLiteral DYNAMICMENU_PROPERTYNAME_URL = u"URL";
+constexpr OUStringLiteral DYNAMICMENU_PROPERTYNAME_TITLE = u"Title";
+constexpr OUStringLiteral DYNAMICMENU_PROPERTYNAME_IMAGEIDENTIFIER = u"ImageIdentifier";
+constexpr OUStringLiteral DYNAMICMENU_PROPERTYNAME_TARGETNAME = u"TargetName";
 
-#define PATHDELIMITER                                   "/"
+constexpr OUStringLiteral PATHDELIMITER = u"/";
 
-#define SETNODE_NEWMENU                                 "New"
-#define SETNODE_WIZARDMENU                              "Wizard"
+constexpr OUStringLiteral SETNODE_NEWMENU = u"New";
+constexpr OUStringLiteral SETNODE_WIZARDMENU = u"Wizard";
 
 #define PROPERTYNAME_URL                                DYNAMICMENU_PROPERTYNAME_URL
 #define PROPERTYNAME_TITLE                              DYNAMICMENU_PROPERTYNAME_TITLE
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::beans;
 
 #define PROPERTYCOUNT                                   4
 
-#define PATHPREFIX_SETUP                                "m"
+constexpr OUStringLiteral PATHPREFIX_SETUP = u"m";
 
 namespace
 {
@@ -235,8 +235,8 @@ static Sequence< OUString > lcl_GetPropertyNames(
 
     // Sort and expand all three list to result list ...
     Sequence< OUString > lProperties;
-    lcl_SortAndExpandPropertyNames( lNewItems          , lProperties, u"" SETNODE_NEWMENU   );
-    lcl_SortAndExpandPropertyNames( lWizardItems       , lProperties, u"" SETNODE_WIZARDMENU );
+    lcl_SortAndExpandPropertyNames( lNewItems          , lProperties, SETNODE_NEWMENU   );
+    lcl_SortAndExpandPropertyNames( lWizardItems       , lProperties, SETNODE_WIZARDMENU );
 
     // Return result.
     return lProperties;
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index dbfb4c208e6e..bfb7959bc488 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -43,7 +43,7 @@
 
 using namespace com::sun::star;
 
-#define FILE_PROTOCOL       "file:///"
+constexpr OUStringLiteral FILE_PROTOCOL = u"file:///";
 
 namespace
 {
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 118d43056da5..3e5443295c41 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -73,17 +73,17 @@
 
 #define PROPERTYCOUNT                       6
 
-#define FACTORYNAME_WRITER                  u"com.sun.star.text.TextDocument"
-#define FACTORYNAME_WRITERWEB               u"com.sun.star.text.WebDocument"
-#define FACTORYNAME_WRITERGLOBAL            u"com.sun.star.text.GlobalDocument"
-#define FACTORYNAME_CALC                    u"com.sun.star.sheet.SpreadsheetDocument"
-#define FACTORYNAME_DRAW                    u"com.sun.star.drawing.DrawingDocument"
-#define FACTORYNAME_IMPRESS                 u"com.sun.star.presentation.PresentationDocument"
-#define FACTORYNAME_MATH                    u"com.sun.star.formula.FormulaProperties"
-#define FACTORYNAME_CHART                   u"com.sun.star.chart2.ChartDocument"
-#define FACTORYNAME_DATABASE                u"com.sun.star.sdb.OfficeDatabaseDocument"
-#define FACTORYNAME_STARTMODULE             u"com.sun.star.frame.StartModule"
-#define FACTORYNAME_BASIC                   u"com.sun.star.script.BasicIDE"
+constexpr OUStringLiteral FACTORYNAME_WRITER = u"com.sun.star.text.TextDocument";
+constexpr OUStringLiteral FACTORYNAME_WRITERWEB = u"com.sun.star.text.WebDocument";
+constexpr OUStringLiteral FACTORYNAME_WRITERGLOBAL = u"com.sun.star.text.GlobalDocument";
+constexpr OUStringLiteral FACTORYNAME_CALC = u"com.sun.star.sheet.SpreadsheetDocument";
+constexpr OUStringLiteral FACTORYNAME_DRAW = u"com.sun.star.drawing.DrawingDocument";
+constexpr OUStringLiteral FACTORYNAME_IMPRESS = u"com.sun.star.presentation.PresentationDocument";
+constexpr OUStringLiteral FACTORYNAME_MATH = u"com.sun.star.formula.FormulaProperties";
+constexpr OUStringLiteral FACTORYNAME_CHART = u"com.sun.star.chart2.ChartDocument";
+constexpr OUStringLiteral FACTORYNAME_DATABASE = u"com.sun.star.sdb.OfficeDatabaseDocument";
+constexpr OUStringLiteral FACTORYNAME_STARTMODULE = u"com.sun.star.frame.StartModule";
+constexpr OUStringLiteral FACTORYNAME_BASIC = u"com.sun.star.script.BasicIDE";
 
 #define FACTORYCOUNT                        11
 
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 8414167e9af0..cec3642fa37a 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -36,10 +36,10 @@
 
 using namespace ::com::sun::star::uno;
 
-#define PROPERTYNAME_MACRO_TRUSTEDAUTHORS       u"TrustedAuthors"
-#define PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME  u"SubjectName"
-#define PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER u"SerialNumber"
-#define PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA      u"RawData"
+constexpr OUStringLiteral PROPERTYNAME_MACRO_TRUSTEDAUTHORS = u"TrustedAuthors";
+constexpr OUStringLiteral PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME = u"SubjectName";
+constexpr OUStringLiteral PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER = u"SerialNumber";
+constexpr OUStringLiteral PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA = u"RawData";
 
 
 namespace SvtSecurityOptions
@@ -247,7 +247,7 @@ void SetTrustedAuthors( const std::vector< Certificate >& rAuthors )
     for( sal_Int32 i = 0; i < nCnt; ++i )
     {
         OUString aPrefix(
-            PROPERTYNAME_MACRO_TRUSTEDAUTHORS "/a"
+            PROPERTYNAME_MACRO_TRUSTEDAUTHORS + "/a"
             + OUString::number(i) + "/");
         Sequence< css::beans::PropertyValue >    lPropertyValues( 3 );
         lPropertyValues[ 0 ].Name = aPrefix + PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME;
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 7cbb817ee1bf..9906124a141a 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -111,14 +111,14 @@ public:
             const LanguageTag&  GetRealUILocale() const { return m_aRealUILocale; }
 };
 
-#define ROOTNODE_SYSLOCALE              "Setup/L10N"
-
-#define PROPERTYNAME_LOCALE             "ooSetupSystemLocale"
-#define PROPERTYNAME_UILOCALE           "ooLocale"
-#define PROPERTYNAME_CURRENCY           "ooSetupCurrency"
-#define PROPERTYNAME_DECIMALSEPARATOR   "DecimalSeparatorAsLocale"
-#define PROPERTYNAME_DATEPATTERNS       "DateAcceptancePatterns"
-#define PROPERTYNAME_IGNORELANGCHANGE   "IgnoreLanguageChange"

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list