summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-02-26 13:05:53 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-02-26 14:06:25 +0100
commit530d3c92bd79f3c0e8d646e48a2eff1dae2921da (patch)
treeb14329b8ce6f319778a893018887b5da4e0c4c84
parent6ee7900b587d4cba6f6a07548f96adcc42f64eaf (diff)
make arbitrary number a constant and add comment on fishiness
Change-Id: I65baf9e4583c78ca3128352112fdeeffce3b3225
-rw-r--r--sw/source/core/frmedt/fetab.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index f38502cd53a6..3d94e391d30d 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -84,8 +84,10 @@ const SwFrm *pRowCacheLastCellFrm = 0;
class TblWait
{
const ::std::unique_ptr<SwWait> m_pWait;
+ // this seems really fishy: do some locking, if an arbitrary number of lines is exceeded
+ static const size_t our_kLineLimit = 20;
bool ShouldWait(size_t nCnt, SwFrm *pFrm, size_t nCnt2)
- { return 20 < nCnt || 20 < nCnt2 || (pFrm && 20 < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().size()); }
+ { return our_kLineLimit < nCnt || our_kLineLimit < nCnt2 || (pFrm && our_kLineLimit < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().size()); }
public:
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 )