summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-02 19:02:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-03 10:01:48 +0200
commit3e1e0af376d45f44dab975cea943de7fb676f967 (patch)
tree3a1e0f7cf57ee323b8cdde8ac02a010d1e02f0b3 /oox
parent744722123a8ce3d3c30583ba1285a21e129b471f (diff)
loplugin:stringviewparam convert methods using match
which converts to a combination of substr and o3tl::starts_with Change-Id: I5b01a181b9e6bee3483e4f49f1a9426abcc682d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132458 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/vmlexport.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index c23604b6cb19..544a5599c932 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -39,6 +39,7 @@
#include <filter/msfilter/msdffimp.hxx>
#include <filter/msfilter/util.hxx>
#include <filter/msfilter/escherex.hxx>
+#include <o3tl/string_view.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -203,11 +204,11 @@ void VMLExport::AddShape( sal_uInt32 nShapeType, ShapeFlag nShapeFlags, sal_uInt
}
}
-bool VMLExport::IsWaterMarkShape(const OUString& rStr)
+bool VMLExport::IsWaterMarkShape(std::u16string_view rStr)
{
- if (rStr.isEmpty() ) return false;
+ if (rStr.empty() ) return false;
- return rStr.match("PowerPlusWaterMarkObject") || rStr.match("WordPictureWatermark");
+ return o3tl::starts_with(rStr, u"PowerPlusWaterMarkObject") || o3tl::starts_with(rStr, u"WordPictureWatermark");
}
void VMLExport::OverrideShapeIDGen(bool bOverrideShapeIdGen, const OString& sShapeIDPrefix)