diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-02 08:45:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-02 12:57:28 +0200 |
commit | ae29e471ca0f8ccdd7a1906ce200dd24d96d2a5d (patch) | |
tree | 806aaa4a5ee094aa60da746b70ead682450bb8d3 /framework/source/dispatch/systemexec.cxx | |
parent | 287680683ca266f1fb4f447ac9bdaf76669d559d (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: I63a4b050f220f0a61749892cd47fb91813f7d088
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/dispatch/systemexec.cxx')
-rw-r--r-- | framework/source/dispatch/systemexec.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx index ec2d20413614..7ee48b7fc676 100644 --- a/framework/source/dispatch/systemexec.cxx +++ b/framework/source/dispatch/systemexec.cxx @@ -29,8 +29,7 @@ namespace framework{ -#define PROTOCOL_VALUE "systemexecute:" -#define PROTOCOL_LENGTH 14 +constexpr OUStringLiteral PROTOCOL_VALUE = u"systemexecute:"; // XInterface, XTypeProvider, XServiceInfo @@ -93,13 +92,13 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL& const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) { // convert "systemexec:file:///c:/temp/test.html" => "file:///c:/temp/test.html" - sal_Int32 c = aURL.Complete.getLength()-PROTOCOL_LENGTH; + sal_Int32 c = aURL.Complete.getLength()-PROTOCOL_VALUE.getLength(); if (c<1) // we don't check for valid URLs here! The system will show an error message ... { impl_notifyResultListener(xListener, css::frame::DispatchResultState::FAILURE); return; } - OUString sSystemURLWithVariables = aURL.Complete.copy(PROTOCOL_LENGTH, c); + OUString sSystemURLWithVariables = aURL.Complete.copy(PROTOCOL_VALUE.getLength(), c); // TODO check security settings ... |