Problem: Linking a file into a section replaces text that was previously in the section.
Not possible to "undo" (e.g. Ctrl-Z).
Therefore enhancement proposal for a confirmation warning.
Procedure to see problem:
1. Insert > Section
2. Enter text in section
3. Right click - Edit Section
4. Choose Link, enter filename, and OK
5. Text entered in step 2 is lost with loading of linked text.
1. Not possible to "Undo"
2. The unsuspecting user who then unlinks the file (hoping to recover the lost text) will see that only the file remains, not the original text.
3. This happens even if the section was marked previously as write-protected (i.e., false protection).
Version 1: Before linking an external file, pop-up a confirmation box that warns that all contents of the section will be lost(or replaced).
Version 2: If it is easy/possible to evaluate whether the section is empty, then only pop-up confirmation when there is actually something to be lost.
Would take this as a serious issue. Either we show the confirmation "By linking a file you will loose all text in this section. Proceed?" or make it undoable. Right now it's a dangerous function.
(In reply to Heiko Tietze from comment #1)
> Would take this as a serious issue. Either we show the confirmation "By
> linking a file you will loose all text in this section. Proceed?" or make it
> undoable. Right now it's a dangerous function.
Considering it's a high severity bug, do you plan to work on it ?
(In reply to Xisco Faulí from comment #2)
> Considering it's a high severity bug, do you plan to work on it ?
Clearly out of my scope; well maybe the confirmation box but not with checking if the sections has content (and needs a warning) or not (doesn't need a warning).
I would always treat dataloss as high severity. We could turn this into a bug since data must never get lost.
(In reply to Heiko Tietze from comment #3)
> Clearly out of my scope; well maybe the confirmation box but not with
> checking if the sections has content (and needs a warning) or not (doesn't
> need a warning).
Maybe a confirmation box in all cases is acceptable (preferable) to start.
The trade-off is "irritation" (to workflow) for those who regularly link sections versus the "shock" and "dismay" to those who just wrote three pages into a section (that was not saved), and therefore lost.
And if a "Do not warn again" checkbox can be included in the confirmation dialog, then the "unsuspecting" are protected, while those who turn off the warning have made an informed choice.
The more elegant solution (with conditionality on section content) could come later.
With LO 22.214.171.124
Select second "hello"
Insert>Section, click on Link in Section dialog box.
Result: Confirmation box, warning about text loss with link!
NB. This warning is BEFORE a section is actually created.
Suggestion in comment 4 is to also give such a warning when adding a link within an existing section.