sc/source/core/tool/address.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit d655c6d839abcc2a7eb1c7b6c5ad7cd98da716c2 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Mon Nov 4 23:31:51 2013 -0500 Using OUStringBuffer is faster than chained += operator. Change-Id: I9991028ddd8ab6e2e43fe9a19428c9fdfbd38db6 diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 4f465f9..039b256 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -65,6 +65,7 @@ static const sal_Unicode* lcl_ParseQuotedName( const sal_Unicode* p, OUString& r if (*p != '\'') return p; + OUStringBuffer aBuf; const sal_Unicode* pStart = p; sal_Unicode cPrev = 0; for (++p; *p; ++p) @@ -74,19 +75,22 @@ static const sal_Unicode* lcl_ParseQuotedName( const sal_Unicode* p, OUString& r if (cPrev == '\'') { // double single-quote equals one single quote. - rName += OUString(*p); + aBuf.append(*p); cPrev = 0; continue; } } else if (cPrev == '\'') + { // We are past the closing quote. We're done! + rName = aBuf.makeStringAndClear(); return p; + } else - rName += OUString(*p); + aBuf.append(*p); cPrev = *p; } - rName = ""; + return pStart; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits