OUString concatenation vs OUStringBuffer append
matteo.casalin at yahoo.com
Fri Jun 14 06:19:52 PDT 2013
in a recent patch  for String to OUString conversion I replaced the construction of an OUString from a sequence of OUStringBuffer.append to a single concatenation of OUString/constant strings .
Noel Power (whom I thank for the careful review, and is here in copy), correctly asks which way is preferred for such an operation: I don't know the answer, can some expert provide me an insight on this? I find OUString concatenation easier to read, but this could be not as efficient as the original code, or just undesired.
Thanks and kind regards
- OUStringBuffer aString;
- return aString.makeStringAndClear();
+ OUString aRet = "("
+ + OUString::number(static_cast<sal_Int32>(nColMerge))
+ + ","
+ + OUString::number(static_cast<sal_Int32>(nRowMerge))
+ + ")";
+ return aRet;
More information about the LibreOffice