summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-01 19:05:02 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-02 14:58:56 +0100
commita6e69f8fcd017519c37be409097108da6a6fcb33 (patch)
tree5906fed0faf294ccc3cc54a77a878e7b91a16f31 /sc/source/ui/docshell
parent775a632985975057f5fa6c196aaffcd0a05e617a (diff)
Move DBG_ERROR to OSL_FAIL
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx12
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx6
-rw-r--r--sc/source/ui/docshell/docfunc.cxx22
-rw-r--r--sc/source/ui/docshell/docsh.cxx22
-rw-r--r--sc/source/ui/docshell/docsh3.cxx12
-rw-r--r--sc/source/ui/docshell/docsh4.cxx12
-rw-r--r--sc/source/ui/docshell/docsh5.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx8
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx6
-rw-r--r--sc/source/ui/docshell/servobj.cxx2
10 files changed, 52 insertions, 52 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index be26ca3a0ad7..0dec37d1e581 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -427,7 +427,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
rSortParam.nCol2, rSortParam.nRow2 );
if (!pDBData)
{
- DBG_ERROR( "Sort: keine DBData" );
+ OSL_FAIL( "Sort: keine DBData" );
return FALSE;
}
@@ -606,7 +606,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
}
else
{
- DBG_ERROR("Zielbereich nicht da");
+ OSL_FAIL("Zielbereich nicht da");
}
}
@@ -663,7 +663,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
rQueryParam.nCol2, rQueryParam.nRow2 );
if (!pDBData)
{
- DBG_ERROR( "Query: keine DBData" );
+ OSL_FAIL( "Query: keine DBData" );
return FALSE;
}
@@ -935,7 +935,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
}
else
{
- DBG_ERROR("Zielbereich nicht da");
+ OSL_FAIL("Zielbereich nicht da");
}
}
@@ -1002,7 +1002,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
rParam.nCol2, rParam.nRow2 );
if (!pDBData)
{
- DBG_ERROR( "SubTotals: keine DBData" );
+ OSL_FAIL( "SubTotals: keine DBData" );
return FALSE;
}
@@ -1289,7 +1289,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
pDestObj->SetAlive(TRUE);
if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) )
{
- DBG_ERROR("cannot insert DPObject");
+ OSL_FAIL("cannot insert DPObject");
DELETEZ( pDestObj );
}
}
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index b074d8c42d33..92c411ea5638 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -112,7 +112,7 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram
}
else
{
- DBG_ERROR("no selection supplier in the beamer!");
+ OSL_FAIL("no selection supplier in the beamer!");
}
}
}
@@ -230,7 +230,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
rParam.nCol2, rParam.nRow2 );
if (!pDBData)
{
- DBG_ERROR( "DoImport: no DBData" );
+ OSL_FAIL( "DoImport: no DBData" );
return FALSE;
}
}
@@ -457,7 +457,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
catch ( uno::Exception& )
{
- DBG_ERROR("Unexpected exception in database");
+ OSL_FAIL("Unexpected exception in database");
}
pImportDoc->DoColResize( nTab, rParam.nCol1,nEndCol, 0 );
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 4a55079bfb03..ca2fa5171ea1 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -518,7 +518,7 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
aFunc.ShowError( nCol, nRow );
break;
default:
- DBG_ERROR("falsche Op bei DetectiveRefresh");
+ OSL_FAIL("falsche Op bei DetectiveRefresh");
}
}
}
@@ -589,7 +589,7 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
{
- DBG_ERROR("ScDocFunc::DeleteContents ohne Markierung");
+ OSL_FAIL("ScDocFunc::DeleteContents ohne Markierung");
return FALSE;
}
@@ -1359,7 +1359,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) )
{
- DBG_ERROR("invalid row in InsertCells");
+ OSL_FAIL("invalid row in InsertCells");
return FALSE;
}
@@ -1638,7 +1638,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
nPaintFlags |= PAINT_TOP;
break;
default:
- DBG_ERROR("Falscher Code beim Einfuegen");
+ OSL_FAIL("Falscher Code beim Einfuegen");
bSuccess = FALSE;
break;
}
@@ -1794,7 +1794,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) )
{
- DBG_ERROR("invalid row in DeleteCells");
+ OSL_FAIL("invalid row in DeleteCells");
return FALSE;
}
@@ -2100,7 +2100,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nPaintFlags |= PAINT_TOP;
break;
default:
- DBG_ERROR("Falscher Code beim Loeschen");
+ OSL_FAIL("Falscher Code beim Loeschen");
break;
}
@@ -2280,7 +2280,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) || !ValidRow(nDestRow) )
{
- DBG_ERROR("invalid row in MoveBlock");
+ OSL_FAIL("invalid row in MoveBlock");
return FALSE;
}
@@ -4195,7 +4195,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
case FILL_TO_TOP:
if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Row() ))
{
- DBG_ERROR("FillAuto: Row < 0");
+ OSL_FAIL("FillAuto: Row < 0");
nCount = aSourceArea.aStart.Row();
}
aDestArea.aStart.SetRow( sal::static_int_cast<SCROW>( aSourceArea.aStart.Row() - nCount ) );
@@ -4206,13 +4206,13 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
case FILL_TO_LEFT:
if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Col() ))
{
- DBG_ERROR("FillAuto: Col < 0");
+ OSL_FAIL("FillAuto: Col < 0");
nCount = aSourceArea.aStart.Col();
}
aDestArea.aStart.SetCol( sal::static_int_cast<SCCOL>( aSourceArea.aStart.Col() - nCount ) );
break;
default:
- DBG_ERROR("Falsche Richtung bei FillAuto");
+ OSL_FAIL("Falsche Richtung bei FillAuto");
break;
}
@@ -4584,7 +4584,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
ScAddress( nPosX, nPosY, nTab));
if (!rList.Insert(pData))
{
- DBG_ERROR("nanu?");
+ OSL_FAIL("nanu?");
delete pData;
}
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 8459d37150a5..221b5d8a439c 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -224,7 +224,7 @@ void ScDocShell::FillClass( SvGlobalName* pClassName,
}
else
{
- DBG_ERROR("wat fuer ne Version?");
+ OSL_FAIL("wat fuer ne Version?");
}
}
@@ -400,7 +400,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
}
else
{
- DBG_ERROR("The Modificator should exist");
+ OSL_FAIL("The Modificator should exist");
}
aDocument.DisableIdle( FALSE );
@@ -902,7 +902,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
catch ( uno::Exception& )
{
- DBG_ERROR( "SFX_EVENT_SAVEDOC: caught exception\n" );
+ OSL_FAIL( "SFX_EVENT_SAVEDOC: caught exception\n" );
SC_MOD()->SetInSharedDocSaving( false );
try
@@ -1200,7 +1200,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else
{
- DBG_ERROR( "No Stream" );
+ OSL_FAIL( "No Stream" );
}
}
@@ -1312,7 +1312,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else
{
- DBG_ERROR( "No Stream" );
+ OSL_FAIL( "No Stream" );
}
}
@@ -1370,7 +1370,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else
{
- DBG_ERROR( "No Stream" );
+ OSL_FAIL( "No Stream" );
}
}
@@ -1419,7 +1419,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else
{
- DBG_ERROR( "No Stream" );
+ OSL_FAIL( "No Stream" );
}
}
@@ -1437,7 +1437,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else
{
- DBG_ERROR("Kein Filter bei ConvertFrom");
+ OSL_FAIL("Kein Filter bei ConvertFrom");
}
InitItems();
@@ -1887,7 +1887,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
break;
default:
- DBG_ERROR( "ScDocShell::AsciiSave: unknown CellType" );
+ OSL_FAIL( "ScDocShell::AsciiSave: unknown CellType" );
aString.Erase();
bString = FALSE;
}
@@ -2055,7 +2055,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
if (aFltName.EqualsAscii(pFilterXML))
{
//TODO/LATER: this shouldn't happen!
- DBG_ERROR("XML filter in ConvertFrom?!");
+ OSL_FAIL("XML filter in ConvertFrom?!");
bRet = SaveXML( &rMed, NULL );
}
else if (aFltName.EqualsAscii(pFilterExcel5) || aFltName.EqualsAscii(pFilterExcel95) ||
@@ -2576,7 +2576,7 @@ ScDocShell::~ScDocShell()
if (pModificator)
{
- DBG_ERROR("The Modificator should not exist");
+ OSL_FAIL("The Modificator should not exist");
delete pModificator;
}
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 10081240b864..a9e79b46e86f 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -274,7 +274,7 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
}
else
{
- DBG_ERROR("UnlockPaint ohne LockPaint");
+ OSL_FAIL("UnlockPaint ohne LockPaint");
}
}
@@ -347,7 +347,7 @@ void ScDocShell::UnlockDocument()
}
else
{
- DBG_ERROR("UnlockDocument without LockDocument");
+ OSL_FAIL("UnlockDocument without LockDocument");
}
}
@@ -407,7 +407,7 @@ void ScDocShell::CalcOutputFactor()
nPrtToScreenFactor = nPrinterWidth / (double) nWindowWidth;
else
{
- DBG_ERROR("GetTextSize gibt 0 ??");
+ OSL_FAIL("GetTextSize gibt 0 ??");
nPrtToScreenFactor = 1.0;
}
}
@@ -800,7 +800,7 @@ bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument
pA->GetDescription( aADesc, pSearchDoc, TRUE );
if ( aActionDesc.Equals( aADesc ) )
{
- DBG_ERROR( "lcl_FindAction(): found equal action!" );
+ OSL_FAIL( "lcl_FindAction(): found equal action!" );
return true;
}
}
@@ -1064,7 +1064,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
pViewSh->EnterData( aPos.Col(), aPos.Row(), aPos.Tab(), aValue );
break;
default:
- DBG_ERROR( "MergeDocument: unknown MatrixFlag" );
+ OSL_FAIL( "MergeDocument: unknown MatrixFlag" );
}
}
break;
@@ -1136,7 +1136,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
pAct->SetComment( rComment );
#ifdef DBG_UTIL
else
- DBG_ERROR( "MergeDocument: wohin mit dem Kommentar?!?" );
+ OSL_FAIL( "MergeDocument: wohin mit dem Kommentar?!?" );
#endif
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 93aa6734fc6c..8ea77526cf66 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -297,7 +297,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
else
{
- DBG_ERROR( "arguments expected" );
+ OSL_FAIL( "arguments expected" );
}
}
break;
@@ -433,13 +433,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
else
{
- DBG_ERROR("UpdateChartArea: keine ViewShell oder falsche Daten");
+ OSL_FAIL("UpdateChartArea: keine ViewShell oder falsche Daten");
}
rReq.Done();
}
else
{
- DBG_ERROR("SID_CHART_SOURCE ohne Argumente");
+ OSL_FAIL("SID_CHART_SOURCE ohne Argumente");
}
break;
@@ -591,7 +591,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_AUTO_STYLE:
- DBG_ERROR("use ScAutoStyleHint instead of SID_AUTO_STYLE");
+ OSL_FAIL("use ScAutoStyleHint instead of SID_AUTO_STYLE");
break;
case SID_GET_COLORTABLE:
@@ -1110,7 +1110,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
catch ( uno::Exception& )
{
- DBG_ERROR( "SID_SHARE_DOC: caught exception\n" );
+ OSL_FAIL( "SID_SHARE_DOC: caught exception\n" );
SC_MOD()->SetInSharedDocSaving( false );
try
@@ -2672,7 +2672,7 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument()
}
catch ( uno::Exception& )
{
- DBG_ERROR( "ScDocShell::LoadSharedDocument(): caught exception\n" );
+ OSL_FAIL( "ScDocShell::LoadSharedDocument(): caught exception\n" );
SC_MOD()->SetInSharedDocLoading( false );
try
{
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 3c95fda6c2d5..4d09ec0c9438 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -761,7 +761,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
}
else
{
- DBG_ERROR( "UseScenario auf Szenario-Blatt" );
+ OSL_FAIL( "UseScenario auf Szenario-Blatt" );
}
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index e5af5a4e3fec..db1bcaf82251 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -322,7 +322,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
long nRowCount = 0;
if ( nRowCount < 0 )
{
- DBG_ERROR("can't get row count");
+ OSL_FAIL("can't get row count");
nRowCount = 0;
}
@@ -477,7 +477,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
}
catch ( uno::Exception& )
{
- DBG_ERROR("Unexpected exception in database");
+ OSL_FAIL("Unexpected exception in database");
nErr = ERRCODE_IO_GENERAL;
}
@@ -1037,7 +1037,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
break;
default:
- DBG_ERROR( "ScDocShell::DBaseExport: unknown FieldType" );
+ OSL_FAIL( "ScDocShell::DBaseExport: unknown FieldType" );
if ( nErr == eERR_OK )
nErr = SCWARN_EXPORT_DATALOST;
aDocument.GetValue( nDocCol, nDocRow, nTab, fVal );
@@ -1164,7 +1164,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
}
catch ( uno::Exception& )
{
- DBG_ERROR("Unexpected exception in database");
+ OSL_FAIL("Unexpected exception in database");
nErr = ERRCODE_IO_GENERAL;
}
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 75c1961a1a99..4d1a9db81b46 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1304,7 +1304,7 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell)
}
}
default:
- DBG_ERROR("attempted to convert an unknown cell type.");
+ OSL_FAIL("attempted to convert an unknown cell type.");
}
return NULL;
@@ -1408,7 +1408,7 @@ static ScTokenArray* lcl_convertToTokenArray(const ScDocument* pSrcDoc, ScRange&
}
break;
default:
- DBG_ERROR("attempted to convert an unknown cell type.");
+ OSL_FAIL("attempted to convert an unknown cell type.");
}
}
}
@@ -2456,7 +2456,7 @@ void ScExternalRefManager::addLinkListener(sal_uInt16 nFileId, LinkListener* pLi
LinkListenerMap::value_type(nFileId, LinkListeners()));
if (!r.second)
{
- DBG_ERROR("insertion of new link listener list failed");
+ OSL_FAIL("insertion of new link listener list failed");
return;
}
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index cd35f6068255..0ec8e582d093 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -113,7 +113,7 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) :
}
else
{
- DBG_ERROR("ScServerObject: invalid item");
+ OSL_FAIL("ScServerObject: invalid item");
}
}