Kaydet (Commit) 2b1737f6 authored tarafından Chris Sherlock's avatar Chris Sherlock

tdf#43157: convert svx module away from OSL_ASSERT to assert

Change-Id: I3d76e4237a1c8a389244fab6e8f546d818b77d9a
üst c3c5c168
......@@ -279,7 +279,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes (
{
SolarMutexGuard g;
OSL_ASSERT (maShapeTreeInfo.GetViewForwarder() != nullptr);
assert (maShapeTreeInfo.GetViewForwarder() != nullptr);
tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea();
......
......@@ -52,7 +52,7 @@ SfxBindings& SpellDialogChildWindow::GetBindings() const
void SpellDialogChildWindow::InvalidateSpellDialog()
{
OSL_ASSERT (m_xAbstractSpellDialog);
assert (m_xAbstractSpellDialog);
if (m_xAbstractSpellDialog)
m_xAbstractSpellDialog->Invalidate();
}
......
......@@ -52,7 +52,7 @@ namespace
}
catch(const uno::Exception&)
{
OSL_ASSERT(false);
assert(false);
}
}
......
......@@ -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(),
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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 );
}
......
......@@ -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();
}
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment