diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-14 13:27:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-03-14 13:32:02 +0100 |
commit | 6e67c03dc0225fc66343546b14e902b9d238b1a3 (patch) | |
tree | 6e078783d65e280a721b4e46f0ae0ca6b950f121 /writerfilter | |
parent | fdo#47246: dtrans: fix multiply linked ImplHelper (diff) | |
download | core-6e67c03dc0225fc66343546b14e902b9d238b1a3.tar.gz core-6e67c03dc0225fc66343546b14e902b9d238b1a3.zip |
Enable -Wnon-virtual-dtor for GCC 4.6
...which has the necessary features to support it.
Change a lot of classes to either contain a protected non-virtual dtor
(which is backwards compatible, so even works for cppumaker-generated
UNO headers) or a public virtual one.
cppuhelper/propertysetmixin.hxx still needs to disable the warning, as
the relevant class has a non-virtual dtor but friends, which would still
cause GCC to warn.
Includes a patch for libcmis, intended to be upstreamed.
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/inc/resourcemodel/TableManager.hxx | 3 | ||||
-rw-r--r-- | writerfilter/inc/resourcemodel/TagLogger.hxx | 3 | ||||
-rw-r--r-- | writerfilter/inc/resourcemodel/WW8ResourceModel.hxx | 29 | ||||
-rw-r--r-- | writerfilter/source/doctok/WW8DocumentImpl.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/doctok/WW8ResourceModelImpl.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsprm.hxx | 1 |
6 files changed, 28 insertions, 14 deletions
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index 04084d73a0a9..5e2af023b606 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -101,6 +101,9 @@ public: @param rT end handle of cell */ virtual void endCell(const T & rT) = 0; + +protected: + ~TableDataHandler() {} }; template <typename T, typename PropertiesPointer> diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index f5ca4ebecf32..42681acbb380 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -45,6 +45,9 @@ namespace writerfilter public: typedef boost::shared_ptr<IdToString> Pointer_t; virtual std::string toString(const Id & id) const = 0; + + protected: + ~IdToString() {} }; class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TagLogger diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx index 5869f04e374a..e49b3f51fe82 100644 --- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx +++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx @@ -101,8 +101,6 @@ public: */ typedef boost::shared_ptr< Reference<T> > Pointer_t; - virtual ~Reference() {} - /** Resolves the reference. @@ -117,6 +115,9 @@ public: Returns the type of the reference aka the name of the access class. */ virtual string getType() const = 0; + +protected: + ~Reference() {} }; class Value; @@ -128,9 +129,6 @@ class Sprm; class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties { public: - - virtual ~Properties() {} - /** Receives an attribute. @@ -146,6 +144,8 @@ public: */ virtual void sprm(Sprm & sprm) = 0; +protected: + ~Properties() {} }; /** @@ -156,7 +156,6 @@ class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table public: typedef boost::shared_ptr<Table> Pointer_t; - virtual ~Table() {} /** Receives an entry of the table. @@ -164,6 +163,9 @@ public: @param ref reference to properties of the entry */ virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0; + +protected: + ~Table() {} }; /** @@ -172,8 +174,6 @@ public: class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj { public: - - virtual ~BinaryObj() {} /** Receives binary data of the object. @@ -183,6 +183,9 @@ public: */ virtual void data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t ref) = 0; + +protected: + ~BinaryObj() {} }; /** @@ -197,8 +200,6 @@ public: */ typedef boost::shared_ptr<Stream> Pointer_t; - virtual ~Stream() {} - /** Receives start mark for group with the same section properties. */ @@ -286,6 +287,9 @@ public: @param info the information */ virtual void info(const string & info) = 0; + +protected: + ~Stream() {} }; /** @@ -355,8 +359,6 @@ public: SAL_WNODEPRECATED_DECLARATIONS_POP enum Kind { UNKNOWN, CHARACTER, PARAGRAPH, TABLE }; - virtual ~Sprm() {} - /** Returns id of the SPRM. */ @@ -397,6 +399,9 @@ public: Returns string repesentation of sprm. */ virtual string toString() const = 0; + +protected: + ~Sprm() {} }; /** diff --git a/writerfilter/source/doctok/WW8DocumentImpl.hxx b/writerfilter/source/doctok/WW8DocumentImpl.hxx index 383d80195475..0a50fc6d9edd 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.hxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.hxx @@ -59,6 +59,8 @@ public: Bookmark(writerfilter::Reference<Properties>::Pointer_t pBKF, rtl::OUString & rName); + virtual ~Bookmark() {} + /** Resolve bookmark to handler. diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.hxx b/writerfilter/source/doctok/WW8ResourceModelImpl.hxx index e0a8e24cd8fe..40f0da8c6a85 100644 --- a/writerfilter/source/doctok/WW8ResourceModelImpl.hxx +++ b/writerfilter/source/doctok/WW8ResourceModelImpl.hxx @@ -54,7 +54,7 @@ public: { } - ~WW8PropertiesReference() + virtual ~WW8PropertiesReference() { } @@ -70,7 +70,7 @@ public: { } - ~WW8TableReference() + virtual ~WW8TableReference() { } diff --git a/writerfilter/source/rtftok/rtfsprm.hxx b/writerfilter/source/rtftok/rtfsprm.hxx index dbf2e2f375db..7c73d0e87a37 100644 --- a/writerfilter/source/rtftok/rtfsprm.hxx +++ b/writerfilter/source/rtftok/rtfsprm.hxx @@ -54,6 +54,7 @@ namespace writerfilter { { public: RTFSprm(Id nKeyword, RTFValue::Pointer_t& pValue); + virtual ~RTFSprm() {} virtual sal_uInt32 getId() const; virtual Value::Pointer_t getValue(); virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary(); |