summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinfried Donkers <osc@dci-electronics.nl>2013-01-14 16:05:33 +0100
committerNoel Power <noel.power@suse.com>2013-01-24 09:32:02 +0000
commitc2a249f371eb8ac3bf70d92947efeb145566536b (patch)
tree7406b0ec44832206dae525e7d1d247b88760bfbb
parent59afa90803feb09d60e65c6d8f1e8486daad4085 (diff)
fdo#56098 Paste Special options after cut incorrect
Change-Id: Icf6aa698e69a2271cf68f420ceaec4aaffe94ad0 Reviewed-on: https://gerrit.libreoffice.org/1671 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
-rw-r--r--sc/source/ui/view/cellsh1.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 0c96dd5478aa..c22d91d3c7b2 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1271,18 +1271,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
SCCOL nPosX = pData->GetCurX();
SCROW nPosY = pData->GetCurY();
- SCCOL nClipStartX, nClipSizeX;
- SCROW nClipStartY, nClipSizeY;
- pOwnClip->GetDocument()->GetClipStart( nClipStartX, nClipStartY );
+ SCCOL nClipSizeX;
+ SCROW nClipSizeY;
// for CutMode, filtered rows can always be included
pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, sal_True );
int nDisableShift = 0;
- if ( nClipStartX <= nPosX + nClipSizeX &&
- nPosX <= nClipStartX + nClipSizeX )
+ if ( nPosX + 2 * nClipSizeX + 1 > MAXCOL ) // fdo#56098
+ nDisableShift |= SC_CELL_SHIFT_DISABLE_RIGHT;
+ if ( nPosY + 2 * nClipSizeY + 1 > MAXROW ) // fdo#56098
nDisableShift |= SC_CELL_SHIFT_DISABLE_DOWN;
- if ( nClipStartY <= nPosY + nClipSizeY &&
- nPosY <= nClipStartY + nClipSizeY )
- nDisableShift |= SC_CELL_SHIFT_DISABLE_RIGHT;
if ( nDisableShift )
pDlg->SetCellShiftDisabled( nDisableShift );
}