Author: jsc Date: Thu Jan 16 11:01:07 2014 New Revision: 1558753 URL: http://svn.apache.org/r1558753 Log: #21280# apply patch to enable/disable shift cell options depending on the copy/paste
Patch By: Shenfeng Liu
Review By: jsc
Modified:
openoffice/trunk/main/sc/source/ui/view/cellsh1.cxx
Modified: openoffice/trunk/main/sc/source/ui/view/cellsh1.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/view/cellsh1.cxx?rev=1558753&r1=1558752&r2=1558753&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/view/cellsh1.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/view/cellsh1.cxx Thu Jan 16 11:01:07 2014
@@ -1296,7 +1296,7 @@ void ScCellShell::ExecuteEdit( SfxReques
// directions if source
and destination ranges intersect
if ( !bOtherDoc )
{
- if ( pOwnClip
&& pOwnClip->GetDocument()->IsCutMode() )
+ if ( pOwnClip )
{
ScViewData* pData = GetViewData();
if (
pData->GetMarkData().GetTableSelect(
@@ -1307,15 +1307,12 @@ void ScCellShell::ExecuteEdit( SfxReques
SCCOL nClipStartX, nClipSizeX;
SCROW nClipStartY, nClipSizeY;
pOwnClip->GetDocument()->GetClipStart(
nClipStartX, nClipStartY );
-
// 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 )
-
nDisableShift |= SC_CELL_SHIFT_DISABLE_DOWN;
-
if ( nClipStartY <= nPosY + nClipSizeY &&
-
nPosY <= nClipStartY + nClipSizeY )
+
if ( MAXCOL <= nPosX + nClipSizeX )
nDisableShift |= SC_CELL_SHIFT_DISABLE_RIGHT;
+
if ( MAXROW <= nPosY + nClipSizeY )
+
nDisableShift |= SC_CELL_SHIFT_DISABLE_DOWN;
if ( nDisableShift )
pDlg->SetCellShiftDisabled( nDisableShift );
}
