Bug 151124 - Outline folding state change does not set dirty file flag
Summary: Outline folding state change does not set dirty file flag
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: Writer-Outline-Folding
  Show dependency treegraph
 
Reported: 2022-09-22 10:10 UTC by dainius.mazuika
Modified: 2022-10-30 06:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
video (remove .txt) (2.77 MB, text/plain)
2022-09-22 10:10 UTC, dainius.mazuika
Details
Sample ODT file (10.92 KB, application/vnd.oasis.opendocument.text)
2022-09-23 01:45 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dainius.mazuika 2022-09-22 10:10:06 UTC
Description:
Outline folding state change does not set dirty file flag

Steps to Reproduce:


1. Have a file with styles and "outline folding" enabled under experimental features (if necessarry, don't remember if folding is experimental now);
2. Open file;
3. Change (fold/unfold) folding state;
4. Notice no indication under "save" icon;
5. Close file;
6. Notice no "Do you want to save file..." question, is thrown. Writer closes;
7. Reopen file, see folding state was not preserved.

8. Now repeat steps 2 and 3;
9. Click save icon after step 3. Notice - file is rewritten on HDD;
10. Close - reopen file;
11. See how folding state was saved to file during step 9.

Actual Results:
see steps to reproduce

Expected Results:
1) Dirty (file modified) indicator should be set after step 3;
2) "Do you want to save changes..?" must be thrown after step 5;



Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.1.2 (x64) / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 dainius.mazuika 2022-09-22 10:10:59 UTC
Created attachment 182615 [details]
video (remove .txt)
Comment 2 Rafael Lima 2022-09-23 01:45:07 UTC
Confirmed with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 8b5a989dcdcf4edd50c9fdb092d4180432ce4b6a
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded

Indeed folding/unfolding does not trigger the need to save the file. Moreover, saving the file will remember the folding state, so folding/unfolding should warn the user that the file needs saving before closing.

I'm setting this to NEW.
Comment 3 Rafael Lima 2022-09-23 01:45:46 UTC
Created attachment 182638 [details]
Sample ODT file

Here's a sample ODT file similar to the one in the video.
Comment 4 Jim Raykowski 2022-10-02 05:10:18 UTC
Here is a link to a patch that sets the document as modified when outline folding state is changed:
https://gerrit.libreoffice.org/c/core/+/140855
Comment 5 Commit Notification 2022-10-30 03:26:41 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/14337ca8fe3ebc4fefbbf74b018f9b81fc5d9dfd

tdf#151124 Make outline folding state change set doc modified state

It will be available in 7.5.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.