diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-11-24 19:08:26 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-11-24 14:30:05 +0000 |
commit | 32cbe7125387397bf269fb6ca83c11cf66f9d543 (patch) | |
tree | 5bde84c653c93237fcd18a8d3b9d0d82ddea3d34 | |
parent | 9691cea443a74885b3f81c602efdd3345de1e3f9 (diff) |
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@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
-rw-r--r-- | starmath/inc/node.hxx | 14 | ||||
-rw-r--r-- | starmath/source/node.cxx | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 29c9ccb5556d..ff842f58820f 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 f650108664ab..47a6207e7667 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; } |