summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/inc/gridwin.hxx49
-rw-r--r--sc/source/ui/view/gridwin.cxx36
-rw-r--r--sc/source/ui/view/gridwin2.cxx6
-rw-r--r--sc/source/ui/view/gridwin3.cxx38
-rw-r--r--sc/source/ui/view/gridwin4.cxx179
-rw-r--r--sc/source/ui/view/gridwin5.cxx22
6 files changed, 77 insertions, 253 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 3976c90e49a6..08e47a332e55 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -207,9 +207,9 @@ private:
DECL_LINK( PopupModeEndHdl, FloatingWindow* );
DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
- sal_Bool TestMouse( const MouseEvent& rMEvt, sal_Bool bAction );
+ bool TestMouse( const MouseEvent& rMEvt, bool bAction );
- sal_Bool DoPageFieldSelection( SCCOL nCol, SCROW nRow );
+ bool DoPageFieldSelection( SCCOL nCol, SCROW nRow );
bool DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
void DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
@@ -231,9 +231,9 @@ private:
void PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp );
- void UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect );
+ void UpdateDragRect( bool bShowRange, const Rectangle& rPosRect );
- sal_Bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
+ bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
void ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow,
const String& aValue, bool bCheckForDates );
void FilterSelect( sal_uLong nSel );
@@ -242,27 +242,27 @@ private:
void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr );
- sal_Bool HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
+ bool HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
- sal_Bool DropScroll( const Point& rMousePos );
+ bool DropScroll( const Point& rMousePos );
sal_Int8 AcceptPrivateDrop( const AcceptDropEvent& rEvt );
sal_Int8 ExecutePrivateDrop( const ExecuteDropEvent& rEvt );
sal_Int8 DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPosX, SCROW nDestPosY,
- const Point& rLogicPos, sal_Int8 nDndAction );
+ const Point& rLogicPos, sal_Int8 nDndAction );
void HandleMouseButtonDown( const MouseEvent& rMEvt );
- sal_Bool DrawMouseButtonDown(const MouseEvent& rMEvt);
- sal_Bool DrawMouseButtonUp(const MouseEvent& rMEvt);
- sal_Bool DrawMouseMove(const MouseEvent& rMEvt);
- sal_Bool DrawKeyInput(const KeyEvent& rKEvt);
- sal_Bool DrawCommand(const CommandEvent& rCEvt);
- sal_Bool DrawHasMarkedObj();
+ bool DrawMouseButtonDown(const MouseEvent& rMEvt);
+ bool DrawMouseButtonUp(const MouseEvent& rMEvt);
+ bool DrawMouseMove(const MouseEvent& rMEvt);
+ bool DrawKeyInput(const KeyEvent& rKEvt);
+ bool DrawCommand(const CommandEvent& rCEvt);
+ bool DrawHasMarkedObj();
void DrawEndAction();
void DrawMarkDropObj( SdrObject* pObj );
SdrObject* GetEditObject();
- sal_Bool IsMyModel(SdrEditView* pSdrView);
+ bool IsMyModel(SdrEditView* pSdrView);
void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer );
void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev );
@@ -271,10 +271,10 @@ private:
void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, OutputDevice* pContentDev );
- sal_Bool GetEditUrl( const Point& rPos,
- String* pName=0, String* pUrl=0, String* pTarget=0 );
- sal_Bool GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
+ bool GetEditUrl( const Point& rPos,
String* pName=0, String* pUrl=0, String* pTarget=0 );
+ bool GetEditUrlOrError( bool bSpellErr, const Point& rPos,
+ String* pName=0, String* pUrl=0, String* pTarget=0 );
bool HitRangeFinder( const Point& rMouse, bool& rCorner, sal_uInt16* pIndex = NULL,
SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
@@ -338,7 +338,7 @@ public:
void UpdateFormulas();
- void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect );
+ void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, bool bDataSelect );
void DoScenarioMenue( const ScRange& rScenRange );
void LaunchPageFieldMenu( SCCOL nCol, SCROW nRow );
@@ -347,14 +347,11 @@ public:
::com::sun::star::sheet::DataPilotFieldOrientation GetDPFieldOrientation( SCCOL nCol, SCROW nRow ) const;
void DrawButtons( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- ScTableInfo& rTabInfo, OutputDevice* pContentDev );
+ ScTableInfo& rTabInfo, OutputDevice* pContentDev );
using Window::Draw;
void Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- ScUpdateMode eMode = SC_UPDATE_ALL );
-
- void InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- sal_Bool bTestMerge = false, sal_Bool bRepeat = false );
+ ScUpdateMode eMode = SC_UPDATE_ALL );
void CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddress);
@@ -362,12 +359,12 @@ public:
void ShowCursor();
void UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange);
- void UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos );
+ void UpdateListValPos( bool bVisible, const ScAddress& rPos );
- sal_Bool ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard );
+ bool ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard );
void HideNoteMarker();
- MapMode GetDrawMapMode( sal_Bool bForce = false );
+ MapMode GetDrawMapMode( bool bForce = false );
void ContinueDrag();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index cecf21f2dc94..195bc87032e5 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -880,7 +880,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
CaptureMouse();
}
-void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect )
+void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, bool bDataSelect )
{
delete pFilterBox;
delete pFilterFloat;
@@ -1352,7 +1352,7 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
}
}
-sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
+bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction )
{
// MouseEvent buttons must only be checked if bAction==TRUE
// to allow changing the mouse pointer in MouseMove,
@@ -1362,16 +1362,16 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
if ( bAction && !rMEvt.IsLeft() )
return false;
- sal_Bool bNewPointer = false;
+ bool bNewPointer = false;
SfxInPlaceClient* pClient = pViewData->GetViewShell()->GetIPClient();
- sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
if ( pViewData->IsActive() && !bOleActive )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// Auto-Fill
@@ -1400,7 +1400,7 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
// where the Marking flag is set and MarkToSimple won't work anymore.
pViewData->GetMarkData().MarkToSimple();
}
- bNewPointer = sal_True;
+ bNewPointer = true;
}
}
}
@@ -1421,9 +1421,9 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
aStartPos.X() += 2;
aEndPos.X() += 2;
}
- sal_Bool bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
+ bool bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
aMousePos.Y() >= aStartPos.Y()-3 && aMousePos.Y() <= aStartPos.Y()+1 );
- sal_Bool bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
+ bool bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
aMousePos.Y() >= aEndPos.Y()-3 && aMousePos.Y() <= aEndPos.Y()+1 );
if ( bTop || bBottom )
{
@@ -1435,7 +1435,7 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), nMode );
}
- bNewPointer = sal_True;
+ bNewPointer = true;
}
}
}
@@ -3159,7 +3159,7 @@ void ScGridWindow::UpdateInputContext()
// sensitiver Bereich (Pixel)
#define SCROLL_SENSITIVE 20
-sal_Bool ScGridWindow::DropScroll( const Point& rMousePos )
+bool ScGridWindow::DropScroll( const Point& rMousePos )
{
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -4431,7 +4431,7 @@ void ScGridWindow::UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange)
}
}
-void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos )
+void ScGridWindow::UpdateListValPos( bool bVisible, const ScAddress& rPos )
{
bool bOldButton = bListValButton;
ScAddress aOldPos = aListValPos;
@@ -4831,13 +4831,13 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp )
//------------------------------------------------------------------------
-sal_Bool ScGridWindow::GetEditUrl( const Point& rPos,
- String* pName, String* pUrl, String* pTarget )
+bool ScGridWindow::GetEditUrl( const Point& rPos,
+ String* pName, String* pUrl, String* pTarget )
{
return GetEditUrlOrError( false, rPos, pName, pUrl, pTarget );
}
-sal_Bool ScGridWindow::GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
+bool ScGridWindow::GetEditUrlOrError( bool bSpellErr, const Point& rPos,
String* pName, String* pUrl, String* pTarget )
{
//! nPosX/Y mit uebergeben?
@@ -5014,14 +5014,14 @@ sal_Bool ScGridWindow::GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
return false;
}
-sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
+bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
SCTAB nTabCount = pDoc->GetTableCount();
if ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) )
{
- sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Size aButSize = pViewData->GetScenButSize();
long nBWidth = aButSize.Width();
@@ -5047,7 +5047,7 @@ sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScen
// dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden
pDoc->ExtendTotalMerge( aRange );
- sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
+ bool bTextBelow = ( aRange.aStart.Row() == 0 );
Point aButtonPos;
if ( bTextBelow )
@@ -5070,7 +5070,7 @@ sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScen
if ( aButRect.IsInside( rPosPixel ) )
{
rScenRange = aRange;
- return sal_True;
+ return true;
}
}
}
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 1a7f6e5444c5..8377fdf68c26 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -118,12 +118,12 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
}
// private method for mouse button handling
-sal_Bool ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow )
+bool ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow )
{
if (GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE)
{
LaunchPageFieldMenu( nCol, nRow );
- return sal_True;
+ return true;
}
return false;
}
@@ -627,7 +627,7 @@ void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt )
// -----------------------------------------------------------------------
-void ScGridWindow::UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect )
+void ScGridWindow::UpdateDragRect( bool bShowRange, const Rectangle& rPosRect )
{
SCCOL nStartX = ( rPosRect.Left() >= 0 ) ? static_cast<SCCOL>(rPosRect.Left()) : SCCOL_MAX;
SCROW nStartY = ( rPosRect.Top() >= 0 ) ? static_cast<SCROW>(rPosRect.Top()) : SCROW_MAX;
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index bf3ff4fe59a2..4e3189c4efb9 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -54,9 +54,9 @@
// -----------------------------------------------------------------------
-sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
+bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
{
- sal_Bool bRet = false;
+ bool bRet = false;
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
@@ -65,7 +65,7 @@ sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if ( pDraw->IsDetectiveHit( aLogicPos ) )
{
// auf Detektiv-Pfeilen gar nichts (Doppelklick wird bei ButtonUp ausgewertet)
- bRet = sal_True;
+ bRet = true;
}
else
{
@@ -81,15 +81,15 @@ sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if ( pDrView && !rMEvt.IsLeft() && !bRet )
{
pDrView->BrkAction();
- bRet = sal_True;
+ bRet = true;
}
return bRet;
}
-sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
+bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
{
ScViewFunc* pView = pViewData->GetView();
- sal_Bool bRet = false;
+ bool bRet = false;
FuPoor* pDraw = pView->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
@@ -103,7 +103,7 @@ sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
ScDrawView* pDrView = pViewData->GetScDrawView();
if ( pDrView )
{
- sal_Bool bReplaceAll = sal_True;
+ bool bReplaceAll = true;
pDrView->SetAttrToMarked(*pDrawBrush, bReplaceAll);
}
@@ -115,13 +115,13 @@ sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
return bRet;
}
-sal_Bool ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
+bool ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
{
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- sal_Bool bRet = pDraw->MouseMove( rMEvt );
+ bool bRet = pDraw->MouseMove( rMEvt );
if ( bRet )
UpdateStatusPosSize();
return bRet;
@@ -146,7 +146,7 @@ void ScGridWindow::DrawEndAction()
// ReleaseMouse beim Aufruf
}
-sal_Bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
+bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
@@ -157,30 +157,30 @@ sal_Bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
if( nUsed == SC_CMD_USED )
nButtonDown = 0; // MouseButtonUp wird verschluckt...
if( nUsed || pDrView->IsAction() )
- return sal_True;
+ return true;
}
return false;
}
-sal_Bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDrView && pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- sal_Bool bOldMarked = pDrView->AreObjectsMarked();
+ bool bOldMarked = pDrView->AreObjectsMarked();
if (pDraw->KeyInput( rKEvt ))
{
- sal_Bool bLeaveDraw = false;
- sal_Bool bUsed = sal_True;
- sal_Bool bNewMarked = pDrView->AreObjectsMarked();
+ bool bLeaveDraw = false;
+ bool bUsed = true;
+ bool bNewMarked = pDrView->AreObjectsMarked();
if ( !pViewData->GetView()->IsDrawSelMode() )
if ( !bNewMarked )
{
pViewData->GetViewShell()->SetDrawShell( false );
- bLeaveDraw = sal_True;
+ bLeaveDraw = true;
if ( !bOldMarked &&
rKEvt.GetKeyCode().GetCode() == KEY_DELETE )
bUsed = false; // nichts geloescht
@@ -245,7 +245,7 @@ void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pCo
}
}
-MapMode ScGridWindow::GetDrawMapMode( sal_Bool bForce )
+MapMode ScGridWindow::GetDrawMapMode( bool bForce )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
@@ -382,7 +382,7 @@ void ScGridWindow::UpdateStatusPosSize()
pViewData->GetBindings().SetState(aSet);
}
-sal_Bool ScGridWindow::DrawHasMarkedObj()
+bool ScGridWindow::DrawHasMarkedObj()
{
ScDrawView* p = pViewData->GetScDrawView();
return p ? p->AreObjectsMarked() : false;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index eacf71de7db0..9d35f84c5785 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1308,7 +1308,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
return Rectangle( aPos, aBtnSize );
}
-sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
+bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
ScDocument* pDoc = pViewData->GetDocument();
ScDBData* pDBData = pDoc->GetDBAtCursor( nCol, nRow, nTab );
@@ -1321,8 +1321,8 @@ sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
OSL_FAIL("Auto-Filter-Button ohne DBData");
}
- sal_Bool bSimpleQuery = sal_True;
- sal_Bool bColumnFound = false;
+ bool bSimpleQuery = true;
+ bool bColumnFound = false;
SCSIZE nQuery;
if ( !aQueryParam.bInplace )
@@ -1344,179 +1344,6 @@ sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
return ( bSimpleQuery && bColumnFound );
}
-void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- sal_Bool bTestMerge, sal_Bool bRepeat )
-{
- //! if INVERT_HIGHLIGHT swaps foreground and background (like on Mac),
- //! use INVERT_HIGHLIGHT only for cells that have no background color set
- //! (here and in ScOutputData::DrawMark)
-
- PutInOrder( nX1, nX2 );
- PutInOrder( nY1, nY2 );
-
- ScMarkData& rMark = pViewData->GetMarkData();
- ScDocument* pDoc = pViewData->GetDocument();
- SCTAB nTab = pViewData->GetTabNo();
-
- sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
- long nLayoutSign = bLayoutRTL ? -1 : 1;
-
- SCCOL nTestX2 = nX2;
- SCROW nTestY2 = nY2;
- if (bTestMerge)
- pDoc->ExtendMerge( nX1,nY1, nTestX2,nTestY2, nTab );
-
- SCCOL nPosX = pViewData->GetPosX( eHWhich );
- SCROW nPosY = pViewData->GetPosY( eVWhich );
- if (nTestX2 < nPosX || nTestY2 < nPosY)
- return; // unsichtbar
- SCCOL nRealX1 = nX1;
- if (nX1 < nPosX)
- nX1 = nPosX;
- if (nY1 < nPosY)
- nY1 = nPosY;
-
- SCCOL nXRight = nPosX + pViewData->VisibleCellsX(eHWhich);
- if (nXRight > MAXCOL) nXRight = MAXCOL;
- SCROW nYBottom = nPosY + pViewData->VisibleCellsY(eVWhich);
- if (nYBottom > MAXROW) nYBottom = MAXROW;
-
- if (nX1 > nXRight || nY1 > nYBottom)
- return; // unsichtbar
- if (nX2 > nXRight) nX2 = nXRight;
- if (nY2 > nYBottom) nY2 = nYBottom;
-
- MapMode aOld = GetMapMode(); SetMapMode(MAP_PIXEL); // erst nach den return's !!!
-
- double nPPTX = pViewData->GetPPTX();
- double nPPTY = pViewData->GetPPTY();
-
- ScInvertMerger aInvert( this );
-
- Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
- long nScrY = aScrPos.Y();
- sal_Bool bWasHidden = false;
- for (SCROW nY=nY1; nY<=nY2; nY++)
- {
- sal_Bool bFirstRow = ( nY == nPosY ); // first visible row?
- sal_Bool bDoHidden = false; // versteckte nachholen ?
- sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab );
- sal_Bool bDoRow = ( nHeightTwips != 0 );
- if (bDoRow)
- {
- if (bTestMerge)
- if (bWasHidden) // auf versteckte zusammengefasste testen
- {
- bDoHidden = true;
- bDoRow = true;
- }
-
- bWasHidden = false;
- }
- else
- {
- bWasHidden = sal_True;
- if (bTestMerge)
- if (nY==nY2)
- bDoRow = sal_True; // letzte Zeile aus Block
- }
-
- if ( bDoRow )
- {
- SCCOL nLoopEndX = nX2;
- if (nX2 < nX1) // Rest von zusammengefasst
- {
- SCCOL nStartX = nX1;
- while ( ((const ScMergeFlagAttr*)pDoc->
- GetAttr(nStartX,nY,nTab,ATTR_MERGE_FLAG))->IsHorOverlapped() )
- --nStartX;
- if (nStartX <= nX2)
- nLoopEndX = nX1;
- }
-
- long nEndY = nScrY + ScViewData::ToPixel( nHeightTwips, nPPTY ) - 1;
- long nScrX = aScrPos.X();
- for (SCCOL nX=nX1; nX<=nLoopEndX; nX++)
- {
- long nWidth = ScViewData::ToPixel( pDoc->GetColWidth( nX,nTab ), nPPTX );
- if ( nWidth > 0 )
- {
- long nEndX = nScrX + ( nWidth - 1 ) * nLayoutSign;
- if (bTestMerge)
- {
- SCROW nThisY = nY;
- const ScPatternAttr* pPattern = pDoc->GetPattern( nX, nY, nTab );
- const ScMergeFlagAttr* pMergeFlag = (const ScMergeFlagAttr*) &pPattern->
- GetItem(ATTR_MERGE_FLAG);
- if ( pMergeFlag->IsVerOverlapped() && ( bDoHidden || bFirstRow ) )
- {
- while ( pMergeFlag->IsVerOverlapped() && nThisY > 0 &&
- (pDoc->RowHidden(nThisY-1, nTab) || bFirstRow) )
- {
- --nThisY;
- pPattern = pDoc->GetPattern( nX, nThisY, nTab );
- pMergeFlag = (const ScMergeFlagAttr*) &pPattern->GetItem(ATTR_MERGE_FLAG);
- }
- }
-
- // nur Rest von zusammengefasster zu sehen ?
- SCCOL nThisX = nX;
- if ( pMergeFlag->IsHorOverlapped() && nX == nPosX && nX > nRealX1 )
- {
- while ( pMergeFlag->IsHorOverlapped() )
- {
- --nThisX;
- pPattern = pDoc->GetPattern( nThisX, nThisY, nTab );
- pMergeFlag = (const ScMergeFlagAttr*) &pPattern->GetItem(ATTR_MERGE_FLAG);
- }
- }
-
- if ( rMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat )
- {
- if ( !pMergeFlag->IsOverlapped() )
- {
- ScMergeAttr* pMerge = (ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
- if (pMerge->GetColMerge() > 0 || pMerge->GetRowMerge() > 0)
- {
- Point aEndPos = pViewData->GetScrPos(
- nThisX + pMerge->GetColMerge(),
- nThisY + pMerge->GetRowMerge(), eWhich );
- if ( aEndPos.X() * nLayoutSign > nScrX * nLayoutSign && aEndPos.Y() > nScrY )
- {
- aInvert.AddRect( Rectangle( nScrX,nScrY,
- aEndPos.X()-nLayoutSign,aEndPos.Y()-1 ) );
- }
- }
- else if ( nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
- {
- aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
- }
- }
- }
- }
- else // !bTestMerge
- {
- if ( rMark.IsCellMarked( nX, nY, sal_True ) == bRepeat &&
- nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
- {
- aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
- }
- }
-
- nScrX = nEndX + nLayoutSign;
- }
- }
- nScrY = nEndY + 1;
- }
- }
-
- aInvert.Flush(); // before restoring MapMode
-
- SetMapMode(aOld);
-
- CheckInverted();
-}
-
void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
{
ScMarkData aMultiMark( pViewData->GetMarkData() );
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 6117240dc106..05b50c02c51f 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -92,16 +92,16 @@ ScHideTextCursor::~ScHideTextCursor()
// -----------------------------------------------------------------------
-sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard )
+bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
{
- sal_Bool bDone = false;
+ bool bDone = false;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
ScAddress aCellPos( nPosX, nPosY, nTab );
String aTrackText;
- sal_Bool bLeftEdge = false;
+ bool bLeftEdge = false;
// Change-Tracking
@@ -175,7 +175,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
// bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle
if ( pFound->GetType() == SC_CAT_DELETE_COLS )
- bLeftEdge = sal_True;
+ bLeftEdge = true;
DateTime aDT = pFound->GetDateTime();
aTrackText = pFound->GetUser();
@@ -202,14 +202,14 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
const ScPostIt* pNote = pDoc->GetNote( aCellPos );
if ( (aTrackText.Len() > 0) || (pNote && !pNote->IsCaptionShown()) )
{
- sal_Bool bNew = sal_True;
- sal_Bool bFast = false;
+ bool bNew = true;
+ bool bFast = false;
if ( pNoteMarker ) // schon eine Notiz angezeigt
{
if ( pNoteMarker->GetDocPos() == aCellPos ) // dieselbe
bNew = false; // dann stehenlassen
else
- bFast = sal_True; // sonst sofort
+ bFast = true; // sonst sofort
// marker which was shown for ctrl-F1 isn't removed by mouse events
if ( pNoteMarker->IsByKeyboard() && !bKeyboard )
@@ -218,7 +218,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
if ( bNew )
{
if ( bKeyboard )
- bFast = sal_True; // keyboard also shows the marker immediately
+ bFast = true; // keyboard also shows the marker immediately
delete pNoteMarker;
@@ -233,7 +233,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
/* If caption is shown from right or bottom windows, adjust
mapmode to include size of top-left window. */
- MapMode aMapMode = GetDrawMapMode( sal_True );
+ MapMode aMapMode = GetDrawMapMode( true );
Size aLeftSize = pLeft->PixelToLogic( pLeft->GetOutputSizePixel(), aMapMode );
Point aOrigin = aMapMode.GetOrigin();
if( (this == pRight) || (this == pDiagonal) )
@@ -247,7 +247,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
aMapMode, bLeftEdge, bFast, bKeyboard );
}
- bDone = sal_True; // something is shown (old or new)
+ bDone = true; // something is shown (old or new)
}
return bDone;
@@ -412,7 +412,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
Window::RequestHelp( rHEvt );
}
-sal_Bool ScGridWindow::IsMyModel(SdrEditView* pSdrView)
+bool ScGridWindow::IsMyModel(SdrEditView* pSdrView)
{
return pSdrView &&
pSdrView->GetModel() == pViewData->GetDocument()->GetDrawLayer();