[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source
Eike Rathke
erack at redhat.com
Sun Jul 8 20:36:57 UTC 2018
sc/source/ui/undo/undotab.cxx | 2 ++
sc/source/ui/view/viewfunc.cxx | 13 +++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit dc9c326c378f252df83aa90a61df51a60d574c8c
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jul 6 20:09:55 2018 +0200
tdf#118547: Remove lock mark only if password is correct, tdf#95880 follow-up
This is a combination of 3 commits.
tdf#118547: Remove lock mark only if password is correct
Reviewed-on: https://gerrit.libreoffice.org/57044
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit c3a732a11c320b98e31dad79f421d4d73f33a15b)
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.
Reviewed-on: https://gerrit.libreoffice.org/57060
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 7eba8e98508d547f43fecbe3175a11a05956b30a)
Handle protection lock mark in Undo/Redo, tdf#68290 follow-up
Reviewed-on: https://gerrit.libreoffice.org/57063
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 6fb449d127d1da165f610c4c99c2c7d9c5afbb97)
Change-Id: I9f5731dfaaf9b4cc67e600a8b1c01709e7c9ba99
28775a068215a59063ed95fd141e125cf2155aa7
c88cb375f9f6030c9268fca84de7a5434bb82dc1
Reviewed-on: https://gerrit.libreoffice.org/57091
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index db0c34d0568c..f8bd5dc6940b 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1254,6 +1254,8 @@ void ScUndoTabProtect::DoProtect(bool bProtect)
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
+ if (ScTabView* pTabView = pViewShell->GetViewData().GetView())
+ pTabView->SetTabProtectionSymbol( mnTab, bProtect);
pViewShell->UpdateLayerLocks();
pViewShell->UpdateInputHandler(true); // so that input can be immediately entered again
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 27e9ad05d738..3f6e583c6f60 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2489,12 +2489,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
}
@@ -2552,15 +2554,18 @@ 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();
}
- SetTabProtectionSymbol(nTab, false);
-
if (bChanged)
UpdateLayerLocks(); //! broadcast to all views
More information about the Libreoffice-commits
mailing list