diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-02-17 19:06:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-02-17 21:45:49 +0100 |
commit | ee373f34ae1509e8d9fffaf4b5140ee9c35e8d41 (patch) | |
tree | 4b6b22600308a75dcfb9683775c9f976fddcbd7d /sw | |
parent | d1a2b80b9dc146c7fe63d2657e5506f49d6e5c0d (diff) |
Extend loplugin:stringview to O[U]StringBuffer::makeStringAndClear
...at least when called on an rvalue. (The lvalue case would often be trickier
to act upon, if the cleared object is still used later on.)
Change-Id: I006e618da004b2127e9ed7381911c2d7b00b1169
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130110
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index d3df4f76656f..b7ce97387f59 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -636,7 +636,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, int nLevel, WW8_ANLV con bool bListSymbol = pF && ( pF->aFFNBase.chs == 2 ); // Symbol/WingDings/... sal_uInt32 nLen = rAV.cbTextBefore + rAV.cbTextAfter; - OUStringBuffer sText(nLen); + OUStringBuffer sText(static_cast<sal_Int32>(nLen)); if (m_bVer67) { if (nLen > nElements) @@ -725,8 +725,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, int nLevel, WW8_ANLV con } if( rAV.cbTextAfter ) { - sSuffix = rNum.GetSuffix(); - sSuffix += sText.copy( rAV.cbTextBefore, rAV.cbTextAfter).makeStringAndClear(); + sSuffix = rNum.GetSuffix() + sText.subView( rAV.cbTextBefore, rAV.cbTextAfter); } if (rAV.cbTextBefore || rAV.cbTextAfter) { |