summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-01 19:07:44 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-02 15:04:37 +0100
commit65c053ca1a5a8c7318ab1e42cdde2d540a283673 (patch)
tree2e1a29f5d832ff0cb0d4c095f038392b472459d1 /sfx2
parent40afe52c92f340d0fedbb59d1071a542e6fb61e3 (diff)
Move DBG_ERROR to OSL_FAIL
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appbas.cxx2
-rw-r--r--sfx2/source/appl/appbaslib.cxx2
-rw-r--r--sfx2/source/appl/appcfg.cxx4
-rw-r--r--sfx2/source/appl/appchild.cxx2
-rw-r--r--sfx2/source/appl/appmisc.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--sfx2/source/appl/lnkbase2.cxx2
-rw-r--r--sfx2/source/appl/module.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx14
-rw-r--r--sfx2/source/appl/workwin.cxx14
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/config/evntconf.cxx6
-rw-r--r--sfx2/source/control/bindings.cxx12
-rw-r--r--sfx2/source/control/macrconf.cxx4
-rw-r--r--sfx2/source/control/msg.cxx2
-rw-r--r--sfx2/source/control/msgpool.cxx2
-rw-r--r--sfx2/source/control/objface.cxx6
-rw-r--r--sfx2/source/control/request.cxx4
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/control/sorgitm.cxx4
-rw-r--r--sfx2/source/control/unoctitm.cxx2
-rw-r--r--sfx2/source/dialog/basedlgs.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx6
-rw-r--r--sfx2/source/dialog/dockwin.cxx4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx18
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx2
-rw-r--r--sfx2/source/dialog/partwnd.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx8
-rw-r--r--sfx2/source/dialog/tplcitem.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx20
-rw-r--r--sfx2/source/doc/docinsert.cxx4
-rw-r--r--sfx2/source/doc/docvor.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx4
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx14
-rw-r--r--sfx2/source/doc/printhelper.cxx8
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/notify/eventsupplier.cxx4
-rw-r--r--sfx2/source/view/frmload.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx4
-rw-r--r--sfx2/source/view/viewfrm2.cxx4
-rw-r--r--sfx2/source/view/viewprn.cxx2
-rw-r--r--sfx2/source/view/viewsh.cxx4
47 files changed, 114 insertions, 114 deletions
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;
}
}