summaryrefslogtreecommitdiff
path: root/svgio/source/svgreader/svgstylenode.cxx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-07-07 14:45:01 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-07-08 09:38:27 +0200
commit911ac42485b690df5cbbff6e3c04b111c1723aca (patch)
tree6a4561194584423507b9229c0b17aeca70f1111c /svgio/source/svgreader/svgstylenode.cxx
parent11071d95f4f3cbe578c3393729c42b7cce011b45 (diff)
svgio: use IgnoreAsciiCase when checking these values
They are also valid when uppercase OTOH, use equalsIgnoreAsciiCase along with trim() instead of startsWithIgnoreAsciiCase since " round " should be valid but "rounded" shouldn't Change-Id: If4060a23a1cf41833264051094103e37927d14c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136881 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/source/svgreader/svgstylenode.cxx')
-rw-r--r--svgio/source/svgreader/svgstylenode.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svgio/source/svgreader/svgstylenode.cxx b/svgio/source/svgreader/svgstylenode.cxx
index f9d33d61ced3..474b0a0e92e8 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -19,6 +19,7 @@
#include <svgstylenode.hxx>
#include <svgdocument.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
namespace svgio::svgreader
@@ -56,7 +57,7 @@ namespace svgio::svgreader
{
if(!aContent.isEmpty())
{
- if(aContent.startsWith("text/css"))
+ if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"text/css"))
{
setTextCss(true);
}