diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-04-26 16:14:07 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-04-28 15:26:09 +0200 |
commit | f7e5b76a14731e09881e65830250bbb79c539048 (patch) | |
tree | c458b5668dd741dd94b3ee685f6066de4616f906 | |
parent | tdf#132472: do not set text color when table style is 'Themed-Style-2' (diff) | |
download | core-f7e5b76a14731e09881e65830250bbb79c539048.tar.gz core-f7e5b76a14731e09881e65830250bbb79c539048.zip |
tdf#141914: Allow to unset modified anyway
IsEnableSetModified returning true means kind of "treat this document
as read-only". Marking object unmodified does not break this idea.
Change-Id: I3efd5b3b25e2d9318702cdbf24ac5eb61aeda3ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114666
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit eeb2854e085fdd9f7a38d6e952a8aedf43e90323)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114605
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit ed12e778bffd38bf9691981436f912ff199e8ec8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114610
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | chart2/source/model/main/ChartModel_Persistence.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index c505da695e73..b26cf6815d72 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -669,11 +669,15 @@ sal_Bool SAL_CALL ChartModel::isModified() void SAL_CALL ChartModel::setModified( sal_Bool bModified ) { - // tdf#77007: honor parent's IsEnableSetModified - // Check it before LifeTimeGuard, to avoid deadlocking solar mutex and this guard - if (auto pParentShell = SfxObjectShell::GetShellFromComponent(getParent()); - pParentShell && !pParentShell->IsEnableSetModified()) - return; + // tdf#141914: allow to set *unmodified* when parent does not allow to set modified + if (bModified) + { + // tdf#77007: honor parent's IsEnableSetModified + // Check it before LifeTimeGuard, to avoid deadlocking solar mutex and this guard + if (auto pParentShell = SfxObjectShell::GetShellFromComponent(getParent()); + pParentShell && !pParentShell->IsEnableSetModified()) + return; + } apphelper::LifeTimeGuard aGuard(m_aLifeTimeManager); if(!aGuard.startApiCall())//@todo ? is this a long lasting call?? |