[Libreoffice-commits] core.git: cui/source editeng/source i18npool/source sc/source starmath/source svx/source sw/source xmloff/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 7 18:46:20 UTC 2021
cui/source/dialogs/cuicharmap.cxx | 10 +++-----
cui/source/tabpages/autocdlg.cxx | 7 ++---
cui/source/tabpages/numpages.cxx | 5 ++--
editeng/source/uno/unonrule.cxx | 4 +--
i18npool/source/breakiterator/xdictionary.cxx | 5 +---
i18npool/source/indexentry/indexentrysupplier_asian.cxx | 5 ++--
i18npool/source/indexentry/indexentrysupplier_common.cxx | 4 +--
i18npool/source/indexentry/indexentrysupplier_default.cxx | 4 +--
i18npool/source/localedata/LocaleNode.cxx | 17 +++++---------
i18npool/source/transliteration/transliteration_body.cxx | 4 +--
sc/source/core/tool/interpr1.cxx | 4 +--
starmath/source/dialog.cxx | 4 +--
svx/source/accessibility/charmapacc.cxx | 4 +--
svx/source/sidebar/nbdtmg.cxx | 9 ++++---
sw/source/filter/ww8/ww8par2.cxx | 5 ++--
sw/source/filter/ww8/ww8par3.cxx | 5 ++--
sw/source/uibase/wrtsh/delete.cxx | 7 ++---
xmloff/source/style/xmlnume.cxx | 5 +---
xmloff/source/style/xmlnumi.cxx | 4 +--
19 files changed, 54 insertions(+), 58 deletions(-)
New commits:
commit 0701aca589b819b845d08ea60263ad89718cfd7f
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jan 7 16:42:41 2021 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jan 7 19:45:35 2021 +0100
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 at redhat.com>
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index d674cda9c48f..83931f69e9e2 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -30,6 +30,7 @@
#include <vcl/fontcharmap.hxx>
#include <vcl/virdev.hxx>
#include <svl/stritem.hxx>
+#include <o3tl/temporary.hxx>
#include <officecfg/Office/Common.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/processfactory.hxx>
@@ -209,8 +210,7 @@ void SvxCharacterMap::SetChar( sal_UCS4 c )
sal_UCS4 SvxCharacterMap::GetChar() const
{
- sal_Int32 nIndexUtf16 = 0;
- return m_aShowChar.GetText().iterateCodePoints(&nIndexUtf16);
+ return m_aShowChar.GetText().iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
}
void SvxCharacterMap::DisableFontSelection()
@@ -619,8 +619,7 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
} else {
- sal_Int32 tmp = 0;
- sal_UCS4 cChar = sGlyph.iterateCodePoints(&tmp);
+ sal_UCS4 cChar = sGlyph.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
const SfxItemPool* pPool = m_xOutputSet->GetPool();
m_xOutputSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), sGlyph ) );
m_xOutputSet->Put( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(),
@@ -874,8 +873,7 @@ IMPL_LINK(SvxCharacterMap, CharClickHdl, SvxCharView*, rView, void)
// Get the hexadecimal code
OUString charValue = rView->GetText();
- sal_Int32 tmp = 1;
- sal_UCS4 cChar = charValue.iterateCodePoints(&tmp, -1);
+ sal_UCS4 cChar = charValue.iterateCodePoints(&o3tl::temporary(sal_Int32(1)), -1);
OUString aHexText = OUString::number(cChar, 16).toAsciiUpperCase();
// Get the decimal code
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index e954372e7e84..f17c472fc25d 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -36,6 +36,7 @@
#include <svx/SmartTagMgr.hxx>
#include <com/sun/star/smarttags/XSmartTagRecognizer.hpp>
#include <rtl/strbuf.hxx>
+#include <o3tl/temporary.hxx>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
@@ -463,14 +464,12 @@ bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet* )
bModified |= aBulletFont != pOpt->aBulletFont;
pOpt->aBulletFont = aBulletFont;
bModified |= sBulletChar != OUString(&pOpt->cBullet, 1);
- sal_Int32 index = 0;
- pOpt->cBullet = sBulletChar.iterateCodePoints(&index);
+ pOpt->cBullet = sBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
bModified |= aByInputBulletFont != pOpt->aByInputBulletFont;
bModified |= sByInputBulletChar != OUString(&pOpt->cByInputBullet, 1);
pOpt->aByInputBulletFont = aByInputBulletFont;
- index = 0;
- pOpt->cByInputBullet = sByInputBulletChar.iterateCodePoints(&index);
+ pOpt->cByInputBullet = sByInputBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
bCheck = m_xCheckLB->get_toggle(MERGE_SINGLE_LINE_PARA, CBCOL_FIRST) == TRISTATE_TRUE;
bModified |= pOpt->bRightMargin != bCheck;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index dd699b85428d..48f1a246b0ce 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -68,6 +68,7 @@
#include <vcl/graphicfilter.hxx>
#include <svx/SvxNumOptionsTabPageHelper.hxx>
#include <tools/urlobj.hxx>
+#include <o3tl/temporary.hxx>
#include <osl/diagnose.h>
using namespace css;
@@ -688,9 +689,9 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
else
aFmt.SetBulletFont( &rActBulletFont );
- sal_Int32 nIndexUtf16 = 0;
aFmt.SetBulletChar( !pLevelSettings->sBulletChar.isEmpty()
- ? pLevelSettings->sBulletChar.iterateCodePoints(&nIndexUtf16)
+ ? pLevelSettings->sBulletChar.iterateCodePoints(
+ &o3tl::temporary(sal_Int32(0)))
: 0 );
aFmt.SetCharFormatName( sBulletCharFormatName );
aFmt.SetBulletRelSize(45);
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 03b766d446d7..761fa305e3f4 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -43,6 +43,7 @@
#include <editeng/editids.hrc>
#include <editeng/numdef.hxx>
#include <o3tl/enumarray.hxx>
+#include <o3tl/temporary.hxx>
#include <memory>
using ::com::sun::star::util::XCloneable;
@@ -324,8 +325,7 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex(const Sequence<beans::Propert
{
if(!aStr.isEmpty())
{
- sal_Int32 nIndexUtf16 = 0;
- aFmt.SetBulletChar(aStr.iterateCodePoints(&nIndexUtf16));
+ aFmt.SetBulletChar(aStr.iterateCodePoints(&o3tl::temporary(sal_Int32(0))));
}
else
{
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 947a23c5073b..25dc8bb0ee9b 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -18,7 +18,7 @@
*/
#include <config_folders.h>
-
+#include <o3tl/temporary.hxx>
#include <osl/file.h>
#include <osl/module.h>
#include <osl/mutex.hxx>
@@ -447,8 +447,7 @@ Boundary const & xdictionary::getWordBoundary(const OUString& rText, sal_Int32 a
// if bDirection is false
if (!bDirection && startPos > 0 && startPos == (anyPos - boundary.startPos))
{
- sal_Int32 indexUtf16 = anyPos-1;
- sal_uInt32 ch = rText.iterateCodePoints(&indexUtf16);
+ sal_uInt32 ch = rText.iterateCodePoints(&o3tl::temporary(sal_Int32(anyPos-1)));
if (u_isWhitespace(ch))
i--;
}
diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
index ed7e74f63d0b..abe6c490e5b2 100644
--- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
@@ -17,7 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+#include <o3tl/temporary.hxx>
#include <rtl/ustrbuf.hxx>
#include <collatorImpl.hxx>
#include <indexentrysupplier_asian.hxx>
@@ -80,8 +82,7 @@ OUString SAL_CALL
IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry,
const Locale& rLocale, const OUString& rAlgorithm )
{
- sal_Int32 i=0;
- sal_uInt32 ch = rIndexEntry.iterateCodePoints(&i, 0);
+ sal_uInt32 ch = rIndexEntry.iterateCodePoints(&o3tl::temporary(sal_Int32(0)), 0);
sal_uInt16** (*func)(sal_Int16*)=nullptr;
#ifndef DISABLE_DYNLOADING
diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx
index 3d11a4ac2836..b7c08a0ed82a 100644
--- a/i18npool/source/indexentry/indexentrysupplier_common.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx
@@ -21,6 +21,7 @@
#include <indexentrysupplier_common.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <localedata.hxx>
+#include <o3tl/temporary.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
@@ -72,8 +73,7 @@ sal_Bool SAL_CALL IndexEntrySupplier_Common::loadAlgorithm( const lang::Locale&
OUString SAL_CALL IndexEntrySupplier_Common::getIndexKey( const OUString& rIndexEntry,
const OUString&, const lang::Locale& )
{
- sal_Int32 nPos=0;
- sal_uInt32 indexChar=rIndexEntry.iterateCodePoints(&nPos, 0);
+ sal_uInt32 indexChar=rIndexEntry.iterateCodePoints(&o3tl::temporary(sal_Int32(0)), 0);
return OUString(&indexChar, 1);
}
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 519c99ce860e..5e541f139708 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -22,6 +22,7 @@
#include <localedata.hxx>
#include <i18nutil/unicode.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
+#include <o3tl/temporary.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -158,8 +159,7 @@ OUString Index::getIndexDescription(const OUString& rIndexEntry)
else
return keys[wgt].mkey;
}
- sal_Int32 nPos=0;
- sal_uInt32 indexChar=rIndexEntry.iterateCodePoints(&nPos, 0);
+ sal_uInt32 indexChar=rIndexEntry.iterateCodePoints(&o3tl::temporary(sal_Int32(0)), 0);
return OUString(&indexChar, 1);
}
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 34c77516cc73..28ef390f4939 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -24,7 +24,7 @@
#include <vector>
#include <map>
#include <o3tl/sorted_vector.hxx>
-
+#include <o3tl/temporary.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/macros.h>
#include <sal/types.h>
@@ -977,12 +977,12 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
// that one.
/* XXX NOTE: only simple [...] modifier and "..." quotes detected and
* ignored, not nested, no fancy stuff. */
- sal_Int32 nIndex = 0;
// aDateSep can be empty if LC_CTYPE was a ref=..., determine from
// FormatCode then.
- sal_uInt32 cDateSep = (aDateSep.isEmpty() ? 0 : aDateSep.iterateCodePoints( &nIndex));
+ sal_uInt32 cDateSep = (aDateSep.isEmpty()
+ ? 0 : aDateSep.iterateCodePoints( &o3tl::temporary(sal_Int32(0))));
sal_uInt32 cDateSep2 = cDateSep;
- nIndex = 0;
+ sal_Int32 nIndex = 0;
OUStringBuffer aPatternBuf(5);
OUStringBuffer aPatternBuf2(5);
sal_uInt8 nDetected = 0; // bits Y,M,D
@@ -1194,14 +1194,12 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
// But only if not inherited in which case we don't have aDecSep here.
if (!aDecSep.isEmpty())
{
- nIndex = 0;
- sal_uInt32 cDecSep = aDecSep.iterateCodePoints( &nIndex);
+ sal_uInt32 cDecSep = aDecSep.iterateCodePoints( &o3tl::temporary(sal_Int32(0)));
for (auto const& elem : theDateAcceptancePatterns)
{
if (elem.getLength() == (cDecSep <= 0xffff ? 3 : 4))
{
- nIndex = 1;
- if (elem.iterateCodePoints( &nIndex) == cDecSep)
+ if (elem.iterateCodePoints( &o3tl::temporary(sal_Int32(1))) == cDecSep)
{
++nError;
fprintf( stderr, "Error: Date acceptance pattern '%s' matches decimal number '#%s#'\n",
@@ -1481,8 +1479,7 @@ static void lcl_writeAbbrFullNarrNames( const OFileWriter & of, const LocaleNode
aNarrName = p->getValue();
else
{
- sal_Int32 nIndex = 0;
- sal_uInt32 nChar = aFullName.iterateCodePoints( &nIndex);
+ sal_uInt32 nChar = aFullName.iterateCodePoints( &o3tl::temporary(sal_Int32(0)));
aNarrName = OUString( &nChar, 1);
}
of.writeParameter( elementTag, "DefaultAbbrvName", aAbbrName, i, j);
diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx
index a7eae7243835..f873c33374ce 100644
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/i18n/TransliterationType.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
+#include <o3tl/temporary.hxx>
#include <characterclassificationImpl.hxx>
@@ -244,8 +245,7 @@ static OUString transliterate_titlecase_Impl(
// an exception we need to handle the first chara manually...
// we don't want to change surrogates by accident, thuse we use proper code point iteration
- sal_Int32 nPos = 0;
- sal_uInt32 cFirstChar = aText.iterateCodePoints( &nPos );
+ sal_uInt32 cFirstChar = aText.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
OUString aResolvedLigature( &cFirstChar, 1 );
// toUpper can be used to properly resolve ligatures and characters like Beta
aResolvedLigature = xCharClassImpl->toUpper( aResolvedLigature, 0, aResolvedLigature.getLength(), rLocale );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index b9050787dfd9..0d86f2c4dac9 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -23,6 +23,7 @@
#include <editeng/langitem.hxx>
#include <editeng/justifyitem.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/temporary.hxx>
#include <osl/thread.h>
#include <unotools/textsearch.hxx>
#include <svl/zforlist.hxx>
@@ -3553,8 +3554,7 @@ void ScInterpreter::ScUnicode()
PushIllegalParameter();
else
{
- sal_Int32 i = 0;
- PushDouble(aStr.iterateCodePoints(&i));
+ PushDouble(aStr.iterateCodePoints(&o3tl::temporary(sal_Int32(0))));
}
}
}
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index f13d0558abe3..33efa5b98ac2 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -23,6 +23,7 @@
#include <cassert>
#include <comphelper/string.hxx>
+#include <o3tl/temporary.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
@@ -1378,8 +1379,7 @@ void SmShowChar::Resize()
const OUString &rText = GetText();
if (rText.isEmpty())
return;
- sal_Int32 nStrIndex = 0;
- sal_UCS4 cChar = rText.iterateCodePoints(&nStrIndex);
+ sal_UCS4 cChar = rText.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
SetSymbol(cChar, GetFont()); //force recalculation of size
}
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index 3960b8a723cc..c2863a997b60 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <o3tl/temporary.hxx>
#include <osl/interlck.h>
#include <svx/dialmgr.hxx>
#include <svx/strings.hrc>
@@ -420,8 +421,7 @@ OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription()
OUString sDescription;
const OUString aCharStr( mpParent->maText);
- sal_Int32 nStrIndex = 0;
- const sal_UCS4 c = aCharStr.iterateCodePoints( &nStrIndex );
+ const sal_UCS4 c = aCharStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
const int tmp_len = (c < 0x10000) ? 4 : 6;
char buf[16] = "0x0000";
sal_UCS4 c_Shifted = c;
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index b36e58b6fad1..390b9cf20e3d 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -34,6 +34,7 @@
#include <vcl/settings.hxx>
#include <i18nlangtag/languagetag.hxx>
+#include <o3tl/temporary.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -650,8 +651,8 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
{
sal_UCS4 cChar = aFmt.GetBulletChar();
- sal_Int32 nIndexUtf16 = 0;
- sal_UCS4 ccChar = _pSet->sBulletChar.iterateCodePoints(&nIndexUtf16);
+ sal_UCS4 ccChar
+ = _pSet->sBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
if ( !((cChar == ccChar) &&
_pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
@@ -828,8 +829,8 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
sal_UCS4 cChar = 0;
if( !pLevelSettings->sBulletChar.isEmpty() )
{
- sal_Int32 nIndexUtf16 = 0;
- cChar = pLevelSettings->sBulletChar.iterateCodePoints(&nIndexUtf16);
+ cChar
+ = pLevelSettings->sBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
}
if( AllSettings::GetLayoutRTL() )
{
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 6bc5b6866f21..e6901f360f84 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -22,6 +22,7 @@
#include <comphelper/string.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/temporary.hxx>
#include <tools/solar.h>
#include <vcl/font.hxx>
#include <hintids.hxx>
@@ -670,8 +671,8 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV,
// take only the very first character
if (rAV.cbTextBefore || rAV.cbTextAfter)
{
- sal_Int32 nIndexUtf16 = 0;
- rNum.SetBulletChar(sText.toString().iterateCodePoints(&nIndexUtf16));
+ rNum.SetBulletChar(
+ sText.toString().iterateCodePoints(&o3tl::temporary(sal_Int32(0))));
}
else
rNum.SetBulletChar( 0x2190 );
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 175f7b948613..5c44be1ad5f5 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -46,6 +46,7 @@
#include <editeng/udlnitem.hxx>
#include <editeng/postitem.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/temporary.hxx>
#include <unotextrange.hxx>
#include <doc.hxx>
#include <docary.hxx>
@@ -832,8 +833,8 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet
if (style::NumberingType::CHAR_SPECIAL == nType)
{
- sal_Int32 nIndexUtf16 = 0;
- cBullet = !sNumString.isEmpty() ? sNumString.iterateCodePoints(&nIndexUtf16) : 0x2190;
+ cBullet = !sNumString.isEmpty()
+ ? sNumString.iterateCodePoints(&o3tl::temporary(sal_Int32(0))) : 0x2190;
if (!cBullet) // unsave control code?
cBullet = 0x2190;
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 0dbc7eb89cc5..4a9b29af36e3 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -30,6 +30,7 @@
#include <docufld.hxx>
#include <IDocumentUndoRedo.hxx>
#include <i18nutil/unicode.hxx>
+#include <o3tl/temporary.hxx>
#include <rtl/character.hxx>
#include <doc.hxx>
@@ -258,8 +259,7 @@ bool SwWrtShell::DelLeft()
if ( rtl::isSurrogate( nCode ) )
{
OUString sStr = GetSelText();
- sal_Int32 nIndex = 0;
- nCode = sStr.iterateCodePoints( &nIndex );
+ nCode = sStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
}
if ( unicode::isIVSSelector( nCode ) )
@@ -267,8 +267,7 @@ bool SwWrtShell::DelLeft()
SwCursorShell::Push();
SwCursorShell::Left(1, CRSR_SKIP_CHARS);
OUString sStr = GetSelText();
- sal_Int32 nIndex = 0;
- nCode = sStr.iterateCodePoints( &nIndex );
+ nCode = sStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
if ( unicode::isCJKIVSCharacter( nCode ) )
SwCursorShell::Pop( SwCursorShell::PopMode::DeleteStack );
else
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):
More information about the Libreoffice-commits
mailing list