summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-11-20 19:35:18 +0900
committerNoel Grandin <noelgrandin@gmail.com>2015-11-26 06:46:38 +0000
commitb2b4184edb388c72ef9e68e7bcd974a3d538a152 (patch)
tree403792473dee7d413a2ab8aa0e82758c58936fa4 /starmath
parent97978f7f015e042e72ec2bf0f3ba1652ecbcc5c5 (diff)
starmath: Prefix members of SmCaretDrawingVisitor
Change-Id: I9d033a67f6073f3da368f8241ac48c7d391b89c9 Reviewed-on: https://gerrit.libreoffice.org/20080 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/visitors.hxx8
-rw-r--r--starmath/source/visitors.cxx52
2 files changed, 30 insertions, 30 deletions
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index b1eeddc74bc0..8ae394ee3faf 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -117,11 +117,11 @@ public:
void Visit( SmTextNode* pNode ) override;
using SmDefaultingVisitor::Visit;
private:
- OutputDevice &rDev;
- SmCaretPos pos;
+ OutputDevice &mrDev;
+ SmCaretPos maPos;
/** Offset to draw from */
- Point Offset;
- bool isCaretVisible;
+ Point maOffset;
+ bool mbCaretVisible;
protected:
/** Default method for drawing pNodes */
void DefaultVisit( SmNode* pNode ) override;
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 640c1e2a75b7..bdde37eb4e05 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -166,83 +166,83 @@ SmCaretDrawingVisitor::SmCaretDrawingVisitor( OutputDevice& rDevice,
SmCaretPos position,
Point offset,
bool caretVisible )
- : rDev( rDevice )
+ : mrDev( rDevice )
+ , maPos( position )
+ , maOffset( offset )
+ , mbCaretVisible( caretVisible )
{
- pos = position;
- Offset = offset;
- isCaretVisible = caretVisible;
SAL_WARN_IF( !position.IsValid(), "starmath", "Cannot draw invalid position!" );
if( !position.IsValid( ) )
return;
//Save device state
- rDev.Push( PushFlags::FONT | PushFlags::MAPMODE | PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR );
+ mrDev.Push( PushFlags::FONT | PushFlags::MAPMODE | PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR );
- pos.pSelectedNode->Accept( this );
+ maPos.pSelectedNode->Accept( this );
//Restore device state
- rDev.Pop( );
+ mrDev.Pop( );
}
void SmCaretDrawingVisitor::Visit( SmTextNode* pNode )
{
- long i = pos.Index;
+ long i = maPos.Index;
- rDev.SetFont( pNode->GetFont( ) );
+ mrDev.SetFont( pNode->GetFont( ) );
//Find the line
SmNode* pLine = SmCursor::FindTopMostNodeInLine( pNode );
//Find coordinates
- long left = pNode->GetLeft( ) + rDev.GetTextWidth( pNode->GetText( ), 0, i ) + Offset.X( );
- long top = pLine->GetTop( ) + Offset.Y( );
+ long left = pNode->GetLeft( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, i ) + maOffset.X( );
+ long top = pLine->GetTop( ) + maOffset.Y( );
long height = pLine->GetHeight( );
- long left_line = pLine->GetLeft( ) + Offset.X( );
- long right_line = pLine->GetRight( ) + Offset.X( );
+ long left_line = pLine->GetLeft( ) + maOffset.X( );
+ long right_line = pLine->GetRight( ) + maOffset.X( );
//Set color
- rDev.SetLineColor( Color( COL_BLACK ) );
+ mrDev.SetLineColor( Color( COL_BLACK ) );
- if ( isCaretVisible ) {
+ if ( mbCaretVisible ) {
//Draw vertical line
Point p1( left, top );
Point p2( left, top + height );
- rDev.DrawLine( p1, p2 );
+ mrDev.DrawLine( p1, p2 );
}
//Underline the line
Point pLeft( left_line, top + height );
Point pRight( right_line, top + height );
- rDev.DrawLine( pLeft, pRight );
+ mrDev.DrawLine( pLeft, pRight );
}
void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
{
- rDev.SetLineColor( Color( COL_BLACK ) );
+ mrDev.SetLineColor( Color( COL_BLACK ) );
//Find the line
SmNode* pLine = SmCursor::FindTopMostNodeInLine( pNode );
//Find coordinates
- long left = pNode->GetLeft( ) + Offset.X( ) + ( pos.Index == 1 ? pNode->GetWidth( ) : 0 );
- long top = pLine->GetTop( ) + Offset.Y( );
+ long left = pNode->GetLeft( ) + maOffset.X( ) + ( maPos.Index == 1 ? pNode->GetWidth( ) : 0 );
+ long top = pLine->GetTop( ) + maOffset.Y( );
long height = pLine->GetHeight( );
- long left_line = pLine->GetLeft( ) + Offset.X( );
- long right_line = pLine->GetRight( ) + Offset.X( );
+ long left_line = pLine->GetLeft( ) + maOffset.X( );
+ long right_line = pLine->GetRight( ) + maOffset.X( );
//Set color
- rDev.SetLineColor( Color( COL_BLACK ) );
+ mrDev.SetLineColor( Color( COL_BLACK ) );
- if ( isCaretVisible ) {
+ if ( mbCaretVisible ) {
//Draw vertical line
Point p1( left, top );
Point p2( left, top + height );
- rDev.DrawLine( p1, p2 );
+ mrDev.DrawLine( p1, p2 );
}
//Underline the line
Point pLeft( left_line, top + height );
Point pRight( right_line, top + height );
- rDev.DrawLine( pLeft, pRight );
+ mrDev.DrawLine( pLeft, pRight );
}
// SmCaretPos2LineVisitor