summaryrefslogtreecommitdiff
path: root/editeng/source/misc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-11 11:21:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-11 13:55:14 +0100
commit70519a43e0d89a6b5d89859a6851f8c757c6b0c7 (patch)
treebc1f4a6b6510e3bff75e9dc54eb71e2fa6cfc3c8 /editeng/source/misc
parenta0210c5c5e8fd47b55567a8b18788d57d2b7decb (diff)
Replace OUStringBuffer::appendCopy with append(std::u16string_view)
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng/source/misc')
-rw-r--r--editeng/source/misc/svxacorr.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index c6cb322d58b0..2ef3ab48523a 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -18,6 +18,7 @@
*/
#include <memory>
+#include <string_view>
#include <sal/config.h>
#include <com/sun/star/io/IOException.hpp>
@@ -2810,12 +2811,12 @@ const SvxAutocorrWord* SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p
nTmp++;
if (nTmp < nSttWdPos)
break; // word delimiter found
- buf.appendCopy(rTxt, nFndPos, nSttWdPos - nFndPos).append(pFnd->GetLong());
+ buf.append(std::u16string_view(rTxt).substr(nFndPos, nSttWdPos - nFndPos)).append(pFnd->GetLong());
nFndPos = nSttWdPos + sTmp.getLength();
}
} while (nSttWdPos != -1);
if (nEndPos - nFndPos > extra_repl)
- buf.appendCopy(rTxt, nFndPos, nEndPos - nFndPos);
+ buf.append(std::u16string_view(rTxt).substr(nFndPos, nEndPos - nFndPos));
aLong = buf.makeStringAndClear();
}
SvxAutocorrWord* pNew = new SvxAutocorrWord(aShort, aLong);