diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 11:52:37 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 11:52:37 +1000 |
commit | 2b1737f648024328390bf44c4f2c614e748a92fd (patch) | |
tree | a550f95981bd5ea0966329f2457a80fbd0f4fed0 | |
parent | c3c5c16849d1dfc9503b10a35f076907e8ccabb1 (diff) |
tdf#43157: convert svx module away from OSL_ASSERT to assert
Change-Id: I3d76e4237a1c8a389244fab6e8f546d818b77d9a
-rw-r--r-- | svx/source/accessibility/ChildrenManagerImpl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/SpellDialogChildWindow.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/properties/attributeproperties.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/charthelper.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svditer.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 34 | ||||
-rw-r--r-- | svx/source/unodraw/unoshcol.cxx | 2 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 2 | ||||
-rw-r--r-- | 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<SfxStyleSheet*>( 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<AreaTransparencyGradientPopup>::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<css::chart2::XDiagram //iterate through all chart types in the current coordinate system uno::Reference<chart2::XChartTypeContainer> 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()); + assert(nObjNum<maList.size()); return nullptr; } @@ -426,7 +426,7 @@ SdrObject* SdrObjList::RemoveObject(size_t nObjNum) { if (nObjNum >= maList.size()) { - OSL_ASSERT(nObjNum<maList.size()); + assert(nObjNum<maList.size()); return nullptr; } @@ -473,8 +473,8 @@ SdrObject* SdrObjList::NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum) { if (nObjNum >= maList.size() || pNewObj == nullptr) { - OSL_ASSERT(nObjNum<maList.size()); - OSL_ASSERT(pNewObj!=nullptr); + assert(nObjNum<maList.size()); + assert(pNewObj!=nullptr); return nullptr; } @@ -508,12 +508,12 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum) { if (nObjNum >= maList.size()) { - OSL_ASSERT(nObjNum<maList.size()); + assert(nObjNum<maList.size()); return nullptr; } if (pNewObj == nullptr) { - OSL_ASSERT(pNewObj!=nullptr); + assert(pNewObj!=nullptr); return nullptr; } @@ -562,8 +562,8 @@ SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum) { if (nOldObjNum >= maList.size() || nNewObjNum >= maList.size()) { - OSL_ASSERT(nOldObjNum<maList.size()); - OSL_ASSERT(nNewObjNum<maList.size()); + assert(nOldObjNum<maList.size()); + assert(nNewObjNum<maList.size()); return nullptr; } @@ -675,7 +675,7 @@ SdrObject* SdrObjList::GetObj(size_t nNum) const { if (nNum >= maList.size()) { - OSL_ASSERT(nNum<maList.size()); + assert(nNum<maList.size()); return nullptr; } else @@ -768,8 +768,8 @@ void SdrObjList::SetObjectNavigationPosition ( maList.end(), mxNavigationOrder->begin()); } - 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(nObjectPosition<maList.size()); + assert(nObjectPosition<maList.size()); return; } @@ -931,7 +931,7 @@ void SdrObjList::ReplaceObjectInContainer ( // A user defined position of the object that is to be replaced is // not transferred to the new object so erase the former and append // the later object from/to the navigation order. - OSL_ASSERT(nObjectPosition < maList.size()); + assert(nObjectPosition < maList.size()); SdrObjectWeakRef aReference (maList[nObjectPosition]); WeakSdrObjectContainerType::iterator iObject (::std::find( mxNavigationOrder->begin(), @@ -955,7 +955,7 @@ void SdrObjList::RemoveObjectFromContainer ( { if (nObjectPosition >= maList.size()) { - OSL_ASSERT(nObjectPosition<maList.size()); + assert(nObjectPosition<maList.size()); return; } diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 607f155ed8ee..af53d625e724 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -109,7 +109,7 @@ void SvxShapeCollection::release() throw() } // only the alive ref holds the object - OSL_ASSERT( m_refCount == 1 ); + assert( m_refCount == 1 ); // destroy the object if xHoldAlive decrement the refcount to 0 return; } diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 3946bb94c3c0..553e0849acea 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -980,7 +980,7 @@ SvXMLGraphicImportExportHelper::SvXMLGraphicImportExportHelper( SvXMLGraphicHelp void SAL_CALL SvXMLGraphicImportExportHelper::disposing() { Reference< XComponent > 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; } |