diff options
Diffstat (limited to 'sw/source/core/doc/doc.cxx')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index ea5e367e1a..b77c64bf7a 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -142,7 +142,7 @@ SV_IMPL_PTRARR( SwFldTypes, SwFldTypePtr) /* IInterface */ sal_Int32 SwDoc::acquire() { - OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected! This is a sign for unbalanced acquire/release calls."); + OSL_ENSURE(mReferenceCount >= 0, "Negative reference count detected! This is a sign for unbalanced acquire/release calls."); return osl_incrementInterlockedCount(&mReferenceCount); } @@ -154,7 +154,7 @@ sal_Int32 SwDoc::release() sal_Int32 SwDoc::getReferenceCount() const { - OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected! This is a sign for unbalanced acquire/release calls."); + OSL_ENSURE(mReferenceCount >= 0, "Negative reference count detected! This is a sign for unbalanced acquire/release calls."); return mReferenceCount; } @@ -206,7 +206,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const case KERN_ASIAN_PUNCTUATION: return mbKernAsianPunctuation; case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: return mbDoNotResetParaAttrsForNumFont; default: - ASSERT(false, "Invalid setting id"); + OSL_ENSURE(false, "Invalid setting id"); } return false; } @@ -360,7 +360,7 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) break; default: - ASSERT(false, "Invalid setting id"); + OSL_ENSURE(false, "Invalid setting id"); } } @@ -773,7 +773,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart ) _SaveCntntIdx( this, rPos.nNode.GetIndex(), rPos.nContent.GetIndex(), aBkmkArr, SAVEFLY_SPLIT ); // FIXME: only SwTxtNode has a valid implementation of SplitCntntNode! - ASSERT(pNode->IsTxtNode(), "splitting non-text node?"); + OSL_ENSURE(pNode->IsTxtNode(), "splitting non-text node?"); pNode = pNode->SplitCntntNode( rPos ); if (pNode) { @@ -2083,7 +2083,7 @@ BOOL lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* ) ************************************************************************/ void SwDoc::SpellItAgainSam( BOOL bInvalid, BOOL bOnlyWrong, BOOL bSmartTags ) { - ASSERT( GetRootFrm(), "SpellAgain: Where's my RootFrm?" ); + OSL_ENSURE( GetRootFrm(), "SpellAgain: Where's my RootFrm?" ); if( bInvalid ) { SwPageFrm *pPage = (SwPageFrm*)GetRootFrm()->Lower(); |