void SwView::Activate(bool bMDIActivate)
{ // fdo#40438 Update the layout to make sure everything is correct before showing the content
m_pWrtShell->StartAction();
m_pWrtShell->EndAction( true );
// Register the current View at the DocShell. // The view remains active at the DocShell until it will // be destroyed or by Activate a new one will be set.
SwDocShell* pDocSh = GetDocShell(); if(pDocSh)
pDocSh->SetView(this);
SwModule::get()->SetView(this);
// Document size has changed. if(!bDocSzUpdated)
DocSzChgd(m_aDocSz);
if ( bMDIActivate )
{ if ( m_pShell )
{
SfxDispatcher &rDispatcher = GetDispatcher();
SfxShell *pTopShell = rDispatcher.GetShell( 0 );
// this SwView is the top-most shell on the stack if ( pTopShell == this )
{ for ( sal_uInt16 i = 1; true; ++i )
{
SfxShell *pSfxShell = rDispatcher.GetShell( i ); // does the stack contain any shells spawned by this SwView already? if ( ( dynamic_cast< const SwBaseShell *>( pSfxShell ) != nullptr
|| dynamic_cast< const FmFormShell *>( pSfxShell ) != nullptr )
&& ( pSfxShell->GetViewShell() == this ) )
{ // it shouldn't b/c we haven't been activated yet // so assert that 'cause it'll crash during dispose at the latest
assert( pSfxShell && "Corrupted shell stack: dependent shell positioned below its view");
} else break;
}
}
}
// Initialize Fielddlg newly if necessary (e.g. for TYP_SETVAR)
sal_uInt16 nId = SwFieldDlgWrapper::GetChildWindowId();
SfxViewFrame& rVFrame = GetViewFrame();
SwFieldDlgWrapper *pWrp = static_cast<SwFieldDlgWrapper*>(rVFrame.GetChildWindow(nId)); if (pWrp)
pWrp->ReInitDlg();
// Initialize RedlineDlg newly if necessary
nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild *pRed = static_cast<SwRedlineAcceptChild*>(rVFrame.GetChildWindow(nId)); if (pRed)
pRed->ReInitDlg();
// reinit IdxMarkDlg
nId = SwInsertIdxMarkWrapper::GetChildWindowId();
SwInsertIdxMarkWrapper *pIdxMrk = static_cast<SwInsertIdxMarkWrapper*>(rVFrame.GetChildWindow(nId)); if (pIdxMrk)
pIdxMrk->ReInitDlg(*m_pWrtShell);
// reinit AuthMarkDlg
nId = SwInsertAuthMarkWrapper::GetChildWindowId();
SwInsertAuthMarkWrapper *pAuthMrk = static_cast<SwInsertAuthMarkWrapper*>(rVFrame.
GetChildWindow(nId)); if (pAuthMrk)
pAuthMrk->ReInitDlg(*m_pWrtShell);
} else // At least call the Notify (as a precaution because of the SlotFilter).
AttrChangedNotify(nullptr);
SfxViewShell::Activate(bMDIActivate);
}
void SwView::Deactivate(bool bMDIActivate)
{
GetEditWin().FlushInBuffer(); // Flush characters still in the input buffer.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.