From a5e9c5e35010bcde8cdfe8f82f880a7e159ee8ca Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 1 Jan 2017 07:38:33 +0900 Subject: starmath: Prefix members of SmSelectionDrawingVisitor Change-Id: I889da35c24919157e5b01225df10947c790ebf66 Reviewed-on: https://gerrit.libreoffice.org/32547 Tested-by: Jenkins Reviewed-by: Julien Nabet --- starmath/inc/visitors.hxx | 6 +++--- starmath/source/visitors.cxx | 38 +++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx index 6b2f63a155d2..622a74ebc773 100644 --- a/starmath/inc/visitors.hxx +++ b/starmath/inc/visitors.hxx @@ -388,11 +388,11 @@ public: using SmDefaultingVisitor::Visit; private: /** Reference to drawing device */ - OutputDevice& rDev; + OutputDevice& mrDev; /** True if aSelectionArea have been initialized */ - bool bHasSelectionArea; + bool mbHasSelectionArea; /** The current area that is selected */ - Rectangle aSelectionArea; + Rectangle maSelectionArea; /** Extend the area that must be selected */ void ExtendSelectionArea(const Rectangle& rArea); /** Default visiting method */ diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 4679e67a408f..90ce467c6d79 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -1840,39 +1840,39 @@ void SmCloningVisitor::Visit( SmVerticalBraceNode* pNode ) // SmSelectionDrawingVisitor SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, const Point& rOffset ) - : rDev( rDevice ) { - bHasSelectionArea = false; - + : mrDev( rDevice ) + , mbHasSelectionArea( false ) +{ //Visit everything SAL_WARN_IF( !pTree, "starmath", "pTree can't be null!" ); if( pTree ) pTree->Accept( this ); //Draw selection if there's any - if( bHasSelectionArea ){ - aSelectionArea.Move( rOffset.X( ), rOffset.Y( ) ); + if( mbHasSelectionArea ){ + maSelectionArea.Move( rOffset.X( ), rOffset.Y( ) ); //Save device state - rDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR ); + mrDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR ); //Change colors - rDev.SetLineColor( ); - rDev.SetFillColor( Color( COL_LIGHTGRAY ) ); + mrDev.SetLineColor( ); + mrDev.SetFillColor( Color( COL_LIGHTGRAY ) ); //Draw rectangle - rDev.DrawRect( aSelectionArea ); + mrDev.DrawRect( maSelectionArea ); //Restore device state - rDev.Pop( ); + mrDev.Pop( ); } } void SmSelectionDrawingVisitor::ExtendSelectionArea(const Rectangle& rArea) { - if ( ! bHasSelectionArea ) { - aSelectionArea = rArea; - bHasSelectionArea = true; + if ( ! mbHasSelectionArea ) { + maSelectionArea = rArea; + mbHasSelectionArea = true; } else - aSelectionArea.Union(rArea); + maSelectionArea.Union(rArea); } void SmSelectionDrawingVisitor::DefaultVisit( SmNode* pNode ) @@ -1897,19 +1897,19 @@ void SmSelectionDrawingVisitor::VisitChildren( SmNode* pNode ) void SmSelectionDrawingVisitor::Visit( SmTextNode* pNode ) { if( pNode->IsSelected( ) ){ - rDev.Push( PushFlags::TEXTCOLOR | PushFlags::FONT ); + mrDev.Push( PushFlags::TEXTCOLOR | PushFlags::FONT ); - rDev.SetFont( pNode->GetFont( ) ); + mrDev.SetFont( pNode->GetFont( ) ); Point Position = pNode->GetTopLeft( ); - long left = Position.getX( ) + rDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionStart( ) ); - long right = Position.getX( ) + rDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionEnd( ) ); + long left = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionStart( ) ); + long right = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionEnd( ) ); long top = Position.getY( ); long bottom = top + pNode->GetHeight( ); Rectangle rect( left, top, right, bottom ); ExtendSelectionArea( rect ); - rDev.Pop( ); + mrDev.Pop( ); } } -- cgit