diff options
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 2 | ||||
-rw-r--r-- | include/sfx2/frame.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/viewfrm.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshow.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/tools/EventMultiplexer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 50 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/frame.cxx | 49 | ||||
-rw-r--r-- | sfx2/source/view/frame2.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 37 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/romenu.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/frmsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/grfsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 7 |
22 files changed, 35 insertions, 179 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index bb63d88baddc..efa0335e065a 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -152,7 +152,7 @@ void SvxHyperlinkTabPageBase::InitStdControls () SfxDispatcher* pDispatch = GetDispatcher(); SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : nullptr; - SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetTopFrame() : nullptr; + SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr; if ( pFrame ) { std::unique_ptr<TargetList> pList(new TargetList); diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx index 284075ac211f..209fb69ce55a 100644 --- a/include/sfx2/frame.hxx +++ b/include/sfx2/frame.hxx @@ -95,7 +95,6 @@ class SFX2_DLLPUBLIC SfxFrame : public SvCompatWeakBase<SfxFrame> friend class SfxFrameWindow_Impl; private: - SfxFrame* pParentFrame; SfxFrameArr_Impl* pChildArr; std::unique_ptr< SfxFrame_Impl > pImpl; VclPtr<vcl::Window> pWindow; @@ -119,8 +118,6 @@ public: bool DoClose(); sal_uInt16 GetChildFrameCount() const; SfxFrame* GetChildFrame( sal_uInt16 nPos ) const; - SfxFrame* GetParentFrame() const - { return pParentFrame; } void SetPresentationMode( bool bSet ); SystemWindow* GetSystemWindow() const; @@ -130,8 +127,6 @@ public: SfxObjectShell* GetCurrentDocument() const; SfxViewFrame* GetCurrentViewFrame() const; - SfxFrame& GetTopFrame() const; - bool IsParent( SfxFrame* ) const; sal_uInt32 GetFrameType() const; static void GetDefaultTargetList( TargetList& ); diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index 99f5fbc2b651..fcfdf3161750 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -110,8 +110,6 @@ public: void DoActivate(bool bMDI); void DoDeactivate(bool bMDI, SfxViewFrame *pOld=nullptr); - SfxViewFrame* GetParentViewFrame() const; - using SfxShell::GetDispatcher; SfxDispatcher* GetDispatcher() { return m_pDispatcher; } SfxBindings& GetBindings() { return *m_pBindings; } @@ -149,8 +147,6 @@ public: bool DoClose(); sal_uIntPtr GetFrameType() const { return GetFrame().GetFrameType(); } - SfxFrame& GetTopFrame() const - { return GetFrame().GetTopFrame(); } void GetTargetList( TargetList& rList ) const { GetFrame().GetTargetList( rList ); } diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 9f18403b9d1e..902c8690e9b2 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -613,7 +613,7 @@ WorkWindow *SlideShow::GetWorkWindow() if( !pShell || !pShell->GetViewFrame() ) return nullptr; - return dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent()); + return dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetFrame().GetWindow().GetParent()); } bool SlideShow::IsExitAfterPresenting() const @@ -668,7 +668,7 @@ void SAL_CALL SlideShow::end() if( pShell && pShell->GetViewFrame() ) { - WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent()); + WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetFrame().GetWindow().GetParent()); if( pWorkWindow ) { pWorkWindow->StartPresentationMode( (mxController.is() && mxController->maPresSettings.mbAlwaysOnTop) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index d21d6f56ff85..dd430e2b3bf2 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2485,7 +2485,7 @@ void SlideshowImpl::setActiveXToolbarsVisible( bool bVisible ) try { Reference< frame::XLayoutManager > xLayoutManager; - Reference< beans::XPropertySet > xFrameProps( pViewFrame->GetFrame().GetTopFrame().GetFrameInterface(), UNO_QUERY_THROW ); + Reference< beans::XPropertySet > xFrameProps( pViewFrame->GetFrame().GetFrameInterface(), UNO_QUERY_THROW ); if ( ( xFrameProps->getPropertyValue( "LayoutManager" ) >>= xLayoutManager ) && xLayoutManager.is() ) diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx index 8a38ebdf59bf..924a5e91e6a9 100644 --- a/sd/source/ui/tools/EventMultiplexer.cxx +++ b/sd/source/ui/tools/EventMultiplexer.cxx @@ -208,7 +208,7 @@ EventMultiplexer::Implementation::Implementation (ViewShellBase& rBase) // Connect to the frame to listen for controllers being exchanged. // Listen to changes of certain properties. Reference<frame::XFrame> xFrame ( - mrBase.GetFrame()->GetTopFrame().GetFrameInterface(), + mrBase.GetFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY); mxFrameWeak = xFrame; if (xFrame.is()) diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index c8ec0a1715d7..35dd486ef145 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -147,7 +147,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie maBulletFont.SetOutline(false); maBulletFont.SetShadow(false); - Reference<XFrame> xFrame (mrOutlineViewShell.GetViewShellBase().GetFrame()->GetTopFrame().GetFrameInterface(), UNO_QUERY); + Reference<XFrame> xFrame (mrOutlineViewShell.GetViewShellBase().GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY); const OUString aSlotURL( ".uno:ShowSlide" ); maSlideImage = GetImage( xFrame, aSlotURL, true ); diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index f98235a262b2..61a688ce6f4e 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -462,7 +462,7 @@ void SfxWorkWindow::Sort_Impl() // constructor for workwin of a Frame SfxWorkWindow::SfxWorkWindow( vcl::Window *pWin, SfxFrame *pFrm, SfxFrame* pMaster ) : - pParent( pFrm->GetParentFrame() ? pFrm->GetParentFrame()->GetWorkWindow_Impl() : nullptr ), + pParent( nullptr ), pBindings(&pFrm->GetCurrentViewFrame()->GetBindings()), pWorkWin (pWin), pConfigShell( nullptr ), diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 11d950e5b02f..80936ae91a69 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -464,16 +464,7 @@ SfxDispatcher::SfxDispatcher() */ SfxDispatcher::SfxDispatcher(SfxViewFrame *pViewFrame) { - if ( pViewFrame ) - { - SfxViewFrame *pFrame = pViewFrame->GetParentViewFrame(); - if ( pFrame ) - Construct_Impl( pFrame->GetDispatcher() ); - else - Construct_Impl( nullptr ); - } - else - Construct_Impl( nullptr ); + Construct_Impl( nullptr ); xImp->pFrame = pViewFrame; } @@ -1299,8 +1290,7 @@ void SfxDispatcher::Update_Impl( bool bForce ) SetMenu_Impl(); SfxWorkWindow *pWorkWin = xImp->pFrame->GetFrame().GetWorkWindow_Impl(); - SfxWorkWindow *pTaskWin = xImp->pFrame->GetTopFrame().GetWorkWindow_Impl(); - pTaskWin->ResetStatusBar_Impl(); + pWorkWin->ResetStatusBar_Impl(); SfxDispatcher *pDispat = this; while ( pDispat ) @@ -1326,7 +1316,7 @@ void SfxDispatcher::Update_Impl( bool bForce ) pActDispat = pActDispat->xImp->pParent; } - Update_Impl_( bUIActive, !bIsIPActive, bIsIPActive, pTaskWin ); + Update_Impl_( bUIActive, !bIsIPActive, bIsIPActive, pWorkWin ); if ( (bUIActive || bIsActive) && !comphelper::LibreOfficeKit::isActive() ) pWorkWin->UpdateObjectBars_Impl(); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 1cccb0af6089..4f5b420ee178 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -422,12 +422,6 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( !pFrame ) return; - if ( pFrame->GetFrame().GetParentFrame() ) - { - pFrame->GetTopViewFrame()->GetObjectShell()->ExecuteSlot( rReq ); - return; - } - if ( !IsOwnStorageFormat( *GetMedium() ) ) return; @@ -757,31 +751,13 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) case SID_CLOSEDOC: { SfxViewFrame *pFrame = GetFrame(); - if ( pFrame && pFrame->GetFrame().GetParentFrame() ) - { - // If SID_CLOSEDOC is executed through menu and so on, but - // the current document is in a frame, then the - // FrameSetDocument should actually be closed. - pFrame->GetTopViewFrame()->GetObjectShell()->ExecuteSlot( rReq ); - rReq.Done(); - return; - } bool bInFrameSet = false; sal_uInt16 nFrames=0; pFrame = SfxViewFrame::GetFirst( this ); while ( pFrame ) { - if ( pFrame->GetFrame().GetParentFrame() ) - { - // In this document there still exists a view that is - // in a FrameSet , which of course may not be closed - // geclosed werden - bInFrameSet = true; - } - else - nFrames++; - + nFrames++; pFrame = SfxViewFrame::GetNext( *pFrame, this ); } @@ -791,8 +767,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) pFrame = SfxViewFrame::GetFirst( this ); while ( pFrame ) { - if ( !pFrame->GetFrame().GetParentFrame() ) - pFrame->GetFrame().DoClose(); + pFrame->GetFrame().DoClose(); pFrame = SfxViewFrame::GetNext( *pFrame, this ); } } @@ -985,14 +960,6 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet) SfxViewFrame* pFrame = GetFrame(); if ( !pFrame ) pFrame = SfxViewFrame::GetFirst( this ); - if ( pFrame ) - { - if ( pFrame->GetFrame().GetParentFrame() ) - { - pFrame = pFrame->GetTopViewFrame(); - pDoc = pFrame->GetObjectShell(); - } - } if ( !pFrame || !pDoc->HasName() || !IsOwnStorageFormat( *pDoc->GetMedium() ) ) @@ -1016,18 +983,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet) case SID_CLOSEDOC: { - SfxObjectShell *pDoc = this; - SfxViewFrame *pFrame = GetFrame(); - if ( pFrame && pFrame->GetFrame().GetParentFrame() ) - { - - // If SID_CLOSEDOC is executed through menu and so on, but - // the current document is in a frame, then the - // FrameSetDocument should actually be closed. - pDoc = pFrame->GetTopViewFrame()->GetObjectShell(); - } - - if ( pDoc->GetFlags() & SfxObjectShellFlags::DONTCLOSE ) + if ( GetFlags() & SfxObjectShellFlags::DONTCLOSE ) rSet.DisableItem(nWhich); else rSet.Put(SfxStringItem(nWhich, SfxResId(STR_CLOSEDOC).toString())); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index d6a8a5ac7669..55f256cf2121 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -583,7 +583,7 @@ bool SfxObjectShell::PrepareClose if ( bUI && IsModified() && pFrame ) { // restore minimized - SfxFrame& rTop = pFrame->GetTopFrame(); + SfxFrame& rTop = pFrame->GetFrame(); SfxViewFrame::SetViewFrame( rTop.GetCurrentViewFrame() ); pFrame->GetFrame().Appear(); diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index fa2376f89cb6..9e80816a2633 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -100,12 +100,6 @@ SfxFrame::~SfxFrame() if ( it != pFramesArr_Impl->end() ) pFramesArr_Impl->erase( it ); - if ( pParentFrame ) - { - pParentFrame->RemoveChildFrame_Impl( this ); - pParentFrame = nullptr; - } - delete pImpl->pDescr; if ( pChildArr ) @@ -253,14 +247,6 @@ void SfxFrame::RemoveChildFrame_Impl( SfxFrame* pFrame ) pChildArr->erase( it ); }; -SfxFrame& SfxFrame::GetTopFrame() const -{ - const SfxFrame* pParent = this; - while ( pParent->pParentFrame ) - pParent = pParent->pParentFrame; - return *const_cast< SfxFrame* >( pParent ); -} - bool SfxFrame::IsClosing_Impl() const { return pImpl->bClosing; @@ -315,9 +301,7 @@ SfxViewFrame* SfxFrame::GetCurrentViewFrame() const SfxDispatcher* SfxFrame::GetDispatcher_Impl() const { - if ( pImpl->pCurrentViewFrame ) - return pImpl->pCurrentViewFrame->GetDispatcher(); - return GetParentFrame()->GetDispatcher_Impl(); + return pImpl->pCurrentViewFrame->GetDispatcher(); } bool SfxFrame::IsAutoLoadLocked_Impl() const @@ -410,7 +394,6 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc ) assert(pDoc && "NULL-Document inserted ?!"); - GetParentFrame(); const SfxMedium *pMed = pDoc->GetMedium(); GetDescriptor()->SetActualURL( pMed->GetOrigURL() ); @@ -458,7 +441,7 @@ SfxFrameDescriptor* SfxFrame::GetDescriptor() const if ( !pImpl->pDescr ) { - DBG_ASSERT( !GetParentFrame(), "No TopLevel-Frame, but no Descriptor!" ); + DBG_ASSERT( true, "No TopLevel-Frame, but no Descriptor!" ); pImpl->pDescr = new SfxFrameDescriptor; if ( GetCurrentDocument() ) pImpl->pDescr->SetURL( GetCurrentDocument()->GetMedium()->GetOrigURL() ); @@ -478,10 +461,7 @@ void SfxFrame::GetDefaultTargetList(TargetList& rList) void SfxFrame::GetTargetList( TargetList& rList ) const { - if ( !GetParentFrame() ) - { - SfxFrame::GetDefaultTargetList(rList); - } + SfxFrame::GetDefaultTargetList(rList); SfxViewFrame* pView = GetCurrentViewFrame(); if( pView && pView->GetViewShell() && pChildArr ) @@ -495,19 +475,6 @@ void SfxFrame::GetTargetList( TargetList& rList ) const } } -bool SfxFrame::IsParent( SfxFrame *pFrame ) const -{ - SfxFrame *pParent = pParentFrame; - while ( pParent ) - { - if ( pParent == pFrame ) - return true; - pParent = pParent->pParentFrame; - } - - return false; -} - void SfxFrame::InsertTopFrame_Impl( SfxFrame* pFrame ) { SfxFrameArr_Impl& rArr = *SfxGetpApp()->Get_Impl()->pTopFrames; @@ -676,8 +643,6 @@ void SfxFrame::Appear() GetCurrentViewFrame()->Show(); GetWindow().Show(); pImpl->xFrame->getContainerWindow()->setVisible( true ); - if ( pParentFrame ) - pParentFrame->Appear(); Reference < css::awt::XTopWindow > xTopWindow( pImpl->xFrame->getContainerWindow(), UNO_QUERY ); if ( xTopWindow.is() ) xTopWindow->toFront(); @@ -721,12 +686,6 @@ void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder ) else aSize.Height() = 0; - if ( GetParentFrame() ) - { - bool bHasTools = rBorder.Left() != rBorder.Right() || rBorder.Top() != rBorder.Bottom(); - pF->GetWindow().SetBorderStyle( bHasTools ? WindowBorderStyle::NORMAL : WindowBorderStyle::NOBORDER ); - } - pF->GetWindow().SetPosSizePixel( aPos, aSize ); } } @@ -742,8 +701,6 @@ SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const { if ( pImpl->pWorkWin ) return pImpl->pWorkWin; - else if ( pParentFrame ) - return pParentFrame->GetWorkWindow_Impl(); else return nullptr; } diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 2672aa511926..6f8e7d43f577 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -290,7 +290,6 @@ SfxFrame* SfxFrame::Create( const Reference < XFrame >& i_rFrame ) SfxFrame::SfxFrame( vcl::Window& i_rContainerWindow ) :SvCompatWeakBase<SfxFrame>( this ) - ,pParentFrame( nullptr ) ,pChildArr( nullptr ) ,pWindow( nullptr ) { diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index bc98810fe4c1..3b080e8b7856 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -929,7 +929,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb ) if ( !nError ) { - m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(true); + m_pViewSh->GetViewFrame()->GetFrame().LockResize_Impl(true); try { m_pImp->m_xObject->setClientSite( m_pImp->m_xClient ); @@ -982,8 +982,8 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb ) } SfxViewFrame* pFrame = m_pViewSh->GetViewFrame(); - pFrame->GetTopFrame().LockResize_Impl(false); - pFrame->GetTopFrame().Resize(); + pFrame->GetFrame().LockResize_Impl(false); + pFrame->GetFrame().Resize(); } } } @@ -1041,7 +1041,7 @@ void SfxInPlaceClient::DeactivateObject() } } - m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(true); + m_pViewSh->GetViewFrame()->GetFrame().LockResize_Impl(true); if ( (m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) || svt::EmbeddedObjectRef::IsGLChart(m_pImp->m_xObject) ) @@ -1062,8 +1062,8 @@ void SfxInPlaceClient::DeactivateObject() SfxViewFrame* pFrame = m_pViewSh->GetViewFrame(); SfxViewFrame::SetViewFrame( pFrame ); - pFrame->GetTopFrame().LockResize_Impl(false); - pFrame->GetTopFrame().Resize(); + pFrame->GetFrame().LockResize_Impl(false); + pFrame->GetFrame().Resize(); } catch (css::uno::Exception& ) {} diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 2d698dbaa76b..5ce84bed4e76 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -204,7 +204,6 @@ static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHa void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) { - SfxFrame *pParent = GetFrame().GetParentFrame(); if ( rReq.GetSlot() == SID_RELOAD ) { // When CTRL-Reload, reload the active Frame @@ -222,18 +221,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) } } } - else - { - // When CTRL-Edit, edit the TopFrame. - sal_uInt16 nModifier = rReq.GetModifier(); - - if ( ( nModifier & KEY_MOD1 ) && pParent ) - { - SfxViewFrame *pTop = GetTopViewFrame(); - pTop->ExecReload_Impl( rReq ); - return; - } - } SfxObjectShell* pSh = GetObjectShell(); switch ( rReq.GetSlot() ) @@ -1510,7 +1497,7 @@ void SfxViewFrame::Enable( bool bEnable ) { m_pImpl->bEnabled = bEnable; - vcl::Window *pWindow = &GetFrame().GetTopFrame().GetWindow(); + vcl::Window *pWindow = &GetFrame().GetWindow(); if ( !bEnable ) m_pImpl->bWindowWasEnabled = pWindow->IsInputEnabled(); if ( !bEnable || m_pImpl->bWindowWasEnabled ) @@ -1595,12 +1582,6 @@ void SfxViewFrame::MakeActive_Impl( bool bGrabFocus ) { bPreview = true; } - else - { - SfxViewFrame* pParent = GetParentViewFrame(); - if ( pParent ) - pParent->SetActiveChildFrame_Impl( this ); - } css::uno::Reference< css::frame::XFrame > xFrame = GetFrame().GetFrameInterface(); if ( !bPreview ) @@ -2218,16 +2199,6 @@ void SfxViewFrame::ToTop() /* [Description] - The ParentViewFrame is the ViewFrame of the ParentFrames. -*/ -SfxViewFrame* SfxViewFrame::GetParentViewFrame() const -{ - SfxFrame *pFrame = GetFrame().GetParentFrame(); - return pFrame ? pFrame->GetCurrentViewFrame() : nullptr; -} - -/* [Description] - GetFrame returns the Frame, in which the ViewFrame is located. */ SfxFrame& SfxViewFrame::GetFrame() const @@ -2237,7 +2208,7 @@ SfxFrame& SfxViewFrame::GetFrame() const SfxViewFrame* SfxViewFrame::GetTopViewFrame() const { - return GetFrame().GetTopFrame().GetCurrentViewFrame(); + return GetFrame().GetCurrentViewFrame(); } vcl::Window& SfxViewFrame::GetWindow() const @@ -2843,7 +2814,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) { if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DATABASE)) return; - Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface(); + Reference < XFrame > xFrame = GetFrame().GetFrameInterface(); Reference < XFrame > xBeamer( xFrame->findFrame( "_beamer", FrameSearchFlag::CHILDREN ) ); bool bHasChild = xBeamer.is(); bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; @@ -2950,7 +2921,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) } else if ( nSID == SID_BROWSER ) { - Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface()-> + Reference < XFrame > xFrame = GetFrame().GetFrameInterface()-> findFrame( "_beamer", FrameSearchFlag::CHILDREN ); if ( !xFrame.is() ) rState.DisableItem( nSID ); diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 3d37b43c8248..1211e6efb5f7 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -169,7 +169,7 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) ::FillCharStyleListBox(*m_pNotVisitedLB, pView->GetDocShell()); TargetList* pList = new TargetList; - const SfxFrame& rFrame = pView->GetViewFrame()->GetTopFrame(); + const SfxFrame& rFrame = pView->GetViewFrame()->GetFrame(); rFrame.GetTargetList(*pList); if ( !pList->empty() ) { diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index d8ebac8b8540..11a4e301e8ae 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -186,10 +186,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : else EnableItem( MN_READONLY_LOADGRAPHIC, false ); - bool bReloadFrame = nullptr != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame(); - EnableItem( MN_READONLY_RELOAD_FRAME, - bReloadFrame ); - EnableItem( MN_READONLY_RELOAD, !bReloadFrame); + EnableItem( MN_READONLY_RELOAD_FRAME, false ); + EnableItem( MN_READONLY_RELOAD); Check( MN_READONLY_EDITDOC, SID_EDITDOC, rDis ); Check( MN_READONLY_SELECTION_MODE, FN_READONLY_SELECTION_MODE, rDis ); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 7eb5f48de822..f7daef9602c6 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -170,7 +170,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh ) void* pEditObj = GraphicType::NONE != nGrfType && GraphicType::Default != nGrfType ? rSh.GetIMapInventor() : nullptr; std::unique_ptr<TargetList> pList(new TargetList); - rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList); + rSh.GetView().GetViewFrame()->GetFrame().GetTargetList(*pList); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrameAttr( aSet ); diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index d1eb5f0b56dc..764d0049e35e 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -464,7 +464,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, false, &pItem) == SfxItemState::SET) sDefPage = OUStringToOString(static_cast<const SfxStringItem *>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8); - aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetFrame())); FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 91307fbcf658..8553c3ed8f38 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -337,7 +337,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, aUsrPref.IsKeepRatio())); aSet.Put(SfxBoolItem( SID_ATTR_GRAF_KEEP_ZOOM, aUsrPref.IsGrfKeepZoom())); - aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetFrame())); SfxObjectShell * sh = rSh.GetDoc()->GetPersist(); if (sh != nullptr && sh->HasName()) diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index a30321c93651..9b89c3965000 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1185,8 +1185,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): m_sPageStr(SW_RES(STR_PAGE)), m_pHScrollbar(nullptr), m_pVScrollbar(nullptr), - m_pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(), - pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), + m_pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(), WB_SIZEABLE )), mnPageCount( 0 ), mbResetFormDesignMode( false ), mbFormDesignModeToReset( false ) diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index b5a0d53b7b42..b0dba6ee354f 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -691,7 +691,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pFormShell(nullptr), m_pHScrollbar(nullptr), m_pVScrollbar(nullptr), - m_pScrollFill(VclPtr<ScrollBarBox>::Create( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), + m_pScrollFill(VclPtr<ScrollBarBox>::Create( &_pFrame->GetWindow(), WB_SIZEABLE )), m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame()->GetWindow(), m_pEditWin, SvxRulerSupportFlags::TABS | SvxRulerSupportFlags::PARAGRAPH_MARGINS_VERTICAL| SvxRulerSupportFlags::BORDERS | SvxRulerSupportFlags::REDUCED_METRIC, @@ -874,11 +874,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pVRuler->SetActive(); SfxViewFrame* pViewFrame = GetViewFrame(); - if( pViewFrame->GetFrame().GetParentFrame()) - { - aUsrPref.SetViewHRuler(false); - aUsrPref.SetViewVRuler(false); - } StartListening(*pViewFrame, true); StartListening(rDocSh, true); |