diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 11:11:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 12:27:10 +0000 |
commit | 0d33c2884f7b02e9e754d2754a45ab29ad63ddf6 (patch) | |
tree | 62d2c7a3dbd879472bd6dc9ee2923d0af2719d97 /sw/source/core/layout | |
parent | f05da45c9c69e66cd5f26fc02c950ccf0c0b946d (diff) |
two methods with the same name that do slightly different things
depending on constness is a little worrying, lets just use different
names
Change-Id: I3e7ca96c8c7dc8d58a7415d39b937984961aa619
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/sectfrm.cxx | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 2ac5a3f12586..9469f2abe40c 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -664,7 +664,7 @@ size_t SwPageFrm::GetContentHeight(const long nTop, const long nBottom) const else if (pCnt->IsSctFrm()) { // Grow if undersized, but don't shrink if oversized. - const auto delta = static_cast<const SwSectionFrm*>(pCnt)->Undersize(); + const auto delta = static_cast<const SwSectionFrm*>(pCnt)->CalcUndersize(); if (delta > 0) nTmp += delta; } diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 1b3e9dd87077..00ffaec8a6f5 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -2492,7 +2492,7 @@ void SwSectionFrm::InvalidateFootnotePos() } } -SwTwips SwSectionFrm::Undersize() const +SwTwips SwSectionFrm::CalcUndersize() const { SWRECTFN(this); return InnerHeight() - (Prt().*fnRect->fnGetHeight)(); @@ -2500,8 +2500,7 @@ SwTwips SwSectionFrm::Undersize() const SwTwips SwSectionFrm::Undersize(bool bOverSize) { - SWRECTFN(this); - const auto nRet = InnerHeight() - (Prt().*fnRect->fnGetHeight)(); + const auto nRet = CalcUndersize(); m_bUndersized = (nRet > 0); return (nRet <= 0 && !bOverSize) ? 0 : nRet; } |