sw/source/core/unocore/SwXTextDefaults.cxx   |   16 +-
 sw/source/core/unocore/swunohelper.cxx       |    6 -
 sw/source/core/unocore/unobkm.cxx            |   30 ++---
 sw/source/core/unocore/unochart.cxx          |   30 ++---
 sw/source/core/unocore/unocoll.cxx           |   50 ++++-----
 sw/source/core/unocore/unocontentcontrol.cxx |   22 ++--
 sw/source/core/unocore/unocrsrhelper.cxx     |   20 +--
 sw/source/core/unocore/unodraw.cxx           |   40 +++----
 sw/source/core/unocore/unoevent.cxx          |    8 -
 sw/source/core/unocore/unofield.cxx          |   26 ++--
 sw/source/core/unocore/unoflatpara.cxx       |   10 -
 sw/source/core/unocore/unoframe.cxx          |   46 ++++----
 sw/source/core/unocore/unoftn.cxx            |    4 
 sw/source/core/unocore/unoidx.cxx            |   46 ++++----
 sw/source/core/unocore/unolinebreak.cxx      |    6 -
 sw/source/core/unocore/unoobj.cxx            |   40 +++----
 sw/source/core/unocore/unoobj2.cxx           |   62 +++++------
 sw/source/core/unocore/unoparagraph.cxx      |   28 ++---
 sw/source/core/unocore/unoport.cxx           |   24 ++--
 sw/source/core/unocore/unoportenum.cxx       |    4 
 sw/source/core/unocore/unoredline.cxx        |    4 
 sw/source/core/unocore/unoredlines.cxx       |    4 
 sw/source/core/unocore/unorefmk.cxx          |   58 +++++-----
 sw/source/core/unocore/unosect.cxx           |   18 +--
 sw/source/core/unocore/unosett.cxx           |   48 ++++----
 sw/source/core/unocore/unosrch.cxx           |    4 
 sw/source/core/unocore/unostyle.cxx          |   66 ++++++------
 sw/source/core/unocore/unotbl.cxx            |  148 +++++++++++++--------------
 sw/source/core/unocore/unotext.cxx           |   36 +++---
 29 files changed, 453 insertions(+), 451 deletions(-)

New commits:
commit 359ae74cc138c59d18285cea301a7382da14668d
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri May 17 12:42:04 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri May 17 21:38:42 2024 +0200

    loplugin:ostr in sw/../unocore
    
    Change-Id: Ibf48c1fcdc2ed53784bb73ca718d8f9886d983d8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167769
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx 
b/sw/source/core/unocore/SwXTextDefaults.cxx
index f129eff219eb..66ea89e3d3f0 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -213,7 +213,7 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const 
OUString& rPropertyName
 
 OUString SAL_CALL SwXTextDefaults::getImplementationName(  )
 {
-    return "SwXTextDefaults";
+    return u"SwXTextDefaults"_ustr;
 }
 
 sal_Bool SAL_CALL SwXTextDefaults::supportsService( const OUString& 
rServiceName )
@@ -223,13 +223,13 @@ sal_Bool SAL_CALL SwXTextDefaults::supportsService( const 
OUString& rServiceName
 
 uno::Sequence< OUString > SAL_CALL SwXTextDefaults::getSupportedServiceNames(  
)
 {
-    return { "com.sun.star.text.Defaults",
-             "com.sun.star.style.CharacterProperties",
-             "com.sun.star.style.CharacterPropertiesAsian",
-             "com.sun.star.style.CharacterPropertiesComplex",
-             "com.sun.star.style.ParagraphProperties",
-             "com.sun.star.style.ParagraphPropertiesAsian",
-             "com.sun.star.style.ParagraphPropertiesComplex" };
+    return { u"com.sun.star.text.Defaults"_ustr,
+             u"com.sun.star.style.CharacterProperties"_ustr,
+             u"com.sun.star.style.CharacterPropertiesAsian"_ustr,
+             u"com.sun.star.style.CharacterPropertiesComplex"_ustr,
+             u"com.sun.star.style.ParagraphProperties"_ustr,
+             u"com.sun.star.style.ParagraphPropertiesAsian"_ustr,
+             u"com.sun.star.style.ParagraphPropertiesComplex"_ustr };
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/swunohelper.cxx 
b/sw/source/core/unocore/swunohelper.cxx
index 0aab2a681acf..b5b1d2adb36a 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -64,7 +64,7 @@ bool UCB_DeleteFile( const OUString& rURL )
         ucbhelper::Content aTempContent( rURL,
                                 css::uno::Reference< 
css::ucb::XCommandEnvironment >(),
                                 comphelper::getProcessComponentContext() );
-        aTempContent.executeCommand("delete", css::uno::Any( true ) );
+        aTempContent.executeCommand(u"delete"_ustr, css::uno::Any( true ) );
         bRemoved = true;
     }
     catch( css::uno::Exception& )
@@ -94,7 +94,7 @@ bool UCB_MoveFile( const OUString& rURL, std::u16string_view 
rNewURL )
         aInfo.NewTitle = sName;
         aInfo.SourceURL = rURL;
         aInfo.MoveData = true;
-        aTempContent.executeCommand( "transfer", uno::Any(aInfo) );
+        aTempContent.executeCommand( u"transfer"_ustr, uno::Any(aInfo) );
     }
     catch( css::uno::Exception& )
     {
@@ -138,7 +138,7 @@ bool UCB_IsReadOnlyFileName( const OUString& rURL )
     try
     {
         ucbhelper::Content aCnt( rURL, css::uno::Reference< 
css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
-        css::uno::Any aAny = aCnt.getPropertyValue("IsReadOnly");
+        css::uno::Any aAny = aCnt.getPropertyValue(u"IsReadOnly"_ustr);
         if(aAny.hasValue())
             bIsReadOnly = *o3tl::doAccess<bool>(aAny);
     }
diff --git a/sw/source/core/unocore/unobkm.cxx 
b/sw/source/core/unocore/unobkm.cxx
index 81818a13d03a..cb9b3894a72e 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -325,7 +325,7 @@ void SAL_CALL SwXBookmark::setName(const OUString& rName)
         m_pImpl->m_pDoc->getIDocumentMarkAccess();
     if(pMarkAccess->findMark(rName) != pMarkAccess->getAllMarksEnd())
     {
-        throw uno::RuntimeException("setName(): name already in use",
+        throw uno::RuntimeException(u"setName(): name already in use"_ustr,
                 getXWeak());
     }
 
@@ -342,7 +342,7 @@ void SAL_CALL SwXBookmark::setName(const OUString& rName)
 OUString SAL_CALL
 SwXBookmark::getImplementationName()
 {
-    return "SwXBookmark";
+    return u"SwXBookmark"_ustr;
 }
 
 sal_Bool SAL_CALL SwXBookmark::supportsService(const OUString& rServiceName)
@@ -354,9 +354,9 @@ uno::Sequence< OUString > SAL_CALL
 SwXBookmark::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextContent",
-        "com.sun.star.text.Bookmark",
-        "com.sun.star.document.LinkTarget"
+        u"com.sun.star.text.TextContent"_ustr,
+        u"com.sun.star.text.Bookmark"_ustr,
+        u"com.sun.star.document.LinkTarget"_ustr
     };
 }
 
@@ -397,7 +397,7 @@ SwXBookmark::setPropertyValue(const OUString& PropertyName,
     {
         bool bNewValue = false;
         if (!(rValue >>= bNewValue))
-            throw lang::IllegalArgumentException("Property BookmarkHidden 
requires value of type boolean", nullptr, 0);
+            throw lang::IllegalArgumentException(u"Property BookmarkHidden 
requires value of type boolean"_ustr, nullptr, 0);
 
         IBookmark* pBookmark = 
dynamic_cast<IBookmark*>(m_pImpl->m_pRegisteredBookmark);
         if (pBookmark)
@@ -414,7 +414,7 @@ SwXBookmark::setPropertyValue(const OUString& PropertyName,
     {
         OUString newValue;
         if (!(rValue >>= newValue))
-            throw lang::IllegalArgumentException("Property BookmarkCondition 
requires value of type string", nullptr, 0);
+            throw lang::IllegalArgumentException(u"Property BookmarkCondition 
requires value of type string"_ustr, nullptr, 0);
 
         IBookmark* pBookmark = 
dynamic_cast<IBookmark*>(m_pImpl->m_pRegisteredBookmark);
         if (pBookmark)
@@ -588,7 +588,7 @@ SwXFieldmark::SwXFieldmark(bool const isReplacementObject, 
SwDoc *const pDoc)
 OUString SAL_CALL
 SwXFieldmark::getImplementationName()
 {
-    return "SwXFieldmark";
+    return u"SwXFieldmark"_ustr;
 }
 
 uno::Sequence<OUString> SAL_CALL
@@ -597,15 +597,15 @@ SwXFieldmark::getSupportedServiceNames()
     // is const, no lock needed
     if (m_bReplacementObject)
     {
-        return {"com.sun.star.text.TextContent",
-                "com.sun.star.text.Bookmark",
-                "com.sun.star.text.FormFieldmark"};
+        return {u"com.sun.star.text.TextContent"_ustr,
+                u"com.sun.star.text.Bookmark"_ustr,
+                u"com.sun.star.text.FormFieldmark"_ustr};
     }
     else
     {
-        return {"com.sun.star.text.TextContent",
-                "com.sun.star.text.Bookmark",
-                "com.sun.star.text.Fieldmark"};
+        return {u"com.sun.star.text.TextContent"_ustr,
+                u"com.sun.star.text.Bookmark"_ustr,
+                u"com.sun.star.text.Fieldmark"_ustr};
     }
 }
 
@@ -658,7 +658,7 @@ void SwXFieldmark::setFieldType(const OUString & fieldType)
          return;
     }
 
-    throw uno::RuntimeException("changing to that type isn't implemented");
+    throw uno::RuntimeException(u"changing to that type isn't 
implemented"_ustr);
 }
 
 uno::Reference<container::XNameContainer> SwXFieldmark::getParameters()
diff --git a/sw/source/core/unocore/unochart.cxx 
b/sw/source/core/unocore/unochart.cxx
index 0d2b2614d788..7886528cc0d3 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -523,7 +523,7 @@ uno::Reference< chart2::data::XDataSource > 
SwChartDataProvider::Impl_createData
     uno::Reference< chart2::data::XDataSource > xRes;
 
     if (!m_pDoc)
-        throw uno::RuntimeException("Not connected to a document.");
+        throw uno::RuntimeException(u"Not connected to a document."_ustr);
 
     // get arguments
     OUString aRangeRepresentation;
@@ -1393,7 +1393,7 @@ void SAL_CALL SwChartDataProvider::removeEventListener(
 
 OUString SAL_CALL SwChartDataProvider::getImplementationName(  )
 {
-    return "SwChartDataProvider";
+    return u"SwChartDataProvider"_ustr;
 }
 
 sal_Bool SAL_CALL SwChartDataProvider::supportsService(const OUString& 
rServiceName )
@@ -1403,7 +1403,7 @@ sal_Bool SAL_CALL 
SwChartDataProvider::supportsService(const OUString& rServiceN
 
 uno::Sequence< OUString > SAL_CALL 
SwChartDataProvider::getSupportedServiceNames(  )
 {
-    return { "com.sun.star.chart2.data.DataProvider"};
+    return { u"com.sun.star.chart2.data.DataProvider"_ustr};
 }
 
 void SwChartDataProvider::AddDataSequence( const SwTable &rTable, 
rtl::Reference< SwChartDataSequence > const &rxDataSequence )
@@ -1638,7 +1638,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( 
const OUString& rRange
             throw lang::IllegalArgumentException();
         SwTable* pTable = SwTable::FindTable( pTableFormat );
         if  (pTable->IsTableComplex())
-            throw uno::RuntimeException("Table too complex.");
+            throw uno::RuntimeException(u"Table too complex."_ustr);
 
         // check that there is only one table used in all ranges
         if (!pFirstFoundTable)
@@ -1655,7 +1655,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( 
const OUString& rRange
         sal_Int32 nCol, nRow;
         SwXTextTable::GetCellPosition( aStartCell, nCol, nRow );
         if (nCol < 0 || nRow < 0)
-            throw uno::RuntimeException("Cell not found.");
+            throw uno::RuntimeException(u"Cell not found."_ustr);
 
         //!! following objects/functions are implemented in XMLRangeHelper.?xx
         //!! which is a copy of the respective file from chart2 !!
@@ -1668,7 +1668,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( 
const OUString& rRange
         {
             SwXTextTable::GetCellPosition( aEndCell, nCol, nRow );
             if (nCol < 0 || nRow < 0)
-                throw uno::RuntimeException("Cell not found.");
+                throw uno::RuntimeException(u"Cell not found."_ustr);
 
             aCellRange.aLowerRight.nColumn   = nCol;
             aCellRange.aLowerRight.nRow      = nRow;
@@ -1750,7 +1750,7 @@ uno::Sequence< uno::Reference< 
chart2::data::XLabeledDataSequence > > SAL_CALL S
 
 OUString SAL_CALL SwChartDataSource::getImplementationName(  )
 {
-    return "SwChartDataSource";
+    return u"SwChartDataSource"_ustr;
 }
 
 sal_Bool SAL_CALL SwChartDataSource::supportsService(const OUString& 
rServiceName )
@@ -1760,7 +1760,7 @@ sal_Bool SAL_CALL 
SwChartDataSource::supportsService(const OUString& rServiceNam
 
 uno::Sequence< OUString > SAL_CALL 
SwChartDataSource::getSupportedServiceNames(  )
 {
-    return { "com.sun.star.chart2.data.DataSource" };
+    return { u"com.sun.star.chart2.data.DataSource"_ustr };
 }
 
 SwChartDataSequence::SwChartDataSequence(
@@ -1889,12 +1889,12 @@ uno::Sequence< OUString > SAL_CALL 
SwChartDataSequence::generateLabel(
         bool bOk = false;
         SwFrameFormat* pTableFormat = GetFrameFormat();
         if (!pTableFormat)
-            throw uno::RuntimeException("No table format found.");
+            throw uno::RuntimeException(u"No table format found."_ustr);
         SwTable* pTable = SwTable::FindTable( pTableFormat );
         if (!pTable)
-            throw uno::RuntimeException("No table found.");
+            throw uno::RuntimeException(u"No table found."_ustr);
         if (pTable->IsTableComplex())
-            throw uno::RuntimeException("Table too complex.");
+            throw uno::RuntimeException(u"Table too complex."_ustr);
 
         const OUString aCellRange( GetCellRangeName( *pTableFormat, 
*m_pTableCursor ) );
         OSL_ENSURE( !aCellRange.isEmpty(), "failed to get cell range" );
@@ -2127,7 +2127,7 @@ void SAL_CALL 
SwChartDataSequence::removeVetoableChangeListener(
 
 OUString SAL_CALL SwChartDataSequence::getImplementationName(  )
 {
-    return "SwChartDataSequence";
+    return u"SwChartDataSequence"_ustr;
 }
 
 sal_Bool SAL_CALL SwChartDataSequence::supportsService(const OUString& 
rServiceName )
@@ -2137,7 +2137,7 @@ sal_Bool SAL_CALL 
SwChartDataSequence::supportsService(const OUString& rServiceN
 
 uno::Sequence< OUString > SAL_CALL 
SwChartDataSequence::getSupportedServiceNames(  )
 {
-    return { "com.sun.star.chart2.data.DataSequence" };
+    return { u"com.sun.star.chart2.data.DataSequence"_ustr };
 }
 
 void SwChartDataSequence::Notify( const SfxHint& rHint)
@@ -2596,7 +2596,7 @@ uno::Reference< util::XCloneable > SAL_CALL 
SwChartLabeledDataSequence::createCl
 
 OUString SAL_CALL SwChartLabeledDataSequence::getImplementationName(  )
 {
-    return "SwChartLabeledDataSequence";
+    return u"SwChartLabeledDataSequence"_ustr;
 }
 
 sal_Bool SAL_CALL SwChartLabeledDataSequence::supportsService(
@@ -2607,7 +2607,7 @@ sal_Bool SAL_CALL 
SwChartLabeledDataSequence::supportsService(
 
 uno::Sequence< OUString > SAL_CALL 
SwChartLabeledDataSequence::getSupportedServiceNames(  )
 {
-    return { "com.sun.star.chart2.data.LabeledDataSequence" };
+    return { u"com.sun.star.chart2.data.LabeledDataSequence"_ustr };
 }
 
 void SAL_CALL SwChartLabeledDataSequence::disposing(
diff --git a/sw/source/core/unocore/unocoll.cxx 
b/sw/source/core/unocore/unocoll.cxx
index a03d6e2535ed..24016c53350f 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -110,8 +110,8 @@ public:
             try
             {
                 uno::Reference< beans::XPropertySet > xProps( 
mpDocShell->GetModel(), uno::UNO_QUERY_THROW );
-                uno::Reference< container::XNameAccess > xLibContainer( 
xProps->getPropertyValue("BasicLibraries"), uno::UNO_QUERY_THROW );
-                OUString sProjectName( "Standard");
+                uno::Reference< container::XNameAccess > xLibContainer( 
xProps->getPropertyValue(u"BasicLibraries"_ustr), uno::UNO_QUERY_THROW );
+                OUString sProjectName( u"Standard"_ustr);
                 if ( !mpDocShell->GetBasicManager()->GetName().isEmpty() )
                 {
                     sProjectName =  mpDocShell->GetBasicManager()->GetName();
@@ -594,11 +594,11 @@ SwXServiceProvider::MakeInstance(SwServiceType 
nObjectType, SwDoc & rDoc)
         {
             uno::Any aGlobs;
             BasicManager *pBasicMan = rDoc.GetDocShell()->GetBasicManager();
-            if (pBasicMan && !pBasicMan->GetGlobalUNOConstant("VBAGlobals", 
aGlobs))
+            if (pBasicMan && 
!pBasicMan->GetGlobalUNOConstant(u"VBAGlobals"_ustr, aGlobs))
             {
                 uno::Sequence< uno::Any > aArgs{ 
uno::Any(rDoc.GetDocShell()->GetModel()) };
-                aGlobs <<= 
::comphelper::getProcessServiceFactory()->createInstanceWithArguments( 
"ooo.vba.word.Globals", aArgs );
-                pBasicMan->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+                aGlobs <<= 
::comphelper::getProcessServiceFactory()->createInstanceWithArguments( 
u"ooo.vba.word.Globals"_ustr, aArgs );
+                pBasicMan->SetGlobalUNOConstant( u"VBAGlobals"_ustr, aGlobs );
             }
             aGlobs >>= xRet;
         }
@@ -960,7 +960,7 @@ sal_Bool SwXTextTables::hasElements()
 
 OUString SwXTextTables::getImplementationName()
 {
-    return "SwXTextTables";
+    return u"SwXTextTables"_ustr;
 }
 
 sal_Bool SwXTextTables::supportsService(const OUString& rServiceName)
@@ -970,7 +970,7 @@ sal_Bool SwXTextTables::supportsService(const OUString& 
rServiceName)
 
 uno::Sequence< OUString > SwXTextTables::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextTables" };
+    return { u"com.sun.star.text.TextTables"_ustr };
 }
 
 uno::Reference<text::XTextTable> SwXTextTables::GetObject(SwFrameFormat& 
rFormat)
@@ -1103,7 +1103,7 @@ Any SwXFrameEnumeration<T>::nextElement()
 template<FlyCntType T>
 OUString SwXFrameEnumeration<T>::getImplementationName()
 {
-    return "SwXFrameEnumeration";
+    return u"SwXFrameEnumeration"_ustr;
 }
 
 template<FlyCntType T>
@@ -1115,12 +1115,12 @@ sal_Bool SwXFrameEnumeration<T>::supportsService(const 
OUString& ServiceName)
 template<FlyCntType T>
 Sequence< OUString > SwXFrameEnumeration<T>::getSupportedServiceNames()
 {
-    return { OUString("com.sun.star.container.XEnumeration") };
+    return { u"com.sun.star.container.XEnumeration"_ustr };
 }
 
 OUString SwXFrames::getImplementationName()
 {
-    return "SwXFrames";
+    return u"SwXFrames"_ustr;
 }
 
 sal_Bool SwXFrames::supportsService(const OUString& rServiceName)
@@ -1130,7 +1130,7 @@ sal_Bool SwXFrames::supportsService(const OUString& 
rServiceName)
 
 Sequence<OUString> SwXFrames::getSupportedServiceNames()
 {
-    return { OUString("com.sun.star.text.TextFrames") };
+    return { u"com.sun.star.text.TextFrames"_ustr };
 }
 
 SwXFrames::SwXFrames(SwDoc* _pDoc, FlyCntType eSet) :
@@ -1254,7 +1254,7 @@ sal_Bool SwXFrames::hasElements()
 
 OUString SwXTextFrames::getImplementationName()
 {
-    return "SwXTextFrames";
+    return u"SwXTextFrames"_ustr;
 }
 
 sal_Bool SwXTextFrames::supportsService(const OUString& rServiceName)
@@ -1264,7 +1264,7 @@ sal_Bool SwXTextFrames::supportsService(const OUString& 
rServiceName)
 
 Sequence< OUString > SwXTextFrames::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextFrames" };
+    return { u"com.sun.star.text.TextFrames"_ustr };
 }
 
 SwXTextFrames::SwXTextFrames(SwDoc* _pDoc) :
@@ -1278,7 +1278,7 @@ SwXTextFrames::~SwXTextFrames()
 
 OUString SwXTextGraphicObjects::getImplementationName()
 {
-    return "SwXTextGraphicObjects";
+    return u"SwXTextGraphicObjects"_ustr;
 }
 
 sal_Bool SwXTextGraphicObjects::supportsService(const OUString& rServiceName)
@@ -1288,7 +1288,7 @@ sal_Bool SwXTextGraphicObjects::supportsService(const 
OUString& rServiceName)
 
 Sequence< OUString > SwXTextGraphicObjects::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextGraphicObjects" };
+    return { u"com.sun.star.text.TextGraphicObjects"_ustr };
 }
 
 SwXTextGraphicObjects::SwXTextGraphicObjects(SwDoc* _pDoc) :
@@ -1302,7 +1302,7 @@ SwXTextGraphicObjects::~SwXTextGraphicObjects()
 
 OUString SwXTextEmbeddedObjects::getImplementationName()
 {
-    return "SwXTextEmbeddedObjects";
+    return u"SwXTextEmbeddedObjects"_ustr;
 }
 
 sal_Bool SwXTextEmbeddedObjects::supportsService(const OUString& rServiceName)
@@ -1312,7 +1312,7 @@ sal_Bool SwXTextEmbeddedObjects::supportsService(const 
OUString& rServiceName)
 
 Sequence< OUString > SwXTextEmbeddedObjects::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextEmbeddedObjects" };
+    return { u"com.sun.star.text.TextEmbeddedObjects"_ustr };
 }
 
 SwXTextEmbeddedObjects::SwXTextEmbeddedObjects(SwDoc* _pDoc) :
@@ -1326,7 +1326,7 @@ SwXTextEmbeddedObjects::~SwXTextEmbeddedObjects()
 
 OUString SwXTextSections::getImplementationName()
 {
-    return "SwXTextSections";
+    return u"SwXTextSections"_ustr;
 }
 
 sal_Bool SwXTextSections::supportsService(const OUString& rServiceName)
@@ -1336,7 +1336,7 @@ sal_Bool SwXTextSections::supportsService(const OUString& 
rServiceName)
 
 Sequence< OUString > SwXTextSections::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextSections" };
+    return { u"com.sun.star.text.TextSections"_ustr };
 }
 
 SwXTextSections::SwXTextSections(SwDoc* _pDoc) :
@@ -1482,7 +1482,7 @@ rtl::Reference< SwXTextSection >  
SwXTextSections::GetObject( SwSectionFormat& r
 
 OUString SwXBookmarks::getImplementationName()
 {
-    return "SwXBookmarks";
+    return u"SwXBookmarks"_ustr;
 }
 
 sal_Bool SwXBookmarks::supportsService(const OUString& rServiceName)
@@ -1492,7 +1492,7 @@ sal_Bool SwXBookmarks::supportsService(const OUString& 
rServiceName)
 
 Sequence< OUString > SwXBookmarks::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.Bookmarks" };
+    return { u"com.sun.star.text.Bookmarks"_ustr };
 }
 
 SwXBookmarks::SwXBookmarks(SwDoc* _pDoc) :
@@ -1663,7 +1663,7 @@ sal_Bool SwXNumberingRulesCollection::hasElements()
 
 OUString SwXFootnotes::getImplementationName()
 {
-    return "SwXFootnotes";
+    return u"SwXFootnotes"_ustr;
 }
 
 sal_Bool SwXFootnotes::supportsService(const OUString& rServiceName)
@@ -1673,7 +1673,7 @@ sal_Bool SwXFootnotes::supportsService(const OUString& 
rServiceName)
 
 Sequence< OUString > SwXFootnotes::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.Footnotes" };
+    return { u"com.sun.star.text.Footnotes"_ustr };
 }
 
 SwXFootnotes::SwXFootnotes(bool bEnd, SwDoc* _pDoc)
@@ -1755,7 +1755,7 @@ rtl::Reference<SwXFootnote> SwXFootnotes::GetObject( 
SwDoc& rDoc, const SwFormat
 
 OUString SwXReferenceMarks::getImplementationName()
 {
-    return "SwXReferenceMarks";
+    return u"SwXReferenceMarks"_ustr;
 }
 
 sal_Bool SwXReferenceMarks::supportsService(const OUString& rServiceName)
@@ -1765,7 +1765,7 @@ sal_Bool SwXReferenceMarks::supportsService(const 
OUString& rServiceName)
 
 Sequence< OUString > SwXReferenceMarks::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.ReferenceMarks" };
+    return { u"com.sun.star.text.ReferenceMarks"_ustr };
 }
 
 SwXReferenceMarks::SwXReferenceMarks(SwDoc* _pDoc) :
diff --git a/sw/source/core/unocore/unocontentcontrol.cxx 
b/sw/source/core/unocore/unocontentcontrol.cxx
index 5d54d60e9b5d..0660183a681d 100644
--- a/sw/source/core/unocore/unocontentcontrol.cxx
+++ b/sw/source/core/unocore/unocontentcontrol.cxx
@@ -342,7 +342,7 @@ bool SwXContentControl::SetContentRange(SwTextNode*& 
rpNode, sal_Int32& rStart,
 }
 
 // XServiceInfo
-OUString SAL_CALL SwXContentControl::getImplementationName() { return 
"SwXContentControl"; }
+OUString SAL_CALL SwXContentControl::getImplementationName() { return 
u"SwXContentControl"_ustr; }
 
 sal_Bool SAL_CALL SwXContentControl::supportsService(const OUString& 
rServiceName)
 {
@@ -351,7 +351,7 @@ sal_Bool SAL_CALL SwXContentControl::supportsService(const 
OUString& rServiceNam
 
 uno::Sequence<OUString> SAL_CALL SwXContentControl::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextContent", 
"com.sun.star.text.ContentControl" };
+    return { u"com.sun.star.text.TextContent"_ustr, 
u"com.sun.star.text.ContentControl"_ustr };
 }
 
 // XComponent
@@ -416,7 +416,7 @@ void SwXContentControl::AttachImpl(const 
uno::Reference<text::XTextRange>& xText
     }
     if (!m_pImpl->m_bIsDescriptor)
     {
-        throw uno::RuntimeException("SwXContentControl::AttachImpl(): already 
attached",
+        throw uno::RuntimeException(u"SwXContentControl::AttachImpl(): already 
attached"_ustr,
                                     getXWeak());
     }
 
@@ -426,14 +426,14 @@ void SwXContentControl::AttachImpl(const 
uno::Reference<text::XTextRange>& xText
     if (!pRange && !pCursor)
     {
         throw lang::IllegalArgumentException(
-            "SwXContentControl::AttachImpl(): argument not supported type", 
getXWeak(), 0);
+            u"SwXContentControl::AttachImpl(): argument not supported 
type"_ustr, getXWeak(), 0);
     }
 
     SwDoc* pDoc = pRange ? &pRange->GetDoc() : pCursor->GetDoc();
     if (!pDoc)
     {
         throw lang::IllegalArgumentException(
-            "SwXContentControl::AttachImpl(): argument has no SwDoc", 
getXWeak(), 0);
+            u"SwXContentControl::AttachImpl(): argument has no SwDoc"_ustr, 
getXWeak(), 0);
     }
 
     SwUnoInternalPaM aPam(*pDoc);
@@ -483,14 +483,14 @@ void SwXContentControl::AttachImpl(const 
uno::Reference<text::XTextRange>& xText
     if (!bSuccess)
     {
         throw lang::IllegalArgumentException(
-            "SwXContentControl::AttachImpl(): cannot create content control: 
invalid range",
+            u"SwXContentControl::AttachImpl(): cannot create content control: 
invalid range"_ustr,
             getXWeak(), 1);
     }
     if (!pTextAttr)
     {
         SAL_WARN("sw.core", "content control inserted, but has no text 
attribute?");
         throw uno::RuntimeException(
-            "SwXContentControl::AttachImpl(): cannot create content control", 
getXWeak());
+            u"SwXContentControl::AttachImpl(): cannot create content 
control"_ustr, getXWeak());
     }
 
     m_pImpl->EndListeningAll();
@@ -519,7 +519,8 @@ uno::Reference<text::XTextRange> SAL_CALL 
SwXContentControl::getAnchor()
     }
     if (m_pImpl->m_bIsDescriptor)
     {
-        throw uno::RuntimeException("SwXContentControl::getAnchor(): not 
inserted", getXWeak());
+        throw uno::RuntimeException(u"SwXContentControl::getAnchor(): not 
inserted"_ustr,
+                                    getXWeak());
     }
 
     SwTextNode* pTextNode;
@@ -529,7 +530,8 @@ uno::Reference<text::XTextRange> SAL_CALL 
SwXContentControl::getAnchor()
     if (!bSuccess)
     {
         SAL_WARN("sw.core", "no pam");
-        throw lang::DisposedException("SwXContentControl::getAnchor(): not 
attached", getXWeak());
+        throw lang::DisposedException(u"SwXContentControl::getAnchor(): not 
attached"_ustr,
+                                      getXWeak());
     }
 
     SwPosition aStart(*pTextNode, nContentControlStart - 1); // -1 due to 
CH_TXTATR
@@ -1387,7 +1389,7 @@ uno::Reference<container::XEnumeration> SAL_CALL 
SwXContentControl::createEnumer
     }
     if (m_pImpl->m_bIsDescriptor)
     {
-        throw uno::RuntimeException("createEnumeration(): not inserted", 
getXWeak());
+        throw uno::RuntimeException(u"createEnumeration(): not inserted"_ustr, 
getXWeak());
     }
 
     SwTextNode* pTextNode;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 4ab2b9dc50ec..d8868d4f1b02 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1026,13 +1026,13 @@ void InsertFile(SwUnoCursor* pUnoCursor, const 
OUString& rURL,
         if (pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->GetContentIndex(),
                 RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent))
         {
-            throw uno::RuntimeException("cannot insert file inside input 
field");
+            throw uno::RuntimeException(u"cannot insert file inside input 
field"_ustr);
         }
 
         if (pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->GetContentIndex(),
                 RES_TXTATR_CONTENTCONTROL, ::sw::GetTextAttrMode::Parent))
         {
-            throw uno::RuntimeException("cannot insert file inside content 
controls");
+            throw uno::RuntimeException(u"cannot insert file inside content 
controls"_ustr);
         }
     }
 
@@ -1300,7 +1300,7 @@ void makeRedline( SwPaM const & rPaM,
             if (!aRevertProperties.hasElements())
             {
                 // to reject the paragraph style change, use standard style
-                xRedlineExtraData.reset(new SwRedlineExtraData_FormatColl( "", 
 RES_POOLCOLL_STANDARD, nullptr ));
+                xRedlineExtraData.reset(new SwRedlineExtraData_FormatColl( 
u""_ustr,  RES_POOLCOLL_STANDARD, nullptr ));
             }
         }
         else
@@ -1390,7 +1390,7 @@ void makeRedline( SwPaM const & rPaM,
                     sUIStyle.isEmpty() ? sParaStyleName : sUIStyle, 
nStylePoolId, &aItemSet));
             }
             else if (eType == RedlineType::ParagraphFormat)
-                xRedlineExtraData.reset(new SwRedlineExtraData_FormatColl( "", 
RES_POOLCOLL_STANDARD, nullptr ));
+                xRedlineExtraData.reset(new SwRedlineExtraData_FormatColl( 
u""_ustr, RES_POOLCOLL_STANDARD, nullptr ));
         }
     }
 
@@ -1463,16 +1463,16 @@ void makeTableRowRedline( SwTableLine& rTableLine,
     comphelper::SequenceAsHashMap aPropMap( rRedlineProperties );
     std::size_t nAuthor = 0;
     OUString sAuthor;
-    if( aPropMap.getValue("RedlineAuthor") >>= sAuthor )
+    if( aPropMap.getValue(u"RedlineAuthor"_ustr) >>= sAuthor )
         nAuthor = pRedlineAccess->InsertRedlineAuthor(sAuthor);
 
     OUString sComment;
     SwRedlineData aRedlineData( eType, nAuthor );
-    if( aPropMap.getValue("RedlineComment") >>= sComment )
+    if( aPropMap.getValue(u"RedlineComment"_ustr) >>= sComment )
         aRedlineData.SetComment( sComment );
 
     ::util::DateTime aStamp;
-    if( aPropMap.getValue("RedlineDateTime") >>= aStamp )
+    if( aPropMap.getValue(u"RedlineDateTime"_ustr) >>= aStamp )
     {
        aRedlineData.SetTimeStamp(
         DateTime( Date( aStamp.Day, aStamp.Month, aStamp.Year ), tools::Time( 
aStamp.Hours, aStamp.Minutes, aStamp.Seconds ) ) );
@@ -1538,16 +1538,16 @@ void makeTableCellRedline( SwTableBox& rTableBox,
     comphelper::SequenceAsHashMap aPropMap( rRedlineProperties );
     std::size_t nAuthor = 0;
     OUString sAuthor;
-    if( aPropMap.getValue("RedlineAuthor") >>= sAuthor )
+    if( aPropMap.getValue(u"RedlineAuthor"_ustr) >>= sAuthor )
         nAuthor = pRedlineAccess->InsertRedlineAuthor(sAuthor);
 
     OUString sComment;
     SwRedlineData aRedlineData( eType, nAuthor );
-    if( aPropMap.getValue("RedlineComment") >>= sComment )
+    if( aPropMap.getValue(u"RedlineComment"_ustr) >>= sComment )
         aRedlineData.SetComment( sComment );
 
     ::util::DateTime aStamp;
-    if( aPropMap.getValue("RedlineDateTime") >>= aStamp )
+    if( aPropMap.getValue(u"RedlineDateTime"_ustr) >>= aStamp )
     {
        aRedlineData.SetTimeStamp(
         DateTime( Date( aStamp.Day, aStamp.Month, aStamp.Year ), tools::Time( 
aStamp.Hours, aStamp.Minutes, aStamp.Seconds ) ) );
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 1deb1751c0d9..6d679499342d 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -548,7 +548,7 @@ uno::Any SwXShapesEnumeration::nextElement()
 
 OUString SwXShapesEnumeration::getImplementationName()
 {
-    return "SwXShapeEnumeration";
+    return u"SwXShapeEnumeration"_ustr;
 }
 
 sal_Bool SwXShapesEnumeration::supportsService(const OUString& ServiceName)
@@ -558,7 +558,7 @@ sal_Bool SwXShapesEnumeration::supportsService(const 
OUString& ServiceName)
 
 uno::Sequence< OUString > SwXShapesEnumeration::getSupportedServiceNames()
 {
-    return { OUString("com.sun.star.container.XEnumeration") };
+    return { u"com.sun.star.container.XEnumeration"_ustr };
 }
 
 uno::Reference< container::XEnumeration > SwFmDrawPage::createEnumeration()
@@ -570,7 +570,7 @@ uno::Reference< container::XEnumeration > 
SwFmDrawPage::createEnumeration()
 
 OUString SwFmDrawPage::getImplementationName()
 {
-    return "SwFmDrawPage";
+    return u"SwFmDrawPage"_ustr;
 }
 
 sal_Bool SwFmDrawPage::supportsService(const OUString& rServiceName)
@@ -580,7 +580,7 @@ sal_Bool SwFmDrawPage::supportsService(const OUString& 
rServiceName)
 
 uno::Sequence< OUString > SwFmDrawPage::getSupportedServiceNames()
 {
-    return { "com.sun.star.drawing.GenericDrawPage" };
+    return { u"com.sun.star.drawing.GenericDrawPage"_ustr };
 }
 
 sal_Int32 SwFmDrawPage::getCount()
@@ -631,7 +631,7 @@ void SwFmDrawPage::add(const uno::Reference< 
drawing::XShape > & xShape)
 
     // this is not a writer shape
     if(!pShape)
-        throw uno::RuntimeException("illegal object",
+        throw uno::RuntimeException(u"illegal object"_ustr,
                                     getXWeak() );
 
     // we're already registered in the model / SwXDrawPage::add() already 
called
@@ -825,7 +825,7 @@ uno::Reference< drawing::XShapeGroup >  
SwFmDrawPage::group(const uno::Reference
                                     pObj))->GetAnchor().GetAnchorId())
             {
                 throw lang::IllegalArgumentException(
-                    "Shape must not have 'as character' anchor!", nullptr, 0);
+                    u"Shape must not have 'as character' anchor!"_ustr, 
nullptr, 0);
             }
         }
 
@@ -1584,7 +1584,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& 
rPropertyName)
                 {
                     // get property <::drawing::Shape::Transformation>
                     // without conversion to layout direction as below
-                    aRet = _getPropAtAggrObj( "Transformation" );
+                    aRet = _getPropAtAggrObj( u"Transformation"_ustr );
                 }
                 else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
                 {
@@ -1595,13 +1595,13 @@ uno::Any SwXShape::getPropertyValue(const OUString& 
rPropertyName)
                 {
                     // get property <::drawing::Shape::StartPosition>
                     // without conversion to layout direction as below
-                    aRet = _getPropAtAggrObj( "StartPosition" );
+                    aRet = _getPropAtAggrObj( u"StartPosition"_ustr );
                 }
                 else if ( FN_SHAPE_ENDPOSITION_IN_HORI_L2R == pEntry->nWID )
                 {
                     // get property <::drawing::Shape::EndPosition>
                     // without conversion to layout direction as below
-                    aRet = _getPropAtAggrObj( "EndPosition" );
+                    aRet = _getPropAtAggrObj( u"EndPosition"_ustr );
                 }
                 else if (pEntry->nWID == RES_FRM_SIZE &&
                          (pEntry->nMemberId == MID_FRMSIZE_REL_HEIGHT ||
@@ -1692,7 +1692,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& 
rPropertyName)
                     {
                         // get property <::drawing::Shape::Transformation>
                         // without conversion to layout direction as below
-                        aRet = _getPropAtAggrObj( "Transformation" );
+                        aRet = _getPropAtAggrObj( u"Transformation"_ustr );
                     }
                     break;
                     case FN_SHAPE_POSITION_LAYOUT_DIR:
@@ -1705,14 +1705,14 @@ uno::Any SwXShape::getPropertyValue(const OUString& 
rPropertyName)
                     {
                         // get property <::drawing::Shape::StartPosition>
                         // without conversion to layout direction as below
-                        aRet = _getPropAtAggrObj( "StartPosition" );
+                        aRet = _getPropAtAggrObj( u"StartPosition"_ustr );
                     }
                     break;
                     case FN_SHAPE_ENDPOSITION_IN_HORI_L2R:
                     {
                         // get property <::drawing::Shape::StartPosition>
                         // without conversion to layout direction as below
-                        aRet = _getPropAtAggrObj( "EndPosition" );
+                        aRet = _getPropAtAggrObj( u"EndPosition"_ustr );
                     }
                     break;
                 }
@@ -2020,7 +2020,7 @@ void SwXShape::addPropertyChangeListener(
     const uno::Reference< beans::XPropertyChangeListener > & _listener )
 {
     if ( !m_xShapeAgg.is() )
-        throw uno::RuntimeException("no shape aggregate", *this );
+        throw uno::RuntimeException(u"no shape aggregate"_ustr, *this );
 
     // must be handled by the aggregate
     uno::Reference< beans::XPropertySet > xShapeProps;
@@ -2033,7 +2033,7 @@ void SwXShape::removePropertyChangeListener(
     const uno::Reference< beans::XPropertyChangeListener > & _listener)
 {
     if ( !m_xShapeAgg.is() )
-        throw uno::RuntimeException("no shape aggregate", *this );
+        throw uno::RuntimeException(u"no shape aggregate"_ustr, *this );
 
     // must be handled by the aggregate
     uno::Reference< beans::XPropertySet > xShapeProps;
@@ -2089,7 +2089,7 @@ void SwXShape::attach(const uno::Reference< 
text::XTextRange > & xTextRange)
         {
             uno::Any aPos;
             aPos <<= xTextRange;
-            setPropertyValue("TextRange", aPos);
+            setPropertyValue(u"TextRange"_ustr, aPos);
             uno::Reference< drawing::XShape > xTemp( getXWeak(), 
uno::UNO_QUERY );
             xDP->add( xTemp );
         }
@@ -2197,7 +2197,7 @@ void SwXShape::removeEventListener(
 
 OUString SwXShape::getImplementationName()
 {
-    return "SwXShape";
+    return u"SwXShape"_ustr;
 }
 
 sal_Bool SwXShape::supportsService(const OUString& rServiceName)
@@ -2404,9 +2404,9 @@ awt::Point SwXShape::GetAttrPosition()
 {
     awt::Point aAttrPos;
 
-    uno::Any aHoriPos( getPropertyValue("HoriOrientPosition") );
+    uno::Any aHoriPos( getPropertyValue(u"HoriOrientPosition"_ustr) );
     aHoriPos >>= aAttrPos.X;
-    uno::Any aVertPos( getPropertyValue("VertOrientPosition") );
+    uno::Any aVertPos( getPropertyValue(u"VertOrientPosition"_ustr) );
     aVertPos >>= aAttrPos.Y;
     // #i35798# - fallback, if attribute position is (0,0)
     // and no anchor position is applied to the drawing object
@@ -2429,7 +2429,7 @@ awt::Point SwXShape::GetAttrPosition()
     text::TextContentAnchorType eTextAnchorType =
                             text::TextContentAnchorType_AT_PARAGRAPH;
     {
-        uno::Any aAny = getPropertyValue( "AnchorType" );
+        uno::Any aAny = getPropertyValue( u"AnchorType"_ustr );
         aAny >>= eTextAnchorType;
     }
     if ( eTextAnchorType == text::TextContentAnchorType_AS_CHARACTER )
@@ -2558,7 +2558,7 @@ void SwXShape::AdjustPositionProperties( const 
awt::Point& rPosition )
     text::TextContentAnchorType eTextAnchorType =
                             text::TextContentAnchorType_AT_PARAGRAPH;
     {
-        uno::Any aAny = getPropertyValue( "AnchorType" );
+        uno::Any aAny = getPropertyValue( u"AnchorType"_ustr );
         aAny >>= eTextAnchorType;
     }
     if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER )
diff --git a/sw/source/core/unocore/unoevent.cxx 
b/sw/source/core/unocore/unoevent.cxx
index fa722b0e8e26..e9533dc8350d 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -102,7 +102,7 @@ SwHyperlinkEventDescriptor::~SwHyperlinkEventDescriptor()
 
 OUString SwHyperlinkEventDescriptor::getImplementationName()
 {
-    return "SwHyperlinkEventDescriptor";
+    return u"SwHyperlinkEventDescriptor"_ustr;
 }
 
 void SwHyperlinkEventDescriptor::copyMacrosFromINetFormat(
@@ -125,7 +125,7 @@ void SwHyperlinkEventDescriptor::copyMacrosIntoINetFormat(
         const SvMacroItemId nEvent = mpSupportedMacroItems[i].mnEvent;
         if (hasById(nEvent))
         {
-            SvxMacro aMacro("", "");
+            SvxMacro aMacro(u""_ustr, u""_ustr);
             getByName(aMacro, nEvent);
             aFormat.SetMacro(nEvent, aMacro);
         }
@@ -192,7 +192,7 @@ sal_uInt16 SwFrameEventDescriptor::getMacroItemWhich() const
 
 OUString SwFrameEventDescriptor::getImplementationName()
 {
-    return "SwFrameEventDescriptor";
+    return u"SwFrameEventDescriptor"_ustr;
 }
 
 SwFrameStyleEventDescriptor::SwFrameStyleEventDescriptor(
@@ -222,7 +222,7 @@ const SvxMacroItem& 
SwFrameStyleEventDescriptor::getMacroItem()
 
 OUString SwFrameStyleEventDescriptor::getImplementationName()
 {
-    return "SwFrameStyleEventDescriptor";
+    return u"SwFrameStyleEventDescriptor"_ustr;
 }
 
 sal_uInt16 SwFrameStyleEventDescriptor::getMacroItemWhich() const
diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index b3452890e0d2..aab9b5193646 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -460,7 +460,7 @@ protected:
 OUString SAL_CALL
 SwXFieldMaster::getImplementationName()
 {
-    return "SwXFieldMaster";
+    return u"SwXFieldMaster"_ustr;
 }
 
 namespace
@@ -503,7 +503,7 @@ sal_Bool SAL_CALL SwXFieldMaster::supportsService(const 
OUString& rServiceName)
 uno::Sequence< OUString > SAL_CALL
 SwXFieldMaster::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextFieldMaster", 
getServiceName(m_pImpl->m_nResTypeId) };
+    return { u"com.sun.star.text.TextFieldMaster"_ustr, 
getServiceName(m_pImpl->m_nResTypeId) };
 }
 
 SwXFieldMaster::SwXFieldMaster(SwDoc& rDoc, SwFieldIds const nResId)
@@ -668,7 +668,7 @@ void SAL_CALL SwXFieldMaster::setPropertyValue(
         }
         if (!pType2)
         {
-            throw uno::RuntimeException("no field type found!", *this);
+            throw uno::RuntimeException(u"no field type found!"_ustr, *this);
         }
         m_pImpl->SetFieldType(pType2);
     }
@@ -1938,7 +1938,7 @@ void SAL_CALL SwXTextField::attach(
         }
 
         if (!xField)
-            throw uno::RuntimeException("no SwField created?");
+            throw uno::RuntimeException(u"no SwField created?"_ustr);
 
         xField->SetAutomaticLanguage(!m_pImpl->m_pProps->bBool4);
         SwFormatField aFormat(*xField);
@@ -1973,7 +1973,7 @@ void SAL_CALL SwXTextField::attach(
 
         // What about updating the fields? (see fldmgr.cxx)
         if (!pTextAttr)
-            throw uno::RuntimeException("no SwTextAttr inserted?");  // could 
theoretically happen, if paragraph is full
+            throw uno::RuntimeException(u"no SwTextAttr inserted?"_ustr);  // 
could theoretically happen, if paragraph is full
 
         m_pImpl->ClearFieldType();
         const SwFormatField& rField = pTextAttr->GetFormatField();
@@ -2587,7 +2587,7 @@ void SAL_CALL SwXTextField::update()
 
 OUString SAL_CALL SwXTextField::getImplementationName()
 {
-    return "SwXTextField";
+    return u"SwXTextField"_ustr;
 }
 
 static OUString OldNameToNewName_Impl( const OUString &rOld )
@@ -2668,7 +2668,7 @@ const SwField* SwXTextField::Impl::GetField() const
 
 OUString SwXTextFieldMasters::getImplementationName()
 {
-    return "SwXTextFieldMasters";
+    return u"SwXTextFieldMasters"_ustr;
 }
 
 sal_Bool SwXTextFieldMasters::supportsService(const OUString& rServiceName)
@@ -2678,7 +2678,7 @@ sal_Bool SwXTextFieldMasters::supportsService(const 
OUString& rServiceName)
 
 uno::Sequence< OUString > SwXTextFieldMasters::getSupportedServiceNames()
 {
-    uno::Sequence<OUString> aRet { "com.sun.star.text.TextFieldMasters" };
+    uno::Sequence<OUString> aRet { u"com.sun.star.text.TextFieldMasters"_ustr 
};
     return aRet;
 }
 
@@ -2858,7 +2858,7 @@ public:
 
 OUString SwXTextFieldTypes::getImplementationName()
 {
-    return "SwXTextFieldTypes";
+    return u"SwXTextFieldTypes"_ustr;
 }
 
 sal_Bool SwXTextFieldTypes::supportsService(const OUString& rServiceName)
@@ -2868,7 +2868,7 @@ sal_Bool SwXTextFieldTypes::supportsService(const 
OUString& rServiceName)
 
 uno::Sequence< OUString > SwXTextFieldTypes::getSupportedServiceNames()
 {
-    uno::Sequence<OUString> aRet { "com.sun.star.text.TextFields" };
+    uno::Sequence<OUString> aRet { u"com.sun.star.text.TextFields"_ustr };
     return aRet;
 }
 
@@ -2964,7 +2964,7 @@ public:
 OUString SAL_CALL
 SwXFieldEnumeration::getImplementationName()
 {
-    return "SwXFieldEnumeration";
+    return u"SwXFieldEnumeration"_ustr;
 }
 
 sal_Bool SAL_CALL SwXFieldEnumeration::supportsService(const OUString& 
rServiceName)
@@ -2975,7 +2975,7 @@ sal_Bool SAL_CALL 
SwXFieldEnumeration::supportsService(const OUString& rServiceN
 uno::Sequence<OUString> SAL_CALL
 SwXFieldEnumeration::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.FieldEnumeration" };
+    return { u"com.sun.star.text.FieldEnumeration"_ustr };
 }
 
 SwXFieldEnumeration::SwXFieldEnumeration(SwDoc & rDoc)
@@ -3026,7 +3026,7 @@ uno::Any SAL_CALL SwXFieldEnumeration::nextElement()
 
     if (m_pImpl->m_nNextIndex >= 
static_cast<sal_Int32>(m_pImpl->m_Items.size()))
         throw container::NoSuchElementException(
-            "SwXFieldEnumeration::nextElement",
+            u"SwXFieldEnumeration::nextElement"_ustr,
             css::uno::Reference<css::uno::XInterface>());
 
     uno::Reference< text::XTextField >  &rxField =
diff --git a/sw/source/core/unocore/unoflatpara.cxx 
b/sw/source/core/unocore/unoflatpara.cxx
index 0f158e49fc82..e4fa19223519 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -82,10 +82,10 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL
 SwXFlatParagraph::getPropertySetInfo()
 {
     static const comphelper::PropertyMapEntry s_Entries[] = {
-        { OUString("FieldPositions"), -1, 
::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), 
beans::PropertyAttribute::READONLY, 0 },
-        { OUString("FootnotePositions"), -1, 
::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), 
beans::PropertyAttribute::READONLY, 0 },
-        { OUString("SortedTextId"), -1, ::cppu::UnoType<sal_Int32>::get(), 
beans::PropertyAttribute::READONLY, 0 },
-        { OUString("DocumentElementsCount"), -1, 
::cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::READONLY, 0 },
+        { u"FieldPositions"_ustr, -1, 
::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), 
beans::PropertyAttribute::READONLY, 0 },
+        { u"FootnotePositions"_ustr, -1, 
::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), 
beans::PropertyAttribute::READONLY, 0 },
+        { u"SortedTextId"_ustr, -1, ::cppu::UnoType<sal_Int32>::get(), 
beans::PropertyAttribute::READONLY, 0 },
+        { u"DocumentElementsCount"_ustr, -1, 
::cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::READONLY, 0 },
     };
     return new comphelper::PropertySetInfo(s_Entries);
 }
@@ -93,7 +93,7 @@ SwXFlatParagraph::getPropertySetInfo()
 void SAL_CALL
 SwXFlatParagraph::setPropertyValue(const OUString&, const uno::Any&)
 {
-    throw lang::IllegalArgumentException("no values can be set",
+    throw lang::IllegalArgumentException(u"no values can be set"_ustr,
             getXWeak(), 0);
 }
 
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index b45252fad8b9..524431d21e6c 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1192,7 +1192,7 @@ public:
 
 OUString SwXFrame::getImplementationName()
 {
-    return "SwXFrame";
+    return u"SwXFrame"_ustr;
 }
 
 sal_Bool SwXFrame::supportsService(const OUString& rServiceName)
@@ -1202,7 +1202,7 @@ sal_Bool SwXFrame::supportsService(const OUString& 
rServiceName)
 
 uno::Sequence< OUString > SwXFrame::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.BaseFrame", "com.sun.star.text.TextContent", 
"com.sun.star.document.LinkTarget" };
+    return { u"com.sun.star.text.BaseFrame"_ustr, 
u"com.sun.star.text.TextContent"_ustr, u"com.sun.star.document.LinkTarget"_ustr 
};
 }
 
 SwXFrame::SwXFrame(FlyCntType eSet, const ::SfxItemPropertySet* pSet, SwDoc 
*pDoc)
@@ -1226,7 +1226,7 @@ SwXFrame::SwXFrame(FlyCntType eSet, const 
::SfxItemPropertySet* pSet, SwDoc *pDo
     // Get the style families
     uno::Reference < XNameAccess > xFamilies = 
xFamilySupplier->getStyleFamilies();
     // Get the Frame family (and keep it for later)
-    const ::uno::Any aAny = xFamilies->getByName ("FrameStyles");
+    const ::uno::Any aAny = xFamilies->getByName (u"FrameStyles"_ustr);
     aAny >>= mxStyleFamily;
     // In the derived class, we'll ask mxStyleFamily for the relevant default 
style
     // mxStyleFamily is initialised in the SwXFrame constructor
@@ -1234,21 +1234,21 @@ SwXFrame::SwXFrame(FlyCntType eSet, const 
::SfxItemPropertySet* pSet, SwDoc *pDo
     {
         case FLYCNTTYPE_FRM:
         {
-            uno::Any aAny2 = mxStyleFamily->getByName ("Frame");
+            uno::Any aAny2 = mxStyleFamily->getByName (u"Frame"_ustr);
             aAny2 >>= mxStyleData;
             m_pProps.reset(new SwFrameProperties_Impl);
         }
         break;
         case FLYCNTTYPE_GRF:
         {
-            uno::Any aAny2 = mxStyleFamily->getByName ("Graphics");
+            uno::Any aAny2 = mxStyleFamily->getByName (u"Graphics"_ustr);
             aAny2 >>= mxStyleData;
             m_pProps.reset(new SwGraphicProperties_Impl);
         }
         break;
         case FLYCNTTYPE_OLE:
         {
-            uno::Any aAny2 = mxStyleFamily->getByName ("OLE");
+            uno::Any aAny2 = mxStyleFamily->getByName (u"OLE"_ustr);
             aAny2 >>= mxStyleData;
             m_pProps.reset(new SwOLEProperties_Impl);
         }
@@ -1327,7 +1327,7 @@ void SwXFrame::setName(const OUString& rName)
         
pFormat->GetDoc()->SetFlyName(static_cast<SwFlyFrameFormat&>(*pFormat), rName);
         if(pFormat->GetName() != rName)
         {
-            throw uno::RuntimeException("SwXFrame::setName(): Illegal object 
name. Duplicate name?");
+            throw uno::RuntimeException(u"SwXFrame::setName(): Illegal object 
name. Duplicate name?"_ustr);
         }
     }
     else if(m_bIsDescriptor)
@@ -1887,7 +1887,7 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
                     SwFrameFormat* pFlyFormat = pAnchorNode ? 
pAnchorNode->GetFlyFormat() : nullptr;
                     if(!pFlyFormat || pFlyFormat->Which() == RES_DRAWFRMFMT)
                     {
-                        throw lang::IllegalArgumentException("Anchor to frame: 
no frame found", nullptr, 0);
+                        throw lang::IllegalArgumentException(u"Anchor to 
frame: no frame found"_ustr, nullptr, 0);
                     }
                     else
                     {
@@ -1966,7 +1966,7 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
         }
         else if (FN_UNO_DRAW_ASPECT == pEntry->nWID)
         {
-            OUString sAspect = "";
+            OUString sAspect = u""_ustr;
             aValue >>= sAspect;
 
             if (sAspect == "Icon")
@@ -1976,13 +1976,13 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
         }
         else if (FN_UNO_VISIBLE_AREA_WIDTH == pEntry->nWID)
         {
-            OUString sAspect = "";
+            OUString sAspect = u""_ustr;
             aValue >>= sAspect;
             m_nVisibleAreaWidth = sAspect.toInt64();
         }
         else if (FN_UNO_VISIBLE_AREA_HEIGHT == pEntry->nWID)
         {
-            OUString sAspect = "";
+            OUString sAspect = u""_ustr;
             aValue >>= sAspect;
             m_nVisibleAreaHeight = sAspect.toInt64();
         }
@@ -2110,7 +2110,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& 
rPropertyName)
         }
         else if( FN_UNO_GRAPHIC_URL == pEntry->nWID )
         {
-            throw uno::RuntimeException("Getting from this property is not 
supported");
+            throw uno::RuntimeException(u"Getting from this property is not 
supported"_ustr);
         }
         else if( FN_UNO_GRAPHIC == pEntry->nWID )
         {
@@ -2961,7 +2961,7 @@ void 
SwXFrame::attachToRange(uno::Reference<text::XTextRange> const& xTextRange,
             {
                 if( !aClassName.MakeId( aCLSID ) )
                 {
-                    throw lang::IllegalArgumentException("CLSID invalid", 
nullptr, 0);
+                    throw lang::IllegalArgumentException(u"CLSID 
invalid"_ustr, nullptr, 0);
                 }
 
                 pCnt.reset( new comphelper::EmbeddedObjectContainer );
@@ -3170,7 +3170,7 @@ void SwXFrame::attach(const uno::Reference< 
text::XTextRange > & xTextRange)
     if (aAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR)
     {
         throw lang::IllegalArgumentException(
-                "SwXFrame::attach(): re-anchoring AS_CHAR not supported",
+                u"SwXFrame::attach(): re-anchoring AS_CHAR not supported"_ustr,
                 *this, 0);
     }
 
@@ -3181,17 +3181,17 @@ void SwXFrame::attach(const uno::Reference< 
text::XTextRange > & xTextRange)
 
 awt::Point SwXFrame::getPosition()
 {
-    throw uno::RuntimeException("position cannot be determined with this 
method");
+    throw uno::RuntimeException(u"position cannot be determined with this 
method"_ustr);
 }
 
 void SwXFrame::setPosition(const awt::Point& /*aPosition*/)
 {
-    throw uno::RuntimeException("position cannot be changed with this method");
+    throw uno::RuntimeException(u"position cannot be changed with this 
method"_ustr);
 }
 
 awt::Size SwXFrame::getSize()
 {
-    const ::uno::Any aVal = getPropertyValue("Size");
+    const ::uno::Any aVal = getPropertyValue(u"Size"_ustr);
     awt::Size const * pRet =  o3tl::doAccess<awt::Size>(aVal);
     return *pRet;
 }
@@ -3199,12 +3199,12 @@ awt::Size SwXFrame::getSize()
 void SwXFrame::setSize(const awt::Size& aSize)
 {
     const ::uno::Any aVal(&aSize, ::cppu::UnoType<awt::Size>::get());
-    setPropertyValue("Size", aVal);
+    setPropertyValue(u"Size"_ustr, aVal);
 }
 
 OUString SwXFrame::getShapeType()
 {
-    return "FrameShape";
+    return u"FrameShape"_ustr;
 }
 
 SwXTextFrame::SwXTextFrame( SwDoc *_pDoc ) :
@@ -3309,7 +3309,7 @@ rtl::Reference<SwXTextCursor>  
SwXTextFrame::createXTextCursor()
         aPam.GetPointNode().FindSttNodeByType(SwFlyStartNode);
     if(!pNewStartNode || pNewStartNode != pOwnStartNode)
     {
-        throw uno::RuntimeException("no text available");
+        throw uno::RuntimeException(u"no text available"_ustr);
     }
 
     return new SwXTextCursor(
@@ -3387,7 +3387,7 @@ void SwXTextFrame::removeEventListener(const 
uno::Reference< lang::XEventListene
 
 OUString SwXTextFrame::getImplementationName()
 {
-    return "SwXTextFrame";
+    return u"SwXTextFrame"_ustr;
 }
 
 sal_Bool SwXTextFrame::supportsService(const OUString& rServiceName)
@@ -3450,7 +3450,7 @@ SwXTextGraphicObject::CreateXTextGraphicObject(SwDoc & 
rDoc, SwFrameFormat *cons
 
 OUString SwXTextGraphicObject::getImplementationName()
 {
-    return "SwXTextGraphicObject";
+    return u"SwXTextGraphicObject"_ustr;
 }
 
 sal_Bool SwXTextGraphicObject::supportsService(const OUString& rServiceName)
@@ -3588,7 +3588,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
SwXTextEmbeddedObject::getReplaceme
 
 OUString SwXTextEmbeddedObject::getImplementationName()
 {
-    return "SwXTextEmbeddedObject";
+    return u"SwXTextEmbeddedObject"_ustr;
 }
 
 sal_Bool SwXTextEmbeddedObject::supportsService(const OUString& rServiceName)
diff --git a/sw/source/core/unocore/unoftn.cxx 
b/sw/source/core/unocore/unoftn.cxx
index c4412f8dea42..d20ff1a9e15a 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -90,7 +90,7 @@ public:
     SwFormatFootnote const& GetFootnoteFormatOrThrow() const {
         SwFormatFootnote const*const pFootnote( GetFootnoteFormat() );
         if (!pFootnote) {
-            throw uno::RuntimeException("SwXFootnote: disposed or invalid", 
nullptr);
+            throw uno::RuntimeException(u"SwXFootnote: disposed or 
invalid"_ustr, nullptr);
         }
         return *pFootnote;
     }
@@ -167,7 +167,7 @@ SwXFootnote::CreateXFootnote(SwDoc & rDoc, SwFormatFootnote 
*const pFootnoteForm
 OUString SAL_CALL
 SwXFootnote::getImplementationName()
 {
-    return "SwXFootnote";
+    return u"SwXFootnote"_ustr;
 }
 
 char const*const g_ServicesFootnote[] =
diff --git a/sw/source/core/unocore/unoidx.cxx 
b/sw/source/core/unocore/unoidx.cxx
index 56a8199ade2b..1cacb1ed3891 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -340,7 +340,7 @@ public:
         if (!pTOXSection)
         {
             throw uno::RuntimeException(
-                    "SwXDocumentIndex: disposed or invalid", nullptr);
+                    u"SwXDocumentIndex: disposed or invalid"_ustr, nullptr);
         }
         return *pTOXSection;
     }
@@ -428,7 +428,7 @@ SwXDocumentIndex::CreateXDocumentIndex(
 OUString SAL_CALL
 SwXDocumentIndex::getImplementationName()
 {
-    return "SwXDocumentIndex";
+    return u"SwXDocumentIndex"_ustr;
 }
 
 sal_Bool SAL_CALL
@@ -879,7 +879,7 @@ SwXDocumentIndex::getPropertyValue(const OUString& 
rPropertyName)
     // TODO: is this the best approach to tell API clients about the change?
     if (pEntry->nWID == RES_BACKGROUND && pEntry->nMemberId == MID_GRAPHIC_URL)
     {
-        throw uno::RuntimeException("Getting GraphicURL property is not 
supported");
+        throw uno::RuntimeException(u"Getting GraphicURL property is not 
supported"_ustr);
     }
 
     SwSectionFormat *const pSectionFormat( m_pImpl->GetSectionFormat() );
@@ -1271,7 +1271,7 @@ void SAL_CALL SwXDocumentIndex::refresh()
         if (!pTOXBase)
         {
             throw uno::RuntimeException(
-                    "SwXDocumentIndex::refresh: must be in attached state",
+                    u"SwXDocumentIndex::refresh: must be in attached 
state"_ustr,
                      getXWeak());
         }
         pTOXBase->Update(nullptr, 
m_pImpl->m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
@@ -1670,7 +1670,7 @@ namespace
 OUString SAL_CALL
 SwXDocumentIndexMark::getImplementationName()
 {
-    return "SwXDocumentIndexMark";
+    return u"SwXDocumentIndexMark"_ustr;
 }
 
 sal_Bool SAL_CALL SwXDocumentIndexMark::supportsService(const OUString& 
rServiceName)
@@ -1913,7 +1913,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
     // thus use a space - is this really the ideal solution?
     if (!bMark && rMark.GetAlternativeText().isEmpty())
     {
-        rMark.SetAlternativeText( " " );
+        rMark.SetAlternativeText( u" "_ustr );
     }
 
     const bool bForceExpandHints( !bMark && pTextCursor && 
pTextCursor->IsAtEndOfMeta() );
@@ -1935,7 +1935,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
     if (!pNewTextAttr)
     {
         throw uno::RuntimeException(
-            "SwXDocumentIndexMark::InsertTOXMark(): cannot insert attribute",
+            u"SwXDocumentIndexMark::InsertTOXMark(): cannot insert 
attribute"_ustr,
             nullptr);
     }
 
@@ -2320,7 +2320,7 @@ SwXDocumentIndexes::~SwXDocumentIndexes()
 OUString SAL_CALL
 SwXDocumentIndexes::getImplementationName()
 {
-    return "SwXDocumentIndexes";
+    return u"SwXDocumentIndexes"_ustr;
 }
 
 sal_Bool SAL_CALL SwXDocumentIndexes::supportsService(const OUString& 
rServiceName)
@@ -2331,7 +2331,7 @@ sal_Bool SAL_CALL 
SwXDocumentIndexes::supportsService(const OUString& rServiceNa
 uno::Sequence< OUString > SAL_CALL
 SwXDocumentIndexes::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.DocumentIndexes" };
+    return { u"com.sun.star.text.DocumentIndexes"_ustr };
 }
 
 sal_Int32 SAL_CALL
@@ -2486,7 +2486,7 @@ SwXDocumentIndex::StyleAccess_Impl::~StyleAccess_Impl()
 OUString SAL_CALL
 SwXDocumentIndex::StyleAccess_Impl::getImplementationName()
 {
-    return "SwXDocumentIndex::StyleAccess_Impl";
+    return u"SwXDocumentIndex::StyleAccess_Impl"_ustr;
 }
 
 sal_Bool SAL_CALL
@@ -2498,7 +2498,7 @@ SwXDocumentIndex::StyleAccess_Impl::supportsService(const 
OUString& rServiceName
 uno::Sequence< OUString > SAL_CALL
 SwXDocumentIndex::StyleAccess_Impl::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.DocumentIndexParagraphStyles" };
+    return { u"com.sun.star.text.DocumentIndexParagraphStyles"_ustr };
 }
 
 void SAL_CALL
@@ -2599,7 +2599,7 @@ SwXDocumentIndex::TokenAccess_Impl::~TokenAccess_Impl()
 OUString SAL_CALL
 SwXDocumentIndex::TokenAccess_Impl::getImplementationName()
 {
-    return "SwXDocumentIndex::TokenAccess_Impl";
+    return u"SwXDocumentIndex::TokenAccess_Impl"_ustr;
 }
 
 sal_Bool SAL_CALL SwXDocumentIndex::TokenAccess_Impl::supportsService(
@@ -2611,7 +2611,7 @@ sal_Bool SAL_CALL 
SwXDocumentIndex::TokenAccess_Impl::supportsService(
 uno::Sequence< OUString > SAL_CALL
 SwXDocumentIndex::TokenAccess_Impl::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.DocumentIndexLevelFormat" };
+    return { u"com.sun.star.text.DocumentIndexLevelFormat"_ustr };
 }
 
 namespace {
@@ -2766,7 +2766,7 @@ SwXDocumentIndex::TokenAccess_Impl::replaceByIndex(
                 pProperties[j].Value >>= nType;
                 if(nType < 0 || nType > text::BibliographyDataField::LOCAL_URL)
                 {
-                    throw 
lang::IllegalArgumentException("BibliographyDataField - wrong value", nullptr, 
j);
+                    throw 
lang::IllegalArgumentException(u"BibliographyDataField - wrong value"_ustr, 
nullptr, j);
                 }
                 aToken.nAuthorityField = nType;
             }
@@ -2885,7 +2885,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
 
                 pArr[nCurrentElement].Name = "TokenType";
                 pArr[nCurrentElement++].Value <<=
-                    OUString("TokenEntryNumber");
+                    u"TokenEntryNumber"_ustr;
 
                 pArr[nCurrentElement].Name = "CharacterStyleName";
                 pArr[nCurrentElement++].Value <<= aProgCharStyle;
@@ -2924,7 +2924,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
                 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
 
                 pArr[0].Name = "TokenType";
-                pArr[0].Value <<= OUString("TokenEntryText");
+                pArr[0].Value <<= u"TokenEntryText"_ustr;
 
                 pArr[1].Name = "CharacterStyleName";
                 pArr[1].Value <<= aProgCharStyle;
@@ -2936,7 +2936,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
                 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
 
                 pArr[0].Name = "TokenType";
-                pArr[0].Value <<= OUString("TokenTabStop");
+                pArr[0].Value <<= u"TokenTabStop"_ustr;
 
                 if(SvxTabAdjust::End == aToken.eTabAlign)
                 {
@@ -2966,7 +2966,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
                 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
 
                 pArr[0].Name = "TokenType";
-                pArr[0].Value <<= OUString("TokenText");
+                pArr[0].Value <<= u"TokenText"_ustr;
 
                 pArr[1].Name = "CharacterStyleName";
                 pArr[1].Value <<= aProgCharStyle;
@@ -2981,7 +2981,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
                 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
 
                 pArr[0].Name = "TokenType";
-                pArr[0].Value <<= OUString("TokenPageNumber");
+                pArr[0].Value <<= u"TokenPageNumber"_ustr;
 
                 pArr[1].Name = "CharacterStyleName";
                 pArr[1].Value <<= aProgCharStyle;
@@ -2993,7 +2993,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
                 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
 
                 pArr[0].Name = "TokenType";
-                pArr[0].Value <<= OUString("TokenChapterInfo");
+                pArr[0].Value <<= u"TokenChapterInfo"_ustr;
 
                 pArr[1].Name = "CharacterStyleName";
                 pArr[1].Value <<= aProgCharStyle;
@@ -3031,7 +3031,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
 
                 pArr[0].Name = "TokenType";
                 pArr[0].Value <<=
-                    OUString("TokenHyperlinkStart");
+                    u"TokenHyperlinkStart"_ustr;
                 pArr[1].Name = "CharacterStyleName";
                 pArr[1].Value <<= aProgCharStyle;
             }
@@ -3043,7 +3043,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
 
                 pArr[0].Name = "TokenType";
                 pArr[0].Value <<=
-                    OUString("TokenHyperlinkEnd");
+                    u"TokenHyperlinkEnd"_ustr;
             }
             break;
             case TOKEN_AUTHORITY:
@@ -3053,7 +3053,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 
nIndex)
 
                 pArr[0].Name = "TokenType";
                 pArr[0].Value <<=
-                    OUString("TokenBibliographyDataField");
+                    u"TokenBibliographyDataField"_ustr;
 
                 pArr[1].Name = "CharacterStyleName";
                 pArr[1].Value <<= aProgCharStyle;
diff --git a/sw/source/core/unocore/unolinebreak.cxx 
b/sw/source/core/unocore/unolinebreak.cxx
index 620bffb8fc41..71f2c47a7fe0 100644
--- a/sw/source/core/unocore/unolinebreak.cxx
+++ b/sw/source/core/unocore/unolinebreak.cxx
@@ -74,7 +74,7 @@ const SwFormatLineBreak& 
SwXLineBreak::Impl::GetLineBreakFormatOrThrow() const
     const SwFormatLineBreak* pLineBreak(GetLineBreakFormat());
     if (!pLineBreak)
     {
-        throw uno::RuntimeException("SwXLineBreak: disposed or invalid", 
nullptr);
+        throw uno::RuntimeException(u"SwXLineBreak: disposed or invalid"_ustr, 
nullptr);
     }
 
     return *pLineBreak;
@@ -126,7 +126,7 @@ rtl::Reference<SwXLineBreak> 
SwXLineBreak::CreateXLineBreak(SwFormatLineBreak* p
     return xLineBreak;
 }
 
-OUString SAL_CALL SwXLineBreak::getImplementationName() { return 
"SwXLineBreak"; }
+OUString SAL_CALL SwXLineBreak::getImplementationName() { return 
u"SwXLineBreak"_ustr; }
 
 sal_Bool SAL_CALL SwXLineBreak::supportsService(const OUString& rServiceName)
 {
@@ -135,7 +135,7 @@ sal_Bool SAL_CALL SwXLineBreak::supportsService(const 
OUString& rServiceName)
 
 uno::Sequence<OUString> SAL_CALL SwXLineBreak::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.LineBreak" };
+    return { u"com.sun.star.text.LineBreak"_ustr };
 }
 
 void SAL_CALL SwXLineBreak::attach(const uno::Reference<text::XTextRange>& 
xTextRange)
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index ee8645aab566..3fe6ef6d096b 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -497,7 +497,7 @@ SwUnoCursorHelper::SetCursorPropertyValue(
                     if (nLevel < 0 || MAXLEVEL <= nLevel)
                     {
                         throw lang::IllegalArgumentException(
-                            "invalid NumberingLevel", nullptr, 0);
+                            u"invalid NumberingLevel"_ustr, nullptr, 0);
                     }
                     pTextNd->SetAttrListLevel(nLevel);
                 }
@@ -950,7 +950,7 @@ bool SwXTextCursor::IsAtEndOfContentControl() const
 
 OUString SwXTextCursor::getImplementationName()
 {
-    return "SwXTextCursor";
+    return u"SwXTextCursor"_ustr;
 }
 
 sal_Bool SAL_CALL SwXTextCursor::supportsService(const OUString& rServiceName)
@@ -962,14 +962,14 @@ uno::Sequence< OUString > SAL_CALL
 SwXTextCursor::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextCursor",
-        "com.sun.star.style.CharacterProperties",
-        "com.sun.star.style.CharacterPropertiesAsian",
-        "com.sun.star.style.CharacterPropertiesComplex",
-        "com.sun.star.style.ParagraphProperties",
-        "com.sun.star.style.ParagraphPropertiesAsian",
-        "com.sun.star.style.ParagraphPropertiesComplex",
-        "com.sun.star.text.TextSortable"
+        u"com.sun.star.text.TextCursor"_ustr,
+        u"com.sun.star.style.CharacterProperties"_ustr,
+        u"com.sun.star.style.CharacterPropertiesAsian"_ustr,
+        u"com.sun.star.style.CharacterPropertiesComplex"_ustr,
+        u"com.sun.star.style.ParagraphProperties"_ustr,
+        u"com.sun.star.style.ParagraphPropertiesAsian"_ustr,
+        u"com.sun.star.style.ParagraphPropertiesComplex"_ustr,
+        u"com.sun.star.text.TextSortable"_ustr
     };
 }
 
@@ -1247,8 +1247,8 @@ SwXTextCursor::gotoRange(
         if (!bNotForced)
         {
             throw uno::RuntimeException(
-                "gotoRange: parameter range not contained in nesting"
-                    " text content for which this cursor was created",
+                u"gotoRange: parameter range not contained in nesting"
+                    " text content for which this cursor was created"_ustr,
                 static_cast<text::XWordCursor*>(this));
         }
     }
@@ -1257,7 +1257,7 @@ SwXTextCursor::gotoRange(
         SwPaM aPaM(*pPam->GetMark(), *pPam->GetPoint());
         if (!lcl_ForceIntoContentControl(aPaM, m_xParentText, 
CONTENT_CONTROL_CHECK_BOTH))
         {
-            throw uno::RuntimeException("gotoRange: xRange is out of bounds of 
the content control",
+            throw uno::RuntimeException(u"gotoRange: xRange is out of bounds 
of the content control"_ustr,
                                         static_cast<text::XWordCursor*>(this));
         }
     }
@@ -2730,19 +2730,19 @@ SwUnoCursorHelper::CreateSortDescriptor(const bool 
bFromTable)
 
     uno::Any aVal;
     aVal <<= bFromTable;
-    pArray[0] = beans::PropertyValue("IsSortInTable", -1, aVal,
+    pArray[0] = beans::PropertyValue(u"IsSortInTable"_ustr, -1, aVal,
                     beans::PropertyState_DIRECT_VALUE);
 
     aVal <<= u' ';
-    pArray[1] = beans::PropertyValue("Delimiter", -1, aVal,
+    pArray[1] = beans::PropertyValue(u"Delimiter"_ustr, -1, aVal,
                     beans::PropertyState_DIRECT_VALUE);
 
     aVal <<= false;
-    pArray[2] = beans::PropertyValue("IsSortColumns", -1, aVal,
+    pArray[2] = beans::PropertyValue(u"IsSortColumns"_ustr, -1, aVal,
                     beans::PropertyState_DIRECT_VALUE);
 
     aVal <<= sal_Int32(3);
-    pArray[3] = beans::PropertyValue("MaxSortFieldsCount", -1, aVal,
+    pArray[3] = beans::PropertyValue(u"MaxSortFieldsCount"_ustr, -1, aVal,
                     beans::PropertyState_DIRECT_VALUE);
 
     lang::Locale aLang( SvtSysLocale().GetLanguageTag().getLocale());
@@ -2766,7 +2766,7 @@ SwUnoCursorHelper::CreateSortDescriptor(const bool 
bFromTable)
     };
 
     aVal <<= aFields;
-    pArray[4] = beans::PropertyValue("SortFields", -1, aVal,
+    pArray[4] = beans::PropertyValue(u"SortFields"_ustr, -1, aVal,
                     beans::PropertyState_DIRECT_VALUE);
 
     return aRet;
@@ -3044,7 +3044,7 @@ SwXTextCursor::sort(const uno::Sequence< 
beans::PropertyValue >& rDescriptor)
     SwSortOptions aSortOpt;
     if (!SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt))
     {
-        throw uno::RuntimeException("Bad sort properties");
+        throw uno::RuntimeException(u"Bad sort properties"_ustr);
     }
     UnoActionContext aContext( &rUnoCursor.GetDoc() );
 
@@ -3124,7 +3124,7 @@ sal_Bool SAL_CALL SwXTextCursor::hasElements()
 uno::Sequence< OUString > SAL_CALL
 SwXTextCursor::getAvailableServiceNames()
 {
-    uno::Sequence<OUString> aRet { "com.sun.star.text.TextContent" };
+    uno::Sequence<OUString> aRet { u"com.sun.star.text.TextContent"_ustr };
     return aRet;
 }
 
diff --git a/sw/source/core/unocore/unoobj2.cxx 
b/sw/source/core/unocore/unoobj2.cxx
index 6104e7bb268c..b5a100b3f563 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -429,11 +429,11 @@ struct SwXParagraphEnumerationImpl final : public 
SwXParagraphEnumeration
 
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName() override
-        { return "SwXParagraphEnumeration"; }
+        { return u"SwXParagraphEnumeration"_ustr; }
     virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName) 
override
         { return cppu::supportsService(this, rServiceName); };
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override
-        { return {"com.sun.star.text.ParagraphEnumeration"}; };
+        { return {u"com.sun.star.text.ParagraphEnumeration"_ustr}; };
 
     // XEnumeration
     virtual sal_Bool SAL_CALL hasMoreElements() override;
@@ -814,7 +814,7 @@ void SwXTextRange::DeleteAndInsert(
     if (RANGE_IS_TABLE == m_pImpl->m_eRangePosition)
     {
         // setString on table not allowed
-        throw uno::RuntimeException("not possible for table");
+        throw uno::RuntimeException(u"not possible for table"_ustr);
     }
 
     const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent());
@@ -829,7 +829,7 @@ void SwXTextRange::DeleteAndInsert(
             nullptr;
         if (!pSectionNode)
         {
-            throw uno::RuntimeException("disposed?");
+            throw uno::RuntimeException(u"disposed?"_ustr);
         }
         m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, 
nullptr);
         SwNodeIndex const start(*pSectionNode);
@@ -915,7 +915,7 @@ void SwXTextRange::DeleteAndInsert(
 OUString SAL_CALL
 SwXTextRange::getImplementationName()
 {
-    return "SwXTextRange";
+    return u"SwXTextRange"_ustr;
 }
 
 sal_Bool SAL_CALL SwXTextRange::supportsService(const OUString& rServiceName)
@@ -927,13 +927,13 @@ uno::Sequence< OUString > SAL_CALL
 SwXTextRange::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextRange",
-        "com.sun.star.style.CharacterProperties",
-        "com.sun.star.style.CharacterPropertiesAsian",
-        "com.sun.star.style.CharacterPropertiesComplex",
-        "com.sun.star.style.ParagraphProperties",
-        "com.sun.star.style.ParagraphPropertiesAsian",
-        "com.sun.star.style.ParagraphPropertiesComplex"
+        u"com.sun.star.text.TextRange"_ustr,
+        u"com.sun.star.style.CharacterProperties"_ustr,
+        u"com.sun.star.style.CharacterPropertiesAsian"_ustr,
+        u"com.sun.star.style.CharacterPropertiesComplex"_ustr,
+        u"com.sun.star.style.ParagraphProperties"_ustr,
+        u"com.sun.star.style.ParagraphPropertiesAsian"_ustr,
+        u"com.sun.star.style.ParagraphPropertiesComplex"_ustr
     };
 }
 
@@ -996,7 +996,7 @@ SwXTextRange::getStart()
     }
     else
     {
-        throw uno::RuntimeException("disposed?");
+        throw uno::RuntimeException(u"disposed?"_ustr);
     }
     return xRet;
 }
@@ -1033,7 +1033,7 @@ SwXTextRange::getEnd()
     }
     else
     {
-        throw uno::RuntimeException("disposed?");
+        throw uno::RuntimeException(u"disposed?"_ustr);
     }
     return xRet;
 }
@@ -1364,18 +1364,18 @@ SwXTextRange::createContentEnumeration(const OUString& 
rServiceName)
 
     if ( rServiceName != "com.sun.star.text.TextContent" )
     {
-        throw uno::RuntimeException("unsupported service");
+        throw uno::RuntimeException(u"unsupported service"_ustr);
     }
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent());
     const auto pNewCursor(m_pImpl->m_rDoc.CreateUnoCursor(aPos));
     if (!GetPositions(*pNewCursor))
     {
-        throw uno::RuntimeException("range has no positions");
+        throw uno::RuntimeException(u"range has no positions"_ustr);
     }
 
     return SwXParaFrameEnumeration::Create(*pNewCursor, 
PARAFRAME_PORTION_TEXTRANGE);
@@ -1388,13 +1388,13 @@ SwXTextRange::createEnumeration()
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent());
     auto pNewCursor(m_pImpl->m_rDoc.CreateUnoCursor(aPos));
     if (!GetPositions(*pNewCursor))
     {
-        throw uno::RuntimeException("range has no positions");
+        throw uno::RuntimeException(u"range has no positions"_ustr);
     }
     if (!m_pImpl->m_xParentText.is())
     {
@@ -1419,7 +1419,7 @@ sal_Bool SAL_CALL SwXTextRange::hasElements()
 uno::Sequence< OUString > SAL_CALL
 SwXTextRange::getAvailableServiceNames()
 {
-    uno::Sequence<OUString> aRet { "com.sun.star.text.TextContent" };
+    uno::Sequence<OUString> aRet { u"com.sun.star.text.TextContent"_ustr };
     return aRet;
 }
 
@@ -1441,7 +1441,7 @@ SwXTextRange::setPropertyValue(
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     SwPaM aPaM(GetDoc().GetNodes());
     GetPositions(aPaM);
@@ -1456,7 +1456,7 @@ SwXTextRange::getPropertyValue(const OUString& 
rPropertyName)
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     SwPaM aPaM(GetDoc().GetNodes());
     GetPositions(aPaM);
@@ -1503,7 +1503,7 @@ SwXTextRange::getPropertyState(const OUString& 
rPropertyName)
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     SwPaM aPaM(GetDoc().GetNodes());
     GetPositions(aPaM);
@@ -1518,7 +1518,7 @@ SwXTextRange::getPropertyStates(const uno::Sequence< 
OUString >& rPropertyName)
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     SwPaM aPaM(GetDoc().GetNodes());
     GetPositions(aPaM);
@@ -1532,7 +1532,7 @@ void SAL_CALL SwXTextRange::setPropertyToDefault(const 
OUString& rPropertyName)
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     SwPaM aPaM(GetDoc().GetNodes());
     GetPositions(aPaM);
@@ -1547,7 +1547,7 @@ SwXTextRange::getPropertyDefault(const OUString& 
rPropertyName)
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     SwPaM aPaM(GetDoc().GetNodes());
     GetPositions(aPaM);
@@ -1564,7 +1564,7 @@ SwXTextRange::makeRedline(
 
     if (!m_pImpl->GetBookmark())
     {
-        throw uno::RuntimeException("range has no mark (table?)");
+        throw uno::RuntimeException(u"range has no mark (table?)"_ustr);
     }
     SwPaM aPaM(GetDoc().GetNodes());
     SwXTextRange::GetPositions(aPaM);
@@ -1578,11 +1578,11 @@ struct SwXTextRangesImpl final : public SwXTextRanges
 
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName() override
-        { return "SwXTextRanges"; };
+        { return u"SwXTextRanges"_ustr; };
     virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName) 
override
         { return cppu::supportsService(this, rServiceName); };
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override
-        { return { "com.sun.star.text.TextRanges" }; };
+        { return { u"com.sun.star.text.TextRanges"_ustr }; };
 
     // XElementAccess
     virtual css::uno::Type SAL_CALL getElementType() override
@@ -1685,11 +1685,11 @@ struct SwXParaFrameEnumerationImpl final : public 
SwXParaFrameEnumeration
 {
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName() override
-        { return "SwXParaFrameEnumeration"; };
+        { return u"SwXParaFrameEnumeration"_ustr; };
     virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) 
override
         { return cppu::supportsService(this, rServiceName); };
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override
-        { return {"com.sun.star.util.ContentEnumeration"}; };
+        { return {u"com.sun.star.util.ContentEnumeration"_ustr}; };
 
     // XEnumeration
     virtual sal_Bool SAL_CALL hasMoreElements() override;
diff --git a/sw/source/core/unocore/unoparagraph.cxx 
b/sw/source/core/unocore/unoparagraph.cxx
index 7e4f0d1e51ca..a11c98ed2bf3 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -149,7 +149,7 @@ public:
 
     SwTextNode& GetTextNodeOrThrow() {
         if (!m_pTextNode) {
-            throw uno::RuntimeException("SwXParagraph: disposed or invalid", 
nullptr);
+            throw uno::RuntimeException(u"SwXParagraph: disposed or 
invalid"_ustr, nullptr);
         }
         return *m_pTextNode;
     }
@@ -300,7 +300,7 @@ bool SwXParagraph::SelectPaM(SwPaM & rPaM)
 OUString SAL_CALL
 SwXParagraph::getImplementationName()
 {
-    return "SwXParagraph";
+    return u"SwXParagraph"_ustr;
 }
 
 sal_Bool SAL_CALL
@@ -313,14 +313,14 @@ uno::Sequence< OUString > SAL_CALL
 SwXParagraph::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextContent",
-        "com.sun.star.text.Paragraph",
-        "com.sun.star.style.CharacterProperties",
-        "com.sun.star.style.CharacterPropertiesAsian",
-        "com.sun.star.style.CharacterPropertiesComplex",
-        "com.sun.star.style.ParagraphProperties",
-        "com.sun.star.style.ParagraphPropertiesAsian",
-        "com.sun.star.style.ParagraphPropertiesComplex"
+        u"com.sun.star.text.TextContent"_ustr,
+        u"com.sun.star.text.Paragraph"_ustr,
+        u"com.sun.star.style.CharacterProperties"_ustr,
+        u"com.sun.star.style.CharacterPropertiesAsian"_ustr,
+        u"com.sun.star.style.CharacterPropertiesComplex"_ustr,
+        u"com.sun.star.style.ParagraphProperties"_ustr,
+        u"com.sun.star.style.ParagraphPropertiesAsian"_ustr,
+        u"com.sun.star.style.ParagraphPropertiesComplex"_ustr
     };
 }
 
@@ -407,7 +407,7 @@ void SAL_CALL SwXParagraph::setPropertyValues(
     const uno::Sequence< uno::Any >& rValues )
 {
     if (rPropertyNames.getLength() != rValues.getLength())
-        throw lang::IllegalArgumentException("lengths do not match",
+        throw lang::IllegalArgumentException(u"lengths do not match"_ustr,
                                              getXWeak(), -1);
 
     SolarMutexGuard aGuard;
@@ -606,13 +606,13 @@ SwXParagraph::getPropertyValues(const uno::Sequence< 
OUString >& rPropertyNames)
     catch (beans::UnknownPropertyException &)
     {
         css::uno::Any anyEx = cppu::getCaughtException();
-        throw css::lang::WrappedTargetRuntimeException("Unknown property 
exception caught",
+        throw css::lang::WrappedTargetRuntimeException(u"Unknown property 
exception caught"_ustr,
                 getXWeak(), anyEx );
     }
     catch (lang::WrappedTargetException &)
     {
         css::uno::Any anyEx = cppu::getCaughtException();
-        throw css::lang::WrappedTargetRuntimeException("WrappedTargetException 
caught",
+        throw 
css::lang::WrappedTargetRuntimeException(u"WrappedTargetException caught"_ustr,
                 getXWeak(), anyEx );
     }
 
@@ -1433,7 +1433,7 @@ SwXParagraph::createContentEnumeration(const OUString& 
rServiceName)
 uno::Sequence< OUString > SAL_CALL
 SwXParagraph::getAvailableServiceNames()
 {
-    uno::Sequence<OUString> aRet { "com.sun.star.text.TextContent" };
+    uno::Sequence<OUString> aRet { u"com.sun.star.text.TextContent"_ustr };
     return aRet;
 }
 
diff --git a/sw/source/core/unocore/unoport.cxx 
b/sw/source/core/unocore/unoport.cxx
index fc3ce34f4156..ce9f2bfb5698 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -447,7 +447,7 @@ void SwXTextPortion::SetPropertyValues_Impl(
     const uno::Sequence< uno::Any >& rValues )
 {
     if (rPropertyNames.getLength() != rValues.getLength())
-        throw lang::IllegalArgumentException("lengths do not match",
+        throw lang::IllegalArgumentException(u"lengths do not match"_ustr,
                                              getXWeak(), -1);
 
     SwUnoCursor& rUnoCursor = GetCursor();
@@ -508,13 +508,13 @@ uno::Sequence< uno::Any > 
SwXTextPortion::getPropertyValues(
     catch (beans::UnknownPropertyException &)
     {
         css::uno::Any anyEx = cppu::getCaughtException();
-        throw lang::WrappedTargetRuntimeException("Unknown property exception 
caught",
+        throw lang::WrappedTargetRuntimeException(u"Unknown property exception 
caught"_ustr,
                 getXWeak(), anyEx );
     }
     catch (lang::WrappedTargetException &)
     {
         css::uno::Any anyEx = cppu::getCaughtException();
-        throw lang::WrappedTargetRuntimeException("WrappedTargetException 
caught",
+        throw lang::WrappedTargetRuntimeException(u"WrappedTargetException 
caught"_ustr,
                 getXWeak(), anyEx );
     }
 
@@ -838,12 +838,12 @@ uno::Reference< container::XEnumeration >  
SwXTextPortion::createContentEnumerat
 
 uno::Sequence< OUString > SwXTextPortion::getAvailableServiceNames()
 {
-    return { "com.sun.star.text.TextContent" };
+    return { u"com.sun.star.text.TextContent"_ustr };
 }
 
 OUString SwXTextPortion::getImplementationName()
 {
-    return { "SwXTextPortion" };
+    return { u"SwXTextPortion"_ustr };
 }
 
 sal_Bool SwXTextPortion::supportsService(const OUString& rServiceName)
@@ -853,13 +853,13 @@ sal_Bool SwXTextPortion::supportsService(const OUString& 
rServiceName)
 
 uno::Sequence< OUString > SwXTextPortion::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextPortion",
-            "com.sun.star.style.CharacterProperties",
-            "com.sun.star.style.CharacterPropertiesAsian",
-            "com.sun.star.style.CharacterPropertiesComplex",
-            "com.sun.star.style.ParagraphProperties",
-            "com.sun.star.style.ParagraphPropertiesAsian",
-            "com.sun.star.style.ParagraphPropertiesComplex" };
+    return { u"com.sun.star.text.TextPortion"_ustr,
+            u"com.sun.star.style.CharacterProperties"_ustr,
+            u"com.sun.star.style.CharacterPropertiesAsian"_ustr,
+            u"com.sun.star.style.CharacterPropertiesComplex"_ustr,
+            u"com.sun.star.style.ParagraphProperties"_ustr,
+            u"com.sun.star.style.ParagraphPropertiesAsian"_ustr,
+            u"com.sun.star.style.ParagraphPropertiesComplex"_ustr };
 }
 
 void SwXTextPortion::Notify(const SfxHint& rHint)
diff --git a/sw/source/core/unocore/unoportenum.cxx 
b/sw/source/core/unocore/unoportenum.cxx
index 6bfebf8962dd..58657677429c 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -302,7 +302,7 @@ namespace
 
 OUString SwXTextPortionEnumeration::getImplementationName()
 {
-    return "SwXTextPortionEnumeration";
+    return u"SwXTextPortionEnumeration"_ustr;
 }
 
 sal_Bool
@@ -313,7 +313,7 @@ SwXTextPortionEnumeration::supportsService(const OUString& 
rServiceName)
 
 Sequence< OUString > SwXTextPortionEnumeration::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.TextPortionEnumeration" };
+    return { u"com.sun.star.text.TextPortionEnumeration"_ustr };
 }
 
 SwXTextPortionEnumeration::SwXTextPortionEnumeration(
diff --git a/sw/source/core/unocore/unoredline.cxx 
b/sw/source/core/unocore/unoredline.cxx
index 86c7d3da1154..27fd9aa7f555 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -121,8 +121,8 @@ rtl::Reference< SwXTextCursor > 
SwXRedlineText::createXTextCursor()
         // no content node outside of a table could be found, and therefore we
         // except.
         throw uno::RuntimeException(
-            "No content node found that is inside this change section "
-            "but outside of a table");
+            u"No content node found that is inside this change section "
+            "but outside of a table"_ustr);
     }
 
     return pXCursor;
diff --git a/sw/source/core/unocore/unoredlines.cxx 
b/sw/source/core/unocore/unoredlines.cxx
index 315513632d68..70f949a33f2f 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -85,7 +85,7 @@ sal_Bool SwXRedlines::hasElements(  )
 
 OUString SwXRedlines::getImplementationName()
 {
-    return "SwXRedlines";
+    return u"SwXRedlines"_ustr;
 }
 
 sal_Bool SwXRedlines::supportsService(const OUString& ServiceName)
@@ -140,7 +140,7 @@ uno::Any SwXRedlineEnumeration::nextElement()
 
 OUString SwXRedlineEnumeration::getImplementationName()
 {
-    return "SwXRedlineEnumeration";
+    return u"SwXRedlineEnumeration"_ustr;
 }
 
 sal_Bool SwXRedlineEnumeration::supportsService(const OUString& ServiceName)
diff --git a/sw/source/core/unocore/unorefmk.cxx 
b/sw/source/core/unocore/unorefmk.cxx
index 43b0690ecb08..b5aa314be008 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -147,7 +147,7 @@ SwXReferenceMark::CreateXReferenceMark(
 
 OUString SAL_CALL SwXReferenceMark::getImplementationName()
 {
-    return "SwXReferenceMark";
+    return u"SwXReferenceMark"_ustr;
 }
 
 sal_Bool SAL_CALL
@@ -160,8 +160,8 @@ uno::Sequence< OUString > SAL_CALL
 SwXReferenceMark::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextContent",
-        "com.sun.star.text.ReferenceMark"
+        u"com.sun.star.text.TextContent"_ustr,
+        u"com.sun.star.text.ReferenceMark"_ustr
     };
 }
 
@@ -241,7 +241,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
     if (!pTextAttr)
     {
         throw uno::RuntimeException(
-            "SwXReferenceMark::InsertRefMark(): cannot insert attribute", 
nullptr);
+            u"SwXReferenceMark::InsertRefMark(): cannot insert 
attribute"_ustr, nullptr);
     }
 
     m_pMarkFormat = &pTextAttr->GetRefMark();
@@ -759,8 +759,8 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, 
const bool bAbsorb)
     if (&pStartPos->GetNode() != pTextNode)
     {
         throw lang::IllegalArgumentException(
-            "trying to insert into a nesting text content, but start "
-                "of text range not in same paragraph as text content",
+            u"trying to insert into a nesting text content, but start "
+                "of text range not in same paragraph as text content"_ustr,
                 nullptr, 0);
     }
     bool bForceExpandHints(false);
@@ -770,8 +770,8 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, 
const bool bAbsorb)
     if ((nStartPos < nMetaStart) || (nStartPos > nMetaEnd))
     {
         throw lang::IllegalArgumentException(
-            "trying to insert into a nesting text content, but start "
-                "of text range not inside text content",
+            u"trying to insert into a nesting text content, but start "
+                "of text range not inside text content"_ustr,
                 nullptr, 0);
     }
     else if (nStartPos == nMetaEnd)
@@ -784,8 +784,8 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, 
const bool bAbsorb)
         if (&pEndPos->GetNode() != pTextNode)
         {
             throw lang::IllegalArgumentException(
-                "trying to insert into a nesting text content, but end "
-                    "of text range not in same paragraph as text content",
+                u"trying to insert into a nesting text content, but end "
+                    "of text range not in same paragraph as text content"_ustr,
                     nullptr, 0);
         }
         const sal_Int32 nEndPos(pEndPos->GetContentIndex());
@@ -794,8 +794,8 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, 
const bool bAbsorb)
         if ((nEndPos < nMetaStart) || (nEndPos > nMetaEnd))
         {
             throw lang::IllegalArgumentException(
-                "trying to insert into a nesting text content, but end "
-                    "of text range not inside text content",
+                u"trying to insert into a nesting text content, but end "
+                    "of text range not inside text content"_ustr,
                     nullptr, 0);
         }
         else if (nEndPos == nMetaEnd)
@@ -810,7 +810,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, 
const bool bAbsorb)
 OUString SAL_CALL
 SwXMeta::getImplementationName()
 {
-    return "SwXMeta";
+    return u"SwXMeta"_ustr;
 }
 
 sal_Bool SAL_CALL
@@ -823,8 +823,8 @@ uno::Sequence< OUString > SAL_CALL
 SwXMeta::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextContent",
-        "com.sun.star.text.InContentMetadata"
+        u"com.sun.star.text.TextContent"_ustr,
+        u"com.sun.star.text.InContentMetadata"_ustr
     };
 }
 
@@ -894,7 +894,7 @@ SwXMeta::AttachImpl(const uno::Reference< text::XTextRange 
> & i_xTextRange,
     if (!m_pImpl->m_bIsDescriptor)
     {
         throw uno::RuntimeException(
-            "SwXMeta::attach(): already attached",
+            u"SwXMeta::attach(): already attached"_ustr,
             getXWeak());
     }
 
@@ -903,7 +903,7 @@ SwXMeta::AttachImpl(const uno::Reference< text::XTextRange 
> & i_xTextRange,
     if (!pRange && !pCursor)
     {
         throw lang::IllegalArgumentException(
-            "SwXMeta::attach(): argument not supported type",
+            u"SwXMeta::attach(): argument not supported type"_ustr,
             getXWeak(), 0);
     }
 
@@ -912,7 +912,7 @@ SwXMeta::AttachImpl(const uno::Reference< text::XTextRange 
> & i_xTextRange,
     if (!pDoc)
     {
         throw lang::IllegalArgumentException(
-            "SwXMeta::attach(): argument has no SwDoc",
+            u"SwXMeta::attach(): argument has no SwDoc"_ustr,
             getXWeak(), 0);
     }
 
@@ -939,14 +939,14 @@ SwXMeta::AttachImpl(const uno::Reference< 
text::XTextRange > & i_xTextRange,
     if (!bSuccess)
     {
         throw lang::IllegalArgumentException(
-            "SwXMeta::attach(): cannot create meta: range invalid?",
+            u"SwXMeta::attach(): cannot create meta: range invalid?"_ustr,
             getXWeak(), 1);
     }
     if (!pTextAttr)
     {
         OSL_FAIL("meta inserted, but has no text attribute?");
         throw uno::RuntimeException(
-            "SwXMeta::attach(): cannot create meta",
+            u"SwXMeta::attach(): cannot create meta"_ustr,
             getXWeak());
     }
 
@@ -979,7 +979,7 @@ SwXMeta::getAnchor()
     if (m_pImpl->m_bIsDescriptor)
     {
         throw uno::RuntimeException(
-                "SwXMeta::getAnchor(): not inserted",
+                u"SwXMeta::getAnchor(): not inserted"_ustr,
                 getXWeak());
     }
 
@@ -991,7 +991,7 @@ SwXMeta::getAnchor()
     if (!bSuccess)
     {
         throw lang::DisposedException(
-                "SwXMeta::getAnchor(): not attached",
+                u"SwXMeta::getAnchor(): not attached"_ustr,
                 getXWeak());
     }
 
@@ -1108,7 +1108,7 @@ SwXMeta::getParent()
 void SAL_CALL
 SwXMeta::setParent(uno::Reference< uno::XInterface > const& /*xParent*/)
 {
-    throw lang::NoSupportException("setting parent not supported", *this);
+    throw lang::NoSupportException(u"setting parent not supported"_ustr, 
*this);
 }
 
 // XElementAccess
@@ -1137,7 +1137,7 @@ SwXMeta::createEnumeration()
     if (m_pImpl->m_bIsDescriptor)
     {
         throw uno::RuntimeException(
-                "createEnumeration(): not inserted",
+                u"createEnumeration(): not inserted"_ustr,
                 getXWeak());
     }
 
@@ -1209,7 +1209,7 @@ SwXMetaField::~SwXMetaField()
 OUString SAL_CALL
 SwXMetaField::getImplementationName()
 {
-    return "SwXMetaField";
+    return u"SwXMetaField"_ustr;
 }
 
 sal_Bool SAL_CALL
@@ -1222,9 +1222,9 @@ uno::Sequence< OUString > SAL_CALL
 SwXMetaField::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextContent",
-        "com.sun.star.text.TextField",
-        "com.sun.star.text.textfield.MetadataField"
+        u"com.sun.star.text.TextContent"_ustr,
+        u"com.sun.star.text.TextField"_ustr,
+        u"com.sun.star.text.textfield.MetadataField"_ustr
     };
 }
 
@@ -1446,7 +1446,7 @@ getPrefixAndSuffix(
         throw;
     } catch (const uno::Exception &) {
         css::uno::Any anyEx = cppu::getCaughtException();
-        throw lang::WrappedTargetRuntimeException("getPrefixAndSuffix: 
exception", nullptr, anyEx);
+        throw lang::WrappedTargetRuntimeException(u"getPrefixAndSuffix: 
exception"_ustr, nullptr, anyEx);
     }
 }
 
diff --git a/sw/source/core/unocore/unosect.cxx 
b/sw/source/core/unocore/unosect.cxx
index d7d3d79e56d6..5f48f9580bc4 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -148,7 +148,7 @@ public:
     SwSectionFormat & GetSectionFormatOrThrow() const {
         SwSectionFormat *const pFormat( GetSectionFormat() );
         if (!pFormat) {
-            throw uno::RuntimeException("SwXTextSection: disposed or invalid", 
nullptr);
+            throw uno::RuntimeException(u"SwXTextSection: disposed or 
invalid"_ustr, nullptr);
         }
         return *pFormat;
     }
@@ -388,7 +388,7 @@ SwXTextSection::attach(const uno::Reference< 
text::XTextRange > & xTextRange)
         // shouldn't have created an undo object yet
         pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSSECTION, nullptr );
         throw lang::IllegalArgumentException(
-                "SwXTextSection::attach(): invalid TextRange",
+                u"SwXTextSection::attach(): invalid TextRange"_ustr,
                 getXWeak(), 0);
     }
     m_pImpl->Attach(pRet->GetFormat());
@@ -946,7 +946,7 @@ SwXTextSection::Impl::GetPropertyValues_Impl(
     SwSectionFormat *const pFormat = GetSectionFormat();
     if (!pFormat && !m_bIsDescriptor)
     {
-        throw uno::RuntimeException( "non-descriptor section without format");
+        throw uno::RuntimeException( u"non-descriptor section without 
format"_ustr);
     }
 
     uno::Sequence< uno::Any > aRet(rPropertyNames.getLength());
@@ -1259,13 +1259,13 @@ SwXTextSection::getPropertyValues(
     catch (beans::UnknownPropertyException &)
     {
         css::uno::Any anyEx = cppu::getCaughtException();
-        throw lang::WrappedTargetRuntimeException("Unknown property exception 
caught",
+        throw lang::WrappedTargetRuntimeException(u"Unknown property exception 
caught"_ustr,
                 getXWeak(), anyEx );
     }
     catch (lang::WrappedTargetException &)
     {
         css::uno::Any anyEx = cppu::getCaughtException();
-        throw lang::WrappedTargetRuntimeException("WrappedTargetException 
caught",
+        throw lang::WrappedTargetRuntimeException(u"WrappedTargetException 
caught"_ustr,
                 getXWeak(), anyEx );
     }
 
@@ -1692,7 +1692,7 @@ void SAL_CALL SwXTextSection::setName(const OUString& 
rName)
 OUString SAL_CALL
 SwXTextSection::getImplementationName()
 {
-    return "SwXTextSection";
+    return u"SwXTextSection"_ustr;
 }
 
 sal_Bool SAL_CALL SwXTextSection::supportsService(const OUString& rServiceName)
@@ -1704,9 +1704,9 @@ uno::Sequence< OUString > SAL_CALL
 SwXTextSection::getSupportedServiceNames()
 {
     return {
-        "com.sun.star.text.TextContent",
-        "com.sun.star.text.TextSection",
-        "com.sun.star.document.LinkTarget"
+        u"com.sun.star.text.TextContent"_ustr,
+        u"com.sun.star.text.TextSection"_ustr,
+        u"com.sun.star.document.LinkTarget"_ustr
     };
 }
 
diff --git a/sw/source/core/unocore/unosett.cxx 
b/sw/source/core/unocore/unosett.cxx
index c57c6ffe9d18..56edf4f8c840 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -248,7 +248,7 @@ const o3tl::enumarray<SvxAdjust, sal_Int16> aSvxToUnoAdjust
 
 OUString SwXFootnoteProperties::getImplementationName()
 {
-    return "SwXFootnoteProperties";
+    return u"SwXFootnoteProperties"_ustr;
 }
 
 sal_Bool SwXFootnoteProperties::supportsService(const OUString& rServiceName)
@@ -258,7 +258,7 @@ sal_Bool SwXFootnoteProperties::supportsService(const 
OUString& rServiceName)
 
 Sequence< OUString > SwXFootnoteProperties::getSupportedServiceNames()
 {
-    Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
+    Sequence<OUString> aRet { u"com.sun.star.text.FootnoteSettings"_ustr };
     return aRet;
 }
 
@@ -528,7 +528,7 @@ void SwXFootnoteProperties::removeVetoableChangeListener(
 
 OUString SwXEndnoteProperties::getImplementationName()
 {
-    return "SwXEndnoteProperties";
+    return u"SwXEndnoteProperties"_ustr;
 }
 
 sal_Bool SwXEndnoteProperties::supportsService(const OUString& rServiceName)
@@ -538,7 +538,7 @@ sal_Bool SwXEndnoteProperties::supportsService(const 
OUString& rServiceName)
 
 Sequence< OUString > SwXEndnoteProperties::getSupportedServiceNames()
 {
-    Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
+    Sequence<OUString> aRet { u"com.sun.star.text.FootnoteSettings"_ustr };
     return aRet;
 }
 
@@ -730,7 +730,7 @@ void 
SwXEndnoteProperties::removeVetoableChangeListener(const OUString& /*Proper
 
 OUString SwXLineNumberingProperties::getImplementationName()
 {
-    return "SwXLineNumberingProperties";
+    return u"SwXLineNumberingProperties"_ustr;
 }
 
 sal_Bool SwXLineNumberingProperties::supportsService(const OUString& 
rServiceName)
@@ -740,7 +740,7 @@ sal_Bool SwXLineNumberingProperties::supportsService(const 
OUString& rServiceNam
 
 Sequence< OUString > SwXLineNumberingProperties::getSupportedServiceNames()
 {
-e 
... etc. - the rest is truncated

Reply via email to