diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-20 12:38:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-26 08:42:28 +0200 |
commit | b44cbb26efe1d0b0950b1e1613e131b506dc3876 (patch) | |
tree | 9b4d5d99e5dad0971079b997a02a6d96536709ca /editeng | |
parent | 26ad60aec69310fecd918f1c2e09056aa4782320 (diff) |
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/outliner/outlundo.hxx | 6 | ||||
-rw-r--r-- | editeng/source/xml/xmltxtimp.cxx | 17 |
2 files changed, 3 insertions, 20 deletions
diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx index 277f1421368f..00376ab01ec7 100644 --- a/editeng/source/outliner/outlundo.hxx +++ b/editeng/source/outliner/outlundo.hxx @@ -88,7 +88,7 @@ public: virtual void Undo() SAL_OVERRIDE; virtual void Redo() SAL_OVERRIDE; - virtual void Repeat(); + void Repeat(); }; // Help-Undo: If it does not exist an OutlinerUndoAction for a certain action @@ -105,7 +105,7 @@ public: virtual void Undo() SAL_OVERRIDE; virtual void Redo() SAL_OVERRIDE; - virtual void Repeat(); + void Repeat(); }; @@ -122,7 +122,7 @@ public: virtual ~OLUndoExpand(); virtual void Undo() SAL_OVERRIDE; virtual void Redo() SAL_OVERRIDE; - virtual void Repeat(); + void Repeat(); sal_uInt16* pParas; // 0 == nCount contains paragraph number Outliner* pOutliner; diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 1461c1139b57..9b92ab7dbfae 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -114,9 +114,6 @@ public: virtual ~SvxXMLXTextImportComponent() throw (); -protected: - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); - private: const uno::Reference< XText > mxText; }; @@ -214,18 +211,4 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r } } -SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) -{ - SvXMLImportContext* pContext; - if(XML_NAMESPACE_OFFICE == nPrefix && ( IsXMLToken( rLocalName, XML_DOCUMENT ) || IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) ) ) - { - pContext = new SvxXMLTextImportContext(*this, nPrefix, rLocalName, xAttrList, mxText ); - } - else - { - pContext = SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList); - } - return pContext; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |