From 5f77e6e9309cab4633fa8211f9788af9a9a793c9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 3 Nov 2016 15:12:56 +0200 Subject: update loplugin:unnnecessaryvirtual to handler destructors and update modules writerfilter..xmloff with the resulting changes Change-Id: I54d19c22ddb0ff579b32e4934d266c925b19305c Reviewed-on: https://gerrit.libreoffice.org/30530 Tested-by: Jenkins Reviewed-by: Noel Grandin --- writerfilter/source/dmapper/DomainMapperTableHandler.hxx | 4 ++-- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 4 ++-- writerfilter/source/dmapper/LoggedResources.hxx | 4 ++-- writerfilter/source/dmapper/NumberingManager.hxx | 4 ++-- writerfilter/source/dmapper/SdtHelper.hxx | 4 ++-- writerfilter/source/dmapper/TableData.hxx | 8 ++------ writerfilter/source/dmapper/TableManager.hxx | 6 +----- writerfilter/source/dmapper/TablePropertiesHandler.hxx | 4 ++-- writerfilter/source/dmapper/WrapPolygonHandler.hxx | 4 ++-- writerfilter/source/ooxml/OOXMLParserState.hxx | 4 ++-- writerfilter/source/rtftok/rtfsdrimport.hxx | 4 ++-- writerfilter/source/rtftok/rtfskipdestination.hxx | 4 ++-- writerfilter/source/rtftok/rtftokenizer.hxx | 4 ++-- 13 files changed, 25 insertions(+), 33 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx index b1ac2f1df701..5ae070024f7c 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -57,7 +57,7 @@ struct HorizontallyMergedCell }; /// Class to handle events generated by TableManager::resolveCurrentTable(). -class DomainMapperTableHandler +class DomainMapperTableHandler final { css::uno::Reference m_xText; DomainMapper_Impl& m_rDMapper_Impl; @@ -84,7 +84,7 @@ public: DomainMapperTableHandler(css::uno::Reference const& xText, DomainMapper_Impl& rDMapper_Impl); - virtual ~DomainMapperTableHandler(); + ~DomainMapperTableHandler(); /** Handle start of table. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index b643b7f34c05..84afc50db754 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -335,7 +335,7 @@ struct SymbolData }; class DomainMapper; -class DomainMapper_Impl +class DomainMapper_Impl final { public: typedef std::map < OUString, BookmarkInsertPosition > BookmarkMap_t; @@ -475,7 +475,7 @@ public: css::uno::Reference< css::lang::XComponent > const& xModel, SourceDocumentType eDocumentType, utl::MediaDescriptor& rMediaDesc); - virtual ~DomainMapper_Impl(); + ~DomainMapper_Impl(); SectionPropertyMap* GetLastSectionContext( ) { diff --git a/writerfilter/source/dmapper/LoggedResources.hxx b/writerfilter/source/dmapper/LoggedResources.hxx index 09079b563a6e..0c466448a85b 100644 --- a/writerfilter/source/dmapper/LoggedResources.hxx +++ b/writerfilter/source/dmapper/LoggedResources.hxx @@ -28,11 +28,11 @@ namespace writerfilter { #ifdef DEBUG_WRITERFILTER -class LoggedResourcesHelper +class LoggedResourcesHelper final { public: explicit LoggedResourcesHelper(const std::string & sPrefix); - virtual ~LoggedResourcesHelper(); + ~LoggedResourcesHelper(); void startElement(const std::string & sElement); static void endElement(const std::string & sElement); diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index 039eabdb927e..29d3f5fcb9d5 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -105,12 +105,12 @@ private: }; /// Represents a numbering picture bullet: an id and a graphic. -class NumPicBullet +class NumPicBullet final { public: typedef std::shared_ptr Pointer; NumPicBullet(); - virtual ~NumPicBullet(); + ~NumPicBullet(); void SetId(sal_Int32 nId); sal_Int32 GetId() { return m_nId;} diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx index 86c634da918b..a619d508f2de 100644 --- a/writerfilter/source/dmapper/SdtHelper.hxx +++ b/writerfilter/source/dmapper/SdtHelper.hxx @@ -45,7 +45,7 @@ namespace dmapper * w:sdt tokens can't be imported as form fields, as w:sdt supports * e.g. date picking as well. */ -class SdtHelper +class SdtHelper final { DomainMapper_Impl& m_rDM_Impl; @@ -70,7 +70,7 @@ class SdtHelper void createControlShape(css::awt::Size aSize, css::uno::Reference const&, const css::uno::Sequence& rGrabBag); public: SdtHelper(DomainMapper_Impl& rDM_Impl); - virtual ~SdtHelper(); + ~SdtHelper(); std::vector& getDropDownItems() { diff --git a/writerfilter/source/dmapper/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx index 19aa4cd88ed9..03ad4995119e 100644 --- a/writerfilter/source/dmapper/TableData.hxx +++ b/writerfilter/source/dmapper/TableData.hxx @@ -33,7 +33,7 @@ namespace dmapper /** Class containing the data to describe a table cell. */ -class CellData +class CellData final { /** Handle to start of cell. @@ -60,8 +60,6 @@ public: { } - virtual ~CellData() {} - /** Set the end handle of a cell. @@ -103,7 +101,7 @@ public: /** Class to handle data of a table row. */ -class RowData +class RowData final { typedef ::std::vector Cells; @@ -127,8 +125,6 @@ public: { } - virtual ~RowData() {} - /** Add a cell to the row. diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx index 7c9ba153ab4b..d9d9826e3157 100644 --- a/writerfilter/source/dmapper/TableManager.hxx +++ b/writerfilter/source/dmapper/TableManager.hxx @@ -49,7 +49,7 @@ class DomainMapperTableHandler; */ class TableManager { - class TableManagerState + class TableManagerState final { /** properties of the current cell @@ -90,10 +90,6 @@ class TableManager { } - virtual ~TableManagerState() - { - } - void startLevel() { TablePropertyMapPtr pProps; diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.hxx b/writerfilter/source/dmapper/TablePropertiesHandler.hxx index 55a823a6b979..5a52aedff558 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.hxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.hxx @@ -34,7 +34,7 @@ namespace dmapper { class DomainMapper; -class TablePropertiesHandler +class TablePropertiesHandler final { private: PropertyMapPtr m_pCurrentProperties; @@ -43,7 +43,7 @@ private: public: TablePropertiesHandler(); - virtual ~TablePropertiesHandler( ); + ~TablePropertiesHandler( ); bool sprm(Sprm & sprm); diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.hxx b/writerfilter/source/dmapper/WrapPolygonHandler.hxx index 0f4002752622..3192408aa330 100644 --- a/writerfilter/source/dmapper/WrapPolygonHandler.hxx +++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx @@ -29,7 +29,7 @@ namespace writerfilter { namespace dmapper { -class WrapPolygon +class WrapPolygon final { public: typedef std::vector Points_t; @@ -40,7 +40,7 @@ private: public: WrapPolygon(); - virtual ~WrapPolygon(); + ~WrapPolygon(); void addPoint(const css::awt::Point & rPoint); diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index ea3e00401313..0ba0079d1653 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -39,7 +39,7 @@ struct SavedAlternateState bool m_bTookChoice; ///< Did we take the Choice or want Fallback instead? }; -class OOXMLParserState +class OOXMLParserState final { bool mbInSectionGroup; bool mbInParagraphGroup; @@ -64,7 +64,7 @@ public: typedef std::shared_ptr Pointer_t; OOXMLParserState(); - virtual ~OOXMLParserState(); + ~OOXMLParserState(); bool isInSectionGroup() const { return mbInSectionGroup;} void setInSectionGroup(bool bInSectionGroup); diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx index 5e21b84d9946..42260b3ad29b 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.hxx +++ b/writerfilter/source/rtftok/rtfsdrimport.hxx @@ -22,11 +22,11 @@ namespace writerfilter namespace rtftok { /// Handles the import of drawings using RTF markup. -class RTFSdrImport +class RTFSdrImport final { public: RTFSdrImport(RTFDocumentImpl& rImport, css::uno::Reference const& xDstDoc); - virtual ~RTFSdrImport(); + ~RTFSdrImport(); enum ShapeOrPict { SHAPE, PICT }; void resolve(RTFShape& rShape, bool bClose, ShapeOrPict shapeOrPict); diff --git a/writerfilter/source/rtftok/rtfskipdestination.hxx b/writerfilter/source/rtftok/rtfskipdestination.hxx index f70a8c71bbcb..50be7549c51c 100644 --- a/writerfilter/source/rtftok/rtfskipdestination.hxx +++ b/writerfilter/source/rtftok/rtfskipdestination.hxx @@ -17,11 +17,11 @@ namespace writerfilter namespace rtftok { /// Skips a destination after a not parsed control word if it was prefixed with \* -class RTFSkipDestination +class RTFSkipDestination final { public: RTFSkipDestination(RTFListener& rImport); - virtual ~RTFSkipDestination(); + ~RTFSkipDestination(); void setParsed(bool bParsed); void setReset(bool bReset); private: diff --git a/writerfilter/source/rtftok/rtftokenizer.hxx b/writerfilter/source/rtftok/rtftokenizer.hxx index 0e2039d61674..8005fd6c1c17 100644 --- a/writerfilter/source/rtftok/rtftokenizer.hxx +++ b/writerfilter/source/rtftok/rtftokenizer.hxx @@ -24,11 +24,11 @@ namespace writerfilter namespace rtftok { /// RTF tokenizer that separates control words from text. -class RTFTokenizer +class RTFTokenizer final { public: RTFTokenizer(RTFListener& rImport, SvStream* pInStream, css::uno::Reference const& xStatusIndicator); - virtual ~RTFTokenizer(); + ~RTFTokenizer(); RTFError resolveParse(); static int asHex(char ch); -- cgit