I have a Delphi code to export text documents to PDF. The text documents contains texttables with formulas like =SUM(<A1:A4>):
1) open a text document with hidden property = true;
fileProp:= CreateProperties(['Hidden', True]);
myDoc:= StarDesktop.LoadComponentFromURL(myFile, '_blank', 0, fileProp);
2) export the document to PDF:
fileProp2:= CreateProperties(['FilterName', 'writer_pdf_Export']);
In PDF file, the texttable formulas hasn't been calculated and the texttable cells show "Expression is faulty".
This code uses Delphi OOo Library:
I suppose that issue is reproducible in Java, Visual Basic and others.
Created attachment 40671 [details]
Original ODT file with textable formulas
Created attachment 40672 [details]
Result: PDF file with "Expression is faulty" in texttables
I sent an example of an original ODT file with texttable formulas and the final PDF with the "Expression is faulty" in texttables.
Additionally, I found a related issue in OOo Issuezilla:
'There is currently no api to force a recalculation of a texttable'
I'm wondering if this isn't the same than
Could you try with 3.3.1 as the bug I'm thinking about is fixed in it?
*** This bug has been marked as a duplicate of bug 34466 ***
Thanks in advance, Cédric!
I updated to 3.3.1 but, unfortunately, my issue remains.
I tested with my Delphi code posted in my first comment and I have the same result in the final PDF file: "Expression is faulty" in cells with formulas (using the same ODT file in attachment).
Reopening then and assigning to Cedric. Please assign back to the list if you feel it isn't for you.
I can't reproduce with the recent commits on master with the following basic macro:
oDoc = StarDesktop.LoadComponentFromURL( _
ConvertToURL( "/path/to/some/file-with-formulas.odt" ), _
"_blank", 0, array() )
Dim aExportProps(1) as new com.sun.star.beans.PropertyValue
aExportProps(0).Name = "FilterName"
aExportProps(0).Value = "writer_pdf_Export"
oDoc.storeToUrl( ConvertToURL( "/path/to/some/file-with-formulas.pdf" ), aExportProps )