summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-12-15 23:42:45 +0100
committerEike Rathke <erack@redhat.com>2012-12-15 23:46:02 +0100
commit63e10bf2383d22a5b3fafd95a688c2389f0076bc (patch)
tree89bd4afb3dd4d7542d420cde28298d569ac454ca /sc/source/ui/view/cellsh.cxx
parent9a0bc6d06e30377d2ddf05bf5975dc8c850c8f97 (diff)
check conditions before checking for matrix fragment
Was omitted in ab0096ed68cdc08906f518d3499a8e1afc5ba80c Change-Id: If3e1c141f02751ca7e6104ba21c246926fca843d
Diffstat (limited to 'sc/source/ui/view/cellsh.cxx')
-rw-r--r--sc/source/ui/view/cellsh.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 6fbe22d6601b..72c8be3b612a 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -150,15 +150,18 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case FID_FILL_TO_RIGHT: // fill to left / right
{
bDisable = !bSimpleArea || (nCol1 == 0 && nCol2 == 0);
- bDisable = pDoc->HasSelectedBlockMatrixFragment(
- nCol1, nRow1, nCol1, nRow2, rMark ); // first column
+ if ( !bDisable && bEditable )
+ { // do not damage matrix
+ bDisable = pDoc->HasSelectedBlockMatrixFragment(
+ nCol1, nRow1, nCol1, nRow2, rMark ); // first column
+ }
}
break;
case FID_FILL_TO_LEFT:
{
bDisable = (!bSimpleArea) || (nCol1 == MAXCOL && nCol2 == MAXCOL);
if ( !bDisable && bEditable )
- { // Matrix nicht zerreissen
+ { // do not damage matrix
bDisable = pDoc->HasSelectedBlockMatrixFragment(
nCol2, nRow1, nCol2, nRow2, rMark ); // last column
}