summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 15:08:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-02 14:43:58 +0200
commit1597cc5b3e07dd24cb4cb10b35b1e93545e4b929 (patch)
treef6ed37244e41d23e8a84327b1580e37f3dc18829 /ucbhelper
parent0e883d6dbee8d72257f77605ae0c8a1d5bfbf044 (diff)
convert #defines to OUStringLiteral
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/client/proxydecider.cxx28
1 files changed, 13 insertions, 15 deletions
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 829480e55c25..7a363a0962f7 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -47,15 +47,15 @@
using namespace com::sun::star;
using namespace ucbhelper;
-#define CONFIG_ROOT_KEY "org.openoffice.Inet/Settings"
-#define PROXY_TYPE_KEY "ooInetProxyType"
-#define NO_PROXY_LIST_KEY "ooInetNoProxy"
-#define HTTP_PROXY_NAME_KEY "ooInetHTTPProxyName"
-#define HTTP_PROXY_PORT_KEY "ooInetHTTPProxyPort"
-#define HTTPS_PROXY_NAME_KEY "ooInetHTTPSProxyName"
-#define HTTPS_PROXY_PORT_KEY "ooInetHTTPSProxyPort"
-#define FTP_PROXY_NAME_KEY "ooInetFTPProxyName"
-#define FTP_PROXY_PORT_KEY "ooInetFTPProxyPort"
+constexpr OUStringLiteral CONFIG_ROOT_KEY = u"org.openoffice.Inet/Settings";
+constexpr OUStringLiteral PROXY_TYPE_KEY = u"ooInetProxyType";
+constexpr OUStringLiteral NO_PROXY_LIST_KEY = u"ooInetNoProxy";
+constexpr OUStringLiteral HTTP_PROXY_NAME_KEY = u"ooInetHTTPProxyName";
+constexpr OUStringLiteral HTTP_PROXY_PORT_KEY = u"ooInetHTTPProxyPort";
+constexpr OUStringLiteral HTTPS_PROXY_NAME_KEY = u"ooInetHTTPSProxyName";
+constexpr OUStringLiteral HTTPS_PROXY_PORT_KEY = u"ooInetHTTPSProxyPort";
+constexpr OUStringLiteral FTP_PROXY_NAME_KEY = u"ooInetFTPProxyName";
+constexpr OUStringLiteral FTP_PROXY_PORT_KEY = u"ooInetFTPProxyPort";
namespace ucbhelper
@@ -233,13 +233,12 @@ bool WildCard::Matches( std::u16string_view rString ) const
static bool getConfigStringValue(
const uno::Reference< container::XNameAccess > & xNameAccess,
- const char * key,
+ const OUString& key,
OUString & value )
{
try
{
- if ( !( xNameAccess->getByName( OUString::createFromAscii( key ) )
- >>= value ) )
+ if ( !( xNameAccess->getByName( key ) >>= value ) )
{
OSL_FAIL( "InternetProxyDecider - "
"Error getting config item value!" );
@@ -260,13 +259,12 @@ static bool getConfigStringValue(
static bool getConfigInt32Value(
const uno::Reference< container::XNameAccess > & xNameAccess,
- const char * key,
+ const OUString& key,
sal_Int32 & value )
{
try
{
- uno::Any aValue = xNameAccess->getByName(
- OUString::createFromAscii( key ) );
+ uno::Any aValue = xNameAccess->getByName( key );
if ( aValue.hasValue() && !( aValue >>= value ) )
{
OSL_FAIL( "InternetProxyDecider - "