summaryrefslogtreecommitdiff
path: root/sw/source/core/undo/undobj1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo/undobj1.cxx')
-rw-r--r--sw/source/core/undo/undobj1.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index d70d490c67..7e8f6d7331 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -125,7 +125,7 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
{
// es muss mindestens das Attribut im TextNode stehen
SwCntntNode* pCNd = aAnchor.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
- ASSERT( pCNd->IsTxtNode(), "no Text Node at position." );
+ OSL_ENSURE( pCNd->IsTxtNode(), "no Text Node at position." );
SwFmtFlyCnt aFmt( pFrmFmt );
static_cast<SwTxtNode*>(pCNd)->InsertItem( aFmt, nCntPos, nCntPos );
}
@@ -176,7 +176,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
{
// gibt es ueberhaupt Inhalt, dann sicher diesen
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), "Fly ohne Inhalt" );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "Fly ohne Inhalt" );
SaveSection( pDoc, *rCntnt.GetCntntIdx() );
((SwFmtCntnt&)rCntnt).SetNewCntntIdx( (const SwNodeIndex*)0 );
@@ -201,7 +201,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
nNdPgPos = pPos->nNode.GetIndex();
nCntPos = pPos->nContent.GetIndex();
SwTxtNode *pTxtNd = pDoc->GetNodes()[ pPos->nNode ]->GetTxtNode();
- ASSERT( pTxtNd, "Kein Textnode gefunden" );
+ OSL_ENSURE( pTxtNd, "Kein Textnode gefunden" );
SwTxtFlyCnt* const pAttr = static_cast<SwTxtFlyCnt*>(
pTxtNd->GetTxtAttrForCharAt( nCntPos, RES_TXTATR_FLYCNT ) );
// Attribut steht noch im TextNode, loeschen
@@ -263,7 +263,7 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen
}
break;
default:
- ASSERT( FALSE, "Was denn fuer ein FlyFrame?" );
+ OSL_ENSURE( FALSE, "Was denn fuer ein FlyFrame?" );
}
}
@@ -343,7 +343,7 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter )
rUndoIter.pAktPam ));
}
else {
- ASSERT( FALSE, "was fuer ein Anker ist es denn nun?" );
+ OSL_ENSURE( FALSE, "was fuer ein Anker ist es denn nun?" );
}
SwFrmFmt* pFlyFmt = pDoc->CopyLayoutFmt( *pFrmFmt, aAnchor, true, true );
@@ -574,13 +574,13 @@ void SwUndoSetFlyFmt::Undo( SwUndoIter& rIter )
// Attribut und Format.
const SwPosition *pPos = rOldAnch.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * pHnt = pTxtNode->GetTxtAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
- ASSERT( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
- ASSERT( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFrmFmt,
+ OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFrmFmt,
"Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
@@ -639,7 +639,7 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
if( RES_ANCHOR == nWhich )
{
// nur den 1. Ankerwechsel vermerken
- ASSERT( !bAnchorChgd, "mehrfacher Ankerwechsel nicht erlaubt!" );
+ OSL_ENSURE( !bAnchorChgd, "mehrfacher Ankerwechsel nicht erlaubt!" );
bAnchorChgd = TRUE;