diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:28:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:54:43 +0000 |
commit | e57ca02849c3d87142ff5ff9099a212e72b8139c (patch) | |
tree | bcce66b27261553c308779f3e8663a269ed3a671 /sw/source/filter | |
parent | 8802ebd5172ec4bc412a59d136c82b77ab452281 (diff) |
Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.
Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly). The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually). There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).
Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code. Missing @throws
documentation has not been applied in such manual clean-up.
Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/html/htmlform.cxx | 24 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexportfilter.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexportfilter.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexportfilter.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexportfilter.hxx | 9 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerhelper.hxx | 11 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.hxx | 12 |
10 files changed, 28 insertions, 51 deletions
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index f5d425bb4afb..8e75a53b4be3 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -380,30 +380,25 @@ public: // UNO Anbindung // XImageConsumer - virtual void SAL_CALL init( sal_Int32 Width, sal_Int32 Height) - throw( uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL init( sal_Int32 Width, sal_Int32 Height) override; virtual void SAL_CALL setColorModel( sal_Int16 BitCount, const uno::Sequence< sal_Int32 >& RGBAPal, sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask, - sal_Int32 AlphaMask) - throw( uno::RuntimeException, std::exception ) override; + sal_Int32 AlphaMask) override; virtual void SAL_CALL setPixelsByBytes( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, const uno::Sequence< sal_Int8 >& ProducerData, - sal_Int32 Offset, sal_Int32 Scansize) - throw( uno::RuntimeException, std::exception ) override; + sal_Int32 Offset, sal_Int32 Scansize) override; virtual void SAL_CALL setPixelsByLongs( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, const uno::Sequence< sal_Int32 >& ProducerData, - sal_Int32 Offset, sal_Int32 Scansize) - throw( uno::RuntimeException, std::exception ) override; + sal_Int32 Offset, sal_Int32 Scansize) override; virtual void SAL_CALL complete( sal_Int32 Status, - const uno::Reference< awt::XImageProducer > & Producer) - throw( uno::RuntimeException, std::exception ) override; + const uno::Reference< awt::XImageProducer > & Producer) override; // XEventListener - virtual void SAL_CALL disposing( const EventObject& Source ) throw ( uno::RuntimeException, std::exception) override; + virtual void SAL_CALL disposing( const EventObject& Source ) override; }; SwHTMLImageWatcher::SwHTMLImageWatcher( @@ -448,7 +443,6 @@ void SwHTMLImageWatcher::clear() } void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height ) - throw( uno::RuntimeException, std::exception ) { OSL_ENSURE( bSetWidth || bSetHeight, "Breite oder Hoehe muss angepasst werden" ); @@ -549,27 +543,23 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height ) void SwHTMLImageWatcher::setColorModel( sal_Int16, const Sequence< sal_Int32 >&, sal_Int32, sal_Int32, sal_Int32, sal_Int32 ) - throw( uno::RuntimeException, std::exception ) { } void SwHTMLImageWatcher::setPixelsByBytes( sal_Int32, sal_Int32, sal_Int32, sal_Int32, const Sequence< sal_Int8 >&, sal_Int32, sal_Int32 ) - throw( uno::RuntimeException, std::exception ) { } void SwHTMLImageWatcher::setPixelsByLongs( sal_Int32, sal_Int32, sal_Int32, sal_Int32, const Sequence< sal_Int32 >&, sal_Int32, sal_Int32 ) - throw( uno::RuntimeException, std::exception ) { } void SwHTMLImageWatcher::complete( sal_Int32 Status, const uno::Reference< awt::XImageProducer >& ) - throw( uno::RuntimeException, std::exception ) { if( awt::ImageStatus::IMAGESTATUS_ERROR == Status || awt::ImageStatus::IMAGESTATUS_ABORTED == Status ) { @@ -580,7 +570,7 @@ void SwHTMLImageWatcher::complete( sal_Int32 Status, } } -void SwHTMLImageWatcher::disposing(const lang::EventObject& evt) throw ( uno::RuntimeException, std::exception) +void SwHTMLImageWatcher::disposing(const lang::EventObject& evt) { uno::Reference< awt::XImageConsumer > xTmp; diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 6b4d1b016c3c..fe6b8abdff29 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -89,7 +89,7 @@ OUString DocxExport_getImplementationName() return OUString( IMPL_NAME ); } -OUString DocxExportFilter::getImplementationName() throw (css::uno::RuntimeException, std::exception) +OUString DocxExportFilter::getImplementationName() { return DocxExport_getImplementationName(); } @@ -100,7 +100,7 @@ uno::Sequence< OUString > SAL_CALL DocxExport_getSupportedServiceNames() throw() } /// @throws uno::Exception -uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception ) +uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) { return static_cast<cppu::OWeakObject*>(new DocxExportFilter( xCtx )); } diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx index 983c8d7f83c3..0efcc51c79fe 100644 --- a/sw/source/filter/ww8/docxexportfilter.hxx +++ b/sw/source/filter/ww8/docxexportfilter.hxx @@ -43,7 +43,7 @@ public: virtual bool exportDocument() override; private: - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; virtual ::oox::ole::VbaProject* implCreateVbaProject() const override { diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index f09a8c525702..5da1c7329838 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -38,7 +38,7 @@ RtfExportFilter::RtfExportFilter(const uno::Reference< uno::XComponentContext >& RtfExportFilter::~RtfExportFilter() = default; -sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) throw(uno::RuntimeException, std::exception) +sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) { utl::MediaDescriptor aMediaDesc = aDescriptor; uno::Reference<io::XStream> xStream = aMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >()); @@ -87,11 +87,11 @@ sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aD return true; } -void RtfExportFilter::cancel() throw(uno::RuntimeException, std::exception) +void RtfExportFilter::cancel() { } -void RtfExportFilter::setSourceDocument(const uno::Reference< lang::XComponent >& xDoc) throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception) +void RtfExportFilter::setSourceDocument(const uno::Reference< lang::XComponent >& xDoc) { m_xSrcDoc = xDoc; } @@ -108,7 +108,7 @@ uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw() return uno::Sequence< OUString > { "com.sun.star.document.ExportFilter" }; } -uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext >& xCtx) throw(uno::Exception) +uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext >& xCtx) { return static_cast<cppu::OWeakObject*>(new RtfExportFilter(xCtx)); } diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx index 13921975b1f6..842ac77738af 100644 --- a/sw/source/filter/ww8/rtfexportfilter.hxx +++ b/sw/source/filter/ww8/rtfexportfilter.hxx @@ -51,12 +51,11 @@ public: virtual ~RtfExportFilter() override; // XFilter - virtual sal_Bool SAL_CALL filter(const css::uno::Sequence<css::beans::PropertyValue>& aDescriptor) throw(css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL cancel() throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL filter(const css::uno::Sequence<css::beans::PropertyValue>& aDescriptor) override; + virtual void SAL_CALL cancel() override; // XExporter - virtual void SAL_CALL setSourceDocument(const css::uno::Reference<css::lang::XComponent>& xDoc) - throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setSourceDocument(const css::uno::Reference<css::lang::XComponent>& xDoc) override; RtfWriter m_aWriter; }; @@ -64,7 +63,7 @@ public: OUString RtfExport_getImplementationName(); css::uno::Sequence<OUString> SAL_CALL RtfExport_getSupportedServiceNames() throw(); /// @throws css::uno::Exception -css::uno::Reference<css::uno::XInterface> SAL_CALL RtfExport_createInstance(const css::uno::Reference<css::uno::XComponentContext>& xCtx) throw(css::uno::Exception); +css::uno::Reference<css::uno::XInterface> SAL_CALL RtfExport_createInstance(const css::uno::Reference<css::uno::XComponentContext>& xCtx); #define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport" diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index e1b73dfe8131..fe873b616b6d 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -234,7 +234,6 @@ namespace sw <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ template<class T> const T & item_cast(const SfxPoolItem &rItem) - throw(std::bad_cast) { if (dynamic_cast<const T *>(&rItem) == nullptr) throw std::bad_cast(); @@ -290,7 +289,7 @@ namespace sw <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ template<class T> const T & ItemGet(const SwContentNode &rNode, - sal_uInt16 eType) throw(std::bad_cast) + sal_uInt16 eType) { return item_cast<T>(rNode.GetAttr(eType)); } @@ -319,7 +318,7 @@ namespace sw <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ template<class T> const T & ItemGet(const SwFormat &rFormat, - sal_uInt16 eType) throw(std::bad_cast, css::uno::RuntimeException) + sal_uInt16 eType) { return item_cast<T>(rFormat.GetFormatAttr(eType)); } @@ -350,7 +349,7 @@ namespace sw <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ template<class T> const T & ItemGet(const SfxItemSet &rSet, - sal_uInt16 eType) throw(std::bad_cast) + sal_uInt16 eType) { return item_cast<T>(rSet.Get(eType)); } @@ -385,7 +384,7 @@ namespace sw <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ template<class T> const T & DefaultItemGet(const SfxItemPool &rPool, - sal_uInt16 eType) throw(std::bad_cast) + sal_uInt16 eType) { return item_cast<T>(rPool.GetDefaultItem(eType)); } @@ -421,7 +420,7 @@ namespace sw <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ template<class T> const T & DefaultItemGet(const SwDoc &rDoc, - sal_uInt16 eType) throw(std::bad_cast) + sal_uInt16 eType) { return DefaultItemGet<T>(rDoc.GetAttrPool(), eType); } diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 483aefb85611..741af3e66d26 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -499,7 +499,6 @@ const Sequence< sal_Int8 > & SwXMLExport::getUnoTunnelId() throw() } sal_Int64 SAL_CALL SwXMLExport::getSomething( const Sequence< sal_Int8 >& rId ) - throw(RuntimeException, std::exception) { if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx index bc1ced23c22b..c08b0e2b33b0 100644 --- a/sw/source/filter/xml/xmlexp.hxx +++ b/sw/source/filter/xml/xmlexp.hxx @@ -126,7 +126,7 @@ public: // XUnoTunnel static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; const SwDoc* getDoc() const; SwDoc* getDoc(); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 880d96ff650f..dae5ed530470 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -426,7 +426,6 @@ const Sequence< sal_Int8 > & SwXMLImport::getUnoTunnelId() throw() } sal_Int64 SAL_CALL SwXMLImport::getSomething( const Sequence< sal_Int8 >& rId ) - throw(RuntimeException, std::exception) { if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), @@ -450,9 +449,6 @@ static OTextCursorHelper *lcl_xml_GetSwXTextCursor( const Reference < XTextCurso } void SwXMLImport::startDocument() - throw (xml::sax::SAXException, - uno::RuntimeException, - std::exception) { // delegate to parent SvXMLImport::startDocument(); @@ -668,7 +664,6 @@ void SwXMLImport::startDocument() } void SwXMLImport::endDocument() - throw( xml::sax::SAXException, uno::RuntimeException, std::exception ) { OSL_ENSURE( GetModel().is(), "model missing; maybe startDocument wasn't called?" ); if( !GetModel().is() ) @@ -1418,7 +1413,6 @@ void SwXMLImport::SetDocumentSpecificSettings( void SwXMLImport::initialize( const Sequence<Any>& aArguments ) - throw( uno::Exception, uno::RuntimeException, std::exception) { // delegate to super class SvXMLImport::initialize(aArguments); diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx index 621f35b5873b..ee6395994d90 100644 --- a/sw/source/filter/xml/xmlimp.hxx +++ b/sw/source/filter/xml/xmlimp.hxx @@ -120,19 +120,15 @@ public: virtual ~SwXMLImport() throw() override; // css::xml::sax::XDocumentHandler - virtual void SAL_CALL startDocument() - throw (css::xml::sax::SAXException, - css::uno::RuntimeException, - std::exception) override; - virtual void SAL_CALL endDocument() - throw( css::xml::sax::SAXException, css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL startDocument() override; + virtual void SAL_CALL endDocument() override; // XUnoTunnel static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; // XInitialization - virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw(css::uno::Exception, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; void InsertStyles( bool bAuto ); void FinishStyles(); |