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']); myFile2:= convertToURL('c:\teste10.pdf'); myDoc.storeToURL(myfile2, fileProp2); In PDF file, the texttable formulas hasn't been calculated and the texttable cells show "Expression is faulty". This code uses Delphi OOo Library: http://www.ooomacros.org/dev.php#133853 I suppose that issue is reproducible in Java, Visual Basic and others. Thanks!
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' http://www.openoffice.org/issues/show_bug.cgi?id=52787
I'm wondering if this isn't the same than https://bugzilla.novell.com/show_bug.cgi?id=664516
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: Sub Main 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 ) End Sub