diff options
author | Kurt Zenker <kz@openoffice.org> | 2007-05-10 16:02:42 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2007-05-10 16:02:42 +0000 |
commit | cbdaa7088b82bfd7544a9f4d76c8182c52420b97 (patch) | |
tree | 2ecb9f18edbc1cb4f40e08ea1f9e9fa8d26911db /sc/source/ui/view/tabview2.cxx | |
parent | 94cf3883bbf546dafdc3cd77d051716439a83452 (diff) |
INTEGRATION: CWS pchfix04 (1.16.22); FILE MERGED
2007/04/26 04:22:33 hjs 1.16.22.2: RESYNC: (1.16-1.17); FILE MERGED
2007/02/05 08:35:38 os 1.16.22.1: #i73604# usage of ITEMID_* removed
Diffstat (limited to 'sc/source/ui/view/tabview2.cxx')
-rw-r--r-- | sc/source/ui/view/tabview2.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index d4c559953..41c216880 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -4,9 +4,9 @@ * * $RCSfile: tabview2.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: vg $ $Date: 2007-02-27 13:57:39 $ + * last change: $Author: kz $ $Date: 2007-05-10 17:02:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -42,7 +42,7 @@ #include "scitems.hxx" #include <svx/eeitem.hxx> -#define ITEMID_FIELD EE_FEATURE_FIELD + #include <vcl/timer.hxx> #include <vcl/msgbox.hxx> @@ -164,19 +164,19 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, nBlockEndX = nOldCurX = nBlockStartX; nBlockEndY = nOldCurY = nBlockStartY; nBlockEndZ = nBlockStartZ; - + if (bBlockCols) { nBlockStartY = nBlockStartYOrig = 0; nBlockEndY = MAXROW; } - + if (bBlockRows) { nBlockStartX = nBlockStartXOrig = 0; nBlockEndX = MAXCOL; } - + rMark.SetMarkArea( ScRange( nBlockStartX,nBlockStartY, nTab, nBlockEndX,nBlockEndY, nTab ) ); #ifdef OLD_SELECTION_PAINT @@ -231,7 +231,7 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE } } -void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, +void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, BOOL bCols, BOOL bRows, BOOL bCellSelection ) { if (!ValidCol(nCurX)) nCurX = MAXCOL; @@ -275,7 +275,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, if ( nCurX != nOldCurX || nCurY != nOldCurY ) { // Current cursor has moved - + SCTAB nTab = nCurZ; #ifdef OLD_SELECTION_PAINT @@ -299,47 +299,47 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, BOOL bBlockStartMerged = FALSE; const ScMergeAttr* pMergeAttr = NULL; ScDocument* pDocument = aViewData.GetDocument(); - + // The following block checks whether or not the "BlockStart" (anchor) // cell is merged. If it's merged, it'll then move the position of the - // anchor cell to the corner that's diagonally opposite of the + // anchor cell to the corner that's diagonally opposite of the // direction of a current selection area. For instance, if a current // selection is moving in the upperleft direction, the anchor cell will // move to the lower-right corner of the merged anchor cell, and so on. - + pMergeAttr = static_cast<const ScMergeAttr*>( pDocument->GetAttr( nBlockStartXOrig, nBlockStartYOrig, nTab, ATTR_MERGE ) ); if ( pMergeAttr->IsMerged() ) { SCsCOL nColSpan = pMergeAttr->GetColMerge(); SCsROW nRowSpan = pMergeAttr->GetRowMerge(); - + if ( !( nCurX >= nBlockStartXOrig + nColSpan - 1 && nCurY >= nBlockStartYOrig + nRowSpan - 1 ) ) { nBlockStartX = nCurX >= nBlockStartXOrig ? nBlockStartXOrig : nBlockStartXOrig + nColSpan - 1; nBlockStartY = nCurY >= nBlockStartYOrig ? nBlockStartYOrig : nBlockStartYOrig + nRowSpan - 1; - nCurXOffset = nCurX >= nBlockStartXOrig && nCurX < nBlockStartXOrig + nColSpan - 1 ? + nCurXOffset = nCurX >= nBlockStartXOrig && nCurX < nBlockStartXOrig + nColSpan - 1 ? nBlockStartXOrig - nCurX + nColSpan - 1 : 0; - nCurYOffset = nCurY >= nBlockStartYOrig && nCurY < nBlockStartYOrig + nRowSpan - 1 ? + nCurYOffset = nCurY >= nBlockStartYOrig && nCurY < nBlockStartYOrig + nRowSpan - 1 ? nBlockStartYOrig - nCurY + nRowSpan - 1 : 0; bBlockStartMerged = TRUE; - } + } } // The following block checks whether or not the current cell is - // merged. If it is, it'll then set the appropriate X & Y offset - // values (nCurXOffset & nCurYOffset) such that the selection area will - // grow by those specified offset amounts. Note that the values of + // merged. If it is, it'll then set the appropriate X & Y offset + // values (nCurXOffset & nCurYOffset) such that the selection area will + // grow by those specified offset amounts. Note that the values of // nCurXOffset/nCurYOffset may also be specified in the previous code // block, in which case whichever value is greater will take on. - pMergeAttr = static_cast<const ScMergeAttr*>( + pMergeAttr = static_cast<const ScMergeAttr*>( pDocument->GetAttr( nCurX, nCurY, nTab, ATTR_MERGE ) ); if ( pMergeAttr->IsMerged() ) { SCsCOL nColSpan = pMergeAttr->GetColMerge(); SCsROW nRowSpan = pMergeAttr->GetRowMerge(); - + if ( !( nBlockStartX >= nCurX + nColSpan - 1 && nBlockStartY >= nCurY + nRowSpan - 1 ) ) { if ( nBlockStartX <= nCurX + nColSpan - 1 ) @@ -370,7 +370,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, nBlockStartY = nBlockStartYOrig; } } - + nBlockStartX = nBlockStartX + nBlockStartXOffset >= 0 ? nBlockStartX + nBlockStartXOffset : 0; nBlockStartY = nBlockStartY + nBlockStartYOffset >= 0 ? nBlockStartY + nBlockStartYOffset : 0; nBlockEndX = nCurX + nCurXOffset > MAXCOL ? MAXCOL : nCurX + nCurXOffset; @@ -382,7 +382,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, nBlockEndY = nCurY; } // end of "if ( bCellSelection )" - + // Set new selection area aRect.SetNew( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY ); rMark.SetMarkArea( ScRange( nBlockStartX, nBlockStartY, nTab, nBlockEndX, nBlockEndY, nTab ) ); @@ -410,7 +410,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, nOldCurX = nCurX; nOldCurY = nCurY; - + aViewData.GetViewShell()->UpdateInputHandler(); // InvalidateAttribs(); } |