From 2b1737f648024328390bf44c4f2c614e748a92fd Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 7 May 2017 11:52:37 +1000 Subject: tdf#43157: convert svx module away from OSL_ASSERT to assert Change-Id: I3d76e4237a1c8a389244fab6e8f546d818b77d9a --- svx/source/accessibility/ChildrenManagerImpl.cxx | 2 +- svx/source/dialog/SpellDialogChildWindow.cxx | 2 +- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 2 +- svx/source/sdr/properties/attributeproperties.cxx | 4 +-- svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 2 +- svx/source/svdraw/charthelper.cxx | 2 +- svx/source/svdraw/svditer.cxx | 2 +- svx/source/svdraw/svdmrkv.cxx | 2 +- svx/source/svdraw/svdoole2.cxx | 4 +-- svx/source/svdraw/svdpage.cxx | 34 +++++++++++------------ svx/source/unodraw/unoshcol.cxx | 2 +- svx/source/xml/xmlgrhlp.cxx | 2 +- svx/source/xoutdev/xtable.cxx | 2 +- 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index c4b72ffd70ff..b2df3d9d338e 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -279,7 +279,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes ( { SolarMutexGuard g; - OSL_ASSERT (maShapeTreeInfo.GetViewForwarder() != nullptr); + assert (maShapeTreeInfo.GetViewForwarder() != nullptr); tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); diff --git a/svx/source/dialog/SpellDialogChildWindow.cxx b/svx/source/dialog/SpellDialogChildWindow.cxx index 4e1c4eda1cc8..8789df25471d 100644 --- a/svx/source/dialog/SpellDialogChildWindow.cxx +++ b/svx/source/dialog/SpellDialogChildWindow.cxx @@ -52,7 +52,7 @@ SfxBindings& SpellDialogChildWindow::GetBindings() const void SpellDialogChildWindow::InvalidateSpellDialog() { - OSL_ASSERT (m_xAbstractSpellDialog); + assert (m_xAbstractSpellDialog); if (m_xAbstractSpellDialog) m_xAbstractSpellDialog->Invalidate(); } diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 943775beed68..eefc491c4f98 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -52,7 +52,7 @@ namespace } catch(const uno::Exception&) { - OSL_ASSERT(false); + assert(false); } } diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index d18959eb4ca1..299b07342814 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -243,7 +243,7 @@ namespace sdr void AttributeProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel) { - OSL_ASSERT(pNewModel!=nullptr); + assert(pNewModel!=nullptr); if(pSrcPool && pDestPool && (pSrcPool != pDestPool)) { @@ -282,7 +282,7 @@ namespace sdr // name or use the default. // Look up the style in the new document. - OSL_ASSERT(pNewModel->GetStyleSheetPool() != nullptr); + assert(pNewModel->GetStyleSheetPool() != nullptr); SfxStyleSheet* pNewStyleSheet = dynamic_cast( pNewModel->GetStyleSheetPool()->Find( pStySheet->GetName(), diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 90140dfdb894..fb20ed71b68b 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -1273,7 +1273,7 @@ IMPL_LINK( AreaPropertyPanelBase, ClickTrGrHdl_Impl, ToolBox*, pToolBox, void ) if (!mxTrGrPopup) mxTrGrPopup = VclPtr::Create(*this); mxTrGrPopup->Rearrange(mpFloatTransparenceItem.get()); - OSL_ASSERT( pToolBox->GetItemCommand(pToolBox->GetCurItemId()) == UNO_SIDEBARGRADIENT); + assert( pToolBox->GetItemCommand(pToolBox->GetCurItemId()) == UNO_SIDEBARGRADIENT); mxTrGrPopup->StartPopupMode(pToolBox, FloatWinPopupFlags::GrabFocus); } diff --git a/svx/source/svdraw/charthelper.cxx b/svx/source/svdraw/charthelper.cxx index 255c0c03832b..afef03cde2d0 100644 --- a/svx/source/svdraw/charthelper.cxx +++ b/svx/source/svdraw/charthelper.cxx @@ -50,7 +50,7 @@ bool ChartHelper::isGL3DDiagram( const css::uno::Reference xChartTypeContainer(xCooSys, uno::UNO_QUERY); - OSL_ASSERT( xChartTypeContainer.is()); + assert( xChartTypeContainer.is()); if( !xChartTypeContainer.is() ) continue; diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx index a8e56773ff8c..100b1204792e 100644 --- a/svx/source/svdraw/svditer.cxx +++ b/svx/source/svdraw/svditer.cxx @@ -65,7 +65,7 @@ void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMod { SdrObject* pObj = bUseZOrder ? rObjList.GetObj( nIdx ) : rObjList.GetObjectForNavigationPosition( nIdx ); - OSL_ASSERT( pObj != nullptr ); + assert( pObj != nullptr ); if( pObj ) ImpProcessObj( pObj, eMode, bUseZOrder ); } diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 478b0cbb65b7..9b87685a8883 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1394,7 +1394,7 @@ bool SdrMarkView::MarkNextObj(bool bPrev) if (nMarkCount!=0) { nChgMarkNum=bPrev ? 0 : nMarkCount-1; SdrMark* pM=GetSdrMarkByIndex(nChgMarkNum); - OSL_ASSERT(pM!=nullptr); + assert(pM!=nullptr); if (pM->GetMarkedSdrObj() != nullptr) nSearchObjNum = pM->GetMarkedSdrObj()->GetNavigationPosition(); } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index b331d5d848d7..60d718e3b27f 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1585,7 +1585,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() GetObjRef(); if (mpImpl->mxObjRef.is()) { - OSL_ASSERT( pModel ); + assert( pModel ); sal_Int64 nMiscStatus = mpImpl->mxObjRef->getStatus( GetAspect() ); // the client is required to get access to scaling @@ -1650,7 +1650,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() // make the new object area known to the client // compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied - // WHY this -> OSL_ASSERT( pClient ); + // WHY this -> assert( pClient ); if( pClient ) pClient->SetObjArea(maRect); diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 83281d013a74..0fdc54dffdba 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -395,7 +395,7 @@ SdrObject* SdrObjList::NbcRemoveObject(size_t nObjNum) { if (nObjNum >= maList.size()) { - OSL_ASSERT(nObjNum= maList.size()) { - OSL_ASSERT(nObjNum= maList.size() || pNewObj == nullptr) { - OSL_ASSERT(nObjNum= maList.size()) { - OSL_ASSERT(nObjNum= maList.size() || nNewObjNum >= maList.size()) { - OSL_ASSERT(nOldObjNum= maList.size()) { - OSL_ASSERT(nNumbegin()); } - OSL_ASSERT(mxNavigationOrder.get()!=nullptr); - OSL_ASSERT( mxNavigationOrder->size() == maList.size()); + assert(mxNavigationOrder.get()!=nullptr); + assert( mxNavigationOrder->size() == maList.size()); SdrObjectWeakRef aReference (&rObject); @@ -815,7 +815,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat // index is correct and look up the object in mxNavigationOrder. if (nNavigationPosition >= mxNavigationOrder->size()) { - OSL_ASSERT(nNavigationPosition < mxNavigationOrder->size()); + assert(nNavigationPosition < mxNavigationOrder->size()); } else return (*mxNavigationOrder)[nNavigationPosition].get(); @@ -826,7 +826,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat // instead. if (nNavigationPosition >= maList.size()) { - OSL_ASSERT(nNavigationPosition < maList.size()); + assert(nNavigationPosition < maList.size()); } else return maList[nNavigationPosition]; @@ -893,7 +893,7 @@ void SdrObjList::InsertObjectIntoContainer ( SdrObject& rObject, const sal_uInt32 nInsertPosition) { - OSL_ASSERT(nInsertPosition<=maList.size()); + assert(nInsertPosition<=maList.size()); // Update the navigation positions. if (HasObjectNavigationOrder()) @@ -921,7 +921,7 @@ void SdrObjList::ReplaceObjectInContainer ( { if (nObjectPosition >= maList.size()) { - OSL_ASSERT(nObjectPositionbegin(), @@ -955,7 +955,7 @@ void SdrObjList::RemoveObjectFromContainer ( { if (nObjectPosition >= maList.size()) { - OSL_ASSERT(nObjectPosition xComp( m_xGraphicObjectResolver, UNO_QUERY ); - OSL_ASSERT( xComp.is()); + assert( xComp.is()); if( xComp.is()) xComp->dispose(); // m_xBinaryStreamResolver is a reference to the same object => don't call diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index e80016640775..bd1f551f7fed 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -360,7 +360,7 @@ XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType aType, OSL_FAIL("unknown xproperty type"); break; } - OSL_ASSERT( !pRet.is() || pRet->meType == aType ); + assert( !pRet.is() || pRet->meType == aType ); return pRet; } -- cgit