starmath/inc/node.hxx | 12 ++++++------ starmath/source/node.cxx | 37 +++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 24 deletions(-)
New commits: commit 0d2e083fed20e4f0c263e2373aeee83bc7cee9cd Author: Takeshi Abe <t...@fixedpoint.jp> Date: Fri Dec 2 18:53:04 2016 +0900 starmath: Prefix members of SmPolyLineNode etc. Change-Id: I6fa81689e14e605cd7449526e44245d4fdebb298 Reviewed-on: https://gerrit.libreoffice.org/31536 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Takeshi Abe <t...@fixedpoint.jp> diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index e3067b7..5215e71 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -328,7 +328,7 @@ public: */ class SmRectangleNode : public SmGraphicNode { - Size aToSize; + Size maToSize; public: explicit SmRectangleNode(const SmToken &rNodeToken) @@ -351,15 +351,15 @@ public: */ class SmPolyLineNode : public SmGraphicNode { - tools::Polygon aPoly; - Size aToSize; - long nWidth; + tools::Polygon maPoly; + Size maToSize; + long mnWidth; public: explicit SmPolyLineNode(const SmToken &rNodeToken); - long GetWidth() const { return nWidth; } - tools::Polygon &GetPolygon() { return aPoly; } + long GetWidth() const { return mnWidth; } + tools::Polygon &GetPolygon() { return maPoly; } virtual void AdaptToX(OutputDevice &rDev, sal_uLong nWidth) override; virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight) override; diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 023f523..0cbb60b 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -1918,23 +1918,24 @@ void SmFontNode::SetSizeParameter(const Fraction& rValue, FontSizeType eType) SmPolyLineNode::SmPolyLineNode(const SmToken &rNodeToken) -: SmGraphicNode(NPOLYLINE, rNodeToken) + : SmGraphicNode(NPOLYLINE, rNodeToken) + , maPoly(2) + , maToSize() + , mnWidth(0) { - aPoly.SetSize(2); - nWidth = 0; } void SmPolyLineNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong nNewWidth) { - aToSize.Width() = nNewWidth; + maToSize.Width() = nNewWidth; } void SmPolyLineNode::AdaptToY(OutputDevice &/*rDev*/, sal_uLong nNewHeight) { GetFont().FreezeBorderWidth(); - aToSize.Height() = nNewHeight; + maToSize.Height() = nNewHeight; } @@ -1949,13 +1950,13 @@ void SmPolyLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) long nBorderwidth = GetFont().GetBorderWidth(); // create polygon using both endpoints - OSL_ENSURE(aPoly.GetSize() == 2, "Sm : wrong number of points"); + assert(maPoly.GetSize() == 2); Point aPointA, aPointB; if (GetToken().eType == TWIDESLASH) { aPointA.X() = nBorderwidth; - aPointA.Y() = aToSize.Height() - nBorderwidth; - aPointB.X() = aToSize.Width() - nBorderwidth; + aPointA.Y() = maToSize.Height() - nBorderwidth; + aPointB.X() = maToSize.Width() - nBorderwidth; aPointB.Y() = nBorderwidth; } else @@ -1963,17 +1964,17 @@ void SmPolyLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) OSL_ENSURE(GetToken().eType == TWIDEBACKSLASH, "Sm : unexpected token"); aPointA.X() = aPointA.Y() = nBorderwidth; - aPointB.X() = aToSize.Width() - nBorderwidth; - aPointB.Y() = aToSize.Height() - nBorderwidth; + aPointB.X() = maToSize.Width() - nBorderwidth; + aPointB.Y() = maToSize.Height() - nBorderwidth; } - aPoly.SetPoint(aPointA, 0); - aPoly.SetPoint(aPointB, 1); + maPoly.SetPoint(aPointA, 0); + maPoly.SetPoint(aPointB, 1); long nThick = GetFont().GetFontSize().Height() * rFormat.GetDistance(DIS_STROKEWIDTH) / 100L; - nWidth = nThick + 2 * nBorderwidth; + mnWidth = nThick + 2 * nBorderwidth; - SmRect::operator = (SmRect(aToSize.Width(), aToSize.Height())); + SmRect::operator = (SmRect(maToSize.Width(), maToSize.Height())); } @@ -1998,22 +1999,22 @@ void SmRootSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight) void SmRectangleNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong nWidth) { - aToSize.Width() = nWidth; + maToSize.Width() = nWidth; } void SmRectangleNode::AdaptToY(OutputDevice &/*rDev*/, sal_uLong nHeight) { GetFont().FreezeBorderWidth(); - aToSize.Height() = nHeight; + maToSize.Height() = nHeight; } void SmRectangleNode::Arrange(OutputDevice &rDev, const SmFormat &/*rFormat*/) { long nFontHeight = GetFont().GetFontSize().Height(); - long nWidth = aToSize.Width(), - nHeight = aToSize.Height(); + long nWidth = maToSize.Width(), + nHeight = maToSize.Height(); if (nHeight == 0) nHeight = nFontHeight / 30; if (nWidth == 0) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits