summaryrefslogtreecommitdiff
path: root/framework/source/services
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-08 11:58:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-08 17:18:51 +0200
commit4f5f24a4a3dac22e0f2c0d4832e0cbdd566263b9 (patch)
tree9a6078551b0d89df314cc384336d94178b8c459f /framework/source/services
parent22dd422f7ccf7a1ce4dc7fe5b274263a55e464c7 (diff)
loplugin:ostr in framework
Change-Id: I2fdc32aa5de6a1315fe69997f9b531259aa78605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167339 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/services')
-rw-r--r--framework/source/services/ContextChangeEventMultiplexer.cxx10
-rw-r--r--framework/source/services/autorecovery.cxx24
-rw-r--r--framework/source/services/desktop.cxx18
-rw-r--r--framework/source/services/dispatchhelper.cxx6
-rw-r--r--framework/source/services/frame.cxx46
-rw-r--r--framework/source/services/mediatypedetectionhelper.cxx4
-rw-r--r--framework/source/services/modulemanager.cxx20
-rw-r--r--framework/source/services/pathsettings.cxx116
-rw-r--r--framework/source/services/sessionlistener.cxx10
-rw-r--r--framework/source/services/substitutepathvars.cxx12
-rw-r--r--framework/source/services/taskcreatorsrv.cxx4
-rw-r--r--framework/source/services/uriabbreviation.cxx4
-rw-r--r--framework/source/services/urltransformer.cxx4
13 files changed, 139 insertions, 139 deletions
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;