[Libreoffice-commits] .: sc/inc sc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Feb 11 08:28:39 PST 2011
sc/inc/global.hxx | 7 +--
sc/source/ui/inc/tabview.hxx | 3 -
sc/source/ui/view/tabview3.cxx | 83 -----------------------------------------
sc/source/ui/view/tabvwsh5.cxx | 3 -
4 files changed, 3 insertions(+), 93 deletions(-)
New commits:
commit cd9d2e150612c161cd04f3eddc8929e493678ace
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Feb 11 16:09:06 2011 +0000
Resolves: fdo#34065 remove unused InsertBlockMark and PAINT_INVERT flag
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 86163ad..93b603e 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -165,10 +165,9 @@ const SCSIZE PIVOT_MAXPAGEFIELD = 10;
#define PAINT_TOP 2
#define PAINT_LEFT 4
#define PAINT_EXTRAS 8
-#define PAINT_INVERT 16
-#define PAINT_MARKS 32
-#define PAINT_OBJECTS 64
-#define PAINT_SIZE 128
+#define PAINT_MARKS 16
+#define PAINT_OBJECTS 32
+#define PAINT_SIZE 64
#define PAINT_ALL ( PAINT_GRID | PAINT_TOP | PAINT_LEFT | PAINT_EXTRAS | PAINT_OBJECTS | PAINT_SIZE )
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 55b86d6..5b85516 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -402,9 +402,6 @@ public:
// Zeichnen
- void InvertBlockMark(SCCOL nBlockStartX, SCROW nBlockStartY,
- SCCOL nBlockEndX, SCROW nBlockEndY);
-
void PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
ScUpdateMode eMode = SC_UPDATE_ALL );
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 7dbd2d0..9bd3e51 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2220,89 +2220,6 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow )
}
}
-// InvertBlockMark - Block invertieren
-
-void ScTabView::InvertBlockMark(SCCOL nStartX, SCROW nStartY,
- SCCOL nEndX, SCROW nEndY)
-{
- if ( !aViewData.IsActive() )
- return; // invertiert wird nur auf aktiver View
-
- PutInOrder( nStartX, nEndX );
- PutInOrder( nStartY, nEndY );
-
- ScMarkData& rMark = aViewData.GetMarkData();
- ScDocShell* pDocSh = aViewData.GetDocShell();
- ScDocument* pDoc = pDocSh->GetDocument();
- SCTAB nTab = aViewData.GetTabNo();
-
- if ( pDocSh->GetLockCount() )
- {
- // if paint is locked, avoid repeated inverting
- // add repaint areas to paint lock data instead
- pDocSh->PostPaint( nStartX,nStartY,nTab, nEndX,nEndY,nTab, PAINT_GRID );
- return;
- }
-
- BOOL bSingle = rMark.IsMultiMarked();
- BOOL bMerge = pDoc->HasAttrib( nStartX, nStartY, nTab, nEndX, nEndY, nTab,
- HASATTR_MERGED | HASATTR_OVERLAPPED );
-
- USHORT i;
- if ( bMerge || bSingle )
- {
- for (i=0; i<4; i++)
- if (pGridWin[i])
- if (pGridWin[i]->IsVisible())
- pGridWin[i]->InvertSimple( nStartX, nStartY, nEndX, nEndY,
- bMerge, bBlockNeg );
- }
- else
- {
- for (i=0; i<4; i++)
- if (pGridWin[i])
- if (pGridWin[i]->IsVisible())
- {
- ScSplitPos ePos = (ScSplitPos) i;
- Point aStartPoint = aViewData.GetScrPos( nStartX, nStartY, ePos );
- Point aEndPoint = aViewData.GetScrPos( nEndX+1, nEndY+1, ePos );
- if ( pDoc->IsLayoutRTL( nTab ) )
- {
- long nTemp = aStartPoint.X();
- aStartPoint.X() = aEndPoint.X() + 1; // +1 - excluding start of nEndX+1
- aEndPoint.X() = nTemp;
- }
- else
- aEndPoint.X() -= 1;
- aEndPoint.Y() -= 1;
- if ( aEndPoint.X() >= aStartPoint.X() && aEndPoint.Y() >= aStartPoint.Y() )
- {
- MapMode aOld = pGridWin[ePos]->GetMapMode();
- pGridWin[ePos]->SetMapMode(MAP_PIXEL);
- pGridWin[ePos]->Invert( Rectangle(aStartPoint,aEndPoint), INVERT_HIGHLIGHT );
- pGridWin[ePos]->SetMapMode(aOld);
- pGridWin[ePos]->CheckInverted();
- }
- }
- }
-
- //
- // wenn Controls betroffen, neu malen
- //
-
- BOOL bHide = TRUE; // wird Teil der Markierung aufgehoben ?
- if (rMark.IsMarked())
- {
- ScRange aMarkRange;
- rMark.GetMarkArea( aMarkRange );
- if ( aMarkRange.aStart.Col() <= nStartX && aMarkRange.aEnd.Col() >= nEndX &&
- aMarkRange.aStart.Row() <= nStartY && aMarkRange.aEnd.Row() >= nEndY )
- {
- bHide = FALSE; // der ganze Bereich ist markiert
- }
- }
-}
-
BOOL ScTabView::PaintExtras()
{
BOOL bRet = FALSE;
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index 1ab221c..bb87b55 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -175,9 +175,6 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
PaintLeftArea( pHint->GetStartRow(), pHint->GetEndRow() );
if (nParts & PAINT_TOP)
PaintTopArea( pHint->GetStartCol(), pHint->GetEndCol() );
- if (nParts & PAINT_INVERT)
- InvertBlockMark( pHint->GetStartCol(), pHint->GetStartRow(),
- pHint->GetEndCol(), pHint->GetEndRow() );
// #i84689# call UpdateAllOverlays here instead of in ScTabView::PaintArea
if (nParts & ( PAINT_LEFT | PAINT_TOP )) // only if widths or heights changed
More information about the Libreoffice-commits
mailing list