summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-06-26 19:13:37 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-06-27 10:44:02 +0200
commit7a05458d39da2f4755cb6e190dce338198655137 (patch)
tree4bac4e50bb09b7bb48c4c2cb01d5149baa2132e7 /sw
parent49f971e9d0a88c9f23262445a17c9b5cecdb9167 (diff)
tdf#125751 sw: don't start recursive layout in SwTextFrame::EmptyHeight()
Not sure if this has anything to do with the bug, but i noticed it while debugging... This is the only place that calls GetCurrFrame() *during* formatting, so make sure we don't do stupid recursive things. (regression from 56b2cf0c10d9caa01ebae1d80465e342d046a85c) Change-Id: Icd05f8d634bc9de4d5d16824d30075397e6c9960 Reviewed-on: https://gerrit.libreoffice.org/74750 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/porrst.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 09611e728441..3ec7042502a4 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -210,7 +210,8 @@ SwTwips SwTextFrame::EmptyHeight() const
SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( dynamic_cast<const SwCursorShell*>( pSh ) != nullptr ) {
SwCursorShell *pCrSh = static_cast<SwCursorShell*>(pSh);
- SwContentFrame *pCurrFrame=pCrSh->GetCurrFrame();
+ // this is called during formatting so avoid recursive layout
+ SwContentFrame const*const pCurrFrame = pCrSh->GetCurrFrame(false);
if (pCurrFrame==static_cast<SwContentFrame const *>(this)) {
// do nothing
} else {