diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-12 11:51:35 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-13 16:54:59 +0100 |
commit | 64378f446e782b6636312a8c72a7400fd799c1a4 (patch) | |
tree | 25376336ad586c3804f16ebc05d62fb069bce74b /sw | |
parent | 83d8300b31948702f3c11dc14d4070501b108084 (diff) |
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'sw')
157 files changed, 428 insertions, 582 deletions
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index b831f4c1a991..cbd2d222f572 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -182,7 +182,7 @@ bool SwNodeNum::IsContinuous() const } else { - OSL_ENSURE( false, "<SwNodeNum::IsContinuous()> - OD debug" ); + OSL_FAIL( "<SwNodeNum::IsContinuous()> - OD debug" ); } // <-- @@ -294,8 +294,7 @@ bool SwNodeNum::IsCountPhantoms() const mpNumRule->IsCountPhantoms(); else { - OSL_ENSURE( false, - "<SwNodeNum::IsCountPhantoms(): missing numbering rule - please inform OD" ); + OSL_FAIL( "<SwNodeNum::IsCountPhantoms(): missing numbering rule - please inform OD" ); } // <-- @@ -358,8 +357,7 @@ void SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum ) SwNodeNum* pChildNode( dynamic_cast<SwNodeNum*>((*rNodeNum.mChildren.begin())) ); if ( !pChildNode ) { - OSL_ENSURE( false, - "<SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete(..)> - unknown number tree node child" ); + OSL_FAIL( "<SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete(..)> - unknown number tree node child" ); ++nAllowedChildCount; continue; } diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index c19d969d09b1..03ccf0e71bad 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -69,7 +69,7 @@ SwNumberTreeNode::~SwNumberTreeNode() } else { - OSL_ENSURE(false, "lost children!"); + OSL_FAIL("lost children!"); } } @@ -91,7 +91,7 @@ SwNumberTreeNode * SwNumberTreeNode::CreatePhantom() if (! mChildren.empty() && (*mChildren.begin())->IsPhantom()) { - OSL_ENSURE(false, "phantom already present"); + OSL_FAIL("phantom already present"); } else { @@ -104,7 +104,7 @@ SwNumberTreeNode * SwNumberTreeNode::CreatePhantom() if (! aInsert.second) { - OSL_ENSURE(false, "insert of phantom failed!"); + OSL_FAIL("insert of phantom failed!"); delete pNew; pNew = NULL; @@ -503,14 +503,13 @@ void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild, if ( nDepth < 0 ) { - OSL_ENSURE( false, - "<SwNumberTreeNode::AddChild(..)> - parameter <nDepth> out of valid range. Serious defect -> please inform OD." ); + OSL_FAIL( "<SwNumberTreeNode::AddChild(..)> - parameter <nDepth> out of valid range. Serious defect -> please inform OD." ); return; } if ( pChild->GetParent() != NULL || pChild->GetChildCount() > 0 ) { - OSL_ENSURE(false, "only orphans allowed."); + OSL_FAIL("only orphans allowed."); return; } @@ -644,7 +643,7 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild) if (pChild->IsPhantom()) { - OSL_ENSURE(false, "not applicable to phantoms!"); + OSL_FAIL("not applicable to phantoms!"); return; } @@ -697,7 +696,7 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild) } else { - OSL_ENSURE(false, "RemoveChild: failed!"); + OSL_FAIL("RemoveChild: failed!"); } pChild->PostRemove(); @@ -878,8 +877,7 @@ void SwNumberTreeNode::SetLevelInListTree( const int nLevel ) { if ( nLevel < 0 ) { - OSL_ENSURE( false, - "<SwNumberTreeNode::SetLevelInListTree(..)> - parameter <nLevel> out of valid range. Serious defect -> please inform OD." ); + OSL_FAIL( "<SwNumberTreeNode::SetLevelInListTree(..)> - parameter <nLevel> out of valid range. Serious defect -> please inform OD." ); return; } @@ -931,14 +929,14 @@ bool SwNumberTreeNode::IsSane(bool bRecursive, if (find(rParents.begin(), rParents.end(), this) != rParents.end()) { - OSL_ENSURE(false, " I'm my own ancestor!"); + OSL_FAIL(" I'm my own ancestor!"); bResult = false; } if (! rParents.empty() && rParents.back() != mpParent) { - OSL_ENSURE(false, " I'm a bastard!"); + OSL_FAIL(" I'm a bastard!"); bResult = false; } @@ -959,7 +957,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive, if (! bFirst) { - OSL_ENSURE(false, " found phantom not at first position."); + OSL_FAIL(" found phantom not at first position."); bResult = false; } @@ -967,7 +965,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive, if ((*aIt)->mpParent != (SwNumberTreeNode *) this) { - OSL_ENSURE(false, "found a bastard"); + OSL_FAIL("found a bastard"); bResult = false; } @@ -976,7 +974,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive, { if (!(*aIt)->IsPhantom() && (*aIt)->LessThan(*this)) { - OSL_ENSURE(false, " found child less than me"); + OSL_FAIL(" found child less than me"); bResult = false; } @@ -984,7 +982,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive, } else { - OSL_ENSURE(false, "found child that is NULL"); + OSL_FAIL("found child that is NULL"); bResult = false; } @@ -1289,8 +1287,7 @@ void SwNumberTreeNode::NotifyNodesOnListLevel( const int nListLevel ) { if ( nListLevel < 0 ) { - OSL_ENSURE( false, - "<SwNumberTreeNode::NotifyNodesOnListLevel(..)> - invalid list level provided" ); + OSL_FAIL( "<SwNumberTreeNode::NotifyNodesOnListLevel(..)> - invalid list level provided" ); return; } diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 60b0921324fe..f8820f56039a 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -1253,8 +1253,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize( } else { - OSL_ENSURE( false , - "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - no accessible shape found." ); + OSL_FAIL( "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - no accessible shape found." ); } // <-- } @@ -1294,8 +1293,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize( } else if ( rChildFrmOrObj.GetWindow() ) { - OSL_ENSURE( false, - "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <Window>." ); + OSL_FAIL( "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <Window>." ); } } } diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx index 3d0b5c4b5bf3..68902b516b2a 100644 --- a/sw/source/core/access/parachangetrackinginfo.cxx +++ b/sw/source/core/access/parachangetrackinginfo.cxx @@ -53,8 +53,7 @@ namespace { if ( !rTxtFrm.GetTxtNode() ) { - OSL_ENSURE( false, - "<initChangeTrackTextMarkupLists(..) - missing <SwTxtNode> instance!" ); + OSL_FAIL( "<initChangeTrackTextMarkupLists(..) - missing <SwTxtNode> instance!" ); return; } const SwTxtNode& rTxtNode( *(rTxtFrm.GetTxtNode()) ); @@ -62,8 +61,7 @@ namespace { const IDocumentRedlineAccess* pIDocChangeTrack( rTxtNode.getIDocumentRedlineAccess() ); if ( !pIDocChangeTrack ) { - OSL_ENSURE( false, - "<initChangeTrackTextMarkupLists(..) - missing <IDocumentRedlineAccess> instance!" ); + OSL_FAIL( "<initChangeTrackTextMarkupLists(..) - missing <IDocumentRedlineAccess> instance!" ); return; } @@ -219,8 +217,7 @@ const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( co break; default: { - OSL_ENSURE( false, - "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..)> - misusage - unexpected text markup type for change tracking." ); + OSL_FAIL( "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..)> - misusage - unexpected text markup type for change tracking." ); } } diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx index 434714be4306..eac87e6d554d 100644 --- a/sw/source/core/access/textmarkuphelper.cxx +++ b/sw/source/core/access/textmarkuphelper.cxx @@ -161,8 +161,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp } else { - OSL_ENSURE( false, - "<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" ); + OSL_FAIL( "<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" ); } } diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx index 6fe71ac0ddc0..5afbe840d545 100644 --- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx +++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx @@ -88,7 +88,7 @@ bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, BYTE nMemberId ) const } break; default: - OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" ); + OSL_FAIL( "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" ); bRet = false; } @@ -116,13 +116,13 @@ bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, BYTE nMemberId ) } else { - OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::PutValue(..)> - invalid attribute value" ); + OSL_FAIL( "<SwFmtWrapInfluenceOnObjPos::PutValue(..)> - invalid attribute value" ); bRet = false; } } break; default: - OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" ); + OSL_FAIL( "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" ); bRet = false; } @@ -141,7 +141,7 @@ void SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInflu } else { - OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos(..)> - invalid attribute value" ); + OSL_FAIL( "<SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos(..)> - invalid attribute value" ); } } diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 4964ee905a71..2a97ba556dd0 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -161,7 +161,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, } break; default: - OSL_ENSURE( false, "unknown case in lcl_CleanStr" ); + OSL_FAIL( "unknown case in lcl_CleanStr" ); break; } } diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 00a2873e80fd..25c03bd6c99d 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -364,7 +364,7 @@ bool lcl_FindNextCell( SwNodeIndex& rIdx, BOOL bInReadOnly ) if ( !pTblNd ) { - OSL_ENSURE( false, "lcl_FindNextCell not celled with table start node!" ); + OSL_FAIL( "lcl_FindNextCell not celled with table start node!" ); return false; } @@ -442,7 +442,7 @@ bool lcl_FindPrevCell( SwNodeIndex& rIdx, BOOL bInReadOnly ) if ( !pTblNd ) { - OSL_ENSURE( false, "lcl_FindPrevCell not celled with table start node!" ); + OSL_FAIL( "lcl_FindPrevCell not celled with table start node!" ); return false; } diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index ec4560da5492..3463273d8502 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -1043,7 +1043,7 @@ String lcl_TokenType2Str(FormTokenType nType) return String("??", RTL_TEXTENCODING_ASCII_US); } - OSL_ENSURE(false, "should not be reached"); + OSL_FAIL("should not be reached"); return String("??", RTL_TEXTENCODING_ASCII_US); } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 0c0a92a84620..9e459dd07b82 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -200,7 +200,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: - OSL_ENSURE(false, "Invalid setting id"); + OSL_FAIL("Invalid setting id"); } return false; } @@ -354,7 +354,7 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) break; default: - OSL_ENSURE(false, "Invalid setting id"); + OSL_FAIL("Invalid setting id"); } } diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 6587f7e0e66e..40a4fce05d12 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -293,8 +293,7 @@ IDocumentMarkAccess::MarkType IDocumentMarkAccess::GetType(const IMark& rBkmk) return NAVIGATOR_REMINDER; else { - OSL_ENSURE(false, - "IDocumentMarkAccess::GetType(..)" + OSL_FAIL("IDocumentMarkAccess::GetType(..)" " - unknown MarkType. This needs to be fixed!"); return UNO_BOOKMARK; } diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 9840f06219ef..fdd576112301 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -131,8 +131,7 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, // vertical from left-to-right - not supported yet bVert = true; bR2L = true; - OSL_ENSURE( false, - "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." ); + OSL_FAIL( "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." ); } break; case FRMDIR_VERT_TOP_RIGHT: @@ -460,8 +459,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView ) // <SwDrawVirt>-object is found in the mark list. if ( pObj->ISA(SwDrawVirtObj) ) { - OSL_ENSURE( false, - "<SwDrawVirtObj> is still marked for delete. application will crash!" ); + OSL_FAIL( "<SwDrawVirtObj> is still marked for delete. application will crash!" ); } //loescht sich selbst! pContact->Changed(*pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() ); @@ -670,7 +668,7 @@ bool SwDoc::IsVisibleLayerId( const SdrLayerID& _nLayerId ) const } else { - OSL_ENSURE( false, "<SwDoc::IsVisibleLayerId(..)> - unknown layer ID." ); + OSL_FAIL( "<SwDoc::IsVisibleLayerId(..)> - unknown layer ID." ); bRetVal = false; } @@ -702,12 +700,12 @@ SdrLayerID SwDoc::GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisible _nInvisibleLayerId == GetHellId() || _nInvisibleLayerId == GetControlsId() ) { - OSL_ENSURE( false, "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID already an invisible one." ); + OSL_FAIL( "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID already an invisible one." ); nVisibleLayerId = _nInvisibleLayerId; } else { - OSL_ENSURE( false, "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID is unknown." ); + OSL_FAIL( "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID is unknown." ); nVisibleLayerId = _nInvisibleLayerId; } @@ -739,12 +737,12 @@ SdrLayerID SwDoc::GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLa _nVisibleLayerId == GetInvisibleHellId() || _nVisibleLayerId == GetInvisibleControlsId() ) { - OSL_ENSURE( false, "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID already an invisible one." ); + OSL_FAIL( "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID already an invisible one." ); nInvisibleLayerId = _nVisibleLayerId; } else { - OSL_ENSURE( false, "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID is unknown." ); + OSL_FAIL( "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID is unknown." ); nInvisibleLayerId = _nVisibleLayerId; } @@ -973,8 +971,7 @@ namespace docfunc { if ( !pAnchoredDrawObj ) { - OSL_ENSURE( false, - "<docfunc::AllDrawObjsOnPage() - missing anchored draw object" ); + OSL_FAIL( "<docfunc::AllDrawObjsOnPage() - missing anchored draw object" ); bAllDrawObjsOnPage = false; break; } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 8bb37e8dbee0..f424942b1a6a 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -653,8 +653,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, // make code robust: if ( !pNumRule ) { - OSL_ENSURE( false, - "<InsAttr(..)> - PaM in front of label, but text node has no numbering rule set. This is a serious defect, please inform OD." ); + OSL_FAIL( "<InsAttr(..)> - PaM in front of label, but text node has no numbering rule set. This is a serious defect, please inform OD." ); DELETECHARSETS return false; } diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 892683123412..1efd221d0a09 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -203,7 +203,7 @@ SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet ) case FLY_AT_FLY: case FLY_AT_PARA: case FLY_AS_CHAR: - OSL_ENSURE( false, "use new interface instead: SwDoc::MakeFlySection!" ); + OSL_FAIL( "use new interface instead: SwDoc::MakeFlySection!" ); break; #endif diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 45e3792f174b..3e3753562b00 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -688,7 +688,7 @@ SfxPrinter& SwDoc::CreatePrinter_() const OSL_ENSURE( ! pPrt, "Do not call CreatePrinter_(), call getPrinter() instead" ); #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "Printer will be created!" ); + OSL_FAIL( "Printer will be created!" ); #endif // wir erzeugen einen default SfxPrinter. diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 0944e97a48c0..bfcba62ad20b 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -452,7 +452,7 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset ) nAktPos = nTmpPos; if( aEndRg == aSttRg ) { - OSL_ENSURE( false, "Moving outlines: Surprising selection" ); + OSL_FAIL( "Moving outlines: Surprising selection" ); aEndRg++; } @@ -998,8 +998,7 @@ BOOL SwDoc::DelNumRule( const String& rName, BOOL bBroadcast ) if ( (*pNumRuleTbl)[ nPos ] == GetOutlineNumRule() ) { - OSL_ENSURE( false, - "<SwDoc::DelNumRule(..)> - No deletion of outline list style. This is serious defect - please inform OD" ); + OSL_FAIL( "<SwDoc::DelNumRule(..)> - No deletion of outline list style. This is serious defect - please inform OD" ); return FALSE; } @@ -2355,8 +2354,7 @@ void SwDoc::removeListItem( const SwNodeNum& rNodeNum ) const tImplSortedNodeNumList::size_type nDeleted = mpListItemsList->erase( &rNodeNum ); if ( nDeleted > 1 ) { - OSL_ENSURE( false, - "<SwDoc::RemoveListItem(..)> - <SwNodeNum> was registered more than once as numbered item!" ); + OSL_FAIL( "<SwDoc::RemoveListItem(..)> - <SwNodeNum> was registered more than once as numbered item!" ); } } @@ -2452,16 +2450,14 @@ SwList* SwDoc::createList( String sListId, if ( getListByName( sListId ) ) { - OSL_ENSURE( false, - "<SwDoc::createList(..)> - provided list id already used. Serious defect -> please inform OD." ); + OSL_FAIL( "<SwDoc::createList(..)> - provided list id already used. Serious defect -> please inform OD." ); return 0; } SwNumRule* pDefaultNumRuleForNewList = FindNumRulePtr( sDefaultListStyleName ); if ( !pDefaultNumRuleForNewList ) { - OSL_ENSURE( false, - "<SwDoc::createList(..)> - for provided default list style name no list style is found. Serious defect -> please inform OD." ); + OSL_FAIL( "<SwDoc::createList(..)> - for provided default list style name no list style is found. Serious defect -> please inform OD." ); return 0; } @@ -2499,23 +2495,20 @@ SwList* SwDoc::createListForListStyle( const String sListStyleName ) { if ( sListStyleName.Len() == 0 ) { - OSL_ENSURE( false, - "<SwDoc::createListForListStyle(..)> - no list style name provided. Serious defect -> please inform OD." ); + OSL_FAIL( "<SwDoc::createListForListStyle(..)> - no list style name provided. Serious defect -> please inform OD." ); return 0; } if ( getListForListStyle( sListStyleName ) ) { - OSL_ENSURE( false, - "<SwDoc::createListForListStyle(..)> - a list for the provided list style name already exists. Serious defect -> please inform OD." ); + OSL_FAIL( "<SwDoc::createListForListStyle(..)> - a list for the provided list style name already exists. Serious defect -> please inform OD." ); return 0; } SwNumRule* pNumRule = FindNumRulePtr( sListStyleName ); if ( !pNumRule ) { - OSL_ENSURE( false, - "<SwDoc::createListForListStyle(..)> - for provided list style name no list style is found. Serious defect -> please inform OD." ); + OSL_FAIL( "<SwDoc::createListForListStyle(..)> - for provided list style name no list style is found. Serious defect -> please inform OD." ); return 0; } diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 05bb8965548f..1b8b0b409bd8 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -66,8 +66,7 @@ namespace TxtFmtCollFunc if ( !pTxtFmtColl ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, - "<TxtFmtCollFunc::CheckTxtFmtCollFuncForDeletionOfAssignmentToOutlineStyle> - misuse of method - it's only for instances of <SwTxtFmtColl>" ); + OSL_FAIL( "<TxtFmtCollFunc::CheckTxtFmtCollFuncForDeletionOfAssignmentToOutlineStyle> - misuse of method - it's only for instances of <SwTxtFmtColl>" ); #endif return; } diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 0f76481194dc..edfe1546ad15 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1406,8 +1406,7 @@ namespace numfunc break; default: { - OSL_ENSURE( false, - "<SwNumberingUIBehaviorConfig::LoadConfig()> - unknown configuration property"); + OSL_FAIL( "<SwNumberingUIBehaviorConfig::LoadConfig()> - unknown configuration property"); } } } diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index 27cca42ac203..4d070fffdd2a 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -301,8 +301,7 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark) pDdeBookmark->SetRefObject(this); } else - OSL_ENSURE(false, - "SwServerObject::SetNoServer(..)" + OSL_FAIL("SwServerObject::SetNoServer(..)" " - setting an bookmark that is not DDE-capable"); } diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx index ac67fd7fb89a..5336acb92164 100644 --- a/sw/source/core/doc/swstylemanager.cxx +++ b/sw/source/core/doc/swstylemanager.cxx @@ -146,7 +146,7 @@ StylePool::SfxItemSet_Pointer_t SwStyleManager::getByName( const rtl::OUString& { // Ok, ok, it's allowed to ask for uncached styles (from UNO) but it should not be done // during loading a document - OSL_ENSURE( false, "Don't ask for uncached styles" ); + OSL_FAIL( "Don't ask for uncached styles" ); rpCache->addCompletePool( rAutoPool ); pStyle = rpCache->getByName( rName ); } diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx index ec1a4c63ad4f..f1ab71a0f1eb 100644 --- a/sw/source/core/docnode/finalthreadmanager.cxx +++ b/sw/source/core/docnode/finalthreadmanager.cxx @@ -224,14 +224,14 @@ void TerminateOfficeThread::PerformOfficeTermination() css::uno::UNO_QUERY ); if ( !xTasksSupplier.is() ) { - OSL_ENSURE( false, "<TerminateOfficeThread::PerformOfficeTermination()> - no XFramesSupplier!" ); + OSL_FAIL( "<TerminateOfficeThread::PerformOfficeTermination()> - no XFramesSupplier!" ); return; } css::uno::Reference< css::container::XElementAccess > xList( xTasksSupplier->getFrames(), css::uno::UNO_QUERY ); if ( !xList.is() ) { - OSL_ENSURE( false, "<TerminateOfficeThread::PerformOfficeTermination()> - no XElementAccess!" ); + OSL_FAIL( "<TerminateOfficeThread::PerformOfficeTermination()> - no XElementAccess!" ); return; } @@ -294,14 +294,14 @@ FinalThreadManager::~FinalThreadManager() if ( !maThreads.empty() ) { - OSL_ENSURE( false, "<FinalThreadManager::~FinalThreadManager()> - still registered jobs are existing -> perform cancellation" ); + OSL_FAIL( "<FinalThreadManager::~FinalThreadManager()> - still registered jobs are existing -> perform cancellation" ); cancelAllJobs(); } if ( mpCancelJobsThread != 0 ) { if ( !mpCancelJobsThread->allJobsCancelled() ) - OSL_ENSURE( false, "<FinalThreadManager::~FinalThreadManager()> - cancellation of registered jobs not yet finished -> wait for its finish" ); + OSL_FAIL( "<FinalThreadManager::~FinalThreadManager()> - cancellation of registered jobs not yet finished -> wait for its finish" ); mpCancelJobsThread->stopWhenAllJobsCancelled(); mpCancelJobsThread->join(); diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 7e1c6d7e26fd..5a86b1af6f7b 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -718,7 +718,7 @@ SwDoc::CopyRange( SwPaM& rPam, SwPosition& rPos, const bool bCopyAll ) const else { OSL_ENSURE( this == pDoc, " falscher Copy-Zweig!" ); - OSL_ENSURE(false, "mst: i thought this could be dead code;" + OSL_FAIL("mst: i thought this could be dead code;" "please tell me what you did to get here!"); pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE)); @@ -1508,8 +1508,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, { // This case can *not* happen, but to be robust take the first // text node in the destination document. - OSL_ENSURE( false, - "<SwDoc::_CopyFlyInFly(..)> - anchor text node in copied range not found" ); + OSL_FAIL( "<SwDoc::_CopyFlyInFly(..)> - anchor text node in copied range not found" ); nAnchorTxtNdNumInRange = 1; } // Second, search corresponding text node in destination document @@ -1534,8 +1533,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, { // This case can *not* happen, but to be robust take the first // text node in the destination document. - OSL_ENSURE( false, - "<SwDoc::_CopyFlyInFly(..)> - found anchor node index isn't a text node" ); + OSL_FAIL( "<SwDoc::_CopyFlyInFly(..)> - found anchor node index isn't a text node" ); aAnchorNdIdx = rStartIdx; while ( !aAnchorNdIdx.GetNode().IsTxtNode() ) { diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx index 1b2dcb195e18..a14af75b37cb 100644 --- a/sw/source/core/docnode/ndnum.cxx +++ b/sw/source/core/docnode/ndnum.cxx @@ -105,8 +105,7 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd) } else { - OSL_ENSURE( false, - "<SwNodes::UpdateOutlineNode(..)> - given text node isn't in the correct nodes array. This is a serious defect -> inform OD" ); + OSL_FAIL( "<SwNodes::UpdateOutlineNode(..)> - given text node isn't in the correct nodes array. This is a serious defect -> inform OD" ); } } } diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 5c4531558776..8383a9f596cb 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -93,7 +93,7 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds, ? !_rNds.GoPrevSection( &aChkIdx, FALSE, FALSE ) : !_rNds.GoNextSection( &aChkIdx, FALSE, FALSE ) ) { - OSL_ENSURE( false, "<lcl_IsInSameTblBox(..)> - no previous/next!" ); + OSL_FAIL( "<lcl_IsInSameTblBox(..)> - no previous/next!" ); return false; } else diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 0c6d01b6005c..d583912735a7 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2556,7 +2556,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , // Make code robust: if ( aDelCheck.HasBeenDeleted() ) { - OSL_ENSURE( false, "Current box has been deleted during GetTabRows()" ); + OSL_FAIL( "Current box has been deleted during GetTabRows()" ); return; } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 99bdc291aa1a..a0e62843fad2 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1205,15 +1205,13 @@ void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd ) { if ( !rSectNd.GetDoc() ) { - OSL_ENSURE( false, - "method <lcl_RemoveSectionLinksInSect(..)> - no Doc at SectionNode" ); + OSL_FAIL( "method <lcl_RemoveSectionLinksInSect(..)> - no Doc at SectionNode" ); return; } if ( !rSectNd.GetSection().IsConnected() ) { - OSL_ENSURE( false, - "method <lcl_RemoveSectionLinksInSect(..)> - no Link at Section of SectionNode" ); + OSL_FAIL( "method <lcl_RemoveSectionLinksInSect(..)> - no Link at Section of SectionNode" ); return; } const ::sfx2::SvBaseLink* pOwnLink( &(rSectNd.GetSection().GetBaseLink() ) ); diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx index 7aa6c649b88d..b7819527470f 100644 --- a/sw/source/core/docnode/threadmanager.cxx +++ b/sw/source/core/docnode/threadmanager.cxx @@ -147,7 +147,7 @@ void ThreadManager::RemoveThread( const oslInterlockedCount nThreadID, } else { - OSL_ENSURE( false, "<ThreadManager::RemoveThread(..)> - ThreadJoiner already gone!" ); + OSL_FAIL( "<ThreadManager::RemoveThread(..)> - ThreadJoiner already gone!" ); } } @@ -200,7 +200,7 @@ bool ThreadManager::StartThread( const tThreadData& rThreadData ) } else { - OSL_ENSURE( false, "<ThreadManager::StartThread(..)> - ThreadJoiner already gone!" ); + OSL_FAIL( "<ThreadManager::StartThread(..)> - ThreadJoiner already gone!" ); } } else diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 8fc684ede084..94fb6973120e 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -291,20 +291,20 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible, { if ( !_pDrawObj ) { - OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing object!" ); + OSL_FAIL( "SwDrawContact::_MoveObjToLayer(..) - no drawing object!" ); return; } if ( !pRegisteredIn ) { - OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing frame format!" ); + OSL_FAIL( "SwDrawContact::_MoveObjToLayer(..) - no drawing frame format!" ); return; } const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess(); if ( !pIDDMA ) { - OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no writer document!" ); + OSL_FAIL( "SwDrawContact::_MoveObjToLayer(..) - no writer document!" ); return; } @@ -874,7 +874,7 @@ void SwDrawContact::SetMaster( SdrObject* _pNewMaster ) if ( _pNewMaster ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "debug notification - master replaced!" ); + OSL_FAIL( "debug notification - master replaced!" ); #endif maAnchoredDrawObj.SetDrawObj( *_pNewMaster ); } @@ -900,8 +900,7 @@ const SwFrm* SwDrawContact::GetAnchorFrm( const SdrObject* _pDrawObj ) const } else { - OSL_ENSURE( false, - "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ); + OSL_FAIL( "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ); } return pAnchorFrm; @@ -1269,8 +1268,7 @@ class NestedUserCallHdl if ( bTmpAssert ) { - OSL_ENSURE( false, - "<SwDrawContact::_Changed(..)> - unknown nested <UserCall> event. This is serious, please inform OD." ); + OSL_FAIL( "<SwDrawContact::_Changed(..)> - unknown nested <UserCall> event. This is serious, please inform OD." ); } } } @@ -1325,8 +1323,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj, { if ( mbDisconnectInProgress ) { - OSL_ENSURE( false, - "<SwDrawContact::_Changed(..)> - Insert event during disconnection from layout is invalid." ); + OSL_FAIL( "<SwDrawContact::_Changed(..)> - Insert event during disconnection from layout is invalid." ); } else { @@ -1462,8 +1459,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj, break; default: { - OSL_ENSURE( false, - "<SwDrawContact::_Changed(..)> - unsupported layout direction" ); + OSL_FAIL( "<SwDrawContact::_Changed(..)> - unsupported layout direction" ); } } SfxItemSet aSet( GetFmt()->GetDoc()->GetAttrPool(), @@ -1663,8 +1659,7 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) #if OSL_DEBUG_LEVEL > 1 else { - OSL_ENSURE( false, - "<SwDrawContact::Modify(..)> - unhandled attribute? - please inform od@openoffice.org" ); + OSL_FAIL( "<SwDrawContact::Modify(..)> - unhandled attribute? - please inform od@openoffice.org" ); } #endif } @@ -1851,8 +1846,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) // *no* connect to layout during disconnection from layout. if ( mbDisconnectInProgress ) { - OSL_ENSURE( false, - "<SwDrawContact::ConnectToLayout(..)> called during disconnection."); + OSL_FAIL( "<SwDrawContact::ConnectToLayout(..)> called during disconnection."); return; } @@ -1860,7 +1854,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) // object isn't inserted in the drawing page if ( !GetMaster()->IsInserted() ) { - OSL_ENSURE( false, "<SwDrawContact::ConnectToLayout(..)> - master drawing object not inserted -> no connect to layout. Please inform od@openoffice.org" ); + OSL_FAIL( "<SwDrawContact::ConnectToLayout(..)> - master drawing object not inserted -> no connect to layout. Please inform od@openoffice.org" ); return; } // <-- @@ -2063,8 +2057,7 @@ void SwDrawContact::ChkPage() { if ( mbDisconnectInProgress ) { - OSL_ENSURE( false, - "<SwDrawContact::ChkPage()> called during disconnection." ); + OSL_FAIL( "<SwDrawContact::ChkPage()> called during disconnection." ); return; } diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx index 3daa75a03fda..714c4e860240 100644 --- a/sw/source/core/draw/drawdoc.cxx +++ b/sw/source/core/draw/drawdoc.cxx @@ -224,8 +224,7 @@ uno::Reference< uno::XInterface > SwDrawDocument::createUnoModel() } catch( uno::RuntimeException& ) { - OSL_ENSURE( false, - "<SwDrawDocument::createUnoModel()> - could *not* retrieve model at <SwDocShell>" ); + OSL_FAIL( "<SwDrawDocument::createUnoModel()> - could *not* retrieve model at <SwDocShell>" ); } return xModel; diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 6520d8741c66..4e186427f8dd 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -239,7 +239,7 @@ void SwDrawView::AddCustomHdl() SwFrmFmt* pFrmFmt( ::FindFrmFmt( pObj ) ); if ( !pFrmFmt ) { - OSL_ENSURE( false, "<SwDrawView::AddCustomHdl()> - missing frame format!" ); + OSL_FAIL( "<SwDrawView::AddCustomHdl()> - missing frame format!" ); return; } const SwFmtAnchor &rAnchor = pFrmFmt->GetAnchor(); @@ -967,8 +967,7 @@ void SwDrawView::CheckPossibilities() SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) ); if ( !pFrmFmt ) { - OSL_ENSURE( false, - "<SwDrawView::CheckPossibilities()> - missing frame format" ); + OSL_FAIL( "<SwDrawView::CheckPossibilities()> - missing frame format" ); bProtect = TRUE; } else if ((FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId()) && diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index a52df2837da4..9933df39c824 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -641,8 +641,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd ) } else { - OSL_ENSURE( false, - "<SwSetExpFieldType::SetChapter(..)> - text node with numbering rule, but without number. This is a serious defect -> inform OD" ); + OSL_FAIL( "<SwSetExpFieldType::SetChapter(..)> - text node with numbering rule, but without number. This is a serious defect -> inform OD" ); } } } diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index c8e17bfcbad7..dc0159a29618 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1014,8 +1014,7 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const SwFrm* pCurrFrm( GetCurrFrm() ); if ( !pCurrFrm ) { - OSL_ENSURE( false, - "<SwFEShell::GetFlyFrmAttr(..)> - missing current frame. This is a serious defect, please inform OD." ); + OSL_FAIL( "<SwFEShell::GetFlyFrmAttr(..)> - missing current frame. This is a serious defect, please inform OD." ); return sal_False; } pFly = GetCurrFrm()->FindFlyFrm(); @@ -1739,8 +1738,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const SwDrawContact* pDrawContact( dynamic_cast<SwDrawContact*>(GetUserCall( pInvestigatedObj ) ) ); if ( !pDrawContact ) { - OSL_ENSURE( false, - "<SwFEShell::GetObjCntType(..)> - missing draw contact object" ); + OSL_FAIL( "<SwFEShell::GetObjCntType(..)> - missing draw contact object" ); eType = OBJCNT_NONE; } else @@ -1748,8 +1746,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const SwFrmFmt* pFrmFmt( pDrawContact->GetFmt() ); if ( !pFrmFmt ) { - OSL_ENSURE( false, - "<SwFEShell::GetObjCntType(..)> - missing frame format" ); + OSL_FAIL( "<SwFEShell::GetObjCntType(..)> - missing frame format" ); eType = OBJCNT_NONE; } else if ( FLY_AS_CHAR != pFrmFmt->GetAnchor().GetAnchorId() ) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 70a6cbcace85..8570ba213574 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2248,8 +2248,7 @@ bool SwFEShell::IsGroupAllowed() const SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) ); if ( !pFrmFmt ) { - OSL_ENSURE( false, - "<SwFEShell::IsGroupAllowed()> - missing frame format" ); + OSL_FAIL( "<SwFEShell::IsGroupAllowed()> - missing frame format" ); bIsGroupAllowed = false; } else if ( FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() ) diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 6acae2fb5e0d..cc78e2060a9b 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -1220,23 +1220,20 @@ BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const SdrObject* pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); if ( !pObj ) { - OSL_ENSURE( false, - "<SwFEShell::IsFrmVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation, please inform OD" ); + OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation, please inform OD" ); return bVert; } // #i26791# SwContact* pContact = static_cast<SwContact*>(GetUserCall( pObj )); if ( !pContact ) { - OSL_ENSURE( false, - "<SwFEShell::IsFrmVertical(..)> - missing SwContact instance at marked object -> This is a serious situation, please inform OD" ); + OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing SwContact instance at marked object -> This is a serious situation, please inform OD" ); return bVert; } const SwFrm* pRef = pContact->GetAnchoredObj( pObj )->GetAnchorFrm(); if ( !pRef ) { - OSL_ENSURE( false, - "<SwFEShell::IsFrmVertical(..)> - missing anchor frame at marked object -> This is a serious situation, please inform OD" ); + OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing anchor frame at marked object -> This is a serious situation, please inform OD" ); return bVert; } diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 3963a9c46e5d..43320270641f 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -306,7 +306,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, const SwTabFrm* pStartTab = pStart->FindTabFrm(); if ( !pStartTab ) { - OSL_ENSURE( false, "GetTblSel without start table" ); + OSL_FAIL( "GetTblSel without start table" ); return; } @@ -466,7 +466,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, // been deleted due to the formatting of the table: if ( aDelCheck.HasBeenDeleted() ) { - OSL_ENSURE( false, "Current box has been deleted during GetTblSel()" ); + OSL_FAIL( "Current box has been deleted during GetTblSel()" ); break; } // <-- @@ -1841,7 +1841,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, if ( !pStart || !pEnd ) { - OSL_ENSURE( false, "MakeSelUnions with pStart or pEnd not in CellFrm" ); + OSL_FAIL( "MakeSelUnions with pStart or pEnd not in CellFrm" ); return; } diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index a3f83f25783e..9ad221c52e82 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -472,7 +472,7 @@ short SwGrfNode::SwapIn( BOOL bWaitForData ) catch ( uno::Exception& ) { // --> OD 2005-04-25 #i48434# - OSL_ENSURE( false, "<SwGrfNode::SwapIn(..)> - unhandled exception!" ); + OSL_FAIL( "<SwGrfNode::SwapIn(..)> - unhandled exception!" ); // <-- } // <-- @@ -745,7 +745,7 @@ void SwGrfNode::DelStreamName() catch ( uno::Exception& ) { // --> OD 2005-04-25 #i48434# - OSL_ENSURE( false, "<SwGrfNode::DelStreamName()> - unhandled exception!" ); + OSL_FAIL( "<SwGrfNode::DelStreamName()> - unhandled exception!" ); // <-- } } @@ -824,7 +824,7 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf( } else { - OSL_ENSURE( false, "<SwGrfNode::_GetStreamForEmbedGrf(..)> - embedded graphic file not found!" ); + OSL_FAIL( "<SwGrfNode::_GetStreamForEmbedGrf(..)> - embedded graphic file not found!" ); } } @@ -868,8 +868,7 @@ void SwGrfNode::_GetStreamStorageNames( String& rStrmName, } else { - OSL_ENSURE( false, - "<SwGrfNode::_GetStreamStorageNames(..)> - unknown graphic URL type. Code for handling 3.1 - 5.2 storages has been deleted by issue i53025." ); + OSL_FAIL( "<SwGrfNode::_GetStreamStorageNames(..)> - unknown graphic URL type. Code for handling 3.1 - 5.2 storages has been deleted by issue i53025." ); } OSL_ENSURE( STRING_NOTFOUND == rStrmName.Search( '/' ), "invalid graphic stream name" ); @@ -903,7 +902,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const catch ( uno::Exception& ) { // --> OD 2005-04-25 #i48434# - OSL_ENSURE( false, "<SwGrfNode::MakeCopy(..)> - unhandled exception!" ); + OSL_FAIL( "<SwGrfNode::MakeCopy(..)> - unhandled exception!" ); // <-- } // <-- @@ -995,7 +994,7 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj ) catch ( uno::Exception& ) { // --> OD 2005-04-25 #i48434# - OSL_ENSURE( false, "<SwapGraphic> - unhandled exception!" ); + OSL_FAIL( "<SwapGraphic> - unhandled exception!" ); // <-- } // <-- @@ -1127,8 +1126,7 @@ void SwGrfNode::TriggerAsyncRetrieveInputStream() { if ( !IsLinkedFile() ) { - OSL_ENSURE( false, - "<SwGrfNode::TriggerAsyncLoad()> - Method is misused. Method call is only valid for graphic nodes, which refer a linked graphic file" ); + OSL_FAIL( "<SwGrfNode::TriggerAsyncLoad()> - Method is misused. Method call is only valid for graphic nodes, which refer a linked graphic file" ); return; } diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 7888a8e136ae..18a1c5809152 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -304,8 +304,7 @@ void SwAnchoredDrawObject::MakeObjPos() // to anchor frame if ( mbNotYetAttachedToAnchorFrame ) { - OSL_ENSURE( false, - "<SwAnchoredDrawObject::MakeObjPos() - drawing object not yet attached to anchor frame -> no positioning" ); + OSL_FAIL( "<SwAnchoredDrawObject::MakeObjPos() - drawing object not yet attached to anchor frame -> no positioning" ); return; } @@ -376,7 +375,7 @@ void SwAnchoredDrawObject::MakeObjPos() break; default: { - OSL_ENSURE( false, "<SwAnchoredDrawObject::MakeObjPos()> - unknown anchor type - please inform OD." ); + OSL_FAIL( "<SwAnchoredDrawObject::MakeObjPos()> - unknown anchor type - please inform OD." ); } } @@ -837,8 +836,7 @@ void SwAnchoredDrawObject::_SetPositioningAttr() break; default: { - OSL_ENSURE( false, - "<SwAnchoredDrawObject::_SetPositioningAttr()> - unsupported layout direction" ); + OSL_FAIL( "<SwAnchoredDrawObject::_SetPositioningAttr()> - unsupported layout direction" ); } } } diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index c7a035c2de9a..d33b6e009753 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -689,8 +689,7 @@ const SwRect& SwAnchoredObject::GetObjRectWithSpaces() const if ( mbObjRectWithSpacesValid && maLastObjRect != GetObjRect() ) { - OSL_ENSURE( false, - "<SwAnchoredObject::GetObjRectWithSpaces> - cache for object rectangle inclusive spaces marked as valid, but it couldn't be. Missing invalidation of cache. Please inform OD." ); + OSL_FAIL( "<SwAnchoredObject::GetObjRectWithSpaces> - cache for object rectangle inclusive spaces marked as valid, but it couldn't be. Missing invalidation of cache. Please inform OD." ); InvalidateObjRectWithSpaces(); } if ( !mbObjRectWithSpacesValid ) diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index d482fc20f430..0b88e9ec52c9 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -3166,8 +3166,7 @@ void SwDrawFrmFmt::SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir ) break; default: { - OSL_ENSURE( false, - "<SwDrawFrmFmt::SetPositionLayoutDir(..)> - invalid attribute value." ); + OSL_FAIL( "<SwDrawFrmFmt::SetPositionLayoutDir(..)> - invalid attribute value." ); } } } diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 9e9f5142de22..46fe6108ec1d 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1447,7 +1447,7 @@ void SwCntntFrm::MakeAll() #if OSL_DEBUG_LEVEL > 1 else { - OSL_ENSURE( false, "debug assertion: <SwCntntFrm::MakeAll()> - format of text frame suppressed by fix b6448963" ); + OSL_FAIL( "debug assertion: <SwCntntFrm::MakeAll()> - format of text frame suppressed by fix b6448963" ); } #endif // <-- @@ -1751,7 +1751,7 @@ void SwCntntFrm::MakeAll() } #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "LoopControl in SwCntntFrm::MakeAll" ); + OSL_FAIL( "LoopControl in SwCntntFrm::MakeAll" ); #endif } if ( bMovedBwd && GetUpper() ) @@ -2055,7 +2055,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, // doesn't makes sense. Thus, return TRUE. if ( IsAnFollow( pFrm ) && !pFrm->IsValid() ) { - OSL_ENSURE( false, "Only a warning for task 108824:/n<SwCntntFrm::_WouldFit(..) - follow not valid!" ); + OSL_FAIL( "Only a warning for task 108824:/n<SwCntntFrm::_WouldFit(..) - follow not valid!" ); return TRUE; } } diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 8dc16dbd6f3a..01dd8482f18a 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -2526,8 +2526,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat ) { pNewUpper = 0L; #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, - "<SwFlowFrm::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" ); + OSL_FAIL( "<SwFlowFrm::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" ); #endif } } diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 2d6b652a3a2a..b239d8b0c378 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -1598,8 +1598,7 @@ void CalcCntnt( SwLayoutFrm *pLay, bAgain = true; if ( pAgainObj2 == pAnchoredObj ) { - OSL_ENSURE( false, - "::CalcCntnt(..) - loop detected, perform attribute changes to avoid the loop" ); + OSL_FAIL( "::CalcCntnt(..) - loop detected, perform attribute changes to avoid the loop" ); //Oszillation unterbinden. SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); SwFmtSurround aAttr( rFmt.GetSurround() ); @@ -1683,7 +1682,7 @@ void CalcCntnt( SwLayoutFrm *pLay, continue; #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "LoopControl in CalcCntnt" ); + OSL_FAIL( "LoopControl in CalcCntnt" ); #endif } } @@ -2174,8 +2173,7 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) { if ( !_rNewObj.ISA(SwAnchoredDrawObject) ) { - OSL_ENSURE( false, - "SwFrm::AppendDrawObj(..) - anchored object of unexcepted type -> object not appended" ); + OSL_FAIL( "SwFrm::AppendDrawObj(..) - anchored object of unexcepted type -> object not appended" ); return; } @@ -2601,7 +2599,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour, // during paint. Thus, return (value of <bRet> should be <FALSE>). if ( pGrfNd && _bForPaint ) { - OSL_ENSURE( false, "SwFlyFrm::GetContour() - No Contour found at <SwNoTxtNode> during paint." ); + OSL_FAIL( "SwFlyFrm::GetContour() - No Contour found at <SwNoTxtNode> during paint." ); return bRet; } pNd->CreateContour(); diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index eac2ef869f69..6dff05318105 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -497,8 +497,7 @@ void SwFlyAtCntFrm::MakeAll() pFmt->UnlockModify(); bOsz = false; #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, - "<SwFlyAtCntFrm::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" ); + OSL_FAIL( "<SwFlyAtCntFrm::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" ); #endif } } diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index bcf3e64fc7f0..bc008c768a66 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -869,8 +869,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) { if ( !_rNewObj.ISA(SwAnchoredDrawObject) ) { - OSL_ENSURE( false, - "SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexcepted type -> object not appended" ); + OSL_FAIL( "SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexcepted type -> object not appended" ); return; } @@ -921,8 +920,7 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ) { if ( !_rToRemoveObj.ISA(SwAnchoredDrawObject) ) { - OSL_ENSURE( false, - "SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexcepted type -> object not removed" ); + OSL_FAIL( "SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexcepted type -> object not removed" ); return; } @@ -1046,8 +1044,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove ) const SwFrm* pVertPosOrientFrm = pFly->GetVertPosOrientFrm(); if ( !pVertPosOrientFrm ) { - OSL_ENSURE( false, - "::CalcClipRect(..) - frame, vertical position is oriented at, is missing ."); + OSL_FAIL( "::CalcClipRect(..) - frame, vertical position is oriented at, is missing ."); pVertPosOrientFrm = pFly->GetAnchorFrm(); } @@ -1264,7 +1261,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove ) const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj ); if( !pAnchorFrm ) { - OSL_ENSURE( false, "<::CalcClipRect(..)> - missing anchor frame." ); + OSL_FAIL( "<::CalcClipRect(..)> - missing anchor frame." ); ((SwDrawContact*)pC)->ConnectToLayout(); pAnchorFrm = pC->GetAnchorFrm(); } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 14f0811ddf5f..1c2e866e133b 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -396,8 +396,7 @@ SwFrmNotify::~SwFrmNotify() } else { - OSL_ENSURE( false, - "<SwCntntNotify::~SwCntntNotify()> - unknown anchored object type. Please inform OD." ); + OSL_FAIL( "<SwCntntNotify::~SwCntntNotify()> - unknown anchored object type. Please inform OD." ); } } } @@ -1023,7 +1022,7 @@ SwCntntNotify::~SwCntntNotify() { if (FLY_AT_PAGE == rAnch.GetAnchorId()) { - OSL_ENSURE( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." ); + OSL_FAIL( "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." ); SwFmtAnchor aAnch( rAnch ); aAnch.SetAnchor( 0 ); aAnch.SetPageNum( pPage->GetPhyPageNum() ); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index e7a26f21b049..36cff8b6a06e 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -693,7 +693,7 @@ void SwLayAction::InternalAction() if ( ++nLoopControlRuns_1 > nLoopControlMax ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "LoopControl_1 in SwLayAction::InternalAction" ); + OSL_FAIL( "LoopControl_1 in SwLayAction::InternalAction" ); #endif break; @@ -888,7 +888,7 @@ void SwLayAction::InternalAction() if ( ++nLoopControlRuns_3 > nLoopControlMax ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "LoopControl_3 in Interrupt formatting in SwLayAction::InternalAction" ); + OSL_FAIL( "LoopControl_3 in Interrupt formatting in SwLayAction::InternalAction" ); #endif break; } @@ -913,7 +913,7 @@ void SwLayAction::InternalAction() if ( ++nLoopControlRuns_2 > nLoopControlMax ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "LoopControl_2 in Interrupt formatting in SwLayAction::InternalAction" ); + OSL_FAIL( "LoopControl_2 in Interrupt formatting in SwLayAction::InternalAction" ); #endif break; } @@ -2232,7 +2232,7 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly ) !SwSmartTagMgr::Get().IsSmartTagsEnabled() ) return FALSE; break; - default: OSL_ENSURE( false, "Unknown idle job type" ); + default: OSL_FAIL( "Unknown idle job type" ); } SwPageFrm *pPage; diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index a8c48ab3bc0b..ad63752f50ae 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -286,7 +286,7 @@ void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTxtFrm& rFrm ) if ( pLooping && pLooping->IsLoopingLouieLight() ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "Looping Louie (Light): Fixating fractious frame" ); + OSL_FAIL( "Looping Louie (Light): Fixating fractious frame" ); #endif SwLayouter::InsertMovedFwdFrm( rDoc, rFrm, rFrm.FindPageFrm()->GetPhyPageNum() ); } diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index c29dca15183c..0d1f57285a76 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -191,8 +191,7 @@ SwObjectFormatter* SwObjectFormatter::CreateObjFormatter( } else { - OSL_ENSURE( false, - "<SwObjectFormatter::CreateObjFormatter(..)> - unexcepted type of anchor frame" ); + OSL_FAIL( "<SwObjectFormatter::CreateObjFormatter(..)> - unexcepted type of anchor frame" ); } return pObjFormatter; @@ -409,7 +408,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj ) if ( ++nLoopControlRuns >= nLoopControlMax ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "LoopControl in SwObjectFormatter::_FormatObj: Stage 3!!!" ); + OSL_FAIL( "LoopControl in SwObjectFormatter::_FormatObj: Stage 3!!!" ); #endif rFlyFrm.ValidateThisAndAllLowers( 2 ); nLoopControlRuns = 0; diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx b/sw/source/core/layout/objectformatterlayfrm.cxx index b8c0086fb542..80fc372eb2f6 100644 --- a/sw/source/core/layout/objectformatterlayfrm.cxx +++ b/sw/source/core/layout/objectformatterlayfrm.cxx @@ -61,8 +61,7 @@ SwObjectFormatterLayFrm* SwObjectFormatterLayFrm::CreateObjFormatter( if ( !_rAnchorLayFrm.IsPageFrm() && !_rAnchorLayFrm.IsFlyFrm() ) { - OSL_ENSURE( false, - "<SwObjectFormatterLayFrm::CreateObjFormatter(..)> - unexcepted type of anchor frame " ); + OSL_FAIL( "<SwObjectFormatterLayFrm::CreateObjFormatter(..)> - unexcepted type of anchor frame " ); return 0L; } @@ -130,8 +129,7 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage() { if ( !GetAnchorFrm().IsPageFrm() ) { - OSL_ENSURE( false, - "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - mis-usage of method, call only for anchor frames of type page frame" ); + OSL_FAIL( "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - mis-usage of method, call only for anchor frames of type page frame" ); return true; } diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index fee9741455c8..a3593f5cc479 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -232,8 +232,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, } else { - OSL_ENSURE( false, - "<SwObjectFormatterTxtFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTxtFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); } } } @@ -289,8 +288,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, } else { - OSL_ENSURE( false, - "<SwObjectFormatterTxtFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTxtFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); } } } @@ -327,8 +325,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs() else { // the anchor text frame has to be valid, thus assert. - OSL_ENSURE( false, - "<SwObjectFormatterTxtFrm::DoFormatObjs()> called for invalidate anchor text frame." ); + OSL_FAIL( "<SwObjectFormatterTxtFrm::DoFormatObjs()> called for invalidate anchor text frame." ); } return false; @@ -422,8 +419,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs() } else { - OSL_ENSURE( false, - "<SwObjectFormatterTxtFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTxtFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); } } } @@ -464,8 +460,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs() } else { - OSL_ENSURE( false, - "<SwObjectFormatterTxtFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTxtFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); } } // #i40155# - mark anchor frame not to wrap around diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index f3d1b4760f1e..9c21e3ec2a4c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3412,7 +3412,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh ) // OD 02.07.2003 #108784# - debug assert if ( !pObj->ISA(SdrObjGroup) ) { - OSL_ENSURE( false, "<SwFlyFrm::IsPaint(..)> - paint of drawing object without anchor frame!?" ); + OSL_FAIL( "<SwFlyFrm::IsPaint(..)> - paint of drawing object without anchor frame!?" ); } } } diff --git a/sw/source/core/layout/sortedobjsimpl.cxx b/sw/source/core/layout/sortedobjsimpl.cxx index 10ed749e840b..dc81c71f0355 100644 --- a/sw/source/core/layout/sortedobjsimpl.cxx +++ b/sw/source/core/layout/sortedobjsimpl.cxx @@ -67,7 +67,7 @@ SwAnchoredObject* SwSortedObjsImpl::operator[]( sal_uInt32 _nIndex ) if ( _nIndex >= Count() ) { - OSL_ENSURE( false, "<SwSortedObjsImpl::operator[]> - index out of range" ); + OSL_FAIL( "<SwSortedObjsImpl::operator[]> - index out of range" ); } else { @@ -220,8 +220,7 @@ bool SwSortedObjsImpl::Insert( SwAnchoredObject& _rAnchoredObj ) { // list already contains object #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, - "<SwSortedObjsImpl::Insert()> - already contains object" ); + OSL_FAIL( "<SwSortedObjsImpl::Insert()> - already contains object" ); #endif return true; } @@ -250,8 +249,7 @@ bool SwSortedObjsImpl::Remove( SwAnchoredObject& _rAnchoredObj ) // object not found. bRet = false; #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, - "<SwSortedObjsImpl::Remove()> - object not found" ); + OSL_FAIL( "<SwSortedObjsImpl::Remove()> - object not found" ); #endif } else @@ -275,8 +273,7 @@ bool SwSortedObjsImpl::Update( SwAnchoredObject& _rAnchoredObj ) if ( !Contains( _rAnchoredObj ) ) { // given anchored object not found in list - OSL_ENSURE( false, - "<SwSortedObjsImpl::Update(..) - sorted list doesn't contain given anchored object" ); + OSL_FAIL( "<SwSortedObjsImpl::Update(..) - sorted list doesn't contain given anchored object" ); return false; } diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 115219ebfbad..8a45fc4e0dde 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1576,7 +1576,7 @@ bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeav } #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "LoopControl in lcl_CalcLowers" ); + OSL_FAIL( "LoopControl in lcl_CalcLowers" ); #endif } } @@ -2665,7 +2665,7 @@ void SwTabFrm::MakeAll() #if OSL_DEBUG_LEVEL > 1 else { - OSL_ENSURE( false, "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" ); + OSL_FAIL( "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" ); } #endif // <-- @@ -4997,8 +4997,7 @@ BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva ) } else { - OSL_ENSURE( false, - "<lcl_ArrangeLowers(..)> - unknown type of anchored object!" ); + OSL_FAIL( "<lcl_ArrangeLowers(..)> - unknown type of anchored object!" ); } } } diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index a5f0a95e6aca..d16f10b8c95e 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -54,7 +54,7 @@ sal_Bool SwCntntFrm::WouldFit( SwTwips &, sal_Bool&, sal_Bool ) bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const { - OSL_ENSURE( false, "Don't call this function at the base class!" ); + OSL_FAIL( "Don't call this function at the base class!" ); return false; } diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 34d70f5e1056..be12cde92712 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -300,8 +300,7 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues( } else { - OSL_ENSURE( false, - "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); + OSL_FAIL( "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); } } break; @@ -315,16 +314,14 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues( } else { - OSL_ENSURE( false, - "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); + OSL_FAIL( "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); } } break; // no break here, because text::RelOrientation::CHAR is invalid, if !mbAnchorToChar default: { - OSL_ENSURE( false, - "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); + OSL_FAIL( "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); } } @@ -381,8 +378,7 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( break; default: { - OSL_ENSURE( false, - "<SwAnchoredObjectPosition::_GetVertRelPos(..) - invalid vertical positioning" ); + OSL_FAIL( "<SwAnchoredObjectPosition::_GetVertRelPos(..) - invalid vertical positioning" ); } } @@ -869,8 +865,7 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( if ( !GetAnchorFrm().ISA(SwTxtFrm) || !GetAnchoredObj().ISA(SwFlyAtCntFrm) ) { - OSL_ENSURE( false, - "<SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(..) - usage for wrong anchor type" ); + OSL_FAIL( "<SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(..) - usage for wrong anchor type" ); return _nProposedRelPosX; } diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index aae24cfada4b..4711b70b8cbb 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -305,8 +305,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() } else { - OSL_ENSURE( false, - "<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." ); + OSL_FAIL( "<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." ); } } break; @@ -325,8 +324,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() } else { - OSL_ENSURE( false, - "<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." ); + OSL_FAIL( "<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." ); } } break; @@ -366,8 +364,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() } else { - OSL_ENSURE( false, - "<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." ); + OSL_FAIL( "<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." ); } } break; @@ -686,7 +683,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() else { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( false, "<SwToCntntAnchoredObjectPosition::CalcPosition()> - code under investigation by OD, please inform OD about this assertion!" ); + OSL_FAIL( "<SwToCntntAnchoredObjectPosition::CalcPosition()> - code under investigation by OD, please inform OD about this assertion!" ); #endif nRelDiff = nRelPosY; nRelPosY = 0; diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index b13c4a2bbf84..c301d06b4f07 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -130,7 +130,7 @@ void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, USHORT n ++nCheck; if( rLine.GetTabBoxes().Count() < nCheck ) { // robust - OSL_ENSURE( false, "Box out of table line" ); + OSL_FAIL( "Box out of table line" ); nCheck = rLine.GetTabBoxes().Count(); } @@ -178,7 +178,7 @@ long lcl_Box2LeftBorder( const SwTableBox& rBox ) return nLeft; nLeft += pBox->GetFrmFmt()->GetFrmSize().GetWidth(); } - OSL_ENSURE( false, "Box not found in own upper?" ); + OSL_FAIL( "Box not found in own upper?" ); return nLeft; } @@ -215,7 +215,7 @@ SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine ) } nCurrLeft += pBox->GetFrmFmt()->GetFrmSize().GetWidth(); } - OSL_ENSURE( false, "Didn't found wished box" ); + OSL_FAIL( "Didn't found wished box" ); return 0; } diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 140042c40d45..f13e38719ce1 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -395,7 +395,7 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld, } } else { - OSL_ENSURE( false, "Rounding error" ); + OSL_FAIL( "Rounding error" ); } nSum += nBox; } diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index 30e5b231f50a..ebc44c68e987 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -365,7 +365,7 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase, pSdrObj = GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm ); if ( !pSdrObj ) { - OSL_ENSURE( false, "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm )>" ); + OSL_FAIL( "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm )>" ); pSdrObj = GetDrawContact()->GetMaster(); } // --> OD 2007-11-29 #i65798# diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index b893c19e3bc4..458d48381412 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -389,7 +389,7 @@ sal_Bool SwTxtFrm::IsHiddenNow() const if( !Frm().Width() && IsValid() && GetUpper()->IsValid() ) //bei Stackueberlauf (StackHack) invalid! { -// OSL_ENSURE( false, "SwTxtFrm::IsHiddenNow: thin frame" ); +// OSL_FAIL( "SwTxtFrm::IsHiddenNow: thin frame" ); return sal_True; } @@ -601,8 +601,7 @@ void SwTxtFrm::HideAndShowObjects() } else { - OSL_ENSURE( false, - "<SwTxtFrm::HideAndShowObjects()> - object not anchored at/inside paragraph!?" ); + OSL_FAIL( "<SwTxtFrm::HideAndShowObjects()> - object not anchored at/inside paragraph!?" ); } } } diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 2e53caee2fa5..56209442d31e 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -812,7 +812,7 @@ void MetaField::GetPrefixAndSuffix( getPrefixAndSuffix(xModel, xMetaField, o_pPrefix, o_pSuffix); } } catch (uno::Exception) { - OSL_ENSURE(false, "exception?"); + OSL_FAIL("exception?"); } } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index d802640c54b4..f94f708a0c6a 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1840,8 +1840,7 @@ void SwTxtNode::CutText( SwTxtNode * const pDest, } else { - OSL_ENSURE(false, - "mst: entering dead and bitrotted code; fasten your seatbelts!"); + OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!"); EraseText( rStart, nLen ); } } @@ -1852,8 +1851,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, { if(!pDest) { - OSL_ENSURE(false, - "mst: entering dead and bitrotted code; fasten your seatbelts!"); + OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!"); EraseText( rStart, nLen ); return; } @@ -1861,8 +1859,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, // nicht im Dokument verschieben ? if( GetDoc() != pDest->GetDoc() ) { - OSL_ENSURE(false, - "mst: entering dead and bitrotted code; fasten your seatbelts!"); + OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!"); CopyText( pDest, rDestStart, rStart, nLen); EraseText(rStart, nLen); return; @@ -1883,8 +1880,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, // wird in sich selbst verschoben, muss es gesondert behandelt werden !! if( pDest == this ) { - OSL_ENSURE(false, - "mst: entering dead and bitrotted code; fasten your seatbelts!"); + OSL_FAIL("mst: entering dead and bitrotted code; fasten your seatbelts!"); m_Text.Insert( m_Text, nTxtStartIdx, nLen, nDestStart ); m_Text.Erase( nTxtStartIdx + (nDestStart<nTxtStartIdx ? nLen : 0), nLen ); @@ -3642,8 +3638,7 @@ void SwTxtNode::SetAttrListLevel( int nLevel ) { if ( nLevel < 0 || nLevel >= MAXLEVEL ) { - OSL_ENSURE( false, - "<SwTxtNode::SetAttrListLevel()> - value of parameter <nLevel> is out of valid range" ); + OSL_FAIL( "<SwTxtNode::SetAttrListLevel()> - value of parameter <nLevel> is out of valid range" ); return; } @@ -3832,8 +3827,7 @@ void SwTxtNode::AddToList() { if ( IsInList() ) { - OSL_ENSURE( false, - "<SwTxtNode::AddToList()> - the text node is already added to a list. Serious defect -> please inform OD" ); + OSL_FAIL( "<SwTxtNode::AddToList()> - the text node is already added to a list. Serious defect -> please inform OD" ); return; } @@ -4079,8 +4073,7 @@ XubString SwTxtNode::GetLabelFollowedBy() const break; default: { - OSL_ENSURE( false, - "<SwTxtNode::GetLabelFollowedBy()> - unknown SvxNumberFormat::GetLabelFollowedBy() return value" ); + OSL_FAIL( "<SwTxtNode::GetLabelFollowedBy()> - unknown SvxNumberFormat::GetLabelFollowedBy() return value" ); } } } diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 6271d01402ce..29d7362705a2 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -251,7 +251,7 @@ MakeTxtAttrNesting(SwTxtNode & rNode, SwTxtAttrNesting & rNesting, break; } default: - OSL_ENSURE(false, "MakeTxtAttrNesting: what the hell is that?"); + OSL_FAIL("MakeTxtAttrNesting: what the hell is that?"); break; } return static_cast<SwTxtAttrNesting*>(pNew); @@ -408,7 +408,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) static_cast<SwTxtAttrNesting*>(pOther)); break; default: - OSL_ENSURE(false, "bad code monkey"); + OSL_FAIL("bad code monkey"); break; } } @@ -424,8 +424,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) { if (rNewHint.HasDummyChar()) { - OSL_ENSURE(false, - "ERROR: inserting duplicate CH_TXTATR hint"); + OSL_FAIL("ERROR: inserting duplicate CH_TXTATR hint"); return false; } else if (nNewEnd < nOtherEnd) { // other has dummy char, new is inside other, but @@ -480,7 +479,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) case POS_OUTSIDE: case POS_EQUAL: { - OSL_ENSURE(false, "existing hint inside new hint: why?"); + OSL_FAIL("existing hint inside new hint: why?"); } break; case POS_OVERLAP_BEFORE: @@ -492,7 +491,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) { if ( USHRT_MAX == Count() ) { - OSL_ENSURE(false, "hints array full :-("); + OSL_FAIL("hints array full :-("); return false; } SwTxtAttrNesting * const pOtherLeft( @@ -511,7 +510,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) { if ( USHRT_MAX == Count() ) { - OSL_ENSURE(false, "hints array full :-("); + OSL_FAIL("hints array full :-("); return false; } SwTxtAttrNesting * const pOtherRight( @@ -529,7 +528,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) if ( USHRT_MAX - SplitNew.size() <= Count() ) { - OSL_ENSURE(false, "hints array full :-("); + OSL_FAIL("hints array full :-("); return false; } @@ -981,7 +980,7 @@ SwTxtAttr* MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem & rAttr ) case RES_CHRATR_BACKGROUND: break; default: - OSL_ENSURE(false, "unsupported redline attribute"); + OSL_FAIL("unsupported redline attribute"); break; } @@ -1501,7 +1500,7 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr ) { if ( !HasHints() ) { - OSL_ENSURE(false, "DeleteAttribute called, but text node without hints?"); + OSL_FAIL("DeleteAttribute called, but text node without hints?"); return; } @@ -1548,7 +1547,7 @@ void SwTxtNode::DeleteAttributes( const USHORT nWhich, { if ( nWhich == RES_CHRATR_HIDDEN ) { - OSL_ENSURE(false, "hey, that's a CHRATR! how did that get in?"); + OSL_FAIL("hey, that's a CHRATR! how did that get in?"); SetCalcHiddenCharFlags(); } else if ( nWhich == RES_TXTATR_CHARFMT ) @@ -1711,8 +1710,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt, { if ( nEnd != nStt && !pNew->GetEnd() ) { - OSL_ENSURE(false, - "Attribut without end, but area marked"); + OSL_FAIL("Attribut without end, but area marked"); DestroyAttr( pNew ); // do not insert } else if ( InsertHint( pNew, nMode ) ) @@ -2587,7 +2585,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode, { if ( USHRT_MAX == Count() ) // we're sorry, this flight is overbooked... { - OSL_ENSURE(false, "hints array full :-("); + OSL_FAIL("hints array full :-("); return false; } @@ -3049,7 +3047,7 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr ) break; default: - OSL_ENSURE(false, "GetCharOfTxtAttr: unknown attr"); + OSL_FAIL("GetCharOfTxtAttr: unknown attr"); break; } return cRet; diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 75937025a42e..500b2b9463d4 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -263,8 +263,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) // if the PaM isn't a valid one for cross-reference bookmarks. if (!m_pImpl->m_pRegisteredBookmark) { - OSL_ENSURE(false, - "<SwXBookmark::attachToRange(..)>" + OSL_FAIL("<SwXBookmark::attachToRange(..)>" " - could not create Mark."); throw lang::IllegalArgumentException(); } @@ -479,8 +478,7 @@ SwXBookmark::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXBookmark::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXBookmark::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -490,8 +488,7 @@ SwXBookmark::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXBookmark::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXBookmark::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -501,8 +498,7 @@ SwXBookmark::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXBookmark::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXBookmark::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -512,8 +508,7 @@ SwXBookmark::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXBookmark::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXBookmark::removeVetoableChangeListener(): not implemented"); } /****************************************************************** diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 168904e21952..2f2b33b2b13d 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -243,8 +243,7 @@ public: break; default: { - OSL_ENSURE( false, - "<SwShapeDescriptor_Impl::SetPositionLayoutDir(..)> - invalid attribute value." ); + OSL_FAIL( "<SwShapeDescriptor_Impl::SetPositionLayoutDir(..)> - invalid attribute value." ); } } } @@ -362,8 +361,7 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj ) } else { - OSL_ENSURE( false, - "<SwFmDrawPage::_CreateShape(..)> - could not retrieve type. Thus, no shape created." ); + OSL_FAIL( "<SwFmDrawPage::_CreateShape(..)> - could not retrieve type. Thus, no shape created." ); return xRet; } DBG_ASSERT( eType != FLYCNTTYPE_ALL, "unexpected FlyCntType value for eType" ); @@ -2436,8 +2434,7 @@ awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos, break; default: { - OSL_ENSURE( false, - "<SwXShape::_ConvertPositionToHoriL2R(..)> - unsupported layout direction" ); + OSL_FAIL( "<SwXShape::_ConvertPositionToHoriL2R(..)> - unsupported layout direction" ); } } } diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 1e6f98b63496..cae953c93edb 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -598,8 +598,7 @@ SwXFootnote::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXFootnote::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXFootnote::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -609,8 +608,7 @@ SwXFootnote::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXFootnote::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXFootnote::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -620,8 +618,7 @@ SwXFootnote::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXFootnote::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXFootnote::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -631,8 +628,7 @@ SwXFootnote::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXFootnote::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXFootnote::removeVetoableChangeListener(): not implemented"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index b59fdb0a680e..6d08f5f0cec2 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1237,8 +1237,7 @@ SwXDocumentIndex::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndex::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndex::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1248,8 +1247,7 @@ SwXDocumentIndex::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndex::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndex::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1259,8 +1257,7 @@ SwXDocumentIndex::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndex::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndex::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -1270,8 +1267,7 @@ SwXDocumentIndex::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndex::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndex::removeVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -1577,7 +1573,7 @@ public: try { InsertTOXMark(rTOXType, rMark, rPam, 0); } catch (...) { - OSL_ENSURE(false, "ReplaceTOXMark() failed!"); + OSL_FAIL("ReplaceTOXMark() failed!"); m_ListenerContainer.Disposing(); throw; } @@ -2333,8 +2329,7 @@ SwXDocumentIndexMark::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndexMark::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndexMark::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -2344,8 +2339,7 @@ SwXDocumentIndexMark::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndexMark::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndexMark::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -2355,8 +2349,7 @@ SwXDocumentIndexMark::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndexMark::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndexMark::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -2366,8 +2359,7 @@ SwXDocumentIndexMark::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXDocumentIndexMark::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXDocumentIndexMark::removeVetoableChangeListener(): not implemented"); } /****************************************************************** diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index da8b10875528..732ee5a6892a 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2241,8 +2241,7 @@ SwXTextCursor::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextCursor::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXTextCursor::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -2252,8 +2251,7 @@ SwXTextCursor::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextCursor::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXTextCursor::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -2263,8 +2261,7 @@ SwXTextCursor::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextCursor::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXTextCursor::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -2274,8 +2271,7 @@ SwXTextCursor::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextCursor::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXTextCursor::removeVetoableChangeListener(): not implemented"); } beans::PropertyState SAL_CALL diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 43ed04c6f8d4..dc6893d1416e 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1430,8 +1430,7 @@ SwXTextRange::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextRange::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXTextRange::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1441,8 +1440,7 @@ SwXTextRange::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextRange::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXTextRange::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1452,8 +1450,7 @@ SwXTextRange::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextRange::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXTextRange::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -1463,8 +1460,7 @@ SwXTextRange::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextRange::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXTextRange::removeVetoableChangeListener(): not implemented"); } beans::PropertyState SAL_CALL diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 5f76a68d2cb8..a48f4bf2c3f8 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -514,16 +514,14 @@ void SAL_CALL SwXParagraph::addPropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw (uno::RuntimeException) { - OSL_ENSURE(false, - "SwXParagraph::addPropertiesChangeListener(): not implemented"); + OSL_FAIL("SwXParagraph::addPropertiesChangeListener(): not implemented"); } void SAL_CALL SwXParagraph::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw (uno::RuntimeException) { - OSL_ENSURE(false, - "SwXParagraph::removePropertiesChangeListener(): not implemented"); + OSL_FAIL("SwXParagraph::removePropertiesChangeListener(): not implemented"); } void SAL_CALL SwXParagraph::firePropertiesChangeEvent( @@ -531,8 +529,7 @@ void SAL_CALL SwXParagraph::firePropertiesChangeEvent( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw(uno::RuntimeException) { - OSL_ENSURE(false, - "SwXParagraph::firePropertiesChangeEvent(): not implemented"); + OSL_FAIL("SwXParagraph::firePropertiesChangeEvent(): not implemented"); } /* disabled for #i46921# */ @@ -821,8 +818,7 @@ SwXParagraph::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXParagraph::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXParagraph::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -832,8 +828,7 @@ SwXParagraph::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXParagraph::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXParagraph::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -843,8 +838,7 @@ SwXParagraph::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXParagraph::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXParagraph::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -854,8 +848,7 @@ SwXParagraph::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXParagraph::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXParagraph::removeVetoableChangeListener(): not implemented"); } beans::PropertyState lcl_SwXParagraph_getPropertyState( diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 47fe012a2b5f..a056b8033148 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -335,7 +335,7 @@ lcl_ExportFieldMark( pUnoCrsr->Right(1, CRSR_SKIP_CHARS, FALSE, FALSE); if ( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() ) { - OSL_ENSURE(false, "cannot move cursor?"); + OSL_FAIL("cannot move cursor?"); return 0; } @@ -384,7 +384,7 @@ lcl_ExportFieldMark( } else { - OSL_ENSURE(false, "no fieldmark found?"); + OSL_FAIL("no fieldmark found?"); } return xRef; } @@ -676,7 +676,7 @@ lcl_ExportHints( PortionList_t Top = rPortionStack.top(); if (Top.second != pAttr) { - OSL_ENSURE(false, "ExportHints: stack error" ); + OSL_FAIL("ExportHints: stack error" ); } else { @@ -1114,7 +1114,7 @@ lcl_CreatePortions( bCursorMoved, nNextAttrIndex); if (PortionStack.empty()) { - OSL_ENSURE(false, "CreatePortions: stack underflow"); + OSL_FAIL("CreatePortions: stack underflow"); return; } } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 4e1ee831739e..1e8863b1ab68 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -499,8 +499,7 @@ void SAL_CALL SwXReferenceMark::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXReferenceMark::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXReferenceMark::addPropertyChangeListener(): not implemented"); } void SAL_CALL SwXReferenceMark::removePropertyChangeListener( @@ -509,8 +508,7 @@ void SAL_CALL SwXReferenceMark::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXReferenceMark::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXReferenceMark::removePropertyChangeListener(): not implemented"); } void SAL_CALL SwXReferenceMark::addVetoableChangeListener( @@ -519,8 +517,7 @@ void SAL_CALL SwXReferenceMark::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXReferenceMark::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXReferenceMark::addVetoableChangeListener(): not implemented"); } void SAL_CALL SwXReferenceMark::removeVetoableChangeListener( @@ -529,8 +526,7 @@ void SAL_CALL SwXReferenceMark::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXReferenceMark::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXReferenceMark::removeVetoableChangeListener(): not implemented"); } #include <com/sun/star/lang/DisposedException.hpp> @@ -569,9 +565,9 @@ public: // XInterface virtual void SAL_CALL acquire() throw() - { OSL_ENSURE(false, "ERROR: SwXMetaText::acquire"); } + { OSL_FAIL("ERROR: SwXMetaText::acquire"); } virtual void SAL_CALL release() throw() - { OSL_ENSURE(false, "ERROR: SwXMetaText::release"); } + { OSL_FAIL("ERROR: SwXMetaText::release"); } // XTypeProvider virtual uno::Sequence< sal_Int8 > SAL_CALL @@ -769,7 +765,7 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta, // ??? is this necessary? if (pXMeta->m_pImpl->m_xParentText.get() != i_xParent.get()) { - OSL_ENSURE(false, "SwXMeta with different parent?"); + OSL_FAIL("SwXMeta with different parent?"); pXMeta->m_pImpl->m_xParentText.set(i_xParent); } } @@ -1064,7 +1060,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) } if (!pTxtAttr) { - OSL_ENSURE(false, "meta inserted, but has no text attribute?"); + OSL_FAIL("meta inserted, but has no text attribute?"); throw uno::RuntimeException( C2S("SwXMeta::attach(): cannot create meta"), static_cast< ::cppu::OWeakObject* >(this)); @@ -1491,8 +1487,7 @@ SwXMetaField::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXMetaField::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXMetaField::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1502,8 +1497,7 @@ SwXMetaField::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXMetaField::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXMetaField::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1513,8 +1507,7 @@ SwXMetaField::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXMetaField::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXMetaField::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -1524,8 +1517,7 @@ SwXMetaField::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXMetaField::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXMetaField::removeVetoableChangeListener(): not implemented"); } #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index eff988c98f19..f32d78f2641d 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1315,16 +1315,14 @@ void SAL_CALL SwXTextSection::addPropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw (uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextSection::addPropertiesChangeListener(): not implemented"); + OSL_FAIL("SwXTextSection::addPropertiesChangeListener(): not implemented"); } void SAL_CALL SwXTextSection::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw (uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextSection::removePropertiesChangeListener(): not implemented"); + OSL_FAIL("SwXTextSection::removePropertiesChangeListener(): not implemented"); } void SAL_CALL SwXTextSection::firePropertiesChangeEvent( @@ -1332,8 +1330,7 @@ void SAL_CALL SwXTextSection::firePropertiesChangeEvent( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw(uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextSection::firePropertiesChangeEvent(): not implemented"); + OSL_FAIL("SwXTextSection::firePropertiesChangeEvent(): not implemented"); } void SAL_CALL @@ -1343,8 +1340,7 @@ SwXTextSection::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextSection::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXTextSection::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1354,8 +1350,7 @@ SwXTextSection::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextSection::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXTextSection::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1365,8 +1360,7 @@ SwXTextSection::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextSection::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXTextSection::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -1376,8 +1370,7 @@ SwXTextSection::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXTextSection::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXTextSection::removeVetoableChangeListener(): not implemented"); } beans::PropertyState SAL_CALL diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 83871ab8abad..b982cb8d8388 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3659,11 +3659,11 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle( } catch (beans::UnknownPropertyException &) { - OSL_ENSURE( false, "Unknown property" ); + OSL_FAIL( "Unknown property" ); } catch (lang::IllegalArgumentException &) { - OSL_ENSURE( false, "Illegal argument" ); + OSL_FAIL( "Illegal argument" ); } } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index cfcb43228ba0..3822fce8f238 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1064,7 +1064,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV eDir = FRMDIR_VERT_TOP_RIGHT; break; default: - OSL_ENSURE( false, "unknown direction code, maybe its a bitfield"); + OSL_FAIL( "unknown direction code, maybe its a bitfield"); } SvxFrameDirectionItem aItem( eDir, RES_FRAMEDIR); pBox->GetFrmFmt()->SetFmtAttr(aItem); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 974712f44994..eb6461ea692b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1199,8 +1199,7 @@ SwXText::addPropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXText::addPropertyChangeListener(): not implemented"); + OSL_FAIL("SwXText::addPropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1210,8 +1209,7 @@ SwXText::removePropertyChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXText::removePropertyChangeListener(): not implemented"); + OSL_FAIL("SwXText::removePropertyChangeListener(): not implemented"); } void SAL_CALL @@ -1221,8 +1219,7 @@ SwXText::addVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXText::addVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXText::addVetoableChangeListener(): not implemented"); } void SAL_CALL @@ -1232,8 +1229,7 @@ SwXText::removeVetoableChangeListener( throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, - "SwXText::removeVetoableChangeListener(): not implemented"); + OSL_FAIL("SwXText::removeVetoableChangeListener(): not implemented"); } const uno::Sequence< sal_Int8 > & SwXText::getUnoTunnelId() diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx index a4260ed63d19..cc43a30ccfc6 100644 --- a/sw/source/core/unocore/unotextmarkup.cxx +++ b/sw/source/core/unocore/unotextmarkup.cxx @@ -127,7 +127,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup( } else { - OSL_ENSURE( false, "Unknown mark-up type" ); + OSL_FAIL( "Unknown mark-up type" ); return; } diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 3e2ebf6b6788..e9bcc5df18cd 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -815,7 +815,7 @@ bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove( { if ( _nHoriMove != 0 && _nVertMove != 0 ) { - OSL_ENSURE( false, "missing implementation for moving preview selected page horizontal AND vertical"); + OSL_FAIL( "missing implementation for moving preview selected page horizontal AND vertical"); return false; } diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 2656b9bd84c2..aa5a0f5b3fcf 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -74,7 +74,7 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions { if ( !IsPreView() ) { - OSL_ENSURE( false, "view shell doesn't belongs to a page preview - no adjustment of its view options"); + OSL_FAIL( "view shell doesn't belongs to a page preview - no adjustment of its view options"); return; } diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index 4ae6c12afc62..6677e82e7299 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -883,8 +883,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, } else { - OSL_ENSURE( false, - "<OutHTML_NumBulListStart(..) - text node has no number." ); + OSL_FAIL( "<OutHTML_NumBulListStart(..) - text node has no number." ); } } if( nStartVal != 1 ) diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 3bda70b247a3..4d35499bb2ca 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -233,7 +233,7 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, SwCntntNode* pCNode = aStt.GetNode().GetCntntNode(); if( !pCNode && 0 == ( pCNode = pNds->GoNext( &aStt )) ) { - OSL_ENSURE( false, "An StartPos kein ContentNode mehr" ); + OSL_FAIL( "An StartPos kein ContentNode mehr" ); } SwPaM* pNew = new SwPaM( aStt ); @@ -242,7 +242,7 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, if( 0 == (pCNode = aStt.GetNode().GetCntntNode()) && 0 == (pCNode = pNds->GoPrevious( &aStt )) ) { - OSL_ENSURE( false, "An StartPos kein ContentNode mehr" ); + OSL_FAIL( "An StartPos kein ContentNode mehr" ); } pCNode->MakeEndIndex( &pNew->GetPoint()->nContent ); pNew->GetPoint()->nNode = aStt; diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx index 17d30d422e07..43c585a3339b 100644 --- a/sw/source/filter/writer/wrt_fn.cxx +++ b/sw/source/filter/writer/wrt_fn.cxx @@ -119,7 +119,7 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt ) nId = RES_OLENODE; break; default: - OSL_ENSURE(false, "was fuer ein Node ist es denn nun?"); + OSL_FAIL("was fuer ein Node ist es denn nun?"); break; } FnNodeOut pOut; diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 64f5aa81f3a9..0920dd5b30c2 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3308,7 +3308,7 @@ void RtfAttributeOutput::FlyFrameOLEData( SwOLENode& rOLENode ) pStream = new SvMemoryStream; Graphic* pGraphic = rOLENode.GetGraphic(); if (GraphicConverter::Export(*pStream, *pGraphic, CVT_WMF) != ERRCODE_NONE) - OSL_ENSURE(false, "failed to export the presentation data"); + OSL_FAIL("failed to export the presentation data"); pStream->Seek(STREAM_SEEK_TO_END); sal_uInt32 nPresentationDataSize = pStream->Tell(); const sal_uInt8* pPresentationData = (sal_uInt8*)pStream->GetData(); @@ -3334,7 +3334,7 @@ void RtfAttributeOutput::FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& const sal_Char* pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; if (GraphicConverter::Export(aStream, *pGraphic, CVT_WMF) != ERRCODE_NONE) - OSL_ENSURE(false, "failed to export the graphic"); + OSL_FAIL("failed to export the graphic"); aStream.Seek(STREAM_SEEK_TO_END); nSize = aStream.Tell(); pGraphicAry = (sal_uInt8*)aStream.GetData(); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index e3cd3c0424c2..fc6dace26520 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2174,8 +2174,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, } break; default: - OSL_ENSURE( false, - "<WinwordAnchoring::ConvertPosition(..)> - unknown horizontal relation" ); + OSL_FAIL( "<WinwordAnchoring::ConvertPosition(..)> - unknown horizontal relation" ); } } // <-- @@ -2287,8 +2286,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, case text::RelOrientation::FRAME_LEFT: case text::RelOrientation::FRAME_RIGHT: default: - OSL_ENSURE( false, - "<WinwordAnchoring::ConvertPosition(..)> - unknown vertical relation" ); + OSL_FAIL( "<WinwordAnchoring::ConvertPosition(..)> - unknown vertical relation" ); } } diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 8e61e2c1dc5f..39388ed403fc 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -351,8 +351,7 @@ void MSWordExportBase::AbstractNumberingDefinitions() default: { nFollow = 0; - OSL_ENSURE( false, - "unknown GetLabelFollowedBy() return value" ); + OSL_FAIL( "unknown GetLabelFollowedBy() return value" ); } } } diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index ab05538128a9..981e9f054119 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3060,7 +3060,7 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) break; default: nVal = 4; - OSL_ENSURE( false, "Unknown vert alignment" ); + OSL_FAIL( "Unknown vert alignment" ); break; } m_rWW8Export.InsUInt16( nVal ); @@ -3648,7 +3648,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid ) switch ( rGrid.GetGridType() ) { default: - OSL_ENSURE(false, "Unknown grid type"); + OSL_FAIL("Unknown grid type"); case GRID_NONE: nGridType = 0; break; @@ -4607,7 +4607,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir { default: //Can't get an unknown type here - OSL_ENSURE(false, "Unknown frame direction"); + OSL_FAIL("Unknown frame direction"); case FRMDIR_HORI_LEFT_TOP: nTextFlow = 0; break; diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 8f02c97302b5..ebd87c894887 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2513,8 +2513,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell break; default: { - OSL_ENSURE( false, - "unknown version." ); + OSL_FAIL( "unknown version." ); } } } diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 736eaa528cd3..6c7ac6b4655e 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2849,7 +2849,7 @@ bool WW8TabDesc::InFirstParaInCell() const //e.g. #i19718# if (!pTabBox || !pTabBox->GetSttNd()) { - OSL_ENSURE(false, "Problem with table"); + OSL_FAIL("Problem with table"); return false; } diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 553a05543514..1f49c2bc5947 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -2683,7 +2683,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt, } break; default: - OSL_ENSURE(false, "sweet god, what have you done!"); + OSL_FAIL("sweet god, what have you done!"); break; } } diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 73cb7f33016f..aea460f20940 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -332,7 +332,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper() // and delete the incomplete ones. Finally, delete it. if( IsReady(pInfo) ) { - OSL_ENSURE(false, "forgotten RedlineInfo; now inserted"); + OSL_FAIL("forgotten RedlineInfo; now inserted"); InsertIntoDocument( pInfo ); } else @@ -341,7 +341,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper() pInfo->bNeedsAdjustment = sal_False; if( IsReady(pInfo) ) { - OSL_ENSURE(false, "RedlineInfo without adjustment; now inserted"); + OSL_FAIL("RedlineInfo without adjustment; now inserted"); InsertIntoDocument( pInfo ); } else @@ -350,7 +350,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper() // (i.e. end without start, or start without // end). This may well be a problem in the file, // rather than the code. - OSL_ENSURE(false, "incomplete redline (maybe file was corrupt); " + OSL_FAIL("incomplete redline (maybe file was corrupt); " "now deleted"); } } @@ -687,7 +687,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo) pRedline->SetContentIdx(pRedlineInfo->pContentIndex); #if OSL_DEBUG_LEVEL > 1 else - OSL_ENSURE( false, "Recursive change tracking" ); + OSL_FAIL( "Recursive change tracking" ); #endif } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 8574fdb697fc..00deda59fa55 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1486,7 +1486,7 @@ void SwXMLImport::SetDocumentSpecificSettings( if ( xLateInitSettings->hasByName( _rSettingsGroupName ) ) { xLateInitSettings->replaceByName( _rSettingsGroupName, makeAny( _rSettings ) ); - OSL_ENSURE( false, "SwXMLImport::SetDocumentSpecificSettings: already have settings for this model!" ); + OSL_FAIL( "SwXMLImport::SetDocumentSpecificSettings: already have settings for this model!" ); } else xLateInitSettings->insertByName( _rSettingsGroupName, makeAny( _rSettings ) ); diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index d3d1647c6fda..4e8929a903b3 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -987,7 +987,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, // #i95726# - Some fault tolerance, if table is somehow corrupted. if ( nCol < nOldCol ) { - OSL_ENSURE( false, "table and/or table information seems to be corrupted." ); + OSL_FAIL( "table and/or table information seems to be corrupted." ); if ( nBox == nBoxes - 1 ) { nCol = rLines.GetColumns().Count() - 1; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index d438fc7862df..40c31395cc44 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2290,7 +2290,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, // #i95726# - some fault tolerance if ( pCell == 0 ) { - OSL_ENSURE( false, "table seems to be corrupt." ); + OSL_FAIL( "table seems to be corrupt." ); break; } // <-- @@ -2668,7 +2668,7 @@ void SwXMLTableContext::MakeTable() // #i97274# handle invalid tables if (!pRows || !pRows->Count() || !GetColumnCount()) { - OSL_ENSURE(false, "invalid table: no cells; deleting..."); + OSL_FAIL("invalid table: no cells; deleting..."); pTableNode->GetDoc()->DeleteSection( pTableNode ); pTableNode = 0; pBox1 = 0; diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 98bcc6c2ccf9..c659b984042d 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -204,7 +204,7 @@ void SwModule::StateOther(SfxItemSet &rSet) IsInsTblFormatNum( bWebView ))); break; default: - OSL_ENSURE(false, "::StateOther: default"); + OSL_FAIL("::StateOther: default"); } nWhich = aIter.NextWhich(); } @@ -304,7 +304,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs { if ( m_pView ) { - OSL_ENSURE(false, "SwMailMergeWizardExecutor::ExecuteMailMergeWizard: Already executing the wizard!" ); + OSL_FAIL("SwMailMergeWizardExecutor::ExecuteMailMergeWizard: Already executing the wizard!" ); return; } diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 37bb82727d36..ffb398048df6 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -823,7 +823,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS { if ( !pOLEChildList->MoveEmbeddedObject( aNames[n-1], GetEmbeddedObjectContainer() ) ) { - OSL_ENSURE(false, "Copying of objects didn't work!" ); + OSL_FAIL("Copying of objects didn't work!" ); } } diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 38c851acf273..ebf29b728f3f 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1296,7 +1296,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } catch(Exception& ) { - OSL_ENSURE(false, "control acces failed"); + OSL_FAIL("control acces failed"); } xFP->setTitle( SW_RESSTR( nStrId )); @@ -1417,7 +1417,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; - default: OSL_ENSURE(false, "wrong Dispatcher"); + default: OSL_FAIL("wrong Dispatcher"); } } diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 7c0d628c24a6..842922f0ee92 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -692,7 +692,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium ) } else { - OSL_ENSURE(false, "Code removed!"); + OSL_FAIL("Code removed!"); } SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 0192ba7f264f..b27675b44d2a 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -251,7 +251,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) break; default: - OSL_ENSURE(false, "Invalid SlotId"); + OSL_FAIL("Invalid SlotId"); } nWhich = aIter.NextWhich(); } @@ -479,7 +479,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) break; default: - OSL_ENSURE(false, "Invalid SlotId"); + OSL_FAIL("Invalid SlotId"); } rReq.Done(); @@ -878,7 +878,7 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily, break; } default: - OSL_ENSURE(false, "Unknown family"); + OSL_FAIL("Unknown family"); } pSh->EndAllAction(); @@ -933,7 +933,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily) break; default: - OSL_ENSURE(false, "Unknown family"); + OSL_FAIL("Unknown family"); } } else diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 318a4d6f6fc8..47f04dd50157 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -408,7 +408,7 @@ void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAva xControllerSelection->select(makeAny(aSelection.createPropertyValueSequence())); } else { - OSL_ENSURE(false, "no selection supplier in the beamer!"); + OSL_FAIL("no selection supplier in the beamer!"); } } } diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index ad34900a6f11..88e6e9c178e7 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -414,7 +414,7 @@ void SwTestAccountSettingsDialog::Test() } catch(uno::Exception&) { - OSL_ENSURE(false, "exception caught"); + OSL_FAIL("exception caught"); } } diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index 5ca25729d4c4..2d25081afb28 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -82,7 +82,7 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption( { if(bHTML) { - OSL_ENSURE(false, "no caption option in sw/web!"); + OSL_FAIL("no caption option in sw/web!"); return 0; } else @@ -105,7 +105,7 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) if(bHTML) { - OSL_ENSURE(false, "no caption option in sw/web!"); + OSL_FAIL("no caption option in sw/web!"); } else if (pOpt) { @@ -188,7 +188,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) nVal -= 'a' - 10; else { - OSL_ENSURE(false, "wrong hex value" ); + OSL_FAIL("wrong hex value" ); bValidData = FALSE; break; } diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index dc79305a2586..3a9106fba4d9 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -436,7 +436,7 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG ) case COPT_EXPAND_WORDSPACE: pItem->m_bExpandWordSpace = bChecked; break; default: { - OSL_ENSURE(false, "SwCompatibilityOptPage::UseAsDefaultHdl(): wrong option" ); + OSL_FAIL("SwCompatibilityOptPage::UseAsDefaultHdl(): wrong option" ); } } } diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 46f4b6c85c5c..fd7104468b1c 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -576,7 +576,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) aAny = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION ); if ( !( aAny >>= sTemp ) ) { - OSL_ENSURE(false, "Couldn't get PRODUCTVERSION variable" ); + OSL_FAIL("Couldn't get PRODUCTVERSION variable" ); } else { @@ -586,7 +586,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) } else { - OSL_ENSURE(false, "Couldn't get PRODUCTNAME variable" ); + OSL_FAIL("Couldn't get PRODUCTNAME variable" ); } SvObjectServerList aObjS; diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index f50bc22b39d2..98b2e81330dc 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -153,7 +153,7 @@ int SwBaseNumRules::Load(SvStream &rStream) // #55402# if(VERSION_40A == nVersion) { - OSL_ENSURE(false, "Version 364 is not clear #55402#"); + OSL_FAIL("Version 364 is not clear #55402#"); } else if( VERSION_30B == nVersion || VERSION_31B == nVersion || ACT_NUM_VERSION >= nVersion ) diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 5dafee39287d..1103f0489234 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -347,7 +347,7 @@ IMPL_LINK(SwAddressListDialog, FilterHdl_Impl, PushButton*, EMPTYARG) } catch(Exception& ) { - OSL_ENSURE(false, "exception caught in SwAddressListDialog::FilterHdl_Impl"); + OSL_FAIL("exception caught in SwAddressListDialog::FilterHdl_Impl"); } } } @@ -647,7 +647,7 @@ void SwAddressListDialog::DetectTablesAndQueries( } catch(Exception& ) { - OSL_ENSURE(false, "exception caught in SwAddressListDialog::DetectTablesAndQueries"); + OSL_FAIL("exception caught in SwAddressListDialog::DetectTablesAndQueries"); m_aOK.Enable( sal_False ); } } diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 10080cd67c0b..2308bd790e58 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -354,7 +354,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, } catch(const Exception& ) { - OSL_ENSURE(false, "illegal number format key"); + OSL_FAIL("illegal number format key"); } } } @@ -1184,7 +1184,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE(false, ByteString(String(aExcept.Message), gsl_getSystemTextEncoding()).GetBuffer()); + OSL_FAIL(ByteString(String(aExcept.Message), gsl_getSystemTextEncoding()).GetBuffer()); #endif } } diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index fa7ef50db5da..783da8b1b9a0 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -281,7 +281,7 @@ BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos) } else { - OSL_ENSURE(false, "no absolute positioning available"); + OSL_FAIL("no absolute positioning available"); } } catch(Exception aExcept) @@ -409,7 +409,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) { pImpl->pMergeData->bEndOfDB = TRUE; pImpl->pMergeData->CheckEndOfDB(); - OSL_ENSURE(false, "exception in MergeNew()"); + OSL_FAIL("exception in MergeNew()"); } uno::Reference<XDataSource> xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,aData.sDataSource); @@ -1150,7 +1150,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, String sMailAddress = GetDBField( xColumnProp, aDBFormat); if(!SwMailMergeHelper::CheckMailAddress( sMailAddress )) { - OSL_ENSURE(false, "invalid e-Mail address in database column"); + OSL_FAIL("invalid e-Mail address in database column"); } else { @@ -1404,7 +1404,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName, } catch(Exception&) { - OSL_ENSURE(false, "Exception in getColumns()"); + OSL_FAIL("Exception in getColumns()"); } if(!xCols.is() || !xCols->hasByName(rColNm)) return nRet; @@ -1493,14 +1493,14 @@ ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource, } catch(const Exception&) { - OSL_ENSURE(false, "illegal number format key"); + OSL_FAIL("illegal number format key"); } } } } catch( const Exception& ) { - OSL_ENSURE(false, "no FormatKey property found"); + OSL_FAIL("no FormatKey property found"); } if(bUseDefault) nRet = SwNewDBMgr::GetDbtoolsClient().getDefaultNumberFormat(xColumn, xDocNumberFormatTypes, aLocale); @@ -1617,7 +1617,7 @@ uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Refe } catch( const uno::Exception& ) { - OSL_ENSURE(false, "Exception in SwDBMgr::GetColumnSupplier"); + OSL_FAIL("Exception in SwDBMgr::GetColumnSupplier"); } return xRet; @@ -1684,7 +1684,7 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps, } catch(Exception& ) { - OSL_ENSURE(false, "exception caught"); + OSL_FAIL("exception caught"); } } @@ -2384,7 +2384,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, if(!sDataSource.getLength() || !sDataTableOrQuery.getLength()) { - OSL_ENSURE(false, "PropertyValues missing or unset"); + OSL_FAIL("PropertyValues missing or unset"); return; } @@ -2539,7 +2539,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh, } if(!sDataSource.getLength() || !sDataTableOrQuery.getLength() || !xResSet.is()) { - OSL_ENSURE(false, "PropertyValues missing or unset"); + OSL_FAIL("PropertyValues missing or unset"); return; } uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); @@ -2575,7 +2575,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh, } catch(Exception& ) { - OSL_ENSURE(false, "exception caught"); + OSL_FAIL("exception caught"); } } delete pDlg; @@ -2610,7 +2610,7 @@ uno::Reference<XDataSource> SwNewDBMgr::getDataSourceAsParent(const uno::Referen } catch(const Exception&) { - OSL_ENSURE(false, "exception in getDataSourceAsParent caught"); + OSL_FAIL("exception in getDataSourceAsParent caught"); } return xSource; } @@ -2650,7 +2650,7 @@ uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat } catch(const Exception&) { - OSL_ENSURE(false,"Caught exception while creating a new RowSet!"); + OSL_FAIL("Caught exception while creating a new RowSet!"); } return xResultSet; } @@ -2690,7 +2690,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, { pImpl->pMergeData->bEndOfDB = TRUE; pImpl->pMergeData->CheckEndOfDB(); - OSL_ENSURE(false, "exception in MergeNew()"); + OSL_FAIL("exception in MergeNew()"); } //bCancel is set from the PrintMonitor @@ -2903,7 +2903,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, catch( Exception& rEx) { (void)rEx; - OSL_ENSURE(false, "exception caught in SwNewDBMgr::MergeDocuments"); + OSL_FAIL("exception caught in SwNewDBMgr::MergeDocuments"); } DELETEZ(pImpl->pMergeData); bInMerge = FALSE; diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 0b1a06511172..9ea589a7143a 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -525,7 +525,7 @@ void SwSendMailDialog::SendMails() { if(!m_pConfigItem) { - OSL_ENSURE(false, "config item not set"); + OSL_FAIL("config item not set"); return; } String sErrorMessage; @@ -540,7 +540,7 @@ void SwSendMailDialog::SendMails() LeaveWait(); if(!bIsLoggedIn) { - OSL_ENSURE(false, "create error message"); + OSL_FAIL("create error message"); return; } m_pImpl->xMailDispatcher.set( new MailDispatcher(xSmtpServer)); diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx index 9b8152822df6..473321b2d9de 100644 --- a/sw/source/ui/dbui/mailmergehelper.cxx +++ b/sw/source/ui/dbui/mailmergehelper.cxx @@ -175,7 +175,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer( } catch(uno::Exception& ) { - OSL_ENSURE(false, "exception caught"); + OSL_FAIL("exception caught"); } return xSmtpServer; } @@ -541,7 +541,7 @@ String SwAddressPreview::FillData( } catch( sdbc::SQLException& ) { - OSL_ENSURE(false, "SQLException caught"); + OSL_FAIL("SQLException caught"); } } } diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 33ea1c257bb8..b9eb521f26c7 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -303,7 +303,7 @@ void SwMailMergeWizard::updateRoadmapItemLabel( WizardState _nState ) short SwMailMergeWizard::Execute() { - OSL_ENSURE(false, "SwMailMergeWizard cannot be executed via Dialog::Execute!\n" + OSL_FAIL("SwMailMergeWizard cannot be executed via Dialog::Execute!\n" "It creates a thread (MailDispatcher instance) that will call" "back to VCL apartment => deadlock!\n" "Use Dialog::StartExecuteModal to execute the dialog!" ); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index b7e09c80b870..be144c9cd2af 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -884,7 +884,7 @@ void SwCustomizeAddressBlockDialog::MoveFocus( Window* pMember, bool bNext ) } if( aMemberIter == aControls.end() ) { - OSL_ENSURE(false, "Window not found?" ); + OSL_FAIL("Window not found?" ); return; } diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx index 74a9cc0602fe..70d64a85c4ba 100644 --- a/sw/source/ui/dbui/mmconfigitem.cxx +++ b/sw/source/ui/dbui/mmconfigitem.cxx @@ -445,7 +445,7 @@ void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHeaders) } else { - OSL_ENSURE(false, "parse error in address block or greeting line"); + OSL_FAIL("parse error in address block or greeting line"); } } else @@ -930,7 +930,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const } catch(Exception&) { - OSL_ENSURE(false, "exception caught in xResultSet->SetFilter()"); + OSL_FAIL("exception caught in xResultSet->SetFilter()"); } xRowSet->execute(); m_pImpl->xResultSet = xRowSet.get(); @@ -940,7 +940,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const } catch(Exception& ) { - OSL_ENSURE(false, "exception caught in: SwMailMergeConfigItem::GetResultSet() "); + OSL_FAIL("exception caught in: SwMailMergeConfigItem::GetResultSet() "); } } return m_pImpl->xResultSet; @@ -978,7 +978,7 @@ void SwMailMergeConfigItem::SetFilter(::rtl::OUString& rFilter) } catch(Exception&) { - OSL_ENSURE(false, "exception caught in SwMailMergeConfigItem::SetFilter()"); + OSL_FAIL("exception caught in SwMailMergeConfigItem::SetFilter()"); } } } diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index cb691460ed97..5274f90ee0a4 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -210,7 +210,7 @@ void SwMailMergeGreetingsPage::UpdatePreview() } catch( sdbc::SQLException& ) { - OSL_ENSURE(false, "SQLException caught"); + OSL_FAIL("SQLException caught"); } } } diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index dd3c6a9bf0ea..a8b280b10daf 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1222,7 +1222,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) pInStream->SetStreamCharSet( eEncoding ); else { - OSL_ENSURE(false, "no output file created?"); + OSL_FAIL("no output file created?"); continue; } ByteString sLine; diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index 86ac3c4a3f6a..28196d218516 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -684,7 +684,7 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM case SHELL_MODE_TABLE_TEXT: case SHELL_MODE_TABLE_LIST_TEXT: case SHELL_MODE_DRAWTEXT: - OSL_ENSURE(false, "text already active in SwSpellDialogChildWindow::MakeTextSelection_Impl()"); + OSL_FAIL("text already active in SwSpellDialogChildWindow::MakeTextSelection_Impl()"); break; case SHELL_MODE_FRAME: diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 5264c15df15f..3125d832640e 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -571,7 +571,7 @@ USHORT SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt ) if (pFmt==&rSh.GetSectionFmt(i)) return i; - OSL_ENSURE(false, "SectionFormat not on the list" ); + OSL_FAIL("SectionFormat not on the list" ); return USHRT_MAX; } diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index ff0ec3298e52..b13edbfa26cc 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -1428,7 +1428,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, nActionFlags, bMsg ); break; default: - OSL_ENSURE( false, "unknown format" ); + OSL_FAIL( "unknown format" ); } break; @@ -1467,7 +1467,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, break; default: - OSL_ENSURE(false, "unknown action" ); + OSL_FAIL("unknown action" ); } } diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx index 7dfd298cfd7b..bf74131ea5f4 100644 --- a/sw/source/ui/docvw/AnnotationWin.cxx +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -261,7 +261,7 @@ SvxLanguageItem SwAnnotationWin::GetLanguage(void) case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break; case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; - default: OSL_ENSURE(false, "GetLanguage: wrong script type"); + default: OSL_FAIL("GetLanguage: wrong script type"); } return SvxLanguageItem(mpFld->GetLanguage(),nLangWhichId); } diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index c2f3d9fbb6ac..43a80ad35eeb 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -284,7 +284,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( mpView->GetDocShell() != &rBC ) { // field to be removed is the broadcaster - OSL_ENSURE(false, "Notification for removed SwFmtFld was not sent!"); + OSL_FAIL("Notification for removed SwFmtFld was not sent!"); RemoveItem(&rBC); } break; @@ -314,7 +314,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else { - OSL_ENSURE(false, "Inserted field not in document!" ); + OSL_FAIL("Inserted field not in document!" ); } break; } @@ -430,7 +430,7 @@ bool SwPostItMgr::CalcRects() SwSidebarItem* pItem = (*i); if ( !pItem->UseElement() ) { - OSL_ENSURE(false, "PostIt is not in doc or other wrong use"); + OSL_FAIL("PostIt is not in doc or other wrong use"); bRepair = true; continue; } @@ -743,7 +743,7 @@ void SwPostItMgr::LayoutPostIts() SwSidebarItem* pItem = (*i); if ( !pItem->UseElement() ) { - OSL_ENSURE(false, "PostIt is not in doc!"); + OSL_FAIL("PostIt is not in doc!"); bRepair = true; continue; } @@ -776,7 +776,7 @@ bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const { if ( mPages[aPage-1]->mList->empty() ) { - OSL_ENSURE(false, "Notes SidePane painted but no rects and page lists calculated!"); + OSL_FAIL("Notes SidePane painted but no rects and page lists calculated!"); return false; } @@ -1073,7 +1073,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons // security check so we don't loop forever if (loop>MAX_LOOP_COUNT) { - OSL_ENSURE(false, "PostItMgr::Layout(): We are looping forever"); + OSL_FAIL("PostItMgr::Layout(): We are looping forever"); break; } } @@ -1331,7 +1331,7 @@ long SwPostItMgr::GetNextBorder() } } - OSL_ENSURE(false, "SwPostItMgr::GetNextBorder(): We have to find a next border here"); + OSL_FAIL("SwPostItMgr::GetNextBorder(): We have to find a next border here"); return -1; } @@ -1649,7 +1649,7 @@ IMPL_LINK( SwPostItMgr, CalcHdl, void*, /* pVoid*/ ) mnEventId = 0; if ( mbLayouting ) { - OSL_ENSURE(false, "Reentrance problem in Layout Manager!"); + OSL_FAIL("Reentrance problem in Layout Manager!"); mbWaitingForCalcRects = false; return 0; } diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index 600cce9ec38f..4aeee7624e1c 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -493,8 +493,7 @@ void SwSidebarWin::SetPosAndSize() } break; default: - OSL_ENSURE( false, - "<SwSidebarWin::SetPosAndSize()> - unexpected position of sidebar" ); + OSL_FAIL( "<SwSidebarWin::SetPosAndSize()> - unexpected position of sidebar" ); break; } diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 65e15ba925bd..3aa3d3f1f88f 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -161,8 +161,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) { // what was that? #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE(false, "Token not recognised!"); - OSL_ENSURE(false, ByteString(sToken, gsl_getSystemTextEncoding()).GetBuffer()); + OSL_FAIL("Token not recognised!"); + OSL_FAIL(ByteString(sToken, gsl_getSystemTextEncoding()).GetBuffer()); #endif } diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index 522f5cdf0bfa..ae28dbb70552 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -329,7 +329,7 @@ bool SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const case MID_ENV_SHIFT_RIGHT : rVal <<= lShiftRight; break; case MID_ENV_SHIFT_DOWN : rVal <<= lShiftDown; break; default: - OSL_ENSURE(false, "Wrong memberId"); + OSL_FAIL("Wrong memberId"); bRet = false; } return bRet; @@ -361,7 +361,7 @@ bool SwEnvItem::PutValue(const Any& rVal, BYTE nMemberId) case MID_ENV_SHIFT_RIGHT : bRet = (rVal >>= lShiftRight); break; case MID_ENV_SHIFT_DOWN : bRet = (rVal >>= lShiftDown); break; default: - OSL_ENSURE(false,"Wrong memberId"); + OSL_FAIL("Wrong memberId"); } return bRet; } diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx index ba7df1fcd812..45ceda1bf36c 100644 --- a/sw/source/ui/envelp/labelcfg.cxx +++ b/sw/source/ui/envelp/labelcfg.cxx @@ -229,7 +229,7 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer, { if(!AddNode(OUString(), rManufacturer)) { - OSL_ENSURE(false, "New configuration node could not be created"); + OSL_FAIL("New configuration node could not be created"); return ; } else diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 9d7f80ba2ee8..735d86b7596f 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -143,7 +143,7 @@ void SwXSelChgLstnr_Impl::selectionChanged( const EventObject& ) throw (Runtime void SwXSelChgLstnr_Impl::disposing( const EventObject& ) throw (RuntimeException) { - OSL_ENSURE(false, "disposing"); + OSL_FAIL("disposing"); } SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 041df41192d3..a8107e46cd4f 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -253,7 +253,7 @@ static SwWrtShell* lcl_GetShell() SwView* pView; if ( 0 != (pView = ::GetActiveView()) ) return pView->GetWrtShellPtr(); - OSL_ENSURE(false, "no current shell found!"); + OSL_FAIL("no current shell found!"); return 0; } diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx index 875bc2132616..f7a3152d8bfb 100644 --- a/sw/source/ui/fldui/xfldui.cxx +++ b/sw/source/ui/fldui/xfldui.cxx @@ -127,7 +127,7 @@ BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName, } catch(Exception& ) { - OSL_ENSURE(false, "Exception in getColumns()"); + OSL_FAIL("Exception in getColumns()"); } if(xCols.is() && xCols->hasByName(rFldName)) { diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 16afdf28537e..848b752937cc 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -178,7 +178,7 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG ) } catch(Exception&) { - OSL_ENSURE(false, "::CreateExample() - exception caught"); + OSL_FAIL("::CreateExample() - exception caught"); } return 0; } @@ -472,7 +472,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( } catch(Exception&) { - OSL_ENSURE(false, "::CreateExample() - exception caught"); + OSL_FAIL("::CreateExample() - exception caught"); } } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a354a03dad72..a9697939d96a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1071,7 +1071,7 @@ CurTOXType lcl_UserData2TOXTypes(sal_uInt16 nData) case TO_OBJECT : eRet.eType = TOX_OBJECTS; break; case TO_TABLE : eRet.eType = TOX_TABLES; break; case TO_AUTHORITIES : eRet.eType = TOX_AUTHORITIES; break; - default: OSL_ENSURE(false, "what a type?"); + default: OSL_FAIL("what a type?"); } return eRet; } @@ -1542,7 +1542,7 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) IMPL_LINK(SwTOXSelectTabPage, TOXAreaHdl, ListBox*, pBox) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); switch((long)pBox->GetEntryData( pBox->GetSelectEntryPos() )) { case AREA_DOCUMENT : break; diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx index 1992b910f8bf..0ccd1873b1c7 100644 --- a/sw/source/ui/lingu/hhcwrp.cxx +++ b/sw/source/ui/lingu/hhcwrp.cxx @@ -469,7 +469,7 @@ void SwHHCWrapper::ReplaceUnit( } break; default: - OSL_ENSURE(false, "unexpected case" ); + OSL_FAIL("unexpected case" ); } nUnitOffset += nUnitStart + aNewTxt.getLength(); diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 3f1a83c33ae2..909d1a4380eb 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -299,7 +299,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum) break; #if OSL_DEBUG_LEVEL > 1 default: - OSL_ENSURE(false, "Which numbering type?"); + OSL_FAIL("Which numbering type?"); #endif } aNumCountBox.SelectEntry(sSelect); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index ef57606f405a..627439c35126 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -474,8 +474,7 @@ void SwNumPositionTabPage::InitPosAndSpaceMode() { if ( pActNum == 0 ) { - OSL_ENSURE( false, - "<SwNumPositionTabPage::InitPosAndSpaceMode()> - misusage of method -> <pAktNum> has to be already set!" ); + OSL_FAIL( "<SwNumPositionTabPage::InitPosAndSpaceMode()> - misusage of method -> <pAktNum> has to be already set!" ); return; } diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx index 077f16b12e38..e47bda007b09 100644 --- a/sw/source/ui/misc/numberingtypelistbox.cxx +++ b/sw/source/ui/misc/numberingtypelistbox.cxx @@ -150,7 +150,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType() nRet = (sal_Int16)(ULONG)GetEntryData(nSelPos); #if OSL_DEBUG_LEVEL > 1 else - OSL_ENSURE(false, "SwNumberingTypeListBox not selected"); + OSL_FAIL("SwNumberingTypeListBox not selected"); #endif return nRet; } diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx index d8a95367af7d..324d802fb84d 100644 --- a/sw/source/ui/ribbar/tbxanchr.cxx +++ b/sw/source/ui/ribbar/tbxanchr.cxx @@ -117,7 +117,7 @@ void SwTbxAnchor::Click() } if(!pActiveView) { - OSL_ENSURE(false, "No active view found"); + OSL_FAIL("No active view found"); return; } SwWrtShell* pWrtShell = pActiveView->GetWrtShellPtr(); diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 62c7f0a78afb..77739f37fdf3 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -242,7 +242,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) rSh.DelLeft(); break; default: - OSL_ENSURE(false, "wrong Dispatcher"); + OSL_FAIL("wrong Dispatcher"); return; } rReq.Done(); @@ -406,7 +406,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) } break; default: - OSL_ENSURE(false, "wrong Dispatcher"); + OSL_FAIL("wrong Dispatcher"); return; } if(!bIgnore) @@ -503,7 +503,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq) rSh.Do( SwWrtShell::REPEAT ); break; default: - OSL_ENSURE(false, "wrong Dispatcher"); + OSL_FAIL("wrong Dispatcher"); } if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(sal_False); } @@ -1193,7 +1193,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_PAGE_STYLE_SET_PAPER_SIZE: case FN_PAGE_STYLE_SET_PAPER_BIN: { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } break; @@ -1220,7 +1220,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) } break; default: - OSL_ENSURE(false, "wrong Dispatcher"); + OSL_FAIL("wrong Dispatcher"); } } @@ -2281,7 +2281,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) break; default: rReq.Ignore(); - OSL_ENSURE(false, "unknown message in ExecuteAttr!" ); + OSL_FAIL("unknown message in ExecuteAttr!" ); return; } @@ -2834,7 +2834,7 @@ void SwBaseShell::ExecField( SfxRequest& rReq ) } break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); } } diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 789a77691364..acfaf900c185 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -853,7 +853,7 @@ void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq) break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } } diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index aa82348a74c1..af9dcf6d2a84 100644 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -268,7 +268,7 @@ namespace SwLangHelper case SCRIPTTYPE_COMPLEX : nLangWhichId = pEditEngine ? EE_CHAR_LANGUAGE_CTL : RES_CHRATR_CTL_LANGUAGE; break; default: bIsSingleScriptType = false; - OSL_ENSURE(false, "unexpected case" ); + OSL_FAIL("unexpected case" ); } if (bIsSingleScriptType) { diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 98189839a369..4eb8cb9ae9a4 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -1486,7 +1486,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq) break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index bce16f3bd3fb..ba59cb27656f 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -238,7 +238,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_FORMAT, FALSE, &pItem )) nFormat = ((SfxUInt32Item *)pItem)->GetValue(); - OSL_ENSURE(false, "Command is not yet used"); + OSL_FAIL("Command is not yet used"); sal_Unicode cSeparator = ' '; SwInsertFld_Data aData(nType, 0, aPar1, aPar2, nFormat, GetShellPtr(), cSeparator ); bRes = aFldMgr.InsertFld(aData); @@ -601,7 +601,7 @@ FIELD_INSERT: } break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } } diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx index 25f6a3bc55f4..244e8b7638c0 100644 --- a/sw/source/ui/shells/textglos.cxx +++ b/sw/source/ui/shells/textglos.cxx @@ -129,7 +129,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) } break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } if(bUpdateList) diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 2058b220d68b..2f34f213b983 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -180,7 +180,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) rSh.DontExpandFmt(); break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } } @@ -280,7 +280,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } } @@ -417,7 +417,7 @@ SET_LINESPACE: break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } SwWrtShell& rWrtSh = GetShell(); @@ -516,7 +516,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } } diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx index bf49a339c1c9..eca87db0fea8 100644 --- a/sw/source/ui/shells/txtcrsr.cxx +++ b/sw/source/ui/shells/txtcrsr.cxx @@ -97,7 +97,7 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq) case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break; case FN_LINE_UP: rSh.Up ( bSelect, 1 ); break; case FN_LINE_DOWN: rSh.Down ( bSelect, 1 ); break; - default: OSL_ENSURE(false, "wrong Dispatcher"); return; + default: OSL_FAIL("wrong Dispatcher"); return; } } @@ -134,7 +134,7 @@ void SwTextShell::ExecMove(SfxRequest &rReq) case FN_SELECT_WORD: bRet = rSh.SelNearestWrd(); break; case SID_SELECTALL: bRet = 0 != rSh.SelAll(); break; - default: OSL_ENSURE(false, "wrong dispatcher"); return; + default: OSL_FAIL("wrong dispatcher"); return; } if ( bRet ) @@ -171,7 +171,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq) case FN_END_OF_PAGE_SEL: case FN_END_OF_PAGE: rSh.EndPg ( FN_END_OF_PAGE_SEL == nSlot ); break; - default: OSL_ENSURE(false, "wrong dispatcher"); return; + default: OSL_FAIL("wrong dispatcher"); return; } rReq.Done(); } @@ -188,7 +188,7 @@ void SwTextShell::ExecMoveCol(SfxRequest &rReq) case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( FALSE ); break; case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( FALSE ); break; case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( FALSE ); break; - default: OSL_ENSURE(false, "wrong dispatcher"); return; + default: OSL_FAIL("wrong dispatcher"); return; } rReq.Done(); } @@ -230,7 +230,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq) case FN_PREV_PARA: rSh.BwdPara ( FALSE ); break; - default: OSL_ENSURE(false, "wrong dispatcher"); return; + default: OSL_FAIL("wrong dispatcher"); return; } rReq.Done(); } @@ -348,7 +348,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx index 6e02a3ce73b0..9a0a87c00578 100644 --- a/sw/source/ui/shells/txtnum.cxx +++ b/sw/source/ui/shells/txtnum.cxx @@ -226,7 +226,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) } break; default: - OSL_ENSURE(false, "wrong dispatcher"); + OSL_FAIL("wrong dispatcher"); return; } } diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index 86ab912b2a91..9d5a64cccf91 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -242,7 +242,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) } catch( uno::Exception& ) { - OSL_ENSURE(false, "Chart wizard couldn't be positioned automatically\n" ); + OSL_FAIL("Chart wizard couldn't be positioned automatically\n" ); } } diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx index 2b4ced221b50..4ba208fe3945 100644 --- a/sw/source/ui/table/tablemgr.cxx +++ b/sw/source/ui/table/tablemgr.cxx @@ -313,7 +313,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( else if (nColLen > 1) eDataRowSource = chart::ChartDataRowSource_COLUMNS; else { - OSL_ENSURE(false, "unexpected state" ); + OSL_FAIL("unexpected state" ); } } diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index a0a378d17cc2..96f882aad91d 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1773,7 +1773,7 @@ PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent ) // no longer needed ?? Size SwPagePreView::GetOptimalSizePixel() const { - OSL_ENSURE( false, "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" ); + OSL_FAIL( "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" ); return Size( -1, -1 ); } diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index b4ba13bf2cd5..e55194b0fb14 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -321,7 +321,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) } catch(Exception& ) { - OSL_ENSURE(false, "control acces failed"); + OSL_FAIL("control acces failed"); } SFX_REQUEST_ARG( rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC , sal_False ); @@ -363,7 +363,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) } catch(Exception& ) { - OSL_ENSURE(false, "control access failed"); + OSL_FAIL("control access failed"); } } rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) ); @@ -1488,8 +1488,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) rSh.GotoMark( ppBookmark->get() ); } else - OSL_ENSURE(false, - "SwView::ExecuteStatusLine(..)" + OSL_FAIL("SwView::ExecuteStatusLine(..)" " - Ignoring out of range bookmark index"); } } diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx index 87c20e40c6db..c003cfdcbbc7 100644 --- a/sw/source/ui/uiview/viewcoll.cxx +++ b/sw/source/ui/uiview/viewcoll.cxx @@ -84,7 +84,7 @@ void SwView::ExecColl(SfxRequest &rReq) } break; default: - OSL_ENSURE(false, "wrong CommandProcessor for Dispatch"); + OSL_FAIL("wrong CommandProcessor for Dispatch"); return; } } diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index c7f54401d31e..811cd01f2f1f 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -715,7 +715,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt) aParaText = pNode->GetTxt(); // this may include hidden text but that should be Ok else { - OSL_ENSURE(false, "text node expected but not found" ); + OSL_FAIL("text node expected but not found" ); } bRet = sal_True; diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 01add416cdeb..a432d4a52a87 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -417,7 +417,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) ByteString sStr( "nSlot: " ); sStr += ByteString::CreateFromInt32( nSlot ); sStr += " wrong Dispatcher (viewsrch.cxx)"; - OSL_ENSURE(false, sStr.GetBuffer() ); + OSL_FAIL(sStr.GetBuffer() ); } #endif return; diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 27cb34b6d98d..880a77194c7e 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -259,12 +259,12 @@ namespace acquire(); } else { - OSL_ENSURE(false, "DelayedFileDeletion::DelayedFileDeletion: model is no component!" ); + OSL_FAIL("DelayedFileDeletion::DelayedFileDeletion: model is no component!" ); } } catch( const Exception& ) { - OSL_ENSURE(false, "DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" ); + OSL_FAIL("DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" ); } osl_decrementInterlockedCount( &m_refCount ); } @@ -297,7 +297,7 @@ namespace } catch( const Exception& ) { - OSL_ENSURE(false, "DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" ); + OSL_FAIL("DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" ); bSuccess = sal_True; // can't do anything here ... } @@ -321,7 +321,7 @@ namespace } catch( const Exception & ) { - OSL_ENSURE(false, "DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" ); + OSL_FAIL("DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" ); } m_aDeleteTimer.SetTimeout( 3000 ); // 3 seconds @@ -345,7 +345,7 @@ namespace //-------------------------------------------------------------------- void SAL_CALL DelayedFileDeletion::notifyClosing( const EventObject& ) throw (RuntimeException) { - OSL_ENSURE(false, "DelayedFileDeletion::notifyClosing: how this?" ); + OSL_FAIL("DelayedFileDeletion::notifyClosing: how this?" ); // this should not happen: // Either, a foreign instance closes the document, then we should veto this, and take the ownership // Or, we ourself close the document, then we should not be a listener anymore @@ -354,7 +354,7 @@ namespace //------------------------------------------------------ void SAL_CALL DelayedFileDeletion::disposing( const EventObject& ) throw (RuntimeException) { - OSL_ENSURE(false, "DelayedFileDeletion::disposing: how this?" ); + OSL_FAIL("DelayedFileDeletion::disposing: how this?" ); // this should not happen: // Either, a foreign instance closes the document, then we should veto this, and take the ownership // Or, we ourself close the document, then we should not be a listener anymore @@ -447,7 +447,7 @@ SwXMailMerge::~SwXMailMerge() //! because there is no automatism that will do that later. //! #120086# if ( eVetoed == CloseModelAndDocSh( xModel, xDocSh ) ) - OSL_ENSURE(false, "owner ship transfered to vetoing object!" ); + OSL_FAIL("owner ship transfered to vetoing object!" ); xModel = 0; xDocSh = 0; // destroy doc shell @@ -638,7 +638,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( { if (!aCurDataSourceName.getLength() || !aCurDataCommand.getLength() ) { - OSL_ENSURE(false, "PropertyValues missing or unset"); + OSL_FAIL("PropertyValues missing or unset"); throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Either the ResultSet or DataSourceName and DataCommand must be set." ) ), static_cast < cppu::OWeakObject * > ( this ), 0 ); } @@ -933,7 +933,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( case WID_IN_SERVER_PASSWORD: pData = &sInServerPassword; break; case WID_OUT_SERVER_PASSWORD: pData = &sOutServerPassword; break; default : - OSL_ENSURE(false, "unknown WID"); + OSL_FAIL("unknown WID"); } Any aOld( pData, *pType ); @@ -1022,7 +1022,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( else if(pData == &sOutServerPassword) bOK = rValue >>= sInServerPassword; else { - OSL_ENSURE(false, "invalid pointer" ); + OSL_FAIL("invalid pointer" ); } OSL_ENSURE( bOK, "set value failed" ); bChanged = sal_True; @@ -1086,7 +1086,7 @@ uno::Any SAL_CALL SwXMailMerge::getPropertyValue( case WID_IN_SERVER_PASSWORD: aRet <<= sInServerPassword; break; case WID_OUT_SERVER_PASSWORD: aRet <<= sOutServerPassword; break; default : - OSL_ENSURE(false, "unknown WID"); + OSL_FAIL("unknown WID"); } } @@ -1131,7 +1131,7 @@ void SAL_CALL SwXMailMerge::addVetoableChangeListener( throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { // no vetoable property, thus no support for vetoable change listeners - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL SwXMailMerge::removeVetoableChangeListener( @@ -1140,7 +1140,7 @@ void SAL_CALL SwXMailMerge::removeVetoableChangeListener( throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { // no vetoable property, thus no support for vetoable change listeners - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index d2658ffe93d7..b527cc2920c3 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -246,7 +246,7 @@ Reference< XPropertySet > SwXModule::getViewSettings(void) throw( uno::RuntimeE if(!pxViewSettings) { ((SwXModule*)this)->pxViewSettings = new Reference< XPropertySet > ; - OSL_ENSURE(false, "Web or Text?"); + OSL_FAIL("Web or Text?"); *pxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( sal_False, 0 ) ); } return *pxViewSettings; @@ -258,7 +258,7 @@ Reference< XPropertySet > SwXModule::getPrintSettings(void) throw( uno::Runtime if(!pxPrintSettings) { ((SwXModule*)this)->pxPrintSettings = new Reference< XPropertySet > ; - OSL_ENSURE(false, "Web or Text?"); + OSL_FAIL("Web or Text?"); *pxPrintSettings = static_cast < HelperBaseNoState * > ( new SwXPrintSettings ( PRINT_SETTINGS_MODULE ) ); } return *pxPrintSettings; @@ -936,7 +936,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u nRet = view::DocumentZoomType::PAGE_WIDTH_EXACT; break; default: - OSL_ENSURE(false, "SwXViewSettings: invalid zoom type"); + OSL_FAIL("SwXViewSettings: invalid zoom type"); break; } rValue <<= nRet; @@ -993,7 +993,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u bBool = sal_False; } break; - default: OSL_ENSURE(false, "there is no such ID!"); + default: OSL_FAIL("there is no such ID!"); } if( bBool ) rValue.setValue(&bBoolVal, ::getBooleanCppuType()); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 649c926f1a4f..9c79319ea460 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2165,28 +2165,28 @@ void SwXTextDocument::addPropertyChangeListener(const OUString& /*PropertyName*/ const Reference< XPropertyChangeListener > & /*aListener*/) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } void SwXTextDocument::removePropertyChangeListener(const OUString& /*PropertyName*/, const Reference< XPropertyChangeListener > & /*aListener*/) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } void SwXTextDocument::addVetoableChangeListener(const OUString& /*PropertyName*/, const Reference< XVetoableChangeListener > & /*aListener*/) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } void SwXTextDocument::removeVetoableChangeListener(const OUString& /*PropertyName*/, const Reference< XVetoableChangeListener > & /*aListener*/) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } Reference< XNameAccess > SwXTextDocument::getLinks(void) throw( RuntimeException ) @@ -2434,7 +2434,7 @@ SwDoc * SwXTextDocument::GetRenderDoc( } else { - OSL_ENSURE(false, "unexpected ViewShell" ); + OSL_FAIL("unexpected ViewShell" ); } } } @@ -3511,7 +3511,7 @@ sal_Bool SwXLinkNameAccessWrapper::hasElements(void) throw( RuntimeException ) sal_Bool bRet = sal_False; if(pxDoc) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } else { @@ -3768,7 +3768,7 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich) xRet = xDrawDefaults; break; #if OSL_DEBUG_LEVEL > 1 - default: OSL_ENSURE(false, "which table?"); + default: OSL_FAIL("which table?"); #endif } } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 0a37ea46e477..19bb94210682 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -958,7 +958,7 @@ void SAL_CALL SwXTextView::setPropertyValue( } break; default : - OSL_ENSURE(false, "unknown WID"); + OSL_FAIL("unknown WID"); } } } @@ -1008,7 +1008,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue( } break; default : - OSL_ENSURE(false, "unknown WID"); + OSL_FAIL("unknown WID"); } } @@ -1020,7 +1020,7 @@ void SAL_CALL SwXTextView::addPropertyChangeListener( const uno::Reference< beans::XPropertyChangeListener >& /*rxListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL SwXTextView::removePropertyChangeListener( @@ -1028,7 +1028,7 @@ void SAL_CALL SwXTextView::removePropertyChangeListener( const uno::Reference< beans::XPropertyChangeListener >& /*rxListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL SwXTextView::addVetoableChangeListener( @@ -1036,7 +1036,7 @@ void SAL_CALL SwXTextView::addVetoableChangeListener( const uno::Reference< beans::XVetoableChangeListener >& /*rxListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL SwXTextView::removeVetoableChangeListener( @@ -1044,7 +1044,7 @@ void SAL_CALL SwXTextView::removeVetoableChangeListener( const uno::Reference< beans::XVetoableChangeListener >& /*rxListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } OUString SwXTextView::getImplementationName(void) throw( RuntimeException ) @@ -1108,14 +1108,14 @@ sal_Bool SwXTextViewCursor::IsTextSelection( sal_Bool bAllowTables ) const sal_Bool SwXTextViewCursor::isVisible(void) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); return sal_True; } void SwXTextViewCursor::setVisible(sal_Bool /*bVisible*/) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; - OSL_ENSURE(false, "not implemented"); + OSL_FAIL("not implemented"); } awt::Point SwXTextViewCursor::getPosition(void) throw( uno::RuntimeException ) diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index caa7f7466892..b403de8d0f10 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -219,7 +219,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType) break; default: - OSL_ENSURE(false, "what a format?"); + OSL_FAIL("what a format?"); break; } diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index a4f833645ac1..446ddf775a61 100644 --- a/sw/source/ui/utlui/swrenamexnameddlg.cxx +++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx @@ -104,7 +104,7 @@ IMPL_LINK(SwRenameXNamedDlg, OkHdl, OKButton*, EMPTYARG) } catch(uno::RuntimeException&) { - OSL_ENSURE(false, "name wasn't changed"); + OSL_FAIL("name wasn't changed"); } EndDialog(RET_OK); return 0; diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index da0523464e23..1ba78445d994 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -689,7 +689,7 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent, } else { - OSL_ENSURE(false, "where to get the actual width from?"); + OSL_FAIL("where to get the actual width from?"); } const SvxLRSpaceItem& rLRSpace = pFmt->GetLRSpace(); nWidth -= (rLRSpace.GetRight() + rLRSpace.GetLeft()); diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index a73358739584..28c8ac78816a 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -731,13 +731,13 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, } catch( embed::NoVisualAreaSizeException& ) { - OSL_ENSURE(false, "Can't get visual area size!\n" ); + OSL_FAIL("Can't get visual area size!\n" ); // the scaling will not be done } catch( uno::Exception& ) { // TODO/LATER: handle the error - OSL_ENSURE(false, "Can't get visual area size!\n" ); + OSL_FAIL("Can't get visual area size!\n" ); return; } |