diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:13:18 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:13:18 +0100 |
commit | 25af48a8840696770162f41912b0609478f5132d (patch) | |
tree | 73482b230c37953b1325c11f9148e82e1de7875d | |
parent | f9585d9dc148653afee9286b00595222effe3d9c (diff) |
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
56 files changed, 130 insertions, 131 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index f25f117b36f1..dc6c6d6dcecd 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -351,7 +351,7 @@ SwClient *SwModify::_Remove(SwClient * pDepend) pDepend->pRight = 0; } else { - OSL_ENSURE( sal_False, "SwModify::Remove(): pDepend nicht gefunden"); + OSL_FAIL( "SwModify::Remove(): pDepend nicht gefunden"); } pDepend->pRegisteredIn = 0; return pDepend; diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx index 8be07e422fc1..da097a79c0fd 100644 --- a/sw/source/core/attr/hints.cxx +++ b/sw/source/core/attr/hints.cxx @@ -155,14 +155,14 @@ SwMsgPoolItem::SwMsgPoolItem( sal_uInt16 nWhch ) // "Overhead" vom SfxPoolItem int SwMsgPoolItem::operator==( const SfxPoolItem& ) const { - OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein ==" ); + OSL_FAIL( "SwMsgPoolItem kennt kein ==" ); return 0; } SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const { - OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein Clone" ); + OSL_FAIL( "SwMsgPoolItem kennt kein Clone" ); return 0; } diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 7bce1842d644..3098eb2cff6a 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -177,7 +177,7 @@ void SwCache::Flush( const sal_uInt8 ) #if OSL_DEBUG_LEVEL > 1 if ( pObj->IsLocked() ) { - OSL_ENSURE( sal_False, "Flushing locked objects." ); + OSL_FAIL( "Flushing locked objects." ); if ( !pRealFirst ) { pRealFirst = pFirst = pLast = pObj; @@ -425,7 +425,7 @@ sal_Bool SwCache::Insert( SwCacheObj *pNew ) pObj = pObj->GetPrev(); if ( !pObj ) { - OSL_ENSURE( sal_False, "Cache overflow." ); + OSL_FAIL( "Cache overflow." ); return sal_False; } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index ba43772dcaa0..31d7e95d16c5 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -2607,7 +2607,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam ) rPam.Exchange(); if( !rPam.Move( fnMoveBackward, fnGoNode )) { - OSL_ENSURE( sal_False, "kein Node mehr vorhanden" ); + OSL_FAIL( "kein Node mehr vorhanden" ); return sal_False; } } diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index a2d76d1c6961..4030972a325b 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -406,7 +406,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, case RES_PAGEDESC: case RES_CNTNT: case RES_FOOTER: - OSL_ENSURE( sal_False, ":-) Unbekanntes Attribut fuer Fly." ); + OSL_FAIL( ":-) Unbekanntes Attribut fuer Fly." ); // kein break; case RES_CHAIN: rSet.ClearItem( nWhich ); diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index cc881ca8cd45..14da026b3b8b 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -333,7 +333,7 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, aTmp.Exchange(); if( !aTmp.Move( fnMoveBackward, fnGoNode )) { - OSL_ENSURE( sal_False, "kein Node mehr vorhanden" ); + OSL_FAIL( "kein Node mehr vorhanden" ); } } // Bookmarks usw. verschieben @@ -680,7 +680,7 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutline aTmp.Exchange(); if( !aTmp.Move( fnMoveBackward, fnGoNode )) { - OSL_ENSURE( sal_False, "kein Node mehr vorhanden" ); + OSL_FAIL( "kein Node mehr vorhanden" ); } } // Bookmarks usw. verschieben diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index 7f822c8c6afd..1873bcf18742 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -1397,7 +1397,7 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const } else { - OSL_ENSURE( sal_False, "ungueltige Id" ); + OSL_FAIL( "ungueltige Id" ); bFnd = sal_False; } diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 92676eb272ab..f20ef5bbdedd 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -1703,7 +1703,7 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara ) lcl_CalcWidth( pRMBox ); // bereche die Breite der Box } else { - OSL_ENSURE( sal_False, "Was denn nun" ); + OSL_FAIL( "Was denn nun" ); } } // Left/Right diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 04da8a2dd6cb..9d12314de1c7 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -698,7 +698,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts, if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() ) { - OSL_ENSURE( sal_False, "Kein Bereich" ); + OSL_FAIL( "Kein Bereich" ); aRg.aEnd++; } @@ -1140,7 +1140,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() ) { - OSL_ENSURE( sal_False, "Kein Bereich" ); + OSL_FAIL( "Kein Bereich" ); aRg.aEnd++; } diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 09552cd1d5c8..6f4640035830 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -876,13 +876,13 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, } } else { - OSL_ENSURE( sal_False, "wie kommt diser Node ins Nodes-Array??" ); + OSL_FAIL( "wie kommt diser Node ins Nodes-Array??" ); } aRg.aEnd--; break; default: - OSL_ENSURE( sal_False, "was ist das fuer ein Node??" ); + OSL_FAIL( "was ist das fuer ein Node??" ); break; } @@ -2128,12 +2128,12 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, aInsPos++; // ueberspringen } else { - OSL_ENSURE( sal_False, "wie kommt diser Node ins Nodes-Array??" ); + OSL_FAIL( "wie kommt diser Node ins Nodes-Array??" ); } break; default: - OSL_ENSURE( sal_False, "weder Start-/End-/Content-Node, unbekannter Typ" ); + OSL_FAIL( "weder Start-/End-/Content-Node, unbekannter Typ" ); } aRg.aStart++; } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 934cdcb5a6fc..af76b42d4150 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -714,7 +714,7 @@ SwSection * SwSectionFmt::GetSection() const return (SwSectionPtr)aIter.First( TYPE(SwSection) ); } - OSL_ENSURE( sal_False, "keine Section als Client." ); + OSL_FAIL( "keine Section als Client." ); return 0; } diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index bf0eb423734c..7e259ed3169d 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -2014,7 +2014,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) } break; default: - OSL_ENSURE( sal_False, "Unknown Anchor." ); + OSL_FAIL( "Unknown Anchor." ); break; } if ( GetAnchorFrm() ) diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index cf2af7012047..5f1b07d5315d 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -100,7 +100,7 @@ SwTxtFmtColl* SwEditShell::MakeTxtFmtColl(const String& rFmtCollName, pParent = &GetTxtFmtColl(0); if ( (pColl=GetDoc()->MakeTxtFmtColl(rFmtCollName, pParent)) == 0 ) { - OSL_ENSURE( sal_False, "MakeTxtFmtColl failed" ); + OSL_FAIL( "MakeTxtFmtColl failed" ); } return pColl; diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index a0bf4f415cca..729a9061cef3 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -188,7 +188,7 @@ void SwEditShell::Overwrite(const String &rStr) FOREACHPAM_START(this) if( !GetDoc()->Overwrite(*PCURCRSR, rStr ) ) { - OSL_ENSURE( sal_False, "Doc->Overwrite(Str) failed." ); + OSL_FAIL( "Doc->Overwrite(Str) failed." ); } SaveTblBoxCntnt( PCURCRSR->GetPoint() ); FOREACHPAM_END() @@ -582,7 +582,7 @@ void SwEditShell::ReplaceDropTxt( const String &rStr ) SwPaM aPam( rNd, rStr.Len(), rNd, 0 ); if( !GetDoc()->Overwrite( aPam, rStr ) ) { - OSL_ENSURE( sal_False, "Doc->Overwrite(Str) failed." ); + OSL_FAIL( "Doc->Overwrite(Str) failed." ); } EndAllAction(); diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 9a7c1b6b7d5b..a26c1facd378 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -781,7 +781,7 @@ String SwDocStatFieldType::Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const nFmt = (sal_uInt32)nNumberingType; break; default: - OSL_ENSURE( sal_False, "SwDocStatFieldType::Expand: unbekannter SubType" ); + OSL_FAIL( "SwDocStatFieldType::Expand: unbekannter SubType" ); } String sRet; diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 58e317905cbd..1a504d038f03 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -587,7 +587,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) //TODO: That doesn't seem to be intended if( Color(COL_TRANSPARENT) != GetOut()->GetLineColor() ) { - OSL_ENSURE( sal_False, "Hey, Joe: Where's my Null Pen?" ); + OSL_FAIL( "Hey, Joe: Where's my Null Pen?" ); GetOut()->SetLineColor( Color(COL_TRANSPARENT) ); } #endif @@ -2145,7 +2145,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO } catch ( uno::Exception& ) { - OSL_ENSURE( sal_False , "Baseline could not be retrieved from Starmath!" ); + OSL_FAIL( "Baseline could not be retrieved from Starmath!" ); } } } diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index f59d728bc8c7..787990831e75 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -147,14 +147,14 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, case RECT_OUTTABSECTION : if( pFrm->IsInTab() ) pFrm = pFrm->FindTabFrm(); else { - OSL_ENSURE( sal_False, "Missing Table" ); + OSL_FAIL( "Missing Table" ); } /* KEIN BREAK */ case RECT_SECTION_PRT: case RECT_SECTION: if( pFrm->IsInSct() ) pFrm = pFrm->FindSctFrm(); else { - OSL_ENSURE( sal_False, "Missing section" ); + OSL_FAIL( "Missing section" ); } if( RECT_OUTTABSECTION_PRT == eType || diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 44e3a136aed6..46d6f23ebcc9 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2664,7 +2664,7 @@ sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const if ( nBfPos == nBhPos ) //Duerfte eigentlich nie vorkommen. { - OSL_ENSURE( sal_False, "Table, Loeschen auf keinem Bereich !?!" ); + OSL_FAIL( "Table, Loeschen auf keinem Bereich !?!" ); return sal_False; } diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 3fb5505c57a1..8d2cf7625621 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1158,7 +1158,7 @@ void SwCntntFrm::MakeAll() if ( ((SwTxtFrm*)this)->IsLocked() ) { - OSL_ENSURE( sal_False, "Format fuer gelockten TxtFrm." ); + OSL_FAIL( "Format fuer gelockten TxtFrm." ); return; } @@ -1707,7 +1707,7 @@ void SwCntntFrm::MakeAll() #if OSL_DEBUG_LEVEL > 1 else { - OSL_ENSURE( sal_False, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." ); + OSL_FAIL( "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." ); } #endif } diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 0dbab953b1e7..5539e8158761 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -706,7 +706,7 @@ SwTxtFrm* SwCntntFrm::FindMaster() const pCnt = pCnt->GetPrevCntntFrm(); } - OSL_ENSURE( sal_False, "Follow ist lost in Space." ); + OSL_FAIL( "Follow ist lost in Space." ); return 0; } @@ -730,7 +730,7 @@ SwSectionFrm* SwSectionFrm::FindMaster() const pLast = aIter++; } - OSL_ENSURE( sal_False, "Follow ist lost in Space." ); + OSL_FAIL( "Follow ist lost in Space." ); return 0; } @@ -776,7 +776,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const pLast = aIter++; } - OSL_ENSURE( sal_False, "Follow ist lost in Space." ); + OSL_FAIL( "Follow ist lost in Space." ); return 0; } @@ -1332,7 +1332,7 @@ sal_Bool SwFlowFrm::HasParaSpaceAtPages( sal_Bool bSct ) const return sal_False; pTmp = pTmp->GetUpper(); } - OSL_ENSURE( sal_False, "HasParaSpaceAtPages: Where's my page?" ); + OSL_FAIL( "HasParaSpaceAtPages: Where's my page?" ); return sal_False; } if( !rThis.IsInDocBody() || ( rThis.IsInTab() && !rThis.IsTabFrm()) || diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 98cdc5dda2fb..05ea77043e15 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -1569,7 +1569,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew ) { if( ENDNOTE > nCmpPos || nStPos >= ENDNOTE ) { - OSL_ENSURE( sal_False, "InsertFtn: Master expected II" ); + OSL_FAIL( "InsertFtn: Master expected II" ); do pSibling = pSibling->GetMaster(); while ( pSibling->GetMaster() ); @@ -2067,7 +2067,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef, } if ( pNxtFtn == _pFtn ) { - OSL_ENSURE( sal_False, "_CollectFtn: Devil's circle" ); + OSL_FAIL( "_CollectFtn: Devil's circle" ); pNxtFtn = 0; } diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 29c51dff0725..a7b07bc8f3f1 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -429,7 +429,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage ) pSdrObj = 0; if ( bSdrObj && 0 == (pSdrObj = pFmt->FindSdrObject()) ) { - OSL_ENSURE( sal_False, "DrawObject not found." ); + OSL_FAIL( "DrawObject not found." ); pFmt->GetDoc()->DelFrmFmt( pFmt ); --i; continue; @@ -1183,7 +1183,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields ) #if OSL_DEBUG_LEVEL > 1 else { - OSL_ENSURE( sal_False, "CheckPageDescs, missing solution" ); + OSL_FAIL( "CheckPageDescs, missing solution" ); } #endif } @@ -1236,7 +1236,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields ) { if ( bEmpty ) { - OSL_ENSURE( sal_False, "Doppelte Leerseiten." ); + OSL_FAIL( "Doppelte Leerseiten." ); break; //Einmal reicht. } bEmpty = sal_True; diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 5c5d97f66b02..cce8ff9b8318 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -818,7 +818,7 @@ void SwSectionFrm::MakeAll() sal_Bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, sal_Bool , sal_Bool & ) { - OSL_ENSURE( sal_False, "Hups, wo ist meine Tarnkappe?" ); + OSL_FAIL( "Hups, wo ist meine Tarnkappe?" ); return sal_False; } diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 404bb570595a..67af9b31b842 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3044,7 +3044,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs ) } break; default: - OSL_ENSURE( sal_False, "Ungueltige orientation fuer Table." ); + OSL_FAIL( "Ungueltige orientation fuer Table." ); } // --> OD 2004-07-15 #i26250# - extend bottom printing area, if table diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index e55718128b15..7c38aaa4430e 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -36,17 +36,17 @@ void SwFrm::Format( const SwBorderAttrs * ) { - OSL_ENSURE( sal_False, "Format() der Basisklasse gerufen." ); + OSL_FAIL( "Format() der Basisklasse gerufen." ); } void SwFrm::Paint(SwRect const&, SwPrintData const*const) const { - OSL_ENSURE( sal_False, "Paint() der Basisklasse gerufen." ); + OSL_FAIL( "Paint() der Basisklasse gerufen." ); } sal_Bool SwCntntFrm::WouldFit( SwTwips &, sal_Bool&, sal_Bool ) { - OSL_ENSURE( sal_False, "WouldFit des CntntFrm gerufen." ); + OSL_FAIL( "WouldFit des CntntFrm gerufen." ); return sal_False; } @@ -58,7 +58,7 @@ bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const sal_Bool SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const { - OSL_ENSURE( sal_False, "GetCrsrOfst der Basisklasse, hi!" ); + OSL_FAIL( "GetCrsrOfst der Basisklasse, hi!" ); return sal_False; } @@ -66,17 +66,17 @@ sal_Bool SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const void SwRootFrm::Cut() { - OSL_ENSURE( sal_False, "Cut() des RootFrm gerufen." ); + OSL_FAIL( "Cut() des RootFrm gerufen." ); } void SwRootFrm::Paste( SwFrm *, SwFrm * ) { - OSL_ENSURE( sal_False, "Paste() des RootFrm gerufen." ); + OSL_FAIL( "Paste() des RootFrm gerufen." ); } void SwFlyFrm::Paste( SwFrm *, SwFrm * ) { - OSL_ENSURE( sal_False, "Paste() des FlyFrm gerufen." ); + OSL_FAIL( "Paste() des FlyFrm gerufen." ); } #endif @@ -84,7 +84,7 @@ void SwFlyFrm::Paste( SwFrm *, SwFrm * ) sal_Bool SwFrm::GetCharRect( SwRect&, const SwPosition&, SwCrsrMoveState* ) const { - OSL_ENSURE( sal_False, "GetCharRect() der Basis gerufen." ); + OSL_FAIL( "GetCharRect() der Basis gerufen." ); return sal_False; } diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 9497890b8979..a0e19939dd61 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -342,7 +342,7 @@ void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew, break; } case RES_COL: - OSL_ENSURE( sal_False, "Spalten fuer neuen FrmTyp?" ); + OSL_FAIL( "Spalten fuer neuen FrmTyp?" ); break; default: diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index fd80b1ec4b0a..5026ade3073b 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -280,7 +280,7 @@ Graphic* SwOLENode::GetGraphic() SwCntntNode *SwOLENode::SplitCntntNode( const SwPosition & ) { // OLE-Objecte vervielfaeltigen ?? - OSL_ENSURE( sal_False, "OleNode: can't split." ); + OSL_FAIL( "OleNode: can't split." ); return this; } diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index feaffd7adb03..1b27ecdfeff6 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -385,7 +385,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText ) } catch ( uno::Exception& ) { - OSL_ENSURE( sal_False, "Tried to open non-existent folder or stream!"); + OSL_FAIL( "Tried to open non-existent folder or stream!"); } return n; diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 48caff480c7d..a8ecdec41c56 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1488,7 +1488,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName, // Box ist ?? if( pBox && !pBox->GetSttNd() ) { - OSL_ENSURE( sal_False, "Box ohne Inhalt, suche die naechste !!" ); + OSL_FAIL( "Box ohne Inhalt, suche die naechste !!" ); // "herunterfallen lassen" bis zur ersten Box while( pBox->GetTabLines().Count() ) pBox = pBox->GetTabLines()[0]->GetTabBoxes()[0]; diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 5ac6d2e685ec..974c1faea40e 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -571,7 +571,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine, { if( ((SwTxtFrm*)GetFollow())->IsLocked() ) { - OSL_ENSURE( sal_False, "+SwTxtFrm::JoinFrm: Follow ist locked." ); + OSL_FAIL( "+SwTxtFrm::JoinFrm: Follow ist locked." ); return; } JoinFrm(); diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 17bd0d0ceedb..d1cd431aae70 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -890,7 +890,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP nMaxWidth = rRect.Height(); break; default: - OSL_ENSURE( sal_False, "Unknown direction set at font" ); + OSL_FAIL( "Unknown direction set at font" ); break; } diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index b480f2cff520..ff3f2b87f166 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -285,7 +285,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) case SVX_LINE_SPACE_FIX: nFirstLineOfs = pSpace->GetLineHeight(); break; - default: OSL_ENSURE( sal_False, ": unknown LineSpaceRule" ); + default: OSL_FAIL( ": unknown LineSpaceRule" ); } switch( pSpace->GetInterLineSpaceRule() ) { @@ -311,7 +311,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nFirstLineOfs += pSpace->GetInterLineSpace(); break; } - default: OSL_ENSURE( sal_False, ": unknown InterLineSpaceRule" ); + default: OSL_FAIL( ": unknown InterLineSpaceRule" ); } } } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 882e8277eee1..a31fd130f38d 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1786,7 +1786,7 @@ pCurr->GetAscent() ) pInf->GetParaPortion()->SetFixLineHeight(); } break; - default: OSL_ENSURE( sal_False, ": unknown LineSpaceRule" ); + default: OSL_FAIL( ": unknown LineSpaceRule" ); } if( !IsParaLine() ) switch( pSpace->GetInterLineSpaceRule() ) @@ -1813,7 +1813,7 @@ pCurr->GetAscent() ) nLineHeight = nLineHeight + pSpace->GetInterLineSpace(); break; } - default: OSL_ENSURE( sal_False, ": unknown InterLineSpaceRule" ); + default: OSL_FAIL( ": unknown InterLineSpaceRule" ); } } #if OSL_DEBUG_LEVEL > 1 diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 984b8f3ce580..30ab58ebac06 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -770,7 +770,7 @@ sal_uInt8 SwScriptInfo::WhichFont( xub_StrLen nIdx, const String* pTxt, const Sw case i18n::ScriptType::COMPLEX : return SW_CTL; } - OSL_ENSURE( sal_False, "Somebody tells lies about the script type!" ); + OSL_FAIL( "Somebody tells lies about the script type!" ); return SW_LATIN; } diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 222a669bd44e..25ff3d0b047f 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -80,8 +80,7 @@ SwMultiPortion::~SwMultiPortion() void SwMultiPortion::Paint( const SwTxtPaintInfo & ) const { - OSL_ENSURE( sal_False, - "Don't try SwMultiPortion::Paint, try SwTxtPainter::PaintMultiPortion" ); + OSL_FAIL( "Don't try SwMultiPortion::Paint, try SwTxtPainter::PaintMultiPortion" ); } /*-------------------------------------------------- @@ -749,7 +748,7 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf ) } break; } - default: OSL_ENSURE( sal_False, "New ruby adjustment" ); + default: OSL_FAIL( "New ruby adjustment" ); } if( nLeft || nRight ) { diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 75bc6831035e..985b854a9f78 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -442,7 +442,7 @@ sal_Bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff ) break; } default: - OSL_ENSURE( sal_False, ": unknown LineSpaceRule" ); + OSL_FAIL( ": unknown LineSpaceRule" ); } switch( rSpace.GetInterLineSpaceRule() ) { @@ -467,7 +467,7 @@ sal_Bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff ) nNettoHeight = rRegDiff; break; } - default: OSL_ENSURE( sal_False, ": unknown InterLineSpaceRule" ); + default: OSL_FAIL( ": unknown InterLineSpaceRule" ); } pDesc->SetRegHeight( rRegDiff ); pDesc->SetRegAscent( rRegDiff - nNettoHeight + diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx index b6995b4e2b08..24a975c258e3 100644 --- a/sw/source/core/text/txtcache.cxx +++ b/sw/source/core/text/txtcache.cxx @@ -206,7 +206,7 @@ void SwTxtFrm::SetPara( SwParaPortion *pNew, sal_Bool bDelete ) nCacheIdx = pTxtLine->GetCachePos(); else { - OSL_ENSURE( sal_False, "+SetPara: InsertCache failed." ); + OSL_FAIL( "+SetPara: InsertCache failed." ); } } } diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index c92c795f51e7..7f051c217c4b 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -860,7 +860,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } else { - OSL_ENSURE( sal_False, "Outdev Check failed" ); + OSL_FAIL( "Outdev Check failed" ); } } else if ( OUTDEV_VIRDEV == rInf.GetOut().GetOutDevType() && ! pWin ) @@ -876,7 +876,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } else { - OSL_ENSURE( sal_False, "Outdev Check failed" ); + OSL_FAIL( "Outdev Check failed" ); } } else if ( OUTDEV_WINDOW == rInf.GetOut().GetOutDevType() || @@ -897,12 +897,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } else { - OSL_ENSURE( sal_False, "Outdev Check failed" ); + OSL_FAIL( "Outdev Check failed" ); } } else { - OSL_ENSURE( sal_False, "Outdev Check failed" ); + OSL_FAIL( "Outdev Check failed" ); } #endif diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 1a7dced519fb..dfa9859c0765 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -727,7 +727,7 @@ SwCntntNode *SwTxtNode::JoinNext() InvalidateNumRule(); } else { - OSL_ENSURE( sal_False, "kein TxtNode." ); + OSL_FAIL( "kein TxtNode." ); } return this; @@ -822,7 +822,7 @@ SwCntntNode *SwTxtNode::JoinPrev() InvalidateNumRule(); } else { - OSL_ENSURE( sal_False, "kein TxtNode." ); + OSL_FAIL( "kein TxtNode." ); } return this; diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 4578eac81f76..cfa8036ecdce 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -115,7 +115,7 @@ sal_uInt16 MapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat ) break; #if OSL_DEBUG_LEVEL > 1 default : - OSL_ENSURE( sal_False, "Unsupported direction" ); + OSL_FAIL( "Unsupported direction" ); break; #endif } @@ -142,7 +142,7 @@ sal_uInt16 UnMapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat ) break; #if OSL_DEBUG_LEVEL > 1 default : - OSL_ENSURE( sal_False, "Unsupported direction" ); + OSL_FAIL( "Unsupported direction" ); break; #endif } diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 6292f1a72da4..4d17b8fa51a1 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -500,7 +500,7 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, } else { - OSL_ENSURE( sal_False, "was ist es denn nun?" ); + OSL_FAIL( "was ist es denn nun?" ); } } diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index ac622f1c9601..e1ad04df0d3c 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -266,7 +266,7 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_Str } break; default: - OSL_ENSURE( sal_False, "Was denn fuer ein FlyFrame?" ); + OSL_FAIL( "Was denn fuer ein FlyFrame?" ); } } @@ -346,7 +346,7 @@ void SwUndoInsLayFmt::RepeatImpl(::sw::RepeatContext & rContext) pDoc->GetRootFrm()->GetCurrPage(& rContext.GetRepeatPaM()) ); } else { - OSL_ENSURE( sal_False, "was fuer ein Anker ist es denn nun?" ); + OSL_FAIL( "was fuer ein Anker ist es denn nun?" ); } SwFrmFmt* pFlyFmt = pDoc->CopyLayoutFmt( *pFrmFmt, aAnchor, true, true ); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 07e2e7a9ad47..16a25e8fcf1e 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -677,7 +677,7 @@ void SwUndoTblToTxt::RedoImpl(::sw::UndoRedoContext & rContext) if( !pCNd && 0 == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) && 0 == ( pCNd = rDoc.GetNodes().GoPrevious( &aSaveIdx )) ) { - OSL_ENSURE( sal_False, "wo steht denn nun der TextNode" ); + OSL_FAIL( "wo steht denn nun der TextNode" ); } pPam->GetPoint()->nNode = aSaveIdx; @@ -3202,7 +3202,7 @@ void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos ) nM = nU + ( nO - nU ) / 2; if( *(rArr.GetData() + nM) == nIdx ) { - OSL_ENSURE( sal_False, "Index already exists. This should never happen." ); + OSL_FAIL( "Index already exists. This should never happen." ); return; } if( *(rArr.GetData() + nM) < nIdx ) @@ -3229,7 +3229,7 @@ void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos ) nM = nU + ( nO - nU ) / 2; if( *(rArr.GetData() + nM) == nIdx ) { - OSL_ENSURE( sal_False, "Index ist schon vorhanden, darf nie sein!" ); + OSL_FAIL( "Index ist schon vorhanden, darf nie sein!" ); return; } if( *(rArr.GetData() + nM) < nIdx ) diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index 3f9d4a0f54a5..add5f34a56b5 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -64,7 +64,7 @@ sal_Int32 GetEnumAsInt32( const UNO_NMSPC::Any& rVal ) catch( UNO_NMSPC::Exception & ) { eVal = 0; - OSL_ENSURE( sal_False, "can't get EnumAsInt32" ); + OSL_FAIL( "can't get EnumAsInt32" ); } return eVal; } @@ -86,7 +86,7 @@ sal_Bool UCB_DeleteFile( const String& rURL ) catch( UNO_NMSPC::Exception& ) { bRemoved = sal_False; - OSL_ENSURE( sal_False, "Exeception from executeCommand( delete )" ); + OSL_FAIL( "Exeception from executeCommand( delete )" ); } return bRemoved; } @@ -117,7 +117,7 @@ sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL, sal_Bool bCopy } catch( UNO_NMSPC::Exception& ) { - OSL_ENSURE( sal_False, "Exeception from executeCommand( transfer )" ); + OSL_FAIL( "Exeception from executeCommand( transfer )" ); bCopyCompleted = sal_False; } return bCopyCompleted; @@ -151,7 +151,7 @@ sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL ) catch( UNO_NMSPC::Exception& ) { bCaseSensitive = sal_False; - OSL_ENSURE( sal_False, "Exeception from compareContentIds()" ); + OSL_FAIL( "Exeception from compareContentIds()" ); } return bCaseSensitive; } diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index ce32501188ac..91d9543609f4 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -136,7 +136,7 @@ sal_uLong RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, con { if( !pStrm ) { - OSL_ENSURE( sal_False, "RTF-Read ohne Stream" ); + OSL_FAIL( "RTF-Read ohne Stream" ); return ERR_SWG_READ_ERROR; } @@ -2081,7 +2081,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos ) SwCntntNode* pNode = pDoc->GetNodes().GoPrevious( &aIdx ); if( !pNode ) { - OSL_ENSURE( sal_False, "keinen vorherigen ContentNode gefunden" ); + OSL_FAIL( "keinen vorherigen ContentNode gefunden" ); } rpNodePos = new SwNodeIdx( aIdx ); @@ -3253,7 +3253,7 @@ void SwRTFParser::ReadPageDescTbl() if (nPos != pDoc->MakePageDesc( String::CreateFromInt32(nTokenValue))) { - OSL_ENSURE( sal_False, "PageDesc an falscher Position" ); + OSL_FAIL( "PageDesc an falscher Position" ); } } pPg = &pDoc->_GetPageDesc(nPos); diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index ab080c8ac6f1..f5abb758edc4 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -449,7 +449,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos, layout, you may run into this robust code. It's not allowed that subrows leaves their parentrow. If this would happen the line height of subrow is reduced to a part of the remaining height */ - OSL_ENSURE( sal_False, "Corrupt line height I" ); + OSL_FAIL( "Corrupt line height I" ); nRPos -= nLineHeight; nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows @@ -578,7 +578,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow, if( nParentLineHeight && nStartRPos + nParentLineHeight <= nRPos ) { /* See comment in CollectTableRowCols */ - OSL_ENSURE( sal_False, "Corrupt line height II" ); + OSL_FAIL( "Corrupt line height II" ); nRPos -= nLineHeight; nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 6847e3cbf2f5..9e16b86bb583 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -1127,7 +1127,7 @@ SwFltShell& SwFltShell::SetStyle( sal_uInt16 nStyle ) } else { - OSL_ENSURE( sal_False, "Ungueltiger SwFltStyleCode" ); + OSL_FAIL( "Ungueltiger SwFltStyleCode" ); } return *this; } @@ -1150,7 +1150,7 @@ SwFltShell& SwFltShell::EndItem( sal_uInt16 nAttrId ) switch( nAttrId ) { case RES_FLTR_BOOKMARK: - OSL_ENSURE( sal_False, "Falscher Aufruf fuer Bookmark-Ende" ); + OSL_FAIL( "Falscher Aufruf fuer Bookmark-Ende" ); break; case RES_FLTR_TOX: @@ -1282,64 +1282,64 @@ SwFltOutBase::SwFltOutBase(SwDoc& rDocu) const SfxPoolItem& SwFltOutBase::GetCellAttr(sal_uInt16 nWhich) { - OSL_ENSURE(sal_False, "GetCellAttr ausserhalb von normalem Text"); + OSL_FAIL("GetCellAttr ausserhalb von normalem Text"); return GetDoc().GetAttrPool().GetDefaultItem(nWhich); } sal_Bool SwFltOutBase::BeginTable() { - OSL_ENSURE(sal_False, "BeginTable ausserhalb von normalem Text"); + OSL_FAIL("BeginTable ausserhalb von normalem Text"); return sal_False; } void SwFltOutBase::NextTableCell() { - OSL_ENSURE(sal_False, "NextTableCell ausserhalb von normalem Text"); + OSL_FAIL("NextTableCell ausserhalb von normalem Text"); } void SwFltOutBase::NextTableRow() { - OSL_ENSURE(sal_False, "NextTableRow ausserhalb von normalem Text"); + OSL_FAIL("NextTableRow ausserhalb von normalem Text"); } void SwFltOutBase::SetTableWidth(SwTwips /*nW*/) { - OSL_ENSURE(sal_False, "SetTableWidth ausserhalb von normalem Text"); + OSL_FAIL("SetTableWidth ausserhalb von normalem Text"); } void SwFltOutBase::SetTableOrient(sal_Int16 /*eOri*/) { - OSL_ENSURE(sal_False, "SetTableOrient ausserhalb von normalem Text"); + OSL_FAIL("SetTableOrient ausserhalb von normalem Text"); } void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, sal_uInt16 /*nCell*/) { - OSL_ENSURE(sal_False, "SetCellWidth ausserhalb von normalem Text"); + OSL_FAIL("SetCellWidth ausserhalb von normalem Text"); } void SwFltOutBase::SetCellHeight(SwTwips /*nH*/) { - OSL_ENSURE(sal_False, "SetCellHeight ausserhalb von normalem Text"); + OSL_FAIL("SetCellHeight ausserhalb von normalem Text"); } void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, sal_uInt16 /*nCell*/) { - OSL_ENSURE(sal_False, "SetCellBorder ausserhalb von normalem Text"); + OSL_FAIL("SetCellBorder ausserhalb von normalem Text"); } void SwFltOutBase::SetCellSpace(sal_uInt16 /*nSp*/) { - OSL_ENSURE(sal_False, "SetCellSpace ausserhalb von normalem Text"); + OSL_FAIL("SetCellSpace ausserhalb von normalem Text"); } void SwFltOutBase::DeleteCell(sal_uInt16 /*nCell*/) { - OSL_ENSURE(sal_False, "DeleteCell ausserhalb von normalem Text"); + OSL_FAIL("DeleteCell ausserhalb von normalem Text"); } void SwFltOutBase::EndTable() { - OSL_ENSURE(sal_False, "EndTable ausserhalb von normalem Text"); + OSL_FAIL("EndTable ausserhalb von normalem Text"); } /*virtual*/ sal_Bool SwFltOutDoc::IsInTable() @@ -1353,7 +1353,7 @@ sal_Bool SwFltOutDoc::BeginTable() return sal_False; if (pTable){ - OSL_ENSURE(sal_False, "BeginTable in Table"); + OSL_FAIL("BeginTable in Table"); return sal_False; } // Alle Attribute schliessen, da sonst Attribute @@ -1388,25 +1388,25 @@ SwTableBox* SwFltOutDoc::GetBox(sal_uInt16 ny, sal_uInt16 nx /*= USHRT_MAX */) // get structs to table cells const SwTableLines* pTableLines = &pTable->GetTabLines(); if(!pTableLines){ - OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLines"); + OSL_FAIL("SwFltOutDoc:GetBox:pTableLines"); return 0; } if( ny >= pTableLines->Count() ){ // Notbremse - OSL_ENSURE( sal_False, "SwFltOutDoc:GetBox:ny >= Count()"); + OSL_FAIL( "SwFltOutDoc:GetBox:ny >= Count()"); ny = pTableLines->Count() - 1; } SwTableLine* pTableLine = (*pTableLines)[ny]; if(!pTableLine){ - OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLine"); + OSL_FAIL("SwFltOutDoc:GetBox:pTableLine"); return 0; } SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes(); if(!pTableBoxes){ - OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableBoxes"); + OSL_FAIL("SwFltOutDoc:GetBox:pTableBoxes"); return 0; } if( nx >= pTableBoxes->Count() ){ // Notbremse - OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:nx >= Count()"); + OSL_FAIL("SwFltOutDoc:GetBox:nx >= Count()"); nx = pTableBoxes->Count() - 1; } SwTableBox* pTableBox = (*pTableBoxes)[nx]; @@ -1692,11 +1692,11 @@ sal_Bool SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/, /*virtual*/ void SwFltOutBase::SetFlyAnchor( RndStdIds eAnchor ) { if( !IsInFly() ){ - OSL_ENSURE( sal_False, "SetFlyAnchor() ohne Fly" ); + OSL_FAIL( "SetFlyAnchor() ohne Fly" ); return; } if ( eAnchor == FLY_AS_CHAR ){ - OSL_ENSURE( sal_False, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" ); + OSL_FAIL( "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" ); return; } SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR ); @@ -1792,7 +1792,7 @@ sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor, void SwFltOutDoc::EndFly() { if( pTable ){ - OSL_ENSURE( sal_False, "SwFltOutDoc::EndFly() in Table" ); + OSL_FAIL( "SwFltOutDoc::EndFly() in Table" ); return; } // Alle Attribute schliessen, da sonst Attribute @@ -1863,11 +1863,11 @@ sal_Bool SwFltShell::BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos) { if (pOut->IsInFly()){ - OSL_ENSURE(sal_False, "BeginFly in Fly"); + OSL_FAIL("BeginFly in Fly"); return sal_False; } if (pOutDoc->IsInTable()){ - OSL_ENSURE(sal_False, "BeginFly in Table"); + OSL_FAIL("BeginFly in Table"); return sal_False; } pOut->BeginFly( eAnchor, bAbsolutePos, pColls[nAktStyle]->GetpFlyAttrs() ); @@ -1891,11 +1891,11 @@ void SwFltShell::SetFlyYPos( short nYPos, sal_Int16 eVRel, void SwFltShell::EndFly() { if (!pOut->IsInFly()){ - OSL_ENSURE(sal_False, "EndFly ohne Fly"); + OSL_FAIL("EndFly ohne Fly"); return; } if (pOutDoc->IsInTable()){ // Table verschraenkt mit Fly macht keinen Sinn - OSL_ENSURE(sal_False, "EndFly in Table ( verschraenkt )"); + OSL_FAIL("EndFly in Table ( verschraenkt )"); EndTable(); // -> Table beenden } pOut->EndFly(); @@ -1909,11 +1909,11 @@ void SwFltShell::EndFly() void SwFltShell::BeginFootnote() { if( pOut->IsInFly() ){ // Passiert z.B. bei Fussnote in Fly - OSL_ENSURE(sal_False, "Fussnote in Fly nicht erlaubt"); + OSL_FAIL("Fussnote in Fly nicht erlaubt"); return; } if( pOutDoc->IsInTable() ){ - OSL_ENSURE(sal_False, "Fussnote in Table z.Zt. nicht erlaubt"); + OSL_FAIL("Fussnote in Table z.Zt. nicht erlaubt"); return; } diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx index 584ca7a73291..f821438df8b0 100644 --- a/sw/source/filter/ww1/w1sprm.cxx +++ b/sw/source/filter/ww1/w1sprm.cxx @@ -212,7 +212,7 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc { switch(pBrc->dxpLine1WidthGet()) { - default: OSL_ENSURE(sal_False, "unknown linewidth"); + default: OSL_FAIL("unknown linewidth"); case 0: return 0; // keine Linie case 1: nCode = DEF_LINE_WIDTH_0; break; case 2: nCode = DEF_LINE_WIDTH_1; break; @@ -236,20 +236,20 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc { switch(pBrc->dxpLine1WidthGet()) { - default: OSL_ENSURE(sal_False, "unknown linewidth"); + default: OSL_FAIL("unknown linewidth"); case 1: nCode = DEF_DOUBLE_LINE0_IN; break; } pLine->SetOutWidth(nCode); switch(pBrc->dxpLine2WidthGet()) { - default: OSL_ENSURE(sal_False, "unknown linewidth"); + default: OSL_FAIL("unknown linewidth"); case 1: nCode = DEF_DOUBLE_LINE0_OUT; break; } pLine->SetInWidth(nCode); } switch(pBrc->dxpLine1WidthGet()) { - default: OSL_ENSURE(sal_False, "unknown space"); + default: OSL_FAIL("unknown space"); case 0: nCode = DEF_DOUBLE_LINE0_DIST; break; case 1: nCode = DEF_DOUBLE_LINE1_DIST; break; case 2: nCode = DEF_DOUBLE_LINE2_DIST; break; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 17dc1c03bb2f..c4d2e906e797 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -971,7 +971,7 @@ sal_uInt16 RtfExport::GetColor( const Color& rColor ) const OSL_TRACE("%s returning %d (%d,%d,%d)", OSL_THIS_FUNC, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue()); return (*it).first; } - OSL_ENSURE( sal_False, "No such Color in m_aColTbl!" ); + OSL_FAIL( "No such Color in m_aColTbl!" ); return 0; } diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 1479a5d1dc16..38f37ea04648 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -867,7 +867,7 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd) if (nLevel < 0 || nLevel >= MAXLEVEL) { - OSL_ENSURE(sal_False, "Invalid level"); + OSL_FAIL("Invalid level"); return false; } diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index c7458c85f228..8d66b216d2ab 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -395,7 +395,7 @@ sal_Int32 ReadThroughComponent( } catch ( uno::Exception& ) { - OSL_ENSURE( sal_False, "Error on import!\n" ); + OSL_FAIL( "Error on import!\n" ); // TODO/LATER: error handling } diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index fdc9fbbad84a..3eed5ae93a8f 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -331,7 +331,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( ::rtl::OUString aExistingName = pExistingOLENd->GetOLEObj().GetCurrentPersistName(); if ( aExistingName.equals( aObjName ) ) { - OSL_ENSURE( sal_False, "The document contains duplicate object references, means it is partially broken, please let developers know how this document was generated!\n" ); + OSL_FAIL( "The document contains duplicate object references, means it is partially broken, please let developers know how this document was generated!\n" ); ::rtl::OUString aTmpName = pDoc->GetPersist()->GetEmbeddedObjectContainer().CreateUniqueObjectName(); try @@ -343,7 +343,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( } catch ( uno::Exception& ) { - OSL_ENSURE( sal_False, "Couldn't create a copy of the object!\n" ); + OSL_FAIL( "Couldn't create a copy of the object!\n" ); } break; diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx index 72e4ded03340..b6ee38661fb8 100644 --- a/sw/source/ui/dbui/swdbtoolsclient.cxx +++ b/sw/source/ui/dbui/swdbtoolsclient.cxx @@ -122,7 +122,7 @@ void SwDbtoolsClient::registerClient() if (NULL == getDbToolsClientFactoryFunction()) { // did not find the symbol - OSL_ENSURE(sal_False, "SwDbtoolsClient::registerClient: could not find the symbol for creating the factory!"); + OSL_FAIL("SwDbtoolsClient::registerClient: could not find the symbol for creating the factory!"); osl_unloadModule(getDbToolsClientModule()); getDbToolsClientModule() = NULL; } diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index 1724efeedacd..7fc94e550c7d 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -137,7 +137,7 @@ void SwOleClient::ViewChanged() catch( uno::Exception& ) { // this is an error - OSL_ENSURE( sal_False, "Something goes wrong on requesting object size!\n" ); + OSL_FAIL( "Something goes wrong on requesting object size!\n" ); } Size aVisSize( aSz.Width, aSz.Height ); diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index ba44f7b3fcab..84746fd6510e 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -485,7 +485,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) break; default: - OSL_ENSURE(sal_False, "wrong request method"); + OSL_FAIL("wrong request method"); return; } diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx index 716696354680..e054073f4632 100644 --- a/sw/source/ui/uno/unodispatch.cxx +++ b/sw/source/ui/uno/unodispatch.cxx @@ -238,7 +238,7 @@ void SwXDispatch::dispatch( } else if(!aURL.Complete.compareToAscii(cURLDocumentDataSource)) { - OSL_ENSURE(sal_False, "SwXDispatch::dispatch: this URL is not to be dispatched!"); + OSL_FAIL("SwXDispatch::dispatch: this URL is not to be dispatched!"); } else if(!aURL.Complete.compareToAscii(cInternalDBChangeNotification)) { |