summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2018-10-18 20:21:27 +0200
committerEike Rathke <erack@redhat.com>2018-10-22 13:50:44 +0200
commit812f63ba45ae6cd10ff2e9ed14ca01baeb4fe528 (patch)
tree2b28dbe7c4c8f16ad7c15fac08a9f852f0ad3474
parentf29389f1b150bf96681ddb0fff47c7967109c37d (diff)
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@redhat.com>
-rw-r--r--sc/source/ui/view/cellsh.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index bc36ed2d959a..77d8b29e6570 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;