Bug 151364 - FILEOPEN: DOCX "Choose Item" fields for RTL no longer editable
Summary: FILEOPEN: DOCX "Choose Item" fields for RTL no longer editable
Status: RESOLVED DUPLICATE of bug 151261
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Form-Controls
  Show dependency treegraph
 
Reported: 2022-10-05 19:38 UTC by Hossein
Modified: 2022-11-09 17:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
choose-item-field-problem (295.66 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-10-05 19:38 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2022-10-05 19:38:17 UTC
Created attachment 182846 [details]
choose-item-field-problem

Description:
When opening a DOCX file containing fields that can be changed using "Choose Item" option, they are no longer imported as fields. They are simple text with gray background and a black border.

Steps to Reproduce:
1- Open DOCX attachment
2- Try editing the gray fields in line 1 below the logo.

Actual Results:
The gray part is not a field, and you can not choose a value from a list by double clicking on it

Expected Results:
A window with the title "Choose Item:" should appear, letting you to choose a value from a list


Reproducible: Always


User Profile Reset: No


Additional Info:

Reproducible in LO 7.4:

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

Also in the latest LO 7.5 dev master:

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

Not reproducible in:

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


The attached DOCX file is from here:
https://multimedia.tabriziau.ac.ir/Uploads/User/956/Files_Uploaded%20By%20_%20Sisi_En_Multimedia/Template-13970830.docx
Comment 1 Hossein 2022-10-05 19:53:32 UTC
bibisected using linux-64-7.4 to:

commit 24417d8c3c9e1c619936e85fa7a20481a24e3530
Author: Miklos Vajna <vmiklos@collabora.com>
Date:   Wed May 11 08:17:32 2022 +0200

    sw content controls, drop-down: add DOCX import
    
    - inline drop-down content controls were imported as an SwDropDownField
      previously, but that has the drawback of not being able to store both
      display texts and values of each list items
    
    - adapt tests under sw/qa/ which asserted that the import result is a
      field, and check content control properties instead
    
    - change dmapper so that SdtControlType::dropDown is one more inline
      SDT that gets mapped to SwContentControl
    
    - remove the no longer needed grab-bagging in writerfilter/, otherwise
      we would write the SDT markup twice on export
    
    - improve DomainMapper_Impl::PopSdt() to actually map the collected
      dropdown properties to properties on the to-be-inserted content
      control
    
    Change-Id: I7e88ec8cd1d73bc1c6c75154d6ab07352cbcec8b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134143
    Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
    Tested-by: Jenkins


git bisect start
# bad: [4d9ab0058cf383ef522724b65dd572bd18e3f053] source 4b4773183e92be941b24fffdfd16a554c6a35439
git bisect bad 4d9ab0058cf383ef522724b65dd572bd18e3f053
# good: [36b1ce7e6118699fd36c37261da7f24f935b41ac] source 229123ccc6f90ebf66b3e659bebbd53f8a9bdd3a
git bisect good 36b1ce7e6118699fd36c37261da7f24f935b41ac
# good: [9c467dced633086b22262fec5e9b0e22503243f0] source c1b2ed31cbde0a81853ba4fe59841cded6c52105
git bisect good 9c467dced633086b22262fec5e9b0e22503243f0
# good: [7f7849fe1a371025c08c52d58ab24428b87a35e3] source 779c01a9e1eb3ed176d57e1e04073e25aca34a64
git bisect good 7f7849fe1a371025c08c52d58ab24428b87a35e3
# bad: [3067c1d481cf047d48d2429af123a5c15f25b611] source 41bbc62f38b9eac97c03dc5a7e706fa6aaff055c
git bisect bad 3067c1d481cf047d48d2429af123a5c15f25b611
# bad: [d13723d83bbc01ba8d38822a804bec345ae23930] source b03aa654eb2e2980f3efc0347b1435414d8f1d09
git bisect bad d13723d83bbc01ba8d38822a804bec345ae23930
# good: [35fa9719406a99e911b7c9ef32b0f6b4aa72a5ff] source b8bb44161aeb6e00526a38343b63e678ce7d4a1a
git bisect good 35fa9719406a99e911b7c9ef32b0f6b4aa72a5ff
# good: [87cb6930ef874b8427caf3cbc674e0880a1f897c] source 90523fd368cf249cb00bd1d881a2a19e1510ca85
git bisect good 87cb6930ef874b8427caf3cbc674e0880a1f897c
# good: [e281d305f64ca64faad1dbc1c7a046f10e3e8ef0] source e2f8e5cf7cf9c7b2812ffbcd48ec21dc994339d6
git bisect good e281d305f64ca64faad1dbc1c7a046f10e3e8ef0
# bad: [045e9ca45c5a9eeef124960d79fccc9ef206c6ce] source 6f75ec6115f0152517be634070607bc61bf96dd0
git bisect bad 045e9ca45c5a9eeef124960d79fccc9ef206c6ce
# good: [5b2a6ab8db6de81dff175c0d7f9d81b84c1c968d] source 4b693a0c594fb3b73f4a4c1e03e9916f1a107012
git bisect good 5b2a6ab8db6de81dff175c0d7f9d81b84c1c968d
# good: [7e68d97c99c20854bdfa300da653fd56482dedf2] source 1729da22a7f57eba6531d15388c67cb710fc3c30
git bisect good 7e68d97c99c20854bdfa300da653fd56482dedf2
# good: [25ca8dec400cbea1d2f1f63ac42afea2df2b7031] source 3322e500f48794d3569c27f73cc5f3bafb5f2397
git bisect good 25ca8dec400cbea1d2f1f63ac42afea2df2b7031
# bad: [ff2483f84f0238d073e64b8a9e7ff0d8945a5d56] source 04669a3a466d34d3452c88f4712b6ea6befb4d53
git bisect bad ff2483f84f0238d073e64b8a9e7ff0d8945a5d56
# bad: [4dda7d5d741c0f5ad7c4f7a88913a7913ab63fbc] source 24417d8c3c9e1c619936e85fa7a20481a24e3530
git bisect bad 4dda7d5d741c0f5ad7c4f7a88913a7913ab63fbc
# first bad commit: [4dda7d5d741c0f5ad7c4f7a88913a7913ab63fbc] source 24417d8c3c9e1c619936e85fa7a20481a24e3530
Comment 2 Miklos Vajna 2022-10-06 12:02:12 UTC
Yes, we now map these to content controls, as fields is a poor way to represent <w:sdt> elements in Writer. https://vmiklos.hu/blog/sw-content-controls.html has more details on this.

LTR dropdowns have a dropdown button to select an item from the item list, seems the problem is specific to RTL, which is not something I tested.

Can you confirm that the problem is RTL-specific? Thanks.
Comment 3 Hossein 2022-10-06 12:55:38 UTC
(In reply to Miklos Vajna from comment #2)
> Yes, we now map these to content controls, as fields is a poor way to
> represent <w:sdt> elements in Writer.
> https://vmiklos.hu/blog/sw-content-controls.html has more details on this.
> 
> LTR dropdowns have a dropdown button to select an item from the item list,
> seems the problem is specific to RTL, which is not something I tested.
> 
> Can you confirm that the problem is RTL-specific? Thanks.
Thanks for the explanation.

You're right, this is RTL specific. If you go to the last page of the attachment 182846 [details], you can see that the dropdown button is visible for the LTR text. This is unlike the RTL text on the first page, in which there is no dropdown button.
Comment 4 Miklos Vajna 2022-10-10 14:08:06 UTC
Hossein: bug 151261 is now fixed, could you please test if this bug can be closed as a duplicate? Thanks.
Comment 5 Xisco Faulí 2022-10-10 15:01:36 UTC
it works with https://git.libreoffice.org/core/commit/f726fbc2699b05199a8dec3055710a7131e0aad6
Closing as duplicated of bug 151261

*** This bug has been marked as a duplicate of bug 151261 ***
Comment 6 Hossein 2022-10-10 15:10:14 UTC
(In reply to Miklos Vajna from comment #4)
> Hossein: bug 151261 is now fixed, could you please test if this bug can be
> closed as a duplicate? Thanks.
Yes. This is fixed now:

Verifying fix with:

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