diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-24 09:15:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-25 08:06:15 +0100 |
commit | 970ca8de0be4c4cd9485170f3c56a34b4069eec2 (patch) | |
tree | 1eb110e926d1539b729e06ab78e723f5ca19ae1c | |
parent | 880af0672c6362b0dbdae137d92e8ebf85a7b335 (diff) |
loplugin:unusedfields in various
Change-Id: I31d0e6c3559af2e322fb474b97f3bbf4d5064831
Reviewed-on: https://gerrit.libreoffice.org/68280
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
15 files changed, 8 insertions, 67 deletions
diff --git a/accessibility/inc/standard/vclxaccessiblelistitem.hxx b/accessibility/inc/standard/vclxaccessiblelistitem.hxx index 02eb11641755..d6fdb6f762bc 100644 --- a/accessibility/inc/standard/vclxaccessiblelistitem.hxx +++ b/accessibility/inc/standard/vclxaccessiblelistitem.hxx @@ -66,7 +66,6 @@ private: sal_uInt32 m_nClientId; rtl::Reference< VCLXAccessibleList > m_xParent; - css::uno::Reference< css::accessibility::XAccessibleContext > m_xParentContext; virtual ~VCLXAccessibleListItem() override = default; /** this function is called upon disposing the component diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index b406725f519c..e674cd26e466 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -72,7 +72,6 @@ VCLXAccessibleListItem::VCLXAccessibleListItem(sal_Int32 _nIndexInParent, const , m_xParent(_xParent) { assert(m_xParent.is()); - m_xParentContext = m_xParent->getAccessibleContext(); ::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent->getListBoxHelper(); if (pListBoxHelper) m_sEntryText = pListBoxHelper->GetEntry(static_cast<sal_uInt16>(_nIndexInParent)); @@ -157,7 +156,6 @@ void SAL_CALL VCLXAccessibleListItem::disposing() VCLXAccessibleListItem_BASE::disposing(); m_sEntryText.clear(); m_xParent = nullptr; - m_xParentContext = nullptr; nId = m_nClientId; m_nClientId = 0; diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 48eb1c8cf3e4..7de114b17ced 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1261,7 +1261,6 @@ ItemType DialogWindow::GetType () const DialogWindowLayout::DialogWindowLayout (vcl::Window* pParent, ObjectCatalog& rObjectCatalog_) : Layout(pParent), - pChild(nullptr), rObjectCatalog(rObjectCatalog_), pPropertyBrowser(nullptr) { @@ -1278,7 +1277,6 @@ void DialogWindowLayout::dispose() if (pPropertyBrowser) Remove(pPropertyBrowser); pPropertyBrowser.disposeAndClear(); - pChild.clear(); Layout::dispose(); } @@ -1321,7 +1319,6 @@ void DialogWindowLayout::UpdatePropertyBrowser () void DialogWindowLayout::Activating (BaseWindow& rChild) { assert(dynamic_cast<DialogWindow*>(&rChild)); - pChild = &static_cast<DialogWindow&>(rChild); rObjectCatalog.SetLayoutWindow(this); rObjectCatalog.UpdateEntries(); rObjectCatalog.Show(); @@ -1336,7 +1333,6 @@ void DialogWindowLayout::Deactivating () rObjectCatalog.Hide(); if (pPropertyBrowser) pPropertyBrowser->Hide(); - pChild = nullptr; } void DialogWindowLayout::ExecuteGlobal (SfxRequest& rReq) diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index e48c135f4480..e955b6b71430 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -137,8 +137,6 @@ protected: virtual void OnFirstSize (long nWidth, long nHeight) override; private: - // child window - VclPtr<DialogWindow> pChild; // dockable windows: // object catalog (owned by Shell) ObjectCatalog& rObjectCatalog; diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index adde5bc6aec1..dfaabff61fe6 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -348,7 +348,6 @@ public: protected: DataSeriesPointWrapper* m_pDataSeriesPointWrapper; mutable Any m_aDefaultValue; - mutable Any m_aOuterValue; }; WrappedLineColorProperty::WrappedLineColorProperty( @@ -356,23 +355,18 @@ WrappedLineColorProperty::WrappedLineColorProperty( : WrappedSeriesAreaOrLineProperty("LineColor","BorderColor","Color", pDataSeriesPointWrapper ) , m_pDataSeriesPointWrapper( pDataSeriesPointWrapper ) , m_aDefaultValue(uno::Any(sal_Int32( 0x0099ccff ))) // blue 8 - , m_aOuterValue(m_aDefaultValue) { } void WrappedLineColorProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const { - if( m_pDataSeriesPointWrapper && m_pDataSeriesPointWrapper->isLinesForbidden() ) - m_aOuterValue = rOuterValue; - else + if( !m_pDataSeriesPointWrapper || !m_pDataSeriesPointWrapper->isLinesForbidden() ) WrappedSeriesAreaOrLineProperty::setPropertyValue( rOuterValue, xInnerPropertySet ); } void WrappedLineColorProperty::setPropertyToDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const { - if( m_pDataSeriesPointWrapper && m_pDataSeriesPointWrapper->isLinesForbidden() ) - m_aOuterValue = m_aDefaultValue; - else + if( !m_pDataSeriesPointWrapper || !m_pDataSeriesPointWrapper->isLinesForbidden() ) WrappedSeriesAreaOrLineProperty::setPropertyToDefault( xInnerPropertyState ); } @@ -396,7 +390,6 @@ public: protected: DataSeriesPointWrapper* m_pDataSeriesPointWrapper; mutable Any m_aDefaultValue; - mutable Any m_aOuterValue; }; WrappedLineStyleProperty::WrappedLineStyleProperty( @@ -404,7 +397,6 @@ WrappedLineStyleProperty::WrappedLineStyleProperty( : WrappedSeriesAreaOrLineProperty("LineStyle","BorderStyle", "LineStyle", pDataSeriesPointWrapper ) , m_pDataSeriesPointWrapper( pDataSeriesPointWrapper ) , m_aDefaultValue(uno::Any(drawing::LineStyle_SOLID)) - , m_aOuterValue(m_aDefaultValue) { } @@ -413,7 +405,6 @@ void WrappedLineStyleProperty::setPropertyValue( const Any& rOuterValue, const R Any aNewValue(rOuterValue); if( m_pDataSeriesPointWrapper && m_pDataSeriesPointWrapper->isLinesForbidden() ) { - m_aOuterValue = rOuterValue; aNewValue <<= drawing::LineStyle_NONE; } WrappedSeriesAreaOrLineProperty::setPropertyValue( aNewValue, xInnerPropertySet ); @@ -421,9 +412,7 @@ void WrappedLineStyleProperty::setPropertyValue( const Any& rOuterValue, const R void WrappedLineStyleProperty::setPropertyToDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const { - if( m_pDataSeriesPointWrapper && m_pDataSeriesPointWrapper->isLinesForbidden() ) - m_aOuterValue = m_aDefaultValue; - else + if( !m_pDataSeriesPointWrapper || !m_pDataSeriesPointWrapper->isLinesForbidden() ) WrappedSeriesAreaOrLineProperty::setPropertyToDefault( xInnerPropertyState ); } diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index c274f88aa48f..954c61aba2ff 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -657,9 +657,6 @@ public: explicit WrappedErrorBarRangePositiveProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); - -private: - mutable Any m_aOuterValue; }; WrappedErrorBarRangePositiveProperty::WrappedErrorBarRangePositiveProperty( @@ -720,9 +717,6 @@ public: explicit WrappedErrorBarRangeNegativeProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ); - -private: - mutable Any m_aOuterValue; }; WrappedErrorBarRangeNegativeProperty::WrappedErrorBarRangeNegativeProperty( diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx index d7b7b721bbfc..267266388c71 100644 --- a/comphelper/source/misc/SelectionMultiplex.cxx +++ b/comphelper/source/misc/SelectionMultiplex.cxx @@ -40,18 +40,11 @@ void OSelectionChangeListener::_disposing(const EventObject&) } -void OSelectionChangeListener::setAdapter(OSelectionChangeMultiplexer* pAdapter) -{ - ::osl::MutexGuard aGuard(m_rMutex); - m_xAdapter = pAdapter; -} - OSelectionChangeMultiplexer::OSelectionChangeMultiplexer(OSelectionChangeListener* _pListener, const Reference< XSelectionSupplier>& _rxSet) :m_xSet(_rxSet) ,m_pListener(_pListener) ,m_nLockCount(0) { - m_pListener->setAdapter(this); osl_atomic_increment(&m_refCount); { Reference< XSelectionChangeListener> xPreventDelete(this); @@ -87,9 +80,6 @@ void SAL_CALL OSelectionChangeMultiplexer::disposing( const EventObject& _rSour // tell the listener if (!locked()) m_pListener->_disposing(_rSource); - // disconnect the listener - if (m_pListener) // may have been reset whilst calling into _disposing - m_pListener->setAdapter(nullptr); } m_pListener = nullptr; diff --git a/cppcanvas/source/inc/canvasgraphichelper.hxx b/cppcanvas/source/inc/canvasgraphichelper.hxx index 96daa1a74b9f..fee174300e83 100644 --- a/cppcanvas/source/inc/canvasgraphichelper.hxx +++ b/cppcanvas/source/inc/canvasgraphichelper.hxx @@ -63,7 +63,6 @@ namespace cppcanvas boost::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon; CanvasSharedPtr mpCanvas; - css::uno::Reference< css::rendering::XGraphicDevice > mxGraphicDevice; }; } diff --git a/cppcanvas/source/tools/canvasgraphichelper.cxx b/cppcanvas/source/tools/canvasgraphichelper.cxx index ded58f9f6b2e..592179f42364 100644 --- a/cppcanvas/source/tools/canvasgraphichelper.cxx +++ b/cppcanvas/source/tools/canvasgraphichelper.cxx @@ -43,19 +43,12 @@ namespace cppcanvas { CanvasGraphicHelper::CanvasGraphicHelper( const CanvasSharedPtr& rParentCanvas ) : maClipPolyPolygon(), - mpCanvas( rParentCanvas ), - mxGraphicDevice() + mpCanvas( rParentCanvas ) { OSL_ENSURE( mpCanvas.get() != nullptr && mpCanvas->getUNOCanvas().is(), "CanvasGraphicHelper::CanvasGraphicHelper: no valid canvas" ); - if( mpCanvas.get() != nullptr && - mpCanvas->getUNOCanvas().is() ) - { - mxGraphicDevice = mpCanvas->getUNOCanvas()->getDevice(); - } - ::canvas::tools::initRenderState( maRenderState ); } diff --git a/include/comphelper/SelectionMultiplex.hxx b/include/comphelper/SelectionMultiplex.hxx index 77ed7a363636..f1a0e294d765 100644 --- a/include/comphelper/SelectionMultiplex.hxx +++ b/include/comphelper/SelectionMultiplex.hxx @@ -45,22 +45,14 @@ namespace comphelper { friend class OSelectionChangeMultiplexer; - rtl::Reference<OSelectionChangeMultiplexer> m_xAdapter; - ::osl::Mutex& m_rMutex; - public: - OSelectionChangeListener(::osl::Mutex& _rMutex) - : m_rMutex(_rMutex) { } + OSelectionChangeListener() {} virtual ~OSelectionChangeListener(); /// @throws css::uno::RuntimeException virtual void _selectionChanged( const css::lang::EventObject& aEvent ) = 0; /// @throws css::uno::RuntimeException virtual void _disposing(const css::lang::EventObject& _rSource); - - protected: - // pseudo-private. Making it private now could break compatibility - void setAdapter( OSelectionChangeMultiplexer* _pAdapter ); }; diff --git a/include/oox/drawingml/shapegroupcontext.hxx b/include/oox/drawingml/shapegroupcontext.hxx index c273d9c03263..1f9c860dc940 100644 --- a/include/oox/drawingml/shapegroupcontext.hxx +++ b/include/oox/drawingml/shapegroupcontext.hxx @@ -38,9 +38,7 @@ public: virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; protected: - ShapePtr mpGroupShapePtr; - ShapePtr mpMasterShapePtr; }; } } diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx index c916642f1fcc..2bd12eafcb50 100644 --- a/oox/source/drawingml/shapegroupcontext.cxx +++ b/oox/source/drawingml/shapegroupcontext.cxx @@ -47,12 +47,11 @@ namespace oox { namespace drawingml { ShapeGroupContext::ShapeGroupContext( ContextHandler2Helper const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr const & pGroupShapePtr ) : ContextHandler2( rParent ) , mpGroupShapePtr( pGroupShapePtr ) -, mpMasterShapePtr( pMasterShapePtr ) { if( pMasterShapePtr ) mpGroupShapePtr->setWps(pMasterShapePtr->getWps()); - if( mpMasterShapePtr.get() && mpGroupShapePtr.get() ) - mpMasterShapePtr->addChild( mpGroupShapePtr ); + if( pMasterShapePtr.get() && mpGroupShapePtr.get() ) + pMasterShapePtr->addChild( mpGroupShapePtr ); } ShapeGroupContext::~ShapeGroupContext() diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index e766a13cc6a9..cf72819673b7 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -207,7 +207,7 @@ private: NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rController ) :SvTreeListBox( pParent, WB_TABSTOP| WB_HASBUTTONS|WB_HASLINES|WB_BORDER|WB_HSCROLL|WB_HASBUTTONSATROOT ) - ,comphelper::OSelectionChangeListener(m_aMutex) + ,comphelper::OSelectionChangeListener() ,OPropertyChangeListener(m_aMutex) ,m_aTimerTriggered(-1,-1) ,m_aDropActionType( DA_SCROLLUP ) diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 0cc102fd8030..52ed415d7fbd 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -50,7 +50,6 @@ DictionaryList::DictionaryList(std::unique_ptr<weld::TreeView> xControl) , m_pED_Mapping(nullptr) , m_pLB_Property(nullptr) , m_aToBeDeleted() - , m_nSortColumnIndex(0) { m_xControl->make_sorted(); } diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx index fd4fe0b143ad..04925a5022af 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx @@ -67,7 +67,6 @@ public: DictionaryEntry* getFirstSelectedEntry() const; void sortByColumn( sal_uInt16 nSortColumnIndex, bool bSortAtoZ ); - sal_uInt16 getSortColumn() const { return m_nSortColumnIndex;} void set_size_request(int nWidth, int nHeight) { m_xControl->set_size_request(nWidth, nHeight); } void hide() { m_xControl->hide(); } @@ -100,8 +99,6 @@ private: weld::ComboBox* m_pLB_Property; std::vector< DictionaryEntry* > m_aToBeDeleted; - - sal_uInt16 m_nSortColumnIndex; }; class ChineseDictionaryDialog : public weld::GenericDialogController |