From 59f398e934541e05dc9b77c1191227f8c68ea037 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 May 2018 12:58:05 +0200 Subject: loplugin:unusedfields in sd Change-Id: I01e6431279b71d0cff8f44614b3cad17f0f89460 Reviewed-on: https://gerrit.libreoffice.org/54452 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/animations/CustomAnimationList.cxx | 4 +--- sd/source/ui/dlg/animobjs.cxx | 3 +-- sd/source/ui/dlg/dlgsnap.cxx | 2 +- sd/source/ui/dlg/headerfooterdlg.cxx | 4 ++-- sd/source/ui/dlg/layeroptionsdlg.cxx | 13 ++++++------- sd/source/ui/inc/OutlineView.hxx | 3 --- sd/source/ui/inc/animobjs.hxx | 1 - sd/source/ui/inc/dlgsnap.hxx | 1 - sd/source/ui/inc/headerfooterdlg.hxx | 1 - sd/source/ui/inc/layeroptionsdlg.hxx | 2 -- sd/source/ui/sidebar/SlideBackground.cxx | 11 ----------- sd/source/ui/sidebar/SlideBackground.hxx | 1 - .../ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx | 1 - sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx | 10 +++++----- sd/source/ui/view/outlview.cxx | 15 --------------- 15 files changed, 16 insertions(+), 56 deletions(-) (limited to 'sd/source/ui') diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 59de6e7e1811..4f1b4eef4786 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -211,7 +211,6 @@ private: OUString msDescription; OUString msEffectName; CustomAnimationEffectPtr mpEffect; - const CustomAnimationPresets* mpCustomAnimationPresets; static const long nIconWidth = 19; static const long nItemMinHeight = 38; }; @@ -222,7 +221,6 @@ CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDes , msDescription( aDescription ) , msEffectName( OUString() ) , mpEffect(pEffect) -, mpCustomAnimationPresets(&CustomAnimationPresets::getCustomAnimationPresets()) { switch(mpEffect->getPresetClass()) { @@ -235,7 +233,7 @@ CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDes case EffectPresetClass::MOTIONPATH: msEffectName = SdResId(STR_CUSTOMANIMATION_MOTION_PATHS); break; } - msEffectName = msEffectName.replaceFirst( "%1" , mpCustomAnimationPresets->getUINameForPresetId(mpEffect->getPresetId())); + msEffectName = msEffectName.replaceFirst( "%1" , CustomAnimationPresets::getCustomAnimationPresets().getUINameForPresetId(mpEffect->getPresetId())); } void CustomAnimationListEntryItem::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData ) diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 8f48e7e13b29..50d795504875 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -131,7 +131,6 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW, , m_nCurrentFrame(EMPTY_FRAMELIST) , bMovie(false) , bAllObjects(false) - , pBindings(pInBindings) { get(m_pBtnFirst, "first"); get(m_pBtnReverse, "prev"); @@ -165,7 +164,7 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW, SdPage* pPage = pMyDoc->AllocSdPage(false); pMyDoc->InsertPage(pPage); - pControllerItem = new AnimationControllerItem( SID_ANIMATOR_STATE, this, pBindings ); + pControllerItem = new AnimationControllerItem( SID_ANIMATOR_STATE, this, pInBindings ); // as long as not in the resource m_pTimeField->SetFormat( TimeFieldFormat::F_SEC_CS ); diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index 40de52f786e0..6e2677806865 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -32,7 +32,6 @@ */ SdSnapLineDlg::SdSnapLineDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View const * pView) : GenericDialogController(pWindow, "modules/sdraw/ui/dlgsnap.ui", "SnapObjectDialog") - , eUIUnit(pView->GetDoc().GetUIUnit()) , aUIScale(pView->GetDoc().GetUIScale()) , m_xFtX(m_xBuilder->weld_label("xlabel")) , m_xMtrFldX(m_xBuilder->weld_metric_spin_button("x", FUNIT_CM)) @@ -50,6 +49,7 @@ SdSnapLineDlg::SdSnapLineDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, m_xBtnDelete->connect_clicked(LINK(this, SdSnapLineDlg, ClickHdl)); + FieldUnit eUIUnit = pView->GetDoc().GetUIUnit(); SetFieldUnit(*m_xMtrFldX, eUIUnit, true); SetFieldUnit(*m_xMtrFldY, eUIUnit, true); diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 636f5ac6849f..97c343c12375 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -210,9 +210,9 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar aCtrlSiz = aSiz; } - mnNotesId = mpTabCtrl->GetPageId("notes"); + sal_uInt16 nNotesId = mpTabCtrl->GetPageId("notes"); mpNotesHandoutsTabPage = VclPtr::Create( mpTabCtrl, pDoc, pNotes, true ); - mpTabCtrl->SetTabPage( mnNotesId, mpNotesHandoutsTabPage ); + mpTabCtrl->SetTabPage( nNotesId, mpNotesHandoutsTabPage ); get(maPBApplyToAll, "apply_all" ); get(maPBApply, "apply" ); diff --git a/sd/source/ui/dlg/layeroptionsdlg.cxx b/sd/source/ui/dlg/layeroptionsdlg.cxx index 2530f3cbdace..a70c71f47c54 100644 --- a/sd/source/ui/dlg/layeroptionsdlg.cxx +++ b/sd/source/ui/dlg/layeroptionsdlg.cxx @@ -25,7 +25,6 @@ SdInsertLayerDlg::SdInsertLayerDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) : GenericDialogController(pWindow, "modules/sdraw/ui/insertlayer.ui", "InsertLayerDialog") - , mrOutAttrs(rInAttrs) , m_xEdtName(m_xBuilder->weld_entry("name")) , m_xEdtTitle(m_xBuilder->weld_entry("title")) , m_xEdtDesc(m_xBuilder->weld_text_view("textview")) @@ -36,13 +35,13 @@ SdInsertLayerDlg::SdInsertLayerDlg(weld::Window* pWindow, const SfxItemSet& rInA { m_xDialog->set_title(rStr); - m_xEdtName->set_text( static_cast( mrOutAttrs.Get( ATTR_LAYER_NAME ) ).GetValue() ); - m_xEdtTitle->set_text( static_cast( mrOutAttrs.Get( ATTR_LAYER_TITLE ) ).GetValue() ); - m_xEdtDesc->set_text( static_cast( mrOutAttrs.Get( ATTR_LAYER_DESC ) ).GetValue() ); + m_xEdtName->set_text( static_cast( rInAttrs.Get( ATTR_LAYER_NAME ) ).GetValue() ); + m_xEdtTitle->set_text( static_cast( rInAttrs.Get( ATTR_LAYER_TITLE ) ).GetValue() ); + m_xEdtDesc->set_text( static_cast( rInAttrs.Get( ATTR_LAYER_DESC ) ).GetValue() ); m_xEdtDesc->set_size_request(-1, m_xEdtDesc->get_height_rows(4)); - m_xCbxVisible->set_active( static_cast( mrOutAttrs.Get( ATTR_LAYER_VISIBLE ) ).GetValue() ); - m_xCbxPrintable->set_active( static_cast( mrOutAttrs.Get( ATTR_LAYER_PRINTABLE ) ).GetValue() ); - m_xCbxLocked->set_active( static_cast( mrOutAttrs.Get( ATTR_LAYER_LOCKED ) ).GetValue() ); + m_xCbxVisible->set_active( static_cast( rInAttrs.Get( ATTR_LAYER_VISIBLE ) ).GetValue() ); + m_xCbxPrintable->set_active( static_cast( rInAttrs.Get( ATTR_LAYER_PRINTABLE ) ).GetValue() ); + m_xCbxLocked->set_active( static_cast( rInAttrs.Get( ATTR_LAYER_LOCKED ) ).GetValue() ); m_xNameFrame->set_sensitive(bDeletable); } diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx index 72d2cbee2701..d8bff6a69059 100644 --- a/sd/source/ui/inc/OutlineView.hxx +++ b/sd/source/ui/inc/OutlineView.hxx @@ -207,9 +207,6 @@ private: /** holds a model guard during drag and drop between BeginMovingHdl and EndMovingHdl */ std::unique_ptr> maDragAndDropModelGuard; - vcl::Font maPageNumberFont; - vcl::Font maBulletFont; - SvxLRSpaceItem maLRSpaceItem; Image maSlideImage; }; diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index a29440f5f7b0..e2eea1f6193c 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -124,7 +124,6 @@ private: bool bMovie; bool bAllObjects; - SfxBindings* pBindings; AnimationControllerItem* pControllerItem; ScopeLock maPlayLock; diff --git a/sd/source/ui/inc/dlgsnap.hxx b/sd/source/ui/inc/dlgsnap.hxx index 25b1f248844d..a54279494e6d 100644 --- a/sd/source/ui/inc/dlgsnap.hxx +++ b/sd/source/ui/inc/dlgsnap.hxx @@ -39,7 +39,6 @@ class SdSnapLineDlg : public weld::GenericDialogController private: int nXValue; int nYValue; - FieldUnit eUIUnit; Fraction aUIScale; std::unique_ptr m_xFtX; diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx index faf401c1754b..b344c10cef9d 100644 --- a/sd/source/ui/inc/headerfooterdlg.hxx +++ b/sd/source/ui/inc/headerfooterdlg.hxx @@ -48,7 +48,6 @@ private: VclPtr mpNotesHandoutsTabPage; sal_uInt16 mnSlidesId; - sal_uInt16 mnNotesId; VclPtr maPBApplyToAll; VclPtr maPBApply; diff --git a/sd/source/ui/inc/layeroptionsdlg.hxx b/sd/source/ui/inc/layeroptionsdlg.hxx index 4efd30368c63..8d338eb286a2 100644 --- a/sd/source/ui/inc/layeroptionsdlg.hxx +++ b/sd/source/ui/inc/layeroptionsdlg.hxx @@ -29,8 +29,6 @@ class SfxItemSet; class SD_DLLPUBLIC SdInsertLayerDlg : public weld::GenericDialogController { private: - const SfxItemSet& mrOutAttrs; - std::unique_ptr m_xEdtName; std::unique_ptr m_xEdtTitle; std::unique_ptr m_xEdtDesc; diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index d815fefebd41..7ce4bb4e6aa7 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -152,17 +152,6 @@ SlideBackground::SlideBackground( maCustomEntry = get("customlabel")->GetText(); - SfxViewFrame* pCurrent = SfxViewFrame::Current(); - if (pCurrent) - { - const SfxPoolItem* pItem = nullptr; - pCurrent->GetBindings().GetDispatcher()->QueryState( SID_ATTR_PAGE_SIZE, pItem ); - if (pItem) - { - const SvxSizeItem* pSize = static_cast( pItem ); - m_aPageSize = pSize->GetSize(); - } - } addListener(); Initialize(); } diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx index 9dfa890edc7c..4cca5b24807a 100644 --- a/sd/source/ui/sidebar/SlideBackground.hxx +++ b/sd/source/ui/sidebar/SlideBackground.hxx @@ -141,7 +141,6 @@ private: SfxBindings* mpBindings; MapUnit meUnit; - Size m_aPageSize; DECL_LINK(FillBackgroundHdl, ListBox&, void); DECL_LINK(FillStyleModifyHdl, ListBox&, void); diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx index 418f0062d819..4dcfd6aadc18 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx @@ -122,7 +122,6 @@ private: private: VclPtr mpWindow; - Size maPageObjectSize; ::tools::Rectangle maFocusIndicatorBoundingBox; ::tools::Rectangle maPageObjectBoundingBox; ::tools::Rectangle maPageNumberAreaBoundingBox; diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx index 58d9c3aa9fc4..772506259d26 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx @@ -42,7 +42,6 @@ PageObjectLayouter::PageObjectLayouter ( sd::Window *pWindow, const sal_Int32 nPageCount) : mpWindow(pWindow), - maPageObjectSize(rPageObjectWindowSize.Width(), rPageObjectWindowSize.Height()), maPageObjectBoundingBox(), maPageNumberAreaBoundingBox(), maPreviewBoundingBox(), @@ -56,19 +55,20 @@ PageObjectLayouter::PageObjectLayouter ( const int nMaximumBorderWidth (gnOuterBorderWidth); const int nFocusIndicatorWidth (Theme_FocusIndicatorWidth); + Size aPageObjectSize(rPageObjectWindowSize.Width(), rPageObjectWindowSize.Height()); maPreviewBoundingBox = CalculatePreviewBoundingBox( - maPageObjectSize, + aPageObjectSize, Size(rPageSize.Width(), rPageSize.Height()), aPageNumberAreaSize.Width(), nFocusIndicatorWidth); - maFocusIndicatorBoundingBox = ::tools::Rectangle(Point(0,0), maPageObjectSize); + maFocusIndicatorBoundingBox = ::tools::Rectangle(Point(0,0), rPageObjectWindowSize); maPageObjectBoundingBox = ::tools::Rectangle( Point( nFocusIndicatorWidth, nFocusIndicatorWidth), Size( - maPageObjectSize.Width()-2*nFocusIndicatorWidth, - maPageObjectSize.Height()-2*nFocusIndicatorWidth)); + aPageObjectSize.Width()-2*nFocusIndicatorWidth, + aPageObjectSize.Height()-2*nFocusIndicatorWidth)); maPageNumberAreaBoundingBox = ::tools::Rectangle( Point( diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 5155581ac54c..d850f1598428 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -121,21 +121,6 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie Link aLink( LINK(this,OutlineView,EventMultiplexerListener) ); mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->AddEventListener(aLink); - LanguageType eLang = mrOutliner.GetDefaultLanguage(); - maPageNumberFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, GetDefaultFontFlags::NONE ); - maPageNumberFont.SetFontHeight( 500 ); - - maBulletFont.SetColor( COL_AUTO ); - maBulletFont.SetFontHeight( 1000 ); - maBulletFont.SetCharSet(RTL_TEXTENCODING_MS_1252); // and replacing other values by standard - maBulletFont.SetFamilyName( "StarSymbol" ); - maBulletFont.SetWeight(WEIGHT_NORMAL); - maBulletFont.SetUnderline(LINESTYLE_NONE); - maBulletFont.SetStrikeout(STRIKEOUT_NONE); - maBulletFont.SetItalic(ITALIC_NONE); - maBulletFont.SetOutline(false); - maBulletFont.SetShadow(false); - Reference xFrame (mrOutlineViewShell.GetViewShellBase().GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY); maSlideImage = vcl::CommandInfoProvider::GetImageForCommand(".uno:ShowSlide", xFrame, vcl::ImageType::Size26); -- cgit