Bug 168920 - Fileopen DOCX: hidden images shown
Summary: Fileopen DOCX: hidden images shown
Status: RESOLVED DUPLICATE of bug 162527
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected
Depends on:
Blocks: DOCX-Images
  Show dependency treegraph
 
Reported: 2025-10-17 13:21 UTC by Timur
Modified: 2025-10-19 03:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX (24.98 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-10-17 13:21 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2025-10-17 13:21:16 UTC
Created attachment 203393 [details]
DOCX

MSO can hide images in Selection Pane, In the attached sample, only images with numbers 1 and 4 should be shown.
LO shows additional or all images. Was not correct in OO and I could not see it correct. 
The change was long ago in large range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=212c18430864f110e5a3549c0279b1a2ea4bb6bd..5553dfe2060cb4a02a827c9774a60e4408d20c33
Comment 1 Timur 2025-10-18 10:20:13 UTC
MSO saves the picture as: <pic:cNvPr id="5" name="Picture 5" hidden="1"/>
This bug would be to not show picture that is hidden.
Another enhancement could be to enable image hiding, like in Navigator.

*** This bug has been marked as a duplicate of bug 162527 ***
Comment 2 Andras Timar 2025-10-18 15:35:33 UTC
export SAL_LOG="+INFO.oox.drawingml"
instdir/program/swriter ~/Images.docx
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:395: Shape::addShape: id='1'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:931: Shape::createAndInsert: id='1' service='com.sun.star.drawing.GraphicObjectShape'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:395: Shape::addShape: id='5'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:931: Shape::createAndInsert: id='5' service='com.sun.star.drawing.GraphicObjectShape'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:1381: Shape::createAndInsert: invisible shape with id='5'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:395: Shape::addShape: id='6'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:931: Shape::createAndInsert: id='6' service='com.sun.star.drawing.GraphicObjectShape'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:1381: Shape::createAndInsert: invisible shape with id='6'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:395: Shape::addShape: id='1'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:931: Shape::createAndInsert: id='1' service='com.sun.star.drawing.GraphicObjectShape'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:395: Shape::addShape: id='2'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:931: Shape::createAndInsert: id='2' service='com.sun.star.drawing.GraphicObjectShape'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:1381: Shape::createAndInsert: invisible shape with id='2'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:395: Shape::addShape: id='3'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:931: Shape::createAndInsert: id='3' service='com.sun.star.drawing.GraphicObjectShape'
info:oox.drawingml:20726:20726:oox/source/drawingml/shape.cxx:1381: Shape::createAndInsert: invisible shape with id='3'

Although ids are not 1,2,3,4,5,6 in Images.docx, it is visible that the hidden attribute is imported 4 times, and Visible property is set to false. So import is OK in my opinion, but possibly this Visible property is ignored later, when LibreOffice renders the images. The export is also broken, because hidden attribute does not survive the roundtrip. Interestingly the binary doc filter is different, apparently it does not load hidden images to the document model so the rendering is OK, but lose hidden images on export.