sc/source/ui/view/cellsh1.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit c2a249f371eb8ac3bf70d92947efeb145566536b
Author: Winfried Donkers <o...@dci-electronics.nl>
Date:   Mon Jan 14 16:05:33 2013 +0100

    fdo#56098 Paste Special options after cut incorrect
    
    Change-Id: Icf6aa698e69a2271cf68f420ceaec4aaffe94ad0
    Reviewed-on: https://gerrit.libreoffice.org/1671
    Reviewed-by: Noel Power <noel.po...@suse.com>
    Tested-by: Noel Power <noel.po...@suse.com>

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 0c96dd5..c22d91d 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 );
                                     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to