Description: When an exported DOCX file is opened in Word, the columns are automatically resized to fit the contents. This behaviour is switchable in Word, so should be switched off in the exported file unless the equivalent behaviour has been switched on in Writer. Steps to Reproduce: 1. Insert a table with two columns of equal width; 2. Type one short word in the first column, and one very long word in the second column, so that it wraps to the next line; 3. Save the document to DOCX; 4. Open the DOCX file in Word; Actual Results: The second column is wider than the first, so the long word does not wrap to the next line. Expected Results: Both columns should be the same width, as they were in Writer. Reproducible: Always User Profile Reset: No Additional Info: Unticking "Automatically resize to fit contents" on the "Table Options" dialog in Word makes the columns the same width again.
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.) I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Created attachment 155228 [details] Table column width test.odt Sample document attached.
Reproduced in Version: 6.4.0.0.alpha1+ Build ID: de4839e66d3d195315729b95cc144cdab96b6e74 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded and Version 4.1.0.0.alpha0+ (Build ID: ff140bb6b8b109f14c270ff059f0b8d71dab5d6)
As written in this fine report, seen when LO-saved DOCX opened in MSO. Not seen with LO-saved DOC. Was also seen in LO 3.3 (where OOXML save was added) and worse.
Created attachment 156142 [details] A sample DOCX created in Word with two tables to compare We need to write <w:tblLayout w:type="fixed"/> into w:tblPr element of tables, as seen in the sample document, where the two otherwise identical tables are only differ by the said property said in Word 2016.
The pable properties are set in sw/source/filter/ww8/docxattributeoutput.cxx (DocxAttributeOutput::TableDefinition), and sw/source/filter/ww8/docxtablestyleexport.cxx (DocxTableStyleExport::Impl::tableStyleTablePr).
Hi! I'd like to take this easyhack as my first libreoffice task. I am able to reproduce the bug, and thanks to @Matthew Kogan and @Mike Kaganski 's pointers, this shouldn't take too long. Wish me luck !
As stated in https://bugs.documentfoundation.org/show_bug.cgi?id=113604 , there is no equivalent feature in LibreOffice yet. So I simply added <w:tblLayout w:type="fixed"/> to all exported docx tables. It solves the problem for all the cases I could think of.
(In reply to Louis Meyrat from comment #8) > As stated in https://bugs.documentfoundation.org/show_bug.cgi?id=113604 , > there is no equivalent feature in LibreOffice yet. > So I simply added <w:tblLayout w:type="fixed"/> to all exported docx tables. > It solves the problem for all the cases I could think of. Nice! Thanks for working on this. Have you a gerrit change to look at? Please put me into reviewers. Thanks!
Sure ! I am setting up gerrit right now
Louis Meyrat committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/8be3ae254f5b2ff76d9861ad4b9b5b5de5d14bb4 tdf#128290 add tblLayout element to docx export It will be available in 6.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Looks good in MSO. Thanks.
*** Bug 128047 has been marked as a duplicate of this bug. ***