Bug 144457 - Date Acceptance Pattern input field garbled
Summary: Date Acceptance Pattern input field garbled
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.3.0 target:7.1.7 target:7.2.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-09-12 14:46 UTC by Eike Rathke
Modified: 2021-09-14 08:16 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Rathke 2021-09-12 14:46:27 UTC
Editing the Date Acceptance Pattern under Tools -> Options -> Language Settings -> Languages inserts a duplicated pattern string.

Type any Y, M or D letter followed by another character, content will get duplicated (capitalized/uncapitalized) with each keystroke.
Comment 1 Eike Rathke 2021-09-12 15:31:00 UTC
Happens only with lower case y, m or d; upper case Y, M or D work.
Comment 2 Commit Notification 2021-09-12 16:42:36 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/db90a6cedbc261ad711ff13c4f69db65946486da

Resolves: tdf#144457 Use weld::set_text() instead of replace_selection()

It will be available in 7.3.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 3 Eike Rathke 2021-09-12 16:48:46 UTC
Pending review
https://gerrit.libreoffice.org/c/core/+/121978 for 7-2
https://gerrit.libreoffice.org/c/core/+/121979 for 7-1
Comment 4 Commit Notification 2021-09-13 01:05:20 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/e6b70cde3a34bcdbf200d3b9fb53cfdc9bef4f22

Resolves: tdf#144457 Use weld::set_text() instead of replace_selection()

It will be available in 7.1.7.

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 5 Commit Notification 2021-09-13 01:05:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/aa2ebf7d77527a12246797f637a06af0e9dea5f9

Resolves: tdf#144457 Use weld::set_text() instead of replace_selection()

It will be available in 7.2.2.

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 6 Xisco Faulí 2021-09-13 11:56:57 UTC
Hi Eike,
it seems it's still not 100%. with GEN, if I type 'myd' the text field gets 'DMy'

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: e7a40c0ded1ba26b6b8f3da5a0b894e9c7ee7a96
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 Xisco Faulí 2021-09-13 12:10:21 UTC
(In reply to Xisco Faulí from comment #6)
> Hi Eike,
> it seems it's still not 100%. with GEN, if I type 'myd' the text field gets
> 'DMy'
> 
> Version: 7.3.0.0.alpha0+ / LibreOffice Community
> Build ID: e7a40c0ded1ba26b6b8f3da5a0b894e9c7ee7a96
> CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: x11
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

Maybe the problem is in weld::set_text() this time ?
Comment 8 Eike Rathke 2021-09-13 13:43:13 UTC
Could not reproduce. If I type 'myd' the field content becomes 'Myd', in fact already 'My' after 'my', and the validity indicator changing to forbidden. Which is correct.

But seeing that you have VCL: x11 and I have VCL: gtk3 that is the difference.
i.e. with SAL_USE_VCLPLUGIN=gen the cursor position is reset to the beginning when text is set and effectively you are typing 'my' => modified to 'My' (cursor set to 0,0) continued typing 'd' gives 'dMy' => modified to 'DMy'.

Brilliant, differing backend behaviour.
Comment 9 Xisco Faulí 2021-09-13 13:48:36 UTC
(In reply to Eike Rathke from comment #8)
> Could not reproduce. If I type 'myd' the field content becomes 'Myd', in
> fact already 'My' after 'my', and the validity indicator changing to
> forbidden. Which is correct.
> 
> But seeing that you have VCL: x11 and I have VCL: gtk3 that is the
> difference.
> i.e. with SAL_USE_VCLPLUGIN=gen the cursor position is reset to the
> beginning when text is set and effectively you are typing 'my' => modified
> to 'My' (cursor set to 0,0) continued typing 'd' gives 'dMy' => modified to
> 'DMy'.
> 
> Brilliant, differing backend behaviour.

yep, it's only reproducible with GEN but not with GTK3
Comment 10 Commit Notification 2021-09-13 15:19:07 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/37e2e99f7a3018dce0337b582b139d41e1e81a9a

Explicitly set cursor position for x11 'gen' backend, tdf#144457 follow-up

It will be available in 7.3.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 11 Eike Rathke 2021-09-13 15:20:15 UTC
Pending review
https://gerrit.libreoffice.org/c/core/+/122059 for 7-2
https://gerrit.libreoffice.org/c/core/+/122060 for 7-1
Comment 12 Commit Notification 2021-09-13 16:29:01 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/2adcd82658f8c536e8288b4906b005b8ebe3fbb8

Explicitly set cursor position for x11 'gen' backend, tdf#144457 follow-up

It will be available in 7.2.2.

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 13 Commit Notification 2021-09-13 21:01:46 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ed80a48d0a410b5a44ab6c82b5ff872348372490

tdf#144457: sc: Add UItest

It will be available in 7.3.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 14 Commit Notification 2021-09-14 08:16:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

Explicitly set cursor position for x11 'gen' backend, tdf#144457 follow-up

It will be available in 7.1.7.

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.