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 /sw/source/uibase/wrtsh | |
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 'sw/source/uibase/wrtsh')
-rw-r--r-- | sw/source/uibase/wrtsh/delete.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
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 |