[Libreoffice-commits] .: chart2/source sc/inc sc/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Wed Mar 2 05:59:44 PST 2011


 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx              |    6 
 chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx |    6 
 chart2/source/controller/dialogs/DataBrowser.cxx                         |    2 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx                  |    2 
 chart2/source/controller/dialogs/res_DataLabel.cxx                       |    2 
 chart2/source/controller/dialogs/tp_Scale.cxx                            |    2 
 chart2/source/controller/main/ChartController_Properties.cxx             |    2 
 chart2/source/controller/main/ChartRenderer.cxx                          |    2 
 chart2/source/controller/main/ChartTransferable.cxx                      |    2 
 chart2/source/tools/CommonConverters.cxx                                 |    4 
 chart2/source/tools/LegendHelper.cxx                                     |    2 
 chart2/source/tools/ThreeDHelper.cxx                                     |    4 
 chart2/source/tools/WrappedPropertySet.cxx                               |    4 
 chart2/source/view/axes/VCartesianAxis.cxx                               |    2 
 chart2/source/view/charttypes/AreaChart.cxx                              |    2 
 chart2/source/view/charttypes/BarChart.cxx                               |   10 -
 chart2/source/view/charttypes/BubbleChart.cxx                            |    2 
 chart2/source/view/main/ChartView.cxx                                    |    4 
 chart2/source/view/main/Clipping.cxx                                     |    2 
 chart2/source/view/main/DrawModelWrapper.cxx                             |    2 
 chart2/source/view/main/NumberFormatterWrapper.cxx                       |    2 
 chart2/source/view/main/VDataSeries.cxx                                  |    2 
 chart2/source/view/main/VLegendSymbolFactory.cxx                         |    2 
 sc/inc/miscuno.hxx                                                       |    8 
 sc/source/core/data/attarray.cxx                                         |    8 
 sc/source/core/data/attrib.cxx                                           |   10 -
 sc/source/core/data/cell.cxx                                             |    8 
 sc/source/core/data/column.cxx                                           |    4 
 sc/source/core/data/conditio.cxx                                         |   10 -
 sc/source/core/data/dociter.cxx                                          |    6 
 sc/source/core/data/docpool.cxx                                          |    2 
 sc/source/core/data/documen2.cxx                                         |    6 
 sc/source/core/data/documen3.cxx                                         |   22 +-
 sc/source/core/data/documen4.cxx                                         |   10 -
 sc/source/core/data/documen8.cxx                                         |    2 
 sc/source/core/data/document.cxx                                         |   92 +++++-----
 sc/source/core/data/dpdimsave.cxx                                        |    4 
 sc/source/core/data/dpgroup.cxx                                          |   18 -
 sc/source/core/data/dpobject.cxx                                         |    8 
 sc/source/core/data/dpoutput.cxx                                         |    2 
 sc/source/core/data/dpsave.cxx                                           |    4 
 sc/source/core/data/dpsdbtab.cxx                                         |    2 
 sc/source/core/data/dpshttab.cxx                                         |    8 
 sc/source/core/data/dptabdat.cxx                                         |   10 -
 sc/source/core/data/dptabres.cxx                                         |   16 -
 sc/source/core/data/dptabsrc.cxx                                         |   50 ++---
 sc/source/core/data/drwlayer.cxx                                         |    4 
 sc/source/core/data/fillinfo.cxx                                         |    4 
 sc/source/core/data/funcdesc.cxx                                         |    2 
 sc/source/core/data/global.cxx                                           |    4 
 sc/source/core/data/markdata.cxx                                         |    2 
 sc/source/core/data/olinetab.cxx                                         |   12 -
 sc/source/core/data/patattr.cxx                                          |    4 
 sc/source/core/data/sortparam.cxx                                        |    2 
 sc/source/core/data/stlpool.cxx                                          |    2 
 sc/source/core/data/table1.cxx                                           |    2 
 sc/source/core/data/table2.cxx                                           |   38 ++--
 sc/source/core/data/table3.cxx                                           |    2 
 sc/source/core/data/table4.cxx                                           |    2 
 sc/source/core/data/table5.cxx                                           |    2 
 sc/source/core/data/table6.cxx                                           |    6 
 sc/source/core/data/tabprotection.cxx                                    |    4 
 sc/source/core/data/userdat.cxx                                          |    2 
 sc/source/core/data/validat.cxx                                          |    4 
 sc/source/core/inc/jumpmatrix.hxx                                        |    2 
 sc/source/core/tool/addincfg.cxx                                         |    2 
 sc/source/core/tool/addincol.cxx                                         |    6 
 sc/source/core/tool/adiasync.cxx                                         |    2 
 sc/source/core/tool/charthelper.cxx                                      |    2 
 sc/source/core/tool/chartlock.cxx                                        |    6 
 sc/source/core/tool/chgtrack.cxx                                         |   14 -
 sc/source/core/tool/compiler.cxx                                         |    4 
 sc/source/core/tool/consoli.cxx                                          |    2 
 sc/source/core/tool/detfunc.cxx                                          |    4 
 sc/source/core/tool/doubleref.cxx                                        |    2 
 sc/source/core/tool/editutil.cxx                                         |    2 
 sc/source/core/tool/filtopt.cxx                                          |    4 
 sc/source/core/tool/inputopt.cxx                                         |    2 
 sc/source/core/tool/interpr3.cxx                                         |    2 
 sc/source/core/tool/interpr4.cxx                                         |    4 
 sc/source/core/tool/progress.cxx                                         |    2 
 sc/source/core/tool/queryparam.cxx                                       |    2 
 sc/source/core/tool/rangenam.cxx                                         |    2 
 sc/source/core/tool/rangeseq.cxx                                         |    2 
 sc/source/core/tool/rangeutl.cxx                                         |    2 
 sc/source/core/tool/rechead.cxx                                          |    4 
 sc/source/core/tool/zforauto.cxx                                         |    2 
 sc/source/filter/dif/difimp.cxx                                          |    2 
 sc/source/filter/excel/excform.cxx                                       |    6 
 sc/source/filter/excel/read.cxx                                          |    4 
 sc/source/filter/excel/tokstack.cxx                                      |    6 
 sc/source/filter/excel/xlstyle.cxx                                       |    4 
 sc/source/filter/html/htmlpars.cxx                                       |    4 
 sc/source/filter/lotus/lotform.cxx                                       |    6 
 sc/source/filter/lotus/lotread.cxx                                       |    2 
 sc/source/filter/starcalc/scflt.cxx                                      |   20 +-
 sc/source/filter/xcl97/XclExpChangeTrack.cxx                             |    2 
 sc/source/filter/xcl97/XclImpChangeTrack.cxx                             |   10 -
 sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx                   |    6 
 sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx                   |   24 +-
 sc/source/filter/xml/XMLExportDataPilot.cxx                              |    2 
 sc/source/filter/xml/XMLExportIterator.cxx                               |    4 
 sc/source/filter/xml/XMLStylesExportHelper.cxx                           |    4 
 sc/source/filter/xml/XMLStylesImportHelper.cxx                           |    6 
 sc/source/filter/xml/XMLTableShapeResizer.cxx                            |    2 
 sc/source/filter/xml/XMLTrackedChangesContext.cxx                        |    2 
 sc/source/filter/xml/xmlcelli.cxx                                        |    2 
 sc/source/filter/xml/xmlexprt.cxx                                        |    2 
 sc/source/filter/xml/xmlimprt.cxx                                        |    8 
 sc/source/filter/xml/xmlstyle.cxx                                        |    4 
 sc/source/filter/xml/xmlstyli.cxx                                        |    2 
 sc/source/filter/xml/xmlsubti.cxx                                        |    2 
 sc/source/ui/Accessibility/AccessibleContextBase.cxx                     |   16 -
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx                     |    6 
 sc/source/ui/Accessibility/AccessibleTableBase.cxx                       |   28 +--
 sc/source/ui/Accessibility/AccessibleText.cxx                            |   42 ++--
 sc/source/ui/app/client.cxx                                              |    6 
 sc/source/ui/app/drwtrans.cxx                                            |    6 
 sc/source/ui/app/inputhdl.cxx                                            |   10 -
 sc/source/ui/app/scmod.cxx                                               |    6 
 sc/source/ui/app/scmod2.cxx                                              |    2 
 sc/source/ui/app/transobj.cxx                                            |   12 -
 sc/source/ui/app/wtcdummy.cxx                                            |    8 
 sc/source/ui/dbgui/dapidata.cxx                                          |    2 
 sc/source/ui/dbgui/filtdlg.cxx                                           |    4 
 sc/source/ui/dbgui/pvlaydlg.cxx                                          |    2 
 sc/source/ui/dbgui/tpsubt.cxx                                            |    4 
 sc/source/ui/docshell/dbdocfun.cxx                                       |   12 -
 sc/source/ui/docshell/dbdocimp.cxx                                       |    6 
 sc/source/ui/docshell/docfunc.cxx                                        |   22 +-
 sc/source/ui/docshell/docsh.cxx                                          |   22 +-
 sc/source/ui/docshell/docsh3.cxx                                         |   12 -
 sc/source/ui/docshell/docsh4.cxx                                         |   12 -
 sc/source/ui/docshell/docsh5.cxx                                         |    2 
 sc/source/ui/docshell/docsh8.cxx                                         |    8 
 sc/source/ui/docshell/externalrefmgr.cxx                                 |    6 
 sc/source/ui/docshell/servobj.cxx                                        |    2 
 sc/source/ui/drawfunc/drawsh4.cxx                                        |    2 
 sc/source/ui/drawfunc/drawsh5.cxx                                        |    4 
 sc/source/ui/drawfunc/drtxtob2.cxx                                       |    2 
 sc/source/ui/drawfunc/fuconarc.cxx                                       |    2 
 sc/source/ui/drawfunc/fuconpol.cxx                                       |    2 
 sc/source/ui/drawfunc/fuconrec.cxx                                       |    4 
 sc/source/ui/drawfunc/fuins2.cxx                                         |    4 
 sc/source/ui/drawfunc/futext.cxx                                         |    2 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                                   |    2 
 sc/source/ui/miscdlgs/sharedocdlg.cxx                                    |    2 
 sc/source/ui/navipi/content.cxx                                          |   12 -
 sc/source/ui/optdlg/tpusrlst.cxx                                         |    4 
 sc/source/ui/pagedlg/tphf.cxx                                            |    2 
 sc/source/ui/styleui/styledlg.cxx                                        |    2 
 sc/source/ui/undo/undoblk.cxx                                            |    4 
 sc/source/ui/undo/undoblk3.cxx                                           |    6 
 sc/source/ui/undo/undocell.cxx                                           |    4 
 sc/source/ui/undo/undodat.cxx                                            |    4 
 sc/source/ui/undo/undotab.cxx                                            |    4 
 sc/source/ui/unoobj/afmtuno.cxx                                          |    4 
 sc/source/ui/unoobj/celllistsource.cxx                                   |    4 
 sc/source/ui/unoobj/cellsuno.cxx                                         |   48 ++---
 sc/source/ui/unoobj/cellvaluebinding.cxx                                 |    8 
 sc/source/ui/unoobj/chart2uno.cxx                                        |   10 -
 sc/source/ui/unoobj/chartuno.cxx                                         |    2 
 sc/source/ui/unoobj/cursuno.cxx                                          |    4 
 sc/source/ui/unoobj/dapiuno.cxx                                          |    2 
 sc/source/ui/unoobj/datauno.cxx                                          |   22 +-
 sc/source/ui/unoobj/docuno.cxx                                           |   12 -
 sc/source/ui/unoobj/fielduno.cxx                                         |   12 -
 sc/source/ui/unoobj/fmtuno.cxx                                           |    2 
 sc/source/ui/unoobj/scdetect.cxx                                         |    2 
 sc/source/ui/unoobj/servuno.cxx                                          |    2 
 sc/source/ui/unoobj/shapeuno.cxx                                         |    8 
 sc/source/ui/unoobj/styleuno.cxx                                         |    6 
 sc/source/ui/unoobj/targuno.cxx                                          |    2 
 sc/source/ui/unoobj/viewuno.cxx                                          |    4 
 sc/source/ui/view/cellsh.cxx                                             |    2 
 sc/source/ui/view/cellsh1.cxx                                            |    8 
 sc/source/ui/view/cellsh2.cxx                                            |   10 -
 sc/source/ui/view/cellsh3.cxx                                            |    6 
 sc/source/ui/view/cellsh4.cxx                                            |    8 
 sc/source/ui/view/dbfunc.cxx                                             |    2 
 sc/source/ui/view/dbfunc3.cxx                                            |    4 
 sc/source/ui/view/drawview.cxx                                           |    4 
 sc/source/ui/view/formatsh.cxx                                           |    6 
 sc/source/ui/view/gridwin.cxx                                            |    6 
 sc/source/ui/view/gridwin2.cxx                                           |    2 
 sc/source/ui/view/gridwin4.cxx                                           |    4 
 sc/source/ui/view/output2.cxx                                            |   10 -
 sc/source/ui/view/preview.cxx                                            |    2 
 sc/source/ui/view/prevwsh.cxx                                            |    4 
 sc/source/ui/view/printfun.cxx                                           |   14 -
 sc/source/ui/view/tabcont.cxx                                            |    4 
 sc/source/ui/view/tabview.cxx                                            |    2 
 sc/source/ui/view/tabview2.cxx                                           |    4 
 sc/source/ui/view/tabview3.cxx                                           |    6 
 sc/source/ui/view/tabvwsh3.cxx                                           |    4 
 sc/source/ui/view/tabvwsh4.cxx                                           |    6 
 sc/source/ui/view/tabvwsh5.cxx                                           |    2 
 sc/source/ui/view/tabvwshb.cxx                                           |    4 
 sc/source/ui/view/tabvwshc.cxx                                           |    2 
 sc/source/ui/view/tabvwshe.cxx                                           |    2 
 sc/source/ui/view/tabvwshf.cxx                                           |    2 
 sc/source/ui/view/tabvwshh.cxx                                           |    4 
 sc/source/ui/view/viewdata.cxx                                           |   14 -
 sc/source/ui/view/viewfun2.cxx                                           |    2 
 sc/source/ui/view/viewfun3.cxx                                           |    2 
 sc/source/ui/view/viewfun4.cxx                                           |    2 
 sc/source/ui/view/viewfun5.cxx                                           |   10 -
 sc/source/ui/view/viewfun7.cxx                                           |    2 
 sc/source/ui/view/viewfunc.cxx                                           |    2 
 209 files changed, 671 insertions(+), 667 deletions(-)

New commits:
commit 7b3e53b0a2700324492ec36d097cc9e68cdb7350
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 19:05:02 2011 +0100

    Move DBG_ERROR to OSL_FAIL

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 91ad0d8..6e94705 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -757,7 +757,7 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition )
         aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height);
         if( aRelativePosition.Primary < 0 || aRelativePosition.Secondary < 0 || aRelativePosition.Primary > 1 || aRelativePosition.Secondary > 1 )
         {
-            DBG_ERROR("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" );
+            OSL_FAIL("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" );
             uno::Any aEmpty;
             xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty );
             return;
@@ -790,7 +790,7 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize )
 
         if( aRelativeSize.Primary > 1 || aRelativeSize.Secondary > 1 )
         {
-            DBG_ERROR("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" );
+            OSL_FAIL("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" );
             uno::Any aEmpty;
             xProp->setPropertyValue( C2U( "RelativeSize" ), aEmpty );
             return;
@@ -2043,7 +2043,7 @@ void SAL_CALL DiagramWrapper::setDiagram(
     throw (uno::RuntimeException)
 {
     //@todo: remove this method from interface
-    DBG_ERROR("DiagramWrapper::setDiagram is not implemented, should be removed and not be called" );
+    OSL_FAIL("DiagramWrapper::setDiagram is not implemented, should be removed and not be called" );
 }
 
 // ================================================================================
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
index 7aac28c..1116f62 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
@@ -90,7 +90,7 @@ Any WrappedNumberFormatProperty::getPropertyValue( const Reference< beans::XProp
 {
     if( !xInnerPropertySet.is() )
     {
-        DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue");
+        OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue");
         return Any();
     }
     Any aRet( xInnerPropertySet->getPropertyValue( m_aInnerName ));
@@ -142,7 +142,7 @@ void WrappedLinkNumberFormatProperty::setPropertyValue( const Any& rOuterValue,
 {
     if( !xInnerPropertySet.is() )
     {
-        DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::setPropertyValue");
+        OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::setPropertyValue");
         return;
     }
 
@@ -178,7 +178,7 @@ Any WrappedLinkNumberFormatProperty::getPropertyValue( const Reference< beans::X
 {
     if( !xInnerPropertySet.is() )
     {
-        DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue");
+        OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue");
         return getPropertyDefault(0);
     }
     bool bLink = ! xInnerPropertySet->getPropertyValue( C2U("NumberFormat" )).hasValue();
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 31f2d8a..85bbc8c 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -1096,7 +1096,7 @@ void DataBrowser::InitController(
     }
     else
     {
-        DBG_ERROR( "Invalid Controller" );
+        OSL_FAIL( "Invalid Controller" );
     }
 }
 
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index b32ab04..92355fa 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -401,7 +401,7 @@ OUString ObjectNameProvider::getTitleNameByType( TitleHelper::eTitleType eType )
             aRet=String(SchResId(STR_OBJECT_TITLE_SECONDARY_Y_AXIS));
             break;
         default:
-            DBG_ERROR("unknown title type");
+            OSL_FAIL("unknown title type");
             break;
     }
      
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 1468c09..9064275 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -236,7 +236,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton )
 {
     if( !m_pPool || !m_pNumberFormatter )
     {
-        DBG_ERROR("Missing item pool or number formatter");
+        OSL_FAIL("Missing item pool or number formatter");
         return 1;
     }
 
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index 9ade73b..1d98cfe 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -342,7 +342,7 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
 {
     if( !pNumFormatter )
     {
-        DBG_ERROR( "No NumberFormatter available" );
+        OSL_FAIL( "No NumberFormatter available" );
         return LEAVE_PAGE;
     }
 
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 605858f..78a485d 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -103,7 +103,7 @@ namespace
     ObjectType eObjectType = ObjectIdentifier::getObjectType( aObjectCID );
     if( OBJECTTYPE_UNKNOWN==eObjectType )
     {
-        DBG_ERROR("unknown ObjectType");
+        OSL_FAIL("unknown ObjectType");
         return NULL;
     }
 
diff --git a/chart2/source/controller/main/ChartRenderer.cxx b/chart2/source/controller/main/ChartRenderer.cxx
index 11f6417..920c540 100644
--- a/chart2/source/controller/main/ChartRenderer.cxx
+++ b/chart2/source/controller/main/ChartRenderer.cxx
@@ -82,7 +82,7 @@ bool ChartRenderer::DoPaint(OutputDevice* pOutDev, const Rectangle& rLogicObject
             if( aContainerChartSize.Width != aChartSize.Width
                 || aContainerChartSize.Height != aChartSize.Height )
             {
-                DBG_ERROR("chart size does not equal size assumed by the container");
+                OSL_FAIL("chart size does not equal size assumed by the container");
                 //correct the state here on the fly -> let the container size win
                 ChartModelHelper::setPageSize( aContainerChartSize, xModel );
             }
diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index ad8b0d9..7c78486 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -162,7 +162,7 @@ sal_Bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
             break;
         default:
             {
-                DBG_ERROR( "ChartTransferable::WriteObject: unknown object id" );
+                OSL_FAIL( "ChartTransferable::WriteObject: unknown object id" );
             }
             break;
     }
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx
index 9d2fd0e..0a73dfe 100644
--- a/chart2/source/tools/CommonConverters.cxx
+++ b/chart2/source/tools/CommonConverters.cxx
@@ -211,12 +211,12 @@ drawing::Position3D getPointFromPoly( const drawing::PolyPolygonShape3D& rPolygo
         }
         else
         {
-            DBG_ERROR("polygon was accessed with a wrong index");
+            OSL_FAIL("polygon was accessed with a wrong index");
         }
     }
     else
     {
-        DBG_ERROR("polygon was accessed with a wrong index");
+        OSL_FAIL("polygon was accessed with a wrong index");
     }
     return aRet;
 }
diff --git a/chart2/source/tools/LegendHelper.cxx b/chart2/source/tools/LegendHelper.cxx
index 2809637..512cc95 100644
--- a/chart2/source/tools/LegendHelper.cxx
+++ b/chart2/source/tools/LegendHelper.cxx
@@ -113,7 +113,7 @@ uno::Reference< chart2::XLegend > LegendHelper::getLegend(
             }
             else if(bCreate)
             {
-                DBG_ERROR("need diagram for creation of legend");
+                OSL_FAIL("need diagram for creation of legend");
             }
         }
         catch( uno::Exception & ex )
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx
index b7e63bc..83ee9d5 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -555,7 +555,7 @@ void ThreeDHelper::convertElevationRotationDegToXYZAngleRad(
         z = atan(tan(R) * sin(E));
         if(cos(z)==0.0)
         {
-            DBG_ERROR("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad");
+            OSL_FAIL("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad");
             return;
         }
         double cy = cos(R)/cos(z);
@@ -566,7 +566,7 @@ void ThreeDHelper::convertElevationRotationDegToXYZAngleRad(
         double fDenominator = cos(z)*(1.0-pow(sin(y),2));
         if(fDenominator==0.0)
         {
-            DBG_ERROR("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad");
+            OSL_FAIL("calculation error in ThreeDHelper::convertElevationRotationDegToXYZAngleRad");
             return;
         }
         double sx = cos(R)*sin(E)/fDenominator;
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index df24877..dc4c689 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -116,7 +116,7 @@ void SAL_CALL WrappedPropertySet::setPropertyValue( const OUString& rPropertyNam
         else
         {
 #if OSL_DEBUG_LEVEL > 1
-            DBG_ERROR("found no inner property set to map to");
+            OSL_FAIL("found no inner property set to map to");
 #endif
         }
     }
@@ -165,7 +165,7 @@ Any SAL_CALL WrappedPropertySet::getPropertyValue( const OUString& rPropertyName
         else
         {
 #if OSL_DEBUG_LEVEL > 1
-            DBG_ERROR("found no inner property set to map to");
+            OSL_FAIL("found no inner property set to map to");
 #endif
         }
     }
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 99a19c0..d84357f 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -832,7 +832,7 @@ B2DVector VCartesianAxis::getScreenPosition( double fLogicX, double fLogicY, dou
             }
             else
             {
-                DBG_ERROR("cannot calculate scrren position in VCartesianAxis::getScreenPosition");
+                OSL_FAIL("cannot calculate scrren position in VCartesianAxis::getScreenPosition");
             }
         }
         else
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 8c5ed91..7682553 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -912,7 +912,7 @@ void AreaChart::createShapes()
                                 //todo implement this different for area charts
                                 break;
                             default:
-                                DBG_ERROR("this label alignment is not implemented yet");
+                                OSL_FAIL("this label alignment is not implemented yet");
                                 aScenePosition3D.PositionY -= (aSymbolSize.DirectionY/2+1);
                                 eAlignment = LABEL_ALIGN_TOP;
                                 break;
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index feaba78..3f8bf98 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -191,7 +191,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
             {
                 fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0;
                 rAlignment = LABEL_ALIGN_CENTER;
-                DBG_ERROR( "top label placement is not really supported by horizontal bar charts" );
+                OSL_FAIL( "top label placement is not really supported by horizontal bar charts" );
             }
         }
         break;
@@ -208,7 +208,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
             {
                 fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0;
                 rAlignment = LABEL_ALIGN_CENTER;
-                DBG_ERROR( "bottom label placement is not supported by horizontal bar charts" );
+                OSL_FAIL( "bottom label placement is not supported by horizontal bar charts" );
             }
         }
         break;
@@ -225,7 +225,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
             {
                 fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0;
                 rAlignment = LABEL_ALIGN_CENTER;
-                DBG_ERROR( "left label placement is not supported by column charts" );
+                OSL_FAIL( "left label placement is not supported by column charts" );
             }
         }
         break;
@@ -242,7 +242,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
             {
                 fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0;
                 rAlignment = LABEL_ALIGN_CENTER;
-                DBG_ERROR( "right label placement is not supported by column charts" );
+                OSL_FAIL( "right label placement is not supported by column charts" );
             }
         }
         break;
@@ -286,7 +286,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
             fDepth = fabs(fScaledUpperBarDepth-fScaledLowerBarDepth)/2.0;
         break;
     default:
-        DBG_ERROR("this label alignment is not implemented yet");
+        OSL_FAIL("this label alignment is not implemented yet");
         
         break;
     }
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 638448a..b8d8daf 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -382,7 +382,7 @@ void BubbleChart::createShapes()
                                 eAlignment = LABEL_ALIGN_CENTER;
                                 break;
                             default:
-                                DBG_ERROR("this label alignment is not implemented yet");
+                                OSL_FAIL("this label alignment is not implemented yet");
                                 aScenePosition3D.PositionY -= (aSymbolSize.DirectionY/2+1);
                                 eAlignment = LABEL_ALIGN_TOP;
                                 break;
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 2a8ab68..204ba0b 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -191,7 +191,7 @@ void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments
     uno::Reference< frame::XModel > xNewChartModel;
     if( !(aArguments[0] >>= xNewChartModel) )
     {
-        DBG_ERROR( "need a Reference to frame::XModel as first parameter for view initialization" );
+        OSL_FAIL( "need a Reference to frame::XModel as first parameter for view initialization" );
     }
     impl_setChartModel( xNewChartModel );
 
@@ -2560,7 +2560,7 @@ void ChartView::createShapes()
         pPage->SetSize(Size(aPageSize.Width,aPageSize.Height));
     else
     {
-        DBG_ERROR("could not set page size correctly");
+        OSL_FAIL("could not set page size correctly");
     }
 
     {
diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx
index 2719e14..e23501e 100644
--- a/chart2/source/view/main/Clipping.cxx
+++ b/chart2/source/view/main/Clipping.cxx
@@ -191,7 +191,7 @@ void lcl_addPointToPoly( drawing::PolyPolygonShape3D& rPoly
         if( nNewResultPointCount > nReallocLength )
         {
             nReallocLength = nNewResultPointCount;
-            DBG_ERROR("this should not be the case to avoid performance problems");
+            OSL_FAIL("this should not be the case to avoid performance problems");
         }
         pOuterSequenceX->realloc(nReallocLength);
         pOuterSequenceY->realloc(nReallocLength);
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 83e0971..2b68f05 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -175,7 +175,7 @@ DrawModelWrapper::DrawModelWrapper(
     }
     catch(...)
     {
-        DBG_ERROR("Can't get Hyphenator or SpellChecker for chart");
+        OSL_FAIL("Can't get Hyphenator or SpellChecker for chart");
     }
 
     //ref device for font rendering
diff --git a/chart2/source/view/main/NumberFormatterWrapper.cxx b/chart2/source/view/main/NumberFormatterWrapper.cxx
index 24dd385..09d55e6 100644
--- a/chart2/source/view/main/NumberFormatterWrapper.cxx
+++ b/chart2/source/view/main/NumberFormatterWrapper.cxx
@@ -99,7 +99,7 @@ rtl::OUString NumberFormatterWrapper::getFormattedString(
     Color* pTextColor = NULL;
     if( !m_pNumberFormatter )
     {
-        DBG_ERROR("Need a NumberFormatter");
+        OSL_FAIL("Need a NumberFormatter");
         return aText;
     }
     // i99104 handle null date correctly
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 6f452b2..88627b1 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -606,7 +606,7 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe
             return nLabelPlacement;
         }
 
-        DBG_ERROR("no label placement supported");
+        OSL_FAIL("no label placement supported");
     }
     catch( uno::Exception& e )
     {
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index 485cc49..1420506 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -349,7 +349,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol(
                         }
                         else if( aSymbol.Style == chart2::SymbolStyle_AUTO )
                         {
-                            DBG_ERROR("the given parameter is not allowed to contain an automatic symbol style");
+                            OSL_FAIL("the given parameter is not allowed to contain an automatic symbol style");
                         }
                     }
                 }
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index 0f5c0fd..65d3d31 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -64,22 +64,22 @@ sal_Bool SAL_CALL ClassName::supportsService( const ::rtl::OUString& ServiceName
                             const uno::Reference<beans::XPropertyChangeListener>&)	\
                             throw(beans::UnknownPropertyException,					\
                             lang::WrappedTargetException, uno::RuntimeException)	\
-    { DBG_ERROR("not implemented"); }												\
+    { OSL_FAIL("not implemented"); }												\
     void SAL_CALL ClassName::removePropertyChangeListener( const rtl::OUString&,	\
                             const uno::Reference<beans::XPropertyChangeListener>&)	\
                             throw(beans::UnknownPropertyException,					\
                             lang::WrappedTargetException, uno::RuntimeException)	\
-    { DBG_ERROR("not implemented"); }												\
+    { OSL_FAIL("not implemented"); }												\
     void SAL_CALL ClassName::addVetoableChangeListener( const rtl::OUString&,		\
                             const uno::Reference<beans::XVetoableChangeListener>&)	\
                             throw(beans::UnknownPropertyException,					\
                             lang::WrappedTargetException, uno::RuntimeException)	\
-    { DBG_ERROR("not implemented"); }												\
+    { OSL_FAIL("not implemented"); }												\
     void SAL_CALL ClassName::removeVetoableChangeListener( const rtl::OUString&,	\
                             const uno::Reference<beans::XVetoableChangeListener>&)	\
                             throw(beans::UnknownPropertyException,					\
                             lang::WrappedTargetException, uno::RuntimeException)	\
-    { DBG_ERROR("not implemented"); }
+    { OSL_FAIL("not implemented"); }
 
 
 #define SC_QUERYINTERFACE(x)	\
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 39e4419..274464c 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -508,7 +508,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
         SCROW nStart=0;
         if (!Search( nStartRow, nPos ))
         {
-            DBG_ERROR("Search Failure");
+            OSL_FAIL("Search Failure");
             return;
         }
 
@@ -603,7 +603,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
         SCROW nStart=0;
         if (!Search( nStartRow, nPos ))
         {
-            DBG_ERROR("Search failure");
+            OSL_FAIL("Search failure");
             return;
         }
 
@@ -733,7 +733,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
         SCROW nStart=0;
         if (!Search( nStartRow, nPos ))
         {
-            DBG_ERROR("Search Failure");
+            OSL_FAIL("Search Failure");
             return;
         }
 
@@ -872,7 +872,7 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
         SCROW nStart=0;
         if (!Search( nStartRow, nPos ))
         {
-            DBG_ERROR("Search failure");
+            OSL_FAIL("Search failure");
             return;
         }
 
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 3035f2c..84f1a52 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -265,7 +265,7 @@ bool ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
         case MID_4 :
             rVal <<= (sal_Bool ) bHidePrint; break;
         default:
-            DBG_ERROR("Wrong MemberID!");
+            OSL_FAIL("Wrong MemberID!");
             return false;
     }
 
@@ -292,7 +292,7 @@ bool ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
             }
             else
             {
-                DBG_ERROR("exception - wrong argument");
+                OSL_FAIL("exception - wrong argument");
             }
             break;
         }
@@ -305,7 +305,7 @@ bool ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
         case MID_4 :
             bRet = (rVal >>= bVal); if (bRet) bHidePrint=bVal; break;
         default:
-            DBG_ERROR("Wrong MemberID!");
+            OSL_FAIL("Wrong MemberID!");
     }
 
     return bRet;
@@ -714,7 +714,7 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
 
     if (!bRet)
     {
-        DBG_ERROR("exception - wrong argument");
+        OSL_FAIL("exception - wrong argument");
     }
 
     return true;
@@ -924,7 +924,7 @@ void ScPageHFItem::SetArea( EditTextObject *pNew, int nArea )
         case SC_HF_CENTERAREA:  delete pCenterArea; pCenterArea = pNew; break;
         case SC_HF_RIGHTAREA:	delete pRightArea;  pRightArea  = pNew; break;
         default:
-            DBG_ERROR( "New Area?" );
+            OSL_FAIL( "New Area?" );
     }
 }
 
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 1f2fda4..0e9e9d6 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -127,7 +127,7 @@ ScBaseCell* lclCloneCell( const ScBaseCell& rSrcCell, ScDocument& rDestDoc, cons
             return new ScNoteCell;
         default:;
     }
-    DBG_ERROR( "lclCloneCell - unknown cell type" );
+    OSL_FAIL( "lclCloneCell - unknown cell type" );
     return 0;
 }
 
@@ -181,7 +181,7 @@ void ScBaseCell::Delete()
             delete (ScNoteCell*) this;
             break;
         default:
-            DBG_ERROR("Unbekannter Zellentyp");
+            OSL_FAIL("Unbekannter Zellentyp");
             break;
     }
 }
@@ -553,7 +553,7 @@ BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
                 return FALSE;		// unterschiedlich lang oder unterschiedliche Tokens
             }
         default:
-            DBG_ERROR("huch, was fuer Zellen???");
+            OSL_FAIL("huch, was fuer Zellen???");
     }
     return FALSE;
 }
@@ -880,7 +880,7 @@ void ScFormulaCell::GetFormula( rtl::OUStringBuffer& rBuffer,
         }
         else
         {
-            DBG_ERROR("ScFormulaCell::GetFormula: not a matrix");
+            OSL_FAIL("ScFormulaCell::GetFormula: not a matrix");
         }
     }
     else
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index d47adbc..9e13354 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -570,7 +570,7 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, bool&
     rFound = false;
     if (!rMark.IsMultiMarked())
     {
-        DBG_ERROR("ScColumn::GetSelectionStyle ohne Selektion");
+        OSL_FAIL("ScColumn::GetSelectionStyle ohne Selektion");
         return NULL;
     }
 
@@ -1279,7 +1279,7 @@ void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, bool bM
         }
         else
         {
-            DBG_ERROR("CopyToColumn: bMarked, aber keine Markierung");
+            OSL_FAIL("CopyToColumn: bMarked, aber keine Markierung");
         }
         return;
     }
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 6b1db6e..272090a 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -852,7 +852,7 @@ BOOL ScConditionEntry::IsValid( double nArg, const ScAddress& rAddr ) const
             bValid = !::rtl::math::approxEqual( nComp1, 0.0 );
             break;
         default:
-            DBG_ERROR("unbekannte Operation bei ScConditionEntry");
+            OSL_FAIL("unbekannte Operation bei ScConditionEntry");
             break;
     }
     return bValid;
@@ -936,7 +936,7 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg, const ScAddress& rAddr )
                     break;
                 //	SC_COND_DIRECT schon oben abgefragt
                 default:
-                    DBG_ERROR("unbekannte Operation bei ScConditionEntry");
+                    OSL_FAIL("unbekannte Operation bei ScConditionEntry");
                     bValid = FALSE;
                     break;
             }
@@ -1003,7 +1003,7 @@ String ScConditionEntry::GetExpression( const ScAddress& rCursor, USHORT nIndex,
     }
     else
     {
-        DBG_ERROR("GetExpression: falscher Index");
+        OSL_FAIL("GetExpression: falscher Index");
     }
 
     return aRet;
@@ -1042,7 +1042,7 @@ ScTokenArray* ScConditionEntry::CreateTokenArry( USHORT nIndex ) const
     }
     else
     {
-        DBG_ERROR("GetExpression: falscher Index");
+        OSL_FAIL("GetExpression: falscher Index");
     }
 
     return pRet;
@@ -1621,7 +1621,7 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
         if ((*this)[i]->GetKey() == nKey)
             return (*this)[i];
 
-    DBG_ERROR("ScConditionalFormatList: Eintrag nicht gefunden");
+    OSL_FAIL("ScConditionalFormatList: Eintrag nicht gefunden");
     return NULL;
 }
 
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index bc1e577..af2564f 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -947,7 +947,7 @@ ScCellIterator::ScCellIterator( ScDocument* pDocument,
 
     if (!pDoc->pTab[nTab])
     {
-        DBG_ERROR("Tabelle nicht gefunden");
+        OSL_FAIL("Tabelle nicht gefunden");
         nStartCol = nCol = MAXCOL+1;
         nStartRow = nRow = MAXROW+1;
         nStartTab = nTab = MAXTAB+1;	// -> Abbruch bei GetFirst
@@ -989,7 +989,7 @@ ScCellIterator::ScCellIterator
 
     if (!pDoc->pTab[nTab])
     {
-        DBG_ERROR("Tabelle nicht gefunden");
+        OSL_FAIL("Tabelle nicht gefunden");
         nStartCol = nCol = MAXCOL+1;
         nStartRow = nRow = MAXROW+1;
         nStartTab = nTab = MAXTAB+1;	// -> Abbruch bei GetFirst
@@ -1855,7 +1855,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
                 }
                 else
                 {
-                    DBG_ERROR("AttrArray reicht nicht bis MAXROW");
+                    OSL_FAIL("AttrArray reicht nicht bis MAXROW");
                     pNextEnd[nPos] = MAXROW;
                     ppPatterns[nPos] = NULL;
                 }
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 7100aac..2d6506d 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -621,7 +621,7 @@ void ScDocumentPool::Remove( const SfxPoolItem& rItem )
         {
             if ( nRef != (ULONG) SC_SAFE_POOLREF )
             {
-                DBG_ERROR("Wer fummelt da an meinen Ref-Counts herum");
+                OSL_FAIL("Wer fummelt da an meinen Ref-Counts herum");
                 SetRefCount( (SfxPoolItem&)rItem, (ULONG) SC_SAFE_POOLREF );
             }
             return;					// nicht herunterzaehlen
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 23998d0..5474a1a 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -575,7 +575,7 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks )
     }
     else
     {
-        DBG_ERROR("ResetClip");
+        OSL_FAIL("ResetClip");
     }
 }
 
@@ -593,7 +593,7 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
     }
     else
     {
-        DBG_ERROR("ResetClip");
+        OSL_FAIL("ResetClip");
     }
 }
 
@@ -1005,7 +1005,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
                             pData->SetIndex(0);		// need new index, done in Insert
                         if (!pRangeName->Insert(pData))
                         {
-                            DBG_ERROR("can't insert name");     // shouldn't happen
+                            OSL_FAIL("can't insert name");     // shouldn't happen
                             delete pData;
                         }
                         else
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 1d678f4..778d91a 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -708,7 +708,7 @@ BOOL ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const
     if (ValidTab(nSrcTab) && ValidTab(nDestTab))
         return pTab[nSrcTab]->TestCopyScenarioTo( pTab[nDestTab] );
 
-    DBG_ERROR("falsche Tabelle bei TestCopyScenario");
+    OSL_FAIL("falsche Tabelle bei TestCopyScenario");
     return FALSE;
 }
 
@@ -760,7 +760,7 @@ void ScDocument::RemoveUnoObject( SfxListener& rObject )
     }
     else
     {
-        DBG_ERROR("No Uno broadcaster");
+        OSL_FAIL("No Uno broadcaster");
     }
 }
 
@@ -1179,7 +1179,7 @@ BOOL ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, B
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->UpdateOutlineCol( nStartCol, nEndCol, bShow );
 
-    DBG_ERROR("missing tab");
+    OSL_FAIL("missing tab");
     return FALSE;
 }
 
@@ -1188,7 +1188,7 @@ BOOL ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, B
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->UpdateOutlineRow( nStartRow, nEndRow, bShow );
 
-    DBG_ERROR("missing tab");
+    OSL_FAIL("missing tab");
     return FALSE;
 }
 
@@ -1208,7 +1208,7 @@ SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeep
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->Query((ScQueryParam&)rQueryParam, bKeepSub);
 
-    DBG_ERROR("missing tab");
+    OSL_FAIL("missing tab");
     return 0;
 }
 
@@ -1226,7 +1226,7 @@ BOOL ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->CreateQueryParam(nCol1, nRow1, nCol2, nRow2, rQueryParam);
 
-    DBG_ERROR("missing tab");
+    OSL_FAIL("missing tab");
     return FALSE;
 }
 
@@ -1482,7 +1482,7 @@ Rectangle ScDocument::GetEmbeddedRect() const						// 1/100 mm
     ScTable* pTable = pTab[aEmbedRange.aStart.Tab()];
     if (!pTable)
     {
-        DBG_ERROR("GetEmbeddedRect ohne Tabelle");
+        OSL_FAIL("GetEmbeddedRect ohne Tabelle");
     }
     else
     {
@@ -1570,7 +1570,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
     ScTable* pTable = pTab[nTab];
     if (!pTable)
     {
-        DBG_ERROR("GetRange ohne Tabelle");
+        OSL_FAIL("GetRange ohne Tabelle");
         return ScRange();
     }
 
@@ -1704,7 +1704,7 @@ void ScDocument::SnapVisArea( Rectangle& rRect ) const
     ScTable* pTable = pTab[nVisibleTab];
     if (!pTable)
     {
-        DBG_ERROR("SetEmbedded ohne Tabelle");
+        OSL_FAIL("SetEmbedded ohne Tabelle");
         return;
     }
 
@@ -1755,7 +1755,7 @@ BOOL ScDocument::IsTabProtected( SCTAB nTab ) const
     if (VALIDTAB(nTab) && pTab[nTab])
         return pTab[nTab]->IsProtected();
 
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return FALSE;
 }
 
@@ -1869,7 +1869,7 @@ Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol
 {
     if (!ValidTab(nTab) || !pTab[nTab])
     {
-        DBG_ERROR("GetMMRect: falsche Tabelle");
+        OSL_FAIL("GetMMRect: falsche Tabelle");
         return Rectangle(0,0,0,0);
     }
 
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index d6e16a9..1c4c8e1 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -147,7 +147,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
     if (i == MAXTAB + 1)
     {
         Sound::Beep();
-        DBG_ERROR("ScDocument::InsertMatrixFormula Keine Tabelle markiert");
+        OSL_FAIL("ScDocument::InsertMatrixFormula Keine Tabelle markiert");
         return;
     }
 
@@ -234,7 +234,7 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam,      // Mehrfachopera
     if (i == MAXTAB + 1)
     {
         Sound::Beep();
-        DBG_ERROR("ScDocument::InsertTableOp: Keine Tabelle markiert");
+        OSL_FAIL("ScDocument::InsertTableOp: Keine Tabelle markiert");
         return;
     }
 
@@ -408,7 +408,7 @@ void ScDocument::DoColResize( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd
         pTab[nTab]->DoColResize( nCol1, nCol2, nAdd );
     else
     {
-        DBG_ERROR("DoColResize: falsche Tabelle");
+        OSL_FAIL("DoColResize: falsche Tabelle");
     }
 }
 
@@ -634,7 +634,7 @@ const SfxPoolItem* ScDocument::GetEffItem(
         }
         return &rSet.Get( nWhich );
     }
-    DBG_ERROR("kein Pattern");
+    OSL_FAIL("kein Pattern");
     return NULL;
 }
 
@@ -666,7 +666,7 @@ const ScConditionalFormat* ScDocument::GetCondFormat(
             return pCondFormList->GetFormat( nIndex );
         else
         {
-            DBG_ERROR("pCondFormList ist 0");
+            OSL_FAIL("pCondFormList ist 0");
         }
     }
 
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 60eaeb6..ee92c41 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -575,7 +575,7 @@ BOOL ScDocument::IdleCalcTextWidth()			// TRUE = demnaechst wieder versuchen
                         }
                         else
                         {
-                            DBG_ERROR( "Missing StyleSheet :-/" );
+                            OSL_FAIL( "Missing StyleSheet :-/" );
                         }
                     }
 
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 6f1d1dc..403dfdd 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -778,7 +778,7 @@ void ScDocument::LimitChartIfAll( ScRangeListRef& rRangeList )
     }
     else
     {
-        DBG_ERROR("LimitChartIfAll: Ref==0");
+        OSL_FAIL("LimitChartIfAll: Ref==0");
     }
     rRangeList = aNew;
 }
@@ -1415,7 +1415,7 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe
     }
     else
         {
-        DBG_ERROR("InitUndo");
+        OSL_FAIL("InitUndo");
         }
 }
 
@@ -1437,7 +1437,7 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
     }
     else
     {
-        DBG_ERROR("InitUndo");
+        OSL_FAIL("InitUndo");
     }
 }
 
@@ -1456,7 +1456,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, BOOL bColInfo, BOOL bRowI
     }
     else
     {
-        DBG_ERROR("InitUndo");
+        OSL_FAIL("InitUndo");
     }
 }
 
@@ -1467,7 +1467,7 @@ void ScDocument::SetCutMode( BOOL bVal )
         GetClipParam().mbCutMode = bVal;
     else
     {
-        DBG_ERROR("SetCutMode without bIsClip");
+        OSL_FAIL("SetCutMode without bIsClip");
     }
 }
 
@@ -1478,7 +1478,7 @@ BOOL ScDocument::IsCutMode()
         return GetClipParam().mbCutMode;
     else
     {
-        DBG_ERROR("IsCutMode ohne bIsClip");
+        OSL_FAIL("IsCutMode ohne bIsClip");
         return FALSE;
     }
 }
@@ -2141,7 +2141,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
     {
         if (!pClipDoc)
         {
-            DBG_ERROR("CopyFromClip: no ClipDoc");
+            OSL_FAIL("CopyFromClip: no ClipDoc");
             pClipDoc = SC_MOD()->GetClipDoc();
         }
         if (pClipDoc->bIsClip && pClipDoc->GetTableCount())
@@ -2472,7 +2472,7 @@ void ScDocument::SetClipArea( const ScRange& rArea, BOOL bCut )
     }
     else
     {
-        DBG_ERROR("SetClipArea: kein Clip");
+        OSL_FAIL("SetClipArea: kein Clip");
     }
 }
 
@@ -2481,7 +2481,7 @@ void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, BOOL bIncludeFiltered
 {
     if (!bIsClip)
     {
-        DBG_ERROR("GetClipArea: kein Clip");
+        OSL_FAIL("GetClipArea: kein Clip");
         return;
     }
 
@@ -2543,7 +2543,7 @@ void ScDocument::GetClipStart(SCCOL& nClipX, SCROW& nClipY)
     }
     else
     {
-        DBG_ERROR("GetClipStart: kein Clip");
+        OSL_FAIL("GetClipStart: kein Clip");
     }
 }
 
@@ -2636,7 +2636,7 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
     }
     else
     {
-        DBG_ERROR("falsche Tabelle");
+        OSL_FAIL("falsche Tabelle");
     }
 }
 
@@ -2695,7 +2695,7 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
     }
     else
     {
-        DBG_ERROR("falsche Tabelle");
+        OSL_FAIL("falsche Tabelle");
     }
 }
 
@@ -2896,7 +2896,7 @@ void ScDocument::GetCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
         rpCell = pTab[nTab]->GetCell( nCol, nRow );
     else
     {
-        DBG_ERROR("GetCell ohne Tabelle");
+        OSL_FAIL("GetCell ohne Tabelle");
         rpCell = NULL;
     }
 }
@@ -2908,7 +2908,7 @@ ScBaseCell* ScDocument::GetCell( const ScAddress& rPos ) const
     if (ValidTab(nTab) && pTab[nTab])
         return pTab[nTab]->GetCell( rPos );
 
-    DBG_ERROR("GetCell ohne Tabelle");
+    OSL_FAIL("GetCell ohne Tabelle");
     return NULL;
 }
 
@@ -3251,7 +3251,7 @@ USHORT ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetColWidth( nCol );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3260,7 +3260,7 @@ USHORT ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetOriginalWidth( nCol );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3269,7 +3269,7 @@ USHORT ScDocument::GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetCommonWidth( nEndCol );
-    DBG_ERROR("Wrong table number");
+    OSL_FAIL("Wrong table number");
     return 0;
 }
 
@@ -3278,7 +3278,7 @@ USHORT ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetOriginalHeight( nRow );
-    DBG_ERROR("Wrong table number");
+    OSL_FAIL("Wrong table number");
     return 0;
 }
 
@@ -3287,7 +3287,7 @@ USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) co
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetRowHeight( nRow, NULL, NULL, bHiddenAsZero );
-    DBG_ERROR("Wrong sheet number");
+    OSL_FAIL("Wrong sheet number");
     return 0;
 }
 
@@ -3296,7 +3296,7 @@ USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetRowHeight( nRow, pStartRow, pEndRow, bHiddenAsZero );
-    DBG_ERROR("Wrong sheet number");
+    OSL_FAIL("Wrong sheet number");
     return 0;
 }
 
@@ -3313,7 +3313,7 @@ ULONG ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) con
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetRowHeight( nStartRow, nEndRow);
 
-    DBG_ERROR("wrong sheet number");
+    OSL_FAIL("wrong sheet number");
     return 0;
 }
 
@@ -3336,7 +3336,7 @@ ULONG ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow,
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetScaledRowHeight( nStartRow, nEndRow, fScale);
 
-    DBG_ERROR("wrong sheet number");
+    OSL_FAIL("wrong sheet number");
     return 0;
 }
 
@@ -3344,7 +3344,7 @@ SCROW ScDocument::GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetHiddenRowCount( nRow );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3353,7 +3353,7 @@ ULONG ScDocument::GetColOffset( SCCOL nCol, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetColOffset( nCol );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3362,7 +3362,7 @@ ULONG ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetRowOffset( nRow );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3376,7 +3376,7 @@ USHORT ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDe
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetOptimalColWidth( nCol, pDev, nPPTX, nPPTY,
             rZoomX, rZoomY, bFormula, pMarkData, pParam );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3390,7 +3390,7 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetNeededSize
                 ( nCol, nRow, pDev, nPPTX, nPPTY, rZoomX, rZoomY, bWidth, bTotalSize );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3405,7 +3405,7 @@ BOOL ScDocument::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, U
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->SetOptimalHeight( nStartRow, nEndRow, nExtra,
                                                 pDev, nPPTX, nPPTY, rZoomX, rZoomY, bShrink );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return FALSE;
 }
 
@@ -3477,7 +3477,7 @@ BYTE ScDocument::GetColFlags( SCCOL nCol, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetColFlags( nCol );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3485,7 +3485,7 @@ BYTE ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
 {
     if ( ValidTab(nTab) && pTab[nTab] )
         return pTab[nTab]->GetRowFlags( nRow );
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return 0;
 }
 
@@ -3504,12 +3504,12 @@ const ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArray(
         pFlags = pTab[nTab]->GetRowFlagsArray();
     else
     {
-        DBG_ERROR("wrong sheet number");
+        OSL_FAIL("wrong sheet number");
         pFlags = 0;
     }
     if (!pFlags)
     {
-        DBG_ERROR("no row flags at sheet");
+        OSL_FAIL("no row flags at sheet");
         static ScBitMaskCompressedArray< SCROW, BYTE> aDummy( MAXROW, 0);
         pFlags = &aDummy;
     }
@@ -3908,7 +3908,7 @@ const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, USHO
             return pTemp;
         else
         {
-            DBG_ERROR( "Attribut Null" );
+            OSL_FAIL( "Attribut Null" );
         }
     }
     return &xPoolHelper->GetDocPool()->GetDefaultItem( nWhich );
@@ -4164,7 +4164,7 @@ BOOL ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
         if (pTab[nTab])
             return pTab[nTab]->ApplyFlags( nStartCol, nStartRow, nEndCol, nEndRow, nFlags );
 
-    DBG_ERROR("ApplyFlags: falsche Tabelle");
+    OSL_FAIL("ApplyFlags: falsche Tabelle");
     return FALSE;
 }
 
@@ -4176,7 +4176,7 @@ BOOL ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
         if (pTab[nTab])
             return pTab[nTab]->RemoveFlags( nStartCol, nStartRow, nEndCol, nEndRow, nFlags );
 
-    DBG_ERROR("RemoveFlags: falsche Tabelle");
+    OSL_FAIL("RemoveFlags: falsche Tabelle");
     return FALSE;
 }
 
@@ -4438,7 +4438,7 @@ BOOL ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
         if (pTab[nTab])
             return pTab[nTab]->IsBlockEmpty( nStartCol, nStartRow, nEndCol, nEndRow, bIgnoreNotes );
 
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     return FALSE;
 }
 
@@ -4449,7 +4449,7 @@ void ScDocument::LockTable(SCTAB nTab)
         pTab[nTab]->LockTable();
     else
     {
-        DBG_ERROR("Falsche Tabellennummer");
+        OSL_FAIL("Falsche Tabellennummer");
     }
 }
 
@@ -4460,7 +4460,7 @@ void ScDocument::UnlockTable(SCTAB nTab)
         pTab[nTab]->UnlockTable();
     else
     {
-        DBG_ERROR("Falsche Tabellennummer");
+        OSL_FAIL("Falsche Tabellennummer");
     }
 }
 
@@ -4482,7 +4482,7 @@ BOOL ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
             return pTab[nTab]->IsBlockEditable( nStartCol, nStartRow, nEndCol,
                 nEndRow, pOnlyNotBecauseOfMatrix );
 
-    DBG_ERROR("Falsche Tabellennummer");
+    OSL_FAIL("Falsche Tabellennummer");
     if ( pOnlyNotBecauseOfMatrix )
         *pOnlyNotBecauseOfMatrix = FALSE;
     return FALSE;
@@ -4656,7 +4656,7 @@ BOOL ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
     }
     else
     {
-        DBG_ERROR("ExtendOverlapped: falscher Bereich");
+        OSL_FAIL("ExtendOverlapped: falscher Bereich");
     }
 
     return bFound;
@@ -4705,7 +4705,7 @@ BOOL ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
     }
     else
     {
-        DBG_ERROR("ExtendMerge: falscher Bereich");
+        OSL_FAIL("ExtendMerge: falscher Bereich");
     }
 
     return bFound;
@@ -4856,7 +4856,7 @@ BOOL ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
         return pAttr->IsHorOverlapped();
     else
     {
-        DBG_ERROR("Overlapped: Attr==0");
+        OSL_FAIL("Overlapped: Attr==0");
         return FALSE;
     }
 }
@@ -4870,7 +4870,7 @@ BOOL ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
         return pAttr->IsVerOverlapped();
     else
     {
-        DBG_ERROR("Overlapped: Attr==0");
+        OSL_FAIL("Overlapped: Attr==0");
         return FALSE;
     }
 }
@@ -4974,7 +4974,7 @@ void ScDocument::DeleteSelectionTab( SCTAB nTab, USHORT nDelFlag, const ScMarkDa
         pTab[nTab]->DeleteSelection( nDelFlag, rMark );
     else
     {
-        DBG_ERROR("Falsche Tabelle");
+        OSL_FAIL("Falsche Tabelle");
     }
 }
 
@@ -5142,7 +5142,7 @@ Size ScDocument::GetPageSize( SCTAB nTab ) const
     if ( ValidTab(nTab)  && pTab[nTab] )
         return pTab[nTab]->GetPageSize();
 
-    DBG_ERROR("falsche Tab");
+    OSL_FAIL("falsche Tab");
     return Size();
 }
 
@@ -5176,7 +5176,7 @@ BOOL ScDocument::HasManualBreaks( SCTAB nTab ) const
     if ( ValidTab(nTab)  && pTab[nTab] )
         return pTab[nTab]->HasManualBreaks();
 
-    DBG_ERROR("falsche Tab");
+    OSL_FAIL("falsche Tab");
     return FALSE;
 }
 
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 20d342f..ce20417 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -187,7 +187,7 @@ String ScDPSaveGroupDimension::CreateGroupName( const String& rPrefix )
         ++nAdd;                         // continue with higher number
     }
 
-    DBG_ERROR("CreateGroupName: no valid name found");
+    OSL_FAIL("CreateGroupName: no valid name found");
     return EMPTY_STRING;
 }
 
@@ -558,7 +558,7 @@ String ScDPDimensionSaveData::CreateGroupDimName( const String& rSourceName,
         else
             ++nAdd;                     // continue with higher number
     }
-    DBG_ERROR("CreateGroupDimName: no valid name found");
+    OSL_FAIL("CreateGroupDimName: no valid name found");
     return EMPTY_STRING;
 }
 
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 4a514b4..30eab7c 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -354,7 +354,7 @@ bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
                 return sec == matchSec;
             }
             default:
-                DBG_ERROR("invalid time part");
+                OSL_FAIL("invalid time part");
         }
         return false;
     }
@@ -393,7 +393,7 @@ bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
             return days == matchDays;
         }
         default:
-            DBG_ERROR("invalid date part");
+            OSL_FAIL("invalid date part");
     }
 
     return false;
@@ -457,7 +457,7 @@ String lcl_GetDateGroupName( sal_Int32 nDatePart, sal_Int32 nValue, SvNumberForm
             aRet.Append( lcl_GetTwoDigitString( nValue ) );
             break;
         default:
-            DBG_ERROR("invalid date part");
+            OSL_FAIL("invalid date part");
     }
     return aRet;
 }
@@ -527,7 +527,7 @@ sal_Int32 lcl_GetDatePartValue( double fValue, sal_Int32 nDatePart, SvNumberForm
                 }
                 break;
             default:
-                DBG_ERROR("invalid date part");
+                OSL_FAIL("invalid date part");
         }
     }
 
@@ -661,7 +661,7 @@ void ScDPDateGroupHelper::FillColumnEntries(
         case com::sun::star::sheet::DataPilotFieldGroupBy::MINUTES:  nStart = 0; nEnd = 59;  break;
         case com::sun::star::sheet::DataPilotFieldGroupBy::SECONDS:  nStart = 0; nEnd = 59;  break;
         default:
-            DBG_ERROR("invalid date part");
+            OSL_FAIL("invalid date part");
     }
 
     for ( sal_Int32 nValue = nStart; nValue <= nEnd; nValue++ )
@@ -1461,7 +1461,7 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI
                 // date group information, too.
                 if ( !pBaseDateHelper )
                 {
-                    DBG_ERROR( "mix of date and non-date groups" );
+                    OSL_FAIL( "mix of date and non-date groups" );
                     return TRUE;
                 }
 
@@ -1481,7 +1481,7 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI
         }
     }
 
-    DBG_ERROR("IsInGroup: no group dimension found");
+    OSL_FAIL("IsInGroup: no group dimension found");
     return TRUE;
 }
 
@@ -1507,7 +1507,7 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
             // If one is a date group dimension, the other one must be, too.
             if ( !pFirstDateHelper || !pSecondDateHelper )
             {
-                DBG_ERROR( "mix of date and non-date groups" );
+                OSL_FAIL( "mix of date and non-date groups" );
                 return TRUE;
             }
 
@@ -1540,7 +1540,7 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
         }
     }
 
-    DBG_ERROR("HasCommonElement: no group dimension found");
+    OSL_FAIL("HasCommonElement: no group dimension found");
     return TRUE;
 }
 
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index b0414f7..1231100 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -414,7 +414,7 @@ ScDPTableData* ScDPObject::GetTableData()
             // cell data
             if (!pSheetDesc)
             {
-                DBG_ERROR("no source descriptor");
+                OSL_FAIL("no source descriptor");
                 pSheetDesc = new ScSheetSourceDesc(pDoc);     // dummy defaults
             }
             pData.reset(new ScSheetDPData(pDoc, *pSheetDesc));
@@ -477,7 +477,7 @@ void ScDPObject::CreateObjects()
             }
             catch(uno::Exception&)
             {
-                DBG_ERROR("exception in refresh");
+                OSL_FAIL("exception in refresh");
             }
         }
 
@@ -728,7 +728,7 @@ BOOL ScDPObject::RefsEqual( const ScDPObject& r ) const
     }
     else if ( pSheetDesc || r.pSheetDesc )
     {
-        DBG_ERROR("RefsEqual: SheetDesc set at only one object");
+        OSL_FAIL("RefsEqual: SheetDesc set at only one object");
         return FALSE;
     }
 
@@ -1653,7 +1653,7 @@ USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp )
         }
     }
 
-    DBG_ERROR("FirstSubTotal: NULL");
+    OSL_FAIL("FirstSubTotal: NULL");
     return 0;
 }
 
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 1a39b91..f41f4c2 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -129,7 +129,7 @@ void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
 {
     if ( nCol1 > nCol2 || nRow1 > nRow2 )
     {
-        DBG_ERROR("SetStyleById: invalid range");
+        OSL_FAIL("SetStyleById: invalid range");
         return;
     }
 
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 1de322d..df7c9b9 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1154,7 +1154,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
     }
     catch(uno::Exception&)
     {
-        DBG_ERROR("exception in WriteToSource");
+        OSL_FAIL("exception in WriteToSource");
     }
 }
 
@@ -1294,7 +1294,7 @@ void ScDPSaveData::Refresh( const uno::Reference<sheet::XDimensionsSupplier>& xS
     }
     catch(uno::Exception&)
     {
-        DBG_ERROR("error in ScDPSaveData::Refresh");
+        OSL_FAIL("error in ScDPSaveData::Refresh");
     }
 }
 
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index fbe6fe4..0588856 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -147,7 +147,7 @@ ScDPCache* ScImportSourceDesc::CreateCache() const
     {
         delete pCache;
         pCache = NULL;
-        DBG_ERROR("Unexpected exception in database");
+        OSL_FAIL("Unexpected exception in database");
     }
 
 
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index 797d5a5..9f7e484 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -121,7 +121,7 @@ String ScSheetDPData::getDimensionName(long nColumn)
     }
     else if (nColumn >= aCacheTable.getColSize())
     {
-        DBG_ERROR("getDimensionName: invalid dimension");
+        OSL_FAIL("getDimensionName: invalid dimension");
         return String();
     }
     else
@@ -140,7 +140,7 @@ BOOL ScSheetDPData::IsDateDimension(long nDim)
     }
     else if (nDim >= nColCount)
     {
-        DBG_ERROR("IsDateDimension: invalid dimension");
+        OSL_FAIL("IsDateDimension: invalid dimension");
         return FALSE;
     }
     else
@@ -158,7 +158,7 @@ ULONG ScSheetDPData::GetNumberFormat(long nDim)
     }
     else if (nDim >= GetCacheTable().getColSize())
     {
-        DBG_ERROR("GetNumberFormat: invalid dimension");
+        OSL_FAIL("GetNumberFormat: invalid dimension");
         return 0;
     }
     else
@@ -316,7 +316,7 @@ ScDPCache* ScSheetSourceDesc::CreateCache() const
     ULONG nErrId = CheckSourceRange();
     if (nErrId)
     {
-        DBG_ERROR( "Error Create Cache\n" );
+        OSL_FAIL( "Error Create Cache\n" );
         return NULL;
     }
 
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index a1bd3c3..e59c501 100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -93,7 +93,7 @@ long ScDPTableData::GetDatePart( long nDateVal, long nHierarchy, long nLevel )
                 case 2:	nRet = aDate.GetMonth();				break;
                 case 3:	nRet = aDate.GetDay();					break;
                 default:
-                    DBG_ERROR("GetDatePart: wrong level");
+                    OSL_FAIL("GetDatePart: wrong level");
             }
             break;
         case SC_DAPI_HIERARCHY_WEEK:
@@ -104,11 +104,11 @@ long ScDPTableData::GetDatePart( long nDateVal, long nHierarchy, long nLevel )
                 case 1:	nRet = aDate.GetWeekOfYear();			break;
                 case 2:	nRet = (long)aDate.GetDayOfWeek();		break;
                 default:
-                    DBG_ERROR("GetDatePart: wrong level");
+                    OSL_FAIL("GetDatePart: wrong level");
             }
             break;
         default:
-            DBG_ERROR("GetDatePart: wrong hierarchy");
+            OSL_FAIL("GetDatePart: wrong hierarchy");
     }
 
     nLastDateVal = nDateVal;
@@ -147,14 +147,14 @@ BOOL ScDPTableData::IsNumOrDateGroup(long) const
 BOOL ScDPTableData::IsInGroup( const ScDPItemData&, long,
                                const ScDPItemData&, long ) const
 {
-    DBG_ERROR("IsInGroup shouldn't be called for non-group data");
+    OSL_FAIL("IsInGroup shouldn't be called for non-group data");
     return FALSE;
 }
 
 BOOL ScDPTableData::HasCommonElement( const ScDPItemData&, long,
                                       const ScDPItemData&, long ) const
 {
-    DBG_ERROR("HasCommonElement shouldn't be called for non-group data");
+    OSL_FAIL("HasCommonElement shouldn't be called for non-group data");
     return FALSE;
 }
 void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTable& rCacheTable, 
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 560237b..a1e1095 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -482,7 +482,7 @@ void ScDPAggData::Update( const ScDPValueData& rNext, ScSubTotalFunc eFunc, cons
             }
             break;
         default:
-            DBG_ERROR("invalid function");
+            OSL_FAIL("invalid function");
     }
 }
 
@@ -530,7 +530,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
             break;
 
         default:
-            DBG_ERROR("invalid function");
+            OSL_FAIL("invalid function");
     }
 
     //	calculate the selected function
@@ -577,7 +577,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
                     fResult = (fAux - fVal*fVal/(double)(nCount)) / (double)nCount;
                 break;
             default:
-                DBG_ERROR("invalid function");
+                OSL_FAIL("invalid function");
         }
     }
 
@@ -907,7 +907,7 @@ String ScDPResultData::GetMeasureDimensionName(long nMeasure) const
 {
     if ( nMeasure < 0 )
     {
-        DBG_ERROR("GetMeasureDimensionName: negative");
+        OSL_FAIL("GetMeasureDimensionName: negative");
         return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("***"));
     }
 
@@ -2516,7 +2516,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
                                                         fThisResult = ( fThisResult - fOtherResult ) / fOtherResult;
                                                     break;
                                                 default:
-                                                    DBG_ERROR("invalid calculation type");
+                                                    OSL_FAIL("invalid calculation type");
                                             }
                                             if ( bError )
                                             {
@@ -2750,7 +2750,7 @@ ScDPResultMember *ScDPResultDimension::FindMember(  SCROW  iData ) const
     if( aRes != maMemberHash.end()) {
            if ( aRes->second->IsNamedItem( iData ) )
             return aRes->second;
-        DBG_ERROR("problem!  hash result is not the same as IsNamedItem");
+        OSL_FAIL("problem!  hash result is not the same as IsNamedItem");
     }
 
     unsigned int i;
@@ -3010,7 +3010,7 @@ void ScDPResultDimension::ProcessData( const vector< SCROW >& aMembers,
         return;
     }
 
-    DBG_ERROR("ProcessData: Member not found");
+    OSL_FAIL("ProcessData: Member not found");
 }
 
 void ScDPResultDimension::FillMemberResults( uno::Sequence<sheet::MemberResult>* pSequences,
@@ -3560,7 +3560,7 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const
         }
     }
 
-    DBG_ERROR("ProcessData: Member not found");
+    OSL_FAIL("ProcessData: Member not found");
 }
 
 void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim,
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 7d35c56..d1fd8c0 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -298,7 +298,7 @@ void ScDPSource::SetOrientation(long nColumn, USHORT nNew)
         case sheet::DataPilotFieldOrientation_HIDDEN:
             break;
         default: 
-            DBG_ERROR( "ScDPSource::SetOrientation: unexpected orientation" );
+            OSL_FAIL( "ScDPSource::SetOrientation: unexpected orientation" );
             break;
     }
 }
@@ -378,7 +378,7 @@ long ScDPSource::GetSourceDim(long nDim)
         }
     }
 
-    DBG_ERROR("GetSourceDim: wrong dim");
+    OSL_FAIL("GetSourceDim: wrong dim");
     return nDim;
 }
 
@@ -422,13 +422,13 @@ void SAL_CALL ScDPSource::refresh() throw(uno::RuntimeException)
 void SAL_CALL ScDPSource::addRefreshListener( const uno::Reference<util::XRefreshListener >& )
                                                 throw(uno::RuntimeException)
 {
-    DBG_ERROR("not implemented");	//! exception?
+    OSL_FAIL("not implemented");	//! exception?
 }
 
 void SAL_CALL ScDPSource::removeRefreshListener( const uno::Reference<util::XRefreshListener >& )
                                                 throw(uno::RuntimeException)
 {
-    DBG_ERROR("not implemented");	//! exception?
+    OSL_FAIL("not implemented");	//! exception?
 }
 
 Sequence< Sequence<Any> > SAL_CALL ScDPSource::getDrillDownData(const Sequence<sheet::DataPilotFieldFilter>& aFilters)
@@ -594,7 +594,7 @@ long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPL
 
         if ( nPos+1 < nLevels && ppDim[nPos] == ppDim[nPos+1] )
         {
-            DBG_ERROR("lcl_CountMinMembers: multiple levels from one dimension not implemented");
+            OSL_FAIL("lcl_CountMinMembers: multiple levels from one dimension not implemented");
             return 0;
         }
 
@@ -1023,12 +1023,12 @@ void ScDPSource::FillLevelList( USHORT nOrientation, std::vector<ScDPLevel*> &rL
             nDimCount = nPageDimCount;
             break;
         default:
-            DBG_ERROR( "ScDPSource::FillLevelList: unexpected orientation" );
+            OSL_FAIL( "ScDPSource::FillLevelList: unexpected orientation" );
             break;
     }
     if (!pDimIndex)
     {
-        DBG_ERROR("invalid orientation");
+        OSL_FAIL("invalid orientation");
         return;
     }
 
@@ -1166,7 +1166,7 @@ void SAL_CALL ScDPSource::setPropertyValue( const rtl::OUString& aPropertyName,
     }
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
         //!	THROW( UnknownPropertyException() );
     }
 }
@@ -1200,7 +1200,7 @@ uno::Any SAL_CALL ScDPSource::getPropertyValue( const rtl::OUString& aPropertyNa
     }
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
         //!	THROW( UnknownPropertyException() );
     }
     return aRet;
@@ -1604,7 +1604,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
         }
         if ( !bDone )
         {
-            DBG_ERROR("Filter property is not a single string");
+            OSL_FAIL("Filter property is not a single string");
             throw lang::IllegalArgumentException();
         }
         DELETEZ( pSelectedData );		// invalid after changing aSelectedPage
@@ -1625,7 +1625,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
         aValue >>= mbHasHiddenMember;
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
         //!	THROW( UnknownPropertyException() );
     }
 }
@@ -1712,7 +1712,7 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
     }
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
         //!	THROW( UnknownPropertyException() );
     }
     return aRet;
@@ -1878,7 +1878,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScDPHierarchy::getLevels()
             aRet = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Week"));
             break;	//! name ???????
         default:
-            DBG_ERROR( "ScDPHierarchy::getName: unexpected hierarchy" );
+            OSL_FAIL( "ScDPHierarchy::getName: unexpected hierarchy" );
             break;
     }
     return aRet;
@@ -1886,7 +1886,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScDPHierarchy::getLevels()
 
 void SAL_CALL ScDPHierarchy::setName( const ::rtl::OUString& /* rNewName */ ) throw(uno::RuntimeException)
 {
-    DBG_ERROR("not implemented");		//! exception?
+    OSL_FAIL("not implemented");		//! exception?
 }
 
 // -----------------------------------------------------------------------
@@ -1910,7 +1910,7 @@ ScDPLevels::ScDPLevels( ScDPSource* pSrc, long nD, long nH ) :
             case SC_DAPI_HIERARCHY_QUARTER:	nLevCount = SC_DAPI_QUARTER_LEVELS;	break;
             case SC_DAPI_HIERARCHY_WEEK:	nLevCount = SC_DAPI_WEEK_LEVELS;	break;
             default:
-                DBG_ERROR("wrong hierarchy");
+                OSL_FAIL("wrong hierarchy");
                 nLevCount = 0;
         }
     }
@@ -2177,7 +2177,7 @@ uno::Sequence<sheet::MemberResult> SAL_CALL ScDPLevel::getResults() throw(uno::R
                     aRet = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Day"));
                     break;
                 default:
-                    DBG_ERROR( "ScDPLevel::getName: unexpected level" );
+                    OSL_FAIL( "ScDPLevel::getName: unexpected level" );
                     break;
             }
         }
@@ -2195,7 +2195,7 @@ uno::Sequence<sheet::MemberResult> SAL_CALL ScDPLevel::getResults() throw(uno::R
                     aRet = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Weekday"));
                     break;
                 default:
-                    DBG_ERROR( "ScDPLevel::getName: unexpected level" );
+                    OSL_FAIL( "ScDPLevel::getName: unexpected level" );
                     break;
             }
         }
@@ -2212,7 +2212,7 @@ uno::Sequence<sheet::MemberResult> SAL_CALL ScDPLevel::getResults() throw(uno::R
 
 void SAL_CALL ScDPLevel::setName( const ::rtl::OUString& /* rNewName */ ) throw(uno::RuntimeException)
 {
-    DBG_ERROR("not implemented");		//! exception?
+    OSL_FAIL("not implemented");		//! exception?
 }
 
 uno::Sequence<sheet::GeneralFunction> ScDPLevel::getSubTotals() const
@@ -2286,7 +2286,7 @@ void SAL_CALL ScDPLevel::setPropertyValue( const rtl::OUString& aPropertyName, c
         aValue >>= aLayoutInfo;
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
     }
 }
 
@@ -2325,7 +2325,7 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue( const rtl::OUString& aPropertyNam
     }
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
     }
     return aRet;
 }
@@ -2388,7 +2388,7 @@ ScDPMembers::ScDPMembers( ScDPSource* pSrc, long nD, long nH, long nL ) :
                 case SC_DAPI_LEVEL_MONTH:	nMbrCount = 12;	break;
                 case SC_DAPI_LEVEL_DAY:		nMbrCount = 31;	break;
                 default:
-                    DBG_ERROR( "ScDPMembers::ScDPMembers: unexpected level" );
+                    OSL_FAIL( "ScDPMembers::ScDPMembers: unexpected level" );
                     break;
             }
         }
@@ -2400,7 +2400,7 @@ ScDPMembers::ScDPMembers( ScDPSource* pSrc, long nD, long nH, long nL ) :
                 case SC_DAPI_LEVEL_WEEK:	nMbrCount = 53;	break;
                 case SC_DAPI_LEVEL_WEEKDAY:	nMbrCount = 7;	break;
                 default:
-                    DBG_ERROR( "ScDPMembers::ScDPMembers: unexpected level" );
+                    OSL_FAIL( "ScDPMembers::ScDPMembers: unexpected level" );
                     break;
             }
         }
@@ -2689,7 +2689,7 @@ String ScDPMember::GetNameStr() const
 
 void SAL_CALL ScDPMember::setName( const ::rtl::OUString& /* rNewName */ ) throw(uno::RuntimeException)
 {
-    DBG_ERROR("not implemented");		//! exception?
+    OSL_FAIL("not implemented");		//! exception?
 }
 
 BOOL ScDPMember::getIsVisible() const
@@ -2768,7 +2768,7 @@ void SAL_CALL ScDPMember::setPropertyValue( const rtl::OUString& aPropertyName,
     }
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
     }
 }
 
@@ -2788,7 +2788,7 @@ uno::Any SAL_CALL ScDPMember::getPropertyValue( const rtl::OUString& aPropertyNa
         aRet <<= mpLayoutName.get() ? *mpLayoutName : rtl::OUString();
     else
     {
-        DBG_ERROR("unknown property");
+        OSL_FAIL("unknown property");
     }
     return aRet;
 }
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 57d31d9..bb82473 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1165,7 +1165,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark )
             }
             else
             {
-                DBG_ERROR("pPage?");
+                OSL_FAIL("pPage?");
             }
         }
 }
@@ -1282,7 +1282,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
 
     if (bDrawIsInUndo)		//! can this happen?
     {
-        DBG_ERROR("CopyFromClip, bDrawIsInUndo");
+        OSL_FAIL("CopyFromClip, bDrawIsInUndo");
         return;
     }
 
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 899c527..13041c0 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -258,7 +258,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
             ++nArrY;
             if (nArrY >= ROWINFO_MAX)
             {
-                DBG_ERROR("Zu grosser Bereich bei FillInfo" );
+                OSL_FAIL("Zu grosser Bereich bei FillInfo" );
                 nYExtra = nSignedY;									// Ende
                 nY2 = nYExtra - 1;									// Bereich anpassen
             }
@@ -880,7 +880,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
                             break;
 
                         default:
-                            DBG_ERROR("falscher Shadow-Enum");
+                            OSL_FAIL("falscher Shadow-Enum");
                     }
                 }
             }
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 142bede..c4cb2d6 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -781,7 +781,7 @@ void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::
 {
     if ( _nCategoryNumber > SC_FUNCGROUP_COUNT )
     {
-        DBG_ERROR("Invalid category number!");
+        OSL_FAIL("Invalid category number!");
         return ::rtl::OUString();
     }
 
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 9b00b3f..9f5e7a3 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -606,14 +606,14 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
 {
     if (!pPool)
     {
-        DBG_ERROR("kein Pool bei ScGlobal::InitTextHeight");
+        OSL_FAIL("kein Pool bei ScGlobal::InitTextHeight");
         return;
     }
 
     const ScPatternAttr* pPattern = (const ScPatternAttr*)&pPool->GetDefaultItem(ATTR_PATTERN);
     if (!pPattern)
     {
-        DBG_ERROR("kein Default-Pattern bei ScGlobal::InitTextHeight");
+        OSL_FAIL("kein Default-Pattern bei ScGlobal::InitTextHeight");
         return;
     }
 
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 36d3338..d1c470f 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -213,7 +213,7 @@ SCTAB ScMarkData::GetFirstSelected() const
         if (bTabMarked[i])
             return i;
 
-    DBG_ERROR("GetFirstSelected: keine markiert");
+    OSL_FAIL("GetFirstSelected: keine markiert");
     return 0;
 }
 
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index 12d85a7..6159e13 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -73,7 +73,7 @@ void ScOutlineEntry::Move( SCsCOLROW nDelta )
     SCCOLROW nNewPos = nStart + nDelta;
     if (nNewPos<0)
     {
-        DBG_ERROR("OutlineEntry < 0");
+        OSL_FAIL("OutlineEntry < 0");
         nNewPos = 0;
     }
     nStart = nNewPos;
@@ -85,7 +85,7 @@ void ScOutlineEntry::SetSize( SCSIZE nNewSize )
         nSize = nNewSize;
     else
     {
-        DBG_ERROR("ScOutlineEntry Size == 0");
+        OSL_FAIL("ScOutlineEntry Size == 0");
     }
 }
 
@@ -333,7 +333,7 @@ void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nS
 {
     if (nStartLevel==0)
     {
-        DBG_ERROR("PromoteSub mit Level 0");
+        OSL_FAIL("PromoteSub mit Level 0");
         return;
     }
 
@@ -751,7 +751,7 @@ USHORT ScSubOutlineIterator::LastEntry() const
 {
     if (nSubEntry == 0)
     {
-        DBG_ERROR("ScSubOutlineIterator::LastEntry vor GetNext");
+        OSL_FAIL("ScSubOutlineIterator::LastEntry vor GetNext");
         return 0;
     }
     return nSubEntry-1;
@@ -761,12 +761,12 @@ void ScSubOutlineIterator::DeleteLast()
 {
     if (nSubLevel >= nDepth)
     {
-        DBG_ERROR("ScSubOutlineIterator::DeleteLast nach Ende");
+        OSL_FAIL("ScSubOutlineIterator::DeleteLast nach Ende");
         return;
     }
     if (nSubEntry == 0)
     {
-        DBG_ERROR("ScSubOutlineIterator::DeleteLast vor GetNext");
+        OSL_FAIL("ScSubOutlineIterator::DeleteLast vor GetNext");
         return;
     }
 
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index bfe48e7..fa2bbe1 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -946,7 +946,7 @@ SfxStyleSheetBase* lcl_CopyStyleToPool
 {
     if ( !pSrcStyle || !pDestPool || !pSrcPool )
     {
-        DBG_ERROR( "CopyStyleToPool: Invalid Arguments :-/" );
+        OSL_FAIL( "CopyStyleToPool: Invalid Arguments :-/" );
         return NULL;
     }
 
@@ -1183,7 +1183,7 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle )
     }
     else
     {
-        DBG_ERROR( "ScPatternAttr::SetStyleSheet( NULL ) :-|" );
+        OSL_FAIL( "ScPatternAttr::SetStyleSheet( NULL ) :-|" );
         GetItemSet().SetParent(NULL);
         pStyle = NULL;
     }
diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx
index 9d66265..1a70580 100644
--- a/sc/source/core/data/sortparam.cxx
+++ b/sc/source/core/data/sortparam.cxx
@@ -264,7 +264,7 @@ void ScSortParam::MoveToDest()
     }
     else
     {
-        DBG_ERROR("MoveToDest, bInplace == TRUE");
+        OSL_FAIL("MoveToDest, bInplace == TRUE");
     }
 }
 
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index efe9c6e..5a12275 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -105,7 +105,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const String& rName,
 
     if ( rName.EqualsAscii(STRING_STANDARD) && Find( rName, eFam ) != NULL )
     {
-        DBG_ERROR("renaming additional default style");
+        OSL_FAIL("renaming additional default style");
         sal_uInt32 nCount = aStyles.size();
         for ( sal_uInt32 nAdd = 1; nAdd <= nCount; nAdd++ )
         {
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 464c965..1f131a8 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1476,7 +1476,7 @@ void ScTable::ExtendPrintArea( OutputDevice* pDev,
 {
     if ( !pColFlags || !pRowFlags )
     {
-        DBG_ERROR("keine ColInfo oder RowInfo in ExtendPrintArea");
+        OSL_FAIL("keine ColInfo oder RowInfo in ExtendPrintArea");
         return;
     }
 
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index ec03370..f22158e 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1100,7 +1100,7 @@ ScBaseCell* ScTable::GetCell( SCCOL nCol, SCROW nRow ) const
     if (ValidColRow( nCol, nRow ))
         return aCol[nCol].GetCell( nRow );
 
-    DBG_ERROR("GetCell ausserhalb");
+    OSL_FAIL("GetCell ausserhalb");
     return NULL;
 }
 
@@ -1306,7 +1306,7 @@ const ScPatternAttr* ScTable::GetPattern( SCCOL nCol, SCROW nRow ) const
         return aCol[nCol].GetPattern( nRow );
     else
     {
-        DBG_ERROR("wrong column or row");
+        OSL_FAIL("wrong column or row");
         return pDocument->GetDefPattern();      // for safety
     }
 }
@@ -1443,7 +1443,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
 {
     if ( !pColWidth || !mpRowHeights || !pColFlags || !pRowFlags )
     {
-        DBG_ERROR( "Spalten-/Zeileninfo fehlt" );
+        OSL_FAIL( "Spalten-/Zeileninfo fehlt" );
         return;
     }
 
@@ -1765,7 +1765,7 @@ void ScTable::UnlockTable()
         --nLockCount;
     else
     {
-        DBG_ERROR("UnlockTable ohne LockTable");
+        OSL_FAIL("UnlockTable ohne LockTable");
     }
 }
 
@@ -2077,7 +2077,7 @@ void ScTable::SetColWidth( SCCOL nCol, USHORT nNewWidth )
     }
     else
     {
-        DBG_ERROR("Falsche Spaltennummer oder keine Breiten");
+        OSL_FAIL("Falsche Spaltennummer oder keine Breiten");
     }
 }
 
@@ -2099,7 +2099,7 @@ void ScTable::SetRowHeight( SCROW nRow, USHORT nNewHeight )
     {
         if (!nNewHeight)
         {
-            DBG_ERROR("Zeilenhoehe 0 in SetRowHeight");
+            OSL_FAIL("Zeilenhoehe 0 in SetRowHeight");
             nNewHeight = ScGlobal::nStdRowHeight;
         }
 
@@ -2112,7 +2112,7 @@ void ScTable::SetRowHeight( SCROW nRow, USHORT nNewHeight )
     }
     else
     {
-        DBG_ERROR("Falsche Zeilennummer oder keine Hoehen");
+        OSL_FAIL("Falsche Zeilennummer oder keine Hoehen");
     }
 }
 
@@ -2158,7 +2158,7 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
     {
         if (!nNewHeight)
         {
-            DBG_ERROR("Zeilenhoehe 0 in SetRowHeight");
+            OSL_FAIL("Zeilenhoehe 0 in SetRowHeight");
             nNewHeight = ScGlobal::nStdRowHeight;
         }
 
@@ -2207,7 +2207,7 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
     }
     else
     {
-        DBG_ERROR("Falsche Zeilennummer oder keine Hoehen");
+        OSL_FAIL("Falsche Zeilennummer oder keine Hoehen");
     }
 
     return bChanged;
@@ -2235,7 +2235,7 @@ void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual )
     }
     else
     {
-        DBG_ERROR("Falsche Zeilennummer oder keine Zeilenflags");
+        OSL_FAIL("Falsche Zeilennummer oder keine Zeilenflags");
     }
 }
 
@@ -2273,7 +2273,7 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
 
     if ( !ValidCol(nEndCol) )
     {
-        DBG_ERROR("wrong column");
+        OSL_FAIL("wrong column");
         nEndCol = MAXCOL;
     }
 
@@ -2459,7 +2459,7 @@ void ScTable::ShowCol(SCCOL nCol, bool bShow)
     }
     else
     {
-        DBG_ERROR("Falsche Spaltennummer oder keine Flags");
+        OSL_FAIL("Falsche Spaltennummer oder keine Flags");
     }
 }
 
@@ -2483,7 +2483,7 @@ void ScTable::ShowRow(SCROW nRow, bool bShow)
     }
     else
     {
-        DBG_ERROR("Falsche Zeilennummer oder keine Flags");
+        OSL_FAIL("Falsche Zeilennummer oder keine Flags");
     }
 }
 
@@ -2510,7 +2510,7 @@ void ScTable::DBShowRow(SCROW nRow, bool bShow)
     }
     else
     {
-        DBG_ERROR("Falsche Zeilennummer oder keine Flags");
+        OSL_FAIL("Falsche Zeilennummer oder keine Flags");
     }
 }
 
@@ -2601,7 +2601,7 @@ void ScTable::SetColFlags( SCCOL nCol, BYTE nNewFlags )
         pColFlags[nCol] = nNewFlags;
     else
     {
-        DBG_ERROR("Falsche Spaltennummer oder keine Flags");
+        OSL_FAIL("Falsche Spaltennummer oder keine Flags");
     }
 }
 
@@ -2612,7 +2612,7 @@ void ScTable::SetRowFlags( SCROW nRow, BYTE nNewFlags )
         pRowFlags->SetValue( nRow, nNewFlags);
     else
     {
-        DBG_ERROR("Falsche Zeilennummer oder keine Flags");
+        OSL_FAIL("Falsche Zeilennummer oder keine Flags");
     }
 }
 
@@ -2623,7 +2623,7 @@ void ScTable::SetRowFlags( SCROW nStartRow, SCROW nEndRow, BYTE nNewFlags )
         pRowFlags->SetValue( nStartRow, nEndRow, nNewFlags);
     else
     {
-        DBG_ERROR("Falsche Zeilennummer(n) oder keine Flags");
+        OSL_FAIL("Falsche Zeilennummer(n) oder keine Flags");
     }
 }
 
@@ -3007,7 +3007,7 @@ ULONG ScTable::GetRowOffset( SCROW nRow ) const
     }
     else
     {
-        DBG_ERROR("GetRowOffset: Daten fehlen");
+        OSL_FAIL("GetRowOffset: Daten fehlen");
     }
     return n;
 }
@@ -3051,7 +3051,7 @@ ULONG ScTable::GetColOffset( SCCOL nCol ) const
     }
     else
     {
-        DBG_ERROR("GetColumnOffset: Daten fehlen");
+        OSL_FAIL("GetColumnOffset: Daten fehlen");
     }
     return n;
 }
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 3f1f319..7eca63e 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1767,7 +1767,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
 
         if ( nVisible > SCSIZE_MAX / sizeof(void*) )
         {
-            DBG_ERROR("zu viele Filterkritierien");
+            OSL_FAIL("zu viele Filterkritierien");
             nVisible = 0;
         }
 
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 27afcae..9bf76f5 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -1087,7 +1087,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
         }
         else
         {
-            DBG_ERROR("GetAutoFillPreview: falscher Modus");
+            OSL_FAIL("GetAutoFillPreview: falscher Modus");
         }
     }
 
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 33aee6a..fa4400d 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -87,7 +87,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
                                     Find( aPageStyle, SFX_STYLE_FAMILY_PAGE );
     if ( !pStyle )
     {
-        DBG_ERROR("UpdatePageBreaks: Style nicht gefunden");
+        OSL_FAIL("UpdatePageBreaks: Style nicht gefunden");
         return;
     }
     SfxItemSet* pStyleSet = &pStyle->GetItemSet();
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 842f7f4..98fcf8d 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -136,7 +136,7 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
         }
         else
         {
-            DBG_ERROR("pSearchText == NULL");
+            OSL_FAIL("pSearchText == NULL");
             return bFound;
         }
 
@@ -612,7 +612,7 @@ BOOL ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
             ApplyStyle( rCol, rRow, *pReplaceStyle );
         else
         {
-            DBG_ERROR("pReplaceStyle==0");
+            OSL_FAIL("pReplaceStyle==0");
         }
     }
 
@@ -676,7 +676,7 @@ BOOL ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMar
         }
         else
         {
-            DBG_ERROR("pReplaceStyle==0");
+            OSL_FAIL("pReplaceStyle==0");
         }
     }
 
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index c737f57..f45ec4b 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -351,7 +351,7 @@ bool ScTableProtectionImpl::isOptionEnabled(SCSIZE nOptId) const
 {
     if ( maOptions.size() <= static_cast<size_t>(nOptId) )
     {
-        DBG_ERROR("ScTableProtectionImpl::isOptionEnabled: wrong size");
+        OSL_FAIL("ScTableProtectionImpl::isOptionEnabled: wrong size");
         return false;
     }
 
@@ -362,7 +362,7 @@ void ScTableProtectionImpl::setOption(SCSIZE nOptId, bool bEnabled)
 {
     if ( maOptions.size() <= static_cast<size_t>(nOptId) )
     {
-        DBG_ERROR("ScTableProtectionImpl::setOption: wrong size");
+        OSL_FAIL("ScTableProtectionImpl::setOption: wrong size");
         return;
     }
 
diff --git a/sc/source/core/data/userdat.cxx b/sc/source/core/data/userdat.cxx
index 3f923ec..9ad9a75 100644
--- a/sc/source/core/data/userdat.cxx
+++ b/sc/source/core/data/userdat.cxx
@@ -60,7 +60,7 @@ IMPL_LINK_INLINE_START( ScDrawObjFactory, MakeUserData, SdrObjFactory *, pObjFac
             pObjFactory->pNewData = new ScMacroInfo;
         else
         {
-            DBG_ERROR("MakeUserData: falsche ID");
+            OSL_FAIL("MakeUserData: falsche ID");
         }
     }
     return 0;
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 4c435a8..b27a35d 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -537,7 +537,7 @@ BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) c
             break;
 
         default:
-            DBG_ERROR("hammanochnich");
+            OSL_FAIL("hammanochnich");
             break;
     }
 
@@ -935,7 +935,7 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey )
         if ((*this)[i]->GetKey() == nKey)
             return (*this)[i];
 
-    DBG_ERROR("ScValidationDataList: Eintrag nicht gefunden");
+    OSL_FAIL("ScValidationDataList: Eintrag nicht gefunden");
     return NULL;
 }
 
diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx
index 46fe43f..f3ecd82 100644
--- a/sc/source/core/inc/jumpmatrix.hxx
+++ b/sc/source/core/inc/jumpmatrix.hxx
@@ -141,7 +141,7 @@ public:
                                             nRow = 0;
                                         else if (nCols <= nCol || nRows <= nRow)
                                         {
-                                            DBG_ERROR("ScJumpMatrix::GetJump: dimension error");
+                                            OSL_FAIL("ScJumpMatrix::GetJump: dimension error");
                                             nCol = 0;
                                             nRow = 0;
                                         }
diff --git a/sc/source/core/tool/addincfg.cxx b/sc/source/core/tool/addincfg.cxx
index f41ecc1..ce8cdbb 100644
--- a/sc/source/core/tool/addincfg.cxx
+++ b/sc/source/core/tool/addincfg.cxx
@@ -56,7 +56,7 @@ ScAddInCfg::ScAddInCfg() :
 
 void ScAddInCfg::Commit()
 {
-    DBG_ERROR("ScAddInCfg shouldn't be modified");
+    OSL_FAIL("ScAddInCfg shouldn't be modified");
 }
 
 void ScAddInCfg::Notify( const uno::Sequence<rtl::OUString>& )
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index d58f428..f12e972 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -1473,14 +1473,14 @@ void ScUnoAddInCall::SetParam( long nPos, const uno::Any& rValue )
                 aVarArg.getArray()[nVarPos] = rValue;
             else
             {
-                DBG_ERROR("wrong argument number");
+                OSL_FAIL("wrong argument number");
             }
         }
         else if ( nPos < aArgs.getLength() )
             aArgs.getArray()[nPos] = rValue;
         else
         {
-            DBG_ERROR("wrong argument number");
+            OSL_FAIL("wrong argument number");
         }
     }
 }
@@ -1510,7 +1510,7 @@ void ScUnoAddInCall::ExecuteCall()
         long nCallPos = pFuncData->GetCallerPos();
         if (nCallPos>nUserLen)                          // should not happen
         {
-            DBG_ERROR("wrong CallPos");
+            OSL_FAIL("wrong CallPos");
             nCallPos = nUserLen;
         }
 
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 85916d1..ec6a0e5 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -138,7 +138,7 @@ void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
                 p->pStr = new String( (sal_Char*)pData, osl_getThreadTextEncoding() );
             break;
         default :
-            DBG_ERROR( "unbekannter AsyncType" );
+            OSL_FAIL( "unbekannter AsyncType" );
             return;
     }
     p->bValid = TRUE;
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index fe11fcc..b357cee 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -278,7 +278,7 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument
     catch ( uno::Exception& ex )
     {
         (void)ex;
-        DBG_ERROR("Exception in ScChartHelper::SetChartRanges - invalid range string?");
+        OSL_FAIL("Exception in ScChartHelper::SetChartRanges - invalid range string?");
     }
 
     if( xModel.is() )
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index 78230d0..dd3eb9c 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -106,7 +106,7 @@ ScChartLockGuard::ScChartLockGuard( ScDocument* pDoc ) :
         }
         catch ( uno::Exception& )
         {
-            DBG_ERROR("Unexpected exception in ScChartLockGuard");
+            OSL_FAIL("Unexpected exception in ScChartLockGuard");
         }
     }
 }
@@ -125,7 +125,7 @@ ScChartLockGuard::~ScChartLockGuard()
         }
         catch ( uno::Exception& )
         {
-            DBG_ERROR("Unexpected exception in ScChartLockGuard");
+            OSL_FAIL("Unexpected exception in ScChartLockGuard");
         }
     }
 }
@@ -149,7 +149,7 @@ void ScChartLockGuard::AlsoLockThisChart( const Reference< frame::XModel >& xMod
         }
         catch ( uno::Exception& )
         {
-            DBG_ERROR("Unexpected exception in ScChartLockGuard");
+            OSL_FAIL("Unexpected exception in ScChartLockGuard");
         }
     }
 }
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index a5d3d0d..43bb19b 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -653,7 +653,7 @@ ScChangeActionIns::ScChangeActionIns( const ScRange& rRange )
     }
     else
     {
-        DBG_ERROR( "ScChangeActionIns: Block not supported!" );
+        OSL_FAIL( "ScChangeActionIns: Block not supported!" );
     }
 }
 
@@ -766,7 +766,7 @@ ScChangeActionDel::ScChangeActionDel( const ScRange& rRange,
     }
     else
     {
-        DBG_ERROR( "ScChangeActionDel: Block not supported!" );
+        OSL_FAIL( "ScChangeActionDel: Block not supported!" );
     }
 }
 
@@ -1777,7 +1777,7 @@ void ScChangeActionContent::GetFormulaString( String& rStr,
         pCell->GetFormula( rStr );
     else
     {
-        DBG_ERROR( "ScChangeActionContent::GetFormulaString: aPos != pCell->aPos" );
+        OSL_FAIL( "ScChangeActionContent::GetFormulaString: aPos != pCell->aPos" );
         ScFormulaCell* pNew = new ScFormulaCell( *pCell, *pCell->GetDocument(), aPos );
         pNew->GetFormula( rStr );
         delete pNew;
@@ -2466,7 +2466,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
             }
             else
             {
-                DBG_ERROR( "ScChangeTrack::AppendDeleteRange: Block not supported!" );
+                OSL_FAIL( "ScChangeTrack::AppendDeleteRange: Block not supported!" );
             }
             SetInDeleteTop( FALSE );
         }
@@ -3132,7 +3132,7 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
                                 }
                                 else
                                 {
-                                    DBG_ERROR( "ScChangeTrack::Undo: nCut not found" );
+                                    OSL_FAIL( "ScChangeTrack::Undo: nCut not found" );
                                 }
                             }
                             EndBlockModify( nEnd );
@@ -3323,7 +3323,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
             ((ScChangeActionMove*)pAct)->GetDelta( nDx, nDy, nDz );
         break;
         default:
-            DBG_ERROR( "ScChangeTrack::UpdateReference: unknown Type" );
+            OSL_FAIL( "ScChangeTrack::UpdateReference: unknown Type" );
     }
     if ( bUndo )
     {
@@ -4330,7 +4330,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
     }
     else
     {
-        DBG_ERROR( "ScChangeTrack::Reject: say what?" );
+        OSL_FAIL( "ScChangeTrack::Reject: say what?" );
     }
 
     return bRejected;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 5ecd92d..e04d98f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1047,7 +1047,7 @@ struct ConventionOOO_A1 : public Convention_A1
 
                 if (!lcl_getLastTabName(aLastTabName, rTabName, aTabNames, aRef))
                 {
-                    DBG_ERROR( "ConventionOOO_A1::makeExternalRefStrImpl: sheet name not found");
+                    OSL_FAIL( "ConventionOOO_A1::makeExternalRefStrImpl: sheet name not found");
                     // aLastTabName contains #REF!, proceed.
                 }
             }
@@ -3980,7 +3980,7 @@ BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
             return GetToken();
         }
         default:
-            DBG_ERROR("Wrong type for external reference!");
+            OSL_FAIL("Wrong type for external reference!");
             return FALSE;
     }
     return TRUE;
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 2e4e739..ffcfd86 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -495,7 +495,7 @@ double lcl_CalcData( ScSubTotalFunc eFunc,
             break;
         default:
         {
-            DBG_ERROR("unbekannte Funktion bei Consoli::CalcData");
+            OSL_FAIL("unbekannte Funktion bei Consoli::CalcData");
             fCount = -MAXDOUBLE;
         }
             break;
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 83e2e8e..36507c6 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -417,7 +417,7 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
 
     if (bStartAlien && bEndAlien)
     {
-        DBG_ERROR("bStartAlien && bEndAlien");
+        OSL_FAIL("bStartAlien && bEndAlien");
         return TRUE;
     }
 
@@ -1316,7 +1316,7 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
                         bDoThis = !bCaption && !bCircle;	// don't include circles
                     else
                     {
-                        DBG_ERROR("wat?");
+                        OSL_FAIL("wat?");
                     }
                 }
                 if ( bDoThis )
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index fa06748..b91d51d 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -177,7 +177,7 @@ bool lcl_createExcelQuery(
         SCSIZE nVisible = pQueryRef->getVisibleDataCellCount();
         if ( nVisible > SCSIZE_MAX / sizeof(void*) )
         {
-            DBG_ERROR("zu viele Filterkritierien");
+            OSL_FAIL("zu viele Filterkritierien");
             nVisible = 0;
         }
 
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index a245e54..90f51f5 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -686,7 +686,7 @@ String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
     }
     else
     {
-        DBG_ERROR("FieldData ist 0");
+        OSL_FAIL("FieldData ist 0");
         aRet = '?';
     }
 
diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx
index c1a8787..4e915f4 100644
--- a/sc/source/core/tool/filtopt.cxx
+++ b/sc/source/core/tool/filtopt.cxx
@@ -110,12 +110,12 @@ void ScFilterOptions::Commit()
 {
     // options are never modified from office
 
-    DBG_ERROR("trying to commit changed ScFilterOptions?");
+    OSL_FAIL("trying to commit changed ScFilterOptions?");
 }
 
 void ScFilterOptions::Notify( const Sequence<OUString>& /* aPropertyNames */ )
 {
-    DBG_ERROR("properties have been changed");
+    OSL_FAIL("properties have been changed");
 }
 
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list