[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/source
Eike Rathke
erack at redhat.com
Fri Jul 6 20:19:37 UTC 2018
sc/source/ui/view/viewfunc.cxx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 3eeb0096ac7c5beb48441eabc032cde38745a549
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jul 6 14:53:10 2018 +0200
Related: tdf#118547 handle multi-sheet un-/protect, tdf#95880 follow-up
Also don't attempt to remove a lock for TABLEID_DOC that is not a
sheet.
Change-Id: I28775a068215a59063ed95fd141e125cf2155aa7
Reviewed-on: https://gerrit.libreoffice.org/57060
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 7eba8e98508d547f43fecbe3175a11a05956b30a)
Reviewed-on: https://gerrit.libreoffice.org/57071
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index e7c8be1aa0d9..0b5103924185 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2487,12 +2487,14 @@ void ScViewFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect )
ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd; ++itr)
+ {
rFunc.ProtectSheet(*itr, rProtect);
+ SetTabProtectionSymbol(*itr, true);
+ }
if (bUndo)
pDocSh->GetUndoManager()->LeaveListAction();
- SetTabProtectionSymbol(nTab, true);
UpdateLayerLocks(); //! broadcast to all views
}
@@ -2550,8 +2552,13 @@ bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword )
ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd; ++itr)
+ {
if ( rFunc.Unprotect( *itr, rPassword, false ) )
- bChanged = true;
+ {
+ bChanged = true;
+ SetTabProtectionSymbol( *itr, false);
+ }
+ }
if (bUndo)
pDocSh->GetUndoManager()->LeaveListAction();
More information about the Libreoffice-commits
mailing list