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


On 10/01/2012 12:38 PM, Michael Meeks wrote:
On Mon, 2012-10-01 at 11:32 +0200, Noel Grandin wrote:
David, I agree with you - what I'm really getting at here is that it
seems perfectly reasonable to me to fold the functionality of
OUStringBuffer into OUString, making our string classes that much simpler.
Otherwise we're going to end up constantly converting between the two
for no good reason that I can see.

        I guess it'd be good to have some sample patches for tools string
conversion showing the problem - that'd really help the discussion I
think.

We'd have to make the following changes to struct rtl_uString:
- add (or steal from somewhere)  a single bit to indicate whether or not
the buffer field contained a read-only array of chars
- a 'sal_uInt32 nCapacity' field.

        Fitting that inside the ABI is going to be quite fun; then again - we
havn't played the old game of adjusting pointers to allocate magic data
before the struct yet I guess.

...and I hope we never do. ;) Really, there likely are better arguments in favor of a complete redesign of LO's string functionality than in trying to unite OUString and OUStringBuffer in a backwards-compatible way. While the distinction between the two is arbitrary and unnecessary, that problem is IMO "well under control."

Stephan

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.