Download it now!
Bug 36876 - FILESAVE: When saving in MSWord doc format, table is put inside a frame
Summary: FILESAVE: When saving in MSWord doc format, table is put inside a frame
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 Beta1
Hardware: All All
: lowest minor
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.1.0 target:4.0.4
Keywords:
: 34561 45843 (view as bug list)
Depends on:
Blocks: mab3.6
  Show dependency treegraph
 
Reported: 2011-05-05 09:15 UTC by Elio Voci
Modified: 2013-05-15 13:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
simple file with a table (24.60 KB, application/vnd.oasis.opendocument.text)
2011-05-05 09:15 UTC, Elio Voci
Details
report's file converted on my machine (27.50 KB, application/force-download)
2011-05-17 09:40 UTC, Bob Harvey
Details
test file created in .doc (9.00 KB, application/force-download)
2011-05-17 09:41 UTC, Bob Harvey
Details
table in this file appears in frame in Writer (created as explained above) (216.00 KB, application/msword)
2011-12-28 02:24 UTC, sasha.libreoffice
Details
Example of bad import of doc with table from OO Bug 13791 (42.00 KB, application/msword)
2012-01-19 04:00 UTC, Timur
Details
prewious attachment fixed (42.00 KB, application/msword)
2012-01-19 05:37 UTC, sasha.libreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elio Voci 2011-05-05 09:15:39 UTC
Created attachment 46367 [details]
simple file with a table

Open the attached file.
Save it in MS Word 97 format.
Open the .doc: the table is put within a frame.
Comment 1 Noel Power 2011-05-06 04:43:09 UTC
yes I see it too but is this really a problem?, isn't there a nag dialog that tells that the formatting etc. may not be the same in the exported document.
Comment 2 Elio Voci 2011-05-06 07:36:52 UTC
Occidit qui non servat. (If it is not a feature, is a bug)

I am dealing with MS-Word aficionados.
My counterparts complain about my products, Word-exported, because documents are moderately garbled since, inter-alia, if the table resizes, the frame wont.
 
I claim that LibreOffice can be adopted as MS-Office replacement.
These kind of flaws, although nag-announced, reduce the credibility of such statement.
Bottom line: I understand that I've to live with it.
I just wonder why only some table is put into the frame, and some other don't.
Comment 3 Bob Harvey 2011-05-17 09:40:08 UTC
Created attachment 46829 [details]
report's file converted on my machine

I'm using 3.3.2 on XP, and Word 97.  I see no trace of a frame either in this sample supplied (I attach my conversion) or in a small file created for the purpose (next attachment)
Comment 4 Bob Harvey 2011-05-17 09:41:03 UTC
Created attachment 46830 [details]
test file created in .doc

I created this one, and can see no trace of a frame in there either.
Comment 5 Timur 2011-06-11 08:27:49 UTC
I don't now if this is related to http://openoffice.org/bugzilla/show_bug.cgi?id=13791 or there should be a separate bug for that problem.
Comment 6 sasha.libreoffice 2011-06-12 23:42:34 UTC
>http://openoffice.org/bugzilla/show_bug.cgi?id=13791
is separate problem

Bug 34561 - document from MSOffice 2003 with table opens wrong
is duplicate for this problem, I will close it
Comment 7 sasha.libreoffice 2011-06-12 23:43:55 UTC
*** Bug 34561 has been marked as a duplicate of this bug. ***
Comment 8 Björn Michaelsen 2011-12-23 12:03:33 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 9 Timur 2011-12-24 11:13:45 UTC
I cannot reproduce the bug now in LO 3.4.4 and 3.5 beta1 with the files from Elio Voci. I tried on Windows and Linux. 

BUT, the problem from https://issues.apache.org/ooo/show_bug.cgi?id=13791 and from bug 34561 remain, and this issue is "major" for me.
This should be clarified, and that's why I set this as "new".
Comment 10 sasha.libreoffice 2011-12-28 02:21:32 UTC
To produce file with this problem:
1. Start MSWord with empty document
2. Create table with 2 columns and 200 rows
3. Select all table and right click on it, then select "Table properties" in context menu
4. in dialog window "Table properties" on first tab "Table" in bottom is area "Wrap" with 2 buttons: "none" and "around". Click on button "around".
5. save resulting document.

When LibO opens this document, it see that text wraps table. But in Writer this ability possible only if table inserted in frame. Therefore Writer creates frame. But what to do if table is on several pages? I do not know easy answer.

To repair document in MSWord, select all table and press button "none" as described above
Comment 11 sasha.libreoffice 2011-12-28 02:24:21 UTC
Created attachment 54883 [details]
table in this file appears in frame in Writer (created as explained above)
Comment 12 Timur 2012-01-19 04:00:34 UTC
Created attachment 55773 [details]
Example of bad import of doc with table from OO Bug 13791

This is not minor bug, but rather a major bug.
Comment 13 sasha.libreoffice 2012-01-19 05:37:44 UTC
Created attachment 55780 [details]
prewious attachment fixed

I have changed property of tables in last attachment to "Not wrap" using MSWord 2003 and attached result. 
This bug in LibO is serious, I agree. But to solve this problem developers will do very much work. At this time property "Text wrap" for tables not exist in LibO.
Try talk directly to developers, my be they will help.
Comment 14 sasha.libreoffice 2012-05-16 03:44:39 UTC
*** Bug 45843 has been marked as a duplicate of this bug. ***
Comment 15 Joel Madero 2012-11-08 17:01:49 UTC
I have removed this from hard hack list. After discussion with developers, we are staying away from minor bugs for hard hack candidates. 

Best Regards
Comment 16 Joel Madero 2013-02-11 16:27:52 UTC
Version 4.1.0.0.alpha0+ (Build ID: 80cbc04c2cbe25ebdfe2f22bb2e5ba62728e963)
Bodhi Linux

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It seems like I can reproduce this problem. I'm not clear on the real implications of a table being in a frame vs. it not being in a frame. Side by side ODS and .doc, I can do identical things to the table and they look identical, only notice the frame when I click on the edge twice and the "Frame" dialog comes up.

I am leaving this on MAB just because Sasha has marked several duplicates so it seems to be that others see something that I don't :) 

Moving to 3.6 MAB as 3.5 is at end of life and we're trying to close the 3.5 most annoying meta bug.

@Elio - can you describe what ends up garbled or behaving incorrectly other than it being in a frame. A PDF showing a messed up table in Microsoft might be useful (so we can really see the implications of the table being in a frame).
Comment 17 Miklos Vajna 2013-05-13 13:53:53 UTC
Hmm, I'll try to look into this. When I check the original bugdoc, I see no textframes in the document, then this is saved in doc as tables with wrapping "around" -- that indeed sounds like a bug.
Comment 18 Miklos Vajna 2013-05-14 16:12:39 UTC
So, this is a regression from cbba191cf0fff148935f24d111cb124bd5a5328b.

The problem is that in case the table has non-zero top or bottom margin, WW8AttributeOutput::TableSpacing() writes sprms which will make Word think that the table is a floating one. Now if you edit anything in that doc in Word and open it in Writer again, you get frames.

I think the solution for this can be to check if we're dealing with a table that is already inside a frame, and only export the spacing in that case.
Comment 19 Commit Notification 2013-05-15 10:08:10 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=335c264d508a9c73845b94483475435a0cebfe64

fdo#36876 WW8 filter: fix export of table margins



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Miklos Vajna 2013-05-15 10:19:24 UTC
-4-0 review: https://gerrit.libreoffice.org/3915
Comment 21 Commit Notification 2013-05-15 12:01:45 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dc6c363f0c7fec8be700b272ea94eebc8e3534a9&h=libreoffice-4-0

fdo#36876 WW8 filter: fix export of table margins


It will be available in LibreOffice 4.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 sasha.libreoffice 2013-05-15 13:35:40 UTC
Much thanks for fixing this bug!