summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/auditsh.cxx2
-rw-r--r--sc/source/ui/view/cellsh.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx74
-rw-r--r--sc/source/ui/view/cellsh2.cxx36
-rw-r--r--sc/source/ui/view/cellsh3.cxx28
-rw-r--r--sc/source/ui/view/dbfunc4.cxx2
-rw-r--r--sc/source/ui/view/drawview.cxx10
-rw-r--r--sc/source/ui/view/editsh.cxx22
-rw-r--r--sc/source/ui/view/formatsh.cxx8
-rw-r--r--sc/source/ui/view/galwrap.cxx8
-rw-r--r--sc/source/ui/view/gridwin.cxx8
-rw-r--r--sc/source/ui/view/gridwin2.cxx8
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
-rw-r--r--sc/source/ui/view/gridwin5.cxx4
-rw-r--r--sc/source/ui/view/hdrcont.cxx2
-rw-r--r--sc/source/ui/view/invmerge.cxx3
-rw-r--r--sc/source/ui/view/olinewin.cxx8
-rw-r--r--sc/source/ui/view/output.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx6
-rw-r--r--sc/source/ui/view/pivotsh.cxx6
-rw-r--r--sc/source/ui/view/preview.cxx8
-rw-r--r--sc/source/ui/view/prevloc.cxx5
-rw-r--r--sc/source/ui/view/prevwsh.cxx12
-rw-r--r--sc/source/ui/view/printfun.cxx12
-rw-r--r--sc/source/ui/view/reffact.cxx10
-rw-r--r--sc/source/ui/view/scextopt.cxx4
-rw-r--r--sc/source/ui/view/select.cxx6
-rw-r--r--sc/source/ui/view/spelldialog.cxx2
-rw-r--r--sc/source/ui/view/spelleng.cxx2
-rw-r--r--sc/source/ui/view/tabcont.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx8
-rw-r--r--sc/source/ui/view/tabview2.cxx8
-rw-r--r--sc/source/ui/view/tabview3.cxx8
-rw-r--r--sc/source/ui/view/tabview5.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--sc/source/ui/view/tabvwsha.cxx6
-rw-r--r--sc/source/ui/view/tabvwshb.cxx2
-rw-r--r--sc/source/ui/view/tabvwshe.cxx6
-rw-r--r--sc/source/ui/view/tabvwshf.cxx18
-rw-r--r--sc/source/ui/view/tabvwshg.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx36
-rw-r--r--sc/source/ui/view/viewfun4.cxx4
-rw-r--r--sc/source/ui/view/viewfun7.cxx6
-rw-r--r--sc/source/ui/view/viewfunc.cxx6
-rw-r--r--sc/source/ui/view/viewutil.cxx4
47 files changed, 217 insertions, 219 deletions
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index b35be06c4e5a..364c412160db 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -118,7 +118,7 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
if ( pReqArgs->GetItemState( SID_RANGE_COL, sal_True, &pXItem ) == SFX_ITEM_SET
&& pReqArgs->GetItemState( SID_RANGE_ROW, sal_True, &pYItem ) == SFX_ITEM_SET )
{
- DBG_ASSERT( pXItem->ISA(SfxInt16Item) && pYItem->ISA(SfxInt32Item),
+ OSL_ENSURE( pXItem->ISA(SfxInt16Item) && pYItem->ISA(SfxInt32Item),
"falsche Items" );
SCsCOL nCol = static_cast<SCsCOL>(((const SfxInt16Item*) pXItem)->GetValue());
SCsROW nRow = static_cast<SCsROW>(((const SfxInt32Item*) pYItem)->GetValue());
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 962e31fb1bf2..e6d3180cc8cc 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -763,7 +763,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
String aComment;
sal_uInt16 nDummyFlags;
pDoc->GetScenarioData( nTab, aComment, aDummyCol, nDummyFlags );
- DBG_ASSERT( aList.empty(), "List not empty!" );
+ OSL_ENSURE( aList.empty(), "List not empty!" );
aList.push_back(aComment);
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 8a7bb6235f01..de1a010df5fd 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -225,10 +225,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
sal_Bool bTheFlag=(pDoc->GetChangeTrack()!=NULL);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScInsertCellDlg* pDlg = pFact->CreateScInsertCellDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_INSCELL, bTheFlag);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if (pDlg->Execute() == RET_OK)
eCmd = pDlg->GetInsCellCmd();
delete pDlg;
@@ -298,10 +298,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
(pDoc->GetChangeTrack() != NULL);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScDeleteCellDlg* pDlg = pFact->CreateScDeleteCellDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_DELCELL, bTheFlag );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if (pDlg->Execute() == RET_OK)
eCmd = pDlg->GetDelCellCmd();
@@ -383,10 +383,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if (aTester.IsEditable())
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScDeleteContentsDlg* pDlg = pFact->CreateScDeleteContentsDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_DELCONT );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
ScDocument* pDoc = GetViewData()->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
if ( pDoc->IsTabProtected(nTab) )
@@ -493,12 +493,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScInsertContentsDlg* pDlg = pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(),
RID_SCDLG_INSCONT, 0, /* nCheckDefaults */
&ScGlobal::GetRscString(STR_FILL_TAB));
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetFillMode(true);
if (pDlg->Execute() == RET_OK)
@@ -727,7 +727,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
}
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScFillSeriesDlg* pDlg = pFact->CreateScFillSeriesDlg( pTabViewShell->GetDialogParent(),
*pDoc,
@@ -735,7 +735,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aStartStr, fIncVal, fMaxVal,
nPossDir,
RID_SCDLG_FILLSERIES);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( nStartCol != nEndCol && nStartRow != nEndRow )
{
@@ -956,11 +956,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pTabViewShell->HasSelectionForDrillDown( nOrientation ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScDPShowDetailDlg* pDlg = pFact->CreateScDPShowDetailDlg(
pTabViewShell->GetDialogParent(), RID_SCDLG_DPSHOWDETAIL, *pDPObj, nOrientation );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
String aNewDimName( pDlg->GetDimensionName() );
@@ -997,12 +997,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pTabViewShell->HasSelectionForDateGroup( aNumInfo, nParts ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT( pFact, "ScAbstractFactory create fail!" );
+ OSL_ENSURE( pFact, "ScAbstractFactory create fail!" );
Date aNullDate( *GetViewData()->GetDocument()->GetFormatTable()->GetNullDate() );
AbstractScDPDateGroupDlg* pDlg = pFact->CreateScDPDateGroupDlg(
pTabViewShell->GetDialogParent(), RID_SCDLG_DPDATEGROUP,
aNumInfo, nParts, aNullDate );
- DBG_ASSERT( pDlg, "Dialog create fail!" );
+ OSL_ENSURE( pDlg, "Dialog create fail!" );
if( pDlg->Execute() == RET_OK )
{
aNumInfo = pDlg->GetGroupInfo();
@@ -1012,10 +1012,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else if ( pTabViewShell->HasSelectionForNumGroup( aNumInfo ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT( pFact, "ScAbstractFactory create fail!" );
+ OSL_ENSURE( pFact, "ScAbstractFactory create fail!" );
AbstractScDPNumGroupDlg* pDlg = pFact->CreateScDPNumGroupDlg(
pTabViewShell->GetDialogParent(), RID_SCDLG_DPNUMGROUP, aNumInfo );
- DBG_ASSERT( pDlg, "Dialog create fail!" );
+ OSL_ENSURE( pDlg, "Dialog create fail!" );
if( pDlg->Execute() == RET_OK )
pTabViewShell->NumGroupDataPilot( pDlg->GetGroupInfo() );
}
@@ -1050,10 +1050,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,false);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
else
@@ -1110,10 +1110,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( bColPoss && bRowPoss )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,true);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
else
@@ -1276,11 +1276,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if (aTester.IsEditable())
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScInsertContentsDlg* pDlg = pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(),
RID_SCDLG_INSCONT);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetOtherDoc( bOtherDoc );
// bei ChangeTrack MoveMode disablen
pDlg->SetChangeTrack( pDoc->GetChangeTrack() != NULL );
@@ -1655,10 +1655,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
sal_uInt16 nFlags = pTabViewShell->GetCreateNameFlags();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScNameCreateDlg* pDlg = pFact->CreateScNameCreateDlg(pTabViewShell->GetDialogParent(), nFlags, RID_SCDLG_NAMES_CREATE );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if( pDlg->Execute() )
{
@@ -1808,10 +1808,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pTabViewShell->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
switch( pDlg->Execute() )
{
case BTN_PASTE_LIST:
@@ -2055,13 +2055,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
delete pImpl->m_pLinkedDlg;
pImpl->m_pLinkedDlg =
pFact->CreateScLinkedAreaDlg( pTabViewShell->GetDialogParent(),
RID_SCDLG_LINKAREA);
- DBG_ASSERT(pImpl->m_pLinkedDlg, "Dialog create fail!");
+ OSL_ENSURE(pImpl->m_pLinkedDlg, "Dialog create fail!");
delete pImpl->m_pRequest;
pImpl->m_pRequest = new SfxRequest( rReq );
pImpl->m_pLinkedDlg->StartExecuteModal( LINK( this, ScCellShell, DialogClosed ) );
@@ -2163,7 +2163,7 @@ void ScCellShell::ExecuteDataPilotDialog()
bool bEnableExt = ScDPObject::HasRegisteredSources();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
::boost::scoped_ptr<AbstractScDataPilotSourceTypeDlg> pTypeDlg(
pFact->CreateScDataPilotSourceTypeDlg(
@@ -2178,7 +2178,7 @@ void ScCellShell::ExecuteDataPilotDialog()
pTypeDlg->AppendNamedRange(itr->GetName());
}
- DBG_ASSERT(pTypeDlg, "Dialog create fail!");
+ OSL_ENSURE(pTypeDlg, "Dialog create fail!");
if ( pTypeDlg->Execute() == RET_OK )
{
if ( pTypeDlg->IsExternal() )
@@ -2188,7 +2188,7 @@ void ScCellShell::ExecuteDataPilotDialog()
pFact->CreateScDataPilotServiceDlg(
pTabViewShell->GetDialogParent(), aSources, RID_SCDLG_DAPISERVICE));
- DBG_ASSERT(pServDlg, "Dialog create fail!");
+ OSL_ENSURE(pServDlg, "Dialog create fail!");
if ( pServDlg->Execute() == RET_OK )
{
ScDPServiceDesc aServDesc(
@@ -2203,13 +2203,13 @@ void ScCellShell::ExecuteDataPilotDialog()
}
else if ( pTypeDlg->IsDatabase() )
{
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
::boost::scoped_ptr<AbstractScDataPilotDatabaseDlg> pDataDlg(
pFact->CreateScDataPilotDatabaseDlg(
pTabViewShell->GetDialogParent(), RID_SCDLG_DAPIDATA));
- DBG_ASSERT(pDataDlg, "Dialog create fail!");
+ OSL_ENSURE(pDataDlg, "Dialog create fail!");
if ( pDataDlg->Execute() == RET_OK )
{
ScImportSourceDesc aImpDesc(pDoc);
@@ -2341,10 +2341,10 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, GetViewData(), &aSubTotalParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
pDlg = pFact->CreateScSubTotalDlg( pTabViewShell->GetDialogParent(), &aArgSet, RID_SCDLG_SUBTOTALS );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetCurPageId(1);
short bResult = pDlg->Execute();
@@ -2382,8 +2382,8 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
IMPL_LINK( ScCellShell, DialogClosed, AbstractScLinkedAreaDlg*, EMPTYARG )
{
- DBG_ASSERT( pImpl->m_pLinkedDlg, "ScCellShell::DialogClosed(): invalid request" );
- DBG_ASSERT( pImpl->m_pRequest, "ScCellShell::DialogClosed(): invalid request" );
+ OSL_ENSURE( pImpl->m_pLinkedDlg, "ScCellShell::DialogClosed(): invalid request" );
+ OSL_ENSURE( pImpl->m_pRequest, "ScCellShell::DialogClosed(): invalid request" );
String sFile, sFilter, sOptions, sSource;
sal_uLong nRefresh = 0;
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 01034544d87f..0bccbaaeee5c 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -84,7 +84,7 @@ using namespace com::sun::star;
bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange )
{
- DBG_ASSERT( pData, "lcl_GetTextToColumnsRange: pData is null!" );
+ OSL_ENSURE( pData, "lcl_GetTextToColumnsRange: pData is null!" );
bool bRet = false;
const ScMarkData& rMark = pData->GetMarkData();
@@ -110,7 +110,7 @@ bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange )
}
const ScDocument* pDoc = pData->GetDocument();
- DBG_ASSERT( pDoc, "lcl_GetTextToColumnsRange: pDoc is null!" );
+ OSL_ENSURE( pDoc, "lcl_GetTextToColumnsRange: pDoc is null!" );
if ( bRet && pDoc->IsBlockEmpty( rRange.aStart.Tab(), rRange.aStart.Col(),
rRange.aStart.Row(), rRange.aEnd.Col(),
@@ -168,10 +168,10 @@ sal_Bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
rCurrentRange.Format( aCurrentStr, nFmt, pDoc );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
VclAbstractDialog* pWarningDlg = pFact->CreateScSortWarningDlg( pTabViewShell->GetDialogParent(),aExtendStr,aCurrentStr,RID_SCDLG_SORT_WARNING );
- DBG_ASSERT(pWarningDlg, "Dialog create fail!");
+ OSL_ENSURE(pWarningDlg, "Dialog create fail!");
short bResult = pWarningDlg->Execute();
if( bResult == BTN_EXTEND_RANGE || bResult == BTN_CURRENT_SELECTION )
{
@@ -333,10 +333,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_DATA_FORM:
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg( pTabViewShell->GetDialogParent(),RID_SCDLG_DATAFORM, pTabViewShell);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->Execute();
@@ -490,10 +490,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aArgSet.Put( ScSortItem( SCITEM_SORTDATA, GetViewData(), &aSortParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
pDlg = pFact->CreateScSortDlg( pTabViewShell->GetDialogParent(), &aArgSet, RID_SCDLG_SORT );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetCurPageId(1); // 1=sort field tab 2=sort options tab
if ( pDlg->Execute() == RET_OK )
@@ -730,7 +730,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aList.Insert(new String(itr->GetName()));
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScSelEntryDlg* pDlg = pFact->CreateScSelEntryDlg( pTabViewShell->GetDialogParent(),
RID_SCDLG_SELECTDB,
@@ -738,7 +738,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
String(ScResId(SCSTR_AREAS)),
aList,
RID_SCDLG_SELECTDB);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
String aName = pDlg->GetSelectEntry();
@@ -771,9 +771,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
::GetTabPageRanges ScTPValidationValueGetRanges = pFact->GetTabPageRangesFunc(TP_VALIDATION_VALUES);
- DBG_ASSERT(ScTPValidationValueGetRanges, "TabPage create fail!");
+ OSL_ENSURE(ScTPValidationValueGetRanges, "TabPage create fail!");
SfxItemSet aArgSet( GetPool(), (*ScTPValidationValueGetRanges)() );
ScValidationMode eMode = SC_VALID_ANY;
ScConditionMode eOper = SC_COND_EQUAL;
@@ -834,7 +834,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
// cell range picker
SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg( NULL, &aArgSet, TAB_DLG_VALIDATION, pTabViewShell );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
short nResult = pDlg->Execute();
//When picking Cell Range, other Tab may be switched. Need restore the correct tab
@@ -928,13 +928,13 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_TEXT_TO_COLUMNS:
{
ScViewData* pData = GetViewData();
- DBG_ASSERT( pData, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pData is null!" );
+ OSL_ENSURE( pData, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pData is null!" );
ScRange aRange;
if ( lcl_GetTextToColumnsRange( pData, aRange ) )
{
ScDocument* pDoc = pData->GetDocument();
- DBG_ASSERT( pDoc, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDoc is null!" );
+ OSL_ENSURE( pDoc, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDoc is null!" );
ScImportExport aExport( pDoc, aRange );
aExport.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::None, 0, false ) );
@@ -948,16 +948,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aExport.ExportStream( aStream, String(), FORMAT_STRING );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
+ OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
AbstractScImportAsciiDlg *pDlg = pFact->CreateScImportAsciiDlg(
NULL, String(), &aStream, RID_SCDLG_ASCII );
- DBG_ASSERT( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
+ OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
pDlg->SetTextToColumnsMode();
if ( pDlg->Execute() == RET_OK )
{
ScDocShell* pDocSh = pData->GetDocShell();
- DBG_ASSERT( pDocSh, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDocSh is null!" );
+ OSL_ENSURE( pDocSh, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDocSh is null!" );
String aUndo = ScGlobal::GetRscString( STR_UNDO_TEXTTOCOLUMNS );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 1060ffab3136..862e8b7a9430 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -443,7 +443,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
// vorneweg testen, ob der Prefix als gueltig erkannt wird
// wenn nicht, nur doppelte vermeiden
sal_Bool bPrefix = pDoc->ValidTabName( aBaseName );
- DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
+ OSL_ENSURE(bPrefix, "ungueltiger Tabellenname");
while ( pDoc->IsScenario(nTab+i) )
i++;
@@ -483,10 +483,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
sal_Bool bSheetProtected = pDoc->IsTabProtected(nTab);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, RID_SCDLG_NEWSCENARIO, false,bSheetProtected);
- DBG_ASSERT(pNewDlg, "Dialog create fail!");
+ OSL_ENSURE(pNewDlg, "Dialog create fail!");
if ( pNewDlg->Execute() == RET_OK )
{
pNewDlg->GetScenarioData( aName, aComment, aColor, nFlags );
@@ -537,7 +537,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
GetRowHeight( pData->GetCurY(),
pData->GetTabNo() );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_ROW_MAN,
nCurHeight,
@@ -546,7 +546,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
eMetric,
2,
MAX_COL_HEIGHT);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
@@ -582,7 +582,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_ROW_OPT,
ScGlobal::nLastRowHeightExtra,
@@ -591,7 +591,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
eMetric,
1,
MAX_EXTRA_HEIGHT);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
@@ -629,7 +629,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
GetColWidth( pData->GetCurX(),
pData->GetTabNo() );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_COL_MAN,
nCurHeight,
@@ -638,7 +638,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
eMetric,
2,
MAX_COL_WIDTH);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
@@ -674,7 +674,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_COL_OPT,
ScGlobal::nLastColWidthExtra,
@@ -683,7 +683,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
eMetric,
1,
MAX_EXTRA_WIDTH);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
@@ -767,7 +767,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pReqArgs &&
pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
{
- DBG_ASSERT(pItem && pItem->ISA(SfxBoolItem), "falsches Item");
+ OSL_ENSURE(pItem && pItem->ISA(SfxBoolItem), "falsches Item");
bMoveContents = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -829,10 +829,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScGlobal::ClearAutoFormat();
ScAutoFormatData* pNewEntry = pTabViewShell->CreateAutoFormatData();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScAutoFormatDlg* pDlg = pFact->CreateScAutoFormatDlg( pDlgParent, ScGlobal::GetAutoFormat(), pNewEntry,GetViewData()->GetDocument(), RID_SCDLG_AUTOFORMAT );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx
index f395cb741221..dd4ff54344d8 100644
--- a/sc/source/ui/view/dbfunc4.cxx
+++ b/sc/source/ui/view/dbfunc4.cxx
@@ -65,7 +65,7 @@ sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sa
for (sal_uInt16 nPageNo=0; nPageNo<nPageCount; nPageNo++)
{
SdrPage* pPage = pModel->GetPage(nPageNo);
- DBG_ASSERT(pPage,"Page ?");
+ OSL_ENSURE(pPage,"Page ?");
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
SdrObject* pObject = aIter.Next();
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index e8867653be13..4fc854b8934a 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -485,7 +485,7 @@ void ScDrawView::MarkListHasChanged()
if ( pOle2Obj && !bOle )
{
uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef();
- DBG_ASSERT( xObj.is(), "SdrOle2Obj ohne ObjRef" );
+ OSL_ENSURE( xObj.is(), "SdrOle2Obj ohne ObjRef" );
if (xObj.is())
xObj->getSupportedVerbs();
}
@@ -593,7 +593,7 @@ sal_Bool ScDrawView::SelectObject( const String& rName )
for (SCTAB i=0; i<nTabCount && !pFound; i++)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(i));
- DBG_ASSERT(pPage,"Page ?");
+ OSL_ENSURE(pPage,"Page ?");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -617,7 +617,7 @@ sal_Bool ScDrawView::SelectObject( const String& rName )
if ( nObjectTab != nTab ) // Tabelle umschalten
pView->SetTabNo( nObjectTab );
- DBG_ASSERT( nTab == nObjectTab, "Tabellen umschalten hat nicht geklappt" );
+ OSL_ENSURE( nTab == nObjectTab, "Tabellen umschalten hat nicht geklappt" );
pView->ScrollToObject( pFound );
@@ -700,12 +700,12 @@ void ScDrawView::DeleteMarked()
// remove the cell note from document, we are its owner now
ScPostIt* pNote = pDoc->ReleaseNote( pCaptData->maStart );
- DBG_ASSERT( pNote, "ScDrawView::DeleteMarked - cell note missing in document" );
+ OSL_ENSURE( pNote, "ScDrawView::DeleteMarked - cell note missing in document" );
if( pNote )
{
// rescue note data for undo (with pointer to caption object)
ScNoteData aNoteData = pNote->GetNoteData();
- DBG_ASSERT( aNoteData.mpCaption == pCaptObj, "ScDrawView::DeleteMarked - caption object does not match" );
+ OSL_ENSURE( aNoteData.mpCaption == pCaptObj, "ScDrawView::DeleteMarked - caption object does not match" );
// collect the drawing undo action created while deleting the note
if( bUndo )
pDrawLayer->BeginCalcUndo();
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 5464a0f13f52..7ae92f454151 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -179,12 +179,12 @@ void ScEditShell::Execute( SfxRequest& rReq )
SfxBindings& rBindings = pViewData->GetBindings();
ScInputHandler* pHdl = GetMyInputHdl();
- DBG_ASSERT(pHdl,"kein ScInputHandler");
+ OSL_ENSURE(pHdl,"kein ScInputHandler");
EditView* pTopView = pHdl->GetTopView(); // hat Eingabezeile den Focus?
EditView* pTableView = pHdl->GetTableView();
- DBG_ASSERT(pTableView,"no EditView :-(");
+ OSL_ENSURE(pTableView,"no EditView :-(");
/* #i91683# No EditView if spell-check dialog is active and positioned on
* an error and user immediately (without double click or F2) selected a
* text portion of that cell with the mouse and wanted to modify it. */
@@ -421,10 +421,10 @@ void ScEditShell::Execute( SfxRequest& rReq )
{
ScDocument* pDoc = pViewData->GetDocument();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, false );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
short nRet = pDlg->Execute();
// pDlg is needed below
@@ -457,11 +457,11 @@ void ScEditShell::Execute( SfxRequest& rReq )
SfxObjectShell* pObjSh = pViewData->GetSfxDocShell();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateScCharDlg( pViewData->GetDialogParent(), &aAttrs,
pObjSh, RID_SCDLG_CHAR );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
short nRet = pDlg->Execute();
// pDlg is needed below
@@ -1103,10 +1103,10 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq)
// Undo must be handled here because it's called for both EditViews
ScInputHandler* pHdl = GetMyInputHdl();
- DBG_ASSERT(pHdl,"no ScInputHandler");
+ OSL_ENSURE(pHdl,"no ScInputHandler");
EditView* pTopView = pHdl->GetTopView();
EditView* pTableView = pHdl->GetTableView();
- DBG_ASSERT(pTableView,"no EditView");
+ OSL_ENSURE(pTableView,"no EditView");
pHdl->DataChanging();
@@ -1166,7 +1166,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
// disable if no action in input line EditView
ScInputHandler* pHdl = GetMyInputHdl();
- DBG_ASSERT(pHdl,"no ScInputHandler");
+ OSL_ENSURE(pHdl,"no ScInputHandler");
EditView* pTopView = pHdl->GetTopView();
if (pTopView)
{
@@ -1184,11 +1184,11 @@ void ScEditShell::ExecuteTrans( SfxRequest& rReq )
if ( nType )
{
ScInputHandler* pHdl = GetMyInputHdl();
- DBG_ASSERT( pHdl, "no ScInputHandler" );
+ OSL_ENSURE( pHdl, "no ScInputHandler" );
EditView* pTopView = pHdl->GetTopView();
EditView* pTableView = pHdl->GetTableView();
- DBG_ASSERT( pTableView, "no EditView" );
+ OSL_ENSURE( pTableView, "no EditView" );
pHdl->DataChanging();
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index eb839d58ce5d..f7ea3973a3b5 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -121,7 +121,7 @@ SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot )
case SID_ALIGN_ANY_HCENTER: eHJustify = SVX_HOR_JUSTIFY_CENTER; break;
case SID_ALIGN_ANY_RIGHT: eHJustify = SVX_HOR_JUSTIFY_RIGHT; break;
case SID_ALIGN_ANY_JUSTIFIED: eHJustify = SVX_HOR_JUSTIFY_BLOCK; break;
- default: DBG_ERRORFILE( "lclConvertSlotToHAlign - invalid slot" );
+ default: OSL_FAIL( "lclConvertSlotToHAlign - invalid slot" );
}
return eHJustify;
}
@@ -135,7 +135,7 @@ SvxCellVerJustify lclConvertSlotToVAlign( sal_uInt16 nSlot )
case SID_ALIGN_ANY_TOP: eVJustify = SVX_VER_JUSTIFY_TOP; break;
case SID_ALIGN_ANY_VCENTER: eVJustify = SVX_VER_JUSTIFY_CENTER; break;
case SID_ALIGN_ANY_BOTTOM: eVJustify = SVX_VER_JUSTIFY_BOTTOM; break;
- default: DBG_ERRORFILE( "lclConvertSlotToVAlign - invalid slot" );
+ default: OSL_FAIL( "lclConvertSlotToVAlign - invalid slot" );
}
return eVJustify;
}
@@ -788,10 +788,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pTabViewShell->SetInFormatDialog(sal_True);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
pDlg = pFact->CreateScStyleDlg( pParent, *pStyleSheet, nRsc, nRsc );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
short nResult = pDlg->Execute();
pTabViewShell->SetInFormatDialog(false);
diff --git a/sc/source/ui/view/galwrap.cxx b/sc/source/ui/view/galwrap.cxx
index c781841b52dd..56402103f25b 100644
--- a/sc/source/ui/view/galwrap.cxx
+++ b/sc/source/ui/view/galwrap.cxx
@@ -43,7 +43,7 @@
Graphic GalleryGetGraphic()
{
GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
+ OSL_ENSURE( pGal, "Wo ist die Gallery?" );
return pGal->GetGraphic();
}
@@ -55,14 +55,14 @@ sal_uInt16 GallerySGA_FORMAT_GRAPHIC()
sal_Bool GalleryIsLinkage()
{
GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
+ OSL_ENSURE( pGal, "Wo ist die Gallery?" );
return pGal->IsLinkage();
}
String GalleryGetFullPath()
{
GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
+ OSL_ENSURE( pGal, "Wo ist die Gallery?" );
return pGal->GetURL().GetMainURL(INetURLObject::NO_DECODE);
// URL as stored in GraphicLink must be encoded
@@ -71,7 +71,7 @@ String GalleryGetFullPath()
String GalleryGetFilterName()
{
GalleryExplorer* pGal = SVX_GALLERY();
- DBG_ASSERT( pGal, "Wo ist die Gallery?" );
+ OSL_ENSURE( pGal, "Wo ist die Gallery?" );
return pGal->GetFilterName();
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1bb05034f485..aa175795d5cc 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2153,7 +2153,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
SfxDispatcher* pDisp = pViewData->GetViewShell()->GetDispatcher();
sal_Bool bFormulaMode = pScMod->IsFormulaMode();
- DBG_ASSERT( pDisp || bFormulaMode, "Cursor auf nicht aktiver View bewegen ?" );
+ OSL_ENSURE( pDisp || bFormulaMode, "Cursor auf nicht aktiver View bewegen ?" );
// #i14927# execute SID_CURRENTCELL (for macro recording) only if there is no
// multiple selection, so the argument string completely describes the selection,
@@ -2616,7 +2616,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
}
ScModule* pScMod = SC_MOD();
- DBG_ASSERT( nCmd != COMMAND_STARTDRAG, "ScGridWindow::Command called with COMMAND_STARTDRAG" );
+ OSL_ENSURE( nCmd != COMMAND_STARTDRAG, "ScGridWindow::Command called with COMMAND_STARTDRAG" );
if ( nCmd == COMMAND_STARTEXTTEXTINPUT ||
nCmd == COMMAND_ENDEXTTEXTINPUT ||
@@ -2786,7 +2786,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
pScMod->SetInputMode( SC_INPUT_TABLE );
bEdit = pViewData->HasEditView(eWhich); // hat's geklappt ?
- DBG_ASSERT( bEdit, "kann nicht in Edit-Modus schalten" );
+ OSL_ENSURE( bEdit, "kann nicht in Edit-Modus schalten" );
}
}
if ( bEdit )
@@ -3984,7 +3984,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
// (external references might be used instead?)
SfxObjectShell* pSourceSh = pSourceDoc->GetDocumentShell();
- DBG_ASSERT(pSourceSh, "drag document has no shell");
+ OSL_ENSURE(pSourceSh, "drag document has no shell");
if (pSourceSh)
{
String aUndo = ScGlobal::GetRscString( STR_UNDO_COPY );
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index e7abeb076cbd..dfd3fdeb0a82 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -207,7 +207,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
ScQueryParam aQueryParam;
SCTAB nSrcTab = 0;
const ScSheetSourceDesc* pDesc = pDPObj->GetSheetDesc();
- DBG_ASSERT(pDesc, "no sheet source for filter button");
+ OSL_ENSURE(pDesc, "no sheet source for filter button");
if (pDesc)
{
aQueryParam = pDesc->GetQueryParam();
@@ -219,12 +219,12 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, pViewData, &aQueryParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScPivotFilterDlg* pDlg = pFact->CreateScPivotFilterDlg( pViewData->GetViewShell()->GetDialogParent(),
aArgSet, nSrcTab,
RID_SCDLG_PIVOTFILTER);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
ScSheetSourceDesc aNewDesc(pDoc);
@@ -258,7 +258,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove )
{
- DBG_ASSERT(pDragDPObj, "pDragDPObj missing");
+ OSL_ENSURE(pDragDPObj, "pDragDPObj missing");
// scroll window if at edges
//! move this to separate method
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 7a0c4d215546..bf3ff4fe59a2 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -235,7 +235,7 @@ void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pCo
if ( pDrView && pDrView->IsGridVisible() )
{
SdrPageView* pPV = pDrView->GetSdrPageView();
- DBG_ASSERT(pPV, "keine PageView");
+ OSL_ENSURE(pPV, "keine PageView");
if (pPV)
{
pContentDev->SetLineColor(COL_GRAY);
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 606406656532..c063315d0642 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -294,7 +294,7 @@ void ScGridWindow::DoInvertRect( const Rectangle& rPixel )
aInvertRect = Rectangle(); // aufheben
else
{
- DBG_ASSERT( aInvertRect.IsEmpty(), "DoInvertRect nicht paarig" );
+ OSL_ENSURE( aInvertRect.IsEmpty(), "DoInvertRect nicht paarig" );
aInvertRect = rPixel; // neues Rechteck merken
}
@@ -411,7 +411,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
PutInOrder( nX1, nX2 );
PutInOrder( nY1, nY2 );
- DBG_ASSERT( ValidCol(nX2) && ValidRow(nY2), "GridWin Draw Bereich zu gross" );
+ OSL_ENSURE( ValidCol(nX2) && ValidRow(nY2), "GridWin Draw Bereich zu gross" );
UpdateVisibleRange();
@@ -887,7 +887,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
// ist das jetzt durcheinandergekommen und es muss neu gemalt werden
//
- DBG_ASSERT(nPaintCount, "nPaintCount falsch");
+ OSL_ENSURE(nPaintCount, "nPaintCount falsch");
--nPaintCount;
if (!nPaintCount)
CheckNeedsRepaint();
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index e5cfd3c8eb05..6117240dc106 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -229,7 +229,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
Window* pRight = bHSplit ? pViewData->GetView()->GetWindowByPos( bVSplit ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT ) : 0;
Window* pBottom = bVSplit ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMLEFT ) : 0;
Window* pDiagonal = (bHSplit && bVSplit) ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMRIGHT ) : 0;
- DBG_ASSERT( pLeft, "ScGridWindow::ShowNoteMarker - missing top-left grid window" );
+ OSL_ENSURE( pLeft, "ScGridWindow::ShowNoteMarker - missing top-left grid window" );
/* If caption is shown from right or bottom windows, adjust
mapmode to include size of top-left window. */
@@ -397,7 +397,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( pDrView && bHelpEnabled && !bDone )
{
SdrPageView* pPV = pDrView->GetSdrPageView();
- DBG_ASSERT( pPV, "SdrPageView* ist NULL" );
+ OSL_ENSURE( pPV, "SdrPageView* ist NULL" );
if (pPV)
bDone = ((ScDrawPage*)pPV->GetPage())->RequestHelp( this, pDrView, rHEvt );
}
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index c8f6a4577158..407dfeeca691 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -110,7 +110,7 @@ ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEn
void ScHeaderControl::SetWidth( long nNew )
{
- DBG_ASSERT( bVertical, "SetDigits nur fuer Zeilenkoepfe erlaubt" );
+ OSL_ENSURE( bVertical, "SetDigits nur fuer Zeilenkoepfe erlaubt" );
if ( nNew != nWidth )
{
Size aSize( nNew, GetSizePixel().Height() ); // Hoehe nicht aendern
diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx
index c65b29ba1a6e..8a8a88517121 100644
--- a/sc/source/ui/view/invmerge.cxx
+++ b/sc/source/ui/view/invmerge.cxx
@@ -32,7 +32,6 @@
#include <vcl/window.hxx>
-#include <tools/debug.hxx>
#include "invmerge.hxx"
@@ -62,7 +61,7 @@ void ScInvertMerger::Flush()
FlushLine();
FlushTotal();
- DBG_ASSERT( aLineRect.IsEmpty() && aTotalRect.IsEmpty(), "Flush: not empty" );
+ OSL_ENSURE( aLineRect.IsEmpty() && aTotalRect.IsEmpty(), "Flush: not empty" );
if ( pRects )
{
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 7f1eeaa3ba80..cb5fe25f041f 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -544,7 +544,7 @@ void ScOutlineWindow::DrawRectRel(
void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId )
{
- DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawImageRel - no images" );
+ OSL_ENSURE( mpSymbols, "ScOutlineWindow::DrawImageRel - no images" );
const Image& rImage = mpSymbols->GetImage( nId );
SetLineColor();
SetFillColor( GetBackground().GetColor() );
@@ -558,7 +558,7 @@ void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed
Point aPos;
if ( GetImagePos( nLevel, nEntry, aPos ) )
{
- DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawBorderRel - no images" );
+ OSL_ENSURE( mpSymbols, "ScOutlineWindow::DrawBorderRel - no images" );
sal_uInt16 nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED;
bool bClip = (nEntry != SC_OL_HEADERENTRY);
if ( bClip )
@@ -723,8 +723,8 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
@return true = value wrapped. */
bool lcl_RotateValue( size_t& rnValue, size_t nMin, size_t nMax, bool bForward )
{
- DBG_ASSERT( nMin <= nMax, "lcl_RotateValue - invalid range" );
- DBG_ASSERT( nMax < static_cast< size_t >( -1 ), "lcl_RotateValue - range overflow" );
+ OSL_ENSURE( nMin <= nMax, "lcl_RotateValue - invalid range" );
+ OSL_ENSURE( nMax < static_cast< size_t >( -1 ), "lcl_RotateValue - range overflow" );
bool bWrap = false;
if ( bForward )
{
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index b69f2ace659a..331df1b9e037 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -152,7 +152,7 @@ void ScActionColorChanger::Update( const ScChangeAction& rAction )
if (!rUsers.Search(&aData, nIndex))
{
// empty string is possible if a name wasn't found while saving a 5.0 file
- DBG_ASSERT( aLastUserName.Len() == 0, "Author not found" );
+ OSL_ENSURE( aLastUserName.Len() == 0, "Author not found" );
nIndex = 0;
}
nLastUserIndex = nIndex % SC_AUTHORCOLORCOUNT;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 1a91bfe0c60f..376b3daa39de 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -941,7 +941,7 @@ sal_Bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
inline sal_Bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern )
{
- DBG_ASSERT( rpNewPattern, "pNewPattern" );
+ OSL_ENSURE( rpNewPattern, "pNewPattern" );
if ( rpNewPattern == rpOldPattern )
return false;
@@ -1337,7 +1337,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
{
- DBG_ASSERT( pDev == pRefDevice ||
+ OSL_ENSURE( pDev == pRefDevice ||
pDev->GetMapMode().GetMapUnit() == pRefDevice->GetMapMode().GetMapUnit(),
"DrawStrings: unterschiedliche MapUnits ?!?!" );
@@ -4667,7 +4667,7 @@ void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
}
// TOPBOTTON and BOTTOMTOP are handled in DrawStrings/DrawEdit
- DBG_ASSERT( eOrient == SVX_ORIENTATION_STANDARD && nAttrRotate,
+ OSL_ENSURE( eOrient == SVX_ORIENTATION_STANDARD && nAttrRotate,
"DrawRotated: no rotation" );
long nOriVal = 0;
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index ac6aaeb53575..cf41ef01fe45 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -112,7 +112,7 @@ void ScPivotShell::Execute( SfxRequest& rReq )
ScQueryParam aQueryParam;
SCTAB nSrcTab = 0;
const ScSheetSourceDesc* pDesc = pDPObj->GetSheetDesc();
- DBG_ASSERT( pDesc, "no sheet source for DP filter dialog" );
+ OSL_ENSURE( pDesc, "no sheet source for DP filter dialog" );
if( pDesc )
{
aQueryParam = pDesc->GetQueryParam();
@@ -125,12 +125,12 @@ void ScPivotShell::Execute( SfxRequest& rReq )
aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, pViewData, &aQueryParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScPivotFilterDlg* pDlg = pFact->CreateScPivotFilterDlg( pViewShell->GetDialogParent(),
aArgSet, nSrcTab,
RID_SCDLG_PIVOTFILTER);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if( pDlg->Execute() == RET_OK )
{
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 72aa44daa569..35e03864c582 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -193,7 +193,7 @@ void ScPreview::TestLastPage()
nTab = nTabCount - 1;
while (nTab > 0 && !nPages[nTab]) // letzte nicht leere Tabelle
--nTab;
- DBG_ASSERT(nPages[nTab],"alle Tabellen leer?");
+ OSL_ENSURE(nPages[nTab],"alle Tabellen leer?");
nTabPage = nPages[nTab] - 1;
nTabStart = 0;
for (sal_uInt16 i=0; i<nTab; i++)
@@ -393,7 +393,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
aPage.Select( aPageRange );
long nPrinted = pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart, bDoPrint, NULL, pFillLocation );
- DBG_ASSERT(nPrinted<=1, "was'n nu los?");
+ OSL_ENSURE(nPrinted<=1, "was'n nu los?");
SetMapMode(aMMMode);
@@ -544,7 +544,7 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
aPage.Select( aPageRange );
long nPrinted = pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart );
- DBG_ASSERT(nPrinted<=1, "was'n nu los?");
+ OSL_ENSURE(nPrinted<=1, "was'n nu los?");
SetMapMode(aMMMode);
@@ -1202,7 +1202,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
sal_Bool bUndo( pDoc->IsUndoEnabled() );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found" );
if ( pStyleSheet )
{
ScStyleSaveData aOldData;
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index 39560477fe30..a3f0efb262cc 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <tools/debug.hxx>
#include <vcl/outdev.hxx>
#include "prevloc.hxx"
@@ -194,7 +193,7 @@ void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange&
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_CELLRANGE, aPixelRect, rRange, bRepCol, bRepRow ) );
- DBG_ASSERT( nDrawRanges < SC_PREVIEW_MAXRANGES, "too many ranges" );
+ OSL_ENSURE( nDrawRanges < SC_PREVIEW_MAXRANGES, "too many ranges" );
if ( nDrawRanges < SC_PREVIEW_MAXRANGES )
{
@@ -268,7 +267,7 @@ void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress
void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const
{
- DBG_ASSERT( nPos < nDrawRanges, "wrong position" );
+ OSL_ENSURE( nPos < nDrawRanges, "wrong position" );
if ( nPos < nDrawRanges )
{
rPixelRect = aDrawRectangle[nPos];
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 2707890da1d0..dded26f23572 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -220,7 +220,7 @@ Size ScPreviewShell::GetOptimalSizePixel() const
pDoc->GetPageStyle( nCurTab ),
SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" );
if ( pStyleSheet )
{
@@ -280,7 +280,7 @@ void ScPreviewShell::UpdateScrollBars()
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ),
SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT(pStyleSheet,"StyleSheet nicht gefunden");
+ OSL_ENSURE(pStyleSheet,"StyleSheet nicht gefunden");
if (!pStyleSheet) return;
const SfxItemSet* pParamSet = &pStyleSheet->GetItemSet();
@@ -479,7 +479,7 @@ sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiff
SfxTabPage* ScPreviewShell::CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_PRINT );
if ( ScTpPrintOptionsCreate )
return (*ScTpPrintOptionsCreate)( pParent, rOptions);
@@ -595,7 +595,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
if(pFact)
{
AbstractSvxZoomDialog* pDlg = pFact->CreateSvxZoomDialog(NULL, aSet);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->SetLimits( 20, 400 );
pDlg->HideButton( ZOOMBTN_OPTIMAL );
bCancel = ( RET_CANCEL == pDlg->Execute() );
@@ -684,7 +684,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
String aOldName = pDocShell->GetDocument()->GetPageStyle( pPreview->GetTab() );
ScStyleSheetPool* pStylePool = pDocShell->GetDocument()->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, sal_True, &pItem ) )
{
@@ -793,7 +793,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
String aOldName = pDocShell->GetDocument()->GetPageStyle( pPreview->GetTab() );
ScStyleSheetPool* pStylePool = pDocShell->GetDocument()->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pStyleSheet )
{
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 5eb9aea5e8e9..6bc1d600d48c 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -805,7 +805,7 @@ long ScPrintFunc::TextHeight( const EditTextObject* pObject )
void ScPrintFunc::UpdateHFHeight( ScPrintHFParam& rParam )
{
- DBG_ASSERT( aPageSize.Width(), "UpdateHFHeight ohne aPageSize");
+ OSL_ENSURE( aPageSize.Width(), "UpdateHFHeight ohne aPageSize");
if (rParam.bEnable && rParam.bDynamic)
{
@@ -950,7 +950,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
pScaleToPagesItem = (const SfxUInt16Item*)
&pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETOPAGES );
- DBG_ASSERT( pScaleItem && pScaleToItem && pScaleToPagesItem, "Missing ScaleItem! :-/" );
+ OSL_ENSURE( pScaleItem && pScaleToItem && pScaleToPagesItem, "Missing ScaleItem! :-/" );
aTableParam.bCellContent = sal_True;
aTableParam.bNotes = GET_BOOL(pParamSet,ATTR_PAGE_NOTES);
@@ -1267,7 +1267,7 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi
bDraw = false;
break;
- default: DBG_ASSERT( !pOut, "new Graphic position?" );
+ default: OSL_ENSURE( !pOut, "new Graphic position?" );
}
Rectangle aGrf( aPos,aDrawSize );
if ( bDraw && aGrf.IsOver( rOut ) )
@@ -1404,7 +1404,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
ScTableInfo aTabInfo;
pBorderDoc->FillInfo( aTabInfo, 0,0, 0,0, 0,
nScaleX, nScaleY, false, false );
- DBG_ASSERT(aTabInfo.mnArrCount,"nArrCount == 0");
+ OSL_ENSURE(aTabInfo.mnArrCount,"nArrCount == 0");
aTabInfo.mpRowInfo[1].nHeight = (sal_uInt16) nEffHeight;
aTabInfo.mpRowInfo[0].pCellInfo[1].nWidth =
@@ -2677,7 +2677,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
long nStartPage, long nDisplayStart, sal_Bool bDoPrint,
SfxProgress* pProgress, ScPreviewLocationData* pLocationData )
{
- DBG_ASSERT(pDev,"Device == NULL");
+ OSL_ENSURE(pDev,"Device == NULL");
if (!pParamSet)
return 0;
@@ -2937,7 +2937,7 @@ void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo ) // Zoom
}
else
{
- DBG_ASSERT( aTableParam.bScaleNone, "kein Scale-Flag gesetzt" );
+ OSL_ENSURE( aTableParam.bScaleNone, "kein Scale-Flag gesetzt" );
nZoom = 100;
CalcPages();
}
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 683cd3a52848..5d3a99226d05 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -105,7 +105,7 @@ namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); }
ScTabViewShell* pViewShell = lcl_GetTabViewShell( p ); \
if (!pViewShell) \
pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); \
- DBG_ASSERT( pViewShell, "missing view shell :-(" ); \
+ OSL_ENSURE( pViewShell, "missing view shell :-(" ); \
pWindow = pViewShell ? \
pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : NULL; \
if (pViewShell && !pWindow) \
@@ -221,7 +221,7 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP,
pViewShell = PTR_CAST( ScTabViewShell, pViewFrm->GetViewShell() );
}
- DBG_ASSERT( pViewShell, "missing view shell :-(" );
+ OSL_ENSURE( pViewShell, "missing view shell :-(" );
if(pInfo!=NULL && bScSimpleRefFlag)
{
@@ -324,7 +324,7 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( Window* pParentP,
{
ScTabViewShell* pViewShell =
PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
- DBG_ASSERT( pViewShell, "missing view shell :-(" );
+ OSL_ENSURE( pViewShell, "missing view shell :-(" );
pWindow = pViewShell ?
new ScAcceptChgDlg( pBindings, this, pParentP, pViewShell->GetViewData() ) :
NULL;
@@ -340,7 +340,7 @@ void ScAcceptChgDlgWrapper::ReInitDlg()
{
ScTabViewShell* pViewShell =
PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
- DBG_ASSERT( pViewShell, "missing view shell :-(" );
+ OSL_ENSURE( pViewShell, "missing view shell :-(" );
if(pWindow!=NULL && pViewShell)
{
@@ -384,7 +384,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP,
lcl_GetTabViewShell( p );
if (!pViewShell)
pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
- DBG_ASSERT( pViewShell, "missing view shell :-(" ); \
+ OSL_ENSURE( pViewShell, "missing view shell :-(" ); \
if (pViewShell && !pWindow) \
pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \
diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx
index c9af56f00d33..5a6987dfed0a 100644
--- a/sc/source/ui/view/scextopt.cxx
+++ b/sc/source/ui/view/scextopt.cxx
@@ -206,13 +206,13 @@ SCTAB ScExtDocOptions::GetCodeNameCount() const
const String& ScExtDocOptions::GetCodeName( SCTAB nTab ) const
{
- DBG_ASSERT( (0 <= nTab) && (nTab < GetCodeNameCount()), "ScExtDocOptions::GetCodeName - invalid sheet index" );
+ OSL_ENSURE( (0 <= nTab) && (nTab < GetCodeNameCount()), "ScExtDocOptions::GetCodeName - invalid sheet index" );
return ((0 <= nTab) && (nTab < GetCodeNameCount())) ? mxImpl->maCodeNames[ static_cast< size_t >( nTab ) ] : EMPTY_STRING;
}
void ScExtDocOptions::SetCodeName( SCTAB nTab, const String& rCodeName )
{
- DBG_ASSERT( nTab >= 0, "ScExtDocOptions::SetCodeName - invalid sheet index" );
+ OSL_ENSURE( nTab >= 0, "ScExtDocOptions::SetCodeName - invalid sheet index" );
if( nTab >= 0 )
{
size_t nIndex = static_cast< size_t >( nTab );
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index e73e58ef032e..dfc38abe0447 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -70,7 +70,7 @@ ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
bAnchor( false ),
bStarted( false )
{
- DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet");
+ OSL_ENSURE(pViewData, "ViewData==0 bei FunctionSet");
}
ScSplitPos ScViewFunctionSet::GetWhich()
@@ -597,7 +597,7 @@ sal_Bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Boo
sal_uInt8 nMode = pViewData->GetFillMode();
if ( nMode == SC_FILL_EMBED_LT || nMode == SC_FILL_EMBED_RB )
{
- DBG_ASSERT( pDoc->IsEmbedded(), "!pDoc->IsEmbedded()" );
+ OSL_ENSURE( pDoc->IsEmbedded(), "!pDoc->IsEmbedded()" );
ScRange aRange;
pDoc->GetEmbedded( aRange);
ScRefType eRefMode = (nMode == SC_FILL_EMBED_LT) ? SC_REFTYPE_EMBED_LT : SC_REFTYPE_EMBED_RB;
@@ -777,7 +777,7 @@ ScHeaderFunctionSet::ScHeaderFunctionSet( ScViewData* pNewViewData ) :
bAnchor( false ),
nCursorPos( 0 )
{
- DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet");
+ OSL_ENSURE(pViewData, "ViewData==0 bei FunctionSet");
}
void ScHeaderFunctionSet::SetColumn( sal_Bool bSet )
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index a852f8e5f68b..8a1e5d963d4f 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -217,7 +217,7 @@ void ScSpellDialogChildWindow::Init()
// break;
default:
- DBG_ERRORFILE( "ScSpellDialogChildWindow::Init - unknown selection type" );
+ OSL_FAIL( "ScSpellDialogChildWindow::Init - unknown selection type" );
}
mbOldIdleDisabled = mpDoc->IsIdleDisabled();
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index e5e1b38da726..10d517b31a5e 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -332,7 +332,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView )
if( FindNextConversionCell() )
eState = rEditView.StartSpeller( static_cast< sal_Bool >( sal_True ) );
- DBG_ASSERT( eState != EE_SPELL_NOSPELLER, "ScSpellingEngine::Convert - no spell checker" );
+ OSL_ENSURE( eState != EE_SPELL_NOSPELLER, "ScSpellingEngine::Convert - no spell checker" );
if( eState == EE_SPELL_NOLANGUAGE )
{
Window* pParent = GetDialogParent();
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 1f1aca34902a..1246b05b4a67 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -586,7 +586,7 @@ long ScTabControl::StartRenaming()
long ScTabControl::AllowRenaming()
{
ScTabViewShell* pViewSh = pViewData->GetViewShell();
- DBG_ASSERT( pViewSh, "pViewData->GetViewShell()" );
+ OSL_ENSURE( pViewSh, "pViewData->GetViewShell()" );
long nRet = TABBAR_RENAMING_CANCEL;
sal_uInt16 nId = GetEditPageId();
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index a00c71b95918..dc95d8d31498 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -990,7 +990,7 @@ double ScTabView::GetPendingRelTabBarWidth() const
Window* ScTabView::GetActiveWin()
{
ScSplitPos ePos = aViewData.GetActivePart();
- DBG_ASSERT(pGridWin[ePos],"kein aktives Fenster");
+ OSL_ENSURE(pGridWin[ePos],"kein aktives Fenster");
return pGridWin[ePos];
}
@@ -1577,7 +1577,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
inline void ShowHide( Window* pWin, sal_Bool bShow )
{
- DBG_ASSERT(pWin || !bShow, "Fenster ist nicht da");
+ OSL_ENSURE(pWin || !bShow, "Fenster ist nicht da");
if (pWin)
pWin->Show(bShow);
}
@@ -1878,7 +1878,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange
eUsedPart = (WhichH(eUsedPart)==SC_SPLIT_LEFT) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT;
ScGridWindow* pWin = pGridWin[eUsedPart];
- DBG_ASSERT( pWin, "Window not found" );
+ OSL_ENSURE( pWin, "Window not found" );
if (pWin)
{
ActivatePart( eUsedPart );
@@ -1995,7 +1995,7 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL
eUsedPart = (WhichH(eUsedPart)==SC_SPLIT_LEFT) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT;
ScGridWindow* pWin = pGridWin[eUsedPart];
- DBG_ASSERT( pWin, "Window not found" );
+ OSL_ENSURE( pWin, "Window not found" );
if (pWin)
{
MapMode aDrawMode = pWin->GetDrawMapMode();
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 160945c72864..d7ea9185150c 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -224,7 +224,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
nCurX = MAXCOL;
ScMarkData& rMark = aViewData.GetMarkData();
- DBG_ASSERT(rMark.IsMarked() || rMark.IsMultiMarked(), "MarkCursor, !IsMarked()");
+ OSL_ENSURE(rMark.IsMarked() || rMark.IsMultiMarked(), "MarkCursor, !IsMarked()");
ScRange aMarkRange;
rMark.GetMarkArea(aMarkRange);
if (( aMarkRange.aStart.Col() != nBlockStartX && aMarkRange.aEnd.Col() != nBlockStartX ) ||
@@ -1094,7 +1094,7 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
else
nMax = nTest-1;
}
- DBG_ASSERT( nMin == nMax, "Schachtelung ist falsch" );
+ OSL_ENSURE( nMin == nMax, "Schachtelung ist falsch" );
nZoom = nMin;
if ( nZoom != nOldZoom )
@@ -1122,7 +1122,7 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
pStylePool->Find( pDoc->GetPageStyle( nCurTab ),
SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" );
if ( pStyleSheet )
{
@@ -1227,7 +1227,7 @@ void ScTabView::MakeDrawLayer()
aViewData.GetDocShell()->MakeDrawLayer();
// pDrawView wird per Notify gesetzt
- DBG_ASSERT(pDrawView,"ScTabView::MakeDrawLayer funktioniert nicht");
+ OSL_ENSURE(pDrawView,"ScTabView::MakeDrawLayer funktioniert nicht");
// #114409#
for(sal_uInt16 a(0); a < 4; a++)
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 8b3f021dfab7..958a2fd5dec6 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -487,7 +487,7 @@ void ScTabView::TestHintWindow()
if ( pItem->GetValue() )
{
const ScValidationData* pData = pDoc->GetValidationEntry( pItem->GetValue() );
- DBG_ASSERT(pData,"ValidationData nicht gefunden");
+ OSL_ENSURE(pData,"ValidationData nicht gefunden");
String aTitle, aMessage;
if ( pData && pData->GetInput( aTitle, aMessage ) && aMessage.Len() > 0 )
{
@@ -1396,7 +1396,7 @@ void ScTabView::MarkDataChanged()
void ScTabView::SelectNextTab( short nDir, sal_Bool bExtendSelection )
{
if (!nDir) return;
- DBG_ASSERT( nDir==-1 || nDir==1, "SelectNextTab: falscher Wert");
+ OSL_ENSURE( nDir==-1 || nDir==1, "SelectNextTab: falscher Wert");
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -2312,7 +2312,7 @@ void ScTabView::ActivateView( sal_Bool bActivate, sal_Bool bFirst )
if ( bFirst )
{
ScSplitPos eWin = aViewData.GetActivePart();
- DBG_ASSERT( pGridWin[eWin], "rottes Dokument, nicht alle SplitPos in GridWin" );
+ OSL_ENSURE( pGridWin[eWin], "rottes Dokument, nicht alle SplitPos in GridWin" );
if ( !pGridWin[eWin] )
{
eWin = SC_SPLIT_BOTTOMLEFT;
@@ -2327,7 +2327,7 @@ void ScTabView::ActivateView( sal_Bool bActivate, sal_Bool bFirst )
break; // for
}
}
- DBG_ASSERT( i<4, "und BUMM" );
+ OSL_ENSURE( i<4, "und BUMM" );
}
aViewData.SetActivePart( eWin );
}
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index ef2c621358b4..4d3db37074ef 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -214,7 +214,7 @@ void ScTabView::MakeDrawView( sal_uInt8 nForceDesignMode )
if (!pDrawView)
{
ScDrawLayer* pLayer = aViewData.GetDocument()->GetDrawLayer();
- DBG_ASSERT(pLayer, "wo ist der Draw Layer ??");
+ OSL_ENSURE(pLayer, "wo ist der Draw Layer ??");
sal_uInt16 i;
pDrawView = new ScDrawView( pGridWin[SC_SPLIT_BOTTOMLEFT], &aViewData );
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index f6e7dccb45a1..aefc0092d3fb 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -692,7 +692,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if(pFact)
{
pDlg = pFact->CreateSvxZoomDialog(GetDialogParent(), aSet );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
if (pDlg)
{
@@ -817,10 +817,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScShowTabDlg* pDlg = pFact->CreateScShowTabDlg( GetDialogParent(), RID_SCDLG_SHOW_TAB);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetDescription(
String( ScResId( STR_DLG_SELECTTABLES_TITLE ) ),
String( ScResId( STR_DLG_SELECTTABLES_LBNAME ) ),
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 84eef57ec893..6d512e38d3df 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -329,7 +329,7 @@ Size ScTabViewShell::GetOptimalSizePixel() const
pDoc->GetPageStyle( nCurTab ),
SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" );
if ( pStyleSheet )
{
@@ -1100,7 +1100,7 @@ sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiff
SfxTabPage* ScTabViewShell::CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_PRINT );
if ( ScTpPrintOptionsCreate )
return (*ScTpPrintOptionsCreate)( pParent, rOptions);
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 0237e57a07ed..9de8b210407b 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -294,7 +294,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName,
SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found" );
if ( pStyleSheet )
{
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
@@ -512,10 +512,10 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, sal_uInt16 nTabPage
bInFormatDialog = true;
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
pDlg = pFact->CreateScAttrDlg( GetViewFrame(), GetDialogParent(), pOldSet, RID_SCDLG_ATTR);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( nTabPage != 0xffff )
pDlg->SetCurPageId( nTabPage );
short nResult = pDlg->Execute();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 3ec38a0afa74..d0b08dacb84e 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -363,7 +363,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
case SID_FM_CREATE_FIELDCONTROL:
{
SFX_REQUEST_ARG( rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR, false );
- DBG_ASSERT( pDescriptorItem, "SID_FM_CREATE_FIELDCONTROL: invalid request args!" );
+ OSL_ENSURE( pDescriptorItem, "SID_FM_CREATE_FIELDCONTROL: invalid request args!" );
if(pDescriptorItem)
{
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index 23cab155b3ec..dce33abe4262 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -216,7 +216,7 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co
EditView* pTopView = pHdl->GetTopView();
EditView* pTableView = pHdl->GetTableView();
- DBG_ASSERT( pTopView || pTableView, "No EditView" );
+ OSL_ENSURE( pTopView || pTableView, "No EditView" );
if ( bSelectFirst )
{
@@ -255,7 +255,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
if ( pReqArgs &&
SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem) )
{
- DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" );
+ OSL_ENSURE( pItem->ISA(SvxSearchItem), "falsches Item" );
const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem;
ScGlobal::SetSearchItem( *pSearchItem );
@@ -270,7 +270,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem))
{
// Search-Item merken
- DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" );
+ OSL_ENSURE( pItem->ISA(SvxSearchItem), "falsches Item" );
ScGlobal::SetSearchItem( *(const SvxSearchItem*) pItem );
}
else
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index b4d6cdc6ac1e..8f57091af5db 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -174,10 +174,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScShowTabDlg* pDlg = pFact->CreateScShowTabDlg( GetDialogParent(), RID_SCDLG_SHOW_TAB);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
String aTabName;
sal_Bool bFirst = sal_True;
@@ -242,12 +242,12 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
else // Dialog
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScInsertTableDlg* pDlg = pFact->CreateScInsertTableDlg( GetDialogParent(), *pViewData,
nTabSelCount, nSlot == FID_INS_TABLE_EXT,
RID_SCDLG_INSERT_TABLE);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( RET_OK == pDlg->Execute() )
{
if (pDlg->GetTablesFromFile())
@@ -422,14 +422,14 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScStringInputDlg* pDlg = pFact->CreateScStringInputDlg(
GetDialogParent(), aDlgTitle, String(ScResId(SCSTR_NAME)),
aName, GetStaticInterface()->GetSlot(nSlot)->GetCommand(),
pHelpId, RID_SCDLG_STRINPUT);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
while ( !bDone && nRet == RET_OK )
{
@@ -548,12 +548,12 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
pDoc->GetName( pViewData->GetTabNo(), aDefaultName );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScMoveTableDlg* pDlg = pFact->CreateScMoveTableDlg( GetDialogParent(),
aDefaultName,
RID_SCDLG_MOVETAB );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
SCTAB nTableCount = pDoc->GetTableCount();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -757,7 +757,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
aTabBgColor = pDoc->GetTabBgColor( nCurrentTab );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScTabBgColorDlg* pDlg = pFact->CreateScTabBgColorDlg(
GetDialogParent(),
String(ScResId(SCSTR_SET_TAB_BG_COLOR)),
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 19b50fe153f6..0457c40fbf4e 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -80,7 +80,7 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL,
SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObj);
uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel();
- DBG_ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ OSL_ENSURE( xControlModel.is(), "UNO-Control ohne Model" );
if( !xControlModel.is() )
return;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index b7c2e3c14a05..c82bd6e8ccc2 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -987,7 +987,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
nSizeXPix = aPixRect.GetWidth(); // Papersize -> kein H-Scrolling
else
{
- DBG_ASSERT(pView,"keine View fuer EditView");
+ OSL_ENSURE(pView,"keine View fuer EditView");
if ( bGrowCentered )
{
@@ -1005,7 +1005,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
if ( nSizeXPix <= 0 )
nSizeXPix = aPixRect.GetWidth(); // editing outside to the right of the window -> keep cell width
}
- DBG_ASSERT(pView,"keine View fuer EditView");
+ OSL_ENSURE(pView,"keine View fuer EditView");
long nSizeYPix = pView->GetGridHeight(WhichV(eWhich)) - aPixRect.Top();
if ( nSizeYPix <= 0 )
nSizeYPix = aPixRect.GetHeight(); // editing outside below the window -> keep cell height
@@ -1452,14 +1452,14 @@ void ScViewData::SetActivePart( ScSplitPos eNewActive )
Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const
{
- DBG_ASSERT( eWhich==SC_SPLIT_LEFT || eWhich==SC_SPLIT_RIGHT, "Falsche Position" );
+ OSL_ENSURE( eWhich==SC_SPLIT_LEFT || eWhich==SC_SPLIT_RIGHT, "Falsche Position" );
ScSplitPos ePos = ( eWhich == SC_SPLIT_LEFT ) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT;
return GetScrPos( nWhereX, nWhereY, ePos );
}
Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const
{
- DBG_ASSERT( eWhich==SC_SPLIT_TOP || eWhich==SC_SPLIT_BOTTOM, "Falsche Position" );
+ OSL_ENSURE( eWhich==SC_SPLIT_TOP || eWhich==SC_SPLIT_BOTTOM, "Falsche Position" );
ScSplitPos ePos = ( eWhich == SC_SPLIT_TOP ) ? SC_SPLIT_TOPLEFT : SC_SPLIT_BOTTOMLEFT;
return GetScrPos( nWhereX, nWhereY, ePos );
}
@@ -1585,7 +1585,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeX ) const
{
- DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
+ OSL_ENSURE( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
if (pView)
((ScViewData*)this)->aScrSize.Width() = pView->GetGridWidth(eWhichX);
@@ -1627,7 +1627,7 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_
SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeY ) const
{
- DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
+ OSL_ENSURE( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
if (pView)
((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
@@ -2054,37 +2054,37 @@ SfxObjectShell* ScViewData::GetSfxDocShell() const
SfxBindings& ScViewData::GetBindings()
{
- DBG_ASSERT( pViewShell, "GetBindings() without ViewShell" );
+ OSL_ENSURE( pViewShell, "GetBindings() without ViewShell" );
return pViewShell->GetViewFrame()->GetBindings();
}
SfxDispatcher& ScViewData::GetDispatcher()
{
- DBG_ASSERT( pViewShell, "GetDispatcher() without ViewShell" );
+ OSL_ENSURE( pViewShell, "GetDispatcher() without ViewShell" );
return *pViewShell->GetViewFrame()->GetDispatcher();
}
Window* ScViewData::GetDialogParent()
{
- DBG_ASSERT( pViewShell, "GetDialogParent() ohne ViewShell" );
+ OSL_ENSURE( pViewShell, "GetDialogParent() ohne ViewShell" );
return pViewShell->GetDialogParent();
}
Window* ScViewData::GetActiveWin()
{
- DBG_ASSERT( pView, "GetActiveWin() ohne View" );
+ OSL_ENSURE( pView, "GetActiveWin() ohne View" );
return pView->GetActiveWin();
}
ScDrawView* ScViewData::GetScDrawView()
{
- DBG_ASSERT( pView, "GetScDrawView() ohne View" );
+ OSL_ENSURE( pView, "GetScDrawView() ohne View" );
return pView->GetScDrawView();
}
sal_Bool ScViewData::IsMinimized()
{
- DBG_ASSERT( pView, "IsMinimized() ohne View" );
+ OSL_ENSURE( pView, "IsMinimized() ohne View" );
return pView->IsMinimized();
}
@@ -2369,7 +2369,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
bool bVSplit = eVSplit != SC_SPLIT_NONE;
bool bRealSplit = (eHSplit == SC_SPLIT_NORMAL) || (eVSplit == SC_SPLIT_NORMAL);
bool bFrozen = (eHSplit == SC_SPLIT_FIX) || (eVSplit == SC_SPLIT_FIX);
- DBG_ASSERT( !bRealSplit || !bFrozen, "ScViewData::WriteExtOptions - split and freeze in same sheet" );
+ OSL_ENSURE( !bRealSplit || !bFrozen, "ScViewData::WriteExtOptions - split and freeze in same sheet" );
rTabSett.mbFrozenPanes = !bRealSplit && bFrozen;
// split and freeze position
@@ -2608,7 +2608,7 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
SCTAB nTabCount (pDoc->GetTableCount());
uno::Reference<lang::XMultiServiceFactory> xServiceFactory =
comphelper::getProcessServiceFactory();
- DBG_ASSERT( xServiceFactory.is(), "got no service manager" );
+ OSL_ENSURE( xServiceFactory.is(), "got no service manager" );
if( xServiceFactory.is() )
{
rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.NamedPropertyValues"));
@@ -2633,11 +2633,11 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
//#101739#; two tables with the same name are possible
catch ( container::ElementExistException& )
{
- DBG_ERRORFILE("seems there are two tables with the same name");
+ OSL_FAIL("seems there are two tables with the same name");
}
catch ( uno::RuntimeException& )
{
- DBG_ERRORFILE("something went wrong");
+ OSL_FAIL("something went wrong");
}
}
}
@@ -2883,7 +2883,7 @@ void ScViewData::SetOptions( const ScViewOptions& rOpt )
rOpt.GetObjMode(VOBJ_TYPE_OLE) );
*pOptions = rOpt;
- DBG_ASSERT( pView, "No View" );
+ OSL_ENSURE( pView, "No View" );
if( pView )
{
@@ -2893,7 +2893,7 @@ void ScViewData::SetOptions( const ScViewOptions& rOpt )
Point ScViewData::GetMousePosPixel()
{
- DBG_ASSERT( pView, "GetMousePosPixel() ohne View" );
+ OSL_ENSURE( pView, "GetMousePosPixel() ohne View" );
return pView->GetMousePosPixel();
}
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index fb76ade4d6dc..17523bcab9d3 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -415,7 +415,7 @@ void ScViewFunc::DoThesaurus( sal_Bool bRecord )
// language is now in EditEngine attributes -> no longer passed to StartThesaurus
eState = pEditView->StartThesaurus();
- DBG_ASSERT(eState != EE_SPELL_NOSPELLER, "No SpellChecker");
+ OSL_ENSURE(eState != EE_SPELL_NOSPELLER, "No SpellChecker");
if (eState == EE_SPELL_ERRORFOUND) // sollte spaeter durch Wrapper geschehen!
{
@@ -548,7 +548,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Boo
pDoc->GetEnginePool(), rViewData, rConvParam, pUndoDoc, pRedoDoc );
break;
default:
- DBG_ERRORFILE( "ScViewFunc::DoSheetConversion - unknown conversion type" );
+ OSL_FAIL( "ScViewFunc::DoSheetConversion - unknown conversion type" );
}
MakeEditView( pEngine, nCol, nRow );
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 99307c20f96c..495b6745d70a 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -75,7 +75,7 @@ using namespace com::sun::star;
void lcl_AdjustInsertPos( ScViewData* pData, Point& rPos, Size& rSize )
{
SdrPage* pPage = pData->GetScDrawView()->GetModel()->GetPage( static_cast<sal_uInt16>(pData->GetTabNo()) );
- DBG_ASSERT(pPage,"pPage ???");
+ OSL_ENSURE(pPage,"pPage ???");
Size aPgSize( pPage->GetSize() );
if (aPgSize.Width() < 0)
aPgSize.Width() = -aPgSize.Width();
@@ -155,7 +155,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
SdrModel* pDrawModel = pDragEditView->GetModel();
SCTAB nTab = GetViewData()->GetTabNo();
SdrPage* pDestPage = pDrawModel->GetPage( static_cast< sal_uInt16 >( nTab ) );
- DBG_ASSERT(pDestPage,"nanu, Page?");
+ OSL_ENSURE(pDestPage,"nanu, Page?");
::std::vector< ::rtl::OUString > aExcludedChartNames;
if ( pDestPage )
@@ -226,7 +226,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
::std::vector< ::rtl::OUString > aExcludedChartNames;
SCTAB nTab = GetViewData()->GetTabNo();
SdrPage* pPage = pScDrawView->GetModel()->GetPage( static_cast< sal_uInt16 >( nTab ) );
- DBG_ASSERT( pPage, "Page?" );
+ OSL_ENSURE( pPage, "Page?" );
if ( pPage )
{
ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 549bb6dfd32c..2f02565f0d0c 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -816,7 +816,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb
++nPos;
}
- DBG_ASSERT( nPos==nSelCount, "nPos!=nSelCount" );
+ OSL_ENSURE( nPos==nSelCount, "nPos!=nSelCount" );
pUndoData = pData->Clone();
}
@@ -1964,7 +1964,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
aFuncMark.SetMarking(false); // for MarkToMulti
aFuncMark.MarkToSimple(); // before bMulti test below
- DBG_ASSERT( aFuncMark.IsMarked() || aFuncMark.IsMultiMarked() || bSimple, "delete what?" );
+ OSL_ENSURE( aFuncMark.IsMarked() || aFuncMark.IsMultiMarked() || bSimple, "delete what?" );
ScDocument* pUndoDoc = NULL;
sal_Bool bMulti = !bSimple && aFuncMark.IsMultiMarked();
@@ -2860,7 +2860,7 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
short nNewType = 0;
sal_Bool bOk = pFormatter->PutEntry( aNewPicture, nErrPos,
nNewType, nNewFormat, eLanguage );
- DBG_ASSERT( bOk, "falsches Zahlformat generiert" );
+ OSL_ENSURE( bOk, "falsches Zahlformat generiert" );
if (!bOk)
bError = sal_True;
}
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index c89d9dac1455..a7cd41fc4578 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -290,7 +290,7 @@ bool ScViewUtil::FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_
SCTAB nTab = rRange.aStart.Tab();
bool bOneTabOnly = (nTab == rRange.aEnd.Tab());
// Always fit the range on its first sheet.
- DBG_ASSERT( bOneTabOnly, "ScViewUtil::ExtendToUnfilteredRows: works only on one sheet");
+ OSL_ENSURE( bOneTabOnly, "ScViewUtil::ExtendToUnfilteredRows: works only on one sheet");
SCROW nStartRow = rRange.aStart.Row();
SCROW nLastRow = pDoc->LastNonFilteredRow(nStartRow, MAXROW, nTab);
if (ValidRow(nLastRow))
@@ -340,7 +340,7 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal
break;
default:
- DBG_ERRORFILE( "ScViewUtil::HideDisabledSlot - unknown slot ID" );
+ OSL_FAIL( "ScViewUtil::HideDisabledSlot - unknown slot ID" );
return;
}