[Libreoffice-commits] core.git: starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Sun May 3 21:05:46 PDT 2015
starmath/source/document.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit be88df0e6ce2ba1dc6931e2a2988ebfdd8ae9ba8
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Fri May 1 14:15:42 2015 +0900
prefer OUStringBuffer to concatenating OUString in a loop
Change-Id: Ia617e6e3524264ecc62d50bb8b58d1458b8e3303
Reviewed-on: https://gerrit.libreoffice.org/15582
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 254677f..150e748 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -24,6 +24,7 @@
#include <comphelper/accessibletexthelper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
+#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
#include <unotools/eventcfg.hxx>
#include <sfx2/event.hxx>
@@ -1226,12 +1227,15 @@ void SmDocShell::GetState(SfxItemSet &rSet)
}
if( nCount )
{
- OUString sList;
+ OUStringBuffer aBuf;
for( sal_uInt16 n = 0; n < nCount; ++n )
- sList += (pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) + "\n";
+ {
+ aBuf.append((pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ));
+ aBuf.append('\n');
+ }
SfxStringListItem aItem( nWh );
- aItem.SetString( sList );
+ aItem.SetString( aBuf.makeStringAndClear() );
rSet.Put( aItem );
}
}
More information about the Libreoffice-commits
mailing list