desktop/qa/deployment_misc/test_dp_version.cxx | 14 - desktop/qa/desktop_app/test_desktop_app.cxx | 32 +-- desktop/qa/desktop_lib/test_desktop_lib.cxx | 70 +++---- desktop/qa/unit/desktop-lok-init.cxx | 6 desktop/source/app/app.cxx | 40 ++-- desktop/source/app/appinit.cxx | 2 desktop/source/app/check_ext_deps.cxx | 24 +- desktop/source/app/dispatchwatcher.cxx | 54 ++--- desktop/source/app/langselect.cxx | 2 desktop/source/app/officeipcthread.cxx | 16 - desktop/source/app/opencl.cxx | 10 - desktop/source/app/sofficemain.cxx | 2 desktop/source/deployment/dp_log.cxx | 4 desktop/source/deployment/gui/dp_gui_dependencydialog.cxx | 5 desktop/source/deployment/gui/dp_gui_dialog2.cxx | 86 ++++----- desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 8 desktop/source/deployment/gui/dp_gui_service.cxx | 6 desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 16 - desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 62 +++--- desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 32 +-- desktop/source/deployment/gui/license_dialog.cxx | 20 +- desktop/source/deployment/inc/dp_ucb.h | 4 desktop/source/deployment/manager/dp_activepackages.hxx | 2 desktop/source/deployment/manager/dp_extensionmanager.cxx | 64 +++--- desktop/source/deployment/manager/dp_informationprovider.cxx | 12 - desktop/source/deployment/manager/dp_manager.cxx | 24 +- desktop/source/deployment/manager/dp_manager.h | 2 desktop/source/deployment/manager/dp_managerfac.cxx | 6 desktop/source/deployment/manager/dp_properties.cxx | 6 desktop/source/deployment/misc/dp_dependencies.cxx | 20 +- desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 80 ++++---- desktop/source/deployment/misc/dp_misc.cxx | 26 +- desktop/source/deployment/misc/dp_platform.cxx | 4 desktop/source/deployment/misc/dp_ucb.cxx | 4 desktop/source/deployment/misc/dp_update.cxx | 4 desktop/source/deployment/registry/component/dp_component.cxx | 92 +++++----- desktop/source/deployment/registry/configuration/dp_configuration.cxx | 26 +- desktop/source/deployment/registry/dp_backend.cxx | 16 - desktop/source/deployment/registry/dp_backenddb.cxx | 10 - desktop/source/deployment/registry/dp_registry.cxx | 8 desktop/source/deployment/registry/executable/dp_executable.cxx | 16 - desktop/source/deployment/registry/help/dp_help.cxx | 14 - desktop/source/deployment/registry/package/dp_package.cxx | 62 +++--- desktop/source/deployment/registry/script/dp_script.cxx | 22 +- desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx | 2 desktop/source/deployment/registry/sfwk/dp_sfwk.cxx | 30 +-- desktop/source/lib/init.cxx | 20 +- desktop/source/lib/lokclipboard.cxx | 9 desktop/source/lib/lokclipboard.hxx | 2 desktop/source/lib/lokinteractionhandler.cxx | 10 - desktop/source/migration/migration.cxx | 30 +-- desktop/source/migration/services/basicmigration.cxx | 4 desktop/source/migration/services/jvmfwk.cxx | 20 +- desktop/source/migration/services/oo3extensionmigration.cxx | 12 - desktop/source/migration/services/wordbookmigration.cxx | 4 desktop/source/offacc/acceptor.cxx | 16 - desktop/source/pkgchk/unopkg/unopkg_app.cxx | 42 ++-- desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 4 desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 12 - desktop/source/splash/splash.cxx | 24 +- desktop/source/splash/unxsplash.cxx | 4 61 files changed, 642 insertions(+), 638 deletions(-)
New commits: commit 9422879a5cf74120c1057b0f8150529e304f7c95 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 7 12:55:53 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 7 14:41:40 2024 +0200 loplugin:ostr in desktop Change-Id: Ib43d1c3a182badddd870bcb8e052ac7fd0a16fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/desktop/qa/deployment_misc/test_dp_version.cxx b/desktop/qa/deployment_misc/test_dp_version.cxx index 1b8fb9086769..abf92acb8331 100644 --- a/desktop/qa/deployment_misc/test_dp_version.cxx +++ b/desktop/qa/deployment_misc/test_dp_version.cxx @@ -47,17 +47,17 @@ void Test::test() { }; static Data const data[] = { { OUString(), - OUString("0.0000.00.0"), + u"0.0000.00.0"_ustr, ::dp_misc::EQUAL }, - { OUString(".01"), - OUString("0.1"), + { u".01"_ustr, + u"0.1"_ustr, ::dp_misc::EQUAL }, - { OUString("10"), - OUString("2"), + { u"10"_ustr, + u"2"_ustr, ::dp_misc::GREATER }, - { OUString("9223372036854775808"), + { u"9223372036854775808"_ustr, // 2^63 - OUString("9223372036854775807"), + u"9223372036854775807"_ustr, ::dp_misc::GREATER } }; for (std::size_t i = 0; i < std::size(data); ++i) { diff --git a/desktop/qa/desktop_app/test_desktop_app.cxx b/desktop/qa/desktop_app/test_desktop_app.cxx index 2c9c7ba7121b..7112b22deb97 100644 --- a/desktop/qa/desktop_app/test_desktop_app.cxx +++ b/desktop/qa/desktop_app/test_desktop_app.cxx @@ -72,7 +72,7 @@ void Test::testTdf100837() { { // 1. Test default behaviour: Office URIs define open mode - TestSupplier supplier{ "foo", "ms-word:ofe|u|bar1", "ms-word:ofv|u|bar2", "ms-word:nft|u|bar3", "baz" }; + TestSupplier supplier{ u"foo"_ustr, u"ms-word:ofe|u|bar1"_ustr, u"ms-word:ofv|u|bar2"_ustr, u"ms-word:nft|u|bar3"_ustr, u"baz"_ustr }; desktop::CommandLineArgs args(supplier); auto vOpenList = args.GetOpenList(); auto vForceOpenList = args.GetForceOpenList(); @@ -80,37 +80,37 @@ void Test::testTdf100837() { auto vForceNewList = args.GetForceNewList(); // 2 documents go to Open list: foo; baz CPPUNIT_ASSERT_EQUAL(decltype(vOpenList.size())(2), vOpenList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("foo"), vOpenList[0]); - CPPUNIT_ASSERT_EQUAL(OUString("baz"), vOpenList[1]); + CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, vOpenList[0]); + CPPUNIT_ASSERT_EQUAL(u"baz"_ustr, vOpenList[1]); // 1 document goes to ForceOpen list: bar1 CPPUNIT_ASSERT_EQUAL(decltype(vForceOpenList.size())(1), vForceOpenList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("bar1"), vForceOpenList[0]); + CPPUNIT_ASSERT_EQUAL(u"bar1"_ustr, vForceOpenList[0]); // 1 document goes to View list: bar2 CPPUNIT_ASSERT_EQUAL(decltype(vViewList.size())(1), vViewList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("bar2"), vViewList[0]); + CPPUNIT_ASSERT_EQUAL(u"bar2"_ustr, vViewList[0]); // 1 document goes to ForceNew list: bar3 CPPUNIT_ASSERT_EQUAL(decltype(vForceNewList.size())(1), vForceNewList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("bar3"), vForceNewList[0]); + CPPUNIT_ASSERT_EQUAL(u"bar3"_ustr, vForceNewList[0]); } { // 2. Test explicit open mode arguments. Office URI commands should have no effect - TestSupplier supplier{ "--view", "ms-word:ofe|u|foo", "-o", "ms-word:ofv|u|bar", "ms-word:nft|u|baz" }; + TestSupplier supplier{ u"--view"_ustr, u"ms-word:ofe|u|foo"_ustr, u"-o"_ustr, u"ms-word:ofv|u|bar"_ustr, u"ms-word:nft|u|baz"_ustr }; desktop::CommandLineArgs args(supplier); auto vViewList = args.GetViewList(); auto vForceOpenList = args.GetForceOpenList(); // 1 document goes to View list: foo CPPUNIT_ASSERT_EQUAL(decltype(vViewList.size())(1), vViewList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("foo"), vViewList[0]); + CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, vViewList[0]); // 2 documents go to ForceOpen list: bar, baz CPPUNIT_ASSERT_EQUAL(decltype(vForceOpenList.size())(2), vForceOpenList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("bar"), vForceOpenList[0]); - CPPUNIT_ASSERT_EQUAL(OUString("baz"), vForceOpenList[1]); + CPPUNIT_ASSERT_EQUAL(u"bar"_ustr, vForceOpenList[0]); + CPPUNIT_ASSERT_EQUAL(u"baz"_ustr, vForceOpenList[1]); } { // 3. Test encoded URLs - TestSupplier supplier{ "foo", "ms-word:ofe%7Cu%7cbar1", "ms-word:ofv%7cu%7Cbar2", "ms-word:nft%7Cu%7cbar3", "baz" }; + TestSupplier supplier{ u"foo"_ustr, u"ms-word:ofe%7Cu%7cbar1"_ustr, u"ms-word:ofv%7cu%7Cbar2"_ustr, u"ms-word:nft%7Cu%7cbar3"_ustr, u"baz"_ustr }; desktop::CommandLineArgs args(supplier); auto vOpenList = args.GetOpenList(); auto vForceOpenList = args.GetForceOpenList(); @@ -118,17 +118,17 @@ void Test::testTdf100837() { auto vForceNewList = args.GetForceNewList(); // 2 documents go to Open list: foo; baz CPPUNIT_ASSERT_EQUAL(decltype(vOpenList.size())(2), vOpenList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("foo"), vOpenList[0]); - CPPUNIT_ASSERT_EQUAL(OUString("baz"), vOpenList[1]); + CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, vOpenList[0]); + CPPUNIT_ASSERT_EQUAL(u"baz"_ustr, vOpenList[1]); // 1 document goes to ForceOpen list: bar1 CPPUNIT_ASSERT_EQUAL(decltype(vForceOpenList.size())(1), vForceOpenList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("bar1"), vForceOpenList[0]); + CPPUNIT_ASSERT_EQUAL(u"bar1"_ustr, vForceOpenList[0]); // 1 document goes to View list: bar2 CPPUNIT_ASSERT_EQUAL(decltype(vViewList.size())(1), vViewList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("bar2"), vViewList[0]); + CPPUNIT_ASSERT_EQUAL(u"bar2"_ustr, vViewList[0]); // 1 document goes to ForceNew list: bar3 CPPUNIT_ASSERT_EQUAL(decltype(vForceNewList.size())(1), vForceNewList.size()); - CPPUNIT_ASSERT_EQUAL(OUString("bar3"), vForceNewList[0]); + CPPUNIT_ASSERT_EQUAL(u"bar3"_ustr, vForceNewList[0]); } } diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 4310e64f25dd..ec40760861e7 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -97,7 +97,7 @@ static LibreOfficeKitDocumentType getDocumentTypeFromName(const char* pName) class DesktopLOKTest : public UnoApiTest { public: - DesktopLOKTest() : UnoApiTest("/desktop/qa/data/"), + DesktopLOKTest() : UnoApiTest(u"/desktop/qa/data/"_ustr), m_nSelectionBeforeSearchResult(0), m_nSelectionAfterSearchResult(0), m_bModified(false), @@ -602,11 +602,11 @@ void DesktopLOKTest::testSearchCalc() uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( { - {"SearchItem.SearchString", uno::Any(OUString("foo"))}, + {"SearchItem.SearchString", uno::Any(u"foo"_ustr)}, {"SearchItem.Backward", uno::Any(false)}, {"SearchItem.Command", uno::Any(static_cast<sal_uInt16>(SvxSearchCmd::FIND_ALL))}, })); - dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues); + dispatchCommand(mxComponent, u".uno:ExecuteSearch"_ustr, aPropertyValues); std::vector<OString> aSelections; sal_Int32 nIndex = 0; @@ -632,11 +632,11 @@ void DesktopLOKTest::testSearchAllNotificationsCalc() uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( { - {"SearchItem.SearchString", uno::Any(OUString("foo"))}, + {"SearchItem.SearchString", uno::Any(u"foo"_ustr)}, {"SearchItem.Backward", uno::Any(false)}, {"SearchItem.Command", uno::Any(static_cast<sal_uInt16>(SvxSearchCmd::FIND_ALL))}, })); - dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues); + dispatchCommand(mxComponent, u".uno:ExecuteSearch"_ustr, aPropertyValues); // This was 1, make sure that we get no notifications about selection changes during search. CPPUNIT_ASSERT_EQUAL(0, m_nSelectionBeforeSearchResult); @@ -736,7 +736,7 @@ void DesktopLOKTest::testPasteWriter() uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphEnumeration->nextElement(), uno::UNO_QUERY); uno::Reference<container::XEnumeration> xTextPortionEnumeration = xParagraph->createEnumeration(); uno::Reference<beans::XPropertySet> xTextPortion(xTextPortionEnumeration->nextElement(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(OUString("Text"), xTextPortion->getPropertyValue("TextPortionType").get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, xTextPortion->getPropertyValue(u"TextPortionType"_ustr).get<OUString>()); // Without the accompanying fix in place, this test would have failed, as we had a comment // between "foo" and "baz". CPPUNIT_ASSERT(!xTextPortionEnumeration->hasMoreElements()); @@ -759,7 +759,7 @@ void DesktopLOKTest::testPasteWriterJPEG() uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); // This was text::TextContentAnchorType_AT_PARAGRAPH. - CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, xShape->getPropertyValue("AnchorType").get<text::TextContentAnchorType>()); + CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, xShape->getPropertyValue(u"AnchorType"_ustr).get<text::TextContentAnchorType>()); // Delete the pasted picture, and paste again with a custom anchor type. uno::Reference<lang::XComponent>(xShape, uno::UNO_QUERY_THROW)->dispose(); @@ -767,10 +767,10 @@ void DesktopLOKTest::testPasteWriterJPEG() { {"AnchorType", uno::Any(static_cast<sal_uInt16>(text::TextContentAnchorType_AT_CHARACTER))}, })); - dispatchCommand(mxComponent, ".uno:Paste", aPropertyValues); + dispatchCommand(mxComponent, u".uno:Paste"_ustr, aPropertyValues); xShape.set(xDrawPage->getByIndex(0), uno::UNO_QUERY); // This was text::TextContentAnchorType_AS_CHARACTER, AnchorType argument was ignored. - CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, xShape->getPropertyValue("AnchorType").get<text::TextContentAnchorType>()); + CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, xShape->getPropertyValue(u"AnchorType"_ustr).get<text::TextContentAnchorType>()); } void DesktopLOKTest::testUndoWriter() @@ -1017,7 +1017,7 @@ void DesktopLOKTest::testWriterComments() uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphEnumeration->nextElement(), uno::UNO_QUERY); uno::Reference<container::XEnumeration> xTextPortionEnumeration = xParagraph->createEnumeration(); uno::Reference<beans::XPropertySet> xTextPortion(xTextPortionEnumeration->nextElement(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(OUString("Annotation"), xTextPortion->getPropertyValue("TextPortionType").get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"Annotation"_ustr, xTextPortion->getPropertyValue(u"TextPortionType"_ustr).get<OUString>()); // Type "test" and finish editing. pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0); @@ -1028,9 +1028,9 @@ void DesktopLOKTest::testWriterComments() Scheduler::ProcessEventsToIdle(); // Test that the typed characters ended up in the right window. - auto xTextField = xTextPortion->getPropertyValue("TextField").get< uno::Reference<beans::XPropertySet> >(); + auto xTextField = xTextPortion->getPropertyValue(u"TextField"_ustr).get< uno::Reference<beans::XPropertySet> >(); // This was empty, typed characters ended up in the body text. - CPPUNIT_ASSERT_EQUAL(OUString("test"), xTextField->getPropertyValue("Content").get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"test"_ustr, xTextField->getPropertyValue(u"Content"_ustr).get<OUString>()); } void DesktopLOKTest::testTrackChanges() @@ -1229,7 +1229,7 @@ void DesktopLOKTest::testSheetDragDrop() rViewFrame.GetBindings().QueryState(rViewFrame.GetBindings().QuerySlotId(aURL), pState); pState->QueryValue(aValue); aValue >>= sValue; - CPPUNIT_ASSERT_EQUAL(OUString("Sheet5.A1:E1"), sValue); + CPPUNIT_ASSERT_EQUAL(u"Sheet5.A1:E1"_ustr, sValue); } // Check selection content @@ -1285,7 +1285,7 @@ void DesktopLOKTest::testSheetDragDrop() rViewFrame.GetBindings().QueryState(rViewFrame.GetBindings().QuerySlotId(aURL), pState); pState->QueryValue(aValue); aValue >>= sValue; - CPPUNIT_ASSERT_EQUAL(OUString("Sheet5.D1:H1"), sValue); + CPPUNIT_ASSERT_EQUAL(u"Sheet5.D1:H1"_ustr, sValue); } // Check selection content @@ -2071,7 +2071,7 @@ void DesktopLOKTest::testRedlineWriter() // Load a Writer document, enable change recording and press a key. LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); - xPropertySet->setPropertyValue("RecordChanges", uno::Any(true)); + xPropertySet->setPropertyValue(u"RecordChanges"_ustr, uno::Any(true)); pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0); pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 't', 0); Scheduler::ProcessEventsToIdle(); @@ -2098,7 +2098,7 @@ void DesktopLOKTest::testRedlineCalc() // Load a Writer document, enable change recording and press a key. LibLODocument_Impl* pDocument = loadDoc("sheets.ods"); uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); - xPropertySet->setPropertyValue("RecordChanges", uno::Any(true)); + xPropertySet->setPropertyValue(u"RecordChanges"_ustr, uno::Any(true)); pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0); pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 't', 0); pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN); @@ -2299,10 +2299,10 @@ void DesktopLOKTest::testPaintPartTileDifferentSchemes() { uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( { - { "NewTheme", uno::Any(OUString("Dark")) }, + { "NewTheme", uno::Any(u"Dark"_ustr) }, } ); - dispatchCommand(mxComponent, ".uno:ChangeTheme", aPropertyValues); + dispatchCommand(mxComponent, u".uno:ChangeTheme"_ustr, aPropertyValues); } constexpr int nCanvasWidth = 256; @@ -2342,7 +2342,7 @@ void DesktopLOKTest::testGetFontSubset() { LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); OUString aFontName = rtl::Uri::encode( - OUString("Liberation Sans"), + u"Liberation Sans"_ustr, rtl_UriCharClassRelSegment, rtl_UriEncodeKeepEscapes, RTL_TEXTENCODING_UTF8 @@ -2680,30 +2680,30 @@ void DesktopLOKTest::testRunMacro() void DesktopLOKTest::testExtractParameter() { - OUString aOptions("Language=de-DE"); + OUString aOptions(u"Language=de-DE"_ustr); OUString aValue = extractParameter(aOptions, u"Language"); - CPPUNIT_ASSERT_EQUAL(OUString("de-DE"), aValue); + CPPUNIT_ASSERT_EQUAL(u"de-DE"_ustr, aValue); CPPUNIT_ASSERT_EQUAL(OUString(), aOptions); aOptions = "Language=en-US,Something"; aValue = extractParameter(aOptions, u"Language"); - CPPUNIT_ASSERT_EQUAL(OUString("en-US"), aValue); - CPPUNIT_ASSERT_EQUAL(OUString("Something"), aOptions); + CPPUNIT_ASSERT_EQUAL(u"en-US"_ustr, aValue); + CPPUNIT_ASSERT_EQUAL(u"Something"_ustr, aOptions); aOptions = "SomethingElse,Language=cs-CZ"; aValue = extractParameter(aOptions, u"Language"); - CPPUNIT_ASSERT_EQUAL(OUString("cs-CZ"), aValue); - CPPUNIT_ASSERT_EQUAL(OUString("SomethingElse"), aOptions); + CPPUNIT_ASSERT_EQUAL(u"cs-CZ"_ustr, aValue); + CPPUNIT_ASSERT_EQUAL(u"SomethingElse"_ustr, aOptions); aOptions = "Something1,Language=hu-HU,Something2"; aValue = extractParameter(aOptions, u"Language"); - CPPUNIT_ASSERT_EQUAL(OUString("hu-HU"), aValue); - CPPUNIT_ASSERT_EQUAL(OUString("Something1,Something2"), aOptions); + CPPUNIT_ASSERT_EQUAL(u"hu-HU"_ustr, aValue); + CPPUNIT_ASSERT_EQUAL(u"Something1,Something2"_ustr, aOptions); aOptions = "Something1,Something2=blah,Something3"; aValue = extractParameter(aOptions, u"Language"); CPPUNIT_ASSERT_EQUAL(OUString(), aValue); - CPPUNIT_ASSERT_EQUAL(OUString("Something1,Something2=blah,Something3"), aOptions); + CPPUNIT_ASSERT_EQUAL(u"Something1,Something2=blah,Something3"_ustr, aOptions); } void DesktopLOKTest::readFileIntoByteVector(std::u16string_view sFilename, std::vector<unsigned char> & rByteVector) @@ -3029,7 +3029,7 @@ void DesktopLOKTest::testDialogPaste() Control* pCtrlFocused = GetFocusControl(pWindow.get()); CPPUNIT_ASSERT(pCtrlFocused); CPPUNIT_ASSERT_EQUAL(WindowType::COMBOBOX, pCtrlFocused->GetType()); - CPPUNIT_ASSERT_EQUAL(OUString("www.softwarelibre.org.bo"), pCtrlFocused->GetText()); + CPPUNIT_ASSERT_EQUAL(u"www.softwarelibre.org.bo"_ustr, pCtrlFocused->GetText()); static_cast<SystemWindow*>(pWindow.get())->Close(); Scheduler::ProcessEventsToIdle(); @@ -3287,15 +3287,15 @@ void DesktopLOKTest::testMetricField() CPPUNIT_ASSERT(pWin); WindowUIObject aWinUI(pWin); - std::unique_ptr<UIObject> pUIWin(aWinUI.get_child("selectwidth")); + std::unique_ptr<UIObject> pUIWin(aWinUI.get_child(u"selectwidth"_ustr)); CPPUNIT_ASSERT(pUIWin); StringMap aMap; - aMap["VALUE"] = "75.06"; - pUIWin->execute("VALUE", aMap); + aMap[u"VALUE"_ustr] = "75.06"; + pUIWin->execute(u"VALUE"_ustr, aMap); StringMap aRet = pUIWin->get_state(); - CPPUNIT_ASSERT_EQUAL(aMap["VALUE"], aRet["Value"]); + CPPUNIT_ASSERT_EQUAL(aMap[u"VALUE"_ustr], aRet[u"Value"_ustr]); } void DesktopLOKTest::testJumpCursor() @@ -3363,7 +3363,7 @@ void DesktopLOKTest::testRenderSearchResult_WriterNode() if (bDumpBitmap) { - SvFileStream aStream("~/SearchResultBitmap.png", StreamMode::WRITE | StreamMode::TRUNC); + SvFileStream aStream(u"~/SearchResultBitmap.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC); vcl::PngImageWriter aPNGWriter(aStream); aPNGWriter.write(aBitmap); } @@ -3408,7 +3408,7 @@ void DesktopLOKTest::testRenderSearchResult_CommonNode() if (bDumpBitmap) { - SvFileStream aStream("~/SearchResultBitmap.png", StreamMode::WRITE | StreamMode::TRUNC); + SvFileStream aStream(u"~/SearchResultBitmap.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC); vcl::PngImageWriter aPNGWriter(aStream); aPNGWriter.write(aBitmap); } diff --git a/desktop/qa/unit/desktop-lok-init.cxx b/desktop/qa/unit/desktop-lok-init.cxx index 49971afc2e5c..90c645c07781 100644 --- a/desktop/qa/unit/desktop-lok-init.cxx +++ b/desktop/qa/unit/desktop-lok-init.cxx @@ -62,7 +62,7 @@ void LOKInitTest::testJsonToPropertyValues() "\"value\":\"something.odt\"" "}}"; - uno::Sequence aArgs{ comphelper::makePropertyValue("FileName", OUString("something.odt")) }; + uno::Sequence aArgs{ comphelper::makePropertyValue(u"FileName"_ustr, u"something.odt"_ustr) }; assertSequencesEqual( aArgs, comphelper::containerToSequence(desktop::jsonToPropertyValuesVector(arguments))); @@ -146,8 +146,8 @@ void LOKInitTest::testJsonToPropertyValuesBorder() uno::Any(static_cast<sal_Int16>(0x7F)), uno::Any(static_cast<sal_Int32>(0)) }; - uno::Sequence aArgs{ comphelper::makePropertyValue("OuterBorder", aOuterSeq), - comphelper::makePropertyValue("InnerBorder", aInnerSeq) }; + uno::Sequence aArgs{ comphelper::makePropertyValue(u"OuterBorder"_ustr, aOuterSeq), + comphelper::makePropertyValue(u"InnerBorder"_ustr, aInnerSeq) }; assertSequencesEqual( aArgs, comphelper::containerToSequence(desktop::jsonToPropertyValuesVector(arguments))); diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 158f02909fa8..1dcc49f56d7c 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -206,11 +206,11 @@ namespace { // UserInstallation can be poisoned by old junk any more. bool cleanExtensionCache() { OUString buildId( - "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"); + u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"_ustr); rtl::Bootstrap::expandMacros(buildId); //TODO: detect failure OUString extDir( - "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") - ":UserInstallation}/user/extensions"); + u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") + ":UserInstallation}/user/extensions"_ustr); rtl::Bootstrap::expandMacros(extDir); //TODO: detect failure OUString buildIdFile(extDir + "/buildid"); osl::File fr(buildIdFile); @@ -247,8 +247,8 @@ bool cleanExtensionCache() { } utl::removeTree(extDir); OUString userRcFile( - "$UNO_USER_PACKAGES_CACHE/registry/" - "com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc"); + u"$UNO_USER_PACKAGES_CACHE/registry/" + "com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc"_ustr); rtl::Bootstrap::expandMacros(userRcFile); //TODO: detect failure rc = osl::File::remove(userRcFile); SAL_WARN_IF( @@ -332,8 +332,8 @@ void DoRestartActionsIfNecessary(bool quickstart) { void RemoveIconCacheDirectory() { // See getIconCacheUrl in vcl/source/image/ImplImageTree.cxx - OUString sUrl = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER - "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache"; + OUString sUrl = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER + "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache"_ustr; rtl::Bootstrap::expandMacros(sUrl); utl::UCBContentHelper::Kill(sUrl); } @@ -402,7 +402,7 @@ CommandLineArgs& Desktop::GetCommandLineArgs() OUString ReplaceStringHookProc( const OUString& rStr ) { - const static OUString sBuildId(utl::Bootstrap::getBuildIdData("development")), + const static OUString sBuildId(utl::Bootstrap::getBuildIdData(u"development"_ustr)), sBrandName(utl::ConfigManager::getProductName()), sVersion(utl::ConfigManager::getProductVersion()), sAboutBoxVersion(utl::ConfigManager::getAboutBoxProductVersion()), @@ -485,7 +485,7 @@ void Desktop::Init() if (officecfg::Setup::Office::OfficeRestartInProgress::get()) { if (!officecfg::Office::Common::Misc::FirstRun::get()) - GetCommandLineArgs().RemoveFilesFromOpenListEndingWith(".oxt"); + GetCommandLineArgs().RemoveFilesFromOpenListEndingWith(u".oxt"_ustr); } try @@ -933,7 +933,7 @@ void handleSafeMode() css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< css::frame::XSynchronousDispatch > xSafeModeUI( - xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.SafeModeUI", xContext), + xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.comp.svx.SafeModeUI"_ustr, xContext), css::uno::UNO_QUERY_THROW); css::util::URL aURL; @@ -1002,7 +1002,7 @@ bool impl_callRecoveryUI(bool bEmergencySave , css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); g_xRecoveryUI.set( - xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.RecoveryUI", xContext), + xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.comp.svx.RecoveryUI"_ustr, xContext), css::uno::UNO_QUERY_THROW); RefClearGuard<Reference< css::frame::XSynchronousDispatch >> refClearGuard(g_xRecoveryUI); @@ -1225,7 +1225,7 @@ private: Reference< XMultiServiceFactory > xSMgr = comphelper::getProcessServiceFactory(); Reference< css::loader::XImplementationLoader > xJavaComponentLoader( - xSMgr->createInstance("com.sun.star.comp.stoc.JavaComponentLoader"), + xSMgr->createInstance(u"com.sun.star.comp.stoc.JavaComponentLoader"_ustr), css::uno::UNO_QUERY_THROW); if (xJavaComponentLoader.is()) @@ -1233,7 +1233,7 @@ private: const css::uno::Reference< ::com::sun::star::registry::XRegistryKey > xRegistryKey; try { - xJavaComponentLoader->activate("", "", "", xRegistryKey); + xJavaComponentLoader->activate(u""_ustr, u""_ustr, u""_ustr, xRegistryKey); } catch (...) { @@ -1367,7 +1367,7 @@ int Desktop::Main() OUString aTitle(ReplaceStringHookProc(RID_APPTITLE)); #ifdef DBG_UTIL //include buildid in non product builds - aTitle += " [" + utl::Bootstrap::getBuildIdData("development") + "]"; + aTitle += " [" + utl::Bootstrap::getBuildIdData(u"development"_ustr) + "]"; #endif SetDisplayName( aTitle ); @@ -2077,7 +2077,7 @@ void Desktop::OpenClients() } // write this information here to avoid depending on vcl in the crash reporter lib - CrashReporter::addKeyValue("Language", Application::GetSettings().GetLanguageTag().getBcp47(), CrashReporter::Create); + CrashReporter::addKeyValue(u"Language"_ustr, Application::GetSettings().GetLanguageTag().getBcp47(), CrashReporter::Create); RequestHandler::EnableRequests(); @@ -2295,7 +2295,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) { // no visible task that could be activated found Reference< css::awt::XWindow > xContainerWindow; - Reference< XFrame > xBackingFrame = xDesktop->findFrame( "_blank", 0); + Reference< XFrame > xBackingFrame = xDesktop->findFrame( u"_blank"_ustr, 0); if (xBackingFrame.is()) xContainerWindow = xBackingFrame->getContainerWindow(); if (xContainerWindow.is()) @@ -2442,7 +2442,7 @@ void Desktop::OpenSplashScreen() aAppName = "web"; // Which splash to use - OUString aSplashService( "com.sun.star.office.SplashScreen" ); + OUString aSplashService( u"com.sun.star.office.SplashScreen"_ustr ); if ( rCmdLine.HasSplashPipe() ) aSplashService = "com.sun.star.office.PipeSplashScreen"; @@ -2453,7 +2453,7 @@ void Desktop::OpenSplashScreen() UNO_QUERY); if(m_rSplashScreen.is()) - m_rSplashScreen->start("SplashScreen", 100); + m_rSplashScreen->start(u"SplashScreen"_ustr, 100); } #endif @@ -2501,7 +2501,7 @@ IMPL_STATIC_LINK_NOARG(Desktop, AsyncInitFirstRun, Timer *, void) try { Reference< XJobExecutor > xExecutor = theJobExecutor::get( ::comphelper::getProcessComponentContext() ); - xExecutor->trigger( "onFirstRunInitialization" ); + xExecutor->trigger( u"onFirstRunInitialization"_ustr ); } catch(const css::uno::Exception&) { @@ -2521,7 +2521,7 @@ void Desktop::ShowBackingComponent(Desktop * progress) { progress->SetSplashScreenProgress(60); } - Reference< XFrame > xBackingFrame = xDesktop->findFrame( "_blank", 0); + Reference< XFrame > xBackingFrame = xDesktop->findFrame( u"_blank"_ustr, 0); Reference< css::awt::XWindow > xContainerWindow; if (xBackingFrame.is()) diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 887b717d43ad..633ebde2d967 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -153,7 +153,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString) Sequence< Any > aSeq{ Any(aAcceptString), Any(bAccept) }; Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference<XInitialization> rAcceptor( - xContext->getServiceManager()->createInstanceWithContext("com.sun.star.office.Acceptor", xContext), + xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.office.Acceptor"_ustr, xContext), UNO_QUERY ); if ( rAcceptor.is() ) { diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 7f76d155c31e..52047e0230fb 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -218,9 +218,9 @@ static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContex uno::Reference< lang::XMultiComponentFactory > xServiceManager( xContext->getServiceManager() ); if( !xServiceManager.is() ) throw uno::RuntimeException( - "impl_showExtensionDialog(): unable to obtain service manager from component context", uno::Reference< uno::XInterface > () ); + u"impl_showExtensionDialog(): unable to obtain service manager from component context"_ustr, uno::Reference< uno::XInterface > () ); - xService = xServiceManager->createInstanceWithContext( "com.sun.star.deployment.ui.UpdateRequiredDialog", xContext ); + xService = xServiceManager->createInstanceWithContext( u"com.sun.star.deployment.ui.UpdateRequiredDialog"_ustr, xContext ); uno::Reference< ui::dialogs::XExecutableDialog > xExecutable( xService, uno::UNO_QUERY ); if ( xExecutable.is() ) nRet = xExecutable->execute(); @@ -316,15 +316,15 @@ static void impl_setNeedsCompatCheck() configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() ) ); - beans::NamedValue v( "nodepath", - Any( OUString("org.openoffice.Setup/Office") ) ); + beans::NamedValue v( u"nodepath"_ustr, + Any( u"org.openoffice.Setup/Office"_ustr ) ); Sequence< Any > theArgs{ Any(v) }; Reference< beans::XPropertySet > pset( theConfigProvider->createInstanceWithArguments( aAccessSrvc, theArgs ), UNO_QUERY_THROW ); - Any value( OUString("never") ); + Any value( u"never"_ustr ); - pset->setPropertyValue("LastCompatibilityCheckID", value ); + pset->setPropertyValue(u"LastCompatibilityCheckID"_ustr, value ); Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges(); } catch (const Exception&) {} @@ -338,7 +338,7 @@ static bool impl_needsCompatCheck() { bool bNeedsCheck = false; OUString aLastCheckBuildID; - OUString aCurrentBuildID( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}" ); + OUString aCurrentBuildID( u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"_ustr ); rtl::Bootstrap::expandMacros( aCurrentBuildID ); try { @@ -346,20 +346,20 @@ static bool impl_needsCompatCheck() configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() ) ); - beans::NamedValue v( "nodepath", - Any( OUString("org.openoffice.Setup/Office") ) ); + beans::NamedValue v( u"nodepath"_ustr, + Any( u"org.openoffice.Setup/Office"_ustr ) ); Sequence< Any > theArgs{ Any(v) }; Reference< beans::XPropertySet > pset( theConfigProvider->createInstanceWithArguments( aAccessSrvc, theArgs ), UNO_QUERY_THROW ); - Any result = pset->getPropertyValue("LastCompatibilityCheckID"); + Any result = pset->getPropertyValue(u"LastCompatibilityCheckID"_ustr); result >>= aLastCheckBuildID; if ( aLastCheckBuildID != aCurrentBuildID ) { bNeedsCheck = true; result <<= aCurrentBuildID; - pset->setPropertyValue("LastCompatibilityCheckID", result ); + pset->setPropertyValue(u"LastCompatibilityCheckID"_ustr, result ); Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges(); } #if OSL_DEBUG_LEVEL >= 2 @@ -408,7 +408,7 @@ void Desktop::SynchronizeExtensionRepositories(bool bCleanedExtensionCache, Desk new SilentCommandEnv(context, pDesktop)); if (bCleanedExtensionCache) { deployment::ExtensionManager::get(context)->reinstallDeployedExtensions( - true, "user", Reference<task::XAbortChannel>(), silent); + true, u"user"_ustr, Reference<task::XAbortChannel>(), silent); #if !HAVE_FEATURE_MACOSX_SANDBOX if (!comphelper::LibreOfficeKit::isActive()) task::OfficeRestartManager::get(context)->requestRestart( diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index af26ef9eaab9..3b112cdc298b 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -104,7 +104,7 @@ std::shared_ptr<const SfxFilter> impl_lookupExportFilterForUrl( std::u16string_v const Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); const Reference< XContainerQuery > xFilterFactory( - xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.FilterFactory", xContext ), + xContext->getServiceManager()->createInstanceWithContext( u"com.sun.star.document.FilterFactory"_ustr, xContext ), UNO_QUERY_THROW ); std::shared_ptr<const SfxFilter> pBestMatch; @@ -114,7 +114,7 @@ std::shared_ptr<const SfxFilter> impl_lookupExportFilterForUrl( std::u16string_v while ( xFilterEnum->hasMoreElements() ) { comphelper::SequenceAsHashMap aFilterProps( xFilterEnum->nextElement() ); - const OUString aName( aFilterProps.getUnpackedValueOrDefault( "Name", OUString() ) ); + const OUString aName( aFilterProps.getUnpackedValueOrDefault( u"Name"_ustr, OUString() ) ); if ( !aName.isEmpty() ) { std::shared_ptr<const SfxFilter> pFilter( SfxFilter::GetFilterByName( aName ) ); @@ -136,7 +136,7 @@ std::shared_ptr<const SfxFilter> impl_getExportFilterFromUrl( { const Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); const Reference< document::XTypeDetection > xTypeDetector( - xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.TypeDetection", xContext ), + xContext->getServiceManager()->createInstanceWithContext( u"com.sun.star.document.TypeDetection"_ustr, xContext ), UNO_QUERY_THROW ); const OUString aTypeName( xTypeDetector->queryTypeByURL( rUrl ) ); @@ -273,13 +273,13 @@ void batchPrint( std::u16string_view rPrinterName, const Reference< XPrintable > Sequence < PropertyValue > aPrinterArgs; if( !aPrinterName.isEmpty() ) { - aPrinterArgs = { comphelper::makePropertyValue("Name", aPrinterName) }; + aPrinterArgs = { comphelper::makePropertyValue(u"Name"_ustr, aPrinterName) }; xDoc->setPrinter( aPrinterArgs ); } // print ( also without user interaction ) - aPrinterArgs = { comphelper::makePropertyValue("FileName", aOutFile), - comphelper::makePropertyValue("Wait", true) }; + aPrinterArgs = { comphelper::makePropertyValue(u"FileName"_ustr, aOutFile), + comphelper::makePropertyValue(u"Wait"_ustr, true) }; xDoc->print( aPrinterArgs ); } @@ -292,31 +292,31 @@ OUString getName(const Reference< XInterface > & xDoc) utl::MediaDescriptor aMediaDesc( xModel->getArgs() ); OUString aDocService = aMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_DOCUMENTSERVICE, OUString() ); if (aDocService == "com.sun.star.text.TextDocument") - return "Writer"; + return u"Writer"_ustr; else if (aDocService == "com.sun.star.text.GlobalDocument") - return "Writer master"; + return u"Writer master"_ustr; else if (aDocService == "com.sun.star.text.WebDocument") - return "Writer/Web"; + return u"Writer/Web"_ustr; else if (aDocService == "com.sun.star.drawing.DrawingDocument") - return "Draw"; + return u"Draw"_ustr; else if (aDocService == "com.sun.star.presentation.PresentationDocument") - return "Impress"; + return u"Impress"_ustr; else if (aDocService == "com.sun.star.sheet.SpreadsheetDocument") - return "Calc"; + return u"Calc"_ustr; else if (aDocService == "com.sun.star.script.BasicIDE") - return "Basic"; + return u"Basic"_ustr; else if (aDocService == "com.sun.star.formula.FormulaProperties") - return "Math"; + return u"Math"_ustr; else if (aDocService == "com.sun.star.sdb.RelationDesign") - return "Relation Design"; + return u"Relation Design"_ustr; else if (aDocService == "com.sun.star.sdb.QueryDesign") - return "Query Design"; + return u"Query Design"_ustr; else if (aDocService == "com.sun.star.sdb.TableDesign") - return "Table Design"; + return u"Table Design"_ustr; else if (aDocService == "com.sun.star.sdb.DataSourceBrowser") - return "Data Source Browser"; + return u"Data Source Browser"_ustr; else if (aDocService == "com.sun.star.sdb.DatabaseDocument") - return "Database"; + return u"Database"_ustr; return OUString(); } @@ -357,10 +357,10 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest std::vector<PropertyValue> aArgs; // mark request as user interaction from outside - aArgs.emplace_back("Referer", 0, Any(OUString("private:OpenEvent")), + aArgs.emplace_back("Referer", 0, Any(u"private:OpenEvent"_ustr), PropertyState_DIRECT_VALUE); - OUString aTarget("_default"); + OUString aTarget(u"_default"_ustr); if ( aDispatchRequest.aRequestType == REQUEST_PRINT || aDispatchRequest.aRequestType == REQUEST_PRINTTO || @@ -464,7 +464,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest // We have to be listener to catch errors during dispatching URLs. // Otherwise it would be possible to have an office running without an open // window!! - Sequence < PropertyValue > aArgs2{ comphelper::makePropertyValue("SynchronMode", + Sequence < PropertyValue > aArgs2{ comphelper::makePropertyValue(u"SynchronMode"_ustr, true) }; Reference < XNotifyingDispatch > xDisp( xDispatcher, UNO_QUERY ); if ( xDisp.is() ) @@ -645,7 +645,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest Sequence<PropertyValue> conversionProperties( nProps ); auto pconversionProperties = conversionProperties.getArray(); pconversionProperties[0].Name = "ConversionRequestOrigin"; - pconversionProperties[0].Value <<= OUString("CommandLine"); + pconversionProperties[0].Value <<= u"CommandLine"_ustr; pconversionProperties[1].Name = "Overwrite"; pconversionProperties[1].Value <<= true; @@ -753,12 +753,12 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest { // create the printer Sequence < PropertyValue > aPrinterArgs{ comphelper::makePropertyValue( - "Name", aDispatchRequest.aPrinterName) }; + u"Name"_ustr, aDispatchRequest.aPrinterName) }; xDoc->setPrinter( aPrinterArgs ); } // print ( also without user interaction ) - Sequence < PropertyValue > aPrinterArgs{ comphelper::makePropertyValue("Wait", + Sequence < PropertyValue > aPrinterArgs{ comphelper::makePropertyValue(u"Wait"_ustr, true) }; xDoc->print( aPrinterArgs ); } @@ -795,8 +795,8 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest { // Execute all asynchronous dispatches now after we placed them into our request container! Sequence < PropertyValue > aArgs{ - comphelper::makePropertyValue("Referer", OUString("private:OpenEvent")), - comphelper::makePropertyValue("SynchronMode", true) + comphelper::makePropertyValue(u"Referer"_ustr, u"private:OpenEvent"_ustr), + comphelper::makePropertyValue(u"SynchronMode"_ustr, true) }; for (const DispatchHolder & aDispatche : aDispatches) diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index 5eb2f0636bcd..702f0a66f224 100644 --- a/desktop/source/app/langselect.cxx +++ b/desktop/source/app/langselect.cxx @@ -86,7 +86,7 @@ bool prepareLocale() { std::shared_ptr<comphelper::ConfigurationChanges> batch( comphelper::ConfigurationChanges::create()); officecfg::Office::Linguistic::General::UILocale::set( - "", batch); + u""_ustr, batch); batch->commit(); } catch (const css::uno::Exception &) { TOOLS_WARN_EXCEPTION("desktop.app", "ignoring"); diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 1378c91bf6c6..9fa0b36342af 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -320,7 +320,7 @@ oslSignalAction SalMainPipeExchangeSignal_impl(SAL_UNUSED_PARAMETER void* /*pDat // XServiceInfo OUString SAL_CALL RequestHandlerController::getImplementationName() { - return "com.sun.star.comp.RequestHandlerController"; + return u"com.sun.star.comp.RequestHandlerController"_ustr; } sal_Bool RequestHandlerController::supportsService( @@ -1306,14 +1306,14 @@ bool RequestHandler::ExecuteCmdLineRequests( static std::vector<DispatchWatcher::DispatchRequest> aDispatchList; // Create dispatch list for dispatch watcher - AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aInFilter, DispatchWatcher::REQUEST_INFILTER, "", aRequest.aModule ); - AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aOpenList, DispatchWatcher::REQUEST_OPEN, "", aRequest.aModule ); - AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aViewList, DispatchWatcher::REQUEST_VIEW, "", aRequest.aModule ); - AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aStartList, DispatchWatcher::REQUEST_START, "", aRequest.aModule ); - AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aPrintList, DispatchWatcher::REQUEST_PRINT, "", aRequest.aModule ); + AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aInFilter, DispatchWatcher::REQUEST_INFILTER, u""_ustr, aRequest.aModule ); + AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aOpenList, DispatchWatcher::REQUEST_OPEN, u""_ustr, aRequest.aModule ); + AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aViewList, DispatchWatcher::REQUEST_VIEW, u""_ustr, aRequest.aModule ); + AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aStartList, DispatchWatcher::REQUEST_START, u""_ustr, aRequest.aModule ); + AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aPrintList, DispatchWatcher::REQUEST_PRINT, u""_ustr, aRequest.aModule ); AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aPrintToList, DispatchWatcher::REQUEST_PRINTTO, aRequest.aPrinterName, aRequest.aModule ); - AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceOpenList, DispatchWatcher::REQUEST_FORCEOPEN, "", aRequest.aModule ); - AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceNewList, DispatchWatcher::REQUEST_FORCENEW, "", aRequest.aModule ); + AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceOpenList, DispatchWatcher::REQUEST_FORCEOPEN, u""_ustr, aRequest.aModule ); + AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceNewList, DispatchWatcher::REQUEST_FORCENEW, u""_ustr, aRequest.aModule ); AddConversionsToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aConversionList, aRequest.aConversionParams, aRequest.aPrinterName, aRequest.aModule, aRequest.aConversionOut, aRequest.aImageConversionType, aRequest.bTextCat, aRequest.bScriptCat ); bool bShutdown( false ); diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx index ad3df6bf3fd6..310fa1e4a020 100644 --- a/desktop/source/app/opencl.cxx +++ b/desktop/source/app/opencl.cxx @@ -56,7 +56,7 @@ static bool testOpenCLDriver() // whether the driver crashes (asserts,etc.) when trying to use OpenCL. SAL_INFO("opencl", "Starting CL driver test"); - OUString testerURL("$BRAND_BASE_DIR/" LIBO_BIN_FOLDER "/opencltest"); + OUString testerURL(u"$BRAND_BASE_DIR/" LIBO_BIN_FOLDER "/opencltest"_ustr); rtl::Bootstrap::expandMacros(testerURL); //TODO: detect failure OUString deviceName, platformName; @@ -126,10 +126,10 @@ static bool testOpenCLCompute(const Reference< XDesktop2 > &xDesktop, const OUSt try { css::uno::Reference< css::frame::XComponentLoader > xLoader(xDesktop, css::uno::UNO_QUERY_THROW); - css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue("Hidden", + css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue(u"Hidden"_ustr, true) }; - xComponent.set(xLoader->loadComponentFromURL(rURL, "_blank", 0, aArgs)); + xComponent.set(xLoader->loadComponentFromURL(rURL, u"_blank"_ustr, 0, aArgs)); // What an unpleasant API to use. css::uno::Reference< css::sheet::XCalculatable > xCalculatable( xComponent, css::uno::UNO_QUERY_THROW); @@ -148,7 +148,7 @@ static bool testOpenCLCompute(const Reference< XDesktop2 > &xDesktop, const OUSt // So we insert our MAX call at the end on a named range. css::uno::Reference< css::table::XCell2 > xCell( xSheet->getCellByPosition(1,0), css::uno::UNO_QUERY_THROW ); - xCell->setFormula("=MAX(results)"); + xCell->setFormula(u"=MAX(results)"_ustr); double fResult = xCell->getValue(); // Ensure the maximum variance is below our tolerance. @@ -212,7 +212,7 @@ void Desktop::CheckOpenCLCompute(const Reference< XDesktop2 > &xDesktop) aSelectedCLDeviceVersionID += "--" LIBO_VERSION_DOTTED; // Append timestamp of the file. - OUString aURL("$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/opencl/cl-test.ods"); + OUString aURL(u"$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/opencl/cl-test.ods"_ustr); rtl::Bootstrap::expandMacros(aURL); DirectoryItem aItem; diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 448977684b9a..73ac6e24cfe4 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -65,7 +65,7 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main() desktop::Desktop aDesktop; // This string is used during initialization of the Gtk+ VCL module - Application::SetAppName( "soffice" ); + Application::SetAppName( u"soffice"_ustr ); // handle --version and --help already here, otherwise they would be handled // after VCL initialization that might fail if $DISPLAY is not set diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx index 5d75422cf0d5..480aecb7bd48 100644 --- a/desktop/source/deployment/dp_log.cxx +++ b/desktop/source/deployment/dp_log.cxx @@ -85,7 +85,7 @@ ProgressLogImpl::ProgressLogImpl( // XServiceInfo OUString ProgressLogImpl::getImplementationName() { - return "com.sun.star.comp.deployment.ProgressLog"; + return u"com.sun.star.comp.deployment.ProgressLog"_ustr; } sal_Bool ProgressLogImpl::supportsService( const OUString& ServiceName ) @@ -96,7 +96,7 @@ sal_Bool ProgressLogImpl::supportsService( const OUString& ServiceName ) css::uno::Sequence< OUString > ProgressLogImpl::getSupportedServiceNames() { // a private one - return { "com.sun.star.comp.deployment.ProgressLog" }; + return { u"com.sun.star.comp.deployment.ProgressLog"_ustr }; } // XProgressHandler diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx index f94b2989177b..09ebb86b99c5 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx @@ -27,8 +27,9 @@ using dp_gui::DependencyDialog; DependencyDialog::DependencyDialog(weld::Window* parent, std::vector<OUString> const& dependencies) - : GenericDialogController(parent, "desktop/ui/dependenciesdialog.ui", "Dependencies") - , m_xList(m_xBuilder->weld_tree_view("depListTreeview")) + : GenericDialogController(parent, u"desktop/ui/dependenciesdialog.ui"_ustr, + u"Dependencies"_ustr) + , m_xList(m_xBuilder->weld_tree_view(u"depListTreeview"_ustr)) { m_xList->set_size_request(-1, m_xList->get_height_rows(10)); for (auto const& dependency : dependencies) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index d5af09441405..99e1ccd489c2 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -223,13 +223,13 @@ bool ExtBoxWithBtns_Impl::Command(const CommandEvent& rCEvt) OUString ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const tools::Long nPos ) { if ( nPos >= static_cast<tools::Long>(getItemCount()) ) - return "CMD_NONE"; + return u"CMD_NONE"_ustr; - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "desktop/ui/extensionmenu.ui")); - std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu("menu")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, u"desktop/ui/extensionmenu.ui"_ustr)); + std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(u"menu"_ustr)); #if ENABLE_EXTENSION_UPDATE - xPopup->append("CMD_UPDATE", DpResId( RID_CTX_ITEM_CHECK_UPDATE ) ); + xPopup->append(u"CMD_UPDATE"_ustr, DpResId( RID_CTX_ITEM_CHECK_UPDATE ) ); #endif if ( ! GetEntryData( nPos )->m_bLocked ) @@ -237,18 +237,18 @@ OUString ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const tools::Lo if ( GetEntryData( nPos )->m_bUser ) { if ( GetEntryData( nPos )->m_eState == REGISTERED ) - xPopup->append("CMD_DISABLE", DpResId(RID_CTX_ITEM_DISABLE)); + xPopup->append(u"CMD_DISABLE"_ustr, DpResId(RID_CTX_ITEM_DISABLE)); else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE ) - xPopup->append("CMD_ENABLE", DpResId(RID_CTX_ITEM_ENABLE)); + xPopup->append(u"CMD_ENABLE"_ustr, DpResId(RID_CTX_ITEM_ENABLE)); } if (!officecfg::Office::ExtensionManager::ExtensionSecurity::DisableExtensionRemoval::get()) { - xPopup->append("CMD_REMOVE", DpResId(RID_CTX_ITEM_REMOVE)); + xPopup->append(u"CMD_REMOVE"_ustr, DpResId(RID_CTX_ITEM_REMOVE)); } } if ( !GetEntryData( nPos )->m_sLicenseText.isEmpty() ) - xPopup->append("CMD_SHOW_LICENSE", DpResId(RID_STR_SHOW_LICENSE_CMD)); + xPopup->append(u"CMD_SHOW_LICENSE"_ustr, DpResId(RID_STR_SHOW_LICENSE_CMD)); return xPopup->popup_at_rect(GetDrawingArea(), tools::Rectangle(rPos, Size(1, 1))); } @@ -385,8 +385,8 @@ bool DialogHelper::installForAllUsers(bool &bInstallForAll) { const SolarMutexGuard guard; incBusy(); - std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), "desktop/ui/installforalldialog.ui")); - std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("InstallForAllDialog")); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), u"desktop/ui/installforalldialog.ui"_ustr)); + std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"InstallForAllDialog"_ustr)); short nRet = xQuery->run(); xQuery.reset(); decBusy(); @@ -407,7 +407,7 @@ void DialogHelper::PostUserEvent( const Link<void*,void>& rLink, void* pCaller ) // ExtMgrDialog ExtMgrDialog::ExtMgrDialog(weld::Window *pParent, TheExtensionManager *pManager) - : GenericDialogController(pParent, "desktop/ui/extensionmanager.ui", "ExtensionManagerDialog") + : GenericDialogController(pParent, u"desktop/ui/extensionmanager.ui"_ustr, u"ExtensionManagerDialog"_ustr) , DialogHelper(pManager->getContext(), m_xDialog.get()) , m_sAddPackages(DpResId(RID_STR_ADD_PACKAGES)) , m_bHasProgress(false) @@ -421,22 +421,22 @@ ExtMgrDialog::ExtMgrDialog(weld::Window *pParent, TheExtensionManager *pManager) , m_nProgress(0) , m_aIdle( "ExtMgrDialog m_aIdle TimeOutHdl" ) , m_pManager(pManager) - , m_xExtensionBox(new ExtBoxWithBtns_Impl(m_xBuilder->weld_scrolled_window("scroll", true))) - , m_xExtensionBoxWnd(new weld::CustomWeld(*m_xBuilder, "extensions", *m_xExtensionBox)) - , m_xOptionsBtn(m_xBuilder->weld_button("optionsbtn")) - , m_xAddBtn(m_xBuilder->weld_button("addbtn")) - , m_xRemoveBtn(m_xBuilder->weld_button("removebtn")) - , m_xEnableBtn(m_xBuilder->weld_button("enablebtn")) - , m_xUpdateBtn(m_xBuilder->weld_button("updatebtn")) - , m_xCloseBtn(m_xBuilder->weld_button("close")) - , m_xBundledCbx(m_xBuilder->weld_check_button("bundled")) - , m_xSharedCbx(m_xBuilder->weld_check_button("shared")) - , m_xUserCbx(m_xBuilder->weld_check_button("user")) - , m_xGetExtensions(m_xBuilder->weld_link_button("getextensions")) - , m_xProgressText(m_xBuilder->weld_label("progressft")) - , m_xProgressBar(m_xBuilder->weld_progress_bar("progressbar")) - , m_xCancelBtn(m_xBuilder->weld_button("cancel")) - , m_xSearchEntry(m_xBuilder->weld_entry("search")) + , m_xExtensionBox(new ExtBoxWithBtns_Impl(m_xBuilder->weld_scrolled_window(u"scroll"_ustr, true))) + , m_xExtensionBoxWnd(new weld::CustomWeld(*m_xBuilder, u"extensions"_ustr, *m_xExtensionBox)) + , m_xOptionsBtn(m_xBuilder->weld_button(u"optionsbtn"_ustr)) + , m_xAddBtn(m_xBuilder->weld_button(u"addbtn"_ustr)) + , m_xRemoveBtn(m_xBuilder->weld_button(u"removebtn"_ustr)) + , m_xEnableBtn(m_xBuilder->weld_button(u"enablebtn"_ustr)) + , m_xUpdateBtn(m_xBuilder->weld_button(u"updatebtn"_ustr)) + , m_xCloseBtn(m_xBuilder->weld_button(u"close"_ustr)) + , m_xBundledCbx(m_xBuilder->weld_check_button(u"bundled"_ustr)) + , m_xSharedCbx(m_xBuilder->weld_check_button(u"shared"_ustr)) + , m_xUserCbx(m_xBuilder->weld_check_button(u"user"_ustr)) + , m_xGetExtensions(m_xBuilder->weld_link_button(u"getextensions"_ustr)) + , m_xProgressText(m_xBuilder->weld_label(u"progressft"_ustr)) + , m_xProgressBar(m_xBuilder->weld_progress_bar(u"progressbar"_ustr)) + , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xSearchEntry(m_xBuilder->weld_entry(u"search"_ustr)) { m_xExtensionBox->InitFromDialog(this); @@ -674,7 +674,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker() }(); // All files at top: - xFilePicker->appendFilter( StrAllFiles, "*.*" ); + xFilePicker->appendFilter( StrAllFiles, u"*.*"_ustr ); xFilePicker->appendFilter( DpResId(RID_STR_ALL_SUPPORTED), supportedFilters.makeStringAndClear() ); // then supported ones: for (auto const& elem : title2filter) @@ -713,7 +713,7 @@ void ExtMgrDialog::enableRemoveButton( bool bEnable ) } else { - m_xRemoveBtn->set_tooltip_text(""); + m_xRemoveBtn->set_tooltip_text(u""_ustr); } } @@ -803,7 +803,7 @@ IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface, void ) } else { - m_xAddBtn->set_tooltip_text(""); + m_xAddBtn->set_tooltip_text(u""_ustr); } m_xUpdateBtn->set_sensitive( !bLockInterface && m_xExtensionBox->getItemCount() ); @@ -984,7 +984,7 @@ void ExtMgrDialog::Close() //UpdateRequiredDialog UpdateRequiredDialog::UpdateRequiredDialog(weld::Window *pParent, TheExtensionManager *pManager) - : GenericDialogController(pParent, "desktop/ui/updaterequireddialog.ui", "UpdateRequiredDialog") + : GenericDialogController(pParent, u"desktop/ui/updaterequireddialog.ui"_ustr, u"UpdateRequiredDialog"_ustr) , DialogHelper(pManager->getContext(), m_xDialog.get()) , m_sCloseText(DpResId(RID_STR_CLOSE_BTN)) , m_bHasProgress(false) @@ -995,14 +995,14 @@ UpdateRequiredDialog::UpdateRequiredDialog(weld::Window *pParent, TheExtensionMa , m_nProgress(0) , m_aIdle( "UpdateRequiredDialog m_aIdle TimeOutHdl" ) , m_pManager(pManager) - , m_xExtensionBox(new ExtensionBox_Impl(m_xBuilder->weld_scrolled_window("scroll", true))) - , m_xExtensionBoxWnd(new weld::CustomWeld(*m_xBuilder, "extensions", *m_xExtensionBox)) - , m_xUpdateNeeded(m_xBuilder->weld_label("updatelabel")) - , m_xUpdateBtn(m_xBuilder->weld_button("ok")) - , m_xCloseBtn(m_xBuilder->weld_button("disable")) - , m_xCancelBtn(m_xBuilder->weld_button("cancel")) - , m_xProgressText(m_xBuilder->weld_label("progresslabel")) - , m_xProgressBar(m_xBuilder->weld_progress_bar("progress")) + , m_xExtensionBox(new ExtensionBox_Impl(m_xBuilder->weld_scrolled_window(u"scroll"_ustr, true))) + , m_xExtensionBoxWnd(new weld::CustomWeld(*m_xBuilder, u"extensions"_ustr, *m_xExtensionBox)) + , m_xUpdateNeeded(m_xBuilder->weld_label(u"updatelabel"_ustr)) + , m_xUpdateBtn(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCloseBtn(m_xBuilder->weld_button(u"disable"_ustr)) + , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr)) + , m_xProgressText(m_xBuilder->weld_label(u"progresslabel"_ustr)) + , m_xProgressBar(m_xBuilder->weld_progress_bar(u"progress"_ustr)) { m_xExtensionBox->setExtensionManager(pManager); @@ -1342,8 +1342,8 @@ void UpdateRequiredDialog::disableAllEntries() // ShowLicenseDialog ShowLicenseDialog::ShowLicenseDialog(weld::Window* pParent, const uno::Reference< deployment::XPackage> &xPackage) - : GenericDialogController(pParent, "desktop/ui/showlicensedialog.ui", "ShowLicenseDialog") - , m_xLicenseText(m_xBuilder->weld_text_view("textview")) + : GenericDialogController(pParent, u"desktop/ui/showlicensedialog.ui"_ustr, u"ShowLicenseDialog"_ustr) + , m_xLicenseText(m_xBuilder->weld_text_view(u"textview"_ustr)) { m_xLicenseText->set_size_request(m_xLicenseText->get_approximate_digit_width() * 72, m_xLicenseText->get_height_rows(21)); @@ -1365,7 +1365,7 @@ UpdateRequiredDialogService::UpdateRequiredDialogService( SAL_UNUSED_PARAMETER u // XServiceInfo OUString UpdateRequiredDialogService::getImplementationName() { - return "com.sun.star.comp.deployment.ui.UpdateRequiredDialog"; + return u"com.sun.star.comp.deployment.ui.UpdateRequiredDialog"_ustr; } sal_Bool UpdateRequiredDialogService::supportsService( const OUString& ServiceName ) @@ -1375,7 +1375,7 @@ sal_Bool UpdateRequiredDialogService::supportsService( const OUString& ServiceNa css::uno::Sequence< OUString > UpdateRequiredDialogService::getSupportedServiceNames() { - return { "com.sun.star.deployment.ui.UpdateRequiredDialog" }; + return { u"com.sun.star.deployment.ui.UpdateRequiredDialog"_ustr }; } diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index fe7194405576..e9b5326afe10 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -88,7 +88,7 @@ namespace { OUString getVersion( OUString const & sVersion ) { - return ( sVersion.isEmpty() ) ? OUString( "0" ) : sVersion; + return ( sVersion.isEmpty() ) ? u"0"_ustr : sVersion; } OUString getVersion( const uno::Reference< deployment::XPackage > &rPackage ) @@ -838,7 +838,7 @@ void ExtensionCmdQueue::Thread::_addExtension( ::rtl::Reference< ProgressCmdEnv uno::Any anyTitle; try { - anyTitle = ::ucbhelper::Content( rPackageURL, rCmdEnv, m_xContext ).getPropertyValue( "Title" ); + anyTitle = ::ucbhelper::Content( rPackageURL, rCmdEnv, m_xContext ).getPropertyValue( u"Title"_ustr ); } catch ( const uno::Exception & ) { @@ -1092,7 +1092,7 @@ void ExtensionCmdQueue::acceptLicense( const uno::Reference< deployment::XPackag void ExtensionCmdQueue::syncRepositories( const uno::Reference< uno::XComponentContext > &xContext ) { - dp_misc::syncRepositories( false, new ProgressCmdEnv( xContext, nullptr, "Extension Manager" ) ); + dp_misc::syncRepositories( false, new ProgressCmdEnv( xContext, nullptr, u"Extension Manager"_ustr ) ); } bool ExtensionCmdQueue::isBusy() @@ -1103,7 +1103,7 @@ bool ExtensionCmdQueue::isBusy() void handleInteractionRequest( const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< task::XInteractionRequest > & xRequest ) { - ::rtl::Reference< ProgressCmdEnv > xCmdEnv( new ProgressCmdEnv( xContext, nullptr, "Extension Manager" ) ); + ::rtl::Reference< ProgressCmdEnv > xCmdEnv( new ProgressCmdEnv( xContext, nullptr, u"Extension Manager"_ustr ) ); xCmdEnv->handle( xRequest ); } diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index c359cb7501c7..896c181f5807 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -161,7 +161,7 @@ ServiceImpl::ServiceImpl( Sequence<Any> const& args, // XServiceInfo OUString ServiceImpl::getImplementationName() { - return "com.sun.star.comp.deployment.ui.PackageManagerDialog"; + return u"com.sun.star.comp.deployment.ui.PackageManagerDialog"_ustr; } sal_Bool ServiceImpl::supportsService( const OUString& ServiceName ) @@ -171,7 +171,7 @@ sal_Bool ServiceImpl::supportsService( const OUString& ServiceName ) css::uno::Sequence< OUString > ServiceImpl::getSupportedServiceNames() { - return { "com.sun.star.deployment.ui.PackageManagerDialog" }; + return { u"com.sun.star.deployment.ui.PackageManagerDialog"_ustr }; } // XAsynchronousExecutableDialog @@ -220,7 +220,7 @@ void ServiceImpl::startExecuteModal( OSL_ASSERT( ! bAppUp ); app.reset( new MyApp ); if (! InitVCL() ) - throw RuntimeException( "Cannot initialize VCL!", + throw RuntimeException( u"Cannot initialize VCL!"_ustr, static_cast<OWeakObject *>(this) ); Application::SetDisplayName( utl::ConfigManager::getProductName() + diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 8cf6623d9676..f942ee349c4b 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -68,24 +68,24 @@ TheExtensionManager::TheExtensionManager( uno::Reference< awt::XWindow > xParent configuration::theDefaultProvider::get(xContext)); uno::Sequence<uno::Any> args(comphelper::InitAnyPropertySequence( { - {"nodepath", uno::Any(OUString("/org.openoffice.Office.OptionsDialog/Nodes"))} + {"nodepath", uno::Any(u"/org.openoffice.Office.OptionsDialog/Nodes"_ustr)} })); m_xNameAccessNodes.set( - xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", args), + xConfig->createInstanceWithArguments( u"com.sun.star.configuration.ConfigurationAccess"_ustr, args), uno::UNO_QUERY_THROW); // get the 'get more extensions here' url uno::Sequence<uno::Any> args2(comphelper::InitAnyPropertySequence( { - {"nodepath", uno::Any(OUString("/org.openoffice.Office.ExtensionManager/ExtensionRepositories"))} + {"nodepath", uno::Any(u"/org.openoffice.Office.ExtensionManager/ExtensionRepositories"_ustr)} })); uno::Reference< container::XNameAccess > xNameAccessRepositories; xNameAccessRepositories.set( - xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", args2), + xConfig->createInstanceWithArguments( u"com.sun.star.configuration.ConfigurationAccess"_ustr, args2), uno::UNO_QUERY_THROW); try { //throws css::container::NoSuchElementException, css::lang::WrappedTargetException - uno::Any value = xNameAccessRepositories->getByName("WebsiteLink"); + uno::Any value = xNameAccessRepositories->getByName(u"WebsiteLink"_ustr); m_sGetExtensionsURL = value.get< OUString > (); } catch ( const uno::Exception& ) @@ -395,7 +395,7 @@ bool TheExtensionManager::supportsOptions( const uno::Reference< deployment::XPa uno::Reference< XInterface> xIntNode = anyNode.get< uno::Reference< XInterface > >(); uno::Reference< container::XNameAccess > xNode( xIntNode, uno::UNO_QUERY_THROW ); - uno::Any anyLeaves = xNode->getByName("Leaves"); + uno::Any anyLeaves = xNode->getByName(u"Leaves"_ustr); uno::Reference< XInterface > xIntLeaves = anyLeaves.get< uno::Reference< XInterface > >(); uno::Reference< container::XNameAccess > xLeaves( xIntLeaves, uno::UNO_QUERY_THROW ); @@ -408,7 +408,7 @@ bool TheExtensionManager::supportsOptions( const uno::Reference< deployment::XPa uno::Reference< beans::XPropertySet > xLeaf( xIntLeaf, uno::UNO_QUERY_THROW ); //investigate the Id property if it matches the extension identifier which //has been passed in. - uno::Any anyValue = xLeaf->getPropertyValue("Id"); + uno::Any anyValue = xLeaf->getPropertyValue(u"Id"_ustr); OUString sId = anyValue.get< OUString >(); if ( sId == aId.Value ) @@ -468,7 +468,7 @@ void TheExtensionManager::queryTermination( ::lang::EventObject const & ) { ToTop(); throw frame::TerminationVetoException( - "The office cannot be closed while the Extension Manager is running", + u"The office cannot be closed while the Extension Manager is running"_ustr, static_cast<frame::XTerminateListener*>(this)); } else diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 85786e63535c..5d22ca840585 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -270,7 +270,7 @@ void UpdateDialog::Thread::execute() if (extensions[2].is() ) sVersionBundled = extensions[2]->getVersion(); - bool bSharedReadOnly = extMgr->isReadOnlyRepository("shared"); + bool bSharedReadOnly = extMgr->isReadOnlyRepository(u"shared"_ustr); dp_misc::UPDATE_SOURCE sourceUser = dp_misc::isUpdateUserExtension( bSharedReadOnly, sVersionUser, sVersionShared, sVersionBundled, sOnlineVersion); @@ -421,7 +421,7 @@ UpdateDialog::UpdateDialog( uno::Reference< uno::XComponentContext > const & context, weld::Window * parent, std::vector<uno::Reference< deployment::XPackage > > && vExtensionList, std::vector< dp_gui::UpdateData > * updateData) - : GenericDialogController(parent, "desktop/ui/updatedialog.ui", "UpdateDialog") + : GenericDialogController(parent, u"desktop/ui/updatedialog.ui"_ustr, u"UpdateDialog"_ustr) , m_context(context) , m_none(DpResId(RID_DLG_UPDATE_NONE)) , m_noInstallable(DpResId(RID_DLG_UPDATE_NOINSTALLABLE)) @@ -436,20 +436,20 @@ UpdateDialog::UpdateDialog( , m_ignoredUpdate(DpResId(RID_DLG_UPDATE_IGNORED_UPDATE)) , m_updateData(*updateData) , m_thread(new UpdateDialog::Thread(context, *this, std::move(vExtensionList))) - , m_xChecking(m_xBuilder->weld_label("UPDATE_CHECKING")) - , m_xThrobber(m_xBuilder->weld_spinner("THROBBER")) - , m_xUpdate(m_xBuilder->weld_label("UPDATE_LABEL")) - , m_xUpdates(m_xBuilder->weld_tree_view("checklist")) - , m_xAll(m_xBuilder->weld_check_button("UPDATE_ALL")) - , m_xDescription(m_xBuilder->weld_label("DESCRIPTION_LABEL")) - , m_xPublisherLabel(m_xBuilder->weld_label("PUBLISHER_LABEL")) - , m_xPublisherLink(m_xBuilder->weld_link_button("PUBLISHER_LINK")) - , m_xReleaseNotesLabel(m_xBuilder->weld_label("RELEASE_NOTES_LABEL")) - , m_xReleaseNotesLink(m_xBuilder->weld_link_button("RELEASE_NOTES_LINK")) - , m_xDescriptions(m_xBuilder->weld_text_view("DESCRIPTIONS")) - , m_xOk(m_xBuilder->weld_button("ok")) - , m_xClose(m_xBuilder->weld_button("close")) - , m_xHelp(m_xBuilder->weld_button("help")) + , m_xChecking(m_xBuilder->weld_label(u"UPDATE_CHECKING"_ustr)) + , m_xThrobber(m_xBuilder->weld_spinner(u"THROBBER"_ustr)) + , m_xUpdate(m_xBuilder->weld_label(u"UPDATE_LABEL"_ustr)) + , m_xUpdates(m_xBuilder->weld_tree_view(u"checklist"_ustr)) + , m_xAll(m_xBuilder->weld_check_button(u"UPDATE_ALL"_ustr)) + , m_xDescription(m_xBuilder->weld_label(u"DESCRIPTION_LABEL"_ustr)) + , m_xPublisherLabel(m_xBuilder->weld_label(u"PUBLISHER_LABEL"_ustr)) + , m_xPublisherLink(m_xBuilder->weld_link_button(u"PUBLISHER_LINK"_ustr)) + , m_xReleaseNotesLabel(m_xBuilder->weld_label(u"RELEASE_NOTES_LABEL"_ustr)) + , m_xReleaseNotesLink(m_xBuilder->weld_link_button(u"RELEASE_NOTES_LINK"_ustr)) + , m_xDescriptions(m_xBuilder->weld_text_view(u"DESCRIPTIONS"_ustr)) + , m_xOk(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xClose(m_xBuilder->weld_button(u"close"_ustr)) + , m_xHelp(m_xBuilder->weld_button(u"help"_ustr)) { auto nWidth = m_xDescriptions->get_approximate_digit_width() * 62; auto nHeight = m_xDescriptions->get_height_rows(8); @@ -608,16 +608,16 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, comphelper::getProcessComponentContext())); uno::Sequence< uno::Any > aArgumentList{ uno::Any(comphelper::makePropertyValue( - "nodepath", - OUString("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob"))) }; + u"nodepath"_ustr, + u"org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob"_ustr)) }; uno::Reference< container::XNameAccess > xNameAccess( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArgumentList ), + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgumentList ), uno::UNO_QUERY_THROW ); util::URL aURL; - xNameAccess->getByName("URL") >>= aURL.Complete; + xNameAccess->getByName(u"URL"_ustr) >>= aURL.Complete; uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); uno::Reference < util::XURLTransformer > xTransformer = util::URLTransformer::create(xContext); @@ -631,8 +631,8 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, if( xDispatch.is() ) { - uno::Sequence aPropList{ comphelper::makePropertyValue("updateList", rItemList), - comphelper::makePropertyValue("prepareOnly", bPrepareOnly) }; + uno::Sequence aPropList{ comphelper::makePropertyValue(u"updateList"_ustr, rItemList), + comphelper::makePropertyValue(u"prepareOnly"_ustr, bPrepareOnly) }; xDispatch->dispatch(aURL, aPropList ); } @@ -695,12 +695,12 @@ void UpdateDialog::clearDescription() { m_xPublisherLabel->hide(); m_xPublisherLink->hide(); - m_xPublisherLink->set_label(""); - m_xPublisherLink->set_uri(""); + m_xPublisherLink->set_label(u""_ustr); + m_xPublisherLink->set_uri(u""_ustr); m_xReleaseNotesLabel->hide(); m_xReleaseNotesLink->hide(); - m_xReleaseNotesLink->set_uri( "" ); - m_xDescriptions->set_text(""); + m_xReleaseNotesLink->set_uri( u""_ustr ); + m_xDescriptions->set_text(u""_ustr); } bool UpdateDialog::showDescription(uno::Reference< xml::dom::XNode > const & aUpdateInfo) @@ -715,7 +715,7 @@ bool UpdateDialog::showDescription(uno::Reference< deployment::XPackage > const OSL_ASSERT(aExtension.is()); beans::StringPair pubInfo = aExtension->getPublisherInfo(); return showDescription(std::make_pair(pubInfo.First, pubInfo.Second), - ""); + u""_ustr); } bool UpdateDialog::showDescription(std::pair< OUString, OUString > const & pairPublisher, @@ -759,10 +759,10 @@ void UpdateDialog::getIgnoredUpdates() { uno::Reference< lang::XMultiServiceFactory > xConfig( configuration::theDefaultProvider::get(m_context)); - beans::NamedValue aValue( "nodepath", uno::Any( OUString(IGNORED_UPDATES) ) ); + beans::NamedValue aValue( u"nodepath"_ustr, uno::Any( OUString(IGNORED_UPDATES) ) ); uno::Sequence< uno::Any > args{ uno::Any(aValue) }; - uno::Reference< container::XNameAccess > xNameAccess( xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", args), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xNameAccess( xConfig->createInstanceWithArguments( u"com.sun.star.configuration.ConfigurationAccess"_ustr, args), uno::UNO_QUERY_THROW ); const uno::Sequence< OUString > aElementNames = xNameAccess->getElementNames(); for ( OUString const & aIdentifier : aElementNames ) @@ -862,8 +862,8 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler, weld::TreeView&, void) if (data.unsatisfiedDependencies.hasElements()) { // create error string for version mismatch - OUString sVersion( "%VERSION" ); - OUString sProductName( "%PRODUCTNAME" ); + OUString sVersion( u"%VERSION"_ustr ); + OUString sProductName( u"%PRODUCTNAME"_ustr ); sal_Int32 nPos = m_noDependencyCurVer.indexOf( sVersion ); if ( nPos >= 0 ) { diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index e15c72c9caac..1e87852d9b4a 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -179,8 +179,8 @@ UpdateInstallDialog::UpdateInstallDialog( weld::Window* pParent, std::vector<dp_gui::UpdateData> & aVecUpdateData, css::uno::Reference< css::uno::XComponentContext > const & xCtx) - : GenericDialogController(pParent, "desktop/ui/updateinstalldialog.ui", - "UpdateInstallDialog") + : GenericDialogController(pParent, u"desktop/ui/updateinstalldialog.ui"_ustr, + u"UpdateInstallDialog"_ustr) , m_thread(new Thread(xCtx, *this, aVecUpdateData)) , m_bError(false) , m_bNoEntry(true) @@ -192,13 +192,13 @@ UpdateInstallDialog::UpdateInstallDialog( , m_sErrorLicenseDeclined(DpResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED)) , m_sNoInstall(DpResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL)) , m_sThisErrorOccurred(DpResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED)) - , m_xFt_action(m_xBuilder->weld_label("DOWNLOADING")) - , m_xStatusbar(m_xBuilder->weld_progress_bar("STATUSBAR")) - , m_xFt_extension_name(m_xBuilder->weld_label("EXTENSION_NAME")) - , m_xMle_info(m_xBuilder->weld_text_view("INFO")) - , m_xHelp(m_xBuilder->weld_button("help")) - , m_xOk(m_xBuilder->weld_button("ok")) - , m_xCancel(m_xBuilder->weld_button("cancel")) + , m_xFt_action(m_xBuilder->weld_label(u"DOWNLOADING"_ustr)) + , m_xStatusbar(m_xBuilder->weld_progress_bar(u"STATUSBAR"_ustr)) + , m_xFt_extension_name(m_xBuilder->weld_label(u"EXTENSION_NAME"_ustr)) + , m_xMle_info(m_xBuilder->weld_text_view(u"INFO"_ustr)) + , m_xHelp(m_xBuilder->weld_button(u"help"_ustr)) + , m_xOk(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xCancel(m_xBuilder->weld_button(u"cancel"_ustr)) { m_xMle_info->set_size_request(m_xMle_info->get_approximate_digit_width() * 52, m_xMle_info->get_height_rows(5)); @@ -292,7 +292,7 @@ void UpdateInstallDialog::Thread::downloadExtensions() //create the download directory in the temp folder OUString sTempDir; if (::osl::FileBase::getTempDirURL(sTempDir) != ::osl::FileBase::E_None) - throw css::uno::Exception("Could not get URL for the temp directory. No extensions will be installed.", nullptr); + throw css::uno::Exception(u"Could not get URL for the temp directory. No extensions will be installed."_ustr, nullptr); //create a unique name for the directory OUString tempEntry, destFolder; @@ -439,15 +439,15 @@ void UpdateInstallDialog::Thread::installExtensions() } if (!updateData.aUpdateSource.is() && !updateData.sLocalURL.isEmpty()) { - css::beans::NamedValue prop("EXTENSION_UPDATE", css::uno::Any(OUString("1"))); + css::beans::NamedValue prop(u"EXTENSION_UPDATE"_ustr, css::uno::Any(u"1"_ustr)); if (!updateData.bIsShared) xExtension = m_dialog.getExtensionManager()->addExtension( updateData.sLocalURL, css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - "user", xAbortChannel, m_updateCmdEnv); + u"user"_ustr, xAbortChannel, m_updateCmdEnv); else xExtension = m_dialog.getExtensionManager()->addExtension( updateData.sLocalURL, css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - "shared", xAbortChannel, m_updateCmdEnv); + u"shared"_ustr, xAbortChannel, m_updateCmdEnv); } else if (updateData.aUpdateSource.is()) { @@ -456,15 +456,15 @@ void UpdateInstallDialog::Thread::installExtensions() //add extension. Currently it contains only "SUPPRESS_LICENSE". So it could happen //that a license is displayed when updating from the shared repository, although the //shared extension was installed using "SUPPRESS_LICENSE". - css::beans::NamedValue prop("EXTENSION_UPDATE", css::uno::Any(OUString("1"))); + css::beans::NamedValue prop(u"EXTENSION_UPDATE"_ustr, css::uno::Any(u"1"_ustr)); if (!updateData.bIsShared) xExtension = m_dialog.getExtensionManager()->addExtension( updateData.aUpdateSource->getURL(), css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - "user", xAbortChannel, m_updateCmdEnv); + u"user"_ustr, xAbortChannel, m_updateCmdEnv); else xExtension = m_dialog.getExtensionManager()->addExtension( updateData.aUpdateSource->getURL(), css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - "shared", xAbortChannel, m_updateCmdEnv); + u"shared"_ustr, xAbortChannel, m_updateCmdEnv); } } catch (css::deployment::DeploymentException & de) diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx index 23f184a333dc..24bf5e350d65 100644 --- a/desktop/source/deployment/gui/license_dialog.cxx +++ b/desktop/source/deployment/gui/license_dialog.cxx @@ -77,17 +77,17 @@ LicenseDialogImpl::LicenseDialogImpl( weld::Window * pParent, std::u16string_view sExtensionName, const OUString & sLicenseText) - : GenericDialogController(pParent, "desktop/ui/licensedialog.ui", "LicenseDialog") + : GenericDialogController(pParent, u"desktop/ui/licensedialog.ui"_ustr, u"LicenseDialog"_ustr) , m_bLicenseRead(false) , m_aResized("desktop LicenseDialogImpl m_aResized") , m_aRepeat("LicenseDialogImpl m_aRepeat") - , m_xFtHead(m_xBuilder->weld_label("head")) - , m_xArrow1(m_xBuilder->weld_widget("arrow1")) - , m_xArrow2(m_xBuilder->weld_widget("arrow2")) - , m_xLicense(m_xBuilder->weld_text_view("textview")) - , m_xDown(m_xBuilder->weld_button("down")) - , m_xAcceptButton(m_xBuilder->weld_button("ok")) - , m_xDeclineButton(m_xBuilder->weld_button("cancel")) + , m_xFtHead(m_xBuilder->weld_label(u"head"_ustr)) + , m_xArrow1(m_xBuilder->weld_widget(u"arrow1"_ustr)) + , m_xArrow2(m_xBuilder->weld_widget(u"arrow2"_ustr)) + , m_xLicense(m_xBuilder->weld_text_view(u"textview"_ustr)) + , m_xDown(m_xBuilder->weld_button(u"down"_ustr)) + , m_xAcceptButton(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xDeclineButton(m_xBuilder->weld_button(u"cancel"_ustr)) { m_xArrow1->show(); m_xArrow2->hide(); @@ -207,7 +207,7 @@ LicenseDialog::LicenseDialog( Sequence<Any> const& args, // XServiceInfo OUString LicenseDialog::getImplementationName() { - return "com.sun.star.comp.deployment.ui.LicenseDialog"; + return u"com.sun.star.comp.deployment.ui.LicenseDialog"_ustr; } sal_Bool LicenseDialog::supportsService( const OUString& ServiceName ) @@ -217,7 +217,7 @@ sal_Bool LicenseDialog::supportsService( const OUString& ServiceName ) css::uno::Sequence< OUString > LicenseDialog::getSupportedServiceNames() { - return { "com.sun.star.deployment.ui.LicenseDialog" }; + return { u"com.sun.star.deployment.ui.LicenseDialog"_ustr }; } diff --git a/desktop/source/deployment/inc/dp_ucb.h b/desktop/source/deployment/inc/dp_ucb.h index e72a2cce9332..1cf03eb31631 100644 --- a/desktop/source/deployment/inc/dp_ucb.h +++ b/desktop/source/deployment/inc/dp_ucb.h @@ -36,12 +36,12 @@ struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle { static css::uno::Sequence< OUString > getTitleSequence() { - css::uno::Sequence<OUString> aSeq { "Title" }; + css::uno::Sequence<OUString> aSeq { u"Title"_ustr }; return aSeq; } static OUString getTitle( ::ucbhelper::Content &rContent ) { - return rContent.getPropertyValue("Title").get<OUString>(); + return rContent.getPropertyValue(u"Title"_ustr).get<OUString>(); } // just return titles - the ucbhelper should have a simpler API for this [!] static css::uno::Reference< css::sdbc::XResultSet > diff --git a/desktop/source/deployment/manager/dp_activepackages.hxx b/desktop/source/deployment/manager/dp_activepackages.hxx index fae938019c27..105c34c31e8e 100644 --- a/desktop/source/deployment/manager/dp_activepackages.hxx +++ b/desktop/source/deployment/manager/dp_activepackages.hxx @@ -37,7 +37,7 @@ namespace dp_manager { class ActivePackages { public: struct Data { - Data(): failedPrerequisites("0") + Data(): failedPrerequisites(u"0"_ustr) {} /* name of the temporary file (shared, user extension) or the name of the folder of the bundled extension. diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 6c210101fcc0..29504fd32954 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -173,7 +173,7 @@ ExtensionManager::~ExtensionManager() // XServiceInfo OUString ExtensionManager::getImplementationName() { - return "com.sun.star.comp.deployment.ExtensionManager"; + return u"com.sun.star.comp.deployment.ExtensionManager"_ustr; } sal_Bool ExtensionManager::supportsService( const OUString& ServiceName ) @@ -184,28 +184,28 @@ sal_Bool ExtensionManager::supportsService( const OUString& ServiceName ) css::uno::Sequence< OUString > ExtensionManager::getSupportedServiceNames() { // a private one: - return { "com.sun.star.comp.deployment.ExtensionManager" }; + return { u"com.sun.star.comp.deployment.ExtensionManager"_ustr }; } Reference<css::deployment::XPackageManager> ExtensionManager::getUserRepository() { - return m_xPackageManagerFactory->getPackageManager("user"); + return m_xPackageManagerFactory->getPackageManager(u"user"_ustr); } Reference<css::deployment::XPackageManager> ExtensionManager::getSharedRepository() { - return m_xPackageManagerFactory->getPackageManager("shared"); + return m_xPackageManagerFactory->getPackageManager(u"shared"_ustr); } Reference<css::deployment::XPackageManager> ExtensionManager::getBundledRepository() { - return m_xPackageManagerFactory->getPackageManager("bundled"); + return m_xPackageManagerFactory->getPackageManager(u"bundled"_ustr); } Reference<css::deployment::XPackageManager> ExtensionManager::getTmpRepository() { - return m_xPackageManagerFactory->getPackageManager("tmp"); + return m_xPackageManagerFactory->getPackageManager(u"tmp"_ustr); } Reference<css::deployment::XPackageManager> ExtensionManager::getBakRepository() { - return m_xPackageManagerFactory->getPackageManager("bak"); + return m_xPackageManagerFactory->getPackageManager(u"bak"_ustr); } Reference<task::XAbortChannel> ExtensionManager::createAbortChannel() @@ -229,7 +229,7 @@ ExtensionManager::getPackageManager(std::u16string_view repository) xPackageManager = getBakRepository(); else throw lang::IllegalArgumentException( - "No valid repository name provided.", + u"No valid repository name provided."_ustr, static_cast<cppu::OWeakObject*>(this), 0); return xPackageManager; } @@ -349,7 +349,7 @@ ExtensionManager::getExtensionsWithSameIdentifier( { uno::Any exc = ::cppu::getCaughtException(); throw css::deployment::DeploymentException( - "Extension Manager: exception during getExtensionsWithSameIdentifier", + u"Extension Manager: exception during getExtensionsWithSameIdentifier"_ustr, static_cast<OWeakObject*>(this), exc); } } @@ -594,12 +594,12 @@ bool ExtensionManager::doChecksForAddExtension( } catch (const uno::Exception &) { uno::Any excOccurred = ::cppu::getCaughtException(); css::deployment::DeploymentException exc( - "Extension Manager: exception in doChecksForAddExtension", + u"Extension Manager: exception in doChecksForAddExtension"_ustr, static_cast<OWeakObject*>(this), excOccurred); throw exc; } catch (...) { throw uno::RuntimeException( - "Extension Manager: unexpected exception in doChecksForAddExtension", + u"Extension Manager: unexpected exception in doChecksForAddExtension"_ustr, static_cast<OWeakObject*>(this)); } } @@ -620,7 +620,7 @@ Reference<css::deployment::XPackage> ExtensionManager::addExtension( xPackageManager = getSharedRepository(); else throw lang::IllegalArgumentException( - "No valid repository name provided.", + u"No valid repository name provided."_ustr, static_cast<cppu::OWeakObject*>(this), 0); //We must make sure that the xTmpExtension is not create twice, because this //would remove the first one. @@ -744,14 +744,14 @@ Reference<css::deployment::XPackage> ExtensionManager::addExtension( } catch (const uno::Exception &) { uno::Any excOccurred = ::cppu::getCaughtException(); css::deployment::DeploymentException exc( - "Extension Manager: Exception on fireModified() " - "in the scope of 'if (failedPrereq == 0)'", + u"Extension Manager: Exception on fireModified() " + "in the scope of 'if (failedPrereq == 0)'"_ustr, static_cast<OWeakObject*>(this), excOccurred); throw exc; } catch (...) { throw uno::RuntimeException( - "Extension Manager: RuntimeException on fireModified() " - "in the scope of 'if (failedPrereq == 0)'", + u"Extension Manager: RuntimeException on fireModified() " + "in the scope of 'if (failedPrereq == 0)'"_ustr, static_cast<OWeakObject*>(this)); } } @@ -763,7 +763,7 @@ Reference<css::deployment::XPackage> ExtensionManager::addExtension( ::cppu::throwException(pSilentCommandEnv->m_UnknownException); else throw css::deployment::DeploymentException ( - "Extension Manager: exception during addExtension, ckeckPrerequisites failed", + u"Extension Manager: exception during addExtension, ckeckPrerequisites failed"_ustr, static_cast<OWeakObject*>(this), uno::Any()); } } @@ -835,7 +835,7 @@ void ExtensionManager::removeExtension( xPackageManager = getSharedRepository(); else throw lang::IllegalArgumentException( - "No valid repository name provided.", + u"No valid repository name provided."_ustr, static_cast<cppu::OWeakObject*>(this), 0); bUserDisabled = isUserDisabled(identifier, fileName); @@ -868,7 +868,7 @@ void ExtensionManager::removeExtension( } catch (...) { excOccurred1 = ::cppu::getCaughtException(); css::deployment::DeploymentException exc( - "Extension Manager: exception during removeExtension", + u"Extension Manager: exception during removeExtension"_ustr, static_cast<OWeakObject*>(this), excOccurred1); excOccurred1 <<= exc; } @@ -925,7 +925,7 @@ void ExtensionManager::enableExtension( OUString repository = extension->getRepositoryName(); if (repository != "user") throw lang::IllegalArgumentException( - "No valid repository name provided.", + u"No valid repository name provided."_ustr, static_cast<cppu::OWeakObject*>(this), 0); bUserDisabled = isUserDisabled(dp_misc::getIdentifier(extension), @@ -948,7 +948,7 @@ void ExtensionManager::enableExtension( } catch (...) { excOccurred = ::cppu::getCaughtException(); css::deployment::DeploymentException exc( - "Extension Manager: exception during enableExtension", + u"Extension Manager: exception during enableExtension"_ustr, static_cast<OWeakObject*>(this), excOccurred); excOccurred <<= exc; } @@ -1006,7 +1006,7 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable( } catch (...) { uno::Any excOccurred = ::cppu::getCaughtException(); css::deployment::DeploymentException exc( - "Extension Manager: exception during disableExtension", + u"Extension Manager: exception during disableExtension"_ustr, static_cast<OWeakObject*>(this), excOccurred); throw exc; } @@ -1027,7 +1027,7 @@ void ExtensionManager::disableExtension( const OUString repository( extension->getRepositoryName()); if (repository != "user") throw lang::IllegalArgumentException( - "No valid repository name provided.", + u"No valid repository name provided."_ustr, static_cast<cppu::OWeakObject*>(this), 0); const OUString id(dp_misc::getIdentifier(extension)); @@ -1049,7 +1049,7 @@ void ExtensionManager::disableExtension( } catch (...) { excOccurred = ::cppu::getCaughtException(); css::deployment::DeploymentException exc( - "Extension Manager: exception during disableExtension", + u"Extension Manager: exception during disableExtension"_ustr, static_cast<OWeakObject*>(this), excOccurred); excOccurred <<= exc; } @@ -1144,7 +1144,7 @@ uno::Sequence< uno::Sequence<Reference<css::deployment::XPackage> > > } catch (...) { uno::Any exc = ::cppu::getCaughtException(); throw css::deployment::DeploymentException( - "Extension Manager: exception during enableExtension", + u"Extension Manager: exception during enableExtension"_ustr, static_cast<OWeakObject*>(this), exc); } } @@ -1223,7 +1223,7 @@ void ExtensionManager::reinstallDeployedExtensions( } catch (...) { uno::Any exc = ::cppu::getCaughtException(); throw css::deployment::DeploymentException( - "Extension Manager: exception during enableExtension", + u"Extension Manager: exception during enableExtension"_ustr, static_cast<OWeakObject*>(this), exc); } } @@ -1239,13 +1239,13 @@ sal_Bool ExtensionManager::synchronize( sSynchronizingShared = sSynchronizingShared.replaceAll("%NAME", "shared"); dp_misc::ProgressLevel progressShared(xCmdEnv, sSynchronizingShared); bool bModified = getSharedRepository()->synchronize(xAbortChannel, xCmdEnv); - progressShared.update(" "); + progressShared.update(u" "_ustr); OUString sSynchronizingBundled(StrSyncRepository()); sSynchronizingBundled = sSynchronizingBundled.replaceAll("%NAME", "bundled"); dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled); bModified |= static_cast<bool>(getBundledRepository()->synchronize(xAbortChannel, xCmdEnv)); - progressBundled.update(" "); + progressBundled.update(u" "_ustr); //Always determine the active extension. //TODO: Is this still necessary? (It used to be necessary for the @@ -1272,9 +1272,9 @@ sal_Bool ExtensionManager::synchronize( //so we will no repeat this every time OOo starts. OSL_FAIL("Extensions Manager: synchronize"); } - OUString lastSyncBundled("$BUNDLED_EXTENSIONS_USER/lastsynchronized"); + OUString lastSyncBundled(u"$BUNDLED_EXTENSIONS_USER/lastsynchronized"_ustr); writeLastModified(lastSyncBundled, xCmdEnv, m_xContext); - OUString lastSyncShared("$SHARED_EXTENSIONS_USER/lastsynchronized"); + OUString lastSyncShared(u"$SHARED_EXTENSIONS_USER/lastsynchronized"_ustr); writeLastModified(lastSyncShared, xCmdEnv, m_xContext); return bModified; } catch ( const css::deployment::DeploymentException& ) { @@ -1290,7 +1290,7 @@ sal_Bool ExtensionManager::synchronize( } catch (...) { uno::Any exc = ::cppu::getCaughtException(); throw css::deployment::DeploymentException( - "Extension Manager: exception in synchronize", + u"Extension Manager: exception in synchronize"_ustr, static_cast<OWeakObject*>(this), exc); } } @@ -1400,7 +1400,7 @@ void ExtensionManager::check() ::osl::MutexGuard guard( m_aMutex ); if (rBHelper.bInDispose || rBHelper.bDisposed) { throw lang::DisposedException( - "ExtensionManager instance has already been disposed!", + u"ExtensionManager instance has already been disposed!"_ustr, static_cast<OWeakObject *>(this) ); } } diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx index 5b6d6a92b947..14208c3b27a3 100644 --- a/desktop/source/deployment/manager/dp_informationprovider.cxx +++ b/desktop/source/deployment/manager/dp_informationprovider.cxx @@ -96,7 +96,7 @@ PackageInformationProvider::PackageInformationProvider( uno::Reference< uno::XCo // XServiceInfo OUString PackageInformationProvider::getImplementationName() { - return "com.sun.star.comp.deployment.PackageInformationProvider"; + return u"com.sun.star.comp.deployment.PackageInformationProvider"_ustr; } sal_Bool PackageInformationProvider::supportsService( const OUString& ServiceName ) @@ -107,7 +107,7 @@ sal_Bool PackageInformationProvider::supportsService( const OUString& ServiceNam css::uno::Sequence< OUString > PackageInformationProvider::getSupportedServiceNames() { // a private one: - return { "com.sun.star.comp.deployment.PackageInformationProvider" }; + return { u"com.sun.star.comp.deployment.PackageInformationProvider"_ustr }; } OUString PackageInformationProvider::getPackageLocation( @@ -148,15 +148,15 @@ OUString PackageInformationProvider::getPackageLocation( OUString SAL_CALL PackageInformationProvider::getPackageLocation( const OUString& _sExtensionId ) { - OUString aLocationURL = getPackageLocation( "user", _sExtensionId ); + OUString aLocationURL = getPackageLocation( u"user"_ustr, _sExtensionId ); if ( aLocationURL.isEmpty() ) { - aLocationURL = getPackageLocation( "shared", _sExtensionId ); + aLocationURL = getPackageLocation( u"shared"_ustr, _sExtensionId ); } if ( aLocationURL.isEmpty() ) { - aLocationURL = getPackageLocation( "bundled", _sExtensionId ); + aLocationURL = getPackageLocation( u"bundled"_ustr, _sExtensionId ); } if ( !aLocationURL.isEmpty() ) { @@ -248,7 +248,7 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId ) if (extensions[2].is() ) sVersionBundled = extensions[2]->getVersion(); - bool bSharedReadOnly = extMgr->isReadOnlyRepository("shared"); + bool bSharedReadOnly = extMgr->isReadOnlyRepository(u"shared"_ustr); dp_misc::UPDATE_SOURCE sourceUser = dp_misc::isUpdateUserExtension( bSharedReadOnly, sVersionUser, sVersionShared, sVersionBundled, sOnlineVersion); diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index d882b77bafa3..c2c8c621df1f 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx -e ... etc. - the rest is truncated