diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 15:24:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 18:54:15 +0200 |
commit | 4bef6511332073fbe3899fa2003caf88d9f2ac49 (patch) | |
tree | dca0d58c3fc86d6c88abc2a72fd91f149a917058 /sw/source/ui/index/cnttab.cxx | |
parent | c9dcd0a6197160fdc8bf086ae4d8a78558e7d078 (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/ui/index/cnttab.cxx')
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a791bf0d341d..2b42694961da 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3392,7 +3392,7 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, Button*, pBtn, void ) OUString SwTokenWindow::GetPattern() const { - OUString sRet; + OUStringBuffer sRet; for (auto it = m_aControlList.cbegin(); it != m_aControlList.cend(); ++it) { @@ -3403,10 +3403,10 @@ OUString SwTokenWindow::GetPattern() const : static_cast<const SwTOXButton*>(pCtrl)->GetFormToken(); //TODO: prevent input of TOX_STYLE_DELIMITER in KeyInput - sRet += rNewToken.GetString(); + sRet.append(rNewToken.GetString()); } - return sRet; + return sRet.makeStringAndClear(); } // Check if a control of the specified TokenType is already contained in the list |