Issue 121975 - docx import patch: fixing table width (relative table width is now supported)
Summary: docx import patch: fixing table width (relative table width is now supported)
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-28 14:42 UTC by Sven Jacobi
Modified: 2017-05-20 11:27 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch, fixing table width (7.83 KB, patch)
2013-03-28 14:44 UTC, Sven Jacobi
no flags Details | Diff
bugdoc, containing a table that is displayed with the wrong width (6.41 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-03-28 14:46 UTC, Sven Jacobi
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Sven Jacobi 2013-03-28 14:42:51 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..
Comment 1 Sven Jacobi 2013-03-28 14:44:23 UTC
Created attachment 80476 [details]
patch, fixing table width
Comment 2 Sven Jacobi 2013-03-28 14:46:41 UTC
Created attachment 80477 [details]
bugdoc, containing a table that is displayed with the wrong width
Comment 3 Oliver-Rainer Wittmann 2013-04-19 12:44:34 UTC
taking over for patch review and integration
Comment 4 Oliver-Rainer Wittmann 2013-05-22 11:35:46 UTC
@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.
Comment 5 Sven Jacobi 2013-05-22 16:30:34 UTC
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.
Comment 6 Marcus 2017-05-20 11:27:45 UTC
Reset assigne to the default "issues@openoffice.apache.org".