diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-06-16 15:34:40 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-01-17 15:48:48 +0100 |
commit | 38b51b53f025b1d76399b33ecf39746b820363d4 (patch) | |
tree | 718a93557ea5eff81ccfed202572478e0d5673ba | |
parent | tdf#142326: Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams" (diff) | |
download | core-38b51b53f025b1d76399b33ecf39746b820363d4.tar.gz core-38b51b53f025b1d76399b33ecf39746b820363d4.zip |
Revert "tdf#116501 fix freezing at embedded text tables"
This reverts commit 91b2239783dc716bd71ce7962bfd7e341dfe4175.
This breaks documents that have many nested tables.
For example Eclipse BIRT generates reports with tables nested 8 levels
deep, they run into the counter in no time and, ironically, one goes
into a layout loop because of this counter.
Change-Id: I7451d01787903bbc60b305da3dc72f8259175e97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117472
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit ee042a371e98cdcc59848f0b953f1ce545e18e31)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117601
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 0f026c6e7186ef57e5806348a320f8383dfb7dc7)
-rw-r--r-- | sw/source/core/inc/layact.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/inc/tabfrm.hxx | 10 | ||||
-rw-r--r-- | sw/source/core/layout/layact.cxx | 19 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 4 |
4 files changed, 2 insertions, 36 deletions
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 2b1b17a4afd2..50335077694c 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -97,11 +97,6 @@ class SwLayAction // OD 14.04.2003 #106346# - new flag for content formatting on interrupt. bool mbFormatContentOnInterrupt; - // for loop control by disabling in-row splitting within embedded tables - const SwPageFrame *m_pCurPage; - sal_uInt16 m_nTabLevel; // embedding level - sal_uInt32 m_nCallCount; // calling FormatLayoutTab on the same page - void PaintContent( const SwContentFrame *, const SwPageFrame *, const SwRect &rOldRect, long nOldBottom ); bool PaintWithoutFlys( const SwRect &, const SwContentFrame *, diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index cc57d46d8492..176396c6667a 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -84,8 +84,6 @@ class SwTabFrame: public SwLayoutFrame, public SwFlowFrame bool m_bInRecalcLowerRow : 1; - bool m_bSplitRowDisabled : 1; // loop control - /** * Split() splits the Frame at the specified position: a Follow is * created and constructed and inserted directly after this. @@ -175,14 +173,6 @@ public: { m_bInRecalcLowerRow = bNew; } - bool IsSplitRowDisabled() const - { - return m_bSplitRowDisabled; - } - void SetSplitRowDisabled() - { - m_bSplitRowDisabled = true; - } // #i26945# bool IsConsiderObjsForMinCellHeight() const diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 74fe4e85bcfd..96796cca4662 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -261,10 +261,7 @@ SwLayAction::SwLayAction( SwRootFrame *pRt, SwViewShellImp *pI ) : m_nStartTicks( std::clock() ), m_nInputType( VclInputFlags::NONE ), m_nEndPage( USHRT_MAX ), - m_nCheckPageNum( USHRT_MAX ), - m_pCurPage( nullptr ), - m_nTabLevel( 0 ), - m_nCallCount( 0 ) + m_nCheckPageNum( USHRT_MAX ) { m_bPaintExtraData = ::IsExtraData( m_pImp->GetShell()->GetDoc() ); m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true; @@ -292,7 +289,6 @@ void SwLayAction::Reset() m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true; m_bInput = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule = m_bUpdateExpFields = m_bBrowseActionStop = false; - m_pCurPage = nullptr; } bool SwLayAction::RemoveEmptyBrowserPages() @@ -1183,12 +1179,6 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage ) // introduce support for vertical layout bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLay, bool bAddRect ) { - // save page for loop control - if( pLay->IsPageFrame() && static_cast<SwPageFrame*>(pLay) != m_pCurPage ) - { - m_nCallCount = 0; - m_pCurPage = static_cast<SwPageFrame*>(pLay); - } OSL_ENSURE( !IsAgain(), "Attention to the invalid page." ); if ( IsAgain() ) return false; @@ -1369,14 +1359,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa { if ( pLow->IsTabFrame() ) { - // loop control for embedded tables - if ( m_nTabLevel > 0 && ++m_nCallCount > 50 ) { - static_cast<SwTabFrame*>(pLow)->SetSplitRowDisabled(); - } - - ++m_nTabLevel; bTabChanged |= FormatLayoutTab( static_cast<SwTabFrame*>(pLow), bAddRect ); - --m_nTabLevel; } // Skip the ones already registered for deletion else if( !pLow->IsSctFrame() || static_cast<SwSectionFrame*>(pLow)->GetSection() ) diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 781355964448..ba85082edcaf 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -82,7 +82,6 @@ SwTabFrame::SwTabFrame( SwTable &rTab, SwFrame* pSib ) , m_bConsiderObjsForMinCellHeight(true) , m_bObjsDoesFit(true) , m_bInRecalcLowerRow(false) - , m_bSplitRowDisabled(false) { mbFixSize = false; //Don't fall for import filter again. mnFrameType = SwFrameType::Tab; @@ -121,7 +120,6 @@ SwTabFrame::SwTabFrame( SwTabFrame &rTab ) , m_bConsiderObjsForMinCellHeight(true) , m_bObjsDoesFit(true) , m_bInRecalcLowerRow(false) - , m_bSplitRowDisabled(false) { mbFixSize = false; //Don't fall for import filter again. mnFrameType = SwFrameType::Tab; @@ -1054,7 +1052,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK // table, or it will be set to false under certain // conditions that are not suitable for splitting // the row. - bool bSplitRowAllowed = pRow->IsRowSplitAllowed() && !IsSplitRowDisabled(); + bool bSplitRowAllowed = pRow->IsRowSplitAllowed(); // #i29438# // #i26945# - Floating screen objects no longer forbid |