diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 07:38:13 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 07:38:13 +1000 |
commit | ebe3547ea9381db2561fbb24cc27c202fff02db6 (patch) | |
tree | a0579e18930033e473b1b5bcbac883f1a353ce83 /chart2 | |
parent | 42bc6835c5af87ab15cb54c3754f7f198a22a105 (diff) |
tdf#43157: convert chart2 model source from OSL_ASSERT to assert
Change-Id: Id426cf71bfa63a202979e6bd3fa230cabeeb4dcc
Diffstat (limited to 'chart2')
15 files changed, 29 insertions, 29 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index 69ac5871f21e..689ece847e94 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -328,10 +328,10 @@ void lcl_CloneSubGrids( } (*pDestIt) = xSubGrid; - OSL_ASSERT( pDestIt != pDestEnd ); + assert( pDestIt != pDestEnd ); ++pDestIt; } - OSL_ASSERT( pDestIt == pDestEnd ); + assert( pDestIt == pDestEnd ); (void)(pDestEnd); // avoid warning } diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index 38694dcdf0e2..38d8a470811d 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -228,7 +228,7 @@ Reference< chart2::XAxis > SAL_CALL BaseCoordinateSystem::getAxisByDimension( if( nDimensionIndex < 0 || nDimensionIndex >= getDimension() ) throw lang::IndexOutOfBoundsException(); - OSL_ASSERT( m_aAllAxis.size() == static_cast< size_t >( getDimension())); + assert(m_aAllAxis.size() == static_cast< size_t >( getDimension())); if( nAxisIndex < 0 || nAxisIndex > this->getMaximumAxisIndexByDimension(nDimensionIndex) ) throw lang::IndexOutOfBoundsException(); @@ -241,7 +241,7 @@ sal_Int32 SAL_CALL BaseCoordinateSystem::getMaximumAxisIndexByDimension( sal_Int if( nDimensionIndex < 0 || nDimensionIndex >= getDimension() ) throw lang::IndexOutOfBoundsException(); - OSL_ASSERT( m_aAllAxis.size() == static_cast< size_t >( getDimension())); + assert(m_aAllAxis.size() == static_cast< size_t >( getDimension())); sal_Int32 nRet = m_aAllAxis[ nDimensionIndex ].size(); if(nRet) diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 834e05c9861c..c9a8bc6df1a1 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -521,7 +521,7 @@ void SAL_CALL ChartModel::load( } else { - OSL_ASSERT( aMDHelper.ISSET_InputStream ); + assert( aMDHelper.ISSET_InputStream ); // convert XInputStream to XStorage via the storage factory Sequence< uno::Any > aStorageArgs( 2 ); aStorageArgs[0] <<= aMDHelper.InputStream; diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx index ec3e3cfe292d..52f26a4e58d8 100644 --- a/chart2/source/model/main/DataPoint.cxx +++ b/chart2/source/model/main/DataPoint.cxx @@ -196,7 +196,7 @@ void SAL_CALL DataPoint::setFastPropertyValue_NoBroadcast( ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder ); } - OSL_ASSERT( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE ); + assert( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE ); if( rValue.hasValue() && (rValue >>= xBroadcaster) && xBroadcaster.is()) diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx index 6eebded278cb..eb2ee2dbdd3c 100644 --- a/chart2/source/model/main/DataSeries.cxx +++ b/chart2/source/model/main/DataSeries.cxx @@ -284,7 +284,7 @@ void SAL_CALL DataSeries::setFastPropertyValue_NoBroadcast( ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder ); } - OSL_ASSERT( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE ); + assert( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE ); if( rValue.hasValue() && (rValue >>= xBroadcaster) && xBroadcaster.is()) diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx index a43356152f7e..b2b7f34edea7 100644 --- a/chart2/source/model/template/BubbleDataInterpreter.cxx +++ b/chart2/source/model/template/BubbleDataInterpreter.cxx @@ -143,9 +143,9 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource( xSeries.set( aSeriesToReUse[nSeriesIndex] ); else xSeries.set( new DataSeries ); - OSL_ASSERT( xSeries.is() ); + assert( xSeries.is() ); Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY ); - OSL_ASSERT( xSink.is() ); + assert( xSink.is() ); xSink->setData( comphelper::containerToSequence( aNewData ) ); aSeriesVec.push_back( xSeries ); diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx index 32cae2fa556c..45a2f02dabbe 100644 --- a/chart2/source/model/template/CandleStickChartType.cxx +++ b/chart2/source/model/template/CandleStickChartType.cxx @@ -304,7 +304,7 @@ void SAL_CALL CandleStickChartType::setFastPropertyValue_NoBroadcast( ModifyListenerHelper::removeListener( xBroadcaster, m_xModifyEventForwarder ); } - OSL_ASSERT( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE ); + assert( rValue.getValueType().getTypeClass() == uno::TypeClass_INTERFACE ); if( rValue.hasValue() && (rValue >>= xBroadcaster) && xBroadcaster.is()) diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index c98d79760cf9..1c69a470f298 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -544,7 +544,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance( // break; case TEMPLATE_NOT_FOUND: - OSL_ASSERT( false ); + assert(false); break; } xResult.set( xTemplate, uno::UNO_QUERY ); diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index cc7b5b833145..7458458d4047 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -234,7 +234,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram > DiagramHelper::getChartTypesFromDiagram(xDiagram) ); Reference< XCoordinateSystemContainer > xCoordSysCnt( xDiagram, uno::UNO_QUERY ); - OSL_ASSERT( xCoordSysCnt.is()); + assert(xCoordSysCnt.is()); if( xCoordSysCnt.is()) { Sequence< Reference< XCoordinateSystem > > aCooSysSeq( @@ -466,7 +466,7 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram //iterate through all chart types in the current coordinate system uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY ); - OSL_ASSERT( xChartTypeContainer.is()); + assert(xChartTypeContainer.is()); if( !xChartTypeContainer.is() ) continue; uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); @@ -476,7 +476,7 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram //iterate through all series in this chart type uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY ); - OSL_ASSERT( xDataSeriesContainer.is()); + assert(xDataSeriesContainer.is()); if( !xDataSeriesContainer.is() ) continue; @@ -836,7 +836,7 @@ void ChartTypeTemplate::createChartTypes( else { // reuse existing chart type - OSL_ASSERT( xCT.is()); + assert(xCT.is()); Reference< chart2::XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW ); Sequence< Reference< XDataSeries > > aNewSeriesSeq( xDSCnt->getDataSeries()); sal_Int32 nNewStartIndex = aNewSeriesSeq.getLength(); diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx index f6dd85178eec..e2c0ddd29eee 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -313,7 +313,7 @@ sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate( xColumnChartType.is() && xLineChartType.is()) { - OSL_ASSERT( xColumnChartCooSys.is()); + assert(xColumnChartCooSys.is()); // check stackmode of bars bResult = (xColumnChartCooSys->getDimension() == getDimension()); diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.cxx b/chart2/source/model/template/ColumnLineDataInterpreter.cxx index f3000954d5ca..0e8917e1355c 100644 --- a/chart2/source/model/template/ColumnLineDataInterpreter.cxx +++ b/chart2/source/model/template/ColumnLineDataInterpreter.cxx @@ -58,7 +58,7 @@ InterpretedData SAL_CALL ColumnLineDataInterpreter::interpretDataSource( InterpretedData aResult( DataInterpreter::interpretDataSource( xSource, aArguments, aSeriesToReUse )); // the base class should return one group - OSL_ASSERT( aResult.Series.getLength() == 1 ); + assert( aResult.Series.getLength() == 1 ); if( aResult.Series.getLength() == 1 ) { sal_Int32 nNumberOfSeries = aResult.Series[0].getLength(); diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx index 57f03562e85d..f67ccbc35e23 100644 --- a/chart2/source/model/template/DataInterpreter.cxx +++ b/chart2/source/model/template/DataInterpreter.cxx @@ -118,9 +118,9 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource( xSeries.set( aSeriesToReUse[nSeriesIndex] ); else xSeries.set( new DataSeries ); - OSL_ASSERT( xSeries.is() ); + assert( xSeries.is() ); Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY ); - OSL_ASSERT( xSink.is() ); + assert( xSink.is() ); xSink->setData( aNewData ); aSeriesVec.push_back( xSeries ); diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx index bc29b89ac2b3..e2938628d8fa 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -207,7 +207,7 @@ sal_Int32 StockChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension return 0; // one or two y-axes depending on volume - OSL_ASSERT( nDimension == 1 ); + assert( nDimension == 1 ); bool bHasVolume = false; getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_VOLUME ) >>= bHasVolume; return bHasVolume ? 2 : 1; diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx index b1844f1da84a..c3169299ba6b 100644 --- a/chart2/source/model/template/StockDataInterpreter.cxx +++ b/chart2/source/model/template/StockDataInterpreter.cxx @@ -170,9 +170,9 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( // 3. create series with remaining sequences if( bHasVolume && nRemaining > 1 ) { - OSL_ASSERT( nVolumeSeries > nNumOfFullSeries ); + assert( nVolumeSeries > nNumOfFullSeries ); aSequences[nBarGroupIndex][nVolumeSeries - 1].realloc( 1 ); - OSL_ASSERT( nDataCount > nSourceIndex ); + assert( nDataCount > nSourceIndex ); if( aData[nSourceIndex].is()) SetRole( aData[nSourceIndex]->getValues(), "values-y"); aSequences[nBarGroupIndex][nVolumeSeries - 1][0].set( aData[nSourceIndex] ); @@ -184,10 +184,10 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( // candle-stick if( nRemaining > 0 ) { - OSL_ASSERT( nCandleStickSeries > nNumOfFullSeries ); + assert( nCandleStickSeries > nNumOfFullSeries ); const sal_Int32 nSeriesIndex = nCandleStickSeries - 1; aSequences[nCandleStickGroupIndex][nSeriesIndex].realloc( nRemaining ); - OSL_ASSERT( nDataCount > nSourceIndex ); + assert( nDataCount > nSourceIndex ); // 1. low sal_Int32 nSeqIdx( 0 ); @@ -238,9 +238,9 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( xSeries.set( rSeriesToReUse[nReUsedSeriesIdx] ); else xSeries.set( new DataSeries ); - OSL_ASSERT( xSeries.is() ); + assert( xSeries.is() ); Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY_THROW ); - OSL_ASSERT( xSink.is() ); + assert( xSink.is() ); xSink->setData( aSequences[nGroupIndex][nSeriesIdx] ); aResultSeries[nGroupIndex][nSeriesIdx].set( xSeries ); } @@ -289,7 +289,7 @@ sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible( // 2. b. candlestick { - OSL_ASSERT( aInterpretedData.Series.getLength() > (bHasVolume ? 1 : 0)); + assert(aInterpretedData.Series.getLength() > (bHasVolume ? 1 : 0)); Sequence< Reference< XDataSeries > > aSeries( aInterpretedData.Series[(bHasVolume ? 1 : 0)] ); if(!aSeries.getLength()) return false; diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx index c0d05a60ca98..7c0e37e40b16 100644 --- a/chart2/source/model/template/XYDataInterpreter.cxx +++ b/chart2/source/model/template/XYDataInterpreter.cxx @@ -127,9 +127,9 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource( xSeries.set( aSeriesToReUse[nSeriesIndex] ); else xSeries.set( new DataSeries ); - OSL_ASSERT( xSeries.is() ); + assert( xSeries.is() ); Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY ); - OSL_ASSERT( xSink.is() ); + assert( xSink.is() ); xSink->setData( comphelper::containerToSequence( aNewData ) ); aSeriesVec.push_back( xSeries ); |