dbaccess/source/core/dataaccess/databasedocument.cxx | 4 desktop/source/app/cmdlineargs.cxx | 2 editeng/qa/unit/core-test.cxx | 14 editeng/source/misc/svxacorr.cxx | 14 forms/source/component/ImageControl.cxx | 2 forms/source/component/clickableimage.cxx | 2 framework/qa/cppunit/CheckXTitle.cxx | 22 - sc/qa/extras/scfunctionlistobj.cxx | 5 sc/qa/unit/GoalSeekTest.cxx | 4 sc/qa/unit/tiledrendering/tiledrendering.cxx | 4 sc/source/core/data/colorscale.cxx | 2 sc/source/ui/dbgui/PivotLayoutDialog.cxx | 4 sc/source/ui/dbgui/dbnamdlg.cxx | 2 sc/source/ui/dbgui/validate.cxx | 32 - sc/source/ui/namedlg/namedefdlg.cxx | 26 - sc/source/ui/namedlg/namedlg.cxx | 30 - sd/qa/unit/AnnotationTest.cxx | 36 - sd/qa/unit/import-tests2.cxx | 6 sd/qa/unit/layout-tests.cxx | 2 sd/source/core/drawdoc.cxx | 2 sd/source/ui/framework/module/ModuleController.cxx | 28 - sfx2/source/dialog/dinfdlg.cxx | 4 sfx2/source/view/viewfrm.cxx | 2 svx/qa/unit/svdraw.cxx | 8 svx/source/tbxctrls/bulletsnumbering.cxx | 2 sw/qa/core/text/txtfly.cxx | 2 sw/qa/extras/layout/layout2.cxx | 12 sw/qa/extras/layout/layout3.cxx | 4 sw/qa/extras/odfexport/odfexport2.cxx | 18 sw/qa/extras/odfimport/odfimport.cxx | 6 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 12 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 20 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 44 +- sw/qa/extras/ooxmlexport/ooxmlexport21.cxx | 20 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 2 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 6 sw/qa/extras/rtfexport/rtfexport7.cxx | 333 ++++++++-------- sw/qa/extras/rtfexport/rtfexport8.cxx | 60 +- sw/qa/extras/uiwriter/uiwriter6.cxx | 30 - sw/qa/extras/uiwriter/uiwriter8.cxx | 10 sw/qa/extras/uiwriter/uiwriter9.cxx | 6 sw/qa/extras/ww8export/ww8export4.cxx | 16 sw/qa/filter/ascii/ascii.cxx | 23 - sw/qa/filter/ww8/ww8.cxx | 8 sw/qa/writerfilter/dmapper/CellColorHandler.cxx | 2 sw/qa/writerfilter/dmapper/DomainMapper.cxx | 6 sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx | 7 sw/qa/writerfilter/dmapper/DomainMapperTableManager.cxx | 2 sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx | 4 sw/qa/writerfilter/dmapper/GraphicImport.cxx | 2 sw/qa/writerfilter/dmapper/PropertyMap.cxx | 2 sw/qa/writerfilter/dmapper/SdtHelper.cxx | 2 sw/qa/writerfilter/dmapper/SettingsTable.cxx | 6 sw/qa/writerfilter/dmapper/TableManager.cxx | 2 sw/qa/writerfilter/dmapper/TextEffectsHandler.cxx | 2 sw/qa/writerfilter/filter/WriterFilter.cxx | 4 sw/qa/writerfilter/ooxml/ooxml.cxx | 2 sw/qa/writerfilter/rtftok/rtfdispatchflag.cxx | 6 sw/qa/writerfilter/rtftok/rtfdispatchsymbol.cxx | 2 sw/qa/writerfilter/rtftok/rtfdispatchvalue.cxx | 2 sw/qa/writerfilter/rtftok/rtfdocumentimpl.cxx | 2 sw/qa/writerfilter/rtftok/rtfsdrimport.cxx | 2 sw/qa/writerfilter/rtftok/rtfsprm.cxx | 2 sw/qa/writerfilter/rtftok/rtftokenizer.cxx | 2 sw/source/core/doc/docredln.cxx | 2 sw/source/core/docnode/section.cxx | 2 sw/source/core/frmedt/feflyole.cxx | 2 sw/source/core/text/EnhancedPDFExportHelper.cxx | 2 sw/source/core/unocore/unofield.cxx | 2 sw/source/ui/config/optpage.cxx | 20 sw/source/ui/misc/pgfnote.cxx | 30 - sw/source/uibase/config/viewopt.cxx | 2 sw/source/uibase/docvw/edtwin2.cxx | 2 sw/source/uibase/uno/SwXDocumentSettings.cxx | 120 ++--- sw/source/uibase/uno/unotxdoc.cxx | 2 sw/source/uibase/utlui/content.cxx | 8 sw/source/uibase/utlui/glbltree.cxx | 2 sw/source/uibase/utlui/uitool.cxx | 2 sw/source/writerfilter/dmapper/DomainMapper.cxx | 4 sw/source/writerfilter/dmapper/GraphicImport.cxx | 84 ++-- sw/source/writerfilter/dmapper/PropertyMap.cxx | 2 sw/source/writerfilter/filter/WriterFilter.cxx | 20 toolkit/source/controls/dialogcontrol.cxx | 4 toolkit/source/controls/unocontrols.cxx | 2 vcl/qa/cppunit/complextext.cxx | 4 vcl/qa/cppunit/pdfexport/pdfexport2.cxx | 8 vcl/qa/cppunit/svm/svmtest.cxx | 6 vcl/qa/cppunit/text.cxx | 2 vcl/source/treelist/svtabbx.cxx | 2 vcl/unx/generic/app/salinst.cxx | 1 vcl/unx/gtk3/gtkinst.cxx | 2 xmloff/source/forms/elementimport.cxx | 2 92 files changed, 662 insertions(+), 631 deletions(-)
New commits: commit 0572ef356be49b95b22a4794b7937c8c0914468f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jun 18 10:24:03 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jun 18 13:16:23 2024 +0200 loplugin:ostr in various Change-Id: I7aa8ed716998a185996482dc561219b398a1c919 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 5e0bb346b572..0a56c115868b 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1254,7 +1254,7 @@ void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequen catch( const Exception& ) { Any aError = ::cppu::getCaughtException(); - m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToFailed", nullptr, aError ); + m_aEventNotifier.notifyDocumentEventAsync( u"OnSaveToFailed"_ustr, nullptr, aError ); if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() ) || aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() ) @@ -1267,7 +1267,7 @@ void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequen impl_throwIOExceptionCausedBySave_throw( aError, _rURL ); } - m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToDone", nullptr, Any( _rURL ) ); + m_aEventNotifier.notifyDocumentEventAsync( u"OnSaveToDone"_ustr, nullptr, Any( _rURL ) ); } // XModifyBroadcaster diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 09a0cd212947..fcb31520fd4d 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -542,7 +542,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) // open in viewmode eCurrentEvent = CommandLineEvent::Start; // start on the first slide unless a valid starting slide # was provided - m_startListParams = rest.toUInt32() > 0 ? rest : "1"; + m_startListParams = rest.toUInt32() > 0 ? rest : u"1"_ustr; } else if ( oArg == "display" ) { diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index 9cec620ed291..a57a533c42c4 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -810,7 +810,7 @@ void Test::testHTMLPaste() EditDoc& rDoc = aEditEngine.GetEditDoc(); //OString aHTML("<!DOCTYPE html> <html><body>test</body></html>"_ostr); std::vector<OString> aContent({ "<!DOCTYPE html> <html><body>test</body></html>"_ostr }); - std::vector<OUString> aMime({ "text/html" }); + std::vector<OUString> aMime({ u"text/html"_ustr }); uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime)); // When trying to paste HTML: @@ -830,7 +830,7 @@ void Test::testHTMLFragmentPaste() EditEngine aEditEngine(mpItemPool.get()); EditDoc& rDoc = aEditEngine.GetEditDoc(); std::vector<OString> aContent({ "a<b>b</b>c"_ostr }); - std::vector<OUString> aMime({ "text/html" }); + std::vector<OUString> aMime({ u"text/html"_ustr }); uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime)); @@ -852,7 +852,7 @@ void Test::testRTFPaste() EditDoc& rDoc = aEditEngine.GetEditDoc(); std::vector<OString> aContent( { "{\rtf1\adeflang1025\ansi{\ul www.libreoffice.org}}"_ostr }); - std::vector<OUString> aMime({ "text/richtext" }); + std::vector<OUString> aMime({ u"text/richtext"_ustr }); uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime)); // When trying to paste HTML: @@ -863,7 +863,7 @@ void Test::testRTFPaste() // - Expected: www.libreoffice.org // - Actual : // i.e. RTF and plain text paste worked, but not HTML. - CPPUNIT_ASSERT_EQUAL(OUString("www.libreoffice.org"), + CPPUNIT_ASSERT_EQUAL(u"www.libreoffice.org"_ustr, rDoc.GetParaAsString(static_cast<sal_Int32>(0))); } @@ -886,8 +886,8 @@ void Test::testRTFHTMLPaste() "</head><body lang=\"de-DE\" link=\"#000080\" vlink=\"#800000\" dir=\"ltr\">" "<p style=\"line-height: 100%; margin-bottom: 0cm\">abc</p></body></html>"_ostr }); std::vector<OUString> aMime( - { "text/richtext", - "application/x-openoffice-html-simple;windows_formatname=\"HTML Format\"" }); + { u"text/richtext"_ustr, + u"application/x-openoffice-html-simple;windows_formatname=\"HTML Format\""_ustr }); uno::Reference<datatransfer::XTransferable> xData(new TestTransferable(aContent, aMime)); // When trying to paste HTML: @@ -897,7 +897,7 @@ void Test::testRTFHTMLPaste() // expected "abc" // wrong: www.libreoffice.org // i.e. HTML is preferred over HTML. - CPPUNIT_ASSERT_EQUAL(OUString("abc"), rDoc.GetParaAsString(static_cast<sal_Int32>(0))); + CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, rDoc.GetParaAsString(static_cast<sal_Int32>(0))); } void Test::testMultiParaSelCopyPaste() { diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 4cc64f90a766..40d8804f0f4f 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -524,12 +524,12 @@ bool SvxAutoCorrect::FnChgOrdinalNumber( ( sEnd[0] == 'a' || sEnd[0] == 'o' || sEnd[0] == 'r' ) ) { auto aExtendedSuffixes = comphelper::sequenceToContainer< std::vector<OUString> >(aSuffixes); - aExtendedSuffixes.push_back("as"); // plural form of 'a' - aExtendedSuffixes.push_back("os"); // plural form of 'o' - aExtendedSuffixes.push_back("ra"); // alternative form of 'a' - aExtendedSuffixes.push_back("ro"); // alternative form of 'o' - aExtendedSuffixes.push_back("ras"); // alternative form of "as" - aExtendedSuffixes.push_back("ros"); // alternative form of "os" + aExtendedSuffixes.push_back(u"as"_ustr); // plural form of 'a' + aExtendedSuffixes.push_back(u"os"_ustr); // plural form of 'o' + aExtendedSuffixes.push_back(u"ra"_ustr); // alternative form of 'a' + aExtendedSuffixes.push_back(u"ro"_ustr); // alternative form of 'o' + aExtendedSuffixes.push_back(u"ras"_ustr); // alternative form of "as" + aExtendedSuffixes.push_back(u"ros"_ustr); // alternative form of "os" aSuffixes = comphelper::containerToSequence(aExtendedSuffixes); } @@ -552,7 +552,7 @@ bool SvxAutoCorrect::FnChgOrdinalNumber( rDoc.Delete( nNumEnd + 1, nNumEnd + 2 ); nSuffixChanged = -1; } - rDoc.Insert( nNumEnd + 1, "." ); + rDoc.Insert( nNumEnd + 1, u"."_ustr ); nNumberChanged = 1; } diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 418b5dcfa7ef..542783faca5e 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -400,7 +400,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream) bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator ) { OUString referer; - getPropertyValue("Referer") >>= referer; + getPropertyValue(u"Referer"_ustr) >>= referer; if (SvtSecurityOptions::isUntrustedReferer(referer)) { return false; } diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index adb92952ea02..53a2337ac429 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -758,7 +758,7 @@ namespace frm m_bProdStarted = false; OUString referer; - getPropertyValue("Referer") >>= referer; + getPropertyValue(u"Referer"_ustr) >>= referer; if (!SvtSecurityOptions::isUntrustedReferer(referer)) { // Kick off download (caution: can be synchronous). m_pMedium->Download(LINK(this, OClickableImageBaseModel, DownloadDoneLink)); diff --git a/framework/qa/cppunit/CheckXTitle.cxx b/framework/qa/cppunit/CheckXTitle.cxx index 227f89d7b240..175e473fdd91 100644 --- a/framework/qa/cppunit/CheckXTitle.cxx +++ b/framework/qa/cppunit/CheckXTitle.cxx @@ -40,8 +40,9 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle) // and asserts that the title doesn't change. // Load document - uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue("Hidden", false) }; - loadWithParams("private:factory/swriter", aLoadArgs); + uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue(u"Hidden"_ustr, + false) }; + loadWithParams(u"private:factory/swriter"_ustr, aLoadArgs); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<frame::XController> xController(xModel->getCurrentController()); @@ -58,7 +59,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle) xParser->parseStrict(printPreviewURL); uno::Reference<frame::XDispatchProvider> xDispatchProvider(xModel->getCurrentController(), uno::UNO_QUERY); - xDispatchProvider->queryDispatch(printPreviewURL, "", 0); + xDispatchProvider->queryDispatch(printPreviewURL, u""_ustr, 0); uno::Reference<frame::XTitle> xTitle2(xFrame, css::uno::UNO_QUERY); Scheduler::ProcessEventsToIdle(); @@ -71,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle) xParser->parseStrict(closePreviewURL); uno::Reference<frame::XDispatchProvider> xDispatchProvider2(xModel->getCurrentController(), uno::UNO_QUERY); - xDispatchProvider2->queryDispatch(closePreviewURL, "", 0); + xDispatchProvider2->queryDispatch(closePreviewURL, u""_ustr, 0); uno::Reference<frame::XTitle> xTitle3(xFrame, css::uno::UNO_QUERY); Scheduler::ProcessEventsToIdle(); @@ -84,7 +85,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkTitleSuggestedFileName) uno::Sequence<beans::PropertyValue> aArguments = { comphelper::makePropertyValue(u"SuggestedSaveAsName"_ustr, u"suggestedname.odt"_ustr), comphelper::makePropertyValue(u"Hidden"_ustr, false) }; - loadWithParams("private:factory/swriter", aArguments); + loadWithParams(u"private:factory/swriter"_ustr, aArguments); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<frame::XController> xController(xModel->getCurrentController()); uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY); @@ -100,8 +101,9 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck) // Set the frame title, then cycle through default and print preview. Close the window // and check for infinite recursion. - uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue("Hidden", false) }; - loadWithParams("private:factory/swriter", aLoadArgs); + uno::Sequence<beans::PropertyValue> aLoadArgs{ comphelper::makePropertyValue(u"Hidden"_ustr, + false) }; + loadWithParams(u"private:factory/swriter"_ustr, aLoadArgs); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<frame::XController> xController(xModel->getCurrentController()); @@ -116,7 +118,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck) util::URL printPreviewURL; printPreviewURL.Complete = u".uno::PrintPreview"_ustr; xParser->parseStrict(printPreviewURL); - xDispatchProvider->queryDispatch(printPreviewURL, "", 0); + xDispatchProvider->queryDispatch(printPreviewURL, u""_ustr, 0); Scheduler::ProcessEventsToIdle(); util::URL closePreviewURL; @@ -124,7 +126,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck) xParser->parseStrict(closePreviewURL); uno::Reference<frame::XDispatchProvider> xDispatchProvider2(xModel->getCurrentController(), uno::UNO_QUERY); - xDispatchProvider2->queryDispatch(closePreviewURL, "", 0); + xDispatchProvider2->queryDispatch(closePreviewURL, u""_ustr, 0); Scheduler::ProcessEventsToIdle(); util::URL closeDocURL; @@ -137,7 +139,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck) CPPUNIT_ASSERT_EQUAL(windowTitle, u"documentTitle"_ustr); - xDispatchProvider3->queryDispatch(closeDocURL, "", 0); + xDispatchProvider3->queryDispatch(closeDocURL, u""_ustr, 0); Scheduler::ProcessEventsToIdle(); } } diff --git a/sc/qa/extras/scfunctionlistobj.cxx b/sc/qa/extras/scfunctionlistobj.cxx index 431e63bd7ef2..f5260744a220 100644 --- a/sc/qa/extras/scfunctionlistobj.cxx +++ b/sc/qa/extras/scfunctionlistobj.cxx @@ -78,8 +78,9 @@ ScFunctionListObj::ScFunctionListObj() : UnoApiTest(u"/sc/qa/extras/testdocuments"_ustr) , XElementAccess(cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get()) , XIndexAccess(404) - , XNameAccess("IF") - , XServiceInfo("stardiv.StarCalc.ScFunctionListObj", "com.sun.star.sheet.FunctionDescriptions") + , XNameAccess(u"IF"_ustr) + , XServiceInfo(u"stardiv.StarCalc.ScFunctionListObj"_ustr, + u"com.sun.star.sheet.FunctionDescriptions"_ustr) { } diff --git a/sc/qa/unit/GoalSeekTest.cxx b/sc/qa/unit/GoalSeekTest.cxx index b9a3bbc6dbba..ae94c5dd40b3 100644 --- a/sc/qa/unit/GoalSeekTest.cxx +++ b/sc/qa/unit/GoalSeekTest.cxx @@ -42,7 +42,7 @@ CPPUNIT_TEST_FIXTURE(ScGoalSeekTest, testTdf161511) CPPUNIT_ASSERT(pModelObj); // Without the fix in place, this test would have crashed - sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, "100"); + sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, u"100"_ustr); CPPUNIT_ASSERT_EQUAL(0.0, res.Result); CPPUNIT_ASSERT_EQUAL(DBL_MAX, res.Divergence); } @@ -65,7 +65,7 @@ CPPUNIT_TEST_FIXTURE(ScGoalSeekTest, testTdf68034) ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); - sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, "2"); + sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, u"2"_ustr); // Without the fix in place, this test would have failed with // - Expected: 4 // - Actual : 0 diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 02b6783bfe44..d342e5ccefcc 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -3972,9 +3972,9 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testLeftOverflowEdit) // Go to Cell B5000 uno::Sequence<beans::PropertyValue> aPropertyValues = { - comphelper::makePropertyValue("ToPoint", OUString("$B$5000")), + comphelper::makePropertyValue(u"ToPoint"_ustr, u"$B$5000"_ustr), }; - dispatchCommand(mxComponent, ".uno:GoToCell", aPropertyValues); + dispatchCommand(mxComponent, u".uno:GoToCell"_ustr, aPropertyValues); // Enter edit mode and select all text. aView.m_aTextSelectionResult.clear(); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 4df58b5269a6..7c47bd1116ef 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -1508,7 +1508,7 @@ OUString ScIconSetFormat::getIconSetName( ScIconSetType eType ) if (pMap) return pMap->aName; - return ""; + return u""_ustr; } sal_Int32 ScIconSetFormat::getIconSetElements( ScIconSetType eType ) diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 8da65589ffb3..682dd3ea8411 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -110,8 +110,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( , mxSourceLabel(mxSourceFrame->weld_label_widget()) , mxDestFrame(m_xBuilder->weld_frame(u"frame1"_ustr)) , mxDestLabel(mxDestFrame->weld_label_widget()) - , mxOptions(m_xBuilder->weld_expander("options")) - , mxMore(m_xBuilder->weld_expander("more")) + , mxOptions(m_xBuilder->weld_expander(u"options"_ustr)) + , mxMore(m_xBuilder->weld_expander(u"more"_ustr)) { // Source UI Link<weld::Toggleable&,void> aLink2 = LINK(this, ScPivotLayoutDialog, ToggleSource); diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index e8a582da45f7..3b05ca1b371e 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -148,7 +148,7 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa , m_xModifyPB(m_xBuilder->weld_button(u"modify"_ustr)) , m_xInvalidFT(m_xBuilder->weld_label(u"invalid"_ustr)) , m_xFrameLabel(m_xAssignFrame->weld_label_widget()) - , m_xExpander(m_xBuilder->weld_expander("more")) + , m_xExpander(m_xBuilder->weld_expander(u"more"_ustr)) { m_xEdName->set_height_request_by_rows(4); m_xEdAssign->SetReferences(this, m_xFrameLabel.get()); diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 8924e451231c..4e17921701e2 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -362,22 +362,22 @@ ScTPValidationValue::ScTPValidationValue(weld::Container* pPage, weld::DialogCon , maStrRange(ScResId(SCSTR_VALID_RANGE)) , maStrList(ScResId(SCSTR_VALID_LIST)) , m_pRefEdit(nullptr) - , m_xLbAllow(m_xBuilder->weld_combo_box("allow")) - , m_xCbAllow(m_xBuilder->weld_check_button("allowempty")) - , m_xCbCaseSens(m_xBuilder->weld_check_button("casesens")) - , m_xCbShow(m_xBuilder->weld_check_button("showlist")) - , m_xCbSort(m_xBuilder->weld_check_button("sortascend")) - , m_xFtValue(m_xBuilder->weld_label("valueft")) - , m_xLbValue(m_xBuilder->weld_combo_box("data")) - , m_xFtMin(m_xBuilder->weld_label("minft")) - , m_xMinGrid(m_xBuilder->weld_widget("mingrid")) - , m_xEdMin(new formula::RefEdit(m_xBuilder->weld_entry("min"))) - , m_xEdList(m_xBuilder->weld_text_view("minlist")) - , m_xFtMax(m_xBuilder->weld_label("maxft")) - , m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry("max"))) - , m_xFtHint(m_xBuilder->weld_label("hintft")) - , m_xBtnRef(new formula::RefButton(m_xBuilder->weld_button("validref"))) - , m_xRefGrid(m_xBuilder->weld_container("refgrid")) + , m_xLbAllow(m_xBuilder->weld_combo_box(u"allow"_ustr)) + , m_xCbAllow(m_xBuilder->weld_check_button(u"allowempty"_ustr)) + , m_xCbCaseSens(m_xBuilder->weld_check_button(u"casesens"_ustr)) + , m_xCbShow(m_xBuilder->weld_check_button(u"showlist"_ustr)) + , m_xCbSort(m_xBuilder->weld_check_button(u"sortascend"_ustr)) + , m_xFtValue(m_xBuilder->weld_label(u"valueft"_ustr)) + , m_xLbValue(m_xBuilder->weld_combo_box(u"data"_ustr)) + , m_xFtMin(m_xBuilder->weld_label(u"minft"_ustr)) + , m_xMinGrid(m_xBuilder->weld_widget(u"mingrid"_ustr)) + , m_xEdMin(new formula::RefEdit(m_xBuilder->weld_entry(u"min"_ustr))) + , m_xEdList(m_xBuilder->weld_text_view(u"minlist"_ustr)) + , m_xFtMax(m_xBuilder->weld_label(u"maxft"_ustr)) + , m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry(u"max"_ustr))) + , m_xFtHint(m_xBuilder->weld_label(u"hintft"_ustr)) + , m_xBtnRef(new formula::RefButton(m_xBuilder->weld_button(u"validref"_ustr))) + , m_xRefGrid(m_xBuilder->weld_container(u"refgrid"_ustr)) , m_pRefEditParent(m_xRefGrid.get()) , m_pBtnRefParent(m_xRefGrid.get()) { diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx index 7e29d16e7b3f..83e88ff1f549 100644 --- a/sc/source/ui/namedlg/namedefdlg.cxx +++ b/sc/source/ui/namedlg/namedefdlg.cxx @@ -37,19 +37,19 @@ ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* , maErrInvalidNameCellRefStr( ScResId(STR_ERR_NAME_INVALID_CELL_REF)) , maErrNameInUse ( ScResId(STR_ERR_NAME_EXISTS)) , maRangeMap( std::move(aRangeMap) ) - , m_xEdName(m_xBuilder->weld_entry("edit")) - , m_xEdRange(new formula::RefEdit(m_xBuilder->weld_entry("range"))) - , m_xRbRange(new formula::RefButton(m_xBuilder->weld_button("refbutton"))) - , m_xLbScope(m_xBuilder->weld_combo_box("scope")) - , m_xBtnRowHeader(m_xBuilder->weld_check_button("rowheader")) - , m_xBtnColHeader(m_xBuilder->weld_check_button("colheader")) - , m_xBtnPrintArea(m_xBuilder->weld_check_button("printarea")) - , m_xBtnCriteria(m_xBuilder->weld_check_button("filter")) - , m_xBtnAdd(m_xBuilder->weld_button("add")) - , m_xBtnCancel(m_xBuilder->weld_button("cancel")) - , m_xFtInfo(m_xBuilder->weld_label("label")) - , m_xExpander(m_xBuilder->weld_expander("more")) - , m_xFtRange(m_xBuilder->weld_label("label3")) + , m_xEdName(m_xBuilder->weld_entry(u"edit"_ustr)) + , m_xEdRange(new formula::RefEdit(m_xBuilder->weld_entry(u"range"_ustr))) + , m_xRbRange(new formula::RefButton(m_xBuilder->weld_button(u"refbutton"_ustr))) + , m_xLbScope(m_xBuilder->weld_combo_box(u"scope"_ustr)) + , m_xBtnRowHeader(m_xBuilder->weld_check_button(u"rowheader"_ustr)) + , m_xBtnColHeader(m_xBuilder->weld_check_button(u"colheader"_ustr)) + , m_xBtnPrintArea(m_xBuilder->weld_check_button(u"printarea"_ustr)) + , m_xBtnCriteria(m_xBuilder->weld_check_button(u"filter"_ustr)) + , m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr)) + , m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xFtInfo(m_xBuilder->weld_label(u"label"_ustr)) + , m_xExpander(m_xBuilder->weld_expander(u"more"_ustr)) + , m_xFtRange(m_xBuilder->weld_label(u"label3"_ustr)) { m_xEdRange->SetReferences(this, m_xFtRange.get()); m_xRbRange->SetReferences(this, m_xEdRange.get()); diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index ebfaf6a122fe..bb03fd6f0dab 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -58,21 +58,21 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParen , mbDataChanged(false) , mbCloseWithoutUndo(false) - , m_xEdName(m_xBuilder->weld_entry("name")) - , m_xFtAssign(m_xBuilder->weld_label("label3")) - , m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry("range"))) - , m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button("assign"))) - , m_xLbScope(m_xBuilder->weld_combo_box("scope")) - , m_xBtnPrintArea(m_xBuilder->weld_check_button("printrange")) - , m_xBtnColHeader(m_xBuilder->weld_check_button("colheader")) - , m_xBtnCriteria(m_xBuilder->weld_check_button("filter")) - , m_xBtnRowHeader(m_xBuilder->weld_check_button("rowheader")) - , m_xBtnAdd(m_xBuilder->weld_button("add")) - , m_xBtnDelete(m_xBuilder->weld_button("delete")) - , m_xBtnOk(m_xBuilder->weld_button("ok")) - , m_xBtnCancel(m_xBuilder->weld_button("cancel")) - , m_xFtInfo(m_xBuilder->weld_label("info")) - , m_xExpander(m_xBuilder->weld_expander("more")) + , m_xEdName(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xFtAssign(m_xBuilder->weld_label(u"label3"_ustr)) + , m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry(u"range"_ustr))) + , m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button(u"assign"_ustr))) + , m_xLbScope(m_xBuilder->weld_combo_box(u"scope"_ustr)) + , m_xBtnPrintArea(m_xBuilder->weld_check_button(u"printrange"_ustr)) + , m_xBtnColHeader(m_xBuilder->weld_check_button(u"colheader"_ustr)) + , m_xBtnCriteria(m_xBuilder->weld_check_button(u"filter"_ustr)) + , m_xBtnRowHeader(m_xBuilder->weld_check_button(u"rowheader"_ustr)) + , m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr)) + , m_xBtnDelete(m_xBuilder->weld_button(u"delete"_ustr)) + , m_xBtnOk(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xFtInfo(m_xBuilder->weld_label(u"info"_ustr)) + , m_xExpander(m_xBuilder->weld_expander(u"more"_ustr)) { m_xEdAssign->SetReferences(this, m_xFtAssign.get()); m_xRbAssign->SetReferences(this, m_xEdAssign.get()); diff --git a/sd/qa/unit/AnnotationTest.cxx b/sd/qa/unit/AnnotationTest.cxx index 4883c7fb12ec..0f9e1c81ad0f 100644 --- a/sd/qa/unit/AnnotationTest.cxx +++ b/sd/qa/unit/AnnotationTest.cxx @@ -33,7 +33,7 @@ class AnnotationTest : public SdModelTestBase { public: AnnotationTest() - : SdModelTestBase("/sd/qa/unit/data/") + : SdModelTestBase(u"/sd/qa/unit/data/"_ustr) { } }; @@ -52,9 +52,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotation) rtl::Reference<sdr::annotation::Annotation> xAnnotation = pPage->createAnnotation(); CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount()); - xAnnotation->setAuthor("A"); + xAnnotation->setAuthor(u"A"_ustr); uno::Reference<text::XText> xText(xAnnotation->getTextRange()); - xText->setString("X"); + xText->setString(u"X"_ustr); xAnnotation->setPosition(geometry::RealPoint2D(0.0, 0.0)); xAnnotation->setSize(geometry::RealSize2D(10.0, 10.0)); @@ -72,9 +72,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotation) rtl::Reference<sdr::annotation::Annotation> xAnnotation = pPage->createAnnotation(); CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount()); - xAnnotation->setAuthor("B"); + xAnnotation->setAuthor(u"B"_ustr); uno::Reference<text::XText> xText(xAnnotation->getTextRange()); - xText->setString("XXX"); + xText->setString(u"XXX"_ustr); xAnnotation->setPosition(geometry::RealPoint2D(10.0, 10.0)); xAnnotation->setSize(geometry::RealSize2D(10.0, 10.0)); @@ -100,7 +100,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsert) SdPage* pPage = pViewShell->GetActualPage(); CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount()); - dispatchCommand(mxComponent, ".uno:InsertAnnotation", {}); + dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {}); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount()); @@ -117,9 +117,9 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationDelete) SdPage* pPage = pViewShell->GetActualPage(); CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount()); - dispatchCommand(mxComponent, ".uno:InsertAnnotation", {}); - dispatchCommand(mxComponent, ".uno:InsertAnnotation", {}); - dispatchCommand(mxComponent, ".uno:InsertAnnotation", {}); + dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {}); + dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {}); + dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {}); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(size_t(3), pPage->GetObjCount()); @@ -136,7 +136,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationDelete) uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence({ { "Id", uno::Any(OUString::number(xAnnotation->GetId())) }, })); - dispatchCommand(mxComponent, ".uno:DeleteAnnotation", aPropertyValues); + dispatchCommand(mxComponent, u".uno:DeleteAnnotation"_ustr, aPropertyValues); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount()); @@ -156,8 +156,8 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsertUndoRedo) SdPage* pPage = pViewShell->GetActualPage(); CPPUNIT_ASSERT_EQUAL(size_t(0), pPage->GetObjCount()); - dispatchCommand(mxComponent, ".uno:InsertAnnotation", {}); - dispatchCommand(mxComponent, ".uno:InsertAnnotation", {}); + dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {}); + dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, {}); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount()); @@ -169,24 +169,24 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationInsertUndoRedo) CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId()); CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 1), pPage->getAnnotations().at(1)->GetId()); - dispatchCommand(mxComponent, ".uno:Undo", {}); + dispatchCommand(mxComponent, u".uno:Undo"_ustr, {}); CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount()); CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->getAnnotations().size()); CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId()); - dispatchCommand(mxComponent, ".uno:Redo", {}); + dispatchCommand(mxComponent, u".uno:Redo"_ustr, {}); CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount()); CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->getAnnotations().size()); CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId()); CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 1), pPage->getAnnotations().at(1)->GetId()); - dispatchCommand(mxComponent, ".uno:DeleteAnnotation", {}); + dispatchCommand(mxComponent, u".uno:DeleteAnnotation"_ustr, {}); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount()); CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->getAnnotations().size()); CPPUNIT_ASSERT_EQUAL(sal_uInt32(nID + 0), pPage->getAnnotations().at(0)->GetId()); - dispatchCommand(mxComponent, ".uno:Undo", {}); + dispatchCommand(mxComponent, u".uno:Undo"_ustr, {}); Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->GetObjCount()); CPPUNIT_ASSERT_EQUAL(size_t(2), pPage->getAnnotations().size()); @@ -209,7 +209,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationUpdate) aArgs = comphelper::InitPropertySequence({ { "Text", uno::Any(u"Comment"_ustr) }, }); - dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); + dispatchCommand(mxComponent, u".uno:InsertAnnotation"_ustr, aArgs); CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount()); SdrObject* pObject = pPage->GetObj(0); @@ -234,7 +234,7 @@ CPPUNIT_TEST_FIXTURE(AnnotationTest, testAnnotationUpdate) { "PositionX", uno::Any(sal_Int32(1440)) }, { "PositionY", uno::Any(sal_Int32(14400)) } }); - dispatchCommand(mxComponent, ".uno:EditAnnotation", aArgs); + dispatchCommand(mxComponent, u".uno:EditAnnotation"_ustr, aArgs); CPPUNIT_ASSERT_DOUBLES_EQUAL(25.4, pAnnotationData->mxAnnotation->getPosition().X, 1E-4); CPPUNIT_ASSERT_DOUBLES_EQUAL(254.0, pAnnotationData->mxAnnotation->getPosition().Y, 1E-4); diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index ab66d016b665..e5c2a0dcc132 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -2027,7 +2027,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023) CPPUNIT_ASSERT_EQUAL(u"a"_ustr, run->getString()); uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW); double fCharHeight = 0; - xPropSet->getPropertyValue("CharHeight") >>= fCharHeight; + xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight; CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight); // No more runs CPPUNIT_ASSERT_THROW(getRunFromParagraph(1, paragraph), container::NoSuchElementException); @@ -2041,7 +2041,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023) CPPUNIT_ASSERT_EQUAL(u""_ustr, run->getString()); uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW); double fCharHeight = 0; - xPropSet->getPropertyValue("CharHeight") >>= fCharHeight; + xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight; // Without the fix, this would fail with // - Expected: 10 // - Actual : 18 @@ -2058,7 +2058,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf161023) CPPUNIT_ASSERT_EQUAL(u"c"_ustr, run->getString()); uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW); double fCharHeight = 0; - xPropSet->getPropertyValue("CharHeight") >>= fCharHeight; + xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight; CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight); // No more runs CPPUNIT_ASSERT_THROW(getRunFromParagraph(1, paragraph), container::NoSuchElementException); diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx index 35641beeee2d..d4f8d54681dd 100644 --- a/sd/qa/unit/layout-tests.cxx +++ b/sd/qa/unit/layout-tests.cxx @@ -333,7 +333,7 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf156955) xmlDocUniquePtr pXmlDoc = load("odp/tdf156955.odp"); // Make sure text box has the right size - without the fix it was 2759. - assertXPath(pXmlDoc, "/metafile/push/push/textarray[5]"_ostr, "y"_ostr, "3183"); + assertXPath(pXmlDoc, "/metafile/push/push/textarray[5]"_ostr, "y"_ostr, u"3183"_ustr); } CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf148966) diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 635696cd3695..4c411f94f6f7 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -840,7 +840,7 @@ void SdDrawDocument::UpdateAllLinks() rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true); } - m_pLinkManager->UpdateAllLinks(true, false, nullptr, ""); // query box: update all links? + m_pLinkManager->UpdateAllLinks(true, false, nullptr, u""_ustr); // query box: update all links? if (s_pDocLockedInsertingLinks == this) s_pDocLockedInsertingLinks = nullptr; // unlock inserting links diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx index 31d92148e6ab..8a60b16b3482 100644 --- a/sd/source/ui/framework/module/ModuleController.cxx +++ b/sd/source/ui/framework/module/ModuleController.cxx @@ -49,21 +49,21 @@ ModuleController::ModuleController(const rtl::Reference<::sd::DrawController>& r mpResourceToFactoryMap member. */ ProcessFactory( - "com.sun.star.drawing.framework.BasicPaneFactory", - { "private:resource/pane/CenterPane", - "private:resource/pane/LeftImpressPane", - "private:resource/pane/BottomImpressPane", - "private:resource/pane/LeftDrawPane" }); + u"com.sun.star.drawing.framework.BasicPaneFactory"_ustr, + { u"private:resource/pane/CenterPane"_ustr, + u"private:resource/pane/LeftImpressPane"_ustr, + u"private:resource/pane/BottomImpressPane"_ustr, + u"private:resource/pane/LeftDrawPane"_ustr }); ProcessFactory( - "com.sun.star.drawing.framework.BasicViewFactory", - { "private:resource/view/ImpressView", - "private:resource/view/GraphicView", - "private:resource/view/OutlineView", - "private:resource/view/NotesView", - "private:resource/view/NotesPanelView", - "private:resource/view/HandoutView", - "private:resource/view/SlideSorter", - "private:resource/view/PresentationView" }); + u"com.sun.star.drawing.framework.BasicViewFactory"_ustr, + { u"private:resource/view/ImpressView"_ustr, + u"private:resource/view/GraphicView"_ustr, + u"private:resource/view/OutlineView"_ustr, + u"private:resource/view/NotesView"_ustr, + u"private:resource/view/NotesPanelView"_ustr, + u"private:resource/view/HandoutView"_ustr, + u"private:resource/view/SlideSorter"_ustr, + u"private:resource/view/PresentationView"_ustr }); ProcessFactory( u"com.sun.star.drawing.framework.BasicToolBarFactory"_ustr, { u"private:resource/toolbar/ViewTabBar"_ustr }); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 5778ceb37980..ec594ddedac4 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -624,8 +624,8 @@ SfxDocumentDescPage::SfxDocumentDescPage(weld::Container* pPage, weld::DialogCon , m_xTitleEd(m_xBuilder->weld_entry(u"title"_ustr)) , m_xThemaEd(m_xBuilder->weld_entry(u"subject"_ustr)) , m_xKeywordsEd(m_xBuilder->weld_entry(u"keywords"_ustr)) - , m_xMoreTypes(m_xBuilder->weld_combo_box("cbMoreTypes")) - , m_xMoreValue(m_xBuilder->weld_entry("edMoreValue")) + , m_xMoreTypes(m_xBuilder->weld_combo_box(u"cbMoreTypes"_ustr)) + , m_xMoreValue(m_xBuilder->weld_entry(u"edMoreValue"_ustr)) , m_xCommentEd(m_xBuilder->weld_text_view(u"comments"_ustr)) { m_xCommentEd->set_size_request(-1, //m_xKeywordsEd->get_preferred_size().Width(), diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index ffa63ca0585d..b5bd686aa62a 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1645,7 +1645,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) wantsWhatsNew = false; if (officecfg::Setup::Product::WhatsNew::get()) { - VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("whatsnew", "", SfxResId(STR_WHATSNEW_TEXT), InfobarType::INFO); + VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar(u"whatsnew"_ustr, u""_ustr, SfxResId(STR_WHATSNEW_TEXT), InfobarType::INFO); if (pInfoBar) { weld::Button& rWhatsNewButton = pInfoBar->addButton(); diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index 5f16baae175d..450874b00e07 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -830,10 +830,10 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testContourText) // Text should be inside the shape and start at the bottom-right of the shape because of 180° // rotation. Without fix the text was rotated but positioned left-top of the shape. The first // line of text has started at (10000|7353), last line at (10000|5007). - assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "x"_ostr, "15998"); - assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "y"_ostr, "11424"); - assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "x"_ostr, "15998"); - assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "y"_ostr, "9291"); + assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "x"_ostr, u"15998"_ustr); + assertXPath(pXmlDoc, "(//textsimpleportion)[1]"_ostr, "y"_ostr, u"11424"_ustr); + assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "x"_ostr, u"15998"_ustr); + assertXPath(pXmlDoc, "(//textsimpleportion)[4]"_ostr, "y"_ostr, u"9291"_ustr); } CPPUNIT_TEST_FIXTURE(SvdrawTest, testContourTextCJK) diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index 0ce9057012e0..8e06d125ae4f 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -235,7 +235,7 @@ IMPL_LINK_NOARG(NumberingPopup, VSSelectValueSetDocHdl, ValueSet*, void) OUString sFont(aCustomBullets[nSelItem].second); auto aArgs(comphelper::InitPropertySequence( { { "BulletChar", css::uno::Any(nChar) }, { "BulletFont", css::uno::Any(sFont) } })); - mrController.dispatchCommand(".uno:SetBullet", aArgs); + mrController.dispatchCommand(u".uno:SetBullet"_ustr, aArgs); mrController.EndPopupMode(); } diff --git a/sw/qa/core/text/txtfly.cxx b/sw/qa/core/text/txtfly.cxx index 461ed81e2203..0160258ebc47 100644 --- a/sw/qa/core/text/txtfly.cxx +++ b/sw/qa/core/text/txtfly.cxx @@ -24,7 +24,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase("/sw/qa/core/text/data/") + : SwModelTestBase(u"/sw/qa/core/text/data/"_ustr) { } }; diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 4132c3bddcc5..b8ae7c8c6a41 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -869,9 +869,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf152872) assertXPath(pXmlDoc, "/root/page[1]/body/txt"_ostr, 2); assertXPath(pXmlDoc, "/root/page/body/txt[1]/SwParaPortion/SwLineLayout"_ostr, "portion"_ostr, - "C DE"); + u"C DE"_ustr); // 5 is empty and hidden - assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, "0"); + assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); dispatchCommand(mxComponent, u".uno:ControlCodes"_ustr, {}); @@ -892,7 +892,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf152872) // 5 is an empty paragraph with RES_CHRATR_HIDDEN which results in 0-height // frame; ideally it should only be hidden when control codes are hidden // and be a full-height frame now, but that needs more work... - assertXPath(pXmlDoc, "/root/page/body/txt[5]/infos/bounds"_ostr, "height"_ostr, "0"); + assertXPath(pXmlDoc, "/root/page/body/txt[5]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); dispatchCommand(mxComponent, u".uno:ControlCodes"_ustr, {}); @@ -901,9 +901,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf152872) assertXPath(pXmlDoc, "/root/page[1]/body/txt"_ostr, 2); assertXPath(pXmlDoc, "/root/page/body/txt[1]/SwParaPortion/SwLineLayout"_ostr, "portion"_ostr, - "C DE"); + u"C DE"_ustr); // 5 is empty and hidden - assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, "0"); + assertXPath(pXmlDoc, "/root/page/body/txt[2]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); } CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf151954) @@ -2339,7 +2339,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf116925) assertXPathContent( pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[6]/push[1]/push[3]/textarray/text"_ostr, - "hello"); + u"hello"_ustr); // This failed, text color was #000000. assertXPath( pXmlDoc, diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index ea0798af021e..3c75e2a20183 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -2765,7 +2765,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf160958_page_break) assertXPath(pExportDump, "//page/body/txt"_ostr, 3); assertXPath(pExportDump, "//page/body/section"_ostr, 1); - assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, "0"); + assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); assertXPath(pExportDump, "//page/body/txt[1]/SwParaPortion/SwLineLayout"_ostr, 6); assertXPath(pExportDump, "//page/body/section/txt"_ostr, 7); assertXPath(pExportDump, "//page/body/section/txt[1]/SwParaPortion"_ostr, 0); @@ -2854,7 +2854,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf160958_orphans) assertXPath(pExportDump, "//page"_ostr, 1); assertXPath(pExportDump, "//page/body/txt"_ostr, 22); assertXPath(pExportDump, "//page/body/section"_ostr, 1); - assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, "0"); + assertXPath(pExportDump, "//page/body/section/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); // Show the section again xSection->setPropertyValue(u"IsVisible"_ustr, css::uno::Any(true)); diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 2bce72b8ec61..9eb4048e2b4c 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -239,7 +239,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_always) CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_table) { uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator(); - if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString()))) + if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString()))) return; // last full line of the table is not hyphenated on page 1 @@ -248,14 +248,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_table) // This was 2 (not handling hyphenation-keep in tables) CPPUNIT_ASSERT_EQUAL(3, getPages()); - xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); + xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); assertXPath(pXmlDoc, "//style:style[@style:family='paragraph']/style:paragraph-properties[@loext:hyphenation-keep-type='page']"_ostr, 1); } CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_default_paragraph_style) { uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator(); - if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString()))) + if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString()))) return; // fo:hyphenation-keep="page" defined in default paragraph style @@ -266,7 +266,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_default_paragraph_style) CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_default_paragraph_style) { uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator(); - if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString()))) + if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString()))) return; // fo:hyphenation-keep="auto" defined in default paragraph style @@ -277,7 +277,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_default_paragraph_style) CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_text_body_style) { uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator(); - if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString()))) + if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString()))) return; // fo:hyphenation-keep="page" defined in text body style @@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_text_body_style) CPPUNIT_TEST_FIXTURE(Test, testTdf132599_auto_in_text_body_style) { uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator(); - if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString()))) + if (!xHyphenator->hasLocale(lang::Locale(u"en"_ustr, u"US"_ustr, OUString()))) return; // fo:hyphenation-keep="auto" defined in text body style @@ -1689,13 +1689,13 @@ DECLARE_ODFEXPORT_TEST(testTdf160877, "tdf160877.odt") CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Reference<text::XText> xHeaderTextPage1 = getProperty<uno::Reference<text::XText>>( - getStyles("PageStyles")->getByName("Standard"), "HeaderTextFirst"); - CPPUNIT_ASSERT_EQUAL(OUString("Classification: General Business"), xHeaderTextPage1->getString()); + getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), u"HeaderTextFirst"_ustr); + CPPUNIT_ASSERT_EQUAL(u"Classification: General Business"_ustr, xHeaderTextPage1->getString()); // Without the fix in place, this test would have failed with // - Expected: (Sign GB)Test // - Actual : Test - CPPUNIT_ASSERT_EQUAL(OUString("(Sign GB)Test"), getParagraph(1)->getString()); + CPPUNIT_ASSERT_EQUAL(u"(Sign GB)Test"_ustr, getParagraph(1)->getString()); } CPPUNIT_TEST_FIXTURE(Test, testMidnightRedlineDatetime) diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index d6bd2827ce74..6ce472d683e3 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -1579,7 +1579,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161054) CPPUNIT_ASSERT_EQUAL(u"a"_ustr, run->getString()); uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW); double fCharHeight = 0; - xPropSet->getPropertyValue("CharHeight") >>= fCharHeight; + xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight; CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight); // No more runs CPPUNIT_ASSERT_THROW(getRun(paragraph, 2), container::NoSuchElementException); @@ -1593,7 +1593,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161054) CPPUNIT_ASSERT_EQUAL(u""_ustr, run->getString()); uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW); double fCharHeight = 0; - xPropSet->getPropertyValue("CharHeight") >>= fCharHeight; + xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight; // Without the fix, this would fail with // - Expected: 10 // - Actual : 18 @@ -1610,7 +1610,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf161054) CPPUNIT_ASSERT_EQUAL(u"c"_ustr, run->getString()); uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW); double fCharHeight = 0; - xPropSet->getPropertyValue("CharHeight") >>= fCharHeight; + xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight; CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight); // No more runs CPPUNIT_ASSERT_THROW(getRun(paragraph, 2), container::NoSuchElementException); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index e09d97912d28..3712cb56bade 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -716,14 +716,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf156484, "tdf156484.docx") { auto xShape(getShape(1)); // Without the fix in place, this test would have failed here - CPPUNIT_ASSERT_MESSAGE("First shape should not be visible.", !getProperty<bool>(xShape, "Visible")); - CPPUNIT_ASSERT_MESSAGE("First shape should not be printable.", !getProperty<bool>(xShape, "Printable")); + CPPUNIT_ASSERT_MESSAGE("First shape should not be visible.", !getProperty<bool>(xShape, u"Visible"_ustr)); + CPPUNIT_ASSERT_MESSAGE("First shape should not be printable.", !getProperty<bool>(xShape, u"Printable"_ustr)); xShape = getShape(2); - CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, "Visible")); - CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, "Printable")); + CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, u"Visible"_ustr)); + CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, u"Printable"_ustr)); xShape = getShape(3); - CPPUNIT_ASSERT_MESSAGE("Third shape should not be visible.", !getProperty<bool>(xShape, "Visible")); - CPPUNIT_ASSERT_MESSAGE("Third shape should not be printable.", !getProperty<bool>(xShape, "Printable")); + CPPUNIT_ASSERT_MESSAGE("Third shape should not be visible.", !getProperty<bool>(xShape, u"Visible"_ustr)); + CPPUNIT_ASSERT_MESSAGE("Third shape should not be printable.", !getProperty<bool>(xShape, u"Printable"_ustr)); } DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx") diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index 47ac22113db4..d1e3647b9826 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -1498,8 +1498,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_page_in_default_paragraph_style) { // default paragraph style contains hyphenation settings loadAndReload("tdf160518_page_in_default_paragraph_style.fodt"); - xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml"); - assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1"); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr); + assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr); assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, 0); } @@ -1507,17 +1507,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_auto_in_default_paragraph_style) { // default paragraph style contains hyphenation settings loadAndReload("tdf160518_auto_in_default_paragraph_style.fodt"); - xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml"); - assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1"); - assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, "1"); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr); + assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr); + assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf160518_page_in_text_body_style) { // text body style contains hyphenation settings loadAndReload("tdf160518_page_in_text_body_style.fodt"); - xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml"); - assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1"); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr); + assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr); assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, 0); } @@ -1525,9 +1525,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160518_auto_in_text_body_style) { // text body style contains hyphenation settings loadAndReload("tdf160518_auto_in_text_body_style.fodt"); - xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml"); - assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, "1"); - assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, "1"); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/settings.xml"_ustr); + assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='useWord2013TrackBottomHyphenation']"_ostr, "val"_ostr, u"1"_ustr); + assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[@w:name='allowHyphenationAtTrackBottom']"_ostr, "val"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testHyphenationAuto) diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index 58f833d85732..cfc7d5fa1a16 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -1053,12 +1053,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf159158_zOrder_headerBehind2, "tdf159158_zOrder_h // and an overlapping blue rectangle anchored in the body text. uno::Reference<beans::XPropertySet> zOrder0(getShape(1), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder")); // higher - CPPUNIT_ASSERT_EQUAL(OUString("HeaderImage"), - getProperty<OUString>(zOrder0, "LinkDisplayName")); - CPPUNIT_ASSERT_EQUAL(OUString("BodyBlueRectangle"), - getProperty<OUString>(zOrder1, "LinkDisplayName")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); // higher + CPPUNIT_ASSERT_EQUAL(u"HeaderImage"_ustr, + getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr)); + CPPUNIT_ASSERT_EQUAL(u"BodyBlueRectangle"_ustr, + getProperty<OUString>(zOrder1, u"LinkDisplayName"_ustr)); // The logo should not be opaque since it is in the header. CPPUNIT_ASSERT(!getProperty<bool>(zOrder0, u"Opaque"_ustr)); // logo should be invisible CPPUNIT_ASSERT(!getProperty<bool>(zOrder1, u"Opaque"_ustr)); @@ -1070,10 +1070,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder, "tdf100037_inlineZOrder.doc // an inline image should always be behind a heaven-layer floating object. uno::Reference<beans::XPropertySet> zOrder0(getShape(1), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder")); // higher - CPPUNIT_ASSERT_EQUAL(OUString("Image 2"), getProperty<OUString>(zOrder0, "LinkDisplayName")); - CPPUNIT_ASSERT_EQUAL(OUString("Frame1"), getProperty<OUString>(zOrder1, "LinkDisplayName")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); // higher + CPPUNIT_ASSERT_EQUAL(u"Image 2"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr)); + CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder1, u"LinkDisplayName"_ustr)); } DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder2, "tdf100037_inlineZOrder2.docx") @@ -1087,14 +1087,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder2, "tdf100037_inlineZOrder2.d uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> zOrder2(getShape(3), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> zOrder3(getShape(4), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder")); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, "ZOrder")); - CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, "ZOrder")); // higher + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, u"ZOrder"_ustr)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, u"ZOrder"_ustr)); // higher // yellow textbox (Frame1) is the lowest - CPPUNIT_ASSERT_EQUAL(OUString("Frame1"), getProperty<OUString>(zOrder0, "LinkDisplayName")); + CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr)); //CPPUNIT_ASSERT_EQUAL(OUString("Image1"), getProperty<OUString>(zOrder1, "Name")); - CPPUNIT_ASSERT_EQUAL(OUString("Frame2"), getProperty<OUString>(zOrder2, "LinkDisplayName")); + CPPUNIT_ASSERT_EQUAL(u"Frame2"_ustr, getProperty<OUString>(zOrder2, u"LinkDisplayName"_ustr)); // CPPUNIT_ASSERT_EQUAL(OUString("Image2"), getProperty<OUString>(zOrder3, "LinkDisplayName")); } @@ -1109,14 +1109,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder3, "tdf100037_inlineZOrder3.d uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> zOrder2(getShape(3), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> zOrder3(getShape(4), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder")); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, "ZOrder")); - CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, "ZOrder")); // higher + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, u"ZOrder"_ustr)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, u"ZOrder"_ustr)); // higher // blue textbox (Frame2) is the lowest - CPPUNIT_ASSERT_EQUAL(OUString("Frame2"), getProperty<OUString>(zOrder0, "LinkDisplayName")); + CPPUNIT_ASSERT_EQUAL(u"Frame2"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr)); // CPPUNIT_ASSERT_EQUAL(OUString("Image2"), getProperty<OUString>(zOrder1, "LinkDisplayName")); - CPPUNIT_ASSERT_EQUAL(OUString("Frame1"), getProperty<OUString>(zOrder2, "LinkDisplayName")); + CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder2, u"LinkDisplayName"_ustr)); // CPPUNIT_ASSERT_EQUAL(OUString("Image1"), getProperty<OUString>(zOrder3, "LinkDisplayName")); } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx index a2636ef97e8a..81a5703b9ced 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx @@ -319,18 +319,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf158597, "tdf158597.docx") DECLARE_OOXMLEXPORT_TEST(testTdf156105_percentSuffix, "tdf156105_percentSuffix.odt") { // given a numbered list with a non-escaping percent symbol in the prefix and suffix - CPPUNIT_ASSERT_EQUAL(OUString("(%)[%]"), - getProperty<OUString>(getParagraph(3), "ListLabelString")); + CPPUNIT_ASSERT_EQUAL(u"(%)[%]"_ustr, + getProperty<OUString>(getParagraph(3), u"ListLabelString"_ustr)); // tdf#149258 - NONE number should not export separator since LO doesn't currently show it - CPPUNIT_ASSERT_EQUAL_MESSAGE("showing levels 1, 2, and 4", OUString("(%)1.1.1[%]"), - getProperty<OUString>(getParagraph(4), "ListLabelString")); + CPPUNIT_ASSERT_EQUAL_MESSAGE("showing levels 1, 2, and 4", u"(%)1.1.1[%]"_ustr, + getProperty<OUString>(getParagraph(4), u"ListLabelString"_ustr)); if (isExported()) { - xmlDocUniquePtr pXmlNum = parseExport("word/numbering.xml"); + xmlDocUniquePtr pXmlNum = parseExport(u"word/numbering.xml"_ustr); // The 3rd level is NONE. If we include the separator, MS Word will display it. assertXPath(pXmlNum, "/w:numbering/w:abstractNum[1]/w:lvl[4]/w:lvlText"_ostr, "val"_ostr, - "(%)%1.%2.%3%4[%]"); + u"(%)%1.%2.%3%4[%]"_ustr); } } @@ -570,8 +570,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf131098_imageFill, "tdf131098_imageFill.docx") { // given a document with an image background transparency (blue-white) CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, - getProperty<drawing::FillStyle>(getShape(1), "FillStyle")); - CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), getProperty<Color>(getShape(1), "FillColor")); + getProperty<drawing::FillStyle>(getShape(1), u"FillStyle"_ustr)); + CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), getProperty<Color>(getShape(1), u"FillColor"_ustr)); } DECLARE_OOXMLEXPORT_TEST(testTdf154369, "tdf154369.docx") @@ -599,11 +599,11 @@ CPPUNIT_TEST_FIXTURE(Test, testScreenTip) { loadAndSave("tdf159897.docx"); - xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml"); + xmlDocUniquePtr pXmlDocument = parseExport(u"word/document.xml"_ustr); // Hyperlink with ScreenTip assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:hyperlink"_ostr, "tooltip"_ostr, - "This is a hyperlink"); + u"This is a hyperlink"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testEmptyObjectRange) diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index fbd5ae53647b..6b91c7814321 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -318,7 +318,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeleft) CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeTableInTable) { loadAndSave("ooo96040-2.odt"); - parseExport("word/document.xml"); + parseExport(u"word/document.xml"_ustr); // Check tdf#161202 - this document has all kinds of tables inside hidden sections. // The page count must be 13, but for unclear reason, it is 12 in some tests on Linux diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 0c6e780c5a1e..f35c33931dd3 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -64,8 +64,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159897Broken_link) { auto xPara(getParagraph(i)); auto xRun = getRun(xPara, 0); - OUString sURL = getProperty<OUString>(xRun, "HyperLinkURL"); - CPPUNIT_ASSERT_EQUAL(OUString("https://libreoffice.org/"), sURL); + OUString sURL = getProperty<OUString>(xRun, u"HyperLinkURL"_ustr); + CPPUNIT_ASSERT_EQUAL(u"https://libreoffice.org/"_ustr, sURL); OUString sText; switch (i) @@ -99,7 +99,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159897Broken_link) break; } - OUString sScreenTip = getProperty<OUString>(xRun, "HyperLinkName"); + OUString sScreenTip = getProperty<OUString>(xRun, u"HyperLinkName"_ustr); CPPUNIT_ASSERT_EQUAL(sText, sScreenTip); } } diff --git a/sw/qa/extras/rtfexport/rtfexport7.cxx b/sw/qa/extras/rtfexport/rtfexport7.cxx index 57162cf30df1..a22b46e0ed06 100644 --- a/sw/qa/extras/rtfexport/rtfexport7.cxx +++ b/sw/qa/extras/rtfexport/rtfexport7.cxx @@ -38,7 +38,7 @@ class Test : public SwModelTestBase { public: Test() - : SwModelTestBase("/sw/qa/extras/rtfexport/data/", "Rich Text Format") + : SwModelTestBase(u"/sw/qa/extras/rtfexport/data/"_ustr, u"Rich Text Format"_ustr) { } }; @@ -48,7 +48,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPictureWrapPolygon) auto verify = [this]() { // The problem was that the wrap polygon was ignored during import. drawing::PointSequenceSequence aSeqSeq - = getProperty<drawing::PointSequenceSequence>(getShape(1), "ContourPolyPolygon"); + = getProperty<drawing::PointSequenceSequence>(getShape(1), u"ContourPolyPolygon"_ustr); // This was 0: the polygon list was empty. CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeqSeq.getLength()); @@ -57,9 +57,9 @@ CPPUNIT_TEST_FIXTURE(Test, testPictureWrapPolygon) // The shape also didn't have negative top / left coordinates. CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-1177)), - getProperty<sal_Int32>(getShape(1), "HoriOrientPosition")); + getProperty<sal_Int32>(getShape(1), u"HoriOrientPosition"_ustr)); CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-67)), - getProperty<sal_Int32>(getShape(1), "VertOrientPosition")); + getProperty<sal_Int32>(getShape(1), u"VertOrientPosition"_ustr)); }; createSwDoc("picture-wrap-polygon.rtf"); verify(); @@ -72,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf113408) auto verify = [this]() { // This was 0, left margin was not inherited from style properly. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), - getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin")); + getProperty<sal_Int32>(getParagraph(1), u"ParaLeftMargin"_ustr)); }; createSwDoc("tdf113408.rtf"); verify(); @@ -87,7 +87,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAbi10039) CPPUNIT_ASSERT_EQUAL(1, getPages()); // Make sure we don't just crash on export, and additionally the shape should not be inline (as it's at-page anchored originally). CPPUNIT_ASSERT(text::TextContentAnchorType_AS_CHARACTER - != getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType")); + != getProperty<text::TextContentAnchorType>(getShape(1), u"AnchorType"_ustr)); } CPPUNIT_TEST_FIXTURE(Test, testAbi10076) @@ -101,18 +101,23 @@ CPPUNIT_TEST_FIXTURE(Test, testEm) { auto verify = [this]() { // Test all possible cc* control words. - CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::NONE, - getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharEmphasis")); - CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_ABOVE, - getProperty<sal_Int16>(getRun(getParagraph(1), 2), "CharEmphasis")); - CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::ACCENT_ABOVE, - getProperty<sal_Int16>(getRun(getParagraph(1), 3), "CharEmphasis")); + CPPUNIT_ASSERT_EQUAL( + text::FontEmphasis::NONE, + getProperty<sal_Int16>(getRun(getParagraph(1), 1), u"CharEmphasis"_ustr)); + CPPUNIT_ASSERT_EQUAL( + text::FontEmphasis::DOT_ABOVE, + getProperty<sal_Int16>(getRun(getParagraph(1), 2), u"CharEmphasis"_ustr)); + CPPUNIT_ASSERT_EQUAL( + text::FontEmphasis::ACCENT_ABOVE, + getProperty<sal_Int16>(getRun(getParagraph(1), 3), u"CharEmphasis"_ustr)); // This was missing. - CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::CIRCLE_ABOVE, - getProperty<sal_Int16>(getRun(getParagraph(1), 4), "CharEmphasis")); + CPPUNIT_ASSERT_EQUAL( + text::FontEmphasis::CIRCLE_ABOVE, + getProperty<sal_Int16>(getRun(getParagraph(1), 4), u"CharEmphasis"_ustr)); // This one, too. - CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_BELOW, - getProperty<sal_Int16>(getRun(getParagraph(1), 5), "CharEmphasis")); + CPPUNIT_ASSERT_EQUAL( + text::FontEmphasis::DOT_BELOW, + getProperty<sal_Int16>(getRun(getParagraph(1), 5), u"CharEmphasis"_ustr)); }; createSwDoc("em.rtf"); verify(); @@ -124,10 +129,10 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberingFont) { auto verify = [this]() { uno::Reference<beans::XPropertySet> xStyle( - getStyles("CharacterStyles")->getByName("ListLabel 1"), uno::UNO_QUERY); + getStyles(u"CharacterStyles"_ustr)->getByName(u"ListLabel 1"_ustr), uno::UNO_QUERY); // This was Liberation Serif, i.e. custom font of the numbering itself ("1. ") was lost on import. - CPPUNIT_ASSERT_EQUAL(OUString("Impact"), getProperty<OUString>(xStyle, "CharFontName")); - CPPUNIT_ASSERT_EQUAL(72.f, getProperty<float>(xStyle, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(u"Impact"_ustr, getProperty<OUString>(xStyle, u"CharFontName"_ustr)); + CPPUNIT_ASSERT_EQUAL(72.f, getProperty<float>(xStyle, u"CharHeight"_ustr)); }; createSwDoc("numbering-font.rtf"); verify(); @@ -145,7 +150,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo82860) // 2) The exporter did not handle "shape with textbox" text. uno::Reference<text::XTextRange> xTextRange(getShape(1), uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextRange->getText(); - CPPUNIT_ASSERT_EQUAL(OUString("hello"), getParagraphOfText(1, xText)->getString()); + CPPUNIT_ASSERT_EQUAL(u"hello"_ustr, getParagraphOfText(1, xText)->getString()); } CPPUNIT_TEST_FIXTURE(Test, testFdo82858) @@ -153,19 +158,21 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo82858) loadAndReload("fdo82858.docx"); // This was table::BorderLineStyle::SOLID, exporter failed to write explicit no line when line color was written. CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::NONE, - getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineStyle); + getProperty<table::BorderLine2>(getShape(1), u"TopBorder"_ustr).LineStyle); } CPPUNIT_TEST_FIXTURE(Test, testTdf104936) { auto verify = [this]() { uno::Reference<text::XTextRange> xShape1(getShape(1), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xShape1, "ZOrder")); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), + getProperty<sal_Int32>(xShape1, u"ZOrder"_ustr)); // This failed, the shape without text covered the shape with text. CPPUNIT_ASSERT(xShape1->getString().isEmpty()); uno::Reference<text::XTextRange> xShape2(getShape(2), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), getProperty<sal_Int32>(xShape2, "ZOrder")); - CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xShape2->getString()); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), + getProperty<sal_Int32>(xShape2, u"ZOrder"_ustr)); + CPPUNIT_ASSERT_EQUAL(u"Hello"_ustr, xShape2->getString()); }; createSwDoc("tdf104936.rtf"); verify(); @@ -182,7 +189,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableRtl) uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); // This was text::WritingMode2::LR_TB, i.e. direction of the table was ignored. CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, - getProperty<sal_Int16>(xTable, "WritingMode")); + getProperty<sal_Int16>(xTable, u"WritingMode"_ustr)); }; createSwDoc("table-rtl.rtf"); verify(); @@ -196,13 +203,14 @@ CPPUNIT_TEST_FIXTURE(Test, testNumOverrideStart) // The numbering on the second level was "3.1", not "1.3". uno::Reference<container::XIndexAccess> xRules = getProperty<uno::Reference<container::XIndexAccess>>( - getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules"); - CPPUNIT_ASSERT_EQUAL( - sal_Int16(1), - comphelper::SequenceAsHashMap(xRules->getByIndex(0))["StartWith"].get<sal_Int16>()); - CPPUNIT_ASSERT_EQUAL( - sal_Int16(3), - comphelper::SequenceAsHashMap(xRules->getByIndex(1))["StartWith"].get<sal_Int16>()); + getStyles(u"NumberingStyles"_ustr)->getByName(u"WWNum1"_ustr), + u"NumberingRules"_ustr); + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), + comphelper::SequenceAsHashMap(xRules->getByIndex(0))[u"StartWith"_ustr] + .get<sal_Int16>()); + CPPUNIT_ASSERT_EQUAL(sal_Int16(3), + comphelper::SequenceAsHashMap(xRules->getByIndex(1))[u"StartWith"_ustr] + .get<sal_Int16>()); }; createSwDoc("num-override-start.rtf"); verify(); @@ -215,13 +223,13 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo82006) auto verify = [this]() { // These were 176 (100 twips), as \sbauto and \sbbefore were ignored. CPPUNIT_ASSERT_EQUAL(sal_Int32(0), - getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin")); + getProperty<sal_Int32>(getParagraph(1), u"ParaTopMargin"_ustr)); CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), - getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin")); + getProperty<sal_Int32>(getParagraph(1), u"ParaBottomMargin"_ustr)); CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), - getProperty<sal_Int32>(getParagraph(2), "ParaTopMargin")); + getProperty<sal_Int32>(getParagraph(2), u"ParaTopMargin"_ustr)); CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), - getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin")); + getProperty<sal_Int32>(getParagraph(2), u"ParaBottomMargin"_ustr)); }; createSwDoc("fdo82006.rtf"); verify(); @@ -234,9 +242,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104081) auto verify = [this]() { // These were 494 (280 twips), as \htmautsp was ignored. CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(100)), - getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin")); + getProperty<sal_Int32>(getParagraph(1), u"ParaTopMargin"_ustr)); CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(100)), - getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin")); + getProperty<sal_Int32>(getParagraph(1), u"ParaBottomMargin"_ustr)); }; createSwDoc("tdf104081.rtf"); verify(); @@ -250,8 +258,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88583) CPPUNIT_ASSERT_EQUAL(1, getPages()); // This was FillStyle_NONE, as background color was missing from the color table during export. CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, - getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle")); - CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty<Color>(getParagraph(1), "FillColor")); + getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr)); + CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty<Color>(getParagraph(1), u"FillColor"_ustr)); } CPPUNIT_TEST_FIXTURE(Test, testMargmirror) @@ -259,9 +267,10 @@ CPPUNIT_TEST_FIXTURE(Test, testMargmirror) auto verify = [this]() { // \margmirror was not handled, this was PageStyleLayout_ALL. uno::Reference<beans::XPropertySet> xPageStyle( - getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(style::PageStyleLayout_MIRRORED, - getProperty<style::PageStyleLayout>(xPageStyle, "PageStyleLayout")); + getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL( + style::PageStyleLayout_MIRRORED, + getProperty<style::PageStyleLayout>(xPageStyle, u"PageStyleLayout"_ustr)); }; createSwDoc("margmirror.rtf"); verify(); @@ -274,11 +283,11 @@ CPPUNIT_TEST_FIXTURE(Test, testSautoupd) auto verify = [this]() { // \sautoupd was ignored during import and export. uno::Reference<beans::XPropertySet> xHeading1( - getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xHeading1, "IsAutoUpdate")); + getStyles(u"ParagraphStyles"_ustr)->getByName(u"Heading 1"_ustr), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xHeading1, u"IsAutoUpdate"_ustr)); uno::Reference<beans::XPropertySet> xHeading2( - getStyles("ParagraphStyles")->getByName("Heading 2"), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xHeading2, "IsAutoUpdate")); + getStyles(u"ParagraphStyles"_ustr)->getByName(u"Heading 2"_ustr), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xHeading2, u"IsAutoUpdate"_ustr)); }; createSwDoc("sautoupd.rtf"); verify(); @@ -289,7 +298,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSautoupd) CPPUNIT_TEST_FIXTURE(Test, testHyphauto) { auto verify = [this]() { - CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getParagraph(1), "ParaIsHyphenation")); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getParagraph(1), u"ParaIsHyphenation"_ustr)); }; createSwDoc("hyphauto.rtf"); verify(); @@ -301,7 +310,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHyphpar) { auto verify = [this]() { // Hyphenation was enabled for all 3 paragraphs, but it should be disabled for the 2nd one. - CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getParagraph(2), "ParaIsHyphenation")); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getParagraph(2), u"ParaIsHyphenation"_ustr)); }; createSwDoc("hyphpar.rtf"); verify(); @@ -313,9 +322,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf108955) { auto verify = [this]() { CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, - getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle")); + getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr)); // This was 0xffffff, i.e. non-white background was overwritten from the paragraph style. - CPPUNIT_ASSERT_EQUAL(Color(0xffff99), getProperty<Color>(getParagraph(1), "FillColor")); + CPPUNIT_ASSERT_EQUAL(Color(0xffff99), + getProperty<Color>(getParagraph(1), u"FillColor"_ustr)); }; createSwDoc("tdf108955.rtf"); verify(); @@ -334,7 +344,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf80708) // This was 2, i.e. the second table had 3 cols, now 2 as expected. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), getProperty<uno::Sequence<text::TableColumnSeparator>>( - xTableRows->getByIndex(0), "TableColumnSeparators") + xTableRows->getByIndex(0), u"TableColumnSeparators"_ustr) .getLength()); }; createSwDoc("tdf80708.rtf"); @@ -348,8 +358,8 @@ CPPUNIT_TEST_FIXTURE(Test, testHyperlinkWithoutURL) createSwDoc("tdf90421.fodt"); // Change the hyperlink, so its URL is empty. uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 2), uno::UNO_QUERY); - xRun->setPropertyValue("HyperLinkURL", uno::Any(OUString())); - saveAndReload("Rich Text Format"); + xRun->setPropertyValue(u"HyperLinkURL"_ustr, uno::Any(OUString())); + saveAndReload(u"Rich Text Format"_ustr); SvMemoryStream aMemoryStream; SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ); aStream.ReadStream(aMemoryStream); @@ -371,10 +381,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf114309) auto verify = [this]() { // Without the fix in place, this test would have failed with // - the property is of unexpected type or void: TextSection - auto xTextSection - = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(1), "TextSection"); + auto xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(1), + u"TextSection"_ustr); auto xTextColumns - = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns"); + = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, u"TextColumns"_ustr); CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount()); }; createSwDoc("tdf114309.rtf"); @@ -386,13 +396,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf114309) CPPUNIT_TEST_FIXTURE(Test, testTdf94043) { auto verify = [this]() { - auto xTextSection - = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(2), "TextSection"); + auto xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(2), + u"TextSection"_ustr); auto xTextColumns - = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns"); + = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, u"TextColumns"_ustr); // This was 0, the separator line was not visible due to 0 width. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), - getProperty<sal_Int32>(xTextColumns, "SeparatorLineWidth")); + getProperty<sal_Int32>(xTextColumns, u"SeparatorLineWidth"_ustr)); CPPUNIT_ASSERT_EQUAL(7, getParagraphs()); }; @@ -410,16 +420,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94377) xTextFieldsSupplier->getTextFields()); uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration()); uno::Reference<beans::XPropertySet> xPropertySet(xFields->nextElement(), uno::UNO_QUERY); - auto xText = getProperty<uno::Reference<text::XText>>(xPropertySet, "TextRange"); + auto xText = getProperty<uno::Reference<text::XText>>(xPropertySet, u"TextRange"_ustr); // This failed, as: // 1) multiple paragraphs were not exported, so the text was "Asdf10asdf12". // 2) direct formatting of runs were not exported, so this was 12 (the document default). CPPUNIT_ASSERT_EQUAL( - 10.f, - getProperty<float>(getRun(getParagraphOfText(1, xText, "Asdf10"), 1), "CharHeight")); + 10.f, getProperty<float>(getRun(getParagraphOfText(1, xText, u"Asdf10"_ustr), 1), + u"CharHeight"_ustr)); CPPUNIT_ASSERT_EQUAL( - 12.f, - getProperty<float>(getRun(getParagraphOfText(2, xText, "asdf12"), 1), "CharHeight")); + 12.f, getProperty<float>(getRun(getParagraphOfText(2, xText, u"asdf12"_ustr), 1), + u"CharHeight"_ustr)); }; createSwDoc("tdf94377.rtf"); verify(); @@ -441,7 +451,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104079) bFound = true; // This was 0, 3rd paragraph of ToC lost its bottom paragraph margin. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(212), - getProperty<sal_Int32>(xParagraph, "ParaBottomMargin")); + getProperty<sal_Int32>(xParagraph, u"ParaBottomMargin"_ustr)); } }; createSwDoc("tdf104079.rtf"); @@ -455,8 +465,8 @@ CPPUNIT_TEST_FIXTURE(Test, testPageBackground) auto verify = [this]() { // The problem was that ackground was ignored. uno::Reference<beans::XPropertySet> xPageStyle( - getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getProperty<Color>(xPageStyle, "BackColor")); + getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getProperty<Color>(xPageStyle, u"BackColor"_ustr)); }; createSwDoc("page-background.rtf"); verify(); @@ -475,8 +485,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf96175) uno::Reference<beans::XPropertyContainer> xUserDefinedProperties = xDocumentProperties->getUserDefinedProperties(); // This resulted in a beans::UnknownPropertyException. - CPPUNIT_ASSERT_EQUAL(OUString("foobar"), - getProperty<OUString>(xUserDefinedProperties, "Company")); + CPPUNIT_ASSERT_EQUAL(u"foobar"_ustr, + getProperty<OUString>(xUserDefinedProperties, u"Company"_ustr)); }; createSwDoc("tdf96175.rtf"); verify(); @@ -487,10 +497,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf96175) CPPUNIT_TEST_FIXTURE(Test, testRedline) { auto verify = [this]() { - CPPUNIT_ASSERT_EQUAL(OUString("Rebecca Lopez"), - getProperty<OUString>(getRun(getParagraph(1), 2), "RedlineAuthor")); - CPPUNIT_ASSERT_EQUAL(OUString("Dorothy Jones"), - getProperty<OUString>(getRun(getParagraph(2), 2), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL( + u"Rebecca Lopez"_ustr, + getProperty<OUString>(getRun(getParagraph(1), 2), u"RedlineAuthor"_ustr)); + CPPUNIT_ASSERT_EQUAL( + u"Dorothy Jones"_ustr, + getProperty<OUString>(getRun(getParagraph(2), 2), u"RedlineAuthor"_ustr)); }; createSwDoc("redline.rtf"); verify(); @@ -509,28 +521,29 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomDocProps) uno::Reference<beans::XPropertyContainer> xUserDefinedProperties = xDocumentProperties->getUserDefinedProperties(); CPPUNIT_ASSERT_EQUAL( - OUString("2016-03-08T10:55:18,531376147"), - getProperty<OUString>(xUserDefinedProperties, - "urn:bails:IntellectualProperty:Authorization:StartValidity")); + u"2016-03-08T10:55:18,531376147"_ustr, + getProperty<OUString>( + xUserDefinedProperties, + u"urn:bails:IntellectualProperty:Authorization:StartValidity"_ustr)); CPPUNIT_ASSERT_EQUAL( - OUString("None"), - getProperty<OUString>(xUserDefinedProperties, - "urn:bails:IntellectualProperty:Authorization:StopValidity")); + u"None"_ustr, getProperty<OUString>( + xUserDefinedProperties, + u"urn:bails:IntellectualProperty:Authorization:StopValidity"_ustr)); // Test roundtrip of numbers. This failed as getProperty() did not find "n". - CPPUNIT_ASSERT_EQUAL(42.0, getProperty<double>(xUserDefinedProperties, "n")); + CPPUNIT_ASSERT_EQUAL(42.0, getProperty<double>(xUserDefinedProperties, u"n"_ustr)); // Test boolean "yes". - CPPUNIT_ASSERT(getProperty<bool>(xUserDefinedProperties, "by")); + CPPUNIT_ASSERT(getProperty<bool>(xUserDefinedProperties, u"by"_ustr)); // Test boolean "no". - CPPUNIT_ASSERT(!getProperty<bool>(xUserDefinedProperties, "bn")); + CPPUNIT_ASSERT(!getProperty<bool>(xUserDefinedProperties, u"bn"_ustr)); // Test roundtrip of date in general, and year/month/day in particular. - util::DateTime aDate = getProperty<util::DateTime>(xUserDefinedProperties, "d"); + util::DateTime aDate = getProperty<util::DateTime>(xUserDefinedProperties, u"d"_ustr); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2016), aDate.Year); CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(1), aDate.Month); CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(30), aDate.Day); // Test real number. - CPPUNIT_ASSERT_EQUAL(3.14, getProperty<double>(xUserDefinedProperties, "pi")); + CPPUNIT_ASSERT_EQUAL(3.14, getProperty<double>(xUserDefinedProperties, u"pi"_ustr)); }; createSwDoc("custom-doc-props.rtf"); verify(); @@ -541,21 +554,21 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomDocProps) CPPUNIT_TEST_FIXTURE(Test, testTdf65642) { auto verify = [this]() { - uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles"); + uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier( xModel->getCurrentController(), uno::UNO_QUERY); uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); xCursor->jumpToLastPage(); - OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName"); + OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr); // The second page's numbering type: this was style::NumberingType::ARABIC. CPPUNIT_ASSERT_EQUAL( style::NumberingType::CHARS_UPPER_LETTER_N, - getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType")); + getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr)); // The second page's restart value: this was 0. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), - getProperty<sal_Int32>(getParagraph(2), "PageNumberOffset")); + getProperty<sal_Int32>(getParagraph(2), u"PageNumberOffset"_ustr)); }; createSwDoc("tdf65642.rtf"); verify(); @@ -566,18 +579,18 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf65642) CPPUNIT_TEST_FIXTURE(Test, testPgnlcltr) { auto verify = [this]() { - uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles"); + uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier( xModel->getCurrentController(), uno::UNO_QUERY); uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); xCursor->jumpToLastPage(); - OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName"); + OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr); // The second page's numbering type: this was style::NumberingType::ARABIC. CPPUNIT_ASSERT_EQUAL( style::NumberingType::CHARS_LOWER_LETTER_N, - getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType")); + getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr)); }; createSwDoc("pgnlcltr.rtf"); verify(); @@ -588,18 +601,18 @@ CPPUNIT_TEST_FIXTURE(Test, testPgnlcltr) CPPUNIT_TEST_FIXTURE(Test, testPgnucrm) { auto verify = [this]() { - uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles"); + uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier( xModel->getCurrentController(), uno::UNO_QUERY); uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); xCursor->jumpToLastPage(); - OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName"); + OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr); // The second page's numbering type: this was style::NumberingType::ARABIC. CPPUNIT_ASSERT_EQUAL( style::NumberingType::ROMAN_UPPER, - getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType")); + getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr)); }; createSwDoc("pgnucrm.rtf"); verify(); @@ -610,18 +623,18 @@ CPPUNIT_TEST_FIXTURE(Test, testPgnucrm) CPPUNIT_TEST_FIXTURE(Test, testPgnlcrm) { auto verify = [this]() { - uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles"); + uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier( xModel->getCurrentController(), uno::UNO_QUERY); uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); xCursor->jumpToLastPage(); - OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName"); + OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr); // The second page's numbering type: this was style::NumberingType::ARABIC. CPPUNIT_ASSERT_EQUAL( style::NumberingType::ROMAN_LOWER, - getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType")); + getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr)); }; createSwDoc("pgnlcrm.rtf"); verify(); @@ -632,22 +645,22 @@ CPPUNIT_TEST_FIXTURE(Test, testPgnlcrm) CPPUNIT_TEST_FIXTURE(Test, testPgndec) { auto verify = [this]() { - uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles"); + uno::Reference<container::XNameAccess> xPageStyles = getStyles(u"PageStyles"_ustr); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier( xModel->getCurrentController(), uno::UNO_QUERY); uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); xCursor->jumpToLastPage(); - OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName"); + OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr); // The second page's numbering type: this was style::NumberingType::ROMAN_LOWER. CPPUNIT_ASSERT_EQUAL( style::NumberingType::ARABIC, - getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), "NumberingType")); + getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName), u"NumberingType"_ustr)); // tdf#82111 ensure a paragraph exists before a section break. // This was only two paragraphs, and both page number fields were in one para on page 2 ("11"). - getParagraph(2, "1"); + getParagraph(2, u"1"_ustr); CPPUNIT_ASSERT_EQUAL(3, getParagraphs()); }; createSwDoc("pgndec.rtf"); @@ -661,9 +674,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf98806) auto verify = [this]() { uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextContent> xBookmark( - xBookmarksSupplier->getBookmarks()->getByName("bookmark"), uno::UNO_QUERY); + xBookmarksSupplier->getBookmarks()->getByName(u"bookmark"_ustr), uno::UNO_QUERY); // This was empty, bookmark in table wasn't imported correctly. - CPPUNIT_ASSERT_EQUAL(OUString("BBB"), xBookmark->getAnchor()->getString()); + CPPUNIT_ASSERT_EQUAL(u"BBB"_ustr, xBookmark->getAnchor()->getString()); }; createSwDoc("tdf98806.rtf"); verify(); @@ -694,7 +707,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf103925) { auto verify = [this]() { // This was true, nimtext0 resulted in setting the blinking font effect. - CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getRun(getParagraph(1), 1), "CharFlash")); + CPPUNIT_ASSERT_EQUAL(false, + getProperty<bool>(getRun(getParagraph(1), 1), u"CharFlash"_ustr)); }; createSwDoc("tdf103925.rtf"); verify(); @@ -706,12 +720,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104228) { auto verify = [this]() { uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY); - uno::Reference<text::XTextRange> xCell(xTable->getCellByName("C1"), uno::UNO_QUERY); -e ... etc. - the rest is truncated