diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 07:06:46 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 07:30:14 +1000 |
commit | 42bc6835c5af87ab15cb54c3754f7f198a22a105 (patch) | |
tree | 4c1408f26cb38601653bd279f6715a216ba9fd3a | |
parent | 73b70448be98b2617461d05b3ade04c35af9a535 (diff) |
tdf#43157: convert chart2 controller source from OSL_ASSERT to assert
Change-Id: I184c2c0ed74b6a94eb2366c35daf9ed386fbc36f
26 files changed, 65 insertions, 65 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index 832f48bac59d..fdfbc5b19ad7 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -87,7 +87,7 @@ AccessibleBase::AccessibleBase( m_bStateSetInitialized( false ) { // initialize some states - OSL_ASSERT( m_xStateSetHelper.is() ); + assert(m_xStateSetHelper.is()); m_xStateSetHelper->AddState( AccessibleStateType::ENABLED ); m_xStateSetHelper->AddState( AccessibleStateType::SHOWING ); m_xStateSetHelper->AddState( AccessibleStateType::VISIBLE ); @@ -97,7 +97,7 @@ AccessibleBase::AccessibleBase( AccessibleBase::~AccessibleBase() { - OSL_ASSERT( m_bIsDisposed ); + assert(m_bIsDisposed); } bool AccessibleBase::CheckDisposeState( bool bThrowException /* default: true */ ) const @@ -177,14 +177,14 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId void AccessibleBase::AddState( sal_Int16 aState ) { CheckDisposeState(); - OSL_ASSERT( m_xStateSetHelper.is() ); + assert(m_xStateSetHelper.is()); m_xStateSetHelper->AddState( aState ); } void AccessibleBase::RemoveState( sal_Int16 aState ) { CheckDisposeState(); - OSL_ASSERT( m_xStateSetHelper.is() ); + assert(m_xStateSetHelper.is()); m_xStateSetHelper->RemoveState( aState ); } diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx index b231b030c56a..6f113bf7fec8 100644 --- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx @@ -55,7 +55,7 @@ AccessibleChartElement::AccessibleChartElement( AccessibleChartElement::~AccessibleChartElement() { - OSL_ASSERT( CheckDisposeState( false /* don't throw exceptions */ ) ); + assert(CheckDisposeState(false /* don't throw exceptions */)); } // ________ protected ________ diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx index 2757cef19cb2..c12a8f59a974 100644 --- a/chart2/source/controller/accessibility/AccessibleChartShape.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx @@ -65,7 +65,7 @@ AccessibleChartShape::AccessibleChartShape( AccessibleChartShape::~AccessibleChartShape() { - OSL_ASSERT( CheckDisposeState( false /* don't throw exceptions */ ) ); + assert(CheckDisposeState(false /* don't throw exceptions */)); if ( m_pAccShape.is() ) { diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 4493a48c647d..4d3b90e6c0a9 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -582,7 +582,7 @@ void ChartDataWrapper::fireChartDataChangeEvent( css::chart::ChartDataChangeEven return; uno::Reference< uno::XInterface > xSrc( static_cast< cppu::OWeakObject* >( this )); - OSL_ASSERT( xSrc.is()); + assert(xSrc.is()); if( xSrc.is() ) aEvent.Source = xSrc; @@ -625,7 +625,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator ) bool bPercent = false; bool bDeep = false; uno::Reference< css::chart::XChartDocument > xOldDoc( xChartDoc, uno::UNO_QUERY ); - OSL_ASSERT( xOldDoc.is()); + assert(xOldDoc.is()); uno::Reference< beans::XPropertySet > xDiaProp( xOldDoc->getDiagram(), uno::UNO_QUERY ); if( xDiaProp.is()) { @@ -659,7 +659,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator ) switchToInternalDataProvider(); rDataOperator.apply(m_xDataAccess); uno::Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() ); - OSL_ASSERT( xDataProvider.is() ); + assert(xDataProvider.is()); if( !xDataProvider.is() ) return; uno::Reference< chart2::data::XDataSource > xSource( xDataProvider->createDataSource( aArguments ) ); diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index 5c03301bb21c..8cc1550658b7 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -273,8 +273,8 @@ Reference< beans::XPropertySet > TitleWrapper::getFirstCharacterPropertySet() void TitleWrapper::getFastCharacterPropertyValue( sal_Int32 nHandle, Any& rValue ) { - OSL_ASSERT( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle && - nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP ); + assert( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle && + nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP ); Reference< beans::XPropertySet > xProp( getFirstCharacterPropertySet(), uno::UNO_QUERY ); Reference< beans::XFastPropertySet > xFastProp( xProp, uno::UNO_QUERY ); @@ -296,8 +296,8 @@ void TitleWrapper::getFastCharacterPropertyValue( sal_Int32 nHandle, Any& rValue void TitleWrapper::setFastCharacterPropertyValue( sal_Int32 nHandle, const Any& rValue ) { - OSL_ASSERT( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle && - nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP ); + assert( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle && + nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP ); Reference< chart2::XTitle > xTitle( this->getTitleObject() ); if( xTitle.is()) diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 4548d3b6f4df..b694d54d45be 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -636,7 +636,7 @@ void DataBrowser::RenewTable() OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const { - OSL_ASSERT( m_apDataBrowserModel.get()); + assert(m_apDataBrowserModel.get()); if( nColumnId > 0 ) return OUString( m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 )); return OUString(); @@ -694,7 +694,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const } else { - OSL_ASSERT( m_apDataBrowserModel->getCellType( nColIndex ) == DataBrowserModel::TEXT ); + assert(m_apDataBrowserModel->getCellType( nColIndex ) == DataBrowserModel::TEXT); aResult = m_apDataBrowserModel->getCellText( nColIndex, nRow ); } } diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index 875137f1f576..50610be8ca39 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -279,7 +279,7 @@ private: void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex ) { - OSL_ASSERT( m_apDialogModel.get()); + assert(m_apDialogModel.get()); Reference< chart2::XInternalDataProvider > xDataProvider( m_apDialogModel->getDataProvider(), uno::UNO_QUERY ); @@ -400,7 +400,7 @@ void DataBrowserModel::insertComplexCategoryLevel( sal_Int32 nAfterColumnIndex ) { //create a new text column for complex categories - OSL_ASSERT( m_apDialogModel.get()); + assert(m_apDialogModel.get()); Reference< chart2::XInternalDataProvider > xDataProvider( m_apDialogModel->getDataProvider(), uno::UNO_QUERY ); if (!xDataProvider.is()) return; @@ -438,7 +438,7 @@ void DataBrowserModel::removeComplexCategoryLevel( sal_Int32 nAtColumnIndex ) void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColumnIndex ) { - OSL_ASSERT( m_apDialogModel.get()); + assert(m_apDialogModel.get()); if (nAtColumnIndex < 0 || static_cast<size_t>(nAtColumnIndex) >= m_aColumns.size()) // Out of bound. return; @@ -509,7 +509,7 @@ void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu void DataBrowserModel::swapDataSeries( sal_Int32 nFirstColumnIndex ) { - OSL_ASSERT( m_apDialogModel.get()); + assert(m_apDialogModel.get()); if( static_cast< tDataColumnVector::size_type >( nFirstColumnIndex ) < m_aColumns.size() - 1 ) { Reference< chart2::XDataSeries > xSeries( m_aColumns[nFirstColumnIndex].m_xDataSeries ); @@ -523,7 +523,7 @@ void DataBrowserModel::swapDataSeries( sal_Int32 nFirstColumnIndex ) void DataBrowserModel::swapDataPointForAllSeries( sal_Int32 nFirstIndex ) { - OSL_ASSERT( m_apDialogModel.get()); + assert(m_apDialogModel.get()); Reference< chart2::XInternalDataProvider > xDataProvider( m_apDialogModel->getDataProvider(), uno::UNO_QUERY ); // lockControllers diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index e4e74416667a..94d0e87bec69 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -829,7 +829,7 @@ void DialogModel::applyInterpretedData( std::vector< Sequence< Reference< XDataSeries > > > aNewSeries( ContainerHelper::SequenceToVector( rNewData.Series )); - OSL_ASSERT( aSeriesCnt.size() == aNewSeries.size()); + assert(aSeriesCnt.size() == aNewSeries.size()); std::vector< Sequence< Reference< XDataSeries > > >::const_iterator aSrcIt( aNewSeries.begin()); std::vector< Reference< XDataSeriesContainer > >::iterator aDestIt( aSeriesCnt.begin()); @@ -838,7 +838,7 @@ void DialogModel::applyInterpretedData( { try { - OSL_ASSERT( (*aDestIt).is()); + assert((*aDestIt).is()); (*aDestIt)->setDataSeries( *aSrcIt ); } catch( const uno::Exception & ex ) diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index 71867a64cbdc..524bf71dd99f 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -189,7 +189,7 @@ void DataSourceDialog::setInvalidPage( TabPage * pTabPage ) if( ! (m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid )) { m_pBtnOK->Enable( false ); - OSL_ASSERT( m_pTabControl ); + assert(m_pTabControl); // note: there seems to be no suitable mechanism to address pages by // identifier, at least it is unclear what the page identifiers are. // @todo: change the fixed numbers to identifiers @@ -211,7 +211,7 @@ void DataSourceDialog::setValidPage( TabPage * pTabPage ) if( m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid ) { m_pBtnOK->Enable(); - OSL_ASSERT( m_pTabControl ); + assert(m_pTabControl); m_pTabControl->EnableTabToggling(); } } diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 6f8cc675d86f..edcc10b04ee4 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -598,7 +598,7 @@ void SchAttribTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) case TP_XERRORBAR: { ErrorBarsTabPage * pTabPage = dynamic_cast< ErrorBarsTabPage * >( &rPage ); - OSL_ASSERT( pTabPage ); + assert(pTabPage); if( pTabPage ) { pTabPage->SetAxisMinorStepWidthForErrorBarDecimals( m_fAxisMinorStepWidthForErrorBarDecimals ); @@ -610,7 +610,7 @@ void SchAttribTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) case TP_YERRORBAR: { ErrorBarsTabPage * pTabPage = dynamic_cast< ErrorBarsTabPage * >( &rPage ); - OSL_ASSERT( pTabPage ); + assert(pTabPage); if( pTabPage ) { pTabPage->SetAxisMinorStepWidthForErrorBarDecimals( m_fAxisMinorStepWidthForErrorBarDecimals ); diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 97b5d31a4fe5..13d2e143c87b 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -193,7 +193,7 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing( m_apRangeSelectionHelper.reset( new RangeSelectionHelper( xChartDocument )); // has internal data provider => rename "cell range" to "from data" - OSL_ASSERT( m_apRangeSelectionHelper.get()); + assert(m_apRangeSelectionHelper.get()); if( m_bHasInternalDataProvider ) { m_pRbRange->SetText(m_pUIStringRbRange->GetText()); @@ -440,10 +440,10 @@ IMPL_LINK_NOARG(ErrorBarResources, IndicatorChanged, Button*, void) IMPL_LINK( ErrorBarResources, ChooseRange, Button*, pButton, void ) { - OSL_ASSERT( m_apRangeSelectionHelper.get()); + assert(m_apRangeSelectionHelper.get()); if( ! m_apRangeSelectionHelper.get()) return; - OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr ); + assert(m_pCurrentRangeChoosingField == nullptr ); OUString aUIString; @@ -680,7 +680,7 @@ void ErrorBarResources::FillValueSets() void ErrorBarResources::listeningFinished( const OUString & rNewRange ) { - OSL_ASSERT( m_apRangeSelectionHelper.get()); + assert(m_apRangeSelectionHelper.get()); if( ! m_apRangeSelectionHelper.get()) return; @@ -707,14 +707,14 @@ void ErrorBarResources::listeningFinished( m_pCurrentRangeChoosingField = nullptr; UpdateControlStates(); - OSL_ASSERT( m_pParentDialog ); + assert(m_pParentDialog); if( m_pParentDialog ) lcl_enableRangeChoosing( false, m_pParentDialog ); } void ErrorBarResources::disposingRangeSelection() { - OSL_ASSERT( m_apRangeSelectionHelper.get()); + assert(m_apRangeSelectionHelper.get()); if( m_apRangeSelectionHelper.get()) m_apRangeSelectionHelper->stopRangeListening( false ); } diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 65a97b3d554f..93820fd687ea 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -566,7 +566,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl, SvTreeListBox*, void IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void) { - OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr ); + assert(m_pCurrentRangeChoosingField == nullptr); m_pCurrentRangeChoosingField = m_pEDT_RANGE; if( !m_pEDT_RANGE->GetText().isEmpty() && ! updateModelFromControl( m_pCurrentRangeChoosingField )) @@ -607,7 +607,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void) IMPL_LINK_NOARG(DataSourceTabPage, CategoriesRangeButtonClickedHdl, Button*, void) { - OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr ); + assert(m_pCurrentRangeChoosingField == nullptr); m_pCurrentRangeChoosingField = m_pEDT_CATEGORIES; if( !m_pEDT_CATEGORIES->GetText().isEmpty() && ! updateModelFromControl( m_pCurrentRangeChoosingField )) diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index c1005f5e0ef3..432d599cd002 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -342,7 +342,7 @@ void DrawViewWrapper::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) if( eKind == SdrHintKind::BeginEdit ) { // #i79965# remember map mode - OSL_ASSERT( ! m_bRestoreMapMode ); + assert(!m_bRestoreMapMode); OutputDevice* pOutDev = this->GetFirstOutputDevice(); if( pOutDev ) { @@ -353,7 +353,7 @@ void DrawViewWrapper::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) else if( eKind == SdrHintKind::EndEdit ) { // #i79965# scroll back view when ending text edit - OSL_ASSERT( m_bRestoreMapMode ); + assert(m_bRestoreMapMode); if( m_bRestoreMapMode ) { OutputDevice* pOutDev = this->GetFirstOutputDevice(); diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index 4ba0b751ed3d..e41664f4f018 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -100,7 +100,7 @@ AxisItemConverter::AxisItemConverter( new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); m_xAxis.set( Reference< chart2::XAxis >( rPropertySet, uno::UNO_QUERY ) ); - OSL_ASSERT( m_xAxis.is()); + assert(m_xAxis.is()); } AxisItemConverter::~AxisItemConverter() @@ -664,7 +664,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet if( ! aScale.IncrementData.SubIncrements[0].IntervalCount.hasValue() || aScale.IncrementData.SubIncrements[0].IntervalCount != aValue ) { - OSL_ASSERT( aValue.getValueTypeClass() == uno::TypeClass_LONG ); + assert(aValue.getValueTypeClass() == uno::TypeClass_LONG); aScale.IncrementData.SubIncrements[0].IntervalCount = aValue; bSetScale = true; } diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx index b37123747c28..c68666cf5941 100644 --- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx @@ -298,7 +298,7 @@ bool ErrorBarItemConverter::ApplySpecialItem( { // no data range for error bars yet => create uno::Reference< chart2::XInternalDataProvider > xIntDataProvider( xDataProvider, uno::UNO_QUERY ); - OSL_ASSERT( xIntDataProvider.is()); + assert(xIntDataProvider.is()); if( xIntDataProvider.is()) { xIntDataProvider->appendSequence(); diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index a462d20cf88f..0a4e1cfed184 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -85,8 +85,8 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const SfxItemPool & rPool = GetItemPool(); assert(pRanges != nullptr); - OSL_ASSERT( m_xPropertySetInfo.is()); - OSL_ASSERT( m_xPropertySet.is()); + assert(m_xPropertySetInfo.is()); + assert(m_xPropertySet.is()); while( (*pRanges) != 0) { @@ -95,7 +95,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const sal_uInt16 nEnd = (*pRanges); ++pRanges; - OSL_ASSERT( nBeg <= nEnd ); + assert(nBeg <= nEnd); for( sal_uInt16 nWhich = nBeg; nWhich <= nEnd; ++nWhich ) { if( GetItemProperty( nWhich, aProperty )) @@ -166,7 +166,7 @@ bool ItemConverter::ApplySpecialItem( bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) { - OSL_ASSERT( m_xPropertySet.is()); + assert(m_xPropertySet.is()); bool bItemsChanged = false; SfxItemIter aIter( rItemSet ); diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx index ef80018a7bb5..fd4b2f18b696 100644 --- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx @@ -41,7 +41,7 @@ namespace template <class T, class D> bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID) { - OSL_ASSERT(xProperties.is()); + assert(xProperties.is()); if( xProperties.is() ) { T aValue = static_cast<T>(static_cast<const D&>(rItemSet.Get( nWhichId )).GetValue()); @@ -59,7 +59,7 @@ bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, co template <class T, class D> void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID) { - OSL_ASSERT(xProperties.is()); + assert(xProperties.is()); if( xProperties.is() ) { T aValue = static_cast<T>(static_cast<const D&>(rItemSet.Get( nWhichId )).GetValue()); @@ -72,7 +72,7 @@ void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::R void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID) { - OSL_ASSERT(xProperties.is()); + assert(xProperties.is()); if( xProperties.is() ) { double aValue = static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue(); @@ -142,7 +142,7 @@ bool RegressionCurveItemConverter::ApplySpecialItem( uno::Reference< chart2::XRegressionCurve > xCurve( GetPropertySet(), uno::UNO_QUERY ); bool bChanged = false; - OSL_ASSERT(xCurve.is()); + assert(xCurve.is()); if(!xCurve.is()) return false; @@ -255,7 +255,7 @@ bool RegressionCurveItemConverter::ApplySpecialItem( void RegressionCurveItemConverter::FillSpecialItem(sal_uInt16 nWhichId, SfxItemSet& rOutItemSet ) const { uno::Reference<chart2::XRegressionCurve> xCurve(GetPropertySet(), uno::UNO_QUERY); - OSL_ASSERT(xCurve.is()); + assert(xCurve.is()); if(!xCurve.is()) return; diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx index dc48db2d0fa9..6defac735041 100644 --- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx @@ -174,7 +174,7 @@ uno::Reference< beans::XPropertySet > lcl_getCurveProperties( template <class T, class D> bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID) { - OSL_ASSERT(xProperties.is()); + assert(xProperties.is()); if( xProperties.is() ) { T aValue = static_cast<T>(static_cast<const D&>(rItemSet.Get( nWhichId )).GetValue()); @@ -192,7 +192,7 @@ bool lclConvertToPropertySet(const SfxItemSet& rItemSet, sal_uInt16 nWhichId, co template <class T, class D> void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID) { - OSL_ASSERT(xProperties.is()); + assert(xProperties.is()); if( xProperties.is() ) { T aValue = static_cast<T>(static_cast<const D&>(rItemSet.Get( nWhichId )).GetValue()); @@ -205,7 +205,7 @@ void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::R void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID) { - OSL_ASSERT(xProperties.is()); + assert(xProperties.is()); if( xProperties.is() ) { double aValue = static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue(); @@ -582,7 +582,7 @@ bool StatisticsItemConverter::ApplySpecialItem( { // no data range for error bars yet => create uno::Reference< chart2::XInternalDataProvider > xIntDataProvider( xDataProvider, uno::UNO_QUERY ); - OSL_ASSERT( xIntDataProvider.is()); + assert(xIntDataProvider.is()); if( xIntDataProvider.is()) { xIntDataProvider->appendSequence(); diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index b5577ff40f57..99b3e95f07d4 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -231,7 +231,7 @@ wrapper::ItemConverter* createItemConverter( if( !ColorPerPointHelper::hasPointOwnColor( xSeriesProp, nPointIndex, xObjectProperties ) ) { bUseSpecialFillColor = true; - OSL_ASSERT( xDiagram.is()); + assert(xDiagram.is()); uno::Reference< XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme() ); if( xColorScheme.is()) nSpecialFillColor = xColorScheme->getColorByIndex( nPointIndex ); diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 53b7594e412a..c32dc95c4b3d 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -239,7 +239,7 @@ void ChartController::executeDispatch_ScaleText() ControllerLockGuardUNO aCtlLockGuard( getModel() ); std::unique_ptr<ReferenceSizeProvider> pRefSizeProv(impl_createReferenceSizeProvider()); - OSL_ASSERT( pRefSizeProv.get()); + assert(pRefSizeProv.get()); if (pRefSizeProv) pRefSizeProv->toggleAutoResizeState(); @@ -438,7 +438,7 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons { const Reference< lang::XMultiServiceFactory >& xShapeFactory( pDrawModelWrapper->getShapeFactory() ); const Reference< drawing::XDrawPage >& xDrawPage( pDrawModelWrapper->getMainDrawPage() ); - OSL_ASSERT( xShapeFactory.is() && xDrawPage.is() ); + assert(xShapeFactory.is() && xDrawPage.is()); if ( xShapeFactory.is() && xDrawPage.is() ) { diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 2ad50b7cc088..eb60b009a279 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1279,7 +1279,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) if( ! m_apAccelExecute.get() && m_xFrame.is() && m_xCC.is() ) { m_apAccelExecute = ::svt::AcceleratorExecute::createAcceleratorHelper(); - OSL_ASSERT( m_apAccelExecute.get()); + assert( m_apAccelExecute.get()); if( m_apAccelExecute.get() ) m_apAccelExecute->init( m_xCC, m_xFrame ); } diff --git a/chart2/source/controller/main/ChartModelClone.cxx b/chart2/source/controller/main/ChartModelClone.cxx index 937a11f168b1..193ed01cce71 100644 --- a/chart2/source/controller/main/ChartModelClone.cxx +++ b/chart2/source/controller/main/ChartModelClone.cxx @@ -160,7 +160,7 @@ namespace chart void ImplApplyDataToModel( const Reference< XModel >& i_model, const Reference< XInternalDataProvider > & i_data ) { Reference< XChartDocument > xDoc( i_model, UNO_QUERY ); - OSL_ASSERT( xDoc.is() && xDoc->hasInternalDataProvider() ); + assert(xDoc.is() && xDoc->hasInternalDataProvider()); // copy data from stored internal data provider if( xDoc.is() && xDoc->hasInternalDataProvider()) diff --git a/chart2/source/controller/main/CommandDispatch.cxx b/chart2/source/controller/main/CommandDispatch.cxx index 42beadb65f8d..30c7e797418b 100644 --- a/chart2/source/controller/main/CommandDispatch.cxx +++ b/chart2/source/controller/main/CommandDispatch.cxx @@ -86,7 +86,7 @@ void SAL_CALL CommandDispatch::addStatusListener( const Reference< frame::XStatu m_aListeners.begin(), tListenerMap::value_type( URL.Complete, new ::comphelper::OInterfaceContainerHelper2( m_aMutex ))); } - OSL_ASSERT( aIt != m_aListeners.end()); + assert(aIt != m_aListeners.end()); aIt->second->addInterface( Control ); fireStatusEvent( URL.Complete, Control ); diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 16b1f5902f75..fd24342f3637 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -488,7 +488,7 @@ void ControllerCommandDispatch::initialize() { Reference< frame::XModel > xModel( m_xChartController->getModel()); Reference< util::XModifyBroadcaster > xModifyBroadcaster( xModel, uno::UNO_QUERY ); - OSL_ASSERT( xModifyBroadcaster.is()); + assert(xModifyBroadcaster.is()); if( xModifyBroadcaster.is()) xModifyBroadcaster->addModifyListener( this ); @@ -522,8 +522,8 @@ void ControllerCommandDispatch::updateCommandAvailability() bool bModelStateIsValid = ( m_apModelState.get() != nullptr ); bool bControllerStateIsValid = ( m_apControllerState.get() != nullptr ); // Model and controller states exist. - OSL_ASSERT( bModelStateIsValid ); - OSL_ASSERT( bControllerStateIsValid ); + assert(bModelStateIsValid); + assert(bControllerStateIsValid); // read-only bool bIsWritable = bModelStateIsValid && (! m_apModelState->bIsReadOnly); diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 3e9fd051127e..78bddb175ff8 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -778,7 +778,7 @@ bool ObjectKeyNavigation::next() { ObjectHierarchy::tChildContainer::const_iterator aIt( std::find( aSiblings.begin(), aSiblings.end(), getCurrentSelection())); - OSL_ASSERT( aIt != aSiblings.end()); + assert(aIt != aSiblings.end()); if( ++aIt == aSiblings.end()) aIt = aSiblings.begin(); setCurrentSelection( *aIt ); @@ -798,7 +798,7 @@ bool ObjectKeyNavigation::previous() { ObjectHierarchy::tChildContainer::const_iterator aIt( std::find( aSiblings.begin(), aSiblings.end(), getCurrentSelection())); - OSL_ASSERT( aIt != aSiblings.end()); + assert(aIt != aSiblings.end()); if( aIt == aSiblings.begin()) aIt = aSiblings.end(); --aIt; @@ -825,7 +825,7 @@ bool ObjectKeyNavigation::down() if( bResult ) { ObjectHierarchy::tChildContainer aChildren = aHierarchy.getChildren( getCurrentSelection()); - OSL_ASSERT( !aChildren.empty()); + assert(!aChildren.empty()); setCurrentSelection( aChildren.front()); } return bResult; diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx index 7b04bb4e4af4..8c921eaeb88e 100644 --- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx +++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx @@ -50,7 +50,7 @@ void StatusBarCommandDispatch::initialize() if( m_xModifiable.is()) { Reference< util::XModifyBroadcaster > xModifyBroadcaster( m_xModifiable, uno::UNO_QUERY ); - OSL_ASSERT( xModifyBroadcaster.is()); + assert(xModifyBroadcaster.is()); if( xModifyBroadcaster.is()) xModifyBroadcaster->addModifyListener( this ); } |