[Libreoffice-commits] core.git: starmath/inc starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Sun Jan 1 16:56:20 UTC 2017
starmath/inc/visitors.hxx | 6 +++---
starmath/source/visitors.cxx | 38 +++++++++++++++++++-------------------
2 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit a5e9c5e35010bcde8cdfe8f82f880a7e159ee8ca
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Sun Jan 1 07:38:33 2017 +0900
starmath: Prefix members of SmSelectionDrawingVisitor
Change-Id: I889da35c24919157e5b01225df10947c790ebf66
Reviewed-on: https://gerrit.libreoffice.org/32547
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index 6b2f63a..622a74e 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 4679e67..90ce467 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( );
}
}
More information about the Libreoffice-commits
mailing list