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

Takeshi Abe tabe at fixedpoint.jp
Sat Nov 12 03:35:37 UTC 2016


 starmath/inc/node.hxx            |   14 +++++++-------
 starmath/source/mathmlexport.cxx |    2 +-
 starmath/source/node.cxx         |    6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 18629fbb919608b4c1085e99631d5be83cf23e57
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Nov 12 11:43:28 2016 +0900

    starmath: Prefix member of SmBlankNode
    
    Change-Id: I20b9fa14d42549a3c5be8a7d4f52c85fcef52cf5

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 61a8c42..68f3704 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -1115,23 +1115,23 @@ public:
 
 /** Node for whitespace
  *
- * Used to implement the "~" command. This node is just a blank space.
+ * Used to implement the commands "~" and "`". This node is just a blank space.
  */
 class SmBlankNode : public SmGraphicNode
 {
-    sal_uInt16  nNum;
+    sal_uInt16 mnNum;
 
 public:
     explicit SmBlankNode(const SmToken &rNodeToken)
-    :   SmGraphicNode(NBLANK, rNodeToken)
+        : SmGraphicNode(NBLANK, rNodeToken)
+        , mnNum(0)
     {
-        nNum = 0;
     }
 
     void         IncreaseBy(const SmToken &rToken);
-    void         Clear() { nNum = 0; }
-    sal_uInt16       GetBlankNum() const { return nNum; }
-    void         SetBlankNum(sal_uInt16 nNumber) { nNum = nNumber; }
+    void         Clear() { mnNum = 0; }
+    sal_uInt16   GetBlankNum() const { return mnNum; }
+    void         SetBlankNum(sal_uInt16 nNumber) { mnNum = nNumber; }
 
     virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) override;
     virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 8a12511..c9a6ca8 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -877,7 +877,7 @@ void SmXMLExport::ExportBlank(const SmNode *pNode, int /*nLevel*/)
     {
         // Attach a width attribute. We choose the (somewhat arbitrary) values
         // ".5em" for a small gap '`' and "2em" for a large gap '~'.
-        // (see SmBlankNode::IncreaseBy for how pTemp->nNum is set).
+        // (see SmBlankNode::IncreaseBy for how pTemp->mnNum is set).
         OUStringBuffer sStrBuf;
         ::sax::Converter::convertDouble(sStrBuf, pTemp->GetBlankNum() * .5);
         sStrBuf.append("em");
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index e6ee883..febddc2 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2735,8 +2735,8 @@ void SmBlankNode::IncreaseBy(const SmToken &rToken)
 {
     switch(rToken.eType)
     {
-        case TBLANK:    nNum += 4;  break;
-        case TSBLANK:   nNum += 1;  break;
+        case TBLANK:  mnNum += 4; break;
+        case TSBLANK: mnNum += 1; break;
         default:
             break;
     }
@@ -2763,7 +2763,7 @@ void SmBlankNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
     // make distance depend on the font height
     // (so that it increases when scaling (e.g. size *2 {a ~ b})
     long  nDist  = GetFont().GetFontSize().Height() / 10L,
-          nSpace = nNum * nDist;
+          nSpace = mnNum * nDist;
 
     // get a SmRect with Baseline and all the bells and whistles
     SmRect::operator = (SmRect(aTmpDev, &rFormat, OUString(' '),


More information about the Libreoffice-commits mailing list