summaryrefslogtreecommitdiff
path: root/desktop/source/lib
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-07 12:55:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-07 14:41:40 +0200
commit9422879a5cf74120c1057b0f8150529e304f7c95 (patch)
tree00b6c549be8fea2980f0ee2e2fc621b8ca8920fd /desktop/source/lib
parentc87077f653739d00ed5237d54838c1a454d65c4f (diff)
loplugin:ostr in desktop
Change-Id: Ib43d1c3a182badddd870bcb8e052ac7fd0a16fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/lib')
-rw-r--r--desktop/source/lib/init.cxx20
-rw-r--r--desktop/source/lib/lokclipboard.cxx9
-rw-r--r--desktop/source/lib/lokclipboard.hxx2
-rw-r--r--desktop/source/lib/lokinteractionhandler.cxx10
4 files changed, 22 insertions, 19 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 28ba524ad0eb..30d2d824e5c6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -841,19 +841,19 @@ OUString lcl_getCurrentDocumentMimeType(const LibLODocument_Impl* pDocument)
{
SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(pDocument->mxComponent.get());
if (!pBaseModel)
- return "";
+ return u""_ustr;
SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
if (!pObjectShell)
- return "";
+ return u""_ustr;
SfxMedium* pMedium = pObjectShell->GetMedium();
if (!pMedium)
- return "";
+ return u""_ustr;
auto pFilter = pMedium->GetFilter();
if (!pFilter)
- return "";
+ return u""_ustr;
return pFilter->GetMimeType();
}
@@ -922,7 +922,7 @@ void ExecuteOrientationChange()
getUndoManager( pViewFrm->GetFrame().GetFrameInterface() ) );
if ( mxUndoManager.is() )
- mxUndoManager->enterUndoContext( "" );
+ mxUndoManager->enterUndoContext( u""_ustr );
SfxPoolItemHolder aResult;
pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE, aResult);
@@ -3296,7 +3296,7 @@ void FunctionBasedURPConnection::close()
SAL_INFO("lok.urp", "Requested to close FunctionBasedURPConnection");
}
-OUString FunctionBasedURPConnection::getDescription() { return ""; }
+OUString FunctionBasedURPConnection::getDescription() { return u""_ustr; }
void FunctionBasedURPConnection::setBridge(const Reference<XBridge>& xBridge) { m_URPBridge = xBridge; }
}
@@ -5081,7 +5081,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c
OutputDevice *pDevice = Application::GetDefaultDevice();
OutputDevice::ImplClearAllFontData(false);
- pDevice->AddTempDevFont(sMagicFileName, "");
+ pDevice->AddTempDevFont(sMagicFileName, u""_ustr);
OutputDevice::ImplRefreshAllFontData(false);
}
#endif
@@ -7546,7 +7546,7 @@ static void preloadData()
std::cerr << "CheckExtensionDependencies failed" << std::endl;
// inhibit forced 2nd synchronization from Main
- ::rtl::Bootstrap::set( "DISABLE_EXTENSION_SYNCHRONIZATION", "true");
+ ::rtl::Bootstrap::set( u"DISABLE_EXTENSION_SYNCHRONIZATION"_ustr, u"true"_ustr);
std::cerr << "Preload textencodings"; // sal_textenc
// Use RTL_TEXTENCODING_MS_1250 to trigger Impl_getTextEncodingData
@@ -7601,7 +7601,7 @@ static void preloadData()
css::uno::Reference< css::i18n::XBreakIterator > xBreakIterator = css::i18n::BreakIterator::create(xContext);
css::i18n::LineBreakUserOptions aUserOptions;
css::i18n::LineBreakHyphenationOptions aHyphOptions( LinguMgr::GetHyphenator(), css::uno::Sequence<beans::PropertyValue>(), 1 );
- xBreakIterator->getLineBreak("", /*nMaxBreakPos*/0, aLocales[0], /*nMinBreakPos*/0, aHyphOptions, aUserOptions);
+ xBreakIterator->getLineBreak(u""_ustr, /*nMaxBreakPos*/0, aLocales[0], /*nMinBreakPos*/0, aHyphOptions, aUserOptions);
}
css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
@@ -7684,7 +7684,7 @@ static void preloadData()
uno::Sequence<css::beans::PropertyValue> szEmptyArgs(0);
for (const auto& component : preloadComponents)
{
- auto xComp = xCompLoader->loadComponentFromURL(component, "_blank", 0, szEmptyArgs);
+ auto xComp = xCompLoader->loadComponentFromURL(component, u"_blank"_ustr, 0, szEmptyArgs);
xComp->dispose();
}
diff --git a/desktop/source/lib/lokclipboard.cxx b/desktop/source/lib/lokclipboard.cxx
index f7d52ba466e2..74374b95d66c 100644
--- a/desktop/source/lib/lokclipboard.cxx
+++ b/desktop/source/lib/lokclipboard.cxx
@@ -77,11 +77,14 @@ LOKClipboard::LOKClipboard()
Sequence<OUString> LOKClipboard::getSupportedServiceNames_static()
{
- Sequence<OUString> aRet{ "com.sun.star.datatransfer.clipboard.LokClipboard" };
+ Sequence<OUString> aRet{ u"com.sun.star.datatransfer.clipboard.LokClipboard"_ustr };
return aRet;
}
-OUString LOKClipboard::getImplementationName() { return "com.sun.star.datatransfer.LOKClipboard"; }
+OUString LOKClipboard::getImplementationName()
+{
+ return u"com.sun.star.datatransfer.LOKClipboard"_ustr;
+}
Sequence<OUString> LOKClipboard::getSupportedServiceNames()
{
@@ -156,7 +159,7 @@ LOKTransferable::LOKTransferable()
{
m_aContent.reserve(1);
m_aFlavors = css::uno::Sequence<css::datatransfer::DataFlavor>(1);
- initFlavourFromMime(m_aFlavors.getArray()[0], "text/plain");
+ initFlavourFromMime(m_aFlavors.getArray()[0], u"text/plain"_ustr);
uno::Any aContent;
aContent <<= OUString();
m_aContent.push_back(aContent);
diff --git a/desktop/source/lib/lokclipboard.hxx b/desktop/source/lib/lokclipboard.hxx
index 699830756acb..0ff955a8c154 100644
--- a/desktop/source/lib/lokclipboard.hxx
+++ b/desktop/source/lib/lokclipboard.hxx
@@ -51,7 +51,7 @@ public:
const css::uno::Reference<css::datatransfer::XTransferable>& xTransferable,
const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner)
override;
- OUString SAL_CALL getName() override { return "CLIPBOARD"; }
+ OUString SAL_CALL getName() override { return u"CLIPBOARD"_ustr; }
// XClipboardEx
sal_Int8 SAL_CALL getRenderingCapabilities() override { return 0; }
diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx
index a05091cedf5e..0680a9dd97f1 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -72,7 +72,7 @@ LOKInteractionHandler::~LOKInteractionHandler()
OUString SAL_CALL LOKInteractionHandler::getImplementationName()
{
- return "com.sun.star.comp.uui.LOKInteractionHandler";
+ return u"com.sun.star.comp.uui.LOKInteractionHandler"_ustr;
}
sal_Bool SAL_CALL LOKInteractionHandler::supportsService(OUString const & rServiceName)
@@ -82,11 +82,11 @@ sal_Bool SAL_CALL LOKInteractionHandler::supportsService(OUString const & rServi
uno::Sequence< OUString > SAL_CALL LOKInteractionHandler::getSupportedServiceNames()
{
- return { "com.sun.star.task.InteractionHandler",
+ return { u"com.sun.star.task.InteractionHandler"_ustr,
// added to indicate support for configuration.backend.MergeRecoveryRequest
- "com.sun.star.configuration.backend.InteractionHandler",
+ u"com.sun.star.configuration.backend.InteractionHandler"_ustr,
// for backwards compatibility
- "com.sun.star.uui.InteractionHandler" };
+ u"com.sun.star.uui.InteractionHandler"_ustr };
}
void SAL_CALL LOKInteractionHandler::initialize(uno::Sequence<uno::Any> const & /*rArguments*/)
@@ -188,7 +188,7 @@ bool LOKInteractionHandler::handleIOException(const css::uno::Sequence<css::uno:
ERRCODE_IO_WRONGVERSION,
};
- postError(aIoException.Classification, "io", aErrorCode[static_cast<int>(aIoException.Code)], "");
+ postError(aIoException.Classification, "io", aErrorCode[static_cast<int>(aIoException.Code)], u""_ustr);
selectApproved(rContinuations);
return true;