[Libreoffice-commits] core.git: starmath/inc starmath/source

Takeshi Abe tabe at fixedpoint.jp
Mon Sep 5 20:21:41 UTC 2016


 starmath/inc/visitors.hxx    |    2 +-
 starmath/source/visitors.cxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d3035126aa8d35130a12263d052c3360a1e57cc5
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Sep 4 20:19:32 2016 +0900

    starmath: Pass offset by const ref
    
    Change-Id: Ideb32c7c5d43ff8d1ed9882c4c2654bec5239267
    Reviewed-on: https://gerrit.libreoffice.org/28664
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index a80a6f6..3a1a0c0 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -390,7 +390,7 @@ class SmSelectionDrawingVisitor : public SmDefaultingVisitor
 {
 public:
     /** Draws a selection on rDevice for the selection on pTree */
-    SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, Point Offset );
+    SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, const Point& rOffset );
     virtual ~SmSelectionDrawingVisitor() {}
     void Visit( SmTextNode* pNode ) override;
     using SmDefaultingVisitor::Visit;
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 19a244f9..ecedac1 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -1901,7 +1901,7 @@ void SmCloningVisitor::Visit( SmVerticalBraceNode* pNode )
 
 // SmSelectionDrawingVisitor
 
-SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, Point Offset )
+SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, const Point& rOffset )
     : rDev( rDevice ) {
     bHasSelectionArea = false;
 
@@ -1912,7 +1912,7 @@ SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmN
 
     //Draw selection if there's any
     if( bHasSelectionArea ){
-        aSelectionArea.Move( Offset.X( ), Offset.Y( ) );
+        aSelectionArea.Move( rOffset.X( ), rOffset.Y( ) );
 
         //Save device state
         rDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );


More information about the Libreoffice-commits mailing list