Re: [Libreoffice-commits] replaceAll

2013-01-31 Thread Noel Grandin
On 2013-01-31 10:32, Stephan Bergmann wrote: You missed my point, which was not the gotcha of ignoring the return value (which is already addressed with SAL_WARN_UNUSED_RESULT anyway), but the gotcha that a sequence of replaceAll calls to replace multiple placeholders with corresponding repl

Re: [Libreoffice-commits] replaceAll

2013-01-31 Thread Stephan Bergmann
On 01/31/2013 01:58 AM, Michael Meeks wrote: On Wed, 2013-01-30 at 16:26 +0100, Stephan Bergmann wrote: fix for the awkward OUString::replaceAll() behaviour Seeing this, that's the reason I've always been unhappy with such a replaceAll function: While it may appear "obviously useful," i

Re: [Libreoffice-commits] replaceAll

2013-01-30 Thread Noel Grandin
On 2013-01-31 02:58, Michael Meeks wrote: We could deprecate it. Do we have a nice macro wrapped around some magic gcc: "really warn if return value unused" attribute - I assume there is one of those - that might help make it more sane ? Maybe we need a SAL_ERROR_IF_UNUSED macro

Re: [Libreoffice-commits] replaceAll

2013-01-30 Thread Michael Meeks
On Wed, 2013-01-30 at 16:26 +0100, Stephan Bergmann wrote: > > fix for the awkward OUString::replaceAll() behaviour > > Seeing this, that's the reason I've always been unhappy with such a > replaceAll function: While it may appear "obviously useful," it easily > leads to broken code (like

Re: [Libreoffice-commits] replaceAll

2013-01-30 Thread Stephan Bergmann
On 01/30/2013 03:13 PM, Libreoffice Gerrit user wrote: commit 1ba8986446dbaa77c9aed6d141ee99da74bf1afb Author: Luboš Luňák Date: Wed Jan 30 15:12:34 2013 +0100 fix for the awkward OUString::replaceAll() behaviour Change-Id: I6ee919bb17ea7eb29cb9cfc0fc69d02d728d9a0f diff --git a/fo