diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-06 09:42:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-07 00:47:20 +0200 |
commit | e0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 (patch) | |
tree | 1afe391a2b4bf9eda13de043658941060cb401c2 /writerfilter | |
parent | 9e3da252c361b3e2b04a2df7a3ae2a5177b37713 (diff) |
loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'writerfilter')
4 files changed, 11 insertions, 11 deletions
diff --git a/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx b/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx index 6300a488b409..e0d48f2726e5 100644 --- a/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx +++ b/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx @@ -143,16 +143,16 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunCheckbox) CPPUNIT_ASSERT(bChecked); OUString aCheckedState; xContentControlProps->getPropertyValue("CheckedState") >>= aCheckedState; - CPPUNIT_ASSERT_EQUAL(OUString(u"☒"), aCheckedState); + CPPUNIT_ASSERT_EQUAL(u"☒"_ustr, aCheckedState); OUString aUncheckedState; xContentControlProps->getPropertyValue("UncheckedState") >>= aUncheckedState; - CPPUNIT_ASSERT_EQUAL(OUString(u"☐"), aUncheckedState); + CPPUNIT_ASSERT_EQUAL(u"☐"_ustr, aUncheckedState); uno::Reference<text::XTextRange> xContentControlRange(xContentControl, uno::UNO_QUERY); uno::Reference<text::XText> xText = xContentControlRange->getText(); uno::Reference<container::XEnumerationAccess> xContentEnumAccess(xText, uno::UNO_QUERY); uno::Reference<container::XEnumeration> xContentEnum = xContentEnumAccess->createEnumeration(); uno::Reference<text::XTextRange> xContent(xContentEnum->nextElement(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(OUString(u"☒"), xContent->getString()); + CPPUNIT_ASSERT_EQUAL(u"☒"_ustr, xContent->getString()); } CPPUNIT_TEST_FIXTURE(Test, testSdtRunDropdown) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 4d91790ade4c..cddf8c6f6127 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -8765,11 +8765,11 @@ void DomainMapper_Impl::ImportGraphic(const writerfilter::Reference<Properties> uno::Reference< text::XTextCursor > xCrsr = xText->createTextCursor(); xCrsr->gotoEnd(false); PropertyMapPtr pEmpty(new PropertyMap()); - appendTextPortion(u"", pEmpty); + appendTextPortion(u""_ustr, pEmpty); appendTextContent( xTextContent, uno::Sequence< beans::PropertyValue >() ); bAppend = false; xCrsr->gotoEnd(false); - appendTextPortion(u"", pEmpty); + appendTextPortion(u""_ustr, pEmpty); m_bRedlineImageInPreviousRun = true; m_previousRedline = m_currentRedline; diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index fa03d3fdd286..194900b444de 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1016,20 +1016,20 @@ void StyleSheetTable_Impl::ApplyClonedTOCStylesToXText(uno::Reference<text::XTex while (xParaEnum->hasMoreElements()) { uno::Reference<lang::XServiceInfo> const xElem(xParaEnum->nextElement(), uno::UNO_QUERY_THROW); - if (xElem->supportsService(u"com.sun.star.text.Paragraph")) + if (xElem->supportsService(u"com.sun.star.text.Paragraph"_ustr)) { uno::Reference<beans::XPropertySet> const xPara(xElem, uno::UNO_QUERY_THROW); OUString styleName; - if (xPara->getPropertyValue(u"ParaStyleName") >>= styleName) + if (xPara->getPropertyValue(u"ParaStyleName"_ustr) >>= styleName) { auto const it(m_ClonedTOCStylesMap.find(styleName)); if (it != m_ClonedTOCStylesMap.end()) { - xPara->setPropertyValue(u"ParaStyleName", uno::Any(it->second)); + xPara->setPropertyValue(u"ParaStyleName"_ustr, uno::Any(it->second)); } } } - else if (xElem->supportsService(u"com.sun.star.text.TextTable")) + else if (xElem->supportsService(u"com.sun.star.text.TextTable"_ustr)) { uno::Reference<text::XTextTable> const xTable(xElem, uno::UNO_QUERY_THROW); uno::Sequence<OUString> const cells(xTable->getCellNames()); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index ccd90714526b..f2b695c3366e 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1292,12 +1292,12 @@ void OOXMLFastContextHandlerValue::pushBiDiEmbedLevel() { const bool bRtl = mpValue && mpValue->getInt() == NS_ooxml::LN_Value_ST_Direction_rtl; - OOXMLFactory::characters(this, bRtl ? OUString(u"\u202B") : OUString(u"\u202A")); // RLE / LRE + OOXMLFactory::characters(this, bRtl ? u"\u202B"_ustr : u"\u202A"_ustr); // RLE / LRE } void OOXMLFastContextHandlerValue::popBiDiEmbedLevel() { - OOXMLFactory::characters(this, u"\u202C"); // PDF (POP DIRECTIONAL FORMATTING) + OOXMLFactory::characters(this, u"\u202C"_ustr); // PDF (POP DIRECTIONAL FORMATTING) } void OOXMLFastContextHandlerValue::handleGridAfter() |