summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/app.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-07 19:20:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-07 19:20:30 +0200
commit3d5d631e5ea9dd897abd5de61a92a75ba22b040e (patch)
treebe1723e7bd19136aed2d9fef857694d806590820 /sfx2/source/appl/app.cxx
parentff2a399b61f34f7920e594e8cbb6c19045b24956 (diff)
SfxViewFrame::GetParentViewFrame_Impl always returns nullptr
...ever since 4d61332a3cb172cdfe29f64efb325f6ef20c573c "[CWS autorecovery] removed (now) unused methods in Sfx(Top)Frame" Change-Id: I3a1bc00d8a11337211cdf7265ad8e5e7d5363600
Diffstat (limited to 'sfx2/source/appl/app.cxx')
-rw-r--r--sfx2/source/appl/app.cxx32
1 files changed, 13 insertions, 19 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 0b0c2d833391..9d13885a43d3 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -312,41 +312,35 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
{
if ( pFrame != pImpl->pViewFrame )
{
- // get the containerframes ( if one of the frames is an InPlaceFrame )
- SfxViewFrame *pOldContainerFrame = pImpl->pViewFrame;
- while ( pOldContainerFrame && SfxViewFrame::GetParentViewFrame_Impl() )
- pOldContainerFrame = SfxViewFrame::GetParentViewFrame_Impl();
- SfxViewFrame *pNewContainerFrame = pFrame;
- while ( pNewContainerFrame && SfxViewFrame::GetParentViewFrame_Impl() )
- pNewContainerFrame = SfxViewFrame::GetParentViewFrame_Impl();
+ SfxViewFrame *pOldFrame = pImpl->pViewFrame;
// DocWinActivate : both frames belong to the same TopWindow
// TopWinActivate : both frames belong to different TopWindows
- bool bTaskActivate = pOldContainerFrame != pNewContainerFrame;
+ bool bTaskActivate = pOldFrame != pFrame;
- if ( pOldContainerFrame )
+ if ( pOldFrame )
{
if ( bTaskActivate )
- NotifyEvent( SfxViewEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(GlobalEventId::DEACTIVATEDOC), pOldContainerFrame->GetObjectShell(), pOldContainerFrame->GetFrame().GetController() ) );
- pOldContainerFrame->DoDeactivate( bTaskActivate, pFrame );
+ NotifyEvent( SfxViewEventHint( SFX_EVENT_DEACTIVATEDOC, GlobalEventConfig::GetEventName(GlobalEventId::DEACTIVATEDOC), pOldFrame->GetObjectShell(), pOldFrame->GetFrame().GetController() ) );
+ pOldFrame->DoDeactivate( bTaskActivate, pFrame );
- if( pOldContainerFrame->GetProgress() )
- pOldContainerFrame->GetProgress()->Suspend();
+ if( pOldFrame->GetProgress() )
+ pOldFrame->GetProgress()->Suspend();
}
pImpl->pViewFrame = pFrame;
- if( pNewContainerFrame )
+ if( pFrame )
{
- pNewContainerFrame->DoActivate( bTaskActivate );
- if ( bTaskActivate && pNewContainerFrame->GetObjectShell() )
+ pFrame->DoActivate( bTaskActivate );
+ if ( bTaskActivate && pFrame->GetObjectShell() )
{
- pNewContainerFrame->GetObjectShell()->PostActivateEvent_Impl( pNewContainerFrame );
- NotifyEvent(SfxViewEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(GlobalEventId::ACTIVATEDOC), pNewContainerFrame->GetObjectShell(), pNewContainerFrame->GetFrame().GetController() ) );
+ pFrame->GetObjectShell()->PostActivateEvent_Impl( pFrame );
+ NotifyEvent(SfxViewEventHint(SFX_EVENT_ACTIVATEDOC, GlobalEventConfig::GetEventName(GlobalEventId::ACTIVATEDOC), pFrame->GetObjectShell(), pFrame->GetFrame().GetController() ) );
}
- SfxProgress *pProgress = pNewContainerFrame->GetProgress();
+ SfxProgress *pProgress = pFrame->GetProgress();
if ( pProgress )
{
if( pProgress->IsSuspended() )