[Libreoffice-commits] core.git: connectivity/source embeddedobj/source vcl/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 12 20:09:48 UTC 2021


 connectivity/source/drivers/ado/adoimp.cxx  |    2 +-
 embeddedobj/source/msole/xdialogcreator.cxx |    7 ++++++-
 vcl/source/treelist/transfer.cxx            |    4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 695afb787681c9f288856a1a00fe6041614172d2
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jan 12 15:31:49 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Jan 12 21:09:02 2021 +0100

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

diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx
index 1e368d8ddec9..0b4936e734f2 100644
--- a/connectivity/source/drivers/ado/adoimp.cxx
+++ b/connectivity/source/drivers/ado/adoimp.cxx
@@ -69,7 +69,7 @@ const IID ADOS::IID_ADOVIEW_25              =   MYADOID(0x00000613);
 
 OLEString& ADOS::GetKeyStr()
 {
-    static OLEString sKeyStr(OUString("gxwaezucfyqpwjgqbcmtsncuhwsnyhiohwxz"));
+    static OLEString sKeyStr(u"gxwaezucfyqpwjgqbcmtsncuhwsnyhiohwxz");
     return sKeyStr;
 }
 
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx
index 415039c3f1fc..2d162cf9608e 100644
--- a/embeddedobj/source/msole/xdialogcreator.cxx
+++ b/embeddedobj/source/msole/xdialogcreator.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <string_view>
+
 #include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
 #include <com/sun/star/embed/EntryInitModes.hpp>
@@ -189,7 +193,8 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia
     }
     else
     {
-        OUString aFileName = OStringToOUString( OString( szFile ), osl_getThreadTextEncoding() );
+        OUString aFileName
+            = OStringToOUString( std::string_view( szFile ), osl_getThreadTextEncoding() );
         OUString aFileURL;
         if ( osl::FileBase::getFileURLFromSystemPath( aFileName, aFileURL ) != osl::FileBase::E_None )
             throw uno::RuntimeException();
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index eb8a0e6880bb..0c639cd60fa0 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1969,8 +1969,8 @@ bool TransferableDataHelper::GetINetBookmark( const css::datatransfer::DataFlavo
                                     bSttFnd = true;
                                 else if (bSttFnd && aLine.copy(0, 4).equalsIgnoreAsciiCase("URL="))
                                 {
-                                    rBmk = INetBookmark( OStringToOUString(aLine.copy(4), eTextEncoding),
-                                                         OStringToOUString(aDesc.copy(0, aDesc.getLength() - 4), eTextEncoding) );
+                                    rBmk = INetBookmark( OStringToOUString(aLine.subView(4), eTextEncoding),
+                                                         OStringToOUString(aDesc.subView(0, aDesc.getLength() - 4), eTextEncoding) );
                                     bRet = true;
                                     break;
                                 }


More information about the Libreoffice-commits mailing list