Bug 156055

Summary: Edit Index Entry dialog: Ask for Save on "Close". Remove "Apply" button. Add "Reset" button.
Product: LibreOffice Reporter: sdc.blanco
Component: WriterAssignee: Adlair Cerecedo-Mendez <adlair>
Status: NEW ---    
Severity: enhancement CC: adlair, dgp-mail, heiko.tietze, mentoring
Priority: medium Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Version: 24.2.0.0 alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=154186
https://bugs.documentfoundation.org/show_bug.cgi?id=155471
https://bugs.documentfoundation.org/show_bug.cgi?id=154575
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 122497    

Description sdc.blanco 2023-06-26 00:32:40 UTC
Building further on bug 155471 and bug 154186 -

The issue is the "Edit Index Entry" dialog.

Proposal 1.  Modify the "Close" button functionality so that when it is applied, and the current modification in the dialog has not been saved, then a warning message would appear, asking whether to "save" or "not save" the current entry before closing.  (and no message if nothing needs to be saved.)

Proposal 2.  If Proposal 1 is implemented, then the "Apply" button can be removed, because it would have no practical or necessary function.

Proposal 3. Add a "Reset" button that returns the current entry in the dialog to its initial values when the entry was opened.  (The purpose:  If a change is accidently made, or a change was started, but then regretted, it provides an easy way to return to the initial state.  Alternatively (but less convenient), if Proposal 1 is implemented, then one could "close" (answer "no save"), and then reopen the dialog.
Comment 1 Heiko Tietze 2023-07-10 08:37:54 UTC
This is what the design meeting concluded on bug 155471.
Comment 2 sdc.blanco 2023-07-12 08:49:10 UTC
(In reply to Heiko Tietze from comment #1)
> This is what the design meeting concluded 
Maybe one or more of the three proposed changes in this enhancement are an EasyHack?
Comment 3 Heiko Tietze 2023-07-12 09:05:58 UTC
#1 is a piece of cake for people who can read C++
#2 almost doesn't need coding expertise (besides removing the button we should also clean up the code)
#3 might be a bit more challenging

Dialog is started via case FN_EDIT_IDX_ENTRY_DLG... in sw/source/uibase/shells/textidx.cxx calling sw/source/ui/index/swuiidxmrk.cxx and the ui file is sw/uiconfig/swriter/ui/indexentry.ui.