diff options
Diffstat (limited to 'chart2/source/tools/InternalDataProvider.cxx')
-rw-r--r-- | chart2/source/tools/InternalDataProvider.cxx | 61 |
1 files changed, 11 insertions, 50 deletions
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 9f5f3187fd36..f14810a9e64b 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -653,7 +653,6 @@ Reference< chart2::data::XDataSequence > InternalDataProvider::createDataSequenc // ____ XDataProvider ____ sal_Bool SAL_CALL InternalDataProvider::createDataSourcePossible( const Sequence< beans::PropertyValue >& /* aArguments */ ) - throw (uno::RuntimeException, std::exception) { return true; } @@ -678,8 +677,6 @@ sal_Int32 lcl_getInnerLevelCount( const vector< vector< uno::Any > >& rLabels ) Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createDataSource( const Sequence< beans::PropertyValue >& aArguments ) - throw (lang::IllegalArgumentException, - uno::RuntimeException, std::exception) { OUString aRangeRepresentation; bool bUseColumns = true; @@ -769,7 +766,6 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments( const Reference< chart2::data::XDataSource >& /* xDataSource */ ) - throw (uno::RuntimeException, std::exception) { Sequence< beans::PropertyValue > aArguments( 4 ); aArguments[0] = beans::PropertyValue( @@ -794,15 +790,12 @@ Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments( } sal_Bool SAL_CALL InternalDataProvider::createDataSequenceByRangeRepresentationPossible( const OUString& /* aRangeRepresentation */ ) - throw (uno::RuntimeException, std::exception) { return true; } Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDataSequenceByRangeRepresentation( const OUString& aRangeRepresentation ) - throw (lang::IllegalArgumentException, - uno::RuntimeException, std::exception) { if( aRangeRepresentation.match( lcl_aCategoriesRangeName )) { @@ -836,13 +829,11 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa Reference<chart2::data::XDataSequence> SAL_CALL InternalDataProvider::createDataSequenceByValueArray( const OUString& aRole, const OUString& aRangeRepresentation ) - throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { return createDataSequenceFromArray(aRangeRepresentation, aRole); } Reference< sheet::XRangeSelection > SAL_CALL InternalDataProvider::getRangeSelection() - throw (uno::RuntimeException, std::exception) { // there is no range selection component return Reference< sheet::XRangeSelection >(); @@ -850,7 +841,6 @@ Reference< sheet::XRangeSelection > SAL_CALL InternalDataProvider::getRangeSelec // ____ XInternalDataProvider ____ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUString& aRange ) - throw (uno::RuntimeException, std::exception) { bool bResult = false; @@ -874,7 +864,6 @@ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUSt } Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation( const OUString& aRange ) - throw (uno::RuntimeException, std::exception) { Sequence< uno::Any > aResult; @@ -948,7 +937,6 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation void SAL_CALL InternalDataProvider::setDataByRangeRepresentation( const OUString& aRange, const Sequence< uno::Any >& aNewData ) - throw (uno::RuntimeException, std::exception) { vector< uno::Any > aNewVector( ContainerHelper::SequenceToVector(aNewData) ); if( aRange.match( lcl_aLabelRangePrefix ) ) @@ -1014,7 +1002,6 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation( } void SAL_CALL InternalDataProvider::insertSequence( ::sal_Int32 nAfterIndex ) - throw (uno::RuntimeException, std::exception) { if( m_bDataInColumns ) { @@ -1029,7 +1016,6 @@ void SAL_CALL InternalDataProvider::insertSequence( ::sal_Int32 nAfterIndex ) } void SAL_CALL InternalDataProvider::deleteSequence( ::sal_Int32 nAtIndex ) - throw (uno::RuntimeException, std::exception) { deleteMapReferences( OUString::number( nAtIndex )); deleteMapReferences( lcl_aLabelRangePrefix + OUString::number( nAtIndex )); @@ -1046,7 +1032,6 @@ void SAL_CALL InternalDataProvider::deleteSequence( ::sal_Int32 nAtIndex ) } void SAL_CALL InternalDataProvider::appendSequence() - throw (uno::RuntimeException, std::exception) { if( m_bDataInColumns ) m_aInternalData.appendColumn(); @@ -1055,7 +1040,6 @@ void SAL_CALL InternalDataProvider::appendSequence() } void SAL_CALL InternalDataProvider::insertComplexCategoryLevel( sal_Int32 nLevel ) - throw (uno::RuntimeException, std::exception) { OSL_ENSURE( nLevel> 0, "you can only insert category levels > 0" );//the first categories level cannot be deleted, check the calling code for error if( nLevel>0 ) @@ -1072,7 +1056,6 @@ void SAL_CALL InternalDataProvider::insertComplexCategoryLevel( sal_Int32 nLevel } } void SAL_CALL InternalDataProvider::deleteComplexCategoryLevel( sal_Int32 nLevel ) - throw (uno::RuntimeException, std::exception) { OSL_ENSURE( nLevel>0, "you can only delete category levels > 0" );//the first categories level cannot be deleted, check the calling code for error if( nLevel>0 ) @@ -1090,7 +1073,6 @@ void SAL_CALL InternalDataProvider::deleteComplexCategoryLevel( sal_Int32 nLevel } void SAL_CALL InternalDataProvider::insertDataPointForAllSequences( ::sal_Int32 nAfterIndex ) - throw (uno::RuntimeException, std::exception) { sal_Int32 nMaxRep = 0; if( m_bDataInColumns ) @@ -1114,7 +1096,6 @@ void SAL_CALL InternalDataProvider::insertDataPointForAllSequences( ::sal_Int32 } void SAL_CALL InternalDataProvider::deleteDataPointForAllSequences( ::sal_Int32 nAtIndex ) - throw (uno::RuntimeException, std::exception) { sal_Int32 nMaxRep = 0; if( m_bDataInColumns ) @@ -1138,7 +1119,6 @@ void SAL_CALL InternalDataProvider::deleteDataPointForAllSequences( ::sal_Int32 } void SAL_CALL InternalDataProvider::swapDataPointWithNextOneForAllSequences( ::sal_Int32 nAtIndex ) - throw (uno::RuntimeException, std::exception) { if( m_bDataInColumns ) m_aInternalData.swapRowWithNext( nAtIndex ); @@ -1158,7 +1138,6 @@ void SAL_CALL InternalDataProvider::swapDataPointWithNextOneForAllSequences( ::s } void SAL_CALL InternalDataProvider::registerDataSequenceForChanges( const Reference< chart2::data::XDataSequence >& xSeq ) - throw (uno::RuntimeException, std::exception) { if( xSeq.is()) addDataSequenceToMap( xSeq->getSourceRangeRepresentation(), xSeq ); @@ -1166,8 +1145,6 @@ void SAL_CALL InternalDataProvider::registerDataSequenceForChanges( const Refere // ____ XRangeXMLConversion ____ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRangeRepresentation ) - throw (lang::IllegalArgumentException, - uno::RuntimeException, std::exception) { XMLRangeHelper::CellRange aRange; aRange.aTableName = "local-table"; @@ -1244,8 +1221,6 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang } OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXMLRange ) - throw (lang::IllegalArgumentException, - uno::RuntimeException, std::exception) { XMLRangeHelper::CellRange aRange( XMLRangeHelper::getCellRangeFromXMLString( aXMLRange )); if( aRange.aUpperLeft.bIsEmpty ) @@ -1372,7 +1347,7 @@ uno::Sequence< OUString > SplitCategoriesProvider_ForComplexDescriptions::getStr }//anonymous namespace // ____ XDateCategories ____ -Sequence< double > SAL_CALL InternalDataProvider::getDateCategories() throw (uno::RuntimeException, std::exception) +Sequence< double > SAL_CALL InternalDataProvider::getDateCategories() { double fNan = InternalDataProvider::getNotANumber(); double fValue = fNan; @@ -1390,7 +1365,7 @@ Sequence< double > SAL_CALL InternalDataProvider::getDateCategories() throw (uno return aDoubles; } -void SAL_CALL InternalDataProvider::setDateCategories( const Sequence< double >& rDates ) throw (uno::RuntimeException, std::exception) +void SAL_CALL InternalDataProvider::setDateCategories( const Sequence< double >& rDates ) { sal_Int32 nCount = rDates.getLength(); vector< vector< uno::Any > > aNewCategories; @@ -1410,56 +1385,53 @@ void SAL_CALL InternalDataProvider::setDateCategories( const Sequence< double >& } // ____ XAnyDescriptionAccess ____ -Sequence< Sequence< uno::Any > > SAL_CALL InternalDataProvider::getAnyRowDescriptions() throw (uno::RuntimeException, std::exception) +Sequence< Sequence< uno::Any > > SAL_CALL InternalDataProvider::getAnyRowDescriptions() { return lcl_convertVectorVectorToSequenceSequence( m_aInternalData.getComplexRowLabels() ); } -void SAL_CALL InternalDataProvider::setAnyRowDescriptions( const Sequence< Sequence< uno::Any > >& aRowDescriptions ) throw (uno::RuntimeException, std::exception) +void SAL_CALL InternalDataProvider::setAnyRowDescriptions( const Sequence< Sequence< uno::Any > >& aRowDescriptions ) { m_aInternalData.setComplexRowLabels( lcl_convertSequenceSequenceToVectorVector( aRowDescriptions ) ); } -Sequence< Sequence< uno::Any > > SAL_CALL InternalDataProvider::getAnyColumnDescriptions() throw (uno::RuntimeException, std::exception) +Sequence< Sequence< uno::Any > > SAL_CALL InternalDataProvider::getAnyColumnDescriptions() { return lcl_convertVectorVectorToSequenceSequence( m_aInternalData.getComplexColumnLabels() ); } -void SAL_CALL InternalDataProvider::setAnyColumnDescriptions( const Sequence< Sequence< uno::Any > >& aColumnDescriptions ) throw (uno::RuntimeException, std::exception) +void SAL_CALL InternalDataProvider::setAnyColumnDescriptions( const Sequence< Sequence< uno::Any > >& aColumnDescriptions ) { m_aInternalData.setComplexColumnLabels( lcl_convertSequenceSequenceToVectorVector( aColumnDescriptions ) ); } // ____ XComplexDescriptionAccess ____ -Sequence< Sequence< OUString > > SAL_CALL InternalDataProvider::getComplexRowDescriptions() throw (uno::RuntimeException, std::exception) +Sequence< Sequence< OUString > > SAL_CALL InternalDataProvider::getComplexRowDescriptions() { return comphelper::containerToSequence(lcl_convertComplexAnyVectorToStringSequence( m_aInternalData.getComplexRowLabels() )); } -void SAL_CALL InternalDataProvider::setComplexRowDescriptions( const Sequence< Sequence< OUString > >& aRowDescriptions ) throw (uno::RuntimeException, std::exception) +void SAL_CALL InternalDataProvider::setComplexRowDescriptions( const Sequence< Sequence< OUString > >& aRowDescriptions ) { m_aInternalData.setComplexRowLabels( lcl_convertComplexStringSequenceToAnyVector(aRowDescriptions) ); } -Sequence< Sequence< OUString > > SAL_CALL InternalDataProvider::getComplexColumnDescriptions() throw (uno::RuntimeException, std::exception) +Sequence< Sequence< OUString > > SAL_CALL InternalDataProvider::getComplexColumnDescriptions() { return comphelper::containerToSequence(lcl_convertComplexAnyVectorToStringSequence( m_aInternalData.getComplexColumnLabels() )); } -void SAL_CALL InternalDataProvider::setComplexColumnDescriptions( const Sequence< Sequence< OUString > >& aColumnDescriptions ) throw (uno::RuntimeException, std::exception) +void SAL_CALL InternalDataProvider::setComplexColumnDescriptions( const Sequence< Sequence< OUString > >& aColumnDescriptions ) { m_aInternalData.setComplexColumnLabels( lcl_convertComplexStringSequenceToAnyVector(aColumnDescriptions) ); } // ____ XChartDataArray ____ Sequence< Sequence< double > > SAL_CALL InternalDataProvider::getData() - throw (uno::RuntimeException, std::exception) { return m_aInternalData.getData(); } void SAL_CALL InternalDataProvider::setData( const Sequence< Sequence< double > >& rDataInRows ) - throw (uno::RuntimeException, std::exception) { return m_aInternalData.setData( rDataInRows ); } void SAL_CALL InternalDataProvider::setRowDescriptions( const Sequence< OUString >& aRowDescriptions ) - throw (uno::RuntimeException, std::exception) { vector< vector< uno::Any > > aComplexDescriptions( aRowDescriptions.getLength() ); transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aRowDescriptions.getConstArray(), @@ -1468,7 +1440,6 @@ void SAL_CALL InternalDataProvider::setRowDescriptions( const Sequence< OUString } void SAL_CALL InternalDataProvider::setColumnDescriptions( const Sequence< OUString >& aColumnDescriptions ) - throw (uno::RuntimeException, std::exception) { vector< vector< uno::Any > > aComplexDescriptions( aColumnDescriptions.getLength() ); transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aColumnDescriptions.getConstArray(), @@ -1477,7 +1448,6 @@ void SAL_CALL InternalDataProvider::setColumnDescriptions( const Sequence< OUStr } Sequence< OUString > SAL_CALL InternalDataProvider::getRowDescriptions() - throw (uno::RuntimeException, std::exception) { vector< vector< uno::Any > > aComplexLabels( m_aInternalData.getComplexRowLabels() ); SplitCategoriesProvider_ForComplexDescriptions aProvider( aComplexLabels ); @@ -1485,7 +1455,6 @@ Sequence< OUString > SAL_CALL InternalDataProvider::getRowDescriptions() } Sequence< OUString > SAL_CALL InternalDataProvider::getColumnDescriptions() - throw (uno::RuntimeException, std::exception) { vector< vector< uno::Any > > aComplexLabels( m_aInternalData.getComplexColumnLabels() ); SplitCategoriesProvider_ForComplexDescriptions aProvider( aComplexLabels ); @@ -1495,18 +1464,15 @@ Sequence< OUString > SAL_CALL InternalDataProvider::getColumnDescriptions() // ____ XChartData (base of XChartDataArray) ____ void SAL_CALL InternalDataProvider::addChartDataChangeEventListener( const Reference< css::chart::XChartDataChangeEventListener >& ) - throw (uno::RuntimeException, std::exception) { } void SAL_CALL InternalDataProvider::removeChartDataChangeEventListener( const Reference< css::chart::XChartDataChangeEventListener >& ) - throw (uno::RuntimeException, std::exception) { } double SAL_CALL InternalDataProvider::getNotANumber() - throw (uno::RuntimeException, std::exception) { double fNan; ::rtl::math::setNan( & fNan ); @@ -1514,13 +1480,12 @@ double SAL_CALL InternalDataProvider::getNotANumber() } sal_Bool SAL_CALL InternalDataProvider::isNotANumber( double nNumber ) - throw (uno::RuntimeException, std::exception) { return ::rtl::math::isNan( nNumber ) || ::rtl::math::isInf( nNumber ); } // lang::XInitialization: -void SAL_CALL InternalDataProvider::initialize(const uno::Sequence< uno::Any > & _aArguments) throw (uno::RuntimeException, uno::Exception, std::exception) +void SAL_CALL InternalDataProvider::initialize(const uno::Sequence< uno::Any > & _aArguments) { comphelper::SequenceAsHashMap aArgs(_aArguments); if ( aArgs.getUnpackedValueOrDefault( "CreateDefaultData", false ) ) @@ -1529,26 +1494,22 @@ void SAL_CALL InternalDataProvider::initialize(const uno::Sequence< uno::Any > & // ____ XCloneable ____ Reference< util::XCloneable > SAL_CALL InternalDataProvider::createClone() - throw (uno::RuntimeException, std::exception) { return Reference< util::XCloneable >( new InternalDataProvider( *this )); } OUString SAL_CALL InternalDataProvider::getImplementationName() - throw( css::uno::RuntimeException, std::exception ) { // note: in xmloff this name is used to indicate usage of own data return OUString("com.sun.star.comp.chart.InternalDataProvider"); } sal_Bool SAL_CALL InternalDataProvider::supportsService( const OUString& rServiceName ) - throw( css::uno::RuntimeException, std::exception ) { return cppu::supportsService(this, rServiceName); } css::uno::Sequence< OUString > SAL_CALL InternalDataProvider::getSupportedServiceNames() - throw( css::uno::RuntimeException, std::exception ) { return { "com.sun.star.chart2.data.DataProvider" }; } |