Bug 151983 - ZWNJ is lost in the fields with dropdown content control
Summary: ZWNJ is lost in the fields with dropdown content control
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Form-Controls ZWNJ-ZWJ
  Show dependency treegraph
Reported: 2022-11-09 21:25 UTC by Hossein
Modified: 2023-02-28 14:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:

ZWNJ is lost in the fields (60.41 KB, image/png)
2022-11-09 21:25 UTC, Hossein

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2022-11-09 21:25:55 UTC
Created attachment 183509 [details]
ZWNJ is lost in the fields

Open attachment 182846 [details] from tdf#151364 which is a DOCX file containing fields that can be changed using the dropdown menu. In this document, ZWNJ is lost in the fields, and also in the dropdown menus.

Steps to Reproduce:
1- Open DOCX attachment
2- Click on a gray field in page 1
3. Click on the down arrow to open the drop down menu

Actual Results:
Item 1 in the dropdown menu is 'چندرسانهای' which is incorrect, because ZWNJ (zero-width non-joiner) is lost.
Also, in page 1 you can see 'پایاننامه' which is also incorrect.

Expected Results:
Item 1 in the dropdown menu should be 'چندرسانه‌ای'. The ZWNJ (zero-width non-joiner) separates two characters from joining each other. The other field should be 'پایان‌نامه'.

Reproducible: Always

User Profile Reset: No

Additional Info:

Reproducible in the latest LO 7.5 dev master:

Version: (X86_64) / LibreOffice Community
Build ID: a0dec4bc9a48b263be182ad7bbe4ba3f8cbb27e1
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

For more information on ZWNJ:
Zero-width non-joiner
Comment 1 Miklos Vajna 2022-11-10 08:30:04 UTC
Could you please attach a minimal reproducer that only has a single paragraph, with something like: "content control: ... sdt stuff here ..." in it?

Your description claims that U+200C is lost, but when I check the list items in the first SDT in the document (word/document.xml), then none of the list items or the sdt content have such a character. This means that of course the resulting doc model won't contain it, either.