diff options
author | Winfried Donkers <osc@dci-electronics.nl> | 2013-01-14 16:05:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-05 09:33:25 +0200 |
commit | 7f3d167c0ad9859bbd0546ad242e11de65516485 (patch) | |
tree | e059744630fd68a06eff80f2327c6a715c22b7aa | |
parent | 2352c93deafd74db9ecd0b259acfabdfa19e4073 (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.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index f67717d69954..a76351244d70 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1273,18 +1273,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 ); } |