Apache OpenOffice (AOO) Bugzilla – Issue 121975
docx import patch: fixing table width (relative table width is now supported)
Last modified: 2017-05-20 11:27:45 UTC
My patch fixes a docx import table width problem. In the current AOO version relative table width is ignored, instead the table width is determined by the grid array. But this is wrong, the code assumes that the grid array contains Twip measurement values ... instead grid entries are specified to be relative values... A grid array of "1:2:1" should produce the same table as if the grid array would be "3:6:3". This bug most probably also fixes 76425. The patch resolves this problem, I make it available to AOO under ALv2..
Created attachment 80476 [details] patch, fixing table width
Created attachment 80477 [details] bugdoc, containing a table that is displayed with the wrong width
taking over for patch review and integration
@Sven Jacobi: The patch does not fix the problem. It looks like that handling of newly introduced TablePropertyMap::TABLE_WIDTH_TYPE is missing. Also the overwrite of TablePropertyMap::TABLE_WIDTH in <DomainMapperTableManager::endOfRowAction()> is not considering an already set TablePropertyMap::TABLE_WIDTH_TYPE. Can you please revise your patch? Thx in advance.
Sorry Oliver, I have no time at the moment, so it might be best to close this issue.. But I can tell you of my experience with the docx filter in OO. I think that the filter is far away from being maintainable. In my opinion the best would be to dump this code to trash and start rewriting it. The domainmapper in writerfilter is like hell, each new feature let you break out in a sweat. It is really hard stuff, there are a many factories created from a mysterious 1 mb large model.xml, lots of wrapper classes that wraps other wrapper classes... no documentation at all and of course you won't ever get a sense of delight if you debug the writer filter code.
Reset assigne to the default "issues@openoffice.apache.org".