From 990102be61a47a14a73a25ee320ac1033250777e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Nov 2016 14:37:16 +0200 Subject: loplugin:unnecessaryvirtual in hwpfilter..rsc Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868 Reviewed-on: https://gerrit.libreoffice.org/30661 Tested-by: Jenkins Reviewed-by: Noel Grandin --- hwpfilter/source/formula.h | 4 ++-- idlc/inc/astexpression.hxx | 4 ++-- idlc/inc/aststack.hxx | 4 ++-- idlc/inc/fehelper.hxx | 10 +++++----- idlc/inc/idlc.hxx | 4 ++-- include/formula/FormulaCompiler.hxx | 4 ++-- include/framework/framelistanalyzer.hxx | 4 ++-- include/framework/menuconfiguration.hxx | 4 ++-- include/jvmaccess/unovirtualmachine.hxx | 4 ++-- include/jvmaccess/virtualmachine.hxx | 4 ++-- include/oox/core/recordparser.hxx | 4 ++-- include/oox/crypto/CryptTools.hxx | 4 ++-- include/oox/drawingml/shape.hxx | 2 +- include/oox/helper/grabbagstack.hxx | 5 ++--- include/oox/ole/axcontrol.hxx | 4 ++-- include/oox/ole/vbacontrol.hxx | 4 ++-- include/oox/ppt/timenode.hxx | 4 ++-- jvmfwk/source/elements.hxx | 4 ++-- linguistic/inc/iprcache.hxx | 4 ++-- lotuswordpro/source/filter/lwpbulletstylemgr.hxx | 4 ++-- lotuswordpro/source/filter/lwplayout.hxx | 8 ++++---- lotuswordpro/source/filter/xfilter/xfofficemeta.hxx | 4 ++-- oox/inc/drawingml/customshapeproperties.hxx | 5 ++--- oox/source/ole/olehelper.cxx | 3 +-- rsc/inc/rscerror.h | 3 +-- 25 files changed, 52 insertions(+), 56 deletions(-) diff --git a/hwpfilter/source/formula.h b/hwpfilter/source/formula.h index 88febf15bd98..642e22688f30 100644 --- a/hwpfilter/source/formula.h +++ b/hwpfilter/source/formula.h @@ -31,7 +31,7 @@ class Node; using namespace ::com::sun::star::xml::sax; -class Formula +class Formula final { public: explicit Formula(char *_eq) @@ -40,7 +40,7 @@ public: eq = _eq; trim(); } - virtual ~Formula(){ } + ~Formula(){ } void setDocumentHandler(Reference < XDocumentHandler > const & xHandler ) { diff --git a/idlc/inc/astexpression.hxx b/idlc/inc/astexpression.hxx index e64b314baa52..e092ffd99fd0 100644 --- a/idlc/inc/astexpression.hxx +++ b/idlc/inc/astexpression.hxx @@ -87,7 +87,7 @@ struct AstExprValue const sal_Char* SAL_CALL exprTypeToString(ExprType t); -class AstExpression +class AstExpression final { public: // Constructor(s) @@ -100,7 +100,7 @@ public: AstExpression(double d); AstExpression(OString* scopedName); - virtual ~AstExpression(); + ~AstExpression(); // Data Accessors AstExprValue* getExprValue() diff --git a/idlc/inc/aststack.hxx b/idlc/inc/aststack.hxx index c704e91f91b3..8793f918d52a 100644 --- a/idlc/inc/aststack.hxx +++ b/idlc/inc/aststack.hxx @@ -23,11 +23,11 @@ class AstScope; -class AstStack +class AstStack final { public: AstStack(); - virtual ~AstStack(); + ~AstStack(); sal_uInt32 depth() { return m_top;} AstScope* top(); diff --git a/idlc/inc/fehelper.hxx b/idlc/inc/fehelper.hxx index 61bc51638dad..9cec2f644e25 100644 --- a/idlc/inc/fehelper.hxx +++ b/idlc/inc/fehelper.hxx @@ -24,11 +24,11 @@ #include -class FeDeclarator +class FeDeclarator final { public: FeDeclarator(const OString& name); - virtual ~FeDeclarator(); + ~FeDeclarator(); const OString& getName() { return m_name; } bool checkType(AstDeclaration const * pType); @@ -39,18 +39,18 @@ private: typedef ::std::list< FeDeclarator* > FeDeclList; -class FeInheritanceHeader +class FeInheritanceHeader final { public: FeInheritanceHeader( NodeType nodeType, OString* pName, OString* pInherits, std::vector< OString > * typeParameters); - virtual ~FeInheritanceHeader() + ~FeInheritanceHeader() { if ( m_pName ) delete m_pName; - } + } NodeType getNodeType() { return m_nodeType; } diff --git a/idlc/inc/idlc.hxx b/idlc/inc/idlc.hxx index 468bec2ba26f..20665ba8dd50 100644 --- a/idlc/inc/idlc.hxx +++ b/idlc/inc/idlc.hxx @@ -37,11 +37,11 @@ class AstType; class Options; class ErrorHandler; -class Idlc +class Idlc final { public: Idlc(Options* pOptions); - virtual ~Idlc(); + ~Idlc(); void init(); diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index e7268f62e85b..96d945f220b7 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -76,7 +76,7 @@ public: virtual ~FormulaCompiler(); /** Mappings from strings to OpCodes and vice versa. */ - class FORMULA_DLLPUBLIC OpCodeMap + class FORMULA_DLLPUBLIC OpCodeMap final { OpCodeHashMap * mpHashMap; /// Hash map of symbols, OUString -> OpCode OUString * mpTable; /// Array of symbols, OpCode -> OUString, offset==OpCode @@ -103,7 +103,7 @@ public: { mbEnglish = FormulaGrammar::isEnglish( meGrammar); } - virtual ~OpCodeMap(); + ~OpCodeMap(); /** Copy mappings from r into this map, effectively replacing this map. diff --git a/include/framework/framelistanalyzer.hxx b/include/framework/framelistanalyzer.hxx index a1f2501bc08c..fe4798eafa56 100644 --- a/include/framework/framelistanalyzer.hxx +++ b/include/framework/framelistanalyzer.hxx @@ -34,7 +34,7 @@ namespace framework{ to switch into the backing mode, close the current active frame only or exit the whole application explicitly or implicitly. */ -class FWE_DLLPUBLIC FrameListAnalyzer +class FWE_DLLPUBLIC FrameListAnalyzer final { // types @@ -177,7 +177,7 @@ class FWE_DLLPUBLIC FrameListAnalyzer FrameListAnalyzer( const css::uno::Reference< css::frame::XFramesSupplier >& xSupplier , const css::uno::Reference< css::frame::XFrame >& xReferenceFrame , sal_uInt32 eDetectMode ); - virtual ~FrameListAnalyzer(); + ~FrameListAnalyzer(); // helper diff --git a/include/framework/menuconfiguration.hxx b/include/framework/menuconfiguration.hxx index 3a618c26fa8b..4e434d81e068 100644 --- a/include/framework/menuconfiguration.hxx +++ b/include/framework/menuconfiguration.hxx @@ -94,14 +94,14 @@ public: } }; -class FWE_DLLPUBLIC MenuConfiguration +class FWE_DLLPUBLIC MenuConfiguration final { public: MenuConfiguration( // use const when giving a uno reference by reference const css::uno::Reference< css::uno::XComponentContext >& rxContext ); - virtual ~MenuConfiguration(); + ~MenuConfiguration(); css::uno::Reference< css::container::XIndexAccess > CreateMenuBarConfigurationFromXML( css::uno::Reference< css::io::XInputStream >& rInputStream ) diff --git a/include/jvmaccess/unovirtualmachine.hxx b/include/jvmaccess/unovirtualmachine.hxx index 4c409d53d418..c39d985a0cf6 100644 --- a/include/jvmaccess/unovirtualmachine.hxx +++ b/include/jvmaccess/unovirtualmachine.hxx @@ -36,14 +36,14 @@ class JVMACCESS_DLLPUBLIC UnoVirtualMachine: public salhelper::SimpleReferenceOb public: /** An exception indicating failure to create a UnoVirtualMachine. */ - class JVMACCESS_DLLPUBLIC CreationException + class JVMACCESS_DLLPUBLIC CreationException final { public: CreationException(); CreationException(CreationException const &); - virtual ~CreationException(); + ~CreationException(); CreationException & operator =(CreationException const &); }; diff --git a/include/jvmaccess/virtualmachine.hxx b/include/jvmaccess/virtualmachine.hxx index 4f805763459f..4b0025587093 100644 --- a/include/jvmaccess/virtualmachine.hxx +++ b/include/jvmaccess/virtualmachine.hxx @@ -48,14 +48,14 @@ public: public: /** An exception indicating failure to create an AttachGuard. */ - class JVMACCESS_DLLPUBLIC CreationException + class JVMACCESS_DLLPUBLIC CreationException final { public: CreationException(); CreationException(CreationException const &); - virtual ~CreationException(); + ~CreationException(); CreationException & operator =(CreationException const &); }; diff --git a/include/oox/core/recordparser.hxx b/include/oox/core/recordparser.hxx index 0f53c423b72e..7a51aad48aac 100644 --- a/include/oox/core/recordparser.hxx +++ b/include/oox/core/recordparser.hxx @@ -49,11 +49,11 @@ struct RecordInputSource }; -class RecordParser +class RecordParser final { public: RecordParser(); - virtual ~RecordParser(); + ~RecordParser(); void setFragmentHandler( const ::rtl::Reference< FragmentHandler >& rxHandler ); diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx index d4fdda2c1cfb..84e4c485cb9d 100644 --- a/include/oox/crypto/CryptTools.hxx +++ b/include/oox/crypto/CryptTools.hxx @@ -113,7 +113,7 @@ public: sal_uInt32 inputLength = 0) override; }; -class Digest +class Digest final { public: enum DigestType @@ -136,7 +136,7 @@ private: public: Digest(DigestType eType); - virtual ~Digest(); + ~Digest(); void update(std::vector& input); void finalize(std::vector& digest); diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 4748dd10ae2d..978b71b52cae 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -191,7 +191,7 @@ public: const css::uno::Reference< css::drawing::XShape > & getXShape() const { return mxShape; } - virtual void applyShapeReference( const Shape& rReferencedShape, bool bUseText = true ); + void applyShapeReference( const Shape& rReferencedShape, bool bUseText = true ); const ::std::vector& getExtDrawings() { return maExtDrawings; } void addExtDrawingRelId( const OUString &rRelId ) { maExtDrawings.push_back( rRelId ); } diff --git a/include/oox/helper/grabbagstack.hxx b/include/oox/helper/grabbagstack.hxx index efcb68dd8ea1..4821978ac31a 100644 --- a/include/oox/helper/grabbagstack.hxx +++ b/include/oox/helper/grabbagstack.hxx @@ -32,7 +32,7 @@ struct GrabBagStackElement }; /// Tool that is useful for construction of a nested Sequence/PropertyValue hierarchy -class OOX_DLLPUBLIC GrabBagStack +class OOX_DLLPUBLIC GrabBagStack final { private: std::stack mStack; @@ -40,8 +40,7 @@ private: public: GrabBagStack(const OUString& aElementName); - - virtual ~GrabBagStack(); + ~GrabBagStack(); const OUString& getCurrentName() { return mCurrentElement.maElementName;} diff --git a/include/oox/ole/axcontrol.hxx b/include/oox/ole/axcontrol.hxx index 472c649b839f..39de87698a86 100644 --- a/include/oox/ole/axcontrol.hxx +++ b/include/oox/ole/axcontrol.hxx @@ -192,14 +192,14 @@ enum ApiDefaultStateMode /** A base class with useful helper functions for something that is able to convert ActiveX and ComCtl form controls. */ -class OOX_DLLPUBLIC ControlConverter +class OOX_DLLPUBLIC ControlConverter final { public: explicit ControlConverter( const css::uno::Reference< css::frame::XModel >& rxDocModel, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr = true ); - virtual ~ControlConverter(); + ~ControlConverter(); // Generic conversion ----------------------------------------------------- diff --git a/include/oox/ole/vbacontrol.hxx b/include/oox/ole/vbacontrol.hxx index 395b2c7e2588..df1c0410c7cd 100644 --- a/include/oox/ole/vbacontrol.hxx +++ b/include/oox/ole/vbacontrol.hxx @@ -50,11 +50,11 @@ namespace ole { /** Common properties for all controls that are part of a VBA user form or of another container control in a VBA user form. */ -class VbaSiteModel +class VbaSiteModel final { public: explicit VbaSiteModel(); - virtual ~VbaSiteModel(); + ~VbaSiteModel(); /** Allows to set single properties specified by XML token identifier. */ void importProperty( sal_Int32 nPropId, const OUString& rValue ); diff --git a/include/oox/ppt/timenode.hxx b/include/oox/ppt/timenode.hxx index 40f51bc54964..7e6bd94b672c 100644 --- a/include/oox/ppt/timenode.hxx +++ b/include/oox/ppt/timenode.hxx @@ -46,13 +46,13 @@ namespace oox { namespace ppt { typedef std::shared_ptr< TimeNode > TimeNodePtr; typedef std::list< TimeNodePtr > TimeNodePtrList; - class TimeNode + class TimeNode final { public: typedef ::std::map< OUString, css::uno::Any > UserDataMap; TimeNode( sal_Int16 nNodeType ); - virtual ~TimeNode(); + ~TimeNode(); NodePropertyMap & getNodeProperties() { return maNodeProperties; } UserDataMap & getUserData() { return maUserData; } diff --git a/jvmfwk/source/elements.hxx b/jvmfwk/source/elements.hxx index 18d50f374456..edf44ccc0f64 100644 --- a/jvmfwk/source/elements.hxx +++ b/jvmfwk/source/elements.hxx @@ -260,7 +260,7 @@ public: The class also determines useful default values for settings which have not been made. */ -class MergedSettings +class MergedSettings final { private: const MergedSettings& operator = (MergedSettings&) = delete; @@ -280,7 +280,7 @@ private: public: MergedSettings(); - virtual ~MergedSettings(); + ~MergedSettings(); /** the default is true. */ diff --git a/linguistic/inc/iprcache.hxx b/linguistic/inc/iprcache.hxx index b31d38eac8cb..f37f3afd0527 100644 --- a/linguistic/inc/iprcache.hxx +++ b/linguistic/inc/iprcache.hxx @@ -73,7 +73,7 @@ public: }; -class SpellCache +class SpellCache final { css::uno::Reference< css::linguistic2::XDictionaryListEventListener > xFlushLstnr; @@ -88,7 +88,7 @@ class SpellCache public: SpellCache(); - virtual ~SpellCache(); + ~SpellCache(); // called from FlushListener void Flush(); diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.hxx b/lotuswordpro/source/filter/lwpbulletstylemgr.hxx index cfcb0a92a93c..c424386a6238 100644 --- a/lotuswordpro/source/filter/lwpbulletstylemgr.hxx +++ b/lotuswordpro/source/filter/lwpbulletstylemgr.hxx @@ -75,11 +75,11 @@ class LwpPara; class LwpIndentOverride; class LwpBulletOverride; -class LwpBulletStyleMgr +class LwpBulletStyleMgr final { public: LwpBulletStyleMgr(); - virtual ~LwpBulletStyleMgr(); + ~LwpBulletStyleMgr(); OUString RegisterBulletStyle(LwpPara* pPara, LwpBulletOverride* pBullOver, LwpIndentOverride* pIndent); inline void SetFoundry(LwpFoundry* pFoundry); diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx index 54ec8ebbe469..70ab7cd64e56 100644 --- a/lotuswordpro/source/filter/lwplayout.hxx +++ b/lotuswordpro/source/filter/lwplayout.hxx @@ -302,11 +302,11 @@ protected: virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_HEAD_LAYOUT;} }; -class LwpLayoutStyle +class LwpLayoutStyle final { public: LwpLayoutStyle(); - virtual ~LwpLayoutStyle(); + ~LwpLayoutStyle(); void Read(LwpObjectStream* pStrm); private: sal_uInt32 m_nStyleDefinition; @@ -314,11 +314,11 @@ private: sal_uInt16 m_nKey; }; -class LwpLayoutMisc +class LwpLayoutMisc final { public: LwpLayoutMisc(); - virtual ~LwpLayoutMisc(); + ~LwpLayoutMisc(); void Read(LwpObjectStream* pStrm); private: sal_Int32 m_nGridDistance; diff --git a/lotuswordpro/source/filter/xfilter/xfofficemeta.hxx b/lotuswordpro/source/filter/xfilter/xfofficemeta.hxx index 19d9be4aadac..3367f54d8c47 100644 --- a/lotuswordpro/source/filter/xfilter/xfofficemeta.hxx +++ b/lotuswordpro/source/filter/xfilter/xfofficemeta.hxx @@ -63,11 +63,11 @@ #include "xfglobal.hxx" -class XFOfficeMeta +class XFOfficeMeta final { public: XFOfficeMeta(){} - virtual ~XFOfficeMeta(){} + ~XFOfficeMeta(){} void SetCreator(const OUString& creator); void SetDescription(const OUString& dsr); diff --git a/oox/inc/drawingml/customshapeproperties.hxx b/oox/inc/drawingml/customshapeproperties.hxx index 23feff1fa6ca..912bfd26251e 100644 --- a/oox/inc/drawingml/customshapeproperties.hxx +++ b/oox/inc/drawingml/customshapeproperties.hxx @@ -104,12 +104,11 @@ struct Path2D }; -class CustomShapeProperties +class CustomShapeProperties final { public: - CustomShapeProperties(); - virtual ~CustomShapeProperties(); + ~CustomShapeProperties(); void pushToPropSet( const ::oox::core::FilterBase& rFilterBase, const css::uno::Reference < css::beans::XPropertySet > & xPropSet, diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index 6747bbc51664..bb1ed9ce4f67 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -330,7 +330,7 @@ Reference< css::frame::XFrame > lcl_getFrame( const Reference< css::frame::XMod return xFrame; } -class OleFormCtrlExportHelper +class OleFormCtrlExportHelper final { ::oox::ole::EmbeddedControl maControl; ::oox::ole::ControlModelBase* mpModel; @@ -344,7 +344,6 @@ class OleFormCtrlExportHelper OUString maGUID; public: OleFormCtrlExportHelper( const Reference< XComponentContext >& rxCtx, const Reference< XModel >& xDocModel, const Reference< XControlModel >& xModel ); - virtual ~OleFormCtrlExportHelper() { } OUString getGUID() { OUString sResult; diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h index f0f984589d44..6f036eec345e 100644 --- a/rsc/inc/rscerror.h +++ b/rsc/inc/rscerror.h @@ -111,7 +111,7 @@ enum RscVerbosity RscVerbosityVerbose = 2 }; -class RscError +class RscError final { FILE * fListing; RscVerbosity m_verbosity; @@ -122,7 +122,6 @@ class RscError void ErrorFormat( const ERRTYPE& rError, RscTop * pClass, const RscId & aId ); public: - virtual ~RscError() {} sal_uInt32 nErrors; // Number of errors RscError( RscVerbosity _verbosity ) -- cgit