diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-06-27 19:50:51 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-06-28 12:52:48 +0200 |
commit | 61b0c6605932873ccf8ef321cbb41464d366cb70 (patch) | |
tree | a447a8a8b322e228fbf68ed56c4c3b67fe548657 | |
parent | tdf#154113: do not forget to split the outermost section frame (diff) | |
download | core-61b0c6605932873ccf8ef321cbb41464d366cb70.tar.gz core-61b0c6605932873ccf8ef321cbb41464d366cb70.zip |
tdf#146547 sfx2: preserve modified state from read-only to editable
SfxViewFrame::ExecReload_Impl() calls DoSaveCompleted() which resets the
modified state, but in this case the document wasn't actually saved.
Change-Id: I54f6508a652cc42a127bc59058c5b435dd1a25a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153676
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 79241a1fd32ab03cd2bb34fb303ce7f2fa93e57e)
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 2b39c4b1ef3c..bbfb37e5291d 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -330,9 +330,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) m_pFrame->RemoveInfoBar("readonly"); if (m_pMed) { + bool const isEnableSetModified(m_pSh->IsEnableSetModified()); + m_pSh->EnableSetModified(false); // tdf#116066: DoSaveCompleted should be called after SetReadOnlyUI m_pSh->DoSaveCompleted(m_pMed); m_pSh->Broadcast(SfxHint(SfxHintId::ModeChanged)); + m_pSh->EnableSetModified(isEnableSetModified); } } } |