summaryrefslogtreecommitdiff
path: root/sw/source/filter/docx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 15:24:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 18:54:15 +0200
commit4bef6511332073fbe3899fa2003caf88d9f2ac49 (patch)
treedca0d58c3fc86d6c88abc2a72fd91f149a917058 /sw/source/filter/docx
parentc9dcd0a6197160fdc8bf086ae4d8a78558e7d078 (diff)
loplugin:stringloop in sw
Change-Id: Ie316aee8d1e4f772dc25725b46e130c6717458c2 Reviewed-on: https://gerrit.libreoffice.org/58331 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/docx')
-rw-r--r--sw/source/filter/docx/swdocxreader.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx
index 90a6a9f1224f..97f06733cd9e 100644
--- a/sw/source/filter/docx/swdocxreader.cxx
+++ b/sw/source/filter/docx/swdocxreader.cxx
@@ -217,13 +217,11 @@ bool SwDOCXReader::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks )
// Need to check make sure the shortcut is not already being used
sal_Int32 nStart = 0;
sal_uInt16 nCurPos = rBlocks.GetIndex( sShortcut );
- sal_Int32 nLen = sShortcut.getLength();
while( sal_uInt16(-1) != nCurPos )
{
- sShortcut = sShortcut.copy( 0, nLen );
// add an Number to it
- sShortcut += OUString::number( ++nStart );
+ sShortcut = aLNm + OUString::number( ++nStart );
nCurPos = rBlocks.GetIndex( sShortcut );
}