[Libreoffice-commits] .: 3 commits - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Nov 2 12:42:03 PDT 2011


 sc/source/ui/inc/gridwin.hxx   |  109 +++++++++++-------------
 sc/source/ui/view/gridwin.cxx  |   87 ++++++++++---------
 sc/source/ui/view/gridwin2.cxx |   10 +-
 sc/source/ui/view/gridwin3.cxx |   38 ++++----
 sc/source/ui/view/gridwin4.cxx |  183 +----------------------------------------
 sc/source/ui/view/gridwin5.cxx |   22 ++--
 6 files changed, 137 insertions(+), 312 deletions(-)

New commits:
commit 08f73742b35ffbef96e470c61f9f86cd7d3ee2e1
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Nov 2 15:41:22 2011 -0400

    More on sal_Bool to bool (in method signatures).

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 3976c90..08e47a3 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 cecf21f..195bc87 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 1a7f6e5..8377fdf 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 bf3ff4f..4e3189c 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 eacf71d..9d35f84 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 6117240..05b50c0 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();
commit 0735a3558a9fc45272a0d34e26a3b3db30b7c6fa
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Nov 2 15:29:02 2011 -0400

    Prefer boost::scoped_ptr to std::auto_ptr and shared_ptr (if appropriate).

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 7005a72..3976c90 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -40,7 +40,7 @@
 
 #include <vector>
 #include <memory>
-#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
 
 // ---------------------------------------------------------------------------
 
@@ -115,7 +115,7 @@ private:
     ::sdr::overlay::OverlayObjectList*              mpOOHeader;
     ::sdr::overlay::OverlayObjectList*              mpOOShrink;
 
-    ::boost::shared_ptr<Rectangle> mpAutoFillRect;
+    boost::scoped_ptr<Rectangle> mpAutoFillRect;
 
     /**
      * Stores current visible column and row ranges, used to avoid expensive
@@ -144,8 +144,8 @@ private:
 
     ScFilterListBox*        pFilterBox;
     FloatingWindow*         pFilterFloat;
-    ::std::auto_ptr<ScCheckListMenuWindow> mpDPFieldPopup;
-    ::std::auto_ptr<ScDPFieldButton>      mpFilterButton;
+    boost::scoped_ptr<ScCheckListMenuWindow> mpDPFieldPopup;
+    boost::scoped_ptr<ScDPFieldButton>       mpFilterButton;
 
     sal_uInt16              nCursorHideCount;
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5acde58..cecf21f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -522,7 +522,7 @@ void ScGridWindow::ClickExtern()
     }
     while (false);
 
-    if (mpDPFieldPopup.get())
+    if (mpDPFieldPopup)
     {
         mpDPFieldPopup->close(false);
         mpDPFieldPopup.reset();
@@ -1805,7 +1805,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
     {
         if ( pFilterBox && pFilterBox->GetMode() == SC_FILTERBOX_FILTER )
         {
-            if (mpFilterButton.get())
+            if (mpFilterButton)
             {
                 bool bFilterActive = IsAutoFilterActive(
                     pFilterBox->GetCol(), pFilterBox->GetRow(), pViewData->GetTabNo() );
@@ -2258,7 +2258,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
             nMouseStatus = SC_GM_NONE;
             if ( pFilterBox->GetMode() == SC_FILTERBOX_FILTER )
             {
-                if (mpFilterButton.get())
+                if (mpFilterButton)
                 {
                     mpFilterButton->setHasHiddenMember(false);
                     mpFilterButton->setPopupPressed(false);
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 368cbb0..1a7f6e5 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -547,7 +547,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu()
     typedef boost::unordered_map<OUString, OUString, OUStringHash> MemNameMapType;
     typedef boost::unordered_map<OUString, bool, OUStringHash> MemVisibilityType;
 
-    if (!mpDPFieldPopup.get())
+    if (!mpDPFieldPopup)
         return;
 
     DPFieldPopupData* pDPData = static_cast<DPFieldPopupData*>(mpDPFieldPopup->getExtendedData());
commit e27eec9651367c38df8de158c32d7ca562c03f19
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Nov 2 15:24:54 2011 -0400

    sal_Bool->bool in ScGridWindow.  One of them wasn't even used.

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 51d2793..7005a72 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -147,65 +147,63 @@ private:
     ::std::auto_ptr<ScCheckListMenuWindow> mpDPFieldPopup;
     ::std::auto_ptr<ScDPFieldButton>      mpFilterButton;
 
-    sal_uInt16                  nCursorHideCount;
+    sal_uInt16              nCursorHideCount;
 
-    sal_Bool                    bMarking;
+    sal_uInt16              nButtonDown;
+    sal_uInt8               nMouseStatus;
+    sal_uInt8               nNestedButtonState;     // track nested button up/down calls
 
-    sal_uInt16                  nButtonDown;
-    sal_Bool                    bEEMouse;               // Edit-Engine hat Maus
-    sal_uInt8                   nMouseStatus;
-    sal_uInt8                    nNestedButtonState;     // track nested button up/down calls
-
-    sal_Bool                    bDPMouse;               // DataPilot-D&D (neue Pivottabellen)
     long                    nDPField;
     ScDPObject*             pDragDPObj; //! name?
 
-    sal_Bool                    bRFMouse;               // RangeFinder-Drag
-    sal_Bool                    bRFSize;
-    sal_uInt16                  nRFIndex;
+    sal_uInt16              nRFIndex;
     SCsCOL                  nRFAddX;
     SCsROW                  nRFAddY;
 
-    sal_uInt16                  nPagebreakMouse;        // Pagebreak-Modus Drag
+    sal_uInt16              nPagebreakMouse;        // Pagebreak-Modus Drag
     SCCOLROW                nPagebreakBreak;
     SCCOLROW                nPagebreakPrev;
     ScRange                 aPagebreakSource;
     ScRange                 aPagebreakDrag;
-    sal_Bool                    bPagebreakDrawn;
 
-    sal_uInt8                   nPageScript;
+    sal_uInt8               nPageScript;
 
     long                    nLastClickX;
     long                    nLastClickY;
 
-    sal_Bool                    bDragRect;
     SCCOL                   nDragStartX;
     SCROW                   nDragStartY;
     SCCOL                   nDragEndX;
     SCROW                   nDragEndY;
     InsCellCmd              meDragInsertMode;
 
-    sal_uInt16                  nCurrentPointer;
+    sal_uInt16              nCurrentPointer;
 
-    sal_Bool                    bIsInScroll;
-    sal_Bool                    bIsInPaint;
 
     ScDDComboBoxButton      aComboButton;
 
     Point                   aCurMousePos;
 
-    sal_uInt16                  nPaintCount;
+    sal_uInt16              nPaintCount;
     Rectangle               aRepaintPixel;
-    sal_Bool                    bNeedsRepaint;
 
-    sal_Bool                    bAutoMarkVisible;
     ScAddress               aAutoMarkPos;
-
-    sal_Bool                    bListValButton;
     ScAddress               aListValPos;
 
     Rectangle               aInvertRect;
 
+    bool                    bEEMouse:1;               // Edit-Engine hat Maus
+    bool                    bDPMouse:1;               // DataPilot-D&D (neue Pivottabellen)
+    bool                    bRFMouse:1;               // RangeFinder-Drag
+    bool                    bRFSize:1;
+    bool                    bPagebreakDrawn:1;
+    bool                    bDragRect:1;
+    bool                    bIsInScroll:1;
+    bool                    bIsInPaint:1;
+    bool                    bNeedsRepaint:1;
+    bool                    bAutoMarkVisible:1;
+    bool                    bListValButton:1;
+
     DECL_LINK( PopupModeEndHdl, FloatingWindow* );
     DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
 
@@ -278,8 +276,8 @@ private:
     sal_Bool            GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
                                 String* pName=0, String* pUrl=0, String* pTarget=0 );
 
-    sal_Bool            HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, sal_uInt16* pIndex = NULL,
-                                        SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
+    bool            HitRangeFinder( const Point& rMouse, bool& rCorner, sal_uInt16* pIndex = NULL,
+                                    SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
 
     sal_uInt16          HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
                                     SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL );
@@ -362,7 +360,7 @@ public:
 
     void            HideCursor();
     void            ShowCursor();
-    void            UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange);
+    void            UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange);
 
     void            UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos );
 
@@ -376,7 +374,7 @@ public:
     void            StopMarking();
     void            UpdateInputContext();
 
-    void            CheckInverted()     { if (nPaintCount) bNeedsRepaint = sal_True; }
+    void            CheckInverted()     { if (nPaintCount) bNeedsRepaint = true; }
 
     void            DoInvertRect( const Rectangle& rPixel );
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 69c7a52..5acde58 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -429,28 +429,28 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
             mpDPFieldPopup(NULL),
             mpFilterButton(NULL),
             nCursorHideCount( 0 ),
-            bMarking( false ),
             nButtonDown( 0 ),
-            bEEMouse( false ),
             nMouseStatus( SC_GM_NONE ),
             nNestedButtonState( SC_NESTEDBUTTON_NONE ),
-            bDPMouse( false ),
-            bRFMouse( false ),
             nPagebreakMouse( SC_PD_NONE ),
-            bPagebreakDrawn( false ),
             nPageScript( 0 ),
-            bDragRect( false ),
             nDragStartX( -1 ),
             nDragStartY( -1 ),
             nDragEndX( -1 ),
             nDragEndY( -1 ),
             meDragInsertMode( INS_NONE ),
             nCurrentPointer( 0 ),
-            bIsInScroll( false ),
-            bIsInPaint( false ),
             aComboButton( this ),
             aCurMousePos( 0,0 ),
             nPaintCount( 0 ),
+            bEEMouse( false ),
+            bDPMouse( false ),
+            bRFMouse( false ),
+            bRFSize( false ),
+            bPagebreakDrawn( false ),
+            bDragRect( false ),
+            bIsInScroll( false ),
+            bIsInPaint( false ),
             bNeedsRepaint( false ),
             bAutoMarkVisible( false ),
             bListValButton( false )
@@ -1589,7 +1589,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
                 GrabFocus();
 
             pScMod->SetInputMode( SC_INPUT_TABLE );
-            bEEMouse = sal_True;
+            bEEMouse = true;
             bEditMode = pEditView->MouseButtonDown( rMEvt );
             return;
         }
@@ -1608,9 +1608,12 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
     // Reihenfolge passend zum angezeigten Cursor:
     //  RangeFinder, AutoFill, PageBreak, Drawing
 
-    if ( HitRangeFinder( rMEvt.GetPosPixel(), bRFSize, &nRFIndex, &nRFAddX, &nRFAddY ) )
+    bool bCorner;
+    bool bFound = HitRangeFinder(rMEvt.GetPosPixel(), bCorner, &nRFIndex, &nRFAddX, &nRFAddY);
+    bRFSize = bCorner;
+    if (bFound)
     {
-        bRFMouse = sal_True;        // die anderen Variablen sind oben initialisiert
+        bRFMouse = true;        // die anderen Variablen sind oben initialisiert
 
         if ( pViewData->GetActivePart() != eWhich )
             pViewData->GetView()->ActivatePart( eWhich );   //! schon oben immer ???
@@ -2344,7 +2347,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
 
         //  Range-Finder
 
-        sal_Bool bCorner;
+        bool bCorner;
         if ( HitRangeFinder( rMEvt.GetPosPixel(), bCorner ) )
         {
             if (bCorner)
@@ -2514,7 +2517,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
             }
             if (bRFMouse)
             {
-                RFMouseMove( rMEvt, sal_True );     // richtig abbrechen geht dabei nicht...
+                RFMouseMove( rMEvt, true );     // richtig abbrechen geht dabei nicht...
                 bRFMouse = false;
             }
             if (nPagebreakMouse)
@@ -3451,7 +3454,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
             nDragStartY = nNewDragY;
             nDragEndX = nDragStartX+nSizeX-1;
             nDragEndY = nDragStartY+nSizeY-1;
-            bDragRect = sal_True;
+            bDragRect = true;
             meDragInsertMode = eDragInsertMode;
 
             UpdateDragRectOverlay();
@@ -4352,7 +4355,7 @@ void ScGridWindow::UpdateFormulas()
         //  nicht anfangen, verschachtelt zu painten
         //  (dann wuerde zumindest der MapMode nicht mehr stimmen)
 
-        bNeedsRepaint = sal_True;           // -> am Ende vom Paint nochmal Invalidate auf alles
+        bNeedsRepaint = true;           // -> am Ende vom Paint nochmal Invalidate auf alles
         aRepaintPixel = Rectangle();    // alles
         return;
     }
@@ -4414,7 +4417,7 @@ void ScGridWindow::UpdateFormulas()
     CheckNeedsRepaint();    // #i90362# used to be called via Draw() - still needed here
 }
 
-void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange)
+void ScGridWindow::UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange)
 {
     if ( bMarked != bAutoMarkVisible || ( bMarked && rMarkRange.aEnd != aAutoMarkPos ) )
     {
@@ -4430,7 +4433,7 @@ void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRang
 
 void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos )
 {
-    sal_Bool bOldButton = bListValButton;
+    bool bOldButton = bListValButton;
     ScAddress aOldPos = aListValPos;
 
     bListValButton = bVisible;
@@ -4502,10 +4505,10 @@ Point ScGridWindow::GetMousePosPixel() const  { return aCurMousePos; }
 
 //------------------------------------------------------------------------
 
-sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner,
+bool ScGridWindow::HitRangeFinder( const Point& rMouse, bool& rCorner,
                                 sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
 {
-    sal_Bool bFound = false;
+    bool bFound = false;
     ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
     if (pHdl)
     {
@@ -4531,13 +4534,13 @@ sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner,
             aNext.X() += nSizeXPix * nLayoutSign;
             aNext.Y() += nSizeYPix;
 
-            sal_Bool bCornerHor;
+            bool bCornerHor;
             if ( bLayoutRTL )
                 bCornerHor = ( rMouse.X() >= aNext.X() && rMouse.X() <= aNext.X() + 8 );
             else
                 bCornerHor = ( rMouse.X() >= aNext.X() - 8 && rMouse.X() <= aNext.X() );
 
-            sal_Bool bCellCorner = ( bCornerHor &&
+            bool bCellCorner = ( bCornerHor &&
                                  rMouse.Y() >= aNext.Y() - 8 && rMouse.Y() <= aNext.Y() );
             //  corner is hit only if the mouse is within the cell
 
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index bf98392..368cbb0 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -186,7 +186,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
         long nField = pDPObj->GetHeaderDim( aPos, nOrient );
         if ( nField >= 0 )
         {
-            bDPMouse   = sal_True;
+            bDPMouse   = true;
             nDPField   = nField;
             pDragDPObj = pDPObj;
 
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 03cd63f..eacf71d 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -334,7 +334,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
         }
         else
         {
-            bNeedsRepaint = sal_True;
+            bNeedsRepaint = true;
             aRepaintPixel = LogicToPixel(rRect);    // nur betroffenen Bereich
         }
         return;
@@ -343,7 +343,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
     if (bIsInPaint)
         return;
 
-    bIsInPaint = sal_True;
+    bIsInPaint = true;
 
     Rectangle aPixRect = LogicToPixel( rRect );
 


More information about the Libreoffice-commits mailing list