follow up on handling text:p tag on ods import

Daniel Bankston daniel.dev.libreoffice at gmail.com
Thu Jun 14 05:03:29 PDT 2012


Hi, Markus,

Just a follow up to our IRC conversation on ODS import's handling of the 
text:p tag for cell text...

I tried to replace XTextCursor usage by mimicking its actions with an 
OUString.  It works fine for cells with simple text (one text:p tag and 
one style in a cell), but for multiple text:p's or styles in a cell, 
Libo crashes with a seg fault.  I realized the problem is that the 
import still makes calls to XMLParaContext (xmloff) to handle 
complicated text:p's, and XMLParaContext needs an XTextCursor and is 
littered with UNO interface use.

So it seems either I should make the import conditionally use my 
OUString replacement for simple text and XTextCursor withXMLParaContext 
for complicated text, or I should abandon it all together for now.  Do 
you think it would be worth it to convert the import for just simple 
text?  I don't THINK it will be that difficult to implement that way.

If nothing else, I at least have a few new test cases added to the sc 
unit tests for this area of code.


Remaining in ScXMLTableRowCellContext is SetAnnotation and 
SetDetectiveObj.  At the very least, these methods will require me to 
first go back to ScMyTables and see if I can convert the use of the 
XShape interface.

Also there is the use of XAttributeList, but I think that is too deeply 
ingrained throughout all import.


So what do you think is the highest priority right now?



Respectfully,
Daniel Bankston


More information about the LibreOffice mailing list