Bug 162527 - w:drawing is displayed even though set to hidden
Summary: w:drawing is displayed even though set to hidden
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Aron Budea
URL:
Whiteboard: target:26.8.0 target:26.2.1 target:26...
Keywords:
: 168920 (view as bug list)
Depends on:
Blocks: DOCX-Images DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2024-08-20 06:28 UTC by tiefseetauchner
Modified: 2026-01-26 11:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Docx File with hidden w:drawing (24.03 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-08-20 06:28 UTC, tiefseetauchner
Details
The example file in Word 2016 and in Writer master (139.26 KB, image/png)
2024-09-18 14:28 UTC, Gabor Kelemen (Collabora)
Details
Another sample DOCX (17.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2026-01-15 07:09 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tiefseetauchner 2024-08-20 06:28:58 UTC
Created attachment 195910 [details]
Docx File with hidden w:drawing

Hi! We've got a OpenXML document (see attached) that includes a graphic. We're trying to hide said graphic by setting hidden="true" on the wp:docPr and pic:cNvPr. The expected behavior is that the graphic is hidden, which works in MS Word, however Writer still shows it.

Tested with LibreOfficeDev Writer 24.8.1.0

This might relate to another bug https://bugs.documentfoundation.org/show_bug.cgi?id=134902 we were tracking which has been fixed recently by Oliver Specht.

Maybe you have the time to look into that too?

Best, Lena
Comment 1 Gabor Kelemen (Collabora) 2024-09-18 14:28:10 UTC
Created attachment 196521 [details]
The example file in Word 2016 and in Writer master

Confirming with 

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 636f853bda69a889146968116b276d88f105b47f
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

Image is not hidden in Writer.
Comment 2 Timur 2025-10-18 10:20:13 UTC
*** Bug 168920 has been marked as a duplicate of this bug. ***
Comment 3 Andras Timar 2025-10-18 16:10:08 UTC
Bug 119201 is very similar.
Comment 4 Timur 2025-10-18 16:18:42 UTC
Sample from this tdf#162527: <pic:cNvPr id="1960502994" name="Graphic 1" descr="[Correspondence.PrePrinted]" hidden="true"/>
Sample from tdf#168920: <pic:cNvPr id="5" name="Picture 5" hidden="1"/>
Sample from fixed td#f119201: <wp:docPr id="1" name="Rectangle 1" hidden="1"/>
Comment 5 Commit Notification 2026-01-14 17:27:26 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c1f7ea0db134d63c54b581f11e843ebd5bb83b54

tdf#162527 tdf#169802 hidden image/shape in DOCX should be invisible

It will be available in 26.8.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.
Comment 6 Commit Notification 2026-01-15 04:20:12 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/0fe7cbd55ef43718e1e189e7bf5443abf239c138

tdf#162527 tdf#169802 hidden image/shape in DOCX should be invisible

It will be available in 26.2.1.

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.
Comment 7 Aron Budea 2026-01-15 07:09:41 UTC
Created attachment 205053 [details]
Another sample DOCX
Comment 8 Commit Notification 2026-01-26 11:04:13 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-26-2-0":

https://git.libreoffice.org/core/commit/43194e580d04f325b587a14f49a66d07d3aee01f

tdf#162527 tdf#169802 hidden image/shape in DOCX should be invisible

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