Bug 134902 - FILEOPEN: DOCX: VML WordArt visibility not handled correctly
Summary: FILEOPEN: DOCX: VML WordArt visibility not handled correctly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.1
Keywords: filter:docx
Depends on:
Blocks: VML-Shapes
  Show dependency treegraph
 
Reported: 2020-07-17 13:19 UTC by rominator
Modified: 2024-09-18 14:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
docx sample with watermarks (62.88 KB, application/x-7z-compressed)
2020-07-17 13:19 UTC, rominator
Details
Sample file (41.45 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-07-17 17:41 UTC, Xisco Faulí
Details
Comparison MSO 2010 and LibreOffice 7.1 master (68.75 KB, image/png)
2020-07-17 17:43 UTC, Xisco Faulí
Details
163168 attached DOCX exported pdf in LO24.8.1.2 (9.92 KB, application/pdf)
2024-09-16 12:46 UTC, Piotr Osada
Details
Word 365, 7.6.5.2 and 24.8.1.2 comparison (305.07 KB, image/png)
2024-09-16 13:14 UTC, Piotr Osada
Details
163168 attached DOCX exported pdf in LO7.6.5.2 (13.41 KB, application/pdf)
2024-09-16 13:21 UTC, Piotr Osada
Details
163168 attached DOCX exported pdf in Word 365 (36.40 KB, application/pdf)
2024-09-16 13:21 UTC, Piotr Osada
Details

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 7 Commit Notification 2024-07-29 22:30:51 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134902 evaluate visibility of VML shapes

It will be available in 25.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.
Comment 8 Commit Notification 2024-08-02 09:20:02 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/5b4e4c94c45a994e7fcaf4959e12765dcaa3ab3a

tdf#134902 evaluate visibility of VML shapes

It will be available in 24.8.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 9 rominator 2024-08-19 13:34:03 UTC
We tested this successfully with 24.8.1.0. So this issue could be closed imho.

Thank you very much, this saved us some trouble!
You also got the timing right since we just added some functionality to our software that is based on this. \O/

Nonetheless we found a separate issue that might be related to this that concerns the visibility of drawing-ml-elements vs. vml-elements when loading docx. My colleague will post that as a separate issue and link this issue to it.

Thank you again!
Comment 10 rominator 2024-08-20 07:48:18 UTC
Does https://bugs.documentfoundation.org/show_bug.cgi?id=162527 relate to this?
Comment 11 Commit Notification 2024-09-09 23:01:36 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3e8183e0c4b4c116cbd9187bfdfa7dfdf447805e

tdf#134902 Test added

It will be available in 25.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.
Comment 12 Piotr Osada 2024-09-16 12:46:17 UTC
Created attachment 196478 [details]
163168 attached DOCX exported pdf in LO24.8.1.2

I can't see the watermark on the PDF made of DOCX from attachment 163168 [details].

Version: 24.8.1.2 (X86_64) / LibreOffice Community
Build ID: 87fa9aec1a63e70835390b81c40bb8993f1d4ff6
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
Comment 13 Piotr Osada 2024-09-16 13:14:10 UTC
Created attachment 196482 [details]
Word 365, 7.6.5.2 and 24.8.1.2 comparison
Comment 14 Piotr Osada 2024-09-16 13:21:05 UTC
Created attachment 196483 [details]
163168 attached DOCX exported pdf in LO7.6.5.2
Comment 15 Piotr Osada 2024-09-16 13:21:33 UTC
Created attachment 196484 [details]
163168 attached DOCX exported pdf in Word 365
Comment 16 Gabor Kelemen (allotropia) 2024-09-18 14:36:57 UTC
I see improvement here, as the "Kein Original" shape is now correctly hidden in Writer as well.

The "Test" shape seems to be a WordArt in VML, this is still not visible at all in Writer.
Let's keep this bug open for the latter issue.