diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-02 12:03:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-03 06:30:11 +0000 |
commit | 2b3de550ef1e28cd4231352c91634f67aa6d642f (patch) | |
tree | 6177171ab6f12306f93e66f7b43429dcd81fa9fd /sd | |
parent | 063593972e556f8f0e65881ccd77d5ea64175e8b (diff) |
remove pParentFrame from SfxFrame
Found by the singlevalfields loplugin.
Dead as least as far back as
commit 93a7b558588be1f12e137329548b706daccc07df
Author: Frank Schoenheit [fs] <frank.schoenheit@sun.com>
Date: Fri Nov 27 21:16:24 2009 +0100
[CWS autorecovery] merged SfxTopFrame into SfxFrame
SfxTopFrame was the only class deriving from the abstract class SfxFrame, so both
can effectively be treated as one class.
Arguably when that commit was done, SfxFrame should also have been renamed
to SfxTopFrame, since that it was it now seems to be.
Expanding the nullptr value off that field means that:
SfxFrame::GetTopFrame
always return this
SfxFrame::IsParent
always returns false
SfxViewFrame::GetTopFrame
is now the same as SfxViewFrame::GetFrame
SfxViewFrame::GetParentViewFrame
now returns null
Change-Id: Iac088fa485c3d7299d1553845ced2f5ced3c85f2
Reviewed-on: https://gerrit.libreoffice.org/30485
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-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 |
4 files changed, 5 insertions, 5 deletions
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 ); |