[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 22 19:57:15 UTC 2018
sc/source/ui/view/cellsh.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit fad764c02c7a9cd210bfa44ea0ce1ac5354d6427
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Oct 18 20:21:27 2018 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 22 21:56:49 2018 +0200
tdf#120410: Disable insert/delete row/page break if sheet is protected
Follow-up on f7982d4dfa85f15a6f0c25e9795a5847ecfcbf31
Change-Id: I2defd3474fdbb0b87898df7734bb076ab95c8c08
Reviewed-on: https://gerrit.libreoffice.org/61950
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 812f63ba45ae6cd10ff2e9ed14ca01baeb4fe528)
Reviewed-on: https://gerrit.libreoffice.org/62177
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index cda4214c4d36..854794adfb9d 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -872,22 +872,22 @@ void ScCellShell::GetState(SfxItemSet &rSet)
break;
case FID_INS_ROWBRK:
- if ( nPosY==0 || (pDoc->HasRowBreak(nPosY, nTab) & ScBreakType::Manual) )
+ if ( nPosY==0 || (pDoc->HasRowBreak(nPosY, nTab) & ScBreakType::Manual) || pDoc->IsTabProtected(nTab) )
rSet.DisableItem( nWhich );
break;
case FID_INS_COLBRK:
- if ( nPosX==0 || (pDoc->HasColBreak(nPosX, nTab) & ScBreakType::Manual) )
+ if ( nPosX==0 || (pDoc->HasColBreak(nPosX, nTab) & ScBreakType::Manual) || pDoc->IsTabProtected(nTab) )
rSet.DisableItem( nWhich );
break;
case FID_DEL_ROWBRK:
- if ( nPosY==0 || !(pDoc->HasRowBreak(nPosY, nTab) & ScBreakType::Manual) )
+ if ( nPosY==0 || !(pDoc->HasRowBreak(nPosY, nTab) & ScBreakType::Manual) || pDoc->IsTabProtected(nTab) )
rSet.DisableItem( nWhich );
break;
case FID_DEL_COLBRK:
- if ( nPosX==0 || !(pDoc->HasColBreak(nPosX, nTab) & ScBreakType::Manual) )
+ if ( nPosX==0 || !(pDoc->HasColBreak(nPosX, nTab) & ScBreakType::Manual) || pDoc->IsTabProtected(nTab) )
rSet.DisableItem( nWhich );
break;
More information about the Libreoffice-commits
mailing list