lotuswordpro/inc/lwptools.hxx           |    3 ++-
 lotuswordpro/source/filter/lwptools.cxx |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f8b6d1a2f48ce259ba2e75d41777293dfe23ab11
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Sep 22 21:24:51 2021 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Sep 22 23:22:54 2021 +0200

    Extend loplugin:stringviewparam to starts/endsWith: lotuswordpro
    
    Change-Id: Ia58c031d1157af271c664948946fa5d8d17a2323
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122493
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/lotuswordpro/inc/lwptools.hxx b/lotuswordpro/inc/lwptools.hxx
index 3ac63055b740..753a9bacdd06 100644
--- a/lotuswordpro/inc/lwptools.hxx
+++ b/lotuswordpro/inc/lwptools.hxx
@@ -69,6 +69,7 @@
 #include "xfilter/xftimestyle.hxx"
 #include <rtl/textenc.h>
 #include <stdexcept>
+#include <string_view>
 
 // 01/19/2005
 const sal_uInt32 UNITS_PER_INCH = 65536L * 72L;
@@ -97,7 +98,7 @@ public:
     inline static bool IsOddNumber(sal_uInt16 nNumber);
     inline static bool IsEvenNumber(sal_uInt16 nNumber);
 
-    static bool isFileUrl(const OString& fileName);
+    static bool isFileUrl(std::string_view fileName);
     static OUString convertToFileUrl(const OString& fileName);
     static OUString    DateTimeToOUString(const LtTm& dt);
 
diff --git a/lotuswordpro/source/filter/lwptools.cxx 
b/lotuswordpro/source/filter/lwptools.cxx
index 254d7fc7f6eb..9af6d1b4ffb3 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -60,6 +60,7 @@
 
 #include <lwptools.hxx>
 #include <rtl/ustrbuf.hxx>
+#include <o3tl/string_view.hxx>
 #include <osl/process.h>
 #include <osl/thread.h>
 #include <osl/file.hxx>
@@ -195,9 +196,9 @@ bool LwpTools::IsUnicodePacked(LwpObjectStream* pObjStrm, 
sal_uInt16 len)
     return false;
 }
 
-bool LwpTools::isFileUrl(const OString &fileName)
+bool LwpTools::isFileUrl(std::string_view fileName)
 {
-    return fileName.startsWith("file://");
+    return o3tl::starts_with(fileName, "file://");
 }
 
 OUString LwpTools::convertToFileUrl(const OString &fileName)

Reply via email to