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

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Wed Jun 15 07:35:22 PDT 2011


 sc/source/ui/view/gridwin.cxx  |    4 +---
 sc/source/ui/view/gridwin4.cxx |   18 ++++++++----------
 2 files changed, 9 insertions(+), 13 deletions(-)

New commits:
commit 5d58ee618c86ca0357c8354ce0993ab8e3417353
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Fri Jun 3 22:34:55 2011 -0430

    Remove rebundant check since we already know its in boundaries.

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 492e0a6..510ffb0 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4544,7 +4544,7 @@ sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner,
                 //	rueckwaerts suchen, damit der zuletzt gepaintete Rahmen gefunden wird
                 --i;
                 ScRangeFindData* pData = pRangeFinder->GetObject(i);
-                if ( pData && pData->aRef.In(aAddr) )
+                if ( pData->aRef.In(aAddr) )
                 {
                     if (pIndex)	*pIndex = i;
                     if (pAddX)	*pAddX = nPosX - pData->aRef.aStart.Col();
@@ -4708,8 +4708,6 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp )
     if (!pRangeFinder || nRFIndex >= pRangeFinder->Count())
         return;
     ScRangeFindData* pData = pRangeFinder->GetObject( nRFIndex );
-    if (!pData)
-        return;
 
     //	Mauszeiger
 
commit 8a564cdeac4d39b5e7de999cc03413648f052416
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Fri Jun 3 22:31:15 2011 -0430

    Remove rebundant check since we already know its in boundaries.

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9441425..5046c15 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -804,16 +804,14 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
             for (sal_uInt16 i=0; i<nCount; i++)
             {
                 ScRangeFindData* pData = pRangeFinder->GetObject(i);
-                if (pData)
-                {
-                    ScRange aRef = pData->aRef;
-                    aRef.Justify();
-                    if ( aRef.aStart.Tab() >= nTab && aRef.aEnd.Tab() <= nTab )
-                        aOutputData.DrawRefMark( aRef.aStart.Col(), aRef.aStart.Row(),
-                                                aRef.aEnd.Col(), aRef.aEnd.Row(),
-                                                Color( ScRangeFindList::GetColorName( i ) ),
-                                                sal_True );
-                }
+
+                ScRange aRef = pData->aRef;
+                aRef.Justify();
+                if ( aRef.aStart.Tab() >= nTab && aRef.aEnd.Tab() <= nTab )
+                    aOutputData.DrawRefMark( aRef.aStart.Col(), aRef.aStart.Row(),
+                                            aRef.aEnd.Col(), aRef.aEnd.Row(),
+                                            Color( ScRangeFindList::GetColorName( i ) ),
+                                            sal_True );
             }
         }
     }


More information about the Libreoffice-commits mailing list