summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx3
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx1
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx12
-rw-r--r--sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx15
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx37
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx15
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx5
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx5
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx1
-rw-r--r--sc/source/ui/Accessibility/DrawModelBroadcaster.cxx1
-rw-r--r--sc/source/ui/app/drwtrans.cxx8
-rw-r--r--sc/source/ui/app/inputhdl.cxx10
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/app/scmod.cxx22
-rw-r--r--sc/source/ui/app/seltrans.cxx12
-rw-r--r--sc/source/ui/app/transobj.cxx6
-rw-r--r--sc/source/ui/app/uiitems.cxx24
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx18
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx8
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx5
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx3
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx2
-rw-r--r--sc/source/ui/dbgui/csvsplits.cxx1
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx15
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx3
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx3
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx2
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx2
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx10
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx15
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx6
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx18
-rw-r--r--sc/source/ui/dbgui/validate.cxx12
-rw-r--r--sc/source/ui/docshell/arealink.cxx6
-rw-r--r--sc/source/ui/docshell/autostyl.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx10
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx5
-rw-r--r--sc/source/ui/docshell/docfunc.cxx14
-rw-r--r--sc/source/ui/docshell/docsh.cxx8
-rw-r--r--sc/source/ui/docshell/docsh3.cxx12
-rw-r--r--sc/source/ui/docshell/docsh4.cxx40
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx40
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx8
-rw-r--r--sc/source/ui/docshell/pagedata.cxx6
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx10
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx4
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx8
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx6
-rw-r--r--sc/source/ui/formdlg/formdata.cxx2
-rw-r--r--sc/source/ui/formdlg/formula.cxx6
-rw-r--r--sc/source/ui/inc/ui_pch.hxx1
-rw-r--r--sc/source/ui/inc/validate.hxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx4
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx16
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx4
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx2
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx2
-rw-r--r--sc/source/ui/miscdlgs/strindlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx3
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx8
-rw-r--r--sc/source/ui/navipi/navcitem.cxx4
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx6
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx8
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx2
-rw-r--r--sc/source/ui/styleui/styledlg.cxx46
-rw-r--r--sc/source/ui/undo/areasave.cxx1
-rw-r--r--sc/source/ui/undo/undoblk.cxx4
-rw-r--r--sc/source/ui/undo/undoblk3.cxx10
-rw-r--r--sc/source/ui/undo/undocell.cxx12
-rw-r--r--sc/source/ui/undo/undodat.cxx4
-rw-r--r--sc/source/ui/undo/undostyl.cxx4
-rw-r--r--sc/source/ui/undo/undotab.cxx4
-rw-r--r--sc/source/ui/undo/undoutil.cxx2
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx9
-rw-r--r--sc/source/ui/unoobj/appluno.cxx2
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx8
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx58
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx26
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx26
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx14
-rw-r--r--sc/source/ui/unoobj/convuno.cxx1
-rw-r--r--sc/source/ui/unoobj/cursuno.cxx26
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx6
-rw-r--r--sc/source/ui/unoobj/datauno.cxx11
-rw-r--r--sc/source/ui/unoobj/docuno.cxx18
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx18
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx8
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx3
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx7
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx2
-rw-r--r--sc/source/ui/unoobj/listenercalls.cxx3
-rw-r--r--sc/source/ui/unoobj/miscuno.cxx1
-rw-r--r--sc/source/ui/unoobj/scdetect.hxx1
-rw-r--r--sc/source/ui/unoobj/servuno.cxx3
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx9
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx2
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
-rw-r--r--sc/source/ui/unoobj/textuno.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx4
-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
162 files changed, 671 insertions, 711 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index e3ee6d51b165..0977e9df2be5 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -51,7 +51,6 @@
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <com/sun/star/accessibility/XAccessibleTable.hpp>
#include <rtl/uuid.h>
-#include <tools/debug.hxx>
#include <editeng/brshitem.hxx>
#include <comphelper/sequence.hxx>
#include <float.h>
@@ -444,7 +443,7 @@ void ScAccessibleCell::AddRelation(const ScRange& rRange,
++nPos;
}
}
- DBG_ASSERT(nCount == nPos, "something wents wrong");
+ OSL_ENSURE(nCount == nPos, "something wents wrong");
}
AccessibleRelation aRelation;
aRelation.RelationType = aRelationType;
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 1428756f1ff4..fdfe324930e8 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
-#include <tools/debug.hxx>
#include <editeng/brshitem.hxx>
#include <rtl/uuid.h>
#include <comphelper/sequence.hxx>
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 314fddb334c7..a706873ecf86 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -362,7 +362,7 @@ OUString SAL_CALL
if (!msName.getLength())
{
OUString sName(createAccessibleName());
- DBG_ASSERT(sName.getLength(), "We should give always a name.");
+ OSL_ENSURE(sName.getLength(), "We should give always a name.");
if (msName != sName)
{
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index b85aca92fa41..bfc48022f2b7 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -161,7 +161,7 @@ void ScAccessibleCsvControl::SendFocusEvent( bool bFocused )
void ScAccessibleCsvControl::SendCaretEvent()
{
- DBG_ERRORFILE( "ScAccessibleCsvControl::SendCaretEvent - Illegal call" );
+ OSL_FAIL( "ScAccessibleCsvControl::SendCaretEvent - Illegal call" );
}
void ScAccessibleCsvControl::SendVisibleEvent()
@@ -182,17 +182,17 @@ void ScAccessibleCsvControl::SendSelectionEvent()
void ScAccessibleCsvControl::SendTableUpdateEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */, bool /* bAllRows */ )
{
- DBG_ERRORFILE( "ScAccessibleCsvControl::SendTableUpdateEvent - Illegal call" );
+ OSL_FAIL( "ScAccessibleCsvControl::SendTableUpdateEvent - Illegal call" );
}
void ScAccessibleCsvControl::SendInsertColumnEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */ )
{
- DBG_ERRORFILE( "ScAccessibleCsvControl::SendInsertColumnEvent - Illegal call" );
+ OSL_FAIL( "ScAccessibleCsvControl::SendInsertColumnEvent - Illegal call" );
}
void ScAccessibleCsvControl::SendRemoveColumnEvent( sal_uInt32 /* nFirstColumn */, sal_uInt32 /* nLastColumn */ )
{
- DBG_ERRORFILE( "ScAccessibleCsvControl::SendRemoveColumnEvent - Illegal call" );
+ OSL_FAIL( "ScAccessibleCsvControl::SendRemoveColumnEvent - Illegal call" );
}
@@ -231,7 +231,7 @@ void ScAccessibleCsvControl::ensureAlive() const throw( DisposedException )
ScCsvControl& ScAccessibleCsvControl::implGetControl() const
{
- DBG_ASSERT( mpControl, "ScAccessibleCsvControl::implGetControl - missing control" );
+ OSL_ENSURE( mpControl, "ScAccessibleCsvControl::implGetControl - missing control" );
return *mpControl;
}
@@ -337,7 +337,7 @@ sal_Int32 lcl_GetRulerPos( sal_Int32 nApiPos )
/** Expands the sequence's size and returns the base index of the new inserted elements. */
inline sal_Int32 lcl_ExpandSequence( Sequence< PropertyValue >& rSeq, sal_Int32 nExp )
{
- DBG_ASSERT( nExp > 0, "lcl_ExpandSequence - invalid value" );
+ OSL_ENSURE( nExp > 0, "lcl_ExpandSequence - invalid value" );
rSeq.realloc( rSeq.getLength() + nExp );
return rSeq.getLength() - nExp;
}
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index f4915eee443d..d2bfe39c2ffd 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -39,7 +39,6 @@
#include <rtl/uuid.h>
#include <tools/gen.hxx>
#include <toolkit/helper/convert.hxx>
-#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -214,7 +213,7 @@ void ScAccessibleDataPilotControl::AddField(sal_Int32 nNewIndex)
}
else
{
- DBG_ERRORFILE("did not recognize a child count change");
+ OSL_FAIL("did not recognize a child count change");
}
if (bAdded)
@@ -255,7 +254,7 @@ void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
}
else
{
- DBG_ERRORFILE("did not recognize a child count change");
+ OSL_FAIL("did not recognize a child count change");
}
if (bRemoved)
@@ -274,7 +273,7 @@ void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
void ScAccessibleDataPilotControl::FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex)
{
- DBG_ASSERT(static_cast<sal_uInt32>(nOldIndex) < maChildren.size() &&
+ OSL_ENSURE(static_cast<sal_uInt32>(nOldIndex) < maChildren.size() &&
static_cast<sal_uInt32>(nNewIndex) < maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nOldIndex].xWeakAcc;
@@ -288,7 +287,7 @@ void ScAccessibleDataPilotControl::FieldFocusChange(sal_Int32 nOldIndex, sal_Int
void ScAccessibleDataPilotControl::FieldNameChange(sal_Int32 nIndex)
{
- DBG_ASSERT(static_cast<sal_uInt32>(nIndex) < maChildren.size(), "did not recognize a child count change");
+ OSL_ENSURE(static_cast<sal_uInt32>(nIndex) < maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
@@ -299,7 +298,7 @@ void ScAccessibleDataPilotControl::GotFocus()
{
if (mpDPFieldWindow)
{
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ OSL_ENSURE(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
sal_Int32 nIndex(mpDPFieldWindow->GetSelectedField());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
@@ -312,7 +311,7 @@ void ScAccessibleDataPilotControl::LostFocus()
{
if (mpDPFieldWindow)
{
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ OSL_ENSURE(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
sal_Int32 nIndex(mpDPFieldWindow->GetSelectedField());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
@@ -417,7 +416,7 @@ uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotControl::getAccessibl
if (nIndex < 0 || static_cast< size_t >( nIndex ) >= mpDPFieldWindow->GetFieldCount())
throw lang::IndexOutOfBoundsException();
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ OSL_ENSURE(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (!xTempAcc.is())
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index fe8ef7b9decf..00e6e97fdb24 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -52,7 +52,6 @@
#include <com/sun/star/drawing/XShapes.hpp>
#include <unotools/accessiblestatesethelper.hxx>
-#include <tools/debug.hxx>
#include <tools/gen.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdobj.hxx>
@@ -432,14 +431,14 @@ sal_Bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurr
sal_Bool bResult(false);
if (pCurrentChild && pReplacement)
{
- DBG_ASSERT(pCurrentChild->GetXShape().get() == pReplacement->GetXShape().get(), "XShape changes and should be inserted sorted");
+ OSL_ENSURE(pCurrentChild->GetXShape().get() == pReplacement->GetXShape().get(), "XShape changes and should be inserted sorted");
SortedShapes::iterator aItr;
FindShape(pCurrentChild->GetXShape(), aItr);
if (aItr != maZOrderedShapes.end() && (*aItr))
{
if ((*aItr)->pAccShape)
{
- DBG_ASSERT((*aItr)->pAccShape == pCurrentChild, "wrong child found");
+ OSL_ENSURE((*aItr)->pAccShape == pCurrentChild, "wrong child found");
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::CHILD;
aEvent.Source = uno::Reference< XAccessibleContext >(mpAccessibleDocument);
@@ -545,7 +544,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint)
}
else
{
- DBG_ERRORFILE("I should have an accessible shape now!");
+ OSL_FAIL("I should have an accessible shape now!");
}
}
else
@@ -573,7 +572,7 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
bResult = maZOrderedShapes[nIndex]->bSelected;
rShape = maZOrderedShapes[nIndex]->xShape;
-#ifdef DBG_UTIL // test whether it is truly selected by a slower method
+#if OSL_DEBUG_LEVEL > 0 // test whether it is truly selected by a slower method
uno::Reference< drawing::XShape > xReturnShape;
sal_Bool bDebugResult(false);
uno::Reference<container::XIndexAccess> xIndexAccess;
@@ -600,7 +599,7 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
}
}
}
- DBG_ASSERT((bResult == bDebugResult) && ((bResult && (rShape.get() == xReturnShape.get())) || !bResult), "found the wrong shape or result");
+ OSL_ENSURE((bResult == bDebugResult) && ((bResult && (rShape.get() == xReturnShape.get())) || !bResult), "found the wrong shape or result");
#endif
return bResult;
@@ -666,7 +665,7 @@ void ScChildrenShapes::DeselectAll()
}
catch (lang::IllegalArgumentException&)
{
- DBG_ERRORFILE("nothing selected before");
+ OSL_FAIL("nothing selected before");
bSomethingSelected = false;
}
@@ -796,7 +795,7 @@ void ScChildrenShapes::Deselect(sal_Int32 nChildIndex)
}
catch (lang::IllegalArgumentException&)
{
- DBG_ERRORFILE("something not selectable");
+ OSL_FAIL("something not selectable");
}
maZOrderedShapes[nChildIndex]->bSelected = false;
@@ -933,7 +932,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
}
else
{
- DBG_ERRORFILE("here is a selected shape which is not in the childlist");
+ OSL_FAIL("here is a selected shape which is not in the childlist");
++aXShapesItr;
--mnShapesSelected;
}
@@ -1095,7 +1094,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s
}
else
{
- DBG_ERRORFILE("shape is always in the list");
+ OSL_FAIL("shape is always in the list");
}
}
@@ -1126,7 +1125,7 @@ void ScChildrenShapes::RemoveShape(const uno::Reference<drawing::XShape>& xShape
}
else
{
- DBG_ERRORFILE("shape was not in internal list");
+ OSL_FAIL("shape was not in internal list");
}
}
@@ -1140,7 +1139,7 @@ sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xSha
if ((rItr != maZOrderedShapes.end()) && (*rItr != NULL) && ((*rItr)->xShape.get() == xShape.get()))
bResult = sal_True; // if the shape is found
-#ifdef DBG_UTIL // test whether it finds truly the correct shape (perhaps it is not really sorted)
+#if OSL_DEBUG_LEVEL > 0 // test whether it finds truly the correct shape (perhaps it is not really sorted)
SortedShapes::iterator aDebugItr = maZOrderedShapes.begin();
SortedShapes::iterator aEndItr = maZOrderedShapes.end();
sal_Bool bFound(false);
@@ -1152,7 +1151,7 @@ sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xSha
++aDebugItr;
}
sal_Bool bResult2 = (aDebugItr != maZOrderedShapes.end());
- DBG_ASSERT((bResult == bResult2) && ((bResult && (rItr == aDebugItr)) || !bResult), "wrong Shape found");
+ OSL_ENSURE((bResult == bResult2) && ((bResult && (rItr == aDebugItr)) || !bResult), "wrong Shape found");
#endif
return bResult;
}
@@ -1279,11 +1278,11 @@ void SAL_CALL ScAccessibleDocument::disposing( const lang::EventObject& /* Sourc
IMPL_LINK( ScAccessibleDocument, WindowChildEventListener, VclSimpleEvent*, pEvent )
{
- DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
+ OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
if ( pEvent && pEvent->ISA( VclWindowEvent ) )
{
VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
- DBG_ASSERT( pVclEvent->GetWindow(), "Window???" );
+ OSL_ENSURE( pVclEvent->GetWindow(), "Window???" );
switch ( pVclEvent->GetId() )
{
case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
@@ -1754,7 +1753,7 @@ uno::Reference<XAccessible > SAL_CALL
xAccessible = GetAccessibleSpreadsheet();
}
- DBG_ASSERT(xAccessible.is(), "here should always be an accessible object or a exception throwed");
+ OSL_ENSURE(xAccessible.is(), "here should always be an accessible object or a exception throwed");
return xAccessible;
}
@@ -2036,7 +2035,7 @@ sal_Bool ScAccessibleDocument::IsEditable(
void ScAccessibleDocument::AddChild(const uno::Reference<XAccessible>& xAcc, sal_Bool bFireEvent)
{
- DBG_ASSERT(!mxTempAcc.is(), "this object should be removed before");
+ OSL_ENSURE(!mxTempAcc.is(), "this object should be removed before");
if (xAcc.is())
{
mxTempAcc = xAcc;
@@ -2053,10 +2052,10 @@ void ScAccessibleDocument::AddChild(const uno::Reference<XAccessible>& xAcc, sal
void ScAccessibleDocument::RemoveChild(const uno::Reference<XAccessible>& xAcc, sal_Bool bFireEvent)
{
- DBG_ASSERT(mxTempAcc.is(), "this object should be added before");
+ OSL_ENSURE(mxTempAcc.is(), "this object should be added before");
if (xAcc.is())
{
- DBG_ASSERT(xAcc.get() == mxTempAcc.get(), "only the same object should be removed");
+ OSL_ENSURE(xAcc.get() == mxTempAcc.get(), "only the same object should be removed");
if( bFireEvent )
{
AccessibleEventObject aEvent;
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 9535e84e0da3..da3edacbb547 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -52,7 +52,6 @@
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <unotools/accessiblestatesethelper.hxx>
-#include <tools/debug.hxx>
#include <tools/gen.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdobj.hxx>
@@ -250,11 +249,11 @@ uno::Reference<XAccessible> ScNotesChilds::GetChild(sal_Int32 nIndex) const
ScAccNotes::iterator aItr = std::find_if(maMarks.begin(), aEndItr, aParaFound);
if (aItr != aEndItr)
{
- DBG_ASSERT((aItr->maNoteCell == maMarks[nIndex].maNoteCell) && (aItr->mbMarkNote == maMarks[nIndex].mbMarkNote), "wrong note found");
+ OSL_ENSURE((aItr->maNoteCell == maMarks[nIndex].maNoteCell) && (aItr->mbMarkNote == maMarks[nIndex].mbMarkNote), "wrong note found");
}
else
{
- DBG_ERRORFILE("wrong note found");
+ OSL_FAIL("wrong note found");
}
if (!aItr->mpTextHelper)
aItr->mpTextHelper = CreateTextHelper(maMarks[nIndex].maNoteText, maMarks[nIndex].maRect, maMarks[nIndex].maNoteCell, maMarks[nIndex].mbMarkNote, nIndex + mnOffset); // the marks are the first and every mark has only one paragraph
@@ -319,7 +318,7 @@ uno::Reference<XAccessible> ScNotesChilds::GetAt(const awt::Point& rPoint) const
sal_Int8 ScNotesChilds::CompareCell(const ScAddress& aCell1, const ScAddress& aCell2)
{
- DBG_ASSERT(aCell1.Tab() == aCell2.Tab(), "the notes should be on the same table");
+ OSL_ENSURE(aCell1.Tab() == aCell2.Tab(), "the notes should be on the same table");
sal_Int8 nResult(0);
if (aCell1 != aCell2)
{
@@ -384,7 +383,7 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
{
aNote.mpTextHelper->SetOffset(aNote.maRect.TopLeft());
aNote.mpTextHelper->UpdateChildren();
- //DBG_ASSERT(aItr->maRect.GetSize() == aNote.maRect.GetSize(), "size should be the same, because the text is not changed");
+ //OSL_ENSURE(aItr->maRect.GetSize() == aNote.maRect.GetSize(), "size should be the same, because the text is not changed");
// could be changed, because only a part of the note is visible
}
}
@@ -902,7 +901,7 @@ sal_Bool ScShapeChilds::ReplaceChild (::accessibility::AccessibleShape* /* pCurr
const long /* _nIndex */, const ::accessibility::AccessibleShapeTreeInfo& /* _rShapeTreeInfo */)
throw (uno::RuntimeException)
{
- DBG_ERRORFILE("should not be called in the page preview");
+ OSL_FAIL("should not be called in the page preview");
return false;
}
@@ -1102,7 +1101,7 @@ uno::Reference<XAccessible> ScShapeChilds::GetBackgroundShapeAt(const awt::Point
void ScShapeChilds::FillShapes(const Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId)
{
- DBG_ASSERT(nRangeId < maShapeRanges.size(), "this is not a valid range for draw objects");
+ OSL_ENSURE(nRangeId < maShapeRanges.size(), "this is not a valid range for draw objects");
SdrPage* pPage = GetDrawPage();
Window* pWin = mpViewShell->GetWindow();
if (pPage && pWin)
@@ -1158,7 +1157,7 @@ void ScShapeChilds::FillShapes(const Rectangle& aPixelPaintRect, const MapMode&
break;
default:
{
- DBG_ERRORFILE("I don't know this layer.");
+ OSL_FAIL("I don't know this layer.");
}
break;
}
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index d30cd246857e..12f943d0a273 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -40,7 +40,6 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <rtl/uuid.h>
-#include <tools/debug.hxx>
#include <svx/AccessibleTextHelper.hxx>
#include <editeng/editview.hxx>
#include <editeng/editeng.hxx>
@@ -244,7 +243,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
ScAccessibleEditObject::createAccessibleDescription(void)
throw (uno::RuntimeException)
{
-// DBG_ERRORFILE("Should never be called, because is set in the constructor.")
+// OSL_FAIL("Should never be called, because is set in the constructor.")
return rtl::OUString();
}
@@ -252,7 +251,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
ScAccessibleEditObject::createAccessibleName(void)
throw (uno::RuntimeException)
{
- DBG_ERRORFILE("Should never be called, because is set in the constructor.");
+ OSL_FAIL("Should never be called, because is set in the constructor.");
return rtl::OUString();
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 37eac80cec14..bce821d804b1 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -247,7 +247,7 @@ rtl::OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleDescription(v
sDesc = String(ScResId(STR_ACC_CENTERAREA_DESCR));
break;
default:
- DBG_ERRORFILE("wrong adjustment found");
+ OSL_FAIL("wrong adjustment found");
}
return sDesc;
@@ -269,7 +269,7 @@ rtl::OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleName(void)
sName = String(ScResId(STR_ACC_CENTERAREA_NAME));
break;
default:
- DBG_ERRORFILE("wrong adjustment found");
+ OSL_FAIL("wrong adjustment found");
}
return sName;
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 94f051df2d59..fedbefe5eccc 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
#include <rtl/uuid.h>
-#include <tools/debug.hxx>
#include <tools/gen.hxx>
#include <svtools/colorcfg.hxx>
#include <vcl/svapp.hxx>
@@ -308,7 +307,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
ScRange aRange(rRef.GetRange());
if ((nX < 0) || (nY < 0))
{
- DBG_ASSERT(!((nX < 0) && (nY < 0)), "should not be possible to remove row and column at the same time");
+ OSL_ENSURE(!((nX < 0) && (nY < 0)), "should not be possible to remove row and column at the same time");
nId = AccessibleTableModelChangeType::DELETE;
if (nX < 0)
{
@@ -323,7 +322,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
}
else if ((nX > 0) || (nY > 0))
{
- DBG_ASSERT(!((nX > 0) && (nY > 0)), "should not be possible to add row and column at the same time");
+ OSL_ENSURE(!((nX > 0) && (nY > 0)), "should not be possible to add row and column at the same time");
nId = AccessibleTableModelChangeType::INSERT;
if (nX < 0)
nY = aRange.aEnd.Row() - aRange.aStart.Row();
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 26b188e065ab..7a52155153bd 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -40,7 +40,6 @@
#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <rtl/uuid.h>
-#include <tools/debug.hxx>
#include <comphelper/sequence.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index ec40e71a06ca..d5bf043cd487 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -31,7 +31,6 @@
#include "DrawModelBroadcaster.hxx"
#include <svx/svdmodel.hxx>
#include <svx/unomod.hxx>
-#include <tools/debug.hxx>
#include <osl/diagnose.h>
using namespace ::com::sun::star;
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index dbfe52654470..367c10fe5b09 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -158,7 +158,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
{
uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel();
- DBG_ASSERT( xControlModel.is(), "uno control without model" );
+ OSL_ENSURE( xControlModel.is(), "uno control without model" );
if ( xControlModel.is() )
{
uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
@@ -434,7 +434,7 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF
// SdrExchangeView aView( pModel );
SdrView aView( pModel );
SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0));
- DBG_ASSERT( pPv, "pPv not there..." );
+ OSL_ENSURE( pPv, "pPv not there..." );
aView.MarkAllObj( pPv );
if ( nFormat == SOT_FORMAT_GDIMETAFILE )
bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( sal_True ), rFlavor );
@@ -504,7 +504,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
const SvxFontHeightItem& rDefaultFontHeight = (const SvxFontHeightItem&)rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT);
// SW should have no MasterPages
- DBG_ASSERT(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)");
+ OSL_ENSURE(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)");
for(sal_uInt16 a(0); a < pModel->GetPageCount(); a++)
{
@@ -665,7 +665,7 @@ void lcl_InitMarks( SdrMarkView& rDest, const SdrMarkView& rSource, SCTAB nTab )
{
rDest.ShowSdrPage(rDest.GetModel()->GetPage(nTab));
SdrPageView* pDestPV = rDest.GetSdrPageView();
- DBG_ASSERT(pDestPV,"PageView ?");
+ OSL_ENSURE(pDestPV,"PageView ?");
const SdrMarkList& rMarkList = rSource.GetMarkedObjectList();
sal_uLong nCount = rMarkList.GetMarkCount();
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 99ab6fa00c72..d90588608070 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1335,7 +1335,7 @@ void ScInputHandler::PasteManualTip()
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
- DBG_ASSERT( !aSel.nStartPara && !aSel.nEndPara, "Zuviele Absaetze in Formel" );
+ OSL_ENSURE( !aSel.nStartPara && !aSel.nEndPara, "Zuviele Absaetze in Formel" );
if ( !aSel.nStartPos ) // Selektion ab Anfang?
{
if ( aSel.nEndPos == pEngine->GetTextLen(0) )
@@ -1418,7 +1418,7 @@ void ScInputHandler::SkipClosingPar()
pTableView->SetSelection( aSel );
}
- DBG_ASSERT(nAutoPar, "SkipClosingPar: count is wrong");
+ OSL_ENSURE(nAutoPar, "SkipClosingPar: count is wrong");
--nAutoPar;
}
@@ -2002,7 +2002,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
void lcl_SetTopSelection( EditView* pEditView, ESelection& rSel )
{
- DBG_ASSERT( rSel.nStartPara==0 && rSel.nEndPara==0, "SetTopSelection: Para != 0" );
+ OSL_ENSURE( rSel.nStartPara==0 && rSel.nEndPara==0, "SetTopSelection: Para != 0" );
EditEngine* pEngine = pEditView->GetEditEngine();
sal_uInt16 nCount = pEngine->GetParagraphCount();
@@ -2851,7 +2851,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
{
// Referenz auf anderes Dokument
- DBG_ASSERT(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab");
+ OSL_ENSURE(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab");
String aTmp;
rRef.Format( aTmp, SCA_VALID|SCA_TAB_3D, pDoc, aAddrDetails ); // immer 3d
@@ -3728,7 +3728,7 @@ void ScInputHandler::InputReplaceSelection( const String& rStr )
if (!pRefViewSh)
pRefViewSh = pActiveViewSh;
- DBG_ASSERT(nFormSelEnd>=nFormSelStart,"Selektion kaputt...");
+ OSL_ENSURE(nFormSelEnd>=nFormSelStart,"Selektion kaputt...");
xub_StrLen nOldLen = nFormSelEnd-nFormSelStart;
xub_StrLen nNewLen = rStr.Len();
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 4238a92349b7..af08922d4828 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -159,7 +159,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
if ( pViewFrm )
pViewSh = PTR_CAST( ScTabViewShell, pViewFrm->GetViewShell() );
}
- DBG_ASSERT( pViewSh, "no view shell for input window" );
+ OSL_ENSURE( pViewSh, "no view shell for input window" );
// Positionsfenster, 3 Buttons, Eingabefenster
InsertWindow ( 1, &aWndPos, 0, 0 );
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 19942efed862..503f584a92c7 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -189,7 +189,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
ScModule::~ScModule()
{
- DBG_ASSERT( !pSelTransfer, "Selection Transfer object not deleted" );
+ OSL_ENSURE( !pSelTransfer, "Selection Transfer object not deleted" );
// InputHandler braucht nicht mehr geloescht zu werden (gibt keinen an der App mehr)
@@ -481,7 +481,7 @@ void ScModule::Execute( SfxRequest& rReq )
if (pReqArgs)
{
const SfxUInt16Item& rItem = (const SfxUInt16Item&)pReqArgs->Get(SID_PSZ_FUNCTION);
- DBG_ASSERT(rItem.ISA(SfxUInt16Item),"falscher Parameter");
+ OSL_ENSURE(rItem.ISA(SfxUInt16Item),"falscher Parameter");
ScAppOptions aNewOpts( GetAppOptions() );
aNewOpts.SetStatusFunc( rItem.GetValue() );
@@ -692,7 +692,7 @@ void ScModule::SetDragJump( ScDocument* pLocalDoc, const String& rTarget, const
void ScModule::SetClipObject( ScTransferObj* pCellObj, ScDrawTransferObj* pDrawObj )
{
- DBG_ASSERT( !pCellObj || !pDrawObj, "SetClipObject: not allowed to set both objects" );
+ OSL_ENSURE( !pCellObj || !pDrawObj, "SetClipObject: not allowed to set both objects" );
aClipData.pCellClipboard = pCellObj;
aClipData.pDrawClipboard = pDrawObj;
@@ -957,11 +957,11 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if (!pAppCfg)
GetAppOptions();
- DBG_ASSERT( pAppCfg, "AppOptions not initialised :-(" );
+ OSL_ENSURE( pAppCfg, "AppOptions not initialised :-(" );
if (!pInputCfg)
GetInputOptions();
- DBG_ASSERT( pInputCfg, "InputOptions not initialised :-(" );
+ OSL_ENSURE( pInputCfg, "InputOptions not initialised :-(" );
//--------------------------------------------------------------
@@ -1352,7 +1352,7 @@ ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, sal_Bool bUseRef
pHdl = pViewSh->GetInputHandler(); // Viewshell hat jetzt immer einen
// wenn keine ViewShell uebergeben oder aktiv, kann NULL herauskommen
- DBG_ASSERT( pHdl || !pViewSh, "GetInputHdl: kein InputHandler gefunden" );
+ OSL_ENSURE( pHdl || !pViewSh, "GetInputHdl: kein InputHandler gefunden" );
return pHdl;
}
@@ -1711,7 +1711,7 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc,
if( nCurRefDlgId )
{
SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId );
- DBG_ASSERT( pChildWnd, "NoChildWin" );
+ OSL_ENSURE( pChildWnd, "NoChildWin" );
if ( pChildWnd )
{
if ( nCurRefDlgId == SID_OPENDLG_CONSOLIDATE && pMarkData )
@@ -1751,7 +1751,7 @@ void ScModule::AddRefEntry() // "Mehrfachselektion"
if ( nCurRefDlgId )
{
SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId );
- DBG_ASSERT( pChildWnd, "NoChildWin" );
+ OSL_ENSURE( pChildWnd, "NoChildWin" );
if ( pChildWnd )
{
IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow());
@@ -1778,7 +1778,7 @@ void ScModule::EndReference()
if ( nCurRefDlgId )
{
SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId );
- DBG_ASSERT( pChildWnd, "NoChildWin" );
+ OSL_ENSURE( pChildWnd, "NoChildWin" );
if ( pChildWnd )
{
IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow());
@@ -1994,7 +1994,7 @@ SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const Sfx
{
SfxTabPage* pRet = NULL;
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
switch(nId)
{
case SID_SC_TP_LAYOUT:
@@ -2066,7 +2066,7 @@ SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const Sfx
}
}
- DBG_ASSERT( pRet, "ScModule::CreateTabPage(): no valid ID for TabPage!" );
+ OSL_ENSURE( pRet, "ScModule::CreateTabPage(): no valid ID for TabPage!" );
return pRet;
}
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index 7e9cbd9621a2..5eb294243165 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -64,7 +64,7 @@ sal_Bool lcl_IsURLButton( SdrObject* pObject )
if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
{
uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel();
- DBG_ASSERT( xControlModel.is(), "uno control without model" );
+ OSL_ENSURE( xControlModel.is(), "uno control without model" );
if ( xControlModel.is() )
{
uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
@@ -173,7 +173,7 @@ ScSelectionTransferObj::~ScSelectionTransferObj()
pScMod->SetSelectionTransfer( NULL );
}
- DBG_ASSERT( !pView, "ScSelectionTransferObj dtor: ForgetView not called" );
+ OSL_ENSURE( !pView, "ScSelectionTransferObj dtor: ForgetView not called" );
}
sal_Bool ScSelectionTransferObj::StillValid()
@@ -273,7 +273,7 @@ void ScSelectionTransferObj::AddSupportedFormats()
void ScSelectionTransferObj::CreateCellData()
{
- DBG_ASSERT( !pCellData, "CreateCellData twice" );
+ OSL_ENSURE( !pCellData, "CreateCellData twice" );
if ( pView )
{
ScViewData* pViewData = pView->GetViewData();
@@ -328,7 +328,7 @@ void ScSelectionTransferObj::CreateCellData()
delete pClipDoc;
}
}
- DBG_ASSERT( pCellData, "can't create CellData" );
+ OSL_ENSURE( pCellData, "can't create CellData" );
}
//! make static member of ScDrawView
@@ -336,7 +336,7 @@ extern void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_B
void ScSelectionTransferObj::CreateDrawData()
{
- DBG_ASSERT( !pDrawData, "CreateDrawData twice" );
+ OSL_ENSURE( !pDrawData, "CreateDrawData twice" );
if ( pView )
{
// similar to ScDrawView::BeginDrag
@@ -380,7 +380,7 @@ void ScSelectionTransferObj::CreateDrawData()
pDrawData->acquire(); // keep ref count up - released in ForgetView
}
}
- DBG_ASSERT( pDrawData, "can't create DrawData" );
+ OSL_ENSURE( pDrawData, "can't create DrawData" );
}
ScTransferObj* ScSelectionTransferObj::GetCellData()
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 0c8794acdd11..739bafe455a3 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -137,7 +137,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc
bUsedForLink( false ),
bUseInApi( false )
{
- DBG_ASSERT(pDoc->IsClipboard(), "wrong document");
+ OSL_ENSURE(pDoc->IsClipboard(), "wrong document");
//
// get aBlock from clipboard doc
@@ -168,7 +168,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc
nTab2 = i;
bFirst = false;
}
- DBG_ASSERT(!bFirst, "no sheet selected");
+ OSL_ENSURE(!bFirst, "no sheet selected");
// only limit to used cells if whole sheet was marked
// (so empty cell areas can be copied)
@@ -760,7 +760,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
if (!pDestDoc)
{
pDestDoc = pDoc;
- DBG_ASSERT(nSubX==0&&nSubY==0, "can't move within the document");
+ OSL_ENSURE(nSubX==0&&nSubY==0, "can't move within the document");
}
// In a clipboard doc the data don't have to be on the first sheet
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index d01efc5ee730..78e4e6710ca7 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -95,7 +95,7 @@ String ScInputStatusItem::GetValueText() const
int ScInputStatusItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
return ( (aStartPos == ((ScInputStatusItem&)rItem).aStartPos)
&& (aEndPos == ((ScInputStatusItem&)rItem).aEndPos)
@@ -205,7 +205,7 @@ String ScSortItem::GetValueText() const
int ScSortItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScSortItem& rOther = (const ScSortItem&)rItem;
@@ -299,7 +299,7 @@ String ScQueryItem::GetValueText() const
int ScQueryItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScQueryItem& rQueryItem = (const ScQueryItem&)rItem;
@@ -363,7 +363,7 @@ String ScSubTotalItem::GetValueText() const
int ScSubTotalItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScSubTotalItem& rSTItem = (const ScSubTotalItem&)rItem;
@@ -424,7 +424,7 @@ String ScUserListItem::GetValueText() const
int ScUserListItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScUserListItem& r = (const ScUserListItem&)rItem;
sal_Bool bEqual = false;
@@ -490,7 +490,7 @@ String ScConsolidateItem::GetValueText() const
int ScConsolidateItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScConsolidateItem& rCItem = (const ScConsolidateItem&)rItem;
@@ -529,7 +529,7 @@ ScPivotItem::ScPivotItem( const ScPivotItem& rItem ) :
aDestRange ( rItem.aDestRange ),
bNewSheet ( rItem.bNewSheet )
{
- DBG_ASSERT(rItem.pSaveData, "pSaveData");
+ OSL_ENSURE(rItem.pSaveData, "pSaveData");
pSaveData = new ScDPSaveData(*rItem.pSaveData);
}
@@ -551,10 +551,10 @@ String ScPivotItem::GetValueText() const
int ScPivotItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScPivotItem& rPItem = (const ScPivotItem&)rItem;
- DBG_ASSERT( pSaveData && rPItem.pSaveData, "pSaveData" );
+ OSL_ENSURE( pSaveData && rPItem.pSaveData, "pSaveData" );
return ( *pSaveData == *rPItem.pSaveData &&
aDestRange == rPItem.aDestRange &&
bNewSheet == rPItem.bNewSheet );
@@ -604,7 +604,7 @@ String ScSolveItem::GetValueText() const
int ScSolveItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScSolveItem& rPItem = (const ScSolveItem&)rItem;
@@ -654,7 +654,7 @@ String ScTabOpItem::GetValueText() const
int ScTabOpItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScTabOpItem& rPItem = (const ScTabOpItem&)rItem;
@@ -707,7 +707,7 @@ String ScCondFrmtItem::GetValueText() const
int ScCondFrmtItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
+ OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScCondFrmtItem& rPItem = (const ScCondFrmtItem&)rItem;
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 7095de34ce2f..122c8a57cfe4 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -66,32 +66,32 @@ ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP,
{
SvtCJKOptions aCJKOptions;
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
#if LAYOUT_SFX_TABDIALOG_BROKEN
AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 );
#else
String number(RTL_CONSTASCII_USTRINGPARAM("Numbers"));
AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, false, TAB_APPEND);
#endif
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_FONTEFF, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_ALIGNMENT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), 0 );
if ( aCJKOptions.IsAsianTypographyEnabled() )
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_ASIAN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), 0 );
}
else
RemoveTabPage( TP_ASIAN );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0 );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
AddTabPage( TP_PROTECTION, ScTabPageProtection::Create, 0 );
FreeResource();
@@ -122,7 +122,7 @@ void ScAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
const SfxPoolItem* pInfoItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST );
- DBG_ASSERT( pInfoItem, "FontListItem not found :-(" );
+ OSL_ENSURE( pInfoItem, "FontListItem not found :-(" );
aSet.Put (SvxFontListItem(((const SvxFontListItem*)pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST ));
rTabPage.PageCreated(aSet);
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 41f8a7939a47..5787dd2e3ec2 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -215,7 +215,7 @@ IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox )
bHidePrint = bOn;
else
{
- DBG_ERRORFILE("falscher Button");
+ OSL_FAIL("falscher Button");
}
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 575269c5a0ec..b6ab9126c871 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -77,7 +77,7 @@ void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId ));
- DBG_ASSERT( pBox ,"Control not found!" );
+ OSL_ENSURE( pBox ,"Control not found!" );
if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) )
{
@@ -88,10 +88,10 @@ void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
else
{
pBox->Enable();
- DBG_ASSERT( pState->ISA( SvxZoomSliderItem ), "invalid item type" );
+ OSL_ENSURE( pState->ISA( SvxZoomSliderItem ), "invalid item type" );
const SvxZoomSliderItem* pZoomSliderItem = dynamic_cast< const SvxZoomSliderItem* >( pState );
- DBG_ASSERT( pZoomSliderItem, "Sc::ScZoomSliderControl::StateChanged(), wrong item type!" );
+ OSL_ENSURE( pZoomSliderItem, "Sc::ScZoomSliderControl::StateChanged(), wrong item type!" );
if( pZoomSliderItem )
pBox->UpdateFromItem( pZoomSliderItem );
}
@@ -380,7 +380,7 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem )
mpImpl->mnMinZoom = pZoomSliderItem->GetMinZoom();
mpImpl->mnMaxZoom = pZoomSliderItem->GetMaxZoom();
- DBG_ASSERT( mpImpl->mnMinZoom <= mpImpl->mnCurrentZoom &&
+ OSL_ENSURE( mpImpl->mnMinZoom <= mpImpl->mnCurrentZoom &&
mpImpl->mnMinZoom < mpImpl->mnSliderCenter &&
mpImpl->mnMaxZoom >= mpImpl->mnCurrentZoom &&
mpImpl->mnMaxZoom > mpImpl->mnSliderCenter,
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index c0b9305ba3ee..f328b0a67e3d 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -36,7 +36,6 @@
#include "impex.hxx"
#include "asciiopt.hxx"
#include "asciiopt.hrc"
-#include <tools/debug.hxx>
#include <rtl/tencinfo.h>
#include <unotools/transliterationwrapper.hxx>
// ause
@@ -181,7 +180,7 @@ sal_Bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const
nStartRow == rCmp.nStartRow &&
nInfoCount == rCmp.nInfoCount )
{
- DBG_ASSERT( !nInfoCount || (pColStart && pColFormat && rCmp.pColStart && rCmp.pColFormat),
+ OSL_ENSURE( !nInfoCount || (pColStart && pColFormat && rCmp.pColStart && rCmp.pColFormat),
"0-Zeiger in ScAsciiOptions" );
for (sal_uInt16 i=0; i<nInfoCount; i++)
if ( pColStart[i] != rCmp.pColStart[i] ||
@@ -378,7 +377,7 @@ String ScAsciiOptions::WriteToString() const
// Spalten-Infos
//
- DBG_ASSERT( !nInfoCount || (pColStart && pColFormat), "0-Zeiger in ScAsciiOptions" );
+ OSL_ENSURE( !nInfoCount || (pColStart && pColFormat), "0-Zeiger in ScAsciiOptions" );
for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++)
{
if (nInfo)
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 1c3ebb70c35e..d9ce7abe86f9 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -153,7 +153,7 @@ ScConsolidateDlg::~ScConsolidateDlg()
void ScConsolidateDlg::Init()
{
- DBG_ASSERT( pViewData && pDoc && pRangeUtil, "Error in Ctor" );
+ OSL_ENSURE( pViewData && pDoc && pRangeUtil, "Error in Ctor" );
String aStr;
sal_uInt16 i=0;
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 3455fa72c1fd..4e7d0be3e2d9 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -32,7 +32,6 @@
// ============================================================================
#include "csvcontrol.hxx"
-#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
#include "AccessibleCsvControl.hxx"
@@ -181,7 +180,7 @@ void ScCsvControl::DisableRepaint()
void ScCsvControl::EnableRepaint( bool bInvalidate )
{
- DBG_ASSERT( IsNoRepaint(), "ScCsvControl::EnableRepaint - invalid call" );
+ OSL_ENSURE( IsNoRepaint(), "ScCsvControl::EnableRepaint - invalid call" );
--mrData.mnNoRepaint;
Repaint( bInvalidate );
}
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 15a0eb4e10cd..246020e6b951 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -500,7 +500,7 @@ void ScCsvGrid::SetSelColumnType( sal_Int32 nType )
void ScCsvGrid::SetTypeNames( const StringVec& rTypeNames )
{
- DBG_ASSERT( !rTypeNames.empty(), "ScCsvGrid::SetTypeNames - vector is empty" );
+ OSL_ENSURE( !rTypeNames.empty(), "ScCsvGrid::SetTypeNames - vector is empty" );
maTypeNames = rTypeNames;
Repaint( true );
diff --git a/sc/source/ui/dbgui/csvsplits.cxx b/sc/source/ui/dbgui/csvsplits.cxx
index 5215f3f9a799..b6140ffcb0d4 100644
--- a/sc/source/ui/dbgui/csvsplits.cxx
+++ b/sc/source/ui/dbgui/csvsplits.cxx
@@ -32,7 +32,6 @@
// ============================================================================
#include "csvsplits.hxx"
-#include <tools/debug.hxx>
#include <algorithm>
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 9972ae6f364a..b96e3dc65799 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -32,7 +32,6 @@
// ============================================================================
#include "csvtablebox.hxx"
-#include <tools/debug.hxx>
#include <vcl/lstbox.hxx>
// ause
@@ -250,7 +249,7 @@ void ScCsvTableBox::DataChanged( const DataChangedEvent& rDCEvt )
IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl )
{
- DBG_ASSERT( pCtrl, "ScCsvTableBox::CsvCmdHdl - missing sender" );
+ OSL_ENSURE( pCtrl, "ScCsvTableBox::CsvCmdHdl - missing sender" );
const ScCsvCmd& rCmd = pCtrl->GetCmd();
ScCsvCmdType eType = rCmd.GetType();
@@ -302,7 +301,7 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl )
break;
case CSVCMD_INSERTSPLIT:
- DBG_ASSERT( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::InsertSplit - invalid call" );
+ OSL_ENSURE( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::InsertSplit - invalid call" );
if( maRuler.GetSplitCount() + 1 < sal::static_int_cast<sal_uInt32>(CSV_MAXCOLCOUNT) )
{
maRuler.InsertSplit( nParam1 );
@@ -310,7 +309,7 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl )
}
break;
case CSVCMD_REMOVESPLIT:
- DBG_ASSERT( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::RemoveSplit - invalid call" );
+ OSL_ENSURE( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::RemoveSplit - invalid call" );
maRuler.RemoveSplit( nParam1 );
maGrid.RemoveSplit( nParam1 );
break;
@@ -318,12 +317,12 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl )
Execute( maRuler.HasSplit( nParam1 ) ? CSVCMD_REMOVESPLIT : CSVCMD_INSERTSPLIT, nParam1 );
break;
case CSVCMD_MOVESPLIT:
- DBG_ASSERT( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::MoveSplit - invalid call" );
+ OSL_ENSURE( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::MoveSplit - invalid call" );
maRuler.MoveSplit( nParam1, nParam2 );
maGrid.MoveSplit( nParam1, nParam2 );
break;
case CSVCMD_REMOVEALLSPLITS:
- DBG_ASSERT( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::RemoveAllSplits - invalid call" );
+ OSL_ENSURE( mbFixedMode, "ScCsvTableBox::CsvCmdHdl::RemoveAllSplits - invalid call" );
maRuler.RemoveAllSplits();
maGrid.RemoveAllSplits();
break;
@@ -391,7 +390,7 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl )
IMPL_LINK( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar )
{
- DBG_ASSERT( pScrollBar, "ScCsvTableBox::ScrollHdl - missing sender" );
+ OSL_ENSURE( pScrollBar, "ScCsvTableBox::ScrollHdl - missing sender" );
if( pScrollBar == &maHScroll )
Execute( CSVCMD_SETPOSOFFSET, pScrollBar->GetThumbPos() );
@@ -403,7 +402,7 @@ IMPL_LINK( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar )
IMPL_LINK( ScCsvTableBox, ScrollEndHdl, ScrollBar*, pScrollBar )
{
- DBG_ASSERT( pScrollBar, "ScCsvTableBox::ScrollEndHdl - missing sender" );
+ OSL_ENSURE( pScrollBar, "ScCsvTableBox::ScrollEndHdl - missing sender" );
if( pScrollBar == &maHScroll )
{
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index c73d701a6eb9..77b931738cb0 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -35,7 +35,6 @@
//------------------------------------------------------------------
-#include <tools/debug.hxx>
#include <vcl/waitobj.hxx>
#include <comphelper/processfactory.hxx>
@@ -221,7 +220,7 @@ void ScDataPilotDatabaseDlg::FillObjects()
catch(uno::Exception&)
{
// this may happen if an invalid database is selected -> no DBG_ERROR
- DBG_WARNING("exception in database");
+ OSL_FAIL("exception in database");
}
}
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 412d10ceebb8..7b12b2b16672 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -34,7 +34,6 @@
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/help.hxx>
-#include <tools/debug.hxx>
#include "fieldwnd.hxx"
#include "pvlaydlg.hxx"
@@ -114,7 +113,7 @@ bool ScDPFieldControlBase::IsExistingIndex( size_t nIndex ) const
void ScDPFieldControlBase::AddField( const String& rText, size_t nNewIndex )
{
- DBG_ASSERT( nNewIndex == maFieldNames.size(), "ScDPFieldWindow::AddField - invalid index" );
+ OSL_ENSURE( nNewIndex == maFieldNames.size(), "ScDPFieldWindow::AddField - invalid index" );
if( IsValidIndex( nNewIndex ) )
{
maFieldNames.push_back( FieldName( rText, true ) );
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 09ca2a5006cf..d05f2d23c313 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -541,7 +541,7 @@ void ScFilterDlg::UpdateValueList( sal_uInt16 nList )
if ( pEntryLists[nColumn]->Insert( pNewEntry ) )
{
nHeaderPos[nColumn] = pEntryLists[nColumn]->IndexOf( pNewEntry );
- DBG_ASSERT( nHeaderPos[nColumn] != USHRT_MAX,
+ OSL_ENSURE( nHeaderPos[nColumn] != USHRT_MAX,
"Header-Eintrag nicht wiedergefunden" );
}
else
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index e01b96a2b300..74b4f419782c 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -112,7 +112,7 @@ ScFilterOptionsMgr::~ScFilterOptionsMgr()
void ScFilterOptionsMgr::Init()
{
//moggi:TODO
- DBG_ASSERT( pViewData && pDoc, "Init failed :-/" );
+ OSL_ENSURE( pViewData && pDoc, "Init failed :-/" );
rLbCopyPos.SetSelectHdl ( LINK( this, ScFilterOptionsMgr, LbPosSelHdl ) );
rEdCopyPos.SetModifyHdl ( LINK( this, ScFilterOptionsMgr, EdPosModifyHdl ) );
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 8c526b1c5300..c8f4f475486d 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -192,7 +192,7 @@ sal_uInt16 ScDPFunctionListBox::GetSelection() const
void ScDPFunctionListBox::FillFunctionNames()
{
- DBG_ASSERT( !GetEntryCount(), "ScDPFunctionListBox::FillFunctionNames - do not add texts to resource" );
+ OSL_ENSURE( !GetEntryCount(), "ScDPFunctionListBox::FillFunctionNames - do not add texts to resource" );
Clear();
ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) );
for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIndex < nCount; ++nIndex )
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index fa063bcf7ab8..c54fae194d1c 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -171,7 +171,7 @@ ScDPLayoutDlg::~ScDPLayoutDlg()
void ScDPLayoutDlg::Init(bool bNewOutput)
{
- DBG_ASSERT( pViewData && pDoc,
+ OSL_ENSURE( pViewData && pDoc,
"Ctor-Initialisierung fehlgeschlagen!" );
aBtnRemove.SetClickHdl( LINK( this, ScDPLayoutDlg, ClickHdl ) );
@@ -391,7 +391,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
{
// data field - we need to concatenate function name with the field name.
ScDPLabelData* pData = GetLabelData(nCol);
- DBG_ASSERT( pData, "ScDPLabelData not found" );
+ OSL_ENSURE( pData, "ScDPLabelData not found" );
if (pData)
{
OUString aStr = pData->maLayoutName;
@@ -1000,7 +1000,7 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
if( ScDPLabelData* pData = GetLabelData( (*pArr)[nFieldIndex]->mnCol, &nArrPos ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
switch ( eType )
{
@@ -1214,7 +1214,7 @@ ScDPLabelData* ScDPLayoutDlg::GetLabelData( SCsCOL nCol, size_t* pnPos )
String ScDPLayoutDlg::GetLabelString( SCsCOL nCol )
{
ScDPLabelData* pData = GetLabelData( nCol );
- DBG_ASSERT( pData, "LabelData not found" );
+ OSL_ENSURE( pData, "LabelData not found" );
if (pData)
return pData->getDisplayName();
return String();
@@ -1226,7 +1226,7 @@ bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType )
{
bool bAllowed = true;
ScDPLabelData* pData = GetLabelData( nCol );
- DBG_ASSERT( pData, "LabelData not found" );
+ OSL_ENSURE( pData, "LabelData not found" );
if (pData)
{
sheet::DataPilotFieldOrientation eOrient = sheet::DataPilotFieldOrientation_HIDDEN;
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 743fb1044a91..12e85aa1cf58 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -36,7 +36,6 @@
#include "impex.hxx"
#include "scuiasciiopt.hxx"
#include "asciiopt.hrc"
-#include <tools/debug.hxx>
#include <rtl/tencinfo.h>
#include <unotools/transliterationwrapper.hxx>
// ause
@@ -608,7 +607,7 @@ void ScImportAsciiDlg::UpdateVertical()
IMPL_LINK( ScImportAsciiDlg, RbSepFixHdl, RadioButton*, pButton )
{
- DBG_ASSERT( pButton, "ScImportAsciiDlg::RbSepFixHdl - missing sender" );
+ OSL_ENSURE( pButton, "ScImportAsciiDlg::RbSepFixHdl - missing sender" );
if( (pButton == &aRbFixed) || (pButton == &aRbSeparated) )
{
@@ -626,8 +625,8 @@ IMPL_LINK( ScImportAsciiDlg, RbSepFixHdl, RadioButton*, pButton )
IMPL_LINK( ScImportAsciiDlg, SeparatorHdl, Control*, pCtrl )
{
- DBG_ASSERT( pCtrl, "ScImportAsciiDlg::SeparatorHdl - missing sender" );
- DBG_ASSERT( !aRbFixed.IsChecked(), "ScImportAsciiDlg::SeparatorHdl - not allowed in fixed width" );
+ OSL_ENSURE( pCtrl, "ScImportAsciiDlg::SeparatorHdl - missing sender" );
+ OSL_ENSURE( !aRbFixed.IsChecked(), "ScImportAsciiDlg::SeparatorHdl - not allowed in fixed width" );
/* #i41550# First update state of the controls. The GetSeparators()
function needs final state of the check boxes. */
@@ -651,7 +650,7 @@ IMPL_LINK( ScImportAsciiDlg, SeparatorHdl, Control*, pCtrl )
IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox )
{
- DBG_ASSERT( pCharSetBox, "ScImportAsciiDlg::CharSetHdl - missing sender" );
+ OSL_ENSURE( pCharSetBox, "ScImportAsciiDlg::CharSetHdl - missing sender" );
if( (pCharSetBox == &aLbCharSet) && (pCharSetBox->GetSelectEntryCount() == 1) )
{
@@ -670,14 +669,14 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox )
IMPL_LINK( ScImportAsciiDlg, FirstRowHdl, NumericField*, pNumField )
{
- DBG_ASSERT( pNumField, "ScImportAsciiDlg::FirstRowHdl - missing sender" );
+ OSL_ENSURE( pNumField, "ScImportAsciiDlg::FirstRowHdl - missing sender" );
maTableBox.Execute( CSVCMD_SETFIRSTIMPORTLINE, sal::static_int_cast<sal_Int32>( pNumField->GetValue() - 1 ) );
return 0;
}
IMPL_LINK( ScImportAsciiDlg, LbColTypeHdl, ListBox*, pListBox )
{
- DBG_ASSERT( pListBox, "ScImportAsciiDlg::LbColTypeHdl - missing sender" );
+ OSL_ENSURE( pListBox, "ScImportAsciiDlg::LbColTypeHdl - missing sender" );
if( pListBox == &aLbType )
maTableBox.Execute( CSVCMD_SETCOLUMNTYPE, pListBox->GetSelectEntryPos() );
return 0;
@@ -712,7 +711,7 @@ IMPL_LINK( ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox*, EMPTYARG )
IMPL_LINK( ScImportAsciiDlg, ColTypeHdl, ScCsvTableBox*, pTableBox )
{
- DBG_ASSERT( pTableBox, "ScImportAsciiDlg::ColTypeHdl - missing sender" );
+ OSL_ENSURE( pTableBox, "ScImportAsciiDlg::ColTypeHdl - missing sender" );
sal_Int32 nType = pTableBox->GetSelColumnType();
sal_Int32 nTypeCount = aLbType.GetEntryCount();
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index a9e6f34c9aa7..e50f91df3d1d 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -307,7 +307,7 @@ sal_Bool ScSpecialFilterDlg::IsRefInputMode() const
IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
{
- DBG_ASSERT( pDoc && pViewData, "Document or ViewData not found. :-/" );
+ OSL_ENSURE( pDoc && pViewData, "Document or ViewData not found. :-/" );
if ( (pBtn == &aBtnOk) && pDoc && pViewData )
{
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 953c7e946e73..82a740328049 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -149,7 +149,7 @@ void ScTabPageSortFields::Init()
pViewData = rSortItem.GetViewData();
- DBG_ASSERT( pViewData, "ViewData not found!" );
+ OSL_ENSURE( pViewData, "ViewData not found!" );
nFieldArr[0] = 0;
nFirstCol = 0;
@@ -276,7 +276,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
sal_uInt16 nSort2Pos = aLbSort2.GetSelectEntryPos();
sal_uInt16 nSort3Pos = aLbSort3.GetSelectEntryPos();
- DBG_ASSERT( (nSort1Pos <= SC_MAXFIELDS)
+ OSL_ENSURE( (nSort1Pos <= SC_MAXFIELDS)
&& (nSort2Pos <= SC_MAXFIELDS)
&& (nSort3Pos <= SC_MAXFIELDS),
"Array-Range Fehler!" );
@@ -641,7 +641,7 @@ void ScTabPageSortOptions::Init()
pViewData = rSortItem.GetViewData();
pDoc = pViewData ? pViewData->GetDocument() : NULL;
- DBG_ASSERT( pViewData, "ViewData not found! :-/" );
+ OSL_ENSURE( pViewData, "ViewData not found! :-/" );
if ( pViewData && pDoc )
{
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index ee7e31f72e67..5944ac4edbd0 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -100,7 +100,7 @@ ScTpSubTotalGroup::~ScTpSubTotalGroup()
for ( sal_uInt16 i=0; i<nCount; i++ )
{
pData = (sal_uInt16*)(aLbColumns.GetEntryData( i ));
- DBG_ASSERT( pData, "EntryData not found" );
+ OSL_ENSURE( pData, "EntryData not found" );
delete pData;
}
@@ -117,7 +117,7 @@ void ScTpSubTotalGroup::Init()
pViewData = rSubTotalItem.GetViewData();
pDoc = ( pViewData ) ? pViewData->GetDocument() : NULL;
- DBG_ASSERT( pViewData && pDoc, "ViewData or Document not found :-(" );
+ OSL_ENSURE( pViewData && pDoc, "ViewData or Document not found :-(" );
aLbGroup.SetSelectHdl ( LINK( this, ScTpSubTotalGroup, SelectHdl ) );
aLbColumns.SetSelectHdl ( LINK( this, ScTpSubTotalGroup, SelectHdl ) );
@@ -142,7 +142,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
{
sal_uInt16 nGroupIdx = 0;
- DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
+ OSL_ENSURE( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
if ( (nGroupNo > 3) || (nGroupNo == 0) )
return false;
@@ -204,8 +204,8 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
{
sal_uInt16 nGroupIdx = 0;
- DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
- DBG_ASSERT( (aLbGroup.GetEntryCount() > 0)
+ OSL_ENSURE( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
+ OSL_ENSURE( (aLbGroup.GetEntryCount() > 0)
&& (aLbColumns.GetEntryCount() > 0)
&& (aLbFunctions.GetEntryCount() > 0),
"Non-initialized Lists" );
@@ -258,7 +258,7 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
{
if ( aLbColumns.IsChecked( i ) )
{
- DBG_ASSERT( nCheck <= nCheckCount,
+ OSL_ENSURE( nCheck <= nCheckCount,
"Range error :-(" );
nFunction = *((sal_uInt16*)aLbColumns.GetEntryData( i ));
pSubTotals[nCheck] = nFieldArr[i];
@@ -285,7 +285,7 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
void ScTpSubTotalGroup::FillListBoxes()
{
- DBG_ASSERT( pViewData && pDoc, "ViewData or Document not found :-/" );
+ OSL_ENSURE( pViewData && pDoc, "ViewData or Document not found :-/" );
if ( pViewData && pDoc )
{
@@ -402,7 +402,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb )
sal_uInt16 nColumn = aLbColumns.GetSelectEntryPos();
sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nColumn );
- DBG_ASSERT( pFunction, "EntryData nicht gefunden!" );
+ OSL_ENSURE( pFunction, "EntryData nicht gefunden!" );
if ( !pFunction )
return 0;
@@ -535,7 +535,7 @@ void ScTpSubTotalOptions::Init()
pViewData = rSubTotalItem.GetViewData();
pDoc = ( pViewData ) ? pViewData->GetDocument() : NULL;
- DBG_ASSERT( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
+ OSL_ENSURE( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
aBtnSort.SetClickHdl ( LINK( this, ScTpSubTotalOptions, CheckHdl ) );
aBtnUserDef.SetClickHdl ( LINK( this, ScTpSubTotalOptions, CheckHdl ) );
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index fdfe24ba26e0..deafffa06116 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -194,7 +194,7 @@ sal_uInt16 lclGetPosFromValMode( ScValidationMode eValMode )
case SC_VALID_TEXTLEN: nLbPos = SC_VALIDDLG_ALLOW_TEXTLEN; break;
case SC_VALID_LIST: nLbPos = SC_VALIDDLG_ALLOW_RANGE; break;
case SC_VALID_CUSTOM: nLbPos = SC_VALIDDLG_ALLOW_ANY; break; // not supported
- default: DBG_ERRORFILE( "lclGetPosFromValMode - unknown validity mode" );
+ default: OSL_FAIL( "lclGetPosFromValMode - unknown validity mode" );
}
return nLbPos;
}
@@ -213,7 +213,7 @@ ScValidationMode lclGetValModeFromPos( sal_uInt16 nLbPos )
case SC_VALIDDLG_ALLOW_RANGE: eValMode = SC_VALID_LIST; break;
case SC_VALIDDLG_ALLOW_LIST: eValMode = SC_VALID_LIST; break;
case SC_VALIDDLG_ALLOW_TEXTLEN: eValMode = SC_VALID_TEXTLEN; break;
- default: DBG_ERRORFILE( "lclGetValModeFromPos - invalid list box position" );
+ default: OSL_FAIL( "lclGetValModeFromPos - invalid list box position" );
}
return eValMode;
}
@@ -233,7 +233,7 @@ sal_uInt16 lclGetPosFromCondMode( ScConditionMode eCondMode )
case SC_COND_NOTEQUAL: nLbPos = SC_VALIDDLG_DATA_NOTEQUAL; break;
case SC_COND_BETWEEN: nLbPos = SC_VALIDDLG_DATA_BETWEEN; break;
case SC_COND_NOTBETWEEN: nLbPos = SC_VALIDDLG_DATA_NOTBETWEEN; break;
- default: DBG_ERRORFILE( "lclGetPosFromCondMode - unknown condition mode" );
+ default: OSL_FAIL( "lclGetPosFromCondMode - unknown condition mode" );
}
return nLbPos;
}
@@ -252,7 +252,7 @@ ScConditionMode lclGetCondModeFromPos( sal_uInt16 nLbPos )
case SC_VALIDDLG_DATA_NOTEQUAL: eCondMode = SC_COND_NOTEQUAL; break;
case SC_VALIDDLG_DATA_BETWEEN: eCondMode = SC_COND_BETWEEN; break;
case SC_VALIDDLG_DATA_NOTBETWEEN: eCondMode = SC_COND_NOTBETWEEN; break;
- default: DBG_ERRORFILE( "lclGetCondModeFromPos - invalid list box position" );
+ default: OSL_FAIL( "lclGetCondModeFromPos - invalid list box position" );
}
return eCondMode;
}
@@ -340,7 +340,7 @@ ScTPValidationValue::ScTPValidationValue( Window* pParent, const SfxItemSet& rAr
// list separator in formulas
String aListSep = ::ScCompiler::GetNativeSymbol( ocSep );
- DBG_ASSERT( aListSep.Len() == 1, "ScTPValidationValue::ScTPValidationValue - list separator error" );
+ OSL_ENSURE( aListSep.Len() == 1, "ScTPValidationValue::ScTPValidationValue - list separator error" );
mcFmlaSep = aListSep.Len() ? aListSep.GetChar( 0 ) : ';';
m_btnRef.Hide(); // cell range picker
}
@@ -644,7 +644,7 @@ IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG )
case SC_VALIDDLG_DATA_EQGREATER: maFtMin.SetText( maStrMin ); break;
default:
- DBG_ERRORFILE( "ScTPValidationValue::SelectHdl - unknown condition mode" );
+ OSL_FAIL( "ScTPValidationValue::SelectHdl - unknown condition mode" );
}
}
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 3ce2236bb4ad..a028a5129b70 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -90,7 +90,7 @@ ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile,
bInCreate (false),
bDoInsert (true)
{
- DBG_ASSERT(pShell->ISA(ScDocShell), "ScAreaLink mit falscher ObjectShell");
+ OSL_ENSURE(pShell->ISA(ScDocShell), "ScAreaLink mit falscher ObjectShell");
pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell );
SetRefreshHandler( LINK( this, ScAreaLink, RefreshHdl ) );
SetRefreshControl( pImpl->m_pDocSh->GetDocument()->GetRefreshTimerControlAddress() );
@@ -109,10 +109,10 @@ void ScAreaLink::Edit(Window* pParent, const Link& /* rEndEditHdl */ )
// ein Optionen-Dialog kommt...
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScLinkedAreaDlg* pDlg = pFact->CreateScLinkedAreaDlg( pParent, RID_SCDLG_LINKAREA);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, GetRefreshDelay() );
pImpl->m_pDialog = pDlg;
pDlg->StartExecuteModal( LINK( this, ScAreaLink, AreaEndEditHdl ) );
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index bfb7c8f3c9a1..a1f70a138137 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -115,7 +115,7 @@ void ScAutoStyleList::AddEntry( sal_uLong nTimeout, const ScRange& rRange, const
if (!aEntries.empty() && nNow != nTimerStart)
{
- DBG_ASSERT(nNow>nTimerStart, "Zeit laeuft rueckwaerts?");
+ OSL_ENSURE(nNow>nTimerStart, "Zeit laeuft rueckwaerts?");
AdjustEntries((nNow-nTimerStart)*1000);
}
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index afe4a6ac2633..750810c08a50 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -903,7 +903,7 @@ sal_Bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
const ScPatternAttr* pSrcPattern = pAttribDoc->GetPattern(
nCol, nAttrRow, nDestTab );
- DBG_ASSERT(pSrcPattern,"Pattern ist 0");
+ OSL_ENSURE(pSrcPattern,"Pattern ist 0");
if (pSrcPattern)
{
pDoc->ApplyPatternAreaTab( nCol, nAttrRow, nCol, aLocalParam.nRow2,
@@ -1286,7 +1286,7 @@ sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pN
pNewObj->WriteSourceDataTo( *pOldObj ); // copy source data
ScDPSaveData* pData = pNewObj->GetSaveData();
- DBG_ASSERT( pData, "no SaveData from living DPObject" );
+ OSL_ENSURE( pData, "no SaveData from living DPObject" );
if ( pData )
pOldObj->SetSaveData( *pData ); // copy SaveData
}
@@ -1348,7 +1348,7 @@ sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pN
if ( bOverflow )
{
// like with STR_PROTECTIONERR, use undo to reverse everything
- DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
+ OSL_ENSURE( bRecord, "DataPilotUpdate: can't undo" );
bUndoSelf = sal_True;
nErrId = STR_PIVOT_ERROR;
}
@@ -1362,7 +1362,7 @@ sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pN
// quick solution: proceed to end, use undo action
// to reverse everything:
- DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
+ OSL_ENSURE( bRecord, "DataPilotUpdate: can't undo" );
bUndoSelf = sal_True;
nErrId = aTester.GetMessageId();
}
@@ -1386,7 +1386,7 @@ sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pN
if (aBox.Execute() == RET_NO)
{
//! like above (not editable), use undo to reverse everything
- DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
+ OSL_ENSURE( bRecord, "DataPilotUpdate: can't undo" );
bUndoSelf = sal_True;
}
}
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index bdc22acb9ae3..1fb2bd39b6ab 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -36,7 +36,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <vcl/msgbox.hxx>
-#include <tools/debug.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <sfx2/viewfrm.hxx>
@@ -191,7 +190,7 @@ bool ScDBDocFunc::DoImportUno( const ScAddress& rPos,
//! merge this with SID_SBA_IMPORT execute in docsh4.cxx
ScDBData* pDBData = rDocShell.GetDBData( ScRange(rPos), SC_DB_IMPORT, SC_DBSEL_KEEP );
- DBG_ASSERT(pDBData, "can't create DB data");
+ OSL_ENSURE(pDBData, "can't create DB data");
String sTarget = pDBData->GetName();
//! change UpdateImport to use only one of rTableName, rStatement
@@ -291,7 +290,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_ROWSET )) ),
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY );
- DBG_ASSERT( xRowProp.is(), "can't get RowSet" );
+ OSL_ENSURE( xRowProp.is(), "can't get RowSet" );
if ( xRowProp.is() )
{
//
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2f04f83934a9..e4b020d7848f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2650,7 +2650,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
{
SfxObjectShell& rDocSh = *rDoc.GetDocumentShell();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
- DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
+ OSL_ENSURE( xLibContainer.is(), "No BasicContainer!" );
uno::Reference< container::XNameContainer > xLib;
if( xLibContainer.is() )
@@ -2696,7 +2696,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
{
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
- DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
+ OSL_ENSURE( xLibContainer.is(), "No BasicContainer!" );
uno::Reference< container::XNameContainer > xLib;
if( xLibContainer.is() )
@@ -3421,7 +3421,7 @@ void ScDocFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect )
if (pDoc->IsUndoEnabled())
{
ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
- DBG_ASSERT(pProtect, "ScDocFunc::Unprotect: ScTableProtection pointer is NULL!");
+ OSL_ENSURE(pProtect, "ScDocFunc::Unprotect: ScTableProtection pointer is NULL!");
if (pProtect)
{
::std::auto_ptr<ScTableProtection> p(new ScTableProtection(*pProtect));
@@ -3451,7 +3451,7 @@ sal_Bool ScDocFunc::Protect( SCTAB nTab, const String& rPassword, sal_Bool /*bAp
if (pDoc->IsUndoEnabled())
{
ScDocProtection* pProtect = pDoc->GetDocProtection();
- DBG_ASSERT(pProtect, "ScDocFunc::Unprotect: ScDocProtection pointer is NULL!");
+ OSL_ENSURE(pProtect, "ScDocFunc::Unprotect: ScDocProtection pointer is NULL!");
if (pProtect)
{
::std::auto_ptr<ScDocProtection> p(new ScDocProtection(*pProtect));
@@ -3473,7 +3473,7 @@ sal_Bool ScDocFunc::Protect( SCTAB nTab, const String& rPassword, sal_Bool /*bAp
if (pDoc->IsUndoEnabled())
{
ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
- DBG_ASSERT(pProtect, "ScDocFunc::Unprotect: ScTableProtection pointer is NULL!");
+ OSL_ENSURE(pProtect, "ScDocFunc::Unprotect: ScTableProtection pointer is NULL!");
if (pProtect)
{
::std::auto_ptr<ScTableProtection> p(new ScTableProtection(*pProtect));
@@ -4515,7 +4515,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
{
ScDocShellModificator aModificator( rDocShell );
- DBG_ASSERT( pNewRanges, "pNewRanges is 0" );
+ OSL_ENSURE( pNewRanges, "pNewRanges is 0" );
ScDocument* pDoc = rDocShell.GetDocument();
sal_Bool bUndo(pDoc->IsUndoEnabled());
@@ -4630,7 +4630,7 @@ sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_B
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
SCTAB nTab = rRange.aStart.Tab();
- DBG_ASSERT(rRange.aEnd.Tab() == nTab, "CreateNames: mehrere Tabellen geht nicht");
+ OSL_ENSURE(rRange.aEnd.Tab() == nTab, "CreateNames: mehrere Tabellen geht nicht");
sal_Bool bValid = sal_True;
if ( nFlags & ( NAME_TOP | NAME_BOTTOM ) )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index b7771b938286..b99be8b508c5 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -289,7 +289,7 @@ void ScDocShell::BeforeXMLLoading()
aDocument.DisableIdle( sal_True );
// prevent unnecessary broadcasts and updates
- DBG_ASSERT(pModificator == NULL, "The Modificator should not exist");
+ OSL_ENSURE(pModificator == NULL, "The Modificator should not exist");
pModificator = new ScDocShellModificator( *this );
aDocument.SetImportingXML( sal_True );
@@ -2059,7 +2059,7 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed )
if (GetCreateMode()== SFX_CREATE_MODE_STANDARD)
SfxObjectShell::SetVisArea( Rectangle() ); // normal bearbeitet -> keine VisArea
- DBG_ASSERT( rMed.GetFilter(), "Filter == 0" );
+ OSL_ENSURE( rMed.GetFilter(), "Filter == 0" );
sal_Bool bRet = false;
String aFltName = rMed.GetFilter()->GetFilterName();
@@ -2735,9 +2735,9 @@ SfxDocumentInfoDialog* ScDocShell::CreateDocumentInfoDialog(
if( pDocSh == this )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
::CreateTabPage ScDocStatPageCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_STAT );
- DBG_ASSERT(ScDocStatPageCreate, "Tabpage create fail!");
+ OSL_ENSURE(ScDocStatPageCreate, "Tabpage create fail!");
pDlg->AddTabPage( 42,
ScGlobal::GetRscString( STR_DOC_STAT ),
ScDocStatPageCreate,
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 010c8171f9b7..9034e39114ab 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -725,7 +725,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps(
xDPS->getDocumentProperties());
- DBG_ASSERT(xDocProps.is(), "no DocumentProperties");
+ OSL_ENSURE(xDocProps.is(), "no DocumentProperties");
String aDocUser = xDocProps->getModifiedBy();
if ( aDocUser.Len() )
@@ -810,7 +810,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{ // anschalten
aDocument.StartChangeTracking();
pThisTrack = aDocument.GetChangeTrack();
- DBG_ASSERT(pThisTrack,"ChangeTracking nicht angeschaltet?");
+ OSL_ENSURE(pThisTrack,"ChangeTracking nicht angeschaltet?");
if ( !bShared )
{
// visuelles RedLining einschalten
@@ -951,7 +951,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
// -> wird weggelassen
//! ??? Loesch-Aktion rueckgaengig machen ???
//! ??? Aktion irgendwo anders speichern ???
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
String aValue;
if ( eSourceType == SC_CAT_CONTENT )
((const ScChangeActionContent*)pSourceAction)->GetNewString( aValue );
@@ -1015,7 +1015,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
//! Test, ob es ganz unten im Dokument war, dann automatisches
//! Zeilen-Einfuegen ???
- DBG_ASSERT( aSourceRange.aStart == aSourceRange.aEnd, "huch?" );
+ OSL_ENSURE( aSourceRange.aStart == aSourceRange.aEnd, "huch?" );
ScAddress aPos = aSourceRange.aStart;
String aValue;
((const ScChangeActionContent*)pSourceAction)->GetNewString( aValue );
@@ -1045,7 +1045,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
case MM_REFERENCE : // do nothing
break;
case MM_FAKE :
- DBG_WARNING( "MergeDocument: MatrixFlag MM_FAKE" );
+ OSL_FAIL( "MergeDocument: MatrixFlag MM_FAKE" );
pViewSh->EnterData( aPos.Col(), aPos.Row(), aPos.Tab(), aValue );
break;
default:
@@ -1119,10 +1119,8 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
ScChangeAction* pAct = pThisTrack->GetLast();
if ( pAct && pAct->GetActionNumber() > nOldActionMax )
pAct->SetComment( rComment );
-#ifdef DBG_UTIL
else
OSL_FAIL( "MergeDocument: wohin mit dem Kommentar?!?" );
-#endif
}
// Referenzen anpassen
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 5da6df7c4433..3fe423dc8190 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -260,7 +260,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
ScDBData* pDBData = GetDBData( ScRange(aPos), SC_DB_IMPORT, SC_DBSEL_KEEP );
- DBG_ASSERT(pDBData, "kann DB-Daten nicht anlegen");
+ OSL_ENSURE(pDBData, "kann DB-Daten nicht anlegen");
sTarget = pDBData->GetName();
}
}
@@ -378,10 +378,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
bRowHeaders = aChartPositioner.HasRowHeaders();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScColRowLabelDlg* pDlg = pFact->CreateScColRowLabelDlg( pParent, RID_SCDLG_CHARTCOLROW, bRowHeaders, bColHeaders);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
bColHeaders = pDlg->IsRow();
@@ -517,7 +517,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
ScRange aRange;
ScTabViewShell* pViewSh = GetBestViewShell();
- DBG_ASSERT(pViewSh,"SID_REIMPORT_AFTER_LOAD: keine View");
+ OSL_ENSURE(pViewSh,"SID_REIMPORT_AFTER_LOAD: keine View");
if (pViewSh && pDBColl)
{
QueryBox aBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
@@ -900,10 +900,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
sal_Bool bSheetProtected = aDocument.IsTabProtected(nActualTab);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, true,bSheetProtected);
- DBG_ASSERT(pNewDlg, "Dialog create fail!");
+ OSL_ENSURE(pNewDlg, "Dialog create fail!");
pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags );
if ( pNewDlg->Execute() == RET_OK )
{
@@ -1306,7 +1306,7 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const String& rStyle )
pStylePool->Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA );
if (pStyleSheet)
{
- DBG_ASSERT(rRange.aStart.Tab() == rRange.aEnd.Tab(),
+ OSL_ENSURE(rRange.aStart.Tab() == rRange.aEnd.Tab(),
"DoAutoStyle mit mehreren Tabellen");
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -1398,7 +1398,7 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages
String aStyleName = aDocument.GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found" );
if ( pStyleSheet )
{
ScDocShellModificator aModificator( *this );
@@ -1433,7 +1433,7 @@ sal_Bool ScDocShell::AdjustPrintZoom( const ScRange& rRange )
String aStyleName = aDocument.GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = aDocument.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& rSet = pStyleSheet->GetItemSet();
@@ -1566,7 +1566,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
SfxStyleSheetBase* pStyleSheet
= pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pStyleSheet )
{
@@ -1577,10 +1577,10 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateScStyleDlg( GetActiveDialogParent(), *pStyleSheet, RID_SCDLG_STYLES_PAGE, RID_SCDLG_STYLES_PAGE );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
@@ -1642,7 +1642,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
SfxStyleSheetBase* pStyleSheet
= pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pStyleSheet )
{
@@ -1732,14 +1732,14 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
}
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateScHFEditDlg( SfxViewFrame::Current(),
GetActiveDialogParent(),
rStyleSet,
aStr,
RID_SCDLG_HFEDIT, nResId);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
@@ -1781,7 +1781,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */,
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pStyleSheet )
{
@@ -1986,7 +1986,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
Find( aDocument.GetPageStyle( nCurTab ),
SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
+ OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pStyleSheet )
pStyleSet = &pStyleSheet->GetItemSet();
@@ -1994,7 +1994,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
rbHeader = rbFooter = false;
}
- DBG_ASSERT( pStyleSet, "PageStyle-Set not found! :-(" );
+ OSL_ENSURE( pStyleSet, "PageStyle-Set not found! :-(" );
//--------------------------------------------------------------------
@@ -2211,8 +2211,8 @@ ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static
IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
{
- DBG_ASSERT( _pFileDlg, "ScDocShell::DialogClosedHdl(): no file dialog" );
- DBG_ASSERT( pImpl->pDocInserter, "ScDocShell::DialogClosedHdl(): no document inserter" );
+ OSL_ENSURE( _pFileDlg, "ScDocShell::DialogClosedHdl(): no file dialog" );
+ OSL_ENSURE( pImpl->pDocInserter, "ScDocShell::DialogClosedHdl(): no document inserter" );
if ( ERRCODE_NONE == _pFileDlg->GetError() )
{
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 07bc6e4c5d35..d2f72271dfce 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -213,7 +213,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize )
if (GetCreateMode() == SFX_CREATE_MODE_STANDARD)
return;
- DBG_ASSERT(pViewData,"pViewData==0 bei ScDocShell::UpdateOle");
+ OSL_ENSURE(pViewData,"pViewData==0 bei ScDocShell::UpdateOle");
Rectangle aOldArea = SfxObjectShell::GetVisArea();
Rectangle aNewArea = aOldArea;
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 1d7ec23e50e9..1cf3a34d54a0 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -132,7 +132,7 @@ namespace
_rDrvMgr.set( xFactory->createInstance(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_DRVMAN )) ),
uno::UNO_QUERY);
- DBG_ASSERT( _rDrvMgr.is(), "can't get DriverManager" );
+ OSL_ENSURE( _rDrvMgr.is(), "can't get DriverManager" );
if (!_rDrvMgr.is()) return SCERR_EXPORT_CONNECT;
// get connection
@@ -146,7 +146,7 @@ namespace
::std::vector< rtl_TextEncoding >::iterator aIter = ::std::find(aEncodings.begin(),aEncodings.end(),(rtl_TextEncoding) eCharSet);
if ( aIter == aEncodings.end() )
{
- DBG_ERRORFILE( "DBaseImport: dbtools::OCharsetMap doesn't know text encoding" );
+ OSL_FAIL( "DBaseImport: dbtools::OCharsetMap doesn't know text encoding" );
return SCERR_IMPORT_CONNECT;
} // if ( aIter == aMap.end() )
rtl::OUString aCharSetStr;
@@ -199,7 +199,7 @@ sal_Bool ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObj
}
else
{
- DBG_ERRORFILE( "transfer command not available" );
+ OSL_FAIL( "transfer command not available" );
}
}
catch( uno::Exception& )
@@ -246,7 +246,7 @@ sal_Bool ScDocShell::IsDocument( const INetURLObject& rURL )
catch( uno::Exception& )
{
// ucb may throw different exceptions on failure now - warning only
- DBG_WARNING( "Any other exception" );
+ OSL_FAIL( "Any other exception" );
}
return bRet;
@@ -333,7 +333,7 @@ sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet
uno::UNO_QUERY);
::utl::DisposableComponent aRowSetHelper(xRowSet);
uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY );
- DBG_ASSERT( xRowProp.is(), "can't get RowSet" );
+ OSL_ENSURE( xRowProp.is(), "can't get RowSet" );
if (!xRowProp.is()) return SCERR_IMPORT_CONNECT;
sal_Int32 nType = sdb::CommandType::TABLE;
@@ -376,7 +376,7 @@ sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet
static_cast<SCSIZE>(nRowCount) + 1 );
uno::Reference<sdbc::XRow> xRow( xRowSet, uno::UNO_QUERY );
- DBG_ASSERT( xRow.is(), "can't get Row" );
+ OSL_ENSURE( xRow.is(), "can't get Row" );
if (!xRow.is()) return SCERR_IMPORT_CONNECT;
// currency flag is not needed for dBase
@@ -853,23 +853,23 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
// create table
uno::Reference<sdbcx::XTablesSupplier> xTablesSupp =xDDSup->getDataDefinitionByConnection( xConnection );
- DBG_ASSERT( xTablesSupp.is(), "can't get Data Definition" );
+ OSL_ENSURE( xTablesSupp.is(), "can't get Data Definition" );
if (!xTablesSupp.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<container::XNameAccess> xTables = xTablesSupp->getTables();
- DBG_ASSERT( xTables.is(), "can't get Tables" );
+ OSL_ENSURE( xTables.is(), "can't get Tables" );
if (!xTables.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<sdbcx::XDataDescriptorFactory> xTablesFact( xTables, uno::UNO_QUERY );
- DBG_ASSERT( xTablesFact.is(), "can't get tables factory" );
+ OSL_ENSURE( xTablesFact.is(), "can't get tables factory" );
if (!xTablesFact.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<sdbcx::XAppend> xTablesAppend( xTables, uno::UNO_QUERY );
- DBG_ASSERT( xTablesAppend.is(), "can't get tables XAppend" );
+ OSL_ENSURE( xTablesAppend.is(), "can't get tables XAppend" );
if (!xTablesAppend.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<beans::XPropertySet> xTableDesc = xTablesFact->createDataDescriptor();
- DBG_ASSERT( xTableDesc.is(), "can't get table descriptor" );
+ OSL_ENSURE( xTableDesc.is(), "can't get table descriptor" );
if (!xTableDesc.is()) return SCERR_EXPORT_CONNECT;
aAny <<= rtl::OUString( aTabName );
@@ -878,19 +878,19 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
// create columns
uno::Reference<sdbcx::XColumnsSupplier> xColumnsSupp( xTableDesc, uno::UNO_QUERY );
- DBG_ASSERT( xColumnsSupp.is(), "can't get columns supplier" );
+ OSL_ENSURE( xColumnsSupp.is(), "can't get columns supplier" );
if (!xColumnsSupp.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<container::XNameAccess> xColumns = xColumnsSupp->getColumns();
- DBG_ASSERT( xColumns.is(), "can't get columns" );
+ OSL_ENSURE( xColumns.is(), "can't get columns" );
if (!xColumns.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<sdbcx::XDataDescriptorFactory> xColumnsFact( xColumns, uno::UNO_QUERY );
- DBG_ASSERT( xColumnsFact.is(), "can't get columns factory" );
+ OSL_ENSURE( xColumnsFact.is(), "can't get columns factory" );
if (!xColumnsFact.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<sdbcx::XAppend> xColumnsAppend( xColumns, uno::UNO_QUERY );
- DBG_ASSERT( xColumnsAppend.is(), "can't get columns XAppend" );
+ OSL_ENSURE( xColumnsAppend.is(), "can't get columns XAppend" );
if (!xColumnsAppend.is()) return SCERR_EXPORT_CONNECT;
const rtl::OUString* pColNames = aColNames.getConstArray();
@@ -902,7 +902,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
for (nCol=0; nCol<nColCount; nCol++)
{
uno::Reference<beans::XPropertySet> xColumnDesc = xColumnsFact->createDataDescriptor();
- DBG_ASSERT( xColumnDesc.is(), "can't get column descriptor" );
+ OSL_ENSURE( xColumnDesc.is(), "can't get column descriptor" );
if (!xColumnDesc.is()) return SCERR_EXPORT_CONNECT;
aAny <<= pColNames[nCol];
@@ -929,7 +929,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
uno::UNO_QUERY);
::utl::DisposableComponent aRowSetHelper(xRowSet);
uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY );
- DBG_ASSERT( xRowProp.is(), "can't get RowSet" );
+ OSL_ENSURE( xRowProp.is(), "can't get RowSet" );
if (!xRowProp.is()) return SCERR_EXPORT_CONNECT;
aAny <<= xConnection;
@@ -949,11 +949,11 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
// write data rows
uno::Reference<sdbc::XResultSetUpdate> xResultUpdate( xRowSet, uno::UNO_QUERY );
- DBG_ASSERT( xResultUpdate.is(), "can't get XResultSetUpdate" );
+ OSL_ENSURE( xResultUpdate.is(), "can't get XResultSetUpdate" );
if (!xResultUpdate.is()) return SCERR_EXPORT_CONNECT;
uno::Reference<sdbc::XRowUpdate> xRowUpdate( xRowSet, uno::UNO_QUERY );
- DBG_ASSERT( xRowUpdate.is(), "can't get XRowUpdate" );
+ OSL_ENSURE( xRowUpdate.is(), "can't get XRowUpdate" );
if (!xRowUpdate.is()) return SCERR_EXPORT_CONNECT;
SCROW nFirstDataRow = ( bHasFieldNames ? nFirstRow + 1 : nFirstRow );
@@ -1075,7 +1075,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
// SQL error 22001: String length exceeds field width (after encoding).
bool bEncErr = (nError == 22018);
bool bIsOctetTextEncoding = rtl_isOctetTextEncoding( eCharSet);
- DBG_ASSERT( !bEncErr || bIsOctetTextEncoding, "ScDocShell::DBaseExport: encoding error and not an octect textencoding");
+ OSL_ENSURE( !bEncErr || bIsOctetTextEncoding, "ScDocShell::DBaseExport: encoding error and not an octect textencoding");
SCCOL nDocCol = nFirstCol;
const sal_Int32* pColTypes = aColTypes.getConstArray();
const sal_Int32* pColLengths = aColLengths.getConstArray();
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index b503897ffa58..d8ed36826a91 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2287,7 +2287,7 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
ScDocumentLoader::GetFilterName(*pFileName, aFilter, aOptions, true, false);
sfx2::LinkManager* pLinkMgr = mpDoc->GetLinkManager();
ScExternalRefLink* pLink = new ScExternalRefLink(mpDoc, nFileId, aFilter);
- DBG_ASSERT(pFileName, "ScExternalRefManager::insertExternalFileLink: file name pointer is NULL");
+ OSL_ENSURE(pFileName, "ScExternalRefManager::insertExternalFileLink: file name pointer is NULL");
pLinkMgr->InsertFileLink(*pLink, OBJECT_CLIENT_FILE, *pFileName, &aFilter);
pLink->SetDoReferesh(false);
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 2df30a6f090e..7bec48d4846c 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -294,7 +294,7 @@ void ScImportExport::EndPaste()
sal_Bool ScImportExport::ImportData( const String& /* rMimeType */,
const ::com::sun::star::uno::Any & /* rValue */ )
{
- DBG_ASSERT( !this, "Implementation is missing" );
+ OSL_ENSURE( !this, "Implementation is missing" );
return false;
}
@@ -343,7 +343,7 @@ sal_Bool ScImportExport::ImportString( const ::rtl::OUString& rText, sal_uLong n
sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt )
{
- DBG_ASSERT( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" );
+ OSL_ENSURE( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" );
if ( nFmt != FORMAT_STRING )
{
rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
@@ -375,7 +375,7 @@ sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt )
sal_Bool ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, sal_uLong nFmt )
{
- DBG_ASSERT( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" );
+ OSL_ENSURE( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" );
if ( eEnc == RTL_TEXTENCODING_UNICODE )
eEnc = gsl_getSystemTextEncoding();
@@ -472,7 +472,7 @@ sal_Bool ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL,
aDocName = pShell->GetTitle( SFX_TITLE_FULLNAME );
}
- DBG_ASSERT( aDocName.Len(), "ClipBoard document has no name! :-/" );
+ OSL_ENSURE( aDocName.Len(), "ClipBoard document has no name! :-/" );
if( aDocName.Len() )
{
// Always use Calc A1 syntax for paste link.
diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx
index b3ec3e31d010..8bcd02e7204a 100644
--- a/sc/source/ui/docshell/pagedata.cxx
+++ b/sc/source/ui/docshell/pagedata.cxx
@@ -31,8 +31,6 @@
#include <string.h>
-#include <tools/debug.hxx>
-
#include "pagedata.hxx"
@@ -98,11 +96,11 @@ ScPageBreakData::~ScPageBreakData()
ScPrintRangeData& ScPageBreakData::GetData(size_t nPos)
{
- DBG_ASSERT(nPos < nAlloc, "ScPageBreakData::GetData bumm");
+ OSL_ENSURE(nPos < nAlloc, "ScPageBreakData::GetData bumm");
if ( nPos >= nUsed )
{
- DBG_ASSERT(nPos == nUsed, "ScPageBreakData::GetData falsche Reihenfolge");
+ OSL_ENSURE(nPos == nUsed, "ScPageBreakData::GetData falsche Reihenfolge");
nUsed = nPos+1;
}
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 4a72662f6258..2843d151141b 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -280,7 +280,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
if(pFact)
{
SfxAbstractTabDialog* pDlg = pFact->CreateSvxTransformTabDialog( pWin, &aNewAttr,pView );
- DBG_ASSERT(pDlg, "Dialog creation failed!");
+ OSL_ENSURE(pDlg, "Dialog creation failed!");
if (pDlg->Execute() == RET_OK)
{
rReq.Done(*(pDlg->GetOutputItemSet()));
@@ -376,13 +376,13 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
+ OSL_ENSURE(pFact, "Dialogdiet Factory fail!");
SfxAbstractTabDialog * pDlg = pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(),
&aNewAttr,
pViewData->GetDocument()->GetDrawLayer(),
pObj,
bHasMarked);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( nTabPage != 0xffff )
pDlg->SetCurPageId( nTabPage );
@@ -411,12 +411,12 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
+ OSL_ENSURE(pFact, "Dialogdiet Factory fail!");
AbstractSvxAreaTabDialog * pDlg = pFact->CreateSvxAreaTabDialog( pViewData->GetDialogParent(),
&aNewAttr,
pViewData->GetDocument()->GetDrawLayer(),
pView);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
// #i74099# by default, the dialog deletes the current color table if a different one is loaded
// (see SwDrawShell::ExecDrawDlg)
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index ea0830b65d7e..da7c97f741cd 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -101,7 +101,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
{
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;
@@ -188,7 +188,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
{
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/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index 7dfafc870102..2a2f5a608223 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -60,11 +60,11 @@ sal_Bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
SfxItemSet& rOutSet )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateScCharDlg( pViewData->GetDialogParent(), &rArgs,
pViewData->GetSfxDocShell(),RID_SCDLG_CHAR );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
sal_Bool bRet = ( pDlg->Execute() == RET_OK );
if ( bRet )
@@ -103,10 +103,10 @@ sal_Bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr, RID_SCDLG_PARAGRAPH);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
sal_Bool bRet = ( pDlg->Execute() == RET_OK );
if ( bRet )
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 096a7b602744..44d1ac3fbec0 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -74,7 +74,7 @@ void FuText::StopEditMode(sal_Bool /*bTextDirection*/)
ScViewData& rViewData = *pViewShell->GetViewData();
ScDocument& rDoc = *rViewData.GetDocument();
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
- DBG_ASSERT( pDrawLayer && (pDrawLayer == pDrDoc), "FuText::StopEditMode - missing or different drawing layers" );
+ OSL_ENSURE( pDrawLayer && (pDrawLayer == pDrDoc), "FuText::StopEditMode - missing or different drawing layers" );
ScAddress aNotePos;
ScPostIt* pNote = 0;
@@ -82,7 +82,7 @@ void FuText::StopEditMode(sal_Bool /*bTextDirection*/)
{
aNotePos = pCaptData->maStart;
pNote = rDoc.GetNote( aNotePos );
- DBG_ASSERT( pNote && (pNote->GetCaption() == pObject), "FuText::StopEditMode - missing or invalid cell note" );
+ OSL_ENSURE( pNote && (pNote->GetCaption() == pObject), "FuText::StopEditMode - missing or invalid cell note" );
}
ScDocShell* pDocShell = rViewData.GetDocShell();
@@ -179,7 +179,7 @@ void FuText::StopEditMode(sal_Bool /*bTextDirection*/)
else if( bNewNote || bDeleteNote )
{
SfxListUndoAction* pAction = dynamic_cast< SfxListUndoAction* >( pUndoMgr->GetUndoAction() );
- DBG_ASSERT( pAction, "FuText::StopEditMode - list undo action expected" );
+ OSL_ENSURE( pAction, "FuText::StopEditMode - list undo action expected" );
if( pAction )
pAction->SetComment( ScGlobal::GetRscString( bNewNote ? STR_UNDO_INSERTNOTE : STR_UNDO_DELETENOTE ) );
}
diff --git a/sc/source/ui/formdlg/formdata.cxx b/sc/source/ui/formdlg/formdata.cxx
index d11ad33a6a45..2945f20d788c 100644
--- a/sc/source/ui/formdlg/formdata.cxx
+++ b/sc/source/ui/formdlg/formdata.cxx
@@ -30,8 +30,6 @@
#include "precompiled_sc.hxx"
-#include <tools/debug.hxx>
-
#include "formdata.hxx"
//============================================================================
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 14a4e0023efa..a5a18aa408e3 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -122,7 +122,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(pScViewShell);
- DBG_ASSERT( pInputHdl, "Missing input handler :-/" );
+ OSL_ENSURE( pInputHdl, "Missing input handler :-/" );
if ( pInputHdl )
pInputHdl->NotifyChange( NULL );
@@ -152,7 +152,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
pData->SetInputHandler(pScMod->GetInputHdl());
pData->SetDocShell(pViewData->GetDocShell());
- DBG_ASSERT(pData,"FormEditData ist nicht da");
+ OSL_ENSURE(pData,"FormEditData ist nicht da");
formula::FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA; // Default...
@@ -430,7 +430,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
{
// Referenz auf anderes Dokument - wie inputhdl.cxx
- DBG_ASSERT(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab");
+ OSL_ENSURE(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab");
String aTmp;
rRef.Format( aTmp, SCA_VALID|SCA_TAB_3D, pRefDoc ); // immer 3d
diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx
index 61bf4c22d472..9c0a7c56fd97 100644
--- a/sc/source/ui/inc/ui_pch.hxx
+++ b/sc/source/ui/inc/ui_pch.hxx
@@ -85,7 +85,6 @@
#include <vcl/window.hxx>
#include <global.hxx>
#include <vcl/syswin.hxx>
-#include <tools/debug.hxx>
#include <svl/svarray.hxx>
#include <vcl/ctrl.hxx>
#include <svl/hint.hxx>
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 0ad2ac9c6df2..4ec56be58d54 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -126,7 +126,7 @@ public:
void CloseRefDialog()
{
- DBG_ASSERT( false, "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" );
+ OSL_FAIL( "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" );
if ( IsInExecute() )
EndDialog( false );
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index c22570ab30a9..2379b5dfdd23 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -231,7 +231,7 @@ void ScAcceptChgDlg::Init()
String aAreaStr;
ScRange aRange;
- DBG_ASSERT( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
+ OSL_ENSURE( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 2a3e02fa9eeb..4340d678e780 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -723,7 +723,7 @@ bool ScRefHandler::EnterRefMode()
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(pScViewShell);
- DBG_ASSERT( pInputHdl, "Missing input handler :-/" );
+ OSL_ENSURE( pInputHdl, "Missing input handler :-/" );
if ( pInputHdl )
pInputHdl->NotifyChange( NULL );
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index caf44d10f8ef..6236b11ff025 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -185,13 +185,13 @@ sal_uInt16 ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
const SvxBoxItem& ScAutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const
{
- DBG_ASSERT( pCurData, "ScAutoFmtPreview::GetBoxItem - no format data found" );
+ OSL_ENSURE( pCurData, "ScAutoFmtPreview::GetBoxItem - no format data found" );
return *static_cast< const SvxBoxItem* >( pCurData->GetItem( GetFormatIndex( nCol, nRow ), ATTR_BORDER ) );
}
const SvxLineItem& ScAutoFmtPreview::GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const
{
- DBG_ASSERT( pCurData, "ScAutoFmtPreview::GetDiagItem - no format data found" );
+ OSL_ENSURE( pCurData, "ScAutoFmtPreview::GetDiagItem - no format data found" );
return *static_cast< const SvxLineItem* >( pCurData->GetItem( GetFormatIndex( nCol, nRow ), bTLBR ? ATTR_BORDER_TLBR : ATTR_BORDER_BLTR ) );
}
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 6b3f694195fd..335189759e69 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -305,7 +305,7 @@ ScConflictsResolver::ScConflictsResolver( ScChangeTrack* pTrack, ScConflictsList
:mpTrack ( pTrack )
,mrConflictsList ( rConflictsList )
{
- DBG_ASSERT( mpTrack, "ScConflictsResolver CTOR: mpTrack is null!" );
+ OSL_ENSURE( mpTrack, "ScConflictsResolver CTOR: mpTrack is null!" );
}
ScConflictsResolver::~ScConflictsResolver()
@@ -436,14 +436,14 @@ ScConflictsDlg::ScConflictsDlg( Window* pParent, ScViewData* pViewData, ScDocume
,mbInSelectHdl ( false )
,mbInDeselectHdl ( false )
{
- DBG_ASSERT( mpViewData, "ScConflictsDlg CTOR: mpViewData is null!" );
+ OSL_ENSURE( mpViewData, "ScConflictsDlg CTOR: mpViewData is null!" );
mpOwnDoc = ( mpViewData ? mpViewData->GetDocument() : NULL );
- DBG_ASSERT( mpOwnDoc, "ScConflictsDlg CTOR: mpOwnDoc is null!" );
+ OSL_ENSURE( mpOwnDoc, "ScConflictsDlg CTOR: mpOwnDoc is null!" );
mpOwnTrack = ( mpOwnDoc ? mpOwnDoc->GetChangeTrack() : NULL );
- DBG_ASSERT( mpOwnTrack, "ScConflictsDlg CTOR: mpOwnTrack is null!" );
- DBG_ASSERT( mpSharedDoc, "ScConflictsDlg CTOR: mpSharedDoc is null!" );
+ OSL_ENSURE( mpOwnTrack, "ScConflictsDlg CTOR: mpOwnTrack is null!" );
+ OSL_ENSURE( mpSharedDoc, "ScConflictsDlg CTOR: mpSharedDoc is null!" );
mpSharedTrack = ( mpSharedDoc ? mpSharedDoc->GetChangeTrack() : NULL );
- DBG_ASSERT( mpSharedTrack, "ScConflictsDlg CTOR: mpSharedTrack is null!" );
+ OSL_ENSURE( mpSharedTrack, "ScConflictsDlg CTOR: mpSharedTrack is null!" );
FreeResource();
@@ -507,8 +507,8 @@ String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocumen
{
String aString;
- DBG_ASSERT( pAction, "ScConflictsDlg::GetActionString(): pAction is null!" );
- DBG_ASSERT( pDoc, "ScConflictsDlg::GetActionString(): pDoc is null!" );
+ OSL_ENSURE( pAction, "ScConflictsDlg::GetActionString(): pAction is null!" );
+ OSL_ENSURE( pDoc, "ScConflictsDlg::GetActionString(): pDoc is null!" );
if ( pAction && pDoc )
{
String aDesc;
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 10ef3a3b7dda..2d3db4fa816c 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -62,7 +62,7 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
pTabViewShell = pTabViewShellOri;
FreeResource();
//read header form current document, and add new controls
- DBG_ASSERT( pTabViewShell, "pTabViewShell is NULL! :-/" );
+ OSL_ENSURE( pTabViewShell, "pTabViewShell is NULL! :-/" );
ScViewData* pViewData = pTabViewShell->GetViewData();
pDoc = pViewData->GetDocument();
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index 5df31766517f..f3d8269650ee 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -121,7 +121,7 @@ void ScHighlightChgDlg::Init()
String aAreaStr;
ScRange aRange;
- DBG_ASSERT( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
+ OSL_ENSURE( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pChanges!=NULL)
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 39becaf0990c..5c4fa32b1381 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -986,7 +986,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
// create and initialize solver
uno::Reference<sheet::XSolver> xSolver = ScSolverUtil::GetSolver( maEngine );
- DBG_ASSERT( xSolver.is(), "can't get solver component" );
+ OSL_ENSURE( xSolver.is(), "can't get solver component" );
if ( !xSolver.is() )
return false;
@@ -1010,7 +1010,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
}
catch ( uno::Exception & )
{
- DBG_ERRORFILE("Exception in solver option property");
+ OSL_FAIL("Exception in solver option property");
}
}
}
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index 1aaf202e7a3f..fc13674558b3 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -47,7 +47,7 @@ ScRedComDialog::ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
if(pFact)
{
pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, true );
- DBG_ASSERT(pDlg, "Dialog creation failed!");
+ OSL_ENSURE(pDlg, "Dialog creation failed!");
pDocShell=pShell;
pDlg->DontChangeAuthor();
pDlg->HideAuthor();
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 5b5492dccc8e..8c474a4ec324 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -74,9 +74,9 @@ ScShareDocumentDlg::ScShareDocumentDlg( Window* pParent, ScViewData* pViewData )
,mpViewData ( pViewData )
,mpDocShell ( NULL )
{
- DBG_ASSERT( mpViewData, "ScShareDocumentDlg CTOR: mpViewData is null!" );
+ OSL_ENSURE( mpViewData, "ScShareDocumentDlg CTOR: mpViewData is null!" );
mpDocShell = ( mpViewData ? mpViewData->GetDocShell() : NULL );
- DBG_ASSERT( mpDocShell, "ScShareDocumentDlg CTOR: mpDocShell is null!" );
+ OSL_ENSURE( mpDocShell, "ScShareDocumentDlg CTOR: mpDocShell is null!" );
FreeResource();
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 9927d5060306..6f388fc81e2c 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -229,7 +229,7 @@ const uno::Sequence<beans::PropertyValue>& ScSolverOptionsDialog::GetProperties(
}
else
{
- DBG_ERRORFILE( "wrong count" );
+ OSL_FAIL( "wrong count" );
}
return maProperties;
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index c33f4b53b43b..1379145c539a 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -35,8 +35,6 @@
//------------------------------------------------------------------
-#include <tools/debug.hxx>
-
#include "strindlg.hxx"
#include "scresid.hxx"
#include "miscdlgs.hrc"
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index fec8ef51c2a5..5fb8d609bc6f 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -37,7 +37,6 @@
#include "scresid.hxx"
#include "miscdlgs.hrc"
-#include <tools/debug.hxx>
#include <tools/color.hxx>
#include <sfx2/objsh.hxx>
#include <svx/xtable.hxx>
@@ -100,7 +99,7 @@ void ScTabBgColorDlg::FillColorValueSets_Impl()
const Size aSize15x15 = Size( 15, 15 );
sal_uInt16 nSelectedItem = 0;
- DBG_ASSERT( pDocSh, "DocShell not found!" );
+ OSL_ENSURE( pDocSh, "DocShell not found!" );
if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem(SID_COLOR_TABLE) ) ) )
pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 9d7ed156b210..6a6053cec24d 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -152,7 +152,7 @@ void ScNameDlg::Init()
String aAreaStr;
ScRange aRange;
- DBG_ASSERT( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
+ OSL_ENSURE( pViewData && pDoc, "ViewData oder Document nicht gefunden!" );
maLbScope.SetSelectHdl( LINK(this, ScNameDlg, ScopeChangedHdl) );
aBtnOk.SetClickHdl ( LINK( this, ScNameDlg, OkBtnHdl ) );
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 530ac6b55718..5f2defeb6a61 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -749,7 +749,7 @@ void ScContentTree::GetDrawNames( sal_uInt16 nType )
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page ?");
+ OSL_ENSURE(pPage,"Page ?");
if (pPage)
{
SdrObjListIter aIter( *pPage, eIter );
@@ -795,7 +795,7 @@ void ScContentTree::GetLinkNames()
return;
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
- DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
+ OSL_ENSURE(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
sal_uInt16 nCount = rLinks.Count();
for (sal_uInt16 i=0; i<nCount; i++)
@@ -816,7 +816,7 @@ const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex )
sal_uLong nFound = 0;
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
- DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
+ OSL_ENSURE(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
sal_uInt16 nCount = rLinks.Count();
for (sal_uInt16 i=0; i<nCount; i++)
@@ -956,7 +956,7 @@ sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType )
for (SCTAB nTab=0; nTab<nTabCount && bEqual; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page ?");
+ OSL_ENSURE(pPage,"Page ?");
if (pPage)
{
SdrObjListIter aIter( *pPage, eIter );
diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx
index 3d30ddb74d94..8e5398bb059d 100644
--- a/sc/source/ui/navipi/navcitem.cxx
+++ b/sc/source/ui/navipi/navcitem.cxx
@@ -66,7 +66,7 @@ void ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemStat
{
const SfxStringItem* pCellPosItem = PTR_CAST(SfxStringItem, pItem);
- DBG_ASSERT( pCellPosItem, "SfxStringItem expected!" );
+ OSL_ENSURE( pCellPosItem, "SfxStringItem expected!" );
if ( pCellPosItem )
{
@@ -89,7 +89,7 @@ void ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemStat
{
const SfxUInt16Item* pTabItem = PTR_CAST(SfxUInt16Item, pItem);
- DBG_ASSERT( pTabItem, "SfxUInt16Item expected!" );
+ OSL_ENSURE( pTabItem, "SfxUInt16Item expected!" );
// Tabelle fuer Basic ist 1-basiert
if ( pTabItem && pTabItem->GetValue() )
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index 150506a04b84..ea2b3866c8f5 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -84,7 +84,7 @@ void ScScenarioListBox::UpdateEntries( const std::vector<String> &aNewEntryList
default:
{
// sheet contains scenarios
- DBG_ASSERT( aNewEntryList.size() % 3 == 0, "ScScenarioListBox::UpdateEntries - wrong list size" );
+ OSL_ENSURE( aNewEntryList.size() % 3 == 0, "ScScenarioListBox::UpdateEntries - wrong list size" );
SetUpdateMode( false );
std::vector<String>::const_iterator iter;
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 6761f313e38c..2fcc726efbad 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -187,7 +187,7 @@ void ScTpUserLists::Reset( const SfxItemSet& rCoreAttrs )
rCoreAttrs.Get( nWhichUserLists );
const ScUserList* pCoreList = rUserListItem.GetUserList();
- DBG_ASSERT( pCoreList, "UserList not found :-/" );
+ OSL_ENSURE( pCoreList, "UserList not found :-/" );
if ( pCoreList )
{
@@ -297,7 +297,7 @@ sal_uInt16 ScTpUserLists::UpdateUserListBox()
for ( sal_uInt16 i=0; i<nCount; i++ )
{
aEntry = (*pUserLists)[i]->GetString();
- DBG_ASSERT( aEntry.Len() > 0, "Empty UserList-entry :-/" );
+ OSL_ENSURE( aEntry.Len() > 0, "Empty UserList-entry :-/" );
aLbLists.InsertEntry( aEntry );
}
}
@@ -631,7 +631,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
sal_uInt16 nSelList = aLbLists.GetSelectEntryPos();
- DBG_ASSERT( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" );
+ OSL_ENSURE( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" );
if ( theEntriesStr.Len() > 0 )
{
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 7b73e7e56599..fab711f70ffc 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -150,7 +150,7 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window*
ScTabViewShell* pScViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
ScDocShell* pScDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
- DBG_ASSERT( pScDocSh, "Current DocumentShell not found :-(" );
+ OSL_ENSURE( pScDocSh, "Current DocumentShell not found :-(" );
pDoc = pScDocSh->GetDocument();
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 3a8730b5b09b..65e72318d334 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -207,8 +207,8 @@ void ScEditWindow::SetCharAttriutes()
ScTabViewShell* pTabViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current());
- DBG_ASSERT( pDocSh, "Current DocShell not found" );
- DBG_ASSERT( pViewSh, "Current ViewShell not found" );
+ OSL_ENSURE( pDocSh, "Current DocShell not found" );
+ OSL_ENSURE( pViewSh, "Current ViewShell not found" );
if ( pDocSh && pViewSh )
{
@@ -217,11 +217,11 @@ void ScEditWindow::SetCharAttriutes()
SfxItemSet aSet( pEdView->GetAttribs() );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateScCharDlg( GetParent(), &aSet,
pDocSh,RID_SCDLG_CHAR );
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetText( ScGlobal::GetRscString( STR_TEXTATTRS ) );
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 59d58f2913db..79c202d8c202 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -268,7 +268,7 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
if( aLbScaleMode.GetSelectEntryCount() == 0 )
{
// fall back to 100%
- DBG_ERRORFILE( "ScTablePage::Reset - missing scaling item" );
+ OSL_FAIL( "ScTablePage::Reset - missing scaling item" );
aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_PERCENT );
aEdScaleAll.SetValue( 100 );
}
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 6a596b1d2eb0..b2e4c88ec5ae 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -68,37 +68,37 @@ ScStyleDlg::ScStyleDlg( Window* pParent,
nDlgRsc ( nRscId )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
switch ( nRscId )
{
case RID_SCDLG_STYLES_PAR: // Zellformatvorlagen
{
SvtCJKOptions aCJKOptions;
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_NUMBERFORMAT ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_FONTEFF, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT( pFact->GetTabPageRangesFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE( pFact->GetTabPageRangesFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_ALIGNMENT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_ALIGNMENT ) );
if ( aCJKOptions.IsAsianTypographyEnabled() )
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
AddTabPage( TP_ASIAN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
}
else
RemoveTabPage( TP_ASIAN );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
AddTabPage( TP_PROTECTION, &ScTabPageProtection::Create, &ScTabPageProtection::GetRanges );
}
@@ -106,14 +106,14 @@ ScStyleDlg::ScStyleDlg( Window* pParent,
case RID_SCDLG_STYLES_PAGE: // Seitenvorlagen
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PAGE_STD, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
AddTabPage( TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
AddTabPage( TP_PAGE_HEADER, &ScHeaderPage::Create, &ScHeaderPage::GetRanges );
AddTabPage( TP_PAGE_FOOTER, &ScFooterPage::Create, &ScFooterPage::GetRanges );
@@ -150,7 +150,7 @@ void ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
const SfxPoolItem* pInfoItem
= pDocSh->GetItem( SID_ATTR_NUMBERFORMAT_INFO );
- DBG_ASSERT( pInfoItem, "NumberInfoItem nicht gefunden!" );
+ OSL_ENSURE( pInfoItem, "NumberInfoItem nicht gefunden!" );
aSet.Put (SvxNumberInfoItem( (const SvxNumberInfoItem&)*pInfoItem ) );
rTabPage.PageCreated(aSet);
@@ -162,7 +162,7 @@ void ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
const SfxPoolItem* pInfoItem
= pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST );
- DBG_ASSERT( pInfoItem, "FontListItem nicht gefunden!" );
+ OSL_ENSURE( pInfoItem, "FontListItem nicht gefunden!" );
aSet.Put (SvxFontListItem(((const SvxFontListItem&)*pInfoItem).GetFontList(), SID_ATTR_CHAR_FONTLIST));
rTabPage.PageCreated(aSet);
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index fab15bd8a996..b014b3f25ef3 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -36,7 +36,6 @@
// INCLUDE ---------------------------------------------------------------
#include <sfx2/linkmgr.hxx>
-#include <tools/debug.hxx>
#include "areasave.hxx"
#include "arealink.hxx"
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 92acbcfa5bc3..ced857fa66a6 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1785,7 +1785,7 @@ sal_Bool ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const
ScRange lcl_GetMultiMarkRange( const ScMarkData& rMark )
{
- DBG_ASSERT( rMark.IsMultiMarked(), "wrong mark type" );
+ OSL_ENSURE( rMark.IsMultiMarked(), "wrong mark type" );
ScRange aRange;
rMark.GetMultiMarkArea( aRange );
@@ -1922,7 +1922,7 @@ ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData&
pUndoDoc( pNewUndoDoc ),
pWhich( NULL )
{
- DBG_ASSERT( pW, "ScUndoClearItems: Which-Pointer ist 0" );
+ OSL_ENSURE( pW, "ScUndoClearItems: Which-Pointer ist 0" );
sal_uInt16 nCount = 0;
while ( pW[nCount] )
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 45ea822f2090..1ee860414220 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1177,7 +1177,7 @@ void ScUndoReplace::Undo()
if (pUndoDoc) // nur bei ReplaceAll !!
{
- DBG_ASSERT(pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL,
+ OSL_ENSURE(pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL,
"ScUndoReplace:: Falscher Modus");
SetViewMarkData( aMarkData );
@@ -1213,7 +1213,7 @@ void ScUndoReplace::Undo()
else if (pSearchItem->GetCellType() == SVX_SEARCHIN_NOTE)
{
ScPostIt* pNote = pDoc->GetNote( aCursorPos );
- DBG_ASSERT( pNote, "ScUndoReplace::Undo - cell does not contain a note" );
+ OSL_ENSURE( pNote, "ScUndoReplace::Undo - cell does not contain a note" );
if (pNote)
pNote->SetText( aCursorPos, aUndoStr );
if (pViewShell)
@@ -1465,7 +1465,7 @@ String ScUndoConversion::GetComment() const
case SC_CONVERSION_SPELLCHECK: aText = ScGlobal::GetRscString( STR_UNDO_SPELLING ); break;
case SC_CONVERSION_HANGULHANJA: aText = ScGlobal::GetRscString( STR_UNDO_HANGULHANJA ); break;
case SC_CONVERSION_CHINESE_TRANSL: aText = ScGlobal::GetRscString( STR_UNDO_CHINESE_TRANSLATION ); break;
- default: DBG_ERRORFILE( "ScUndoConversion::GetComment - unknown conversion type" );
+ default: OSL_FAIL( "ScUndoConversion::GetComment - unknown conversion type" );
}
return aText;
}
@@ -1717,7 +1717,7 @@ void ScUndoRefreshLink::Undo()
void ScUndoRefreshLink::Redo()
{
- DBG_ASSERT(pRedoDoc, "Kein RedoDoc bei ScUndoRefreshLink::Redo");
+ OSL_ENSURE(pRedoDoc, "Kein RedoDoc bei ScUndoRefreshLink::Redo");
BeginUndo();
@@ -1995,7 +1995,7 @@ ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell,
nNewRefresh ( nNewRD ),
bWithInsert ( bDoInsert )
{
- DBG_ASSERT( aOldRange.aStart == aNewRange.aStart, "AreaLink verschoben ?" );
+ OSL_ENSURE( aOldRange.aStart == aNewRange.aStart, "AreaLink verschoben ?" );
}
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 9743cf42c193..fa98ed441a7d 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -656,7 +656,7 @@ void ScUndoPrintZoom::DoChange( sal_Bool bUndo )
String aStyleName = pDoc->GetPageStyle( nTab );
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& rSet = pStyleSheet->GetItemSet();
@@ -832,7 +832,7 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP
maPos( rPos ),
mpDrawUndo( pDrawUndo )
{
- DBG_ASSERT( rNoteData.mpCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note caption" );
+ OSL_ENSURE( rNoteData.mpCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note caption" );
(bInsert ? maNewData : maOldData) = rNoteData;
}
@@ -844,8 +844,8 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP
maNewData( rNewData ),
mpDrawUndo( pDrawUndo )
{
- DBG_ASSERT( maOldData.mpCaption || maNewData.mpCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note captions" );
- DBG_ASSERT( !maOldData.mxInitData.get() && !maNewData.mxInitData.get(), "ScUndoReplaceNote::ScUndoReplaceNote - unexpected unitialized note" );
+ OSL_ENSURE( maOldData.mpCaption || maNewData.mpCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note captions" );
+ OSL_ENSURE( !maOldData.mxInitData.get() && !maNewData.mxInitData.get(), "ScUndoReplaceNote::ScUndoReplaceNote - unexpected unitialized note" );
}
ScUndoReplaceNote::~ScUndoReplaceNote()
@@ -899,7 +899,7 @@ void ScUndoReplaceNote::DoInsertNote( const ScNoteData& rNoteData )
if( rNoteData.mpCaption )
{
ScDocument& rDoc = *pDocShell->GetDocument();
- DBG_ASSERT( !rDoc.GetNote( maPos ), "ScUndoReplaceNote::DoInsertNote - unexpected cell note" );
+ OSL_ENSURE( !rDoc.GetNote( maPos ), "ScUndoReplaceNote::DoInsertNote - unexpected cell note" );
ScPostIt* pNote = new ScPostIt( rDoc, maPos, rNoteData, false );
rDoc.TakeNote( maPos, pNote );
}
@@ -910,7 +910,7 @@ void ScUndoReplaceNote::DoRemoveNote( const ScNoteData& rNoteData )
if( rNoteData.mpCaption )
{
ScDocument& rDoc = *pDocShell->GetDocument();
- DBG_ASSERT( rDoc.GetNote( maPos ), "ScUndoReplaceNote::DoRemoveNote - missing cell note" );
+ OSL_ENSURE( rDoc.GetNote( maPos ), "ScUndoReplaceNote::DoRemoveNote - missing cell note" );
if( ScPostIt* pNote = rDoc.ReleaseNote( maPos ) )
{
/* Forget pointer to caption object to suppress removing the
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index e7f15d9b7fed..9295418a2f38 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1702,7 +1702,7 @@ void ScUndoDataPilot::Undo()
ScDPObject* pDocObj = pDoc->GetDPAtCursor(
aNewRange.aStart.Col(), aNewRange.aStart.Row(), aNewRange.aStart.Tab() );
- DBG_ASSERT(pDocObj, "DPObject not found");
+ OSL_ENSURE(pDocObj, "DPObject not found");
if (pDocObj)
{
if ( pOldDPObject )
@@ -1774,7 +1774,7 @@ void ScUndoDataPilot::Redo()
ScRange aOldRange = pOldDPObject->GetOutRange();
pSourceObj = pDoc->GetDPAtCursor(
aOldRange.aStart.Col(), aOldRange.aStart.Row(), aOldRange.aStart.Tab() );
- DBG_ASSERT(pSourceObj, "DPObject not found");
+ OSL_ENSURE(pSourceObj, "DPObject not found");
}
ScDBDocFunc aFunc( *pDocShell );
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index f8286ed4b264..109fc0a15034 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -155,7 +155,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
{
// find old style to modify
pStyle = pStlPool->Find( rName, eStyleFamily );
- DBG_ASSERT( pStyle, "style not found" );
+ OSL_ENSURE( pStyle, "style not found" );
if ( pStyle && !bDelete )
{
@@ -194,7 +194,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
SfxItemSet& rStyleSet = pStyle->GetItemSet();
const SfxItemSet* pNewSet = rData.GetItems();
- DBG_ASSERT( pNewSet, "no ItemSet for style" );
+ OSL_ENSURE( pNewSet, "no ItemSet for style" );
if (pNewSet)
rStyleSet.Set( *pNewSet, false );
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 97f2549711e1..d5264317c86d 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1138,7 +1138,7 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) :
}
else
{
- DBG_ASSERT(aFltName == pDoc->GetLinkFlt(i) &&
+ OSL_ENSURE(aFltName == pDoc->GetLinkFlt(i) &&
aOptions == pDoc->GetLinkOpt(i),
"verschiedene Filter fuer ein Dokument?");
}
@@ -1571,7 +1571,7 @@ SdrObject* ScUndoRenameObject::GetObject()
for (sal_uInt16 nTab=0; nTab<nCount; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(nTab);
- DBG_ASSERT(pPage,"Page ?");
+ OSL_ENSURE(pPage,"Page ?");
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
SdrObject* pObject = aIter.Next();
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index c8623edf9921..e453c0ab9b67 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -101,7 +101,7 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB
if (aName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)))
bWasTemp = true;
}
- DBG_ASSERT(bWasTemp, "Undo: didn't find database range");
+ OSL_ENSURE(bWasTemp, "Undo: didn't find database range");
(void)bWasTemp;
pRet = pDoc->GetAnonymousDBData(nTab);
if (!pRet)
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 040fff86ecb2..6101cbe108fa 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -33,7 +33,6 @@
#include "scitems.hxx"
#include <editeng/memberids.hrc>
-#include <tools/debug.hxx>
#include <tools/shl.hxx>
#include <svl/poolitem.hxx>
#include <vcl/svapp.hxx>
@@ -451,7 +450,7 @@ ScAutoFormatObj::~ScAutoFormatObj()
void ScAutoFormatObj::InitFormat( sal_uInt16 nNewIndex )
{
- DBG_ASSERT( nFormatIndex == SC_AFMTOBJ_INVALID, "ScAutoFormatObj::InitFormat mehrfach" );
+ OSL_ENSURE( nFormatIndex == SC_AFMTOBJ_INVALID, "ScAutoFormatObj::InitFormat mehrfach" );
nFormatIndex = nNewIndex;
//! Listening !!!
}
@@ -578,7 +577,7 @@ void SAL_CALL ScAutoFormatObj::setName( const rtl::OUString& aNewName )
!lcl_FindAutoFormatIndex( *pFormats, aNewString, nDummy ))
{
ScAutoFormatData* pData = (*pFormats)[nFormatIndex];
- DBG_ASSERT(pData,"AutoFormat Daten nicht da");
+ OSL_ENSURE(pData,"AutoFormat Daten nicht da");
ScAutoFormatData* pNew = new ScAutoFormatData(*pData);
pNew->SetName( aNewString );
@@ -626,7 +625,7 @@ void SAL_CALL ScAutoFormatObj::setPropertyValue(
if (pFormats && IsInserted() && nFormatIndex < pFormats->GetCount())
{
ScAutoFormatData* pData = (*pFormats)[nFormatIndex];
- DBG_ASSERT(pData,"AutoFormat Daten nicht da");
+ OSL_ENSURE(pData,"AutoFormat Daten nicht da");
String aPropString(aPropertyName);
sal_Bool bBool = sal_Bool();
@@ -661,7 +660,7 @@ uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const rtl::OUString& aPrope
if (pFormats && IsInserted() && nFormatIndex < pFormats->GetCount())
{
ScAutoFormatData* pData = (*pFormats)[nFormatIndex];
- DBG_ASSERT(pData,"AutoFormat Daten nicht da");
+ OSL_ENSURE(pData,"AutoFormat Daten nicht da");
sal_Bool bValue;
sal_Bool bError = false;
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 9e92284a108b..887a83be2601 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -744,7 +744,7 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
{
rDesc.initArgumentInfo(); // full argument info is needed
- DBG_ASSERT( rSequence.getLength() == SC_FUNCDESC_PROPCOUNT, "Falscher Count" );
+ OSL_ENSURE( rSequence.getLength() == SC_FUNCDESC_PROPCOUNT, "Falscher Count" );
beans::PropertyValue* pArray = rSequence.getArray();
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index ce9586d1c9e2..12a2fdb44b7c 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -161,7 +161,7 @@ namespace calc
void SAL_CALL OCellListSource::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
DBG_CHKTHIS( OCellListSource, checkConsistency_static );
- DBG_ASSERT( _nHandle == PROP_HANDLE_RANGE_ADDRESS, "OCellListSource::getFastPropertyValue: invalid handle!" );
+ OSL_ENSURE( _nHandle == PROP_HANDLE_RANGE_ADDRESS, "OCellListSource::getFastPropertyValue: invalid handle!" );
// we only have this one property ....
(void)_nHandle; // avoid warning in product version
@@ -393,13 +393,13 @@ namespace calc
{
// first the sheets collection
Reference< XIndexAccess > xSheets(m_xDocument->getSheets( ), UNO_QUERY);
- DBG_ASSERT( xSheets.is(), "OCellListSource::initialize: could not retrieve the sheets!" );
+ OSL_ENSURE( xSheets.is(), "OCellListSource::initialize: could not retrieve the sheets!" );
if ( xSheets.is() )
{
// the concrete sheet
Reference< XCellRange > xSheet(xSheets->getByIndex( aRangeAddress.Sheet ), UNO_QUERY);
- DBG_ASSERT( xSheet.is(), "OCellListSource::initialize: NULL sheet, but no exception!" );
+ OSL_ENSURE( xSheet.is(), "OCellListSource::initialize: NULL sheet, but no exception!" );
// the concrete cell
if ( xSheet.is() )
@@ -407,7 +407,7 @@ namespace calc
m_xRange.set(xSheet->getCellRangeByPosition(
aRangeAddress.StartColumn, aRangeAddress.StartRow,
aRangeAddress.EndColumn, aRangeAddress.EndRow));
- DBG_ASSERT( Reference< XCellRangeAddressable >( m_xRange, UNO_QUERY ).is(), "OCellListSource::initialize: either NULL range, or cell without address access!" );
+ OSL_ENSURE( Reference< XCellRangeAddressable >( m_xRange, UNO_QUERY ).is(), "OCellListSource::initialize: either NULL range, or cell without address access!" );
}
}
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 79fad6555328..2187de47d2a5 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -877,7 +877,7 @@ void lcl_CopyProperties( beans::XPropertySet& rDest, beans::XPropertySet& rSourc
SCTAB lcl_FirstTab( const ScRangeList& rRanges )
{
- DBG_ASSERT(rRanges.size() >= 1, "was fuer Ranges ?!?!");
+ OSL_ENSURE(rRanges.size() >= 1, "was fuer Ranges ?!?!");
const ScRange* pFirst = rRanges[ 0 ];
if (pFirst)
return pFirst->aStart.Tab();
@@ -4753,7 +4753,7 @@ void ScCellRangeObj::RefChanged()
ScCellRangesBase::RefChanged();
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT(rRanges.size() == 1, "was fuer Ranges ?!?!");
+ OSL_ENSURE(rRanges.size() == 1, "was fuer Ranges ?!?!");
if ( !rRanges.empty() )
{
const ScRange* pFirst = rRanges[0];
@@ -6080,7 +6080,7 @@ void ScCellObj::RefChanged()
ScCellRangeObj::RefChanged();
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT(rRanges.size() == 1, "was fuer Ranges ?!?!");
+ OSL_ENSURE(rRanges.size() == 1, "was fuer Ranges ?!?!");
if ( !rRanges.empty() )
{
const ScRange* pFirst = rRanges[ 0 ];
@@ -6950,7 +6950,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScTableSheetObj::getImplementationId() throw(un
SCTAB ScTableSheetObj::GetTab_Impl() const
{
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT(rRanges.size() == 1, "was fuer Ranges ?!?!");
+ OSL_ENSURE(rRanges.size() == 1, "was fuer Ranges ?!?!");
if ( !rRanges.empty() )
{
const ScRange* pFirst = rRanges[ 0 ];
@@ -7042,7 +7042,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorBy
if (pRangesImp)
{
const ScRangeList& rRanges = pRangesImp->GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
return new ScCellCursorObj( pDocSh, *rRanges[ 0 ] );
}
}
@@ -7211,11 +7211,11 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScTableSheetObj::getDrawPage()
if ( pDocSh )
{
ScDrawLayer* pDrawLayer = pDocSh->MakeDrawLayer();
- DBG_ASSERT(pDrawLayer,"kann Draw-Layer nicht anlegen");
+ OSL_ENSURE(pDrawLayer,"kann Draw-Layer nicht anlegen");
SCTAB nTab = GetTab_Impl();
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Draw-Page nicht gefunden");
+ OSL_ENSURE(pPage,"Draw-Page nicht gefunden");
if (pPage)
return uno::Reference<drawing::XDrawPage> (pPage->getUnoPage(), uno::UNO_QUERY);
@@ -7250,7 +7250,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
if (bDo)
{
- DBG_ASSERT( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
+ OSL_ENSURE( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
ScDocFunc aFunc(*pDocSh);
@@ -7282,7 +7282,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
if (bDo)
{
- DBG_ASSERT( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
+ OSL_ENSURE( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
ScDocFunc aFunc(*pDocSh);
@@ -7299,7 +7299,7 @@ void SAL_CALL ScTableSheetObj::moveRange( const table::CellAddress& aDestination
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- DBG_ASSERT( aSource.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
+ OSL_ENSURE( aSource.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aSourceRange;
ScUnoConversion::FillScRange( aSourceRange, aSource );
ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet );
@@ -7316,7 +7316,7 @@ void SAL_CALL ScTableSheetObj::copyRange( const table::CellAddress& aDestination
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- DBG_ASSERT( aSource.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
+ OSL_ENSURE( aSource.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aSourceRange;
ScUnoConversion::FillScRange( aSourceRange, aSource );
ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet );
@@ -7374,7 +7374,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScTableSheetObj::getPrintAreas()
for (sal_uInt16 i=0; i<nCount; i++)
{
const ScRange* pRange = pDoc->GetPrintRange( nTab, i );
- DBG_ASSERT(pRange,"wo ist der Druckbereich");
+ OSL_ENSURE(pRange,"wo ist der Druckbereich");
if (pRange)
{
ScUnoConversion::FillApiRange( aRangeAddress, *pRange );
@@ -7734,7 +7734,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hideDependents( const table::CellAddress& aPo
if ( pDocSh )
{
SCTAB nTab = GetTab_Impl();
- DBG_ASSERT( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
+ OSL_ENSURE( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveDelSucc( aPos );
@@ -7750,7 +7750,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPo
if ( pDocSh )
{
SCTAB nTab = GetTab_Impl();
- DBG_ASSERT( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
+ OSL_ENSURE( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveDelPred( aPos );
@@ -7766,7 +7766,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPo
if ( pDocSh )
{
SCTAB nTab = GetTab_Impl();
- DBG_ASSERT( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
+ OSL_ENSURE( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddSucc( aPos );
@@ -7782,7 +7782,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPo
if ( pDocSh )
{
SCTAB nTab = GetTab_Impl();
- DBG_ASSERT( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
+ OSL_ENSURE( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddPred( aPos );
@@ -7798,7 +7798,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPositi
if ( pDocSh )
{
SCTAB nTab = GetTab_Impl();
- DBG_ASSERT( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
+ OSL_ENSURE( aPosition.Sheet == nTab, "falsche Tabelle in CellAddress" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddError( aPos );
@@ -8044,7 +8044,7 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
const table::CellRangeAddress* pAry = rScenRanges.getConstArray();
for (sal_uInt16 i=0; i<nRangeCount; i++)
{
- DBG_ASSERT( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" );
+ OSL_ENSURE( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" );
ScRange aOneRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab,
(SCCOL)pAry[i].EndColumn, (SCROW)pAry[i].EndRow, nTab );
@@ -8774,7 +8774,7 @@ rtl::OUString SAL_CALL ScTableColumnObj::getName() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
const ScRange& rRange = GetRange();
- DBG_ASSERT(rRange.aStart.Col() == rRange.aEnd.Col(), "too many columns");
+ OSL_ENSURE(rRange.aStart.Col() == rRange.aEnd.Col(), "too many columns");
SCCOL nCol = rRange.aStart.Col();
return ScColToAlpha( nCol ); // from global.hxx
@@ -8816,7 +8816,7 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if (!pDocSh)
return; //! Exception oder so?
const ScRange& rRange = GetRange();
- DBG_ASSERT(rRange.aStart.Col() == rRange.aEnd.Col(), "zuviele Spalten");
+ OSL_ENSURE(rRange.aStart.Col() == rRange.aEnd.Col(), "zuviele Spalten");
SCCOL nCol = rRange.aStart.Col();
SCTAB nTab = rRange.aStart.Tab();
ScDocFunc aFunc(*pDocSh);
@@ -8875,7 +8875,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
ScDocument* pDoc = pDocSh->GetDocument();
const ScRange& rRange = GetRange();
- DBG_ASSERT(rRange.aStart.Col() == rRange.aEnd.Col(), "zuviele Spalten");
+ OSL_ENSURE(rRange.aStart.Col() == rRange.aEnd.Col(), "zuviele Spalten");
SCCOL nCol = rRange.aStart.Col();
SCTAB nTab = rRange.aStart.Tab();
@@ -8960,7 +8960,7 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
return; //! Exception oder so?
ScDocument* pDoc = pDocSh->GetDocument();
const ScRange& rRange = GetRange();
- DBG_ASSERT(rRange.aStart.Row() == rRange.aEnd.Row(), "zuviele Zeilen");
+ OSL_ENSURE(rRange.aStart.Row() == rRange.aEnd.Row(), "zuviele Zeilen");
SCROW nRow = rRange.aStart.Row();
SCTAB nTab = rRange.aStart.Tab();
ScDocFunc aFunc(*pDocSh);
@@ -9028,7 +9028,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
throw uno::RuntimeException();
ScDocument* pDoc = pDocSh->GetDocument();
const ScRange& rRange = GetRange();
- DBG_ASSERT(rRange.aStart.Row() == rRange.aEnd.Row(), "zuviele Zeilen");
+ OSL_ENSURE(rRange.aStart.Row() == rRange.aEnd.Row(), "zuviele Zeilen");
SCROW nRow = rRange.aStart.Row();
SCTAB nTab = rRange.aStart.Tab();
@@ -9191,7 +9191,7 @@ ScCellsEnumeration::~ScCellsEnumeration()
void ScCellsEnumeration::Advance_Impl()
{
- DBG_ASSERT(!bAtEnd,"zuviel Advance_Impl");
+ OSL_ENSURE(!bAtEnd,"zuviel Advance_Impl");
if (!pMark)
{
pMark = new ScMarkData;
@@ -9276,7 +9276,7 @@ ScCellFormatsObj::ScCellFormatsObj(ScDocShell* pDocSh, const ScRange& rRange) :
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->AddUnoObject(*this);
- DBG_ASSERT( aTotalRange.aStart.Tab() == aTotalRange.aEnd.Tab(), "unterschiedliche Tabellen" );
+ OSL_ENSURE( aTotalRange.aStart.Tab() == aTotalRange.aEnd.Tab(), "unterschiedliche Tabellen" );
}
ScCellFormatsObj::~ScCellFormatsObj()
@@ -9401,7 +9401,7 @@ ScCellFormatsEnumeration::ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScR
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->AddUnoObject(*this);
- DBG_ASSERT( rRange.aStart.Tab() == rRange.aEnd.Tab(),
+ OSL_ENSURE( rRange.aStart.Tab() == rRange.aEnd.Tab(),
"CellFormatsEnumeration: unterschiedliche Tabellen" );
pIter = new ScAttrRectIterator( pDoc, nTab,
@@ -9419,7 +9419,7 @@ ScCellFormatsEnumeration::~ScCellFormatsEnumeration()
void ScCellFormatsEnumeration::Advance_Impl()
{
- DBG_ASSERT(!bAtEnd,"zuviel Advance_Impl");
+ OSL_ENSURE(!bAtEnd,"zuviel Advance_Impl");
if ( pIter )
{
@@ -9506,7 +9506,7 @@ ScUniqueCellFormatsObj::ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange
{
pDocShell->GetDocument()->AddUnoObject(*this);
- DBG_ASSERT( aTotalRange.aStart.Tab() == aTotalRange.aEnd.Tab(), "unterschiedliche Tabellen" );
+ OSL_ENSURE( aTotalRange.aStart.Tab() == aTotalRange.aEnd.Tab(), "unterschiedliche Tabellen" );
GetObjects_Impl();
}
@@ -9672,7 +9672,7 @@ struct ScUniqueFormatsOrder
bool operator()( const ScRangeList& rList1, const ScRangeList& rList2 ) const
{
// all range lists have at least one entry
- DBG_ASSERT( rList1.size() > 0 && rList2.size() > 0, "ScUniqueFormatsOrder: empty list" );
+ OSL_ENSURE( rList1.size() > 0 && rList2.size() > 0, "ScUniqueFormatsOrder: empty list" );
// compare start positions using ScAddress comparison operator
return ( rList1[ 0 ]->aStart < rList2[ 0 ]->aStart );
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 31d5417bf99e..f20740594b91 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -167,7 +167,7 @@ namespace calc
void SAL_CALL OCellValueBinding::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
DBG_CHKTHIS( OCellValueBinding, checkConsistency_static );
- DBG_ASSERT( _nHandle == PROP_HANDLE_BOUND_CELL, "OCellValueBinding::getFastPropertyValue: invalid handle!" );
+ OSL_ENSURE( _nHandle == PROP_HANDLE_BOUND_CELL, "OCellValueBinding::getFastPropertyValue: invalid handle!" );
// we only have this one property ....
(void)_nHandle; // avoid warning in product version
@@ -239,7 +239,7 @@ namespace calc
switch ( aType.getTypeClass() )
{
case TypeClass_STRING:
- DBG_ASSERT( m_xCellText.is(), "OCellValueBinding::getValue: don't have a text!" );
+ OSL_ENSURE( m_xCellText.is(), "OCellValueBinding::getValue: don't have a text!" );
if ( m_xCellText.is() )
aReturn <<= m_xCellText->getString();
else
@@ -247,7 +247,7 @@ namespace calc
break;
case TypeClass_BOOLEAN:
- DBG_ASSERT( m_xCell.is(), "OCellValueBinding::getValue: don't have a double value supplier!" );
+ OSL_ENSURE( m_xCell.is(), "OCellValueBinding::getValue: don't have a double value supplier!" );
if ( m_xCell.is() )
{
// check if the cell has a numeric value (this might go into a helper function):
@@ -283,7 +283,7 @@ namespace calc
break;
case TypeClass_DOUBLE:
- DBG_ASSERT( m_xCell.is(), "OCellValueBinding::getValue: don't have a double value supplier!" );
+ OSL_ENSURE( m_xCell.is(), "OCellValueBinding::getValue: don't have a double value supplier!" );
if ( m_xCell.is() )
aReturn <<= m_xCell->getValue();
else
@@ -291,7 +291,7 @@ namespace calc
break;
case TypeClass_LONG:
- DBG_ASSERT( m_xCell.is(), "OCellValueBinding::getValue: don't have a double value supplier!" );
+ OSL_ENSURE( m_xCell.is(), "OCellValueBinding::getValue: don't have a double value supplier!" );
if ( m_xCell.is() )
{
// The list position value in the cell is 1-based.
@@ -327,7 +327,7 @@ namespace calc
{
case TypeClass_STRING:
{
- DBG_ASSERT( m_xCellText.is(), "OCellValueBinding::setValue: don't have a text!" );
+ OSL_ENSURE( m_xCellText.is(), "OCellValueBinding::setValue: don't have a text!" );
::rtl::OUString sText;
aValue >>= sText;
@@ -338,7 +338,7 @@ namespace calc
case TypeClass_BOOLEAN:
{
- DBG_ASSERT( m_xCell.is(), "OCellValueBinding::setValue: don't have a double value supplier!" );
+ OSL_ENSURE( m_xCell.is(), "OCellValueBinding::setValue: don't have a double value supplier!" );
// boolean is stored as values 0 or 1
// TODO: set the number format to boolean if no format is set?
@@ -356,7 +356,7 @@ namespace calc
case TypeClass_DOUBLE:
{
- DBG_ASSERT( m_xCell.is(), "OCellValueBinding::setValue: don't have a double value supplier!" );
+ OSL_ENSURE( m_xCell.is(), "OCellValueBinding::setValue: don't have a double value supplier!" );
double nValue = 0;
aValue >>= nValue;
@@ -367,7 +367,7 @@ namespace calc
case TypeClass_LONG:
{
- DBG_ASSERT( m_xCell.is(), "OCellValueBinding::setValue: don't have a double value supplier!" );
+ OSL_ENSURE( m_xCell.is(), "OCellValueBinding::setValue: don't have a double value supplier!" );
sal_Int32 nValue = 0;
aValue >>= nValue; // list index from control layer (0-based)
@@ -382,7 +382,7 @@ namespace calc
// #N/A error value can only be set using XCellRangeData
Reference<XCellRangeData> xData( m_xCell, UNO_QUERY );
- DBG_ASSERT( xData.is(), "OCellValueBinding::setValue: don't have XCellRangeData!" );
+ OSL_ENSURE( xData.is(), "OCellValueBinding::setValue: don't have XCellRangeData!" );
if ( xData.is() )
{
Sequence<Any> aInner(1); // one empty element
@@ -610,20 +610,20 @@ namespace calc
Reference< XIndexAccess > xSheets;
if ( m_xDocument.is() )
xSheets.set(xSheets.query( m_xDocument->getSheets( ) ));
- DBG_ASSERT( xSheets.is(), "OCellValueBinding::initialize: could not retrieve the sheets!" );
+ OSL_ENSURE( xSheets.is(), "OCellValueBinding::initialize: could not retrieve the sheets!" );
if ( xSheets.is() )
{
// the concrete sheet
Reference< XCellRange > xSheet(xSheets->getByIndex( aAddress.Sheet ), UNO_QUERY);
- DBG_ASSERT( xSheet.is(), "OCellValueBinding::initialize: NULL sheet, but no exception!" );
+ OSL_ENSURE( xSheet.is(), "OCellValueBinding::initialize: NULL sheet, but no exception!" );
// the concrete cell
if ( xSheet.is() )
{
m_xCell.set(xSheet->getCellByPosition( aAddress.Column, aAddress.Row ));
Reference< XCellAddressable > xAddressAccess( m_xCell, UNO_QUERY );
- DBG_ASSERT( xAddressAccess.is(), "OCellValueBinding::initialize: either NULL cell, or cell without address access!" );
+ OSL_ENSURE( xAddressAccess.is(), "OCellValueBinding::initialize: either NULL cell, or cell without address access!" );
}
}
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 77ab17192b9d..45fd009f19c1 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -190,15 +190,15 @@ struct TokenTable
void push_back( FormulaToken* pToken )
{
maTokens.push_back( pToken );
- DBG_ASSERT( maTokens.size()<= static_cast<sal_uInt32>( mnColCount*mnRowCount ), "too much tokens" );
+ OSL_ENSURE( maTokens.size()<= static_cast<sal_uInt32>( mnColCount*mnRowCount ), "too much tokens" );
}
sal_uInt32 getIndex(SCCOL nCol, SCROW nRow) const
{
- DBG_ASSERT( nCol<mnColCount, "wrong column index" );
- DBG_ASSERT( nRow<mnRowCount, "wrong row index" );
+ OSL_ENSURE( nCol<mnColCount, "wrong column index" );
+ OSL_ENSURE( nRow<mnRowCount, "wrong row index" );
sal_uInt32 nRet = static_cast<sal_uInt32>(nCol*mnRowCount + nRow);
- DBG_ASSERT( maTokens.size()>= static_cast<sal_uInt32>( mnColCount*mnRowCount ), "too few tokens" );
+ OSL_ENSURE( maTokens.size()>= static_cast<sal_uInt32>( mnColCount*mnRowCount ), "too few tokens" );
return nRet;
}
@@ -1710,7 +1710,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
// parse given data source and collect infos
{
SolarMutexGuard aGuard;
- DBG_ASSERT( m_pDocument, "No Document -> no detectArguments" );
+ OSL_ENSURE( m_pDocument, "No Document -> no detectArguments" );
if(!m_pDocument ||!xDataSource.is())
return lcl_VectorToSequence( aResult );
@@ -1980,7 +1980,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL
SolarMutexGuard aGuard;
uno::Reference< chart2::data::XDataSequence > xResult;
- DBG_ASSERT( m_pDocument, "No Document -> no createDataSequenceByRangeRepresentation" );
+ OSL_ENSURE( m_pDocument, "No Document -> no createDataSequenceByRangeRepresentation" );
if(!m_pDocument || (aRangeRepresentation.getLength() == 0))
return xResult;
@@ -2260,7 +2260,7 @@ ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
, m_bGotDataChangedHint(false)
, m_bExtDataRebuildQueued(false)
{
- DBG_ASSERT(pTokens, "reference token list is null");
+ OSL_ENSURE(pTokens, "reference token list is null");
if ( m_pDocument )
{
@@ -2550,7 +2550,7 @@ void ScChart2DataSequence::UpdateTokensFromRanges(const ScRangeList& rRanges)
{
ScTokenRef pToken;
const ScRange* pRange = rRanges[i];
- DBG_ASSERT(pRange, "range object is NULL.");
+ OSL_ENSURE(pRange, "range object is NULL.");
ScRefTokenHelper::getTokenFromRange(pToken, *pRange);
sal_uInt32 nOrigPos = (*m_pRangeIndices)[i];
@@ -2677,7 +2677,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
}
}
- DBG_ASSERT(m_pRangeIndices->size() == static_cast<size_t>(aRanges.size()),
+ OSL_ENSURE(m_pRangeIndices->size() == static_cast<size_t>(aRanges.size()),
"range list and range index list have different sizes.");
auto_ptr<ScRangeList> pUndoRanges;
@@ -2690,7 +2690,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
if (bChanged)
{
- DBG_ASSERT(m_pRangeIndices->size() == aRanges.size(),
+ OSL_ENSURE(m_pRangeIndices->size() == aRanges.size(),
"range list and range index list have different sizes after the reference update.");
// Bring the change back from the range list to the token list.
@@ -2879,7 +2879,7 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2DataSequence::getTextualData( )
{
SolarMutexGuard aGuard;
OUString aStr;
- DBG_ASSERT( m_pDocument, "No Document -> no SourceRangeRepresentation" );
+ OSL_ENSURE( m_pDocument, "No Document -> no SourceRangeRepresentation" );
if (m_pDocument && m_pTokens.get())
lcl_convertTokensToString(aStr, *m_pTokens, m_pDocument);
@@ -3408,7 +3408,7 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::getTextualDat
sal_Int32 nCount = 0;
ScRange* p;
- DBG_ASSERT(m_xRanges->Count() == 1, "not handled count of ranges");
+ OSL_ENSURE(m_xRanges->Count() == 1, "not handled count of ranges");
for ( p = m_xRanges->First(); p; p = m_xRanges->Next())
{
@@ -3450,7 +3450,7 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::getTextualDat
{
SolarMutexGuard aGuard;
String aStr;
- DBG_ASSERT( m_pDocument, "No Document -> no SourceRangeRepresentation" );
+ OSL_ENSURE( m_pDocument, "No Document -> no SourceRangeRepresentation" );
if( m_pDocument )
m_xRanges->Format( aStr, SCR_ABS_3D, m_pDocument, m_pDocument->GetAddressConvention() );
return aStr;
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index c1f63ac9407e..bfc7d8477c9c 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -78,7 +78,7 @@ SdrOle2Obj* lcl_FindChartObj( ScDocShell* pDocShell, SCTAB nTab, const String& r
if (pDrawLayer)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage, "Page nicht gefunden");
+ OSL_ENSURE(pPage, "Page nicht gefunden");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -139,7 +139,7 @@ ScChartObj* ScChartsObj::GetObjectByIndex_Impl(long nIndex) const
if (pDrawLayer)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage, "Page nicht gefunden");
+ OSL_ENSURE(pPage, "Page nicht gefunden");
if (pPage)
{
long nPos = 0;
@@ -192,7 +192,7 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
ScDocument* pDoc = pDocShell->GetDocument();
ScDrawLayer* pModel = pDocShell->MakeDrawLayer();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"addChart: keine Page");
+ OSL_ENSURE(pPage,"addChart: keine Page");
if (!pPage || !pDoc)
return;
@@ -344,7 +344,7 @@ sal_Int32 SAL_CALL ScChartsObj::getCount() throw(uno::RuntimeException)
if (pDrawLayer)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage, "Page nicht gefunden");
+ OSL_ENSURE(pPage, "Page nicht gefunden");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -413,7 +413,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScChartsObj::getElementNames() throw(uno::
if (pDrawLayer)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage, "Page nicht gefunden");
+ OSL_ENSURE(pPage, "Page nicht gefunden");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -427,14 +427,14 @@ uno::Sequence<rtl::OUString> SAL_CALL ScChartsObj::getElementNames() throw(uno::
if ( xObj.is() )
aName = pDocShell->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj );
- DBG_ASSERT(nPos<nCount, "huch, verzaehlt?");
+ OSL_ENSURE(nPos<nCount, "huch, verzaehlt?");
pAry[nPos++] = aName;
}
pObject = aIter.Next();
}
}
}
- DBG_ASSERT(nPos==nCount, "nanu, verzaehlt?");
+ OSL_ENSURE(nPos==nCount, "nanu, verzaehlt?");
return aSeq;
}
diff --git a/sc/source/ui/unoobj/convuno.cxx b/sc/source/ui/unoobj/convuno.cxx
index 7781ecf6ac4a..1580bda95b4e 100644
--- a/sc/source/ui/unoobj/convuno.cxx
+++ b/sc/source/ui/unoobj/convuno.cxx
@@ -31,7 +31,6 @@
-#include <tools/debug.hxx>
#include <i18npool/mslangid.hxx>
#include "convuno.hxx"
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index 553ba56e6cd4..e6f59ccdfdef 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -120,7 +120,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aOneRange( *rRanges[ 0 ] );
aOneRange.Justify();
@@ -145,7 +145,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentArray() throw(uno::RuntimeExcept
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aOneRange( *rRanges[ 0 ] );
aOneRange.Justify();
@@ -180,7 +180,7 @@ void SAL_CALL ScCellCursorObj::collapseToMergedArea() throw(uno::RuntimeExceptio
if ( pDocSh )
{
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aNewRange( *rRanges[ 0 ] );
ScDocument* pDoc = pDocSh->GetDocument();
@@ -195,7 +195,7 @@ void SAL_CALL ScCellCursorObj::expandToEntireColumns() throw(uno::RuntimeExcepti
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aNewRange( *rRanges[ 0 ] );
aNewRange.aStart.SetRow( 0 );
@@ -208,7 +208,7 @@ void SAL_CALL ScCellCursorObj::expandToEntireRows() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aNewRange( *rRanges[ 0 ] );
aNewRange.aStart.SetCol( 0 );
@@ -229,7 +229,7 @@ void SAL_CALL ScCellCursorObj::collapseToSize( sal_Int32 nColumns, sal_Int32 nRo
else
{
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aNewRange( *rRanges[ 0 ] );
aNewRange.Justify(); //! wirklich?
@@ -261,7 +261,7 @@ void SAL_CALL ScCellCursorObj::gotoStartOfUsedArea( sal_Bool bExpand )
if ( pDocSh )
{
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aNewRange( *rRanges[0] );
SCTAB nTab = aNewRange.aStart.Tab();
@@ -289,7 +289,7 @@ void SAL_CALL ScCellCursorObj::gotoEndOfUsedArea( sal_Bool bExpand )
if ( pDocSh )
{
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aNewRange( *rRanges[ 0 ]);
SCTAB nTab = aNewRange.aStart.Tab();
@@ -318,7 +318,7 @@ void SAL_CALL ScCellCursorObj::gotoStart() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aOneRange( *rRanges[ 0 ]);
aOneRange.Justify();
@@ -346,7 +346,7 @@ void SAL_CALL ScCellCursorObj::gotoEnd() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aOneRange( *rRanges[ 0 ] );
aOneRange.Justify();
@@ -371,7 +371,7 @@ void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aOneRange( *rRanges[ 0 ] );
aOneRange.Justify();
@@ -393,7 +393,7 @@ void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aOneRange( *rRanges[ 0 ] );
aOneRange.Justify();
@@ -416,7 +416,7 @@ void SAL_CALL ScCellCursorObj::gotoOffset( sal_Int32 nColumnOffset, sal_Int32 nR
{
SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
- DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
+ OSL_ENSURE( rRanges.size() == 1, "Range? Ranges?" );
ScRange aOneRange( *rRanges[ 0 ] );
aOneRange.Justify();
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c014eaa6024f..b58cebe5dca8 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -799,7 +799,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
if (pDPObject)
{
ScDPSaveData* pOldData = pDPObject->GetSaveData();
- DBG_ASSERT(pOldData, "Here should be a SaveData");
+ OSL_ENSURE(pOldData, "Here should be a SaveData");
if ( pOldData )
{
ScDPSaveData aNewData( *pOldData );
@@ -942,7 +942,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
if (pDPObject)
{
ScDPSaveData* pOldData = pDPObject->GetSaveData();
- DBG_ASSERT(pOldData, "Here should be a SaveData");
+ OSL_ENSURE(pOldData, "Here should be a SaveData");
if ( pOldData )
{
ScDPSaveData aNewData( *pOldData );
@@ -2711,7 +2711,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
if (xFields.is())
{
xRet.set(xFields->getByName(sNewDim), UNO_QUERY);
- DBG_ASSERT(xRet.is(), "there is a name, so there should be also a field");
+ OSL_ENSURE(xRet.is(), "there is a name, so there should be also a field");
}
}
return xRet;
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index cd373ab8fa01..5cb925878ff0 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -31,7 +31,6 @@
-#include <tools/debug.hxx>
#include <svl/smplhint.hxx>
#include <svl/zforlist.hxx>
#include <rtl/uuid.h>
@@ -214,7 +213,7 @@ long ScImportDescriptor::GetPropertyCount()
void ScImportDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq, const ScImportParam& rParam )
{
- DBG_ASSERT( rSeq.getLength() == GetPropertyCount(), "falscher Count" );
+ OSL_ENSURE( rSeq.getLength() == GetPropertyCount(), "falscher Count" );
beans::PropertyValue* pArray = rSeq.getArray();
@@ -324,7 +323,7 @@ long ScSortDescriptor::GetPropertyCount()
void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq, const ScSortParam& rParam )
{
- DBG_ASSERT( rSeq.getLength() == GetPropertyCount(), "falscher Count" );
+ OSL_ENSURE( rSeq.getLength() == GetPropertyCount(), "falscher Count" );
beans::PropertyValue* pArray = rSeq.getArray();
@@ -513,7 +512,7 @@ ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uIn
rParent( *pDesc ),
nPos( nP )
{
- DBG_ASSERT(pDesc, "ScSubTotalFieldObj: Parent ist 0");
+ OSL_ENSURE(pDesc, "ScSubTotalFieldObj: Parent ist 0");
}
ScSubTotalFieldObj::~ScSubTotalFieldObj()
@@ -1067,7 +1066,7 @@ void ScFilterDescriptorBase::fillQueryParam(
const uno::Sequence<sheet::TableFilterField2>& aFilterFields)
{
SCSIZE nCount = static_cast<SCSIZE>(aFilterFields.getLength());
- DBG_ASSERT( nCount <= MAXQUERY, "setFilterFields: zu viele" );
+ OSL_ENSURE( nCount <= MAXQUERY, "setFilterFields: zu viele" );
rParam.Resize( nCount );
@@ -1316,7 +1315,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
GetData(aParam);
SCSIZE nCount = static_cast<SCSIZE>(aFilterFields.getLength());
- DBG_ASSERT( nCount <= MAXQUERY, "setFilterFields: zu viele" );
+ OSL_ENSURE( nCount <= MAXQUERY, "setFilterFields: zu viele" );
aParam.Resize( nCount );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 4a22857fb02d..1ca206672ce1 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -228,7 +228,7 @@ ScPrintUIOptions::ScPrintUIOptions()
sal_Bool bSuppress = rPrintOpt.GetSkipEmpty();
ResStringArray aStrings( ScResId( SCSTR_PRINT_OPTIONS ) );
- DBG_ASSERT( aStrings.Count() >= 10, "resource incomplete" );
+ OSL_ENSURE( aStrings.Count() >= 10, "resource incomplete" );
if( aStrings.Count() < 10 ) // bad resource ?
return;
@@ -725,7 +725,7 @@ bool lcl_ParseTarget( const String& rTarget, ScRange& rTargetRange, Rectangle& r
for (SCTAB i=0; i<nTabCount && !bRangeValid; 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 );
@@ -760,8 +760,8 @@ sal_Bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
ScMarkData& rMark,
ScPrintSelectionStatus& rStatus, String& rPagesStr ) const
{
- DBG_ASSERT( !rMark.IsMarked() && !rMark.IsMultiMarked(), "FillRenderMarkData: MarkData must be empty" );
- DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" );
+ OSL_ENSURE( !rMark.IsMarked() && !rMark.IsMultiMarked(), "FillRenderMarkData: MarkData must be empty" );
+ OSL_ENSURE( pDocShell, "FillRenderMarkData: DocShell must be set" );
sal_Bool bDone = false;
@@ -1558,7 +1558,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( )
xRet.set(uno::Reference < container::XIndexAccess >::query(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.IndexedPropertyValues")))));
uno::Reference < container::XIndexContainer > xCont( xRet, uno::UNO_QUERY );
- DBG_ASSERT( xCont.is(), "ScModelObj::getViewData() failed for OLE object" );
+ OSL_ENSURE( xCont.is(), "ScModelObj::getViewData() failed for OLE object" );
if( xCont.is() )
{
uno::Sequence< beans::PropertyValue > aSeq;
@@ -2301,11 +2301,11 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int
if (pDocShell)
{
ScDrawLayer* pDrawLayer = pDocShell->MakeDrawLayer();
- DBG_ASSERT(pDrawLayer,"kann Draw-Layer nicht anlegen");
+ OSL_ENSURE(pDrawLayer,"kann Draw-Layer nicht anlegen");
if ( pDrawLayer && nIndex >= 0 && nIndex < pDocShell->GetDocument()->GetTableCount() )
{
SdrPage* pPage = pDrawLayer->GetPage((sal_uInt16)nIndex);
- DBG_ASSERT(pPage,"Draw-Page nicht gefunden");
+ OSL_ENSURE(pPage,"Draw-Page nicht gefunden");
if (pPage)
{
return uno::Reference<drawing::XDrawPage> (pPage->getUnoPage(), uno::UNO_QUERY);
@@ -3430,7 +3430,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
SolarMutexGuard aGuard;
if (pDocShell)
{
- DBG_ASSERT( aPosition.Sheet == nTab, "addAnnotation mit falschem Sheet" );
+ OSL_ENSURE( aPosition.Sheet == nTab, "addAnnotation mit falschem Sheet" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc( *pDocShell );
@@ -3595,7 +3595,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
const table::CellRangeAddress* pAry = aRanges.getConstArray();
for (sal_uInt16 i=0; i<nRangeCount; i++)
{
- DBG_ASSERT( pAry[i].Sheet == nTab, "addScenario mit falscher Tab" );
+ OSL_ENSURE( pAry[i].Sheet == nTab, "addScenario mit falscher Tab" );
ScRange aRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab,
(SCCOL)pAry[i].EndColumn, (SCROW)pAry[i].EndRow, nTab );
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 913476bbad2b..277844e0c93c 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -553,7 +553,7 @@ void ScCellFieldObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
SvxFieldItem ScCellFieldObj::CreateFieldItem()
{
- DBG_ASSERT( !pEditSource, "CreateFieldItem mit eingefuegtem Feld" );
+ OSL_ENSURE( !pEditSource, "CreateFieldItem mit eingefuegtem Feld" );
SvxURLField aField;
aField.SetFormat(SVXURLFORMAT_APPDEFAULT);
@@ -595,7 +595,7 @@ rtl::OUString SAL_CALL ScCellFieldObj::getPresentation( sal_Bool bShowCommand )
// Typ egal (in Zellen gibts nur URLs)
SvxFieldData* pField = aTempEngine.FindByPos( aSelection.nStartPara, aSelection.nStartPos, 0 );
- DBG_ASSERT(pField,"getPresentation: Feld nicht gefunden");
+ OSL_ENSURE(pField,"getPresentation: Feld nicht gefunden");
if (pField)
{
SvxURLField* pURL = (SvxURLField*)pField;
@@ -681,7 +681,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue(
// Typ egal (in Zellen gibts nur URLs)
SvxFieldData* pField = aTempEngine.FindByPos( aSelection.nStartPara, aSelection.nStartPos, 0 );
- DBG_ASSERT(pField,"setPropertyValue: Feld nicht gefunden");
+ OSL_ENSURE(pField,"setPropertyValue: Feld nicht gefunden");
if (pField)
{
SvxURLField* pURL = (SvxURLField*)pField; // ist eine Kopie in der ScUnoEditEngine
@@ -760,7 +760,7 @@ uno::Any SAL_CALL ScCellFieldObj::getPropertyValue( const rtl::OUString& aProper
// Typ egal (in Zellen gibts nur URLs)
SvxFieldData* pField = aTempEngine.FindByPos( aSelection.nStartPara, aSelection.nStartPos, 0 );
- DBG_ASSERT(pField,"getPropertyValue: Feld nicht gefunden");
+ OSL_ENSURE(pField,"getPropertyValue: Feld nicht gefunden");
if (pField)
{
SvxURLField* pURL = (SvxURLField*)pField;
@@ -854,7 +854,7 @@ ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, sal_uIn
nType( nT ),
mpRefreshListeners( NULL )
{
- DBG_ASSERT( pContentObj, "ScHeaderFieldsObj ohne Objekt?" );
+ OSL_ENSURE( pContentObj, "ScHeaderFieldsObj ohne Objekt?" );
if (pContentObj)
{
@@ -1174,7 +1174,7 @@ void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, sal_uInt16 n
{
if ( pContent && !pEditSource )
{
- DBG_ASSERT( !pContentObj, "ContentObj, aber kein EditSource?" );
+ OSL_ENSURE( !pContentObj, "ContentObj, aber kein EditSource?" );
aSelection = rSel;
nPart = nP;
@@ -1197,7 +1197,7 @@ ScHeaderFieldObj::~ScHeaderFieldObj()
SvxFieldItem ScHeaderFieldObj::CreateFieldItem()
{
- DBG_ASSERT( !pEditSource, "CreateFieldItem mit eingefuegtem Feld" );
+ OSL_ENSURE( !pEditSource, "CreateFieldItem mit eingefuegtem Feld" );
switch (nType)
{
@@ -1370,7 +1370,7 @@ void SAL_CALL ScHeaderFieldObj::setPropertyValue(
ScUnoEditEngine aTempEngine(pEditEngine);
SvxFieldData* pField = aTempEngine.FindByPos(
aSelection.nStartPara, aSelection.nStartPos, TYPE(SvxExtFileField) );
- DBG_ASSERT(pField,"setPropertyValue: Field not found");
+ OSL_ENSURE(pField,"setPropertyValue: Field not found");
if (pField)
{
SvxExtFileField* pExtFile = (SvxExtFileField*)pField; // local to the ScUnoEditEngine
@@ -1416,7 +1416,7 @@ uno::Any SAL_CALL ScHeaderFieldObj::getPropertyValue( const rtl::OUString& aProp
ScUnoEditEngine aTempEngine(pEditEngine);
SvxFieldData* pField = aTempEngine.FindByPos(
aSelection.nStartPara, aSelection.nStartPos, TYPE(SvxExtFileField) );
- DBG_ASSERT(pField,"setPropertyValue: Field not found");
+ OSL_ENSURE(pField,"setPropertyValue: Field not found");
if (pField)
{
const SvxExtFileField* pExtFile = (const SvxExtFileField*)pField;
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 9ca2f29ffccc..d9a8014ac5d6 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -151,7 +151,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
String aFilterString( aFilterName );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
if ( !bExport && aFilterString == ScDocShell::GetAsciiFilterName() )
{
@@ -171,7 +171,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
pInStream = utl::UcbStreamHelper::CreateStream( xInputStream );
AbstractScImportAsciiDlg* pDlg = pFact->CreateScImportAsciiDlg( NULL, aPrivDatName, pInStream, RID_SCDLG_ASCII, cAsciiDel);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
ScAsciiOptions aOptions;
@@ -235,7 +235,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
else if ( aFilterString == ScDocShell::GetLotusFilterName() )
{
// lotus is only imported
- DBG_ASSERT( !bExport, "Filter Options for Lotus Export is not implemented" );
+ OSL_ENSURE( !bExport, "Filter Options for Lotus Export is not implemented" );
aTitle = ScGlobal::GetRscString( STR_IMPORT_LOTUS );
eEncoding = RTL_TEXTENCODING_IBM_437;
@@ -277,7 +277,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
AbstractScImportOptionsDlg* pDlg = pFact->CreateScImportOptionsDlg( NULL, RID_SCDLG_IMPORTOPT,
bAscii, &aOptions, &aTitle, bMultiByte, bDBEnc,
!bExport);
- DBG_ASSERT(pDlg, "Dialog create fail!");
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
pDlg->GetImportOptions( aOptions );
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 1e9e52ad5660..f5a4bd4b0b3a 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -31,7 +31,6 @@
#include <boost/bind.hpp>
-#include <tools/debug.hxx>
#include <rtl/uuid.h>
#include <vcl/svapp.hxx>
#include <comphelper/servicehelper.hxx>
@@ -237,7 +236,7 @@ void ScTableConditionalFormat::FillFormat( ScConditionalFormat& rFormat,
{
// ScConditionalFormat = Core-Struktur, muss leer sein
- DBG_ASSERT( rFormat.IsEmpty(), "FillFormat: Format nicht leer" );
+ OSL_ENSURE( rFormat.IsEmpty(), "FillFormat: Format nicht leer" );
std::vector<ScTableConditionalEntry*>::const_iterator iter;
for (iter = aEntries.begin(); iter != aEntries.end(); ++iter)
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 75fcb8431a98..f49a2402ed85 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -31,7 +31,6 @@
-#include <tools/debug.hxx>
#include <sfx2/app.hxx>
#include <svl/itemprop.hxx>
@@ -136,19 +135,19 @@ ScTempDocCache::ScTempDocCache() :
ScTempDocCache::~ScTempDocCache()
{
- DBG_ASSERT( !bInUse, "ScTempDocCache dtor: bInUse" );
+ OSL_ENSURE( !bInUse, "ScTempDocCache dtor: bInUse" );
delete pDoc;
}
void ScTempDocCache::SetDocument( ScDocument* pNew )
{
- DBG_ASSERT( !pDoc, "ScTempDocCache::SetDocument: already set" );
+ OSL_ENSURE( !pDoc, "ScTempDocCache::SetDocument: already set" );
pDoc = pNew;
}
void ScTempDocCache::Clear()
{
- DBG_ASSERT( !bInUse, "ScTempDocCache::Clear: bInUse" );
+ OSL_ENSURE( !bInUse, "ScTempDocCache::Clear: bInUse" );
delete pDoc;
pDoc = NULL;
}
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 807528c5c77e..0990552b251a 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -590,7 +590,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u
delete pData;
}
}
- DBG_ASSERT( nPos==nLinkCount, "verzaehlt" );
+ OSL_ENSURE( nPos==nLinkCount, "verzaehlt" );
return aSeq;
}
return uno::Sequence<rtl::OUString>();
diff --git a/sc/source/ui/unoobj/listenercalls.cxx b/sc/source/ui/unoobj/listenercalls.cxx
index 9f5dd634f05b..1c2ac2a4b026 100644
--- a/sc/source/ui/unoobj/listenercalls.cxx
+++ b/sc/source/ui/unoobj/listenercalls.cxx
@@ -32,7 +32,6 @@
#include <com/sun/star/util/XModifyListener.hpp>
-#include <tools/debug.hxx>
#include "listenercalls.hxx"
@@ -46,7 +45,7 @@ ScUnoListenerCalls::ScUnoListenerCalls()
ScUnoListenerCalls::~ScUnoListenerCalls()
{
- DBG_ASSERT( aEntries.empty(), "unhandled listener calls remaining" );
+ OSL_ENSURE( aEntries.empty(), "unhandled listener calls remaining" );
}
void ScUnoListenerCalls::Add( const uno::Reference<util::XModifyListener>& rListener,
diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx
index df961ae45a46..5cdd8911ef2a 100644
--- a/sc/source/ui/unoobj/miscuno.cxx
+++ b/sc/source/ui/unoobj/miscuno.cxx
@@ -31,7 +31,6 @@
-#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
#include "miscuno.hxx"
diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx
index 204a139aae12..0079fdb3b0bc 100644
--- a/sc/source/ui/unoobj/scdetect.hxx
+++ b/sc/source/ui/unoobj/scdetect.hxx
@@ -30,7 +30,6 @@
#define _SC_TYPEDETECT_HXX
#include <rtl/ustring.hxx>
-#include <tools/debug.hxx>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.h>
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 898ad98ce86f..e83c19437215 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <tools/debug.hxx>
#include <sal/macros.h>
#include <svtools/unoimap.hxx>
#include <svx/unofill.hxx>
@@ -393,7 +392,7 @@ sal_uInt16 ScServiceProvider::GetProviderType(const String& rServiceName)
sal_uInt16 i;
for (i=0; i<SC_SERVICE_COUNT; i++)
{
- DBG_ASSERT( aOldNames[i], "ScServiceProvider::GetProviderType: no oldname => crash");
+ OSL_ENSURE( aOldNames[i], "ScServiceProvider::GetProviderType: no oldname => crash");
if (rServiceName.EqualsAscii( aOldNames[i] ))
{
OSL_FAIL("old service name used");
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 424f2685cbb1..55a2690b1d0d 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <tools/debug.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
#include <svtools/unoevent.hxx>
@@ -428,13 +427,13 @@ void SAL_CALL ScShapeObj::setPropertyValue(
if (aAddress.StartRow != aAddress.EndRow) //should be a Spreadsheet
{
- DBG_ASSERT(aAddress.StartRow == 0 && aAddress.EndRow == MAXROW &&
+ OSL_ENSURE(aAddress.StartRow == 0 && aAddress.EndRow == MAXROW &&
aAddress.StartColumn == 0 && aAddress.EndColumn == MAXCOL, "here should be a XSpreadsheet");
ScDrawLayer::SetPageAnchored(*pObj);
}
else
{
- DBG_ASSERT(aAddress.StartRow == aAddress.EndRow &&
+ OSL_ENSURE(aAddress.StartRow == aAddress.EndRow &&
aAddress.StartColumn == aAddress.EndColumn, "here should be a XCell");
ScDrawObjData aAnchor;
aAnchor.maStart = ScAddress(aAddress.StartColumn, aAddress.StartRow, aAddress.Sheet);
@@ -1302,7 +1301,7 @@ uno::Sequence<uno::Type> SAL_CALL ScShapeObj::getTypes() throw(uno::RuntimeExcep
uno::Reference<lang::XTypeProvider> xBaseProvider;
if ( mxShapeAgg.is() )
mxShapeAgg->queryAggregation( getCppuType((uno::Reference<lang::XTypeProvider>*) 0) ) >>= xBaseProvider;
- DBG_ASSERT( xBaseProvider.is(), "ScShapeObj: No XTypeProvider from aggregated shape!" );
+ OSL_ENSURE( xBaseProvider.is(), "ScShapeObj: No XTypeProvider from aggregated shape!" );
uno::Sequence< uno::Type > aAggTypes;
if( xBaseProvider.is() )
@@ -1410,7 +1409,7 @@ public:
if ( pProperties->Value >>= sValue )
{
ScMacroInfo* pInfo = getInfo( sal_True );
- DBG_ASSERT( pInfo, "shape macro info could not be created!" );
+ OSL_ENSURE( pInfo, "shape macro info could not be created!" );
if ( !pInfo )
break;
if ( pProperties->Name == SC_EVENTACC_SCRIPT )
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 165524c62b02..647c448c0917 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -993,7 +993,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
sal_uInt16 nPos = 0;
while (pStyle)
{
- DBG_ASSERT( nPos<nCount, "Anzahl durcheinandergekommen" );
+ OSL_ENSURE( nPos<nCount, "Anzahl durcheinandergekommen" );
if (nPos<nCount)
pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName(
pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 972c64013498..498f32656046 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -268,7 +268,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScLinkTargetTypeObj )
ScLinkTargetsObj::ScLinkTargetsObj( const uno::Reference< container::XNameAccess > & rColl ) :
xCollection( rColl )
{
- DBG_ASSERT( xCollection.is(), "ScLinkTargetsObj: NULL" );
+ OSL_ENSURE( xCollection.is(), "ScLinkTargetsObj: NULL" );
}
ScLinkTargetsObj::~ScLinkTargetsObj()
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index a436a951cf69..fbc51bef8ee6 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -1056,7 +1056,7 @@ void ScCellTextData::UpdateData()
{
if ( bDoUpdate )
{
- DBG_ASSERT(pEditEngine != NULL, "no EditEngine for UpdateData()");
+ OSL_ENSURE(pEditEngine != NULL, "no EditEngine for UpdateData()");
if ( pDocShell && pEditEngine )
{
// during the own UpdateData call, bDataValid must not be reset,
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 4152fb0fd412..60029f76cb34 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -975,10 +975,10 @@ ScVbaWorksheet::ShowDataForm( ) throw (uno::RuntimeException)
ScTabViewShell* pTabViewShell = excel::getBestViewShell( xModel );
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();
#else
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;
}