diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 13:48:15 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 13:48:15 +1000 |
commit | fb684bbd9d376ae5e3081c236f5d0775b5a93c03 (patch) | |
tree | 3eca6dd12fd32231e0490f4f9aae28203ffaf960 | |
parent | fbf171d1adf3e260f6a93217e82a1b74cc4f670c (diff) |
tdf#43157: convert oox module away from OSL_ASSERT to assert
Change-Id: Ia7b62b94190537236135548f7d1d22ea3dc360f2
-rw-r--r-- | oox/source/drawingml/clrscheme.cxx | 3 | ||||
-rw-r--r-- | oox/source/drawingml/drawingmltypes.cxx | 8 | ||||
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 6 | ||||
-rw-r--r-- | oox/source/drawingml/lineproperties.cxx | 10 | ||||
-rw-r--r-- | oox/source/drawingml/textparagraphproperties.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptObject.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 2 |
8 files changed, 22 insertions, 21 deletions
diff --git a/oox/source/drawingml/clrscheme.cxx b/oox/source/drawingml/clrscheme.cxx index 2f8e93701e97..435054d12bb3 100644 --- a/oox/source/drawingml/clrscheme.cxx +++ b/oox/source/drawingml/clrscheme.cxx @@ -18,6 +18,7 @@ */ #include <algorithm> +#include <cassert> #include <osl/diagnose.h> #include "oox/drawingml/clrscheme.hxx" @@ -63,7 +64,7 @@ private: bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, sal_Int32& rColor ) const { - OSL_ASSERT((nSchemeClrToken & sal_Int32(0xFFFF0000))==0); + assert((nSchemeClrToken & sal_Int32(0xFFFF0000))==0); switch( nSchemeClrToken ) { case XML_bg1 : nSchemeClrToken = XML_lt1; break; diff --git a/oox/source/drawingml/drawingmltypes.cxx b/oox/source/drawingml/drawingmltypes.cxx index 725d7af84c87..afbb4612de16 100644 --- a/oox/source/drawingml/drawingmltypes.cxx +++ b/oox/source/drawingml/drawingmltypes.cxx @@ -106,7 +106,7 @@ float GetFontHeight( sal_Int32 nHeight ) sal_Int16 GetFontUnderline( sal_Int32 nToken ) { - OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0); + assert((nToken & sal_Int32(0xFFFF0000))==0); switch( nToken ) { case XML_none: return awt::FontUnderline::NONE; @@ -133,7 +133,7 @@ sal_Int16 GetFontUnderline( sal_Int32 nToken ) sal_Int16 GetFontStrikeout( sal_Int32 nToken ) { - OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0); + assert((nToken & sal_Int32(0xFFFF0000))==0); switch( nToken ) { case XML_dblStrike: return awt::FontStrikeout::DOUBLE; @@ -156,7 +156,7 @@ sal_Int16 GetCaseMap( sal_Int32 nToken ) /** converts a paragraph align to a ParaAdjust */ ParagraphAdjust GetParaAdjust( sal_Int32 nAlign ) { - OSL_ASSERT((nAlign & sal_Int32(0xFFFF0000))==0); + assert((nAlign & sal_Int32(0xFFFF0000))==0); ParagraphAdjust nEnum; switch( nAlign ) { @@ -224,7 +224,7 @@ const char* GetTextVerticalAdjust( TextVerticalAdjust eAdjust ) TabAlign GetTabAlign( sal_Int32 aToken ) { - OSL_ASSERT((aToken & sal_Int32(0xFFFF0000))==0); + assert((aToken & sal_Int32(0xFFFF0000))==0); TabAlign nEnum; switch( aToken ) { diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 314ff5822695..2d128ec1b449 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -113,7 +113,7 @@ Reference< XGraphic > applyBrightnessContrast( Reference< XGraphic > const & xGr BitmapMode lclGetBitmapMode( sal_Int32 nToken ) { - OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0); + assert((nToken & sal_Int32(0xFFFF0000))==0); switch( nToken ) { case XML_tile: return BitmapMode_REPEAT; @@ -124,7 +124,7 @@ BitmapMode lclGetBitmapMode( sal_Int32 nToken ) RectanglePoint lclGetRectanglePoint( sal_Int32 nToken ) { - OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0); + assert((nToken & sal_Int32(0xFFFF0000))==0); switch( nToken ) { case XML_tl: return RectanglePoint_LEFT_TOP; @@ -317,7 +317,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, if( moFillType.has() ) { FillStyle eFillStyle = FillStyle_NONE; - OSL_ASSERT((moFillType.get() & sal_Int32(0xFFFF0000))==0); + assert((moFillType.get() & sal_Int32(0xFFFF0000))==0); switch( moFillType.get() ) { case XML_noFill: diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx index dabe5d71356b..92d46a5deb84 100644 --- a/oox/source/drawingml/lineproperties.cxx +++ b/oox/source/drawingml/lineproperties.cxx @@ -132,7 +132,7 @@ void lclConvertCustomDash( LineDash& orLineDash, const LineProperties::DashStopV DashStyle lclGetDashStyle( sal_Int32 nToken ) { - OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0); + assert((nToken & sal_Int32(0xFFFF0000))==0); switch( nToken ) { case XML_rnd: return DashStyle_ROUNDRELATIVE; @@ -144,7 +144,7 @@ DashStyle lclGetDashStyle( sal_Int32 nToken ) LineJoint lclGetLineJoint( sal_Int32 nToken ) { - OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0); + assert((nToken & sal_Int32(0xFFFF0000))==0); switch( nToken ) { case XML_round: return LineJoint_ROUND; @@ -160,7 +160,7 @@ const sal_Int32 OOX_ARROWSIZE_LARGE = 2; sal_Int32 lclGetArrowSize( sal_Int32 nToken ) { - OSL_ASSERT((nToken & sal_Int32(0xFFFF0000))==0); + assert((nToken & sal_Int32(0xFFFF0000))==0); switch( nToken ) { case XML_sm: return OOX_ARROWSIZE_SMALL; @@ -181,7 +181,7 @@ void lclPushMarkerProperties( ShapePropertyMap& rPropMap, sal_Int32 nMarkerWidth = 0; bool bMarkerCenter = false; sal_Int32 nArrowType = rArrowProps.moArrowType.get( XML_none ); - OSL_ASSERT((nArrowType & sal_Int32(0xFFFF0000))==0); + assert((nArrowType & sal_Int32(0xFFFF0000))==0); switch( nArrowType ) { case XML_triangle: @@ -241,7 +241,7 @@ void lclPushMarkerProperties( ShapePropertyMap& rPropMap, #define OOX_ARROW_POINT( x, y ) awt::Point( static_cast< sal_Int32 >( fArrowWidth * x ), static_cast< sal_Int32 >( fArrowLength * y ) ) ::std::vector< awt::Point > aPoints; - OSL_ASSERT((rArrowProps.moArrowType.get() & sal_Int32(0xFFFF0000))==0); + assert((rArrowProps.moArrowType.get() & sal_Int32(0xFFFF0000))==0); switch( rArrowProps.moArrowType.get() ) { case XML_triangle: diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 0a825cfc28c1..1b09c782c33c 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -119,7 +119,7 @@ void BulletList::setSuffixMinusRight() void BulletList::setType( sal_Int32 nType ) { - OSL_ASSERT((nType & sal_Int32(0xFFFF0000))==0); + assert((nType & sal_Int32(0xFFFF0000))==0); switch( nType ) { case XML_alphaLcParenBoth: diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 7b786c782fba..5665f44c73bb 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -168,14 +168,14 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i ) { Reference< chart2::XCoordinateSystem > xCooSys( aCooSysSeq[i] ); - OSL_ASSERT( xCooSys.is()); + assert( xCooSys.is()); for( sal_Int32 nN = xCooSys->getDimension(); nN--; ) { const sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nN); for(sal_Int32 nI=0; nI<=nMaxAxisIndex; ++nI) { Reference< chart2::XAxis > xAxis = xCooSys->getAxisByDimension( nN, nI ); - OSL_ASSERT( xAxis.is()); + assert( xAxis.is()); if( xAxis.is()) { chart2::ScaleData aScaleData = xAxis->getScaleData(); @@ -353,7 +353,7 @@ void lcl_fillCategoriesIntoStringVector( const Reference< chart2::data::XDataSequence > & xCategories, ::std::vector< OUString > & rOutCategories ) { - OSL_ASSERT( xCategories.is()); + assert( xCategories.is()); if( !xCategories.is()) return; Reference< chart2::data::XTextualDataSequence > xTextualDataSequence( xCategories, uno::UNO_QUERY ); @@ -661,7 +661,7 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha void ChartExport::ExportContent() { Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); - OSL_ASSERT( xChartDoc.is() ); + assert( xChartDoc.is() ); if( !xChartDoc.is() ) return; InitRangeSegmentationProperties( xChartDoc ); diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index b3dd2f550f2d..9dbbaf189a91 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -1109,7 +1109,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XMod uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY ); if( xCompSupp.is()) xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY ); - OSL_ASSERT( xReceiver.is()); + assert( xReceiver.is()); if( xReceiver.is() ) { uno::Reference< lang::XMultiServiceFactory> xFac(_xModel,uno::UNO_QUERY); @@ -1149,7 +1149,7 @@ void OOle2Obj::initializeChart( const uno::Reference< frame::XModel>& _xModel) uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY ); if( xCompSupp.is()) xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY ); - OSL_ASSERT( xReceiver.is()); + assert( xReceiver.is()); if( xReceiver.is() ) { // lock the model to suppress any internal updates diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 0527ef79ca58..e61a0f93d805 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -696,7 +696,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep }; - OSL_ASSERT( pDefaults.size() == SAL_N_ELEMENTS(aItemInfos) ); + assert( pDefaults.size() == SAL_N_ELEMENTS(aItemInfos) ); static const sal_uInt16 pRanges[] = { |