Bug 152974 - Forms: Borders of text controls switch to 3D if form has been edited in LO 7.5.0.1 and reopened in older versions
Summary: Forms: Borders of text controls switch to 3D if form has been edited in LO 7....
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.5.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.6.0 target:7.5.4
Keywords: bibisectNotNeeded, regression
Depends on:
Blocks:
 
Reported: 2023-01-11 09:44 UTC by Robert Großkopf
Modified: 2023-10-29 18:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Text box shows 3D in LO 7.4.4.2, but LO 7.5.0.1 will show 'flat' fro borders (13.83 KB, image/png)
2023-01-11 09:44 UTC, Robert Großkopf
Details
Form with flat border, created in LO 7.4 (11.45 KB, application/vnd.oasis.opendocument.text)
2023-03-21 14:30 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-01-11 09:44:06 UTC
Created attachment 184578 [details]
Text box shows 3D in LO 7.4.4.2, but LO 7.5.0.1 will show 'flat' fro borders

Open the attached screenshot. 
Will show content of a form with different fields.
This form has been edited in LO 7.5.0.1 and then been opened in LO 7.4.4.2.
The border of the text control has been changed from flat to 3D in LO 7.4.4.2.

Properties of text box will be shown in LO 7.5.0.1 as flat.
Same field: Properties will be shown as 3D in LO 7.4.4.2.

Seems this only happens in text boxes, not in other form controls, which are also part of the form.

Test it with
https://bugs.documentfoundation.org/attachment.cgi?id=184575
Open in LO 7.4.4.2 (or older versions). Set the text boxes to border 'flat'.
Save the form.
Open in LO 7.5.0.1. Looks right. Open for editing and move a field or do something else. Save form.
Close LO 7.5 and open in LO 7.4.4.2 (or older). Text boxes will show with 3D-border.

This bug appears in 
Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 Buovjaga 2023-03-21 13:59:59 UTC
I understood how this should be reproduced, but this seems too confusing in practice. I get illogical results trying with 7.4 and 7.5 repositories.

If you are able to bisect this, it would be great. Or extracting the different .odb files and comparing the XML.
Comment 2 Robert Großkopf 2023-03-21 14:30:38 UTC
Created attachment 186119 [details]
Form with flat border, created in LO 7.4

Open the attached document in LO 7.4. There is a flat border round the control.

Open the same document in LO 7.5. Looks the same. Save with different file name and reopen in LO 7.4 → border has been changed to 3D.
Comment 3 Robert Großkopf 2023-03-21 14:47:51 UTC
And here the differences in XML-files, both content.xml

First: Saved in LO 7.4:

<style:style style:name="gr1" style:family="graphic"><style:graphic-properties fo:border="solid" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/></style:style>

Second: Opened and saved in LO 7.5:

<style:style style:name="gr1" style:family="graphic"><style:graphic-properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/></style:style>

Style definition expanded and no comment about border could be seen any more.
Comment 4 Buovjaga 2023-03-21 15:06:22 UTC
Thanks. Let's set to NEW for now. I'm quite sure I reproduced, but bibisecting felt somehow confusing.
Comment 5 Caolán McNamara 2023-05-08 08:34:57 UTC
commit 29a39b72408b7090b1c3d439dc83b54416224599
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Oct 4 21:42:03 2022 +0200

    source ca46afebb7dc0ec4375e995fa90edccbed6c2530
    
    source ca46afebb7dc0ec4375e995fa90edccbed6c2530


commit ca46afebb7dc0ec4375e995fa90edccbed6c2530
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Tue Oct 4 16:22:51 2022 +0100

    default to 'flat' instead of '3D Look' for form controls
    
    better matches what the pdf/print output will be.

seems we don't export if the value matches the "default" of ORichTextModel::getPropertyDefaultByHandle so I guess that means in practice that we shouldn't ever change anything in ORichTextModel::getPropertyDefaultByHandle and use something else to change what is used by default vs what is basically baked in as the format default
Comment 6 Commit Notification 2023-05-08 11:21:42 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/63b8e8bda29efbdde0e0bd7f7d2b18d5a9b7b135

tdf#152974 revert change to ORichTextModel::getPropertyDefaultByHandle

It will be available in 7.6.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 7 Commit Notification 2023-05-08 11:44:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/6b1a0a1b2b916432c13737de2f16d085f427a18a

tdf#152974 revert change to ORichTextModel::getPropertyDefaultByHandle

It will be available in 7.5.4.

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 Caolán McNamara 2023-05-09 19:00:30 UTC
hopefully that will work out by going back to the original "defaults" so docs without anything set in them will be 3d as they used to be. But explicitly setting to the flat border so new docs from now onwards will have an explicit "flat" exported if nothing is changed via the UI
Comment 9 Robert Großkopf 2023-08-10 09:04:31 UTC
Seems resolving this bug produce another bug: Textboxes will always be shown with flat border, never with 3D after reopening a document. See
https://bugs.documentfoundation.org/show_bug.cgi?id=156707