Kaydet (Commit) d1fbc5e6 authored tarafından Michael Stahl's avatar Michael Stahl

sw: convert that to assert, and remove a duplicate OSL_ENSURE

Change-Id: Id454ed0efbb90cfe3ece0bdedf51f385962ee357
üst eed04643
......@@ -214,8 +214,6 @@ SwFormat::~SwFormat()
// ones on DerivedFrom.
if( HasWriterListeners() )
{
OSL_ENSURE( DerivedFrom(), "SwFormat::~SwFormat: Def dependents!" );
m_bFormatInDTOR = true;
SwFormat* pParentFormat = DerivedFrom();
......@@ -356,11 +354,11 @@ bool SwFormat::SetDerivedFrom(SwFormat *pDerFrom)
if ( (pDerFrom == DerivedFrom()) || (pDerFrom == this) )
return false;
OSL_ENSURE( Which()==pDerFrom->Which()
|| ( Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL)
|| ( Which()==RES_TXTFMTCOLL && pDerFrom->Which()==RES_CONDTXTFMTCOLL)
|| ( Which()==RES_FLYFRMFMT && pDerFrom->Which()==RES_FRMFMT ),
"SetDerivedFrom: derive apples from oranges?");
assert( Which()==pDerFrom->Which()
|| (Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL)
|| (Which()==RES_TXTFMTCOLL && pDerFrom->Which()==RES_CONDTXTFMTCOLL)
|| (Which()==RES_FLYFRMFMT && pDerFrom->Which()==RES_FRMFMT)
);
if ( IsInCache() )
{
......
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