[Libreoffice-commits] core.git: basctl/source

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Fri May 29 02:26:02 PDT 2015


 basctl/source/basicide/baside2.hxx  |    1 +
 basctl/source/basicide/baside2b.cxx |   25 ++++++++++++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

New commits:
commit 0af0211b0f81f91727c81df909c0b41cedc4b088
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri May 29 18:20:42 2015 +0900

    tdf#91484 fix macro editor - Invalidate in paint
    
    Change-Id: I787da9a665e54caea229def185076b29c00fd11e

diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index f3bbe8b..06390f2 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -179,6 +179,7 @@ private:
 protected:
     virtual void    Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
     BreakPoint*     FindBreakPoint( const Point& rMousePos );
+    void ShowMarker(vcl::RenderContext& rRenderContext);
     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     virtual void    Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
 
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 658b9b9..e931552 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1402,7 +1402,30 @@ void BreakPointWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle
         rRenderContext.DrawImage(Point(0, nY) + aBmpOff, aBrk[rBrk.bEnabled]);
     }
 
-    Invalidate();
+    ShowMarker(rRenderContext);
+}
+
+void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext)
+{
+    if (nMarkerPos == NoMarker)
+        return;
+
+    Size const aOutSz = GetOutputSize();
+    long const nLineHeight = GetTextHeight();
+
+    Image aMarker = GetImage(bErrorMarker ? IMGID_ERRORMARKER : IMGID_STEPMARKER);
+
+    Size aMarkerSz(aMarker.GetSizePixel());
+    aMarkerSz = rRenderContext.PixelToLogic(aMarkerSz);
+    Point aMarkerOff(0, 0);
+    aMarkerOff.X() = (aOutSz.Width() - aMarkerSz.Width()) / 2;
+    aMarkerOff.Y() = (nLineHeight - aMarkerSz.Height()) / 2;
+
+    sal_uLong nY = nMarkerPos * nLineHeight - nCurYOffset;
+    Point aPos(0, nY);
+    aPos += aMarkerOff;
+
+    rRenderContext.DrawImage(aPos, aMarker);
 }
 
 void BreakPointWindow::DoScroll( long nHorzScroll, long nVertScroll )


More information about the Libreoffice-commits mailing list