Bug 33462

Summary: FILEOPEN: docx: import applies height of first row to following tables/rows
Product: LibreOffice Reporter: MarcelHB <marscel>
Component: WriterAssignee: Noel Power <nopower>
Status: RESOLVED FIXED    
Severity: major    
Priority: high    
Version: 3.3.0 RC4   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: demonstrating docx-file
patch file for TableManager.hxx
optimized patch for TableManager.hxx

Description MarcelHB 2011-01-25 06:22:30 UTC
Created attachment 42457 [details]
demonstrating docx-file

In a docx file, my first table has one row with a fixed row-height. When I open this docx with 3.3.0 RC4, all following tables and their rows have the height of the very first one although they aren't set to have any specific row height.

The attached document will demonstrate this issue.
Comment 1 Noel Power 2011-01-25 10:18:26 UTC
yeah, the layout is pretty woeful, I'll try to take a look
Comment 2 MarcelHB 2011-04-30 16:47:36 UTC
Created attachment 46206 [details]
patch file for TableManager.hxx

I attached a patch that is fixing this bug for all my test cases.
Comment 3 Noel Power 2011-05-03 04:19:59 UTC
(In reply to comment #2)
> Created an attachment (id=46206) [details]
> patch file for TableManager.hxx
> 
> I attached a patch that is fixing this bug for all my test cases.

great job!! really well done for sticking at this and finding the root cause. I am so glad the hints by mail were helpful, just 2 things..

1st, do you really need the second part of the patch ? I am pretty sure that the row properties have been already built before 'resolveTable' has been called. 

note: the row properties seem to be stored in TableManager::endParagraphGroup() ( look for the 'if (isRowEnd())' conditional and see there the resetRowProps call immediately after the row properties are stored.

Could you re-test with that hunk removed and confirm ?

2nd, can you confirm the patch is licenced under LGPLv3+/MPL

and one last thing, normally patches get submitted to the mailing list, could you please do that asap ( mention the bug etc. ) 
This is a good idea to 
a) let everyone know what a great job you have done :-)
b) let a wider audience of reviewers have a look 
c) get some attention for the importance of this bugfix ( which needs imo to be in the 3.4 release ) and we need to get signoff from someone else to commit for that branch
Comment 4 Noel Power 2011-05-03 04:21:29 UTC
(In reply to comment #3)
> and one last thing, normally patches get submitted to the mailing list

libreoffice@lists.freedesktop.org is the list in question
Comment 5 MarcelHB 2011-05-03 10:20:04 UTC
Created attachment 46294 [details]
optimized patch for TableManager.hxx

You're right. It is working by only correcting the variable's name as well. I just tested it.

Of course this tiny little piece of patch file is licensed under LGPL v3+.

I'm putting it into the mailing list now.
Comment 6 Noel Power 2011-05-04 01:24:54 UTC
oops forgot to mark as fixed