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 | d7e25f736f71784fd2c1db3715c6face9fb122fc (patch) | |
tree | cdfc1f559bf9e95d2b40ea91d78b20c72451554c /chart2/source/controller | |
parent | e8c376c207e89f0b6155e4bbcd0f46421db116ea (diff) |
Replace DBG_* with OSL_* in calc/chart2
Diffstat (limited to 'chart2/source/controller')
13 files changed, 14 insertions, 26 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 1d36ba2e9..e34ba33ca 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 e1576ac86..508ad5a75 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 69e6b4949..d3f9f3896 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 93b022992..391a4892a 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 1116f623d..172d5062c 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 bebbf410a..9fd1256ab 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 a2f0e1a73..24f1b1dab 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 93ab4a1f2..553e17f4d 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 312d7d476..0130fbbac 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 10393e3ad..d1db71f8f 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 a1f7a8bd7..23441cb95 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 3e6c889f9..4a2d62189 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 a141a7819..cf3757de8 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 { |