summaryrefslogtreecommitdiff
path: root/starmath/source/mathml/mathmlimport.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-19 15:11:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-19 18:14:15 +0200
commite6fe048ded34a322007547d4d31e32c598aa4993 (patch)
tree4f494edb0100a1023fa752737f67ced855bcb8a5 /starmath/source/mathml/mathmlimport.cxx
parent33a699c8f3605c8506cdde6918bfbb4b59ab79b2 (diff)
Some more string_view use, add o3tl::starts/ends_with
...until those C++20 string_view member functions are generally available (the fallback implementations are taken directly from the C++20 spec). (In ParseMathMLAttributeLengthValue in starmath/source/mathml/mathmlattr.cxx, returning nIdx + 2 instead of nIdx + 1 for the single-character u'%' case was presumably a typo, but which was harmless as the return value was only checked for <= 0, and has now been turned into a bool.) Change-Id: Ib441e474c515f016a4d81bb39f7821dfe0356499 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122322 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'starmath/source/mathml/mathmlimport.cxx')
-rw-r--r--starmath/source/mathml/mathmlimport.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx
index e2db20a6d376..7315c96808ba 100644
--- a/starmath/source/mathml/mathmlimport.cxx
+++ b/starmath/source/mathml/mathmlimport.cxx
@@ -1522,7 +1522,7 @@ void SmXMLSpaceContext_Impl::startFastElement(
switch (aIter.getToken())
{
case XML_WIDTH:
- if (ParseMathMLAttributeLengthValue(sValue.trim(), aLV) <= 0
+ if (!ParseMathMLAttributeLengthValue(sValue.trim(), aLV)
|| !lcl_CountBlanks(aLV, &nWide, &nNarrow))
SAL_WARN("starmath", "ignore mspace's width: " << sValue);
break;