diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-10-09 18:34:22 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-09 13:55:11 +0000 |
commit | 4850edd31afa16401ac7c94d8bd1b02525fbe718 (patch) | |
tree | 9f863ba828488bf4ee2db002d8f3953fdbead7c0 /starmath | |
parent | 9ed4ad81adbcab21bd06c9d531921ab0e36dad3f (diff) |
starmath: Prefix members of SmNode
Change-Id: I2658b8fc9d36fe92dd91e0f5adc27612ce1dc438
Reviewed-on: https://gerrit.libreoffice.org/19268
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/node.hxx | 60 | ||||
-rw-r--r-- | starmath/source/node.cxx | 44 |
2 files changed, 52 insertions, 52 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 3ea66948dd23..28e419e587ce 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -91,22 +91,22 @@ enum SmNodeType class SmNode : public SmRect { - SmFace aFace; + SmFace maFace; - SmToken aNodeToken; - SmNodeType eType; - SmScaleMode eScaleMode; - RectHorAlign eRectHorAlign; - sal_uInt16 nFlags, - nAttributes; - bool bIsPhantom; - bool bIsSelected; + SmToken maNodeToken; + SmNodeType meType; + SmScaleMode meScaleMode; + RectHorAlign meRectHorAlign; + sal_uInt16 mnFlags, + mnAttributes; + bool mbIsPhantom; + bool mbIsSelected; protected: SmNode(SmNodeType eNodeType, const SmToken &rNodeToken); // index in accessible text -1 if not (yet) applicable - sal_Int32 nAccIndex; + sal_Int32 mnAccIndex; public: virtual ~SmNode(); @@ -126,18 +126,18 @@ public: return const_cast<SmNode *>(this)->GetLeftMost(); } - sal_uInt16 & Flags() { return nFlags; } - sal_uInt16 & Attributes() { return nAttributes; } + sal_uInt16 & Flags() { return mnFlags; } + sal_uInt16 & Attributes() { return mnAttributes; } - bool IsPhantom() const { return bIsPhantom; } + bool IsPhantom() const { return mbIsPhantom; } void SetPhantom(bool bIsPhantom); void SetColor(const Color &rColor); void SetAttribut(sal_uInt16 nAttrib); void ClearAttribut(sal_uInt16 nAttrib); - const SmFace & GetFont() const { return aFace; }; - SmFace & GetFont() { return aFace; }; + const SmFace & GetFont() const { return maFace; }; + SmFace & GetFont() { return maFace; }; void SetFont(const SmFace &rFace); void SetFontSize(const Fraction &rRelSize, FontSizeType nType); @@ -149,7 +149,7 @@ public: sal_uInt16 FindIndex() const; void SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree = true ); - RectHorAlign GetRectHorAlign() const { return eRectHorAlign; } + RectHorAlign GetRectHorAlign() const { return meRectHorAlign; } const SmRect & GetRect() const { return *this; } SmRect & GetRect() { return *this; } @@ -160,20 +160,20 @@ public: virtual void CreateTextFromNode(OUString &rText); virtual void GetAccessibleText( OUStringBuffer &rText ) const; - sal_Int32 GetAccessibleIndex() const { return nAccIndex; } + sal_Int32 GetAccessibleIndex() const { return mnAccIndex; } const SmNode * FindNodeWithAccessibleIndex(sal_Int32 nAccIndex) const; - sal_uInt16 GetRow() const { return (sal_uInt16)aNodeToken.nRow; } - sal_uInt16 GetColumn() const { return (sal_uInt16)aNodeToken.nCol; } + sal_uInt16 GetRow() const { return (sal_uInt16)maNodeToken.nRow; } + sal_uInt16 GetColumn() const { return (sal_uInt16)maNodeToken.nCol; } - SmScaleMode GetScaleMode() const { return eScaleMode; } - void SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; } + SmScaleMode GetScaleMode() const { return meScaleMode; } + void SetScaleMode(SmScaleMode eMode) { meScaleMode = eMode; } virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth); virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight); - SmNodeType GetType() const { return eType; } - const SmToken & GetToken() const { return aNodeToken; } + SmNodeType GetType() const { return meType; } + const SmToken & GetToken() const { return maNodeToken; } const SmNode * FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const; const SmNode * FindRectClosestTo(const Point &rPoint) const; @@ -186,8 +186,8 @@ public: virtual void Accept(SmVisitor* pVisitor); /** True if this node is selected */ - bool IsSelected() const {return bIsSelected;} - void SetSelected(bool Selected = true) {bIsSelected = Selected;} + bool IsSelected() const {return mbIsSelected;} + void SetSelected(bool Selected = true) {mbIsSelected = Selected;} #ifdef DEBUG_ENABLE_DUMPASDOT /** The tree as dot graph for graphviz, usable for debugging @@ -200,11 +200,11 @@ public: #endif /* DEBUG_ENABLE_DUMPASDOT */ /** Get the parent node of this node */ - SmStructureNode* GetParent(){ return aParentNode; } - const SmStructureNode* GetParent() const { return aParentNode; } + SmStructureNode* GetParent(){ return mpParentNode; } + const SmStructureNode* GetParent() const { return mpParentNode; } /** Set the parent node */ void SetParent(SmStructureNode* parent){ - aParentNode = parent; + mpParentNode = parent; } /** Get the index of a child node @@ -220,11 +220,11 @@ public: } /** Set the token for this node */ void SetToken(SmToken& token){ - aNodeToken = token; + maNodeToken = token; } private: - SmStructureNode* aParentNode; + SmStructureNode* mpParentNode; }; diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 74e5137aaaba..aed9dc5585ba 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -55,16 +55,16 @@ void ForEachNonNull(SmNode *pNode, F && f) } SmNode::SmNode(SmNodeType eNodeType, const SmToken &rNodeToken) - : aNodeToken( rNodeToken ) - , eType( eNodeType ) - , eScaleMode( SCALE_NONE ) - , eRectHorAlign( RHA_LEFT ) - , nFlags( 0 ) - , nAttributes( 0 ) - , bIsPhantom( false ) - , bIsSelected( false ) - , nAccIndex( -1 ) - , aParentNode( NULL ) + : maNodeToken( rNodeToken ) + , meType( eNodeType ) + , meScaleMode( SCALE_NONE ) + , meRectHorAlign( RHA_LEFT ) + , mnFlags( 0 ) + , mnAttributes( 0 ) + , mbIsPhantom( false ) + , mbIsSelected( false ) + , mnAccIndex( -1 ) + , mpParentNode( nullptr ) { } @@ -107,9 +107,9 @@ SmNode * SmNode::GetLeftMost() void SmNode::SetPhantom(bool bIsPhantomP) { if (! (Flags() & FLG_VISIBLE)) - bIsPhantom = bIsPhantomP; + mbIsPhantom = bIsPhantomP; - bool b = bIsPhantom; + bool b = mbIsPhantom; ForEachNonNull(this, [b](SmNode *pNode){pNode->SetPhantom(b);}); } @@ -130,7 +130,7 @@ void SmNode::SetAttribut(sal_uInt16 nAttrib) (nAttrib == ATTR_ITALIC && !(Flags() & FLG_ITALIC)) ) { - nAttributes |= nAttrib; + mnAttributes |= nAttrib; } ForEachNonNull(this, [nAttrib](SmNode *pNode){pNode->SetAttribut(nAttrib);}); @@ -144,7 +144,7 @@ void SmNode::ClearAttribut(sal_uInt16 nAttrib) (nAttrib == ATTR_ITALIC && !(Flags() & FLG_ITALIC)) ) { - nAttributes &= ~nAttrib; + mnAttributes &= ~nAttrib; } ForEachNonNull(this, [nAttrib](SmNode *pNode){pNode->ClearAttribut(nAttrib);}); @@ -222,7 +222,7 @@ void SmNode::SetSize(const Fraction &rSize) void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree ) { if (!(Flags() & FLG_HORALIGN)) - eRectHorAlign = eHorAlign; + meRectHorAlign = eHorAlign; if (bApplyToSubTree) ForEachNonNull(this, [eHorAlign](SmNode *pNode){pNode->SetRectHorAlign(eHorAlign);}); @@ -238,14 +238,14 @@ void SmNode::PrepareAttributes() void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) { - bIsPhantom = false; - nFlags = 0; - nAttributes = 0; + mbIsPhantom = false; + mnFlags = 0; + mnAttributes = 0; switch (rFormat.GetHorAlign()) - { case AlignLeft: eRectHorAlign = RHA_LEFT; break; - case AlignCenter: eRectHorAlign = RHA_CENTER; break; - case AlignRight: eRectHorAlign = RHA_RIGHT; break; + { case AlignLeft: meRectHorAlign = RHA_LEFT; break; + case AlignCenter: meRectHorAlign = RHA_CENTER; break; + case AlignRight: meRectHorAlign = RHA_RIGHT; break; } GetFont() = rFormat.GetFont(FNT_MATH); @@ -617,7 +617,7 @@ void SmStructureNode::GetAccessibleText( OUStringBuffer &rText ) const if (pNode) { if (pNode->IsVisible()) - static_cast<SmStructureNode *>(pNode)->nAccIndex = rText.getLength(); + static_cast<SmStructureNode *>(pNode)->mnAccIndex = rText.getLength(); pNode->GetAccessibleText( rText ); } } |