Bug 57950 - Replace chained O(U)StringBuffer::append() with operator+
Summary: Replace chained O(U)StringBuffer::append() with operator+
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.3.0 target:6.0....
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2012-12-06 17:25 UTC by Lubos Lunak
Modified: 2017-12-07 07:53 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Indicative proposed patch (7.60 KB, patch)
2012-12-13 18:48 UTC, Christos Strubulis
Details
Second proposed patch (5.60 KB, patch)
2012-12-18 15:09 UTC, Christos Strubulis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lubos Lunak 2012-12-06 17:25:04 UTC
The codebase contains code such as:

rtl::OUString aFileName = rtl::OUStringBuffer().append("charts/chart").append(nCount).append(".xml").makeStringAndClear();

or

rtl::OUStringBuffer aName(msSeed);
aName.append(++mnImportedGraphicsCount);
aName.append(": ");
aName.append(rFixed);
pFrmFmt->SetName(aName.makeStringAndClear());

These can be more easily written (and later read) as:

OUString aFileName = "charts/chart" + OUString::valueOf(nCount) + ".xml";

or

pFrmFmt->SetName(OUString::valueOf(++mnImportedGraphicsCount) + ": " + rFixed);


All these chained calls to OStringBuffer::append() and OUStringBuffer::append() can be simply replaced by usage of operator+ as written in the examples above.
Comment 1 Lubos Lunak 2012-12-06 17:29:49 UTC
Note that the removal of "rtl::" is not directly related to this EasyHack, but as writing that is not necessary anymore, it can be removed in the process in order to further make the code cleaner.
Comment 2 Stephan Bergmann 2012-12-07 09:32:26 UTC
(In reply to comment #0)

In

> rtl::OUStringBuffer aName(msSeed);
> aName.append(++mnImportedGraphicsCount);
> aName.append(": ");
> aName.append(rFixed);
> pFrmFmt->SetName(aName.makeStringAndClear());

to

> pFrmFmt->SetName(OUString::valueOf(++mnImportedGraphicsCount) + ": " +
> rFixed);

note that an initial "msSeed +" is missing from the converted, unless msSeed is an integer, in which case it would have preset the capacity of the OUStringBuffer to something other than the default 16.
Comment 3 Christos Strubulis 2012-12-12 11:40:31 UTC
Hi,

At first, I would like to start replacing the first one, i.e.,

rtl::OUString aFileName = rtl::OUStringBuffer().append("charts/chart").append(nCount).append(".xml").makeStringAndClear();

Should I start?
Comment 4 Lubos Lunak 2012-12-12 14:14:38 UTC
Sure, just go ahead.
Comment 5 Christos Strubulis 2012-12-13 18:48:42 UTC
Created attachment 71454 [details]
Indicative proposed patch
Comment 6 Christos Strubulis 2012-12-13 18:49:19 UTC
Hi,
I attach an indicative proposed patch.

It seems that in the code there is some usage of sal_Unicode and appendAscii. 

In the first case, the "+" operator can't be used (or it can be used and it's only me with an error?). 
In the second case,  I changed only one file (RDFaExportHelper.cxx) assuming that instead of appendAscii, append can be used. 

I am not sure when append (and not appendAscii) should be used, but I saw a recent commit with that replacement: https://gerrit.libreoffice.org/#/c/854/2/basctl/source/basicide/bastype2.cxx

If the patch is right I can send an email to the list.
Comment 7 Stephan Bergmann 2012-12-13 21:06:13 UTC
ActivityChooserModel.java:  The changes discussed here only work in C++ code, not in Java code.

bastype3.cxx:  You can simplify this even further by dropping the useless OUStringBuffer.  Either make aName an OUString (and drop the makeSkingAndClear call from the return statement), or just build the string directly in the return statement.

bastype.cxx, javatype.cxx:  Same as above.

dbfld.cxx:  Some of the (performance) benefits are lost when you split the concatenation into multiple operator+= (instead of operator+) expressions.  (Also, please take care to not indent with tabs.  Tab widths are not universal, which makes the code easily look oddly indented.  Your editor might be able to help you with avoiding tabs.)

docexport.cxx and ww8graf.cxx look great already.

RDFaExportHelper.cxx:  s_prefix is defined as static const char s_prefix[] = "_:b" at the top of that file, but only used here.  I would thus remove the definition of s_prefix and directly use the "_:b" string literal here -- which also makes it obvious that it is OK to drop the call of appendAscii, which in general is only OK if the argument to appendAscii was a string literal, not an arbitrary expression of pointer type.  (Also see the tabs-vs.-spaces note above.)
Comment 8 Christos Strubulis 2012-12-18 15:09:22 UTC
Created attachment 71735 [details]
Second proposed patch

Hi,
ok thanks for the detailed review and help.
Is it better now? What is your opinion?

(Ok, but I am almost sure you know that concatenation of strings can be made like
this in java).
Comment 9 Lubos Lunak 2012-12-18 16:27:21 UTC
ww8graf.cxx: As pointed out by comment #2, the argument to OUStringBuffer should  not be dropped, unless it is the default size (so the example given by me in the initial description was indeed wrong in this case, I overlooked the msSeed). As that was just a minor detail, I'll fix that and push your patch, thanks.
Comment 10 Not Assigned 2012-12-27 09:51:43 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=47139512bc5df08704fd9df362c7de86b99fe7e8

fdo#57950: remove consecutive append in basctl with StringBuffer



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Not Assigned 2012-12-28 17:21:34 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8394c5a19170af5e62ba1a5adc236465e5d65bde

Some cppcheck cleaning + Related fdo#57950



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Not Assigned 2013-01-03 17:10:47 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=695f4a18e6e538f8d6080f486695e4f58f8bd574

fdo#57950: Fix some chained appends in basic



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Not Assigned 2013-01-03 17:11:04 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d905daa0d05010ffe938790c513e25df3301b310

fdo#57950: One more chained append in basic



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Not Assigned 2013-01-03 17:32:02 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f6b4d0313dbaf1089254a1bfae9ccfbc3f413eb3

fdo#57950: Remove chained append and simplify strings



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Not Assigned 2013-01-07 09:33:20 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d6f25fdf04b6a235650ead537cc42d9a505243a4

fdo#57950: Remove last chained appends from avmedia



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Not Assigned 2013-01-07 09:39:08 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2e22005234867e5e3036841a9c6c87c557011386

fdo#57950: Remove some chained appends and more in dbaccess



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Not Assigned 2013-01-07 13:53:15 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2b0b5f7df0e3c7deab2fdccec49b6bbb4186f58a

fdo#57950: More fixes for chained appends in dbaccess



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Not Assigned 2013-01-07 13:59:05 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=36e1e0ce128a25ce63743bed18a599a6915f3ec3

fdo#57950: Remove some chained appends in dbaccess



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Not Assigned 2013-01-07 14:05:13 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=aea18e985ed07691bca39aae3dc3c58d33ae3dd5

fdo#57950: Remove some chained appends in chart2 and more



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Not Assigned 2013-01-15 18:22:03 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e9aff4b508a1ccd1e5a40fadce3ca78db7b49b86

fdo#57950: Remove some chained appends in shell



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 21 Not Assigned 2013-01-15 18:22:21 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a9470e9b3017ef8c79f38021b3e7823dbe24a93e

fdo#57950: Remove chained appends in filter



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Not Assigned 2013-01-16 19:06:32 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1cf1f9338cc37895e2a68b411ffdc44d66357822

fdo#57950: dbaccess: STRINGPARAM and more chained appends



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 23 Not Assigned 2013-01-21 22:53:20 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c69436f7b76237f2b99a29737dc897fb0a86bfd7

fdo#57950: Remove some chained appends in connectivity and..



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 Lubos Lunak 2013-01-28 12:41:38 UTC
Please do not reassign this bugreport, multiple developers can work on it.
Comment 25 Not Assigned 2013-02-14 10:29:35 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=76254d6c01cdf240aa9058949a2fccbd3ac48818

fdo#57950: Remove some chained appends in filter



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 26 Not Assigned 2013-02-16 17:25:25 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=92064bb2c265069de33d0ced7aa9d94d4c2829c3

fdo#57950: Remove more chained appends in filter



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 27 Not Assigned 2013-02-21 12:36:09 UTC
Andrew Branch committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=868cb16417f7a4c9bdbb55b6262eddad3db6dc14

fdo#57950: Remove some chained appends in filter in sw/access



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2013-03-08 04:38:26 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=75e6856b081ca29e3e0f19493780d9f8fa6d315c

fdo#57950: Remove chained appends in codemaker



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 29 Commit Notification 2013-03-11 10:45:12 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=84931eb8aeeb55a2570edb24f5c2d3409f9c2398

fdo#57950: Removed some chained appends from sw



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 30 Gehad ElRobey 2013-04-12 14:50:12 UTC
Hi,

I replaced some of the apped() functions by the + operator but how to make sure that i am doing it right , In other words how to test the code.

sorry i am new here , But I ll do my best.
Comment 31 Lubos Lunak 2013-04-15 14:43:35 UTC
(In reply to comment #30)
> I replaced some of the apped() functions by the + operator but how to make
> sure that i am doing it right , In other words how to test the code.

Running 'make check' should run tests, although that's far from complete testing. But a review before the change is pushed should catch problems.
Comment 32 Adolfo Jayme 2013-08-11 13:27:34 UTC
Neil Moore committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6cd939111aaf32a35ffe4eb893115e91df2eb664

fdo#57950 Remove chained appends
Comment 33 Commit Notification 2013-08-13 11:18:18 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=87b5ac652d9625545a62fac83bccce369976140c

fdo#57950: Remove some chained appends in xmhelp



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 34 Commit Notification 2013-08-16 11:13:29 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d812281f96b03866c5d367380409c266b9bb8d05

fdo#57950: Remove some chained appends in xmlscript



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 35 Commit Notification 2013-08-17 07:55:03 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4f20c9f6f95c117bcdb520682df4fa1429a56477

fdo#57950: Remove some chained appends in xmlsecurity



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 36 Commit Notification 2013-08-17 15:34:40 UTC
Andrzej J.R. Hunt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=182bf2a63acceb435074e84f1237f1852491be94

Revert "fdo#57950: Remove some chained appends in xmlsecurity"



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 37 Commit Notification 2013-08-18 14:00:26 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4abb7e5c5874fd53fd4c7a758faa03fe8216a0ee

fdo#57950: Remove some chained appends in basctl



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 38 Commit Notification 2013-08-18 14:00:50 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5e5ce956b463e90bb65ad99cefca33b9b0b13bf

fdo#57950: Remove some chained appends in xmlsecurity



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 39 Commit Notification 2013-08-19 06:13:45 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a1aca007fd06f3f8223ee02a79e44099d778b51

fdo#57950: Remove some chained appends in dbaccess



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 40 Commit Notification 2013-08-19 15:55:32 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fa0e48c5e4ffc2bf05a60ce0e878073643db8cbe

fdo#57950: Remove some chained appends in xmloff



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 41 Commit Notification 2013-08-25 17:05:55 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=88011f4cdf050c2df0b7488e273332d4e7048012

fdo#57950: Remove some chained appends in sw



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 42 Commit Notification 2013-08-28 13:29:32 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=76fe24cf121025ddceb18f3b522d373f7f0256f7

fdo#57950: Remove some chained appends in i18nlangtag



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 43 Commit Notification 2013-09-08 03:02:02 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5ba5c492e8e4d994e6c37893516059b6586a5b92

fdo#57950: Remove some chained appends in sc



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 44 Commit Notification 2013-09-08 20:10:17 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0f2435c20289f9d29b34eeae588805deb25adeae

fdo#57950: Remove some chained appends in vcl



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 45 Björn Michaelsen 2013-10-04 18:47:16 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 46 Robinson Tryon (qubit) 2013-10-23 18:41:43 UTC Comment hidden (obsolete)
Comment 47 Commit Notification 2014-01-15 10:48:49 UTC
Anderson Roberto committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=330c6cb59a3c41e40cf88b91bd6345b84049e2e8

fdo#57950: Remove chained appends in accessibility



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 48 Commit Notification 2014-03-15 17:36:20 UTC
Alexandre Vicenzi committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5a6c33bdfdf7de03cd0f18d3bba7f4b5749eda70

fdo#57950: Replace some chained appends in sw



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 49 Commit Notification 2014-03-31 15:43:30 UTC
Krisztian Pinter committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5bfa65868b0d1cf735d81686d0f3d97e780c40d

fdo#57950 Replace chained append in htmlatr.cxx



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 50 Commit Notification 2014-04-17 14:31:31 UTC
Krisztian Pinter committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9832e23703b989da1dc470f543eb31c25d6c5e29

fdo#57950 Replace chained append() with operator+



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 51 Commit Notification 2015-02-23 17:02:58 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f8c745d1c060312c03fa020e52acd1337b6e81d9

fdo#57950: skip verbose OUStringBuffer

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 52 mridul 2015-03-08 11:13:41 UTC
hey,
i would like to contribute to this. can you please suggest me some files where i can find this type of code?
Comment 53 Austin Chen 2015-03-25 09:38:04 UTC
Updated from verbose OUStringBuffer in formulabase.cxx and chartconverter.cxx
Comment 54 Tor Lillqvist 2015-03-25 09:45:51 UTC
Austin: please don't assign to yourself. just submit changes to gerrit. you must have very bad luck if two people happen to want to change the same lines at the same time
Comment 55 Commit Notification 2015-03-26 06:48:04 UTC
Austin Chen committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0fb66458c08b9c0ce59bca85e77d26fad8b59e4b

tdf#57950: Replace chained O(U)StringBuffer::append() with operator+

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 56 Commit Notification 2015-03-30 09:56:50 UTC
Krisztian Pinter committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f863d2602fca7d180f49cc4b6fb1bdba57e6a012

fdo#57950 Replace chained append() with operator+

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 57 aybuke 2015-10-07 12:41:59 UTC
I sent following patch for this bug:
http://ci.libreoffice.org/job/lo_gerrit_master/7121/
Comment 58 aybuke 2015-10-07 12:47:44 UTC
I sent following patch for this bug:

https://gerrit.libreoffice.org/#/c/19027/
Comment 59 aybuke 2015-10-07 12:54:04 UTC
(In reply to aybuke from comment #58)
> I sent following patch for this bug:
> 
> https://gerrit.libreoffice.org/#/c/19027/

I sent accidentally recent reviews. I'm so sorry. 
I want to send the link patch:
https://gerrit.libreoffice.org/#/c/19225/
Comment 60 Commit Notification 2015-10-08 06:21:08 UTC
Aybuke Ozdemir committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bbfc031333aa74fbd4c6362c33405c49c22283f3

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 61 Commit Notification 2015-11-08 15:27:38 UTC
Sedat Ak committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bfc9619fccd17c5059949afc06953695222dea3b

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 62 Commit Notification 2015-11-08 19:06:23 UTC
Sedat Ak committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c4b71b0885122b67e05ed4aed89b0d12ce0f34c8

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 63 Commit Notification 2015-11-29 14:37:35 UTC
Sedat Ak committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1c8e67a9d163e72916d33b5d16211965c9655e23

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 64 Robinson Tryon (qubit) 2015-12-14 05:30:14 UTC Comment hidden (obsolete)
Comment 65 Commit Notification 2016-02-15 07:40:14 UTC
Arnold Dumas committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=53bf3ea58e0f4f9f4399a44bfc9ddecc71cb54c7

tdf#57950: Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 66 Robinson Tryon (qubit) 2016-02-18 14:51:41 UTC Comment hidden (obsolete)
Comment 67 Commit Notification 2016-02-18 21:39:12 UTC
melikeyurtoglu committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6e2de428a4910bb3c6dda45a59da09ed4a1889db

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 68 Commit Notification 2016-02-20 18:25:54 UTC
irem committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4bb148e74495b02f65483bd460cab762114177ea

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 69 Commit Notification 2016-03-02 08:14:19 UTC
Sedat Ak committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f0c38c67e4a5d1b1fa58873f2db88310d8bf295a

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 70 Commit Notification 2016-03-03 07:06:05 UTC
Steven Guo committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=74c93c91ebce735e0defacc30054ca809c2db02d

tdf#57950 Replace chained O(U)StringBuffer::append() with operator+

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 71 jani 2016-04-22 06:55:55 UTC
There are several patches here, it seems that there are not more work to be done. If there are more work, please add a description, with a relevant code pointer.
Comment 72 Commit Notification 2016-07-03 15:49:40 UTC
Arnold Dumas committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=68900bad945c847f62a614cd2c2653ef3a9827ca

tdf#57950: Replace chained OUStringBuffer::append() with operator+

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 73 Commit Notification 2017-09-25 12:05:53 UTC
Muhammet Kara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7810858ee6cac233ce5868de1f2ef5de1d443af4

tdf#57950: Replace chained OUStringBuffer::append() with operator+

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 74 Muhammet Kara 2017-09-26 05:40:01 UTC
There are still instances of chained OUStringBuffer::append(), which could be replaced with operator+.

You may see the commit 7810858ee6cac233ce5868de1f2ef5de1d443af4 as an example: http://cgit.freedesktop.org/libreoffice/core/commit/?id=7810858ee6cac233ce5868de1f2ef5de1d443af4

And you may check these files for some possible instances:
pyuno/source/module/pyuno_module.cxx
extensions/source/config/ldap/ldapaccess.cxx
extensions/source/propctrlr/selectlabeldialog.cxx
starmath/source/dialog.cxx
starmath/source/rtfexport.cxx
filter/source/graphicfilter/ipict/shape.cxx
ucb/source/ucp/ftp/ftpurl.cxx
ucb/source/core/provprox.cxx
desktop/source/deployment/registry/component/dp_component.cxx
svtools/source/misc/transfer.cxx
svtools/source/svhtml/htmlout.cxx
vcl/source/uitest/uiobject.cxx
vcl/source/window/mnemonic.cxx
vcl/unx/generic/fontmanager/fontconfig.cxx
cui/source/options/certpath.cxx
cui/source/options/optgdlg.cxx
cui/source/options/optlingu.cxx
unotools/source/config/configpaths.cxx
unotools/source/config/bootstrap.cxx
sax/source/tools/converter.cxx
connectivity/source/commontools/sqlerror.cxx
connectivity/source/drivers/firebird/Util.cxx
idlc/source/options.cxx
sc/source/ui/dbgui/foptmgr.cxx
sc/source/ui/condformat/condformathelper.cxx
sc/source/ui/condformat/condformatmgr.cxx
sc/source/ui/vba/vbahyperlink.cxx
sc/source/ui/view/tabview.cxx
sc/source/ui/view/cellsh1.cxx
sc/source/ui/view/editsh.cxx
sc/source/filter/html/htmlexp2.cxx
sc/source/filter/html/htmlexp.cxx
sc/source/filter/dif/difimp.cxx
sc/source/filter/oox/querytablebuffer.cxx
sc/source/filter/oox/worksheethelper.cxx
sc/source/filter/oox/formulabase.cxx
sc/source/filter/oox/drawingfragment.cxx
sc/source/filter/oox/autofilterbuffer.cxx
sc/source/filter/excel/xipivot.cxx
sc/source/filter/excel/xehelper.cxx
sc/source/filter/excel/xiescher.cxx
sc/source/core/tool/compiler.cxx
sc/source/core/tool/address.cxx
sc/source/core/tool/chgtrack.cxx
sc/source/core/data/postit.cxx
sc/source/core/data/validat.cxx
sc/qa/unit/subsequent_filters-test.cxx
sc/qa/unit/helper/qahelper.cxx
sal/test/testbootstrap.cxx
xmlhelp/source/cxxhelp/provider/databases.cxx
sw/source/ui/config/mailconfigpage.cxx
sw/source/ui/vba/vbarow.cxx
sw/source/ui/vba/vbacolumn.cxx
sw/source/filter/html/htmltabw.cxx
sw/source/filter/html/htmlflywriter.cxx
sw/source/filter/html/htmlftn.cxx
sw/source/filter/html/swhtml.cxx
sw/source/filter/html/htmldrawwriter.cxx
sw/source/filter/html/htmlplug.cxx
sw/source/filter/html/wrthtml.cxx
sw/source/filter/html/htmlfldw.cxx
sw/source/filter/html/htmlbas.cxx
sw/source/filter/ww8/docxsdrexport.cxx
sw/source/filter/ww8/rtfsdrexport.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
sw/source/filter/ww8/wrtw8esh.cxx
sw/source/filter/ww8/rtfattributeoutput.cxx
sw/source/filter/ww8/rtfexport.cxx
sw/source/uibase/dbui/dbmgr.cxx
sw/source/uibase/docvw/edtwin.cxx
sw/source/uibase/docvw/edtwin2.cxx
sw/source/uibase/ribbar/inputwin.cxx
sw/source/core/doc/docbm.cxx
sw/source/core/crsr/bookmrk.cxx
sw/qa/core/layout-test.cxx
sw/qa/core/macros-test.cxx
basic/source/runtime/methods.cxx
sfx2/source/dialog/versdlg.cxx
sfx2/source/appl/childwin.cxx
sfx2/source/appl/newhelp.cxx
sfx2/source/appl/appuno.cxx
sfx2/source/appl/macroloader.cxx
sfx2/source/bastyp/frmhtmlw.cxx
oox/source/vml/vmlinputstream.cxx
oox/source/vml/vmlformatting.cxx
oox/source/ole/vbamodule.cxx
oox/source/export/vmlexport.cxx
oox/source/core/xmlfilterbase.cxx
oox/source/dump/dumperbase.cxx
oox/source/drawingml/chart/objectformatter.cxx
oox/source/drawingml/chart/titlecontext.cxx
oox/source/drawingml/lineproperties.cxx
i18npool/source/collator/collator_unicode.cxx
i18npool/source/breakiterator/breakiteratorImpl.cxx
i18npool/source/breakiterator/xdictionary.cxx
i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
i18npool/source/localedata/localedata.cxx
sdext/source/pdfimport/tree/genericelements.cxx
workdir/UnpackedTarball/hunspell/src/tools/hunspell.cxx
workdir/UnpackedTarball/icu/source/test/perf/DateFmtPerf/DateFmtPerf.h
workdir/UnpackedTarball/icu/source/common/unicode/localpointer.h
workdir/UnpackedTarball/firebird/src/dsql/DdlNodes.h
workdir/UnpackedTarball/firebird/src/common/StatusArg.h
sd/source/ui/remotecontrol/Listener.cxx
sd/source/core/drawdoc3.cxx
sd/source/core/sdpage2.cxx
sd/source/core/sdpage.cxx
editeng/source/misc/svxacorr.cxx
xmloff/source/forms/elementimport.cxx
xmloff/source/forms/layerimport.cxx
svl/source/misc/urihelper.cxx
svl/source/numbers/zforlist.cxx
Comment 75 Xisco Faulí 2017-09-27 08:05:34 UTC
Dear Muhammet Kara,
This bug has been in RESOLVED FIXED status for more than 6 months.
Do you think it would make more sense to create a follow-up bug instead ? From my point of view, it would be much clearer for newcomers to copy the info from the description, the comment 74 in the new bug and mention a couple of commits. Anyway, up to you...
Regards
Comment 76 Muhammet Kara 2017-09-27 09:07:18 UTC
(In reply to Xisco Faulí from comment #75)
> Dear Muhammet Kara,
> This bug has been in RESOLVED FIXED status for more than 6 months.
> Do you think it would make more sense to create a follow-up bug instead ?
> From my point of view, it would be much clearer for newcomers to copy the
> info from the description, the comment 74 in the new bug and mention a
> couple of commits. Anyway, up to you...
> Regards

Thanks for your suggestion! I was also thinking the same way, but wasn't sure about it. :)
Comment 77 Commit Notification 2017-12-07 07:53:04 UTC
ekuiitr committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6a68f46e8e931c3d4b095a9394d6c050ac9c49d2

tdf#57950 replaced some O(U)StringBuffer::append() with operator+

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.