summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /uui
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl-ioexceptions.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/uui/source/iahndl-ioexceptions.cxx b/uui/source/iahndl-ioexceptions.cxx
index 6da1ea3a6fab..e15c9e457746 100644
--- a/uui/source/iahndl-ioexceptions.cxx
+++ b/uui/source/iahndl-ioexceptions.cxx
@@ -33,7 +33,7 @@ namespace {
template<class T>
bool
getRequestArgument(uno::Sequence< uno::Any > const & rArguments,
- OUString const & rKey,
+ std::u16string_view rKey,
T * pValue)
{
for (const auto& rArgument : rArguments)
@@ -57,11 +57,11 @@ bool
getResourceNameRequestArgument(uno::Sequence< uno::Any > const & rArguments,
OUString * pValue)
{
- if (!getRequestArgument(rArguments, "Uri", pValue))
+ if (!getRequestArgument(rArguments, u"Uri", pValue))
return false;
// Use the resource name only for file URLs, to avoid confusion:
if (pValue && comphelper::isFileUrl(*pValue))
- getRequestArgument(rArguments, "ResourceName", pValue);
+ getRequestArgument(rArguments, u"ResourceName", pValue);
return true;
}
@@ -162,7 +162,7 @@ UUIInteractionHelper::handleInteractiveIOException(
case ucb::IOErrorCode_CANT_CREATE:
{
OUString aArgFolder;
- if (getRequestArgument(aRequestArguments, "Folder", &aArgFolder))
+ if (getRequestArgument(aRequestArguments, u"Folder", &aArgFolder))
{
OUString aArgUri;
if (getResourceNameRequestArgument(aRequestArguments,
@@ -191,9 +191,9 @@ UUIInteractionHelper::handleInteractiveIOException(
&aArgUri))
{
OUString aResourceType;
- getRequestArgument(aRequestArguments, "ResourceType", &aResourceType);
+ getRequestArgument(aRequestArguments, u"ResourceType", &aResourceType);
bool bRemovable = false;
- getRequestArgument(aRequestArguments, "Removable", &bRemovable);
+ getRequestArgument(aRequestArguments, u"Removable", &bRemovable);
nErrorCode = aResourceType == "volume"
? (bRemovable
? ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE
@@ -212,8 +212,8 @@ UUIInteractionHelper::handleInteractiveIOException(
{
OUString aArgVolume;
OUString aArgOtherVolume;
- if (getRequestArgument(aRequestArguments, "Volume", &aArgVolume)
- && getRequestArgument(aRequestArguments, "OtherVolume",
+ if (getRequestArgument(aRequestArguments, u"Volume", &aArgVolume)
+ && getRequestArgument(aRequestArguments, u"OtherVolume",
&aArgOtherVolume))
{
nErrorCode = aErrorCode[static_cast<sal_Int32>(aIoException.Code)][1];
@@ -233,7 +233,7 @@ UUIInteractionHelper::handleInteractiveIOException(
&aArgUri))
{
OUString aResourceType;
- getRequestArgument(aRequestArguments, "ResourceType",
+ getRequestArgument(aRequestArguments, u"ResourceType",
&aResourceType);
nErrorCode = aResourceType == "volume"
? ERRCODE_UUI_IO_NOTEXISTS_VOLUME