basctl/source/basicide/scriptdocument.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 9fa9a510f9a391979a1f5f25ae1b5f4392db7692
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Feb 13 08:54:27 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Feb 13 06:51:34 2023 +0000

    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.kagan...@collabora.com>

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 );

Reply via email to