diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-06 14:40:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-09 11:33:43 +0100 |
commit | abe39f7781f59b96c5a8d3dd5b41c60fdf04ad84 (patch) | |
tree | 0f72d1968e5f25e3f280688a414398e3f4a7cce8 /sd | |
parent | bdb1c72198f60fdd91460e26282134d43bc0e2df (diff) |
improve loplugin:unusedfields
noticed something that wasn't being picked up, wrote some tests,
and found an unhandled case in Plugin::getParentFunctionDecl
Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/dlgpage.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/dlg/prltempl.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpaction.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/inc/GraphicObjectBar.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/MediaObjectBar.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/TabControl.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/dlgpage.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/prltempl.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/tpaction.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slideshow/PaneHider.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/slideshow/PaneHider.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/GraphicObjectBar.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/MediaObjectBar.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/tabcontr.cxx | 2 |
14 files changed, 14 insertions, 28 deletions
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index e69d17906016..5cef8e35bec3 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -37,15 +37,14 @@ */ SdPageDlg::SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage, bool bIsImpressDoc) : SfxTabDialogController(pParent, "modules/sdraw/ui/drawpagedialog.ui", "DrawPageDialog", pAttr) - , mpDocShell(pDocSh) , mbIsImpressDoc(bIsImpressDoc) { - SvxColorListItem const * pColorListItem = mpDocShell->GetItem( SID_COLOR_TABLE ); - SvxGradientListItem const * pGradientListItem = mpDocShell->GetItem( SID_GRADIENT_LIST ); - SvxBitmapListItem const * pBitmapListItem = mpDocShell->GetItem( SID_BITMAP_LIST ); - SvxPatternListItem const * pPatternListItem = mpDocShell->GetItem( SID_PATTERN_LIST ); - SvxHatchListItem const * pHatchListItem = mpDocShell->GetItem( SID_HATCH_LIST ); + SvxColorListItem const * pColorListItem = pDocSh->GetItem( SID_COLOR_TABLE ); + SvxGradientListItem const * pGradientListItem = pDocSh->GetItem( SID_GRADIENT_LIST ); + SvxBitmapListItem const * pBitmapListItem = pDocSh->GetItem( SID_BITMAP_LIST ); + SvxPatternListItem const * pPatternListItem = pDocSh->GetItem( SID_PATTERN_LIST ); + SvxHatchListItem const * pHatchListItem = pDocSh->GetItem( SID_HATCH_LIST ); mpColorList = pColorListItem->GetColorList(); mpGradientList = pGradientListItem->GetGradientList(); diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index e1d8eb0274c9..3e6fb20f3d93 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -52,8 +52,9 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, , mpDocShell(pDocSh) , ePO(_ePO) , aInputSet(*rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>{}) - , pOrgSet(&rStyleBase.GetItemSet()) { + const SfxItemSet* pOrgSet(&rStyleBase.GetItemSet()); + if( IS_OUTLINE(ePO)) { // Unfortunately, the Itemsets of our style sheets are not discrete... diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 5d75a1fa93bc..c3ff4a9c7a3b 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -70,9 +70,8 @@ using namespace com::sun::star::lang; SdActionDlg::SdActionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView) : SfxSingleTabDialogController(pParent, pAttr, "modules/simpress/ui/interactiondialog.ui", "InteractionDialog") - , rOutAttrs(*pAttr) { - std::unique_ptr<SfxTabPage> xNewPage = SdTPAction::Create(get_content_area(), this, rOutAttrs); + std::unique_ptr<SfxTabPage> xNewPage = SdTPAction::Create(get_content_area(), this, *pAttr); // formerly in PageCreated static_cast<SdTPAction*>( xNewPage.get() )->SetView( pView ); diff --git a/sd/source/ui/inc/GraphicObjectBar.hxx b/sd/source/ui/inc/GraphicObjectBar.hxx index 73e753a35209..528dfd7c8c46 100644 --- a/sd/source/ui/inc/GraphicObjectBar.hxx +++ b/sd/source/ui/inc/GraphicObjectBar.hxx @@ -48,7 +48,6 @@ private: static void InitInterface_Impl(); ::sd::View* mpView; - ViewShell* const mpViewSh; }; } // end of namespace sd diff --git a/sd/source/ui/inc/MediaObjectBar.hxx b/sd/source/ui/inc/MediaObjectBar.hxx index 704462fe668c..7c70f340226b 100644 --- a/sd/source/ui/inc/MediaObjectBar.hxx +++ b/sd/source/ui/inc/MediaObjectBar.hxx @@ -50,7 +50,6 @@ private: static void InitInterface_Impl(); ::sd::View* mpView; - ViewShell* const mpViewSh; }; } // end of namespace sd diff --git a/sd/source/ui/inc/TabControl.hxx b/sd/source/ui/inc/TabControl.hxx index 4fd3c496343f..45e930869d8e 100644 --- a/sd/source/ui/inc/TabControl.hxx +++ b/sd/source/ui/inc/TabControl.hxx @@ -54,7 +54,6 @@ public: void SendDeactivatePageEvent(); private: - sal_uInt16 RrePageID; DrawViewShell* pDrViewSh; bool bInternalMove; diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx index 512cd0c5be18..0c377b71a4ce 100644 --- a/sd/source/ui/inc/dlgpage.hxx +++ b/sd/source/ui/inc/dlgpage.hxx @@ -32,7 +32,6 @@ enum class ChangeType; class SdPageDlg : public SfxTabDialogController { private: - const SfxObjectShell* mpDocShell; bool mbIsImpressDoc; XColorListRef mpColorList; diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx index e6d17fdf0f1c..ef7913b344db 100644 --- a/sd/source/ui/inc/prltempl.hxx +++ b/sd/source/ui/inc/prltempl.hxx @@ -52,7 +52,6 @@ private: // for mapping with the new SvxNumBulletItem SfxItemSet aInputSet; std::unique_ptr<SfxItemSet> pOutSet; - const SfxItemSet* pOrgSet; sal_uInt16 GetOutlineLevel() const; diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx index 0a1e4bf7829a..37a43c39f44d 100644 --- a/sd/source/ui/inc/tpaction.hxx +++ b/sd/source/ui/inc/tpaction.hxx @@ -38,8 +38,6 @@ class SdDrawDocument; */ class SdActionDlg : public SfxSingleTabDialogController { -private: - const SfxItemSet& rOutAttrs; public: SdActionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View const * pView); }; diff --git a/sd/source/ui/slideshow/PaneHider.cxx b/sd/source/ui/slideshow/PaneHider.cxx index 98b260c8f774..079633271e89 100644 --- a/sd/source/ui/slideshow/PaneHider.cxx +++ b/sd/source/ui/slideshow/PaneHider.cxx @@ -39,7 +39,6 @@ using ::com::sun::star::lang::DisposedException; namespace sd { PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow) - : mrViewShell(rViewShell) { // Hide the left and right pane windows when a slideshow exists and is // not full screen. @@ -49,7 +48,7 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow) try { Reference<XControllerManager> xControllerManager ( - mrViewShell.GetViewShellBase().GetController(), UNO_QUERY_THROW); + rViewShell.GetViewShellBase().GetController(), UNO_QUERY_THROW); mxConfigurationController = xControllerManager->getConfigurationController(); if (mxConfigurationController.is()) { @@ -72,7 +71,7 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow) } } } - FrameworkHelper::Instance(mrViewShell.GetViewShellBase())->WaitForUpdate(); + FrameworkHelper::Instance(rViewShell.GetViewShellBase())->WaitForUpdate(); } catch (RuntimeException&) { diff --git a/sd/source/ui/slideshow/PaneHider.hxx b/sd/source/ui/slideshow/PaneHider.hxx index 9063f0e61a8e..44ba3eee7f68 100644 --- a/sd/source/ui/slideshow/PaneHider.hxx +++ b/sd/source/ui/slideshow/PaneHider.hxx @@ -47,7 +47,6 @@ public: ~PaneHider(); private: - const ViewShell& mrViewShell; /** Remember whether the visibility states of the windows of the panes has been modified and have to be restored. */ diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx index e64eb67edd1b..0324088fb123 100644 --- a/sd/source/ui/view/GraphicObjectBar.cxx +++ b/sd/source/ui/view/GraphicObjectBar.cxx @@ -51,10 +51,9 @@ GraphicObjectBar::GraphicObjectBar ( ViewShell* pSdViewShell, ::sd::View* pSdView ) : SfxShell (pSdViewShell->GetViewShell()), - mpView ( pSdView ), - mpViewSh ( pSdViewShell ) + mpView ( pSdView ) { - DrawDocShell* pDocShell = mpViewSh->GetDocSh(); + DrawDocShell* pDocShell = pSdViewShell->GetDocSh(); SetPool( &pDocShell->GetPool() ); SetUndoManager( pDocShell->GetUndoManager() ); diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index e891dc7cf662..7d7549885656 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -50,10 +50,9 @@ void MediaObjectBar::InitInterface_Impl() MediaObjectBar::MediaObjectBar( ViewShell* pSdViewShell, ::sd::View* pSdView ) : SfxShell( pSdViewShell->GetViewShell() ), - mpView( pSdView ), - mpViewSh( pSdViewShell ) + mpView( pSdView ) { - DrawDocShell* pDocShell = mpViewSh->GetDocSh(); + DrawDocShell* pDocShell = pSdViewShell->GetDocSh(); SetPool( &pDocShell->GetPool() ); SetUndoManager( pDocShell->GetUndoManager() ); diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx index e4502b8eef47..b09a254e9fe7 100644 --- a/sd/source/ui/view/tabcontr.cxx +++ b/sd/source/ui/view/tabcontr.cxx @@ -58,7 +58,6 @@ TabControl::TabControl(DrawViewShell* pViewSh, vcl::Window* pParent) : TabBar( pParent, WinBits( WB_BORDER | WB_3DLOOK | WB_SCROLL | WB_SIZEABLE | WB_DRAG) ), DragSourceHelper( this ), DropTargetHelper( this ), - RrePageID(1), pDrViewSh(pViewSh), bInternalMove(false) { @@ -98,7 +97,6 @@ void TabControl::MouseButtonDown(const MouseEvent& rMEvt) sal_uInt16 aPageId = GetPageId(aPos); //initialize - RrePageID=aPageId; if (aPageId == 0) { SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher(); |