Bug 112447 - Image not visible if other image hidden by unused Page style
Summary: Image not visible if other image hidden by unused Page style
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-09-17 17:13 UTC by Laurent BP
Modified: 2017-09-21 13:16 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document which should show an image (118.64 KB, application/vnd.oasis.opendocument.text)
2017-09-17 17:18 UTC, Laurent BP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent BP 2017-09-17 17:13:02 UTC
Description:
Image is hidden if there exist an unused Page style containing some image

Steps to Reproduce:
1. Open attached document


Actual Results:  
No image visible

Expected Results:
A green image should be visible at the beginning of the text


Reproducible: Always

User Profile Reset: Yes

Additional Info:
The bug appears with at least 3 conditions for the given sample file:
- text must be longer than 1 page
- Page style "1ere Page SI" must have its image in its header
- Page style "1ere Page SI" must not be used

In navigator, hidden image of page style "1ere Page SI" appears in Forms section.

NOT reproduced with:
- Version: 5.3.6.1 (x64)
Build ID: 686f202eff87ef707079aeb7f485847613344eb7
Threads CPU : 4; Version de l'OS :Windows 6.1; UI Render : par défaut; Moteur de mise en page : nouveau; 
Locale : fr-FR (fr_FR); Calc: group
==> Regression

Reproduced with:
- Version: 5.4.0.0.alpha0+ (x64)
Build ID: a94ef79826fdb52bcde2d0ee8b76da6df46962f2
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2017-04-11_11:00:05
Locale: fr-FR (fr_FR); Calc: CL
- Version: 6.0.0.0.alpha0+
Build ID: a52ca01f6ae27a86cae6e82b3c5ae6601f3ea398
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-09-16_06:55:23
Locale: fr-FR (fr_FR); Calc: CL
- Version: 5.4.3.0.0+


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
Comment 1 Laurent BP 2017-09-17 17:18:16 UTC
Created attachment 136306 [details]
Sample document which should show an image

Sample document with bug
See discussion on qa-fr:
http://nabble.documentfoundation.org/Images-qui-ne-s-enregistrent-pas-Writer-tp4222844.html

As a consequence, inserting new images failed after save/reload
Comment 2 Pierre C 2017-09-17 19:19:47 UTC
As a reporter of the initial problem on French QA list, I can confirm the bug
Comment 3 Dieter Praas 2017-09-17 19:57:23 UTC
Changed status to NEW, because of comment 2
Comment 4 Xisco Faulí 2017-09-18 12:35:58 UTC
Regression introduced by:

author	Bjoern Michaelsen <bjoern.michaelsen@canonical.com>	2017-01-05 00:07:59 (GMT)
committer	Björn Michaelsen <bjoern.michaelsen@canonical.com>	2017-01-05 23:44:58 (GMT)
commit	575e222a1742918be052f2b716ddf57ce0008404 (patch)
tree	d47f92266e8d31d2c434f0d6feb38dd377f7d3b3
parent	6bd7451ecd66417a4e8b8dff3874c15ba4d1536e (diff)
refactor and simplify AppendAllObjs with a circular buffer
- do not iterate repeatedly over objects already handled
- filter out AS_PAGE and AS_CHAR before looping
- use circular buffer as we are only ever removing, never adding formats
  to handle, so we can get away with one alloc

Bisected with: bibisect-linux-64-5.4

Adding Cc: to Bjoern Michaelsen
Comment 5 Björn Michaelsen 2017-09-18 22:41:09 UTC
Fix suggested at: https://gerrit.libreoffice.org/42439
Comment 6 Commit Notification 2017-09-19 23:04:52 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112447: connect all objects

It will be available in 6.0.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 7 Jacques Guilleron 2017-09-21 13:16:23 UTC
Hi all,

works with
LO 6.0.0.0.alpha0+ Build ID: e0aed1459513be5e08fab9de06848df5dc9d0b5f
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-09-20_06:45:25
Locale: fr-FR (fr_FR); Calc: CL
Thank you Björn.