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


On Thu, Nov 1, 2012 at 5:40 AM, Michael Meeks <michael.meeks@suse.com> wrote:
RTLFUNC(Len)
{
    (void)pBasic;
    (void)bWrite;

    if ( rPar.Count() != 2 )
        StarBASIC::Error( SbERR_BAD_ARGUMENT );
    else
    {
        const String& rStr = rPar.Get(1)->GetString();
        rPar.Get(0)->PutLong( (sal_Int32)rStr.Len() );
    }
}

        You can see that the problematic 'String' type is used (which truncates
to 64k lengths). I suspect you'd want to poke at:

        basic/inc/basic/sbxvar.hxx

        particularly the SbxValue and it's implementation inside:

        basic/source/sbx/sbxvalue.cxx

        To use rtl::OUString instead of String - that shouldn't be too hard,
it's easy to convert between the two for compatibility as you push the
perimiter of that wider.

FYI... I have a feature branch to convert String to OUString in
basic... (among other places)
I've been working on it last week while 'offline' so it is not pushed
yet.. but I should be able to push it for review soon.

Norbert

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.