Bug 131420 - Filesave DOCX: Border from frame not present after RT
Summary: Filesave DOCX: Border from frame not present after RT
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Tibor Nagy
URL:
Whiteboard: target:7.1.0 target:7.0.2
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Frames
  Show dependency treegraph
 
Reported: 2020-03-19 11:53 UTC by Timur
Modified: 2020-09-15 14:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
test compared MSO LO (109.48 KB, image/png)
2020-03-19 11:53 UTC, Timur
Details
test DOCX (16.68 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-03-19 11:55 UTC, Timur
Details
test change compared MSO LO (41.63 KB, image/png)
2020-03-19 12:23 UTC, Timur
Details
test compared MSO LO 7.1+ after the fix (107.26 KB, image/png)
2020-09-07 12:57 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2020-03-19 11:53:45 UTC
Created attachment 158796 [details]
test compared MSO LO

1. Open DOCX with frame with borders created in MSO
2. Resave in LO as DOCX (RT) and DOC
3a. Open DOCX in MSO and LO and see that borders are missing (LO shows frame placeholders)
3b. Open DOC in MSO and LO and see that borders are somewhat present (custom border with line above is shown as box border)

Attached screenshot. Test with LO 7.0+.

Normally are DOCX and DOC different bugs. But let's have an overview here and see what's gonna be fixed, easy to open follow-up.
Comment 1 Timur 2020-03-19 11:55:03 UTC
Created attachment 158797 [details]
test DOCX
Comment 2 Xisco Faulí 2020-03-19 12:07:36 UTC
Reproduced in

Version: 7.0.0.0.alpha0+
Build ID: 086bfde59232076644995ae862cd43865419ad98
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 Xisco Faulí 2020-03-19 12:09:33 UTC
Also reproduced in

Version: 5.3.0.0.alpha0+
Build ID: fb790880eb11552b2e7d1dcf6c09d2663712290f
CPU Threads: 4; OS Version: Linux 4.19; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 4 Xisco Faulí 2020-03-19 12:11:33 UTC
Not reproduced in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

saving to DOCX
Comment 5 Timur 2020-03-19 12:23:55 UTC
Created attachment 158803 [details]
test change compared MSO LO

OO didn't open frames well, I saw it from LO 3.5 and LO 4.0.
4.3 is better but not fully OK, it lacks any border for "custom border". 
So I don't see this as a regression, it was just somewhat better in 4.3.
But bibisect in 4.4 would be useful.
Comment 6 Timur 2020-05-14 08:07:49 UTC
So, we had 2 changes in 4.4.

First half-good frames went to very bad (missing frames):
 1a67c70d7ef412cb4d44aca1bebd37e7aa63cbf0 is the first bad commit
commit 1a67c70d7ef412cb4d44aca1bebd37e7aa63cbf0
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Mar 14 21:44:57 2015 +0800

    source-hash-1c876f5616522ab695de8c0316cdb0c601081815
    
    commit 1c876f5616522ab695de8c0316cdb0c601081815
    Author:     Rohit Deshmukh <rohit.deshmukh@synerzip.com>
    AuthorDate: Fri Jun 13 11:39:56 2014 +0530
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Thu Jun 19 11:01:17 2014 +0000
    
        fdo#78590: Fix for Corruption of para with framePr & drawing object into para
    
        Issue:
         - File contains paragraph with framePr have graphic object in it.
         - So Libreoffice converts framePr into textbox.
         - So after saving file textbox gets exported with drawing object.
         - MS office does not allowed drawing object inside tetxbox.
    
        Change-Id: I673e0e9f6681a189bde1c63a8cb7aea2cac0ab41
        Fix: - Export framePr into paragraph and igonre exporting of
               dummy textbox added by LO for framePr.
        Reviewed-on: https://gerrit.libreoffice.org/9389
        Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
        Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>

Previous source-hash-ee9e8f677103f3b93faaef55832fb704f95e0a4b.

https://gerrit.libreoffice.org/plugins/gitiles/core/+/1c876f5616522ab695de8c0316cdb0c601081815%5E!/
Comment 7 Timur 2020-05-14 08:19:15 UTC
Next, there was a "fix", very bad missing frames went to bad (frames are there but without borders):
 ac1f74a19cbf52c57666e3fb4d98b500da227b4f is the first bad commit
commit ac1f74a19cbf52c57666e3fb4d98b500da227b4f
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Mar 14 22:37:45 2015 +0800

    source-hash-83d51e5e52688c4c9bc0ad70a511458bb06a242d
    
    (Bibisect: Skipped preceding irrelevant commit(s) 5ccb510ef7dd6688b86038b37563583f64107936)
    
    commit 83d51e5e52688c4c9bc0ad70a511458bb06a242d
    Author:     Rohit Deshmukh <rohit.deshmukh@synerzip.com>
    AuthorDate: Tue Jul 1 21:24:24 2014 +0530
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Thu Jul 3 13:36:26 2014 +0000
    
        fdo#80748: Fix for file corruption due to framePr
    
         -For framePr Unit test is there in ooxmlexport.cxx
            -http://opengrok.libreoffice.org/xref/core/sw/qa/extras/ooxmlexport/ooxmlexport.cxx#3578
    
        Change-Id: Ic1fd4c7a863d8ab57c6495e20bff6863eb941688
        Reviewed-on: https://gerrit.libreoffice.org/10045
        Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
        Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>

Previous source-hash-83d51e5e52688c4c9bc0ad70a511458bb06a242d.

https://git.libreoffice.org/core/+/83d51e5e52688c4c9bc0ad70a511458bb06a242d^!/
Comment 8 Timur 2020-05-14 08:21:03 UTC
And finally, Tamás Zolnai wrote: 
Regression now fixed:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b927c1f4b334f80d2c2965e5b7327d6b6a685105

author	Tamás Zolnai <tamas.zolnai@collabora.com>	2016-10-28 15:24:51 +0000
committer	Tamás Zolnai <tamas.zolnai@collabora.com>	2016-10-28 14:10:41 +0000
commit b927c1f4b334f80d2c2965e5b7327d6b6a685105 (patch)
tree 81c858f4a49ac09608294088bb2ecab77b93be5a
parent 8a22bc93e0988188a87c0a787a9b32a7f74da84d (diff)
tdf#103544: DOCX exp.: Image loss when have a frame anchored to the same para.
Regression from: 83d51e5e52688c4c9bc0ad70a511458bb06a242d

Partly revert the commit causes this regression.
I checked the related bugs (tdf#78590,tdf#80748)
intended to be fixed by this commit and reverting
this part does not bring back the corruption.
I guess something changed in frames' and text boxes'
import in the meantime, because this MergeMarks::IGNORE
is useless now.
Comment 9 Timur 2020-05-14 08:41:23 UTC Comment hidden (obsolete)
Comment 10 Commit Notification 2020-08-07 09:22:31 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6f22e4e5f93af27fa41bd1054a817df2409fdc62

tdf#131420 DOCX export: fix missing border of frame

It will be available in 7.1.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.
Comment 11 Commit Notification 2020-08-07 14:22:30 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a2e5c8a0dc9254591711e32245e2e6b9dbd2449f

Revert "tdf#131420 DOCX export: fix missing border of frame"

It will be available in 7.1.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.
Comment 12 Commit Notification 2020-08-13 15:46:33 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/49e2bd6103669ca94d4e308fc08beed57f85c7e2

tdf#131420 DOCX export: fix missing border of frame

It will be available in 7.1.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.
Comment 13 Timur 2020-09-07 12:57:10 UTC
Created attachment 165231 [details]
test compared MSO LO 7.1+ after the fix

Looks good. Thanks. 

Note: there's some line in fileopen, but that's another issue.
Comment 14 NISZ LibreOffice Team 2020-09-14 08:00:17 UTC
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 34a09c9c61bff30e8c4d16132bb47b2b1b16e422
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded
Comment 15 Timur 2020-09-14 10:08:44 UTC
(In reply to Timur from comment #13)
> Note: there's some line in fileopen, but that's another issue.
bug 136549
Comment 16 Commit Notification 2020-09-15 14:55:14 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/589ae9b70346e3fae768c4e7aafbc7c504861987

tdf#131420 DOCX export: fix missing border of frame

It will be available in 7.0.2.

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.