diff options
author | Jacek Wolszczak <shutdownrunner@gmail.com> | 2011-05-21 10:11:48 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-05-27 06:03:36 +0200 |
commit | a64076a0699d7a5f56c38530bedfd8d8fb6aef4e (patch) | |
tree | 016c1e1ba42c42e2b22f411bbec44000a2c0704d /chart2 | |
parent | 2075ba251a2f4e6d19cd74fcfd0b109c9a6c08e4 (diff) |
Replace DBG_* with OSL_* in calc/chart2
Diffstat (limited to 'chart2')
37 files changed, 73 insertions, 119 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index baca5d41cf27..75d232dcb36e 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -63,8 +63,6 @@ #include <comphelper/InlineContainer.hxx> // header for function SvxShapeCollection_NewInstance #include <svx/unoshcol.hxx> -// header for define DBG_ASSERT -#include <tools/debug.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> @@ -1134,7 +1132,7 @@ Reference< drawing::XShapes > ChartDocumentWrapper::getAdditionalShapes() const // create a shape collection xFoundShapes = uno::Reference< drawing::XShapes >( SvxShapeCollection_NewInstance(), uno::UNO_QUERY ); - DBG_ASSERT( xFoundShapes.is(), "Couldn't create a shape collection!" ); + OSL_ENSURE( xFoundShapes.is(), "Couldn't create a shape collection!" ); if( xFoundShapes.is()) { ::std::vector< uno::Reference< drawing::XShape > >::iterator aIter; @@ -1301,7 +1299,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( case SERVICE_NAME_MARKER_TABLE: { uno::Reference< lang::XMultiServiceFactory > xTableFactory( xChartDoc, uno::UNO_QUERY ); - DBG_ASSERT( xTableFactory.get() != this, "new model is expected to implement service factory for gradient table etc" ); + OSL_ENSURE( xTableFactory.get() != this, "new model is expected to implement service factory for gradient table etc" ); if( xTableFactory.is() && xTableFactory.get() != this ) xResult.set( xTableFactory->createInstance( aIt->first ), uno::UNO_QUERY ); } diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index 1dd3a94ff833..7b5360bb902f 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -52,8 +52,6 @@ #include "WrappedTextRotationProperty.hxx" #include <rtl/ustrbuf.hxx> #include <rtl/math.hxx> -// header for define DBG_ASSERT -#include <tools/debug.hxx> #include <algorithm> #include <comphelper/InlineContainer.hxx> @@ -487,7 +485,7 @@ DataSeriesPointWrapper::DataSeriesPointWrapper( void SAL_CALL DataSeriesPointWrapper::initialize( const uno::Sequence< uno::Any >& aArguments ) throw ( uno::Exception, uno::RuntimeException) { - DBG_ASSERT(aArguments.getLength() >= 1,"need at least 1 argument to initialize the DataSeriesPointWrapper: series reference + optional datapoint index"); + OSL_PRECOND(aArguments.getLength() >= 1,"need at least 1 argument to initialize the DataSeriesPointWrapper: series reference + optional datapoint index"); m_nSeriesIndexInNewAPI = -1;//ignored in this case m_nPointIndex = -1; diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 070dca26372a..e9640af7e3a0 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -74,8 +74,6 @@ #include <map> #include <algorithm> #include <rtl/ustrbuf.hxx> -// header for define DBG_ERROR -#include <tools/debug.hxx> #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/util/XRefreshable.hpp> diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx index b0c62d859694..2744514b8933 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx @@ -34,9 +34,6 @@ #include "RelativeSizeHelper.hxx" #include "ReferenceSizePropertyProvider.hxx" -// header for define DBG_ASSERT -#include <tools/debug.hxx> - using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx index 04de30379a4f..136a2f18f010 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx @@ -32,9 +32,6 @@ #include "WrappedNumberFormatProperty.hxx" #include "macros.hxx" -// header for define DBG_ERROR -#include <tools/debug.hxx> - using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index bebbf410a89c..9fd1256ab747 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1162,7 +1162,7 @@ sal_Bool DataBrowser::SaveModified() const sal_Int32 nRow = lcl_getRowInData( GetCurRow()); const sal_Int32 nCol = lcl_getColumnInData( GetCurColumnId()); - DBG_ASSERT( nRow >= 0 || nCol >= 0, "This cell should not be modified!" ); + OSL_ENSURE( nRow >= 0 || nCol >= 0, "This cell should not be modified!" ); SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0; switch( m_apDataBrowserModel->getCellType( nCol, nRow )) diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index 536ecce1eeca..8156c85522c4 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -100,7 +100,7 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow fYAngle = BaseGFXHelper::Rad2Deg( fYAngle ); fZAngle = BaseGFXHelper::Rad2Deg( fZAngle ); - DBG_ASSERT( fZAngle>=-90 && fZAngle<=90, "z angle is out of valid range" ); + OSL_ENSURE( fZAngle>=-90 && fZAngle<=90, "z angle is out of valid range" ); lcl_SetMetricFieldLimits( m_aMFZRotation, 90 ); diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 9e77ad94c35d..26e304390724 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -419,7 +419,7 @@ SfxTabPage* ScaleTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs) sal_Bool ScaleTabPage::FillItemSet(SfxItemSet& rOutAttrs) { - DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); + OSL_PRECOND( pNumFormatter, "No NumberFormatter available" ); rOutAttrs.Put(SfxInt32Item(SCHATTR_AXISTYPE, m_nAxisType)); if(m_bAllowDateAxis) @@ -454,7 +454,7 @@ sal_Bool ScaleTabPage::FillItemSet(SfxItemSet& rOutAttrs) void ScaleTabPage::Reset(const SfxItemSet& rInAttrs) { - DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); + OSL_PRECOND( pNumFormatter, "No NumberFormatter available" ); if(!pNumFormatter) return; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index b454a007eb3f..bd657e85a734 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1306,7 +1306,7 @@ void SAL_CALL ChartController::executeDispatch_SourceData() //------------------------------------------------------------- //convert properties to ItemSet uno::Reference< XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); - DBG_ASSERT( xChartDoc.is(), "Invalid XChartDocument" ); + OSL_ENSURE( xChartDoc.is(), "Invalid XChartDocument" ); if( !xChartDoc.is()) return; diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 52b337ec93d6..d5d5fcc6ded8 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -156,10 +156,10 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() SolarMutexGuard aGuard; SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT( pFact, "No dialog factory" ); + OSL_ENSURE( pFact, "No dialog factory" ); pDlg = pFact->CreateSchTransformTabDialog( m_pChartWindow, &aItemSet, pSdrView, RID_SCH_TransformTabDLG_SVXPAGE_ANGLE, bResizePossible ); - DBG_ASSERT( pDlg, "Couldn't create SchTransformTabDialog" ); + OSL_ENSURE( pDlg, "Couldn't create SchTransformTabDialog" ); if( pDlg->Execute() == RET_OK ) diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index d61321586561..891285c9eb39 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -178,7 +178,7 @@ void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter() this->StartTextEdit(); SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT( pFact, "No dialog factory" ); + OSL_ENSURE( pFact, "No dialog factory" ); SfxAllItemSet aSet( m_pDrawModelWrapper->GetItemPool() ); aSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); @@ -190,7 +190,7 @@ void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter() aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) ); SfxAbstractDialog * pDlg = pFact->CreateSfxDialog( m_pChartWindow, aSet, getFrame(), RID_SVXDLG_CHARMAP ); - DBG_ASSERT( pDlg, "Couldn't create SvxCharacterMap dialog" ); + OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" ); if( pDlg->Execute() == RET_OK ) { const SfxItemSet* pSet = pDlg->GetOutputItemSet(); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 668cadcb1cd0..f8a3e1d21a12 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -509,7 +509,7 @@ void ChartController::execute_Paint( const Rectangle& rRect ) try { uno::Reference< frame::XModel > xModel( getModel() ); - //DBG_ASSERT( xModel.is(), "ChartController::execute_Paint: have no model to paint"); + //OSL_ENSURE( xModel.is(), "ChartController::execute_Paint: have no model to paint"); if( !xModel.is() ) return; diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index e8b9640b986f..8e54505ab342 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -251,7 +251,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* } } - DBG_ASSERT( pNewObj && m_aSelectedOID.isValid(), "somehow lost selected object" ); + OSL_ENSURE( pNewObj && m_aSelectedOID.isValid(), "somehow lost selected object" ); } else { diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index aa743e0a9685..5a7fa43e874c 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -42,7 +42,6 @@ #include "ChartModelHelper.hxx" #include "DataSourceHelper.hxx" -#include <tools/debug.hxx> #include <unotools/saveopt.hxx> #include <com/sun/star/chart/ChartAxisPosition.hpp> @@ -113,7 +112,7 @@ bool AxisHelper::isLogarithmic( const Reference< XScaling >& xScaling ) chart2::ScaleData AxisHelper::getDateCheckedScale( const Reference< chart2::XAxis >& xAxis, const Reference< frame::XModel >& xChartModel ) { - DBG_ASSERT(xChartModel.is(),"missing chart model"); + OSL_ENSURE(xChartModel.is(),"missing chart model"); ScaleData aScale = xAxis->getScaleData(); Reference< chart2::XCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( xChartModel ) ); if( aScale.AutoDateAxis && aScale.AxisType == AxisType::CATEGORY ) diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx index 49c0885f79aa..bc7235167afc 100644 --- a/chart2/source/tools/ChartModelHelper.cxx +++ b/chart2/source/tools/ChartModelHelper.cxx @@ -45,9 +45,6 @@ #include <com/sun/star/embed/XVisualObject.hpp> #include <com/sun/star/view/XSelectionChangeListener.hpp> -// header for define DBG_ASSERT -#include <tools/debug.hxx> - //............................................................................. namespace chart { @@ -137,7 +134,7 @@ awt::Size ChartModelHelper::getPageSize( const uno::Reference< frame::XModel >& { awt::Size aPageSize( ChartModelHelper::getDefaultPageSize() ); uno::Reference< embed::XVisualObject > xVisualObject(xModel,uno::UNO_QUERY); - DBG_ASSERT(xVisualObject.is(),"need xVisualObject for page size"); + OSL_ENSURE(xVisualObject.is(),"need xVisualObject for page size"); if( xVisualObject.is() ) aPageSize = xVisualObject->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); return aPageSize; @@ -146,7 +143,7 @@ awt::Size ChartModelHelper::getPageSize( const uno::Reference< frame::XModel >& void ChartModelHelper::setPageSize( const awt::Size& rSize, const uno::Reference< frame::XModel >& xModel ) { uno::Reference< embed::XVisualObject > xVisualObject(xModel,uno::UNO_QUERY); - DBG_ASSERT(xVisualObject.is(),"need xVisualObject for page size"); + OSL_ENSURE(xVisualObject.is(),"need xVisualObject for page size"); if( xVisualObject.is() ) xVisualObject->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, rSize ); } diff --git a/chart2/source/tools/ChartViewHelper.cxx b/chart2/source/tools/ChartViewHelper.cxx index f64c0e7f7565..eacdc25dc7ae 100644 --- a/chart2/source/tools/ChartViewHelper.cxx +++ b/chart2/source/tools/ChartViewHelper.cxx @@ -33,8 +33,6 @@ #include "macros.hxx" #include "servicenames.hxx" -// header for define DBG_ASSERT -#include <tools/debug.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/util/XModifyListener.hpp> diff --git a/chart2/source/tools/NumberFormatterWrapper.cxx b/chart2/source/tools/NumberFormatterWrapper.cxx index 5df81ccaa139..f408f943bbce 100644 --- a/chart2/source/tools/NumberFormatterWrapper.cxx +++ b/chart2/source/tools/NumberFormatterWrapper.cxx @@ -37,7 +37,6 @@ #include <svl/zformat.hxx> #include <tools/color.hxx> #include <i18npool/mslangid.hxx> -#include <tools/debug.hxx> #include <com/sun/star/util/DateTime.hpp> //............................................................................. @@ -80,7 +79,7 @@ NumberFormatterWrapper::NumberFormatterWrapper( const uno::Reference< util::XNum SvNumberFormatsSupplierObj* pSupplierObj = SvNumberFormatsSupplierObj::getImplementation( xSupplier ); if( pSupplierObj ) m_pNumberFormatter = pSupplierObj->GetNumberFormatter(); - DBG_ASSERT(m_pNumberFormatter,"need a numberformatter"); + OSL_POSTCOND(m_pNumberFormatter,"need a numberformatter"); } NumberFormatterWrapper::~NumberFormatterWrapper() diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index bdb3b0e9693b..3e8c2baa9659 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -418,7 +418,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierForObject( } else { - DBG_ASSERT(false,"give object could not be identifed in createClassifiedIdentifierForObject"); + OSL_FAIL("give object could not be identifed in createClassifiedIdentifierForObject"); } return aRet; diff --git a/chart2/source/view/axes/Tickmarks.cxx b/chart2/source/view/axes/Tickmarks.cxx index ded69433b509..6f6076ac3bf7 100644 --- a/chart2/source/view/axes/Tickmarks.cxx +++ b/chart2/source/view/axes/Tickmarks.cxx @@ -32,7 +32,6 @@ #include "Tickmarks_Dates.hxx" #include "ViewDefines.hxx" #include <rtl/math.hxx> -#include <tools/debug.hxx> #include <memory> //............................................................................. @@ -115,7 +114,7 @@ TickFactory::TickFactory( if( m_rScale.Scaling.is() ) { m_xInverseScaling = m_rScale.Scaling->getInverseScaling(); - DBG_ASSERT( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" ); + OSL_ENSURE( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" ); } m_fScaledVisibleMin = m_rScale.Minimum; diff --git a/chart2/source/view/axes/Tickmarks_Dates.cxx b/chart2/source/view/axes/Tickmarks_Dates.cxx index fa466b755824..de5e43a24b05 100644 --- a/chart2/source/view/axes/Tickmarks_Dates.cxx +++ b/chart2/source/view/axes/Tickmarks_Dates.cxx @@ -30,7 +30,6 @@ #include "Tickmarks_Dates.hxx" #include "DateScaling.hxx" #include <rtl/math.hxx> -#include <tools/debug.hxx> #include "DateHelper.hxx" //............................................................................. @@ -56,7 +55,7 @@ DateTickFactory::DateTickFactory( if( m_aScale.Scaling.is() ) { m_xInverseScaling = m_aScale.Scaling->getInverseScaling(); - DBG_ASSERT( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" ); + OSL_ENSURE( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" ); } m_fScaledVisibleMin = m_aScale.Minimum; diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.cxx b/chart2/source/view/axes/Tickmarks_Equidistant.cxx index aa5376161853..086011eece4f 100644 --- a/chart2/source/view/axes/Tickmarks_Equidistant.cxx +++ b/chart2/source/view/axes/Tickmarks_Equidistant.cxx @@ -30,7 +30,6 @@ #include "Tickmarks_Equidistant.hxx" #include "ViewDefines.hxx" #include <rtl/math.hxx> -#include <tools/debug.hxx> #include <limits> #include <memory> @@ -97,7 +96,7 @@ EquidistantTickFactory::EquidistantTickFactory( if( m_rScale.Scaling.is() ) { m_xInverseScaling = m_rScale.Scaling->getInverseScaling(); - DBG_ASSERT( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" ); + OSL_ENSURE( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" ); } double fMin = m_fScaledVisibleMin = m_rScale.Minimum; @@ -264,7 +263,7 @@ double* EquidistantTickFactory::getMinorTick( sal_Int32 nTick, sal_Int32 nDepth { //check validity of arguments { - //DBG_ASSERT( fStartParentTick < fNextParentTick, "fStartParentTick >= fNextParentTick"); + //OSL_ENSURE( fStartParentTick < fNextParentTick, "fStartParentTick >= fNextParentTick"); if(fStartParentTick >= fNextParentTick) return NULL; if(nDepth>static_cast<sal_Int32>(m_rIncrement.SubIncrements.size()) || nDepth<=0) diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx index 62d2a9353d7c..0012b8c863e5 100644 --- a/chart2/source/view/axes/VAxisBase.cxx +++ b/chart2/source/view/axes/VAxisBase.cxx @@ -35,9 +35,6 @@ #include "Tickmarks.hxx" #include "macros.hxx" -// header for define DBG_ASSERT -#include <tools/debug.hxx> - #include <memory> //............................................................................. @@ -145,7 +142,7 @@ sal_Bool VAxisBase::isAnythingToDraw() if( !m_aAxisProperties.m_xAxisModel.is() ) return false; - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized"); + OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) return false; diff --git a/chart2/source/view/axes/VAxisOrGridBase.cxx b/chart2/source/view/axes/VAxisOrGridBase.cxx index 489af51f7c0e..287ea2553144 100644 --- a/chart2/source/view/axes/VAxisOrGridBase.cxx +++ b/chart2/source/view/axes/VAxisOrGridBase.cxx @@ -34,9 +34,6 @@ #include "CommonConverters.hxx" #include "Tickmarks.hxx" -// header for define DBG_ASSERT -#include <tools/debug.hxx> - //............................................................................. namespace chart { diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx index dc273328e45a..ba8a9b6443f3 100644 --- a/chart2/source/view/axes/VCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -49,8 +49,6 @@ #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XDataSeriesContainer.hpp> -// header for define DBG_ASSERT -#include <tools/debug.hxx> #include <rtl/math.hxx> //............................................................................. @@ -113,7 +111,7 @@ void VCoordinateSystem::initPlottingTargets( const Reference< drawing::XShapes , Reference< drawing::XShapes >& xLogicTargetForSeriesBehindAxis ) throw (uno::RuntimeException) { - DBG_ASSERT(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters"); + OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters"); //is only allowed to be called once sal_Int32 nDimensionCount = m_xCooSysModel->getDimension(); diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx index b2801e31cd6d..1d9a3cbb712e 100644 --- a/chart2/source/view/axes/VPolarGrid.cxx +++ b/chart2/source/view/axes/VPolarGrid.cxx @@ -241,7 +241,7 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic void VPolarGrid::createShapes() { - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized"); + OSL_PRECOND(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) return; if(!m_aGridPropertiesList.getLength()) diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index b490625ee7bc..e151dc65ac38 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -49,7 +49,6 @@ #include <com/sun/star/chart/DataLabelPlacement.hpp> #include <com/sun/star/chart/MissingValueTreatment.hpp> -#include <tools/debug.hxx> #include <editeng/unoprnms.hxx> #include <rtl/math.hxx> @@ -229,7 +228,7 @@ void AreaChart::addSeries( VDataSeries* pSeries, sal_Int32 zSlot, sal_Int32 xSlo if( m_nDimension == 3 && !m_bCategoryXAxis ) { //3D xy always deep - DBG_ASSERT( zSlot==-1,"3D xy charts should be deep stacked in model also" ); + OSL_ENSURE( zSlot==-1,"3D xy charts should be deep stacked in model also" ); zSlot=-1; xSlot=0; ySlot=0; @@ -597,7 +596,7 @@ void AreaChart::createShapes() if( m_nDimension == 2 && ( m_bArea || !m_bCategoryXAxis ) ) lcl_reorderSeries( m_aZSlots ); - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"AreaChart is not proper initialized"); + OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"AreaChart is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) return; diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 052dae7ebe9c..f1513e32493f 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -44,7 +44,6 @@ #include <com/sun/star/chart/DataLabelPlacement.hpp> #include <com/sun/star/chart2/DataPointGeometry3D.hpp> -#include <tools/debug.hxx> #include <rtl/math.hxx> //............................................................................. @@ -421,7 +420,7 @@ void BarChart::createShapes() if( m_aZSlots.begin() == m_aZSlots.end() ) //no series return; - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BarChart is not proper initialized"); + OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BarChart is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) return; diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index 4fc8b15f7d7a..becf3296e53d 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -43,7 +43,6 @@ #include <com/sun/star/chart2/Symbol.hpp> #include <com/sun/star/chart/DataLabelPlacement.hpp> -#include <tools/debug.hxx> #include <editeng/unoprnms.hxx> #include <rtl/math.hxx> #include <com/sun/star/drawing/DoubleSequence.hpp> @@ -212,7 +211,7 @@ void BubbleChart::createShapes() if( m_aZSlots.begin() == m_aZSlots.end() ) //no series return; - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BubbleChart is not proper initialized"); + OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BubbleChart is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) return; diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index 8bf707280946..bea97a1e2dca 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -40,7 +40,6 @@ #include "FormattedStringHelper.hxx" #include "DataSeriesHelper.hxx" #include "DateHelper.hxx" -#include <tools/debug.hxx> #include <rtl/math.hxx> #include <editeng/unoprnms.hxx> @@ -124,7 +123,7 @@ void CandleStickChart::createShapes() if( m_nDimension!=2 ) return; - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"CandleStickChart is not proper initialized"); + OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"CandleStickChart is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) return; diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 01afc2070a02..d7bdb5746e7f 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -43,8 +43,6 @@ #include <com/sun/star/chart2/XColorScheme.hpp> #include <com/sun/star/container/XChild.hpp> - -#include <tools/debug.hxx> #include <rtl/math.hxx> //............................................................................. @@ -160,7 +158,7 @@ PieChart::~PieChart() void PieChart::setScales( const std::vector< ExplicitScaleData >& rScales, bool /* bSwapXAndYAxis */ ) { - DBG_ASSERT(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence"); + OSL_ENSURE(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence"); m_pPosHelper->setScales( rScales, true ); } @@ -329,7 +327,7 @@ void PieChart::createShapes() if( m_aZSlots.begin() == m_aZSlots.end() ) //no series return; - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"PieChart is not proper initialized"); + OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"PieChart is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) return; diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx index c0e99e756048..6b1d1007b700 100644 --- a/chart2/source/view/charttypes/Splines.cxx +++ b/chart2/source/view/charttypes/Splines.cxx @@ -37,9 +37,6 @@ #include <algorithm> #include <functional> -// header for DBG_ASSERT -#include <tools/debug.hxx> - //............................................................................. namespace chart { @@ -207,7 +204,7 @@ void lcl_SplineCalculation::Calculate() double lcl_SplineCalculation::GetInterpolatedValue( double x ) { - DBG_ASSERT( ( m_aPoints[ 0 ].first <= x ) && + OSL_PRECOND( ( m_aPoints[ 0 ].first <= x ) && ( x <= m_aPoints[ m_aPoints.size() - 1 ].first ), "Trying to extrapolate" ); @@ -236,12 +233,12 @@ double lcl_SplineCalculation::GetInterpolatedValue( double x ) ++m_nKHigh; ++m_nKLow; } - DBG_ASSERT( m_nKHigh <= n, "Out of Bounds" ); + OSL_ENSURE( m_nKHigh <= n, "Out of Bounds" ); } m_fLastInterpolatedValue = x; double h = m_aPoints[ m_nKHigh ].first - m_aPoints[ m_nKLow ].first; - DBG_ASSERT( h != 0, "Bad input to GetInterpolatedValue()" ); + OSL_ENSURE( h != 0, "Bad input to GetInterpolatedValue()" ); double a = ( m_aPoints[ m_nKHigh ].first - x ) / h; double b = ( x - m_aPoints[ m_nKLow ].first ) / h; @@ -313,7 +310,7 @@ void SplineCalculater::CalculateCubicSplines( , drawing::PolyPolygonShape3D& rResult , sal_Int32 nGranularity ) { - DBG_ASSERT( nGranularity > 0, "Granularity is invalid" ); + OSL_PRECOND( nGranularity > 0, "Granularity is invalid" ); rResult.SequenceX.realloc(0); rResult.SequenceY.realloc(0); diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 7a128669c921..fb7cc32d9e8d 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -74,7 +74,6 @@ // header for class OUStringBuffer #include <rtl/ustrbuf.hxx> #include <rtl/math.hxx> -#include <tools/debug.hxx> #include <basegfx/vector/b2dvector.hxx> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/util/XCloneable.hpp> @@ -161,7 +160,7 @@ VSeriesPlotter::VSeriesPlotter( const uno::Reference<XChartType>& xChartTypeMode , m_pExplicitCategoriesProvider(0) , m_bPointsWereSkipped(false) { - DBG_ASSERT(m_xChartTypeModel.is(),"no XChartType available in view, fallback to default values may be wrong"); + OSL_POSTCOND(m_xChartTypeModel.is(),"no XChartType available in view, fallback to default values may be wrong"); } VSeriesPlotter::~VSeriesPlotter() @@ -198,7 +197,7 @@ void VSeriesPlotter::addSeries( VDataSeries* pSeries, sal_Int32 zSlot, sal_Int32 { //take ownership of pSeries - DBG_ASSERT( pSeries, "series to add is NULL" ); + OSL_PRECOND( pSeries, "series to add is NULL" ); if(!pSeries) return; diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index c008ea2d5837..23109b11b3fb 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -41,7 +41,6 @@ #include "ThreeDHelper.hxx" #include <editeng/unoprnms.hxx> #include <tools/color.hxx> -#include <tools/debug.hxx> #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/drawing/ProjectionMode.hpp> @@ -110,7 +109,7 @@ void VDiagram::init( , const uno::Reference< drawing::XShapes >& xFinalTarget , const uno::Reference< lang::XMultiServiceFactory >& xFactory ) { - DBG_ASSERT(xLogicTarget.is()&&xFinalTarget.is()&&xFactory.is(),"no proper initialization parameters"); + OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is()&&xFactory.is(),"no proper initialization parameters"); m_xLogicTarget = xLogicTarget; m_xFinalTarget = xFinalTarget; @@ -171,7 +170,7 @@ void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize ) void VDiagram::createShapes_2d() { - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is(),"is not proper initialized"); + OSL_PRECOND(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is(),"is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is())) return; @@ -202,7 +201,7 @@ void VDiagram::createShapes_2d() { try { - DBG_ASSERT( m_xDiagram.is(), "Invalid Diagram model" ); + OSL_ENSURE( m_xDiagram.is(), "Invalid Diagram model" ); if( m_xDiagram.is() ) { uno::Reference< beans::XPropertySet > xWallProp( m_xDiagram->getWall()); @@ -314,7 +313,7 @@ namespace void lcl_ensureScaleValue( double& rfScale ) { - DBG_ASSERT(rfScale>0, "calculation error for automatic 3D height in chart"); + OSL_ENSURE(rfScale>0, "calculation error for automatic 3D height in chart"); if( rfScale<0 ) rfScale = 1.0; else if( rfScale<0.2 ) @@ -327,7 +326,7 @@ void lcl_ensureScaleValue( double& rfScale ) void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) { - DBG_ASSERT(m_xAspectRatio3D.is(), "created shape offers no XPropertySet"); + OSL_PRECOND(m_xAspectRatio3D.is(), "created shape offers no XPropertySet"); if( m_xAspectRatio3D.is()) { try @@ -386,7 +385,7 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) else { //todo - DBG_ASSERT(false, "not implemented yet"); + OSL_FAIL("not implemented yet"); if( fScaleX<0 ) fScaleX = 1.0; @@ -430,7 +429,7 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) else { //todo - DBG_ASSERT(false, "not implemented yet"); + OSL_FAIL("not implemented yet"); if( fScaleX<0 ) fScaleX = 1.0; @@ -494,7 +493,7 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) void VDiagram::createShapes_3d() { - DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is(),"is not proper initialized"); + OSL_PRECOND(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is(),"is not proper initialized"); if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is())) return; @@ -681,7 +680,7 @@ void VDiagram::createShapes_3d() m_xCoordinateRegionShape = uno::Reference< drawing::XShape >( xShapes, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xShapeProp( m_xCoordinateRegionShape, uno::UNO_QUERY ); - DBG_ASSERT(xShapeProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xShapeProp.is(), "created shape offers no XPropertySet"); if( xShapeProp.is()) { try diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 34a66d7636fb..016001cd76b9 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -185,7 +185,7 @@ void ChartView::impl_setChartModel( const uno::Reference< frame::XModel >& xChar void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments ) throw ( uno::Exception, uno::RuntimeException) { - DBG_ASSERT(aArguments.getLength() >= 1,"need 1 argument to initialize the view: xModel"); + OSL_PRECOND(aArguments.getLength() >= 1,"need 1 argument to initialize the view: xModel"); if( !(aArguments.getLength() >= 1) ) return; @@ -1502,7 +1502,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& else { xSeriesTarget = xSeriesTargetBehindAxis; - DBG_ASSERT( !bIsPieOrDonut, "not implemented yet! - during a complete recreation this shape is destroyed so no series can be created anymore" ); + OSL_ENSURE( !bIsPieOrDonut, "not implemented yet! - during a complete recreation this shape is destroyed so no series can be created anymore" ); } pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,m_xShapeFactory,aCID ); pSeriesPlotter->setPageReferenceSize( rPageSize ); diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx index 9973c50d3bed..7210cf60801b 100644 --- a/chart2/source/view/main/PlotterBase.cxx +++ b/chart2/source/view/main/PlotterBase.cxx @@ -33,7 +33,6 @@ #include "ShapeFactory.hxx" #include <rtl/math.hxx> #include <com/sun/star/chart2/DataPointLabel.hpp> -#include <tools/debug.hxx> //............................................................................. namespace chart @@ -63,7 +62,7 @@ void PlotterBase::initPlotter( const uno::Reference< drawing::XShapes >& xLogic , const rtl::OUString& rCID ) throw (uno::RuntimeException) { - DBG_ASSERT(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters"); + OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters"); //is only allowed to be called once m_xLogicTarget = xLogicTarget; m_xFinalTarget = xFinalTarget; @@ -79,14 +78,14 @@ PlotterBase::~PlotterBase() void PlotterBase::setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis ) { - DBG_ASSERT(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence"); + OSL_PRECOND(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence"); m_pPosHelper->setScales( rScales, bSwapXAndYAxis ); } void PlotterBase::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix) { - DBG_ASSERT(m_nDimension==2,"Set this transformation only in case of 2D"); + OSL_PRECOND(m_nDimension==2,"Set this transformation only in case of 2D"); if(m_nDimension!=2) return; m_pPosHelper->setTransformationSceneToScreen( rMatrix ); diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 12097d85710b..e152c47b3a7c 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -55,7 +55,6 @@ #include <editeng/unoprnms.hxx> #include <tools/color.hxx> -#include <tools/debug.hxx> #include <rtl/math.hxx> #include <svx/svdocirc.hxx> #include <svx/svdopath.hxx> @@ -85,7 +84,7 @@ void ShapeFactory::setShapeName( const uno::Reference< drawing::XShape >& xShape if(!xShape.is()) return; uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "shape offers no XPropertySet"); if( xProp.is()) { try @@ -107,7 +106,7 @@ rtl::OUString ShapeFactory::getShapeName( const uno::Reference< drawing::XShape rtl::OUString aRet; uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "shape offers no XPropertySet"); if( xProp.is()) { try @@ -174,7 +173,7 @@ uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape( uno::Any createPolyPolygon_Cube( const drawing::Direction3D& rSize, double fRoundedEdge, bool bRounded = true ) { - DBG_ASSERT(fRoundedEdge>=0, "fRoundedEdge needs to be >= 0"); + OSL_PRECOND(fRoundedEdge>=0, "fRoundedEdge needs to be >= 0"); // always use extra points, so set percent diagonal to 0.4 which is 0% in the UI (old Chart comment) if( fRoundedEdge == 0.0 && bRounded) @@ -267,7 +266,7 @@ uno::Any createPolyPolygon_Cylinder( , sal_Int32& nVerticalSegmentCount ) { //fHeight may be negative - DBG_ASSERT(fRadius>0, "The radius of a cylinder needs to be > 0"); + OSL_PRECOND(fRadius>0, "The radius of a cylinder needs to be > 0"); //-------------------------------------- drawing::PolyPolygonShape3D aPP; @@ -353,7 +352,7 @@ uno::Any createPolyPolygon_Cylinder( uno::Any createPolyPolygon_Cone( double fHeight, double fRadius, double fTopHeight , sal_Int32& nVerticalSegmentCount ) { - DBG_ASSERT(fRadius>0, "The radius of a cone needs to be > 0"); + OSL_PRECOND(fRadius>0, "The radius of a cone needs to be > 0"); //for stacked charts we need cones without top -> fTopHeight != 0 resp. bTopless == true //fTopHeight indicates the high of the cutted top only (not the full height) @@ -490,7 +489,7 @@ uno::Reference<drawing::XShape> //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -733,7 +732,7 @@ uno::Reference<drawing::XShape> //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -979,7 +978,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1032,7 +1031,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1112,7 +1111,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1171,7 +1170,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1231,7 +1230,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1482,7 +1481,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1544,7 +1543,7 @@ uno::Reference< drawing::XShape > ASSERT_EXCEPTION( e ); } uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1615,7 +1614,7 @@ uno::Reference< drawing::XShapes > { //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1677,7 +1676,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1713,7 +1712,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1774,7 +1773,7 @@ uno::Reference< drawing::XShape > //set properties uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet"); if( xProp.is()) { try @@ -1834,7 +1833,7 @@ uno::Any ShapeFactory::makeTransformation( const awt::Point& rScreenPosition2D, void ShapeFactory::makeShapeInvisible( const uno::Reference< drawing::XShape >& xShape ) { uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY ); - DBG_ASSERT(xShapeProp.is(), "created shape offers no XPropertySet"); + OSL_ENSURE(xShapeProp.is(), "created shape offers no XPropertySet"); if( xShapeProp.is()) { try @@ -1957,7 +1956,7 @@ bool ShapeFactory::isPolygonEmptyOrSinglePoint( drawing::PolyPolygonShape3D& rPo void ShapeFactory::closePolygon( drawing::PolyPolygonShape3D& rPoly) { - DBG_ASSERT( rPoly.SequenceX.getLength() <= 1, "ShapeFactory::closePolygon - single polygon expected" ); + OSL_ENSURE( rPoly.SequenceX.getLength() <= 1, "ShapeFactory::closePolygon - single polygon expected" ); //add a last point == first point if(isPolygonEmptyOrSinglePoint(rPoly)) return; diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 64d20e7415a8..7f00e2f3f0aa 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -36,9 +36,6 @@ #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/chart2/Symbol.hpp> -// header for define DBG_ASSERT -#include <tools/debug.hxx> - using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; |