diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-01 19:07:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-02 15:04:37 +0100 |
commit | 65c053ca1a5a8c7318ab1e42cdde2d540a283673 (patch) | |
tree | 2e1a29f5d832ff0cb0d4c095f038392b472459d1 | |
parent | 40afe52c92f340d0fedbb59d1071a542e6fb61e3 (diff) |
Move DBG_ERROR to OSL_FAIL
279 files changed, 850 insertions, 850 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx index 373cf51e2e74..e82261084a70 100644 --- a/basic/source/app/app.cxx +++ b/basic/source/app/app.cxx @@ -239,7 +239,7 @@ int BasicApp::Main( ) DBG_INSTOUTERROR( DBG_OUT_TESTTOOL ); if ( osl_setDebugMessageFunc( osl_TestToolDebugMessageFilter ) ) - DBG_ERROR("osl_setDebugMessageFunc returns non NULL pointer"); + OSL_FAIL("osl_setDebugMessageFunc returns non NULL pointer"); #endif ResMgr::SetReadStringHook( ReplaceStringHookProc ); diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx index 120feafb7fb0..e39d6c8e95b3 100644 --- a/basic/source/app/appwin.cxx +++ b/basic/source/app/appwin.cxx @@ -390,7 +390,7 @@ BOOL AppWin::DiskFileChanged( USHORT nWhat ) // uncomment to avoid compiler warning // break; default: - DBG_ERROR("Not Implemented in AppWin::DiskFileChanged"); + OSL_FAIL("Not Implemented in AppWin::DiskFileChanged"); } return TRUE; } @@ -415,7 +415,7 @@ void AppWin::UpdateFileInfo( USHORT nWhat ) } break; default: - DBG_ERROR("Not Implemented in AppWin::UpdateFileInfo"); + OSL_FAIL("Not Implemented in AppWin::UpdateFileInfo"); } } @@ -590,7 +590,7 @@ USHORT AppWin::QuerySave( QueryBits nBits ) nReturn = SAVE_RES_CANCEL; break; default: - DBG_ERROR("switch default where no default should be: Internal error"); + OSL_FAIL("switch default where no default should be: Internal error"); nReturn = SAVE_RES_CANCEL; } SkipReload( FALSE ); @@ -619,7 +619,7 @@ BOOL AppWin::Close() // uncomment to avoid compiler warning // break; default: - DBG_ERROR("Not Implemented in AppWin::Close"); + OSL_FAIL("Not Implemented in AppWin::Close"); return FALSE; } } diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx index ba2a523944aa..178455cb9e77 100644 --- a/basic/source/app/dialogs.cxx +++ b/basic/source/app/dialogs.cxx @@ -301,7 +301,7 @@ IMPL_LINK( OptionsDialog, ActivatePageHdl, TabControl *, pTabCtrl ) case RID_TP_FON: pNewTabPage = new FontOptions( pTabCtrl, aConfig ); break; - default: DBG_ERROR( "PageHdl: Unbekannte ID!" ); + default: OSL_FAIL( "PageHdl: Unbekannte ID!" ); } DBG_ASSERT( pNewTabPage, "Keine Page!" ); pTabCtrl->SetTabPage( nId, pNewTabPage ); diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx index c6d7b0b8d062..34b59d50ed9b 100644 --- a/basic/source/app/msgedit.cxx +++ b/basic/source/app/msgedit.cxx @@ -167,7 +167,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg ) case LOG_ASSERTION: AddAssertion( aUILogMsg, LogMsg->aDebugData ); break; case LOG_ASSERTION_STACK: AddAssertionStack( aUILogMsg, LogMsg->aDebugData ); break; case LOG_QA_ERROR: AddQAError( aUILogMsg, LogMsg->aDebugData ); break; - default:DBG_ERROR("Unbekannter Typ in ResultFile. Speichern des ResultFile resultiert in Informationsverlust"); + default:OSL_FAIL("Unbekannter Typ in ResultFile. Speichern des ResultFile resultiert in Informationsverlust"); } if ( !bFileLoading ) @@ -486,7 +486,7 @@ String MsgEdit::Impl_MakeText( SvLBoxEntry *pEntry ) const case LOG_ASSERTION: break; case LOG_ASSERTION_STACK:aRet.AppendAscii("--> "); break; case LOG_QA_ERROR: break; - default:DBG_ERROR("Unknown type in ResultWindow!"); + default:OSL_FAIL("Unknown type in ResultWindow!"); } aRet += aEditTree.GetEntryText( pEntry ); return aRet; @@ -584,7 +584,7 @@ void MsgEdit::ReplaceSelected( const String& rStr ) { (void) rStr; /* avoid warning about unused parameter */ Sound::Beep(); - DBG_ERROR("Not Implemented"); + OSL_FAIL("Not Implemented"); } BOOL MsgEdit::IsModified(){ return bModified; } @@ -608,7 +608,7 @@ void MsgEdit::SetText( const String& rStr ) { (void) rStr; /* avoid warning about unused parameter */ Sound::Beep(); - DBG_ERROR("Not Implemented"); + OSL_FAIL("Not Implemented"); } BOOL MsgEdit::HasText() const @@ -916,7 +916,7 @@ TTFeatures TTTreeListBox::GetFeatures( SvLBoxEntry* pEntry ) case LOG_QA_ERROR: return HasQAError; default: - DBG_ERROR("Unknown type in ResultWindow"); + OSL_FAIL("Unknown type in ResultWindow"); } return HasNothing; } diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx index 30d1f7a24038..2891cf5e7a16 100644 --- a/basic/source/app/textedit.cxx +++ b/basic/source/app/textedit.cxx @@ -201,7 +201,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) if ( rLast.nStart > rLast.nEnd ) // Only up to the bug of MD repaired { #if OSL_DEBUG_LEVEL > 1 - DBG_ERROR( "MD-Bug is not repaired!" ); + OSL_FAIL( "MD-Bug is not repaired!" ); #endif nCount--; aPortionList.Remove( nCount); @@ -324,7 +324,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) default: { aColor = Color( RGB_COLORDATA( 0xff, 0x80, 0x80 ) ); - DBG_ERROR( "Unknown syntax color" ); + OSL_FAIL( "Unknown syntax color" ); } } pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1 ); diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index c49ebeeeaa37..2057a065e96c 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -348,7 +348,7 @@ namespace basic if ( pos != m_aCreationListeners.end() ) m_aCreationListeners.erase( pos ); else { - DBG_ERROR( "ImplRepository::revokeCreationListener: listener is not registered!" ); + OSL_FAIL( "ImplRepository::revokeCreationListener: listener is not registered!" ); } } diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 3b798597e168..dde988b50d38 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1460,7 +1460,7 @@ void BasicManager::CheckModules( StarBASIC* pLib, BOOL bReference ) const // cause modified if( !bModified && bReference ) { - DBG_ERROR( "Per Reference eingebundene Basic-Library ist nicht compiliert!" ); + OSL_FAIL( "Per Reference eingebundene Basic-Library ist nicht compiliert!" ); pLib->SetModified( FALSE ); } } diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 9d77913ba60c..5e53bfb49e1b 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -501,7 +501,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) SbMethod* pImplMethod = pIfaceMethod->getImplMethod(); if( !pImplMethod ) { - DBG_ERROR( "No ImplMethod" ); + OSL_FAIL( "No ImplMethod" ); continue; } @@ -511,7 +511,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) SbMethod* pImplMethodCopy = p ? PTR_CAST(SbMethod,p) : NULL; if( !pImplMethodCopy ) { - DBG_ERROR( "Found no ImplMethod copy" ); + OSL_FAIL( "Found no ImplMethod copy" ); continue; } SbIfaceMapperMethod* pNewIfaceMethod = @@ -975,7 +975,7 @@ void SbModule::implProcessModuleRunInit( ClassModuleRunInitItem& rItem ) if( rParentItem.m_bProcessing ) { // TODO: raise error? - DBG_ERROR( "Cyclic module dependency detected" ); + OSL_FAIL( "Cyclic module dependency detected" ); continue; } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 256af0aa47af..9dffcf21361e 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -1743,7 +1743,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, Reference<XIdlClass> xClass = TypeToIdlClass( rType ); if( !xClass.is() ) { - DBG_ERROR("failed to get XIdlClass for type"); + OSL_FAIL("failed to get XIdlClass for type"); break; } ::rtl::OUString sClassName = xClass->getName(); @@ -1839,7 +1839,7 @@ String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj ) else if( xClassProvider.is() ) { - DBG_ERROR( "XClassProvider not supported in UNO3" ); + OSL_FAIL( "XClassProvider not supported in UNO3" ); } } return aRet; diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 064e57ff6c90..19c822553fac 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -237,7 +237,7 @@ void SbiCodeGen::Save() ePropType = SbxOBJECT; break; case PROPERTY_MODE_NONE: - DBG_ERROR( "Illegal PropertyMode PROPERTY_MODE_NONE" ); + OSL_FAIL( "Illegal PropertyMode PROPERTY_MODE_NONE" ); break; } String aPropName = pProc->GetPropName(); diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 5778655406f8..6ab16e1abf19 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -500,7 +500,7 @@ void SbiProcDef::setPropertyMode( PropertyMode ePropMode ) case PROPERTY_MODE_LET: aCompleteProcName.AppendAscii( "Let " ); break; case PROPERTY_MODE_SET: aCompleteProcName.AppendAscii( "Set " ); break; case PROPERTY_MODE_NONE: - DBG_ERROR( "Illegal PropertyMode PROPERTY_MODE_NONE" ); + OSL_FAIL( "Illegal PropertyMode PROPERTY_MODE_NONE" ); break; } aCompleteProcName += aName; diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 3984a03626aa..10990fc9fb39 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -625,7 +625,7 @@ void UCBStream::SetSize( ULONG nSize ) { (void)nSize; - DBG_ERROR( "not allowed to call from basic" ); + OSL_FAIL( "not allowed to call from basic" ); SetError( ERRCODE_IO_GENERAL ); } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 8be35234bf96..d0babeee3d96 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -324,7 +324,7 @@ SbiInstance::~SbiInstance() } catch( const Exception& ) { - DBG_ERROR( "SbiInstance::~SbiInstance: caught an exception while disposing the components!" ); + OSL_FAIL( "SbiInstance::~SbiInstance: caught an exception while disposing the components!" ); } ComponentVector.clear(); diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 15b98a2f1256..6838e68eeeaa 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -624,7 +624,7 @@ BOOL SbxValue::Put( const SbxValues& rVal ) { if ( p != this ) { - DBG_ERROR( "TheRealValue" ); + OSL_FAIL( "TheRealValue" ); } HACK(nicht bei Parent-Prop - sonst CyclicRef) SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index d591398c319a..9c65b6a5f2b8 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1163,7 +1163,7 @@ sal_Bool SfxLibraryContainer::init_Impl( // #i93163 if( bCleanUp ) { - DBG_ERROR( "Upgrade of Basic installation failed somehow" ); + OSL_FAIL( "Upgrade of Basic installation failed somehow" ); static char strErrorSavFolderName[] = "__basic_80_err"; INetURLObject aPrevUserBasicInetObj_Err( aUserBasicInetObj ); diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index b1525b2b7f1e..d008cedfba08 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -175,7 +175,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) m_aCodeList.push_back(new OOp_AND()); else { - DBG_ERROR("OPredicateCompiler: Fehler im Parse Tree"); + OSL_FAIL("OPredicateCompiler: Fehler im Parse Tree"); } } else if (SQL_ISRULE(pPredicateNode,boolean_factor)) @@ -211,7 +211,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) m_aCodeList.push_back(new OOp_SUB()); else { - DBG_ERROR("OPredicateCompiler: Fehler im Parse Tree num_value_exp"); + OSL_FAIL("OPredicateCompiler: Fehler im Parse Tree num_value_exp"); } } else if(SQL_ISRULE(pPredicateNode,term)) @@ -226,7 +226,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) m_aCodeList.push_back(new OOp_DIV()); else { - DBG_ERROR("OPredicateCompiler: Fehler im Parse Tree num_value_exp"); + OSL_FAIL("OPredicateCompiler: Fehler im Parse Tree num_value_exp"); } } else diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 3ae9d220245e..973a88357f46 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -103,7 +103,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect) xServiceFactory( comphelper::getProcessServiceFactory() ); if (!xServiceFactory.is()) { - DBG_ERROR("configureUcb(): No XMultiServiceFactory"); + OSL_FAIL("configureUcb(): No XMultiServiceFactory"); return false; } @@ -277,7 +277,7 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr ) pCmdLine->GetPortalConnectString( aPortalConnect ); if ( !configureUcb( bServer, aPortalConnect ) ) { - DBG_ERROR( "Can't configure UCB" ); + OSL_FAIL( "Can't configure UCB" ); throw com::sun::star::uno::Exception(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RegisterServices, configureUcb")), NULL); } diff --git a/drawinglayer/source/processor2d/helperchartrenderer.cxx b/drawinglayer/source/processor2d/helperchartrenderer.cxx index 3a567b532cbe..163fc9a8a17f 100644 --- a/drawinglayer/source/processor2d/helperchartrenderer.cxx +++ b/drawinglayer/source/processor2d/helperchartrenderer.cxx @@ -145,7 +145,7 @@ namespace drawinglayer catch( uno::Exception& e ) { (void)e; - DBG_ERROR( "Chart cannot be painted pretty!" ); + OSL_FAIL( "Chart cannot be painted pretty!" ); } return bChartRendered; diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 66ef2bbefb13..e7289ffcabf1 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -1863,7 +1863,7 @@ namespace accessibility } catch( const uno::Exception& ) { - DBG_ERROR("AccessibleEditableTextPara::setAttributes exception in setPropertyValue"); + OSL_FAIL("AccessibleEditableTextPara::setAttributes exception in setPropertyValue"); } ++pPropArray; diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 4257cefb2133..73c2ab29571b 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -329,7 +329,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) #endif if ( fp == 0 ) { - DBG_ERROR( "Log file could not be created!" ); + OSL_FAIL( "Log file could not be created!" ); return; } diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 5be5931a7a3c..1782a264b8fb 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -402,7 +402,7 @@ EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, US break; default: { - DBG_ERROR( "Invalid Attribute!" ); + OSL_FAIL( "Invalid Attribute!" ); } } return pNew; @@ -828,7 +828,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP DBG_ASSERT( ( pAttrib->GetEnd() <= Len() ), "Expand: Attribute larger than paragraph!" ); if ( pAttrib->IsEmpty() ) { - DBG_ERROR( "Empty Attribute after ExpandAttribs?" ); + OSL_FAIL( "Empty Attribute after ExpandAttribs?" ); bResort = TRUE; aCharAttribList.GetAttribs().Remove( nAttr ); rItemPool.Remove( *pAttrib->GetItem() ); @@ -1379,7 +1379,7 @@ XubString EditDoc::GetText( LineEnd eEnd ) const nLen += nNodes * nSepSize; if ( nLen > 0xFFFb / sizeof(xub_Unicode) ) { - DBG_ERROR( "Text to large for String" ); + OSL_FAIL( "Text to large for String" ); return XubString(); } xub_Unicode* pStr = new xub_Unicode[nLen+1]; @@ -1442,7 +1442,7 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT case EE_FEATURE_FIELD: if ( bResolveFields ) aStr += ((EditCharAttribField*)pNextFeature)->GetFieldValue(); break; - default: DBG_ERROR( "What feature?" ); + default: OSL_FAIL( "What feature?" ); } pNextFeature = pNode->GetCharAttribs().FindFeature( ++nEnd ); } @@ -2185,12 +2185,12 @@ BOOL CharAttribList::DbgCheckAttribs() if ( pAttr->GetStart() > pAttr->GetEnd() ) { bOK = FALSE; - DBG_ERROR( "Attribute is distorted" ); + OSL_FAIL( "Attribute is distorted" ); } else if ( pAttr->IsFeature() && ( pAttr->GetLen() != 1 ) ) { bOK = FALSE; - DBG_ERROR( "Feature, Len != 1" ); + OSL_FAIL( "Feature, Len != 1" ); } } return bOK; diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx index 0cb7a8bf6662..c3e238d3b695 100644 --- a/editeng/source/editeng/editdoc2.cxx +++ b/editeng/source/editeng/editdoc2.cxx @@ -112,7 +112,7 @@ USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOO } } } - DBG_ERROR( "FindPortion: Not found!" ); + OSL_FAIL( "FindPortion: Not found!" ); return ( Count() - 1 ); } @@ -371,7 +371,7 @@ long ParaPortionList::GetYOffset( ParaPortion* pPPortion ) return nHeight; nHeight += pTmpPortion->GetHeight(); } - DBG_ERROR( "GetYOffset: Portion not found" ); + OSL_FAIL( "GetYOffset: Portion not found" ); return nHeight; } diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 5365d9631e27..fc3e4ef7ed38 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -111,14 +111,14 @@ BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, Sv rBullet.SetStyle( BS_BULLET ); break; case SVX_NUM_PAGEDESC: - DBG_ERROR( "Unknown: SVX_NUM_PAGEDESC" ); + OSL_FAIL( "Unknown: SVX_NUM_PAGEDESC" ); rBullet.SetStyle( BS_BULLET ); break; case SVX_NUM_BITMAP: rBullet.SetStyle( BS_BMP ); break; default: - DBG_ERROR( "Unknown NumType" ); + OSL_FAIL( "Unknown NumType" ); } switch ( pFmt->GetNumAdjust() ) @@ -133,7 +133,7 @@ BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, Sv rBullet.SetJustification( BJ_VCENTER|BJ_HCENTER ); break; default: - DBG_ERROR( "Unknown or invalid NumAdjust" ); + OSL_FAIL( "Unknown or invalid NumAdjust" ); } } return pFmt ? TRUE : FALSE; @@ -287,172 +287,172 @@ EditTextObject::~EditTextObject() USHORT EditTextObject::GetParagraphCount() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } XubString EditTextObject::GetText( USHORT /* nParagraph */ ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return XubString(); } void EditTextObject::Insert( const EditTextObject& /* rObj */, USHORT /* nPara */) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } EditTextObject* EditTextObject::CreateTextObject( USHORT /*nPara*/, USHORT /*nParas*/ ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } void EditTextObject::RemoveParagraph( USHORT /*nPara*/ ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } BOOL EditTextObject::HasPortionInfo() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } void EditTextObject::ClearPortionInfo() { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } BOOL EditTextObject::HasOnlineSpellErrors() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } BOOL EditTextObject::HasCharAttribs( USHORT ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } void EditTextObject::GetCharAttribs( USHORT /*nPara*/, EECharAttribArray& /*rLst*/ ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } void EditTextObject::MergeParaAttribs( const SfxItemSet& /*rAttribs*/, USHORT /*nStart*/, USHORT /*nEnd*/ ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } BOOL EditTextObject::IsFieldObject() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } const SvxFieldItem* EditTextObject::GetField() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } BOOL EditTextObject::HasField( TypeId /*aType*/ ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } SfxItemSet EditTextObject::GetParaAttribs( USHORT /*nPara*/ ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return SfxItemSet( *(SfxItemPool*)NULL ); } void EditTextObject::SetParaAttribs( USHORT /*nPara*/, const SfxItemSet& /*rAttribs*/ ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } BOOL EditTextObject::RemoveCharAttribs( USHORT /*nWhich*/ ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } BOOL EditTextObject::RemoveParaAttribs( USHORT /*nWhich*/ ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } BOOL EditTextObject::HasStyleSheet( const XubString& /*rName*/, SfxStyleFamily /*eFamily*/ ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } void EditTextObject::GetStyleSheet( USHORT /*nPara*/, XubString& /*rName*/, SfxStyleFamily& /*eFamily*/ ) const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } void EditTextObject::SetStyleSheet( USHORT /*nPara*/, const XubString& /*rName*/, const SfxStyleFamily& /*eFamily*/ ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } BOOL EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily, const XubString&, SfxStyleFamily ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } void EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/, const XubString& /*rOldName*/, const XubString& /*rNewName*/ ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } USHORT EditTextObject::GetUserType() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } void EditTextObject::SetUserType( USHORT ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } ULONG EditTextObject::GetObjectSettings() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } void EditTextObject::SetObjectSettings( ULONG ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); } BOOL EditTextObject::IsVertical() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return FALSE; } void EditTextObject::SetVertical( BOOL bVertical ) { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); ((BinTextObject*)this)->SetVertical( bVertical ); } USHORT EditTextObject::GetScriptType() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return ((const BinTextObject*)this)->GetScriptType(); } @@ -534,17 +534,17 @@ void EditTextObject::Skip( SvStream& rIStream ) void EditTextObject::StoreData( SvStream& ) const { - DBG_ERROR( "StoreData: Base class!" ); + OSL_FAIL( "StoreData: Base class!" ); } void EditTextObject::CreateData( SvStream& ) { - DBG_ERROR( "CreateData: Base class!" ); + OSL_FAIL( "CreateData: Base class!" ); } USHORT EditTextObject::GetVersion() const { - DBG_ERROR( "Virtual method direct from EditTextObject!" ); + OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } @@ -1314,7 +1314,7 @@ void BinTextObject::CreateData( SvStream& rIStream ) if ( bOwnerOfCurrent && !bOwnerOfPool ) { // A global Pool was used, but not handed over to me, but I need it! - DBG_ERROR( "Give me the global TextObjectPool!" ); + OSL_FAIL( "Give me the global TextObjectPool!" ); return; } else if ( !bOwnerOfCurrent && bOwnerOfPool ) diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 8cc732a686e7..46fee225030f 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -85,7 +85,7 @@ BOOL EditUndoManager::Undo( USHORT nCount ) pImpEE->SetActiveView( pImpEE->GetEditViews().GetObject(0) ); else { - DBG_ERROR("Undo in engine is not possible without a View! "); + OSL_FAIL("Undo in engine is not possible without a View! "); return FALSE; } } @@ -120,7 +120,7 @@ BOOL EditUndoManager::Redo( USHORT nCount ) pImpEE->SetActiveView( pImpEE->GetEditViews().GetObject(0) ); else { - DBG_ERROR( "Redo in Engine ohne View nicht moeglich!" ); + OSL_FAIL( "Redo in Engine ohne View nicht moeglich!" ); return FALSE; } } diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index ee3778b21103..ad67a7d35fdd 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -808,7 +808,7 @@ sal_Bool EditView::Drop( const DropEvent& ) ESelection EditView::GetDropPos() { - DBG_ERROR( "GetDropPos - Why?!" ); + OSL_FAIL( "GetDropPos - Why?!" ); return ESelection(); } @@ -1084,7 +1084,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) } else { - DBG_ERROR( "content node is NULL" ); + OSL_FAIL( "content node is NULL" ); } nGuessLangWord = lcl_CheckLanguage( xSpellAlt->getWord(), xSpeller, xLangGuesser, sal_False ); diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index 6e638224563f..2e9f786db07d 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -116,7 +116,7 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea ) } else { - DBG_ERROR( "SpellStart: Unknown Area!" ); + OSL_FAIL( "SpellStart: Unknown Area!" ); } } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 509ff4db87a0..a65d339b73bb 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1143,7 +1143,7 @@ String ImpEditView::SpellIgnoreOrAddWord( sal_Bool bAdd ) { if ( bAdd ) { - DBG_ERROR( "Sorry, AddWord not implemented" ); + OSL_FAIL( "Sorry, AddWord not implemented" ); } else // Ignore { diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 212b991de74e..da6cd539533d 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -2864,7 +2864,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding { if ( aEditDoc.Count() >= 0xFFFE ) { - DBG_ERROR( "Can't process more than 64K paragraphs!" ); + OSL_FAIL( "Can't process more than 64K paragraphs!" ); return rPaM; } @@ -3075,7 +3075,7 @@ Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags ) return aEditCursor; } } - DBG_ERROR( "Portion not found!" ); + OSL_FAIL( "Portion not found!" ); return aEditCursor; } @@ -4147,7 +4147,7 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT if( nPos >= pLine->GetCharPosArray().Count() ) { nPos = pLine->GetCharPosArray().Count()-1; - DBG_ERROR("svx::ImpEditEngine::GetXPos(), index out of range!"); + OSL_FAIL("svx::ImpEditEngine::GetXPos(), index out of range!"); } // old code restored see #i112788 (which leaves #i74188 unfixed again) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index f48531cd1727..03c3bc57d54d 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1048,7 +1048,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) bCompressedChars = FALSE; } break; - default: DBG_ERROR( "Was fuer ein Feature ?" ); + default: OSL_FAIL( "Was fuer ein Feature ?" ); } pNextFeature = pNode->GetCharAttribs().FindFeature( pNextFeature->GetStart() + 1 ); } @@ -1139,7 +1139,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) } else { - DBG_ERROR( "CreateLines: Tab not handled!" ); + OSL_FAIL( "CreateLines: Tab not handled!" ); } long nMaxW = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nStartX; if ( nW >= nMaxW ) @@ -1806,7 +1806,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te } else if ( ( nBreakPos > nMaxBreakPos ) && !aUserOptions.allowPunctuationOutsideMargin ) { - DBG_ERROR( "I18N: XBreakIterator::getLineBreak returns position > Max" ); + OSL_FAIL( "I18N: XBreakIterator::getLineBreak returns position > Max" ); nBreakPos = nMaxBreakPos; } diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 4454f2c7e5ea..277cf4fb8de6 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -118,7 +118,7 @@ EditPaM ImpEditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFor aPaM = ReadBin( rInput, aSel ); else { - DBG_ERROR( "Read: Unknown Format" ); + OSL_FAIL( "Read: Unknown Format" ); } FormatFullDoc(); // perhaps a simple format is enough? @@ -250,7 +250,7 @@ void ImpEditEngine::Write( SvStream& rOutput, EETextFormat eFormat, EditSelectio WriteBin( rOutput, aSel ); else { - DBG_ERROR( "Write: Unknown Format" ); + OSL_FAIL( "Write: Unknown Format" ); } } } diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index 034ee0f8f2cf..8d09f6f17215 100644 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -234,7 +234,7 @@ void TextConvWrapper::ConvStart_impl( SvxSpellArea eArea ) } else { - DBG_ERROR( "ConvStart_impl: Unknown Area!" ); + OSL_FAIL( "ConvStart_impl: Unknown Area!" ); } } @@ -373,10 +373,10 @@ void TextConvWrapper::ReplaceUnit( case eOriginalAbove : case eReplacementBelow : case eOriginalBelow : - DBG_ERROR( "Rubies not supported" ); + OSL_FAIL( "Rubies not supported" ); break; default: - DBG_ERROR( "unexpected case" ); + OSL_FAIL( "unexpected case" ); } nUnitOffset = sal::static_int_cast< USHORT >( nUnitOffset + nUnitStart + aNewTxt.getLength()); diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 3baae88d6636..edfe7921f88a 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -276,12 +276,12 @@ String SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumberF { if ( eFormat == SVXDATEFORMAT_SYSTEM ) { - DBG_ERROR( "SVXDATEFORMAT_SYSTEM not implemented!" ); + OSL_FAIL( "SVXDATEFORMAT_SYSTEM not implemented!" ); eFormat = SVXDATEFORMAT_STDSMALL; } else if ( eFormat == SVXDATEFORMAT_APPDEFAULT ) { - DBG_ERROR( "SVXDATEFORMAT_APPDEFAULT: take them from where? "); + OSL_FAIL( "SVXDATEFORMAT_APPDEFAULT: take them from where? "); eFormat = SVXDATEFORMAT_STDSMALL; } @@ -423,7 +423,7 @@ void SvxURLField::Load( SvPersistStream & rStm ) eFormat= (SvxURLFormat)nFormat; // Relative save => make it absolute for loading - DBG_ERROR("No BaseURL!"); + OSL_FAIL("No BaseURL!"); // TODO/MBA: no BaseURL aURL = INetURLObject::GetAbsURL( String(), aTmpURL ); } @@ -433,7 +433,7 @@ void SvxURLField::Load( SvPersistStream & rStm ) void SvxURLField::Save( SvPersistStream & rStm ) { // Relative save of the URL - DBG_ERROR("No BaseURL!"); + OSL_FAIL("No BaseURL!"); // TODO/MBA: no BaseURL String aTmpURL = INetURLObject::GetRelURL( String(), aURL ); @@ -662,11 +662,11 @@ String SvxExtTimeField::GetFormatted( Time& aTime, SvxTimeFormat eFormat, SvNumb switch( eFormat ) { case SVXTIMEFORMAT_SYSTEM : - DBG_ERROR( "SVXTIMEFORMAT_SYSTEM: not implemented" ); + OSL_FAIL( "SVXTIMEFORMAT_SYSTEM: not implemented" ); eFormat = SVXTIMEFORMAT_STANDARD; break; case SVXTIMEFORMAT_APPDEFAULT : - DBG_ERROR( "SVXTIMEFORMAT_APPDEFAULT: not implemented" ); + OSL_FAIL( "SVXTIMEFORMAT_APPDEFAULT: not implemented" ); eFormat = SVXTIMEFORMAT_STANDARD; break; default: ;//prevent warning diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index cfea9d9ba238..45fd0b5759d7 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -236,7 +236,7 @@ bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_SIZE_SIZE: rVal <<= aTmp; break; case MID_SIZE_WIDTH: rVal <<= aTmp.Width; break; case MID_SIZE_HEIGHT: rVal <<= aTmp.Height; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -285,7 +285,7 @@ bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) aSize.Height() = bConvert ? MM100_TO_TWIP(nVal) : nVal; } break; - default: DBG_ERROR("Wrong MemberId!"); + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -470,7 +470,7 @@ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const default: bRet = false; - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); } return bRet; } @@ -527,7 +527,7 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; default: - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); return false; } return true; @@ -900,7 +900,7 @@ bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) default: - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); return false; } return true; @@ -1175,7 +1175,7 @@ bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_PROTECT_SIZE : bValue = bSize; break; case MID_PROTECT_POSITION: bValue = bPos; break; default: - DBG_ERROR("Wrong MemberId"); + OSL_FAIL("Wrong MemberId"); return false; } @@ -1193,7 +1193,7 @@ bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_PROTECT_SIZE : bSize = bVal; break; case MID_PROTECT_POSITION: bPos = bVal; break; default: - DBG_ERROR("Wrong MemberId"); + OSL_FAIL("Wrong MemberId"); return false; } return true; @@ -1318,7 +1318,7 @@ bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_TRANSPARENT: rVal <<= aShadow.IsTransparent; break; case MID_BG_COLOR: rVal <<= aShadow.Color; break; case 0: rVal <<= aShadow; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -1351,7 +1351,7 @@ bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_TRANSPARENT: rVal >>= aShadow.IsTransparent; break; case MID_BG_COLOR: rVal >>= aShadow.Color; break; case 0: rVal >>= aShadow; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } if ( bRet ) @@ -1426,7 +1426,7 @@ sal_uInt16 SvxShadowItem::CalcShadowSpace( sal_uInt16 nShadow ) const break; default: - DBG_ERROR( "wrong shadow" ); + OSL_FAIL( "wrong shadow" ); } return nSpace; } @@ -2427,7 +2427,7 @@ const SvxBorderLine *SvxBoxItem::GetLine( sal_uInt16 nLine ) const pRet = pRight; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); break; } @@ -2459,7 +2459,7 @@ void SvxBoxItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ) pRight = pTmp; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } } @@ -2499,7 +2499,7 @@ sal_uInt16 SvxBoxItem::GetDistance( sal_uInt16 nLine ) const nDist = nRightDist; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } return nDist; @@ -2524,7 +2524,7 @@ void SvxBoxItem::SetDistance( sal_uInt16 nNew, sal_uInt16 nLine ) nRightDist = nNew; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } } @@ -2553,7 +2553,7 @@ sal_uInt16 SvxBoxItem::CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine ) c nDist = nRightDist; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } if( pTmp ) @@ -2656,7 +2656,7 @@ void SvxBoxInfoItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ) } else { - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } } @@ -2830,7 +2830,7 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bIntMember = sal_True; rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED(GetDefDist()) : GetDefDist()); break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } if( !bIntMember ) @@ -2977,7 +2977,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } break; } - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return sal_True; @@ -3249,7 +3249,7 @@ bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const case MID_INNER_WIDTH: rVal <<= sal_Int32(pLine->GetInWidth( )); break; case MID_DISTANCE: rVal <<= sal_Int32(pLine->GetDistance()); break; default: - DBG_ERROR( "Wrong MemberId" ); + OSL_FAIL( "Wrong MemberId" ); return false; } } @@ -3290,7 +3290,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) case MID_DISTANCE: pLine->SetDistance((USHORT)nVal); break; case MID_LINE_STYLE: pLine->SetStyle((SvxBorderStyle)nVal); break; default: - DBG_ERROR( "Wrong MemberId" ); + OSL_FAIL( "Wrong MemberId" ); return sal_False; } @@ -3604,7 +3604,7 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion, rStream.ReadByteString(aRel); // TODO/MBA: how can we get a BaseURL here?! - DBG_ERROR("No BaseURL!"); + OSL_FAIL("No BaseURL!"); String aAbs = INetURLObject::GetAbsURL( String(), aRel ); DBG_ASSERT( aAbs.Len(), "Invalid URL!" ); pStrLink = new String( aAbs ); @@ -3787,7 +3787,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if( 0 == sLink.compareToAscii( UNO_NAME_GRAPHOBJ_URLPKGPREFIX, sizeof(UNO_NAME_GRAPHOBJ_URLPKGPREFIX)-1 ) ) { - DBG_ERROR( "package urls aren't implemented" ); + OSL_FAIL( "package urls aren't implemented" ); } else if( 0 == sLink.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1 ) ) @@ -3987,7 +3987,7 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ ) rStream << pImpl->pGraphicObject->GetGraphic(); if ( pStrLink ) { - DBG_ERROR("No BaseURL!"); + OSL_FAIL("No BaseURL!"); // TODO/MBA: how to get a BaseURL?! String aRel = INetURLObject::GetRelURL( String(), *pStrLink ); // UNICODE: rStream << aRel; @@ -4109,7 +4109,7 @@ void SvxBrushItem::SetGraphic( const Graphic& rNew ) } else { - DBG_ERROR( "SetGraphic() on linked graphic! :-/" ); + OSL_FAIL( "SetGraphic() on linked graphic! :-/" ); } } @@ -4131,7 +4131,7 @@ void SvxBrushItem::SetGraphicObject( const GraphicObject& rNewObj ) } else { - DBG_ERROR( "SetGraphic() on linked graphic! :-/" ); + OSL_FAIL( "SetGraphic() on linked graphic! :-/" ); } } @@ -4395,7 +4395,7 @@ bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, nVal = text::WritingMode2::PAGE; break; default: - DBG_ERROR("Unknown SvxFrameDirection value!"); + OSL_FAIL("Unknown SvxFrameDirection value!"); bRet = false; break; } diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx index 0bc0e3921b12..0d169e4b0b00 100644 --- a/editeng/source/items/itemtype.cxx +++ b/editeng/source/items/itemtype.cxx @@ -96,7 +96,7 @@ XubString GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, c nVal, (MapUnit)eSrcUnit, (MapUnit)eDestUnit )); default: - DBG_ERROR( "not supported mapunit" ); + OSL_FAIL( "not supported mapunit" ); return sRet; } @@ -227,7 +227,7 @@ sal_uInt16 GetMetricId( SfxMapUnit eUnit ) break; default: - DBG_ERROR( "not supported mapunit" ); + OSL_FAIL( "not supported mapunit" ); } return nId; } diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 135face506ce..d8807301872b 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -184,7 +184,7 @@ bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case 0 : rVal <<= aLSp; break; case MID_LINESPACE : rVal <<= aLSp.Mode; break; case MID_HEIGHT : rVal <<= aLSp.Height; break; - default: DBG_ERROR("Wrong MemberId!"); break; + default: OSL_FAIL("Wrong MemberId!"); break; } return true; @@ -206,7 +206,7 @@ bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case 0 : bRet = (rVal >>= aLSp); break; case MID_LINESPACE : bRet = (rVal >>= aLSp.Mode); break; case MID_HEIGHT : bRet = (rVal >>= aLSp.Height); break; - default: DBG_ERROR("Wrong MemberId!"); break; + default: OSL_FAIL("Wrong MemberId!"); break; } if( bRet ) @@ -1347,7 +1347,7 @@ bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberI { case MID_AUTO: rVal <<= (sal_Bool) bAuto; break; case MID_NAME: rVal <<= ::rtl::OUString( GetValue() ); break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return sal_True; @@ -1362,7 +1362,7 @@ bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMem { case MID_AUTO: bRet = ( rVal >>= bAuto ); break; case MID_NAME: bRet = ( rVal >>= aStr ); if ( bRet ) SetValue(aStr); break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return bRet; diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 33b3875044a7..0d172cf481bf 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -1386,7 +1386,7 @@ SfxItemPresentation SvxTextLineItem::GetPresentation XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const { - DBG_ERROR("SvxTextLineItem::GetValueTextByPos: Pure virtual method"); + OSL_FAIL("SvxTextLineItem::GetValueTextByPos: Pure virtual method"); return XubString(); } @@ -3390,7 +3390,7 @@ bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) return true; } - DBG_ERROR( "SvxCharScaleWidthItem::PutValue - Wrong type!" ); + OSL_FAIL( "SvxCharScaleWidthItem::PutValue - Wrong type!" ); return false; } diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index 82fde31f946c..bcf47dd222f7 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -65,13 +65,13 @@ SfxPoolItem* SvxWritingModeItem::Clone( SfxItemPool * ) const SfxPoolItem* SvxWritingModeItem::Create( SvStream & , USHORT ) const { - DBG_ERROR("SvxWritingModeItem should not be streamed!"); + OSL_FAIL("SvxWritingModeItem should not be streamed!"); return NULL; } SvStream& SvxWritingModeItem::Store( SvStream & rStrm, USHORT ) const { - DBG_ERROR("SvxWritingModeItem should not be streamed!"); + OSL_FAIL("SvxWritingModeItem should not be streamed!"); return rStrm; } diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index 21b88157bfba..ec0a91166ebc 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -279,7 +279,7 @@ namespace editeng m_eConvType = HHC::eConvSimplifiedTraditional; else { - DBG_ERROR( "failed to determine conversion type from languages" ); + OSL_FAIL( "failed to determine conversion type from languages" ); } // set remaining conversion parameters to their default values @@ -450,7 +450,7 @@ namespace editeng } catch( const Exception& ) { - DBG_ERROR( "HangulHanjaConversion_Impl::implNextConvertibleUnit: caught an exception!" ); + OSL_FAIL( "HangulHanjaConversion_Impl::implNextConvertibleUnit: caught an exception!" ); //!!! at least we want to move on in the text in order //!!! to avoid an endless loop... @@ -652,7 +652,7 @@ namespace editeng } catch( const Exception& ) { - DBG_ERROR( "HangulHanjaConversion_Impl::implGetConversionDirectionForCurrentPortion: caught an exception!" ); + OSL_FAIL( "HangulHanjaConversion_Impl::implGetConversionDirectionForCurrentPortion: caught an exception!" ); } } @@ -755,7 +755,7 @@ namespace editeng case HHC::eRubyHangulAbove: eAction = bOriginalIsHangul ? HHC::eOriginalAbove : HHC::eReplacementAbove; break; case HHC::eRubyHangulBelow: eAction = bOriginalIsHangul ? HHC::eOriginalBelow : HHC::eReplacementBelow; break; default: - DBG_ERROR( "HangulHanjaConversion_Impl::implChange: invalid/unexpected conversion format!" ); + OSL_FAIL( "HangulHanjaConversion_Impl::implChange: invalid/unexpected conversion format!" ); } } @@ -808,7 +808,7 @@ namespace editeng } catch( const Exception& ) { - DBG_ERROR( "HangulHanjaConversion_Impl::implChange: caught unexpected exception!" ); + OSL_FAIL( "HangulHanjaConversion_Impl::implChange: caught unexpected exception!" ); aOffsets.realloc(0); } } @@ -988,7 +988,7 @@ namespace editeng } catch( const Exception& ) { - DBG_ERROR( "HangulHanjaConversion_Impl::OnFind: caught an exception!" ); + OSL_FAIL( "HangulHanjaConversion_Impl::OnFind: caught an exception!" ); } } return 0L; @@ -1053,7 +1053,7 @@ namespace editeng void HangulHanjaConversion::GetNextPortion( ::rtl::OUString&, LanguageType&, sal_Bool ) { - DBG_ERROR( "HangulHanjaConversion::GetNextPortion: to be overridden!" ); + OSL_FAIL( "HangulHanjaConversion::GetNextPortion: to be overridden!" ); } void HangulHanjaConversion::ReplaceUnit( @@ -1064,12 +1064,12 @@ namespace editeng ReplacementAction, LanguageType * ) { - DBG_ERROR( "HangulHanjaConversion::ReplaceUnit: to be overridden!" ); + OSL_FAIL( "HangulHanjaConversion::ReplaceUnit: to be overridden!" ); } sal_Bool HangulHanjaConversion::HasRubySupport() const { - DBG_ERROR( "HangulHanjaConversion::HasRubySupport: to be overridden!" ); + OSL_FAIL( "HangulHanjaConversion::HasRubySupport: to be overridden!" ); return sal_False; } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 0dfb8943360f..5e0a8b3f32f4 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1472,7 +1472,7 @@ void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang ) #ifdef DBG_UTIL else { - DBG_ERROR("Save an empty list? "); + OSL_FAIL("Save an empty list? "); } #endif } @@ -1488,7 +1488,7 @@ void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang) #ifdef DBG_UTIL else { - DBG_ERROR("Save an empty list? "); + OSL_FAIL("Save an empty list? "); } #endif } diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 1eb6f63e69e1..3a2f8720a8b0 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -161,7 +161,7 @@ Sequence< OUString > lcl_GetLastFoundSvcs( aRes = aSvcImplNames; else { - DBG_ERROR( "type mismatch" ); + OSL_FAIL( "type mismatch" ); } } } @@ -393,7 +393,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) if (!bRes) { #if OSL_DEBUG_LEVEL > 1 - DBG_ERROR( "failed to set new configuration values" ); + OSL_FAIL( "failed to set new configuration values" ); #endif } } diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 90b661dd5791..ea79c8e14371 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -258,7 +258,7 @@ void Outliner::Init( USHORT nMode ) nCtrl |= EE_CNTRL_OUTLINER; break; - default: DBG_ERROR( "Outliner::Init - Invalid Mode!" ); + default: OSL_FAIL( "Outliner::Init - Invalid Mode!" ); } pEditEngine->SetControlWord( nCtrl ); diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx index f4d2f939c1e3..9b3c720d11ec 100644 --- a/editeng/source/outliner/outlundo.cxx +++ b/editeng/source/outliner/outlundo.cxx @@ -132,7 +132,7 @@ void OutlinerUndoChangeDepth::Redo() void OutlinerUndoChangeDepth::Repeat() { - DBG_ERROR( "Repeat not implemented!" ); + OSL_FAIL( "Repeat not implemented!" ); } @@ -158,7 +158,7 @@ void OutlinerUndoCheckPara::Redo() void OutlinerUndoCheckPara::Repeat() { - DBG_ERROR( "Repeat not implemented!" ); + OSL_FAIL( "Repeat not implemented!" ); } DBG_NAME(OLUndoExpand); @@ -231,7 +231,7 @@ void OLUndoExpand::Redo() void OLUndoExpand::Repeat() { DBG_CHKTHIS(OLUndoExpand,0); - DBG_ERROR("Not implemented"); + OSL_FAIL("Not implemented"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index d7280fa16f3d..ff66af048c18 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1430,7 +1430,7 @@ void OutlinerView::StartTextConversion( } else { - DBG_ERROR( "unexpected language" ); + OSL_FAIL( "unexpected language" ); } } diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx index 11984494aa1c..9e2763e55b34 100644 --- a/editeng/source/outliner/paralist.cxx +++ b/editeng/source/outliner/paralist.cxx @@ -156,7 +156,7 @@ void ParagraphList::MoveParagraphs( ULONG nStart, ULONG nDest, ULONG _nCount ) } else { - DBG_ERROR( "MoveParagraphs: Invalid Parameters" ); + OSL_FAIL( "MoveParagraphs: Invalid Parameters" ); } } diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index 791e2c6d97ae..fc7dc6e64c34 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -124,7 +124,7 @@ void SvxEditSourceHint::SetEndValue( ULONG n ) return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_END, 0 ) ); default: - DBG_ERROR( "SvxEditSourceHelper::EENotification2Hint unknown notification" ); + OSL_FAIL( "SvxEditSourceHelper::EENotification2Hint unknown notification" ); break; } } diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 1c42104550f4..1d1917d6765d 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -1187,23 +1187,23 @@ sal_Bool SvxAccessibleTextAdapter::IsEditable( const ESelection& rSel ) const SfxItemSet * SvxAccessibleTextAdapter::GetEmptyItemSetPtr() { - DBG_ERROR( "not implemented" ); + OSL_FAIL( "not implemented" ); return 0; } void SvxAccessibleTextAdapter::AppendParagraph() { - DBG_ERROR( "not implemented" ); + OSL_FAIL( "not implemented" ); } xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( USHORT, const String &, const SfxItemSet & ) { - DBG_ERROR( "not implemented" ); + OSL_FAIL( "not implemented" ); return 0; } void SvxAccessibleTextAdapter::CopyText(const SvxTextForwarder&) { - DBG_ERROR( "not implemented" ); + OSL_FAIL( "not implemented" ); } diff --git a/editeng/source/uno/unoedsrc.cxx b/editeng/source/uno/unoedsrc.cxx index aa54261945fe..b245cc4d6c32 100644 --- a/editeng/source/uno/unoedsrc.cxx +++ b/editeng/source/uno/unoedsrc.cxx @@ -83,7 +83,7 @@ SvxEditViewForwarder* SvxEditSource::GetEditViewForwarder( sal_Bool ) SfxBroadcaster& SvxEditSource::GetBroadcaster() const { - DBG_ERROR("SvxEditSource::GetBroadcaster called for implementation missing this feature!"); + OSL_FAIL("SvxEditSource::GetBroadcaster called for implementation missing this feature!"); static SfxBroadcaster aBroadcaster; diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index d06c48754bd8..8888a3553f12 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -91,7 +91,7 @@ SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnl nFlags = GETATTRIBS_CHARATTRIBS; break; default: - DBG_ERROR("unknown flags for SvxOutlinerForwarder::GetAttribs"); + OSL_FAIL("unknown flags for SvxOutlinerForwarder::GetAttribs"); } return rEditEngine.GetAttribs( rSel.nStartPara, rSel.nStartPos, rSel.nEndPos, nFlags ); diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 2d6ef9c39ca9..feb5cdc166f2 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -100,7 +100,7 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL nFlags = GETATTRIBS_CHARATTRIBS; break; default: - DBG_ERROR("unknown flags for SvxOutlinerForwarder::GetAttribs"); + OSL_FAIL("unknown flags for SvxOutlinerForwarder::GetAttribs"); } return rEditEngine.GetAttribs( rSel.nStartPara, rSel.nStartPos, rSel.nEndPos, nFlags ); } @@ -508,7 +508,7 @@ sal_Int16 SvxOutlinerForwarder::GetNumberingStartValue( sal_uInt16 nPara ) } else { - DBG_ERROR( "SvxOutlinerForwarder::GetNumberingStartValue)(), Invalid paragraph index"); + OSL_FAIL( "SvxOutlinerForwarder::GetNumberingStartValue)(), Invalid paragraph index"); return -1; } } @@ -521,7 +521,7 @@ void SvxOutlinerForwarder::SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 } else { - DBG_ERROR( "SvxOutlinerForwarder::SetNumberingStartValue)(), Invalid paragraph index"); + OSL_FAIL( "SvxOutlinerForwarder::SetNumberingStartValue)(), Invalid paragraph index"); } } @@ -533,7 +533,7 @@ sal_Bool SvxOutlinerForwarder::IsParaIsNumberingRestart( sal_uInt16 nPara ) } else { - DBG_ERROR( "SvxOutlinerForwarder::IsParaIsNumberingRestart)(), Invalid paragraph index"); + OSL_FAIL( "SvxOutlinerForwarder::IsParaIsNumberingRestart)(), Invalid paragraph index"); return sal_False; } } @@ -546,7 +546,7 @@ void SvxOutlinerForwarder::SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Boo } else { - DBG_ERROR( "SvxOutlinerForwarder::SetParaIsNumberingRestart)(), Invalid paragraph index"); + OSL_FAIL( "SvxOutlinerForwarder::SetParaIsNumberingRestart)(), Invalid paragraph index"); } } diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index 3fb7a4974812..2802b87afb6f 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -155,7 +155,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* } else { - DBG_ERROR( "No SfxPoolItem found for property!" ); + OSL_FAIL( "No SfxPoolItem found for property!" ); } return aVal; @@ -178,7 +178,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa { if( pPool == NULL ) { - DBG_ERROR( "No default item and no pool?" ); + OSL_FAIL( "No default item and no pool?" ); return; } @@ -331,13 +331,13 @@ void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, uno::Any & rMetric ) th rMetric <<= (sal_uInt32)(TWIPS_TO_MM(*(sal_uInt32*)rMetric.getValue())); break; default: - DBG_ERROR("AW: Missing unit translation to 100th mm!"); + OSL_FAIL("AW: Missing unit translation to 100th mm!"); } break; } default: { - DBG_ERROR("AW: Missing unit translation to 100th mm!"); + OSL_FAIL("AW: Missing unit translation to 100th mm!"); } } } @@ -369,13 +369,13 @@ void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, uno::Any & rMetr rMetric <<= (sal_uInt32)(MM_TO_TWIPS(*(sal_uInt32*)rMetric.getValue())); break; default: - DBG_ERROR("AW: Missing unit translation to 100th mm!"); + OSL_FAIL("AW: Missing unit translation to 100th mm!"); } break; } default: { - DBG_ERROR("AW: Missing unit translation to PoolMetrics!"); + OSL_FAIL("AW: Missing unit translation to PoolMetrics!"); } } } diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index 549c66a47782..f62f4054fd0c 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -428,7 +428,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& if( !xServiceFactory.is() ) { - DBG_ERROR( "got no service manager" ); + OSL_FAIL( "got no service manager" ); break; } @@ -438,7 +438,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& if( !xWriter.is() ) { - DBG_ERROR( "com.sun.star.xml.sax.Writer service missing" ); + OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" ); break; } @@ -475,7 +475,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& } catch( uno::Exception& ) { - DBG_ERROR("exception during xml export"); + OSL_FAIL("exception during xml export"); } } diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 178e08001e9e..a09c125fe0ff 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -174,14 +174,14 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r uno::Reference<lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() ); if( !xServiceFactory.is() ) { - DBG_ERROR( "SvxXMLXTableImport::load: got no service manager" ); + OSL_FAIL( "SvxXMLXTableImport::load: got no service manager" ); break; } uno::Reference< xml::sax::XParser > xParser( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" ) ) ), uno::UNO_QUERY ); if( !xParser.is() ) { - DBG_ERROR( "com.sun.star.xml.sax.Parser service missing" ); + OSL_FAIL( "com.sun.star.xml.sax.Parser service missing" ); break; } @@ -198,14 +198,14 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r if( !xSource.is() ) { - DBG_ERROR( "got no data source from medium" ); + OSL_FAIL( "got no data source from medium" ); break; } uno::Reference< XInterface > xPipe( xServiceFactory->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ) ); if( !xPipe.is() ) { - DBG_ERROR( "XMLReader::Read: com.sun.star.io.Pipe service missing" ); + OSL_FAIL( "XMLReader::Read: com.sun.star.io.Pipe service missing" ); break; } diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 0dd3389dc231..bb464d519453 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1649,7 +1649,7 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuff case svSep: break; // Opcodes default: - DBG_ERROR("FormulaCompiler:: GetStringFromToken errUnknownVariable"); + OSL_FAIL("FormulaCompiler:: GetStringFromToken errUnknownVariable"); } // of switch } } diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 6ee042c43196..5fe52957c8b7 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -872,7 +872,7 @@ BOOL FormulaTokenArray::HasMatrixDoubleRefOps() sp = sal::static_int_cast<short>( sp - nParams ); if ( sp < 0 ) { - DBG_ERROR( "FormulaTokenArray::HasMatrixDoubleRefOps: sp < 0" ); + OSL_FAIL( "FormulaTokenArray::HasMatrixDoubleRefOps: sp < 0" ); sp = 0; } pStack[sp++] = pResult; diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index d52217be5e18..05a0e78768ee 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -581,7 +581,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos) } catch(const uno::Exception& ) { - DBG_ERROR("Exception caught!"); + OSL_FAIL("Exception caught!"); } } @@ -971,7 +971,7 @@ String FormulaDlg_Impl::RepairFormula(const String& aFormula) } catch(const uno::Exception& ) { - DBG_ERROR("Exception caught!"); + OSL_FAIL("Exception caught!"); } return aResult; } diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index f8bec371a898..de223c446765 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -704,7 +704,7 @@ namespace svt break; default: - DBG_ERROR( "OControlAccess::implSetControlProperty: invalid property id!" ); + OSL_FAIL( "OControlAccess::implSetControlProperty: invalid property id!" ); } } @@ -780,7 +780,7 @@ namespace svt break; default: - DBG_ERROR( "OControlAccess::implGetControlProperty: invalid property id!" ); + OSL_FAIL( "OControlAccess::implGetControlProperty: invalid property id!" ); } return aReturn; } diff --git a/fpicker/source/office/asyncfilepicker.cxx b/fpicker/source/office/asyncfilepicker.cxx index 330eaebe26b2..9062a18d577e 100644 --- a/fpicker/source/office/asyncfilepicker.cxx +++ b/fpicker/source/office/asyncfilepicker.cxx @@ -143,7 +143,7 @@ namespace svt break; default: - DBG_ERROR( "AsyncPickerAction::execute: unknown action!" ); + OSL_FAIL( "AsyncPickerAction::execute: unknown action!" ); break; } @@ -208,7 +208,7 @@ namespace svt break; default: - DBG_ERROR( "AsyncPickerAction::OnActionDone: unknown action!" ); + OSL_FAIL( "AsyncPickerAction::OnActionDone: unknown action!" ); break; } diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx index e87f0d5c4857..71a0fd0a6a11 100644 --- a/fpicker/source/office/commonpicker.cxx +++ b/fpicker/source/office/commonpicker.cxx @@ -169,7 +169,7 @@ namespace svt } else { - DBG_ERROR( "OCommonPicker::disposing: where did this come from?" ); + OSL_FAIL( "OCommonPicker::disposing: where did this come from?" ); } } diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index 31c7030afb03..b66cd8ac05a6 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -165,7 +165,7 @@ namespace svt } catch( Exception& ) { - DBG_ERROR( "SmartContent::bindTo: unexpected exception caught!" ); + OSL_FAIL( "SmartContent::bindTo: unexpected exception caught!" ); } } else diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index ed08862c1590..2c724e3f921f 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -313,7 +313,7 @@ namespace } catch( const Exception& ) { - DBG_ERROR( "lcl_getHomeDirectory: caught an exception!" ); + OSL_FAIL( "lcl_getHomeDirectory: caught an exception!" ); } return 0 < _rHomeDir.Len(); } @@ -1299,7 +1299,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) break; default: - DBG_ERROR("SvtFileDialog, OpenHdl_Impl: invalid mode!"); + OSL_FAIL("SvtFileDialog, OpenHdl_Impl: invalid mode!"); } // Interessenten benachrichtigen. @@ -1994,7 +1994,7 @@ void SvtFileDialog::displayIOException( const String& _rURL, IOErrorCode _eCode } catch( const Exception& ) { - DBG_ERROR( "iodlg::displayIOException: caught an exception!" ); + OSL_FAIL( "iodlg::displayIOException: caught an exception!" ); } } diff --git a/framework/source/classes/addonsoptions.cxx b/framework/source/classes/addonsoptions.cxx index 593928552a4e..f0ebee73d4b5 100644 --- a/framework/source/classes/addonsoptions.cxx +++ b/framework/source/classes/addonsoptions.cxx @@ -502,7 +502,7 @@ void AddonsOptions_Impl::Notify( const Sequence< ::rtl::OUString >& /*lPropertyN //***************************************************************************************************************** void AddonsOptions_Impl::Commit() { - DBG_ERROR( "AddonsOptions_Impl::Commit()\nNot implemented yet!\n" ); + OSL_FAIL( "AddonsOptions_Impl::Commit()\nNot implemented yet!\n" ); } //***************************************************************************************************************** diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 11d57095dce7..6c87ed895ea2 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -146,7 +146,7 @@ void SvMetaName::Load( SvPersistStream & rStm ) if( nMask >= 0x20 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "wrong format" ); + OSL_FAIL( "wrong format" ); return; } if( nMask & 0x01 ) rStm >> aName; @@ -429,7 +429,7 @@ void SvMetaReference::Load( SvPersistStream & rStm ) if( nMask >= 0x2 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "wrong format" ); + OSL_FAIL( "wrong format" ); return; } if( nMask & 0x01 ) @@ -472,7 +472,7 @@ void SvMetaExtern::Load( SvPersistStream & rStm ) if( nMask >= 0x20 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "wrong format" ); + OSL_FAIL( "wrong format" ); return; } if( nMask & 0x01 ) rStm >> pModule; diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 0ebadc98c7bb..97dac4b46534 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -98,7 +98,7 @@ SvStream& operator >> (SvStream & rStm, SvBOOL & rb ) if( n & ~0x03 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "format error" ); + OSL_FAIL( "format error" ); } return rStm; } diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index 0cb39c367122..3b7f4583081a 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -51,7 +51,7 @@ void SvClassElement::Load( SvPersistStream & rStm ) if( nMask >= 0x08 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "wrong format" ); + OSL_FAIL( "wrong format" ); return; } if( nMask & 0x01 ) rStm >> aAutomation; @@ -94,7 +94,7 @@ void SvMetaClass::Load( SvPersistStream & rStm ) if( nMask >= 0x20 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "wrong format" ); + OSL_FAIL( "wrong format" ); return; } if( nMask & 0x01 ) rStm >> aAttrList; @@ -324,7 +324,7 @@ BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, { if ( !rAttr.GetRef() && rAttr.IsA( TYPE( SvMetaSlot ) ) ) { - DBG_ERROR( "Neuer Slot : " ); + OSL_FAIL( "Neuer Slot : " ); DBG_ERROR( rAttr.GetSlotId().GetBuffer() ); } @@ -336,7 +336,7 @@ BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, // values have to match if( pS->GetSlotId().GetValue() != rAttr.GetSlotId().GetValue() ) { - DBG_ERROR( "Gleicher Name in MetaClass : " ); + OSL_FAIL( "Gleicher Name in MetaClass : " ); DBG_ERROR( pS->GetName().GetBuffer() ); DBG_ERROR( pS->GetSlotId().GetBuffer() ); DBG_ERROR( rAttr.GetSlotId().GetBuffer() ); @@ -355,7 +355,7 @@ BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, UINT32 nId2 = rAttr.GetSlotId().GetValue(); if( nId1 == nId2 && nId1 != 0 ) { - DBG_ERROR( "Gleiche Id in MetaClass : " ); + OSL_FAIL( "Gleiche Id in MetaClass : " ); DBG_ERROR( ByteString::CreateFromInt32( pS->GetSlotId().GetValue() ).GetBuffer() ); DBG_ERROR( pS->GetSlotId().GetBuffer() ); DBG_ERROR( rAttr.GetSlotId().GetBuffer() ); @@ -397,13 +397,13 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm, { case WRITE_ODL: { - DBG_ERROR( "Not supported anymore!" ); + OSL_FAIL( "Not supported anymore!" ); break; } case WRITE_C_SOURCE: case WRITE_C_HEADER: { - DBG_ERROR( "Not supported anymore!" ); + OSL_FAIL( "Not supported anymore!" ); break; } case WRITE_DOCU: diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index bbb34593423a..fa1d3c6a659c 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -868,7 +868,7 @@ BOOL SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) // names may differ, because explicitly given if ( pKnownSlot->GetName() != GetName() ) { - DBG_ERROR("Illegal definition!"); + OSL_FAIL("Illegal definition!"); rInStm.Seek( nTokPos ); return FALSE; } @@ -1022,7 +1022,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, if ( m == rBase.GetAttrList().Count() ) { - DBG_ERROR("Invalid EnumSlot!"); + OSL_FAIL("Invalid EnumSlot!"); xEnumSlot = Clone(); ULONG nValue; if ( rBase.FindId(aSId , &nValue) ) diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 0537b69c3d66..2d6f8d746447 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -376,7 +376,7 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase, pBaseType->GetType() == TYPE_STRUCT || pBaseType->GetType() == TYPE_ENUM ) { - DBG_ERROR( "Falscher Parametertyp!" ); + OSL_FAIL( "Falscher Parametertyp!" ); } else rOutStm << pBaseType->GetBasicPostfix().GetBuffer(); @@ -1784,7 +1784,7 @@ void SvMetaEnumValue::Load( SvPersistStream & rStm ) if( nMask >= 0x02 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "wrong format" ); + OSL_FAIL( "wrong format" ); return; } if( nMask & 0x01 ) rStm.ReadByteString( aEnumValue ); @@ -1842,7 +1842,7 @@ void SvMetaTypeEnum::Load( SvPersistStream & rStm ) if( nMask >= 0x04 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); - DBG_ERROR( "wrong format" ); + OSL_FAIL( "wrong format" ); return; } if( nMask & 0x01 ) rStm >> aEnumValueList; diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 5fb856f01aca..7fdc001134b1 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -178,7 +178,7 @@ void ConvDicNameContainer::FlushDics() const } catch(Exception &) { - DBG_ERROR( "flushing of conversion dictionary failed" ); + OSL_FAIL( "flushing of conversion dictionary failed" ); } } } diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index d1627898637c..33c94d902d6d 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -426,7 +426,7 @@ void GrammarCheckingIterator::ProcessResult( } catch (lang::IllegalArgumentException &) { - DBG_ERROR( "commitMultiTextMarkup: IllegalArgumentException exception caught" ); + OSL_FAIL( "commitMultiTextMarkup: IllegalArgumentException exception caught" ); } } diff --git a/linguistic/workben/sprophelp.cxx b/linguistic/workben/sprophelp.cxx index bd42ed27bbe2..43ee38080b7a 100644 --- a/linguistic/workben/sprophelp.cxx +++ b/linguistic/workben/sprophelp.cxx @@ -316,7 +316,7 @@ void SAL_CALL break; } default: - DBG_ERROR( "unknown property" ); + OSL_FAIL( "unknown property" ); } if (pbVal) rEvt.NewValue >>= *pbVal; @@ -361,7 +361,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals ) case UPH_IS_SPELL_WITH_DIGITS : pbResVal = &bResIsSpellWithDigits; break; case UPH_IS_SPELL_CAPITALIZATION : pbResVal = &bResIsSpellCapitalization; break; default: - DBG_ERROR( "unknown property" ); + OSL_FAIL( "unknown property" ); } if (pbResVal) pVal[i].Value >>= *pbResVal; diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx index addeb6c0976d..f452cd0bfe5f 100644 --- a/linguistic/workben/sspellimp.cxx +++ b/linguistic/workben/sspellimp.cxx @@ -376,7 +376,7 @@ void SAL_CALL pPropHelper->AddAsPropListener(); //! after a reference is established } else - DBG_ERROR( "wrong number of arguments in sequence" ); + OSL_FAIL( "wrong number of arguments in sequence" ); } } diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 71287dbba85a..d57ad9c0f149 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -109,7 +109,7 @@ String lcl_GetVersionString() if ( aVersion.Len() == 0 ) { - DBG_ERROR( "No BUILDID in bootstrap file found" ); + OSL_FAIL( "No BUILDID in bootstrap file found" ); } aVersion.Erase( 0, aVersion.Search( ':' ) + 1 ); diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index f76e334ee7cf..01fe6536d683 100644 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -144,7 +144,7 @@ Reference< XLibraryContainer > SfxBasicManagerHolder::getLibraryContainer( Conta case SCRIPTS: return mxBasicContainer.get(); case DIALOGS: return mxDialogContainer.get(); } - DBG_ERROR( "SfxBasicManagerHolder::getLibraryContainer: illegal container type!" ); + OSL_FAIL( "SfxBasicManagerHolder::getLibraryContainer: illegal container type!" ); return NULL; } diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 8fb26117e7b2..1f7613cc6756 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -500,7 +500,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet ) } #ifdef DBG_UTIL if ( !bRet ) - DBG_ERROR( "Putting options failed!" ); + OSL_FAIL( "Putting options failed!" ); #endif } pRanges++; @@ -665,7 +665,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) BOOL bReset = ((const SfxBoolItem *)pItem)->GetValue(); if ( bReset ) { - DBG_ERROR( "Not implemented, may be EOL!" ); + OSL_FAIL( "Not implemented, may be EOL!" ); } } if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), TRUE, &pItem)) diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx index 77ecb73cc885..b53bb9e0e09d 100644 --- a/sfx2/source/appl/appchild.cxx +++ b/sfx2/source/appl/appchild.cxx @@ -134,7 +134,7 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, USHORT nI return; } - DBG_ERROR( "Kein ChildWindow fuer diesen Context!" ); + OSL_FAIL( "Kein ChildWindow fuer diesen Context!" ); } //-------------------------------------------------------------------- diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 7bed306e14b7..66ba1dcb3821 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -295,7 +295,7 @@ SfxModule* SfxApplication::GetModule_Impl() return pModule; else { - DBG_ERROR( "No module!" ); + OSL_FAIL( "No module!" ); return NULL; } } diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 3c6973d8af85..46846329d74c 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -1090,7 +1090,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) } catch( const ::com::sun::star::uno::Exception& ) { - DBG_ERROR( "OfficeApplication::ExecuteApp_Impl(SID_ONLINE_REGISTRATION): caught an exception!" ); + OSL_FAIL( "OfficeApplication::ExecuteApp_Impl(SID_ONLINE_REGISTRATION): caught an exception!" ); } } break; diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 09ca1172460c..564994856ff0 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -504,7 +504,7 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding if ( !pCon ) { - DBG_ERROR( "Kein geeigneter Context gefunden!" ); + OSL_FAIL( "Kein geeigneter Context gefunden!" ); return; } @@ -539,7 +539,7 @@ FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const } else { - DBG_ERROR("Kein FloatingWindow-Context!"); + OSL_FAIL("Kein FloatingWindow-Context!"); return NULL; } } diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 209ec317db8a..bfb81f7ab610 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -623,7 +623,7 @@ DdeData* ImplDdeItem::Get( ULONG nFormat ) BOOL ImplDdeItem::Put( const DdeData* ) { - DBG_ERROR( "ImplDdeItem::Put not implemented" ); + OSL_FAIL( "ImplDdeItem::Put not implemented" ); return FALSE; } diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index c98492617c9c..09ce47563a5e 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -207,7 +207,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact) if (pFact->nId == (*pImpl->pFactArr)[nFactory]->nId) { pImpl->pFactArr->Remove( nFactory ); - DBG_ERROR("ChildWindow registered multiple times!"); + OSL_FAIL("ChildWindow registered multiple times!"); return; } } @@ -236,7 +236,7 @@ void SfxModule::RegisterChildWindowContext( USHORT nId, } } - DBG_ERROR( "No ChildWindow for this Context!" ); + OSL_FAIL( "No ChildWindow for this Context!" ); } //------------------------------------------------------------------------- diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 0e4a4d838c35..17f0087109f4 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -402,7 +402,7 @@ void ContentListBox_Impl::RequestingChilds( SvLBoxEntry* pParent ) } catch( Exception& ) { - DBG_ERROR( "ContentListBox_Impl::RequestingChilds(): unexpected exception" ); + OSL_FAIL( "ContentListBox_Impl::RequestingChilds(): unexpected exception" ); } } @@ -732,7 +732,7 @@ void IndexTabPage_Impl::InitializeIndex() } catch( Exception& ) { - DBG_ERROR( "IndexTabPage_Impl::InitializeIndex(): unexpected exception" ); + OSL_FAIL( "IndexTabPage_Impl::InitializeIndex(): unexpected exception" ); } aIndexCB.SetUpdateMode( TRUE ); @@ -2342,7 +2342,7 @@ Reference< XTextRange > SfxHelpTextWindow_Impl::getCursor() const } catch( Exception& ) { - DBG_ERROR( "SfxHelpTextWindow_Impl::getCursor(): unexpected exception" ); + OSL_FAIL( "SfxHelpTextWindow_Impl::getCursor(): unexpected exception" ); } return xCursor; @@ -2410,7 +2410,7 @@ IMPL_LINK( SfxHelpTextWindow_Impl, SelectHdl, Timer*, EMPTYARG ) } catch( Exception& ) { - DBG_ERROR( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); + OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); } return 1; @@ -2506,7 +2506,7 @@ IMPL_LINK( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog*, pDlg ) } catch( Exception& ) { - DBG_ERROR( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); + OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); } return 0; @@ -3184,7 +3184,7 @@ void SfxHelpWindow_Impl::openDone(const ::rtl::OUString& sURL , } catch( Exception& ) { - DBG_ERROR( "SfxHelpWindow_Impl::OpenDoneHdl(): unexpected exception" ); + OSL_FAIL( "SfxHelpWindow_Impl::OpenDoneHdl(): unexpected exception" ); } // When the SearchPage opens the help doc, then select all words, which are equal to its text @@ -3395,7 +3395,7 @@ void SfxHelpWindow_Impl::DoAction( USHORT nActionId ) } catch( Exception& ) { - DBG_ERROR( "SfxHelpWindow_Impl::DoAction(): unexpected exception" ); + OSL_FAIL( "SfxHelpWindow_Impl::DoAction(): unexpected exception" ); } } break; diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index f8c8f6ad7d21..ae05593fa188 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -660,7 +660,7 @@ void SfxWorkWindow::Lock_Impl( BOOL bLock ) --m_nLock; if ( m_nLock<0 ) { - DBG_ERROR("Lock count underflow!"); + OSL_FAIL("Lock count underflow!"); m_nLock = 0; } @@ -1066,7 +1066,7 @@ void SfxWorkWindow::AlignChild_Impl( Window& rWindow, pChild->bResize = TRUE; } else { - DBG_ERROR( "aligning unregistered child" ); + OSL_FAIL( "aligning unregistered child" ); } } @@ -1094,7 +1094,7 @@ void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow ) delete pChild; } else { - DBG_ERROR( "releasing unregistered child" ); + OSL_FAIL( "releasing unregistered child" ); } } @@ -2256,11 +2256,11 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus) if ( n < nCount ) { - DBG_ERROR("The ChildWindow is not in context!"); + OSL_FAIL("The ChildWindow is not in context!"); } else { - DBG_ERROR("The ChildWindow is not registered!"); + OSL_FAIL("The ChildWindow is not registered!"); } #endif } @@ -2501,11 +2501,11 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFoc if ( n<nCount ) { - DBG_ERROR("The ChildWindow is not in context!"); + OSL_FAIL("The ChildWindow is not in context!"); } else { - DBG_ERROR("The ChildWindow is not registered"); + OSL_FAIL("The ChildWindow is not registered"); } #endif } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index a8c04ca9abb8..4785ca1ed8ee 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -770,7 +770,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf USHORT nIndex = aName.SearchAscii(": "); if ( nIndex != STRING_NOTFOUND ) { - DBG_ERROR("Old filter name used!"); + OSL_FAIL("Old filter name used!"); aName = rName.Copy( nIndex + 2 ); } @@ -1038,7 +1038,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( sal_Int32 nStartRealName = sFilterName.indexOf( DEFINE_CONST_UNICODE(": "), 0 ); if( nStartRealName != -1 ) { - DBG_ERROR("Old format, not supported!"); + OSL_FAIL("Old format, not supported!"); sFilterName = sFilterName.copy( nStartRealName+2 ); } diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index 33c6346efe03..8d2294cd0805 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -130,19 +130,19 @@ SfxPoolItem* SfxEventNamesItem::Clone( SfxItemPool *) const SfxPoolItem* SfxEventNamesItem::Create(SvStream &, USHORT) const { - DBG_ERROR("not streamable!"); + OSL_FAIL("not streamable!"); return new SfxEventNamesItem(Which()); } SvStream& SfxEventNamesItem::Store(SvStream &rStream, USHORT ) const { - DBG_ERROR("not streamable!"); + OSL_FAIL("not streamable!"); return rStream; } USHORT SfxEventNamesItem::GetVersion( USHORT ) const { - DBG_ERROR("not streamable!"); + OSL_FAIL("not streamable!"); return 0; } diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 505d3cfe663f..ccc5c4ee2813 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1294,7 +1294,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell delete pNewItem; } else { - DBG_ERROR( "Toggle only for Enums and Bools allowed" ); + OSL_FAIL( "Toggle only for Enums and Bools allowed" ); } } else if ( SFX_ITEM_DONTCARE == eState ) @@ -1318,12 +1318,12 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell aReq.AppendItem( *pNewItem ); } else { - DBG_ERROR( "Toggle only for Enums and Bools allowed" ); + OSL_FAIL( "Toggle only for Enums and Bools allowed" ); } delete pNewItem; } else { - DBG_ERROR( "suspicious Toggle-Slot" ); + OSL_FAIL( "suspicious Toggle-Slot" ); } } @@ -1770,7 +1770,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer ) } catch (...) { - DBG_ERROR("C++ exception caught!"); + OSL_FAIL("C++ exception caught!"); pImp->bInNextJob = sal_False; } @@ -1967,7 +1967,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp ) { if ( pImp->pSubBindings && pImp->pSubBindings->pDispatcher != pOldDispat ) { - DBG_ERROR( "SubBindings already set before activating!" ); + OSL_FAIL( "SubBindings already set before activating!" ); pImp->pSubBindings->ENTERREGISTRATIONS(); } LEAVEREGISTRATIONS(); @@ -1977,7 +1977,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp ) ENTERREGISTRATIONS(); if ( pImp->pSubBindings && pImp->pSubBindings->pDispatcher != pOldDispat ) { - DBG_ERROR( "SubBindings still set even when deactivating!" ); + OSL_FAIL( "SubBindings still set even when deactivating!" ); pImp->pSubBindings->LEAVEREGISTRATIONS(); } } diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx index 9e4777437df9..1464ffe0abed 100644 --- a/sfx2/source/control/macrconf.cxx +++ b/sfx2/source/control/macrconf.cxx @@ -553,7 +553,7 @@ void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId) } } - DBG_ERROR("Macro-SlotId is not found!"); + OSL_FAIL("Macro-SlotId is not found!"); } //========================================================================== @@ -572,7 +572,7 @@ void SfxMacroConfig::RegisterSlotId(sal_uInt16 nId) } } - DBG_ERROR("Macro-SlotId is not found!"); + OSL_FAIL("Macro-SlotId is not found!"); } //========================================================================== diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx index 6a9d97e5919b..fde39d4d3996 100644 --- a/sfx2/source/control/msg.cxx +++ b/sfx2/source/control/msg.cxx @@ -45,7 +45,7 @@ SfxSlotKind SfxSlot::GetKind() const return (SfxSlotKind) SFX_KIND_ENUM; else { - DBG_ERROR( "invalid slot kind detected" ); + OSL_FAIL( "invalid slot kind detected" ); return SFX_KIND_ENUM; } } diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx index 12d9c4991654..227f7c91c7d5 100644 --- a/sfx2/source/control/msgpool.cxx +++ b/sfx2/source/control/msgpool.cxx @@ -219,7 +219,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo ) aResId.SetRT(RSC_STRING); if ( !aResId.GetResMgr()->IsAvailable(aResId) ) { - DBG_ERROR( "GroupId-Name not defined in SFX!" ); + OSL_FAIL( "GroupId-Name not defined in SFX!" ); return String(); } diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index c1eecb9931eb..082ec6a4c1f4 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -230,7 +230,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount ) { if ( pNext->GetSlotId() <= pIter->GetSlotId() ) - DBG_ERROR ("Wrong order!"); + OSL_FAIL("Wrong order!"); if ( pIter->GetKind() == SFX_KIND_ENUM ) { @@ -363,7 +363,7 @@ const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const { if(pGenoType) return pGenoType->GetRealSlot(pSlot); - DBG_ERROR("unknown Slot"); + OSL_FAIL("unknown Slot"); return 0; } @@ -383,7 +383,7 @@ const SfxSlot* SfxInterface::GetRealSlot( USHORT nSlotId ) const { if(pGenoType) return pGenoType->GetRealSlot(nSlotId); - DBG_ERROR("fremder Slot"); + OSL_FAIL("fremder Slot"); return 0; } diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 8e2577b33db1..cf947622aeef 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -536,7 +536,7 @@ const SfxPoolItem* SfxRequest::GetItem return pItem; // Item da aber falsch => Programmierfehler - DBG_ERROR( "invalid argument type" ); + OSL_FAIL( "invalid argument type" ); } } @@ -786,7 +786,7 @@ void SfxRequest::Done_Impl if ( nSlotId == nSlot ) { // mit Hosentr"ager und G"urtel reparieren des falschen Flags - DBG_ERROR( "recursion RecordPerItem - use RecordPerSet!" ); + OSL_FAIL( "recursion RecordPerItem - use RecordPerSet!" ); SfxSlot *pSlot = (SfxSlot*) pImp->pSlot; pSlot->nFlags &= ~((ULONG)SFX_SLOT_RECORDPERITEM); pSlot->nFlags &= SFX_SLOT_RECORDPERSET; diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index a2c561b58d11..3437b9d521d4 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -592,7 +592,7 @@ void SfxShell::Invalidate { if ( !GetViewShell() ) { - DBG_ERROR( "wrong Invalidate method called!" ); + OSL_FAIL( "wrong Invalidate method called!" ); return; } diff --git a/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx index 52c2874953a1..9a20d9b83463 100644 --- a/sfx2/source/control/sorgitm.cxx +++ b/sfx2/source/control/sorgitm.cxx @@ -103,7 +103,7 @@ bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nM aValue = aLanguage; break; default: - DBG_ERROR("Wrong MemberId!"); + OSL_FAIL("Wrong MemberId!"); return false; } @@ -128,7 +128,7 @@ bool SfxScriptOrganizerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT aLanguage = aValue; break; default: - DBG_ERROR("Wrong MemberId!"); + OSL_FAIL("Wrong MemberId!"); return false; } diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 45a24f37cb07..cb92c6422f32 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -206,7 +206,7 @@ void SfxUnoControllerItem::GetNewDispatch() if ( !pBindings ) { // Bindings released - DBG_ERROR( "Tried to get dispatch, but no Bindings!" ); + OSL_FAIL( "Tried to get dispatch, but no Bindings!" ); return; } diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 79ace385f8a1..f3c7ce0e0b97 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -1037,7 +1037,7 @@ const sal_uInt16* SfxSingleTabDialog::GetInputRanges( const SfxItemPool& rPool ) { if ( GetInputItemSet() ) { - DBG_ERROR( "Set bereits vorhanden!" ); + OSL_FAIL( "Set bereits vorhanden!" ); return GetInputItemSet()->GetRanges(); } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 7e40a2d1b293..5ac198849cc2 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -558,7 +558,7 @@ bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const aValue = getTitle(); break; default: - DBG_ERROR("Wrong MemberId!"); + OSL_FAIL("Wrong MemberId!"); return sal_False; } @@ -632,7 +632,7 @@ bool SfxDocumentInfoItem::PutValue( const Any& rVal, BYTE nMemberId ) setTitle(aValue); break; default: - DBG_ERROR("Wrong MemberId!"); + OSL_FAIL("Wrong MemberId!"); return false; } @@ -1245,7 +1245,7 @@ void SfxInternetPage::ChangeState( STATE eNewState ) EnableReload( TRUE ); break; default: - DBG_ERROR( "*SfxInternetPage::SetState(): unhandled state!" ); + OSL_FAIL( "*SfxInternetPage::SetState(): unhandled state!" ); } eState = eNewState; diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 51ef8b7658f1..8c60f3376da9 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1037,7 +1037,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) SfxChildAlignment eAlign = CheckAlignment(GetAlignment(),GetAlignment()); if ( eAlign != GetAlignment() ) { - DBG_ERROR("Invalid Alignment!"); + OSL_FAIL("Invalid Alignment!"); SetAlignment( eAlign ); aStr.Erase(); } @@ -1068,7 +1068,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) } } else { - DBG_ERROR( "Information is missing!" ); + OSL_FAIL( "Information is missing!" ); } } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index bc2e651c30a8..2abe18442b8c 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -408,7 +408,7 @@ sal_Bool FileDialogHelper_Impl::updateExtendedControl( sal_Int16 _nExtendedContr } catch( const IllegalArgumentException& ) { - DBG_ERROR( "FileDialogHelper_Impl::updateExtendedControl: caught an exception!" ); + OSL_FAIL( "FileDialogHelper_Impl::updateExtendedControl: caught an exception!" ); } } return bIsEnabled; @@ -1074,7 +1074,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( } catch( const Exception& ) { - DBG_ERROR( "FileDialogHelper_Impl::FileDialogHelper_Impl: could not initialize the picker!" ); + OSL_FAIL( "FileDialogHelper_Impl::FileDialogHelper_Impl: could not initialize the picker!" ); } } @@ -1197,7 +1197,7 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con } catch( const Exception& ) { - DBG_ERROR( "FileDialogHelper_Impl::setControlHelpIds: caught an exception while setting the help ids!" ); + OSL_FAIL( "FileDialogHelper_Impl::setControlHelpIds: caught an exception while setting the help ids!" ); } } @@ -1283,7 +1283,7 @@ void FileDialogHelper_Impl::implInitializeFileName( ) } catch( const Exception& ) { - DBG_ERROR( "FileDialogHelper_Impl::implInitializeFileName: could not ask for the auto-extension current-value!" ); + OSL_FAIL( "FileDialogHelper_Impl::implInitializeFileName: could not ask for the auto-extension current-value!" ); } } } @@ -1504,7 +1504,7 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, } catch( IllegalArgumentException ) { - DBG_ERROR( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } @@ -1525,7 +1525,7 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, } catch( IllegalArgumentException ) { - DBG_ERROR( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } } @@ -1690,7 +1690,7 @@ void FileDialogHelper_Impl::displayFolder( const ::rtl::OUString& _rPath ) } catch( const IllegalArgumentException& ) { - DBG_ERROR( "FileDialogHelper_Impl::displayFolder: caught an exception!" ); + OSL_FAIL( "FileDialogHelper_Impl::displayFolder: caught an exception!" ); } } } @@ -1707,7 +1707,7 @@ void FileDialogHelper_Impl::setFileName( const ::rtl::OUString& _rFile ) } catch( const IllegalArgumentException& ) { - DBG_ERROR( "FileDialogHelper_Impl::setFileName: caught an exception!" ); + OSL_FAIL( "FileDialogHelper_Impl::setFileName: caught an exception!" ); } } } @@ -2176,7 +2176,7 @@ void FileDialogHelper_Impl::setDefaultValues() } catch( const Exception& ) { - DBG_ERROR( "FileDialogHelper_Impl::setDefaultValues: caught an exception while setting the display directory!" ); + OSL_FAIL( "FileDialogHelper_Impl::setDefaultValues: caught an exception while setting the display directory!" ); } } } diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index d3f13f5e9b40..6e8de3c8ea5e 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -224,7 +224,7 @@ namespace sfx2 if ( m_aClassReferrer.end() == aClassRef ) { // we do not know this global class - DBG_ERROR( "ReadGlobalFilter::operator(): unknown filter name!" ); + OSL_FAIL( "ReadGlobalFilter::operator(): unknown filter name!" ); // TODO: perhaps we should be more tolerant - at the moment, the filter is dropped // We could silently push_back it to the container .... } diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index 0f2f14b9eb61..3bd4b97ae391 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -154,7 +154,7 @@ SfxPartDockWnd_Impl::SfxPartDockWnd_Impl xSupp->getFrames()->append( xFrame ); } else { - DBG_ERROR("Bindings without Dispatcher!"); + OSL_FAIL("Bindings without Dispatcher!"); } } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 0e7b58814f75..c2b0e32fa218 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -127,7 +127,7 @@ SfxPoolItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, USHORT /*nVersion*/) const { - DBG_ERROR( "Use it only in UI!" ); + OSL_FAIL( "Use it only in UI!" ); return NULL; } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 52236c187f1f..35d13a97ea95 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -847,7 +847,7 @@ USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId) for ( size_t i = 0; i < pStyleFamilies->size(); i++ ) if ( SfxFamilyIdToNId(pStyleFamilies->at( i )->GetFamily()) == nId+1 ) return i; - DBG_ERROR("Style Nummer nicht gefunden"); + OSL_FAIL("Style Nummer nicht gefunden"); return 0; } @@ -893,7 +893,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource() case SFX_STYLE_FAMILY_FRAME:nSlot = SID_STYLE_FAMILY3; break; case SFX_STYLE_FAMILY_PAGE: nSlot = SID_STYLE_FAMILY4; break; case SFX_STYLE_FAMILY_PSEUDO: nSlot = SID_STYLE_FAMILY5; break; - default: DBG_ERROR("unbekannte StyleFamily"); break; + default: OSL_FAIL("unbekannte StyleFamily"); break; } pBoundItems[i] = new SfxTemplateControllerItem(nSlot, *this, *pBindings); @@ -1892,7 +1892,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) case SID_TEMPLATE_LOAD: SFX_APP()->GetDispatcher_Impl()->Execute(nEntry); break; - default: DBG_ERROR("not implemented"); break; + default: OSL_FAIL("not implemented"); break; } } @@ -2306,7 +2306,7 @@ void SfxTemplateDialog_Impl::InsertFamilyItem(USHORT nId,const SfxStyleFamilyIte case SFX_STYLE_FAMILY_FRAME:nHelpId = SID_STYLE_FAMILY3; break; case SFX_STYLE_FAMILY_PAGE: nHelpId = SID_STYLE_FAMILY4; break; case SFX_STYLE_FAMILY_PSEUDO: nHelpId = SID_STYLE_FAMILY5; break; - default: DBG_ERROR("unknown StyleFamily"); break; + default: OSL_FAIL("unknown StyleFamily"); break; } m_aActionTbL.InsertItem( nId, pItem->GetImage(), pItem->GetText(), 0, 0); m_aActionTbL.SetHelpId( nId, nHelpId ); diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 549534c68dcf..f74b892131c3 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -104,7 +104,7 @@ void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState, nFamily = 4; break; case SID_STYLE_FAMILY5: nFamily = 5; break; - default: DBG_ERROR("unbekannte StyleFamily"); break; + default: OSL_FAIL("unbekannte StyleFamily"); break; } rTemplateDlg.EnableFamilyItem( nFamily, !bDisable ); break; diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 397b00b030b3..759ceb3bc07c 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -531,7 +531,7 @@ Reference < XContent > SfxMedium::GetContent() const } else { - // TODO: DBG_ERROR("SfxMedium::GetContent()\nCreate Content? This code exists as fallback only. Please clarify, why its used."); + // TODO: OSL_FAIL("SfxMedium::GetContent()\nCreate Content? This code exists as fallback only. Please clarify, why its used."); String aURL; if ( aName.Len() ) ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aURL ); @@ -768,7 +768,7 @@ sal_Bool SfxMedium::IsStorage() String aURL; if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aURL ) ) { - DBG_ERROR("Physical name not convertable!"); + OSL_FAIL("Physical name not convertable!"); } pImp->bIsStorage = SotStorage::IsStorageFile( aURL ) && !SotStorage::IsOLEStorage( aURL); if ( !pImp->bIsStorage ) @@ -1869,7 +1869,7 @@ void SfxMedium::Transfer_Impl() } else { - DBG_ERROR( "Illegal Output stream parameter!\n" ); + OSL_FAIL( "Illegal Output stream parameter!\n" ); SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); } @@ -2182,7 +2182,7 @@ void SfxMedium::ClearBackup_Impl() else { - DBG_ERROR("Couldn't remove backup file!"); + OSL_FAIL("Couldn't remove backup file!"); } } } @@ -2262,7 +2262,7 @@ void SfxMedium::GetMedium_Impl() { if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aFileName ) ) { - DBG_ERROR("Physical name not convertable!"); + OSL_FAIL("Physical name not convertable!"); } } else @@ -2434,7 +2434,7 @@ void SfxMedium::Init_Impl() INetProtocol eProt = aUrl.GetProtocol(); if ( eProt == INET_PROT_NOT_VALID ) { - DBG_ERROR ( "Unknown protocol!" ); + OSL_FAIL( "Unknown protocol!" ); } else { @@ -2469,7 +2469,7 @@ void SfxMedium::Init_Impl() || !aLogicName.CompareToAscii( "private:stream", 14 ) == COMPARE_EQUAL ) ) { pSet->ClearItem( SID_OUTPUTSTREAM ); - DBG_ERROR( "Unexpected Output stream parameter!\n" ); + OSL_FAIL( "Unexpected Output stream parameter!\n" ); } if ( aLogicName.Len() ) @@ -2831,7 +2831,7 @@ sal_Bool SfxMedium::IsTemporary() const sal_Bool SfxMedium::Exists( sal_Bool /*bForceSession*/ ) { - DBG_ERROR( "Not implemented!" ); + OSL_FAIL( "Not implemented!" ); return sal_True; } @@ -2995,12 +2995,12 @@ SfxMedium::~SfxMedium() String aTemp; if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aTemp )) { - DBG_ERROR("Physical name not convertable!"); + OSL_FAIL("Physical name not convertable!"); } if ( !::utl::UCBContentHelper::Kill( aTemp ) ) { - DBG_ERROR("Couldn't remove temporary file!"); + OSL_FAIL("Couldn't remove temporary file!"); } } diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 785067097107..f9c057442f01 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -249,7 +249,7 @@ IMPL_LINK( DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, EMPTYARG } catch( IllegalArgumentException ) { - DBG_ERROR( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } @@ -270,7 +270,7 @@ IMPL_LINK( DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, EMPTYARG } catch( IllegalArgumentException ) { - DBG_ERROR( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); + OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" ); } } } diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 2f981332b7de..bee3e7731ad0 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -1307,7 +1307,7 @@ SvLBoxEntry* SfxOrganizeListBox_Impl::InsertEntryByBmpType( break; default: - DBG_ERROR( "SfxOrganizeListBox_Impl::InsertEntryByBmpType(): something forgotten?!" ); + OSL_FAIL( "SfxOrganizeListBox_Impl::InsertEntryByBmpType(): something forgotten?!" ); } pEntry = SvTreeListBox::InsertEntry( rText, *pExp, *pCol, pParent, bChildsOnDemand, nPos, pUserData ); @@ -1434,7 +1434,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const switch( nLevel ) { - default: DBG_ERROR( "Bitmaps ueberindiziert" ); + default: OSL_FAIL( "Bitmaps ueberindiziert" ); case 0: pRet = &aClosedFolderBmp; break; diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index edef588d7691..332f05597b4f 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1617,7 +1617,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& bDialogUsed = sal_True; else { - DBG_ERROR( "Can't execute document info dialog!\n" ); + OSL_FAIL( "Can't execute document info dialog!\n" ); } try { diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 45e13deb1421..d8d00bdc6cfa 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1825,12 +1825,12 @@ ErrCode SfxObjectShell::CallScript( } else if( rScriptType.EqualsAscii( "JavaScript" ) ) { - DBG_ERROR( "JavaScript not allowed" ); + OSL_FAIL( "JavaScript not allowed" ); return 0; } else { - DBG_ERROR( "StarScript not allowed" ); + OSL_FAIL( "StarScript not allowed" ); } return nErr; } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 6b70a00d440a..4019167ef9d3 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1123,7 +1123,7 @@ void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet) case SID_DOCPATH: { - DBG_ERROR( "Not supported anymore!" ); + OSL_FAIL( "Not supported anymore!" ); break; } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index adf74761ef34..d279ef077304 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -291,7 +291,7 @@ sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl( } catch ( uno::Exception& ) { - DBG_ERROR( "Creation of a storage copy is failed!" ); + OSL_FAIL( "Creation of a storage copy is failed!" ); ::utl::UCBContentHelper::Kill( aTempURL ); aTempURL = ::rtl::OUString(); @@ -1067,7 +1067,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl { // if no filter was set, use the default filter // this should be changed in the feature, it should be an error! - DBG_ERROR("No filter set!"); + OSL_FAIL("No filter set!"); pFilter = GetFactory().GetFilterContainer()->GetAnyFilter( SFX_FILTER_IMPORT | SFX_FILTER_EXPORT ); rMedium.SetFilter(pFilter); } @@ -1350,7 +1350,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl } catch( uno::Exception& ) { - DBG_ERROR( "Setting of common encryption key failed!" ); + OSL_FAIL( "Setting of common encryption key failed!" ); SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); } } @@ -1439,7 +1439,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl catch( uno::Exception& ) { AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Preserve versions has failed." ) ) ); - DBG_ERROR( "Couldn't copy versions!\n" ); + OSL_FAIL( "Couldn't copy versions!\n" ); bOk = sal_False; // TODO/LATER: a specific error could be set } @@ -1936,7 +1936,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, BOOL bCommit ) } catch( uno::Exception& ) { - DBG_ERROR( "The strotage was not commited on DoSaveAs!\n" ); + OSL_FAIL( "The strotage was not commited on DoSaveAs!\n" ); } } } @@ -2817,7 +2817,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl #ifdef DBG_UTIL if ( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SFX_ITEM_SET ) - DBG_ERROR("Salvage item present in Itemset, check the parameters!"); + OSL_FAIL("Salvage item present in Itemset, check the parameters!"); #endif // should be unneccessary - too hot to handle! @@ -2921,7 +2921,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl sal_Bool SfxObjectShell::LoadFrom( SfxMedium& /*rMedium*/ ) { - DBG_ERROR( "Base implementation, must not be called in general!" ); + OSL_FAIL( "Base implementation, must not be called in general!" ); return sal_True; } diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index f3d78a8cadfa..add18f58f914 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -561,10 +561,10 @@ class ImplUCBPrintWatcher : public ::osl::Thread ::com::sun::star::ucb::NameClash::OVERWRITE); } } - catch( ::com::sun::star::ucb::ContentCreationException& ) { DBG_ERROR("content create exception"); } - catch( ::com::sun::star::ucb::CommandAbortedException& ) { DBG_ERROR("command abort exception"); } - catch( ::com::sun::star::uno::RuntimeException& ) { DBG_ERROR("runtime exception"); } - catch( ::com::sun::star::uno::Exception& ) { DBG_ERROR("unknown exception"); } + catch( ::com::sun::star::ucb::ContentCreationException& ) { OSL_FAIL("content create exception"); } + catch( ::com::sun::star::ucb::CommandAbortedException& ) { OSL_FAIL("command abort exception"); } + catch( ::com::sun::star::uno::RuntimeException& ) { OSL_FAIL("runtime exception"); } + catch( ::com::sun::star::uno::Exception& ) { OSL_FAIL("unknown exception"); } // kill the temp file! delete *ppTempFile; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 196d3e30dca2..feb05467a773 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1863,7 +1863,7 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >& if ( m_pData->m_pObjectShell->GetMedium() != pMedium ) { // for whatever reason document now has another medium - DBG_ERROR("Document has rejected the medium?!"); + OSL_FAIL("Document has rejected the medium?!"); delete pMedium; } diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 27bccddaf7d9..ed6814df9fd4 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -226,7 +226,7 @@ static void Execute( ANY& aEventData, const css::document::DocumentEvent& aTrigg else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_MACRO_NAME))) aProperties[ nIndex ].Value >>= aMacroName; else { - DBG_ERROR("Unknown property value!"); + OSL_FAIL("Unknown property value!"); } nIndex += 1; } @@ -409,7 +409,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* p else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_MACRO_NAME))) aProperties[ nIndex ].Value >>= aMacroName; else { - DBG_ERROR("Unknown propery value!"); + OSL_FAIL("Unknown propery value!"); } nIndex += 1; } diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 6c92ff0c0605..75775adf661b 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -344,7 +344,7 @@ SfxObjectShellLock SfxFrameLoader_Impl::impl_findObjectShell( const Reference< X } } - DBG_ERROR( "SfxFrameLoader_Impl::impl_findObjectShell: model is not based on SfxObjectShell - wrong frame loader usage!" ); + OSL_FAIL( "SfxFrameLoader_Impl::impl_findObjectShell: model is not based on SfxObjectShell - wrong frame loader usage!" ); return NULL; } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index f6cca14f3a38..3e6823672baf 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -655,7 +655,7 @@ sal_Bool SAL_CALL SfxBaseController::attachModel( const REFERENCE< XMODEL >& xMo if ( m_pData->m_pViewShell && xModel.is() && xModel != m_pData->m_pViewShell->GetObjectShell()->GetModel() ) { // don't allow to reattach a model! - DBG_ERROR("Can't reattach model!"); + OSL_FAIL("Can't reattach model!"); return sal_False; } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 8b6de50eec0d..16db55fac1f2 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1112,7 +1112,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl() } #ifdef DBG_UTIL else - DBG_ERROR("Keine Shell"); + OSL_FAIL("Keine Shell"); #endif if ( xObjSh.Is() ) @@ -3222,7 +3222,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet) case SID_FORMATMENUSTATE : { - DBG_ERROR("Outdated slot!"); + OSL_FAIL("Outdated slot!"); rSet.DisableItem( nWhich ); break; } diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 4e2cee5d40b9..9bc48b5ef64f 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -331,7 +331,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) aFactName = pImp->aFactoryName; else { - DBG_ERROR("Missing argument!"); + OSL_FAIL("Missing argument!"); break; } @@ -448,7 +448,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet ) break; default: - DBG_ERROR( "invalid message-id" ); + OSL_FAIL( "invalid message-id" ); } } ++pRanges; diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index c75a0365c2a5..b6ff13214bb4 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -923,7 +923,7 @@ ErrCode SfxViewShell::DoPrint( SfxPrinter* /*pPrinter*/, PrintDialog* /*pPrintDlg*/, BOOL /*bSilent*/, BOOL /*bIsAPI*/ ) { - DBG_ERROR( "DoPrint called, dead code !" ); + OSL_FAIL( "DoPrint called, dead code !" ); return ERRCODE_IO_NOTSUPPORTED; } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 00fa1953e906..8dad33533f3e 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1250,7 +1250,7 @@ void SfxViewShell::SetWindow Size SfxViewShell::GetOptimalSizePixel() const { - DBG_ERROR( "Useless call!" ); + OSL_FAIL( "Useless call!" ); return Size(); } @@ -2120,7 +2120,7 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& // interceptor is indifferent continue; default: - DBG_ERROR("Wrong return value of ContextMenuInterceptor!"); + OSL_FAIL("Wrong return value of ContextMenuInterceptor!"); continue; } } diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 2b9d02a5bde4..c9e01f032282 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -891,7 +891,7 @@ namespace accessibility } catch( const uno::Exception& ) { - DBG_ERROR("AccessibleTextHelper_Impl::UpdateVisibleChildren error while determining visible children"); + OSL_FAIL("AccessibleTextHelper_Impl::UpdateVisibleChildren error while determining visible children"); // something failed - currently no children mnFirstVisibleChild = -1; @@ -956,7 +956,7 @@ namespace accessibility if( mnFirstVisibleChild >= 0 && mnFirstVisibleChild > mnLastVisibleChild ) { - DBG_ERROR( "AccessibleTextHelper: range invalid" ); + OSL_FAIL( "AccessibleTextHelper: range invalid" ); } } #endif @@ -1188,7 +1188,7 @@ namespace accessibility } catch( const uno::Exception& ) { - DBG_ERROR("AccessibleTextHelper_Impl::ProcessQueue: could not create new paragraph"); + OSL_FAIL("AccessibleTextHelper_Impl::ProcessQueue: could not create new paragraph"); } } else if( aFunctor.GetHintId() == TEXT_HINT_PARAREMOVED ) @@ -1223,7 +1223,7 @@ namespace accessibility } #ifdef DBG_UTIL else - DBG_ERROR("AccessibleTextHelper_Impl::ProcessQueue() invalid hint id"); + OSL_FAIL("AccessibleTextHelper_Impl::ProcessQueue() invalid hint id"); #endif } else if( nNewParas != nCurrParas ) diff --git a/svx/source/dialog/SpellDialogChildWindow.cxx b/svx/source/dialog/SpellDialogChildWindow.cxx index 2a3493841b38..1996183f7a68 100644 --- a/svx/source/dialog/SpellDialogChildWindow.cxx +++ b/svx/source/dialog/SpellDialogChildWindow.cxx @@ -93,7 +93,7 @@ void SpellDialogChildWindow::AddAutoCorrection( const String& /*rNew*/, LanguageType /*eLanguage*/) { - DBG_ERROR("AutoCorrection should have been overloaded - if available"); + OSL_FAIL("AutoCorrection should have been overloaded - if available"); } bool SpellDialogChildWindow::HasGrammarChecking() @@ -103,13 +103,13 @@ bool SpellDialogChildWindow::HasGrammarChecking() bool SpellDialogChildWindow::IsGrammarChecking() { - DBG_ERROR("Grammar checking should have been overloaded - if available"); + OSL_FAIL("Grammar checking should have been overloaded - if available"); return false; } void SpellDialogChildWindow::SetGrammarChecking(bool ) { - DBG_ERROR("Grammar checking should have been overloaded - if available"); + OSL_FAIL("Grammar checking should have been overloaded - if available"); } } // end of namespace ::svx diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx index bf28925bb2ee..f0e0999823ba 100644 --- a/svx/source/dialog/dlgutil.cxx +++ b/svx/source/dialog/dlgutil.cxx @@ -50,7 +50,7 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) eUnit = (FieldUnit)( (const SfxUInt16Item*)pItem )->GetValue(); else { - DBG_ERROR("Using fallback for field unit - field unit should be provided in ItemSet"); + OSL_FAIL("Using fallback for field unit - field unit should be provided in ItemSet"); return SfxModule::GetCurrentFieldUnit(); } diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index c4ade753b7c2..d15c5aefe8b6 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -1320,7 +1320,7 @@ short RecoveryDialog::execute() } // should never be reached .-) - DBG_ERROR("Should never be reached!"); + OSL_FAIL("Should never be reached!"); return DLG_RET_OK; } diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index be7ca62140a7..92d0ffe93d0b 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -287,7 +287,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r default: { - DBG_ERROR( "SvxGraphicFilter: selected filter slot not yet implemented" ); + OSL_FAIL( "SvxGraphicFilter: selected filter slot not yet implemented" ); nRet = SVX_GRAPHICFILTER_UNSUPPORTED_SLOT; } break; diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 8c2f8a3ab311..7e351e3ac306 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -599,7 +599,7 @@ BOOL SvxIMapDlg::DoSave() if( aURL.GetProtocol() == INET_PROT_NOT_VALID ) { - DBG_ERROR( "invalid URL" ); + OSL_FAIL( "invalid URL" ); } else { diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index cc79e618aeb8..901fa3190be6 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -117,7 +117,7 @@ void SvxRulerItem::StateChanged( USHORT nSID, SfxItemState eState, if(pItem->IsConsistent()) rRuler.Update(pItem, nSID); else - DBG_ERROR("Column item corrupted"); + OSL_FAIL("Column item corrupted"); } else rRuler.Update(pItem, nSID); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 163c7c2accf0..cad88d539f03 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -366,7 +366,7 @@ void SvxRubyDialog::Activate() } catch(Exception&) { - DBG_ERROR("exception in style access"); + OSL_FAIL("exception in style access"); } if(sCharStyleSelect.Len()) aCharStyleLB.SelectEntry(sCharStyleSelect); @@ -563,7 +563,7 @@ IMPL_LINK(SvxRubyDialog, ApplyHdl_Impl, PushButton*, EMPTYARG) } catch(Exception& ) { - DBG_ERROR("Exception caught"); + OSL_FAIL("Exception caught"); } } return 0; diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index 0e3dbbbb6113..c8990d17671f 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -83,7 +83,7 @@ bool SvxLongLRSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMem case MID_LEFT: nVal = lLeft; break; case MID_RIGHT: nVal = lRight; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } if ( bConvert ) @@ -119,7 +119,7 @@ bool SvxLongLRSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE { case MID_LEFT: lLeft = nVal; break; case MID_RIGHT: lRight = nVal; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -209,7 +209,7 @@ bool SvxLongULSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMem case MID_UPPER: nVal = lLeft; break; case MID_LOWER: nVal = lRight; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } if ( bConvert ) @@ -245,7 +245,7 @@ bool SvxLongULSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE { case MID_UPPER: lLeft = nVal; break; case MID_LOWER: lRight = nVal; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -331,7 +331,7 @@ bool SvxPagePosSizeItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMem case MID_WIDTH: nVal = lWidth; break; case MID_HEIGHT: nVal = lHeight; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } rVal <<= nVal; @@ -366,7 +366,7 @@ bool SvxPagePosSizeItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE case MID_WIDTH: lWidth = nVal; break; case MID_HEIGHT: lHeight = nVal; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return true; @@ -610,7 +610,7 @@ bool SvxColumnItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) case MID_ORTHO: rVal <<= (sal_Bool) bOrtho; break; case MID_ACTUAL: rVal <<= (sal_Int32) nActColumn; break; case MID_TABLE: rVal <<= (sal_Bool) bTable; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return true; @@ -631,7 +631,7 @@ bool SvxColumnItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMember case MID_ORTHO: rVal >>= nVal; bOrtho = (BOOL) nVal; break; case MID_ACTUAL: rVal >>= nVal; nActColumn = (USHORT) nVal; break; case MID_TABLE: rVal >>= nVal; bTable = (BOOL) nVal; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return true; @@ -718,7 +718,7 @@ bool SvxObjectItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) case MID_END_Y : rVal <<= nEndY; break; case MID_LIMIT : rVal <<= bLimits; break; default: - DBG_ERROR( "Wrong MemberId" ); + OSL_FAIL( "Wrong MemberId" ); return sal_False; } @@ -736,7 +736,7 @@ bool SvxObjectItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMember case MID_END_X : bRet = (rVal >>= nEndX); break; case MID_END_Y : bRet = (rVal >>= nEndY); break; case MID_LIMIT : bRet = (rVal >>= bLimits); break; - default: DBG_ERROR( "Wrong MemberId" ); + default: OSL_FAIL( "Wrong MemberId" ); } return bRet; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index eb491759bb91..852e2676ec85 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1694,7 +1694,7 @@ IMPL_LINK( SvxSearchDialog, TemplateHdl_Impl, Button *, EMPTYARG ) break; default: - DBG_ERROR( "StyleSheetFamily was changed?" ); + OSL_FAIL( "StyleSheetFamily was changed?" ); } rBindings.EnterRegistrations(); diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 951da1459119..58208e9c98cd 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -265,7 +265,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } catch(Exception&) { - DBG_ERROR("Exception in DefaultNumberingProvider::makeNumberingString"); + OSL_FAIL("Exception in DefaultNumberingProvider::makeNumberingString"); } } // start just next to the left edge @@ -337,7 +337,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } catch(Exception&) { - DBG_ERROR("Exception in DefaultNumberingProvider::makeNumberingString"); + OSL_FAIL("Exception in DefaultNumberingProvider::makeNumberingString"); } aLeft.Y() -= (pDev->GetTextHeight()/2); @@ -397,7 +397,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) static sal_Bool bAssert = FALSE; if(!bAssert) { - DBG_ERROR("exception in ::UserDraw"); + OSL_FAIL("exception in ::UserDraw"); bAssert = sal_True; } } diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index ec91367464c3..80f4e7c1da51 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -2002,7 +2002,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", String::CreateFromInt32(pRuler_Imp->lLastLMargi switch(GetDragType()) { default: ;//prevent warning - DBG_ERROR("svx::SvxRuler::DragBorders(), unknown drag type!" ); + OSL_FAIL("svx::SvxRuler::DragBorders(), unknown drag type!" ); case RULER_TYPE_BORDER: if(pRuler_Imp->bIsTableRows) { diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 6e62f23a68c9..78026754464a 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -1691,7 +1691,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) // evtl. PoolUnit ermitteln (Falls dies in Update() nicht passiert ist) if( !mpImpl->pPool ) { - DBG_ERROR( "Kein Pool in GetAttr()! Evtl. inkompatibel zu drviewsi.cxx ?" ); + OSL_FAIL( "Kein Pool in GetAttr()! Evtl. inkompatibel zu drviewsi.cxx ?" ); mpImpl->pPool = rAttrs.GetPool(); DBG_ASSERT( mpImpl->pPool, "Wo ist der Pool?" ); ePoolUnit = mpImpl->pPool->GetMetric( SID_ATTR_LINE_WIDTH ); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index e2312e0dcaf6..f3c9645c43d1 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -262,7 +262,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) sal_Bool bFieldDescriptor = OColumnTransferable::canExtractColumnDescriptor(aDroppedData.GetDataFlavorExVector(), CTF_FIELD_DESCRIPTOR); if (!bColumnDescriptor && !bFieldDescriptor) { - DBG_ERROR("FmGridHeader::ExecuteDrop: should never have reached this (no extractable format)!"); + OSL_FAIL("FmGridHeader::ExecuteDrop: should never have reached this (no extractable format)!"); return DND_ACTION_NONE; } @@ -292,7 +292,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) ) ) { - DBG_ERROR( "FmGridHeader::ExecuteDrop: somebody started a nonsense drag operation!!" ); + OSL_FAIL( "FmGridHeader::ExecuteDrop: somebody started a nonsense drag operation!!" ); return DND_ACTION_NONE; } @@ -311,12 +311,12 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) } catch(Exception&) { - DBG_ERROR("FmGridHeader::ExecuteDrop: could not retrieve the database access object !"); + OSL_FAIL("FmGridHeader::ExecuteDrop: could not retrieve the database access object !"); } if (!xConnection.is()) { - DBG_ERROR("FmGridHeader::ExecuteDrop: could not retrieve the database access object !"); + OSL_FAIL("FmGridHeader::ExecuteDrop: could not retrieve the database access object !"); return DND_ACTION_NONE; } } @@ -388,7 +388,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) } catch (Exception&) { - DBG_ERROR("FmGridHeader::ExecuteDrop: caught an exception while creatin' the column !"); + OSL_FAIL("FmGridHeader::ExecuteDrop: caught an exception while creatin' the column !"); ::comphelper::disposeComponent(xStatement); return sal_False; } @@ -506,7 +506,7 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) } catch(Exception&) { - DBG_ERROR("FmGridHeader::ExecuteDrop: Exception occurred!"); + OSL_FAIL("FmGridHeader::ExecuteDrop: Exception occurred!"); } sal_Bool bDateNTimeCol = sal_False; @@ -645,7 +645,7 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) } catch (Exception&) { - DBG_ERROR("FmGridHeader::OnAsyncExecuteDrop: caught an exception while creatin' the column !"); + OSL_FAIL("FmGridHeader::OnAsyncExecuteDrop: caught an exception while creatin' the column !"); ::comphelper::disposeComponent(m_pImpl->xDroppedResultSet); ::comphelper::disposeComponent(m_pImpl->xDroppedStatement); return 0L; @@ -1836,7 +1836,7 @@ sal_Bool FmGridControl::selectBookmarks(const Sequence< Any >& _rBookmarks) if ( !m_pSeekCursor ) { - DBG_ERROR( "FmGridControl::selectBookmarks: no seek cursor!" ); + OSL_FAIL( "FmGridControl::selectBookmarks: no seek cursor!" ); return sal_False; } @@ -1859,7 +1859,7 @@ sal_Bool FmGridControl::selectBookmarks(const Sequence< Any >& _rBookmarks) } catch(Exception&) { - DBG_ERROR("FmGridControl::selectBookmarks: could not move to one of the bookmarks!"); + OSL_FAIL("FmGridControl::selectBookmarks: could not move to one of the bookmarks!"); return sal_False; } @@ -1922,7 +1922,7 @@ Sequence< Any> FmGridControl::getSelectionBookmarks() } #ifdef DBG_UTIL else - DBG_ERROR("FmGridControl::DeleteSelectedRows : a bookmark could not be determined !"); + OSL_FAIL("FmGridControl::DeleteSelectedRows : a bookmark could not be determined !"); #endif } } diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index dde2938e955f..894f1a702cc4 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -207,7 +207,7 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< ::com::s case TYPE_TIMEFIELD: pCellControl = new DbTimeField(*this); break; case TYPE_FORMATTEDFIELD: pCellControl = new DbFormattedField(*this); break; default: - DBG_ERROR("DbGridColumn::CreateControl: Unknown Column"); + OSL_FAIL("DbGridColumn::CreateControl: Unknown Column"); return; } @@ -598,7 +598,7 @@ DbCellControl::DbCellControl( DbGridColumn& _rColumn, sal_Bool /*_bText*/ ) } catch( const Exception& ) { - DBG_ERROR( "DbCellControl::doPropertyListening: caught an exception!" ); + OSL_FAIL( "DbCellControl::doPropertyListening: caught an exception!" ); } } } @@ -622,7 +622,7 @@ void DbCellControl::implDoPropertyListening( const ::rtl::OUString& _rPropertyNa } catch( const Exception& ) { - DBG_ERROR( "DbCellControl::doPropertyListening: caught an exception!" ); + OSL_FAIL( "DbCellControl::doPropertyListening: caught an exception!" ); } } @@ -1481,7 +1481,7 @@ void DbFormattedField::Init( Window& rParent, const Reference< XRowSet >& xCurso } } default: - DBG_ERROR( "DbFormattedField::Init: unexpected value type!" ); + OSL_FAIL( "DbFormattedField::Init: unexpected value type!" ); break; } } @@ -3187,7 +3187,7 @@ XubString DbFilterField::GetFormatText(const Reference< XColumn >& /*_rxField*/, //------------------------------------------------------------------ void DbFilterField::UpdateFromField(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/) { - DBG_ERROR( "DbFilterField::UpdateFromField: cannot update a filter control from a field!" ); + OSL_FAIL( "DbFilterField::UpdateFromField: cannot update a filter control from a field!" ); } //------------------------------------------------------------------ diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index c09cb47e71ff..43555328a9d2 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2169,7 +2169,7 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow) } else { - DBG_ERROR("DbGridControl::SetCurrent : SeekRow failed !"); + OSL_FAIL("DbGridControl::SetCurrent : SeekRow failed !"); EndCursorAction(); return sal_False; } @@ -2504,7 +2504,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) } catch(Exception&) { - DBG_ERROR("DbGridControl::SeekCursor : failed ..."); + OSL_FAIL("DbGridControl::SeekCursor : failed ..."); } try @@ -2524,7 +2524,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) } catch(Exception&) { - DBG_ERROR("DbGridControl::SeekCursor : failed ..."); + OSL_FAIL("DbGridControl::SeekCursor : failed ..."); m_nSeekPos = -1; // kein Datensatz mehr vorhanden } } @@ -3615,7 +3615,7 @@ sal_uInt16 DbGridControl::GetColumnIdFromModelPos( sal_uInt16 nPos ) const { if (nPos >= m_aColumns.size()) { - DBG_ERROR("DbGridControl::GetColumnIdFromModelPos : invalid argument !"); + OSL_FAIL("DbGridControl::GetColumnIdFromModelPos : invalid argument !"); return (sal_uInt16)-1; } @@ -3832,14 +3832,14 @@ void DbGridControl::FieldListenerDisposing(sal_uInt16 _nId) ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners; if (!pListeners) { - DBG_ERROR("DbGridControl::FieldListenerDisposing : invalid call (have no listener array) !"); + OSL_FAIL("DbGridControl::FieldListenerDisposing : invalid call (have no listener array) !"); return; } ColumnFieldValueListenersIterator aPos = pListeners->find(_nId); if (aPos == pListeners->end()) { - DBG_ERROR("DbGridControl::FieldListenerDisposing : invalid call (did not find the listener) !"); + OSL_FAIL("DbGridControl::FieldListenerDisposing : invalid call (did not find the listener) !"); return; } diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index b92f39caa6d1..72d21ee3a786 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -124,7 +124,7 @@ OSystemParseContext::~OSystemParseContext() case KEY_FUSION: nIndex = 22; break; case KEY_INTERSECTION: nIndex = 23; break; case KEY_NONE: - DBG_ERROR( "OSystemParseContext::getIntlKeywordAscii: illegal argument!" ); + OSL_FAIL( "OSystemParseContext::getIntlKeywordAscii: illegal argument!" ); break; } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 793e4b207526..b87c77d6a145 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1364,7 +1364,7 @@ namespace svxform break; } default: - DBG_ERROR( "XFormsPage::SetModel: unknown group!" ); + OSL_FAIL( "XFormsPage::SetModel: unknown group!" ); break; } @@ -2791,7 +2791,7 @@ namespace svxform m_eItemType = DITText; break; default: - DBG_ERROR( "AddDataItemDialog::InitFronNode: cannot handle this node type!" ); + OSL_FAIL( "AddDataItemDialog::InitFronNode: cannot handle this node type!" ); break; } diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index b146ae16d537..7f237e232166 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -258,7 +258,7 @@ FmPropBrw::FmPropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBinding } catch (Exception&) { - DBG_ERROR("FmPropBrw::FmPropBrw: could not create/initialize my frame!"); + OSL_FAIL("FmPropBrw::FmPropBrw: could not create/initialize my frame!"); m_xMeAsFrame.clear(); } @@ -719,7 +719,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool } catch (Exception&) { - DBG_ERROR("FmPropBrw::StateChanged: Exception occurred!"); + OSL_FAIL("FmPropBrw::StateChanged: Exception occurred!"); } m_bInStateChange = false; } diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index 3f52a854c850..4814dbb76239 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -163,7 +163,7 @@ namespace svxform } else { - DBG_ERROR( "OControlTransferData::OControlTransferData: invalid data for the control path format (2)!" ); + OSL_FAIL( "OControlTransferData::OControlTransferData: invalid data for the control path format (2)!" ); } } if ( OControlExchange::hasHiddenControlModelsFormat( aExchangedData.GetDataFlavorExVector() ) ) diff --git a/svx/source/form/fmitems.cxx b/svx/source/form/fmitems.cxx index 0b388cdb52c4..aca4c9b521e4 100644 --- a/svx/source/form/fmitems.cxx +++ b/svx/source/form/fmitems.cxx @@ -54,14 +54,14 @@ SfxPoolItem* FmInterfaceItem::Clone( SfxItemPool* ) const //------------------------------------------------------------------------------ SvStream& FmInterfaceItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - DBG_ERROR( "FmInterfaceItem::Store: not implemented!" ); + OSL_FAIL( "FmInterfaceItem::Store: not implemented!" ); return rStrm; } //------------------------------------------------------------------------------ SfxPoolItem* FmInterfaceItem::Create( SvStream& /*rStrm*/, sal_uInt16 ) const { - DBG_ERROR( "FmInterfaceItem::Create: not implemented!" ); + OSL_FAIL( "FmInterfaceItem::Create: not implemented!" ); return new FmInterfaceItem( *this ); } diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 5f8f2e6ab526..70acb5f834cf 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -507,7 +507,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > } catch(Exception&) { - DBG_ERROR("FmFormObj::ensureModelEnv : could not retrieve a source DSS !"); + OSL_FAIL("FmFormObj::ensureModelEnv : could not retrieve a source DSS !"); } @@ -536,7 +536,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > } catch(Exception&) { - DBG_ERROR("FmFormObj::ensureModelEnv : exception while getting a sibling's DSS !"); + OSL_FAIL("FmFormObj::ensureModelEnv : exception while getting a sibling's DSS !"); } } @@ -567,7 +567,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > } catch(Exception&) { - DBG_ERROR("FmFormObj::ensureModelEnv : exception while getting a destination DSS !"); + OSL_FAIL("FmFormObj::ensureModelEnv : exception while getting a destination DSS !"); } } @@ -593,7 +593,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > } catch(Exception&) { - DBG_ERROR("FmFormObj::ensureModelEnv : something went seriously wrong while creating a new form !"); + OSL_FAIL("FmFormObj::ensureModelEnv : something went seriously wrong while creating a new form !"); // no more options anymore ... return Reference< XInterface > (); } diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx index 7d71331acf00..53873d5cad15 100644 --- a/svx/source/form/fmobjfac.cxx +++ b/svx/source/form/fmobjfac.cxx @@ -130,7 +130,7 @@ namespace } catch( const Exception& ) { - DBG_ERROR( "lcl_initProperty: caught an exception!" ); + OSL_FAIL( "lcl_initProperty: caught an exception!" ); } } } diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 827a2f3bcfcf..1db070d367e5 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -1219,7 +1219,7 @@ void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich) } catch( const Exception& ) { - DBG_ERROR( "FmFormShell::GetFormState: caught an exception while determining the state!" ); + OSL_FAIL( "FmFormShell::GetFormState: caught an exception while determining the state!" ); } if (!bEnable) rSet.DisableItem(nWhich); diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 90c9225be87f..dc8a25c76527 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1254,7 +1254,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent xIndexParent->replaceByIndex(nIndex, aNewModel); else { - DBG_ERROR("FmXFormShell::executeControlConversionSlot: could not replace the model !"); + OSL_FAIL("FmXFormShell::executeControlConversionSlot: could not replace the model !"); Reference< ::com::sun::star::lang::XComponent> xNewComponent(xNewModel, UNO_QUERY); if (xNewComponent.is()) xNewComponent->dispose(); @@ -1263,7 +1263,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent } catch(Exception&) { - DBG_ERROR("FmXFormShell::executeControlConversionSlot: could not replace the model !"); + OSL_FAIL("FmXFormShell::executeControlConversionSlot: could not replace the model !"); Reference< ::com::sun::star::lang::XComponent> xNewComponent(xNewModel, UNO_QUERY); if (xNewComponent.is()) xNewComponent->dispose(); @@ -1766,7 +1766,7 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) } catch(Exception&) { - DBG_ERROR("FmXFormShell::SetY2KState: Exception occurred!"); + OSL_FAIL("FmXFormShell::SetY2KState: Exception occurred!"); } } @@ -1807,7 +1807,7 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) } catch(Exception&) { - DBG_ERROR("FmXFormShell::SetY2KState: Exception occurred!"); + OSL_FAIL("FmXFormShell::SetY2KState: Exception occurred!"); } } @@ -3194,7 +3194,7 @@ void FmXFormShell::stopFiltering(sal_Bool bSave) } catch(Exception&) { - DBG_ERROR("FmXFormShell::stopFiltering : could not get the original filter !"); + OSL_FAIL("FmXFormShell::stopFiltering : could not get the original filter !"); // put dummies into the arrays so the they have the right size if (aOriginalFilters.size() == aOriginalApplyFlags.size()) @@ -3231,7 +3231,7 @@ void FmXFormShell::stopFiltering(sal_Bool bSave) } catch(Exception&) { - DBG_ERROR("FmXFormShell::stopFiltering: Exception occurred!"); + OSL_FAIL("FmXFormShell::stopFiltering: Exception occurred!"); } if (!isRowSetAlive(xFormSet)) @@ -3730,7 +3730,7 @@ void FmXFormShell::CreateExternalView() #ifdef DBG_UTIL else { - DBG_ERROR("FmXFormShell::CreateExternalView : could not create the external form view !"); + OSL_FAIL("FmXFormShell::CreateExternalView : could not create the external form view !"); } #endif InvalidateSlot( SID_FM_VIEW_AS_GRID, sal_False ); @@ -3940,7 +3940,7 @@ void FmXFormShell::smartControlReset( const Reference< XIndexAccess >& _rxModels RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::smartControlReset" ); if (!_rxModels.is()) { - DBG_ERROR("FmXFormShell::smartControlReset: invalid container!"); + OSL_FAIL("FmXFormShell::smartControlReset: invalid container!"); return; } @@ -4324,7 +4324,7 @@ void ControlConversionMenuController::StateChanged(sal_uInt16 nSID, SfxItemState } else { - DBG_ERROR("ControlConversionMenuController::StateChanged : unknown id !"); + OSL_FAIL("ControlConversionMenuController::StateChanged : unknown id !"); } } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index b0023385db27..4bd9be0d70f2 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -277,7 +277,7 @@ sal_Bool FmSearchEngine::MoveCursor() } catch(...) { - DBG_ERROR("FmSearchEngine::MoveCursor : catched an unknown Exception !"); + OSL_FAIL("FmSearchEngine::MoveCursor : catched an unknown Exception !"); bSuccess = sal_False; } @@ -913,7 +913,7 @@ void FmSearchEngine::Init(const ::rtl::OUString& sVisibleFields) } catch(Exception&) { - DBG_ERROR("Exception occurred!"); + OSL_FAIL("Exception occurred!"); } } @@ -1023,7 +1023,7 @@ void FmSearchEngine::SearchNextImpl() case MATCHING_WHOLETEXT : break; default : - DBG_ERROR("FmSearchEngine::SearchNextImpl() : die Methoden-Listbox duerfte nur 4 Eintraege enthalten ..."); + OSL_FAIL("FmSearchEngine::SearchNextImpl() : die Methoden-Listbox duerfte nur 4 Eintraege enthalten ..."); } } } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index a1a3f1592f68..67f8e7dc8b07 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -434,7 +434,7 @@ namespace svx } else { - DBG_ERROR( "lcl_translateUnoStateToItem: invalid state!" ); + OSL_FAIL( "lcl_translateUnoStateToItem: invalid state!" ); } } } diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 432213384298..c92a94c83f7f 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -220,7 +220,7 @@ sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAcce } catch(Exception&) { - DBG_ERROR( "getElementPos: caught an exception!" ); + OSL_FAIL( "getElementPos: caught an exception!" ); } } @@ -446,7 +446,7 @@ sal_Int16 getControlTypeByObject(const Reference< ::com::sun::star::lang::XServi return OBJ_FM_IMAGECONTROL; if (sPersistentServiceName.equals(FM_COMPONENT_FORMATTEDFIELD)) { - DBG_ERROR("::getControlTypeByObject : suspicious persistent service name (formatted field) !"); + OSL_FAIL("::getControlTypeByObject : suspicious persistent service name (formatted field) !"); // objects with that service name should exist as they aren't compatible with older versions return OBJ_FM_FORMATTEDFIELD; } @@ -457,7 +457,7 @@ sal_Int16 getControlTypeByObject(const Reference< ::com::sun::star::lang::XServi if (sPersistentServiceName.equals(FM_SUN_COMPONENT_NAVIGATIONBAR)) return OBJ_FM_NAVIGATIONBAR; - DBG_ERROR("::getControlTypeByObject : unknown object type !"); + OSL_FAIL("::getControlTypeByObject : unknown object type !"); return OBJ_FM_CONTROL; } @@ -475,7 +475,7 @@ void setConnection(const Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet, } catch(Exception&) { - DBG_ERROR("::setConnection : could not set the connection !"); + OSL_FAIL("::setConnection : could not set the connection !"); } } diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 7dfbea35000b..8472a38dc8de 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -1336,7 +1336,7 @@ void FmUndoModelReplaceAction::Undo() } catch(Exception&) { - DBG_ERROR("FmUndoModelReplaceAction::Undo : could not replace the model !"); + OSL_FAIL("FmUndoModelReplaceAction::Undo : could not replace the model !"); } } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 2af37dccd535..4556679dbebd 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -723,7 +723,7 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/) if ( !m_pView ) { - DBG_ERROR( "FmXFormView::OnActivate: well .... seems we have a timing problem (the view already died)!" ); + OSL_FAIL( "FmXFormView::OnActivate: well .... seems we have a timing problem (the view already died)!" ); return 0; } @@ -1182,7 +1182,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript ) ) { - DBG_ERROR( "FmXFormView::implCreateFieldControl: nonsense!" ); + OSL_FAIL( "FmXFormView::implCreateFieldControl: nonsense!" ); } Reference< XDataSource > xDataSource; @@ -1223,7 +1223,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript // need a data source and a connection here if (!xDataSource.is() || !xConnection.is()) { - DBG_ERROR("FmXFormView::implCreateFieldControl : could not retrieve the data source or the connection!"); + OSL_FAIL("FmXFormView::implCreateFieldControl : could not retrieve the data source or the connection!"); return NULL; } @@ -1509,7 +1509,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const ::svx::OXFormsDescriptor } catch(const Exception&) { - DBG_ERROR("FmXFormView::implCreateXFormsControl: caught an exception while creating the control !"); + OSL_FAIL("FmXFormView::implCreateXFormsControl: caught an exception while creating the control !"); } @@ -1763,7 +1763,7 @@ void FmXFormView::startMarkListWatching() } else { - DBG_ERROR( "FmXFormView::startMarkListWatching: already listening!" ); + OSL_FAIL( "FmXFormView::startMarkListWatching: already listening!" ); } } @@ -1810,7 +1810,7 @@ void FmXFormView::saveMarkList( sal_Bool _bSmartUnmark ) } else { - DBG_ERROR( "FmXFormView::saveMarkList: invalid view!" ); + OSL_FAIL( "FmXFormView::saveMarkList: invalid view!" ); m_aMark = SdrMarkList(); } } diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index bb3f5c2b164f..a9c290019fc0 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -626,7 +626,7 @@ namespace svxform aValue <<= (sal_Int32)nMinValue; else { - DBG_ERROR( "FormControlFactory::initializeFieldDependentProperties: unexpected property type (MinValue)!" ); + OSL_FAIL( "FormControlFactory::initializeFieldDependentProperties: unexpected property type (MinValue)!" ); } _rxControlModel->setPropertyValue( FM_PROP_VALUEMIN, aValue ); @@ -638,7 +638,7 @@ namespace svxform aValue <<= (sal_Int32)nMaxValue; else { - DBG_ERROR( "FormControlFactory::initializeFieldDependentProperties: unexpected property type (MaxValue)!" ); + OSL_FAIL( "FormControlFactory::initializeFieldDependentProperties: unexpected property type (MaxValue)!" ); } _rxControlModel->setPropertyValue( FM_PROP_VALUEMAX, aValue ); } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 36a5f301e9a5..c3a3f9fbd22f 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3971,7 +3971,7 @@ sal_Bool SAL_CALL FormController::approveParameter(const DatabaseParameterEvent& Sequence< PropertyValue > aFinalValues = pParamValues->getValues(); if (aFinalValues.getLength() != aRequest.Parameters->getCount()) { - DBG_ERROR("FormController::approveParameter: the InteractionHandler returned nonsense!"); + OSL_FAIL("FormController::approveParameter: the InteractionHandler returned nonsense!"); return sal_False; } const PropertyValue* pFinalValues = aFinalValues.getConstArray(); @@ -3989,7 +3989,7 @@ sal_Bool SAL_CALL FormController::approveParameter(const DatabaseParameterEvent& try { xParam->setPropertyValue(FM_PROP_VALUE, pFinalValues->Value); } catch(Exception&) { - DBG_ERROR("FormController::approveParameter: setting one of the properties failed!"); + OSL_FAIL("FormController::approveParameter: setting one of the properties failed!"); } } } @@ -4163,7 +4163,7 @@ void SAL_CALL FormController::dispatch( const URL& _rURL, const Sequence< Proper { if ( _rArgs.getLength() != 1 ) { - DBG_ERROR( "FormController::dispatch: no arguments -> no dispatch!" ); + OSL_FAIL( "FormController::dispatch: no arguments -> no dispatch!" ); return; } @@ -4178,12 +4178,12 @@ void SAL_CALL FormController::dispatch( const URL& _rURL, const Sequence< Proper if ( _rURL.Complete == FMURL_CONFIRM_DELETION ) { - DBG_ERROR( "FormController::dispatch: How do you expect me to return something via this call?" ); + OSL_FAIL( "FormController::dispatch: How do you expect me to return something via this call?" ); // confirmDelete has a return value - dispatch hasn't return; } - DBG_ERROR( "FormController::dispatch: unknown URL!" ); + OSL_FAIL( "FormController::dispatch: unknown URL!" ); } //------------------------------------------------------------------------------ @@ -4236,7 +4236,7 @@ Reference< XDispatchProviderInterceptor > FormController::createInterceptor(con ) { if ((*aIter)->getIntercepted() == _xInterception) - DBG_ERROR("FormController::createInterceptor : we already do intercept this objects dispatches !"); + OSL_FAIL("FormController::createInterceptor : we already do intercept this objects dispatches !"); } #endif diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index df01af4bfa0d..989c6d064fdd 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1319,7 +1319,7 @@ namespace svxform } catch( const Exception& ) { - DBG_ERROR( "NavigatorTree::doPaste: caught an exception!" ); + OSL_FAIL( "NavigatorTree::doPaste: caught an exception!" ); } } @@ -1459,7 +1459,7 @@ namespace svxform } catch ( const Exception& ) { - DBG_ERROR("NavigatorTree::NewForm : could not set esssential properties !"); + OSL_FAIL("NavigatorTree::NewForm : could not set esssential properties !"); } diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index b792200956d8..6f9c15985ae2 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -177,7 +177,7 @@ namespace svxform } else if (pEntryData->ISA(FmFormData)) { - DBG_ERROR("replacing forms not implemented yet !"); + OSL_FAIL("replacing forms not implemented yet !"); } } @@ -352,7 +352,7 @@ namespace svxform } else { - DBG_ERROR("NavigatorTreeModel::Insert : the parent container needs an elementtype I don't know !"); + OSL_FAIL("NavigatorTreeModel::Insert : the parent container needs an elementtype I don't know !"); } if( bUndo ) diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 5c8ddbd0f662..9ff18f6e4b4e 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -423,7 +423,7 @@ void FmFieldWin::UpdateContent(const ::com::sun::star::uno::Reference< ::com::su } catch( const Exception& ) { - DBG_ERROR( "FmTabWin::UpdateContent: caught an exception!" ); + OSL_FAIL( "FmTabWin::UpdateContent: caught an exception!" ); } } diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 38f5bb87695a..3dbe5ed98111 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -130,7 +130,7 @@ void GalleryBackgroundPopup::StateChanged( USHORT nSID, SfxItemState eState, con InsertItem( 1, pStrItem->GetValue() ); else { - DBG_ERROR( "SgaBGPopup::StateChanged(...): Wrong item type!" ); + OSL_FAIL( "SgaBGPopup::StateChanged(...): Wrong item type!" ); } } } diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 41dc47386f3a..0f23cb5733c9 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -161,7 +161,7 @@ BOOL GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) if( 1 == nVersion ) { - DBG_ERROR( "staroffice binary file formats are no longer supported inside the gallery!" ); + OSL_FAIL( "staroffice binary file formats are no longer supported inside the gallery!" ); bRet = false; } else if( 2 == nVersion ) @@ -529,7 +529,7 @@ void GalleryTransferable::InitData( bool bLazy ) break; default: - DBG_ERROR( "GalleryTransferable::GalleryTransferable: invalid object type" ); + OSL_FAIL( "GalleryTransferable::GalleryTransferable: invalid object type" ); break; } } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 0ea06ceae6d1..c22bfbafef96 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -695,7 +695,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg } else { - DBG_ERROR( "File(s) could not be opened" ); + OSL_FAIL( "File(s) could not be opened" ); } delete pIStm; diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 87aa79c3aec3..26423924dea1 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -85,7 +85,7 @@ SV_DECL_PTRARR(SdrObjArray, SdrObject*, 32, 16) DECLARE_STL_VECTOR( ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > ,FmFormArray); // catch databse exceptions if occur -#define DO_SAFE(statement) try { statement; } catch( const Exception& ) { DBG_ERROR("unhandled exception (I tried to move a cursor (or something like that).)"); } +#define DO_SAFE(statement) try { statement; } catch( const Exception& ) { OSL_FAIL("unhandled exception (I tried to move a cursor (or something like that).)"); } #define GA_DISABLE_SYNC 1 #define GA_FORCE_SYNC 2 diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index 92a955779d3b..8d257e823656 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -365,7 +365,7 @@ bool SvxMarginItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nBottomMargin) : nBottomMargin ); break; default: - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); return false; } return true; @@ -396,7 +396,7 @@ bool SvxMarginItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) nBottomMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal ); break; default: - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); return false; } return true; diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 2296818739a4..5e1f9433decc 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -281,7 +281,7 @@ sal_Bool SvxNumberFormatShell::AddFormat( String& rFormat, xub_StrLen& rErrPos, } else { - DBG_ERROR( "Doppeltes Format!" ); + OSL_FAIL( "Doppeltes Format!" ); } } else // neues Format @@ -311,7 +311,7 @@ sal_Bool SvxNumberFormatShell::AddFormat( String& rFormat, xub_StrLen& rErrPos, } else // Doppelt einfuegen nicht moeglich { - DBG_ERROR( "Doppeltes Format!" ); // oder doch? + OSL_FAIL( "Doppeltes Format!" ); // oder doch? } return bInserted; @@ -1487,7 +1487,7 @@ short SvxNumberFormatShell::GetListPos4Entry(sal_uInt32 nIdx) } else { - DBG_ERROR("svx::SvxNumberFormatShell::GetListPos4Entry(), list got to large!" ); + OSL_FAIL("svx::SvxNumberFormatShell::GetListPos4Entry(), list got to large!" ); } return nSelP; } diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index 2471a61422d4..9b2c76cc3778 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -191,7 +191,7 @@ bool SvxPageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case SVX_PAGE_ALL : eRet = style::PageStyleLayout_ALL; break; case SVX_PAGE_MIRROR: eRet = style::PageStyleLayout_MIRRORED; break; default: - DBG_ERROR("was fuer ein Layout ist das?"); + OSL_FAIL("was fuer ein Layout ist das?"); return sal_False; } rVal <<= eRet; diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx index 502ee16bdfa7..aa38870bf0aa 100644 --- a/svx/source/items/rotmodit.cxx +++ b/svx/source/items/rotmodit.cxx @@ -113,7 +113,7 @@ String SvxRotateModeItem::GetValueText( USHORT nVal ) const aText.AppendAscii("..."); break; default: - DBG_ERROR("SvxRotateModeItem: falscher enum"); + OSL_FAIL("SvxRotateModeItem: falscher enum"); break; } return aText; diff --git a/svx/source/items/viewlayoutitem.cxx b/svx/source/items/viewlayoutitem.cxx index 408501fc67e4..a56423bbf753 100644 --- a/svx/source/items/viewlayoutitem.cxx +++ b/svx/source/items/viewlayoutitem.cxx @@ -131,7 +131,7 @@ bool SvxViewLayoutItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember case MID_VIEWLAYOUT_COLUMNS : rVal <<= (sal_Int32) GetValue(); break; case MID_VIEWLAYOUT_BOOKMODE: rVal <<= (sal_Bool) mbBookMode; break; default: - DBG_ERROR("svx::SvxViewLayoutItem::QueryValue(), Wrong MemberId!"); + OSL_FAIL("svx::SvxViewLayoutItem::QueryValue(), Wrong MemberId!"); return false; } @@ -203,7 +203,7 @@ bool SvxViewLayoutItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMe } default: - DBG_ERROR("svx::SvxViewLayoutItem::PutValue(), Wrong MemberId!"); + OSL_FAIL("svx::SvxViewLayoutItem::PutValue(), Wrong MemberId!"); return false; } diff --git a/svx/source/items/zoomitem.cxx b/svx/source/items/zoomitem.cxx index 6f81bab90fb4..b55bce7505b6 100644 --- a/svx/source/items/zoomitem.cxx +++ b/svx/source/items/zoomitem.cxx @@ -139,7 +139,7 @@ bool SvxZoomItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) c case MID_VALUESET: rVal <<= (sal_Int16) nValueSet; break; case MID_TYPE: rVal <<= (sal_Int16) eType; break; default: - DBG_ERROR("svx::SvxZoomItem::QueryValue(), Wrong MemberId!"); + OSL_FAIL("svx::SvxZoomItem::QueryValue(), Wrong MemberId!"); return false; } @@ -222,7 +222,7 @@ bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId } default: - DBG_ERROR("svx::SvxZoomItem::PutValue(), Wrong MemberId!"); + OSL_FAIL("svx::SvxZoomItem::PutValue(), Wrong MemberId!"); return false; } diff --git a/svx/source/items/zoomslideritem.cxx b/svx/source/items/zoomslideritem.cxx index 1999fede5218..e68af5d4250f 100644 --- a/svx/source/items/zoomslideritem.cxx +++ b/svx/source/items/zoomslideritem.cxx @@ -150,7 +150,7 @@ bool SvxZoomSliderItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember } break; default: - DBG_ERROR("svx::SvxZoomSliderItem::QueryValue(), Wrong MemberId!"); + OSL_FAIL("svx::SvxZoomSliderItem::QueryValue(), Wrong MemberId!"); return false; } @@ -259,7 +259,7 @@ bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMe return false; } default: - DBG_ERROR("svx::SvxZoomSliderItem::PutValue(), Wrong MemberId!"); + OSL_FAIL("svx::SvxZoomSliderItem::PutValue(), Wrong MemberId!"); return false; } diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index 9a379a6e31af..7a24a508935d 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -210,7 +210,7 @@ namespace sdr ViewContact& ViewContact::GetViewContact(sal_uInt32 /*nIndex*/) const { // This is the default implementation; call would be an error - DBG_ERROR("ViewContact::GetViewContact: This call needs to be overloaded when GetObjectCount() can return results != 0 (!)"); + OSL_FAIL("ViewContact::GetViewContact: This call needs to be overloaded when GetObjectCount() can return results != 0 (!)"); return (ViewContact&)(*this); } @@ -275,7 +275,7 @@ namespace sdr // providing a seqence of primitives -> which cannot be correct. // Since we have no access to any known model data here, the default implementation creates a yellow placeholder // hairline polygon with a default size of (1000, 1000, 5000, 3000) - DBG_ERROR("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback base implementation, this is always an error (!)"); + OSL_FAIL("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback base implementation, this is always an error (!)"); const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0))); const basegfx::BColor aYellow(1.0, 1.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference xReference( diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index 01592c27fdc5..49c19047f26e 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -123,7 +123,7 @@ void SvxSelectionModeControl::DrawItemText_Impl() case 3: _nId = RID_SVXSTR_SELMODE_BLK; break; - default: DBG_ERROR( "invalid selection mode!" ); + default: OSL_FAIL( "invalid selection mode!" ); } if ( _nId ) diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 618cde189d5f..4ea30f4b5fec 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -1564,7 +1564,7 @@ const SdrCustomShapeAdjustmentValue& SdrCustomShapeAdjustmentItem::GetValue( sal { #ifdef DBG_UTIL if ( aAdjustmentValueList.Count() <= nIndex ) - DBG_ERROR( "SdrCustomShapeAdjustemntItem::GetValue - nIndex out of range (SJ)" ); + OSL_FAIL( "SdrCustomShapeAdjustemntItem::GetValue - nIndex out of range (SJ)" ); #endif return *(SdrCustomShapeAdjustmentValue*)aAdjustmentValueList.GetObject( nIndex ); } @@ -1669,7 +1669,7 @@ bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const case SDREDGE_BEZIER : eCT = drawing::ConnectorType_CURVE; break; case SDREDGE_ARC : eCT = drawing::ConnectorType_CURVE; break; default: - DBG_ERROR( "SdrEdgeKindItem::QueryValue : unknown enum" ); + OSL_FAIL( "SdrEdgeKindItem::QueryValue : unknown enum" ); } rVal <<= eCT; @@ -1697,7 +1697,7 @@ bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) case drawing::ConnectorType_LINE : eEK = SDREDGE_ONELINE; break; case drawing::ConnectorType_LINES : eEK = SDREDGE_THREELINES; break; default: - DBG_ERROR( "SdrEdgeKindItem::PuValue : unknown enum" ); + OSL_FAIL( "SdrEdgeKindItem::PuValue : unknown enum" ); } SetValue( sal::static_int_cast< USHORT >( eEK ) ); diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 1e9ff63a4b98..8ea6f410cbfe 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -913,7 +913,7 @@ bool SdrDragMovHdl::BeginSdrDrag() { if (pH1==NULL || pH2==NULL) { - DBG_ERROR("SdrDragMovHdl::BeginSdrDrag(): Verschieben der Spiegelachse: Referenzhandles nicht gefunden"); + OSL_FAIL("SdrDragMovHdl::BeginSdrDrag(): Verschieben der Spiegelachse: Referenzhandles nicht gefunden"); return false; } @@ -2049,7 +2049,7 @@ bool SdrDragRotate::BeginSdrDrag() } else { - DBG_ERROR("SdrDragRotate::BeginSdrDrag(): Kein Referenzpunkt-Handle gefunden"); + OSL_FAIL("SdrDragRotate::BeginSdrDrag(): Kein Referenzpunkt-Handle gefunden"); return false; } } @@ -2198,7 +2198,7 @@ bool SdrDragShear::BeginSdrDrag() } else { - DBG_ERROR("SdrDragShear::BeginSdrDrag(): Kein Referenzpunkt-Handle fuer Shear gefunden"); + OSL_FAIL("SdrDragShear::BeginSdrDrag(): Kein Referenzpunkt-Handle fuer Shear gefunden"); return false; } @@ -2492,7 +2492,7 @@ bool SdrDragMirror::BeginSdrDrag() } else { - DBG_ERROR("SdrDragMirror::BeginSdrDrag(): Spiegelachse nicht gefunden"); + OSL_FAIL("SdrDragMirror::BeginSdrDrag(): Spiegelachse nicht gefunden"); return false; } } @@ -2633,7 +2633,7 @@ bool SdrDragGradient::BeginSdrDrag() } else { - DBG_ERROR("SdrDragGradient::BeginSdrDrag(): IAOGradient nicht gefunden"); + OSL_FAIL("SdrDragGradient::BeginSdrDrag(): IAOGradient nicht gefunden"); } return bRetval; diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index f2860deca98d..6ceeae4e3912 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -820,7 +820,7 @@ BOOL SdrDragView::BegInsGluePoint(const Point& rPnt) } else { - DBG_ERROR("BegInsGluePoint(): GluePoint-Handle nicht gefunden"); + OSL_FAIL("BegInsGluePoint(): GluePoint-Handle nicht gefunden"); } } else diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 9b8d3beb948c..386d2608bac0 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -147,7 +147,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, BOOL bCopy) } pO->SetSnapRect(aR1); } else { - DBG_ERROR("SetMarkedObjRect(): pObj->GetSnapRect() liefert leeres Rect"); + OSL_FAIL("SetMarkedObjRect(): pObj->GetSnapRect() liefert leeres Rect"); } } if( bUndo ) diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 994f9a6f5a1c..efbb46ad62f4 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -146,7 +146,7 @@ void SdrEditView::MovMarkedToTop() SdrObject* pCmpObj=pOL->GetObj(nCmpPos); if (pCmpObj==NULL) { - DBG_ERROR("MovMarkedToTop(): Vergleichsobjekt nicht gefunden"); + OSL_FAIL("MovMarkedToTop(): Vergleichsobjekt nicht gefunden"); bEnd=TRUE; } else if (pCmpObj==pMaxObj) @@ -235,7 +235,7 @@ void SdrEditView::MovMarkedToBtm() SdrObject* pCmpObj=pOL->GetObj(nCmpPos); if (pCmpObj==NULL) { - DBG_ERROR("MovMarkedToBtm(): Vergleichsobjekt nicht gefunden"); + OSL_FAIL("MovMarkedToBtm(): Vergleichsobjekt nicht gefunden"); bEnd=TRUE; } else if (pCmpObj==pMaxObj) diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 4b01dc861e82..a6155954aee0 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -586,7 +586,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit( if(pTextEditOutliner) { - DBG_ERROR("SdrObjEditView::SdrBeginTextEdit() da stand noch ein alter Outliner rum"); + OSL_FAIL("SdrObjEditView::SdrBeginTextEdit() da stand noch ein alter Outliner rum"); delete pTextEditOutliner; pTextEditOutliner = 0L; } diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 77e61798d969..2e3a4388c7e8 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -478,10 +478,10 @@ void SdrLinkList::InsertLink(const Link& rLink, unsigned nPos) if (rLink.IsSet()) { aList.Insert(new Link(rLink),nPos); } else { - DBG_ERROR("SdrLinkList::InsertLink(): Versuch, einen nicht gesetzten Link einzufuegen"); + OSL_FAIL("SdrLinkList::InsertLink(): Versuch, einen nicht gesetzten Link einzufuegen"); } } else { - DBG_ERROR("SdrLinkList::InsertLink(): Link schon vorhanden"); + OSL_FAIL("SdrLinkList::InsertLink(): Link schon vorhanden"); } } @@ -492,7 +492,7 @@ void SdrLinkList::RemoveLink(const Link& rLink) Link* pLink=(Link*)aList.Remove(nFnd); delete pLink; } else { - DBG_ERROR("SdrLinkList::RemoveLink(): Link nicht gefunden"); + OSL_FAIL("SdrLinkList::RemoveLink(): Link nicht gefunden"); } } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index e7bc6010d280..b06a3dd8db07 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -142,7 +142,7 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, UIN { default: { - DBG_ERROR( "unknown kind of marker" ); + OSL_FAIL( "unknown kind of marker" ); // no break here, return Rect_7x7 as default } case Rect_7x7: diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 513c923474ae..0440a9fe0bb7 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -285,7 +285,7 @@ SdrModel::SdrModel(const SdrModel& /*rSrcModel*/): #endif // noch nicht implementiert - DBG_ERROR("SdrModel::CopyCtor() ist noch nicht implementiert"); + OSL_FAIL("SdrModel::CopyCtor() ist noch nicht implementiert"); } SdrModel::~SdrModel() @@ -394,12 +394,12 @@ const SvNumberFormatter& SdrModel::GetNumberFormatter() const // noch nicht implementiert: void SdrModel::operator=(const SdrModel& /*rSrcModel*/) { - DBG_ERROR("SdrModel::operator=() ist noch nicht implementiert"); + OSL_FAIL("SdrModel::operator=() ist noch nicht implementiert"); } bool SdrModel::operator==(const SdrModel& /*rCmpModel*/) const { - DBG_ERROR("SdrModel::operator==() ist noch nicht implementiert"); + OSL_FAIL("SdrModel::operator==() ist noch nicht implementiert"); return FALSE; } @@ -454,7 +454,7 @@ bool SdrModel::Undo() bool bRet = false; if( mpImpl->mpUndoManager ) { - DBG_ERROR("svx::SdrModel::Undo(), method not supported with application undo manager!"); + OSL_FAIL("svx::SdrModel::Undo(), method not supported with application undo manager!"); } else { @@ -478,7 +478,7 @@ bool SdrModel::Redo() bool bRet=FALSE; if( mpImpl->mpUndoManager ) { - DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!"); + OSL_FAIL("svx::SdrModel::Redo(), method not supported with application undo manager!"); } else { @@ -502,7 +502,7 @@ bool SdrModel::Repeat(SfxRepeatTarget& rView) bool bRet = false; if( mpImpl->mpUndoManager ) { - DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!"); + OSL_FAIL("svx::SdrModel::Redo(), method not supported with application undo manager!"); } else { @@ -617,7 +617,7 @@ void SdrModel::BegUndo(SdrUndoGroup* pUndoGrp) { if( mpImpl->mpUndoManager ) { - DBG_ERROR("svx::SdrModel::BegUndo(), method not supported with application undo manager!" ); + OSL_FAIL("svx::SdrModel::BegUndo(), method not supported with application undo manager!" ); nUndoLevel++; } else if( IsUndoEnabled() ) @@ -680,7 +680,7 @@ void SdrModel::SetUndoComment(const XubString& rComment) if( mpImpl->mpUndoManager ) { - DBG_ERROR("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" ); + OSL_FAIL("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" ); } else if( IsUndoEnabled() ) { @@ -696,7 +696,7 @@ void SdrModel::SetUndoComment(const XubString& rComment, const XubString& rObjDe DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is 0!"); if( mpImpl->mpUndoManager ) { - DBG_ERROR("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" ); + OSL_FAIL("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" ); } else { @@ -1776,7 +1776,7 @@ void SdrModel::Merge(SdrModel& rSourceModel, bMPgNumsDirty=TRUE; if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoNewPage(*pPg)); } else { - DBG_ERROR("SdrModel::Merge(): MasterPage im SourceModel nicht gefunden"); + OSL_FAIL("SdrModel::Merge(): MasterPage im SourceModel nicht gefunden"); } } } @@ -1833,7 +1833,7 @@ void SdrModel::Merge(SdrModel& rSourceModel, } } else { - DBG_ERROR("SdrModel::Merge(): Zeichenseite im SourceModel nicht gefunden"); + OSL_FAIL("SdrModel::Merge(): Zeichenseite im SourceModel nicht gefunden"); } nDestPos++; if (bReverse) nSourcePos--; @@ -1882,7 +1882,7 @@ void SdrModel::setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star:: uno::Reference< uno::XInterface > SdrModel::createUnoModel() { - DBG_ERROR( "SdrModel::createUnoModel() - base implementation should not be called!" ); + OSL_FAIL( "SdrModel::createUnoModel() - base implementation should not be called!" ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt; return xInt; } diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index 025e0b71f509..6f3f0a658d69 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -264,7 +264,7 @@ BOOL SdrMarkView::MarkPoints(const Rectangle* pRect, BOOL bUnmark) } else { #ifdef DBG_UTIL if (pObj->IsInserted()) { - DBG_ERROR("SdrMarkView::MarkPoints(const Rectangle* pRect): Markiertes Objekt nicht gefunden"); + OSL_FAIL("SdrMarkView::MarkPoints(const Rectangle* pRect): Markiertes Objekt nicht gefunden"); } #endif pM=NULL; @@ -402,7 +402,7 @@ void SdrMarkView::UndirtyMrkPnt() const } else { - DBG_ERROR("SdrMarkView::UndirtyMrkPnt(): Markierte Punkte an einem Objekt, dass kein PolyObj ist!"); + OSL_FAIL("SdrMarkView::UndirtyMrkPnt(): Markierte Punkte an einem Objekt, dass kein PolyObj ist!"); if(pPts && pPts->GetCount()) { pPts->Clear(); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 54ee14e348ad..07d3b789a8a4 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -3292,7 +3292,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, } default: { - DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); + OSL_FAIL("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); } } } @@ -3438,7 +3438,7 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba } default: { - DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!"); + OSL_FAIL("TRGetBaseGeometry: Missing unit translation to 100th mm!"); } } } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 4fba6c987d4d..016abd7c6723 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -280,7 +280,7 @@ SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const if (pNeuUserData!=NULL) { pNeuPlusData->pUserDataList->InsertUserData(pNeuUserData); } else { - DBG_ERROR("SdrObjPlusData::Clone(): UserData.Clone() liefert NULL"); + OSL_FAIL("SdrObjPlusData::Clone(): UserData.Clone() liefert NULL"); } } } @@ -2742,7 +2742,7 @@ void SdrObject::InsertUserData(SdrObjUserData* pData, USHORT nPos) if (pPlusData->pUserDataList==NULL) pPlusData->pUserDataList=new SdrObjUserDataList; pPlusData->pUserDataList->InsertUserData(pData,nPos); } else { - DBG_ERROR("SdrObject::InsertUserData(): pData ist NULL-Pointer"); + OSL_FAIL("SdrObject::InsertUserData(): pData ist NULL-Pointer"); } } @@ -2756,7 +2756,7 @@ void SdrObject::DeleteUserData(USHORT nNum) pPlusData->pUserDataList=NULL; } } else { - DBG_ERROR("SdrObject::DeleteUserData(): ungueltiger Index"); + OSL_FAIL("SdrObject::DeleteUserData(): ungueltiger Index"); } } @@ -3022,7 +3022,7 @@ sal_Bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B } default: { - DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!"); + OSL_FAIL("TRGetBaseGeometry: Missing unit translation to 100th mm!"); } } } @@ -3073,7 +3073,7 @@ void SdrObject::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const ba } default: { - DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); + OSL_FAIL("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); } } } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 416a7efc7e16..bf716dc7fd59 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -818,7 +818,7 @@ void SdrCaptionObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons } default: { - DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); + OSL_FAIL("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); } } } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 3262edcb0296..7249d8ba1aa0 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -695,7 +695,7 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons } #ifdef DBG_UTIL if (aXP.GetPointCount()>4) { - DBG_ERROR("SdrEdgeObj::ImpCalcObjToCenter(): Polygon hat mehr als 4 Punkte!"); + OSL_FAIL("SdrEdgeObj::ImpCalcObjToCenter(): Polygon hat mehr als 4 Punkte!"); } #endif return aXP; diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 2b5bf25e33ac..f9333a6b89f9 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -892,7 +892,7 @@ bool SdrGrafObj::HasGDIMetaFile() const const GDIMetaFile* SdrGrafObj::GetGDIMetaFile() const { - DBG_ERROR( "Invalid return value! Don't use it! (KA)" ); + OSL_FAIL( "Invalid return value! Don't use it! (KA)" ); return &GetGraphic().GetGDIMetaFile(); } diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index b06a0baef0d0..e115a43ae907 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -1419,7 +1419,7 @@ sal_Bool SdrMeasureObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf } default: { - DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!"); + OSL_FAIL("TRGetBaseGeometry: Missing unit translation to 100th mm!"); } } } @@ -1454,7 +1454,7 @@ void SdrMeasureObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons } default: { - DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); + OSL_FAIL("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); } } } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index b30ccba33aef..fe6368961991 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -925,7 +925,7 @@ void SdrOle2Obj::Connect() { // mba: currently there are situations where it seems to be unavoidable to have multiple connects // changing this would need a larger code rewrite, so for now I remove the assertion - // DBG_ERROR("Connect() called on connected object!"); + // OSL_FAIL("Connect() called on connected object!"); return; } @@ -1214,7 +1214,7 @@ void SdrOle2Obj::Disconnect() if( !mpImpl->mbConnected ) { - DBG_ERROR("Disconnect() called on disconnected object!"); + OSL_FAIL("Disconnect() called on disconnected object!"); return; } @@ -1674,7 +1674,7 @@ void SdrOle2Obj::operator=(const SdrObject& rObj) catch( uno::Exception& e ) { (void)e; - DBG_ERROR( "SdrOle2Obj::operator=(), unexpected exception caught!" ); + OSL_FAIL( "SdrOle2Obj::operator=(), unexpected exception caught!" ); } } */ } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index a31c432249b4..c4fc5c95b5bc 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -602,7 +602,7 @@ bool ImpPathForDragAndCreate::beginPathDrag( SdrDragStat& rDrag ) const if(!mpSdrPathDragData || !mpSdrPathDragData->bValid) { - DBG_ERROR("ImpPathForDragAndCreate::BegDrag(): ImpSdrPathDragData ist ungueltig"); + OSL_FAIL("ImpPathForDragAndCreate::BegDrag(): ImpSdrPathDragData ist ungueltig"); delete mpSdrPathDragData; ((ImpPathForDragAndCreate*)this)->mpSdrPathDragData = 0; return false; @@ -615,7 +615,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const { if(!mpSdrPathDragData || !mpSdrPathDragData->bValid) { - DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); + OSL_FAIL("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); return false; } @@ -860,7 +860,7 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag) if(!mpSdrPathDragData || !mpSdrPathDragData->bValid) { - DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); + OSL_FAIL("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); return false; } @@ -1024,7 +1024,7 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) if(!pDragData) { - DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); + OSL_FAIL("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); return String(); } @@ -1169,7 +1169,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra { if(!mpSdrPathDragData || !mpSdrPathDragData->bValid) { - DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); + OSL_FAIL("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); return basegfx::B2DPolyPolygon(); } @@ -2985,7 +2985,7 @@ sal_Bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx:: } default: { - DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!"); + OSL_FAIL("TRGetBaseGeometry: Missing unit translation to 100th mm!"); } } } @@ -3055,7 +3055,7 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b } default: { - DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); + OSL_FAIL("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); } } } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 5920bc2d308a..7203674f2778 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1784,7 +1784,7 @@ sal_Bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx:: } default: { - DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!"); + OSL_FAIL("TRGetBaseGeometry: Missing unit translation to 100th mm!"); } } } @@ -1846,7 +1846,7 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b } default: { - DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); + OSL_FAIL("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); } } } diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 02358d125633..d7bcaa2727b5 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -207,7 +207,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList) if (pDstNode1!=NULL) { // Sonst grober Fehler! pDstEdge->ConnectToNode(TRUE,pDstNode1); } else { - DBG_ERROR("SdrObjList::operator=(): pDstNode1==NULL!"); + OSL_FAIL("SdrObjList::operator=(): pDstNode1==NULL!"); } } if (pSrcNode2!=NULL) { @@ -216,11 +216,11 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList) if (pDstNode2!=NULL) { // Node war sonst wohl nicht markiert pDstEdge->ConnectToNode(FALSE,pDstNode2); } else { - DBG_ERROR("SdrObjList::operator=(): pDstNode2==NULL!"); + OSL_FAIL("SdrObjList::operator=(): pDstNode2==NULL!"); } } } else { - DBG_ERROR("SdrObjList::operator=(): pDstEdge==NULL!"); + OSL_FAIL("SdrObjList::operator=(): pDstEdge==NULL!"); } } } @@ -869,7 +869,7 @@ void SdrObjList::UnGroupObj( ULONG nObjNum ) } #ifdef DBG_UTIL else - DBG_ERROR("SdrObjList::UnGroupObj: object index invalid"); + OSL_FAIL("SdrObjList::UnGroupObj: object index invalid"); #endif } diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 8016b7bdfed5..c6471f795644 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -971,7 +971,7 @@ void SdrUndoReplaceObj::Undo() } else { - DBG_ERROR("SdrUndoReplaceObj::Undo(): IsMine-Flags stehen verkehrt. Doppelter Undo-Aufruf?"); + OSL_FAIL("SdrUndoReplaceObj::Undo(): IsMine-Flags stehen verkehrt. Doppelter Undo-Aufruf?"); } } @@ -990,7 +990,7 @@ void SdrUndoReplaceObj::Redo() } else { - DBG_ERROR("SdrUndoReplaceObj::Redo(): IsMine-Flags stehen verkehrt. Doppelter Redo-Aufruf?"); + OSL_FAIL("SdrUndoReplaceObj::Redo(): IsMine-Flags stehen verkehrt. Doppelter Redo-Aufruf?"); } // #94278# Trigger PageChangeCall @@ -1054,7 +1054,7 @@ void SdrUndoObjOrdNum::Undo() SdrObjList* pOL=pObj->GetObjList(); if (pOL==NULL) { - DBG_ERROR("UndoObjOrdNum: pObj hat keine ObjList"); + OSL_FAIL("UndoObjOrdNum: pObj hat keine ObjList"); return; } pOL->SetObjectOrdNum(nNewOrdNum,nOldOrdNum); @@ -1064,7 +1064,7 @@ void SdrUndoObjOrdNum::Redo() { SdrObjList* pOL=pObj->GetObjList(); if (pOL==NULL) { - DBG_ERROR("RedoObjOrdNum: pObj hat keine ObjList"); + OSL_FAIL("RedoObjOrdNum: pObj hat keine ObjList"); return; } pOL->SetObjectOrdNum(nOldOrdNum,nNewOrdNum); diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index b046b91044e0..9ce94cd5c3e5 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -771,7 +771,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co #ifdef DGB_UTIL if (rVEvt.pRootObj!=NULL) { if (rVEvt.pRootObj->GetObjList()!=rVEvt.pPV->GetObjList()) { - DBG_ERROR("SdrView::PickAnything(): pRootObj->GetObjList()!=pPV->GetObjList() !"); + OSL_FAIL("SdrView::PickAnything(): pRootObj->GetObjList()!=pPV->GetObjList() !"); } } #endif diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index adad026376c1..8d163331bd99 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -860,7 +860,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const BOOL SdrExchangeView::Cut( ULONG /*nFormat */) { - DBG_ERROR( "SdrExchangeView::Cut: Not supported anymore" ); + OSL_FAIL( "SdrExchangeView::Cut: Not supported anymore" ); return FALSE; } @@ -868,14 +868,14 @@ BOOL SdrExchangeView::Cut( ULONG /*nFormat */) void SdrExchangeView::CutMarked( ULONG /*nFormat */) { - DBG_ERROR( "SdrExchangeView::CutMarked: Not supported anymore" ); + OSL_FAIL( "SdrExchangeView::CutMarked: Not supported anymore" ); } // ----------------------------------------------------------------------------- BOOL SdrExchangeView::Yank(ULONG /*nFormat*/) { - DBG_ERROR( "SdrExchangeView::Yank: Not supported anymore" ); + OSL_FAIL( "SdrExchangeView::Yank: Not supported anymore" ); return FALSE; } @@ -883,14 +883,14 @@ BOOL SdrExchangeView::Yank(ULONG /*nFormat*/) void SdrExchangeView::YankMarked(ULONG /*nFormat*/) { - DBG_ERROR( "YankMarked: Not supported anymore" ); + OSL_FAIL( "YankMarked: Not supported anymore" ); } // ----------------------------------------------------------------------------- BOOL SdrExchangeView::Paste(Window* /*pWin*/, ULONG /*nFormat*/) { - DBG_ERROR( "SdrExchangeView::Paste: Not supported anymore" ); + OSL_FAIL( "SdrExchangeView::Paste: Not supported anymore" ); return FALSE; } diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index b3ca15255362..0fbb214e6170 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -236,7 +236,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ } catch( Exception& ) { - DBG_ERROR("svx::AccessibleTableShape::modified(), exception caught!"); + OSL_FAIL("svx::AccessibleTableShape::modified(), exception caught!"); } } @@ -277,7 +277,7 @@ void AccessibleTableShape::Init() } catch( Exception& ) { - DBG_ERROR("AccessibleTableShape::init(), exception caught?"); + OSL_FAIL("AccessibleTableShape::init(), exception caught?"); } AccessibleTableShape_Base::Init(); diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 359517193e82..1c296f1d82a2 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -182,7 +182,7 @@ namespace sdr BaseProperties& CellProperties::Clone(SdrObject& rObj) const { - DBG_ERROR("CellProperties::Clone(), does not work yet!"); + OSL_FAIL("CellProperties::Clone(), does not work yet!"); return *(new CellProperties(*this, rObj,0)); } @@ -334,7 +334,7 @@ void Cell::dispose() } catch( Exception& ) { - DBG_ERROR("Cell::dispose(), exception caught!"); + OSL_FAIL("Cell::dispose(), exception caught!"); } mxTable.clear(); } @@ -554,7 +554,7 @@ const SfxItemSet& Cell::GetObjectItemSet() } else { - DBG_ERROR("Cell::GetObjectItemSet(), called without properties!"); + OSL_FAIL("Cell::GetObjectItemSet(), called without properties!"); return GetObject().GetObjectItemSet(); } } @@ -977,7 +977,7 @@ Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMa } else { - DBG_ERROR("GetAnyForItem() Returnvalue has wrong Type!" ); + OSL_FAIL("GetAnyForItem() Returnvalue has wrong Type!" ); } } @@ -1272,11 +1272,11 @@ void SAL_CALL Cell::setPropertyValues( const Sequence< OUString >& aPropertyName } catch( UnknownPropertyException& ) { - DBG_ERROR("svx::Cell::setPropertyValues(), unknown property!" ); + OSL_FAIL("svx::Cell::setPropertyValues(), unknown property!" ); } catch( Exception& ) { - DBG_ERROR("svx::Cell::setPropertyValues(), Exception caught!" ); + OSL_FAIL("svx::Cell::setPropertyValues(), Exception caught!" ); } } } @@ -1304,11 +1304,11 @@ Sequence< Any > SAL_CALL Cell::getPropertyValues( const Sequence< OUString >& aP } catch( UnknownPropertyException& ) { - DBG_ERROR("svx::Cell::setPropertyValues(), unknown property!" ); + OSL_FAIL("svx::Cell::setPropertyValues(), unknown property!" ); } catch( Exception& ) { - DBG_ERROR( "svx::Cell::getPropertyValues(), Exception caught!" ); + OSL_FAIL( "svx::Cell::getPropertyValues(), Exception caught!" ); } } diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx index 2946c59a2773..f73f843b3d94 100644 --- a/svx/source/table/cellcursor.cxx +++ b/svx/source/table/cellcursor.cxx @@ -250,7 +250,7 @@ bool CellCursor::GetMergedSelection( CellPos& rStart, CellPos& rEnd ) } catch( Exception& ) { - DBG_ERROR("sdr::table::SvmxTableController::GetMergedSelection(), exception caught!"); + OSL_FAIL("sdr::table::SvmxTableController::GetMergedSelection(), exception caught!"); } return false; } @@ -280,7 +280,7 @@ void SAL_CALL CellCursor::merge( ) throw (NoSupportException, RuntimeException) } catch( Exception& ) { - DBG_ERROR("sdr::table::CellCursor::merge(), exception caught!"); + OSL_FAIL("sdr::table::CellCursor::merge(), exception caught!"); } if( bUndo ) @@ -550,7 +550,7 @@ void SAL_CALL CellCursor::split( sal_Int32 nColumns, sal_Int32 nRows ) throw (No } catch( Exception& ) { - DBG_ERROR("sdr::table::CellCursor::split(), exception caught!"); + OSL_FAIL("sdr::table::CellCursor::split(), exception caught!"); throw NoSupportException(); } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index a133e3b2e7ed..4e6f6572d23d 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -357,7 +357,7 @@ void SdrTableObjImpl::SetModel(SdrModel* /*pOldModel*/, SdrModel* pNewModel) } catch( Exception& ) { - DBG_ERROR("svx::SdrTableObjImpl::SetModel(), exception caught!"); + OSL_FAIL("svx::SdrTableObjImpl::SetModel(), exception caught!"); } mxTableStyle = xNewTableStyle; @@ -524,7 +524,7 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int nEdge, sal_Int32 nOffset } catch( Exception& ) { - DBG_ERROR( "svx::SdrTableObjImpl::DragEdge(), exception caught!" ); + OSL_FAIL( "svx::SdrTableObjImpl::DragEdge(), exception caught!" ); } } @@ -629,7 +629,7 @@ CellRef SdrTableObjImpl::getCell( const CellPos& rPos ) const } catch( Exception& ) { - DBG_ERROR( "svx::SdrTableObjImpl::getCell(), exception caught!" ); + OSL_FAIL( "svx::SdrTableObjImpl::getCell(), exception caught!" ); } return xCell; } @@ -1169,7 +1169,7 @@ void SdrTableObj::InsertRows( sal_Int32 nIndex, sal_Int32 nCount /*= 1*/ ) } catch( Exception& ) { - DBG_ERROR("SdrTableObj::InsertRows(), exception caught!"); + OSL_FAIL("SdrTableObj::InsertRows(), exception caught!"); } } @@ -1184,7 +1184,7 @@ void SdrTableObj::InsertColumns( sal_Int32 nIndex, sal_Int32 nCount /*= 1*/ ) } catch( Exception& ) { - DBG_ERROR("SdrTableObj::InsertColumns(), exception caught!"); + OSL_FAIL("SdrTableObj::InsertColumns(), exception caught!"); } } @@ -1199,7 +1199,7 @@ void SdrTableObj::DeleteRows( sal_Int32 nIndex, sal_Int32 nCount /*= 1*/ ) } catch( Exception& ) { - DBG_ERROR("SdrTableObj::DeleteRows(), exception caught!"); + OSL_FAIL("SdrTableObj::DeleteRows(), exception caught!"); } } @@ -1214,7 +1214,7 @@ void SdrTableObj::DeleteColumns( sal_Int32 nIndex, sal_Int32 nCount /*= 1*/ ) } catch( Exception& ) { - DBG_ERROR("SdrTableObj::DeleteColumns(), exception caught!"); + OSL_FAIL("SdrTableObj::DeleteColumns(), exception caught!"); } } @@ -1618,7 +1618,7 @@ void SdrTableObj::setActiveCell( const CellPos& rPos ) } catch( Exception& ) { - DBG_ERROR("SdrTableObj::setActiveCell(), exception caught!"); + OSL_FAIL("SdrTableObj::setActiveCell(), exception caught!"); } } @@ -2736,7 +2736,7 @@ SdrTableObj* SdrTableObj::CloneRange( const CellPos& rStart, const CellPos& rEnd } catch( Exception& ) { - DBG_ERROR( "svx::SvxTableController::GetMarkedObjModel(), exception caught!" ); + OSL_FAIL( "svx::SvxTableController::GetMarkedObjModel(), exception caught!" ); } } diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 6639763139fe..b7dded67897b 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -613,7 +613,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs ) catch( Exception& e ) { (void)e; - DBG_ERROR("svx::SvxTableController::onInsert(), exception caught!"); + OSL_FAIL("svx::SvxTableController::onInsert(), exception caught!"); } } @@ -904,7 +904,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) catch( Exception& e ) { (void)e; - DBG_ERROR( "svx::SvxTableController::SetTableStyle(), exception caught!" ); + OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" ); } } @@ -915,7 +915,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) catch( Exception& e ) { (void)e; - DBG_ERROR( "svx::SvxTableController::SetTableStyle(), exception caught!" ); + OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" ); } } @@ -1641,7 +1641,7 @@ void SvxTableController::checkCell( CellPos& rPos ) catch( Exception& e ) { (void)e; - DBG_ERROR("sdr::table::SvxTableController::checkCell(), exception caught!" ); + OSL_FAIL("sdr::table::SvxTableController::checkCell(), exception caught!" ); } } @@ -1660,7 +1660,7 @@ void SvxTableController::findMergeOrigin( CellPos& rPos ) catch( Exception& e ) { (void)e; - DBG_ERROR("sdr::table::SvxTableController::findMergeOrigin(), exception caught!" ); + OSL_FAIL("sdr::table::SvxTableController::findMergeOrigin(), exception caught!" ); } } @@ -2430,7 +2430,7 @@ bool SvxTableController::GetMarkedObjModel( SdrPage* pNewPage ) } catch( Exception& ) { - DBG_ERROR( "svx::SvxTableController::GetMarkedObjModel(), exception caught!" ); + OSL_FAIL( "svx::SvxTableController::GetMarkedObjModel(), exception caught!" ); } return false; } diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 8f892e80605c..3d40963107db 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -121,7 +121,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos ) const } catch( Exception& ) { - DBG_ERROR( "TableLayouter::getCellSize(), exception caught!" ); + OSL_FAIL( "TableLayouter::getCellSize(), exception caught!" ); } return basegfx::B2ITuple( width, height ); @@ -150,7 +150,7 @@ bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rAr } catch( Exception& ) { - DBG_ERROR( "TableLayouter::getCellSize(), exception caught!" ); + OSL_FAIL( "TableLayouter::getCellSize(), exception caught!" ); } return false; } @@ -174,7 +174,7 @@ void TableLayouter::setRowHeight( sal_Int32 nRow, sal_Int32 nHeight ) } else { - DBG_ERROR( "TableLayouter::setRowHeight(), row out of range!" ); + OSL_FAIL( "TableLayouter::setRowHeight(), row out of range!" ); } } @@ -194,7 +194,7 @@ void TableLayouter::setColumnWidth( sal_Int32 nColumn, sal_Int32 nWidth ) if( isValidColumn(nColumn) ) maColumns[nColumn].mnSize = nWidth; else - DBG_ERROR( "TableLayouter::setColumnWidth(), column out of range!" ); + OSL_FAIL( "TableLayouter::setColumnWidth(), column out of range!" ); } // ----------------------------------------------------------------------------- @@ -441,7 +441,7 @@ bool findMergeOrigin( const TableModelRef& xTable, sal_Int32 nMergedX, sal_Int32 } catch( Exception& ) { - DBG_ERROR("sdr::table::TableLayouter::findMergeOrigin(), exception caught!"); + OSL_FAIL("sdr::table::TableLayouter::findMergeOrigin(), exception caught!"); } return false; } @@ -456,7 +456,7 @@ sal_Int32 TableLayouter::getMinimumColumnWidth( sal_Int32 nColumn ) } else { - DBG_ERROR( "TableLayouter::getMinimumColumnWidth(), column out of range!" ); + OSL_FAIL( "TableLayouter::getMinimumColumnWidth(), column out of range!" ); return 0; } } @@ -912,7 +912,7 @@ CellRef TableLayouter::getCell( const CellPos& rPos ) const } catch( Exception& ) { - DBG_ERROR( "sdr::table::TableLayouter::getCell(), exception caught!" ); + OSL_FAIL( "sdr::table::TableLayouter::getCell(), exception caught!" ); } return xCell; } @@ -1106,7 +1106,7 @@ void TableLayouter::SetLayoutToModel() } catch( Exception& ) { - DBG_ERROR("sdr::table::TableLayouter::SetLayoutToModel(), exception caught!"); + OSL_FAIL("sdr::table::TableLayouter::SetLayoutToModel(), exception caught!"); } } */ @@ -1145,7 +1145,7 @@ void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, catch( Exception& e ) { (void)e; - DBG_ERROR("sdr::table::TableLayouter::DistributeColumns(), exception caught!"); + OSL_FAIL("sdr::table::TableLayouter::DistributeColumns(), exception caught!"); } } @@ -1197,7 +1197,7 @@ void TableLayouter::DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal catch( Exception& e ) { (void)e; - DBG_ERROR("sdr::table::TableLayouter::DistributeRows(), exception caught!"); + OSL_FAIL("sdr::table::TableLayouter::DistributeRows(), exception caught!"); } } @@ -1286,7 +1286,7 @@ sal_Int32 TableLayouter::detectInsertedOrRemovedRows() catch( Exception& e ) { (void)e; - DBG_ERROR("svx::TableLayouter::detectInsertedOrRemovedRows(), exception caught!"); + OSL_FAIL("svx::TableLayouter::detectInsertedOrRemovedRows(), exception caught!"); } return nHeightChange; diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index 76a6ea5a3d48..701032c288f3 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -728,7 +728,7 @@ void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - DBG_ERROR("sdr::table::TableModel::insertColumns(), exception caught!"); + OSL_FAIL("sdr::table::TableModel::insertColumns(), exception caught!"); } updateColumns(); setModified(sal_True); @@ -837,7 +837,7 @@ void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - DBG_ERROR("sdr::table::TableModel::removeColumns(), exception caught!"); + OSL_FAIL("sdr::table::TableModel::removeColumns(), exception caught!"); } updateColumns(); @@ -895,7 +895,7 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - DBG_ERROR("sdr::table::TableModel::insertRows(), exception caught!"); + OSL_FAIL("sdr::table::TableModel::insertRows(), exception caught!"); } if( bUndo ) pModel->EndUndo(); @@ -996,7 +996,7 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - DBG_ERROR("sdr::table::TableModel::removeRows(), exception caught!"); + OSL_FAIL("sdr::table::TableModel::removeRows(), exception caught!"); } updateRows(); @@ -1062,7 +1062,7 @@ void TableModel::optimize() catch( Exception& e ) { (void)e; - DBG_ERROR("svx::TableModel::optimize(), exception caught!"); + OSL_FAIL("svx::TableModel::optimize(), exception caught!"); } removeColumns( nCol, 1 ); @@ -1099,7 +1099,7 @@ void TableModel::optimize() catch( Exception& e ) { (void)e; - DBG_ERROR("svx::TableModel::optimize(), exception caught!"); + OSL_FAIL("svx::TableModel::optimize(), exception caught!"); } removeRows( nRow, 1 ); @@ -1126,7 +1126,7 @@ void TableModel::merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_ if( (nLastRow > getRowCount()) || (nLastCol > getRowCount() ) ) { - DBG_ERROR("TableModel::merge(), merge beyound the table!"); + OSL_FAIL("TableModel::merge(), merge beyound the table!"); } // merge first cell diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx index 4f7a87c1eb91..a9ac42af079e 100644 --- a/svx/source/table/tablertfexporter.cxx +++ b/svx/source/table/tablertfexporter.cxx @@ -119,7 +119,7 @@ ULONG SdrTableRtfExporter::Write() catch( Exception& e ) { (void)e; - DBG_ERROR("SdrTableRtfExporter::Write(), exception caught!"); + OSL_FAIL("SdrTableRtfExporter::Write(), exception caught!"); } // export rows @@ -134,7 +134,7 @@ ULONG SdrTableRtfExporter::Write() catch( Exception& e ) { (void)e; - DBG_ERROR("SdrTableRtfExporter::Write(), exception caught!"); + OSL_FAIL("SdrTableRtfExporter::Write(), exception caught!"); } mrStrm << '}' << RTFOutFuncs::sNewLine; diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 6b6dd430db38..8dc0a876e52b 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -309,7 +309,7 @@ void SdrTableRTFParser::FillTable() catch( Exception& e ) { (void)e; - DBG_ERROR("sdr::table::SdrTableRTFParser::InsertCell(), exception caught!" ); + OSL_FAIL("sdr::table::SdrTableRTFParser::InsertCell(), exception caught!" ); } } diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 2a168f90cc3a..a03f62a4dea0 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -446,7 +446,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) break; default: - DBG_ERROR( "Nicht unterstuetzter Flaechentyp" ); + OSL_FAIL( "Nicht unterstuetzter Flaechentyp" ); break; } } diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 284a83e717f2..c89a67b2794e 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -185,7 +185,7 @@ SvxListBoxControl::~SvxListBoxControl() SfxPopupWindow* SvxListBoxControl::CreatePopupWindow() { - DBG_ERROR( "not implemented" ); + OSL_FAIL( "not implemented" ); return 0; } diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index ac75947e1081..9ece5d48684d 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -197,7 +197,7 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState ) break; default: - DBG_ERROR( "Nicht unterstuetzter Linientyp" ); + OSL_FAIL( "Nicht unterstuetzter Linientyp" ); break; } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 6b9d865674b4..8312903ca1dd 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1846,7 +1846,7 @@ struct SvxStyleToolBoxControl::Impl } catch(const uno::Exception& ) { - DBG_ERROR("error while initializing style names"); + OSL_FAIL("error while initializing style names"); } } }; @@ -1963,7 +1963,7 @@ SfxStyleFamily SvxStyleToolBoxControl::GetActFamily() case SID_STYLE_FAMILY4: return SFX_STYLE_FAMILY_PAGE; case SID_STYLE_FAMILY5: return SFX_STYLE_FAMILY_PSEUDO; default: - DBG_ERROR( "unknown style family" ); + OSL_FAIL( "unknown style family" ); break; } return SFX_STYLE_FAMILY_PARA; diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index bfe372530503..8c3caec09ae9 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -150,7 +150,7 @@ namespace svx } else { - DBG_ERROR( "ToolboxButtonColorUpdater::Update: TBX_UPDATER_MODE_CHAR_COLOR / TBX_UPDATER_MODE_CHAR_BACKGROUND" ); + OSL_FAIL( "ToolboxButtonColorUpdater::Update: TBX_UPDATER_MODE_CHAR_COLOR / TBX_UPDATER_MODE_CHAR_BACKGROUND" ); // !!! DrawChar( aVirDev, aColor ); } diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index cdaa93041f73..004bde99ad83 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -1277,7 +1277,7 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ) } catch( Exception& ) { - DBG_ERROR("SvxGetGraphicForShape(), exception caught!"); + OSL_FAIL("SvxGetGraphicForShape(), exception caught!"); } return aGraphic; } diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 83dd439d2fc7..e893128d797a 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -856,7 +856,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3 pRet = new SvxTableShape( pObj ); break; default: // unbekanntes 2D-Objekt auf der Page - DBG_ERROR("Nicht implementierter Starone-Shape erzeugt! [CL]"); + OSL_FAIL("Nicht implementierter Starone-Shape erzeugt! [CL]"); pRet = new SvxShapeText( pObj ); break; } @@ -864,7 +864,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3 } default: // Unbekannter Inventor { - DBG_ERROR("AW: Unknown Inventor in SvxDrawPage::_CreateShape()"); + OSL_FAIL("AW: Unknown Inventor in SvxDrawPage::_CreateShape()"); break; } } diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index e7cd266b0d6b..884fe682e470 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -899,7 +899,7 @@ rtl::OUString UHashMap::getNameFromId(sal_uInt32 nId) if (it->second == nId) return it->first; } - DBG_ERROR("[CL] unknown SdrObjekt identifier"); + OSL_FAIL("[CL] unknown SdrObjekt identifier"); return rtl::OUString(); } @@ -1012,7 +1012,7 @@ const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropert case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break; default: - DBG_ERROR( "Unknown property map for SvxUnoPropertyMapProvider!" ); + OSL_FAIL( "Unknown property map for SvxUnoPropertyMapProvider!" ); } // Sort(nPropertyId); } @@ -1423,7 +1423,7 @@ comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nSer if( nServiceId > SVXUNO_SERVICEID_LASTID ) { - DBG_ERROR( "unknown service id!" ); + OSL_FAIL( "unknown service id!" ); return NULL; } @@ -1445,7 +1445,7 @@ comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nSer break; default: - DBG_ERROR( "unknown service id!" ); + OSL_FAIL( "unknown service id!" ); } } diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index d7b5330edad8..63a2678051d6 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -255,7 +255,7 @@ void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShap } else { - DBG_ERROR("could not add XShape to group shape!"); + OSL_FAIL("could not add XShape to group shape!"); } } diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 43b7ad2c02ee..dcebfac35051 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -934,7 +934,7 @@ bool SvxMediaShape::setPropertyValueImpl( const ::rtl::OUString& rName, const Sf break; default: - DBG_ERROR("SvxMediaShape::setPropertyValueImpl(), unknown argument!"); + OSL_FAIL("SvxMediaShape::setPropertyValueImpl(), unknown argument!"); } if( bOk ) @@ -983,7 +983,7 @@ bool SvxMediaShape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sf break; default: - DBG_ERROR("SvxMediaShape::getPropertyValueImpl(), unknown property!"); + OSL_FAIL("SvxMediaShape::getPropertyValueImpl(), unknown property!"); } return true; } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 475e6c006c1f..a7a9e89a3bf6 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -566,7 +566,7 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw() } default: { - DBG_ERROR("AW: Missing unit translation to PoolMetric!"); + OSL_FAIL("AW: Missing unit translation to PoolMetric!"); } } } @@ -595,7 +595,7 @@ void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon } default: { - DBG_ERROR("Missing unit translation to PoolMetric!"); + OSL_FAIL("Missing unit translation to PoolMetric!"); } } } @@ -622,7 +622,7 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() } default: { - DBG_ERROR("AW: Missing unit translation to 100th mm!"); + OSL_FAIL("AW: Missing unit translation to 100th mm!"); } } } @@ -651,7 +651,7 @@ void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) cons } default: { - DBG_ERROR("Missing unit translation to 100th mm!"); + OSL_FAIL("Missing unit translation to 100th mm!"); } } } @@ -1993,7 +1993,7 @@ void SvxShape::endSetPropertyValues() } catch( uno::Exception& ) { - DBG_ERROR( "SvxShape::getPropertyValues, unknown property asked" ); + OSL_FAIL( "SvxShape::getPropertyValues, unknown property asked" ); } } } @@ -2010,7 +2010,7 @@ void SvxShape::endSetPropertyValues() } catch( uno::Exception& ) { - DBG_ERROR( "SvxShape::getPropertyValues, unknown property asked" ); + OSL_FAIL( "SvxShape::getPropertyValues, unknown property asked" ); } } } @@ -2101,7 +2101,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleE } else { - DBG_ERROR("SvxShape::GetAnyForItem() Returnvalue has wrong Type!" ); + OSL_FAIL("SvxShape::GetAnyForItem() Returnvalue has wrong Type!" ); } } @@ -3885,7 +3885,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxShape::getParent( ) case SDROBJLIST_MASTERPAGE: return PTR_CAST( SdrPage, pObjList )->getUnoPage(); default: - DBG_ERROR( "SvxShape::getParent( ): unexpected SdrObjListKind" ); + OSL_FAIL( "SvxShape::getParent( ): unexpected SdrObjListKind" ); break; } } diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index dbcbd30e99c6..907784c8c15c 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -349,7 +349,7 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames( if( -1 != rContainerStorageName.indexOf( '/' ) ) { - DBG_ERROR( "SvXMLEmbeddedObjectHelper: invalid path name" ); + OSL_FAIL( "SvXMLEmbeddedObjectHelper: invalid path name" ); return sal_False; } diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx index 48303c002e56..0fa28fe35629 100644 --- a/svx/source/xml/xmlexport.cxx +++ b/svx/source/xml/xmlexport.cxx @@ -81,7 +81,7 @@ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutp uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() ); if( !xServiceFactory.is() ) { - DBG_ERROR( "got no service manager" ); + OSL_FAIL( "got no service manager" ); bDocRet = sal_False; } @@ -90,7 +90,7 @@ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutp uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ) ); if( !xWriter.is() ) { - DBG_ERROR( "com.sun.star.xml.sax.Writer service missing" ); + OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" ); bDocRet = sal_False; } @@ -121,7 +121,7 @@ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutp uno::Reference< document::XFilter > xFilter( xServiceFactory->createInstanceWithArguments( OUString::createFromAscii( pExportService ), aArgs ), uno::UNO_QUERY ); if( !xFilter.is() ) { - DBG_ERROR( "com.sun.star.comp.Draw.XMLExporter service missing" ); + OSL_FAIL( "com.sun.star.comp.Draw.XMLExporter service missing" ); bDocRet = sal_False; } diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index cd200c50dce3..720f25809b3b 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -455,7 +455,7 @@ sal_Bool SvXMLGraphicHelper::ImplGetStreamNames( const ::rtl::OUString& rURLStr, } else { - DBG_ERROR( "SvXMLGraphicHelper::ImplInsertGraphicURL: invalid scheme" ); + OSL_FAIL( "SvXMLGraphicHelper::ImplInsertGraphicURL: invalid scheme" ); } } diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index d24f37d609ec..b3cf94713a2f 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -200,14 +200,14 @@ sal_Bool SvxXMLXTableExportComponent::save( const OUString& rURL, const uno::Ref uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() ); if( !xServiceFactory.is() ) { - DBG_ERROR( "got no service manager" ); + OSL_FAIL( "got no service manager" ); return FALSE; } uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ) ); if( !xWriter.is() ) { - DBG_ERROR( "com.sun.star.xml.sax.Writer service missing" ); + OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" ); return FALSE; } @@ -220,7 +220,7 @@ sal_Bool SvxXMLXTableExportComponent::save( const OUString& rURL, const uno::Ref if( !xStorage.is() ) { - DBG_ERROR( "no storage!" ); + OSL_FAIL( "no storage!" ); break; } @@ -238,7 +238,7 @@ sal_Bool SvxXMLXTableExportComponent::save( const OUString& rURL, const uno::Ref SvStream* pStream = pMedium->GetOutStream(); if( NULL == pStream ) { - DBG_ERROR( "no output stream!" ); + OSL_FAIL( "no output stream!" ); break; } @@ -344,7 +344,7 @@ sal_Bool SvxXMLXTableExportComponent::exportTable() throw() } else { - DBG_ERROR( "unknown type for export"); + OSL_FAIL( "unknown type for export"); break; } diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index f1e923d915f6..4dc7b162430f 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -263,7 +263,7 @@ void SvxXMLTableImportContext::importMarker( USHORT nPrfx, const OUString& rLoca } catch( Exception& ) { - DBG_ERROR("SvxXMLTableImportContext::importMarker(), exception caught!"); + OSL_FAIL("SvxXMLTableImportContext::importMarker(), exception caught!"); } } @@ -279,7 +279,7 @@ void SvxXMLTableImportContext::importDash( USHORT nPrfx, const OUString& rLocalN } catch( Exception& ) { - DBG_ERROR("SvxXMLTableImportContext::importDash(), exception caught!"); + OSL_FAIL("SvxXMLTableImportContext::importDash(), exception caught!"); } } @@ -295,7 +295,7 @@ void SvxXMLTableImportContext::importHatch( USHORT nPrfx, const OUString& rLocal } catch( Exception& ) { - DBG_ERROR("SvxXMLTableImportContext::importHatch(), exception caught!"); + OSL_FAIL("SvxXMLTableImportContext::importHatch(), exception caught!"); } } @@ -311,7 +311,7 @@ void SvxXMLTableImportContext::importGradient( USHORT nPrfx, const OUString& rLo } catch( Exception& ) { - DBG_ERROR("SvxXMLTableImportContext::importGradient(), exception caught!"); + OSL_FAIL("SvxXMLTableImportContext::importGradient(), exception caught!"); } } @@ -327,7 +327,7 @@ void SvxXMLTableImportContext::importBitmap( USHORT nPrfx, const OUString& rLoca } catch( Exception& ) { - DBG_ERROR("SvxXMLTableImportContext::importBitmap(), exception caught!"); + OSL_FAIL("SvxXMLTableImportContext::importBitmap(), exception caught!"); } } @@ -377,7 +377,7 @@ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const uno::Reference< X uno::Reference<lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() ); if( !xServiceFactory.is() ) { - DBG_ERROR( "SvxXMLXTableImport::load: got no service manager" ); + OSL_FAIL( "SvxXMLXTableImport::load: got no service manager" ); break; } @@ -396,7 +396,7 @@ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const uno::Reference< X xIStm.set( xStorage->openStreamElement( aContentStmName, embed::ElementModes::READ ), uno::UNO_QUERY_THROW ); if( !xIStm.is() ) { - DBG_ERROR( "could not open Content stream" ); + OSL_FAIL( "could not open Content stream" ); break; } @@ -435,7 +435,7 @@ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const uno::Reference< X // each time you load a document with property tables that are not // on the current machine. Maybe a better fix would be to place // a file exists check before importing... -// DBG_ERROR("svx::SvxXMLXTableImport::load(), exception caught!"); +// OSL_FAIL("svx::SvxXMLXTableImport::load(), exception caught!"); bRet = sal_False; } diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index b085f22ce559..60336e15787e 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -1111,7 +1111,7 @@ bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId break; } - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -3500,7 +3500,7 @@ bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemb case MID_GRADIENT_ENDINTENSITY: rVal <<= GetGradientValue().GetEndIntens(); break; case MID_GRADIENT_STEPCOUNT: rVal <<= GetGradientValue().GetSteps(); break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -4145,7 +4145,7 @@ bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberI case MID_HATCH_ANGLE: rVal <<= aHatch.GetAngle(); break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -4242,7 +4242,7 @@ bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMem break; } - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index d4ff57c8f7cf..b23b61939477 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -244,7 +244,7 @@ bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMembe eJoint = ::com::sun::star::drawing::LineJoint_ROUND; break; default: - DBG_ERROR( "Unknown LineJoint enum value!" ); + OSL_FAIL( "Unknown LineJoint enum value!" ); } rVal <<= eJoint; diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx index 0cea473cdc65..a19838eec26b 100644 --- a/svx/workben/msview/msview.cxx +++ b/svx/workben/msview/msview.cxx @@ -1103,7 +1103,7 @@ void MSViewerWorkWindow::Resize() uno::Reference< uno::XComponentContext > xCtx( cppu::defaultBootstrap_InitialComponentContext() ); if ( !xCtx.is() ) { - DBG_ERROR( "Error creating initial component context!" ); + OSL_FAIL( "Error creating initial component context!" ); return -1; } @@ -1111,7 +1111,7 @@ void MSViewerWorkWindow::Resize() if ( !xMSF.is() ) { - DBG_ERROR( "No service manager!" ); + OSL_FAIL( "No service manager!" ); return -1; } @@ -1122,14 +1122,14 @@ void MSViewerWorkWindow::Resize() sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xMSF, aArgs ); if ( !bSuccess ) { - DBG_ERROR( "Error creating UCB!" ); + OSL_FAIL( "Error creating UCB!" ); return -1; } } catch ( uno::Exception const & ) { - DBG_ERROR( "Exception during creation of initial component context!" ); + OSL_FAIL( "Exception during creation of initial component context!" ); return -1; } comphelper::setProcessServiceFactory( xMSF ); diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index f57c3c7521db..9ec1c21c8031 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -2492,7 +2492,7 @@ void MyApp::Main() cppu::defaultBootstrap_InitialComponentContext() ); if ( !xCtx.is() ) { - DBG_ERROR( "Error creating initial component context!" ); + OSL_FAIL( "Error creating initial component context!" ); return; } @@ -2501,13 +2501,13 @@ void MyApp::Main() if ( !xFac.is() ) { - DBG_ERROR( "No service manager!" ); + OSL_FAIL( "No service manager!" ); return; } } catch ( uno::Exception ) { - DBG_ERROR( "Exception during creation of initial component context!" ); + OSL_FAIL( "Exception during creation of initial component context!" ); return; } diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 085e24428aa7..b448f0658248 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -111,13 +111,13 @@ uno::Reference< chart2::XChartTypeTemplate > lcl_getTemplate( const uno::Referen } catch( uno::Exception & ) { - DBG_ERROR( "Exception during determination of chart type template" ); + OSL_FAIL( "Exception during determination of chart type template" ); } } } catch( uno::Exception & ) { - DBG_ERROR( "Exception during import lcl_getTemplate" ); + OSL_FAIL( "Exception during import lcl_getTemplate" ); } return xResult; } @@ -399,7 +399,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut if( aOldChartTypeName.getLength()<= 0 ) { - DBG_ERROR( "need a charttype to create a diagram" ); + OSL_FAIL( "need a charttype to create a diagram" ); //set a fallback value: ::rtl::OUString aChartClass_Bar( GetXMLToken(XML_BAR ) ); aOldChartTypeName = SchXMLTools::GetChartTypeByClassName( aChartClass_Bar, true /* bUseOldNames */ ); @@ -427,7 +427,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut } catch( uno::Exception & ) { - DBG_ERROR( "Exception during import SchXMLChartContext::StartElement" ); + OSL_FAIL( "Exception during import SchXMLChartContext::StartElement" ); } } } @@ -766,7 +766,7 @@ void SchXMLChartContext::EndElement() } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -783,7 +783,7 @@ void SchXMLChartContext::EndElement() } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -886,7 +886,7 @@ void SchXMLChartContext::EndElement() catch( uno::Exception & ) { //try to fallback to internal data - DBG_ERROR( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram try to fallback to internal data" ); + OSL_FAIL( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram try to fallback to internal data" ); if(!bHasOwnData) { bHasOwnData = true; @@ -901,7 +901,7 @@ void SchXMLChartContext::EndElement() } catch( uno::Exception & ) { - DBG_ERROR( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram fallback to internal data failed also" ); + OSL_FAIL( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram fallback to internal data failed also" ); } } } @@ -910,7 +910,7 @@ void SchXMLChartContext::EndElement() } else { - DBG_ERROR( " Must not get here" ); + OSL_FAIL( " Must not get here" ); } // now all series and data point properties are available and can be set @@ -1053,7 +1053,7 @@ void SchXMLChartContext::MergeSeriesForStockChart() } catch( uno::Exception & ) { - DBG_ERROR( "Exception while merging series for stock chart" ); + OSL_FAIL( "Exception while merging series for stock chart" ); } } @@ -1326,7 +1326,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property HasLegend not found" ); + OSL_FAIL( "Property HasLegend not found" ); } } @@ -1367,7 +1367,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property Alignment (legend) not found" ); + OSL_FAIL( "Property Alignment (legend) not found" ); } } } diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 425556b5413f..60f56f6ede18 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -568,7 +568,7 @@ bool lcl_hasChartType( const Reference< chart2::XDiagram > & xDiagram, const OUS } catch( uno::Exception & ) { - DBG_ERROR( "Exception while searching for chart type in diagram" ); + OSL_FAIL( "Exception while searching for chart type in diagram" ); } return false; } @@ -1148,7 +1148,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& Reference< chart2::XChartDocument > xNewDoc( rChartDoc, uno::UNO_QUERY ); if( !rChartDoc.is() || !xNewDoc.is() ) { - DBG_ERROR( "No XChartDocument was given for export." ); + OSL_FAIL( "No XChartDocument was given for export." ); return; } @@ -1886,7 +1886,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property HasSecondaryYAxis not found in Diagram" ); + OSL_FAIL( "Property HasSecondaryYAxis not found in Diagram" ); } // 3d attributes @@ -3684,7 +3684,7 @@ void SchXMLExport::_ExportAutoStyles() } else { - DBG_ERROR( "Couldn't export chart due to wrong XModel (must be XChartDocument)" ); + OSL_FAIL( "Couldn't export chart due to wrong XModel (must be XChartDocument)" ); } } } @@ -3742,7 +3742,7 @@ void SchXMLExport::_ExportContent() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property ChartRangeAddress not supported by ChartDocument" ); + OSL_FAIL( "Property ChartRangeAddress not supported by ChartDocument" ); } } } @@ -3752,7 +3752,7 @@ void SchXMLExport::_ExportContent() } else { - DBG_ERROR( "Couldn't export chart due to wrong XModel" ); + OSL_FAIL( "Couldn't export chart due to wrong XModel" ); } } diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index e77ce27c50d9..173bdadc21f1 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -205,7 +205,7 @@ SvXMLImportContext* SchXMLImportHelper::CreateChartContext( } else { - DBG_ERROR( "No valid XChartDocument given as XModel" ); + OSL_FAIL( "No valid XChartDocument given as XModel" ); pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); } diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 1cdf8f352256..15d4568cfc40 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -288,7 +288,7 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property required by service not supported" ); + OSL_FAIL( "Property required by service not supported" ); } } } @@ -926,7 +926,7 @@ uno::Reference< drawing::XShape > SchXMLAxisContext::getTitleShape() break; } case SCH_XML_AXIS_UNDEF: - DBG_ERROR( "Invalid axis" ); + OSL_FAIL( "Invalid axis" ); break; } @@ -1007,7 +1007,7 @@ void SchXMLAxisContext::CreateGrid( ::rtl::OUString sAutoStyleName, } break; case SCH_XML_AXIS_UNDEF: - DBG_ERROR( "Invalid axis" ); + OSL_FAIL( "Invalid axis" ); break; } @@ -1106,7 +1106,7 @@ uno::Reference< chart2::XAxis > lcl_getAxis( const uno::Reference< frame::XModel } catch( uno::Exception & ) { - DBG_ERROR( "Couldn't get axis" ); + OSL_FAIL( "Couldn't get axis" ); } return xAxis; @@ -1162,7 +1162,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on x axis" ); + OSL_FAIL( "Couldn't turn on x axis" ); } uno::Reference< chart::XAxisXSupplier > xSuppl( mxDiagram, uno::UNO_QUERY ); if( xSuppl.is()) @@ -1177,7 +1177,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on second x axis" ); + OSL_FAIL( "Couldn't turn on second x axis" ); } uno::Reference< chart::XTwoAxisXSupplier > xSuppl( mxDiagram, uno::UNO_QUERY ); if( xSuppl.is()) @@ -1195,7 +1195,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on y axis" ); + OSL_FAIL( "Couldn't turn on y axis" ); } uno::Reference< chart::XAxisYSupplier > xSuppl( mxDiagram, uno::UNO_QUERY ); if( xSuppl.is()) @@ -1213,7 +1213,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on x axis" ); + OSL_FAIL( "Couldn't turn on x axis" ); } } } @@ -1227,7 +1227,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on second y axis" ); + OSL_FAIL( "Couldn't turn on second y axis" ); } uno::Reference< chart::XTwoAxisYSupplier > xSuppl( mxDiagram, uno::UNO_QUERY ); if( xSuppl.is()) @@ -1246,7 +1246,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on z axis" ); + OSL_FAIL( "Couldn't turn on z axis" ); } if( bSettingZAxisSuccedded ) { @@ -1404,7 +1404,7 @@ void SchXMLAxisContext::SetAxisTitle() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -1426,7 +1426,7 @@ void SchXMLAxisContext::SetAxisTitle() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -1451,7 +1451,7 @@ void SchXMLAxisContext::SetAxisTitle() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -1473,7 +1473,7 @@ void SchXMLAxisContext::SetAxisTitle() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -1497,7 +1497,7 @@ void SchXMLAxisContext::SetAxisTitle() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 2ea903228832..dbd8c395331b 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -395,14 +395,14 @@ Reference< chart2::data::XDataSequence > CreateDataSequence( if( !xChartDoc.is() ) { - DBG_ERROR( "need a chart document" ); + OSL_FAIL( "need a chart document" ); return xRet; } Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() ); if( !xDataProvider.is() ) { - DBG_ERROR( "need a data provider" ); + OSL_FAIL( "need a data provider" ); return xRet; } @@ -413,7 +413,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence( } catch( const lang::IllegalArgumentException & ) { - DBG_ERROR( "could not create data sequence" ); + OSL_FAIL( "could not create data sequence" ); } if( !xRet.is() && !xChartDoc->hasInternalDataProvider() ) @@ -428,7 +428,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence( } catch( const lang::IllegalArgumentException & ) { - DBG_ERROR( "could not create data sequence" ); + OSL_FAIL( "could not create data sequence" ); } } return xRet; diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 6d0af79da2fc..95f9ade152f5 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -684,7 +684,7 @@ void XMLConfigItemContext::EndElement() mrAny <<= maDecoded; } else { - DBG_ERROR("wrong type"); + OSL_FAIL("wrong type"); } ManipulateConfigItem(); @@ -692,7 +692,7 @@ void XMLConfigItemContext::EndElement() mpBaseContext->AddPropertyValue(); } else { - DBG_ERROR("no BaseContext"); + OSL_FAIL("no BaseContext"); } } @@ -781,7 +781,7 @@ void XMLConfigItemMapNamedContext::EndElement() mpBaseContext->AddPropertyValue(); } else { - DBG_ERROR("no BaseContext"); + OSL_FAIL("no BaseContext"); } } @@ -890,7 +890,7 @@ void XMLConfigItemMapIndexedContext::EndElement() } catch( uno::Exception& ) { - DBG_ERROR( "Exception while importing forbidden characters" ); + OSL_FAIL( "Exception while importing forbidden characters" ); } } } @@ -898,7 +898,7 @@ void XMLConfigItemMapIndexedContext::EndElement() } else { - DBG_ERROR( "could not get the XForbiddenCharacters from document!" ); + OSL_FAIL( "could not get the XForbiddenCharacters from document!" ); mrAny <<= maProps.GetIndexContainer(); } } @@ -1003,7 +1003,7 @@ void XMLConfigItemMapIndexedContext::EndElement() mpBaseContext->AddPropertyValue(); } else { - DBG_ERROR("no BaseContext"); + OSL_FAIL("no BaseContext"); } } diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx index eb39b668b57b..e3cd28fef9af 100644 --- a/xmloff/source/core/DomExport.cxx +++ b/xmloff/source/core/DomExport.cxx @@ -136,7 +136,7 @@ void visitNode( DomVisitor& rVisitor, const Reference<XNode>& xNode ) rVisitor.character( Reference<XCharacterData>( xNode, UNO_QUERY_THROW ) ); break; default: - DBG_ERROR( "unknown DOM node type" ); + OSL_FAIL( "unknown DOM node type" ); break; } } diff --git a/xmloff/source/core/ProgressBarHelper.cxx b/xmloff/source/core/ProgressBarHelper.cxx index eff5e23682d5..83edfb771f3c 100644 --- a/xmloff/source/core/ProgressBarHelper.cxx +++ b/xmloff/source/core/ProgressBarHelper.cxx @@ -123,7 +123,7 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue) #ifdef DBG_UTIL else if (!bFailure) { - DBG_ERROR("tried to set a wrong value on the progressbar"); + OSL_FAIL("tried to set a wrong value on the progressbar"); bFailure = sal_True; } #endif diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 39ca68d70dfe..83ccc3255066 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -83,7 +83,7 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny, * This assertion pops up when exporting values which are set to: * PropertyAttribute::MAYBEVOID, and thus are _supposed_ to have * a VOID value...so I'm removing it ...mtg - * DBG_ERROR("no type"); + * OSL_FAIL("no type"); */ } break; @@ -180,7 +180,7 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny, exportSymbolDescriptors(aProps, rName); } else { - DBG_ERROR("this type is not implemented now"); + OSL_FAIL("this type is not implemented now"); } } break; diff --git a/xmloff/source/core/xmlcnitm.cxx b/xmloff/source/core/xmlcnitm.cxx index 17757339cd73..92e1a8aa5d5f 100644 --- a/xmloff/source/core/xmlcnitm.cxx +++ b/xmloff/source/core/xmlcnitm.cxx @@ -197,7 +197,7 @@ void SvXMLAttrContainerData::Remove( USHORT i ) } else { - DBG_ERROR( "illegal index" ); + OSL_FAIL( "illegal index" ); } } diff --git a/xmloff/source/core/xmlehelp.cxx b/xmloff/source/core/xmlehelp.cxx index 90cb97722be2..078817a27b15 100644 --- a/xmloff/source/core/xmlehelp.cxx +++ b/xmloff/source/core/xmlehelp.cxx @@ -402,7 +402,7 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit, break; } default: - DBG_ERROR("xmloff::SvXMLExportHelper::GetConversionFactor(), illegal eCoreUnit value!"); + OSL_FAIL("xmloff::SvXMLExportHelper::GetConversionFactor(), illegal eCoreUnit value!"); break; } diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 492849b816c8..6eb0e090cc5f 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1399,7 +1399,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) case SvtSaveOptions::ODFVER_010: break; default: - DBG_ERROR("xmloff::SvXMLExport::exportDoc(), unexpected odf default version!"); + OSL_FAIL("xmloff::SvXMLExport::exportDoc(), unexpected odf default version!"); } if( pVersion ) diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 57c2e91a0d46..a89dc1cf9053 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1482,11 +1482,11 @@ void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName) } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat could not be inserted"); + OSL_FAIL("Numberformat could not be inserted"); } } else { - DBG_ERROR("not possible to create NameContainer"); + OSL_FAIL("not possible to create NameContainer"); } } diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 7b56abc97855..a6a023eb1e69 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3190,7 +3190,7 @@ namespace xmloff { namespace token { if (nRescheduleCount > 0) --nRescheduleCount; else { - DBG_ERROR("RescheduleCount not increased"); + OSL_FAIL("RescheduleCount not increased"); } } diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 101d9f67a4e5..249c816f967e 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -935,7 +935,7 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, { //! how many days is a year or month? - DBG_ERROR("years or months in duration: not implemented"); + OSL_FAIL("years or months in duration: not implemented"); bSuccess = sal_False; } else @@ -2071,7 +2071,7 @@ bool SvXMLUnitConverter::convertTimeDuration( const OUString& rString, Time& rTi { //! how many days is a year or month? - DBG_ERROR("years or months in duration: not implemented"); + OSL_FAIL("years or months in duration: not implemented"); bSuccess = false; } else diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 09bfd4d6cbff..b3a2d5f0cbf8 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -476,7 +476,7 @@ SvXMLEnumMapEntry* getAnimationsEnumMap( sal_uInt16 nMap ) } } - DBG_ERROR( "xmloff::getAnimationsEnumMap(), invalid map!" ); + OSL_FAIL( "xmloff::getAnimationsEnumMap(), invalid map!" ); return NULL; } @@ -555,7 +555,7 @@ AnimationsExporterImpl::AnimationsExporterImpl( SvXMLExport& rExport, const Refe } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::AnimationsExporterImpl(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::AnimationsExporterImpl(), RuntimeException catched!" ); } } @@ -671,7 +671,7 @@ void AnimationsExporterImpl::prepareTransitionNode() } catch( Exception& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::prepareNode(), Exception caught!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::prepareNode(), Exception caught!" ); } } @@ -752,7 +752,7 @@ void AnimationsExporterImpl::prepareNode( const Reference< XAnimationNode >& xNo } catch( Exception& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::prepareNode(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::prepareNode(), RuntimeException catched!" ); } } @@ -994,12 +994,12 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod } break; default: - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportNode(), invalid AnimationNodeType!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportNode(), invalid AnimationNodeType!" ); } } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportNode(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportNode(), RuntimeException catched!" ); } // if something goes wrong, its always a good idea to clear the attribute list @@ -1064,7 +1064,7 @@ void AnimationsExporterImpl::exportContainer( const Reference< XTimeContainer >& case AnimationNodeType::SEQ: eElementToken = XML_SEQ; break; case AnimationNodeType::ITERATE:eElementToken = XML_ITERATE; break; default: - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportContainer(), invalid TimeContainerType!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportContainer(), invalid TimeContainerType!" ); return; } SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, eElementToken, sal_True, sal_True ); @@ -1082,7 +1082,7 @@ void AnimationsExporterImpl::exportContainer( const Reference< XTimeContainer >& } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportContainer(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportContainer(), RuntimeException catched!" ); } } @@ -1347,7 +1347,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat catch( Exception& e ) { (void)e; - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportAnimate(), Exception cought!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAnimate(), Exception cought!" ); } } @@ -1380,7 +1380,7 @@ void AnimationsExporterImpl::exportAudio( const Reference< XAudio >& xAudio ) catch( Exception& e ) { (void)e; - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportAudio(), exception caught!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAudio(), exception caught!" ); } } @@ -1408,7 +1408,7 @@ void AnimationsExporterImpl::exportCommand( const Reference< XCommand >& xComman catch( Exception& e ) { (void)e; - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportCommand(), exception caught!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportCommand(), exception caught!" ); } } @@ -1430,7 +1430,7 @@ Reference< XInterface > AnimationsExporterImpl::getParagraphTarget( const Paragr } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::getParagraphTarget(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::getParagraphTarget(), RuntimeException catched!" ); } Reference< XInterface > xRef; @@ -1500,7 +1500,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString } else { - DBG_ERROR( "xmloff::AnimationsExporterImpl::convertValue(), invalid value type!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::convertValue(), invalid value type!" ); } return; } @@ -1522,7 +1522,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString case XML_OPACITY: case XML_TRANSITIONFILTER: nType = XML_TYPE_DOUBLE; break; default: - DBG_ERROR( "xmloff::AnimationsExporterImpl::convertValue(), invalid AttributeName!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::convertValue(), invalid AttributeName!" ); nType = XML_TYPE_STRING; } @@ -1598,7 +1598,7 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa } else { - DBG_ERROR( "xmloff::AnimationsExporterImpl::convertTiming(), invalid value type!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::convertTiming(), invalid value type!" ); } } @@ -1694,7 +1694,7 @@ void AnimationsExporter::prepare( Reference< XAnimationNode > xRootNode ) } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporter::prepare(), exception catched" ); + OSL_FAIL( "xmloff::AnimationsExporter::prepare(), exception catched" ); } } @@ -1730,7 +1730,7 @@ void AnimationsExporter::exportAnimations( Reference< XAnimationNode > xRootNode } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporter::exportAnimations(), exception catched" ); + OSL_FAIL( "xmloff::AnimationsExporter::exportAnimations(), exception catched" ); } } diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 707fcd130714..3a2c17d18b59 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -397,7 +397,7 @@ Any AnimationsImportHelperImpl::convertTarget( const OUString& rValue ) } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsImportImpl::convertTarget(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsImportImpl::convertTarget(), RuntimeException catched!" ); } Any aAny; @@ -567,7 +567,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue ) } else { - DBG_ERROR("AnimationsImportHelperImpl::convertTiming(), unknown event trigger!"); + OSL_FAIL("AnimationsImportHelperImpl::convertTiming(), unknown event trigger!"); } aAny <<= aEvent; @@ -741,7 +741,7 @@ AnimationNodeContext::AnimationNodeContext( } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsImportImpl::AnimationsImportImpl(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsImportImpl::AnimationsImportImpl(), RuntimeException catched!" ); } } @@ -1259,7 +1259,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationNodeContext::StartElement(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationNodeContext::StartElement(), RuntimeException catched!" ); } } @@ -1446,7 +1446,7 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const } catch( Exception& ) { - DBG_ERROR("xmloff::AnimationsImport::postProcessRootNode(), exception caught!"); + OSL_FAIL("xmloff::AnimationsImport::postProcessRootNode(), exception caught!"); } } diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 32e7beda52c3..9a15c6d731b1 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -187,7 +187,7 @@ void SdXMLImplSetEffect( AnimationEffect eEffect, XMLEffect& eKind, XMLEffectDir { if( eEffect < AnimationEffect_NONE || eEffect > AnimationEffect_ZOOM_OUT_FROM_CENTER ) { - DBG_ERROR( "unknown animation effect!" ); + OSL_FAIL( "unknown animation effect!" ); eEffect = AnimationEffect_NONE; } @@ -308,7 +308,7 @@ void XMLAnimationsExporter::prepare( Reference< XShape > xShape, SvXMLExport& ) } catch( Exception e ) { - DBG_ERROR("exception catched while collection animation information!"); + OSL_FAIL("exception catched while collection animation information!"); } } @@ -439,7 +439,7 @@ void XMLAnimationsExporter::collect( Reference< XShape > xShape, SvXMLExport& rE } catch( Exception e ) { - DBG_ERROR("exception catched while collection animation information!"); + OSL_FAIL("exception catched while collection animation information!"); } } diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 157ad7bc0301..7660a1b463d9 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -661,14 +661,14 @@ void XMLAnimationsEffectContext::EndElement() } else { - DBG_ERROR("XMLAnimationsEffectContext::EndElement - Sound URL without a XPropertySet!"); + OSL_FAIL("XMLAnimationsEffectContext::EndElement - Sound URL without a XPropertySet!"); } } } } catch( Exception e ) { - DBG_ERROR( "exception catched while importing animation information!" ); + OSL_FAIL( "exception catched while importing animation information!" ); } } diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index 61c8014b5eef..143de03e0df8 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -494,7 +494,7 @@ void SdXMLEventContext::EndElement() pProperties->State = beans::PropertyState_DIRECT_VALUE; break; case ClickAction_MACRO: - DBG_ERROR("xmloff::SdXMLEventContext::EndElement(), ClickAction_MACRO must be handled in different if case"); + OSL_FAIL("xmloff::SdXMLEventContext::EndElement(), ClickAction_MACRO must be handled in different if case"); break; default: break; diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx index 098c78d58783..444edb169e8d 100644 --- a/xmloff/source/draw/layerexp.cxx +++ b/xmloff/source/draw/layerexp.cxx @@ -104,7 +104,7 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport ) } catch( Exception& ) { - DBG_ERROR("SdXMLayerExporter::exportLayer(), exception caught during export of one layer!"); + OSL_FAIL("SdXMLayerExporter::exportLayer(), exception caught during export of one layer!"); } } } diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index 8ae8e498c8e9..86d0900c180c 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -153,7 +153,7 @@ void SdXMLLayerContext::EndElement() } catch( Exception& ) { - DBG_ERROR("SdXMLLayerContext::EndElement(), exception caught!"); + OSL_FAIL("SdXMLLayerContext::EndElement(), exception caught!"); } } diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index dacd1087286f..e99cbe59d308 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1284,7 +1284,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } default: { - DBG_ERROR("XMLEXP: unknown autolayout export"); + OSL_FAIL("XMLEXP: unknown autolayout export"); break; } } @@ -1633,7 +1633,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons catch( Exception& e ) { (void)e; - DBG_ERROR( "SdXMLExport::ImpPrepDrawPageHeaderFooterDecls(), unexpected exception cought!" ); + OSL_FAIL( "SdXMLExport::ImpPrepDrawPageHeaderFooterDecls(), unexpected exception cought!" ); } return aSettings; @@ -2238,7 +2238,7 @@ void SdXMLExport::exportPresentationSettings() } catch( uno::Exception ) { - DBG_ERROR( "uno::Exception while exporting <presentation:settings>" ); + OSL_FAIL( "uno::Exception while exporting <presentation:settings>" ); } } @@ -2617,7 +2617,7 @@ void SdXMLExport::exportFormsElement( Reference< XDrawPage > xDrawPage ) if(! GetFormExport()->seekPage( xDrawPage ) ) { - DBG_ERROR( "OFormLayerXMLExport::seekPage failed!" ); + OSL_FAIL( "OFormLayerXMLExport::seekPage failed!" ); } } } @@ -2772,7 +2772,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw } catch( Exception& ) { - DBG_ERROR("SdXMLExport::collectAnnotationAutoStyles(), exception caught during export of annotation auto styles"); + OSL_FAIL("SdXMLExport::collectAnnotationAutoStyles(), exception caught during export of annotation auto styles"); } } @@ -2839,7 +2839,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage ) } catch( Exception& ) { - DBG_ERROR("SdXMLExport::exportAnnotations(), exception caught during export of annotations"); + OSL_FAIL("SdXMLExport::exportAnnotations(), exception caught during export of annotations"); } } diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index dedd1bced931..f6764b4d14ab 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -964,7 +964,7 @@ void SdXMLImport::SetStatistics( if (i_rStats[i].Value >>= val) { nCount = val; } else { - DBG_ERROR("SdXMLImport::SetStatistics: invalid entry"); + OSL_FAIL("SdXMLImport::SetStatistics: invalid entry"); } } } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 827c910f54d3..7e01bb163c25 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -195,7 +195,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { if( maCurrentShapesIter == maShapesInfos.end() ) { - DBG_ERROR( "XMLShapeExport::collectShapeAutoStyles(): no call to seekShapes()!" ); + OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): no call to seekShapes()!" ); return; } sal_Int32 nZIndex = 0; @@ -207,7 +207,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap if( (sal_Int32)aShapeInfoVector.size() <= nZIndex ) { - DBG_ERROR( "XMLShapeExport::collectShapeAutoStyles(): no shape info allocated for a given shape" ); + OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): no shape info allocated for a given shape" ); return; } @@ -474,7 +474,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap } catch( uno::Exception& ) { - DBG_ERROR( "XMLShapeExport::collectShapeAutoStyles(): exception caught while collection auto styles for a table!" ); + OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): exception caught while collection auto styles for a table!" ); } break; } @@ -530,7 +530,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape { if( maCurrentShapesIter == maShapesInfos.end() ) { - DBG_ERROR( "XMLShapeExport::exportShape(): no auto styles where collected before export" ); + OSL_FAIL( "XMLShapeExport::exportShape(): no auto styles where collected before export" ); return; } sal_Int32 nZIndex = 0; @@ -563,7 +563,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } catch( uno::Exception& ) { - DBG_ERROR("XMLShapeExport::exportShape(): exception during hyperlink export"); + OSL_FAIL("XMLShapeExport::exportShape(): exception during hyperlink export"); } @@ -574,7 +574,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape if( (sal_Int32)aShapeInfoVector.size() <= nZIndex ) { - DBG_ERROR( "XMLShapeExport::exportShape(): no shape info collected for a given shape" ); + OSL_FAIL( "XMLShapeExport::exportShape(): no shape info collected for a given shape" ); return; } @@ -686,7 +686,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } catch( uno::Exception e ) { - DBG_ERROR( "could not export layer name for shape!" ); + OSL_FAIL( "could not export layer name for shape!" ); } } } @@ -720,7 +720,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } catch( uno::Exception& ) { - DBG_ERROR( "XMLShapeExport::exportShape(), exception caught!" ); + OSL_FAIL( "XMLShapeExport::exportShape(), exception caught!" ); } } @@ -900,7 +900,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape default: { // this should never happen and is an error - DBG_ERROR("XMLEXP: WriteShape: unknown or unexpected type of shape in export!"); + OSL_FAIL("XMLEXP: WriteShape: unknown or unexpected type of shape in export!"); break; } } @@ -1159,7 +1159,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x } catch( uno::Exception& ) { - DBG_ERROR( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" ); + OSL_FAIL( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" ); } } else if(aType.EqualsAscii("Chart", 26, 5)) { eShapeType = XmlShapeTypePresChartShape; } diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index 5035e069ffbd..c118a9c05db7 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -408,7 +408,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x case presentation::ClickAction_VANISH: eStrAction = XML_FADE_OUT; break; case presentation::ClickAction_SOUND: eStrAction = XML_SOUND; break; default: - DBG_ERROR( "unknown presentation::ClickAction found!" ); + OSL_FAIL( "unknown presentation::ClickAction found!" ); eStrAction = XML_UNKNOWN; } @@ -581,7 +581,7 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR( "could not export Title and/or Description for shape!" ); + OSL_FAIL( "could not export Title and/or Description for shape!" ); } } diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 87370c785d89..af13278f2a60 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -1137,7 +1137,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR("XMLShapeExport::ImpExportTableShape(), exception caught!"); + OSL_FAIL("XMLShapeExport::ImpExportTableShape(), exception caught!"); } } } @@ -1218,7 +1218,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR("xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!"); + OSL_FAIL("xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!"); } } @@ -1228,7 +1228,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!" ); + OSL_FAIL( "xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!" ); } } diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 55d221d508d1..7184c881e867 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -1043,7 +1043,7 @@ void XMLShapeImportHelper::popGroupAndSort() } catch( uno::Exception& ) { - DBG_ERROR("exception while sorting shapes, sorting failed!"); + OSL_FAIL("exception while sorting shapes, sorting failed!"); } // put parent on top and delete current context, were done diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index b369120228b2..9cfa88cf650e 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -361,7 +361,7 @@ void SdXMLImExTransform2D::EmptyList() } default : { - DBG_ERROR("SdXMLImExTransform2D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform2D: impossible entry!"); break; } } @@ -494,7 +494,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& } default : { - DBG_ERROR("SdXMLImExTransform2D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform2D: impossible entry!"); break; } } @@ -704,7 +704,7 @@ void SdXMLImExTransform2D::GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans) } default : { - DBG_ERROR("SdXMLImExTransform2D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform2D: impossible entry!"); break; } } @@ -817,7 +817,7 @@ void SdXMLImExTransform3D::EmptyList() } default : { - DBG_ERROR("SdXMLImExTransform3D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform3D: impossible entry!"); break; } } @@ -998,7 +998,7 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& } default : { - DBG_ERROR("SdXMLImExTransform3D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform3D: impossible entry!"); break; } } @@ -1268,7 +1268,7 @@ void SdXMLImExTransform3D::GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans) } default : { - DBG_ERROR("SdXMLImExTransform3D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform3D: impossible entry!"); break; } } @@ -2532,7 +2532,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, case 'A' : case 'a' : { - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); nPos++; Imp_SkipSpaces(aStr, nPos, nLen); @@ -2552,7 +2552,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, default: { nPos++; - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); break; } } @@ -2988,7 +2988,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, case 'A' : case 'a' : { - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); nPos++; Imp_SkipSpaces(aStr, nPos, nLen); @@ -3008,7 +3008,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, default: { nPos++; - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); break; } } diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 5ac26a94deef..cdd8fb0a81e4 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -361,7 +361,7 @@ void SdXMLGenericPageContext::EndElement() catch( uno::Exception& e ) { (void)e; - DBG_ERROR("xmloff::SdXMLGenericPageContext::EndElement(), unexpected exception cought!"); + OSL_FAIL("xmloff::SdXMLGenericPageContext::EndElement(), unexpected exception cought!"); } } @@ -428,7 +428,7 @@ void SdXMLGenericPageContext::SetStyle( rtl::OUString& rStyleName ) } catch( uno::Exception ) { - DBG_ERROR( "SdXMLGenericPageContext::SetStyle(): uno::Exception catched!" ); + OSL_FAIL( "SdXMLGenericPageContext::SetStyle(): uno::Exception catched!" ); } } } @@ -632,7 +632,7 @@ void SdXMLGenericPageContext::SetNavigationOrder() { if( !aShapes[nIndex].is() ) { - DBG_ERROR("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), draw:nav-order attribute incomplete!"); + OSL_FAIL("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), draw:nav-order attribute incomplete!"); // todo: warning? return; } @@ -643,7 +643,7 @@ void SdXMLGenericPageContext::SetNavigationOrder() } catch( uno::Exception& ) { - DBG_ERROR("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception cought while importing shape navigation order!"); + OSL_FAIL("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception cought while importing shape navigation order!"); } } diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index bfe07cfb4c89..66c0fff0fa51 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -337,7 +337,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttribute } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of glue points!"); + OSL_FAIL( "exception during setting of glue points!"); } } } @@ -416,7 +416,7 @@ void SdXMLShapeContext::EndElement() } catch( Exception& ) { - DBG_ERROR("xmloff::SdXMLShapeContext::EndElement(), exception caught while setting hyperlink!"); + OSL_FAIL("xmloff::SdXMLShapeContext::EndElement(), exception caught while setting hyperlink!"); } if( mxLockable.is() ) @@ -460,7 +460,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape) } catch( Exception& ) { - DBG_ERROR( "SdXMLShapeContext::AddShape(), exception caught!" ); + OSL_FAIL( "SdXMLShapeContext::AddShape(), exception caught!" ); } // #107848# @@ -688,7 +688,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) } catch( uno::Exception& ) { - DBG_ERROR( "could not find style for shape!" ); + OSL_FAIL( "could not find style for shape!" ); } } @@ -703,7 +703,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) } catch( uno::Exception& ) { - DBG_ERROR( "could not find style for shape!" ); + OSL_FAIL( "could not find style for shape!" ); } } @@ -991,7 +991,7 @@ void SdXMLRectShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of corner radius!"); + OSL_FAIL( "exception during setting of corner radius!"); } } } @@ -1644,7 +1644,7 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of corner radius!"); + OSL_FAIL( "exception during setting of corner radius!"); } } } @@ -2247,7 +2247,7 @@ void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAtt } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of corner radius!"); + OSL_FAIL( "exception during setting of corner radius!"); } } } @@ -3549,7 +3549,7 @@ void SdXMLCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAtt } catch( uno::Exception& ) { - DBG_ERROR( "could not set enhanced customshape geometry" ); + OSL_FAIL( "could not set enhanced customshape geometry" ); } SdXMLShapeContext::StartElement(xAttrList); } @@ -3581,7 +3581,7 @@ void SdXMLCustomShapeContext::EndElement() } catch( uno::Exception& ) { - DBG_ERROR( "could not set enhanced customshape geometry" ); + OSL_FAIL( "could not set enhanced customshape geometry" ); } sal_Int32 nUPD( 0 ); @@ -3692,7 +3692,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc } catch( Exception& ) { - DBG_ERROR("SdXMLTableShapeContext::StartElement(), exception caught!"); + OSL_FAIL("SdXMLTableShapeContext::StartElement(), exception caught!"); } const XMLPropertyMapEntry* pEntry = &aXMLTableShapeAttributes[0]; @@ -3705,7 +3705,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc } catch( Exception& ) { - DBG_ERROR("SdXMLTableShapeContext::StartElement(), exception caught!"); + OSL_FAIL("SdXMLTableShapeContext::StartElement(), exception caught!"); } } } diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index e9bd91d34529..73fbf88c3111 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1286,7 +1286,7 @@ void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext& rMaster) co } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::SdXMLStylesContext::SetMasterPageStyles(), exception caught!" ); + OSL_FAIL( "xmloff::SdXMLStylesContext::SetMasterPageStyles(), exception caught!" ); } } @@ -1306,7 +1306,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles() const } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::SdXMLStylesContext::ImpSetGraphicStyles(), exception caught!" ); + OSL_FAIL( "xmloff::SdXMLStylesContext::ImpSetGraphicStyles(), exception caught!" ); } } @@ -1322,7 +1322,7 @@ void SdXMLStylesContext::ImpSetCellStyles() const } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::SdXMLStylesContext::ImpSetCellStyles(), exception caught!" ); + OSL_FAIL( "xmloff::SdXMLStylesContext::ImpSetCellStyles(), exception caught!" ); } } diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index ce5787fb5e41..68fafa741e0c 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -154,7 +154,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) case SvtSaveOptions::ODFVER_010: break; default: - DBG_ERROR("xmloff::XMLMetaExportComponent::exportDoc(), unexpected odf default version!"); + OSL_FAIL("xmloff::XMLMetaExportComponent::exportDoc(), unexpected odf default version!"); } if( pVersion ) diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index 4a977e0dc42e..938654638a73 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -366,7 +366,7 @@ void SvXMLMetaExport::Export() } else if (attrname.equalsAsciiL(s_xmlns, strlen(s_xmlns))) { // default initialized empty string } else { - DBG_ERROR("namespace attribute not starting with xmlns unexpected"); + OSL_FAIL("namespace attribute not starting with xmlns unexpected"); } ns.Second = rNsMap.GetNameByKey(key); namespaces.push_back(ns); diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index 2614546fe459..f4b9b19ea32e 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -256,7 +256,7 @@ void XMLEventExport::ExportEvent( { if (! sType.equalsAsciiL("None", sizeof("None")-1)) { - DBG_ERROR("unknown event type returned by API"); + OSL_FAIL("unknown event type returned by API"); // unknown type -> error (ignore) } // else: we ignore None fields diff --git a/xmloff/source/style/EnumPropertyHdl.cxx b/xmloff/source/style/EnumPropertyHdl.cxx index ef66ad5a1bbd..dcf31f47c06a 100644 --- a/xmloff/source/style/EnumPropertyHdl.cxx +++ b/xmloff/source/style/EnumPropertyHdl.cxx @@ -72,7 +72,7 @@ sal_Bool XMLEnumPropertyHdl::importXML( const OUString& rStrImpValue, Any& rValu rValue <<= (sal_Int8) nValue; break; default: - DBG_ERROR( "Wrong type for enum property handler!" ); + OSL_FAIL( "Wrong type for enum property handler!" ); return sal_False; } return sal_True; diff --git a/xmloff/source/style/XMLConstantsPropertyHandler.cxx b/xmloff/source/style/XMLConstantsPropertyHandler.cxx index ac7b07d736a6..55c62fc8d810 100644 --- a/xmloff/source/style/XMLConstantsPropertyHandler.cxx +++ b/xmloff/source/style/XMLConstantsPropertyHandler.cxx @@ -101,12 +101,12 @@ sal_Bool XMLConstantsPropertyHandler::exportXML( } else { - DBG_ERROR("XMLConstantsPropertyHandler::exportXML() constant is out of range for implementation using sal_uInt16"); + OSL_FAIL("XMLConstantsPropertyHandler::exportXML() constant is out of range for implementation using sal_uInt16"); } } else { - DBG_ERROR("XMLConstantsPropertyHandler::exportXML() could not convert any to sal_Int32"); + OSL_FAIL("XMLConstantsPropertyHandler::exportXML() could not convert any to sal_Int32"); } return bRet; diff --git a/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx b/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx index 1eb9045a110f..96836b738d7c 100644 --- a/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx +++ b/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx @@ -57,7 +57,7 @@ sal_Bool XMLIsPercentagePropertyHandler::exportXML( const Any&, const SvXMLUnitConverter& ) const { - DBG_ERROR( "XMLIsPercentagePropertyHandler is not for export!" ); + OSL_FAIL( "XMLIsPercentagePropertyHandler is not for export!" ); return sal_False; } diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index 911f498c2ae5..8a40908407f5 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -273,7 +273,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3 } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } } @@ -301,7 +301,7 @@ sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNu } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } } @@ -357,7 +357,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3 } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } return sal_False; @@ -385,7 +385,7 @@ sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNu } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } return 0; @@ -538,7 +538,7 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes( WriteAttributes(nTypeKey, rValue, sCurrency, bExportValue); } else { - DBG_ERROR("no SvXMLExport given"); + OSL_FAIL("no SvXMLExport given"); } } @@ -554,7 +554,7 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes( pExport->AddAttribute(sAttrStringValue, rValue); } else { - DBG_ERROR("no SvXMLExport given"); + OSL_FAIL("no SvXMLExport given"); } } diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index 7badc15c6175..9a32b08dbdab 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -121,7 +121,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( if (bFoundControlShapeDataStyle) { - DBG_ERROR("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the ControlShapeDataStyle context id!"); + OSL_FAIL("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the ControlShapeDataStyle context id!"); // already added the attribute for the first occurrence break; } @@ -136,7 +136,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( { if (bFoundNumberingRulesName) { - DBG_ERROR("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the numbering rules name context id!"); + OSL_FAIL("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the numbering rules name context id!"); // already added the attribute for the first occurrence break; } @@ -279,7 +279,7 @@ void SvXMLAutoStylePoolP::exportStyleContent( SvXMLAutoStylePoolP::SvXMLAutoStylePoolP() { - DBG_ERROR("This constuctor is obsoleted and should not be used!"); + OSL_FAIL("This constuctor is obsoleted and should not be used!"); pImpl = NULL; } diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 71e2e3331118..3aed2bd40e5c 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -743,7 +743,7 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit, case NUMBERFORMAT_OP_GT: aCondStr.append( (sal_Unicode) '>' ); break; case NUMBERFORMAT_OP_GE: aCondStr.appendAscii( ">=" ); break; default: - DBG_ERROR("unknown operator"); + OSL_FAIL("unknown operator"); } ::rtl::math::doubleToUStringBuffer( aCondStr, fLimit, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, @@ -1732,7 +1732,7 @@ OUString SvXMLNumFmtExport::GetStyleName( sal_uInt32 nKey ) return lcl_CreateStyleName( nKey, 0, sal_True, sPrefix ); else { - DBG_ERROR("There is no written Data-Style"); + OSL_FAIL("There is no written Data-Style"); return rtl::OUString(); } } @@ -1746,7 +1746,7 @@ void SvXMLNumFmtExport::SetUsed( sal_uInt32 nKey ) if (pFormatter->GetEntry(nKey)) pUsedList->SetUsed( nKey ); else { - DBG_ERROR("no existing Numberformat found with this key"); + OSL_FAIL("no existing Numberformat found with this key"); } } diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 9cba23627df5..5dc4f27ecd2e 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1225,7 +1225,7 @@ void SvXMLNumFmtElementContext::EndElement() break; default: - DBG_ERROR("invalid element ID"); + OSL_FAIL("invalid element ID"); } } @@ -1542,7 +1542,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) { if (!pFormatter) { - DBG_ERROR("no number formatter"); + OSL_FAIL("no number formatter"); return -1; } @@ -1672,7 +1672,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND ) { - DBG_ERROR("invalid number format"); + OSL_FAIL("invalid number format"); nIndex = pFormatter->GetStandardIndex( nFormatLang ); } diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 70cdf6eacf4a..bb53f968d8b3 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -1200,7 +1200,7 @@ void SvxXMLListStyleContext::FillUnoNumRule( } catch( Exception& ) { - DBG_ERROR( "SvxXMLListStyleContext::FillUnoNumRule - Exception catched" ); + OSL_FAIL( "SvxXMLListStyleContext::FillUnoNumRule - Exception catched" ); } } diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 31cfbe22abbe..e1bd865aedf3 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -366,7 +366,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( SvXMLStyleIndex_Impl* pStyleIndex = new SvXMLStyleIndex_Impl( aStyles[ i ] ); if (!pIndices->Insert( pStyleIndex )) { - DBG_ERROR("Here is a double Style"); + OSL_FAIL("Here is a double Style"); delete pStyleIndex; } } diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx index a0bc34a71e47..c705a42055bd 100644 --- a/xmloff/source/style/xmltabe.cxx +++ b/xmloff/source/style/xmltabe.cxx @@ -118,7 +118,7 @@ void SvxXMLTabStopExport::Export( const uno::Any& rAny ) uno::Sequence< ::com::sun::star::style::TabStop> aSeq; if(!(rAny >>= aSeq)) { - DBG_ERROR( "SvxXMLTabStopExport needs a Sequence ::com::sun::star::style::TabStop>" ); + OSL_FAIL( "SvxXMLTabStopExport needs a Sequence ::com::sun::star::style::TabStop>" ); } else { diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index b589ba58c924..9d536b60d887 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -248,7 +248,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); + OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); } Reference< XIndexAccess > xIndexAccessRows( xColumnRowRange->getRows(), UNO_QUERY_THROW ); @@ -316,12 +316,12 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); + OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); } } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::collectTableAutoStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception caught!"); } } @@ -387,7 +387,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch( Exception ) { - DBG_ERROR( "XMLTableExport::exportTable(), exception cought!" ); + OSL_FAIL( "XMLTableExport::exportTable(), exception cought!" ); } } @@ -452,7 +452,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch ( Exception ) { - DBG_ERROR( "exception while exporting a table cell" ); + OSL_FAIL( "exception while exporting a table cell" ); } // table:number-columns-repeated @@ -575,7 +575,7 @@ void XMLTableExport::exportTableTemplates() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::exportTableTemplates(), exception caught!"); + OSL_FAIL("xmloff::XMLTableExport::exportTableTemplates(), exception caught!"); } pElements++; @@ -583,12 +583,12 @@ void XMLTableExport::exportTableTemplates() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::exportTableDesigns(), exception caught while exporting a table design!"); + OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught while exporting a table design!"); } } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::exportTableDesigns(), exception caught!"); + OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught!"); } } diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 2ebd134f815f..e101d93493ea 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -287,7 +287,7 @@ void XMLTableImport::finishStyles() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImport::finishStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!"); } if( xTemplate.is() ) @@ -301,12 +301,12 @@ void XMLTableImport::finishStyles() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImport::finishStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!"); } } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImport::finishStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!"); } } @@ -389,7 +389,7 @@ SvXMLImportContext * XMLTableImportContext::ImportColumn( USHORT nPrefix, const } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); } return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); @@ -429,7 +429,7 @@ void XMLTableImportContext::InitColumns() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); } } @@ -536,7 +536,7 @@ SvXMLImportContext * XMLTableImportContext::ImportCell( USHORT nPrefix, const OU const sal_Int32 nRepeated = pCellContext->getRepeated(); if( nRepeated > 1 ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportCell(), import of repeated Cells not implemented (TODO)"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportCell(), import of repeated Cells not implemented (TODO)"); mnCurrentColumn += nRepeated - 1; } @@ -544,7 +544,7 @@ SvXMLImportContext * XMLTableImportContext::ImportCell( USHORT nPrefix, const OU } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportCell(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportCell(), exception caught!"); } return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); @@ -597,7 +597,7 @@ void XMLTableImportContext::EndElement() } catch( Exception& ) { - DBG_ERROR("XMLTableImportContext::EndElement(), exception caught while merging cells!"); + OSL_FAIL("XMLTableImportContext::EndElement(), exception caught while merging cells!"); } } } diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index 5576135e8429..2630482bc9e7 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -452,7 +452,7 @@ const OUString XMLRedlineExport::ConvertTypeName( } else { - DBG_ERROR("unknown redline type"); + OSL_FAIL("unknown redline type"); return sUnknownChange; } } @@ -636,7 +636,7 @@ void XMLRedlineExport::ExportStartOrEndRedline( } else { - DBG_ERROR("XPropertySet expected"); + OSL_FAIL("XPropertySet expected"); } } @@ -651,7 +651,7 @@ void XMLRedlineExport::ExportStartOrEndRedline( } else { - DBG_ERROR("XPropertySet expected"); + OSL_FAIL("XPropertySet expected"); } } diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 85407bc86a79..68f929fd3c5d 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -344,11 +344,11 @@ void XMLTextMarkImportContext::EndElement() case TypeReferenceStart: case TypeReferenceEnd: - DBG_ERROR("reference start/end are handled in txtparai !"); + OSL_FAIL("reference start/end are handled in txtparai !"); break; default: - DBG_ERROR("unknown mark type"); + OSL_FAIL("unknown mark type"); break; } } diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index d618369504a8..744e954d18d9 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -756,7 +756,7 @@ sal_Bool XMLTextFieldExport::IsStringField( case FIELD_ID_DRAW_FOOTER: case FIELD_ID_DRAW_DATE_TIME: default: - DBG_ERROR("unkown field type/field has no content"); + OSL_FAIL("unkown field type/field has no content"); return sal_True; // invalid info; string in case of doubt } } @@ -975,7 +975,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle( case FIELD_ID_UNKNOWN: default: - DBG_ERROR("unkown field type!"); + OSL_FAIL("unkown field type!"); // ignore -> no format for unkowns break; } @@ -1852,7 +1852,7 @@ void XMLTextFieldExport::ExportFieldHelper( case FIELD_ID_UNKNOWN: default: - DBG_ERROR("unkown field type encountered!"); + OSL_FAIL("unkown field type encountered!"); // always export content GetExport().Characters(sPresentation); } @@ -2957,7 +2957,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapPlaceholderType(sal_uInt16 nType) default: // unkown placeholder: XML_TEXT - DBG_ERROR("unkown placeholder type"); + OSL_FAIL("unkown placeholder type"); } return eType; @@ -2996,7 +2996,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapPageNumberName( nOffset -= 1; break; default: - DBG_ERROR("unknown page number type"); + OSL_FAIL("unknown page number type"); eName = XML_TOKEN_INVALID; break; } @@ -3030,7 +3030,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapTemplateDisplayFormat(sal_Int16 nFormat eName = XML_TITLE; break; default: - DBG_ERROR("unknown template display format"); + OSL_FAIL("unknown template display format"); eName = XML_TOKEN_INVALID; break; } @@ -3067,7 +3067,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapCountFieldName(FieldIdEnum nToken) eElement = XML_OBJECT_COUNT; break; default: - DBG_ERROR("no count field token"); + OSL_FAIL("no count field token"); eElement = XML_TOKEN_INVALID; break; } @@ -3098,7 +3098,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapChapterDisplayFormat(sal_Int16 nFormat) eName = XML_PLAIN_NUMBER; break; default: - DBG_ERROR("unkown chapter display format"); + OSL_FAIL("unkown chapter display format"); eName = XML_TOKEN_INVALID; break; } @@ -3127,7 +3127,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapFilenameDisplayFormat(sal_Int16 nFormat eName = XML_NAME_AND_EXTENSION; break; default: - DBG_ERROR("unknown filename display format"); + OSL_FAIL("unknown filename display format"); } return eName; @@ -3178,7 +3178,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapReferenceType(sal_Int16 nType) eElement = XML_NUMBER_ALL_SUPERIOR; break; default: - DBG_ERROR("unknown reference type"); + OSL_FAIL("unknown reference type"); eElement = XML_TEMPLATE; break; } @@ -3207,7 +3207,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapReferenceSource(sal_Int16 nType) eElement = XML_NOTE_REF; break; default: - DBG_ERROR("unkown reference source"); + OSL_FAIL("unkown reference source"); break; } @@ -3470,7 +3470,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(OUString sName) } else { - DBG_ERROR("Unknown bibliography info data"); + OSL_FAIL("Unknown bibliography info data"); eName = XML_TOKEN_INVALID; } diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index bc8232914fe7..77139d7e1407 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -623,7 +623,7 @@ void XMLTextFieldImportContext::ForceUpdate( } else { - DBG_ERROR("Expected XUpdatable support!"); + OSL_FAIL("Expected XUpdatable support!"); } } @@ -1791,7 +1791,7 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName( break; default: - DBG_ERROR("no docinfo field token"); + OSL_FAIL("no docinfo field token"); pServiceName = NULL; break; } @@ -1886,7 +1886,7 @@ XMLDateTimeDocInfoImportContext::XMLDateTimeDocInfoImportContext( bHasDateTime = sal_False; break; default: - DBG_ERROR( + OSL_FAIL( "XMLDateTimeDocInfoImportContext needs date/time doc. fields"); bValid = sal_False; break; @@ -2582,7 +2582,7 @@ const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName( break; default: pServiceName = NULL; - DBG_ERROR("unknown count field!"); + OSL_FAIL("unknown count field!"); break; } @@ -2910,7 +2910,7 @@ void XMLReferenceFieldImportContext::StartElement( break; default: bTypeOK = sal_False; - DBG_ERROR("unknown reference field"); + OSL_FAIL("unknown reference field"); break; } @@ -3460,7 +3460,7 @@ void XMLBibliographyFieldImportContext::ProcessAttribute( const OUString& ) { // attributes are handled in StartElement - DBG_ERROR("This should not have happened."); + OSL_FAIL("This should not have happened."); } @@ -3614,7 +3614,7 @@ const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName( } else { - DBG_ERROR("Unknown bibliography info data"); + OSL_FAIL("Unknown bibliography info data"); pName = NULL; } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 0137ccbae5f9..003177edbbb4 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2337,7 +2337,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( exportSoftPageBreak(xPropSet, bAutoStyles); } else { - DBG_ERROR("unknown text portion type"); + OSL_FAIL("unknown text portion type"); } } else diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 31a6f7625042..90d627add308 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -1190,7 +1190,7 @@ void XMLIndexMarkImportContext_Impl::StartElement( } default: - DBG_ERROR("unknown index mark type!"); + OSL_FAIL("unknown index mark type!"); break; } } @@ -1250,7 +1250,7 @@ void XMLIndexMarkImportContext_Impl::ProcessAttribute( break; default: - DBG_ERROR("unknown index mark type!"); + OSL_FAIL("unknown index mark type!"); break; } } @@ -1301,7 +1301,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName( default: { - DBG_ERROR("unknown index mark type!"); + OSL_FAIL("unknown index mark type!"); OUString sTmp; sServiceName = sTmp; break; diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index 037ceb6a737a..b4b20002b419 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -813,7 +813,7 @@ SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext( eElementName = XML_USER_FIELD_DECL; break; default: - DBG_ERROR("unknown field type!"); + OSL_FAIL("unknown field type!"); eElementName = XML_SEQUENCE_DECL; break; } @@ -948,7 +948,7 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext( break; } default: - DBG_ERROR("unkown varfield type"); + OSL_FAIL("unkown varfield type"); } // switch } // else: no field master found/constructed } // else: no sequence-decl @@ -1331,7 +1331,7 @@ void XMLValueImportHelper::ProcessAttribute( break; default: - DBG_ERROR("unknown value type"); + OSL_FAIL("unknown value type"); bTypeOK = sal_False; } } diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx index b557531beaf6..7f6653d4653c 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.cxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx @@ -132,7 +132,7 @@ void SchemaRestrictionContext::CreateDataType() } catch( const Exception& ) { - DBG_ERROR( "exception during type creation" ); + OSL_FAIL( "exception during type creation" ); } DBG_ASSERT( mxDataType.is(), "can't create type" ); } @@ -357,7 +357,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( break; default: - DBG_ERROR( "unknown facet" ); + OSL_FAIL( "unknown facet" ); } // finally, set the property diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx index f64b2d95ff9e..34e217729547 100644 --- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx +++ b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx @@ -107,7 +107,7 @@ SvXMLImportContext* SchemaSimpleTypeContext::HandleChild( mxRepository, msTypeName ); break; default: - DBG_ERROR( "Booo!" ); + OSL_FAIL( "Booo!" ); } return ( pContext != NULL ) diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index a67f1e2f9124..f98363a14244 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.cxx @@ -128,7 +128,7 @@ void XFormsBindContext::HandleAttribute( sal_uInt16 nToken, rValue ) ) ); break; default: - DBG_ERROR( "should not happen" ); + OSL_FAIL( "should not happen" ); break; } } @@ -156,7 +156,7 @@ SvXMLImportContext* XFormsBindContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "no children supported" ); + OSL_FAIL( "no children supported" ); return NULL; } diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx index fda42dfd13ce..bbad38b9461e 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.cxx +++ b/xmloff/source/xforms/XFormsInstanceContext.cxx @@ -143,7 +143,7 @@ void XFormsInstanceContext::HandleAttribute( msId = rValue; break; default: - DBG_ERROR( "should not happen" ); + OSL_FAIL( "should not happen" ); break; } } @@ -154,7 +154,7 @@ SvXMLImportContext* XFormsInstanceContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "to be handled by CreateChildContext" ); + OSL_FAIL( "to be handled by CreateChildContext" ); return NULL; } diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx index 8d10e99d843d..889d4e939cd9 100644 --- a/xmloff/source/xforms/XFormsModelContext.cxx +++ b/xmloff/source/xforms/XFormsModelContext.cxx @@ -110,7 +110,7 @@ void XFormsModelContext::HandleAttribute( GetImport().SetError( XMLERROR_XFORMS_NO_SCHEMA_SUPPORT ); break; default: - DBG_ERROR( "this should not happen" ); + OSL_FAIL( "this should not happen" ); break; } } @@ -145,7 +145,7 @@ SvXMLImportContext* XFormsModelContext::HandleChild( ->getDataTypeRepository() ); break; default: - DBG_ERROR( "Boooo!" ); + OSL_FAIL( "Boooo!" ); break; } diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index d3701147bd23..c56a29a6fbf1 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx @@ -166,7 +166,7 @@ void XFormsSubmissionContext::HandleAttribute( sal_uInt16 nToken, lcl_setValue( mxSubmission, OUSTRING("IncludeNamespacePrefixes"), rValue ); break; default: - DBG_ERROR( "unknown attribute" ); + OSL_FAIL( "unknown attribute" ); break; } } @@ -178,7 +178,7 @@ SvXMLImportContext* XFormsSubmissionContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "no children supported" ); + OSL_FAIL( "no children supported" ); return NULL; } diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 13ffff624258..ca6addebdb0a 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -344,7 +344,7 @@ rtl::OUString lcl_getBasicTypeName( } catch( const Exception& ) { - DBG_ERROR( "exception during type creation" ); + OSL_FAIL( "exception during type creation" ); } return sTypeName; } diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 53c8e450a05e..9509340b12ed 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -536,7 +536,7 @@ OUString lcl_getXSDType( SvXMLExport& rExport, case com::sun::star::xsd::DataTypeClass::QName: case com::sun::star::xsd::DataTypeClass::NOTATION: default: - DBG_ERROR( "unknown data type" ); + OSL_FAIL( "unknown data type" ); } return rExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_XSD, @@ -680,7 +680,7 @@ OUString lcl_bool( const Any& rAny ) bool bResult = bool(); if( rAny >>= bResult ) return GetXMLToken( bResult ? XML_TRUE : XML_FALSE ); - DBG_ERROR( "expected boolean value" ); + OSL_FAIL( "expected boolean value" ); return OUString(); } |