diff options
-rw-r--r-- | sc/source/ui/inc/output.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/inc/viewutil.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/output.cxx | 58 | ||||
-rw-r--r-- | sc/source/ui/view/tabview2.cxx | 49 | ||||
-rw-r--r-- | sc/source/ui/view/viewutil.cxx | 156 |
5 files changed, 0 insertions, 270 deletions
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index bf4440e04d7b..41678c528e07 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -252,9 +252,6 @@ public: void FindChanged(); void SetPagebreakMode( ScPageBreakData* pPageData ); -#ifdef OLD_SELECTION_PAINT - void DrawMark( Window* pWin ); -#endif void DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, const Color& rColor, BOOL bHandle ); diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx index 37290323b920..20f61b334a5c 100644 --- a/sc/source/ui/inc/viewutil.hxx +++ b/sc/source/ui/inc/viewutil.hxx @@ -104,10 +104,6 @@ public: ScUpdateRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ); void SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ); BOOL GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); -#ifdef OLD_SELECTION_PAINT - BOOL GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont ); - void GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); -#endif }; diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index ca0248599a29..28ae297beff2 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -1782,64 +1782,6 @@ void ScOutputData::FindChanged() pDoc->DisableIdle( bWasIdleDisabled ); } -#ifdef OLD_SELECTION_PAINT -void ScOutputData::DrawMark( Window* pWin ) -{ - Rectangle aRect; - ScInvertMerger aInvert( pWin ); - //! additional method AddLineRect for ScInvertMerger? - - long nPosY = nScrY; - for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++) - { - RowInfo* pThisRowInfo = &pRowInfo[nArrY]; - if (pThisRowInfo->bChanged) - { - long nPosX = nScrX; - if (bLayoutRTL) - nPosX += nMirrorW - 1; // always in pixels - - aRect = Rectangle( Point( nPosX,nPosY ), Size(1, pThisRowInfo->nHeight) ); - if (bLayoutRTL) - aRect.Left() = aRect.Right() + 1; - else - aRect.Right() = aRect.Left() - 1; - - BOOL bOldMarked = FALSE; - for (SCCOL nX=nX1; nX<=nX2; nX++) - { - if (pThisRowInfo->pCellInfo[nX+1].bMarked != bOldMarked) - { - if (bOldMarked && aRect.Right() >= aRect.Left()) - aInvert.AddRect( aRect ); - - if (bLayoutRTL) - aRect.Right() = nPosX; - else - aRect.Left() = nPosX; - - bOldMarked = pThisRowInfo->pCellInfo[nX+1].bMarked; - } - - if (bLayoutRTL) - { - nPosX -= pRowInfo[0].pCellInfo[nX+1].nWidth; - aRect.Left() = nPosX+1; - } - else - { - nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth; - aRect.Right() = nPosX-1; - } - } - if (bOldMarked && aRect.Right() >= aRect.Left()) - aInvert.AddRect( aRect ); - } - nPosY += pThisRowInfo->nHeight; - } -} -#endif - void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, const Color& rColor, BOOL bHandle ) diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 58155a589939..91658f4661c2 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -171,9 +171,6 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, rMark.SetMarkArea( ScRange( nBlockStartX,nBlockStartY, nTab, nBlockEndX,nBlockEndY, nTab ) ); -#ifdef OLD_SELECTION_PAINT - InvertBlockMark( nBlockStartX,nBlockStartY,nBlockEndX,nBlockEndY ); -#endif UpdateSelectionOverlay(); } } @@ -262,13 +259,6 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, SCTAB nTab = nCurZ; -#ifdef OLD_SELECTION_PAINT - SCCOL nDrawStartCol; - SCROW nDrawStartRow; - SCCOL nDrawEndCol; - SCROW nDrawEndRow; -#endif - // Set old selection area ScUpdateRect aRect( nBlockStartX, nBlockStartY, nOldBlockEndX, nOldBlockEndY ); @@ -371,22 +361,6 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, aRect.SetNew( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY ); rMark.SetMarkArea( ScRange( nBlockStartX, nBlockStartY, nTab, nBlockEndX, nBlockEndY, nTab ) ); -#ifdef OLD_SELECTION_PAINT - BOOL bCont; - BOOL bDraw = aRect.GetXorDiff( nDrawStartCol, nDrawStartRow, - nDrawEndCol, nDrawEndRow, bCont ); - if ( bDraw ) - { - HideAllCursors(); - InvertBlockMark( nDrawStartCol, nDrawStartRow, nDrawEndCol, nDrawEndRow ); - if (bCont) - { - aRect.GetContDiff( nDrawStartCol, nDrawStartRow, nDrawEndCol, nDrawEndRow ); - InvertBlockMark( nDrawStartCol, nDrawStartRow, nDrawEndCol, nDrawEndRow ); - } - ShowAllCursors(); - } -#endif UpdateSelectionOverlay(); nOldCurX = nCurX; @@ -929,35 +903,12 @@ void ScTabView::PaintBlock( BOOL bReset ) USHORT i; if ( bMulti ) { -#ifdef OLD_SELECTION_PAINT - for (i=0; i<4; i++) - if (pGridWin[i] && pGridWin[i]->IsVisible()) - pGridWin[i]->InvertSimple( nBlockStartX, nBlockStartY, - nBlockEndX, nBlockEndY, - TRUE, TRUE ); -#endif rMark.ResetMark(); UpdateSelectionOverlay(); bDidReset = TRUE; } else { -#ifdef OLD_SELECTION_PAINT - // (mis)use InvertBlockMark to remove all of the selection - // -> set bBlockNeg (like when removing parts of a selection) - // and convert everything to Multi - - rMark.MarkToMulti(); - BOOL bOld = bBlockNeg; - bBlockNeg = TRUE; - // #73130# (negative) MarkArea must be set in case of repaint - rMark.SetMarkArea( ScRange( nBlockStartX,nBlockStartY, nTab, - nBlockEndX,nBlockEndY, nTab ) ); - - InvertBlockMark( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY ); - - bBlockNeg = bOld; -#endif rMark.ResetMark(); UpdateSelectionOverlay(); bDidReset = TRUE; diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 92f9844fb2c4..92e0d8ab1d4d 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -474,160 +474,4 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) return TRUE; } -#ifdef OLD_SELECTION_PAINT -BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont ) -{ - rCont = FALSE; - - if (nNewStartX == nOldStartX && nNewEndX == nOldEndX && - nNewStartY == nOldStartY && nNewEndY == nOldEndY) - { - rX1 = nNewStartX; - rY1 = nNewStartY; - rX2 = nNewStartX; - rY2 = nNewStartY; - return FALSE; - } - - rX1 = Min(nNewStartX,nOldStartX); - rY1 = Min(nNewStartY,nOldStartY); - rX2 = Max(nNewEndX,nOldEndX); - rY2 = Max(nNewEndY,nOldEndY); - - if (nNewStartX == nOldStartX && nNewEndX == nOldEndX) // nur vertikal - { - if (nNewStartY == nOldStartY) - { - rY1 = Min( nNewEndY, nOldEndY ) + 1; - rY2 = Max( nNewEndY, nOldEndY ); - } - else if (nNewEndY == nOldEndY) - { - rY1 = Min( nNewStartY, nOldStartY ); - rY2 = Max( nNewStartY, nOldStartY ) - 1; - } - else - { - rY1 = Min( nNewStartY, nOldStartY ); - rY2 = Max( nNewStartY, nOldStartY ) - 1; - rCont = TRUE; - nContY1 = Min( nNewEndY, nOldEndY ) + 1; - nContY2 = Max( nNewEndY, nOldEndY ); - nContX1 = rX1; - nContX2 = rX2; - } - } - else if (nNewStartY == nOldStartY && nNewEndY == nOldEndY) // nur horizontal - { - if (nNewStartX == nOldStartX) - { - rX1 = Min( nNewEndX, nOldEndX ) + 1; - rX2 = Max( nNewEndX, nOldEndX ); - } - else if (nNewEndX == nOldEndX) - { - rX1 = Min( nNewStartX, nOldStartX ); - rX2 = Max( nNewStartX, nOldStartX ) - 1; - } - else - { - rX1 = Min( nNewStartX, nOldStartX ); - rX2 = Max( nNewStartX, nOldStartX ) - 1; - rCont = TRUE; - nContX1 = Min( nNewEndX, nOldEndX ) + 1; - nContX2 = Max( nNewEndX, nOldEndX ); - nContY1 = rY1; - nContY2 = rY2; - } - } - else if (nNewEndX == nOldEndX && nNewEndY == nOldEndY) // links oben - { - if ((nNewStartX<nOldStartX) == (nNewStartY<nOldStartY)) - rX1 = Min( nNewStartX, nOldStartX ); - else - rX1 = Max( nNewStartX, nOldStartX ); // Ecke weglassen - rX2 = nOldEndX; - rY1 = Min( nNewStartY, nOldStartY ); // oben - rY2 = Max( nNewStartY, nOldStartY ) - 1; - rCont = TRUE; - nContY1 = rY2+1; - nContY2 = nOldEndY; - nContX1 = Min( nNewStartX, nOldStartX ); // links - nContX2 = Max( nNewStartX, nOldStartX ) - 1; - } - else if (nNewStartX == nOldStartX && nNewEndY == nOldEndY) // rechts oben - { - if ((nNewEndX<nOldEndX) != (nNewStartY<nOldStartY)) - rX2 = Max( nNewEndX, nOldEndX ); - else - rX2 = Min( nNewEndX, nOldEndX ); // Ecke weglassen - rX1 = nOldStartX; - rY1 = Min( nNewStartY, nOldStartY ); // oben - rY2 = Max( nNewStartY, nOldStartY ) - 1; - rCont = TRUE; - nContY1 = rY2+1; - nContY2 = nOldEndY; - nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts - nContX2 = Max( nNewEndX, nOldEndX ); - } - else if (nNewEndX == nOldEndX && nNewStartY == nOldStartY) // links unten - { - if ((nNewStartX<nOldStartX) != (nNewEndY<nOldEndY)) - rX1 = Min( nNewStartX, nOldStartX ); - else - rX1 = Max( nNewStartX, nOldStartX ); // Ecke weglassen - rX2 = nOldEndX; - rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten - rY2 = Max( nNewEndY, nOldEndY ); - rCont = TRUE; - nContY1 = nOldStartY; - nContY2 = rY1-1; - nContX1 = Min( nNewStartX, nOldStartX ); // links - nContX2 = Max( nNewStartX, nOldStartX ) - 1; - } - else if (nNewStartX == nOldStartX && nNewStartY == nOldStartY) // rechts unten - { - if ((nNewEndX<nOldEndX) == (nNewEndY<nOldEndY)) - rX2 = Max( nNewEndX, nOldEndX ); - else - rX2 = Min( nNewEndX, nOldEndX ); // Ecke weglassen - rX1 = nOldStartX; - rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten - rY2 = Max( nNewEndY, nOldEndY ); - rCont = TRUE; - nContY1 = nOldStartY; - nContY2 = rY1-1; - nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts - nContX2 = Max( nNewEndX, nOldEndX ); - } - else // Ueberschlag - { - rX1 = nOldStartX; - rY1 = nOldStartY; - rX2 = nOldEndX; - rY2 = nOldEndY; - rCont = TRUE; - nContX1 = nNewStartX; - nContY1 = nNewStartY; - nContX2 = nNewEndX; - nContY2 = nNewEndY; - } - - return TRUE; -} - -void ScUpdateRect::GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) -{ - rX1 = nContX1; - rY1 = nContY1; - rX2 = nContX2; - rY2 = nContY2; -} -#endif - - - - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |