summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-05-10 11:51:44 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-05-11 00:58:56 +0000
commitb871a97d35a4160b7403c07bfac10aaa744fbbfd (patch)
treed61ff39deee957245452aec006a0a30d7de32cac /starmath/source
parent750e39302ee9bc7e2583b8efbca79c25c93d0bff (diff)
starmath: Drop unused non-const variant of GetLeftMost
... resulting in one less const_cast. Change-Id: I3dad339f25524fc22e7a02b08ee7ec01b341e991 Reviewed-on: https://gerrit.libreoffice.org/24810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/node.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 1104196b099f..7f2b04d23268 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -93,12 +93,12 @@ SmNode * SmNode::GetSubNode(sal_uInt16 /*nIndex*/)
}
-SmNode * SmNode::GetLeftMost()
+const SmNode * SmNode::GetLeftMost() const
// returns leftmost node of current subtree.
//! (this assumes the one with index 0 is always the leftmost subnode
//! for the current node).
{
- SmNode *pNode = GetNumSubNodes() > 0 ?
+ const SmNode *pNode = GetNumSubNodes() > 0 ?
GetSubNode(0) : nullptr;
return pNode ? pNode->GetLeftMost() : this;
@@ -569,7 +569,7 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
}
}
-SmNode * SmTableNode::GetLeftMost()
+const SmNode * SmTableNode::GetLeftMost() const
{
return this;
}
@@ -660,7 +660,7 @@ void SmExpressionNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmLineNode::Arrange(rDev, rFormat);
// copy alignment of leftmost subnode if any
- SmNode *pNode = GetLeftMost();
+ const SmNode *pNode = GetLeftMost();
if (pNode)
SetRectHorAlign(pNode->GetRectHorAlign(), false);
}
@@ -965,7 +965,7 @@ void SmBinVerNode::CreateTextFromNode(OUString &rText)
}
-SmNode * SmBinVerNode::GetLeftMost()
+const SmNode * SmBinVerNode::GetLeftMost() const
{
return this;
}
@@ -2419,7 +2419,7 @@ void SmMatrixNode::SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols)
}
-SmNode * SmMatrixNode::GetLeftMost()
+const SmNode * SmMatrixNode::GetLeftMost() const
{
return this;
}