summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-30 14:11:42 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-30 16:04:49 +0100
commite5022a5e5225dca593e0d00ec1eaab903c5065ea (patch)
tree8b5074b7d775a21e9d14226fbd95d3cdab2b9e55 /shell
parent244a447734d2abae8896884d4ab73eb4510d243c (diff)
loplugin:stringviewparam (Library_kf5be1)
Change-Id: Iaeaca5564f39863343cbb901be87dfd651c241ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106863 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/backends/kf5be/kf5access.cxx28
-rw-r--r--shell/source/backends/kf5be/kf5access.hxx4
2 files changed, 17 insertions, 15 deletions
diff --git a/shell/source/backends/kf5be/kf5access.cxx b/shell/source/backends/kf5be/kf5access.cxx
index 27d047d640d1..67056ad5544b 100644
--- a/shell/source/backends/kf5be/kf5access.cxx
+++ b/shell/source/backends/kf5be/kf5access.cxx
@@ -54,9 +54,9 @@ OUString fromQStringToOUString(QString const& s)
}
}
-css::beans::Optional<css::uno::Any> getValue(OUString const& id)
+css::beans::Optional<css::uno::Any> getValue(std::u16string_view id)
{
- if (id == "ExternalMailer")
+ if (id == u"ExternalMailer")
{
KEMailSettings aEmailSettings;
QString aClientProgram;
@@ -70,27 +70,27 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
sClientProgram = fromQStringToOUString(aClientProgram);
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(sClientProgram));
}
- else if (id == "SourceViewFontHeight")
+ else if (id == u"SourceViewFontHeight")
{
const QFont aFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
const short nFontHeight = aFixedFont.pointSize();
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(nFontHeight));
}
- else if (id == "SourceViewFontName")
+ else if (id == u"SourceViewFontName")
{
const QFont aFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
const QString aFontName = aFixedFont.family();
const OUString sFontName = fromQStringToOUString(aFontName);
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(sFontName));
}
- else if (id == "EnableATToolSupport")
+ else if (id == u"EnableATToolSupport")
{
/* does not make much sense without an accessibility bridge */
bool ATToolSupport = false;
return css::beans::Optional<css::uno::Any>(true,
uno::makeAny(OUString::boolean(ATToolSupport)));
}
- else if (id == "WorkPathVariable")
+ else if (id == u"WorkPathVariable")
{
QString aDocumentsDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
if (aDocumentsDir.isEmpty())
@@ -103,7 +103,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
osl_getFileURLFromSystemPath(sDocumentsDir.pData, &sDocumentsURL.pData);
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(sDocumentsURL));
}
- else if (id == "ooInetFTPProxyName")
+ else if (id == u"ooInetFTPProxyName")
{
QString aFTPProxy;
switch (KProtocolManager::proxyType())
@@ -130,7 +130,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(sProxy));
}
}
- else if (id == "ooInetFTPProxyPort")
+ else if (id == u"ooInetFTPProxyPort")
{
QString aFTPProxy;
switch (KProtocolManager::proxyType())
@@ -157,7 +157,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(nPort));
}
}
- else if (id == "ooInetHTTPProxyName")
+ else if (id == u"ooInetHTTPProxyName")
{
QString aHTTPProxy;
switch (KProtocolManager::proxyType())
@@ -184,7 +184,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(sProxy));
}
}
- else if (id == "ooInetHTTPProxyPort")
+ else if (id == u"ooInetHTTPProxyPort")
{
QString aHTTPProxy;
switch (KProtocolManager::proxyType())
@@ -211,7 +211,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(nPort));
}
}
- else if (id == "ooInetHTTPSProxyName")
+ else if (id == u"ooInetHTTPSProxyName")
{
QString aHTTPSProxy;
switch (KProtocolManager::proxyType())
@@ -238,7 +238,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(sProxy));
}
}
- else if (id == "ooInetHTTPSProxyPort")
+ else if (id == u"ooInetHTTPSProxyPort")
{
QString aHTTPSProxy;
switch (KProtocolManager::proxyType())
@@ -265,7 +265,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(nPort));
}
}
- else if (id == "ooInetNoProxy")
+ else if (id == u"ooInetNoProxy")
{
QString aNoProxyFor;
switch (KProtocolManager::proxyType())
@@ -288,7 +288,7 @@ css::beans::Optional<css::uno::Any> getValue(OUString const& id)
return css::beans::Optional<css::uno::Any>(true, uno::makeAny(sNoProxyFor));
}
}
- else if (id == "ooInetProxyType")
+ else if (id == u"ooInetProxyType")
{
sal_Int32 nProxyType;
switch (KProtocolManager::proxyType())
diff --git a/shell/source/backends/kf5be/kf5access.hxx b/shell/source/backends/kf5be/kf5access.hxx
index 77e55fad5dda..765d9c706d4e 100644
--- a/shell/source/backends/kf5be/kf5access.hxx
+++ b/shell/source/backends/kf5be/kf5access.hxx
@@ -22,6 +22,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <com/sun/star/beans/Optional.hpp>
namespace com::sun::star::uno
@@ -31,7 +33,7 @@ class Any;
namespace kf5access
{
-css::beans::Optional<css::uno::Any> getValue(OUString const& id);
+css::beans::Optional<css::uno::Any> getValue(std::u16string_view id);
}
#endif