Niklas Nebel wrote:
On 08/10/08 01:16, William S Fulton wrote:
> Eike Rathke wrote:
>> Special care must be taken of places that directly or indirectly call
>> ScCellFormat::GetString() because those now may have to digest a newline >> that they didn't have to before. Same for ScFormulaCell::GetString() and
>> ScEditCell::GetString(), the latter being the most invasive change of
>> your patch. This has to be carefully checked and might make it necessary
>> to introduce another method ScEditCell::GetMultilineString() to be used
>> in formulas and not touch ScEditCell::GetString(). Places that still
>> obtain a string via ScEditUtil::GetSpaceDelimitedString() now receive
>> a string that is different from ScEditCell::GetString(). Check for side
>> effects. Printing should be tested as well.
>>
> I'm aware that the change to ScEditCell::GetString is very central and
> it did concern me. However, it is becoming clearer and clearer to me
> that putting the fix in here is key to fixing all the other problems
> and the more I've read around this area the more things I see fixed by
> the patch, precisely because the fix was done in such a core piece of
> code. I've found another 4 bug reports that the patch fixes and listed
> them in http://www.openoffice.org/issues/show_bug.cgi?id=35913, but it
> needs Eike or someone with appropriate privileges to mark the
> duplicates. For those that are interested, I've attached some before
> and after screenshots in #35913. I've been using the patch in anger
> over the last few days and nothing seems broken, but clearly more
> testers are needed.

It fixes the issues with missing line breaks, but it does create new
issues with unwanted/unhandled breaks. Some problem areas:
- Conversion to unformatted text, especially for clipboard or DDE links
- Other line-based formats (DIF, SYLK)
- Conversion of formulas to text cells (Paste Special, unselect Formulas)
I've attached a new patch to the bug to address these issues. I've tested all the paste special, dde linking, export, drag-and-drop and save as options I could see in my Linux version. They now all seem to be okay to me, ie the multiline formula aspects are working and in a few cases both formula and non-formula multilines are now fixed. I am not able to test Pocket Excel and the Unified Office Format Spreadsheet and Excel 2003 xml formats look rather incomplete to me, so have not attempted to do anything for these yet.

I played around with OOo3 beta 2 on Windows and see that after copying a Calc cell, there are additional paste special options in Word and Excel compared to Linux. I don't have a Windows build environment, so would appreciate some advice for testing these on Linux or someone to try the patch out on Windows. In particular I test paste special: Enhanced metafile, Unformatted unicode, SYLK, DIF, Biff8. I've fixed saving to SYLK and DIF file formats, so am hoping the same code is used.
- Text content in the file format (<text:p> versus <text:line-break>)
Does this have to be <text:p> even though <text:line-break> works fine? I'm just off on my summer holiday, so can do that when I get back if needed.

The new patch also addresses the Excel xls export converter, it turns "wrap text" on for formula cells so that this is now consistent with non-formula cells. I've also implemented Eike's suggested performance improvements, thanks for the details, they were spot on. One thing in this that might need a closer look is ScFormulaResult::SetToken() which I didn't modify - there might be scope for setting meMultiline = MULTILINE_FALSE for a tiny extra performance gain. Any thoughts?

William

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to