diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /cppuhelper/source/unourl.cxx | |
parent | WaE: Potentially uninitialized local variable (diff) | |
download | core-8b27d78b4afaa9c47ca0fda144c8060f2f14046b.tar.gz core-8b27d78b4afaa9c47ca0fda144c8060f2f14046b.zip |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'cppuhelper/source/unourl.cxx')
-rw-r--r-- | cppuhelper/source/unourl.cxx | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx index 15e1d11df210..7179256f3a3a 100644 --- a/cppuhelper/source/unourl.cxx +++ b/cppuhelper/source/unourl.cxx @@ -78,8 +78,8 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor) case STATE_NAME0: if (bEnd || !isAlphanum(c)) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL contains bad descriptor name"))); + rtl::OUString( + "UNO URL contains bad descriptor name")); nStart = i; eState = STATE_NAME; break; @@ -93,15 +93,15 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor) } else if (!isAlphanum(c)) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL contains bad descriptor name"))); + rtl::OUString( + "UNO URL contains bad descriptor name")); break; case STATE_KEY0: if (bEnd || !isAlphanum(c)) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL contains bad parameter key"))); + rtl::OUString( + "UNO URL contains bad parameter key")); nStart = i; eState = STATE_KEY; break; @@ -115,8 +115,8 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor) } else if (bEnd || !isAlphanum(c)) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL contains bad parameter key"))); + rtl::OUString( + "UNO URL contains bad parameter key")); break; case STATE_VALUE: @@ -131,8 +131,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor) RTL_TEXTENCODING_UTF8))).second) throw rtl::MalformedUriException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "UNO URL contains duplicated parameter"))); + "UNO URL contains duplicated parameter")); eState = STATE_KEY0; } break; @@ -223,8 +222,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) sal_Int32 j = rUrl.indexOf(';', i); if (j < 0) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL has too few semicolons"))); + rtl::OUString( + "UNO URL has too few semicolons")); SAL_WNODEPRECATED_DECLARATIONS_PUSH std::auto_ptr< UnoUrlDescriptor::Impl > xConnection(new UnoUrlDescriptor::Impl(rUrl.copy(i, j - i))); @@ -233,8 +232,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) j = rUrl.indexOf(0x3B, i); // ';' if (j < 0) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL has too few semicolons"))); + rtl::OUString( + "UNO URL has too few semicolons")); SAL_WNODEPRECATED_DECLARATIONS_PUSH std::auto_ptr< UnoUrlDescriptor::Impl > xProtocol(new UnoUrlDescriptor::Impl(rUrl.copy(i, j - i))); @@ -242,8 +241,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) i = j + 1; if (i == rUrl.getLength()) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL contains empty ObjectName"))); + rtl::OUString( + "UNO URL contains empty ObjectName")); for (j = i; j < rUrl.getLength(); ++j) { sal_Unicode c = rUrl.getStr()[j]; @@ -255,8 +254,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) && c != 0x3F && c != 0x40 && c != 0x5F // '?', '@', '_' && c != 0x7E) // '~' throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL contains invalid ObjectName"))); + rtl::OUString( + "UNO URL contains invalid ObjectName")); } return new Impl(xConnection, xProtocol, rUrl.copy(i)); } |