Bug 81345 - FILESAVE: Image from first page appears on all pages of document after saving file on LO
Summary: FILESAVE: Image from first page appears on all pages of document after saving...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: Other Linux (All)
: high critical
Assignee: Justin L
URL:
Whiteboard: BSA interoperability target:5.3.0 tar...
Keywords: bibisected, bisected, dataLoss, filter:docx, regression
Depends on:
Blocks:
 
Reported: 2014-07-14 12:32 UTC by Sushil Shinde
Modified: 2019-08-29 16:48 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Attached file contains image in first header and section break on first page. (216.31 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-07-14 12:32 UTC, Sushil Shinde
Details
045_Original.pdf: from MS Word Online (145.86 KB, application/pdf)
2016-09-12 09:31 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sushil Shinde 2014-07-14 12:32:00 UTC
Created attachment 102770 [details]
Attached file contains image in first header and section break on first page.

Problem description: 
Image from first page appears on all pages of document after saving file.
One section break is missing from file. I think it is causing the issue.


Steps to reproduce:
1. Open attached file on latest LO.
2. Save file as .docx again on LO.
3. Open saved file on MS office.

Current behavior:
Image gets repeated on all pages actually it should render on first page only.
Section break is missing from saved file.

Expected behavior:
Image from header should render in first header only.
Section break should get preserved properly.

              
Operating System: Ubuntu
Version: 4.4.0.0.alpha0+ Master
Comment 1 Yousuf Philips (jay) (retired) 2014-07-14 21:10:56 UTC
Dear Sushil,

Thank you for submitting the bug. I can confirm that the bug is available in 4.2.5, 4.3.1 and master on Linux Mint. It is a regression that started in 4.0.x.

The document has a header on page 1 that is different then headers on the other pages, but LibO ignores this and puts the header on page 1 on all the other pages.

On a second note, i also noticed that exporting to docx in 4.2.5 and reopening the exported docx will crash LibO. Possibly another bug report is need for this one as it only effects 4.2.
Comment 2 Xisco Faulí 2014-07-22 16:18:40 UTC
bibisected:
 f404200bd6f153825680cab6261f756ef7b77770 is the first bad commit
commit f404200bd6f153825680cab6261f756ef7b77770
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Fri Oct 18 08:16:51 2013 +0000

    source-hash-b73dec8a06ef762098e642b2c37e4baad780b11a
    
    commit b73dec8a06ef762098e642b2c37e4baad780b11a
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Thu Sep 12 10:56:37 2013 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Thu Sep 12 10:56:37 2013 +0100
    
        Resolves: rhbz#1006850 crash in SwCommentRuler::GetCommentControlRegion
    
        Change-Id: Ic846da3b22391d724da6f8df94dd771e89d2efb4

:100644 100644 75ae8cb6d26ff1b192635a72ca6efdf5f6e4784f 9e037130f89a614dcbc1306794264e788fc522fc M	ccache.log
:100644 100644 b9f68f0cca442a62cf2e7d78c0ef00301b4f8998 ad579d3218691e77125b0b637f9eeb0bc2912b0d M	commitmsg
:100644 100644 d659d1ed51d313071b842cb464ec1d3fe1d279ed 909f5b641df89c36e11e2e3470a358ac102a2dc9 M	dev-install.log
:100644 100644 227d63f870d43971bbca014706c81ad09c6e8a38 7616230c95235af7a3dc9c936e0061c12fd0253c M	make.log
:040000 040000 8560cf1b3ea44e9dee911e65e2a214874536dc04 2d485b61bde964843cc5640771d37d37b450f5fd M	opt

# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# good: [1d4980621741d3050a5fe61b247c157d769988f2] source-hash-89d01a7d8028ddb765e02c116d202a2435894217
git bisect good 1d4980621741d3050a5fe61b247c157d769988f2
# skip: [89110ca258fa7a15dfc546acfb39e76fc3eb2a44] source-hash-e450a2c506ac7cd4433b0f93fc750a89919bc03c
git bisect skip 89110ca258fa7a15dfc546acfb39e76fc3eb2a44
# good: [1cca92a409385d9288c28a54d5e3008e56728bc0] source-hash-7be7824bbbdeee6fa998b950e6046ab37fe690cb
git bisect good 1cca92a409385d9288c28a54d5e3008e56728bc0
# skip: [5fa28ce2931a35ae64ae08d3904cfb76d24459d8] source-hash-2304beaca33c63b94df99cb827716f00ce259f9a
git bisect skip 5fa28ce2931a35ae64ae08d3904cfb76d24459d8
# bad: [2a9ff869c5638dc5c3aa387d0fe55c3291c86288] source-hash-01b7e04172889cbc9e4ac404b105e18ddc062d6f
git bisect bad 2a9ff869c5638dc5c3aa387d0fe55c3291c86288
# bad: [9771d0c212cfa71b07742ff3dc5c05df22d600eb] source-hash-a9a0933ec67eab0ec31c8fadb60fb8e8e3e90485
git bisect bad 9771d0c212cfa71b07742ff3dc5c05df22d600eb
# bad: [b68886f4c56ebc4cdf94aee9753398ccce28bb41] source-hash-90830788b1f8fd61ea86135712868aeda395edd0
git bisect bad b68886f4c56ebc4cdf94aee9753398ccce28bb41
# bad: [56d7a7963ef4d32b0c5b60dc5f85d4bc218785d9] source-hash-1a412370ab03af8f3865ccbfaaa8dcff1d0ac0ad
git bisect bad 56d7a7963ef4d32b0c5b60dc5f85d4bc218785d9
# good: [e014985ca41d06649533c7bedb4f029cbcb4ed6e] source-hash-af40ffdcef60c65437df4749c8bb2ad24356d1c2
git bisect good e014985ca41d06649533c7bedb4f029cbcb4ed6e
# bad: [f404200bd6f153825680cab6261f756ef7b77770] source-hash-b73dec8a06ef762098e642b2c37e4baad780b11a
git bisect bad f404200bd6f153825680cab6261f756ef7b77770
# good: [f6d96278d80e0a22881e1f476dd4d8bfb3f35814] source-hash-f0b57c30fdb5ecdd25879844159b9038399bc6de
git bisect good f6d96278d80e0a22881e1f476dd4d8bfb3f35814
# first bad commit: [f404200bd6f153825680cab6261f756ef7b77770] source-hash-b73dec8a06ef762098e642b2c37e4baad780b11a
Comment 3 Xisco Faulí 2014-07-22 16:39:27 UTC
it looks like the regression was introduced by this commit: 4e653d15eff26aa5283d8ba20611893f4c573f57.

@Miklos, could you please take a look at it whenever you have some time?
Comment 4 Yousuf Philips (jay) (retired) 2014-07-22 20:30:59 UTC
(In reply to comment #1)
> On a second note, i also noticed that exporting to docx in 4.2.5 and
> reopening the exported docx will crash LibO. Possibly another bug report is
> need for this one as it only effects 4.2.

I've submitted a bug for the crash i mentioned in comment 1 [bug 81650].
Comment 5 Björn Michaelsen 2014-08-21 12:21:12 UTC Comment hidden (obsolete)
Comment 6 Björn Michaelsen 2014-10-16 14:59:20 UTC Comment hidden (obsolete)
Comment 7 Robinson Tryon (qubit) 2015-12-10 01:33:57 UTC Comment hidden (obsolete)
Comment 8 Justin L 2016-02-26 05:36:43 UTC
confirmed: still a bug in 5.2dev.
confirmed: bisect pointing to 4e653d15eff26aa5283d8ba20611893f4c573f57 and verified that undoing this commit "fixes" 5.2dev.

However, that commit is an IMPORT change.  The document imports fine and exports to .odt and .doc fine, so I suspect that it has simply exposed an existing flaw in .docx export.
Comment 9 Justin L 2016-09-07 18:37:51 UTC
proposed fix (it WAS an import-based problem):
-https://gerrit.libreoffice.org/28728 tdf#81345 docx import fix default page break regression
Comment 10 Commit Notification 2016-09-08 12:59:05 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#81345 docx import fix default page break regression

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 11 Justin L 2016-09-12 09:31:20 UTC
Created attachment 127268 [details]
045_Original.pdf: from MS Word Online
Comment 12 Yousuf Philips (jay) (retired) 2016-09-12 23:19:55 UTC
Verified. Please backport to 5.2 and if possible 5.1.

Version: 5.3.0.0.alpha0+
Build ID: 78404fe5549fded2eaf0c5ea6e1ca66039e995af
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-09-11_09:14:01
Locale: en-US (en_US.UTF-8); Calc: group
Comment 13 Commit Notification 2016-09-21 09:59:34 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

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

tdf#81345 docx import fix default page break regression

It will be available in 5.2.3.

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 14 Commit Notification 2019-08-29 16:48:47 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

related tdf#81345: make unit test robust - check last page

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