[Libreoffice-commits] core.git: configmgr/source fpicker/source jvmfwk/plugins sc/qa xmlsecurity/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 25 09:54:15 UTC 2020


 configmgr/source/winreg.cxx                                       |    2 +-
 fpicker/source/win32/VistaFilePickerImpl.cxx                      |    2 +-
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx               |    4 ++--
 sc/qa/unit/subsequent_export-test.cxx                             |    3 ++-
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |    3 ++-
 5 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit e8227dc4af54c39e871b12f2e846fa54cff11581
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Nov 25 09:41:33 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 25 10:53:32 2020 +0100

    loplugin:stringview (clang-cl)
    
    Change-Id: I47b44c80b2a5e3c9d84f5d7257efe17f138a1067
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106563
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configmgr/source/winreg.cxx b/configmgr/source/winreg.cxx
index 6e4690500996..e5a92d094435 100644
--- a/configmgr/source/winreg.cxx
+++ b/configmgr/source/winreg.cxx
@@ -226,7 +226,7 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString const & aKeyName, TempFile &aFil
                         if(nCommandSeparator != -1)
                         {
                             OUString aNodeOp = aNextPathPart.copy(nCommandSeparator + 1);
-                            writeAttributeValue(aFileHandle, aNextPathPart.copy(0, nCommandSeparator - 1));
+                            writeAttributeValue(aFileHandle, aNextPathPart.subView(0, nCommandSeparator - 1));
                             aFileHandle.writeString("\" oor:op=\"");
                             writeAttributeValue(aFileHandle, aNodeOp);
                         }
diff --git a/fpicker/source/win32/VistaFilePickerImpl.cxx b/fpicker/source/win32/VistaFilePickerImpl.cxx
index d6e10115ac82..7d3b4d014450 100644
--- a/fpicker/source/win32/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/VistaFilePickerImpl.cxx
@@ -996,7 +996,7 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
                         {
                             const sal_Int32 idx = sFilter.indexOf('.');
                             if (idx >= 0)
-                                aFileURL += sFilter.copy(idx);
+                                aFileURL += sFilter.subView(idx);
                         }
                     }
                 }
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index f47b0a3ee4fd..94affa946402 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -482,7 +482,7 @@ static void load_msvcr(OUString const & jvm_dll, std::u16string_view msvcr)
     }
 
     if (LoadLibraryW(
-            o3tl::toW(OUString(jvm_dll.copy(0, slash+1) + msvcr).getStr())))
+            o3tl::toW(OUString(OUString::Concat(jvm_dll.subView(0, slash+1)) + msvcr).getStr())))
         return;
 
     // Then check if msvcr71.dll is in the parent folder of where
@@ -494,7 +494,7 @@ static void load_msvcr(OUString const & jvm_dll, std::u16string_view msvcr)
         return;
 
     (void)LoadLibraryW(
-        o3tl::toW(OUString(jvm_dll.copy(0, slash+1) + msvcr).getStr()));
+        o3tl::toW(OUString(OUString::Concat(jvm_dll.subView(0, slash+1)) + msvcr).getStr()));
 }
 
 // Check if the jvm DLL imports msvcr71.dll, and in that case try
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 36d85d8f2343..02b51df285d5 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3520,7 +3520,8 @@ void ScExportTest::testSupBookVirtualPathXLS()
 
     OUString aFormula = toString(rDoc, aPos, *pCode, rDoc.GetGrammar());
 #ifdef _WIN32
-    aFormula = aFormula.copy(0, 9) + aFormula.copy(12); // strip drive letter, e.g. 'C:/'
+    aFormula = OUString::Concat(aFormula.subView(0, 9)) + aFormula.subView(12);
+        // strip drive letter, e.g. 'C:/'
 #endif
     OUString aExpectedFormula = "'file:///home/timar/Documents/external.xls'#$Sheet1.A1";
     if (aFormula != aExpectedFormula)
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index 0e619b2802f8..de00d18a1930 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -164,7 +164,8 @@ static OUString replaceTagSWithTagST(OUString const & oldDN)
 
     if (pairIndex.first != -1)
     {
-        return oldDN.copy(0, pairIndex.first)+"ST"+oldDN.copy(pairIndex.second);
+        return OUString::Concat(oldDN.subView(0, pairIndex.first))+"ST"
+            +oldDN.subView(pairIndex.second);
     }
     return oldDN;
 }


More information about the Libreoffice-commits mailing list