diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-09 09:55:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-10 12:59:38 +0200 |
commit | e4ff847fe0796420ba8023b70cad8589f5f19e9f (patch) | |
tree | 136786200de69f70dde4190c9725f35fe14b33e0 /filter | |
parent | 5a89496ffcfcd561b3e595e01f35e0302fa00841 (diff) |
loplugin:stringview check for getToken and trim
since we now have o3tl versions of those that work on
string_view.
Also improve those o3tl functions to support both string_view
and u16string_view
Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 9e7d5a5cb10d..9f889924cfb6 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -37,6 +37,7 @@ #include <xmloff/namespacemap.hxx> #include <xmloff/unointerfacetouniqueidentifiermapper.hxx> #include <i18nlangtag/languagetag.hxx> +#include <o3tl/string_view.hxx> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XIndexReplace.hpp> @@ -3701,7 +3702,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, // Both the pattern and the rectangle are embedded in a <defs> element. // The comment content has the following format: "SLIDE_BACKGROUND <background-id>" const OString& sComment = pA->GetComment(); - OUString sRefId = "#" + OUString::fromUtf8( sComment.getToken(1, ' ') ); + OUString sRefId = "#" + OUString::fromUtf8( o3tl::getToken(sComment, 1, ' ') ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, sRefId ); SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true ); |