summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-02-26 13:00:57 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-02-26 14:06:24 +0100
commit6ee7900b587d4cba6f6a07548f96adcc42f64eaf (patch)
tree9438e06716069fdfb5d59c4b67a8d825d9aa4cee
parent6ce7808d586bcfb442160d58f4ce5b55d53067b2 (diff)
more constness
Change-Id: I5bbddaebb6cf820afced89e634814f485ec38859
-rw-r--r--sw/source/core/frmedt/fetab.cxx17
1 files changed, 6 insertions, 11 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 73d086204110..f38502cd53a6 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -83,20 +83,15 @@ const SwFrm *pRowCacheLastCellFrm = 0;
class TblWait
{
- ::std::unique_ptr<SwWait> m_pWait;
+ const ::std::unique_ptr<SwWait> m_pWait;
+ bool ShouldWait(size_t nCnt, SwFrm *pFrm, size_t nCnt2)
+ { return 20 < nCnt || 20 < nCnt2 || (pFrm && 20 < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().size()); }
public:
- TblWait(size_t nCnt, SwFrm *pFrm, SwDocShell &rDocShell, size_t nCnt2 = 0);
+ TblWait(size_t nCnt, SwFrm *pFrm, SwDocShell &rDocShell, size_t nCnt2 = 0)
+ : m_pWait( ShouldWait(nCnt, pFrm, nCnt2) ? ::std::unique_ptr<SwWait>(new SwWait( rDocShell, true )) : nullptr )
+ { }
};
-TblWait::TblWait(size_t const nCnt, SwFrm *pFrm, SwDocShell &rDocShell, size_t const nCnt2):
- m_pWait( nullptr )
-{
- const bool bWait = 20 < nCnt || 20 < nCnt2 || (pFrm &&
- 20 < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().size());
- if( bWait )
- m_pWait = ::std::unique_ptr<SwWait>(new SwWait( rDocShell, true ));
-}
-
void SwFEShell::ParkCursorInTab()
{
SwCursor * pSwCrsr = GetSwCrsr();