To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=48335
------- Additional comments from [EMAIL PROTECTED] Fri Apr 29 01:40:12 -0700
2005 -------
Note this is not part of my problem, my problem is
drops leading ' inside "" when reading csv
I have always found that code faults cluster and it is easiest to fix
everything that is wrong with the localised piece of functionality all at once.
Note OOo also interprets csv fields with leading '=' as special
(the one liner also fixes that)
eg <Data>...,"=a1",...</Data> is read as a formula
(That might make sense but formulas are not exported to csv that way.)
This is actually a potentially good feature.
IF
<Data>...,=a1,...</Data> is interpreted as a formula AND
<Data>...,"=a1",...</Data> is interpretd as text
AND the GUI for export as CSV is given a check box to 'export formulae'
THEN
export csv with export formulae checked would write
<Data>...,=a1,...</Data> to the file
export csv with export formulae NOT checked would write
<Data>...,"Contents of cell a1",...</Data> to the file (as it does now)
I have in my time written rather a lot of robust CSV and related parsing IO code
I could, if there was need, write a serious spec/defintion of CSV IO
and provide a test set of data to thoroughly exercise the algorithm.
Code that decides ' && = are special
BOOL ScColumn::SetString( SCROW nRow, SCTAB nTab, const String& rString )
{ ...
if ( !bIsLoading ) { ...X... }
...
if ( cFirstChar == '=' )
{
...
} else if ( cFirstChar == '\'')
...
}
I suspect we/you cant mess easily with the code at ...X... because my bet is
some of the other format importers probably depend on it. Looks like the code
needs a good refactoring ... its already been patched.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]