diff options
Diffstat (limited to 'sw/source/core/layout/newfrm.cxx')
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 9da088849559..4014f37231ec 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -482,7 +482,7 @@ void InitCurrShells( SwRootFrm *pRoot ) SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) : SwLayoutFrm( pFmt->GetDoc()->MakeFrmFmt( - XubString( "Root", RTL_TEXTENCODING_MS_1252 ), pFmt ) ), + XubString( "Root", RTL_TEXTENCODING_MS_1252 ), pFmt ), 0 ), // --> PAGES01 maPagesArea(), mnViewWidth( -1 ), @@ -504,7 +504,11 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) : nType = FRMC_ROOT; bIdleFormat = bTurboAllowed = bAssertFlyPages = bIsNewLayout = sal_True; bCheckSuperfluous = bBrowseWidthValid = sal_False; + setRootFrm( this ); +} +void SwRootFrm::Init( SwFrmFmt* pFmt ) +{ InitCurrShells( this ); IDocumentTimerAccess *pTimerAccess = pFmt->getIDocumentTimerAccess(); @@ -512,14 +516,17 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) : IDocumentFieldsAccess *pFieldsAccess = pFmt->getIDocumentFieldsAccess(); const IDocumentSettingAccess *pSettingAccess = pFmt->getIDocumentSettingAccess(); pTimerAccess->StopIdling(); - pLayoutAccess->SetRootFrm( this ); //Fuer das Erzeugen der Flys durch MakeFrms() + pLayoutAccess->SetCurrentViewShell( this->GetCurrShell() ); //Fuer das Erzeugen der Flys durch MakeFrms() //swmod 071108//swmod 071225 bCallbackActionEnabled = sal_False; //vor Verlassen auf sal_True setzen! SdrModel *pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel(); - if ( pMd ) { - pDrawPage = pMd->GetPage( 0 ); + // Disable "multiple layout" + pDrawPage = pMd->GetPage(0); //pMd->AllocPage( FALSE ); + //pMd->InsertPage( pDrawPage ); + // end of disabling + pDrawPage->SetSize( Frm().SSize() ); } @@ -609,8 +616,9 @@ SwRootFrm::~SwRootFrm() pTurbo = 0; if(pBlink) pBlink->FrmDelete( this ); - ((SwFrmFmt*)pRegisteredIn)->GetDoc()->DelFrmFmt( (SwFrmFmt*)pRegisteredIn ); + static_cast<SwFrmFmt*>(GetRegisteredInNonConst())->GetDoc()->DelFrmFmt( static_cast<SwFrmFmt*>(GetRegisteredInNonConst()) ); delete pDestroy; + pDestroy = 0; //Referenzen entfernen. for ( sal_uInt16 i = 0; i < pCurrShells->Count(); ++i ) @@ -643,5 +651,38 @@ void SwRootFrm::RemoveMasterObjs( SdrPage *pPg ) } +void SwRootFrm::AllCheckPageDescs() const +{ + CheckPageDescs( (SwPageFrm*)this->Lower() ); +} +//swmod 080226 +void SwRootFrm::AllInvalidateAutoCompleteWords() const +{ + SwPageFrm *pPage = (SwPageFrm*)this->Lower(); + while ( pPage ) + { + pPage->InvalidateAutoCompleteWords(); + pPage = (SwPageFrm*)pPage->GetNext(); + } +}//swmod 080305 +void SwRootFrm::AllAddPaintRect() const +{ + GetCurrShell()->AddPaintRect( this->Frm() ); +}//swmod 080305 +void SwRootFrm::AllRemoveFtns() +{ + RemoveFtns(); +} +void SwRootFrm::AllInvalidateSmartTagsOrSpelling(sal_Bool bSmartTags) const +{ + SwPageFrm *pPage = (SwPageFrm*)this->Lower(); + while ( pPage ) + { + if ( bSmartTags ) + pPage->InvalidateSmartTags(); + pPage->InvalidateSpelling(); + pPage = (SwPageFrm*)pPage->GetNext(); + } //swmod 080218 +} |