Hi there,
On Wed, 2012-10-31 at 08:16 +0100, post wrote:
I have a special request regarding spreadsheet functions.
Ah - so, this list is really for reviewing patches, discussing quirks
of the code, and helping people develop fixes.
When importing a string larger than 64k the len() function reports zero
length.
Right - so there are tons of 64bit string limits around the code -
we're slowly removing them.
Can the next version of Libreoffice handle strings larger than 64K in
calc? Or do the cell in calc have a string limit of 64k built in?
The features of the next version are limited only by what people are
prepared to hack on :-) would you like some code pointers to get
involved in fixing this ? Encouragingly the ScStringCell has an
rtl::OUString embedded in it, so (quite possibly) there is just some
binding / truncation problem inside basic itself.
If you see basic/source/runtime/methods.cxx and look for:
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.
Patches most welcome,
HTH !
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.