diff options
Diffstat (limited to 'chart2/source/model/main/ChartModel.cxx')
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 91 |
1 files changed, 11 insertions, 80 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 65717729a221..738c8807fa2f 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -193,7 +193,6 @@ ChartModel::~ChartModel() } void SAL_CALL ChartModel::initialize( const Sequence< Any >& /*rArguments*/ ) - throw (uno::Exception, uno::RuntimeException, std::exception) { //#i113722# avoid duplicate creation @@ -237,7 +236,7 @@ bool ChartModel::impl_isControllerConnected( const uno::Reference< frame::XContr return false; } -uno::Reference< frame::XController > ChartModel::impl_getCurrentController() throw(uno::RuntimeException) +uno::Reference< frame::XController > ChartModel::impl_getCurrentController() { //@todo? hold only weak references to controllers @@ -257,7 +256,6 @@ uno::Reference< frame::XController > ChartModel::impl_getCurrentController() thr } void SAL_CALL ChartModel::impl_notifyCloseListeners() - throw( uno::RuntimeException) { ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer .getContainer( cppu::UnoType<util::XCloseListener>::get()); @@ -314,19 +312,16 @@ void ChartModel::impl_adjustAdditionalShapesPositionAndSize( const awt::Size& aV // lang::XServiceInfo OUString SAL_CALL ChartModel::getImplementationName() - throw( css::uno::RuntimeException, std::exception ) { return OUString(CHART_MODEL_SERVICE_IMPLEMENTATION_NAME); } sal_Bool SAL_CALL ChartModel::supportsService( const OUString& rServiceName ) - throw( css::uno::RuntimeException, std::exception ) { return cppu::supportsService(this, rServiceName); } css::uno::Sequence< OUString > SAL_CALL ChartModel::getSupportedServiceNames() - throw( css::uno::RuntimeException, std::exception ) { return { CHART_MODEL_SERVICE_NAME, @@ -339,7 +334,6 @@ css::uno::Sequence< OUString > SAL_CALL ChartModel::getSupportedServiceNames() sal_Bool SAL_CALL ChartModel::attachResource( const OUString& rURL , const uno::Sequence< beans::PropertyValue >& rMediaDescriptor ) - throw(uno::RuntimeException, std::exception) { /* The method attachResource() is used by the frame loader implementations @@ -363,12 +357,12 @@ sal_Bool SAL_CALL ChartModel::attachResource( const OUString& rURL return true; } -OUString SAL_CALL ChartModel::getURL() throw(uno::RuntimeException, std::exception) +OUString SAL_CALL ChartModel::getURL() { return impl_g_getLocation(); } -uno::Sequence< beans::PropertyValue > SAL_CALL ChartModel::getArgs() throw(uno::RuntimeException, std::exception) +uno::Sequence< beans::PropertyValue > SAL_CALL ChartModel::getArgs() { /* The method getArgs() returns a sequence of property values @@ -385,7 +379,6 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ChartModel::getArgs() throw(uno:: } void SAL_CALL ChartModel::connectController( const uno::Reference< frame::XController >& xController ) - throw(uno::RuntimeException, std::exception) { //@todo? this method is declared as oneway -> ...? @@ -399,7 +392,6 @@ void SAL_CALL ChartModel::connectController( const uno::Reference< frame::XContr } void SAL_CALL ChartModel::disconnectController( const uno::Reference< frame::XController >& xController ) - throw(uno::RuntimeException, std::exception) { //@todo? this method is declared as oneway -> ...? @@ -417,7 +409,7 @@ void SAL_CALL ChartModel::disconnectController( const uno::Reference< frame::XCo DisposeHelper::DisposeAndClear( m_xRangeHighlighter ); } -void SAL_CALL ChartModel::lockControllers() throw(uno::RuntimeException, std::exception) +void SAL_CALL ChartModel::lockControllers() { /* suspends some notifications to the controllers which are used for display updates. @@ -435,7 +427,7 @@ void SAL_CALL ChartModel::lockControllers() throw(uno::RuntimeException, std::ex ++m_nControllerLockCount; } -void SAL_CALL ChartModel::unlockControllers() throw(uno::RuntimeException, std::exception) +void SAL_CALL ChartModel::unlockControllers() { /* resumes the notifications which were suspended by lockControllers() . @@ -463,7 +455,7 @@ void SAL_CALL ChartModel::unlockControllers() throw(uno::RuntimeException, std:: } } -sal_Bool SAL_CALL ChartModel::hasControllersLocked() throw(uno::RuntimeException, std::exception) +sal_Bool SAL_CALL ChartModel::hasControllersLocked() { LifeTimeGuard aGuard(m_aLifeTimeManager); if(!aGuard.startApiCall()) @@ -471,7 +463,7 @@ sal_Bool SAL_CALL ChartModel::hasControllersLocked() throw(uno::RuntimeException return ( m_nControllerLockCount != 0 ) ; } -uno::Reference< frame::XController > SAL_CALL ChartModel::getCurrentController() throw(uno::RuntimeException, std::exception) +uno::Reference< frame::XController > SAL_CALL ChartModel::getCurrentController() { LifeTimeGuard aGuard(m_aLifeTimeManager); if(!aGuard.startApiCall()) @@ -483,7 +475,6 @@ uno::Reference< frame::XController > SAL_CALL ChartModel::getCurrentController() } void SAL_CALL ChartModel::setCurrentController( const uno::Reference< frame::XController >& xController ) - throw(container::NoSuchElementException, uno::RuntimeException, std::exception) { LifeTimeGuard aGuard(m_aLifeTimeManager); if(!aGuard.startApiCall()) @@ -502,7 +493,7 @@ void SAL_CALL ChartModel::setCurrentController( const uno::Reference< frame::XCo DisposeHelper::DisposeAndClear( m_xRangeHighlighter ); } -uno::Reference< uno::XInterface > SAL_CALL ChartModel::getCurrentSelection() throw(uno::RuntimeException, std::exception) +uno::Reference< uno::XInterface > SAL_CALL ChartModel::getCurrentSelection() { LifeTimeGuard aGuard(m_aLifeTimeManager); if(!aGuard.startApiCall()) @@ -529,7 +520,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartModel::getCurrentSelection() thr } // lang::XComponent (base of XModel) -void SAL_CALL ChartModel::dispose() throw(uno::RuntimeException, std::exception) +void SAL_CALL ChartModel::dispose() { Reference< XInterface > xKeepAlive( *this ); @@ -579,7 +570,6 @@ void SAL_CALL ChartModel::dispose() throw(uno::RuntimeException, std::exception) } void SAL_CALL ChartModel::addEventListener( const uno::Reference< lang::XEventListener > & xListener ) - throw(uno::RuntimeException, std::exception) { if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) return; //behave passive if already disposed or closed @@ -588,7 +578,6 @@ void SAL_CALL ChartModel::addEventListener( const uno::Reference< lang::XEventLi } void SAL_CALL ChartModel::removeEventListener( const uno::Reference< lang::XEventListener > & xListener ) - throw(uno::RuntimeException, std::exception) { if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) ) return; //behave passive if already disposed or closed @@ -599,13 +588,11 @@ void SAL_CALL ChartModel::removeEventListener( const uno::Reference< lang::XEven // util::XCloseBroadcaster (base of XCloseable) void SAL_CALL ChartModel::addCloseListener( const uno::Reference< util::XCloseListener > & xListener ) - throw(uno::RuntimeException, std::exception) { m_aLifeTimeManager.g_addCloseListener( xListener ); } void SAL_CALL ChartModel::removeCloseListener( const uno::Reference< util::XCloseListener > & xListener ) - throw(uno::RuntimeException, std::exception) { if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) ) return; //behave passive if already disposed or closed @@ -616,8 +603,6 @@ void SAL_CALL ChartModel::removeCloseListener( const uno::Reference< util::XClos // util::XCloseable void SAL_CALL ChartModel::close( sal_Bool bDeliverOwnership ) - throw( util::CloseVetoException, - uno::RuntimeException, std::exception ) { //hold no mutex @@ -670,7 +655,6 @@ void SAL_CALL ChartModel::close( sal_Bool bDeliverOwnership ) // lang::XTypeProvider uno::Sequence< uno::Type > SAL_CALL ChartModel::getTypes() - throw (uno::RuntimeException, std::exception) { uno::Reference< lang::XTypeProvider > xAggTypeProvider; if( (m_xOldModelAgg->queryAggregation( cppu::UnoType<decltype(xAggTypeProvider)>::get()) >>= xAggTypeProvider) @@ -692,7 +676,7 @@ uno::Sequence< uno::Type > SAL_CALL ChartModel::getTypes() // document::XDocumentPropertiesSupplier uno::Reference< document::XDocumentProperties > SAL_CALL - ChartModel::getDocumentProperties() throw (uno::RuntimeException, std::exception) + ChartModel::getDocumentProperties() { ::osl::MutexGuard aGuard( m_aModelMutex ); if ( !m_xDocumentProperties.is() ) @@ -703,7 +687,7 @@ uno::Reference< document::XDocumentProperties > SAL_CALL } // document::XDocumentPropertiesSupplier -Reference< document::XUndoManager > SAL_CALL ChartModel::getUndoManager( ) throw (RuntimeException, std::exception) +Reference< document::XUndoManager > SAL_CALL ChartModel::getUndoManager( ) { ::osl::MutexGuard aGuard( m_aModelMutex ); if ( !m_pUndoManager.is() ) @@ -714,14 +698,12 @@ Reference< document::XUndoManager > SAL_CALL ChartModel::getUndoManager( ) thro // chart2::XChartDocument uno::Reference< chart2::XDiagram > SAL_CALL ChartModel::getFirstDiagram() - throw (uno::RuntimeException, std::exception) { MutexGuard aGuard( m_aModelMutex ); return m_xDiagram; } void SAL_CALL ChartModel::setFirstDiagram( const uno::Reference< chart2::XDiagram >& xDiagram ) - throw (uno::RuntimeException, std::exception) { Reference< chart2::XDiagram > xOldDiagram; Reference< util::XModifyListener > xListener; @@ -781,7 +763,6 @@ Reference< chart2::data::XDataSource > ChartModel::impl_createDefaultData() } void SAL_CALL ChartModel::createInternalDataProvider( sal_Bool bCloneExistingData ) - throw (util::CloseVetoException, uno::RuntimeException, std::exception) { // don't lock the mutex, because this call calls out to code that tries to // lock the solar mutex. On the other hand, a paint locks the solar mutex @@ -799,13 +780,11 @@ void SAL_CALL ChartModel::createInternalDataProvider( sal_Bool bCloneExistingDat } sal_Bool SAL_CALL ChartModel::hasInternalDataProvider() - throw (uno::RuntimeException, std::exception) { return m_xDataProvider.is() && m_xInternalDataProvider.is(); } uno::Reference< chart2::data::XDataProvider > SAL_CALL ChartModel::getDataProvider() - throw (uno::RuntimeException, std::exception) { MutexGuard aGuard( m_aModelMutex ); return m_xDataProvider; @@ -814,7 +793,6 @@ uno::Reference< chart2::data::XDataProvider > SAL_CALL ChartModel::getDataProvid // ____ XDataReceiver ____ void SAL_CALL ChartModel::attachDataProvider( const uno::Reference< chart2::data::XDataProvider >& xDataProvider ) - throw (uno::RuntimeException, std::exception) { { MutexGuard aGuard( m_aModelMutex ); @@ -840,7 +818,6 @@ void SAL_CALL ChartModel::attachDataProvider( const uno::Reference< chart2::data } void SAL_CALL ChartModel::attachNumberFormatsSupplier( const uno::Reference< util::XNumberFormatsSupplier >& xNewSupplier ) - throw (uno::RuntimeException, std::exception) { { MutexGuard aGuard( m_aModelMutex ); @@ -870,8 +847,6 @@ void SAL_CALL ChartModel::attachNumberFormatsSupplier( const uno::Reference< uti } void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >& aArguments ) - throw (lang::IllegalArgumentException, - uno::RuntimeException, std::exception) { { MutexGuard aGuard( m_aModelMutex ); @@ -909,19 +884,16 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >& } Sequence< OUString > SAL_CALL ChartModel::getUsedRangeRepresentations() - throw (uno::RuntimeException, std::exception) { return DataSourceHelper::getUsedDataRanges( Reference< frame::XModel >(this)); } Reference< chart2::data::XDataSource > SAL_CALL ChartModel::getUsedData() - throw (uno::RuntimeException, std::exception) { return DataSourceHelper::getUsedData( Reference< chart2::XChartDocument >(this)); } Reference< chart2::data::XRangeHighlighter > SAL_CALL ChartModel::getRangeHighlighter() - throw (uno::RuntimeException, std::exception) { if( ! m_xRangeHighlighter.is()) { @@ -942,7 +914,6 @@ Reference< chart2::XChartTypeTemplate > ChartModel::impl_createDefaultChartTypeT } void SAL_CALL ChartModel::setChartTypeManager( const uno::Reference< chart2::XChartTypeManager >& xNewManager ) - throw (uno::RuntimeException, std::exception) { { MutexGuard aGuard( m_aModelMutex ); @@ -952,41 +923,35 @@ void SAL_CALL ChartModel::setChartTypeManager( const uno::Reference< chart2::XCh } uno::Reference< chart2::XChartTypeManager > SAL_CALL ChartModel::getChartTypeManager() - throw (uno::RuntimeException, std::exception) { MutexGuard aGuard( m_aModelMutex ); return m_xChartTypeManager; } uno::Reference< beans::XPropertySet > SAL_CALL ChartModel::getPageBackground() - throw (uno::RuntimeException, std::exception) { MutexGuard aGuard( m_aModelMutex ); return m_xPageBackground; } void SAL_CALL ChartModel::createDefaultChart() - throw (css::uno::RuntimeException, std::exception) { insertDefaultChart(); } sal_Bool SAL_CALL ChartModel::isOpenGLChart() - throw (css::uno::RuntimeException, std::exception) { return ChartHelper::isGL3DDiagram(m_xDiagram); } // ____ XTitled ____ uno::Reference< chart2::XTitle > SAL_CALL ChartModel::getTitleObject() - throw (uno::RuntimeException, std::exception) { MutexGuard aGuard( m_aModelMutex ); return m_xTitle; } void SAL_CALL ChartModel::setTitleObject( const uno::Reference< chart2::XTitle >& xTitle ) - throw (uno::RuntimeException, std::exception) { { MutexGuard aGuard( m_aModelMutex ); @@ -1000,7 +965,6 @@ void SAL_CALL ChartModel::setTitleObject( const uno::Reference< chart2::XTitle > // ____ XInterface (for old API wrapper) ____ uno::Any SAL_CALL ChartModel::queryInterface( const uno::Type& aType ) - throw (uno::RuntimeException, std::exception) { uno::Any aResult( impl::ChartModel_Base::queryInterface( aType )); @@ -1023,17 +987,12 @@ uno::Any SAL_CALL ChartModel::queryInterface( const uno::Type& aType ) // ____ XCloneable ____ Reference< util::XCloneable > SAL_CALL ChartModel::createClone() - throw (uno::RuntimeException, std::exception) { return Reference< util::XCloneable >( new ChartModel( *this )); } // ____ XVisualObject ____ void SAL_CALL ChartModel::setVisualAreaSize( ::sal_Int64 nAspect, const awt::Size& aSize ) - throw (lang::IllegalArgumentException, - embed::WrongStateException, - uno::Exception, - uno::RuntimeException, std::exception) { if( nAspect == embed::Aspects::MSOLE_CONTENT ) { @@ -1059,10 +1018,6 @@ void SAL_CALL ChartModel::setVisualAreaSize( ::sal_Int64 nAspect, const awt::Siz } awt::Size SAL_CALL ChartModel::getVisualAreaSize( ::sal_Int64 nAspect ) - throw (lang::IllegalArgumentException, - embed::WrongStateException, - uno::Exception, - uno::RuntimeException, std::exception) { OSL_ENSURE( nAspect == embed::Aspects::MSOLE_CONTENT, "No aspects other than content are supported" ); @@ -1073,10 +1028,6 @@ awt::Size SAL_CALL ChartModel::getVisualAreaSize( ::sal_Int64 nAspect ) } embed::VisualRepresentation SAL_CALL ChartModel::getPreferredVisualRepresentation( ::sal_Int64 nAspect ) - throw (lang::IllegalArgumentException, - embed::WrongStateException, - uno::Exception, - uno::RuntimeException, std::exception) { OSL_ENSURE( nAspect == embed::Aspects::MSOLE_CONTENT, "No aspects other than content are supported" ); @@ -1115,8 +1066,6 @@ embed::VisualRepresentation SAL_CALL ChartModel::getPreferredVisualRepresentatio } ::sal_Int32 SAL_CALL ChartModel::getMapUnit( ::sal_Int64 nAspect ) - throw (uno::Exception, - uno::RuntimeException, std::exception) { OSL_ENSURE( nAspect == embed::Aspects::MSOLE_CONTENT, "No aspects other than content are supported" ); @@ -1126,9 +1075,6 @@ embed::VisualRepresentation SAL_CALL ChartModel::getPreferredVisualRepresentatio // ____ datatransfer::XTransferable ____ uno::Any SAL_CALL ChartModel::getTransferData( const datatransfer::DataFlavor& aFlavor ) - throw (datatransfer::UnsupportedFlavorException, - io::IOException, - uno::RuntimeException, std::exception) { uno::Any aResult; if( this->isDataFlavorSupported( aFlavor )) @@ -1159,7 +1105,6 @@ uno::Any SAL_CALL ChartModel::getTransferData( const datatransfer::DataFlavor& a } Sequence< datatransfer::DataFlavor > SAL_CALL ChartModel::getTransferDataFlavors() - throw (uno::RuntimeException, std::exception) { uno::Sequence< datatransfer::DataFlavor > aRet(1); @@ -1171,7 +1116,6 @@ Sequence< datatransfer::DataFlavor > SAL_CALL ChartModel::getTransferDataFlavors } sal_Bool SAL_CALL ChartModel::isDataFlavorSupported( const datatransfer::DataFlavor& aFlavor ) - throw (uno::RuntimeException, std::exception) { return aFlavor.MimeType.equals(lcl_aGDIMetaFileMIMETypeHighContrast); } @@ -1206,7 +1150,6 @@ tServiceNameMap & lcl_getStaticServiceNameMap() } // ____ XMultiServiceFactory ____ Reference< uno::XInterface > SAL_CALL ChartModel::createInstance( const OUString& rServiceSpecifier ) - throw( uno::Exception, uno::RuntimeException, std::exception ) { uno::Reference< uno::XInterface > xResult; tServiceNameMap & rMap = lcl_getStaticServiceNameMap(); @@ -1260,7 +1203,6 @@ Reference< uno::XInterface > SAL_CALL ChartModel::createInstance( const OUString Reference< uno::XInterface > SAL_CALL ChartModel::createInstanceWithArguments( const OUString& rServiceSpecifier , const Sequence< Any >& Arguments ) - throw( uno::Exception, uno::RuntimeException, std::exception ) { OSL_ENSURE( Arguments.getLength(), "createInstanceWithArguments: Warning: Arguments are ignored" ); (void)(Arguments); // avoid warning in non-debug builds @@ -1268,7 +1210,6 @@ Reference< uno::XInterface > SAL_CALL ChartModel::createInstanceWithArguments( } Sequence< OUString > SAL_CALL ChartModel::getAvailableServiceNames() - throw( uno::RuntimeException, std::exception ) { uno::Sequence< OUString > aResult; @@ -1301,7 +1242,6 @@ Reference< util::XNumberFormatsSupplier > const & ChartModel::getNumberFormatsSu // ____ XUnoTunnel ___ ::sal_Int64 SAL_CALL ChartModel::getSomething( const Sequence< ::sal_Int8 >& aIdentifier ) - throw( uno::RuntimeException, std::exception) { if( aIdentifier.getLength() == 16 && 0 == memcmp( SvNumberFormatsSupplierObj::getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) @@ -1315,7 +1255,6 @@ Reference< util::XNumberFormatsSupplier > const & ChartModel::getNumberFormatsSu // ____ XNumberFormatsSupplier ____ uno::Reference< beans::XPropertySet > SAL_CALL ChartModel::getNumberFormatSettings() - throw (uno::RuntimeException, std::exception) { Reference< util::XNumberFormatsSupplier > xSupplier( getNumberFormatsSupplier() ); if( xSupplier.is() ) @@ -1324,7 +1263,6 @@ uno::Reference< beans::XPropertySet > SAL_CALL ChartModel::getNumberFormatSettin } uno::Reference< util::XNumberFormats > SAL_CALL ChartModel::getNumberFormats() - throw (uno::RuntimeException, std::exception) { Reference< util::XNumberFormatsSupplier > xSupplier( getNumberFormatsSupplier() ); if( xSupplier.is() ) @@ -1334,14 +1272,11 @@ uno::Reference< util::XNumberFormats > SAL_CALL ChartModel::getNumberFormats() // ____ XChild ____ Reference< uno::XInterface > SAL_CALL ChartModel::getParent() - throw (uno::RuntimeException, std::exception) { return Reference< uno::XInterface >(m_xParent,uno::UNO_QUERY); } void SAL_CALL ChartModel::setParent( const Reference< uno::XInterface >& Parent ) - throw (lang::NoSupportException, - uno::RuntimeException, std::exception) { if( Parent != m_xParent ) m_xParent.set( Parent, uno::UNO_QUERY ); @@ -1349,7 +1284,6 @@ void SAL_CALL ChartModel::setParent( const Reference< uno::XInterface >& Parent // ____ XDataSource ____ uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL ChartModel::getDataSequences() - throw (uno::RuntimeException, std::exception) { Reference< chart2::data::XDataSource > xSource( DataSourceHelper::getUsedData( uno::Reference< frame::XModel >(this) ) ); @@ -1361,7 +1295,6 @@ uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL ChartM //XDumper OUString SAL_CALL ChartModel::dump() - throw (uno::RuntimeException, std::exception) { uno::Reference< qa::XDumper > xDumper( this->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY ); @@ -1416,14 +1349,12 @@ void ChartModel::setTimeBasedRange(sal_Int32 nStart, sal_Int32 nEnd) } void ChartModel::setWindow( const sal_uInt64 nWindowPtr ) - throw (uno::RuntimeException, std::exception) { OpenGLWindow* pWindow = reinterpret_cast<OpenGLWindow*>(nWindowPtr); mpOpenGLWindow = pWindow; } void ChartModel::update() - throw (uno::RuntimeException, std::exception) { if(!mxChartView.is()) { |