[Libreoffice-commits] core.git: vcl/opengl vcl/source vcl/unx

Stephan Bergmann sbergman at redhat.com
Wed Nov 23 20:49:05 UTC 2016


 vcl/opengl/gdiimpl.cxx                    |    4 +---
 vcl/source/components/dtranscomp.cxx      |   20 --------------------
 vcl/source/components/fontident.cxx       |    5 -----
 vcl/source/control/notebookbar.cxx        |    1 -
 vcl/source/edit/textview.cxx              |    5 -----
 vcl/source/filter/graphicfilter.cxx       |    1 -
 vcl/source/gdi/pdfwriter_impl.cxx         |    5 -----
 vcl/source/helper/commandinfoprovider.cxx |    4 +---
 vcl/source/uitest/uno/uitest_uno.cxx      |    5 -----
 vcl/unx/generic/app/wmadaptor.cxx         |   16 ----------------
 vcl/unx/generic/dtrans/config.cxx         |    9 ---------
 vcl/unx/generic/print/genpspgraphics.cxx  |    5 -----
 vcl/unx/gtk3/gtk3gtkframe.cxx             |   17 ++++++++++++++++-
 13 files changed, 18 insertions(+), 79 deletions(-)

New commits:
commit aafc083257203d09fb15cbc16dd86539a7df5856
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 23 21:48:33 2016 +0100

    loplugin:unnecessaryoverride (dtors) in vcl
    
    Change-Id: I38e24991308bf52e75259a30d332145aef9a757b

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index b487468..58f03f3 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 9456ca5..fcdf217 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 11d4418..9568c4c 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 2ff1c3e..40e3f84 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 81d0906..77a7c5a 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 379b8c5..84cd26f 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 d1df5d5..03bf6f2 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8434,7 +8434,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;
@@ -8442,10 +8441,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 7643260..e48367c 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 efaee32..83355b3 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 0c1da62..6652bda 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 8a90cae..8f0894f 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 455f186..6bd871b 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -81,7 +81,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;
@@ -151,10 +150,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 82af6fb..c1f70ad 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4264,8 +4264,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;
 }


More information about the Libreoffice-commits mailing list