sw/source/core/access/AccessibilityCheck.cxx |   29 +++++++++++++--------------
 sw/source/core/access/AccessibilityIssue.cxx |   12 +++++------
 sw/source/core/access/acccell.cxx            |    2 -
 sw/source/core/access/acccontext.cxx         |   12 +++++------
 sw/source/core/access/accdoc.cxx             |   12 +++++------
 sw/source/core/access/accembedded.cxx        |    2 -
 sw/source/core/access/accfootnote.cxx        |    2 -
 sw/source/core/access/accgraphic.cxx         |    4 +--
 sw/source/core/access/accheaderfooter.cxx    |    2 -
 sw/source/core/access/acchyperlink.cxx       |    2 -
 sw/source/core/access/accpage.cxx            |    2 -
 sw/source/core/access/accpara.cxx            |   16 +++++++-------
 sw/source/core/access/accpreview.cxx         |    2 -
 sw/source/core/access/accselectionhelper.cxx |    2 -
 sw/source/core/access/acctable.cxx           |    6 ++---
 sw/source/core/access/acctextframe.cxx       |    4 +--
 16 files changed, 56 insertions(+), 55 deletions(-)

New commits:
commit 9312f954b6d636f232a72e35aa2767e450690793
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 20 09:14:32 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon May 20 12:29:03 2024 +0200

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

diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index a1fed7c1ffd1..ae767b597698 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -373,11 +373,11 @@ private:
                         sal_Int32 nStart)
     {
         uno::Reference<beans::XPropertySet> xProperties(xTextRange, 
uno::UNO_QUERY);
-        if 
(!xProperties->getPropertySetInfo()->hasPropertyByName("HyperLinkURL"))
+        if 
(!xProperties->getPropertySetInfo()->hasPropertyByName(u"HyperLinkURL"_ustr))
             return;
 
         OUString sHyperlink;
-        xProperties->getPropertyValue("HyperLinkURL") >>= sHyperlink;
+        xProperties->getPropertyValue(u"HyperLinkURL"_ustr) >>= sHyperlink;
         if (!sHyperlink.isEmpty())
         {
             OUString sText = xTextRange->getString();
@@ -485,7 +485,7 @@ private:
 
         Color nParaBackColor(COL_AUTO);
         uno::Reference<beans::XPropertySet> xParagraphProperties(xParagraph, 
uno::UNO_QUERY);
-        if (!(xParagraphProperties->getPropertyValue("ParaBackColor") >>= 
nParaBackColor))
+        if (!(xParagraphProperties->getPropertyValue(u"ParaBackColor"_ustr) 
>>= nParaBackColor))
         {
             SAL_WARN("sw.a11y", "ParaBackColor void");
             return;
@@ -497,7 +497,7 @@ private:
 
         // Foreground color
         sal_Int32 nCharColor = {}; // spurious -Werror=maybe-uninitialized
-        if (!(xProperties->getPropertyValue("CharColor") >>= nCharColor))
+        if (!(xProperties->getPropertyValue(u"CharColor"_ustr) >>= nCharColor))
         { // not sure this is impossible, can the default be void?
             SAL_WARN("sw.a11y", "CharColor void");
             return;
@@ -522,7 +522,7 @@ private:
 
         Color nCharBackColor(COL_AUTO);
 
-        if (!(xProperties->getPropertyValue("CharBackColor") >>= 
nCharBackColor))
+        if (!(xProperties->getPropertyValue(u"CharBackColor"_ustr) >>= 
nCharBackColor))
         {
             SAL_WARN("sw.a11y", "CharBackColor void");
             return;
@@ -538,7 +538,7 @@ private:
         {
             OUString sCharStyleName;
             Color nCharStyleBackColor(COL_AUTO);
-            if (xProperties->getPropertyValue("CharStyleName") >>= 
sCharStyleName)
+            if (xProperties->getPropertyValue(u"CharStyleName"_ustr) >>= 
sCharStyleName)
             {
                 try
                 {
@@ -547,10 +547,10 @@ private:
                     uno::Reference<container::XNameAccess> xCont
                         = xStyleFamiliesSupplier->getStyleFamilies();
                     uno::Reference<container::XNameAccess> xStyleFamily(
-                        xCont->getByName("CharacterStyles"), uno::UNO_QUERY);
+                        xCont->getByName(u"CharacterStyles"_ustr), 
uno::UNO_QUERY);
                     uno::Reference<beans::XPropertySet> xInfo(
                         xStyleFamily->getByName(sCharStyleName), 
uno::UNO_QUERY);
-                    xInfo->getPropertyValue("CharBackColor") >>= 
nCharStyleBackColor;
+                    xInfo->getPropertyValue(u"CharBackColor"_ustr) >>= 
nCharStyleBackColor;
                 }
                 catch (const uno::Exception&)
                 {
@@ -1095,10 +1095,11 @@ private:
                         sal_Int32 nStart)
     {
         uno::Reference<beans::XPropertySet> xProperties(xTextRange, 
uno::UNO_QUERY);
-        if (xProperties.is() && 
xProperties->getPropertySetInfo()->hasPropertyByName("CharFlash"))
+        if (xProperties.is()
+            && 
xProperties->getPropertySetInfo()->hasPropertyByName(u"CharFlash"_ustr))
         {
             bool bBlinking = false;
-            xProperties->getPropertyValue("CharFlash") >>= bBlinking;
+            xProperties->getPropertyValue(u"CharFlash"_ustr) >>= bBlinking;
 
             if (bBlinking)
             {
@@ -1529,8 +1530,8 @@ public:
             return;
         uno::Reference<container::XNameAccess> xStyleFamilies
             = xStyleFamiliesSupplier->getStyleFamilies();
-        uno::Reference<container::XNameAccess> 
xStyleFamily(xStyleFamilies->getByName("PageStyles"),
-                                                            uno::UNO_QUERY);
+        uno::Reference<container::XNameAccess> xStyleFamily(
+            xStyleFamilies->getByName(u"PageStyles"_ustr), uno::UNO_QUERY);
         if (!xStyleFamily.is())
             return;
         const uno::Sequence<OUString>& xStyleFamilyNames = 
xStyleFamily->getElementNames();
@@ -1540,7 +1541,7 @@ public:
                 xStyleFamily->getByName(rStyleFamilyName), uno::UNO_QUERY);
             if (!xPropertySet.is())
                 continue;
-            auto aFillStyleContainer = 
xPropertySet->getPropertyValue("FillStyle");
+            auto aFillStyleContainer = 
xPropertySet->getPropertyValue(u"FillStyle"_ustr);
             if (aFillStyleContainer.has<drawing::FillStyle>())
             {
                 drawing::FillStyle aFillStyle = 
aFillStyleContainer.get<drawing::FillStyle>();
@@ -1572,7 +1573,7 @@ void AccessibilityCheck::checkObject(SwNode* pCurrent, 
SdrObject* pObject)
         const SdrCustomShapeGeometryItem& rGeometryItem
             = pCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
 
-        if (const uno::Any* pAny = 
rGeometryItem.GetPropertyValueByName("Type"))
+        if (const uno::Any* pAny = 
rGeometryItem.GetPropertyValueByName(u"Type"_ustr))
             if (pAny->get<OUString>().startsWith("fontwork-"))
                 lclAddIssue(m_aIssueCollection, SwResId(STR_FONTWORKS));
     }
diff --git a/sw/source/core/access/AccessibilityIssue.cxx 
b/sw/source/core/access/AccessibilityIssue.cxx
index 118452543f97..1755023fb210 100644
--- a/sw/source/core/access/AccessibilityIssue.cxx
+++ b/sw/source/core/access/AccessibilityIssue.cxx
@@ -351,7 +351,7 @@ void AccessibilityIssue::quickFixIssue() const
             uno::Reference<frame::XModel> 
xModel(m_pDoc->GetDocShell()->GetModel(),
                                                  uno::UNO_QUERY_THROW);
 
-            comphelper::dispatchCommand(".uno:PageAreaDialog",
+            comphelper::dispatchCommand(u".uno:PageAreaDialog"_ustr,
                                         
xModel->getCurrentController()->getFrame(), {});
         }
         break;
@@ -364,19 +364,19 @@ void AccessibilityIssue::quickFixIssue() const
             {
                 // open the dialog "Tools/Options/Languages and Locales - 
General"
                 uno::Sequence<beans::PropertyValue> aArgs{ 
comphelper::makePropertyValue(
-                    "Language", OUString("*")) };
+                    u"Language"_ustr, u"*"_ustr) };
 
-                comphelper::dispatchCommand(".uno:LanguageStatus",
+                comphelper::dispatchCommand(u".uno:LanguageStatus"_ustr,
                                             
xModel->getCurrentController()->getFrame(), aArgs);
             }
             else
             {
                 uno::Sequence<beans::PropertyValue> aArgs{
-                    comphelper::makePropertyValue("Param", m_sObjectID),
-                    comphelper::makePropertyValue("Family", 
sal_Int16(SfxStyleFamily::Para))
+                    comphelper::makePropertyValue(u"Param"_ustr, m_sObjectID),
+                    comphelper::makePropertyValue(u"Family"_ustr, 
sal_Int16(SfxStyleFamily::Para))
                 };
 
-                comphelper::dispatchCommand(".uno:EditStyleFont",
+                comphelper::dispatchCommand(u".uno:EditStyleFont"_ustr,
                                             
xModel->getCurrentController()->getFrame(), aArgs);
             }
         }
diff --git a/sw/source/core/access/acccell.cxx 
b/sw/source/core/access/acccell.cxx
index 0cffe02d1e04..fe58dfc07e43 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -248,7 +248,7 @@ sal_Bool SAL_CALL SwAccessibleCell::supportsService(const 
OUString& sTestService
 
 uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames()
 {
-    return { "com.sun.star.table.AccessibleCellView", sAccessibleServiceName };
+    return { u"com.sun.star.table.AccessibleCellView"_ustr, 
sAccessibleServiceName };
 }
 
 void SwAccessibleCell::Dispose(bool bRecursive, bool bCanSkipInvisible)
diff --git a/sw/source/core/access/acccontext.cxx 
b/sw/source/core/access/acccontext.cxx
index 46c4f4a825c7..a1bd69b3711f 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -528,7 +528,7 @@ void SwAccessibleContext::ThrowIfDisposed()
 {
     if (IsDisposed())
     {
-        throw lang::DisposedException("object is nonfunctional",
+        throw lang::DisposedException(u"object is nonfunctional"_ustr,
                 getXWeak());
     }
 }
@@ -594,7 +594,7 @@ uno::Reference< XAccessible> SAL_CALL
     {
         uno::Reference < XAccessibleContext > xThis( this );
         lang::IndexOutOfBoundsException aExcept(
-                "index out of bounds",
+                u"index out of bounds"_ustr,
                 xThis );
         throw aExcept;
     }
@@ -828,7 +828,7 @@ uno::Reference< XAccessible > SAL_CALL 
SwAccessibleContext::getAccessibleAtPoint
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to parent
@@ -887,11 +887,11 @@ awt::Rectangle SwAccessibleContext::getBoundsImpl(bool 
bRelative)
 
     if (!pParent)
     {
-        throw uno::RuntimeException("no Parent", getXWeak());
+        throw uno::RuntimeException(u"no Parent"_ustr, getXWeak());
     }
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip 
relative to document root
@@ -947,7 +947,7 @@ awt::Point SAL_CALL 
SwAccessibleContext::getLocationOnScreen()
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     AbsoluteScreenPixelPoint aPixPosAbs = 
pWin->OutputToAbsoluteScreenPixel(aPixPos);
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index a1cf511b8bcf..8bad1e5c5f06 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -227,7 +227,7 @@ awt::Rectangle SAL_CALL 
SwAccessibleDocumentBase::getBounds()
         vcl::Window *pWin = GetWindow();
         if (!pWin)
         {
-            throw uno::RuntimeException("no Window", getXWeak());
+            throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
         }
 
         tools::Rectangle aPixBounds( pWin->GetWindowExtentsRelative( 
*pWin->GetAccessibleParentWindow() ) );
@@ -249,7 +249,7 @@ awt::Point SAL_CALL SwAccessibleDocumentBase::getLocation()
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     Point aPixPos( pWin->GetWindowExtentsRelative( 
*pWin->GetAccessibleParentWindow() ).TopLeft() );
@@ -265,7 +265,7 @@ css::awt::Point SAL_CALL 
SwAccessibleDocumentBase::getLocationOnScreen()
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     Point aPixPos( pWin->GetWindowExtentsAbsolute().TopLeft() );
@@ -281,7 +281,7 @@ css::awt::Size SAL_CALL SwAccessibleDocumentBase::getSize()
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     Size aPixSize( pWin->GetWindowExtentsAbsolute().GetSize() );
@@ -298,7 +298,7 @@ sal_Bool SAL_CALL SwAccessibleDocumentBase::containsPoint(
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     tools::Rectangle aPixBounds( pWin->GetWindowExtentsAbsolute() );
@@ -320,7 +320,7 @@ uno::Reference< XAccessible > SAL_CALL 
SwAccessibleDocumentBase::getAccessibleAt
         vcl::Window *pWin = GetWindow();
         if (!pWin)
         {
-            throw uno::RuntimeException("no Window", getXWeak());
+            throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
         }
         if (pWin->isDisposed()) // tdf#147967
             return nullptr;
diff --git a/sw/source/core/access/accembedded.cxx 
b/sw/source/core/access/accembedded.cxx
index 7d4a5415bdcf..fae346d301df 100644
--- a/sw/source/core/access/accembedded.cxx
+++ b/sw/source/core/access/accembedded.cxx
@@ -79,7 +79,7 @@ sal_Bool SAL_CALL 
SwAccessibleEmbeddedObject::supportsService(const OUString& sT
 
 uno::Sequence< OUString > SAL_CALL 
SwAccessibleEmbeddedObject::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.AccessibleTextEmbeddedObject", 
sAccessibleServiceName };
+    return { u"com.sun.star.text.AccessibleTextEmbeddedObject"_ustr, 
sAccessibleServiceName };
 }
 
 uno::Sequence< sal_Int8 > SAL_CALL 
SwAccessibleEmbeddedObject::getImplementationId()
diff --git a/sw/source/core/access/accfootnote.cxx 
b/sw/source/core/access/accfootnote.cxx
index 9fc265c53bc1..b23768be822d 100644
--- a/sw/source/core/access/accfootnote.cxx
+++ b/sw/source/core/access/accfootnote.cxx
@@ -97,7 +97,7 @@ sal_Bool SAL_CALL SwAccessibleFootnote::supportsService(const 
OUString& sTestSer
 
 Sequence< OUString > SAL_CALL SwAccessibleFootnote::getSupportedServiceNames()
 {
-    return { (AccessibleRole::END_NOTE == 
GetRole())?OUString("com.sun.star.text.AccessibleEndnoteView"):OUString("com.sun.star.text.AccessibleFootnoteView"),
+    return { (AccessibleRole::END_NOTE == 
GetRole())?u"com.sun.star.text.AccessibleEndnoteView"_ustr:u"com.sun.star.text.AccessibleFootnoteView"_ustr,
              sAccessibleServiceName };
 }
 
diff --git a/sw/source/core/access/accgraphic.cxx 
b/sw/source/core/access/accgraphic.cxx
index d6d115d78066..0f80d3052362 100644
--- a/sw/source/core/access/accgraphic.cxx
+++ b/sw/source/core/access/accgraphic.cxx
@@ -42,7 +42,7 @@ SwAccessibleGraphic::~SwAccessibleGraphic()
 
 OUString SAL_CALL SwAccessibleGraphic::getImplementationName()
 {
-    return "com.sun.star.comp.Writer.SwAccessibleGraphic";
+    return u"com.sun.star.comp.Writer.SwAccessibleGraphic"_ustr;
 }
 
 sal_Bool SAL_CALL SwAccessibleGraphic::supportsService(const OUString& 
sTestServiceName)
@@ -52,7 +52,7 @@ sal_Bool SAL_CALL SwAccessibleGraphic::supportsService(const 
OUString& sTestServ
 
 Sequence< OUString > SAL_CALL SwAccessibleGraphic::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.AccessibleTextGraphicObject", 
sAccessibleServiceName };
+    return { u"com.sun.star.text.AccessibleTextGraphicObject"_ustr, 
sAccessibleServiceName };
 }
 
 Sequence< sal_Int8 > SAL_CALL SwAccessibleGraphic::getImplementationId()
diff --git a/sw/source/core/access/accheaderfooter.cxx 
b/sw/source/core/access/accheaderfooter.cxx
index d07b2c80255e..b3fe9f92a272 100644
--- a/sw/source/core/access/accheaderfooter.cxx
+++ b/sw/source/core/access/accheaderfooter.cxx
@@ -86,7 +86,7 @@ sal_Bool SAL_CALL 
SwAccessibleHeaderFooter::supportsService(const OUString& sTes
 
 Sequence< OUString > SAL_CALL 
SwAccessibleHeaderFooter::getSupportedServiceNames()
 {
-    return { (AccessibleRole::HEADER == 
GetRole())?OUString("com.sun.star.text.AccessibleHeaderView"):OUString("com.sun.star.text.AccessibleFooterView"),
+    return { (AccessibleRole::HEADER == 
GetRole())?u"com.sun.star.text.AccessibleHeaderView"_ustr:u"com.sun.star.text.AccessibleFooterView"_ustr,
              sAccessibleServiceName };
 }
 
diff --git a/sw/source/core/access/acchyperlink.cxx 
b/sw/source/core/access/acchyperlink.cxx
index 76a2721ec172..dcfb9399e2b1 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -195,7 +195,7 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::isValid(  )
                 uno::Reference< lang::XMultiServiceFactory > xFactory( 
::comphelper::getProcessServiceFactory() );
                 if( ! xFactory.is() )
                     return false;
-                uno::Reference< css::frame::XDesktop > xDesktop( 
xFactory->createInstance( "com.sun.star.frame.Desktop" ),
+                uno::Reference< css::frame::XDesktop > xDesktop( 
xFactory->createInstance( u"com.sun.star.frame.Desktop"_ustr ),
                     uno::UNO_QUERY );
                 if( !xDesktop.is() )
                     return false;
diff --git a/sw/source/core/access/accpage.cxx 
b/sw/source/core/access/accpage.cxx
index b3427559b3f8..8e0ab0233610 100644
--- a/sw/source/core/access/accpage.cxx
+++ b/sw/source/core/access/accpage.cxx
@@ -139,7 +139,7 @@ sal_Bool SwAccessiblePage::supportsService( const OUString& 
rServiceName)
 
 Sequence<OUString> SwAccessiblePage::getSupportedServiceNames( )
 {
-    return { "com.sun.star.text.AccessiblePageView", sAccessibleServiceName };
+    return { u"com.sun.star.text.AccessiblePageView"_ustr, 
sAccessibleServiceName };
 }
 
 Sequence< sal_Int8 > SAL_CALL SwAccessiblePage::getImplementationId()
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 12b3ce9b0f4f..4be4a5feb4a2 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -725,7 +725,7 @@ lang::Locale SAL_CALL SwAccessibleParagraph::getLocale()
     const SwTextFrame *pTextFrame = GetFrame()->DynCastTextFrame();
     if( !pTextFrame )
     {
-        throw uno::RuntimeException("no SwTextFrame", getXWeak());
+        throw uno::RuntimeException(u"no SwTextFrame"_ustr, getXWeak());
     }
 
     lang::Locale 
aLoc(g_pBreakIt->GetLocale(pTextFrame->GetLangOfChar(TextFrameIndex(0), 0, 
true)));
@@ -1134,7 +1134,7 @@ css::uno::Sequence< css::style::TabStop > 
SwAccessibleParagraph::GetCurrentTabSt
         vcl::Window *pWin = GetWindow();
         if (!pWin)
         {
-            throw uno::RuntimeException("no Window", getXWeak());
+            throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
         }
 
         SwRect aTmpRect(0, 0, tabs[0].Position, 0);
@@ -2055,7 +2055,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
 
     tools::Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect ));
@@ -2089,7 +2089,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const 
awt::Point& rPoint )
     vcl::Window *pWin = GetWindow();
     if (!pWin)
     {
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
     }
     Point aPoint( rPoint.X, rPoint.Y );
     SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip rel to 
doc root
@@ -2481,7 +2481,7 @@ sal_Bool SwAccessibleParagraph::scrollSubstringTo( 
sal_Int32 nStartIndex,
 
     vcl::Window *pWin = GetWindow();
     if ( ! pWin )
-        throw uno::RuntimeException("no Window", getXWeak());
+        throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
 
     /* Start and end character bounds, in pixels, relative to the paragraph */
     awt::Rectangle startR, endR;
@@ -3285,7 +3285,7 @@ sal_Int32 SAL_CALL 
SwAccessibleParagraph::getNumberOfLineWithCaret()
                 vcl::Window *pWin = GetWindow();
                 if (!pWin)
                 {
-                    throw uno::RuntimeException("no Window", getXWeak());
+                    throw uno::RuntimeException(u"no Window"_ustr, getXWeak());
                 }
 
                 tools::Rectangle aScreenRect( GetMap()->CoreToPixel( 
aCursorCoreRect ));
@@ -3483,7 +3483,7 @@ sal_Int16 SAL_CALL 
SwAccessibleParagraph::getAccessibleRole()
 sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
 {
     uno::Reference< css::beans::XPropertySet > xPortion = CreateUnoPortion( 0, 
0 );
-    uno::Any styleAny = xPortion->getPropertyValue( "ParaStyleName" );
+    uno::Any styleAny = xPortion->getPropertyValue( u"ParaStyleName"_ustr );
     OUString sValue;
     if (styleAny >>= sValue)
     {
@@ -3504,7 +3504,7 @@ sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
 bool SwAccessibleParagraph::IsBlockQuote()
 {
     uno::Reference<css::beans::XPropertySet> xPortion = CreateUnoPortion(0, 0);
-    uno::Any aStyleAny = xPortion->getPropertyValue("ParaStyleName");
+    uno::Any aStyleAny = xPortion->getPropertyValue(u"ParaStyleName"_ustr);
     OUString sValue;
     if (aStyleAny >>= sValue)
         return sValue == "Quotations";
diff --git a/sw/source/core/access/accpreview.cxx 
b/sw/source/core/access/accpreview.cxx
index 503cc543ece9..732598105cdf 100644
--- a/sw/source/core/access/accpreview.cxx
+++ b/sw/source/core/access/accpreview.cxx
@@ -49,7 +49,7 @@ sal_Bool SwAccessiblePreview::supportsService( const 
OUString& rServiceName )
 
 Sequence<OUString> SwAccessiblePreview::getSupportedServiceNames( )
 {
-    return {"com.sun.star.text.AccessibleTextDocumentPageView",
+    return {u"com.sun.star.text.AccessibleTextDocumentPageView"_ustr,
             sAccessibleServiceName};
 }
 
diff --git a/sw/source/core/access/accselectionhelper.cxx 
b/sw/source/core/access/accselectionhelper.cxx
index fb56e71e35dd..71137656d1a2 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -67,7 +67,7 @@ void 
SwAccessibleSelectionHelper::throwIndexOutOfBoundsException()
     Reference < XAccessibleContext > xThis( &m_rContext );
     Reference < XAccessibleSelection >xSelThis( xThis, UNO_QUERY );
     lang::IndexOutOfBoundsException aExcept(
-                "index out of bounds",
+                u"index out of bounds"_ustr,
                 xSelThis );
     throw aExcept;
 }
diff --git a/sw/source/core/access/acctable.cxx 
b/sw/source/core/access/acctable.cxx
index e60b47a339c6..2195028783c8 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -400,7 +400,7 @@ void SwAccessibleTableData_Impl::CheckRowAndCol(
     {
         uno::Reference < XAccessibleTable > xThis( pThis );
         lang::IndexOutOfBoundsException aExcept(
-               "row or column index out of range",
+               u"row or column index out of range"_ustr,
                xThis );
         throw aExcept;
     }
@@ -1148,7 +1148,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn(
 
 OUString SAL_CALL SwAccessibleTable::getImplementationName()
 {
-    return "com.sun.star.comp.Writer.SwAccessibleTableView";
+    return u"com.sun.star.comp.Writer.SwAccessibleTableView"_ustr;
 }
 
 sal_Bool SAL_CALL SwAccessibleTable::supportsService(
@@ -1159,7 +1159,7 @@ sal_Bool SAL_CALL SwAccessibleTable::supportsService(
 
 uno::Sequence< OUString > SAL_CALL 
SwAccessibleTable::getSupportedServiceNames()
 {
-    return { "com.sun.star.table.AccessibleTableView", sAccessibleServiceName 
};
+    return { u"com.sun.star.table.AccessibleTableView"_ustr, 
sAccessibleServiceName };
 }
 
 void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
diff --git a/sw/source/core/access/acctextframe.cxx 
b/sw/source/core/access/acctextframe.cxx
index e6f11873de3b..39c44120bb99 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -235,7 +235,7 @@ OUString SAL_CALL 
SwAccessibleTextFrame::getAccessibleDescription()
 
 OUString SAL_CALL SwAccessibleTextFrame::getImplementationName()
 {
-    return "com.sun.star.comp.Writer.SwAccessibleTextFrameView";
+    return u"com.sun.star.comp.Writer.SwAccessibleTextFrameView"_ustr;
 }
 
 sal_Bool SAL_CALL SwAccessibleTextFrame::supportsService(const OUString& 
sTestServiceName)
@@ -245,7 +245,7 @@ sal_Bool SAL_CALL 
SwAccessibleTextFrame::supportsService(const OUString& sTestSe
 
 uno::Sequence< OUString > SAL_CALL 
SwAccessibleTextFrame::getSupportedServiceNames()
 {
-    return { "com.sun.star.text.AccessibleTextFrameView", 
sAccessibleServiceName };
+    return { u"com.sun.star.text.AccessibleTextFrameView"_ustr, 
sAccessibleServiceName };
 }
 
 uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId()

Reply via email to