Bug 134902

Summary: FILEOPEN: DOCX: Watermark-Visibility (VML shape visibility in style) not handled correctly
Product: LibreOffice Reporter: rominator
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: 79045_79045, xiscofauli
Priority: medium Keywords: filter:docx
Version: 4.4 all versions   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104520    
Attachments: docx sample with watermarks
Sample file
Comparison MSO 2010 and LibreOffice 7.1 master

Description rominator 2020-07-17 13:19:09 UTC
Created attachment 163186 [details]
docx sample with watermarks

I have a DOCX with different VML watermarks. Only one of those is set to visible whereas the others have visibility "hidden" via a style property (can be seen in the /word/header2.xml). This is used by my software to invalidate documents in several ways.

In the attached document there is "TEST"-watermark that should be shown. When opening this document in writer (or converting to PDF via unoconv) the "KEIN ORIGINAL" watermark is displayed and the TEST-watermark is not displayed (along with some other watermarks that really should not be shown too). The "KEIN ORIGINAL" watermark is special as it is grouped.
So maybe the problem is in the handling of the group and the styles when importing this shape.

You can see that the output differs in the PDFs I attached. The output of writer 7.1 (https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/2020-07-17_06.44.55/LibreOfficeDev_7.1.0.0.alpha0_Win_x64.msi) is the same.

Expected behavior: The TEST-watermark should be shown. The "KEIN ORIGINAL"-watermark should not be shown.
Comment 1 Xisco Faulí 2020-07-17 17:41:22 UTC
Created attachment 163198 [details]
Sample file
Comment 2 Xisco Faulí 2020-07-17 17:41:59 UTC
Hello rominator@gmx.at
For future reports, please, attach each file separately if possible
Comment 3 Xisco Faulí 2020-07-17 17:43:43 UTC
Created attachment 163199 [details]
Comparison MSO 2010 and LibreOffice 7.1 master
Comment 4 Xisco Faulí 2020-07-17 17:46:03 UTC
Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: d851a02df57ab378ed0cc6d9362516de09c3279c
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 5 QA Administrators 2022-07-18 03:27:12 UTC Comment hidden (obsolete, spam)
Comment 6 Roman Kuznetsov 2022-09-10 12:06:20 UTC
Still repro

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 88d7aa8ab79b1197191b5eb24a3b67d313797026
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded