diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-25 09:41:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-25 10:53:32 +0100 |
commit | e8227dc4af54c39e871b12f2e846fa54cff11581 (patch) | |
tree | 88a93d4a1cea756eb865f893fe63d87546299b49 | |
parent | 696739056f37430154d6333b8f7228d1c44d09b3 (diff) |
loplugin:stringview (clang-cl)
Change-Id: I47b44c80b2a5e3c9d84f5d7257efe17f138a1067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106563
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | configmgr/source/winreg.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/win32/VistaFilePickerImpl.cxx | 2 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 3 | ||||
-rw-r--r-- | xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 3 |
5 files changed, 8 insertions, 6 deletions
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; } |