sfx2/source/doc/objstor.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit e78d989cd0049e8d405030ebc24d138092f68abe
Author:     Ashod Nakashian <[email protected]>
AuthorDate: Sat Sep 13 12:53:33 2025 -0400
Commit:     Caolán McNamara <[email protected]>
CommitDate: Mon Sep 15 15:41:07 2025 +0200

    sfx2: EnableSetModified etc. after loading empty documents
    
    There is special handling of empty documents
    which avoids invoking the import filter,
    which would fail on empty files. Unfortunately,
    it wouldn't enable setting the modified flag
    which means that empty documents never
    register modifications and data is lost
    upon closing.
    
    Signed-off-by: Ashod Nakashian <[email protected]>
    Change-Id: I954cf53d9f389d845631786e537b81afaffa2cc6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190920
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index d181461e8924..8a1215735b96 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -778,6 +778,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
                 {
                     // The import filter would fail with empty input.
                     bOk = true;
+                    FinishedLoading(); // EnableSetModified(), etc.
                 }
                 else
                 {

Reply via email to