diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-23 21:48:33 +0100 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-18 01:08:01 -0500 |
commit | c18f59a2eb2189dd6278c254aa93ba638c5cd579 (patch) | |
tree | ba603a37ccce0849be8b62d6e18b4a51366c83d2 /vcl | |
parent | b839cccb63fd3a48611ac7ab07a2cd14e5ed5822 (diff) |
loplugin:unnecessaryoverride (dtors) in vcl
Change-Id: I38e24991308bf52e75259a30d332145aef9a757b
(cherry picked from commit aafc083257203d09fb15cbc16dd86539a7df5856)
(cherry picked from commit d0ed70a83e86701778bf576b521203a979da6093)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 4 | ||||
-rw-r--r-- | vcl/source/components/dtranscomp.cxx | 20 | ||||
-rw-r--r-- | vcl/source/components/fontident.cxx | 5 | ||||
-rw-r--r-- | vcl/source/control/notebookbar.cxx | 1 | ||||
-rw-r--r-- | vcl/source/edit/textview.cxx | 5 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 1 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 5 | ||||
-rw-r--r-- | vcl/source/helper/commandinfoprovider.cxx | 4 | ||||
-rw-r--r-- | vcl/source/uitest/uno/uitest_uno.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/app/wmadaptor.cxx | 16 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/config.cxx | 9 | ||||
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 17 |
13 files changed, 18 insertions, 79 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 24ca1e6049bd..1f0ebe303c21 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -56,9 +56,7 @@ public: // We don't want to be swapping before we've painted. SetPriority( SchedulerPriority::POST_PAINT ); } - virtual ~OpenGLFlushIdle() override - { - } + virtual void Invoke() override { m_pImpl->doFlush(); diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 9456ca5789a5..fcdf217c25d3 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -68,7 +68,6 @@ public: XServiceInfo >( m_aMutex ) {} - virtual ~GenericClipboard() override; /* * XServiceInfo @@ -114,10 +113,6 @@ public: throw(RuntimeException, std::exception) override; }; -GenericClipboard::~GenericClipboard() -{ -} - Sequence< OUString > GenericClipboard::getSupportedServiceNames_static() { Sequence< OUString > aRet { "com.sun.star.datatransfer.clipboard.SystemClipboard" }; @@ -203,7 +198,6 @@ class ClipboardFactory : public ::cppu::WeakComponentImplHelper< osl::Mutex m_aMutex; public: ClipboardFactory(); - virtual ~ClipboardFactory() override; /* * XSingleServiceFactory @@ -219,10 +213,6 @@ ClipboardFactory::ClipboardFactory() : { } -ClipboardFactory::~ClipboardFactory() -{ -} - Reference< XInterface > ClipboardFactory::createInstance() throw(std::exception) { return createInstanceWithArguments( Sequence< Any >() ); @@ -265,7 +255,6 @@ class GenericDragSource : public cppu::WeakComponentImplHelper< osl::Mutex m_aMutex; public: GenericDragSource() : WeakComponentImplHelper( m_aMutex ) {} - virtual ~GenericDragSource() override; // XDragSource virtual sal_Bool SAL_CALL isDragImageSupported() throw(std::exception) override; @@ -299,10 +288,6 @@ public: } }; -GenericDragSource::~GenericDragSource() -{ -} - sal_Bool GenericDragSource::isDragImageSupported() throw(std::exception) { return false; @@ -372,7 +357,6 @@ class GenericDropTarget : public cppu::WeakComponentImplHelper< public: GenericDropTarget() : WeakComponentImplHelper( m_aMutex ) {} - virtual ~GenericDropTarget() override; // XInitialization virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( Exception, std::exception ) override; @@ -404,10 +388,6 @@ public: } }; -GenericDropTarget::~GenericDropTarget() -{ -} - void GenericDropTarget::initialize( const Sequence< Any >& ) throw( Exception, std::exception ) { } diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx index 11d441830855..9568c4c846cb 100644 --- a/vcl/source/components/fontident.cxx +++ b/vcl/source/components/fontident.cxx @@ -50,7 +50,6 @@ class FontIdentificator : public ::cppu::WeakAggImplHelper3< XMaterialHolder, XI Font m_aFont; public: FontIdentificator() {} - virtual ~FontIdentificator() override; // XServiceInfo virtual OUString SAL_CALL getImplementationName( ) throw (RuntimeException, std::exception) override; @@ -65,10 +64,6 @@ FontIdentificator() {} }; -FontIdentificator::~FontIdentificator() -{ -} - void SAL_CALL FontIdentificator::initialize( const Sequence<Any>& i_rArgs ) throw(Exception,RuntimeException, std::exception) { if( !ImplGetSVData() ) diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx index 8bf8658d398c..fc9eb49f220d 100644 --- a/vcl/source/control/notebookbar.cxx +++ b/vcl/source/control/notebookbar.cxx @@ -21,7 +21,6 @@ class NotebookBarContextChangeEventListener : public ::cppu::WeakImplHelper<css: VclPtr<NotebookBar> mpParent; public: explicit NotebookBarContextChangeEventListener(NotebookBar *p) : mpParent(p) {} - virtual ~NotebookBarContextChangeEventListener() override {} // XContextChangeEventListener virtual void SAL_CALL notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent) diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 81d0906680ae..77a7c5aa7a2b 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -68,7 +68,6 @@ private: public: explicit TETextDataObject( const OUString& rText ); - virtual ~TETextDataObject() override; OUString& GetText() { return maText; } SvMemoryStream& GetHTMLStream() { return maHTMLStream; } @@ -88,10 +87,6 @@ TETextDataObject::TETextDataObject( const OUString& rText ) : maText( rText ) { } -TETextDataObject::~TETextDataObject() -{ -} - // css::uno::XInterface css::uno::Any TETextDataObject::queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) { diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 535fb1ad5f5b..7ac1ecee075e 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -100,7 +100,6 @@ protected: public: explicit ImpFilterOutputStream( SvStream& rStm ) : mrStm( rStm ) {} - virtual ~ImpFilterOutputStream() override {} }; #ifndef DISABLE_EXPORT diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d55e94d4ced1..f667f12f0c91 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8726,7 +8726,6 @@ class PDFStreamIf : bool m_bWrite; public: explicit PDFStreamIf( PDFWriterImpl* pWriter ) : m_pWriter( pWriter ), m_bWrite( true ) {} - virtual ~PDFStreamIf() override; virtual void SAL_CALL writeBytes( const css::uno::Sequence< sal_Int8 >& aData ) throw(std::exception) override; virtual void SAL_CALL flush() throw(std::exception) override; @@ -8734,10 +8733,6 @@ class PDFStreamIf : }; } -PDFStreamIf::~PDFStreamIf() -{ -} - void SAL_CALL PDFStreamIf::writeBytes( const css::uno::Sequence< sal_Int8 >& aData ) throw(std::exception) { if( m_bWrite && aData.getLength() ) diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx index 764326027707..e48367cc0b1e 100644 --- a/vcl/source/helper/commandinfoprovider.cxx +++ b/vcl/source/helper/commandinfoprovider.cxx @@ -57,9 +57,7 @@ namespace if (mxFrame.is()) mxFrame->addFrameActionListener(this); } - virtual ~FrameListener() override - { - } + virtual void SAL_CALL frameAction(const css::frame::FrameActionEvent& aEvent) throw (css::uno::RuntimeException, std::exception) override { diff --git a/vcl/source/uitest/uno/uitest_uno.cxx b/vcl/source/uitest/uno/uitest_uno.cxx index efaee320bfda..83355b3a5894 100644 --- a/vcl/source/uitest/uno/uitest_uno.cxx +++ b/vcl/source/uitest/uno/uitest_uno.cxx @@ -37,7 +37,6 @@ private: public: UITestUnoObj(); - virtual ~UITestUnoObj() override; void SAL_CALL executeCommand(const OUString& rCommand) throw (css::uno::RuntimeException, std::exception) override; @@ -61,10 +60,6 @@ UITestUnoObj::UITestUnoObj(): { } -UITestUnoObj::~UITestUnoObj() -{ -} - void SAL_CALL UITestUnoObj::executeCommand(const OUString& rCommand) throw (css::uno::RuntimeException, std::exception) { diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 0c1da627da52..6652bdacd9a9 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -50,7 +50,6 @@ class NetWMAdaptor : public WMAdaptor virtual bool isValid() const override; public: explicit NetWMAdaptor( SalDisplay* ); - virtual ~NetWMAdaptor() override; virtual void setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const override; virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const override; @@ -72,7 +71,6 @@ class GnomeWMAdaptor : public WMAdaptor virtual bool isValid() const override; public: explicit GnomeWMAdaptor( SalDisplay * ); - virtual ~GnomeWMAdaptor() override; virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const override; virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const override; @@ -508,13 +506,6 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : } /* - * NetWMAdaptor destructor - */ -NetWMAdaptor::~NetWMAdaptor() -{ -} - -/* * GnomeWMAdaptor constructor */ @@ -720,13 +711,6 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : } /* - * GnomeWMAdaptor destructor - */ -GnomeWMAdaptor::~GnomeWMAdaptor() -{ -} - -/* * getNetWmName() */ bool WMAdaptor::getNetWmName() diff --git a/vcl/unx/generic/dtrans/config.cxx b/vcl/unx/generic/dtrans/config.cxx index 8a90caeb4ce9..8f0894fa7512 100644 --- a/vcl/unx/generic/dtrans/config.cxx +++ b/vcl/unx/generic/dtrans/config.cxx @@ -38,7 +38,6 @@ class DtransX11ConfigItem : public ::utl::ConfigItem public: DtransX11ConfigItem(); - virtual ~DtransX11ConfigItem() override; sal_Int32 getSelectionTimeout() const { return m_nSelectionTimeout; } }; @@ -100,14 +99,6 @@ DtransX11ConfigItem::DtransX11ConfigItem() : } } -/* - * DtransX11ConfigItem destructor - */ - -DtransX11ConfigItem::~DtransX11ConfigItem() -{ -} - void DtransX11ConfigItem::ImplCommit() { // for the clipboard service this is readonly, so diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index ee128006df7a..d95209a1b1d9 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -84,7 +84,6 @@ private: public: explicit SalPrinterBmp (BitmapBuffer* pBitmap); - virtual ~SalPrinterBmp () override; virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const override; virtual sal_uInt32 GetPaletteEntryCount () const override; virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const override; @@ -154,10 +153,6 @@ SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer) } } -SalPrinterBmp::~SalPrinterBmp () -{ -} - sal_uInt32 SalPrinterBmp::GetDepth () const { diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 1535f11c2387..a7b277a64e98 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -4356,8 +4356,23 @@ long GtkSalFrame::CallCallbackExc(SalEvent nEvent, const void* pEvent) const } catch (const css::uno::Exception&) { + auto e = cppu::getCaughtException(); GtkData *pSalData = static_cast<GtkData*>(GetSalData()); - pSalData->setException(::cppu::getCaughtException()); + pSalData->setException(e); + } + catch (std::exception & e) + { + static_cast<GtkData *>(GetSalData())->setException( + css::uno::Any( + css::uno::RuntimeException( + "wrapped std::exception " + + OUString::createFromAscii(e.what())))); + } + catch (...) + { + static_cast<GtkData *>(GetSalData())->setException( + css::uno::Any( + css::uno::RuntimeException("wrapped unknown exception"))); } return nRet; } |