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

Takeshi Abe tabe at fixedpoint.jp
Wed Nov 30 01:13:18 UTC 2016


 starmath/inc/node.hxx    |   26 +++++++++++++-------------
 starmath/source/node.cxx |   24 ++++++++++++------------
 2 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit d53262282aed31819aa1ce9f608d5edba658dae4
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Nov 29 19:05:00 2016 +0900

    starmath: Prefix members of SmSpecialNode etc.
    
    Change-Id: I7a1ac67f5fb3066b16b59a3a8277952d66572fb6
    Reviewed-on: https://gerrit.libreoffice.org/31353
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 9ad19f1..52532c9 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -442,7 +442,7 @@ public:
  */
 class SmSpecialNode : public SmTextNode
 {
-    bool    bIsFromGreekSymbolSet;
+    bool mbIsFromGreekSymbolSet;
 
 protected:
     SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc);
@@ -528,16 +528,16 @@ public:
  */
 class SmRootSymbolNode : public SmMathSymbolNode
 {
-    sal_uLong  nBodyWidth;  // width of body (argument) of root sign
+    sal_uLong mnBodyWidth;  // width of body (argument) of root sign
 
 public:
     explicit SmRootSymbolNode(const SmToken &rNodeToken)
         : SmMathSymbolNode(NROOTSYMBOL, rNodeToken)
-        , nBodyWidth(0)
+        , mnBodyWidth(0)
     {
     }
 
-    sal_uLong GetBodyWidth() const {return nBodyWidth;};
+    sal_uLong GetBodyWidth() const {return mnBodyWidth;};
     virtual void AdaptToX(OutputDevice &rDev, sal_uLong nHeight) override;
     virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight) override;
 
@@ -595,11 +595,11 @@ public:
  */
 class SmTableNode : public SmStructureNode
 {
-    long nFormulaBaseline;
+    long mnFormulaBaseline;
 public:
     explicit SmTableNode(const SmToken &rNodeToken)
         :   SmStructureNode(NTABLE, rNodeToken)
-        , nFormulaBaseline(0)
+        , mnFormulaBaseline(0)
     {
     }
 
@@ -619,24 +619,24 @@ public:
  */
 class SmLineNode : public SmStructureNode
 {
-    bool  bUseExtraSpaces;
+    bool mbUseExtraSpaces;
 
 protected:
     SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken)
-    :   SmStructureNode(eNodeType, rNodeToken)
+        : SmStructureNode(eNodeType, rNodeToken)
+        , mbUseExtraSpaces(true)
     {
-        bUseExtraSpaces = true;
     }
 
 public:
     explicit SmLineNode(const SmToken &rNodeToken)
-    :   SmStructureNode(NLINE, rNodeToken)
+        : SmStructureNode(NLINE, rNodeToken)
+        , mbUseExtraSpaces(true)
     {
-        bUseExtraSpaces = true;
     }
 
-    void  SetUseExtraSpaces(bool bVal) { bUseExtraSpaces = bVal; }
-    bool  IsUseExtraSpaces() const { return bUseExtraSpaces; };
+    void  SetUseExtraSpaces(bool bVal) { mbUseExtraSpaces = bVal; }
+    bool  IsUseExtraSpaces() const { return mbUseExtraSpaces; };
 
     virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) override;
     virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 11ff7bc..4ca990f 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -526,7 +526,7 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
     }
     // #i972#
     if (HasBaseline())
-        nFormulaBaseline = GetBaseline();
+        mnFormulaBaseline = GetBaseline();
     else
     {
         SmTmpDevice aTmpDev (rDev, true);
@@ -534,10 +534,10 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
 
         SmRect aRect = (SmRect(aTmpDev, &rFormat, OUString("a"),
                                GetFont().GetBorderWidth()));
-        nFormulaBaseline = GetAlignM();
+        mnFormulaBaseline = GetAlignM();
         // move from middle position by constant - distance
         // between middle and baseline for single letter
-        nFormulaBaseline += aRect.GetBaseline() - aRect.GetAlignM();
+        mnFormulaBaseline += aRect.GetBaseline() - aRect.GetAlignM();
     }
 }
 
@@ -549,7 +549,7 @@ const SmNode * SmTableNode::GetLeftMost() const
 
 long SmTableNode::GetFormulaBaseline() const
 {
-    return nFormulaBaseline;
+    return mnFormulaBaseline;
 }
 
 
@@ -1981,7 +1981,7 @@ void SmPolyLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
 
 void SmRootSymbolNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong nWidth)
 {
-    nBodyWidth = nWidth;
+    mnBodyWidth = nWidth;
 }
 
 
@@ -2582,17 +2582,17 @@ static bool lcl_IsFromGreekSymbolSet( const OUString &rTokenText )
 }
 
 
-SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc) :
-    SmTextNode(eNodeType, rNodeToken, _nFontDesc)
+SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc)
+    : SmTextNode(eNodeType, rNodeToken, _nFontDesc)
+    , mbIsFromGreekSymbolSet(lcl_IsFromGreekSymbolSet( rNodeToken.aText ))
 {
-    bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
 }
 
 
-SmSpecialNode::SmSpecialNode(const SmToken &rNodeToken) :
-    SmTextNode(NSPECIAL, rNodeToken, FNT_MATH)  // default Font isn't always correct!
+SmSpecialNode::SmSpecialNode(const SmToken &rNodeToken)
+    : SmTextNode(NSPECIAL, rNodeToken, FNT_MATH)  // default Font isn't always correct!
+    , mbIsFromGreekSymbolSet(lcl_IsFromGreekSymbolSet( rNodeToken.aText ))
 {
-    bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
 }
 
 
@@ -2631,7 +2631,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
 
     Flags() |= FontChangeMask::Face;
 
-    if (bIsFromGreekSymbolSet)
+    if (mbIsFromGreekSymbolSet)
     {
         OSL_ENSURE( GetText().getLength() == 1, "a symbol should only consist of 1 char!" );
         bool bItalic = false;


More information about the Libreoffice-commits mailing list