diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-13 08:54:27 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-13 06:51:34 +0000 |
commit | 9fa9a510f9a391979a1f5f25ae1b5f4392db7692 (patch) | |
tree | 7232b0079627d0803374d89410c46f472dd07bbb | |
parent | 30a215f3cee1acdb4df3285512603abede8d3ff1 (diff) |
Use startsWithIgnoreAsciiCase with last argument to simplify
Change-Id: Ifa1261ed76ec078a60fcdbd4ce806abe23e4c056
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146850
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | basctl/source/basicide/scriptdocument.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 4136ced4c18e..c435d7a57da7 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -928,10 +928,9 @@ namespace basctl } else if ( aScheme.equalsIgnoreAsciiCase("vnd.sun.star.pkg") ) { - OUString aAuthority = xUriRef->getAuthority(); - if ( aAuthority.matchIgnoreAsciiCase("vnd.sun.star.expand:") ) + OUString aDecodedURL = xUriRef->getAuthority(); + if (aDecodedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", &aDecodedURL)) { - OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) ); aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); Reference< XMacroExpander > xMacroExpander = theMacroExpander::get(xContext); aFileURL = xMacroExpander->expandMacros( aDecodedURL ); |