Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-11-03 Thread Stephan Bergmann
On 11/02/2011 05:21 PM, Michael Meeks wrote: The benefits of the stable ABI requirement are somewhat unclear to me. Mostly for the benefit of (external) client code. Also, as a secondary effect, striving for a stable API probably tends to make the authors of the API work harder to pr

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-11-02 Thread Michael Meeks
On Wed, 2011-11-02 at 15:47 +0100, Stephan Bergmann wrote: > On 11/01/2011 07:50 PM, Eike Rathke wrote: > > Wouldn't they benefit/suffer from the stable ABI requirement then, > > whereas in comphelper they don't? Or am I mislead? > > Yup, that was the original rationale for introducing > comphel

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-11-02 Thread Stephan Bergmann
On 11/01/2011 07:50 PM, Eike Rathke wrote: Wouldn't they benefit/suffer from the stable ABI requirement then, whereas in comphelper they don't? Or am I mislead? Yup, that was the original rationale for introducing comphelper/string.hxx, see the comment at the start of the file. Stephan _

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-11-01 Thread Eike Rathke
Hi Michael, On Tuesday, 2011-11-01 11:58:52 +, Michael Meeks wrote: > Which makes me wonder whether we should be moving comphelper's > string.hxx methods into sal/ anyway Wouldn't they benefit/suffer from the stable ABI requirement then, whereas in comphelper they don't? Or am I mislea

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-11-01 Thread Caolán McNamara
On Tue, 2011-11-01 at 11:58 +, Michael Meeks wrote: > Which makes me wonder whether we should be moving comphelper's > string.hxx methods into sal/ anyway - they look reasonably sensible > seemingly case-by-case basis generally. e.g. methinks now that NaturalStringSorter should go into i

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-11-01 Thread Michael Meeks
On Tue, 2011-11-01 at 11:01 +, Caolán McNamara wrote: > Generally IIRC StringBuffers were the way to go. You can find > padToLength in comphelper/inc/string.hxx which expands a buffer to the > desired length and pads it with the requested character, which is pretty > much an equivalent to the

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-11-01 Thread Caolán McNamara
On Mon, 2011-10-31 at 09:15 +0100, Stephan Bergmann wrote: > However, I would also be sceptical that there are that many places that > actually need to construct such an (immutable!) string---maybe at least > some of the places are misguided attempts at preallocating some buffer > of a given len

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-10-31 Thread Michael Meeks
Hi Christina, Great to see you here again :-) On Sat, 2011-10-29 at 22:18 +0200, Chr. Rossmanith wrote: > the deprecated string classes have a Fill(n,c) method which fills a > string with a single character c repeated n times. I found ~50 > occurrences of Fill() using "git grep", so it mi

Re: [Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-10-31 Thread Stephan Bergmann
On 10/29/2011 10:18 PM, Chr. Rossmanith wrote: the deprecated string classes have a Fill(n,c) method which fills a string with a single character c repeated n times. I found ~50 occurrences of Fill() using "git grep", so it might be worth to add a Fill() method to OUString. Maybe the name of the

[Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

2011-10-29 Thread Chr. Rossmanith
Hi, the deprecated string classes have a Fill(n,c) method which fills a string with a single character c repeated n times. I found ~50 occurrences of Fill() using "git grep", so it might be worth to add a Fill() method to OUString. Maybe the name of the new method could be a bit more verbose