summaryrefslogtreecommitdiffstats
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-12-02 18:53:04 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-12-03 11:41:32 +0000
commit0d2e083fed20e4f0c263e2373aeee83bc7cee9cd (patch)
tree7b0225da3fb2c94703e9e498b3882e3b93bd290f /starmath
parentadd the SalAbort message to the crash reporter (diff)
downloadcore-0d2e083fed20e4f0c263e2373aeee83bc7cee9cd.tar.gz
core-0d2e083fed20e4f0c263e2373aeee83bc7cee9cd.zip
starmath: Prefix members of SmPolyLineNode etc.
Change-Id: I6fa81689e14e605cd7449526e44245d4fdebb298 Reviewed-on: https://gerrit.libreoffice.org/31536 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/node.hxx12
-rw-r--r--starmath/source/node.cxx37
2 files changed, 25 insertions, 24 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index e3067b7d9203..5215e711998c 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 023f5237edd7..0cbb60b3f206 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)