summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh
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 /sw/source/uibase/wrtsh
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 'sw/source/uibase/wrtsh')
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx7
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