diff options
Diffstat (limited to 'framework')
116 files changed, 612 insertions, 610 deletions
diff --git a/framework/inc/helper/statusindicatorfactory.hxx b/framework/inc/helper/statusindicatorfactory.hxx index c492a645f5bc..007607e1d543 100644 --- a/framework/inc/helper/statusindicatorfactory.hxx +++ b/framework/inc/helper/statusindicatorfactory.hxx @@ -174,7 +174,7 @@ class StatusIndicatorFactory final : public ::cppu::WeakImplHelper< virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.StatusIndicatorFactory"; + return u"com.sun.star.comp.framework.StatusIndicatorFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -184,7 +184,7 @@ class StatusIndicatorFactory final : public ::cppu::WeakImplHelper< virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return { "com.sun.star.task.StatusIndicatorFactory" }; + return { u"com.sun.star.task.StatusIndicatorFactory"_ustr }; } // XInitialization diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index f2f32a53a12f..3b0b57e39132 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -72,7 +72,7 @@ namespace framework DECLARE_XTYPEPROVIDER() virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.LayoutManager"; + return u"com.sun.star.comp.framework.LayoutManager"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -82,7 +82,7 @@ namespace framework virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.LayoutManager" }; + css::uno::Sequence< OUString > aSeq { u"com.sun.star.frame.LayoutManager"_ustr }; return aSeq; } diff --git a/framework/inc/uiconfiguration/imagemanager.hxx b/framework/inc/uiconfiguration/imagemanager.hxx index aacc8bbd3c72..a78fb675ed28 100644 --- a/framework/inc/uiconfiguration/imagemanager.hxx +++ b/framework/inc/uiconfiguration/imagemanager.hxx @@ -40,7 +40,7 @@ namespace framework virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ImageManager"; + return u"com.sun.star.comp.framework.ImageManager"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -50,7 +50,7 @@ namespace framework virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - css::uno::Sequence< OUString > aSeq { "com.sun.star.ui.ImageManager" }; + css::uno::Sequence< OUString > aSeq { u"com.sun.star.ui.ImageManager"_ustr }; return aSeq; } diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index aeeb1f9aa216..3b54e6de55a8 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -44,7 +44,7 @@ class UICommandDescription : public UICommandDescription_BASE virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.UICommandDescription"; + return u"com.sun.star.comp.framework.UICommandDescription"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -54,7 +54,7 @@ class UICommandDescription : public UICommandDescription_BASE virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.UICommandDescription" }; + css::uno::Sequence< OUString > aSeq { u"com.sun.star.frame.UICommandDescription"_ustr }; return aSeq; } diff --git a/framework/inc/uifactory/menubarfactory.hxx b/framework/inc/uifactory/menubarfactory.hxx index a3ec76daa143..9a549026f5a2 100644 --- a/framework/inc/uifactory/menubarfactory.hxx +++ b/framework/inc/uifactory/menubarfactory.hxx @@ -42,7 +42,7 @@ typedef ::cppu::WeakImplHelper< virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.MenuBarFactory"; + return u"com.sun.star.comp.framework.MenuBarFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -52,7 +52,7 @@ typedef ::cppu::WeakImplHelper< virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - css::uno::Sequence< OUString > aSeq { "com.sun.star.ui.UIElementFactory" }; + css::uno::Sequence< OUString > aSeq { u"com.sun.star.ui.UIElementFactory"_ustr }; return aSeq; } diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx index 7ba29ef9cb7b..42cf7ceed0a4 100644 --- a/framework/qa/cppunit/dispatchtest.cxx +++ b/framework/qa/cppunit/dispatchtest.cxx @@ -60,7 +60,7 @@ public: }; MyInterceptor::MyInterceptor() - : m_aDisabledCommands{ ".uno:Bold" } + : m_aDisabledCommands{ u".uno:Bold"_ustr } , m_nExpected(0) , m_nUnexpected(0) { @@ -144,14 +144,15 @@ class DispatchTest : public UnoApiTest { public: DispatchTest() - : UnoApiTest("/framework/qa/cppunit/data/") + : UnoApiTest(u"/framework/qa/cppunit/data/"_ustr) { } }; CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception) { - mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"); + mxComponent + = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xModel.is()); @@ -162,10 +163,10 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception) rtl::Reference<MyInterceptor> pInterceptor(new MyInterceptor()); xRegistration->registerDispatchProviderInterceptor(pInterceptor); - dispatchCommand(mxComponent, ".uno:Bold", {}); + dispatchCommand(mxComponent, u".uno:Bold"_ustr, {}); CPPUNIT_ASSERT_GREATER(0, pInterceptor->getExpected()); CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected()); - dispatchCommand(mxComponent, ".uno:Italic", {}); + dispatchCommand(mxComponent, u".uno:Italic"_ustr, {}); // This was 1: MyInterceptor::queryDispatch() was called for .uno:Italic. CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected()); } @@ -186,7 +187,7 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testSfxOfficeDispatchDispose) url.Complete = xModel->getURL() + "#dummy"; xParser->parseStrict(url); - uno::Reference<frame::XDispatch> xDisp(xFrame->queryDispatch(url, "", 0)); + uno::Reference<frame::XDispatch> xDisp(xFrame->queryDispatch(url, u""_ustr, 0)); CPPUNIT_ASSERT(xDisp.is()); mxComponent->dispose(); diff --git a/framework/qa/cppunit/loadenv.cxx b/framework/qa/cppunit/loadenv.cxx index c9aa2789d9ca..101312bf1a2e 100644 --- a/framework/qa/cppunit/loadenv.cxx +++ b/framework/qa/cppunit/loadenv.cxx @@ -25,7 +25,7 @@ class Test : public UnoApiTest { public: Test() - : UnoApiTest("/framework/qa/cppunit/data/") + : UnoApiTest(u"/framework/qa/cppunit/data/"_ustr) { } }; @@ -43,7 +43,7 @@ IMPL_STATIC_LINK(DocumentOpener, OpenDocument, void*, pArg, void) uno::Reference<uno::XComponentContext> xComponentContext = comphelper::getProcessComponentContext(); uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(xComponentContext); - xDesktop->loadComponentFromURL(*pURL, "_default", 0, {}); + xDesktop->loadComponentFromURL(*pURL, u"_default"_ustr, 0, {}); delete pURL; } diff --git a/framework/qa/cppunit/services.cxx b/framework/qa/cppunit/services.cxx index be6c0def70fa..baf39ffa6a3f 100644 --- a/framework/qa/cppunit/services.cxx +++ b/framework/qa/cppunit/services.cxx @@ -29,7 +29,7 @@ class Test : public UnoApiTest { public: Test() - : UnoApiTest("/framework/qa/cppunit/data/") + : UnoApiTest(u"/framework/qa/cppunit/data/"_ustr) { } }; @@ -58,11 +58,11 @@ void TestThread::execute() { sal_Int32 nSearchFlags = frame::FrameSearchFlag::AUTO; uno::Sequence<beans::PropertyValue> aArguments = { - comphelper::makePropertyValue("OnMainThread", true), + comphelper::makePropertyValue(u"OnMainThread"_ustr, true), }; // Note how this is invoking loadComponentFromURL() on a frame, not on the desktop, as usual. - mrComponent = mxComponentLoader->loadComponentFromURL("private:factory/swriter", "_self", - nSearchFlags, aArguments); + mrComponent = mxComponentLoader->loadComponentFromURL(u"private:factory/swriter"_ustr, + u"_self"_ustr, nSearchFlags, aArguments); } CPPUNIT_TEST_FIXTURE(Test, testLoadComponentFromURL) @@ -85,7 +85,8 @@ CPPUNIT_TEST_FIXTURE(Test, testLoadComponentFromURL) // Start the thread that will load the component, but hold the solar mutex for now, so we // can see if it blocks. SolarMutexGuard guard; - uno::Reference<frame::XFrame> xFrame = mxDesktop->findFrame("_blank", /*nSearchFlags=*/0); + uno::Reference<frame::XFrame> xFrame + = mxDesktop->findFrame(u"_blank"_ustr, /*nSearchFlags=*/0); uno::Reference<frame::XComponentLoader> xComponentLoader(xFrame, uno::UNO_QUERY); xThread = new TestThread(xComponentLoader, mxComponent); xThread->launch(); @@ -118,18 +119,18 @@ CPPUNIT_TEST_FIXTURE(Test, testURLTransformer_parseSmart) css::util::URL aURL; aURL.Complete = "www.example.com:8080/foo/bar?q=baz#F"; css::uno::Reference xParser(css::util::URLTransformer::create(mxComponentContext)); - CPPUNIT_ASSERT(xParser->parseSmart(aURL, "http:")); - CPPUNIT_ASSERT_EQUAL(OUString("http://www.example.com:8080/foo/bar?q=baz#F"), aURL.Complete); - CPPUNIT_ASSERT_EQUAL(OUString("http://www.example.com:8080/foo/bar"), aURL.Main); - CPPUNIT_ASSERT_EQUAL(OUString("http://"), aURL.Protocol); + CPPUNIT_ASSERT(xParser->parseSmart(aURL, u"http:"_ustr)); + CPPUNIT_ASSERT_EQUAL(u"http://www.example.com:8080/foo/bar?q=baz#F"_ustr, aURL.Complete); + CPPUNIT_ASSERT_EQUAL(u"http://www.example.com:8080/foo/bar"_ustr, aURL.Main); + CPPUNIT_ASSERT_EQUAL(u"http://"_ustr, aURL.Protocol); CPPUNIT_ASSERT(aURL.User.isEmpty()); CPPUNIT_ASSERT(aURL.Password.isEmpty()); - CPPUNIT_ASSERT_EQUAL(OUString("www.example.com"), aURL.Server); + CPPUNIT_ASSERT_EQUAL(u"www.example.com"_ustr, aURL.Server); CPPUNIT_ASSERT_EQUAL(sal_Int16(8080), aURL.Port); - CPPUNIT_ASSERT_EQUAL(OUString("/foo/"), aURL.Path); - CPPUNIT_ASSERT_EQUAL(OUString("bar"), aURL.Name); - CPPUNIT_ASSERT_EQUAL(OUString("q=baz"), aURL.Arguments); - CPPUNIT_ASSERT_EQUAL(OUString("F"), aURL.Mark); + CPPUNIT_ASSERT_EQUAL(u"/foo/"_ustr, aURL.Path); + CPPUNIT_ASSERT_EQUAL(u"bar"_ustr, aURL.Name); + CPPUNIT_ASSERT_EQUAL(u"q=baz"_ustr, aURL.Arguments); + CPPUNIT_ASSERT_EQUAL(u"F"_ustr, aURL.Mark); } } diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 4f34dfc0141b..cdc74298f937 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -121,13 +121,13 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE (aKeyEvent.Modifiers == 0) ) throw css::lang::IllegalArgumentException( - "Such key event seems not to be supported by any operating system.", + u"Such key event seems not to be supported by any operating system."_ustr, static_cast< ::cppu::OWeakObject* >(this), 0); if (sCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); @@ -151,7 +151,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XMLBasedAcceleratorConfigurati { if (sCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); @@ -181,7 +181,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XMLBasedAcceleratorConfiguration::g const OUString& rCommand = lCommandList[i]; if (rCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), static_cast<sal_Int16>(i)); @@ -203,7 +203,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co { if (sCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), 0); @@ -211,7 +211,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co AcceleratorCache& rCache = impl_getCFG(true); // sal_True => force getting of a writeable cache! if (!rCache.hasCommand(sCommand)) throw css::container::NoSuchElementException( - "Command does not exists inside this container.", + u"Command does not exists inside this container."_ustr, static_cast< ::cppu::OWeakObject* >(this)); rCache.removeCommand(sCommand); } @@ -236,7 +236,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload() xIn = xStream->getInputStream(); if (!xIn.is()) throw css::io::IOException( - "Could not open accelerator configuration for reading.", + u"Could not open accelerator configuration for reading."_ustr, static_cast< ::cppu::OWeakObject* >(this)); // impl_ts_load() does not clear the cache @@ -272,7 +272,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::store() if (!xOut.is()) throw css::io::IOException( - "Could not open accelerator configuration for saving.", + u"Could not open accelerator configuration for saving."_ustr, static_cast< ::cppu::OWeakObject* >(this)); impl_ts_save(xOut); @@ -294,7 +294,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::storeToStorage(const css::uno::R if (!xOut.is()) throw css::io::IOException( - "Could not open accelerator configuration for saving.", + u"Could not open accelerator configuration for saving."_ustr, static_cast< ::cppu::OWeakObject* >(this)); impl_ts_save(xOut); @@ -470,7 +470,7 @@ OUString XMLBasedAcceleratorConfiguration::impl_ts_getLocale() OUString sISOLocale = officecfg::Setup::L10N::ooLocale::get(); if (sISOLocale.isEmpty()) - return "en-US"; + return u"en-US"_ustr; return sISOLocale; } @@ -484,7 +484,7 @@ XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(css::uno::Ref : m_xContext (std::move(xContext )) { m_xCfg.set( - ::comphelper::ConfigurationHelper::openConfig( m_xContext, "org.openoffice.Office.Accelerators", ::comphelper::EConfigurationModes::AllLocales ), + ::comphelper::ConfigurationHelper::openConfig( m_xContext, u"org.openoffice.Office.Accelerators"_ustr, ::comphelper::EConfigurationModes::AllLocales ), css::uno::UNO_QUERY ); } @@ -536,13 +536,13 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE (aKeyEvent.Modifiers == 0) ) throw css::lang::IllegalArgumentException( - "Such key event seems not to be supported by any operating system.", + u"Such key event seems not to be supported by any operating system."_ustr, static_cast< ::cppu::OWeakObject* >(this), 0); if (sCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); @@ -644,7 +644,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfigurati { if (sCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); @@ -688,7 +688,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g const OUString& rCommand = lCommandList[i]; if (rCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), static_cast<sal_Int16>(i)); @@ -714,7 +714,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co { if (sCommand.isEmpty()) throw css::lang::IllegalArgumentException( - "Empty command strings are not allowed here.", + u"Empty command strings are not allowed here."_ustr, static_cast< ::cppu::OWeakObject* >(this), 0); @@ -725,7 +725,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co if (!rPrimaryCache.hasCommand(sCommand) && !rSecondaryCache.hasCommand(sCommand)) throw css::container::NoSuchElementException( - "Command does not exists inside this container.", + u"Command does not exists inside this container."_ustr, static_cast< ::cppu::OWeakObject* >(this)); if (rPrimaryCache.hasCommand(sCommand)) @@ -782,17 +782,17 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R return; tools::Long nOpenModes = css::embed::ElementModes::READWRITE; - css::uno::Reference< css::embed::XStorage > xAcceleratorTypeStorage = xStorage->openStorageElement("accelerator", nOpenModes); + css::uno::Reference< css::embed::XStorage > xAcceleratorTypeStorage = xStorage->openStorageElement(u"accelerator"_ustr, nOpenModes); if (!xAcceleratorTypeStorage.is()) return; - css::uno::Reference< css::io::XStream > xStream = xAcceleratorTypeStorage->openStreamElement("current", nOpenModes); + css::uno::Reference< css::io::XStream > xStream = xAcceleratorTypeStorage->openStreamElement(u"current"_ustr, nOpenModes); css::uno::Reference< css::io::XOutputStream > xOut; if (xStream.is()) xOut = xStream->getOutputStream(); if (!xOut.is()) throw css::io::IOException( - "Could not open accelerator configuration for saving.", + u"Could not open accelerator configuration for saving."_ustr, static_cast< ::cppu::OWeakObject* >(this)); // the original m_aCache has been split into primary cache and secondary cache... @@ -1318,7 +1318,7 @@ OUString XCUBasedAcceleratorConfiguration::impl_ts_getLocale() OUString sISOLocale = officecfg::Setup::L10N::ooLocale::get(); if (sISOLocale.isEmpty()) - return "en-US"; + return u"en-US"_ustr; return sISOLocale; } diff --git a/framework/source/accelerators/documentacceleratorconfiguration.cxx b/framework/source/accelerators/documentacceleratorconfiguration.cxx index c86895f0de32..729136823d1d 100644 --- a/framework/source/accelerators/documentacceleratorconfiguration.cxx +++ b/framework/source/accelerators/documentacceleratorconfiguration.cxx @@ -66,7 +66,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.DocumentAcceleratorConfiguration"; + return u"com.sun.star.comp.framework.DocumentAcceleratorConfiguration"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -76,7 +76,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.DocumentAcceleratorConfiguration"}; + return {u"com.sun.star.ui.DocumentAcceleratorConfiguration"_ustr}; } // XUIConfigurationStorage @@ -103,7 +103,7 @@ DocumentAcceleratorConfiguration::DocumentAcceleratorConfiguration( { ::comphelper::SequenceAsHashMap lArgs(lArguments); m_xDocumentRoot = lArgs.getUnpackedValueOrDefault( - "DocumentRoot", + u"DocumentRoot"_ustr, css::uno::Reference< css::embed::XStorage >()); } } diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx index e54a05a03be3..ca913649070b 100644 --- a/framework/source/accelerators/globalacceleratorconfiguration.cxx +++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx @@ -52,7 +52,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.GlobalAcceleratorConfiguration"; + return u"com.sun.star.comp.framework.GlobalAcceleratorConfiguration"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -62,7 +62,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.GlobalAcceleratorConfiguration"}; + return {u"com.sun.star.ui.GlobalAcceleratorConfiguration"_ustr}; } /// This has to be called after when the instance is acquire()'d. diff --git a/framework/source/accelerators/keymapping.cxx b/framework/source/accelerators/keymapping.cxx index ca506c7d4b64..60aa2149f80d 100644 --- a/framework/source/accelerators/keymapping.cxx +++ b/framework/source/accelerators/keymapping.cxx @@ -170,7 +170,7 @@ sal_uInt16 KeyMapping::mapIdentifierToCode(const OUString& sIdentifier) sal_uInt16 nCode = 0; if (!KeyMapping::impl_st_interpretIdentifierAsPureKeyCode(sIdentifier, nCode)) throw css::lang::IllegalArgumentException( - "Can not map given identifier to a valid key code value.", + u"Can not map given identifier to a valid key code value."_ustr, css::uno::Reference< css::uno::XInterface >(), 0); diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx index c8ce39fec495..0bd11b0463b0 100644 --- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx +++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx @@ -62,7 +62,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ModuleAcceleratorConfiguration"; + return u"com.sun.star.comp.framework.ModuleAcceleratorConfiguration"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -72,7 +72,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.ModuleAcceleratorConfiguration"}; + return {u"com.sun.star.ui.ModuleAcceleratorConfiguration"_ustr}; } /// This has to be called after when the instance is acquire()'d. @@ -97,13 +97,13 @@ ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration( } else { ::comphelper::SequenceAsHashMap lArgs(lArguments); - m_sModule = lArgs.getUnpackedValueOrDefault("ModuleIdentifier", OUString()); + m_sModule = lArgs.getUnpackedValueOrDefault(u"ModuleIdentifier"_ustr, OUString()); // OUString sLocale = lArgs.getUnpackedValueOrDefault("Locale", OUString("x-default")); } if (m_sModule.isEmpty()) throw css::uno::RuntimeException( - "The module dependent accelerator configuration service was initialized with an empty module identifier!", + u"The module dependent accelerator configuration service was initialized with an empty module identifier!"_ustr, static_cast< ::cppu::OWeakObject* >(this)); } diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx index f1879af97f70..bb4b8830d46a 100644 --- a/framework/source/accelerators/presethandler.cxx +++ b/framework/source/accelerators/presethandler.cxx @@ -136,7 +136,7 @@ namespace { OUString lcl_getLocalizedMessage(::sal_Int32 nID) { - OUString sMessage("Unknown error."); + OUString sMessage(u"Unknown error."_ustr); switch(nID) { @@ -328,7 +328,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType { if (!xDocumentRoot.is()) throw css::uno::RuntimeException( - "There is valid root storage, where the UI configuration can work on."); + u"There is valid root storage, where the UI configuration can work on."_ustr); m_lDocumentStorages.setRootStorage(xDocumentRoot); xShare = xDocumentRoot; xUser = xDocumentRoot; diff --git a/framework/source/dispatch/dispatchdisabler.cxx b/framework/source/dispatch/dispatchdisabler.cxx index b09e6109459f..75fb504b932c 100644 --- a/framework/source/dispatch/dispatchdisabler.cxx +++ b/framework/source/dispatch/dispatchdisabler.cxx @@ -147,7 +147,7 @@ void DispatchDisabler::removeByName( const OUString& rName ) OUString SAL_CALL DispatchDisabler::getImplementationName() { - return "com.sun.star.comp.framework.services.DispatchDisabler"; + return u"com.sun.star.comp.framework.services.DispatchDisabler"_ustr; } sal_Bool SAL_CALL DispatchDisabler::supportsService( const OUString& sServiceName ) @@ -157,7 +157,7 @@ sal_Bool SAL_CALL DispatchDisabler::supportsService( const OUString& sServiceNam css::uno::Sequence< OUString > SAL_CALL DispatchDisabler::getSupportedServiceNames() { - return { "com.sun.star.frame.DispatchDisabler" }; + return { u"com.sun.star.frame.DispatchDisabler"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx index 40cfe404edc3..da383aa98afa 100644 --- a/framework/source/dispatch/interceptionhelper.cxx +++ b/framework/source/dispatch/interceptionhelper.cxx @@ -106,7 +106,7 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css: // reject incorrect calls of this interface method css::uno::Reference< css::frame::XDispatchProvider > xThis(this); if (!xInterceptor.is()) - throw css::uno::RuntimeException("NULL references not allowed as in parameter", xThis); + throw css::uno::RuntimeException(u"NULL references not allowed as in parameter"_ustr, xThis); // Fill a new info structure for new interceptor. // Save his reference and try to get an additional URL/pattern list from him. @@ -118,7 +118,7 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css: if (xInfo.is()) aInfo.lURLPattern = xInfo->getInterceptedURLs(); else - aInfo.lURLPattern = { "*" }; + aInfo.lURLPattern = { u"*"_ustr }; // SAFE { SolarMutexClearableGuard aWriteLock; @@ -166,7 +166,7 @@ void SAL_CALL InterceptionHelper::releaseDispatchProviderInterceptor(const css:: // reject wrong calling of this interface method css::uno::Reference< css::frame::XDispatchProvider > xThis(this); if (!xInterceptor.is()) - throw css::uno::RuntimeException("NULL references not allowed as in parameter", xThis); + throw css::uno::RuntimeException(u"NULL references not allowed as in parameter"_ustr, xThis); // SAFE { SolarMutexClearableGuard aWriteLock; diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx index 9149b9b40dc0..cd478138bc35 100644 --- a/framework/source/dispatch/mailtodispatcher.cxx +++ b/framework/source/dispatch/mailtodispatcher.cxx @@ -34,7 +34,7 @@ namespace framework{ OUString SAL_CALL MailToDispatcher::getImplementationName() { - return "com.sun.star.comp.framework.MailToDispatcher"; + return u"com.sun.star.comp.framework.MailToDispatcher"_ustr; } sal_Bool SAL_CALL MailToDispatcher::supportsService( const OUString& sServiceName ) diff --git a/framework/source/dispatch/oxt_handler.cxx b/framework/source/dispatch/oxt_handler.cxx index df956c7eed8a..7d38224e4329 100644 --- a/framework/source/dispatch/oxt_handler.cxx +++ b/framework/source/dispatch/oxt_handler.cxx @@ -32,7 +32,7 @@ namespace framework{ OUString SAL_CALL Oxt_Handler::getImplementationName() { - return "com.sun.star.comp.framework.OXTFileHandler"; + return u"com.sun.star.comp.framework.OXTFileHandler"_ustr; } sal_Bool SAL_CALL Oxt_Handler::supportsService( const OUString& sServiceName ) @@ -42,7 +42,7 @@ sal_Bool SAL_CALL Oxt_Handler::supportsService( const OUString& sServiceName ) css::uno::Sequence< OUString > SAL_CALL Oxt_Handler::getSupportedServiceNames() { - return { "com.sun.star.frame.ContentHandler" }; + return { u"com.sun.star.frame.ContentHandler"_ustr }; } @@ -96,7 +96,7 @@ void SAL_CALL Oxt_Handler::dispatchWithNotification( const css::util::URL& aURL, css::uno::Sequence< css::uno::Any > lParams{ css::uno::Any(aURL.Main) }; - css::uno::Reference< css::uno::XInterface > xService = m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.deployment.ui.PackageManagerDialog", lParams, m_xContext ); + css::uno::Reference< css::uno::XInterface > xService = m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( u"com.sun.star.deployment.ui.PackageManagerDialog"_ustr, lParams, m_xContext ); css::uno::Reference< css::task::XJobExecutor > xExecutable( xService, css::uno::UNO_QUERY ); if ( xExecutable.is() ) xExecutable->trigger( OUString() ); diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx index 3220ceece227..1379d7ee7e81 100644 --- a/framework/source/dispatch/popupmenudispatcher.cxx +++ b/framework/source/dispatch/popupmenudispatcher.cxx @@ -61,7 +61,7 @@ PopupMenuDispatcher::~PopupMenuDispatcher() OUString SAL_CALL PopupMenuDispatcher::getImplementationName() { - return "com.sun.star.comp.framework.PopupMenuControllerDispatcher"; + return u"com.sun.star.comp.framework.PopupMenuControllerDispatcher"_ustr; } sal_Bool SAL_CALL PopupMenuDispatcher::supportsService( const OUString& sServiceName ) @@ -121,7 +121,7 @@ SAL_CALL PopupMenuDispatcher::queryDispatch( { // Just use the main part of the URL for popup menu controllers sal_Int32 nSchemePart( 0 ); - OUString aBaseURL( "vnd.sun.star.popup:" ); + OUString aBaseURL( u"vnd.sun.star.popup:"_ustr ); OUString aURL( rURL.Complete ); nSchemePart = aURL.indexOf( ':' ); @@ -242,7 +242,7 @@ void PopupMenuDispatcher::impl_RetrievePopupControllerQuery() if ( xLayoutManager.is() ) { - css::uno::Reference< css::ui::XUIElement > xMenuBar = xLayoutManager->getElement( "private:resource/menubar/menubar" ); + css::uno::Reference< css::ui::XUIElement > xMenuBar = xLayoutManager->getElement( u"private:resource/menubar/menubar"_ustr ); m_xPopupCtrlQuery.set( xMenuBar, css::uno::UNO_QUERY ); } diff --git a/framework/source/dispatch/servicehandler.cxx b/framework/source/dispatch/servicehandler.cxx index cb29898350b9..715b1393dd64 100644 --- a/framework/source/dispatch/servicehandler.cxx +++ b/framework/source/dispatch/servicehandler.cxx @@ -36,7 +36,7 @@ constexpr OUString PROTOCOL_VALUE = u"service:"_ustr; OUString SAL_CALL ServiceHandler::getImplementationName() { - return "com.sun.star.comp.framework.ServiceHandler"; + return u"com.sun.star.comp.framework.ServiceHandler"_ustr; } sal_Bool SAL_CALL ServiceHandler::supportsService( const OUString& sServiceName ) diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx index 1891b9b62b1f..ac1338e2c852 100644 --- a/framework/source/dispatch/systemexec.cxx +++ b/framework/source/dispatch/systemexec.cxx @@ -36,7 +36,7 @@ constexpr OUString PROTOCOL_VALUE = u"systemexecute:"_ustr; OUString SAL_CALL SystemExec::getImplementationName() { - return "com.sun.star.comp.framework.SystemExecute"; + return u"com.sun.star.comp.framework.SystemExecute"_ustr; } sal_Bool SAL_CALL SystemExec::supportsService( const OUString& sServiceName ) diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx index 360223e6eb67..39646f1a56b7 100644 --- a/framework/source/fwe/classes/actiontriggercontainer.cxx +++ b/framework/source/fwe/classes/actiontriggercontainer.cxx @@ -77,7 +77,7 @@ Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const O else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERSEPARATOR ) return static_cast<OWeakObject *>( new ActionTriggerSeparatorPropertySet()); else - throw css::uno::RuntimeException("Unknown service specifier!", static_cast<OWeakObject *>(this) ); + throw css::uno::RuntimeException(u"Unknown service specifier!"_ustr, static_cast<OWeakObject *>(this) ); } Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ ) diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index 36790f9d7aa1..3959fa7f386b 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -256,11 +256,11 @@ Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescriptor( { return { - Property( "CommandURL" , HANDLE_COMMANDURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), - Property( "HelpURL" , HANDLE_HELPURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), - Property( "Image" , HANDLE_IMAGE , cppu::UnoType<XBitmap>::get(), PropertyAttribute::TRANSIENT ), - Property( "SubContainer" , HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), - Property( "Text" , HANDLE_TEXT , cppu::UnoType<XInterface>::get(), PropertyAttribute::TRANSIENT ) + Property( u"CommandURL"_ustr , HANDLE_COMMANDURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), + Property( u"HelpURL"_ustr , HANDLE_HELPURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), + Property( u"Image"_ustr , HANDLE_IMAGE , cppu::UnoType<XBitmap>::get(), PropertyAttribute::TRANSIENT ), + Property( u"SubContainer"_ustr , HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), + Property( u"Text"_ustr , HANDLE_TEXT , cppu::UnoType<XInterface>::get(), PropertyAttribute::TRANSIENT ) }; } diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index 2f46ae5f0579..2671e4ca83a7 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -202,7 +202,7 @@ Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticPropertyDe { return { - Property( "SeparatorType", HANDLE_TYPE, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::TRANSIENT ) + Property( u"SeparatorType"_ustr, HANDLE_TYPE, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::TRANSIENT ) }; } diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 6f9dc8d87130..f3b038e99660 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -432,7 +432,7 @@ AddonsOptions_Impl::AddonsOptions_Impl() // Enable notification mechanism of our baseclass. // We need it to get information about changes outside these class on our used configuration keys! - Sequence<OUString> aNotifySeq { "AddonUI" }; + Sequence<OUString> aNotifySeq { u"AddonUI"_ustr }; EnableNotification( aNotifySeq ); } @@ -647,7 +647,7 @@ BitmapEx AddonsOptions_Impl::GetImageFromURL( const OUString& aURL, bool bBig, b void AddonsOptions_Impl::ReadAddonMenuSet( Sequence< Sequence< PropertyValue > >& rAddonMenuSeq ) { // Read the AddonMenu set and fill property sequences - OUString aAddonMenuNodeName( "AddonUI/AddonMenu" ); + OUString aAddonMenuNodeName( u"AddonUI/AddonMenu"_ustr ); Sequence< OUString > aAddonMenuNodeSeq = GetNodeNames( aAddonMenuNodeName ); OUString aAddonMenuItemNode( aAddonMenuNodeName + m_aPathDelimiter ); @@ -681,7 +681,7 @@ void AddonsOptions_Impl::ReadAddonMenuSet( Sequence< Sequence< PropertyValue > > void AddonsOptions_Impl::ReadOfficeHelpSet( Sequence< Sequence< PropertyValue > >& rAddonOfficeHelpMenuSeq ) { // Read the AddonMenu set and fill property sequences - OUString aAddonHelpMenuNodeName( "AddonUI/OfficeHelp" ); + OUString aAddonHelpMenuNodeName( u"AddonUI/OfficeHelp"_ustr ); Sequence< OUString > aAddonHelpMenuNodeSeq = GetNodeNames( aAddonHelpMenuNodeName ); OUString aAddonHelpMenuItemNode( aAddonHelpMenuNodeName + m_aPathDelimiter ); @@ -715,7 +715,7 @@ void AddonsOptions_Impl::ReadOfficeHelpSet( Sequence< Sequence< PropertyValue > void AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< Sequence< PropertyValue > >& rAddonOfficeMenuBarSeq ) { // Read the OfficeMenuBar set and fill property sequences - OUString aAddonMenuBarNodeName( "AddonUI/OfficeMenuBar" ); + OUString aAddonMenuBarNodeName( u"AddonUI/OfficeMenuBar"_ustr ); Sequence< OUString > aAddonMenuBarNodeSeq = GetNodeNames( aAddonMenuBarNodeName ); OUString aAddonMenuBarNode( aAddonMenuBarNodeName + m_aPathDelimiter ); @@ -767,7 +767,7 @@ void AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< Sequence< PropertyValue void AddonsOptions_Impl::ReadOfficeToolBarSet( AddonToolBars& rAddonOfficeToolBars, std::vector< OUString >& rAddonOfficeToolBarResNames ) { // Read the OfficeToolBar set and fill property sequences - OUString aAddonToolBarNodeName( "AddonUI/OfficeToolBar" ); + OUString aAddonToolBarNodeName( u"AddonUI/OfficeToolBar"_ustr ); Sequence< OUString > aAddonToolBarNodeSeq = GetNodeNames( aAddonToolBarNodeName ); OUString aAddonToolBarNode( aAddonToolBarNodeName + m_aPathDelimiter ); @@ -821,7 +821,7 @@ void AddonsOptions_Impl::ReadOfficeNotebookBarSet( std::vector<OUString>& rAddonOfficeNotebookBarResNames) { // Read the OfficeToolBar set and fill property sequences - OUString aAddonNotebookBarNodeName("AddonUI/OfficeNotebookBar"); + OUString aAddonNotebookBarNodeName(u"AddonUI/OfficeNotebookBar"_ustr); Sequence<OUString> aAddonNotebookBarNodeSeq = GetNodeNames(aAddonNotebookBarNodeName); OUString aAddonNotebookBarNode(aAddonNotebookBarNodeName + m_aPathDelimiter); @@ -878,7 +878,7 @@ bool AddonsOptions_Impl::ReadNotebookBarItemSet( void AddonsOptions_Impl::ReadImages( ImageManager& aImageManager ) { // Read the user-defined Images set and fill image manager - OUString aAddonImagesNodeName( "AddonUI/Images" ); + OUString aAddonImagesNodeName( u"AddonUI/Images"_ustr ); Sequence< OUString > aAddonImagesNodeSeq = GetNodeNames( aAddonImagesNodeName ); OUString aAddonImagesNode( aAddonImagesNodeName + m_aPathDelimiter ); diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index 1493f08bf429..edcee5bf260c 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -88,7 +88,7 @@ Reference< XInterface > SAL_CALL RootActionTriggerContainer::createInstance( con else if ( aServiceSpecifier == SERVICENAME_ACTIONTRIGGERSEPARATOR ) return static_cast<OWeakObject *>( new ActionTriggerSeparatorPropertySet()); else - throw css::uno::RuntimeException("Unknown service specifier!", static_cast<OWeakObject *>(this) ); + throw css::uno::RuntimeException(u"Unknown service specifier!"_ustr, static_cast<OWeakObject *>(this) ); } Reference< XInterface > SAL_CALL RootActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ ) diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index 88edd70beb79..9caead9f98e4 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -72,13 +72,13 @@ static void GetMenuItemAttributes( const Reference< XPropertySet >& xActionTrigg try { // mandatory properties - a = xActionTriggerPropertySet->getPropertyValue("Text"); + a = xActionTriggerPropertySet->getPropertyValue(u"Text"_ustr); a >>= aMenuLabel; - a = xActionTriggerPropertySet->getPropertyValue("CommandURL"); + a = xActionTriggerPropertySet->getPropertyValue(u"CommandURL"_ustr); a >>= aCommandURL; - a = xActionTriggerPropertySet->getPropertyValue("Image"); + a = xActionTriggerPropertySet->getPropertyValue(u"Image"_ustr); a >>= xBitmap; - a = xActionTriggerPropertySet->getPropertyValue("SubContainer"); + a = xActionTriggerPropertySet->getPropertyValue(u"SubContainer"_ustr); a >>= xSubContainer; } catch (const Exception&) @@ -88,7 +88,7 @@ static void GetMenuItemAttributes( const Reference< XPropertySet >& xActionTrigg // optional properties try { - a = xActionTriggerPropertySet->getPropertyValue("HelpURL"); + a = xActionTriggerPropertySet->getPropertyValue(u"HelpURL"_ustr); a >>= aHelpURL; } catch (const Exception&) @@ -103,7 +103,7 @@ static void InsertSubMenuItems(const Reference<XPopupMenu>& rSubMenu, sal_uInt16 return; AddonsOptions aAddonOptions; - OUString aSlotURL( "slot:" ); + OUString aSlotURL( u"slot:"_ustr ); for ( sal_Int32 i = 0; i < xActionTriggerContainer->getCount(); i++ ) { @@ -235,7 +235,7 @@ static Reference< XPropertySet > CreateActionTrigger(sal_uInt16 nItemId, Reference< XMultiServiceFactory > xMultiServiceFactory( rActionTriggerContainer, UNO_QUERY ); if ( xMultiServiceFactory.is() ) { - xPropSet.set( xMultiServiceFactory->createInstance( "com.sun.star.ui.ActionTrigger" ), + xPropSet.set( xMultiServiceFactory->createInstance( u"com.sun.star.ui.ActionTrigger"_ustr ), UNO_QUERY ); Any a; @@ -245,7 +245,7 @@ static Reference< XPropertySet > CreateActionTrigger(sal_uInt16 nItemId, // Retrieve the menu attributes and set them in our PropertySet OUString aLabel = rMenu->getItemText(nItemId); a <<= aLabel; - xPropSet->setPropertyValue("Text", a ); + xPropSet->setPropertyValue(u"Text"_ustr, a ); OUString aCommandURL = rMenu->getCommand(nItemId); @@ -255,13 +255,13 @@ static Reference< XPropertySet > CreateActionTrigger(sal_uInt16 nItemId, } a <<= aCommandURL; - xPropSet->setPropertyValue("CommandURL", a ); + xPropSet->setPropertyValue(u"CommandURL"_ustr, a ); Reference<XBitmap> xBitmap(rMenu->getItemImage(nItemId), UNO_QUERY); if (xBitmap.is()) { a <<= xBitmap; - xPropSet->setPropertyValue("Image", a ); + xPropSet->setPropertyValue(u"Image"_ustr, a ); } } catch (const Exception&) @@ -279,7 +279,7 @@ static Reference< XPropertySet > CreateActionTriggerSeparator( const Reference< if ( xMultiServiceFactory.is() ) { return Reference< XPropertySet >( xMultiServiceFactory->createInstance( - "com.sun.star.ui.ActionTriggerSeparator" ), + u"com.sun.star.ui.ActionTriggerSeparator"_ustr ), UNO_QUERY ); } @@ -293,7 +293,7 @@ static Reference< XIndexContainer > CreateActionTriggerContainer( const Referenc if ( xMultiServiceFactory.is() ) { return Reference< XIndexContainer >( xMultiServiceFactory->createInstance( - "com.sun.star.ui.ActionTriggerContainer" ), + u"com.sun.star.ui.ActionTriggerContainer"_ustr ), UNO_QUERY ); } @@ -336,7 +336,7 @@ static void FillActionTriggerContainerWithMenu(const Reference<XPopupMenu>& rMen Reference< XIndexContainer > xSubContainer = CreateActionTriggerContainer( rActionTriggerContainer ); a <<= xSubContainer; - xPropSet->setPropertyValue("SubContainer", a ); + xPropSet->setPropertyValue(u"SubContainer"_ustr, a ); FillActionTriggerContainerWithMenu(xPopupMenu, xSubContainer); } } diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 58c28f8f8ef9..c318ec817b45 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -587,7 +587,7 @@ void TitleHelper::impl_appendDebugVersion (OUStringBuffer& sTitle) OUString version(utl::ConfigManager::getProductVersion()); sTitle.append(' '); sTitle.append(version); - OUString sVersion = ::utl::Bootstrap::getBuildIdData("development"); + OUString sVersion = ::utl::Bootstrap::getBuildIdData(u"development"_ustr); sTitle.append(" ["); sTitle.append(sVersion); sTitle.append("]"); diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx index 3a2fdd6c066b..318809100124 100644 --- a/framework/source/fwe/helper/undomanagerhelper.cxx +++ b/framework/source/fwe/helper/undomanagerhelper.cxx @@ -176,7 +176,7 @@ namespace framework void cancel( const Reference< XInterface >& i_context ) { m_caughtException <<= RuntimeException( - "Concurrency error: an earlier operation on the stack failed.", + u"Concurrency error: an earlier operation on the stack failed."_ustr, i_context ); m_finishCondition.set(); @@ -398,7 +398,7 @@ namespace framework { if ( !i_action.is() ) throw IllegalArgumentException( - "illegal undo action object", + u"illegal undo action object"_ustr, getXUndoManager(), 1 ); @@ -452,7 +452,7 @@ namespace framework ::osl::MutexGuard aGuard( getMutex() ); if ( m_nLockCount == 0 ) - throw NotLockedException( "Undo manager is not locked", getXUndoManager() ); + throw NotLockedException( u"Undo manager is not locked"_ustr, getXUndoManager() ); if ( --m_nLockCount == 0 ) { @@ -535,7 +535,7 @@ namespace framework if ( i_hidden && ( rUndoManager.GetUndoActionCount() == 0 ) ) throw EmptyUndoStackException( - "can't enter a hidden context without a previous Undo action", + u"can't enter a hidden context without a previous Undo action"_ustr, m_rUndoManagerImplementation.getThis() ); @@ -569,7 +569,7 @@ namespace framework if ( !rUndoManager.IsInListAction() ) throw InvalidStateException( - "no active undo context", + u"no active undo context"_ustr, getXUndoManager() ); @@ -636,7 +636,7 @@ namespace framework ? rUndoManager.GetUndoActionCount( SfxUndoManager::TopLevel ) : rUndoManager.GetRedoActionCount( SfxUndoManager::TopLevel ); if ( nElements == 0 ) - throw EmptyUndoStackException("stack is empty", getXUndoManager() ); + throw EmptyUndoStackException(u"stack is empty"_ustr, getXUndoManager() ); aGuard.clear(); // <--- SYNCHRONIZED @@ -977,8 +977,8 @@ namespace framework : rUndoManager.GetRedoActionCount( SfxUndoManager::TopLevel ); if ( nActionCount == 0 ) throw EmptyUndoStackException( - i_undo ? OUString( "no action on the undo stack" ) - : OUString( "no action on the redo stack" ), + i_undo ? u"no action on the undo stack"_ustr + : u"no action on the redo stack"_ustr, i_impl.getXUndoManager() ); return i_undo diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 96e4b2324ba8..59c5271c530a 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -742,7 +742,7 @@ void OWriteMenuDocumentHandler::WriteMenuDocument() if ( m_bIsMenuBar ) //FIXME pList->AddAttribute( ATTRIBUTE_NS_ID, - "menubar" ); + u"menubar"_ustr ); OUString aRootElement; if ( m_bIsMenuBar ) diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 86e161309800..b274e866ec57 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -217,7 +217,7 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement( { try { - xPropSet->setPropertyValue("UIName", Any( aUIName ) ); + xPropSet->setPropertyValue(u"UIName"_ustr, Any( aUIName ) ); } catch ( const UnknownPropertyException& ) { @@ -575,7 +575,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() { try { - xPropSet->getPropertyValue("UIName") >>= aUIName; + xPropSet->getPropertyValue(u"UIName"_ustr) >>= aUIName; } catch ( const UnknownPropertyException& ) { @@ -585,10 +585,10 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList; pList->AddAttribute( ATTRIBUTE_XMLNS_TOOLBAR, - XMLNS_TOOLBAR ); + u"" XMLNS_TOOLBAR ""_ustr ); pList->AddAttribute( ATTRIBUTE_XMLNS_XLINK, - XMLNS_XLINK ); + u"" XMLNS_XLINK ""_ustr ); if ( !aUIName.isEmpty() ) pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_UINAME, diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx index 7faa6c48d8b6..c4fffaf89fe8 100644 --- a/framework/source/fwe/xml/xmlnamespaces.cxx +++ b/framework/source/fwe/xml/xmlnamespaces.cxx @@ -48,7 +48,7 @@ void XMLNamespaces::addNamespace( const OUString& aName, const OUString& aValue else { // a xml namespace without name is not allowed (e.g. "xmlns:" ) - throw SAXException( "A xml namespace without name is not allowed!", Reference< XInterface >(), Any() ); + throw SAXException( u"A xml namespace without name is not allowed!"_ustr, Reference< XInterface >(), Any() ); } } @@ -56,7 +56,7 @@ void XMLNamespaces::addNamespace( const OUString& aName, const OUString& aValue { // namespace should be reset - as xml draft states this is only allowed // for the default namespace - check and throw exception if check fails - throw SAXException( "Clearing xml namespace only allowed for default namespace!", Reference< XInterface >(), Any() ); + throw SAXException( u"Clearing xml namespace only allowed for default namespace!"_ustr, Reference< XInterface >(), Any() ); } if ( aNamespaceName.isEmpty() ) @@ -87,7 +87,7 @@ OUString XMLNamespaces::applyNSToAttributeName( const OUString& aName ) const if ( aName.getLength() <= index+1 ) { // attribute with namespace but without name "namespace:" is not allowed!! - throw SAXException( "Attribute has no name only preceding namespace!", Reference< XInterface >(), Any() ); + throw SAXException( u"Attribute has no name only preceding namespace!"_ustr, Reference< XInterface >(), Any() ); } OUString aAttributeName = getNamespaceValue( aName.copy( 0, index )) + "^" + aName.subView( index+1); return aAttributeName; @@ -121,7 +121,7 @@ OUString XMLNamespaces::applyNSToElementName( const OUString& aName ) const if ( aName.getLength() <= index+1 ) { // attribute with namespace but without a name is not allowed (e.g. "cfg:" ) - throw SAXException( "Attribute has no name only preceding namespace!", Reference< XInterface >(), Any() ); + throw SAXException( u"Attribute has no name only preceding namespace!"_ustr, Reference< XInterface >(), Any() ); } aElementName += aName.subView( index+1 ); } @@ -141,7 +141,7 @@ OUString const & XMLNamespaces::getNamespaceValue( const OUString& aNamespace ) if ( p == m_aNamespaceMap.end() ) { // namespace not defined => throw exception! - throw SAXException( "XML namespace used but not defined!", Reference< XInterface >(), Any() ); + throw SAXException( u"XML namespace used but not defined!"_ustr, Reference< XInterface >(), Any() ); } return p->second; } diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx index 86d5b354a064..0d63c84df0c5 100644 --- a/framework/source/fwi/threadhelp/transactionmanager.cxx +++ b/framework/source/fwi/threadhelp/transactionmanager.cxx @@ -173,13 +173,13 @@ void TransactionManager::registerTransaction( EExceptionMode eMode ) { // Help programmer to find out, why this exception is thrown! SAL_WARN( "fwk", "TransactionManager...: Owner instance stand in close method. Call was rejected!" ); - throw css::lang::DisposedException( "TransactionManager: Owner instance stand in close method. Call was rejected!" ); + throw css::lang::DisposedException( u"TransactionManager: Owner instance stand in close method. Call was rejected!"_ustr ); } break; case E_CLOSE: // Help programmer to find out, why this exception is thrown! SAL_WARN( "fwk", "TransactionManager...: Owner instance already closed. Call was rejected!" ); - throw css::lang::DisposedException( "TransactionManager: Owner instance already closed. Call was rejected!" ); + throw css::lang::DisposedException( u"TransactionManager: Owner instance already closed. Call was rejected!"_ustr ); } // Register this new transaction. diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 40865c8f1b81..4dec6fec43ff 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -57,7 +57,7 @@ ConstItemContainer::ConstItemContainer( const Reference< XIndexAccess >& rSource Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY ); if ( xPropSet.is() ) { - xPropSet->getPropertyValue("UIName") >>= m_aUIName; + xPropSet->getPropertyValue(u"UIName"_ustr) >>= m_aUIName; } } catch ( const Exception& ) diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 652f0dd8029f..c153d71c716d 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -59,7 +59,7 @@ RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceCo Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY ); if ( xPropSet.is() ) { - xPropSet->getPropertyValue("UIName") >>= m_aUIName; + xPropSet->getPropertyValue(u"UIName"_ustr) >>= m_aUIName; } } catch ( const Exception& ) diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx index 9da5b6f27e55..64dde3a98381 100644 --- a/framework/source/helper/oframes.cxx +++ b/framework/source/helper/oframes.cxx @@ -223,7 +223,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) sal_uInt32 nCount = m_pFrameContainer->getCount(); if ( nIndex < 0 || ( sal::static_int_cast< sal_uInt32 >( nIndex ) >= nCount )) - throw IndexOutOfBoundsException("OFrames::getByIndex - Index out of bounds", + throw IndexOutOfBoundsException(u"OFrames::getByIndex - Index out of bounds"_ustr, static_cast<OWeakObject *>(this) ); // Set default return value. diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index 995812dd4693..8e90defb0711 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -51,14 +51,14 @@ void SAL_CALL PersistentWindowState::initialize(const css::uno::Sequence< css::u css::uno::Reference< css::frame::XFrame > xFrame; if (!lArguments.hasElements()) throw css::lang::IllegalArgumentException( - "Empty argument list!", + u"Empty argument list!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); lArguments[0] >>= xFrame; if (!xFrame.is()) throw css::lang::IllegalArgumentException( - "No valid frame specified!", + u"No valid frame specified!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); @@ -170,9 +170,9 @@ OUString PersistentWindowState::implst_getWindowStateFromConfig( try { ::comphelper::ConfigurationHelper::readDirectKey(rxContext, - "org.openoffice.Setup/", + u"org.openoffice.Setup/"_ustr, OUString::Concat("Office/Factories/*[\"") + sModuleName + "\"]", - "ooSetupFactoryWindowAttributes", + u"ooSetupFactoryWindowAttributes"_ustr, ::comphelper::EConfigurationModes::ReadOnly) >>= sWindowState; } catch(const css::uno::RuntimeException&) @@ -190,9 +190,9 @@ void PersistentWindowState::implst_setWindowStateOnConfig( try { ::comphelper::ConfigurationHelper::writeDirectKey(rxContext, - "org.openoffice.Setup/", + u"org.openoffice.Setup/"_ustr, OUString::Concat("Office/Factories/*[\"") + sModuleName + "\"]", - "ooSetupFactoryWindowAttributes", + u"ooSetupFactoryWindowAttributes"_ustr, css::uno::Any(sWindowState), ::comphelper::EConfigurationModes::Standard); } diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index 64cf3543c22a..9ac4022f60dd 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -80,10 +80,10 @@ void SAL_CALL StatusIndicatorFactory::initialize(const css::uno::Sequence< css:: // it's an old-style initialisation using properties ::comphelper::SequenceAsHashMap lArgs(lArguments); - m_xFrame = lArgs.getUnpackedValueOrDefault("Frame" , css::uno::Reference< css::frame::XFrame >()); - m_xPluggWindow = lArgs.getUnpackedValueOrDefault("Window" , css::uno::Reference< css::awt::XWindow >() ); - m_bAllowParentShow = lArgs.getUnpackedValueOrDefault("AllowParentShow" , false ); - m_bDisableReschedule = lArgs.getUnpackedValueOrDefault("DisableReschedule", false ); + m_xFrame = lArgs.getUnpackedValueOrDefault(u"Frame"_ustr , css::uno::Reference< css::frame::XFrame >()); + m_xPluggWindow = lArgs.getUnpackedValueOrDefault(u"Window"_ustr , css::uno::Reference< css::awt::XWindow >() ); + m_bAllowParentShow = lArgs.getUnpackedValueOrDefault(u"AllowParentShow"_ustr , false ); + m_bDisableReschedule = lArgs.getUnpackedValueOrDefault(u"DisableReschedule"_ustr, false ); } } diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 232243a83689..40e8f482bc3e 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -57,14 +57,14 @@ void SAL_CALL TitleBarUpdate::initialize(const css::uno::Sequence< css::uno::Any css::uno::Reference< css::frame::XFrame > xFrame; if (!lArguments.hasElements()) throw css::lang::IllegalArgumentException( - "Empty argument list!", + u"Empty argument list!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); lArguments[0] >>= xFrame; if (!xFrame.is()) throw css::lang::IllegalArgumentException( - "No valid frame specified!", + u"No valid frame specified!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); @@ -241,8 +241,8 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra try { css::uno::Reference< css::beans::XPropertySetInfo > const xPSI( xSet->getPropertySetInfo(), css::uno::UNO_SET_THROW ); - if ( xPSI->hasPropertyByName( "IconId" ) ) - xSet->getPropertyValue( "IconId" ) >>= nIcon; + if ( xPSI->hasPropertyByName( u"IconId"_ustr ) ) + xSet->getPropertyValue( u"IconId"_ustr ) >>= nIcon; } catch(const css::uno::Exception&) { diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx index b493eacc7236..ea99ebed3213 100644 --- a/framework/source/helper/vclstatusindicator.cxx +++ b/framework/source/helper/vclstatusindicator.cxx @@ -33,7 +33,7 @@ VCLStatusIndicator::VCLStatusIndicator(css::uno::Reference< css::awt::XWindow > { if (!m_xParentWindow.is()) throw css::uno::RuntimeException( - "Can't work without a parent window!", + u"Can't work without a parent window!"_ustr, static_cast< css::task::XStatusIndicator* >(this)); } diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx index 2795a3f45057..838b644b45d5 100644 --- a/framework/source/jobs/helponstartup.cxx +++ b/framework/source/jobs/helponstartup.cxx @@ -44,7 +44,7 @@ namespace framework{ OUString SAL_CALL HelpOnStartup::getImplementationName() { - return "com.sun.star.comp.framework.HelpOnStartup"; + return u"com.sun.star.comp.framework.HelpOnStartup"_ustr; } sal_Bool SAL_CALL HelpOnStartup::supportsService( const OUString& sServiceName ) @@ -146,16 +146,16 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent) OUString HelpOnStartup::its_getModuleIdFromEnv(const css::uno::Sequence< css::beans::NamedValue >& lArguments) { ::comphelper::SequenceAsHashMap lArgs (lArguments); - ::comphelper::SequenceAsHashMap lEnvironment = lArgs.getUnpackedValueOrDefault("Environment", css::uno::Sequence< css::beans::NamedValue >()); + ::comphelper::SequenceAsHashMap lEnvironment = lArgs.getUnpackedValueOrDefault(u"Environment"_ustr, css::uno::Sequence< css::beans::NamedValue >()); // check for right environment. // If it's not a DocumentEvent, which triggered this job, // we can't work correctly! => return immediately and do nothing - OUString sEnvType = lEnvironment.getUnpackedValueOrDefault("EnvType", OUString()); + OUString sEnvType = lEnvironment.getUnpackedValueOrDefault(u"EnvType"_ustr, OUString()); if (sEnvType != "DOCUMENTEVENT") return OUString(); - css::uno::Reference< css::frame::XModel > xDoc = lEnvironment.getUnpackedValueOrDefault("Model", css::uno::Reference< css::frame::XModel >()); + css::uno::Reference< css::frame::XModel > xDoc = lEnvironment.getUnpackedValueOrDefault(u"Model"_ustr, css::uno::Reference< css::frame::XModel >()); if (!xDoc.is()) return OUString(); @@ -266,7 +266,7 @@ bool HelpOnStartup::its_isHelpUrlADefaultOne(std::u16string_view sHelpURL) continue; OUString sHelpBaseURL; - xModuleConfig->getByName("ooSetupFactoryHelpBaseURL") >>= sHelpBaseURL; + xModuleConfig->getByName(u"ooSetupFactoryHelpBaseURL"_ustr) >>= sHelpBaseURL; OUString sHelpURLForModule = HelpOnStartup::ist_createHelpURL(sHelpBaseURL, sLocale, sSystem); if (sHelpURL == sHelpURLForModule) return true; @@ -300,12 +300,12 @@ OUString HelpOnStartup::its_checkIfHelpEnabledAndGetURL(const OUString& sModule) bool bHelpEnabled = false; if (xModuleConfig.is()) - xModuleConfig->getByName("ooSetupFactoryHelpOnOpen") >>= bHelpEnabled; + xModuleConfig->getByName(u"ooSetupFactoryHelpOnOpen"_ustr) >>= bHelpEnabled; if (bHelpEnabled) { OUString sHelpBaseURL; - xModuleConfig->getByName("ooSetupFactoryHelpBaseURL") >>= sHelpBaseURL; + xModuleConfig->getByName(u"ooSetupFactoryHelpBaseURL"_ustr) >>= sHelpBaseURL; sHelpURL = HelpOnStartup::ist_createHelpURL(sHelpBaseURL, sLocale, sSystem); } } diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index 711bd47b5823..9cb4f6237119 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -700,7 +700,7 @@ void SAL_CALL Job::queryTermination( /*IN*/ const css::lang::EventObject& ) if (m_eRunState != E_STOPPED_OR_FINISHED) { css::uno::Reference< css::uno::XInterface > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); - throw css::frame::TerminationVetoException("job still in progress", xThis); + throw css::frame::TerminationVetoException(u"job still in progress"_ustr, xThis); } } @@ -792,7 +792,7 @@ void SAL_CALL Job::queryClosing( const css::lang::EventObject& aEvent , // throw suitable veto exception - because the internal job could not be cancelled. css::uno::Reference< css::uno::XInterface > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); - throw css::util::CloseVetoException("job still in progress", xThis); + throw css::util::CloseVetoException(u"job still in progress"_ustr, xThis); } // No veto ... diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index 0ca06fcaca8a..7ef42137635d 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -136,15 +136,15 @@ void JobData::setAlias( const OUString& sAlias ) css::uno::Any aValue; // read uno implementation name - aValue = xJobProperties->getPropertyValue("Service"); + aValue = xJobProperties->getPropertyValue(u"Service"_ustr); aValue >>= m_sService; // read module context list - aValue = xJobProperties->getPropertyValue("Context"); + aValue = xJobProperties->getPropertyValue(u"Context"_ustr); aValue >>= m_sContext; // read whole argument list - aValue = xJobProperties->getPropertyValue("Arguments"); + aValue = xJobProperties->getPropertyValue(u"Arguments"_ustr); css::uno::Reference< css::container::XNameAccess > xArgumentList; if ( (aValue >>= xArgumentList) && @@ -330,9 +330,9 @@ css::uno::Sequence< css::beans::NamedValue > JobData::getConfig() const css::uno::Sequence< css::beans::NamedValue > lConfig; if (m_eMode==E_ALIAS) { - lConfig = { { "Alias", css::uno::Any(m_sAlias) }, - { "Service", css::uno::Any(m_sService) }, - { "Context", css::uno::Any(m_sContext) } }; + lConfig = { { u"Alias"_ustr, css::uno::Any(m_sAlias) }, + { u"Service"_ustr, css::uno::Any(m_sService) }, + { u"Context"_ustr, css::uno::Any(m_sContext) } }; } return lConfig; } @@ -388,7 +388,7 @@ void JobData::disableJob() // Convert and write the user timestamp to the configuration. css::uno::Any aValue; aValue <<= Converter::convert_DateTime2ISO8601(DateTime( DateTime::SYSTEM)); - xPropSet->setPropertyValue("UserTime", aValue); + xPropSet->setPropertyValue(u"UserTime"_ustr, aValue); } aConfig.close(); @@ -456,7 +456,7 @@ std::vector< OUString > JobData::getEnabledJobsForEvent( const css::uno::Referen std::u16string_view sEvent ) { // create a config access to "/org.openoffice.Office.Jobs/Events" - ConfigAccess aConfig(rxContext, "/org.openoffice.Office.Jobs/Events"); + ConfigAccess aConfig(rxContext, u"/org.openoffice.Office.Jobs/Events"_ustr); aConfig.open(ConfigAccess::E_READONLY); if (aConfig.getMode()==ConfigAccess::E_CLOSED) return std::vector< OUString >(); @@ -500,10 +500,10 @@ std::vector< OUString > JobData::getEnabledJobsForEvent( const css::uno::Referen } OUString sAdminTime; - xJob->getPropertyValue("AdminTime") >>= sAdminTime; + xJob->getPropertyValue(u"AdminTime"_ustr) >>= sAdminTime; OUString sUserTime; - xJob->getPropertyValue("UserTime") >>= sUserTime; + xJob->getPropertyValue(u"UserTime"_ustr) >>= sUserTime; if (!isEnabled(sAdminTime, sUserTime)) continue; diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx index 2352919dea09..a51d248c601f 100644 --- a/framework/source/jobs/jobdispatch.cxx +++ b/framework/source/jobs/jobdispatch.cxx @@ -90,7 +90,7 @@ public: public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.jobs.JobDispatch"; + return u"com.sun.star.comp.framework.jobs.JobDispatch"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -100,7 +100,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.ProtocolHandler"}; + return {u"com.sun.star.frame.ProtocolHandler"_ustr}; } // Xinitialization diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx index f1c450bd6530..ccddd85fc47f 100644 --- a/framework/source/jobs/jobexecutor.cxx +++ b/framework/source/jobs/jobexecutor.cxx @@ -81,7 +81,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.JobExecutor"; + return u"com.sun.star.comp.framework.JobExecutor"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -91,7 +91,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.task.JobExecutor"}; + return {u"com.sun.star.task.JobExecutor"_ustr}; } // task.XJobExecutor @@ -121,7 +121,7 @@ public: */ JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext ) : m_xContext (xContext ) - , m_aConfig (xContext, "/org.openoffice.Office.Jobs/Events") + , m_aConfig (xContext, u"/org.openoffice.Office.Jobs/Events"_ustr) { } diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx index 0c895db33f71..5ab0db739bbd 100644 --- a/framework/source/jobs/shelljob.cxx +++ b/framework/source/jobs/shelljob.cxx @@ -42,7 +42,7 @@ namespace framework{ OUString SAL_CALL ShellJob::getImplementationName() { - return "com.sun.star.comp.framework.ShellJob"; + return u"com.sun.star.comp.framework.ShellJob"_ustr; } sal_Bool SAL_CALL ShellJob::supportsService( const OUString& sServiceName ) @@ -69,12 +69,12 @@ css::uno::Any SAL_CALL ShellJob::execute(const css::uno::Sequence< css::beans::N { ::comphelper::SequenceAsHashMap lArgs (lJobArguments); /** address job configuration inside argument set provided on method execute(). */ - ::comphelper::SequenceAsHashMap lOwnCfg(lArgs.getUnpackedValueOrDefault("JobConfig", css::uno::Sequence< css::beans::NamedValue >())); + ::comphelper::SequenceAsHashMap lOwnCfg(lArgs.getUnpackedValueOrDefault(u"JobConfig"_ustr, css::uno::Sequence< css::beans::NamedValue >())); - const OUString sCommand = lOwnCfg.getUnpackedValueOrDefault("Command" , OUString()); - const css::uno::Sequence< OUString > lCommandArguments = lOwnCfg.getUnpackedValueOrDefault("Arguments" , css::uno::Sequence< OUString >()); - const bool bDeactivateJobIfDone = lOwnCfg.getUnpackedValueOrDefault("DeactivateJobIfDone" , true ); - const bool bCheckExitCode = lOwnCfg.getUnpackedValueOrDefault("CheckExitCode" , true ); + const OUString sCommand = lOwnCfg.getUnpackedValueOrDefault(u"Command"_ustr , OUString()); + const css::uno::Sequence< OUString > lCommandArguments = lOwnCfg.getUnpackedValueOrDefault(u"Arguments"_ustr , css::uno::Sequence< OUString >()); + const bool bDeactivateJobIfDone = lOwnCfg.getUnpackedValueOrDefault(u"DeactivateJobIfDone"_ustr , true ); + const bool bCheckExitCode = lOwnCfg.getUnpackedValueOrDefault(u"CheckExitCode"_ustr , true ); // replace all might existing place holder. OUString sRealCommand = impl_substituteCommandVariables(sCommand); diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 22965a3e6a5d..6592b9b48d31 100644 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -307,7 +307,7 @@ void impl_setDockingWindowVisibility( const css::uno::Reference< css::uno::XComp xDispatcher->executeDispatch( xProvider, aDockWinCommand, - "_self", + u"_self"_ustr, 0, aArgs); } diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index bd122e6f683f..12dcf29f6b0a 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -166,7 +166,7 @@ void LayoutManager::implts_createMenuBar(const OUString& rMenuBarName) try { - m_xMenuBar->getPropertyValue("XMenuBar") >>= xMenuBar; + m_xMenuBar->getPropertyValue(u"XMenuBar"_ustr) >>= xMenuBar; } catch (const beans::UnknownPropertyException&) { @@ -215,7 +215,7 @@ void LayoutManager::impl_clearUpMenuBar() { try { - m_xMenuBar->getPropertyValue("XMenuBar") >>= xMenuBar; + m_xMenuBar->getPropertyValue(u"XMenuBar"_ustr) >>= xMenuBar; } catch (const beans::UnknownPropertyException&) { @@ -654,7 +654,7 @@ void LayoutManager::implts_writeWindowStateData( const OUString& aName, const UI try { // Check persistent flag of the user interface element - xPropSet->getPropertyValue("Persistent") >>= bPersistent; + xPropSet->getPropertyValue(u"Persistent"_ustr) >>= bPersistent; } catch (const beans::UnknownPropertyException&) { @@ -722,8 +722,8 @@ Reference< XUIElement > LayoutManager::implts_createElement( const OUString& aNa Reference< ui::XUIElement > xUIElement; SolarMutexGuard g; - Sequence< PropertyValue > aPropSeq{ comphelper::makePropertyValue("Frame", m_xFrame), - comphelper::makePropertyValue("Persistent", true) }; + Sequence< PropertyValue > aPropSeq{ comphelper::makePropertyValue(u"Frame"_ustr, m_xFrame), + comphelper::makePropertyValue(u"Persistent"_ustr, true) }; try { @@ -2359,7 +2359,7 @@ sal_Bool SAL_CALL LayoutManager::isVisible() { SolarMutexClearableGuard aReadLock; bool bStatusBarVisible( isElementVisible( STATUS_BAR_ALIAS )); - bool bProgressBarVisible( isElementVisible( "private:resource/progressbar/progressbar" )); + bool bProgressBarVisible( isElementVisible( u"private:resource/progressbar/progressbar"_ustr )); bool bVisible( m_bVisible ); Reference< XUIElement > xStatusBar( m_aStatusBarElement.m_xUIElement ); Reference< XUIElement > xProgressBar( m_aProgressBarElement.m_xUIElement ); @@ -2498,7 +2498,7 @@ void LayoutManager::implts_createMSCompatibleMenuBar( const OUString& aName ) assert(nFormsMenu != -1); // Create the MS compatible Form menu - css::uno::Reference< css::ui::XUIElement > xFormsMenu = implts_createElement( "private:resource/menubar/mscompatibleformsmenu" ); + css::uno::Reference< css::ui::XUIElement > xFormsMenu = implts_createElement( u"private:resource/menubar/mscompatibleformsmenu"_ustr ); if(!xFormsMenu.is()) return; @@ -2534,8 +2534,8 @@ IMPL_LINK_NOARG(LayoutManager, MenuBarClose, void*, void) xDispatcher->executeDispatch( xProvider, - ".uno:CloseWin", - "_self", + u".uno:CloseWin"_ustr, + u"_self"_ustr, 0, uno::Sequence< beans::PropertyValue >()); } @@ -2839,7 +2839,7 @@ void SAL_CALL LayoutManager::elementInserted( const ui::ConfigurationEvent& Even if ( xPropSet.is() ) { if ( Event.Source == uno::Reference< uno::XInterface >( m_xDocCfgMgr, uno::UNO_QUERY )) - xPropSet->setPropertyValue( "ConfigurationSource", Any( m_xDocCfgMgr )); + xPropSet->setPropertyValue( u"ConfigurationSource"_ustr, Any( m_xDocCfgMgr )); } xElementSettings->updateSettings(); } @@ -2883,7 +2883,7 @@ void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event if ( xElementSettings.is() ) { bool bNoSettings( false ); - OUString aConfigSourcePropName( "ConfigurationSource" ); + OUString aConfigSourcePropName( u"ConfigurationSource"_ustr ); Reference< XInterface > xElementCfgMgr; Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); @@ -2968,7 +2968,7 @@ void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Even Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue( "ConfigurationSource" ) >>= xElementCfgMgr; + xPropSet->getPropertyValue( u"ConfigurationSource"_ustr ) >>= xElementCfgMgr; if ( !xElementCfgMgr.is() ) return; diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 39f228ca1133..3b61f2a543f6 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -453,8 +453,8 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL ) uno::Reference< ui::XUIElement > xUIElement; uno::Sequence< beans::PropertyValue > aPropSeq{ - comphelper::makePropertyValue("Frame", xFrame), - comphelper::makePropertyValue("Persistent", true) + comphelper::makePropertyValue(u"Frame"_ustr, xFrame), + comphelper::makePropertyValue(u"Persistent"_ustr, true) }; uno::Reference<ui::XUIElementFactory> xUIElementFactory; { @@ -543,7 +543,7 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL ) { ToolBox* pToolbar = static_cast<ToolBox *>(pWindow.get()); ToolBoxMenuType nMenuType = pToolbar->GetMenuType(); - if ( aCmdOptions.LookupDisabled( "ConfigureDialog" )) + if ( aCmdOptions.LookupDisabled( u"ConfigureDialog"_ustr )) pToolbar->SetMenuType( nMenuType & ~ToolBoxMenuType::Customize ); else pToolbar->SetMenuType( nMenuType | ToolBoxMenuType::Customize ); @@ -1139,7 +1139,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() else { // Create new UI element and try to read its state data - UIElement aNewToolbar( aAddonToolBarName, "toolbar", xUIElement ); + UIElement aNewToolbar( aAddonToolBarName, u"toolbar"_ustr, xUIElement ); aNewToolbar.m_bFloating = true; implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); implts_setElementData( aNewToolbar, xDockWindow ); @@ -1550,7 +1550,7 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen try { // Check persistent flag of the user interface element - xPropSet->getPropertyValue("Persistent") >>= bPersistent; + xPropSet->getPropertyValue(u"Persistent"_ustr) >>= bPersistent; } catch (const beans::UnknownPropertyException&) { @@ -3777,7 +3777,7 @@ void SAL_CALL ToolbarLayoutManager::elementInserted( const ui::ConfigurationEven if ( xPropSet.is() ) { if ( rEvent.Source == uno::Reference< uno::XInterface >( m_xDocCfgMgr, uno::UNO_QUERY )) - xPropSet->setPropertyValue( "ConfigurationSource", css::uno::Any( m_xDocCfgMgr )); + xPropSet->setPropertyValue( u"ConfigurationSource"_ustr, css::uno::Any( m_xDocCfgMgr )); } xElementSettings->updateSettings(); } @@ -3803,7 +3803,7 @@ void SAL_CALL ToolbarLayoutManager::elementInserted( const ui::ConfigurationEven xPropSet.set( xCfgMgr->getSettings( rEvent.ResourceURL, false ), uno::UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue("UIName") >>= aUIName; + xPropSet->getPropertyValue(u"UIName"_ustr) >>= aUIName; } catch (const container::NoSuchElementException&) { @@ -3842,7 +3842,7 @@ void SAL_CALL ToolbarLayoutManager::elementRemoved( const ui::ConfigurationEvent return; bool bNoSettings( false ); - OUString aConfigSourcePropName( "ConfigurationSource" ); + OUString aConfigSourcePropName( u"ConfigurationSource"_ustr ); uno::Reference< uno::XInterface > xElementCfgMgr; uno::Reference< beans::XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); @@ -3887,7 +3887,7 @@ void SAL_CALL ToolbarLayoutManager::elementReplaced( const ui::ConfigurationEven uno::Reference< beans::XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue( "ConfigurationSource" ) >>= xElementCfgMgr; + xPropSet->getPropertyValue( u"ConfigurationSource"_ustr ) >>= xElementCfgMgr; if ( !xElementCfgMgr.is() ) return; diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 5871c56619ab..40b9917064ee 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -181,7 +181,7 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::loadComponentFromURL(const { case LoadEnvException::ID_INVALID_MEDIADESCRIPTOR: throw css::lang::IllegalArgumentException( - "Optional list of arguments seem to be corrupted.", xLoader, 4); + u"Optional list of arguments seem to be corrupted."_ustr, xLoader, 4); case LoadEnvException::ID_UNSUPPORTED_CONTENT: throw css::lang::IllegalArgumentException( @@ -261,7 +261,7 @@ void LoadEnv::startLoading(const OUString& sURL, const uno::Sequence<beans::Prop // the load request. We take over the result then! m_eContentType = LoadEnv::classifyContent(aRealURL, lMediaDescriptor); if (m_eContentType == E_UNSUPPORTED_CONTENT) - throw LoadEnvException(LoadEnvException::ID_UNSUPPORTED_CONTENT, "from LoadEnv::startLoading"); + throw LoadEnvException(LoadEnvException::ID_UNSUPPORTED_CONTENT, u"from LoadEnv::startLoading"_ustr); // make URL part of the MediaDescriptor // It doesn't matter if it is already an item of it. @@ -382,7 +382,7 @@ void LoadEnv::start() // check "classifyContent()" failed before ... if (m_eContentType == E_UNSUPPORTED_CONTENT) throw LoadEnvException(LoadEnvException::ID_UNSUPPORTED_CONTENT, - "from LoadEnv::start"); + u"from LoadEnv::start"_ustr); } // <- SAFE @@ -415,7 +415,7 @@ void LoadEnv::start() // We can't say - what was the reason for. if (!bStarted) throw LoadEnvException( - LoadEnvException::ID_GENERAL_ERROR, "not started"); + LoadEnvException::ID_GENERAL_ERROR, u"not started"_ustr); } /*----------------------------------------------- @@ -618,7 +618,7 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString& css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); css::uno::Reference< css::document::XTypeDetection > xDetect( xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.document.TypeDetection", xContext), + u"com.sun.star.document.TypeDetection"_ustr, xContext), css::uno::UNO_QUERY_THROW); OUString sType = xDetect->queryTypeByURL(sURL); @@ -704,7 +704,7 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip } OUString aUseOrcus; - rtl::Bootstrap::get("LIBO_USE_ORCUS", aUseOrcus); + rtl::Bootstrap::get(u"LIBO_USE_ORCUS"_ustr, aUseOrcus); bool bUseOrcus = (aUseOrcus == "YES"); if (!bUseOrcus) @@ -761,22 +761,22 @@ void LoadEnv::impl_detectTypeAndFilter() m_lMediaDescriptor << lDescriptor; m_lMediaDescriptor[utl::MediaDescriptor::PROP_TYPENAME] <<= sType; m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERNAME] <<= sFilter; - m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERPROVIDER] <<= OUString("orcus"); - m_lMediaDescriptor[utl::MediaDescriptor::PROP_DOCUMENTSERVICE] <<= OUString("com.sun.star.sheet.SpreadsheetDocument"); + m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERPROVIDER] <<= u"orcus"_ustr; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_DOCUMENTSERVICE] <<= u"com.sun.star.sheet.SpreadsheetDocument"_ustr; return; // <- SAFE } css::uno::Reference< css::document::XTypeDetection > xDetect( xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.document.TypeDetection", xContext), + u"com.sun.star.document.TypeDetection"_ustr, xContext), css::uno::UNO_QUERY_THROW); sType = xDetect->queryTypeByDescriptor(lDescriptor, true); /*TODO should deep detection be able for enable/disable it from outside? */ // no valid content -> loading not possible if (sType.isEmpty()) throw LoadEnvException( - LoadEnvException::ID_UNSUPPORTED_CONTENT, "type detection failed"); + LoadEnvException::ID_UNSUPPORTED_CONTENT, u"type detection failed"_ustr); // SAFE -> osl::ResettableMutexGuard aWriteLock(m_mutex); @@ -794,7 +794,7 @@ void LoadEnv::impl_detectTypeAndFilter() // We do have potentially correct type, but the detection process was aborted. if (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ABORTED, false)) throw LoadEnvException( - LoadEnvException::ID_UNSUPPORTED_CONTENT, "type detection aborted"); + LoadEnvException::ID_UNSUPPORTED_CONTENT, u"type detection aborted"_ustr); // But the type isn't enough. For loading sometimes we need more information. // E.g. for our "_default" feature, where we recycle any frame which contains @@ -811,7 +811,7 @@ void LoadEnv::impl_detectTypeAndFilter() try { ::comphelper::SequenceAsHashMap lTypeProps(xTypeCont->getByName(sType)); - sFilter = lTypeProps.getUnpackedValueOrDefault("PreferredFilter", OUString()); + sFilter = lTypeProps.getUnpackedValueOrDefault(u"PreferredFilter"_ustr, OUString()); if (!sFilter.isEmpty()) { // SAFE -> @@ -840,7 +840,7 @@ void LoadEnv::impl_detectTypeAndFilter() try { ::comphelper::SequenceAsHashMap lFilterProps(xFilterCont->getByName(sFilter)); - sal_Int32 nFlags = lFilterProps.getUnpackedValueOrDefault("Flags", sal_Int32(0)); + sal_Int32 nFlags = lFilterProps.getUnpackedValueOrDefault(u"Flags"_ustr, sal_Int32(0)); bIsOwnTemplate = ((nFlags & FILTERFLAG_TEMPLATEPATH) == FILTERFLAG_TEMPLATEPATH); } catch(const css::container::NoSuchElementException&) @@ -1011,7 +1011,7 @@ bool LoadEnv::impl_filterHasInteractiveDialog() const try { ::comphelper::SequenceAsHashMap lFilterProps(xFilterCont->getByName(sFilter)); - sUIComponent = lFilterProps.getUnpackedValueOrDefault("UIComponent", OUString()); + sUIComponent = lFilterProps.getUnpackedValueOrDefault(u"UIComponent"_ustr, OUString()); } catch(const css::container::NoSuchElementException&) { @@ -1171,7 +1171,7 @@ bool LoadEnv::impl_loadContent() { // Set the URL on the frame itself, for the duration of the load, when it has no // controller. - xTargetFrameProps->setPropertyValue("URL", uno::Any(sURL)); + xTargetFrameProps->setPropertyValue(u"URL"_ustr, uno::Any(sURL)); } bool bResult = xSyncLoader->load(lDescriptor, xTargetFrame); // react for the result here, so the outside waiting @@ -1275,7 +1275,7 @@ void LoadEnv::impl_jumpToMark(const css::uno::Reference< css::frame::XFrame >& x return; ::comphelper::SequenceAsHashMap lArgs; - lArgs[OUString("Bookmark")] <<= aURL.Mark; + lArgs[u"Bookmark"_ustr] <<= aURL.Mark; xDispatcher->dispatch(aCmd, lArgs.getAsConstPropertyValueList()); } @@ -1347,7 +1347,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() uno::Reference<beans::XPropertySet> xTaskProps(xTask, uno::UNO_QUERY); if (xTaskProps.is()) { - xTaskProps->getPropertyValue("URL") >>= sURL; + xTaskProps->getPropertyValue(u"URL"_ustr) >>= sURL; } if (sURL.isEmpty()) { @@ -1689,7 +1689,7 @@ void LoadEnv::impl_reactForLoadingState() { if ( aRequest.isExtractableTo( ::cppu::UnoType< css::uno::Exception >::get() ) ) throw LoadEnvException( - LoadEnvException::ID_GENERAL_ERROR, "interaction request", + LoadEnvException::ID_GENERAL_ERROR, u"interaction request"_ustr, aRequest); } @@ -1789,7 +1789,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw // Don't look for persistent window attributes when used through LibreOfficeKit if( !comphelper::LibreOfficeKit::isActive() ) - comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, "ooSetupFactoryWindowAttributes") >>= sWindowState; + comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, u"ooSetupFactoryWindowAttributes"_ustr) >>= sWindowState; if (!sWindowState.isEmpty()) { diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 347c23c16a9c..b1e0a8aa7322 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -40,7 +40,7 @@ constexpr OUString REM_AS_COMMENT = u"rem "_ustr; OUString SAL_CALL DispatchRecorder::getImplementationName() { - return "com.sun.star.comp.framework.DispatchRecorder"; + return u"com.sun.star.comp.framework.DispatchRecorder"_ustr; } sal_Bool SAL_CALL DispatchRecorder::supportsService( const OUString& sServiceName ) @@ -50,7 +50,7 @@ sal_Bool SAL_CALL DispatchRecorder::supportsService( const OUString& sServiceNam css::uno::Sequence< OUString > SAL_CALL DispatchRecorder::getSupportedServiceNames() { - return { "com.sun.star.frame.DispatchRecorder" }; + return { u"com.sun.star.frame.DispatchRecorder"_ustr }; } @@ -389,7 +389,7 @@ sal_Int32 SAL_CALL DispatchRecorder::getCount() css::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx) { if (idx >= static_cast<sal_Int32>(m_aStatements.size())) - throw css::lang::IndexOutOfBoundsException( "Dispatch recorder out of bounds" ); + throw css::lang::IndexOutOfBoundsException( u"Dispatch recorder out of bounds"_ustr ); Any element(&m_aStatements[idx], cppu::UnoType<css::frame::DispatchStatement>::get()); @@ -402,13 +402,13 @@ void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const css::uno::An if (element.getValueType() != cppu::UnoType<css::frame::DispatchStatement>::get()) { throw css::lang::IllegalArgumentException( - "Illegal argument in dispatch recorder", + u"Illegal argument in dispatch recorder"_ustr, Reference< XInterface >(), 2 ); } if (idx >= static_cast<sal_Int32>(m_aStatements.size())) throw css::lang::IndexOutOfBoundsException( - "Dispatch recorder out of bounds" ); + u"Dispatch recorder out of bounds"_ustr ); auto pStatement = o3tl::doAccess<css::frame::DispatchStatement>(element); diff --git a/framework/source/recording/dispatchrecordersupplier.cxx b/framework/source/recording/dispatchrecordersupplier.cxx index 39707aca6e22..a3c7347a4f05 100644 --- a/framework/source/recording/dispatchrecordersupplier.cxx +++ b/framework/source/recording/dispatchrecordersupplier.cxx @@ -30,7 +30,7 @@ namespace framework{ OUString SAL_CALL DispatchRecorderSupplier::getImplementationName() { - return "com.sun.star.comp.framework.DispatchRecorderSupplier"; + return u"com.sun.star.comp.framework.DispatchRecorderSupplier"_ustr; } sal_Bool SAL_CALL DispatchRecorderSupplier::supportsService( const OUString& sServiceName ) @@ -40,7 +40,7 @@ sal_Bool SAL_CALL DispatchRecorderSupplier::supportsService( const OUString& sSe css::uno::Sequence< OUString > SAL_CALL DispatchRecorderSupplier::getSupportedServiceNames() { - return { "com.sun.star.frame.DispatchRecorderSupplier" }; + return { u"com.sun.star.frame.DispatchRecorderSupplier"_ustr }; } @@ -125,10 +125,10 @@ void SAL_CALL DispatchRecorderSupplier::dispatchAndRecord( const css::util::URL& // clear unspecific situations if (!xDispatcher.is()) - throw css::uno::RuntimeException("specification violation: dispatcher is NULL", static_cast< ::cppu::OWeakObject* >(this)); + throw css::uno::RuntimeException(u"specification violation: dispatcher is NULL"_ustr, static_cast< ::cppu::OWeakObject* >(this)); if (!xRecorder.is()) - throw css::uno::RuntimeException("specification violation: no valid dispatch recorder available", static_cast< ::cppu::OWeakObject* >(this)); + throw css::uno::RuntimeException(u"specification violation: no valid dispatch recorder available"_ustr, static_cast< ::cppu::OWeakObject* >(this)); // check, if given dispatch supports record functionality by itself ... // or must be wrapped. diff --git a/framework/source/services/ContextChangeEventMultiplexer.cxx b/framework/source/services/ContextChangeEventMultiplexer.cxx index 1cf4a670cf5a..490d04887137 100644 --- a/framework/source/services/ContextChangeEventMultiplexer.cxx +++ b/framework/source/services/ContextChangeEventMultiplexer.cxx @@ -140,7 +140,7 @@ void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener ( { if ( ! rxListener.is()) throw css::lang::IllegalArgumentException( - "can not add an empty reference", + u"can not add an empty reference"_ustr, static_cast<XWeak*>(this), 0); @@ -152,7 +152,7 @@ void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener ( { // The listener was added for the same event focus // previously. That is an error. - throw css::lang::IllegalArgumentException("listener added twice", static_cast<XWeak*>(this), 0); + throw css::lang::IllegalArgumentException(u"listener added twice"_ustr, static_cast<XWeak*>(this), 0); } rContainer.push_back(rxListener); } @@ -175,7 +175,7 @@ void SAL_CALL ContextChangeEventMultiplexer::removeContextChangeEventListener ( { if ( ! rxListener.is()) throw css::lang::IllegalArgumentException( - "can not remove an empty reference", + u"can not remove an empty reference"_ustr, static_cast<XWeak*>(this), 0); FocusDescriptor* pFocusDescriptor = GetFocusDescriptor(rxEventFocus, false); @@ -200,7 +200,7 @@ void SAL_CALL ContextChangeEventMultiplexer::removeAllContextChangeEventListener { if ( ! rxListener.is()) throw css::lang::IllegalArgumentException( - "can not remove an empty reference", + u"can not remove an empty reference"_ustr, static_cast<XWeak*>(this), 0); for (auto& rContainer : maListeners) @@ -279,7 +279,7 @@ ContextChangeEventMultiplexer::FocusDescriptor* ContextChangeEventMultiplexer::G OUString SAL_CALL ContextChangeEventMultiplexer::getImplementationName() { - return "org.apache.openoffice.comp.framework.ContextChangeEventMultiplexer"; + return u"org.apache.openoffice.comp.framework.ContextChangeEventMultiplexer"_ustr; } sal_Bool SAL_CALL ContextChangeEventMultiplexer::supportsService ( const OUString& rsServiceName) diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index d1341bee4dba..246d8438bbae 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -489,7 +489,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.AutoRecovery"; + return u"com.sun.star.comp.framework.AutoRecovery"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -499,7 +499,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.AutoRecovery"}; + return {u"com.sun.star.frame.AutoRecovery"_ustr}; } // XInterface @@ -1201,7 +1201,7 @@ void CacheLockGuard::lock(bool bLockForAddRemoveVectorItems) { OSL_FAIL("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp."); throw css::uno::RuntimeException( - "Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.", + u"Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp."_ustr, m_xOwner); } @@ -1225,7 +1225,7 @@ void CacheLockGuard::unlock() { OSL_FAIL("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)"); throw css::uno::RuntimeException( - "Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)", + u"Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)"_ustr, m_xOwner); } /* SAFE */ @@ -1546,7 +1546,7 @@ void SAL_CALL AutoRecovery::addStatusListener(const css::uno::Reference< css::fr const css::util::URL& aURL ) { if (!xListener.is()) - throw css::uno::RuntimeException("Invalid listener reference.", static_cast< css::frame::XDispatch* >(this)); + throw css::uno::RuntimeException(u"Invalid listener reference."_ustr, static_cast< css::frame::XDispatch* >(this)); // container is threadsafe by using a shared mutex! m_lListener.addInterface(aURL.Complete, xListener); @@ -1574,7 +1574,7 @@ void SAL_CALL AutoRecovery::removeStatusListener(const css::uno::Reference< css: const css::util::URL& aURL ) { if (!xListener.is()) - throw css::uno::RuntimeException("Invalid listener reference.", static_cast< css::frame::XDispatch* >(this)); + throw css::uno::RuntimeException(u"Invalid listener reference."_ustr, static_cast< css::frame::XDispatch* >(this)); // container is threadsafe by using a shared mutex! m_lListener.removeInterface(aURL.Complete, xListener); } @@ -1769,7 +1769,7 @@ void AutoRecovery::implts_openConfig() // throws a RuntimeException if an error occurs! css::uno::Reference<css::container::XNameAccess> xCFG( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", + u"com.sun.star.configuration.ConfigurationAccess"_ustr, comphelper::containerToSequence(lParams)), css::uno::UNO_QUERY); @@ -1913,7 +1913,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume if (rInfo.AppModule.isEmpty()) { throw css::uno::RuntimeException( - "Can not find out the default filter and its extension, if no application module is known!", + u"Can not find out the default filter and its extension, if no application module is known!"_ustr, static_cast< css::frame::XDispatch* >(this)); } @@ -1946,10 +1946,10 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume css::uno::Reference< css::container::XNameAccess > xFilterCFG( m_xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.document.FilterFactory", m_xContext), css::uno::UNO_QUERY_THROW); + u"com.sun.star.document.FilterFactory"_ustr, m_xContext), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xTypeCFG( m_xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.document.TypeDetection", m_xContext), css::uno::UNO_QUERY_THROW); + u"com.sun.star.document.TypeDetection"_ustr, m_xContext), css::uno::UNO_QUERY_THROW); ::comphelper::SequenceAsHashMap lFilterProps (xFilterCFG->getByName(rInfo.DefaultFilter)); OUString sTypeRegistration = lFilterProps.getUnpackedValueOrDefault(FILTER_PROP_TYPE, OUString()); @@ -3480,7 +3480,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL , // and store this info in media descriptor we will use for recoverFromFile call. Reference< css::document::XExtendedFilterDetection > xDetection( m_xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.comp.oox.FormatDetector", m_xContext), + u"com.sun.star.comp.oox.FormatDetector"_ustr, m_xContext), UNO_QUERY_THROW); lDescriptor[utl::MediaDescriptor::PROP_URL] <<= sURL; Sequence< css::beans::PropertyValue > aDescriptorSeq = lDescriptor.getAsConstPropertyValueList(); @@ -4306,7 +4306,7 @@ void AutoRecovery::st_impl_removeFile(const OUString& sURL) try { ::ucbhelper::Content aContent(sURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), m_xContext); - aContent.executeCommand("delete", css::uno::Any(true)); + aContent.executeCommand(u"delete"_ustr, css::uno::Any(true)); } catch(const css::uno::Exception&) { diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 2f9ccbd04bf2..2c7dd89e9581 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -72,7 +72,7 @@ enum PropHandle { OUString SAL_CALL Desktop::getImplementationName() { - return "com.sun.star.comp.framework.Desktop"; + return u"com.sun.star.comp.framework.Desktop"_ustr; } sal_Bool SAL_CALL Desktop::supportsService(OUString const & ServiceName) @@ -82,7 +82,7 @@ sal_Bool SAL_CALL Desktop::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> SAL_CALL Desktop::getSupportedServiceNames() { - return { "com.sun.star.frame.Desktop" }; + return { u"com.sun.star.frame.Desktop"_ustr }; } void Desktop::constructorInit() @@ -273,7 +273,7 @@ sal_Bool SAL_CALL Desktop::terminate() if (!bRestartableMainLoop) { - CrashReporter::addKeyValue("ShutDown", OUString::boolean(true), CrashReporter::Write); + CrashReporter::addKeyValue(u"ShutDown"_ustr, OUString::boolean(true), CrashReporter::Write); // The clipboard listener needs to be the first. It can create copies of the // existing document which needs basically all the available infrastructure. @@ -574,7 +574,7 @@ css::uno::Reference< css::lang::XComponent > SAL_CALL Desktop::loadComponentFrom css::uno::Reference< css::frame::XComponentLoader > xThis(this); utl::MediaDescriptor aDescriptor(lArguments); - bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault("OnMainThread", false); + bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault(u"OnMainThread"_ustr, false); if (bOnMainThread) { @@ -1429,22 +1429,22 @@ void SAL_CALL Desktop::getFastPropertyValue( css::uno::Any& aValue , static cppu::OPropertyArrayHelper HELPER = [] () { return cppu::OPropertyArrayHelper { - {{"ActiveFrame", PropHandle::ActiveFrame, + {{u"ActiveFrame"_ustr, PropHandle::ActiveFrame, cppu::UnoType<css::lang::XComponent>::get(), (css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY)}, - {"DispatchRecorderSupplier", + {u"DispatchRecorderSupplier"_ustr, PropHandle::DispatchRecorderSupplier, cppu::UnoType<css::frame::XDispatchRecorderSupplier>::get(), css::beans::PropertyAttribute::TRANSIENT}, - {"IsPlugged", + {u"IsPlugged"_ustr, PropHandle::IsPlugged, cppu::UnoType<bool>::get(), (css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY)}, - {"SuspendQuickstartVeto", PropHandle::SuspendQuickstartVeto, + {u"SuspendQuickstartVeto"_ustr, PropHandle::SuspendQuickstartVeto, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::TRANSIENT}, - {"Title", PropHandle::Title, cppu::UnoType<OUString>::get(), + {u"Title"_ustr, PropHandle::Title, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT}}, true}; }(); diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx index 8f3d77d322ba..109ceb0c6c7d 100644 --- a/framework/source/services/dispatchhelper.cxx +++ b/framework/source/services/dispatchhelper.cxx @@ -35,7 +35,7 @@ namespace framework OUString SAL_CALL DispatchHelper::getImplementationName() { - return "com.sun.star.comp.framework.services.DispatchHelper"; + return u"com.sun.star.comp.framework.services.DispatchHelper"_ustr; } sal_Bool SAL_CALL DispatchHelper::supportsService(const OUString& sServiceName) @@ -45,7 +45,7 @@ sal_Bool SAL_CALL DispatchHelper::supportsService(const OUString& sServiceName) css::uno::Sequence<OUString> SAL_CALL DispatchHelper::getSupportedServiceNames() { - return { "com.sun.star.frame.DispatchHelper" }; + return { u"com.sun.star.frame.DispatchHelper"_ustr }; } /** ctor. @@ -110,7 +110,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch( = xDispatchProvider->queryDispatch(aURL, sTargetFrameName, nSearchFlags); utl::MediaDescriptor aDescriptor(lArguments); - bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault("OnMainThread", false); + bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault(u"OnMainThread"_ustr, false); if (bOnMainThread) return vcl::solarthread::syncExecute([this, &xDispatch, &aURL, &lArguments]() { diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 0cbc1ca68f9d..f5d7226e869c 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -121,7 +121,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.Frame"; + return u"com.sun.star.comp.framework.Frame"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -131,7 +131,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.Frame"}; + return {u"com.sun.star.frame.Frame"_ustr}; } // XComponentLoader @@ -361,7 +361,7 @@ private: void checkDisposed() { osl::MutexGuard g(rBHelper.rMutex); if (rBHelper.bInDispose || rBHelper.bDisposed) { - throw css::lang::DisposedException("Frame disposed"); + throw css::lang::DisposedException(u"Frame disposed"_ustr); } } @@ -578,7 +578,7 @@ css::uno::Reference< css::lang::XComponent > SAL_CALL XFrameImpl::loadComponentF css::uno::Reference< css::frame::XComponentLoader > xThis(this); utl::MediaDescriptor aDescriptor(lArguments); - bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault("OnMainThread", false); + bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault(u"OnMainThread"_ustr, false); if (bOnMainThread) { @@ -758,7 +758,7 @@ void SAL_CALL XFrameImpl::initialize( const css::uno::Reference< css::awt::XWind /* UNSAFE AREA --------------------------------------------------------------------------------------------- */ if (!xWindow.is()) throw css::uno::RuntimeException( - "XFrameImpl::initialize() called without a valid container window reference.", + u"XFrameImpl::initialize() called without a valid container window reference."_ustr, static_cast< css::frame::XFrame* >(this)); checkDisposed(); @@ -770,7 +770,7 @@ void SAL_CALL XFrameImpl::initialize( const css::uno::Reference< css::awt::XWind // We should initialize our object and open it for working. if ( m_xContainerWindow.is() ) throw css::uno::RuntimeException( - "XFrameImpl::initialized() is called more than once, which is not useful nor allowed.", + u"XFrameImpl::initialized() is called more than once, which is not useful nor allowed."_ustr, static_cast< css::frame::XFrame* >(this)); // Set the new window. @@ -1700,11 +1700,11 @@ void SAL_CALL XFrameImpl::close( sal_Bool bDeliverOwnership ) m_bSelfClose = true; } - throw css::util::CloseVetoException("Frame in use for loading document...",static_cast< ::cppu::OWeakObject*>(this)); + throw css::util::CloseVetoException(u"Frame in use for loading document..."_ustr,static_cast< ::cppu::OWeakObject*>(this)); } if ( ! setComponent(nullptr,nullptr) ) - throw css::util::CloseVetoException("Component couldn't be detached...",static_cast< ::cppu::OWeakObject*>(this)); + throw css::util::CloseVetoException(u"Component couldn't be detached..."_ustr,static_cast< ::cppu::OWeakObject*>(this)); // If closing is allowed... inform all listeners and dispose this frame! pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::util::XCloseListener>::get()); @@ -2326,7 +2326,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL XFrameImpl::queryDispatch( disp = m_xDispatchHelper; } if (!disp.is()) { - throw css::lang::DisposedException("Frame disposed"); + throw css::lang::DisposedException(u"Frame disposed"_ustr); } return disp->queryDispatch( aURL, sTargetFrameName, nSearchFlags ); } @@ -2358,7 +2358,7 @@ css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL XFra disp = m_xDispatchHelper; } if (!disp.is()) { - throw css::lang::DisposedException("Frame disposed"); + throw css::lang::DisposedException(u"Frame disposed"_ustr); } return disp->queryDispatches( lDescriptor ); } @@ -2615,7 +2615,7 @@ void SAL_CALL XFrameImpl::windowShown( const css::lang::EventObject& ) { css::uno::Reference< css::task::XJobExecutor > xExecutor = css::task::theJobExecutor::get( m_xContext ); - xExecutor->trigger( "onFirstVisibleTask" ); + xExecutor->trigger( u"onFirstVisibleTask"_ustr ); } } @@ -2925,16 +2925,16 @@ void XFrameImpl::implts_sendFrameActionEvent( const css::frame::FrameAction& aAc // (only activated in debug version!) SAL_INFO( "fwk.frame", "[Frame] " << m_sName << " send event " << - (aAction == css::frame::FrameAction_COMPONENT_ATTACHED ? OUString("COMPONENT ATTACHED") : - (aAction == css::frame::FrameAction_COMPONENT_DETACHING ? OUString("COMPONENT DETACHING") : - (aAction == css::frame::FrameAction_COMPONENT_REATTACHED ? OUString("COMPONENT REATTACHED") : - (aAction == css::frame::FrameAction_FRAME_ACTIVATED ? OUString("FRAME ACTIVATED") : - (aAction == css::frame::FrameAction_FRAME_DEACTIVATING ? OUString("FRAME DEACTIVATING") : - (aAction == css::frame::FrameAction_CONTEXT_CHANGED ? OUString("CONTEXT CHANGED") : - (aAction == css::frame::FrameAction_FRAME_UI_ACTIVATED ? OUString("FRAME UI ACTIVATED") : - (aAction == css::frame::FrameAction_FRAME_UI_DEACTIVATING ? OUString("FRAME UI DEACTIVATING") : - (aAction == css::frame::FrameAction::FrameAction_MAKE_FIXED_SIZE ? OUString("MAKE_FIXED_SIZE") : - OUString("*invalid*"))))))))))); + (aAction == css::frame::FrameAction_COMPONENT_ATTACHED ? u"COMPONENT ATTACHED"_ustr : + (aAction == css::frame::FrameAction_COMPONENT_DETACHING ? u"COMPONENT DETACHING"_ustr : + (aAction == css::frame::FrameAction_COMPONENT_REATTACHED ? u"COMPONENT REATTACHED"_ustr : + (aAction == css::frame::FrameAction_FRAME_ACTIVATED ? u"FRAME ACTIVATED"_ustr : + (aAction == css::frame::FrameAction_FRAME_DEACTIVATING ? u"FRAME DEACTIVATING"_ustr : + (aAction == css::frame::FrameAction_CONTEXT_CHANGED ? u"CONTEXT CHANGED"_ustr : + (aAction == css::frame::FrameAction_FRAME_UI_ACTIVATED ? u"FRAME UI ACTIVATED"_ustr : + (aAction == css::frame::FrameAction_FRAME_UI_DEACTIVATING ? u"FRAME UI DEACTIVATING"_ustr : + (aAction == css::frame::FrameAction::FrameAction_MAKE_FIXED_SIZE ? u"MAKE_FIXED_SIZE"_ustr : + u"*invalid*"_ustr)))))))))); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // Send css::frame::FrameAction event to all listener. @@ -3034,8 +3034,8 @@ void XFrameImpl::implts_setIconOnWindow() { css::uno::Reference< css::beans::XPropertySetInfo > const xPSI( xSet->getPropertySetInfo(), css::uno::UNO_SET_THROW ); - if ( xPSI->hasPropertyByName( "IconId" ) ) - xSet->getPropertyValue( "IconId" ) >>= nIcon; + if ( xPSI->hasPropertyByName( u"IconId"_ustr ) ) + xSet->getPropertyValue( u"IconId"_ustr ) >>= nIcon; } catch( css::uno::Exception& ) { diff --git a/framework/source/services/mediatypedetectionhelper.cxx b/framework/source/services/mediatypedetectionhelper.cxx index 894f95740ad9..4bb11c662f2e 100644 --- a/framework/source/services/mediatypedetectionhelper.cxx +++ b/framework/source/services/mediatypedetectionhelper.cxx @@ -43,7 +43,7 @@ MediaTypeDetectionHelper::~MediaTypeDetectionHelper() OUString SAL_CALL MediaTypeDetectionHelper::getImplementationName() { - return "com.sun.star.comp.framework.MediaTypeDetectionHelper"; + return u"com.sun.star.comp.framework.MediaTypeDetectionHelper"_ustr; } sal_Bool SAL_CALL MediaTypeDetectionHelper::supportsService( const OUString& sServiceName ) @@ -53,7 +53,7 @@ sal_Bool SAL_CALL MediaTypeDetectionHelper::supportsService( const OUString& sSe css::uno::Sequence< OUString > SAL_CALL MediaTypeDetectionHelper::getSupportedServiceNames() { - return { "com.sun.star.frame.MediaTypeDetectionHelper" }; + return { u"com.sun.star.frame.MediaTypeDetectionHelper"_ustr }; } diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx index f2e5758b90e1..fba90559acef 100644 --- a/framework/source/services/modulemanager.cxx +++ b/framework/source/services/modulemanager.cxx @@ -131,7 +131,7 @@ ModuleManager::ModuleManager(css::uno::Reference< css::uno::XComponentContext > if (!comphelper::IsFuzzing()) { m_xCFG.set( comphelper::ConfigurationHelper::openConfig( - m_xContext, "/org.openoffice.Setup/Office/Factories", + m_xContext, u"/org.openoffice.Setup/Office/Factories"_ustr, comphelper::EConfigurationModes::ReadOnly ), css::uno::UNO_QUERY_THROW ); } @@ -139,7 +139,7 @@ ModuleManager::ModuleManager(css::uno::Reference< css::uno::XComponentContext > OUString ModuleManager::getImplementationName() { - return "com.sun.star.comp.framework.ModuleManager"; + return u"com.sun.star.comp.framework.ModuleManager"_ustr; } sal_Bool ModuleManager::supportsService(OUString const & ServiceName) @@ -149,7 +149,7 @@ sal_Bool ModuleManager::supportsService(OUString const & ServiceName) css::uno::Sequence< OUString > ModuleManager::getSupportedServiceNames() { - return { "com.sun.star.frame.ModuleManager" }; + return { u"com.sun.star.frame.ModuleManager"_ustr }; } OUString SAL_CALL ModuleManager::identify(const css::uno::Reference< css::uno::XInterface >& xModule) @@ -168,7 +168,7 @@ OUString SAL_CALL ModuleManager::identify(const css::uno::Reference< css::uno::X ) { throw css::lang::IllegalArgumentException( - "Given module is not a frame nor a window, controller or model.", + u"Given module is not a frame nor a window, controller or model."_ustr, static_cast< ::cppu::OWeakObject* >(this), 1); } @@ -196,7 +196,7 @@ OUString SAL_CALL ModuleManager::identify(const css::uno::Reference< css::uno::X if (sModule.isEmpty()) throw css::frame::UnknownModuleException( - "Can not find suitable module for the given component.", + u"Can not find suitable module for the given component."_ustr, static_cast< ::cppu::OWeakObject* >(this)); return sModule; @@ -209,7 +209,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& sName , if (lProps.empty() ) { throw css::lang::IllegalArgumentException( - "No properties given to replace part of module.", + u"No properties given to replace part of module."_ustr, static_cast< cppu::OWeakObject * >(this), 2); } @@ -221,7 +221,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& sName , // we can close it without a flush... and our read data won't be affected .-) css::uno::Reference< css::uno::XInterface > xCfg = ::comphelper::ConfigurationHelper::openConfig( m_xContext, - "/org.openoffice.Setup/Office/Factories", + u"/org.openoffice.Setup/Office/Factories"_ustr, ::comphelper::EConfigurationModes::Standard); css::uno::Reference< css::container::XNameAccess > xModules (xCfg, css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameReplace > xModule ; @@ -230,7 +230,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& sName , if (!xModule.is()) { throw css::uno::RuntimeException( - "Was not able to get write access to the requested module entry inside configuration.", + u"Was not able to get write access to the requested module entry inside configuration."_ustr, static_cast< cppu::OWeakObject * >(this)); } @@ -253,7 +253,7 @@ css::uno::Any SAL_CALL ModuleManager::getByName(const OUString& sName) if (!xModule.is()) { throw css::uno::RuntimeException( - "Was not able to get write access to the requested module entry inside configuration.", + u"Was not able to get write access to the requested module entry inside configuration."_ustr, static_cast< cppu::OWeakObject * >(this)); } @@ -261,7 +261,7 @@ css::uno::Any SAL_CALL ModuleManager::getByName(const OUString& sName) const css::uno::Sequence< OUString > lPropNames = xModule->getElementNames(); comphelper::SequenceAsHashMap lProps; - lProps[OUString("ooSetupFactoryModuleIdentifier")] <<= sName; + lProps[u"ooSetupFactoryModuleIdentifier"_ustr] <<= sName; for (const OUString& sPropName : lPropNames) { lProps[sPropName] = xModule->getByName(sPropName); diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index 90cbb3281e10..66367397f2a5 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -173,7 +173,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.PathSettings"; + return u"com.sun.star.comp.framework.PathSettings"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -183,7 +183,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.util.PathSettings"}; + return {u"com.sun.star.util.PathSettings"_ustr}; } // XInterface @@ -206,109 +206,109 @@ public: * XPathSettings attribute methods */ virtual OUString SAL_CALL getAddin() override - { return getStringProperty("Addin"); } + { return getStringProperty(u"Addin"_ustr); } virtual void SAL_CALL setAddin(const OUString& p1) override - { setStringProperty("Addin", p1); } + { setStringProperty(u"Addin"_ustr, p1); } virtual OUString SAL_CALL getAutoCorrect() override - { return getStringProperty("AutoCorrect"); } + { return getStringProperty(u"AutoCorrect"_ustr); } virtual void SAL_CALL setAutoCorrect(const OUString& p1) override - { setStringProperty("AutoCorrect", p1); } + { setStringProperty(u"AutoCorrect"_ustr, p1); } virtual OUString SAL_CALL getAutoText() override - { return getStringProperty("AutoText"); } + { return getStringProperty(u"AutoText"_ustr); } virtual void SAL_CALL setAutoText(const OUString& p1) override - { setStringProperty("AutoText", p1); } + { setStringProperty(u"AutoText"_ustr, p1); } virtual OUString SAL_CALL getBackup() override - { return getStringProperty("Backup"); } + { return getStringProperty(u"Backup"_ustr); } virtual void SAL_CALL setBackup(const OUString& p1) override - { setStringProperty("Backup", p1); } + { setStringProperty(u"Backup"_ustr, p1); } virtual OUString SAL_CALL getBasic() override - { return getStringProperty("Basic"); } + { return getStringProperty(u"Basic"_ustr); } virtual void SAL_CALL setBasic(const OUString& p1) override - { setStringProperty("Basic", p1); } + { setStringProperty(u"Basic"_ustr, p1); } virtual OUString SAL_CALL getBitmap() override - { return getStringProperty("Bitmap"); } + { return getStringProperty(u"Bitmap"_ustr); } virtual void SAL_CALL setBitmap(const OUString& p1) override - { setStringProperty("Bitmap", p1); } + { setStringProperty(u"Bitmap"_ustr, p1); } virtual OUString SAL_CALL getConfig() override - { return getStringProperty("Config"); } + { return getStringProperty(u"Config"_ustr); } virtual void SAL_CALL setConfig(const OUString& p1) override - { setStringProperty("Config", p1); } + { setStringProperty(u"Config"_ustr, p1); } virtual OUString SAL_CALL getDictionary() override - { return getStringProperty("Dictionary"); } + { return getStringProperty(u"Dictionary"_ustr); } virtual void SAL_CALL setDictionary(const OUString& p1) override - { setStringProperty("Dictionary", p1); } + { setStringProperty(u"Dictionary"_ustr, p1); } virtual OUString SAL_CALL getFavorite() override - { return getStringProperty("Favorite"); } + { return getStringProperty(u"Favorite"_ustr); } virtual void SAL_CALL setFavorite(const OUString& p1) override - { setStringProperty("Favorite", p1); } + { setStringProperty(u"Favorite"_ustr, p1); } virtual OUString SAL_CALL getFilter() override - { return getStringProperty("Filter"); } + { return getStringProperty(u"Filter"_ustr); } virtual void SAL_CALL setFilter(const OUString& p1) override - { setStringProperty("Filter", p1); } + { setStringProperty(u"Filter"_ustr, p1); } virtual OUString SAL_CALL getGallery() override - { return getStringProperty("Gallery"); } + { return getStringProperty(u"Gallery"_ustr); } virtual void SAL_CALL setGallery(const OUString& p1) override - { setStringProperty("Gallery", p1); } + { setStringProperty(u"Gallery"_ustr, p1); } virtual OUString SAL_CALL getGraphic() override - { return getStringProperty("Graphic"); } + { return getStringProperty(u"Graphic"_ustr); } virtual void SAL_CALL setGraphic(const OUString& p1) override - { setStringProperty("Graphic", p1); } + { setStringProperty(u"Graphic"_ustr, p1); } virtual OUString SAL_CALL getHelp() override - { return getStringProperty("Help"); } + { return getStringProperty(u"Help"_ustr); } virtual void SAL_CALL setHelp(const OUString& p1) override - { setStringProperty("Help", p1); } + { setStringProperty(u"Help"_ustr, p1); } virtual OUString SAL_CALL getLinguistic() override - { return getStringProperty("Linguistic"); } + { return getStringProperty(u"Linguistic"_ustr); } virtual void SAL_CALL setLinguistic(const OUString& p1) override - { setStringProperty("Linguistic", p1); } + { setStringProperty(u"Linguistic"_ustr, p1); } virtual OUString SAL_CALL getModule() override - { return getStringProperty("Module"); } + { return getStringProperty(u"Module"_ustr); } virtual void SAL_CALL setModule(const OUString& p1) override - { setStringProperty("Module", p1); } + { setStringProperty(u"Module"_ustr, p1); } virtual OUString SAL_CALL getPalette() override - { return getStringProperty("Palette"); } + { return getStringProperty(u"Palette"_ustr); } virtual void SAL_CALL setPalette(const OUString& p1) override - { setStringProperty("Palette", p1); } + { setStringProperty(u"Palette"_ustr, p1); } virtual OUString SAL_CALL getPlugin() override - { return getStringProperty("Plugin"); } + { return getStringProperty(u"Plugin"_ustr); } virtual void SAL_CALL setPlugin(const OUString& p1) override - { setStringProperty("Plugin", p1); } + { setStringProperty(u"Plugin"_ustr, p1); } virtual OUString SAL_CALL getStorage() override - { return getStringProperty("Storage"); } + { return getStringProperty(u"Storage"_ustr); } virtual void SAL_CALL setStorage(const OUString& p1) override - { setStringProperty("Storage", p1); } + { setStringProperty(u"Storage"_ustr, p1); } virtual OUString SAL_CALL getTemp() override - { return getStringProperty("Temp"); } + { return getStringProperty(u"Temp"_ustr); } virtual void SAL_CALL setTemp(const OUString& p1) override - { setStringProperty("Temp", p1); } + { setStringProperty(u"Temp"_ustr, p1); } virtual OUString SAL_CALL getTemplate() override - { return getStringProperty("Template"); } + { return getStringProperty(u"Template"_ustr); } virtual void SAL_CALL setTemplate(const OUString& p1) override - { setStringProperty("Template", p1); } + { setStringProperty(u"Template"_ustr, p1); } virtual OUString SAL_CALL getUIConfig() override - { return getStringProperty("UIConfig"); } + { return getStringProperty(u"UIConfig"_ustr); } virtual void SAL_CALL setUIConfig(const OUString& p1) override - { setStringProperty("UIConfig", p1); } + { setStringProperty(u"UIConfig"_ustr, p1); } virtual OUString SAL_CALL getUserConfig() override - { return getStringProperty("UserConfig"); } + { return getStringProperty(u"UserConfig"_ustr); } virtual void SAL_CALL setUserConfig(const OUString& p1) override - { setStringProperty("UserConfig", p1); } + { setStringProperty(u"UserConfig"_ustr, p1); } virtual OUString SAL_CALL getUserDictionary() override - { return getStringProperty("UserDictionary"); } + { return getStringProperty(u"UserDictionary"_ustr); } virtual void SAL_CALL setUserDictionary(const OUString& p1) override - { setStringProperty("UserDictionary", p1); } + { setStringProperty(u"UserDictionary"_ustr, p1); } virtual OUString SAL_CALL getWork() override - { return getStringProperty("Work"); } + { return getStringProperty(u"Work"_ustr); } virtual void SAL_CALL setWork(const OUString& p1) override - { setStringProperty("Work", p1); } + { setStringProperty(u"Work"_ustr, p1); } virtual OUString SAL_CALL getBasePathShareLayer() override - { return getStringProperty("UIConfig"); } + { return getStringProperty(u"UIConfig"_ustr); } virtual void SAL_CALL setBasePathShareLayer(const OUString& p1) override - { setStringProperty("UIConfig", p1); } + { setStringProperty(u"UIConfig"_ustr, p1); } virtual OUString SAL_CALL getBasePathUserLayer() override - { return getStringProperty("UserConfig"); } + { return getStringProperty(u"UserConfig"_ustr); } virtual void SAL_CALL setBasePathUserLayer(const OUString& p1) override - { setStringProperty("UserConfig", p1); } + { setStringProperty(u"UserConfig"_ustr, p1); } /** * overrides to resolve inheritance ambiguity @@ -583,7 +583,7 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath) // read internal path list css::uno::Reference< css::container::XNameAccess > xIPath; - xPath->getByName("InternalPaths") >>= xIPath; + xPath->getByName(u"InternalPaths"_ustr) >>= xIPath; aPathVal.lInternalPaths = comphelper::sequenceToContainer<std::vector<OUString>>(xIPath->getElementNames()); // read user defined path list @@ -601,7 +601,7 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath) aPathVal.lUserPaths.erase(aI); // read state props - xPath->getByName("IsSinglePath") >>= aPathVal.bIsSinglePath; + xPath->getByName(u"IsSinglePath"_ustr) >>= aPathVal.bIsSinglePath; // analyze finalized/mandatory states aPathVal.bIsReadonly = false; @@ -1368,7 +1368,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld() { xCfg.set( ::comphelper::ConfigurationHelper::openConfig( m_xContext, - "org.openoffice.Office.Common/Path/Current", + u"org.openoffice.Office.Common/Path/Current"_ustr, ::comphelper::EConfigurationModes::Standard), // not readonly! Sometimes we need write access there !!! css::uno::UNO_QUERY_THROW); @@ -1393,7 +1393,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgNew() { xCfg.set( ::comphelper::ConfigurationHelper::openConfig( m_xContext, - "org.openoffice.Office.Paths/Paths", + u"org.openoffice.Office.Paths/Paths"_ustr, ::comphelper::EConfigurationModes::Standard), css::uno::UNO_QUERY_THROW); diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index a77e7f961ebb..03b0a71df034 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -108,7 +108,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.frame.SessionListener"; + return u"com.sun.star.comp.frame.SessionListener"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -118,7 +118,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.SessionListener"}; + return {u"com.sun.star.frame.SessionListener"_ustr}; } virtual void SAL_CALL disposing(const css::lang::EventObject&) override; @@ -180,7 +180,7 @@ void SessionListener::StoreSession( bool bAsync ) if ( bAsync ) xDispatch->addStatusListener(this, aURL); - Sequence< PropertyValue > args{ PropertyValue("DispatchAsynchron",-1,Any(bAsync), + Sequence< PropertyValue > args{ PropertyValue(u"DispatchAsynchron"_ustr,-1,Any(bAsync), PropertyState_DIRECT_VALUE) }; xDispatch->dispatch(aURL, args); } catch (const css::uno::Exception&) { @@ -208,7 +208,7 @@ void SessionListener::QuitSessionQuietly() aURL.Complete = "vnd.sun.star.autorecovery:/doSessionQuietQuit"; xURLTransformer->parseStrict(aURL); - Sequence< PropertyValue > args{ PropertyValue("DispatchAsynchron",-1,Any(false), + Sequence< PropertyValue > args{ PropertyValue(u"DispatchAsynchron"_ustr,-1,Any(false), PropertyState_DIRECT_VALUE) }; xDispatch->dispatch(aURL, args); } catch (const css::uno::Exception&) { @@ -228,7 +228,7 @@ void SAL_CALL SessionListener::initialize(const Sequence< Any >& args) { SAL_INFO("fwk.session", "SessionListener::initialize"); - OUString aSMgr("com.sun.star.frame.SessionManagerClient"); + OUString aSMgr(u"com.sun.star.frame.SessionManagerClient"_ustr); if ( (args.getLength() == 1) && (args[0] >>= m_bAllowUserInteractionOnQuit) ) ;// do nothing else if (args.hasElements()) diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 02b8ed05f2d1..3d84cb619384 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -139,7 +139,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.PathSubstitution"; + return u"com.sun.star.comp.framework.PathSubstitution"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -149,7 +149,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.util.PathSubstitution"}; + return {u"com.sun.star.util.PathSubstitution"_ustr}; } // XStringSubstitution @@ -243,7 +243,7 @@ OUString SubstitutePathVariables::GetWorkPath() { OUString aWorkPath; css::uno::Reference< css::container::XHierarchicalNameAccess > xPaths(officecfg::Office::Paths::Paths::get(), css::uno::UNO_QUERY_THROW); - if (!(xPaths->getByHierarchicalName("['Work']/WritePath") >>= aWorkPath)) + if (!(xPaths->getByHierarchicalName(u"['Work']/WritePath"_ustr) >>= aWorkPath)) // fallback in case config layer does not return a usable work dir value. aWorkPath = GetWorkVariableValue(); @@ -476,7 +476,7 @@ OUString SubstitutePathVariables::impl_substituteVariable( const OUString& rText // recursion depth reached! if ( bSubstRequired ) { - throw NoSuchElementException( "Endless recursion detected. Cannot substitute variables!", static_cast<cppu::OWeakObject *>(this) ); + throw NoSuchElementException( u"Endless recursion detected. Cannot substitute variables!"_ustr, static_cast<cppu::OWeakObject *>(this) ); } aResult = rText; } @@ -485,7 +485,7 @@ OUString SubstitutePathVariables::impl_substituteVariable( const OUString& rText // variable in text but unknown! if ( bSubstRequired ) { - throw NoSuchElementException( "Unknown variable found!", static_cast<cppu::OWeakObject *>(this) ); + throw NoSuchElementException( u"Unknown variable found!"_ustr, static_cast<cppu::OWeakObject *>(this) ); } aResult = aWorkText; } @@ -590,7 +590,7 @@ OUString const & SubstitutePathVariables::impl_getSubstituteVariableValue( const // Fixed/Predefined variable if ( pNTOIIter == m_aPreDefVarMap.end() ) { - throw NoSuchElementException("Unknown variable!", static_cast<cppu::OWeakObject *>(this)); + throw NoSuchElementException(u"Unknown variable!"_ustr, static_cast<cppu::OWeakObject *>(this)); } PreDefVariable nIndex = pNTOIIter->second; return m_aPreDefVars.m_FixedVar[static_cast<sal_Int32>(nIndex)]; diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx index 7a60b6275a64..2a53c0b0031d 100644 --- a/framework/source/services/taskcreatorsrv.cxx +++ b/framework/source/services/taskcreatorsrv.cxx @@ -66,7 +66,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.TaskCreator"; + return u"com.sun.star.comp.framework.TaskCreator"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -76,7 +76,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.TaskCreator"}; + return {u"com.sun.star.frame.TaskCreator"_ustr}; } // XSingleServiceFactory diff --git a/framework/source/services/uriabbreviation.cxx b/framework/source/services/uriabbreviation.cxx index 6faa0c8e3d55..ba174d78ef79 100644 --- a/framework/source/services/uriabbreviation.cxx +++ b/framework/source/services/uriabbreviation.cxx @@ -32,7 +32,7 @@ namespace framework OUString SAL_CALL UriAbbreviation::getImplementationName() { - return "com.sun.star.comp.framework.UriAbbreviation"; + return u"com.sun.star.comp.framework.UriAbbreviation"_ustr; } sal_Bool SAL_CALL UriAbbreviation::supportsService( const OUString& sServiceName ) @@ -42,7 +42,7 @@ sal_Bool SAL_CALL UriAbbreviation::supportsService( const OUString& sServiceName css::uno::Sequence< OUString > SAL_CALL UriAbbreviation::getSupportedServiceNames() { - return { "com.sun.star.util.UriAbbreviation" }; + return { u"com.sun.star.util.UriAbbreviation"_ustr }; } UriAbbreviation::UriAbbreviation(css::uno::Reference< css::uno::XComponentContext > const & ) diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx index 84e44e422de4..f0468bab561d 100644 --- a/framework/source/services/urltransformer.cxx +++ b/framework/source/services/urltransformer.cxx @@ -36,7 +36,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.URLTransformer"; + return u"com.sun.star.comp.framework.URLTransformer"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -46,7 +46,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.util.URLTransformer"}; + return {u"com.sun.star.util.URLTransformer"_ustr}; } virtual sal_Bool SAL_CALL parseStrict( css::util::URL& aURL ) override; diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx index 0883cc8af197..41d4861390b8 100644 --- a/framework/source/uiconfiguration/globalsettings.cxx +++ b/framework/source/uiconfiguration/globalsettings.cxx @@ -82,10 +82,10 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper< GlobalSettings_Access::GlobalSettings_Access( css::uno::Reference< css::uno::XComponentContext > xContext ) : m_bDisposed( false ), m_bConfigRead( false ), - m_aNodeRefStates( "States" ), - m_aPropStatesEnabled( "StatesEnabled" ), - m_aPropLocked( "Locked" ), - m_aPropDocked( "Docked" ), + m_aNodeRefStates( u"States"_ustr ), + m_aPropStatesEnabled( u"StatesEnabled"_ustr ), + m_aPropLocked( u"Locked"_ustr ), + m_aPropDocked( u"Docked"_ustr ), m_xContext(std::move( xContext )) { } @@ -200,7 +200,7 @@ void GlobalSettings_Access::impl_initConfigAccess() uno::Sequence<uno::Any> aArgs(comphelper::InitAnyPropertySequence( { - {"nodepath", uno::Any(OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars"))} + {"nodepath", uno::Any(u"/org.openoffice.Office.UI.GlobalSettings/Toolbars"_ustr)} })); m_xConfigAccess.set(xConfigProvider->createInstanceWithArguments( SERVICENAME_CFGREADACCESS, aArgs ), diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index a387fa011586..43fa3683f91f 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -479,7 +479,7 @@ CmdImageList* ImageManagerImpl::implts_getDefaultImageList() ImageManagerImpl::ImageManagerImpl( uno::Reference< uno::XComponentContext > xContext, ::cppu::OWeakObject* pOwner, bool _bUseGlobal ) : m_xContext(std::move( xContext )) , m_pOwner(pOwner) - , m_aResourceString( "private:resource/images/moduleimages" ) + , m_aResourceString( u"private:resource/images/moduleimages"_ustr ) , m_bUseGlobal(_bUseGlobal) , m_bReadOnly( true ) , m_bInitialized( false ) @@ -583,7 +583,7 @@ void ImageManagerImpl::initialize( const Sequence< Any >& aArguments ) if ( xPropSet.is() ) { tools::Long nOpenMode = 0; - if ( xPropSet->getPropertyValue("OpenMode") >>= nOpenMode ) + if ( xPropSet->getPropertyValue(u"OpenMode"_ustr) >>= nOpenMode ) m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); } } diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index ef48cd4c17b8..53ef756d9e40 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -58,7 +58,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier"; + return u"com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -68,7 +68,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.ModuleUIConfigurationManagerSupplier"}; + return {u"com.sun.star.ui.ModuleUIConfigurationManagerSupplier"_ustr}; } // XModuleUIConfigurationManagerSupplier diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 4e3585c51341..66cc6a3c2d52 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -92,7 +92,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ModuleUIConfigurationManager"; + return u"com.sun.star.comp.framework.ModuleUIConfigurationManager"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -102,7 +102,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.ModuleUIConfigurationManager"}; + return {u"com.sun.star.ui.ModuleUIConfigurationManager"_ustr}; } // XComponent @@ -283,7 +283,7 @@ void ModuleUIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIEleme UIElementDataHashMap& rUserElements = m_aUIElements[LAYER_USERDEFINED][nElementType].aElementsHashMap; - OUString aCustomUrlPrefix( "custom_" ); + OUString aCustomUrlPrefix( u"custom_"_ustr ); for (auto const& userElement : rUserElements) { sal_Int32 nIndex = userElement.second.aResourceURL.indexOf( aCustomUrlPrefix, RESOURCEURL_PREFIX.size() ); @@ -831,8 +831,8 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager( : m_bReadOnly( true ) , m_bModified( false ) , m_bDisposed( false ) - , m_aXMLPostfix( ".xml" ) - , m_aPropUIName( "UIName" ) + , m_aXMLPostfix( u".xml"_ustr ) + , m_aPropUIName( u"UIName"_ustr ) , m_xContext( xContext ) { // Make sure we have a default initialized entry for every layer and user interface element type! @@ -849,8 +849,8 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager( else { ::comphelper::SequenceAsHashMap lArgs(aArguments); - aModuleShortName = lArgs.getUnpackedValueOrDefault("ModuleShortName", OUString()); - m_aModuleIdentifier = lArgs.getUnpackedValueOrDefault("ModuleIdentifier", OUString()); + aModuleShortName = lArgs.getUnpackedValueOrDefault(u"ModuleShortName"_ustr, OUString()); + m_aModuleIdentifier = lArgs.getUnpackedValueOrDefault(u"ModuleIdentifier"_ustr, OUString()); } for ( int i = 1; i < css::ui::UIElementType::COUNT; i++ ) @@ -886,7 +886,7 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager( if ( xPropSet.is() ) { tools::Long nOpenMode = 0; - Any a = xPropSet->getPropertyValue("OpenMode"); + Any a = xPropSet->getPropertyValue(u"OpenMode"_ustr); if ( a >>= nOpenMode ) m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); } @@ -1034,7 +1034,7 @@ void SAL_CALL ModuleUIConfigurationManager::reset() { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetRuntimeException( - "ModuleUIConfigurationManager::reset exception", + u"ModuleUIConfigurationManager::reset exception"_ustr, css::uno::Reference<css::uno::XInterface>(*this), anyEx); } } @@ -1090,7 +1090,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL ModuleUIConfigurationManager::get for (auto const& elem : aUIElementInfoCollection) { aElementInfoSeq[n++] = Sequence<PropertyValue> { - comphelper::makePropertyValue("ResourceURL", elem.second.aResourceURL), + comphelper::makePropertyValue(u"ResourceURL"_ustr, elem.second.aResourceURL), comphelper::makePropertyValue(m_aPropUIName, elem.second.aUIName) }; } diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index 1ff492242e6e..d3c2c565631e 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -100,7 +100,7 @@ ConfigurationAccess_UICategory::ConfigurationAccess_UICategory( std::u16string_v // Create configuration hierarchical access name m_aConfigCategoryAccess( OUString::Concat("/org.openoffice.Office.UI.") + aModuleName + "/Commands/Categories"), - m_aPropUIName( "Name" ), + m_aPropUIName( u"Name"_ustr ), m_xGenericUICategories( rGenericUICategories ), m_xConfigProvider(theDefaultProvider::get( rxContext )), m_bConfigAccessInitialized( false ), @@ -293,7 +293,7 @@ void ConfigurationAccess_UICategory::initializeConfigAccess() })); m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArgs ),UNO_QUERY ); + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs ),UNO_QUERY ); if ( m_xConfigAccess.is() ) { // Add as container listener @@ -346,7 +346,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.UICategoryDescription"; + return u"com.sun.star.comp.framework.UICategoryDescription"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -356,7 +356,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.UICategoryDescription"}; + return {u"com.sun.star.ui.UICategoryDescription"_ustr}; } }; @@ -367,11 +367,11 @@ UICategoryDescription::UICategoryDescription( const Reference< XComponentContext SvtSysLocale aSysLocale; const LanguageTag& rCurrentLanguage = aSysLocale.GetUILanguageTag(); Reference< XNameAccess > xEmpty; - OUString aGenericCategories( "GenericCategories" ); + OUString aGenericCategories( u"GenericCategories"_ustr ); m_xGenericUICommands[rCurrentLanguage] = new ConfigurationAccess_UICategory( aGenericCategories, xEmpty, rxContext ); // insert generic categories mappings - m_aModuleToCommandFileMap.emplace( OUString("generic"), aGenericCategories ); + m_aModuleToCommandFileMap.emplace( u"generic"_ustr, aGenericCategories ); auto& rMap = m_aUICommandsHashMap[rCurrentLanguage]; UICommandsHashMap::iterator pCatIter = rMap.find( aGenericCategories ); diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index c1a24e598615..91b4624595ec 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -78,7 +78,7 @@ class UIConfigurationManager : public ::cppu::WeakImplHelper< public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.UIConfigurationManager"; + return u"com.sun.star.comp.framework.UIConfigurationManager"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -88,7 +88,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.UIConfigurationManager"}; + return {u"com.sun.star.ui.UIConfigurationManager"_ustr}; } explicit UIConfigurationManager( css::uno::Reference< css::uno::XComponentContext > xContext ); @@ -675,7 +675,7 @@ UIConfigurationManager::UIConfigurationManager( css::uno::Reference< css::uno::X m_bReadOnly( true ) , m_bModified( false ) , m_bDisposed( false ) - , m_aPropUIName( "UIName" ) + , m_aPropUIName( u"UIName"_ustr ) , m_xContext(std::move( xContext )) { // Make sure we have a default initialized entry for every layer and user interface element type! @@ -870,7 +870,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL UIConfigurationManager::getUIElem { aElementInfoSeq[n++] = { - comphelper::makePropertyValue("ResourceURL", elem.second.aResourceURL), + comphelper::makePropertyValue(u"ResourceURL"_ustr, elem.second.aResourceURL), comphelper::makePropertyValue(m_aPropUIName, elem.second.aUIName) }; } @@ -1203,7 +1203,7 @@ void SAL_CALL UIConfigurationManager::setStorage( const Reference< XStorage >& S try { tools::Long nOpenMode = 0; - Any a = xPropSet->getPropertyValue("OpenMode"); + Any a = xPropSet->getPropertyValue(u"OpenMode"_ustr); if ( a >>= nOpenMode ) m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); } diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 504ef4c97808..6049fdec814b 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1117,7 +1117,7 @@ void ConfigurationAccess_WindowState::impl_putPropertiesFromStruct( const Window { sal_Int32 i( 0 ); sal_Int32 nCount( m_aPropArray.size() ); - OUString aDelim( "," ); + OUString aDelim( u","_ustr ); for ( i = 0; i < nCount; i++ ) { @@ -1204,7 +1204,7 @@ void ConfigurationAccess_WindowState::impl_initializeConfigAccess() {"nodepath", Any(m_aConfigWindowAccess)} })); m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", aArgs ), UNO_QUERY ); + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArgs ), UNO_QUERY ); if ( m_xConfigAccess.is() ) { // Add as container listener @@ -1235,7 +1235,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.WindowStateConfiguration"; + return u"com.sun.star.comp.framework.WindowStateConfiguration"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -1245,7 +1245,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.WindowStateConfiguration"}; + return {u"com.sun.star.ui.WindowStateConfiguration"_ustr}; } // XNameAccess diff --git a/framework/source/uielement/FixedImageToolbarController.cxx b/framework/source/uielement/FixedImageToolbarController.cxx index 1ec52a672287..11064db044fa 100644 --- a/framework/source/uielement/FixedImageToolbarController.cxx +++ b/framework/source/uielement/FixedImageToolbarController.cxx @@ -46,8 +46,8 @@ private: }; FixedImageControl::FixedImageControl(vcl::Window* pParent, const OUString& rCommand) - : InterimItemWindow(pParent, "svt/ui/fixedimagecontrol.ui", "FixedImageControl") - , m_xWidget(m_xBuilder->weld_image("image")) + : InterimItemWindow(pParent, u"svt/ui/fixedimagecontrol.ui"_ustr, u"FixedImageControl"_ustr) + , m_xWidget(m_xBuilder->weld_image(u"image"_ustr)) { InitControlBase(m_xWidget.get()); diff --git a/framework/source/uielement/FixedTextToolbarController.cxx b/framework/source/uielement/FixedTextToolbarController.cxx index 44cf712c72e4..9e97aba09198 100644 --- a/framework/source/uielement/FixedTextToolbarController.cxx +++ b/framework/source/uielement/FixedTextToolbarController.cxx @@ -46,8 +46,8 @@ private: }; FixedTextControl::FixedTextControl(vcl::Window* pParent) - : InterimItemWindow(pParent, "svt/ui/fixedtextcontrol.ui", "FixedTextControl") - , m_xWidget(m_xBuilder->weld_label("label")) + : InterimItemWindow(pParent, u"svt/ui/fixedtextcontrol.ui"_ustr, u"FixedTextControl"_ustr) + , m_xWidget(m_xBuilder->weld_label(u"label"_ustr)) { InitControlBase(m_xWidget.get()); @@ -90,8 +90,8 @@ Sequence<PropertyValue> FixedTextToolbarController::getExecuteArgs(sal_Int16 Key const OUString aSelectedText = m_pFixedTextControl->get_label(); // Add key modifier to argument list - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("KeyModifier", KeyModifier), - comphelper::makePropertyValue("Text", aSelectedText) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier), + comphelper::makePropertyValue(u"Text"_ustr, aSelectedText) }; return aArgs; } diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx index d100ee17113e..47b31bf99e8a 100644 --- a/framework/source/uielement/buttontoolbarcontroller.cxx +++ b/framework/source/uielement/buttontoolbarcontroller.cxx @@ -224,7 +224,7 @@ void SAL_CALL ButtonToolbarController::execute( sal_Int16 KeyModifier ) try { // Provide key modifier information to dispatch function - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("KeyModifier", KeyModifier) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier) }; xDispatch->dispatch( aTargetURL, aArgs ); } diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 68598a2a4ef6..cc7d43e5fc08 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -68,8 +68,8 @@ private: }; ComboBoxControl::ComboBoxControl(vcl::Window* pParent, ComboboxToolbarController* pComboboxToolbarController) - : InterimItemWindow(pParent, "svt/ui/combocontrol.ui", "ComboControl") - , m_xWidget(m_xBuilder->weld_combo_box("combobox")) + : InterimItemWindow(pParent, u"svt/ui/combocontrol.ui"_ustr, u"ComboControl"_ustr) + , m_xWidget(m_xBuilder->weld_combo_box(u"combobox"_ustr)) , m_pComboboxToolbarController(pComboboxToolbarController) { InitControlBase(m_xWidget.get()); @@ -180,8 +180,8 @@ Sequence<PropertyValue> ComboboxToolbarController::getExecuteArgs(sal_Int16 KeyM OUString aSelectedText = m_pComboBox->get_active_text(); // Add key modifier to argument list - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("KeyModifier", KeyModifier), - comphelper::makePropertyValue("Text", aSelectedText) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier), + comphelper::makePropertyValue(u"Text"_ustr, aSelectedText) }; return aArgs; } @@ -247,8 +247,8 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control m_pComboBox->append_text(rName); // send notification - uno::Sequence< beans::NamedValue > aInfo { { "List", css::uno::Any(aList) } }; - addNotifyInfo( "ListChanged", + uno::Sequence< beans::NamedValue > aInfo { { u"List"_ustr, css::uno::Any(aList) } }; + addNotifyInfo( u"ListChanged"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 5a8a84e55d25..23505af1fd0d 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -78,7 +78,7 @@ void SAL_CALL ComplexToolbarController::dispose() Sequence<PropertyValue> ComplexToolbarController::getExecuteArgs(sal_Int16 KeyModifier) const { // Add key modifier to argument list - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("KeyModifier", KeyModifier) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier) }; return aArgs; } @@ -297,7 +297,7 @@ void ComplexToolbarController::notifyFocusGet() { // send focus get notification uno::Sequence< beans::NamedValue > aInfo; - addNotifyInfo( "FocusSet", + addNotifyInfo( u"FocusSet"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); } @@ -306,7 +306,7 @@ void ComplexToolbarController::notifyFocusLost() { // send focus lost notification uno::Sequence< beans::NamedValue > aInfo; - addNotifyInfo( "FocusLost", + addNotifyInfo( u"FocusLost"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); } @@ -314,8 +314,8 @@ void ComplexToolbarController::notifyFocusLost() void ComplexToolbarController::notifyTextChanged( const OUString& aText ) { // send text changed notification - uno::Sequence< beans::NamedValue > aInfo { { "Text", css::uno::Any(aText) } }; - addNotifyInfo( "TextChanged", + uno::Sequence< beans::NamedValue > aInfo { { u"Text"_ustr, css::uno::Any(aText) } }; + addNotifyInfo( u"TextChanged"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); } diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index a4d69afee1fb..aaa86c78acfe 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -128,7 +128,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ControlMenuController"; + return u"com.sun.star.comp.framework.ControlMenuController"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -138,7 +138,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.PopupMenuController"}; + return {u"com.sun.star.frame.PopupMenuController"_ustr}; } // XPopupMenuController diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index 2630ecb534d3..3537bcc7c9e5 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -66,8 +66,8 @@ private: }; ListBoxControl::ListBoxControl(vcl::Window* pParent, DropdownToolbarController* pListBoxListener) - : InterimItemWindow(pParent, "svt/ui/listcontrol.ui", "ListControl") - , m_xWidget(m_xBuilder->weld_combo_box("listbox")) + : InterimItemWindow(pParent, u"svt/ui/listcontrol.ui"_ustr, u"ListControl"_ustr) + , m_xWidget(m_xBuilder->weld_combo_box(u"listbox"_ustr)) , m_pListBoxListener( pListBoxListener ) { InitControlBase(m_xWidget.get()); @@ -156,8 +156,8 @@ Sequence<PropertyValue> DropdownToolbarController::getExecuteArgs(sal_Int16 KeyM OUString aSelectedText = m_pListBoxControl->get_active_text(); // Add key modifier to argument list - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("KeyModifier", KeyModifier), - comphelper::makePropertyValue("Text", aSelectedText) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier), + comphelper::makePropertyValue(u"Text"_ustr, aSelectedText) }; return aArgs; } @@ -195,8 +195,8 @@ void DropdownToolbarController::executeControlCommand( const css::frame::Control m_pListBoxControl->set_active(0); // send notification - uno::Sequence< beans::NamedValue > aInfo { { "List", css::uno::Any(aList) } }; - addNotifyInfo( "ListChanged", + uno::Sequence< beans::NamedValue > aInfo { { u"List"_ustr, css::uno::Any(aList) } }; + addNotifyInfo( u"ListChanged"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index 9bd65d5a0948..46bf56c2ff22 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -62,8 +62,8 @@ private: }; EditControl::EditControl(vcl::Window* pParent, EditToolbarController* pEditToolbarController) - : InterimItemWindow(pParent, "svt/ui/editcontrol.ui", "EditControl") - , m_xWidget(m_xBuilder->weld_entry("entry")) + : InterimItemWindow(pParent, u"svt/ui/editcontrol.ui"_ustr, u"EditControl"_ustr) + , m_xWidget(m_xBuilder->weld_entry(u"entry"_ustr)) , m_pEditToolbarController(pEditToolbarController) { OUString sEmpty; @@ -163,8 +163,8 @@ Sequence<PropertyValue> EditToolbarController::getExecuteArgs(sal_Int16 KeyModif OUString aSelectedText = m_pEditControl->get_text(); // Add key modifier to argument list - Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("KeyModifier", KeyModifier), - comphelper::makePropertyValue("Text", aSelectedText) }; + Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier), + comphelper::makePropertyValue(u"Text"_ustr, aSelectedText) }; return aArgs; } diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index 6fc2398b9850..9d4b836f53be 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -55,7 +55,7 @@ namespace framework OUString SAL_CALL FontMenuController::getImplementationName() { - return "com.sun.star.comp.framework.FontMenuController"; + return u"com.sun.star.comp.framework.FontMenuController"_ustr; } sal_Bool SAL_CALL FontMenuController::supportsService( const OUString& sServiceName ) diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 10234d61cba1..297dfb9fd2ca 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -53,7 +53,7 @@ namespace framework OUString SAL_CALL FontSizeMenuController::getImplementationName() { - return "com.sun.star.comp.framework.FontSizeMenuController"; + return u"com.sun.star.comp.framework.FontSizeMenuController"_ustr; } sal_Bool SAL_CALL FontSizeMenuController::supportsService( const OUString& sServiceName ) diff --git a/framework/source/uielement/footermenucontroller.cxx b/framework/source/uielement/footermenucontroller.cxx index fdd2e17495f8..5d6af0046510 100644 --- a/framework/source/uielement/footermenucontroller.cxx +++ b/framework/source/uielement/footermenucontroller.cxx @@ -35,7 +35,7 @@ namespace framework OUString SAL_CALL FooterMenuController::getImplementationName() { - return "com.sun.star.comp.framework.FooterMenuController"; + return u"com.sun.star.comp.framework.FooterMenuController"_ustr; } sal_Bool SAL_CALL FooterMenuController::supportsService( const OUString& sServiceName ) diff --git a/framework/source/uielement/genericstatusbarcontroller.cxx b/framework/source/uielement/genericstatusbarcontroller.cxx index 4ee554e43d9c..fefcbc381f16 100644 --- a/framework/source/uielement/genericstatusbarcontroller.cxx +++ b/framework/source/uielement/genericstatusbarcontroller.cxx @@ -129,7 +129,7 @@ void SAL_CALL GenericStatusbarController::paint( if ( xGraphicProps.is() && m_xGraphic->getType() != graphic::GraphicType::EMPTY ) { awt::Size aGraphicSize; - xGraphicProps->getPropertyValue( "SizePixel" ) >>= aGraphicSize; + xGraphicProps->getPropertyValue( u"SizePixel"_ustr ) >>= aGraphicSize; OSL_ENSURE( aGraphicSize.Height > 0 && aGraphicSize.Width > 0, "Empty status bar graphic!" ); sal_Int32 nOffset = m_xStatusbarItem->getOffset( ); diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 204cbc7cb4d3..c1ba51d78c13 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -169,7 +169,7 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier ) pExecuteInfo->xDispatch = xDispatch; pExecuteInfo->aTargetURL = aTargetURL; // Add key modifier to argument list - pExecuteInfo->aArgs = { comphelper::makePropertyValue("KeyModifier", KeyModifier) }; + pExecuteInfo->aArgs = { comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier) }; Application::PostUserEvent( LINK(nullptr, GenericToolbarController , ExecuteHdl_Impl), pExecuteInfo ); } @@ -339,7 +339,7 @@ ImageOrientationController::ImageOrientationController(const Reference<XComponen const Reference<XFrame>& rFrame, const Reference<css::awt::XWindow>& rParentWindow, const OUString& rModuleName) - : ToolboxController(rContext, rFrame, ".uno:ImageOrientation") + : ToolboxController(rContext, rFrame, u".uno:ImageOrientation"_ustr) , m_nRotationAngle(0_deg10) , m_bMirrored(false) { diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index 1eb34720d60a..6adc07f0c07b 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -53,7 +53,7 @@ namespace framework OUString SAL_CALL HeaderMenuController::getImplementationName() { - return "com.sun.star.comp.framework.HeaderMenuController"; + return u"com.sun.star.comp.framework.HeaderMenuController"_ustr; } sal_Bool SAL_CALL HeaderMenuController::supportsService( const OUString& sServiceName ) @@ -89,8 +89,8 @@ void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >& Reference< XNameAccess > xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies(); - OUString aCmd( ".uno:InsertPageHeader" ); - OUString aHeaderFooterIsOnStr( "HeaderIsOn" ); + OUString aCmd( u".uno:InsertPageHeader"_ustr ); + OUString aHeaderFooterIsOnStr( u"HeaderIsOn"_ustr ); if ( m_bFooter ) { aCmd = ".uno:InsertPageFooter"; @@ -102,7 +102,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >& try { Reference< XNameContainer > xNameContainer; - if ( xStyleFamilies->getByName("PageStyles") >>= xNameContainer ) + if ( xStyleFamilies->getByName(u"PageStyles"_ustr) >>= xNameContainer ) { Sequence< OUString > aSeqNames = xNameContainer->getElementNames(); diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index 87f7407685b6..206942d8d8de 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -101,8 +101,8 @@ void ImageButtonToolbarController::executeControlCommand( const css::frame::Cont m_xToolbar->SetItemImage( m_nID, aImage ); // send notification - uno::Sequence< beans::NamedValue > aInfo { { "URL", css::uno::Any(aURL) } }; - addNotifyInfo( "ImageChanged", + uno::Sequence< beans::NamedValue > aInfo { { u"URL"_ustr, css::uno::Any(aURL) } }; + addNotifyInfo( u"ImageChanged"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); break; diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index cd1700518f3b..16b61ed27d88 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -56,7 +56,7 @@ namespace framework OUString SAL_CALL LanguageSelectionMenuController::getImplementationName() { - return "com.sun.star.comp.framework.LanguageSelectionMenuController"; + return u"com.sun.star.comp.framework.LanguageSelectionMenuController"_ustr; } sal_Bool SAL_CALL LanguageSelectionMenuController::supportsService( const OUString& sServiceName ) diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 3ae0799041e8..03ceaa3d47d8 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -118,8 +118,8 @@ void LangSelectionStatusbarController::LangMenu( return; const Reference<XServiceInfo> xService(m_xFrame->getController()->getModel(), UNO_QUERY); - bool bCalc = xService.is() && xService->supportsService("com.sun.star.sheet.SpreadsheetDocument"); - bool bWriter = xService.is() && xService->supportsService("com.sun.star.text.GenericTextDocument"); + bool bCalc = xService.is() && xService->supportsService(u"com.sun.star.sheet.SpreadsheetDocument"_ustr); + bool bWriter = xService.is() && xService->supportsService(u"com.sun.star.text.GenericTextDocument"_ustr); //add context menu Reference< awt::XPopupMenu > xPopupMenu( awt::PopupMenu::create( m_xContext ) ); //sub menu that contains all items except the last two items: Separator + Set Language for Paragraph diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 77f077204373..9899b9fa6ac2 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -41,7 +41,7 @@ namespace framework OUString SAL_CALL MacrosMenuController::getImplementationName() { - return "com.sun.star.comp.framework.MacrosMenuController"; + return u"com.sun.star.comp.framework.MacrosMenuController"_ustr; } sal_Bool SAL_CALL MacrosMenuController::supportsService( const OUString& sServiceName ) @@ -77,7 +77,7 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > cons assert(rPopupMenu->getItemCount() == 0); // insert basic - OUString aCommand(".uno:MacroDialog"); + OUString aCommand(u".uno:MacroDialog"_ustr); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommand, m_aModuleName); OUString aDisplayName = vcl::CommandInfoProvider::GetMenuLabelForCommand(aProperties); rPopupMenu->insertItem(2, aDisplayName, 0, 0); @@ -121,7 +121,7 @@ void MacrosMenuController::addScriptItems(const Reference<css::awt::XPopupMenu>& static constexpr OUString providerKey(u"com.sun.star.script.provider.ScriptProviderFor"_ustr); sal_uInt16 itemId = startItemId; Reference< XContentEnumerationAccess > xEnumAccess( m_xContext->getServiceManager(), UNO_QUERY_THROW ); - Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( "com.sun.star.script.provider.LanguageScriptProvider" ); + Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( u"com.sun.star.script.provider.LanguageScriptProvider"_ustr ); sal_Int16 nPos = rPopupMenu->getItemCount(); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 95e17053d3fb..946aa636e8f3 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -816,7 +816,7 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu, bool ) if ( pMenu->GetUserValue( nCurItemId ) ) { // addon menu item selected - aArgs = { comphelper::makePropertyValue("Referer", OUString("private:user")) }; + aArgs = { comphelper::makePropertyValue(u"Referer"_ustr, u"private:user"_ustr) }; } xDispatch = pMenuItemHandler->xMenuItemDispatch; @@ -1004,7 +1004,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if (!pMenu->GetHelpCommand(nItemId).isEmpty()) { aModuleIdentifier = pMenu->GetHelpCommand( nItemId ); - pMenu->SetHelpCommand( nItemId, "" ); + pMenu->SetHelpCommand( nItemId, u""_ustr ); } // Retrieve possible attributes struct @@ -1047,7 +1047,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF pPopup->InsertItem( ITEMID_ADDONLIST, OUString() ); pPopup->SetPopupMenu( ITEMID_ADDONLIST, pSubMenu ); - pPopup->SetItemCommand( ITEMID_ADDONLIST, ".uno:Addons" ); + pPopup->SetItemCommand( ITEMID_ADDONLIST, u".uno:Addons"_ustr ); } else pSubMenu.disposeAndClear(); @@ -1519,7 +1519,7 @@ void MenuBarManager::GetPopupController( PopupControllerCache& rPopupController if (( nSchemePart > 0 ) && ( aMenuURL.getLength() > ( nSchemePart+1 ))) { - OUString aMainURL( "vnd.sun.star.popup:" ); + OUString aMainURL( u"vnd.sun.star.popup:"_ustr ); sal_Int32 nQueryPart = aMenuURL.indexOf( '?', nSchemePart ); if ( nQueryPart > 0 ) aMainURL += aMenuURL.subView( nSchemePart, nQueryPart-nSchemePart ); diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index eba370c7a6f1..0e08afd22ba3 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -59,7 +59,7 @@ namespace framework OUString SAL_CALL NewMenuController::getImplementationName() { - return "com.sun.star.comp.framework.NewMenuController"; + return u"com.sun.star.comp.framework.NewMenuController"_ustr; } sal_Bool SAL_CALL NewMenuController::supportsService( const OUString& sServiceName ) @@ -271,7 +271,7 @@ NewMenuController::NewMenuController( const css::uno::Reference< css::uno::XComp m_bNewMenu( false ), m_bModuleIdentified( false ), m_bAcceleratorCfg( false ), - m_aTargetFrame( "_default" ), + m_aTargetFrame( u"_default"_ustr ), m_xContext( xContext ) { } @@ -383,8 +383,8 @@ void SAL_CALL NewMenuController::itemSelected( const css::awt::MenuEvent& rEvent aTargetFrame = pAttributes->aTargetFrame; } - Sequence< PropertyValue > aArgsList{ comphelper::makePropertyValue("Referer", - OUString( "private:user" )) }; + Sequence< PropertyValue > aArgsList{ comphelper::makePropertyValue(u"Referer"_ustr, + u"private:user"_ustr) }; dispatchCommand( aURL, aArgsList, aTargetFrame ); } diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index d61036753434..3b795729e606 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -45,7 +45,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ObjectMenuController"; + return u"com.sun.star.comp.framework.ObjectMenuController"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -55,7 +55,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.PopupMenuController"}; + return {u"com.sun.star.frame.PopupMenuController"_ustr}; } // XStatusListener diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index b17e8a6bfc60..9c3dabd0067b 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -240,9 +240,9 @@ void PopupMenuToolbarController::createPopupMenuController() else { css::uno::Sequence<css::uno::Any> aArgs { - css::uno::Any(comphelper::makePropertyValue("Frame", m_xFrame)), - css::uno::Any(comphelper::makePropertyValue("ModuleIdentifier", m_sModuleName)), - css::uno::Any(comphelper::makePropertyValue("InToolbar", true)) + css::uno::Any(comphelper::makePropertyValue(u"Frame"_ustr, m_xFrame)), + css::uno::Any(comphelper::makePropertyValue(u"ModuleIdentifier"_ustr, m_sModuleName)), + css::uno::Any(comphelper::makePropertyValue(u"InToolbar"_ustr, true)) }; try @@ -253,10 +253,10 @@ void PopupMenuToolbarController::createPopupMenuController() { sal_Int32 nAppendIndex = aArgs.getLength(); aArgs.realloc(nAppendIndex + 1); - aArgs.getArray()[nAppendIndex] <<= comphelper::makePropertyValue("ResourceURL", m_aPopupCommand); + aArgs.getArray()[nAppendIndex] <<= comphelper::makePropertyValue(u"ResourceURL"_ustr, m_aPopupCommand); m_xPopupMenuController.set( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.comp.framework.ResourceMenuController", aArgs, m_xContext), css::uno::UNO_QUERY_THROW ); + u"com.sun.star.comp.framework.ResourceMenuController"_ustr, aArgs, m_xContext), css::uno::UNO_QUERY_THROW ); } else { @@ -323,7 +323,7 @@ GenericPopupToolbarController::GenericPopupToolbarController( OUString GenericPopupToolbarController::getImplementationName() { - return "com.sun.star.comp.framework.GenericPopupToolbarController"; + return u"com.sun.star.comp.framework.GenericPopupToolbarController"_ustr; } sal_Bool GenericPopupToolbarController::supportsService(OUString const & rServiceName) @@ -333,7 +333,7 @@ sal_Bool GenericPopupToolbarController::supportsService(OUString const & rServic css::uno::Sequence<OUString> GenericPopupToolbarController::getSupportedServiceNames() { - return {"com.sun.star.frame.ToolbarController"}; + return {u"com.sun.star.frame.ToolbarController"_ustr}; } void GenericPopupToolbarController::initialize( const css::uno::Sequence< css::uno::Any >& rxArgs ) @@ -511,7 +511,7 @@ void SaveToolbarController::updateImage() if ( m_bReadOnly ) { - aImage = vcl::CommandInfoProvider::GetImageForCommand(".uno:SaveAs", m_xFrame, eImageType); + aImage = vcl::CommandInfoProvider::GetImageForCommand(u".uno:SaveAs"_ustr, m_xFrame, eImageType); } else if ( m_bModified ) { @@ -541,7 +541,7 @@ void SaveToolbarController::statusChanged( const css::frame::FeatureStateEvent& m_bReadOnly = m_xStorable.is() && m_xStorable->isReadonly(); if ( bLastReadOnly != m_bReadOnly ) { - OUString sCommand = m_bReadOnly ? OUString( ".uno:SaveAs" ) : m_aCommandURL; + OUString sCommand = m_bReadOnly ? u".uno:SaveAs"_ustr : m_aCommandURL; auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sCommand, vcl::CommandInfoProvider::GetModuleIdentifier(m_xFrame)); pToolBox->SetQuickHelpText( nId, @@ -587,7 +587,7 @@ void SaveToolbarController::dispose() OUString SaveToolbarController::getImplementationName() { - return "com.sun.star.comp.framework.SaveToolbarController"; + return u"com.sun.star.comp.framework.SaveToolbarController"_ustr; } sal_Bool SaveToolbarController::supportsService( OUString const & rServiceName ) @@ -597,7 +597,7 @@ sal_Bool SaveToolbarController::supportsService( OUString const & rServiceName ) css::uno::Sequence< OUString > SaveToolbarController::getSupportedServiceNames() { - return {"com.sun.star.frame.ToolbarController"}; + return {u"com.sun.star.frame.ToolbarController"_ustr}; } class NewToolbarController : public cppu::ImplInheritanceHelper<PopupMenuToolbarController, css::frame::XSubToolbarController> @@ -639,7 +639,7 @@ NewToolbarController::NewToolbarController( OUString NewToolbarController::getImplementationName() { - return "org.apache.openoffice.comp.framework.NewToolbarController"; + return u"org.apache.openoffice.comp.framework.NewToolbarController"_ustr; } sal_Bool NewToolbarController::supportsService(OUString const & rServiceName) @@ -649,7 +649,7 @@ sal_Bool NewToolbarController::supportsService(OUString const & rServiceName) css::uno::Sequence<OUString> NewToolbarController::getSupportedServiceNames() { - return {"com.sun.star.frame.ToolbarController"}; + return {u"com.sun.star.frame.ToolbarController"_ustr}; } void SAL_CALL NewToolbarController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) @@ -704,7 +704,7 @@ void SAL_CALL NewToolbarController::execute( sal_Int16 /*KeyModifier*/ ) aURL = m_aCommandURL; css::uno::Sequence< css::beans::PropertyValue > aArgs{ comphelper::makePropertyValue( - "Referer", OUString( "private:user" )) }; + u"Referer"_ustr, u"private:user"_ustr) }; dispatchCommand( aURL, aArgs, aTarget ); } diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 4355069c683d..cae2900576f0 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -65,7 +65,7 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.RecentFilesMenuController"; + return u"com.sun.star.comp.framework.RecentFilesMenuController"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -75,7 +75,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.PopupMenuController"}; + return {u"com.sun.star.frame.PopupMenuController"_ustr}; } // XStatusListener @@ -330,20 +330,20 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex ) return; Sequence< PropertyValue > aArgsList{ - comphelper::makePropertyValue("Referer", OUString( "private:user" )), + comphelper::makePropertyValue(u"Referer"_ustr, u"private:user"_ustr), // documents in the picklist will never be opened as templates - comphelper::makePropertyValue("AsTemplate", false), + comphelper::makePropertyValue(u"AsTemplate"_ustr, false), // Type detection needs to know which app we are opening it from. - comphelper::makePropertyValue("DocumentService", m_aModuleName) + comphelper::makePropertyValue(u"DocumentService"_ustr, m_aModuleName) }; if (m_aRecentFilesItems[nIndex].second) // tdf#149170 only add if true { aArgsList.realloc(aArgsList.size()+1); - aArgsList.getArray()[aArgsList.size()-1] = comphelper::makePropertyValue("ReadOnly", true); + aArgsList.getArray()[aArgsList.size()-1] = comphelper::makePropertyValue(u"ReadOnly"_ustr, true); } - dispatchCommand(m_aRecentFilesItems[nIndex].first, aArgsList, "_default"); + dispatchCommand(m_aRecentFilesItems[nIndex].first, aArgsList, u"_default"_ustr); } // XEventListener @@ -385,7 +385,7 @@ void SAL_CALL RecentFilesMenuController::itemSelected( const css::awt::MenuEvent { SvtHistoryOptions::Clear( EHistoryType::PickList, false ); dispatchCommand( - "vnd.org.libreoffice.recentdocs:ClearRecentFileList", + u"vnd.org.libreoffice.recentdocs:ClearRecentFileList"_ustr, css::uno::Sequence< css::beans::PropertyValue >() ); } else if ( aCommand == CMD_OPEN_REMOTE ) diff --git a/framework/source/uielement/resourcemenucontroller.cxx b/framework/source/uielement/resourcemenucontroller.cxx index 065a97c63a47..393803790fa6 100644 --- a/framework/source/uielement/resourcemenucontroller.cxx +++ b/framework/source/uielement/resourcemenucontroller.cxx @@ -354,14 +354,14 @@ void ResourceMenuController::disposing(std::unique_lock<std::mutex>& rGuard) OUString ResourceMenuController::getImplementationName() { if ( m_bToolbarContainer ) - return "com.sun.star.comp.framework.ToolbarAsMenuController"; + return u"com.sun.star.comp.framework.ToolbarAsMenuController"_ustr; - return "com.sun.star.comp.framework.ResourceMenuController"; + return u"com.sun.star.comp.framework.ResourceMenuController"_ustr; } css::uno::Sequence< OUString > ResourceMenuController::getSupportedServiceNames() { - return { "com.sun.star.frame.PopupMenuController" }; + return { u"com.sun.star.frame.PopupMenuController"_ustr }; } class SaveAsMenuController : public ResourceMenuController @@ -395,17 +395,17 @@ void SaveAsMenuController::impl_setPopupMenu() { SolarMutexGuard aGuard; - InsertItem(m_xPopupMenu, ".uno:SaveAs"); - InsertItem(m_xPopupMenu, ".uno:ExportTo"); - InsertItem(m_xPopupMenu, ".uno:SaveACopy"); - InsertItem(m_xPopupMenu, ".uno:SaveAsTemplate"); + InsertItem(m_xPopupMenu, u".uno:SaveAs"_ustr); + InsertItem(m_xPopupMenu, u".uno:ExportTo"_ustr); + InsertItem(m_xPopupMenu, u".uno:SaveACopy"_ustr); + InsertItem(m_xPopupMenu, u".uno:SaveAsTemplate"_ustr); m_xPopupMenu->insertSeparator(-1); - InsertItem(m_xPopupMenu, ".uno:SaveAsRemote"); + InsertItem(m_xPopupMenu, u".uno:SaveAsRemote"_ustr); } OUString SaveAsMenuController::getImplementationName() { - return "com.sun.star.comp.framework.SaveAsMenuController"; + return u"com.sun.star.comp.framework.SaveAsMenuController"_ustr; } class WindowListMenuController : public ResourceMenuController @@ -541,7 +541,7 @@ void WindowListMenuController::impl_setPopupMenu() OUString WindowListMenuController::getImplementationName() { - return "com.sun.star.comp.framework.WindowListMenuController"; + return u"com.sun.star.comp.framework.WindowListMenuController"_ustr; } } diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 8e72b81e3422..d2e4e6d33252 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -75,8 +75,8 @@ private: }; SpinfieldControl::SpinfieldControl(vcl::Window* pParent, SpinfieldToolbarController* pSpinfieldToolbarController) - : InterimItemWindow(pParent, "svt/ui/spinfieldcontrol.ui", "SpinFieldControl") - , m_xWidget(m_xBuilder->weld_formatted_spin_button("spinbutton")) + : InterimItemWindow(pParent, u"svt/ui/spinfieldcontrol.ui"_ustr, u"SpinFieldControl"_ustr) + , m_xWidget(m_xBuilder->weld_formatted_spin_button(u"spinbutton"_ustr)) , m_pSpinfieldToolbarController(pSpinfieldToolbarController) { InitControlBase(m_xWidget.get()); @@ -209,8 +209,8 @@ Sequence<PropertyValue> SpinfieldToolbarController::getExecuteArgs(sal_Int16 Key // Add key modifier to argument list return { - comphelper::makePropertyValue("KeyModifier", KeyModifier), - comphelper::makePropertyValue("Value", m_bFloat ? Any(aSpinfieldText.toDouble()) + comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier), + comphelper::makePropertyValue(u"Value"_ustr, m_bFloat ? Any(aSpinfieldText.toDouble()) : Any(aSpinfieldText.toInt32())) }; } diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index be6840a1cc33..f44e6bb6aae8 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -302,23 +302,23 @@ void StatusBarManager::CreateControllers() std::vector< uno::Any > aPropVector { - uno::Any(comphelper::makePropertyValue("CommandURL", aCommandURL)), - uno::Any(comphelper::makePropertyValue("ModuleIdentifier", u""_ustr)), - uno::Any(comphelper::makePropertyValue("Frame", m_xFrame)), + uno::Any(comphelper::makePropertyValue(u"CommandURL"_ustr, aCommandURL)), + uno::Any(comphelper::makePropertyValue(u"ModuleIdentifier"_ustr, u""_ustr)), + uno::Any(comphelper::makePropertyValue(u"Frame"_ustr, m_xFrame)), // TODO remove this - uno::Any(comphelper::makePropertyValue("ServiceManager", uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW))), + uno::Any(comphelper::makePropertyValue(u"ServiceManager"_ustr, uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW))), - uno::Any(comphelper::makePropertyValue("ParentWindow", xStatusbarWindow)), - uno::Any(comphelper::makePropertyValue("Identifier", nId)), - uno::Any(comphelper::makePropertyValue("StatusbarItem", xStatusbarItem)) + uno::Any(comphelper::makePropertyValue(u"ParentWindow"_ustr, xStatusbarWindow)), + uno::Any(comphelper::makePropertyValue(u"Identifier"_ustr, nId)), + uno::Any(comphelper::makePropertyValue(u"StatusbarItem"_ustr, xStatusbarItem)) }; uno::Sequence< uno::Any > aArgs( comphelper::containerToSequence( aPropVector ) ); // 1) UNO Statusbar controllers, registered in Controllers.xcu if ( m_xStatusbarControllerFactory.is() && - m_xStatusbarControllerFactory->hasController( aCommandURL, "" )) + m_xStatusbarControllerFactory->hasController( aCommandURL, u""_ustr )) { xController.set(m_xStatusbarControllerFactory->createInstanceWithArgumentsAndContext( aCommandURL, aArgs, m_xContext ), @@ -417,7 +417,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if (( nType == css::ui::ItemType::DEFAULT ) && !aCommandURL.isEmpty() ) { - auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, ""); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, u""_ustr); OUString aString(vcl::CommandInfoProvider::GetLabelForCommand(aProperties)); StatusBarItemBits nItemBits( impl_convertItemStyleToItemBits( nStyle )); @@ -492,7 +492,7 @@ void StatusBarManager::DataChanged( const DataChangedEvent& rDCEvt ) css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; css::uno::Reference< css::beans::XPropertySet > xPropSet( m_xFrame, css::uno::UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; if ( xLayoutManager.is() ) { aGuard.clear(); diff --git a/framework/source/uielement/styletoolbarcontroller.cxx b/framework/source/uielement/styletoolbarcontroller.cxx index 3ff1e777eb6d..7e4a02c1423d 100644 --- a/framework/source/uielement/styletoolbarcontroller.cxx +++ b/framework/source/uielement/styletoolbarcontroller.cxx @@ -29,18 +29,18 @@ OUString MapFamilyToCommand( std::u16string_view rFamily ) if ( rFamily == u"ParagraphStyles" || rFamily == u"CellStyles" || // In sc rFamily == u"graphics" ) // In sd - return ".uno:ParaStyle"; + return u".uno:ParaStyle"_ustr; else if ( rFamily == u"CharacterStyles" ) - return ".uno:CharStyle"; + return u".uno:CharStyle"_ustr; else if ( rFamily == u"PageStyles" ) - return ".uno:PageStyle"; + return u".uno:PageStyle"_ustr; else if ( rFamily == u"FrameStyles" || rFamily == u"GraphicStyles" ) // In sc - return ".uno:FrameStyle"; + return u".uno:FrameStyle"_ustr; else if ( rFamily == u"NumberingStyles" ) - return ".uno:ListStyle"; + return u".uno:ListStyle"_ustr; else if ( rFamily == u"TableStyles" ) - return ".uno:TableStyle"; + return u".uno:TableStyle"_ustr; return OUString(); } @@ -65,7 +65,7 @@ OUString GetDisplayFromInternalName( const css::uno::Reference< css::frame::XFra OUString aDisplayName; if ( xStyle.is() ) - xStyle->getPropertyValue( "DisplayName" ) >>= aDisplayName; + xStyle->getPropertyValue( u"DisplayName"_ustr ) >>= aDisplayName; return aDisplayName; } catch ( const css::uno::Exception& ) diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx index b04b9609e709..6fffe753653e 100644 --- a/framework/source/uielement/subtoolbarcontroller.cxx +++ b/framework/source/uielement/subtoolbarcontroller.cxx @@ -225,9 +225,9 @@ private: SubToolbarControl::SubToolbarControl(SubToolBarController& rController, weld::Widget* pParent) - : WeldToolbarPopup(rController.getFrameInterface(), pParent, "svt/ui/subtoolbar.ui", "subtoolbar") + : WeldToolbarPopup(rController.getFrameInterface(), pParent, u"svt/ui/subtoolbar.ui"_ustr, u"subtoolbar"_ustr) , m_rController(rController) - , m_xTargetContainer(m_xBuilder->weld_container("container")) + , m_xTargetContainer(m_xBuilder->weld_container(u"container"_ustr)) { } @@ -420,7 +420,7 @@ void SubToolBarController::endPopupMode( const css::awt::EndPopupModeEvent& e ) { try { - xPropSet->getPropertyValue("ResourceURL") >>= aSubToolBarResName; + xPropSet->getPropertyValue(u"ResourceURL"_ustr) >>= aSubToolBarResName; } catch ( css::beans::UnknownPropertyException& ) {} @@ -456,7 +456,7 @@ void SubToolBarController::endPopupMode( const css::awt::EndPopupModeEvent& e ) VclPtr<vcl::Window> pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar ); if ( pTbxWindow && pTbxWindow->GetType() == WindowType::TOOLBOX ) { - OUString aPersistentString( "Persistent" ); + OUString aPersistentString( u"Persistent"_ustr ); css::uno::Any a = xProp->getPropertyValue( aPersistentString ); xProp->setPropertyValue( aPersistentString, css::uno::Any( false ) ); @@ -466,7 +466,7 @@ void SubToolBarController::endPopupMode( const css::awt::EndPopupModeEvent& e ) xLayoutManager->setElementPos( aSubToolBarResName, e.FloatingPosition ); xLayoutManager->showElement( aSubToolBarResName ); - xProp->setPropertyValue("Persistent", a ); + xProp->setPropertyValue(u"Persistent"_ustr, a ); } } catch ( css::uno::RuntimeException& ) @@ -523,7 +523,7 @@ void SubToolBarController::dispose() OUString SubToolBarController::getImplementationName() { - return "com.sun.star.comp.framework.SubToolBarController"; + return u"com.sun.star.comp.framework.SubToolBarController"_ustr; } sal_Bool SubToolBarController::supportsService( const OUString& rServiceName ) @@ -533,7 +533,7 @@ sal_Bool SubToolBarController::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SubToolBarController::getSupportedServiceNames() { - return {"com.sun.star.frame.ToolbarController"}; + return {u"com.sun.star.frame.ToolbarController"_ustr}; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/framework/source/uielement/thesaurusmenucontroller.cxx b/framework/source/uielement/thesaurusmenucontroller.cxx index 6a834757c3fa..6d1edf6cc1d6 100644 --- a/framework/source/uielement/thesaurusmenucontroller.cxx +++ b/framework/source/uielement/thesaurusmenucontroller.cxx @@ -97,7 +97,7 @@ void ThesaurusMenuController::fillPopupMenu() { css::uno::Reference<css::uno::XComponentContext> xContext(::comphelper::getProcessComponentContext()); css::uno::Reference<css::graphic::XGraphicProvider> xProvider(css::graphic::GraphicProvider::create(xContext)); - xGraphic = xProvider->queryGraphic({ comphelper::makePropertyValue("URL", aSynonymsImageUrl) }); + xGraphic = xProvider->queryGraphic({ comphelper::makePropertyValue(u"URL"_ustr, aSynonymsImageUrl) }); } catch (const css::uno::Exception&) { @@ -119,7 +119,7 @@ void ThesaurusMenuController::fillPopupMenu() } m_xPopupMenu->insertSeparator(-1); - OUString aThesaurusDialogCmd( ".uno:ThesaurusDialog" ); + OUString aThesaurusDialogCmd( u".uno:ThesaurusDialog"_ustr ); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aThesaurusDialogCmd, m_aModuleName); m_xPopupMenu->insertItem(nId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties), 0, -1); m_xPopupMenu->setCommand(nId, aThesaurusDialogCmd); @@ -157,7 +157,7 @@ void ThesaurusMenuController::getMeanings( std::vector< OUString >& rSynonyms, c OUString ThesaurusMenuController::getThesImplName( const css::lang::Locale& rLocale ) const { css::uno::Sequence< OUString > aServiceNames = - m_xLinguServiceManager->getConfiguredServices( "com.sun.star.linguistic2.Thesaurus", rLocale ); + m_xLinguServiceManager->getConfiguredServices( u"com.sun.star.linguistic2.Thesaurus"_ustr, rLocale ); SAL_WARN_IF( aServiceNames.getLength() > 1, "fwk.uielement", "Only one thesaurus is allowed per locale, but found more!" ); if ( aServiceNames.getLength() == 1 ) return aServiceNames[0]; @@ -167,12 +167,12 @@ OUString ThesaurusMenuController::getThesImplName( const css::lang::Locale& rLoc OUString ThesaurusMenuController::getImplementationName() { - return "com.sun.star.comp.framework.ThesaurusMenuController"; + return u"com.sun.star.comp.framework.ThesaurusMenuController"_ustr; } css::uno::Sequence< OUString > ThesaurusMenuController::getSupportedServiceNames() { - return { "com.sun.star.frame.PopupMenuController" }; + return { u"com.sun.star.frame.PopupMenuController"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index 7beabd2f8f01..be57703f87ff 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -61,8 +61,8 @@ void SAL_CALL ToggleButtonToolbarController::dispose() Sequence<PropertyValue> ToggleButtonToolbarController::getExecuteArgs(sal_Int16 KeyModifier) const { Sequence<PropertyValue> aArgs{ // Add key modifier to argument list - comphelper::makePropertyValue("KeyModifier", KeyModifier), - comphelper::makePropertyValue("Text", m_aCurrentSelection) }; + comphelper::makePropertyValue(u"KeyModifier"_ustr, KeyModifier), + comphelper::makePropertyValue(u"Text"_ustr, m_aCurrentSelection) }; return aArgs; } @@ -118,8 +118,8 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con } // send notification - uno::Sequence< beans::NamedValue > aInfo { { "List", css::uno::Any(aList) } }; - addNotifyInfo( "ListChanged", + uno::Sequence< beans::NamedValue > aInfo { { u"List"_ustr, css::uno::Any(aList) } }; + addNotifyInfo( u"ListChanged"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); @@ -143,8 +143,8 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con m_aCurrentSelection = m_aDropdownMenuList[nPos].mLabel; // send notification - uno::Sequence< beans::NamedValue > aInfo { { "ItemChecked", css::uno::Any(nPos) } }; - addNotifyInfo( "Pos", + uno::Sequence< beans::NamedValue > aInfo { { u"ItemChecked"_ustr, css::uno::Any(nPos) } }; + addNotifyInfo( u"Pos"_ustr, getDispatchFromCommand( m_aCommandURL ), aInfo ); } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index fb6e02918027..609315aeceb0 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -106,7 +106,7 @@ static css::uno::Reference< css::frame::XLayoutManager > getLayoutManagerFromFra { try { - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; } catch (const RuntimeException&) { @@ -430,7 +430,7 @@ public: virtual void InsertSeparator() override { - m_pWeldedToolBar->append_separator(""); + m_pWeldedToolBar->append_separator(u""_ustr); } virtual void InsertSpace() override {} @@ -594,7 +594,7 @@ void ToolBarManager::Init() // enables a menu for clipped items and customization SvtCommandOptions aCmdOptions; ToolBoxMenuType nMenuType = ToolBoxMenuType::ClippedItems; - if ( !aCmdOptions.LookupDisabled( "CreateDialog")) + if ( !aCmdOptions.LookupDisabled( u"CreateDialog"_ustr)) nMenuType |= ToolBoxMenuType::Customize; m_pImpl->SetMenuType( nMenuType ); @@ -702,7 +702,7 @@ void ToolBarManager::UpdateControllers() Reference< XLayoutManager > xLayoutManager; Reference< XPropertySet > xFramePropSet( m_xFrame, UNO_QUERY ); if ( xFramePropSet.is() ) - a = xFramePropSet->getPropertyValue("LayoutManager"); + a = xFramePropSet->getPropertyValue(u"LayoutManager"_ustr); a >>= xLayoutManager; Reference< XDockableWindow > xDockable( m_pImpl->GetInterface(), UNO_QUERY ); if ( xLayoutManager.is() && xDockable.is() ) @@ -1096,7 +1096,7 @@ void ToolBarManager::CreateControllers() else if ( aCommandURL.startsWith( "private:resource/" ) ) { xController.set( m_xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.comp.framework.GenericPopupToolbarController", m_xContext ), UNO_QUERY ); + u"com.sun.star.comp.framework.GenericPopupToolbarController"_ustr, m_xContext ), UNO_QUERY ); } else if ( m_pToolBar && m_pToolBar->GetItemData( nId ) != nullptr ) { @@ -1198,7 +1198,7 @@ void ToolBarManager::CreateControllers() try { bool bSupportVisible = true; - Any a( xPropSet->getPropertyValue("SupportsVisible") ); + Any a( xPropSet->getPropertyValue(u"SupportsVisible"_ustr) ); a >>= bSupportVisible; if (bSupportVisible) { @@ -1345,7 +1345,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine try { OUString aUIName; - xPropSet->getPropertyValue("UIName") >>= aUIName; + xPropSet->getPropertyValue(u"UIName"_ustr) >>= aUIName; if ( !aUIName.isEmpty() ) m_pImpl->SetName( aUIName ); } @@ -1855,7 +1855,7 @@ void ToolBarManager::AddCustomizeMenuItems(ToolBox const * pToolBar) if (m_pToolBar->IsCustomize()) { pMenu->InsertItem(MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, FwkResId(STR_TOOLBAR_CUSTOMIZE_TOOLBAR)); - pMenu->SetItemCommand(MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, ".uno:ConfigureToolboxVisible"); + pMenu->SetItemCommand(MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, u".uno:ConfigureToolboxVisible"_ustr); } pMenu->InsertSeparator(); } @@ -2006,7 +2006,7 @@ void ToolBarManager::ToggleButton( const OUString& rResourceName, std::u16string if ( xPropSet.is() ) { Reference< XUIConfigurationPersistence > xUICfgMgr; - if (( xPropSet->getPropertyValue("ConfigurationSource") >>= xUICfgMgr ) && ( xUICfgMgr.is() )) + if (( xPropSet->getPropertyValue(u"ConfigurationSource"_ustr) >>= xUICfgMgr ) && ( xUICfgMgr.is() )) xUICfgMgr->store(); } } @@ -2107,7 +2107,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu, bool ) if ( xDisp.is() ) { Sequence< PropertyValue > aPropSeq{ comphelper::makePropertyValue( - "ResourceURL", m_aResourceName) }; + u"ResourceURL"_ustr, m_aResourceName) }; xDisp->dispatch( aURL, aPropSeq ); } diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx index 2901eef0ac76..d7e2de9773b7 100644 --- a/framework/source/uielement/toolbarmodemenucontroller.cxx +++ b/framework/source/uielement/toolbarmodemenucontroller.cxx @@ -52,7 +52,7 @@ namespace framework OUString SAL_CALL ToolbarModeMenuController::getImplementationName() { - return "com.sun.star.comp.framework.ToolbarModeMenuController"; + return u"com.sun.star.comp.framework.ToolbarModeMenuController"_ustr; } sal_Bool SAL_CALL ToolbarModeMenuController::supportsService( const OUString& sServiceName ) diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 9bd0d72faa06..9e5055ccfd37 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -103,7 +103,7 @@ static Reference< XLayoutManager > getLayoutManagerFromFrame( const Reference< X try { - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; } catch ( const UnknownPropertyException& ) { @@ -126,7 +126,7 @@ struct ToolBarInfo OUString SAL_CALL ToolbarsMenuController::getImplementationName() { - return "com.sun.star.comp.framework.ToolBarsMenuController"; + return u"com.sun.star.comp.framework.ToolBarsMenuController"_ustr; } sal_Bool SAL_CALL ToolbarsMenuController::supportsService( const OUString& sServiceName ) @@ -249,8 +249,8 @@ Sequence< Sequence< css::beans::PropertyValue > > ToolbarsMenuController::getLay { OUString aResName; sal_Int16 nType( -1 ); - xPropSet->getPropertyValue("Type") >>= nType; - xPropSet->getPropertyValue("ResourceURL") >>= aResName; + xPropSet->getPropertyValue(u"Type"_ustr) >>= nType; + xPropSet->getPropertyValue(u"ResourceURL"_ustr) >>= aResName; if (( nType == css::ui::UIElementType::TOOLBAR ) && !aResName.isEmpty() ) @@ -411,7 +411,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co bool bAddCommand( true ); SvtCommandOptions aCmdOptions; - if ( aCmdOptions.HasEntriesDisabled() && aCmdOptions.LookupDisabled("ConfigureDialog")) + if ( aCmdOptions.HasEntriesDisabled() && aCmdOptions.LookupDisabled(u"ConfigureDialog"_ustr)) bAddCommand = false; if ( bAddCommand ) @@ -423,7 +423,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co m_xPopupMenu->insertSeparator( nItemCount+1 ); } - addCommand( m_xPopupMenu, ".uno:ConfigureDialog", "" ); + addCommand( m_xPopupMenu, u".uno:ConfigureDialog"_ustr, u""_ustr ); } // Add separator if no configure has been added @@ -589,7 +589,7 @@ void SAL_CALL ToolbarsMenuController::itemSelected( const css::awt::MenuEvent& r { try { - xPropSet->setPropertyValue("RefreshContextToolbarVisibility", Any( true )); + xPropSet->setPropertyValue(u"RefreshContextToolbarVisibility"_ustr, Any( true )); } catch ( const RuntimeException& ) { diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 30d0e84e2b1a..093367316cb4 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -156,9 +156,9 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) } else if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(xParentWindow.get())) { - m_xBuilder = Application::CreateBuilder(pTunnel->getWidget(), "svt/ui/managedtoolbar.ui"); - m_xTopLevel = m_xBuilder->weld_container("toolbarcontainer"); - m_xWeldedToolbar = m_xBuilder->weld_toolbar("managedtoolbar"); + m_xBuilder = Application::CreateBuilder(pTunnel->getWidget(), u"svt/ui/managedtoolbar.ui"_ustr); + m_xTopLevel = m_xBuilder->weld_container(u"toolbarcontainer"_ustr); + m_xWeldedToolbar = m_xBuilder->weld_toolbar(u"managedtoolbar"_ustr); if ( m_xWeldedToolbar ) { pToolBarManager = new ToolBarManager( m_xContext, xFrame, m_aResourceURL, m_xWeldedToolbar.get(), m_xBuilder.get() ); @@ -283,7 +283,7 @@ void SAL_CALL ToolBarWrapper::notifyContextChangeEvent( const ContextChangeEvent Reference< XLayoutManager > xLayoutManager; Reference< XPropertySet > xPropSet( m_xWeakFrame.get(), UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; if ( !xLayoutManager.is() ) return; diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 0b8bad8ccdfa..ddbe692233c3 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -164,7 +164,7 @@ ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( std::u16string_vie OUString::Concat(CONFIGURATION_ROOT_ACCESS) + aModuleName + "/UserInterface/Commands"), m_aConfigPopupAccess( OUString::Concat(CONFIGURATION_ROOT_ACCESS) + aModuleName + "/UserInterface/Popups"), - m_aPropProperties( "Properties" ), + m_aPropProperties( u"Properties"_ustr ), m_xGenericUICommands( rGenericUICommands ), m_xConfigProvider( theDefaultProvider::get( rxContext ) ), m_bConfigAccessInitialized( false ), @@ -311,12 +311,12 @@ void ConfigurationAccess_UICommand::impl_fill(const Reference< XNameAccess >& _x CmdToInfoMap aCmdToInfo; aCmdToInfo.bPopup = _bPopup; - xNameAccess->getByName( "Label" ) >>= aCmdToInfo.aLabel; - xNameAccess->getByName( "ContextLabel" ) >>= aCmdToInfo.aContextLabel; - xNameAccess->getByName( "PopupLabel" ) >>= aCmdToInfo.aPopupLabel; - xNameAccess->getByName( "TooltipLabel" ) >>= aCmdToInfo.aTooltipLabel; - xNameAccess->getByName( "TargetURL" ) >>= aCmdToInfo.aTargetURL; - xNameAccess->getByName( "IsExperimental" ) >>= aCmdToInfo.bIsExperimental; + xNameAccess->getByName( u"Label"_ustr ) >>= aCmdToInfo.aLabel; + xNameAccess->getByName( u"ContextLabel"_ustr ) >>= aCmdToInfo.aContextLabel; + xNameAccess->getByName( u"PopupLabel"_ustr ) >>= aCmdToInfo.aPopupLabel; + xNameAccess->getByName( u"TooltipLabel"_ustr ) >>= aCmdToInfo.aTooltipLabel; + xNameAccess->getByName( u"TargetURL"_ustr ) >>= aCmdToInfo.aTargetURL; + xNameAccess->getByName( u"IsExperimental"_ustr ) >>= aCmdToInfo.bIsExperimental; xNameAccess->getByName( m_aPropProperties ) >>= aCmdToInfo.nProperties; m_aCmdInfoCache.emplace( aNameSeq[i], aCmdToInfo ); @@ -484,7 +484,7 @@ void ConfigurationAccess_UICommand::initializeConfigAccess() {"nodepath", Any(m_aConfigCmdAccess)} })); m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArgs ),UNO_QUERY ); + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs ),UNO_QUERY ); if ( m_xConfigAccess.is() ) { // Add as container listener @@ -501,7 +501,7 @@ void ConfigurationAccess_UICommand::initializeConfigAccess() {"nodepath", Any(m_aConfigPopupAccess)} })); m_xConfigAccessPopups.set( m_xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArgs2 ),UNO_QUERY ); + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs2 ),UNO_QUERY ); if ( m_xConfigAccessPopups.is() ) { // Add as container listener @@ -585,7 +585,7 @@ UICommandDescription::UICommandDescription(const Reference< XComponentContext >& // insert generic commands auto& rMap = m_aUICommandsHashMap[rCurrentLanguage]; - UICommandsHashMap::iterator pIter = rMap.find( "GenericCommands" ); + UICommandsHashMap::iterator pIter = rMap.find( u"GenericCommands"_ustr ); if ( pIter != rMap.end() ) pIter->second = m_xGenericUICommands[rCurrentLanguage]; } diff --git a/framework/source/uifactory/addonstoolbarfactory.cxx b/framework/source/uifactory/addonstoolbarfactory.cxx index 10e91380a871..a4bcda83079a 100644 --- a/framework/source/uifactory/addonstoolbarfactory.cxx +++ b/framework/source/uifactory/addonstoolbarfactory.cxx @@ -51,7 +51,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.AddonsToolBarFactory"; + return u"com.sun.star.comp.framework.AddonsToolBarFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -61,7 +61,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.ToolBarFactory"}; + return {u"com.sun.star.ui.ToolBarFactory"_ustr}; } // XUIElementFactory @@ -178,10 +178,10 @@ Reference< XUIElement > SAL_CALL AddonsToolBarFactory::createUIElement( aConfigData.hasElements() && hasButtonsInContext( aConfigData, xFrame )) { - Sequence< Any > aPropSeq{ Any(comphelper::makePropertyValue("Frame", xFrame)), - Any(comphelper::makePropertyValue("ConfigurationData", + Sequence< Any > aPropSeq{ Any(comphelper::makePropertyValue(u"Frame"_ustr, xFrame)), + Any(comphelper::makePropertyValue(u"ConfigurationData"_ustr, aConfigData)), - Any(comphelper::makePropertyValue("ResourceURL", aResourceURL)) }; + Any(comphelper::makePropertyValue(u"ResourceURL"_ustr, aResourceURL)) }; SolarMutexGuard aGuard; rtl::Reference<AddonsToolBarWrapper> pToolBarWrapper = new AddonsToolBarWrapper( m_xContext ); diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx index 047a6b6edb68..c8b44eaec34c 100644 --- a/framework/source/uifactory/factoryconfiguration.cxx +++ b/framework/source/uifactory/factoryconfiguration.cxx @@ -55,10 +55,10 @@ static OUString getHashKeyFromStrings( // XInterface, XTypeProvider ConfigurationAccess_ControllerFactory::ConfigurationAccess_ControllerFactory( const Reference< XComponentContext >& rxContext, OUString _sRoot ) : - m_aPropCommand( "Command" ), - m_aPropModule( "Module" ), - m_aPropController( "Controller" ), - m_aPropValue( "Value" ), + m_aPropCommand( u"Command"_ustr ), + m_aPropModule( u"Module"_ustr ), + m_aPropController( u"Controller"_ustr ), + m_aPropValue( u"Value"_ustr ), m_sRoot(std::move(_sRoot)), m_bConfigAccessInitialized( false ) { diff --git a/framework/source/uifactory/statusbarfactory.cxx b/framework/source/uifactory/statusbarfactory.cxx index addb6cb11d86..34243c1bc54e 100644 --- a/framework/source/uifactory/statusbarfactory.cxx +++ b/framework/source/uifactory/statusbarfactory.cxx @@ -37,7 +37,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.StatusBarFactory"; + return u"com.sun.star.comp.framework.StatusBarFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -47,7 +47,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.StatusBarFactory"}; + return {u"com.sun.star.ui.StatusBarFactory"_ustr}; } // XUIElementFactory diff --git a/framework/source/uifactory/toolbarfactory.cxx b/framework/source/uifactory/toolbarfactory.cxx index d597f3e178cc..c17983922414 100644 --- a/framework/source/uifactory/toolbarfactory.cxx +++ b/framework/source/uifactory/toolbarfactory.cxx @@ -37,7 +37,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ToolBarFactory"; + return u"com.sun.star.comp.framework.ToolBarFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -47,7 +47,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.ToolBarFactory"}; + return {u"com.sun.star.ui.ToolBarFactory"_ustr}; } // XUIElementFactory diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx index 314b277995e1..e935ae7a9daf 100644 --- a/framework/source/uifactory/uicontrollerfactory.cxx +++ b/framework/source/uifactory/uicontrollerfactory.cxx @@ -237,7 +237,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.PopupMenuControllerFactory"; + return u"com.sun.star.comp.framework.PopupMenuControllerFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -247,7 +247,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.PopupMenuControllerFactory"}; + return {u"com.sun.star.frame.PopupMenuControllerFactory"_ustr}; } }; @@ -264,7 +264,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.ToolBarControllerFactory"; + return u"com.sun.star.comp.framework.ToolBarControllerFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -274,7 +274,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.ToolbarControllerFactory"}; + return {u"com.sun.star.frame.ToolbarControllerFactory"_ustr}; } }; @@ -291,7 +291,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.StatusBarControllerFactory"; + return u"com.sun.star.comp.framework.StatusBarControllerFactory"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -301,7 +301,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.frame.StatusbarControllerFactory"}; + return {u"com.sun.star.frame.StatusbarControllerFactory"_ustr}; } }; diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx index b8a8ea46ed9b..b7910fb9ee78 100644 --- a/framework/source/uifactory/uielementfactorymanager.cxx +++ b/framework/source/uifactory/uielementfactorymanager.cxx @@ -65,10 +65,10 @@ static OUString getHashKeyFromStrings( std::u16string_view aType, std::u16string } ConfigurationAccess_FactoryManager::ConfigurationAccess_FactoryManager( const Reference< XComponentContext >& rxContext, OUString _sRoot ) : - m_aPropType( "Type" ), - m_aPropName( "Name" ), - m_aPropModule( "Module" ), - m_aPropFactory( "FactoryImplementation" ), + m_aPropType( u"Type"_ustr ), + m_aPropName( u"Name"_ustr ), + m_aPropModule( u"Module"_ustr ), + m_aPropFactory( u"FactoryImplementation"_ustr ), m_sRoot(std::move(_sRoot)), m_bConfigAccessInitialized( false ) { @@ -272,7 +272,7 @@ void ConfigurationAccess_FactoryManager::readConfigurationData() try { m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArgs ), UNO_QUERY ); + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs ), UNO_QUERY ); } catch ( const WrappedTargetException& ) { @@ -353,7 +353,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.UIElementFactoryManager"; + return u"com.sun.star.comp.framework.UIElementFactoryManager"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -363,7 +363,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.UIElementFactoryManager"}; + return {u"com.sun.star.ui.UIElementFactoryManager"_ustr}; } // XUIElementFactory @@ -387,7 +387,7 @@ UIElementFactoryManager::UIElementFactoryManager( const Reference< XComponentCon m_pConfigAccess( new ConfigurationAccess_FactoryManager( rxContext, - "/org.openoffice.Office.UI.Factories/Registered/UIElementFactories")) + u"/org.openoffice.Office.UI.Factories/Registered/UIElementFactories"_ustr)) {} void UIElementFactoryManager::disposing(std::unique_lock<std::mutex>&) @@ -406,7 +406,7 @@ Reference< XUIElement > SAL_CALL UIElementFactoryManager::createUIElement( std::unique_lock g(m_aMutex); if (m_bDisposed) { throw css::lang::DisposedException( - "disposed", static_cast<OWeakObject *>(this)); + u"disposed"_ustr, static_cast<OWeakObject *>(this)); } if ( !m_bConfigRead ) @@ -453,7 +453,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL UIElementFactoryManager::getRegis std::unique_lock g(m_aMutex); if (m_bDisposed) { throw css::lang::DisposedException( - "disposed", static_cast<OWeakObject *>(this)); + u"disposed"_ustr, static_cast<OWeakObject *>(this)); } if ( !m_bConfigRead ) @@ -472,7 +472,7 @@ Reference< XUIElementFactory > SAL_CALL UIElementFactoryManager::getFactory( con std::unique_lock g(m_aMutex); if (m_bDisposed) { throw css::lang::DisposedException( - "disposed", static_cast<OWeakObject *>(this)); + u"disposed"_ustr, static_cast<OWeakObject *>(this)); } if ( !m_bConfigRead ) @@ -508,7 +508,7 @@ void SAL_CALL UIElementFactoryManager::registerFactory( const OUString& aType, c std::unique_lock g(m_aMutex); if (m_bDisposed) { throw css::lang::DisposedException( - "disposed", static_cast<OWeakObject *>(this)); + u"disposed"_ustr, static_cast<OWeakObject *>(this)); } if ( !m_bConfigRead ) @@ -527,7 +527,7 @@ void SAL_CALL UIElementFactoryManager::deregisterFactory( const OUString& aType, std::unique_lock g(m_aMutex); if (m_bDisposed) { throw css::lang::DisposedException( - "disposed", static_cast<OWeakObject *>(this)); + u"disposed"_ustr, static_cast<OWeakObject *>(this)); } if ( !m_bConfigRead ) diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx index 1918ae6fdd54..f8a75a3d9543 100644 --- a/framework/source/uifactory/windowcontentfactorymanager.cxx +++ b/framework/source/uifactory/windowcontentfactorymanager.cxx @@ -53,7 +53,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return "com.sun.star.comp.framework.WindowContentFactoryManager"; + return u"com.sun.star.comp.framework.WindowContentFactoryManager"_ustr; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override @@ -63,7 +63,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { - return {"com.sun.star.ui.WindowContentFactoryManager"}; + return {u"com.sun.star.ui.WindowContentFactoryManager"_ustr}; } // XSingleComponentFactory @@ -84,7 +84,7 @@ WindowContentFactoryManager::WindowContentFactoryManager( uno::Reference< uno::X m_pConfigAccess( new ConfigurationAccess_FactoryManager( m_xContext, - "/org.openoffice.Office.UI.WindowContentFactories/Registered/ContentFactories")) + u"/org.openoffice.Office.UI.WindowContentFactories/Registered/ContentFactories"_ustr)) {} void WindowContentFactoryManager::disposing(std::unique_lock<std::mutex>&) @@ -148,7 +148,7 @@ uno::Reference< uno::XInterface > SAL_CALL WindowContentFactoryManager::createIn std::unique_lock g(m_aMutex); if (m_bDisposed) { throw css::lang::DisposedException( - "disposed", static_cast<OWeakObject *>(this)); + u"disposed"_ustr, static_cast<OWeakObject *>(this)); } if ( !m_bConfigRead ) { diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx index 7cbb81de9bcd..6b7819b1335f 100644 --- a/framework/source/xml/acceleratorconfigurationreader.cxx +++ b/framework/source/xml/acceleratorconfigurationreader.cxx @@ -211,7 +211,7 @@ AcceleratorConfigurationReader::EXMLElement AcceleratorConfigurationReader::impl eElement = E_ELEMENT_ITEM; else throw css::uno::RuntimeException( - "Unknown XML element detected!", + u"Unknown XML element detected!"_ustr, css::uno::Reference< css::xml::sax::XDocumentHandler >()); return eElement; @@ -235,7 +235,7 @@ AcceleratorConfigurationReader::EXMLAttribute AcceleratorConfigurationReader::im eAttribute = E_ATTRIBUTE_URL; else throw css::uno::RuntimeException( - "Unknown XML attribute detected!", + u"Unknown XML attribute detected!"_ustr, css::uno::Reference< css::xml::sax::XDocumentHandler >()); return eAttribute; @@ -244,7 +244,7 @@ AcceleratorConfigurationReader::EXMLAttribute AcceleratorConfigurationReader::im OUString AcceleratorConfigurationReader::implts_getErrorLineString() { if (!m_xLocator.is()) - return "Error during parsing XML. (No further info available ...)"; + return u"Error during parsing XML. (No further info available ...)"_ustr; return "Error during parsing XML in\nline = " + OUString::number(m_xLocator->getLineNumber()) + diff --git a/framework/source/xml/acceleratorconfigurationwriter.cxx b/framework/source/xml/acceleratorconfigurationwriter.cxx index 6ef30fe4fe66..3f8b08a0e678 100644 --- a/framework/source/xml/acceleratorconfigurationwriter.cxx +++ b/framework/source/xml/acceleratorconfigurationwriter.cxx @@ -52,17 +52,17 @@ void AcceleratorConfigurationWriter::flush() rtl::Reference<::comphelper::AttributeList> pAttribs = new ::comphelper::AttributeList; pAttribs->AddAttribute( - "xmlns:accel", - "http://openoffice.org/2001/accel"); + u"xmlns:accel"_ustr, + u"http://openoffice.org/2001/accel"_ustr); pAttribs->AddAttribute( - "xmlns:xlink", "http://www.w3.org/1999/xlink"); + u"xmlns:xlink"_ustr, u"http://www.w3.org/1999/xlink"_ustr); // generate xml xExtendedCFG->startDocument(); xExtendedCFG->unknown( - "<!DOCTYPE accel:acceleratorlist PUBLIC \"-//OpenOffice.org//DTD" - " OfficeDocument 1.0//EN\" \"accelerator.dtd\">"); + u"<!DOCTYPE accel:acceleratorlist PUBLIC \"-//OpenOffice.org//DTD" + " OfficeDocument 1.0//EN\" \"accelerator.dtd\">"_ustr); xExtendedCFG->ignorableWhitespace(OUString()); xExtendedCFG->startElement(AL_ELEMENT_ACCELERATORLIST, pAttribs); @@ -97,20 +97,20 @@ void AcceleratorConfigurationWriter::impl_ts_writeKeyCommandPair(const css::awt: OUString sKey = KeyMapping::get().mapCodeToIdentifier(aKey.KeyCode); // TODO check if key is empty! - pAttribs->AddAttribute("accel:code", sKey ); - pAttribs->AddAttribute("xlink:href", sCommand); + pAttribs->AddAttribute(u"accel:code"_ustr, sKey ); + pAttribs->AddAttribute(u"xlink:href"_ustr, sCommand); if ((aKey.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT) - pAttribs->AddAttribute("accel:shift", "true"); + pAttribs->AddAttribute(u"accel:shift"_ustr, u"true"_ustr); if ((aKey.Modifiers & css::awt::KeyModifier::MOD1) == css::awt::KeyModifier::MOD1) - pAttribs->AddAttribute("accel:mod1", "true"); + pAttribs->AddAttribute(u"accel:mod1"_ustr, u"true"_ustr); if ((aKey.Modifiers & css::awt::KeyModifier::MOD2) == css::awt::KeyModifier::MOD2) - pAttribs->AddAttribute("accel:mod2", "true"); + pAttribs->AddAttribute(u"accel:mod2"_ustr, u"true"_ustr); if ((aKey.Modifiers & css::awt::KeyModifier::MOD3) == css::awt::KeyModifier::MOD3) - pAttribs->AddAttribute("accel:mod3", "true"); + pAttribs->AddAttribute(u"accel:mod3"_ustr, u"true"_ustr); xConfig->ignorableWhitespace(OUString()); xConfig->startElement(AL_ELEMENT_ITEM, pAttribs); |