diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 17:03:35 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 17:03:35 +1000 |
commit | 97eb00c75e173d4c8d0b483a7941ad3d2f23783e (patch) | |
tree | 7974a8b9423c56982646366b0859dfb2a1a88d50 /chart2/source/tools | |
parent | d0a99cc2ed76be220f7e868e332ba19f6e48a440 (diff) |
revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
Diffstat (limited to 'chart2/source/tools')
-rw-r--r-- | chart2/source/tools/AxisHelper.cxx | 4 | ||||
-rw-r--r-- | chart2/source/tools/CachedDataSequence.cxx | 6 | ||||
-rw-r--r-- | chart2/source/tools/CharacterProperties.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/CommonConverters.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/ConfigColorScheme.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 22 | ||||
-rw-r--r-- | chart2/source/tools/InternalData.cxx | 8 | ||||
-rw-r--r-- | chart2/source/tools/InternalDataProvider.cxx | 8 | ||||
-rw-r--r-- | chart2/source/tools/MeanValueRegressionCurveCalculator.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/PropertyHelper.cxx | 4 | ||||
-rw-r--r-- | chart2/source/tools/RelativePositionHelper.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/ResourceManager.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/StatisticsHelper.cxx | 2 |
13 files changed, 33 insertions, 33 deletions
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index d7921c9fb8b1..473d1eed8015 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -351,7 +351,7 @@ Reference< XAxis > AxisHelper::createAxis( Reference< XAxis > xAxis( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.chart2.Axis", xContext ), uno::UNO_QUERY ); - assert( xAxis.is()); + OSL_ASSERT( xAxis.is()); if( xAxis.is()) { xCooSys->setAxisByDimension( nDimensionIndex, xAxis, nAxisIndex ); @@ -439,7 +439,7 @@ void AxisHelper::showAxis( sal_Int32 nDimensionIndex, bool bMainAxis xAxis.set( AxisHelper::createAxis( nDimensionIndex, bMainAxis, xDiagram, xContext, pRefSizeProvider ) ); } - assert( xAxis.is()); + OSL_ASSERT( xAxis.is()); if( !bNewAxisCreated ) //default is true already if created AxisHelper::makeAxisVisible( xAxis ); } diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx index f1ad78f7fbfc..53c5705d6d44 100644 --- a/chart2/source/tools/CachedDataSequence.cxx +++ b/chart2/source/tools/CachedDataSequence.cxx @@ -150,7 +150,7 @@ Sequence< double > CachedDataSequence::Impl_getNumericalData() const } else { - assert( m_eCurrentDataType == MIXED ); + OSL_ASSERT( m_eCurrentDataType == MIXED ); const Any * pMixedArray = m_aMixedSequence.getConstArray(); std::transform( pMixedArray, pMixedArray + nSize, pResultArray, @@ -180,7 +180,7 @@ Sequence< OUString > CachedDataSequence::Impl_getTextualData() const } else { - assert( m_eCurrentDataType == MIXED ); + OSL_ASSERT( m_eCurrentDataType == MIXED ); const Any * pMixedArray = m_aMixedSequence.getConstArray(); std::transform( pMixedArray, pMixedArray + nSize, pResultArray, @@ -211,7 +211,7 @@ Sequence< Any > CachedDataSequence::Impl_getMixedData() const } else { - assert( m_eCurrentDataType == TEXTUAL ); + OSL_ASSERT( m_eCurrentDataType == TEXTUAL ); const OUString * pMixedArray = m_aTextualSequence.getConstArray(); std::transform( pMixedArray, pMixedArray + nSize, pResultArray, diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx index 223ef040dc4f..663f3b9c96a2 100644 --- a/chart2/source/tools/CharacterProperties.cxx +++ b/chart2/source/tools/CharacterProperties.cxx @@ -501,7 +501,7 @@ awt::FontDescriptor CharacterProperties::createFontDescriptorFromPropertySet( aValues[ i++ ] >>= aResult.Underline; aValues[ i++ ] >>= aResult.Weight; aValues[ i++ ] >>= aResult.WordLineMode; - assert( i == aValues.getLength()); + OSL_ASSERT( i == aValues.getLength()); return aResult; } diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx index 3c749d5d57f8..436c1050ac6c 100644 --- a/chart2/source/tools/CommonConverters.cxx +++ b/chart2/source/tools/CommonConverters.cxx @@ -421,7 +421,7 @@ uno::Sequence< double > DataSequenceToDoubleSequence( const uno::Reference< data::XDataSequence >& xDataSequence ) { uno::Sequence< double > aResult; - assert( xDataSequence.is()); + OSL_ASSERT( xDataSequence.is()); if(!xDataSequence.is()) return aResult; diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index b61b84d29f45..e4792d415ecf 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -125,7 +125,7 @@ void ConfigColorScheme::retrieveConfigColors() new impl::ChartConfigItem( *this )); m_apChartConfigItem->addPropertyNotification( aSeriesPropName ); } - assert( m_apChartConfigItem.get()); + OSL_ASSERT( m_apChartConfigItem.get()); if( ! m_apChartConfigItem.get()) return; diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index a5958fa8ddee..3bc8e462a839 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -291,7 +291,7 @@ void DiagramHelper::setStackMode( //iterate through all series in this chart type uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY ); - assert( xDataSeriesContainer.is()); + OSL_ASSERT( xDataSeriesContainer.is()); if( !xDataSeriesContainer.is() ) continue; @@ -380,7 +380,7 @@ StackMode DiagramHelper::getStackModeFromChartType( chart2::StackingDirection eCurrentDirection = eCommonDirection; // property is not MAYBEVOID bool bSuccess = ( xProp->getPropertyValue( "StackingDirection" ) >>= eCurrentDirection ); - assert( bSuccess ); + OSL_ASSERT( bSuccess ); (void)(bSuccess); // avoid warning in non-debug builds if( ! bDirectionInitialized ) { @@ -532,7 +532,7 @@ void DiagramHelper::replaceCoordinateSystem( const Reference< XCoordinateSystem > & xCooSysToReplace, const Reference< XCoordinateSystem > & xReplacement ) { - assert( xDiagram.is()); + OSL_ASSERT( xDiagram.is()); if( ! xDiagram.is()) return; @@ -645,7 +645,7 @@ uno::Reference< XChartType > DiagramHelper::getChartTypeOfSeries( //iterate through all chart types in the current coordinate system uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY ); - assert( xChartTypeContainer.is()); + OSL_ASSERT( xChartTypeContainer.is()); if( !xChartTypeContainer.is() ) continue; uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); @@ -655,7 +655,7 @@ uno::Reference< XChartType > DiagramHelper::getChartTypeOfSeries( //iterate through all series in this chart type uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY ); - assert( xDataSeriesContainer.is()); + OSL_ASSERT( xDataSeriesContainer.is()); if( !xDataSeriesContainer.is() ) continue; @@ -781,14 +781,14 @@ std::vector< Reference< XAxis > > lcl_getAxisHoldingCategoriesFromDiagram( for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i ) { Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] ); - assert( xCooSys.is()); + OSL_ASSERT( xCooSys.is()); for( sal_Int32 nN = xCooSys->getDimension(); nN--; ) { const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nN); for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI) { Reference< XAxis > xAxis = xCooSys->getAxisByDimension( nN,nI ); - assert( xAxis.is()); + OSL_ASSERT( xAxis.is()); if( xAxis.is()) { ScaleData aScaleData = xAxis->getScaleData(); @@ -828,14 +828,14 @@ bool DiagramHelper::isCategoryDiagram( for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i ) { Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] ); - assert( xCooSys.is()); + OSL_ASSERT( xCooSys.is()); for( sal_Int32 nN = xCooSys->getDimension(); nN--; ) { const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nN); for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI) { Reference< XAxis > xAxis = xCooSys->getAxisByDimension( nN,nI ); - assert( xAxis.is()); + OSL_ASSERT( xAxis.is()); if( xAxis.is()) { ScaleData aScaleData = xAxis->getScaleData(); @@ -1314,7 +1314,7 @@ bool lcl_moveSeriesOrCheckIfMoveIsAllowed( //iterate through all chart types in the current coordinate system uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY ); - assert( xChartTypeContainer.is()); + OSL_ASSERT( xChartTypeContainer.is()); if( !xChartTypeContainer.is() ) continue; uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); @@ -1326,7 +1326,7 @@ bool lcl_moveSeriesOrCheckIfMoveIsAllowed( //iterate through all series in this chart type uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xCurrentChartType, uno::UNO_QUERY ); - assert( xDataSeriesContainer.is()); + OSL_ASSERT( xDataSeriesContainer.is()); if( !xDataSeriesContainer.is() ) continue; diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx index 2e6e0f8ec8bf..e24695621824 100644 --- a/chart2/source/tools/InternalData.cxx +++ b/chart2/source/tools/InternalData.cxx @@ -307,7 +307,7 @@ bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount ) void InternalData::insertColumn( sal_Int32 nAfterIndex ) { // note: -1 is allowed, as we insert after the given index - assert( nAfterIndex < m_nColumnCount && nAfterIndex >= -1 ); + OSL_ASSERT( nAfterIndex < m_nColumnCount && nAfterIndex >= -1 ); if( nAfterIndex >= m_nColumnCount || nAfterIndex < -1 ) return; sal_Int32 nNewColumnCount = m_nColumnCount + 1; @@ -364,7 +364,7 @@ sal_Int32 InternalData::getColumnCount() const void InternalData::insertRow( sal_Int32 nAfterIndex ) { // note: -1 is allowed, as we insert after the given index - assert( nAfterIndex < m_nRowCount && nAfterIndex >= -1 ); + OSL_ASSERT( nAfterIndex < m_nRowCount && nAfterIndex >= -1 ); if( nAfterIndex >= m_nRowCount || nAfterIndex < -1 ) return; sal_Int32 nNewRowCount = m_nRowCount + 1; @@ -401,7 +401,7 @@ void InternalData::insertRow( sal_Int32 nAfterIndex ) void InternalData::deleteColumn( sal_Int32 nAtIndex ) { - assert( nAtIndex < m_nColumnCount && nAtIndex >= 0 ); + OSL_ASSERT( nAtIndex < m_nColumnCount && nAtIndex >= 0 ); if( nAtIndex >= m_nColumnCount || m_nColumnCount < 1 || nAtIndex < 0 ) return; sal_Int32 nNewColumnCount = m_nColumnCount - 1; @@ -435,7 +435,7 @@ void InternalData::deleteColumn( sal_Int32 nAtIndex ) void InternalData::deleteRow( sal_Int32 nAtIndex ) { - assert( nAtIndex < m_nRowCount && nAtIndex >= 0 ); + OSL_ASSERT( nAtIndex < m_nRowCount && nAtIndex >= 0 ); if( nAtIndex >= m_nRowCount || m_nRowCount < 1 || nAtIndex < 0 ) return; sal_Int32 nNewRowCount = m_nRowCount - 1; diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index da95f3486543..fa77624adc44 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -712,7 +712,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData return new DataSource( comphelper::containerToSequence(aComplexCategories) ); } - assert( aRangeRepresentation == lcl_aCompleteRange ); + OSL_ASSERT( aRangeRepresentation == lcl_aCompleteRange ); std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultLSeqVec; @@ -799,7 +799,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa { if( aRangeRepresentation.match( lcl_aCategoriesRangeName )) { - assert( aRangeRepresentation == lcl_aCategoriesRangeName );//it is not expected nor implemented that only parts of the categories are really requested + OSL_ASSERT( aRangeRepresentation == lcl_aCategoriesRangeName );//it is not expected nor implemented that only parts of the categories are really requested // categories return createDataSequenceAndAddToMap( lcl_aCategoriesRangeName, lcl_aCategoriesRoleName ); @@ -846,7 +846,7 @@ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUSt if( aRange.match( lcl_aCategoriesRangeName )) { - assert( aRange == lcl_aCategoriesRangeName );//it is not expected nor implemented that only parts of the categories are really requested + OSL_ASSERT( aRange == lcl_aCategoriesRangeName );//it is not expected nor implemented that only parts of the categories are really requested bResult = true; } else if( aRange.match( lcl_aLabelRangePrefix )) @@ -1155,7 +1155,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang // @todo: add this information in the range representation strings if( aRangeRepresentation.match( lcl_aCategoriesRangeName )) { - assert( aRangeRepresentation == lcl_aCategoriesRangeName );//it is not expected nor implemented that only parts of the categories are really requested + OSL_ASSERT( aRangeRepresentation == lcl_aCategoriesRangeName );//it is not expected nor implemented that only parts of the categories are really requested aRange.aUpperLeft.bIsEmpty = false; if( m_bDataInColumns ) { diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx index dcd9851b7058..6d662c1d252d 100644 --- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx +++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx @@ -80,7 +80,7 @@ void SAL_CALL MeanValueRegressionCurveCalculator::recalculateRegression( fErrorSum += (v*v); } } - assert( fErrorSum >= 0.0 ); + OSL_ASSERT( fErrorSum >= 0.0 ); m_fCorrelationCoeffitient = sqrt( fErrorSum / (nMax - 1 )); } } diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx index 5b613629032b..8741037b6014 100644 --- a/chart2/source/tools/PropertyHelper.cxx +++ b/chart2/source/tools/PropertyHelper.cxx @@ -41,7 +41,7 @@ struct lcl_EqualsElement : public std::unary_function< OUString, bool > explicit lcl_EqualsElement( const Any & rValue, const Reference< container::XNameAccess > & xAccess ) : m_aValue( rValue ), m_xAccess( xAccess ) { - assert( m_xAccess.is()); + OSL_ASSERT( m_xAccess.is()); } bool operator() ( const OUString & rName ) @@ -155,7 +155,7 @@ OUString lcl_addNamedPropertyUniqueNameToTable( aUniqueName = rPrefix + OUString::number( nIndex ); } - assert( !aUniqueName.isEmpty()); + OSL_ASSERT( !aUniqueName.isEmpty()); xNameContainer->insertByName( aUniqueName, rValue ); return aUniqueName; } diff --git a/chart2/source/tools/RelativePositionHelper.cxx b/chart2/source/tools/RelativePositionHelper.cxx index 0c7d6171bdf2..a205d75d6448 100644 --- a/chart2/source/tools/RelativePositionHelper.cxx +++ b/chart2/source/tools/RelativePositionHelper.cxx @@ -304,7 +304,7 @@ bool RelativePositionHelper::centerGrow( } // anchor must not be changed - assert( rInOutPosition.Anchor == aPos.Anchor ); + OSL_ASSERT( rInOutPosition.Anchor == aPos.Anchor ); if( rInOutPosition.Primary == aPos.Primary && rInOutPosition.Secondary == aPos.Secondary && diff --git a/chart2/source/tools/ResourceManager.cxx b/chart2/source/tools/ResourceManager.cxx index 07b27fc61a8c..3f3fb615697a 100644 --- a/chart2/source/tools/ResourceManager.cxx +++ b/chart2/source/tools/ResourceManager.cxx @@ -30,7 +30,7 @@ ResMgr & ResourceManager::getResourceManager() static ResMgr * pResourceManager = nullptr; if( ! pResourceManager ) pResourceManager = ResMgr::CreateResMgr("chartcontroller"); - assert( pResourceManager ); + OSL_ASSERT( pResourceManager ); return *pResourceManager; } diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx index 94aa4faedd0e..f7f1ff7ef1d8 100644 --- a/chart2/source/tools/StatisticsHelper.cxx +++ b/chart2/source/tools/StatisticsHelper.cxx @@ -313,7 +313,7 @@ Reference< beans::XPropertySet > StatisticsHelper::addErrorBars( xErrorBar.set( new ErrorBar ); } - assert( xErrorBar.is()); + OSL_ASSERT( xErrorBar.is()); if( xErrorBar.is()) { xErrorBar->setPropertyValue( "ErrorBarStyle", uno::Any( nStyle )); |