summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-11 22:24:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:42:15 +0200
commitcbaf1fbaa6e707d939f815eda360fad68a492aca (patch)
tree20b3dfeac257130afb01572b2c117b7840d07007 /svgio
parentf751417b77e6573a0c639778e76ec943449f4573 (diff)
loplugin:stringview more o3tl conversion
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/source/svgreader/svgtextpathnode.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index 925bfc4d1944..3b341eea3d40 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -27,6 +27,7 @@
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <basegfx/curve/b2dcubicbezier.hxx>
#include <basegfx/curve/b2dbeziertools.hxx>
+#include <o3tl/string_view.hxx>
namespace svgio::svgreader
{
@@ -149,7 +150,7 @@ namespace svgio::svgreader
if(basegfx::fTools::more(fSnippetWidth, 0.0))
{
const OUString aText(getSource().getText());
- const OUString aTrimmedChars(aText.copy(nIndex, nLength).trim());
+ const OUString aTrimmedChars(o3tl::trim(aText.subView(nIndex, nLength)));
const double fEndPos(mfPosition + fSnippetWidth);
if(!aTrimmedChars.isEmpty() && (mfPosition < mfBasegfxPathLength || fEndPos > 0.0))