[Libreoffice-commits] core.git: include/svtools svtools/source

Rodolfo Ribeiro Gomes rodolforg at gmail.com
Wed Nov 20 03:32:22 PST 2013


 include/svtools/ruler.hxx        |    2 +-
 svtools/source/control/ruler.cxx |   24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 912d6d171603cdc68c600ab713e22eeca2c1f58a
Author: Rodolfo Ribeiro Gomes <rodolforg at gmail.com>
Date:   Mon Nov 18 01:30:49 2013 -0200

    fdo#65355 Ruler Comment control doesn't disappears
    
    ImplDraw() should not be directly called because it avoids
    overriden Paint() method.
    
    Change-Id: I0f0f6b4af231c1ea50a23fb96f3c9018b5ce2d31
    Signed-off-by: Rodolfo Ribeiro Gomes <rodolforg at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/6707
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index eff79e251..a6ae1e5 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -767,7 +767,7 @@ public:
     RulerSelection  GetHoverSelection() const { return maHoverSelection; }
 
     using Window::GetType;
-    RulerType       GetType( const Point& rPos, sal_uInt16* pAryPos = NULL ) const;
+    RulerType       GetType( const Point& rPos, sal_uInt16* pAryPos = NULL );
 
     void            SetNullOffset( long nPos );
     long            GetNullOffset() const;
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 5a0b32f..f6808a2 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1868,7 +1868,7 @@ void Ruler::ImplDrag( const Point& rPos )
             Drag();
 
             // and redraw
-            ImplDraw();
+            Paint(Rectangle());
 
             // reset the data as before cancel
             *mpDragData = aTempData;
@@ -1889,7 +1889,7 @@ void Ruler::ImplDrag( const Point& rPos )
 
         // redraw
         if ( mbFormat )
-            ImplDraw();
+            Paint(Rectangle());
     }
 
     mnDragScroll = 0;
@@ -1921,7 +1921,7 @@ void Ruler::ImplEndDrag()
     mnStartDragPos  = 0;
 
     // redraw
-    ImplDraw();
+    Paint(Rectangle());
 }
 
 IMPL_LINK_NOARG(Ruler, ImplUpdateHdl)
@@ -1932,7 +1932,7 @@ IMPL_LINK_NOARG(Ruler, ImplUpdateHdl)
     if ( mnUpdateFlags & RULER_UPDATE_DRAW )
     {
         mnUpdateFlags = 0;
-        ImplDraw();
+        Paint(Rectangle());
     }
     else if ( mnUpdateFlags & RULER_UPDATE_LINES )
     {
@@ -1954,7 +1954,7 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
         // update ruler
         if ( mbFormat )
         {
-            ImplDraw();
+            Paint(Rectangle());
             mnUpdateFlags &= ~RULER_UPDATE_DRAW;
         }
 
@@ -2062,7 +2062,7 @@ void Ruler::MouseMove( const MouseEvent& rMEvt )
 
     if ( mbFormat )
     {
-        ImplDraw();
+        Paint(Rectangle());
         mnUpdateFlags &= ~RULER_UPDATE_DRAW;
     }
     mpPreviousHitTest.swap(mpCurrentHitTest);
@@ -2189,7 +2189,7 @@ void Ruler::StateChanged( StateChangedType nType )
     else if ( nType == STATE_CHANGE_UPDATEMODE )
     {
         if ( IsReallyVisible() && IsUpdateMode() )
-            ImplDraw();
+            Paint(Rectangle());
     }
     else if ( (nType == STATE_CHANGE_ZOOM) ||
               (nType == STATE_CHANGE_CONTROLFONT) )
@@ -2291,7 +2291,7 @@ sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
         // update ruler
         if ( mbFormat )
         {
-            ImplDraw();
+            Paint(Rectangle());
             mnUpdateFlags &= ~RULER_UPDATE_DRAW;
         }
 
@@ -2350,15 +2350,15 @@ void Ruler::CancelDrag()
     }
 }
 
-RulerType Ruler::GetType( const Point& rPos, sal_uInt16* pAryPos ) const
+RulerType Ruler::GetType( const Point& rPos, sal_uInt16* pAryPos )
 {
     RulerSelection aHitTest;
 
     // update ruler
     if ( IsReallyVisible() && mbFormat )
     {
-        ((Ruler*)this)->ImplDraw();
-        ((Ruler*)this)->mnUpdateFlags &= ~RULER_UPDATE_DRAW;
+        Paint(Rectangle());
+        mnUpdateFlags &= ~RULER_UPDATE_DRAW;
     }
 
     ImplHitTest( rPos, &aHitTest );
@@ -2790,7 +2790,7 @@ RulerUnitData Ruler::GetCurrentRulerUnit() const
 void Ruler::DrawTicks()
 {
     mbFormat = sal_True;
-    ImplDraw();
+    Paint(Rectangle());
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list