Bug 121741 - Clicking in&out of text box with placeholder text creates an undo entry (comment 12)
Summary: Clicking in&out of text box with placeholder text creates an undo entry (comm...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low trivial
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on: 163436
Blocks: ModifiedStatus
  Show dependency treegraph
 
Reported: 2018-11-27 14:27 UTC by Aron Budea
Modified: 2024-10-16 18:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
EmptyPresentation.odp: The title was clicked in, but the text content never was (15.39 KB, application/vnd.oasis.opendocument.presentation)
2024-10-16 14:51 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-11-27 14:27:40 UTC
In an empty presentation, click into a text box, and click away.

=> An undo step "Edit text of Text Frame..." is generated.

If the text box contains text, no undo step is generated.

Observed using LO 6.2.0.0.alpha1+ (26caf1bc59c81704f11225e3e431e412deb8c475) & 3.3.0 / Ubuntu 18.04.
Comment 1 Durgapriyanka 2018-12-12 16:47:10 UTC Comment hidden (no-value)
Comment 2 Buovjaga 2019-01-09 17:28:35 UTC Comment hidden (me-too)
Comment 3 Buovjaga 2019-01-09 17:50:27 UTC Comment hidden (me-too)
Comment 4 QA Administrators 2021-01-09 03:50:39 UTC Comment hidden (obsolete)
Comment 5 Roman Kuznetsov 2021-01-13 17:21:14 UTC Comment hidden (me-too)
Comment 6 QA Administrators 2023-01-14 03:25:42 UTC Comment hidden (obsolete)
Comment 7 Aron Budea 2023-01-14 11:01:18 UTC
This is improved in LO 7.6.0.0.alpha0+ (f65d7fb18c5b850a381727a67c97fc94128082d2) / Ubuntu: no undo step anymore, but presentation still becomes modified. Let's keep this bug report open on that.

The commit that fixed the undo, reverse-bibisected in 7.5:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=50a52eda9b22ea6659c93b2619700f483b06f09c
author		Caolán McNamara <caolanm@redhat.com>	2022-07-18 09:01:32 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2022-07-18 15:49:18 +0200

cid#1507360 Uninitialized scalar field
Comment 8 Justin L 2024-10-12 10:51:14 UTC
(In reply to Aron Budea from comment #7)
> no undo step any more,
The undo step is back in 24.8 with commit c45c64aeb57dce91965d7be54601128946455c90
Author: Michael Weghorn on Mon May 6 14:44:36 2024 +0200
    tdf#160806 tdf#160837 gtk3 a11y: Drop handling of some VclEventIds
Comment 9 Michael Weghorn 2024-10-12 20:06:39 UTC
(In reply to Justin L from comment #8)
> (In reply to Aron Budea from comment #7)
> > no undo step any more,
> The undo step is back in 24.8 with commit
> c45c64aeb57dce91965d7be54601128946455c90
> Author: Michael Weghorn on Mon May 6 14:44:36 2024 +0200
>     tdf#160806 tdf#160837 gtk3 a11y: Drop handling of some VclEventIds

Interestingly, non-gtk3, e.g. gen or kf5 have the undo step even with the commit before this one, so I'm wondering whether this commit is problematic by itself or just triggers some pre-existing issue on gtk3 as well now.
Comment 10 Commit Notification 2024-10-15 22:43:02 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#121741 sd: not modified when leaving an empty placeholder

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 11 Justin L 2024-10-15 22:53:28 UTC
Comment 10 fixes the bug mentioned in comment 7.

The issue of comment 0 is still unsolved. It will require someone who is quite familiar with the SD UNDO mechanism to deal with it. I gave it a try with https://gerrit.libreoffice.org/c/core/+/174861.
Comment 12 Justin L 2024-10-16 14:51:49 UTC
Created attachment 197089 [details]
EmptyPresentation.odp: The title was clicked in, but the text content never was

(In reply to Justin L from comment #8)
> The undo step is back in 24.8
Interestingly, this ONLY seems to happen on a new document, not on a loaded document. (Or more specifically, if the textbox has NEVER BEEN CLICKED IN, an undo step will be created - even for a loaded document.)
Comment 13 Justin L 2024-10-16 18:06:37 UTC
(In reply to Justin L from comment #12)
Deep in the bowels of SdrObject::SetOutlinerParaObject, we have an innocent-looking SendUserCall(SdrUserCallType::Resize) which triggers an Undo if m_pUserCall.

Well, the "I've already been clicked in textbox" does not have an m_pUserCall, but the other one does have it.

Of course, there is no documentation about "user call". It is obviously important as comment "creates a presentation object with the given PresObjKind on this page. A user call will be set" suggests. But WHY???
Comment 14 Justin L 2024-10-16 18:32:15 UTC
given the limited scope indicated by comment 12, and the cause of the undo step (an apparent resize - despite the wording of the undo), there probably is no point in spending any more time trying to solve this.