summaryrefslogtreecommitdiffstats
path: root/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-07-22 13:41:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-07-22 15:13:24 +0200
commitddcc98fa50dd9d86a60dada4daa00f4d95ffe005 (patch)
treed9a03e447ac75e7ddad07f4eb81d294310a3dc91 /odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
parentSilence GCC 11 trunk -Werror=nonnull in external/boost (diff)
downloadcore-ddcc98fa50dd9d86a60dada4daa00f4d95ffe005.tar.gz
core-ddcc98fa50dd9d86a60dada4daa00f4d95ffe005.zip
Remove obsolete dynamic exception specifications from SDK example C++ code
GCC 11 trunk g++ defaults to C++17 now, so that CustomTarget_odk/build-examples and CustomTarget_odk/build-examples_java would now fail with "error: ISO C++17 does not allow dynamic exception specifications". 550e0e42d9ccef1244299b2d6cbda18549f8af19 "Remove dynamic exception specifications from cppumaker-generated code" had long since removed the exception specifications from the underlying (C++ classes representing) UNO interface types, so just remove them from the SDK example code, too. An alternative would have been to make sure those CustomTarget use an old C++ compiler standard. However, testing that the examples work against a new standard has probably similar merit to testing that they keep working against some obsolete standard. Change-Id: I8ec9ac2f9ced7bd1b746fb00d9bce94bf6aedda5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99218 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx')
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
index 4020953b68a8..3fd70340aebc 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
@@ -101,7 +101,7 @@ void BaseDispatch::SendCommandTo( const Reference< XStatusListener >& xControl,
xControl->statusChanged( aEvent );
}
-void SAL_CALL MyProtocolHandler::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException)
+void SAL_CALL MyProtocolHandler::initialize( const Sequence< Any >& aArguments )
{
Reference < XFrame > xFrame;
if ( aArguments.getLength() )
@@ -114,7 +114,6 @@ void SAL_CALL MyProtocolHandler::initialize( const Sequence< Any >& aArguments )
}
Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& aURL, const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags )
- throw( RuntimeException )
{
Reference < XDispatch > xRet;
if ( !mxFrame.is() )
@@ -151,7 +150,6 @@ Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& a
}
Sequence < Reference< XDispatch > > SAL_CALL MyProtocolHandler::queryDispatches( const Sequence < DispatchDescriptor >& seqDescripts )
- throw( RuntimeException )
{
sal_Int32 nCount = seqDescripts.getLength();
Sequence < Reference < XDispatch > > lDispatcher( nCount );
@@ -163,13 +161,11 @@ Sequence < Reference< XDispatch > > SAL_CALL MyProtocolHandler::queryDispatches(
}
::rtl::OUString MyProtocolHandler_getImplementationName ()
- throw (RuntimeException)
{
return ::rtl::OUString( MYPROTOCOLHANDLER_IMPLEMENTATIONNAME );
}
Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler_getSupportedServiceNames( )
- throw (RuntimeException)
{
Sequence < ::rtl::OUString > aRet(1);
aRet[0] = ::rtl::OUString( MYPROTOCOLHANDLER_SERVICENAME );
@@ -179,31 +175,27 @@ Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler_getSupportedServiceNames(
#undef SERVICE_NAME
Reference< XInterface > SAL_CALL MyProtocolHandler_createInstance( const Reference< XComponentContext > & rSMgr)
- throw( Exception )
{
return (cppu::OWeakObject*) new MyProtocolHandler( rSMgr );
}
// XServiceInfo
::rtl::OUString SAL_CALL MyProtocolHandler::getImplementationName( )
- throw (RuntimeException)
{
return MyProtocolHandler_getImplementationName();
}
sal_Bool SAL_CALL MyProtocolHandler::supportsService( const ::rtl::OUString& rServiceName )
- throw (RuntimeException)
{
return cppu::supportsService(this, rServiceName);
}
Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler::getSupportedServiceNames( )
- throw (RuntimeException)
{
return MyProtocolHandler_getSupportedServiceNames();
}
-void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < PropertyValue >& lArgs ) throw (RuntimeException)
+void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < PropertyValue >& lArgs )
{
/* It's necessary to hold this object alive, till this method finishes.
May the outside dispatch cache (implemented by the menu/toolbar!)
@@ -330,7 +322,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
}
}
-void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException)
+void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL )
{
if ( aURL.Protocol == "vnd.demo.complextoolbarcontrols.demoaddon:" )
{
@@ -449,12 +441,12 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
}
}
-void SAL_CALL BaseDispatch::removeStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException)
+void SAL_CALL BaseDispatch::removeStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL )
{
aListenerHelper.RemoveListener( mxFrame, xControl, aURL.Path );
}
-void SAL_CALL BaseDispatch::controlEvent( const ControlEvent& Event ) throw (RuntimeException)
+void SAL_CALL BaseDispatch::controlEvent( const ControlEvent& Event )
{
if ( Event.aURL.Protocol == "vnd.demo.complextoolbarcontrols.demoaddon:" )
{