Bug 103001 - FILESAVE document with rotated image saved as docx cannot be opened in MS Word
Summary: FILESAVE document with rotated image saved as docx cannot be opened in MS Word
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha1
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2016-10-05 07:34 UTC by Milos Sramek
Modified: 2016-10-28 10:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Documents illustrating the bug (133.59 KB, application/x-zip-compressed)
2016-10-05 07:34 UTC, Milos Sramek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Sramek 2016-10-05 07:34:05 UTC
Created attachment 127816 [details]
Documents illustrating the bug

Hi,

Bug description:
File wmf-bad-LO53.docx (see attachment), created by Libreoffice53 from wmf-bad.docx cannot be opened in MSWord (both 2010 and 2013 were tested)
File wmf-good-LO53.docx, created by Libreoffice53 from wmf-good.docx can be opened in MSWord

Input files wmf-bad.docx and wmf-good.docx differ in just one tag in document.xml (image in the text area is rotated):
wmf-bad.docx: <a:xfrm rot="15097050">
wmf-good.docx: <a:xfrm>

The probable reason of the problem is that file header1.xml.rels is missing in wmf-bad-LO53.docx in the folder word/_rels/
All three images in the document are just instances of one image which is really stored in the document, maybe that the problem is related also to this.

Bibisected using the lo-linux-dbgutil-daily-till51 repository:

milos@trigan:~/LO/lo-linux-dbgutil-daily-till51$ git bisect log
# bad: [ea0f3871e9b080744fc700c21e876d0ba9c663d5] 2015-11-25: source-hash-7289a140fc68dc898ba2b2357cc960968195f236
# good: [2b392af9c8f54629e3a3a98a8c92fa5af1c6722f] 2015-05-20: source-hash-90e2dabb8d0bb5382234be776c2ad0e2d5d9e224
git bisect start 'master' 'oldest'
# good: [a8d19eafb9e195a85359dd8cdc5c46c38295caa0] 2015-08-22: source-hash-79fb61efb847405fa47235002b52ee8efad5e339
git bisect good a8d19eafb9e195a85359dd8cdc5c46c38295caa0
# bad: [2ad98b12d82c4ada5756881f0d6074154976e95c] 2015-10-08: source-hash-2e6feddc53830406fa04b4a0aea49bb8438dc702
git bisect bad 2ad98b12d82c4ada5756881f0d6074154976e95c
# bad: [508476d55906e21bc6c15423a8730d9d3a9f6cc8] 2015-09-14: source-hash-41007842ed9bb5d6165792a197769f72dae55a2c
git bisect bad 508476d55906e21bc6c15423a8730d9d3a9f6cc8
# good: [29a332f0f999b0f63e44c95fae6d9a043219d9ee] 2015-09-02: source-hash-84eafb6a051863a775f122cec1bc27d9f5fef6e4
git bisect good 29a332f0f999b0f63e44c95fae6d9a043219d9ee
# bad: [274ad2bfa4282c870136fe9213a9c84d73c8894f] 2015-09-08: source-hash-3bc5ca79f3ee033b5ebb65f61ea1a5740fbeb146
git bisect bad 274ad2bfa4282c870136fe9213a9c84d73c8894f
# good: [f06400ca10b8a20b34d6927841422e351cb6ab64] 2015-09-05: source-hash-cf9fbdb379e2935677a73ced513d7faf855c299c
git bisect good f06400ca10b8a20b34d6927841422e351cb6ab64
# good: [8d3668a340269513f3c3eeca94e26ee9b396c163] 2015-09-07: source-hash-5963c6c1a0158d9d93dd8a0433ab08d424bf7675
git bisect good 8d3668a340269513f3c3eeca94e26ee9b396c163
# first bad commit: [274ad2bfa4282c870136fe9213a9c84d73c8894f] 2015-09-08: source-hash-3bc5ca79f3ee033b5ebb65f61ea1a5740fbeb146
Comment 1 Xisco Faulí 2016-10-05 08:52:31 UTC
Confirmed in

Version: 5.3.0.0.alpha0+
Build ID: ae3ec79354f7b4967e736c6a4cd7c08fc52e2b7d
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 2 Xisco Faulí 2016-10-05 09:07:43 UTC
Regression introduced by https://cgit.freedesktop.org/libreoffice/core/commit/?id=b484e9814c66d8d51cea974390963a6944bc9d73

Adding Cc: to Miklos Vajna
Comment 3 Miklos Vajna 2016-10-07 20:21:09 UTC
Thanks for the bisect, I'll take care of this.
Comment 4 Commit Notification 2016-10-11 10:28:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#103001 DOCX export: fix RelId cache when switching streams

It will be available in 5.3.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 5 Commit Notification 2016-10-23 10:35:00 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

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

tdf#103001 DOCX export: fix RelId cache when switching streams

It will be available in 5.2.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 6 Milos Sramek 2016-10-28 07:46:28 UTC
Works now correctly both in master and 5.2
Thanks!
m
Comment 7 Xisco Faulí 2016-10-28 10:15:34 UTC
Move it to VERIFIED FIXED as per comment 6