From 2b3de550ef1e28cd4231352c91634f67aa6d642f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 2 Nov 2016 12:03:28 +0200 Subject: remove pParentFrame from SfxFrame Found by the singlevalfields loplugin. Dead as least as far back as commit 93a7b558588be1f12e137329548b706daccc07df Author: Frank Schoenheit [fs] 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 Tested-by: Noel Grandin --- sw/source/uibase/shells/grfsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source/uibase/shells/grfsh.cxx') 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()) -- cgit