summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-01-07 16:42:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-07 19:45:35 +0100
commit0701aca589b819b845d08ea60263ad89718cfd7f (patch)
treef191b28d43c6498783c044b67b58c72c6c0053ae /xmloff
parent1d9128b6d712669185f402314e5fb57130d4ba5a (diff)
Use o3tl::temporary in calls to OUString::iterateCodePoints
...that are not interested in the updated *indexUtf16 value Change-Id: Iaaa0fe45dcb54c4a8a347bcdb6fca6041218d009 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108941 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnume.cxx5
-rw-r--r--xmloff/source/style/xmlnumi.cxx4
2 files changed, 4 insertions, 5 deletions
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 2aac21253218..6c619fbc3b9c 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <o3tl/any.hxx>
-
+#include <o3tl/temporary.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
@@ -127,8 +127,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
rProp.Value >>= sValue;
if( !sValue.isEmpty() )
{
- sal_Int32 nIndexUtf16 = 0;
- cBullet = sValue.iterateCodePoints(&nIndexUtf16);
+ cBullet = sValue.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
}
}
else if( rProp.Name == "BulletRelSize" )
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 3d2cc5807789..7688ea74ac67 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/container/XIndexReplace.hpp>
#include <o3tl/any.hxx>
+#include <o3tl/temporary.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
@@ -273,8 +274,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
case XML_ELEMENT(TEXT, XML_BULLET_CHAR):
if (!aIter.isEmpty())
{
- sal_Int32 nIndexUtf16 = 0;
- cBullet = aIter.toString().iterateCodePoints(&nIndexUtf16);
+ cBullet = aIter.toString().iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
}
break;
case XML_ELEMENT(XLINK, XML_HREF):