Bug 48658 - FILEOPEN particular .docx with destroyed TABLE structure (start at comment7)
Summary: FILEOPEN particular .docx with destroyed TABLE structure (start at comment7)
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: Justin L
URL:
Whiteboard: (target:4.0.0.0) target:5.4.0 target:...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2012-04-13 11:03 UTC by matthias wolpers
Modified: 2017-01-30 15:10 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
the sample document for experimentation (176.92 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-04-13 11:03 UTC, matthias wolpers
Details
screenshot doc in std edit mode (5.22 KB, image/png)
2012-04-13 11:05 UTC, matthias wolpers
Details
what header looks like in header edit mode (9.52 KB, image/png)
2012-04-13 11:06 UTC, matthias wolpers
Details
this is what libre office makes of it on opening the sample file (8.27 KB, image/png)
2012-04-13 11:06 UTC, matthias wolpers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matthias wolpers 2012-04-13 11:03:59 UTC
Created attachment 59921 [details]
the sample document for experimentation

(i guess there are plenty of import tickets but none seemed similar enough to hijack, i hope i'm not breaking the spirit of the thing: my apologies if i did after all)

i have a sample file that is typical of what we use at work:
there is a table in the header section with document metadata (author, title, and such like)
opening this docx with LO3.5.2 completely garbles the table, bloating up line numbers consumed by the header as it does. teh doc layout is affected.

i have made screenshots to show what is happening, please see those.

the corruption effect is observed both on a win 7 machine and on a mac os x machine. 

the doc is generated using a win 7 pc with (quote)
MS Office Word 2007 (12.0.6654.5000) SP2 MSO 12.0.6562.5003)
Part of MS Office Stsandard 2007(unquote)

attachments:
# 1: the sample document for experimentation
# 2: screen shot ms office standard edit mode
# 3: screen shot ms office header edit mode 
# 4: what libre office 3.5.2 makes of it
Comment 1 matthias wolpers 2012-04-13 11:05:04 UTC
Created attachment 59922 [details]
screenshot doc in std edit mode
Comment 2 matthias wolpers 2012-04-13 11:06:15 UTC
Created attachment 59923 [details]
what header looks like in header edit mode

this is in ms word
Comment 3 matthias wolpers 2012-04-13 11:06:59 UTC
Created attachment 59925 [details]
this is what libre office makes of it on opening the sample file
Comment 4 leighman 2012-08-08 21:08:50 UTC
Still an issue in 3.7.0.0.alpha0+ (Build ID: 8a66a77)
This has enough info for a developer to begin working on so I'm setting it to NEW.
Sorry for the delay in dealing with this
Comment 5 Rainer Bielefeld Retired 2013-01-02 14:25:56 UTC
Not a valid bug report, any useful info missing in text. 

I still see the problem with  "LibreOffice 3.6.4.3" German UI/ German Locale [Build-ID: 2ef5aff] {pull date 2012-11-28} on German WIN7 Home Premium (64bit) 

OK with  parallel installation of  "LOdev  4.0.0.0.beta2   -  GERMAN UI / German Locale  [Build ID: 4104d660979c57e1160b5135634f732918460a0)]"  {tinderbox: @6, pull time 2012-12-20} on German WIN7 Home Premium (64bit) with separate /4 User Profile for Master Branch,

WFM, I'm afraid it will be too difficult to backport the fix to 3.6

@leighman:
Please see <https://wiki.documentfoundation.org/BugTriage#Process>  item 5!
Please do not create whiteboard key words without discussion.
Comment 6 leighman 2013-01-02 19:45:29 UTC
@Rainer
It was added in discussion with Joel on #libreoffice-qa but evidently never took off.
Comment 7 Justin L 2017-01-10 08:56:58 UTC
Fixed in 4.0, but broken again in 4.4. The table in the header is basically invisible.  I see it flicker in as the page loads, and then disappear.  It is visible when round-tripped.

Using Ubuntu and bibisect 44max identified:
commit 15c3a08b8b1e8060f9659c7bc98480a39d1802c5
Author: Miklos Vajna <vmiklos@collabora.co.uk>
CommitDate: Fri Jul 4 18:00:53 2014 +0200
bnc#884615 VML import: import OLE objects in header with background wrapping
    We already do this for drawingML shapes since commit
    500343105707a9905f5198a4af6ad58fe307b7c2 (DOCX drawingML shape import:
    always set Opaque, 2013-12-04), make the VML / OLE case behave the same
    as well.
    Change-Id: Ic22f1f3cfd325ccbbb9bd6fe9814553683e4de55
Comment 8 Xisco Faulí 2017-01-10 12:51:02 UTC
Adding Cc: to Miklos Vajna
Comment 9 Justin L 2017-01-16 09:04:09 UTC
proposed fix https://gerrit.libreoffice.org/33152
tdf#48658 writerfilter: only set THROUGH wraps as opaque
Comment 10 Justin L 2017-01-16 09:07:10 UTC
see SW basesh.cxx:SetWrapModel() for the logic Writer uses to set RES_OPAQUE.
Comment 11 Commit Notification 2017-01-20 11:58:57 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#48658 writerfilter: only set THROUGH wraps as transparent

It will be available in 5.4.0.

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 12 Commit Notification 2017-01-23 04:50:33 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f0b05a64733fcaac39127db5e5f2fa3ad80a1b9&h=libreoffice-5-3

tdf#48658 writerfilter: only set THROUGH wraps as transparent

It will be available in 5.3.1.

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 13 Cor Nouws 2017-01-30 15:10:45 UTC
OK in Build ID: c6dd735afb2e1b3837c4f8c5659f52fafab4c56f

Thanks Justin!

Note: the top paragraph in the header and the two paragraphs in the table, all have line numbering set. I do see that too in attachment 59925 [details] (reported LibreOffice problem). Not in attachment 59922 [details] (situation MsWord).
I guess this is worth creating a new issue?