diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-01-07 16:42:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-01-07 19:45:35 +0100 |
commit | 0701aca589b819b845d08ea60263ad89718cfd7f (patch) | |
tree | f191b28d43c6498783c044b67b58c72c6c0053ae /svx | |
parent | 1d9128b6d712669185f402314e5fb57130d4ba5a (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 'svx')
-rw-r--r-- | svx/source/accessibility/charmapacc.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 9 |
2 files changed, 7 insertions, 6 deletions
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() ) { |