summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-05-08 15:41:27 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-05-22 14:30:10 +0200
commite7e9991fd06ba2e0484ae5e6b6acc323ab8bf66b (patch)
tree0a54fcf1a32294ae920c06bee1f32e8d4956b404 /sfx2
parentc4c220b56c25a5a78106b9d0fc06280968ccdb28 (diff)
tdf#146547 Mark read-only docs as modified
when an editable section is changed. Change-Id: I588b09f160974d3a3833bfa011fd07f2ee496616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151535 Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objmisc.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 6b86e2163ccb..dd639c36900d 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -247,7 +247,8 @@ void SfxObjectShell::EnableSetModified( bool bEnable )
bool SfxObjectShell::IsEnableSetModified() const
{
- return pImpl->m_bEnableSetModified && !IsReadOnly();
+ // Don't allow when user explicitly requested read only (IsLoadReadonly() or IsOriginallyLoadedReadOnlyMedium())
+ return pImpl->m_bEnableSetModified && ! (IsLoadReadonly() || IsOriginallyLoadedReadOnlyMedium());
}