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

Takeshi Abe tabe at fixedpoint.jp
Thu Nov 24 14:30:32 UTC 2016


 starmath/inc/node.hxx    |   14 +++++++-------
 starmath/source/node.cxx |   12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 32cbe7125387397bf269fb6ca83c11cf66f9d543
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Nov 24 19:08:26 2016 +0900

    starmath: Prefix members of SmFontNode
    
    Also, make SmFontSize::GetSizeType() return value, not reference.
    
    Change-Id: Ifec68cfbdd5f05396fb0d913ddd6888749fdcfbd
    Reviewed-on: https://gerrit.libreoffice.org/31157
    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 29c9ccb..ff842f5 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -1062,20 +1062,20 @@ public:
  */
 class SmFontNode : public SmStructureNode
 {
-    FontSizeType nSizeType;
-    Fraction    aFontSize;
+    FontSizeType meSizeType;
+    Fraction     maFontSize;
 
 public:
     explicit SmFontNode(const SmToken &rNodeToken)
-    :   SmStructureNode(NFONT, rNodeToken)
+        : SmStructureNode(NFONT, rNodeToken)
+        , meSizeType(FontSizeType::MULTIPLY)
+        , maFontSize(1)
     {
-        nSizeType = FontSizeType::MULTIPLY;
-        aFontSize = Fraction(1L);
     }
 
     void SetSizeParameter(const Fraction &rValue, FontSizeType nType);
-    const Fraction & GetSizeParameter() const {return aFontSize;}
-    const FontSizeType& GetSizeType() const {return nSizeType;}
+    const Fraction & GetSizeParameter() const {return maFontSize;}
+    FontSizeType GetSizeType() const {return meSizeType;}
 
     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 f650108..47a6207 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1737,7 +1737,7 @@ void SmFontNode::CreateTextFromNode(OUString &rText)
         case TSIZE:
             {
                 rText += "size ";
-                switch (nSizeType)
+                switch (meSizeType)
                 {
                     case FontSizeType::PLUS:
                         rText += "+";
@@ -1756,7 +1756,7 @@ void SmFontNode::CreateTextFromNode(OUString &rText)
                         break;
                 }
                 rText += ::rtl::math::doubleToUString(
-                            static_cast<double>(aFontSize),
+                            static_cast<double>(maFontSize),
                             rtl_math_StringFormat_Automatic,
                             rtl_math_DecimalPlaces_Max, '.', true);
                 rText += " ";
@@ -1863,7 +1863,7 @@ void SmFontNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
 
     switch (GetToken().eType)
     {   case TSIZE :
-            pNode->SetFontSize(aFontSize, nSizeType);
+            pNode->SetFontSize(maFontSize, meSizeType);
             break;
         case TSANS :
         case TSERIF :
@@ -1907,10 +1907,10 @@ void SmFontNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
 }
 
 
-void SmFontNode::SetSizeParameter(const Fraction& rValue, FontSizeType Type)
+void SmFontNode::SetSizeParameter(const Fraction& rValue, FontSizeType eType)
 {
-    nSizeType = Type;
-    aFontSize = rValue;
+    meSizeType = eType;
+    maFontSize = rValue;
 }
 
 


More information about the Libreoffice-commits mailing list