Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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 might be worth to add a
Fill() method to OUString. Maybe the name of the new method could be a
bit more verbose e.g. fillWithChar().

        As Stephan says, most of these seem to be reserving a string that is
about to be operated on, and should really be using a string-buffer of a
given size. Perhaps adding a method (as you suggest) to
rtl::OUStringBuffer would make sense though.

Obviously I need some assistance...any hint is welcome.

        Sounds like you're on track to me :-) I'd suggest hacking out the Fill
method in UniString and incrementally fixing each of the sites that use
it to use an rtl::OUStringBuffer that is pre-allocated, and if it seems
that we do need to fill with ' ' or 0 (as a number of those seem to be),
then presumably it'd make sense to add the method there.

        Does that make sense ? thanks for cleaning this up :-)

        All the best,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.