diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-09-26 17:06:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-26 17:27:16 +0200 |
commit | d1fbc5e6231b0aa9d3eeda6fe835f2100efa40d7 (patch) | |
tree | 2b1f6ec7e9523212c57d54fdd2b308749a9e6902 /sw | |
parent | eed046433a847d3005e52c38963fb883322a39e6 (diff) |
sw: convert that to assert, and remove a duplicate OSL_ENSURE
Change-Id: Id454ed0efbb90cfe3ece0bdedf51f385962ee357
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/attr/format.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index e3b4639c1ee7..761dc5318b2a 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -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() ) { |