diff options
Diffstat (limited to 'sw/source/core/layout/newfrm.cxx')
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 4b40f4d6ded6..ef0701bf7e1e 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -21,6 +21,7 @@ #include <o3tl/safeint.hxx> #include <svx/svdpage.hxx> +#include <osl/diagnose.h> #include <drawdoc.hxx> #include <fmtpdsc.hxx> #include <swtable.hxx> @@ -45,6 +46,7 @@ SwLayVout *SwRootFrame::s_pVout = nullptr; bool SwRootFrame::s_isInPaint = false; bool SwRootFrame::s_isNoVirDev = false; +SwRootFrame* SwRootFrame::s_pLast = nullptr; SwCache *SwFrame::spCache = nullptr; @@ -296,7 +298,7 @@ void FrameInit() SwRootFrame::s_pVout = new SwLayVout(); SwCache *pNew = new SwCache( 100 #ifdef DBG_UTIL - , "static SwBorderAttrs::pCache" + , "static SwBorderAttrs::pCache"_ostr #endif ); SwFrame::SetCache( pNew ); @@ -398,7 +400,6 @@ void InitCurrShells( SwRootFrame *pRoot ) SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : SwLayoutFrame( pFormat->GetDoc()->MakeFrameFormat( "Root", pFormat ), nullptr ), - maPagesArea(), mnViewWidth( -1 ), mnColumns( 0 ), mbBookMode( false ), @@ -409,6 +410,7 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : mbBrowseWidthValid( false ), mbTurboAllowed( true ), mbAssertFlyPages( true ), + mbTableUpdateInProgress( false ), mbIsVirtPageNum( false ), mbIsNewLayout( true ), mbCallbackActionEnabled ( false ), @@ -417,6 +419,9 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : m_FieldmarkMode(pSh->GetViewOptions()->IsFieldName() ? sw::FieldmarkMode::ShowCommand : sw::FieldmarkMode::ShowResult), + m_ParagraphBreakMode(pSh->GetViewOptions()->IsParagraph() + ? sw::ParagraphBreakMode::Shown + : sw::ParagraphBreakMode::Hidden), mnBrowseWidth(MIN_BROWSE_WIDTH), mpTurbo( nullptr ), mpLastPage( nullptr ), @@ -428,6 +433,8 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : { mnFrameType = SwFrameType::Root; setRootFrame( this ); + + s_pLast = this; } void SwRootFrame::Init( SwFrameFormat* pFormat ) @@ -458,7 +465,7 @@ void SwRootFrame::Init( SwFrameFormat* pFormat ) SwDoc* pDoc = pFormat->GetDoc(); SwNodeIndex aIndex( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); - SwContentNode *pNode = pDoc->GetNodes().GoNextSection( &aIndex, true, false ); + SwContentNode* pNode = SwNodes::GoNextSection(&aIndex, true, false); // #123067# pNode = 0 can really happen SwTableNode *pTableNd= pNode ? pNode->FindTableNode() : nullptr; @@ -502,15 +509,17 @@ void SwRootFrame::Init( SwFrameFormat* pFormat ) SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 ); ::InsertCnt_( pLay, pDoc, aTmp.GetIndex(), true ); - //Remove masters that haven't been replaced yet from the list. - RemoveMasterObjs( mpDrawPage ); + + // tdf#156077 create all pages for at-page anchored flys now because all + // these flys must be attached to some page when Init() is finished + AssertFlyPages(); + if( rSettingAccess.get(DocumentSettingId::GLOBAL_DOCUMENT) ) rFieldsAccess.UpdateRefFields(); //b6433357: Update page fields after loading if ( !mpCurrShell || !mpCurrShell->Imp()->IsUpdateExpFields() ) { - SwDocPosUpdate aMsgHint( pPage->getFrameArea().Top() ); - rFieldsAccess.UpdatePageFields( &aMsgHint ); + rFieldsAccess.UpdatePageFields(pPage->getFrameArea().Top()); } rTimerAccess.StartIdling(); @@ -563,6 +572,7 @@ void SwRootFrame::DestroyImpl() SwRootFrame::~SwRootFrame() { + s_pLast = nullptr; } void SwRootFrame::RemoveMasterObjs( SdrPage *pPg ) |