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

New commits:
commit fc1cf41aca5d05fcc55c5e016fd957926aed60b8
Author:     Ashod Nakashian <[email protected]>
AuthorDate: Sat Sep 13 12:53:33 2025 -0400
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Sep 22 17:45:20 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/+/190922
    Tested-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit a1a363481b0283a8407aab95fce86230bb6c6db9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191130
    Reviewed-by: Andras Timar <[email protected]>
    Tested-by: Andras Timar <[email protected]>

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

Reply via email to