Bug 121734 - Floating table from a .DOC may paste to another document with different frame properties
Summary: Floating table from a .DOC may paste to another document with different frame...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.3.0
Keywords: filter:doc
Depends on:
Blocks: DOC-Tables
  Show dependency treegraph
 
Reported: 2018-11-27 10:55 UTC by Mike Kaganski
Modified: 2019-09-20 14:04 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A floating table (26.00 KB, application/msword)
2018-11-27 10:55 UTC, Mike Kaganski
Details
A .DOCX that used as the source for attachment 147062 (1.43 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-27 10:59 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-11-27 10:55:44 UTC
Created attachment 147062 [details]
A floating table

The .DOC contains a single floating table. When imported into Writer, it turns into a frame with a table. The frame has 0 padding, and no borders. Specific to .DOC import, the document gets the "Frame" frame style to have the same properties as the single frame (if the document is converted to DOCX using Word, then importing resulting DOCX into Writer does *not* change the frame style).

This makes it problematic to copy-paste the frame-with-table into other documents.

1. Open the attachment in Writer.
2. Select the frame-with-table and copy (Ctrl+C).
3. Create a new Writer document.
4. Paste into it.
5. Check "Frame" frame style (important! only check this at this stage) (has 0 mm padding, and all borders unset).
6. Insert→Frame→Frame Interactively

Result: the newly interactively-created frame has no borders and has 0 padding (this indicates that inserting a frame into a document without frames redefines the frame to that of the source).

7. Create a new Writer document.
8. Check "Frame" frame style (has 1.5 mm padding, and all borders set).
9. Insert→Frame→Frame Interactively
10. Paste into it.

Result: the inserted table has "double" borders (frame has a border and a padding); interactively-created frame has borders and padding.

So, trying to copy such tables into an existing documents with some frames makes copied tables "double-bordered", which then requires manual adjustments. The problem here seems to be the redefinition of the frame style, which is unlike DOCX (so the likely solution would be to implement the missing bits to follow DOCX filter).
Comment 1 Mike Kaganski 2018-11-27 10:59:42 UTC
Created attachment 147063 [details]
A .DOCX that used as the source for attachment 147062 [details]

For comparison, the steps above may be repeated using this one.
Comment 2 陳彥宏 2018-11-29 08:38:05 UTC
test with the fellow,and i get the same problem

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: CL
Comment 3 Dieter 2018-11-29 21:04:23 UTC
Set to NEW because of comment 2
Comment 4 Mike Kaganski 2018-12-11 23:03:11 UTC
https://gerrit.libreoffice.org/64992
Comment 5 Commit Notification 2018-12-12 04:53:08 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d398e9248c183cf988b6d985b342b0cbff93ea02%5E%21

tdf#121734: ww8 import: use direct formatting for floating object frames

It will be available in 6.3.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.