diff options
author | Noel Grandin <noel@peralex.com> | 2016-07-18 09:03:51 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-07-19 05:39:46 +0000 |
commit | 36313d93ac6f88bb4b4e4ed7109db583c7ce9886 (patch) | |
tree | f27ca9d75beb484a6ce93268fc15a0bfd470e3a1 | |
parent | a7b5be118191a4e8a6cd422b5b2438a1ac22f36f (diff) |
improve unnecessaryoverride plugin
to ignore ImplicitCastExpr when calling superclass method
Change-Id: I76a3068446acfee85aa1baeb216e57f63c7099c1
Reviewed-on: https://gerrit.libreoffice.org/27279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
24 files changed, 9 insertions, 116 deletions
diff --git a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx index 81b580409f31..9b0944e22154 100644 --- a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx +++ b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx @@ -47,16 +47,6 @@ private: const css::uno::Sequence<double>& aYValues ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence<css::geometry::RealPoint2D> SAL_CALL getCurveValues( - double min, - double max, - sal_Int32 nPointCount, - const css::uno::Reference<css::chart2::XScaling>& xScalingX, - const css::uno::Reference<css::chart2::XScaling>& xScalingY, - sal_Bool bMaySkipPointsInCalculation ) - throw (css::lang::IllegalArgumentException, - css::uno::RuntimeException, std::exception) override; - std::vector<double> mCoefficients; }; diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx index 2a135b1f4277..2134b4fb6b75 100644 --- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx @@ -221,18 +221,6 @@ double SAL_CALL PolynomialRegressionCurveCalculator::getCurveValue( double x ) return fResult; } -uno::Sequence< geometry::RealPoint2D > SAL_CALL PolynomialRegressionCurveCalculator::getCurveValues( - double min, double max, sal_Int32 nPointCount, - const uno::Reference< chart2::XScaling >& xScalingX, - const uno::Reference< chart2::XScaling >& xScalingY, - sal_Bool bMaySkipPointsInCalculation ) - throw (lang::IllegalArgumentException, - uno::RuntimeException, std::exception) -{ - - return RegressionCurveCalculator::getCurveValues( min, max, nPointCount, xScalingX, xScalingY, bMaySkipPointsInCalculation ); -} - OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation( const uno::Reference< util::XNumberFormatter >& xNumFormatter, sal_Int32 nNumberFormatKey, sal_Int32* pFormulaMaxWidth /* = nullptr */ ) const diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index ece662371120..440d46971222 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -101,11 +101,6 @@ double AreaChart::getMaximumX() return fMax; } -bool AreaChart::isExpandIfValuesCloseToBorder( sal_Int32 nDimensionIndex ) -{ - return VSeriesPlotter::isExpandIfValuesCloseToBorder( nDimensionIndex ); -} - bool AreaChart::isSeparateStackingForDifferentSigns( sal_Int32 /*nDimensionIndex*/ ) { // no separate stacking in all types of line/area charts diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx index 14e65f8b8bd4..b1fd51023365 100644 --- a/chart2/source/view/charttypes/AreaChart.hxx +++ b/chart2/source/view/charttypes/AreaChart.hxx @@ -45,7 +45,6 @@ public: // MinimumAndMaximumSupplier virtual double getMaximumX() override; - virtual bool isExpandIfValuesCloseToBorder( sal_Int32 nDimensionIndex ) override; virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex ) override; virtual LegendSymbolStyle getLegendSymbolStyle() override; diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx index cd426695cd6b..d77b84f6037c 100644 --- a/compilerplugins/clang/unnecessaryoverride.cxx +++ b/compilerplugins/clang/unnecessaryoverride.cxx @@ -66,6 +66,12 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl) // not sure what is happening here if (aFileName == SRCDIR "/extensions/source/bibliography/datman.cxx") return true; + // some very creative method hiding going on here + if (aFileName == SRCDIR "/svx/source/dialog/checklbx.cxx") + return true; + // entertaining template magic + if (aFileName == SRCDIR "/sc/source/ui/vba/vbaformatcondition.cxx") + return true; const CXXMethodDecl* overriddenMethodDecl = *methodDecl->begin_overridden_methods(); @@ -133,7 +139,8 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl) if (!expr2) return true; for (unsigned i = 0; i<callExpr->getNumArgs(); ++i) { - const DeclRefExpr * declRefExpr = dyn_cast<DeclRefExpr>(callExpr->getArg(i)); + // ignore ImplicitCastExpr + const DeclRefExpr * declRefExpr = dyn_cast<DeclRefExpr>(callExpr->getArg(i)->IgnoreImplicit()); if (!declRefExpr || declRefExpr->getDecl() != methodDecl->getParamDecl(i)) return true; } diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 8a79ba5c60c6..8ba080dba886 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -209,9 +209,4 @@ IMPL_LINK_NOARG_TYPED( SvxEventConfigPage, SelectHdl_Impl, ListBox&, void ) mpImpl->pEventLB->SetUpdateMode( true ); } -bool SvxEventConfigPage::FillItemSet( SfxItemSet* rSet ) -{ - return SvxMacroTabPage_::FillItemSet( rSet ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/customize/eventdlg.hxx b/cui/source/customize/eventdlg.hxx index 86c37c289dce..a6d447909564 100644 --- a/cui/source/customize/eventdlg.hxx +++ b/cui/source/customize/eventdlg.hxx @@ -52,9 +52,6 @@ public: void LateInit( const css::uno::Reference< css::frame::XFrame >& _rxFrame ); -protected: - virtual bool FillItemSet( SfxItemSet* ) override; - private: void ImplInitDocument(); }; diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 61c508da0df4..a17220c2f55a 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -1265,11 +1265,6 @@ void ODBExport::ExportStyles_(bool bUsed) SvXMLExport::ExportStyles_(bUsed); } -sal_uInt32 ODBExport::exportDoc(enum ::xmloff::token::XMLTokenEnum eClass) -{ - return SvXMLExport::exportDoc( eClass ); -} - void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps) { Reference<XQueryDefinitionsSupplier> xSup(getDataSource(),UNO_QUERY); diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index 4a9c6a141a09..4a25fcf2da67 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -164,7 +164,6 @@ protected: virtual void ExportContent_() override; virtual void ExportMasterStyles_() override; virtual void ExportFontDecls_() override; - virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) override; virtual SvXMLAutoStylePoolP* CreateAutoStylePool() override; virtual void GetViewSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override; diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx index 92a7962ad75f..af1c79c0c946 100644 --- a/dbaccess/source/ui/inc/querycontroller.hxx +++ b/dbaccess/source/ui/inc/querycontroller.hxx @@ -191,12 +191,6 @@ namespace dbaui virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override; // OPropertySetHelper - virtual sal_Bool SAL_CALL convertFastPropertyValue( - css::uno::Any& rConvertedValue, - css::uno::Any& rOldValue, - sal_Int32 nHandle, - const css::uno::Any& rValue - ) throw (css::lang::IllegalArgumentException) override; virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 9787efdcb435..66a203b18314 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -365,11 +365,6 @@ Reference< XPropertySetInfo > SAL_CALL OQueryController::getPropertySetInfo() th return xInfo; } -sal_Bool SAL_CALL OQueryController::convertFastPropertyValue( Any& o_rConvertedValue, Any& o_rOldValue, sal_Int32 i_nHandle, const Any& i_rValue ) throw (IllegalArgumentException) -{ - return OPropertyContainer::convertFastPropertyValue( o_rConvertedValue, o_rOldValue, i_nHandle, i_rValue ); -} - void SAL_CALL OQueryController::setFastPropertyValue_NoBroadcast( sal_Int32 i_nHandle, const Any& i_rValue ) throw ( Exception, std::exception ) { OPropertyContainer::setFastPropertyValue_NoBroadcast( i_nHandle, i_rValue ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 56cb7eb822ca..66cf6f05056f 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -381,12 +381,6 @@ void OFormattedModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const OEditBaseModel::setFastPropertyValue_NoBroadcast(nHandle, rValue); } -sal_Bool OFormattedModel::convertFastPropertyValue(Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue) - throw( IllegalArgumentException ) -{ - return OEditBaseModel::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue); -} - void OFormattedModel::setPropertyToDefaultByHandle(sal_Int32 nHandle) { if (nHandle == PROPERTY_ID_FORMATSSUPPLIER) diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx index 3a4a0f3ab81f..38ddf3596831 100644 --- a/forms/source/component/FormattedField.hxx +++ b/forms/source/component/FormattedField.hxx @@ -83,9 +83,6 @@ class OFormattedModel // XPropertySet virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue, sal_Int32 nHandle ) const override; - virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any& rConvertedValue, css::uno::Any& rOldValue, - sal_Int32 nHandle, const css::uno::Any& rValue ) - throw(css::lang::IllegalArgumentException) override; virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any& rValue) throw ( css::uno::Exception, std::exception) override; // XLoadListener diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index a6ba5c516c0d..8051dc60ac96 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -248,10 +248,6 @@ namespace framework // OPropertySetHelper - virtual sal_Bool SAL_CALL convertFastPropertyValue ( css::uno::Any& aConvertedValue , - css::uno::Any& aOldValue , - sal_Int32 nHandle , - const css::uno::Any& aValue ) throw( css::lang::IllegalArgumentException ) override; virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , const css::uno::Any& aValue ) throw( css::uno::Exception, std::exception ) override; using cppu::OPropertySetHelper::getFastPropertyValue; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 7d65c33c4c97..ead5fc8241a8 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -3110,16 +3110,6 @@ void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Even } } -// OPropertySetHelper - -sal_Bool SAL_CALL LayoutManager::convertFastPropertyValue( Any& aConvertedValue, - Any& aOldValue, - sal_Int32 nHandle, - const Any& aValue ) throw( lang::IllegalArgumentException ) -{ - return LayoutManager_PBase::convertFastPropertyValue( aConvertedValue, aOldValue, nHandle, aValue ); -} - void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& aValue ) throw( uno::Exception, std::exception ) { diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index ebb66a3cdba8..1fbf33e42440 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1367,11 +1367,6 @@ void ORptExport::ExportStyles_(bool bUsed) GetShapeExport()->ExportGraphicDefaults(); } -sal_uInt32 ORptExport::exportDoc(enum ::xmloff::token::XMLTokenEnum eClass) -{ - return SvXMLExport::exportDoc( eClass ); -} - OUString ORptExport::implConvertNumber(sal_Int32 _nValue) { OUStringBuffer aBuffer; diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx index d57194a87045..73c77f806b0d 100644 --- a/reportdesign/source/filter/xml/xmlExport.hxx +++ b/reportdesign/source/filter/xml/xmlExport.hxx @@ -149,7 +149,6 @@ protected: virtual void ExportContent_() override; virtual void ExportMasterStyles_() override; virtual void ExportFontDecls_() override; - virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) override; virtual SvXMLAutoStylePoolP* CreateAutoStylePool() override; virtual XMLShapeExport* CreateShapeExport() override; diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 39599bda310f..2441b6862925 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -987,14 +987,6 @@ ScMasterPageContext::~ScMasterPageContext() { } -SvXMLImportContext *ScMasterPageContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const uno::Reference< XAttributeList > & xAttrList ) -{ - return XMLTextMasterPageContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); -} - SvXMLImportContext *ScMasterPageContext::CreateHeaderFooterContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index 023dc0d20766..9072a24ab2be 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -220,11 +220,6 @@ public: bool bOverwrite ); virtual ~ScMasterPageContext(); - virtual SvXMLImportContext *CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; - virtual SvXMLImportContext *CreateHeaderFooterContext( sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index 80bff983032e..5db8351187f8 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -132,6 +132,7 @@ ScVbaFormatCondition::Operator( bool bVal ) throw (script::BasicErrorException ) { return ScVbaFormatCondition_BASE::Operator( bVal ); } + ::sal_Int32 SAL_CALL ScVbaFormatCondition::Operator( ) throw (script::BasicErrorException, uno::RuntimeException) { diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 3ce8975084d4..faca04060d6c 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -700,11 +700,4 @@ SdrLayerID FmFormObj::GetLayer() const return SdrUnoObj::GetLayer(); } -void FmFormObj::NbcSetLayer(SdrLayerID nLayer) -{ - // #i72535# - // See above. To fix, use parent functionality - return SdrUnoObj::NbcSetLayer(nLayer); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index dba50cf4ec97..92fe256e8a70 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -101,7 +101,6 @@ protected: // #i70852# override Layer interface to force to FormControl layer SAL_DLLPRIVATE virtual SdrLayerID GetLayer() const override; - SAL_DLLPRIVATE virtual void NbcSetLayer(SdrLayerID nLayer) override; private: /** isolates the control model from its form component hierarchy, i.e. removes it from diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx index 4f711bb042ce..0470e71dade9 100644 --- a/xmloff/source/draw/ximpnote.cxx +++ b/xmloff/source/draw/ximpnote.cxx @@ -92,12 +92,4 @@ SdXMLNotesContext::~SdXMLNotesContext() { } -SvXMLImportContext *SdXMLNotesContext::CreateChildContext( sal_uInt16 nPrefix, - const OUString& rLocalName, - const uno::Reference< xml::sax::XAttributeList>& xAttrList ) -{ - // no own context in notes, call parent - return SdXMLGenericPageContext::CreateChildContext(nPrefix, rLocalName, xAttrList); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpnote.hxx b/xmloff/source/draw/ximpnote.hxx index a53a5c70084c..5da731fdddfa 100644 --- a/xmloff/source/draw/ximpnote.hxx +++ b/xmloff/source/draw/ximpnote.hxx @@ -38,10 +38,6 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, css::uno::Reference< css::drawing::XShapes >& rShapes); virtual ~SdXMLNotesContext(); - - virtual SvXMLImportContext *CreateChildContext( - sal_uInt16 nPrefix, const OUString& rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; #endif // INCLUDED_XMLOFF_SOURCE_DRAW_XIMPNOTE_HXX |