Bug 163436 - Impress: deleting all text from a placeholder textbox fails to create an undo action
Summary: Impress: deleting all text from a placeholder textbox fails to create an undo...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: QA:needsComment
Keywords:
Depends on:
Blocks: Undo-Redo 121741
  Show dependency treegraph
 
Reported: 2024-10-14 23:34 UTC by Justin L
Modified: 2024-11-01 03:14 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2024-10-14 23:34:52 UTC
When deleting placeholder text (for titles or text content for example), there is no ability to undo the deleted text.

Steps to reproduce:
1.) open attachment 159314 [details] (Paint.odp)
2.) Select all the title text "Header" and delete it. (Note that there is an textbox-undo entry "Delete")
3.) change focus by clicking on the slide itself above the title box. (Note that the title box changes to the default placeholder text "Click to add Title". Note the problem this bug report is complaining about - that there is no slide-undo entry for the changed textbox content.)

The same thing is true for the text content placeholder.

Already true in OOo 3.3. (There, an undo step is created, but it does nothing...)

The do-nothing undo entry for the title stopped being created in 7.2 with
commit f582670131dc211e472960ecff1826f7b133b083
Author: Mike Kaganski on Thu Jan 14 17:30:17 2021 +0100
    Use value comparison here
    
    This was always comparing pointers, ever since commit
    cb07ed8c74d71de9ef512c7a3568c7ee85585cef. They could only
    happen to be not different if they are both nullptr. But
    the uses of the function seem to expect value comparison
    (see SdrObjEditView::ImpChainingEventHdl,
    SdrObjEditView::SdrEndTextEdit).
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109284

The do-nothing undo entry for the text content is too indeterminate to bibisect. Under certain steps (or perhaps timing) I can occasionally get an undo step being created.
Comment 1 Justin L 2024-10-17 18:55:40 UTC
(In reply to Justin L from comment #0)
> When deleting placeholder text...
better wording: When deleting all the contents of a placeholder textbox...