sw/qa/core/test_ToxLinkProcessor.cxx | 24 +++++------ sw/qa/core/uwriter.cxx | 20 ++++----- sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 4 - sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 2 sw/qa/extras/tiledrendering/tiledrendering.cxx | 8 +-- sw/qa/extras/uiwriter/uiwriter.cxx | 16 +++---- sw/qa/extras/uiwriter/uiwriter6.cxx | 4 - sw/qa/extras/unowriter/unowriter.cxx | 12 ++--- sw/source/core/access/accdoc.cxx | 2 sw/source/core/access/accpara.cxx | 4 - sw/source/core/crsr/crossrefbookmark.cxx | 2 sw/source/core/crsr/findtxt.cxx | 2 sw/source/core/doc/DocumentContentOperationsManager.cxx | 2 sw/source/core/doc/docbm.cxx | 2 sw/source/core/doc/docfld.cxx | 4 - sw/source/core/doc/doclay.cxx | 2 sw/source/core/doc/tblafmt.cxx | 2 sw/source/core/edit/edfcol.cxx | 34 ++++++++-------- sw/source/core/swg/SwXMLTextBlocks1.cxx | 2 sw/source/core/text/EnhancedPDFExportHelper.cxx | 10 ++-- sw/source/core/txtnode/attrcontentcontrol.cxx | 2 sw/source/core/unocore/unodraw.cxx | 8 +-- sw/source/core/unocore/unofield.cxx | 2 sw/source/core/unocore/unoidx.cxx | 2 sw/source/core/unocore/unosett.cxx | 2 sw/source/core/unocore/unotext.cxx | 2 sw/source/core/view/printdata.cxx | 4 - sw/source/filter/ascii/wrtasc.cxx | 2 sw/source/filter/docx/swdocxreader.cxx | 2 sw/source/filter/html/swhtml.cxx | 4 - sw/source/filter/html/wrthtml.cxx | 2 sw/source/filter/ww8/docxexport.cxx | 2 sw/source/filter/ww8/rtfexport.cxx | 2 sw/source/filter/ww8/ww8par5.cxx | 2 sw/source/filter/ww8/ww8toolbar.cxx | 2 sw/source/filter/xml/XMLRedlineImportHelper.cxx | 6 +- sw/source/filter/xml/swxml.cxx | 12 ++--- sw/source/filter/xml/xmlexp.cxx | 4 - sw/source/filter/xml/xmlimp.cxx | 10 ++-- sw/source/filter/xml/xmltexte.cxx | 2 sw/source/ui/vba/vbalisthelper.cxx | 22 +++++----- sw/source/ui/vba/vbaparagraphformat.cxx | 2 sw/source/uibase/app/applab.cxx | 2 sw/source/uibase/app/docstyle.cxx | 2 sw/source/uibase/config/uinums.cxx | 2 sw/source/uibase/dbui/mmconfigitem.cxx | 2 sw/source/uibase/shells/grfsh.cxx | 2 sw/source/uibase/shells/langhelper.cxx | 6 +- sw/source/uibase/shells/textsh1.cxx | 10 ++-- sw/source/uibase/sidebar/PageMarginControl.cxx | 10 ++-- sw/source/uibase/uno/SwXFilterOptions.cxx | 2 sw/source/uibase/uno/unomailmerge.cxx | 2 sw/source/uibase/uno/unotxdoc.cxx | 2 54 files changed, 150 insertions(+), 150 deletions(-)
New commits: commit a841ac096f2794405408ef64189de2c77971c3e6 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Oct 19 10:30:32 2023 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Oct 20 15:28:25 2023 +0200 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: sw Change-Id: I85fff7ed6932c5fc196e18f24fa01074ba4837e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sw/qa/core/test_ToxLinkProcessor.cxx b/sw/qa/core/test_ToxLinkProcessor.cxx index e493320eae90..a47762912c6c 100644 --- a/sw/qa/core/test_ToxLinkProcessor.cxx +++ b/sw/qa/core/test_ToxLinkProcessor.cxx @@ -40,12 +40,12 @@ public: SwGlobals::ensure(); } - static constexpr OUStringLiteral STYLE_NAME_1 = u"anyStyle1"; - static constexpr OUStringLiteral STYLE_NAME_2 = u"anyStyle2"; + static constexpr OUString STYLE_NAME_1 = u"anyStyle1"_ustr; + static constexpr OUString STYLE_NAME_2 = u"anyStyle2"_ustr; static const sal_uInt16 POOL_ID_1; static const sal_uInt16 POOL_ID_2; - static constexpr OUStringLiteral URL_1 = u"#anyUrl1"; - static constexpr OUStringLiteral URL_2 = u"#anyUrl2"; + static constexpr OUString URL_1 = u"#anyUrl1"_ustr; + static constexpr OUString URL_2 = u"#anyUrl2"_ustr; }; const sal_uInt16 ToxLinkProcessorTest::POOL_ID_1 = 42; @@ -79,8 +79,8 @@ ToxLinkProcessorTest::AddingAndClosingTwoOverlappingLinksResultsInOneClosedLink( CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.size())); CPPUNIT_ASSERT_MESSAGE("no links are open", !sut.m_oStartedLink); // backward compatibility: the last start is closed by the first end - CPPUNIT_ASSERT_EQUAL(OUString(STYLE_NAME_2), sut.m_ClosedLinks[0]->mINetFormat.GetINetFormat()); - CPPUNIT_ASSERT_EQUAL(OUString(URL_1), sut.m_ClosedLinks[0]->mINetFormat.GetValue()); + CPPUNIT_ASSERT_EQUAL(STYLE_NAME_2, sut.m_ClosedLinks[0]->mINetFormat.GetINetFormat()); + CPPUNIT_ASSERT_EQUAL(URL_1, sut.m_ClosedLinks[0]->mINetFormat.GetValue()); } namespace { @@ -110,8 +110,8 @@ ToxLinkProcessorTest::LinkIsCreatedCorrectly() sut.StartNewLink(0, STYLE_NAME_1); sut.CloseLink(1, URL_1, /*bRelative=*/true); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", OUString(STYLE_NAME_1), sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat()); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", OUString(URL_1), sut.m_ClosedLinks.at(0)->mINetFormat.GetValue()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", STYLE_NAME_1, sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", URL_1, sut.m_ClosedLinks.at(0)->mINetFormat.GetValue()); } void @@ -128,18 +128,18 @@ ToxLinkProcessorTest::LinkSequenceIsPreserved() // check first closed element CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", - OUString(STYLE_NAME_2), sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat()); + STYLE_NAME_2, sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Pool id is stored correctly in link", POOL_ID_2, sut.m_ClosedLinks.at(0)->mINetFormat.GetINetFormatId()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", - OUString(URL_2), sut.m_ClosedLinks.at(0)->mINetFormat.GetValue()); + URL_2, sut.m_ClosedLinks.at(0)->mINetFormat.GetValue()); // check second closed element CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", - OUString(STYLE_NAME_1), sut.m_ClosedLinks.at(1)->mINetFormat.GetVisitedFormat()); + STYLE_NAME_1, sut.m_ClosedLinks.at(1)->mINetFormat.GetVisitedFormat()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Pool id is stored correctly in link", POOL_ID_1, sut.m_ClosedLinks.at(1)->mINetFormat.GetINetFormatId()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", - OUString(URL_1), sut.m_ClosedLinks.at(1)->mINetFormat.GetValue()); + URL_1, sut.m_ClosedLinks.at(1)->mINetFormat.GetValue()); } // Put the test suite in the registry diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index b64c67402c8d..58308fce6c92 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -608,7 +608,7 @@ void SwDocTest::testSwScanner() //See https://www.libreoffice.org/bugzilla/show_bug.cgi?id=45271 { - static constexpr OUStringLiteral IDEOGRAPHICFULLSTOP_D = u"\u3002D"; + static constexpr OUString IDEOGRAPHICFULLSTOP_D = u"\u3002D"_ustr; m_pDoc->getIDocumentContentOperations().InsertString(aPaM, IDEOGRAPHICFULLSTOP_D); @@ -625,7 +625,7 @@ void SwDocTest::testSwScanner() CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(2), aDocStat.nCharExcludingSpaces); } { - static constexpr OUStringLiteral test = + static constexpr OUString test = u"\u3053\u306E\u65E5\u672C\u8A9E\u306F\u6B63\u3057" "\u304F\u6570\u3048\u3089\u308C\u308B\u3067\u3057" "\u3087\u3046\u304B\u3002And " @@ -641,7 +641,7 @@ void SwDocTest::testSwScanner() "\u3000\u3000\u5165\u308C\u307E\u3057\u305F\u3002" " So how" " does th" - "is do? "; + "is do? "_ustr; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, test); @@ -664,10 +664,10 @@ void SwDocTest::testSwScanner() { SwDocStat aDocStat; - static constexpr OUStringLiteral aShouldBeThree = + static constexpr OUString aShouldBeThree = u"Should " "\u2018be thr" - "ee\u2019"; + "ee\u2019"_ustr; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeThree); @@ -675,14 +675,14 @@ void SwDocTest::testSwScanner() pTextNode->CountWords(aDocStat, 0, aShouldBeThree.getLength()); CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(3), aDocStat.nWord); - static constexpr OUStringLiteral aShouldBeFive = + static constexpr OUString aShouldBeFive = u"french " // << nbsp "\u00AB\u00A0savoi" // nnbsp "r\u202fcalcu" // idspace >> - "ler\u3000\u00BB"; + "ler\u3000\u00BB"_ustr; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeFive); @@ -745,7 +745,7 @@ void SwDocTest::testSwScanner() { SwDocStat aDocStat; - static constexpr OUStringLiteral aString = u"Lorem ipsum"; + static constexpr OUString aString = u"Lorem ipsum"_ustr; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aString); pTextNode = aPaM.GetPointNode().GetTextNode(); @@ -762,7 +762,7 @@ void SwDocTest::testSwScanner() aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 5); //set end of selection to fifth char of current node m_pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM); //redline-aware deletion api //"real underlying text should be the same" - CPPUNIT_ASSERT_EQUAL(OUString(aString), pTextNode->GetText()); + CPPUNIT_ASSERT_EQUAL(aString, pTextNode->GetText()); aDocStat.Reset(); pTextNode->SetWordCountDirty(true); @@ -1818,7 +1818,7 @@ void SwDocTest::test64kPageDescs() CPPUNIT_ASSERT_EQUAL( OUString("Page65535"), rDesc.GetName() ); SwPageDesc aDesc( rDesc ); - static constexpr OUStringLiteral aChanged(u"Changed01"); + static constexpr OUString aChanged(u"Changed01"_ustr); aDesc.SetName( aChanged ); m_pDoc->ChgPageDesc( nPageDescCount, aDesc ); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 999a144cde60..e2a43a696080 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -695,8 +695,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf38778) loadAndSave("tdf38778_properties_in_run_for_field.doc"); xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); - static constexpr OUStringLiteral psz(u"20"); - static constexpr OUStringLiteral pszCs(u"20"); + static constexpr OUString psz(u"20"_ustr); + static constexpr OUString pszCs(u"20"_ustr); // w:fldCharType="begin" assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:sz", "val", psz); diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 21922f19e3f1..cb26e28d748e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1700,7 +1700,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf87533_bidi) { createSwDoc("tdf87533_bidi.docx"); // "w:bidi" (specified inside Default paragraph properties) should not be ignored - static constexpr OUStringLiteral writingMode = u"WritingMode"; //getPropertyName(PROP_WRITING_MODE); + static constexpr OUString writingMode = u"WritingMode"_ustr; //getPropertyName(PROP_WRITING_MODE); // check: "Default Style" master-style has RTL { diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 6b4054c4e38f..4a35b46a1138 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -901,7 +901,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf129912) // the expected footnote labels // TODO: the 5th label is actually wrong (missing the "PR" after the symbol part), but the "b" is there?! - static constexpr OUStringLiteral pLabel5 = u"\uF0D1\uF031\uF032b"; + static constexpr OUString pLabel5 = u"\uF0D1\uF031\uF032b"_ustr; const OUString sFootnoteLabels[] = { OUString(u'\xF0A7'), "1", "2", OUString(u'\xF020'), pLabel5 }; CPPUNIT_ASSERT_EQUAL(sal_Int32(SAL_N_ELEMENTS(sFootnoteLabels)), nCount); diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index d66a2bc98c2d..a280c0473843 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -3990,11 +3990,11 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDateContentControl) CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAuthorField) { SwXTextDocument* pXTextDocument = createDoc(); - static constexpr OUStringLiteral sAuthor(u"Abcd Xyz"); + static constexpr OUString sAuthor(u"Abcd Xyz"_ustr); uno::Sequence<beans::PropertyValue> aPropertyValues1(comphelper::InitPropertySequence( { - {".uno:Author", uno::Any(OUString(sAuthor))}, + {".uno:Author", uno::Any(sAuthor)}, })); pXTextDocument->initializeForTiledRendering(aPropertyValues1); @@ -4029,10 +4029,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAuthorField) CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSavedAuthorField) { SwXTextDocument* pXTextDocument = createDoc("savedauthorfield.odt"); - static constexpr OUStringLiteral sAuthor(u"XYZ ABCD"); + static constexpr OUString sAuthor(u"XYZ ABCD"_ustr); uno::Sequence<beans::PropertyValue> aPropertyValues1(comphelper::InitPropertySequence( { - {".uno:Author", uno::Any(OUString(sAuthor))}, + {".uno:Author", uno::Any(sAuthor)}, })); pXTextDocument->initializeForTiledRendering(aPropertyValues1); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index c7ed440795ac..37aa15838773 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -129,14 +129,14 @@ void SwUiWriterTest::testRedlineFrame(char const*const file) //Replacement tests -constexpr OUStringLiteral ORIGINAL_REPLACE_CONTENT(u"toto titi tutu"); -constexpr OUStringLiteral EXPECTED_REPLACE_CONTENT(u"toto toto tutu"); +constexpr OUString ORIGINAL_REPLACE_CONTENT(u"toto titi tutu"_ustr); +constexpr OUString EXPECTED_REPLACE_CONTENT(u"toto toto tutu"_ustr); // Chinese conversion tests const sal_Unicode CHINESE_TRADITIONAL_CONTENT(0x9F8D); const sal_Unicode CHINESE_SIMPLIFIED_CONTENT(0x9F99); -constexpr OUStringLiteral NON_CHINESE_CONTENT(u"Hippopotamus"); +constexpr OUString NON_CHINESE_CONTENT(u"Hippopotamus"_ustr); CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testReplaceForward) { @@ -154,11 +154,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testReplaceForward) lcl_selectCharacters(aPaM, 5, 9); pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false); - CPPUNIT_ASSERT_EQUAL(OUString(EXPECTED_REPLACE_CONTENT), pTextNode->GetText()); + CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText()); rUndoManager.Undo(); - CPPUNIT_ASSERT_EQUAL(OUString(ORIGINAL_REPLACE_CONTENT), pTextNode->GetText()); + CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTextNode->GetText()); } @@ -689,11 +689,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testReplaceBackward) pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false); - CPPUNIT_ASSERT_EQUAL(OUString(EXPECTED_REPLACE_CONTENT), pTextNode->GetText()); + CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText()); rUndoManager.Undo(); - CPPUNIT_ASSERT_EQUAL(OUString(ORIGINAL_REPLACE_CONTENT), pTextNode->GetText()); + CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTextNode->GetText()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo69893) @@ -1276,7 +1276,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionNonChineseText) // Then SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); - CPPUNIT_ASSERT_EQUAL(OUString(NON_CHINESE_CONTENT), pTextNode->GetText()); + CPPUNIT_ASSERT_EQUAL(NON_CHINESE_CONTENT, pTextNode->GetText()); } diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 726e16774f3f..dd0b1d6f468c 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -1602,8 +1602,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testInconsistentBookmark) // load only content.xml xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); - static constexpr OStringLiteral aPath( - "/office:document-content/office:body/office:text/text:p"); + static constexpr OString aPath( + "/office:document-content/office:body/office:text/text:p"_ostr); const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark-start"); const int pos2 = getXPathPosition(pXmlDoc, aPath, "control"); diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx index 10f861a079c8..8bcadbaf4227 100644 --- a/sw/qa/extras/unowriter/unowriter.cxx +++ b/sw/qa/extras/unowriter/unowriter.cxx @@ -314,11 +314,11 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testXAutoTextGroup) uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1); - static constexpr OUStringLiteral sGroupName = u"TestGroup*1"; - static constexpr OUStringLiteral sTextName = u"TEST"; - static constexpr OUStringLiteral sTextNameNew = u"TESTRENAMED"; - static constexpr OUStringLiteral sTextTitle = u"Test Auto Text"; - static constexpr OUStringLiteral sTextTitleNew = u"Test Auto Text Renamed"; + static constexpr OUString sGroupName = u"TestGroup*1"_ustr; + static constexpr OUString sTextName = u"TEST"_ustr; + static constexpr OUString sTextNameNew = u"TESTRENAMED"_ustr; + static constexpr OUString sTextTitle = u"Test Auto Text"_ustr; + static constexpr OUString sTextTitleNew = u"Test Auto Text Renamed"_ustr; // Create new temporary group uno::Reference<text::XAutoTextGroup> xAutoTextGroup @@ -1187,7 +1187,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testTdf129841) // Get SwXCellRange for the same cell css::uno::Reference<css::beans::XPropertySet> xCellRange( xTableCellRange->getCellRangeByName("A1:A1"), css::uno::UNO_QUERY_THROW); - static constexpr OUStringLiteral sBackColor = u"BackColor"; + static constexpr OUString sBackColor = u"BackColor"_ustr; // Apply background color to table cursor, and read background color from cell range css::uno::Any aRefColor(COL_LIGHTRED); xTableCursor->setPropertyValue(sBackColor, aRefColor); diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 4d72a1387d5f..5c8cfde0faa5 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -51,7 +51,7 @@ #include <dview.hxx> #include <dcontact.hxx> #include <svx/svdmark.hxx> -constexpr OUStringLiteral sServiceName = u"com.sun.star.text.AccessibleTextDocumentView"; +constexpr OUString sServiceName = u"com.sun.star.text.AccessibleTextDocumentView"_ustr; constexpr OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessibleDocumentView"; using namespace ::com::sun::star; diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 87d8dc1f73c5..ebd00faab9a3 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -111,7 +111,7 @@ namespace com::sun::star::text { class XText; } -constexpr OUStringLiteral sServiceName = u"com.sun.star.text.AccessibleParagraphView"; +constexpr OUString sServiceName = u"com.sun.star.text.AccessibleParagraphView"_ustr; constexpr OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessibleParagraphView"; OUString const & SwAccessibleParagraph::GetString() @@ -1601,7 +1601,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq ); // #i92233# - static constexpr OUStringLiteral sMMToPixelRatio = u"MMToPixelRatio"; + static constexpr OUString sMMToPixelRatio = u"MMToPixelRatio"_ustr; bool bProvideMMToPixelRatio( !aRequestedAttributes.hasElements() || (comphelper::findValue(aRequestedAttributes, sMMToPixelRatio) != -1) ); diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index 75e63b811680..8b61f709eb02 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -28,7 +28,7 @@ namespace { - constexpr OUStringLiteral CrossRefNumItemBookmark_NamePrefix = u"__RefNumPara__"; + constexpr OUString CrossRefNumItemBookmark_NamePrefix = u"__RefNumPara__"_ustr; } namespace sw::mark diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index d3694f6e0fd8..5f63f8f13694 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -1132,7 +1132,7 @@ std::optional<OUString> ReplaceBackReferences(const i18nutil::SearchOptions2& rS OUString aReplaceStr( rSearchOpt.replaceString ); if (bParaEnd) { - static constexpr OUStringLiteral aStr(u"\\n"); + static constexpr OUString aStr(u"\\n"_ustr); aResult.subRegExpressions = 1; aResult.startOffset = { 0 }; aResult.endOffset = { aStr.getLength() }; diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 8516a43485dd..9a04aac7fe8d 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1125,7 +1125,7 @@ namespace if( bRegExpRplc ) { sal_Int32 nPos = 0; - static constexpr OUStringLiteral sPara(u"\\n"); + static constexpr OUString sPara(u"\\n"_ustr); for (;;) { nPos = rStr.indexOf( sPara, nPos ); diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 2d8a411a9c5d..5a6c55ad1f96 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -50,7 +50,7 @@ #include <comphelper/lok.hxx> #include <strings.hrc> -constexpr OUStringLiteral S_ANNOTATION_BOOKMARK = u"____"; +constexpr OUString S_ANNOTATION_BOOKMARK = u"____"_ustr; using namespace ::sw::mark; diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index f8e3d079a960..c5b2dbe86b82 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -935,8 +935,8 @@ void SwDocUpdateField::MakeFieldList_( SwDoc& rDoc, int eGetMode ) } } - static constexpr OUStringLiteral sTrue(u"TRUE"); - static constexpr OUStringLiteral sFalse(u"FALSE"); + static constexpr OUString sTrue(u"TRUE"_ustr); + static constexpr OUString sFalse(u"FALSE"_ustr); #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS bool bIsDBManager = nullptr != rDoc.GetDBManager(); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index ea643f042fe4..516d15aed8ec 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -126,7 +126,7 @@ rtl::Reference<SdrObject> SwDoc::CloneSdrObj( const SdrObject& rObj, bool bMoveW uno::Reference< awt::XControlModel > xModel = static_cast<SdrUnoObj*>(pObj.get())->GetUnoControlModel(); uno::Any aVal; uno::Reference< beans::XPropertySet > xSet(xModel, uno::UNO_QUERY); - static constexpr OUStringLiteral sName(u"Name"); + static constexpr OUString sName(u"Name"_ustr); if( xSet.is() ) aVal = xSet->getPropertyValue( sName ); if( bInsInPage ) diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 7233c788e380..65bff647eb08 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -101,7 +101,7 @@ const sal_uInt16 AUTOFORMAT_FILE_VERSION= SOFFICE_FILEFORMAT_50; SwBoxAutoFormat* SwTableAutoFormat::s_pDefaultBoxAutoFormat = nullptr; -constexpr OUStringLiteral AUTOTABLE_FORMAT_NAME = u"autotbl.fmt"; +constexpr OUString AUTOTABLE_FORMAT_NAME = u"autotbl.fmt"_ustr; namespace { diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 66ac033189a3..2ce0caa01f91 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -101,25 +101,25 @@ #include <comphelper/diagnose_ex.hxx> #include <IDocumentRedlineAccess.hxx> -constexpr OUStringLiteral WATERMARK_NAME = u"PowerPlusWaterMarkObject"; +constexpr OUString WATERMARK_NAME = u"PowerPlusWaterMarkObject"_ustr; #define WATERMARK_AUTO_SIZE sal_uInt32(1) namespace { -constexpr OUStringLiteral MetaFilename(u"tscp/bails.rdf"); -constexpr OUStringLiteral MetaNS(u"urn:bails"); -constexpr OUStringLiteral ParagraphSignatureRDFNamespace = u"urn:bails:loext:paragraph:signature:"; -constexpr OUStringLiteral ParagraphSignatureIdRDFName = u"urn:bails:loext:paragraph:signature:id"; -constexpr OUStringLiteral ParagraphSignatureDigestRDFName = u":digest"; -constexpr OUStringLiteral ParagraphSignatureDateRDFName = u":date"; -constexpr OUStringLiteral ParagraphSignatureUsageRDFName = u":usage"; -constexpr OUStringLiteral ParagraphSignatureLastIdRDFName = u"urn:bails:loext:paragraph:signature:lastid"; -constexpr OUStringLiteral ParagraphClassificationNameRDFName = u"urn:bails:loext:paragraph:classification:name"; -constexpr OUStringLiteral ParagraphClassificationValueRDFName = u"urn:bails:loext:paragraph:classification:value"; -constexpr OUStringLiteral ParagraphClassificationAbbrRDFName = u"urn:bails:loext:paragraph:classification:abbreviation"; -constexpr OUStringLiteral ParagraphClassificationFieldNamesRDFName = u"urn:bails:loext:paragraph:classification:fields"; -constexpr OUStringLiteral MetadataFieldServiceName = u"com.sun.star.text.textfield.MetadataField"; -constexpr OUStringLiteral DocInfoServiceName = u"com.sun.star.text.TextField.DocInfo.Custom"; +constexpr OUString MetaFilename(u"tscp/bails.rdf"_ustr); +constexpr OUString MetaNS(u"urn:bails"_ustr); +constexpr OUString ParagraphSignatureRDFNamespace = u"urn:bails:loext:paragraph:signature:"_ustr; +constexpr OUString ParagraphSignatureIdRDFName = u"urn:bails:loext:paragraph:signature:id"_ustr; +constexpr OUString ParagraphSignatureDigestRDFName = u":digest"_ustr; +constexpr OUString ParagraphSignatureDateRDFName = u":date"_ustr; +constexpr OUString ParagraphSignatureUsageRDFName = u":usage"_ustr; +constexpr OUString ParagraphSignatureLastIdRDFName = u"urn:bails:loext:paragraph:signature:lastid"_ustr; +constexpr OUString ParagraphClassificationNameRDFName = u"urn:bails:loext:paragraph:classification:name"_ustr; +constexpr OUString ParagraphClassificationValueRDFName = u"urn:bails:loext:paragraph:classification:value"_ustr; +constexpr OUString ParagraphClassificationAbbrRDFName = u"urn:bails:loext:paragraph:classification:abbreviation"_ustr; +constexpr OUString ParagraphClassificationFieldNamesRDFName = u"urn:bails:loext:paragraph:classification:fields"_ustr; +constexpr OUString MetadataFieldServiceName = u"com.sun.star.text.textfield.MetadataField"_ustr; +constexpr OUString DocInfoServiceName = u"com.sun.star.text.TextField.DocInfo.Custom"_ustr; /// Find all page styles which are currently used in the document. std::vector<OUString> lcl_getUsedPageStyles(SwViewShell const * pShell) @@ -1322,7 +1322,7 @@ static std::vector<svx::ClassificationResult> lcl_CollectParagraphClassification uno::Reference<text::XTextRange> xTextRange(xField, uno::UNO_QUERY); const OUString aName = rdfNamePair.first; const OUString aValue = rdfNamePair.second; - static constexpr OUStringLiteral sBlank(u""); + static constexpr OUString sBlank(u""_ustr); if (aKeyCreator.isMarkingTextKey(aName)) { aResult.push_back({ svx::ClassificationType::TEXT, aValue, sBlank, sBlank }); @@ -1939,7 +1939,7 @@ void SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures() return; rtl::Reference<SwXParagraphEnumeration> xParagraphs = xBodyText->createParagraphEnumeration(); - static constexpr OUStringLiteral sBlank(u""); + static constexpr OUString sBlank(u""_ustr); const sfx::ClassificationKeyCreator aKeyCreator(SfxClassificationHelper::getPolicyType()); const css::uno::Sequence<css::uno::Reference<rdf::XURI>> aGraphNames = SwRDFHelper::getGraphNames(xModel, MetaNS); diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index e8a2b088e67c..989f3ff93ea9 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -45,7 +45,7 @@ #include <sfx2/event.hxx> #include <swerror.h> -constexpr OUStringLiteral XMLN_BLOCKLIST = u"BlockList.xml"; +constexpr OUString XMLN_BLOCKLIST = u"BlockList.xml"_ustr; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 50e62aeff964..46f8e1d07f84 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -175,7 +175,7 @@ const char aSourceText[] = "Source Text"; // PDF Tag Names: constexpr OUStringLiteral aDocumentString = u"Document"; -constexpr OUStringLiteral aDivString = u"Div"; +constexpr OUString aDivString = u"Div"_ustr; constexpr OUStringLiteral aSectString = u"Sect"; constexpr OUStringLiteral aHString = u"H"; constexpr OUStringLiteral aH1String = u"H1"; @@ -191,9 +191,9 @@ constexpr OUStringLiteral aH10String = u"H10"; constexpr OUStringLiteral aListString = u"L"; constexpr OUStringLiteral aListItemString = u"LI"; constexpr OUStringLiteral aListLabelString = u"Lbl"; -constexpr OUStringLiteral aListBodyString = u"LBody"; +constexpr OUString aListBodyString = u"LBody"_ustr; constexpr OUStringLiteral aBlockQuoteString = u"BlockQuote"; -constexpr OUStringLiteral aCaptionString = u"Caption"; +constexpr OUString aCaptionString = u"Caption"_ustr; constexpr OUStringLiteral aIndexString = u"Index"; constexpr OUStringLiteral aTOCString = u"TOC"; constexpr OUStringLiteral aTOCIString = u"TOCI"; @@ -203,11 +203,11 @@ constexpr OUStringLiteral aTDString = u"TD"; constexpr OUStringLiteral aTHString = u"TH"; constexpr OUStringLiteral aBibEntryString = u"BibEntry"; constexpr OUStringLiteral aQuoteString = u"Quote"; -constexpr OUStringLiteral aSpanString = u"Span"; +constexpr OUString aSpanString = u"Span"_ustr; constexpr OUStringLiteral aCodeString = u"Code"; constexpr OUStringLiteral aFigureString = u"Figure"; constexpr OUStringLiteral aFormulaString = u"Formula"; -constexpr OUStringLiteral aLinkString = u"Link"; +constexpr OUString aLinkString = u"Link"_ustr; constexpr OUStringLiteral aNoteString = u"Note"; // returns true if first paragraph in cell frame has 'table heading' style diff --git a/sw/source/core/txtnode/attrcontentcontrol.cxx b/sw/source/core/txtnode/attrcontentcontrol.cxx index 2dd007f480b3..34db9fde8aaa 100644 --- a/sw/source/core/txtnode/attrcontentcontrol.cxx +++ b/sw/source/core/txtnode/attrcontentcontrol.cxx @@ -38,7 +38,7 @@ using namespace com::sun::star; namespace { -inline constexpr OUStringLiteral CURRENT_DATE_FORMAT = u"YYYY-MM-DD"; +inline constexpr OUString CURRENT_DATE_FORMAT = u"YYYY-MM-DD"_ustr; } SwFormatContentControl* SwFormatContentControl::CreatePoolDefault(sal_uInt16 nWhich) diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 02266c6992fd..dca041d95129 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2565,7 +2565,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition ) if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER ) { // determine current x-position - static constexpr OUStringLiteral aHoriPosPropStr(u"HoriOrientPosition"); + static constexpr OUString aHoriPosPropStr(u"HoriOrientPosition"_ustr); uno::Any aHoriPos( getPropertyValue( aHoriPosPropStr ) ); sal_Int32 dCurrX = 0; aHoriPos >>= dCurrX; @@ -2574,7 +2574,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition ) { // adjust x-position orientation to text::HoriOrientation::NONE, if needed // Note: has to be done before setting x-position attribute - static constexpr OUStringLiteral aHoriOrientPropStr(u"HoriOrient"); + static constexpr OUString aHoriOrientPropStr(u"HoriOrient"_ustr); uno::Any aHoriOrient( getPropertyValue( aHoriOrientPropStr ) ); sal_Int16 eHoriOrient; if (aHoriOrient >>= eHoriOrient) // may be void @@ -2595,7 +2595,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition ) // handle y-position { // determine current y-position - static constexpr OUStringLiteral aVertPosPropStr(u"VertOrientPosition"); + static constexpr OUString aVertPosPropStr(u"VertOrientPosition"_ustr); uno::Any aVertPos( getPropertyValue( aVertPosPropStr ) ); sal_Int32 dCurrY = 0; aVertPos >>= dCurrY; @@ -2604,7 +2604,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition ) { // adjust y-position orientation to text::VertOrientation::NONE, if needed // Note: has to be done before setting y-position attribute - static constexpr OUStringLiteral aVertOrientPropStr(u"VertOrient"); + static constexpr OUString aVertOrientPropStr(u"VertOrient"_ustr); uno::Any aVertOrient( getPropertyValue( aVertOrientPropStr ) ); sal_Int16 eVertOrient; if (aVertOrient >>= eVertOrient) // may be void diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 3d0296c964e5..cd493e615002 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -91,7 +91,7 @@ using namespace ::com::sun::star; using namespace nsSwDocInfoSubType; // case-corrected version of the first part for the service names (see #i67811) -constexpr OUStringLiteral COM_TEXT_FLDMASTER_CC = u"com.sun.star.text.fieldmaster."; +constexpr OUString COM_TEXT_FLDMASTER_CC = u"com.sun.star.text.fieldmaster."_ustr; // note: this thing is indexed as an array, so do not insert/remove entries! const sal_uInt16 aDocInfoSubTypeFromService[] = diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 1e9f7cba274f..594778768cc0 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -118,7 +118,7 @@ lcl_ReAssignTOXType(SwDoc& rDoc, SwTOXBase& rTOXBase, const OUString& rNewName) rTOXBase.RegisterToTOXType( *const_cast<SwTOXType*>(pNewType) ); } -constexpr OUStringLiteral cUserDefined = u"User-Defined"; +constexpr OUString cUserDefined = u"User-Defined"_ustr; const char cUserSuffix[] = " (user)"; #define USER_LEN 12 #define USER_AND_SUFFIXLEN 19 diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 56f000f0d3ea..2430bf35fa49 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -980,7 +980,7 @@ void SwXLineNumberingProperties::removeVetoableChangeListener(const OUString& /* OSL_FAIL("not implemented"); } -constexpr OUStringLiteral aInvalidStyle = u"__XXX___invalid"; +constexpr OUString aInvalidStyle = u"__XXX___invalid"_ustr; class SwXNumberingRules::Impl : public SvtListener diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index dba767d21dff..5fef89f3ffde 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -75,7 +75,7 @@ using namespace ::com::sun::star; -constexpr OUStringLiteral cInvalidObject = u"this object is invalid"; +constexpr OUString cInvalidObject = u"this object is invalid"_ustr; class SwXText::Impl { diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 7cf3017eeec7..478e553aafd0 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -273,7 +273,7 @@ SwPrintUIOptions::SwPrintUIOptions( aPrintRangeOpt ); // create a choice for the content to create - static constexpr OUStringLiteral aPrintRangeName( u"PrintContent" ); + static constexpr OUString aPrintRangeName( u"PrintContent"_ustr ); uno::Sequence< OUString > aChoices{ SwResId( STR_PRINTOPTUI_PRINTALLPAGES ), SwResId( STR_PRINTOPTUI_PRINTPAGES ), SwResId( STR_PRINTOPTUI_PRINTSELECTION ) }; @@ -331,7 +331,7 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for brochure bDefaultVal = rDefaultPrintData.IsPrintProspect(); - static constexpr OUStringLiteral aBrochurePropertyName( u"PrintProspect" ); + static constexpr OUString aBrochurePropertyName( u"PrintProspect"_ustr ); m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE), ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox", aBrochurePropertyName, diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 327e317a8c9d..0f1e368b928e 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -90,7 +90,7 @@ SwASCWriter::~SwASCWriter() {} ErrCode SwASCWriter::WriteStream() { - static constexpr OUStringLiteral STR_CR = u"\015"; + static constexpr OUString STR_CR = u"\015"_ustr; static constexpr OUStringLiteral STR_LF = u"\012"; static constexpr OUStringLiteral STR_CRLF = u"\015\012"; static constexpr OUStringLiteral STR_BLANK = u" "; diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx index d941e60f35cd..c77c4417f73f 100644 --- a/sw/source/filter/docx/swdocxreader.cxx +++ b/sw/source/filter/docx/swdocxreader.cxx @@ -36,7 +36,7 @@ #include <sfx2/docfile.hxx> #include <comphelper/diagnose_ex.hxx> -constexpr OUStringLiteral AUTOTEXT_GALLERY = u"autoTxt"; +constexpr OUString AUTOTEXT_GALLERY = u"autoTxt"_ustr; using namespace css; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 5115b7c0ab40..2ef2105995db 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -169,7 +169,7 @@ OUString HTMLReader::GetTemplateName(SwDoc& rDoc) const // HTML import into Writer, avoid loading the Writer/Web template. return OUString(); - static constexpr OUStringLiteral sTemplateWithoutExt(u"internal/html"); + static constexpr OUString sTemplateWithoutExt(u"internal/html"_ustr); SvtPathOptions aPathOpt; // first search for OpenDocument Writer/Web template @@ -5585,7 +5585,7 @@ void HTMLReader::SetupFilterOptions() return; OUString aFilterOptions = pItem->GetValue(); - static constexpr OUStringLiteral aXhtmlNsKey(u"xhtmlns="); + static constexpr OUString aXhtmlNsKey(u"xhtmlns="_ustr); if (aFilterOptions.startsWith(aXhtmlNsKey)) { OUString aNamespace = aFilterOptions.copy(aXhtmlNsKey.getLength()); diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 986e1e63525f..32cdb1ba5271 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -233,7 +233,7 @@ void SwHTMLWriter::SetupFilterOptions(std::u16string_view rFilterOptions) const uno::Sequence<OUString> aOptionSeq = comphelper::string::convertCommaSeparated(rFilterOptions); - static constexpr OUStringLiteral aXhtmlNsKey(u"xhtmlns="); + static constexpr OUString aXhtmlNsKey(u"xhtmlns="_ustr); for (const auto& rOption : aOptionSeq) { if (rOption == "XHTML") diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 42ff0fdf7a09..e7c1972ce9c0 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -968,7 +968,7 @@ void DocxExport::WriteDocVars(const sax_fastparser::FSHelperPtr& pFS) // Only write docVars if there will be at least a single docVar. bool bStarted = false; - constexpr OUStringLiteral aPrefix(u"com.sun.star.text.fieldmaster.User."); + constexpr OUString aPrefix(u"com.sun.star.text.fieldmaster.User."_ustr); for (const auto& rMasterName : std::as_const(aMasterNames)) { if (!rMasterName.startsWith(aPrefix)) diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 96f0f628f6a9..278e9c271e0e 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -693,7 +693,7 @@ void RtfExport::WriteDocVars() } // Only write docVars if there will be at least a single docVar. - constexpr OUStringLiteral aPrefix(u"com.sun.star.text.fieldmaster.User."); + constexpr OUString aPrefix(u"com.sun.star.text.fieldmaster.User."_ustr); for (const auto& rMasterName : std::as_const(aMasterNames)) { if (!rMasterName.startsWith(aPrefix)) diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 400b357009df..c51f8a1256ab 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2294,7 +2294,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr ) } OUString sURL = "#" + sBookmarkName; SwFormatINetFormat aURL( sURL, "" ); - static constexpr OUStringLiteral sLinkStyle(u"Index Link"); + static constexpr OUString sLinkStyle(u"Index Link"_ustr); const sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, SwGetPoolIdFromName::ChrFmt ); aURL.SetVisitedFormatAndId( sLinkStyle, nPoolId); diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index 09d34d2b893b..7281f0af0fc6 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -265,7 +265,7 @@ bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelpe if ( pCust ) { // currently only support built-in menu - static constexpr OUStringLiteral sMenuBar( u"private:resource/menubar/menubar" ); + static constexpr OUString sMenuBar( u"private:resource/menubar/menubar"_ustr ); // Get menu name SwTBC* pTBC = m_pWrapper->GetTBCAtOffset( rTBDelta.TBCStreamOffset() ); diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 230e1809c855..df59db44a78d 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -223,9 +223,9 @@ RedlineInfo::~RedlineInfo() delete pNextRedline; } -constexpr OUStringLiteral g_sShowChanges = u"ShowChanges"; -constexpr OUStringLiteral g_sRecordChanges = u"RecordChanges"; -constexpr OUStringLiteral g_sRedlineProtectionKey = u"RedlineProtectionKey"; +constexpr OUString g_sShowChanges = u"ShowChanges"_ustr; +constexpr OUString g_sRecordChanges = u"RecordChanges"_ustr; +constexpr OUString g_sRedlineProtectionKey = u"RedlineProtectionKey"_ustr; XMLRedlineImportHelper::XMLRedlineImportHelper( SvXMLImport & rImport, diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index fbccb3e5e735..a36c422a185f 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -604,7 +604,7 @@ ErrCodeMsg XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, if( xParentSet.is() ) { uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() ); - static constexpr OUStringLiteral sPropName(u"BuildId" ); + static constexpr OUString sPropName(u"BuildId"_ustr ); if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) ) { xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) ); @@ -738,9 +738,9 @@ ErrCodeMsg XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, ErrCodeMsg nRet = ERRCODE_NONE; // save redline mode into import info property set - static constexpr OUStringLiteral sShowChanges(u"ShowChanges"); - static constexpr OUStringLiteral sRecordChanges(u"RecordChanges"); - static constexpr OUStringLiteral sRedlineProtectionKey(u"RedlineProtectionKey"); + static constexpr OUString sShowChanges(u"ShowChanges"_ustr); + static constexpr OUString sRecordChanges(u"RecordChanges"_ustr); + static constexpr OUString sRedlineProtectionKey(u"RedlineProtectionKey"_ustr); xInfoSet->setPropertyValue( sShowChanges, Any(IDocumentRedlineAccess::IsShowChanges(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) ); xInfoSet->setPropertyValue( sRecordChanges, @@ -946,7 +946,7 @@ ErrCodeMsg XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, if( xModelSet.is() ) { uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() ); - static constexpr OUStringLiteral sName(u"BuildId" ); + static constexpr OUString sName(u"BuildId"_ustr ); if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sName) ) { xModelSet->setPropertyValue( sName, xInfoSet->getPropertyValue(sName) ); @@ -979,7 +979,7 @@ size_t XMLReader::GetSectionList( SfxMedium& rMedium, try { xml::sax::InputSource aParserInput; - static constexpr OUStringLiteral sDocName( u"content.xml" ); + static constexpr OUString sDocName( u"content.xml"_ustr ); aParserInput.sSystemId = sDocName; uno::Reference < io::XStream > xStm = xStg2->openStreamElement( sDocName, embed::ElementModes::READ ); diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index ae131a26f792..434eb8c07312 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -107,7 +107,7 @@ ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) Reference<XPropertySet> rInfoSet = getExportInfo(); if( rInfoSet.is() ) { - static constexpr OUStringLiteral sAutoTextMode(u"AutoTextMode"); + static constexpr OUString sAutoTextMode(u"AutoTextMode"_ustr); if( rInfoSet->getPropertySetInfo()->hasPropertyByName( sAutoTextMode ) ) { @@ -369,7 +369,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) Reference<XPropertySet> xInfoSet( getExportInfo() ); if ( xInfoSet.is() ) { - static constexpr OUStringLiteral sShowChanges( u"ShowChanges" ); + static constexpr OUString sShowChanges( u"ShowChanges"_ustr ); if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) ) { bShowRedlineChanges = *o3tl::doAccess<bool>(xInfoSet-> diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 3b37d1cf76a0..c84a3a3a3392 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -417,7 +417,7 @@ void SwXMLImport::startDocument() } bool bOverwrite = false; - static constexpr OUStringLiteral sStyleInsertModeOverwrite(u"StyleInsertModeOverwrite"); + static constexpr OUString sStyleInsertModeOverwrite(u"StyleInsertModeOverwrite"_ustr); if( xPropertySetInfo->hasPropertyByName(sStyleInsertModeOverwrite) ) { aAny = xImportInfo->getPropertyValue(sStyleInsertModeOverwrite); @@ -433,7 +433,7 @@ void SwXMLImport::startDocument() } // text insert mode? - static constexpr OUStringLiteral sTextInsertModeRange(u"TextInsertModeRange"); + static constexpr OUString sTextInsertModeRange(u"TextInsertModeRange"_ustr); if( xPropertySetInfo->hasPropertyByName(sTextInsertModeRange) ) { aAny = xImportInfo->getPropertyValue(sTextInsertModeRange); @@ -443,7 +443,7 @@ void SwXMLImport::startDocument() } // auto text mode - static constexpr OUStringLiteral sAutoTextMode(u"AutoTextMode"); + static constexpr OUString sAutoTextMode(u"AutoTextMode"_ustr); if( xPropertySetInfo->hasPropertyByName(sAutoTextMode) ) { aAny = xImportInfo->getPropertyValue(sAutoTextMode); @@ -455,7 +455,7 @@ void SwXMLImport::startDocument() } // organizer mode - static constexpr OUStringLiteral sOrganizerMode(u"OrganizerMode"); + static constexpr OUString sOrganizerMode(u"OrganizerMode"_ustr); if( xPropertySetInfo->hasPropertyByName(sOrganizerMode) ) { aAny = xImportInfo->getPropertyValue(sOrganizerMode); @@ -467,7 +467,7 @@ void SwXMLImport::startDocument() } // default document properties - static constexpr OUStringLiteral sDefSettings(u"DefaultDocumentSettings"); + static constexpr OUString sDefSettings(u"DefaultDocumentSettings"_ustr); if (xPropertySetInfo->hasPropertyByName(sDefSettings)) { aAny = xImportInfo->getPropertyValue(sDefSettings); diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 5565de4dfcd6..9c68a12f7055 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -76,7 +76,7 @@ SwNoTextNode *SwXMLTextParagraphExport::GetNoTextNode( return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode(); } -constexpr OUStringLiteral gsEmbeddedObjectProtocol( u"vnd.sun.star.EmbeddedObject:" ); +constexpr OUString gsEmbeddedObjectProtocol( u"vnd.sun.star.EmbeddedObject:"_ustr ); SwXMLTextParagraphExport::SwXMLTextParagraphExport( SwXMLExport& rExp, diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 2de570af0f0c..4b3ca1304e16 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -32,20 +32,20 @@ using namespace ::com::sun::star; const sal_Int32 LIST_LEVEL_COUNT = 9; -constexpr OUStringLiteral UNO_NAME_PARENT_NUMBERING = u"ParentNumbering"; -constexpr OUStringLiteral UNO_NAME_PREFIX = u"Prefix"; -constexpr OUStringLiteral UNO_NAME_SUFFIX = u"Suffix"; -constexpr OUStringLiteral UNO_NAME_CHAR_STYLE_NAME = u"CharStyleName"; -constexpr OUStringLiteral UNO_NAME_NUMBERING_TYPE = u"NumberingType"; -constexpr OUStringLiteral UNO_NAME_BULLET_CHAR = u"BulletChar"; - -constexpr OUStringLiteral CHAR_CLOSED_DOT = u"\u2022"; +constexpr OUString UNO_NAME_PARENT_NUMBERING = u"ParentNumbering"_ustr; +constexpr OUString UNO_NAME_PREFIX = u"Prefix"_ustr; +constexpr OUString UNO_NAME_SUFFIX = u"Suffix"_ustr; +constexpr OUString UNO_NAME_CHAR_STYLE_NAME = u"CharStyleName"_ustr; +constexpr OUString UNO_NAME_NUMBERING_TYPE = u"NumberingType"_ustr; +constexpr OUString UNO_NAME_BULLET_CHAR = u"BulletChar"_ustr; + +constexpr OUString CHAR_CLOSED_DOT = u"\u2022"_ustr; constexpr OUStringLiteral CHAR_EMPTY_DOT = u"o"; -constexpr OUStringLiteral CHAR_SQUARE = u"\u2540"; +constexpr OUString CHAR_SQUARE = u"\u2540"_ustr; constexpr OUStringLiteral CHAR_STAR_SYMBOL = u"\u272A"; -constexpr OUStringLiteral CHAR_FOUR_DIAMONDS = u"\u2756"; +constexpr OUString CHAR_FOUR_DIAMONDS = u"\u2756"_ustr; constexpr OUStringLiteral CHAR_DIAMOND = u"\u2726"; -constexpr OUStringLiteral CHAR_ARROW = u"\u27A2"; +constexpr OUString CHAR_ARROW = u"\u27A2"_ustr; constexpr OUStringLiteral CHAR_CHECK_MARK = u"\u2713"; SwVbaListHelper::SwVbaListHelper( css::uno::Reference< css::text::XTextDocument > xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) : mxTextDocument(std::move( xTextDoc )), mnGalleryType( nGalleryType ), mnTemplateType( nTemplateType ) diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 1e08c8f1246a..4e5a61fdeb50 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -184,7 +184,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() { sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText; OUString aHeading; - static constexpr OUStringLiteral HEADING = u"Heading"; + static constexpr OUString HEADING = u"Heading"_ustr; mxParaProps->getPropertyValue("ParaStyleName") >>= aHeading; if( aHeading.startsWith( HEADING ) ) { diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 78436664c3cb..f440fefe86e1 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -63,7 +63,7 @@ using namespace ::com::sun::star; -constexpr OUStringLiteral MASTER_LABEL = u"MasterLabel"; +constexpr OUString MASTER_LABEL = u"MasterLabel"_ustr; static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem, SwFrameFormat &rFormat, diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 52f9253252b0..a715bef70da1 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -985,7 +985,7 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) { IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag()); - static constexpr OUStringLiteral sPlus(u" + "); + static constexpr OUString sPlus(u" + "_ustr); if ( SfxStyleFamily::Page == nFamily ) { if( !pSet ) diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index 2659a1bb3b05..99d0ceb8c1e5 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; -constexpr OUStringLiteral CHAPTER_FILENAME = u"chapter.cfg"; +constexpr OUString CHAPTER_FILENAME = u"chapter.cfg"_ustr; /* Description: Saving a rule diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 40c9aac78da1..c8f89a44d4c0 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; -constexpr OUStringLiteral cAddressDataAssignments = u"AddressDataAssignments"; +constexpr OUString cAddressDataAssignments = u"AddressDataAssignments"_ustr; const char cDBColumnAssignments[] = "DBColumnAssignments"; const char cDataSourceName[] = "DataSource/DataSourceName"; const char cDataTableName[] = "DataSource/DataTableName" ; diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 2e0791116eb0..bb090fed460d 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -66,7 +66,7 @@ #include <flyfrm.hxx> #include <memory> -constexpr OUStringLiteral TOOLBOX_NAME = u"colorbar"; +constexpr OUString TOOLBOX_NAME = u"colorbar"_ustr; class SwGrfShell::SwExternalToolEdit : public ExternalToolEdit diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index e97d1bdcbef8..113b9a64c06f 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -121,9 +121,9 @@ namespace SwLangHelper // setting the new language... if (!aNewLangText.isEmpty()) { - static constexpr OUStringLiteral aSelectionLangPrefix(u"Current_"); - static constexpr OUStringLiteral aParagraphLangPrefix(u"Paragraph_"); - static constexpr OUStringLiteral aDocumentLangPrefix(u"Default_"); + static constexpr OUString aSelectionLangPrefix(u"Current_"_ustr); + static constexpr OUString aParagraphLangPrefix(u"Paragraph_"_ustr); + static constexpr OUString aDocumentLangPrefix(u"Default_"_ustr); sal_Int32 nPos = 0; bool bForSelection = true; diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index e93fa6613309..6bcabdd4292d 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -866,9 +866,9 @@ void SwTextShell::Execute(SfxRequest &rReq) // setting the new language... if (!aNewLangText.isEmpty()) { - static constexpr OUStringLiteral aSelectionLangPrefix(u"Current_"); - static constexpr OUStringLiteral aParagraphLangPrefix(u"Paragraph_"); - static constexpr OUStringLiteral aDocumentLangPrefix(u"Default_"); + static constexpr OUString aSelectionLangPrefix(u"Current_"_ustr); + static constexpr OUString aParagraphLangPrefix(u"Paragraph_"_ustr); + static constexpr OUString aDocumentLangPrefix(u"Default_"_ustr); SfxItemSetFixed <RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE, @@ -2077,8 +2077,8 @@ void SwTextShell::Execute(SfxRequest &rReq) if (pItem2) sApplyText = pItem2->GetValue(); - static constexpr OUStringLiteral sSpellingRule(u"Spelling_"); - static constexpr OUStringLiteral sGrammarRule(u"Grammar_"); + static constexpr OUString sSpellingRule(u"Spelling_"_ustr); + static constexpr OUString sGrammarRule(u"Grammar_"_ustr); bool bGrammar = false; sal_Int32 nPos = 0; diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index ffeebc15d140..06e073a75c24 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -43,11 +43,11 @@ #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/frame/XFrame.hpp> -constexpr OUStringLiteral SWPAGE_LEFT_GVALUE = u"Sw_Page_Left"; -constexpr OUStringLiteral SWPAGE_RIGHT_GVALUE = u"Sw_Page_Right"; -constexpr OUStringLiteral SWPAGE_TOP_GVALUE = u"Sw_Page_Top"; -constexpr OUStringLiteral SWPAGE_DOWN_GVALUE = u"Sw_Page_Down"; -constexpr OUStringLiteral SWPAGE_MIRROR_GVALUE = u"Sw_Page_Mirrored"; +constexpr OUString SWPAGE_LEFT_GVALUE = u"Sw_Page_Left"_ustr; +constexpr OUString SWPAGE_RIGHT_GVALUE = u"Sw_Page_Right"_ustr; +constexpr OUString SWPAGE_TOP_GVALUE = u"Sw_Page_Top"_ustr; +constexpr OUString SWPAGE_DOWN_GVALUE = u"Sw_Page_Down"_ustr; +constexpr OUString SWPAGE_MIRROR_GVALUE = u"Sw_Page_Mirrored"_ustr; namespace { diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx index 124b8abf8497..f73a4b0dd023 100644 --- a/sw/source/uibase/uno/SwXFilterOptions.cxx +++ b/sw/source/uibase/uno/SwXFilterOptions.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::document; using namespace ::com::sun::star::lang; -constexpr OUStringLiteral FILTER_OPTIONS_NAME = u"FilterOptions"; +constexpr OUString FILTER_OPTIONS_NAME = u"FilterOptions"_ustr; SwXFilterOptions::SwXFilterOptions() { diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index e06c5bbf803b..c940a148afb9 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -718,7 +718,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( aURLObj.SetSmartURL( aCurOutputURL ); OUString aPath = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ); - static constexpr OUStringLiteral aDelim( u"/" ); + static constexpr OUString aDelim( u"/"_ustr ); if (!aPath.isEmpty() && !aPath.endsWith(aDelim)) aPath += aDelim; if (bCurFileNameFromColumn) diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index b84bad1531c9..c1a2ae573e2d 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3455,7 +3455,7 @@ OString SwXTextDocument::getViewRenderState(SfxViewShell* pViewShell) namespace { -inline constexpr OUStringLiteral SELECTED_DATE_FORMAT = u"YYYY-MM-DD"; +inline constexpr OUString SELECTED_DATE_FORMAT = u"YYYY-MM-DD"_ustr; } void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments)