diff options
Diffstat (limited to 'oox/source/drawingml')
46 files changed, 318 insertions, 318 deletions
diff --git a/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx b/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx index 8d710955db6e..ba106e12adda 100644 --- a/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx +++ b/oox/source/drawingml/ThemeOverrideFragmentHandler.cxx @@ -39,7 +39,7 @@ ContextHandlerRef ThemeOverrideFragmentHandler::onCreateContext( sal_Int32 nElem } break; } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/chart/axiscontext.cxx b/oox/source/drawingml/chart/axiscontext.cxx index e735ac82fd45..f9a32794ef1a 100644 --- a/oox/source/drawingml/chart/axiscontext.cxx +++ b/oox/source/drawingml/chart/axiscontext.cxx @@ -49,10 +49,10 @@ ContextHandlerRef AxisDispUnitsContext::onCreateContext( sal_Int32 nElement, con { case C_TOKEN( builtInUnit ): mrModel.mnBuiltInUnit = rAttribs.getString( XML_val, "thousands" ); - return 0; + return nullptr; case C_TOKEN( custUnit ): mrModel.mfCustomUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( dispUnitsLbl ): return this; } @@ -72,7 +72,7 @@ ContextHandlerRef AxisDispUnitsContext::onCreateContext( sal_Int32 nElement, con } break; } - return 0; + return nullptr; } AxisContextBase::AxisContextBase( ContextHandler2Helper& rParent, AxisModel& rModel ) : @@ -97,42 +97,42 @@ ContextHandlerRef AxisContextBase::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( axId ): mrModel.mnAxisId = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( crossAx ): mrModel.mnCrossAxisId = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( crosses ): mrModel.mnCrossMode = rAttribs.getToken( XML_val, XML_autoZero ); - return 0; + return nullptr; case C_TOKEN( crossesAt ): mrModel.mofCrossesAt = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( delete ): mrModel.mbDeleted = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( majorGridlines ): return new ShapePrWrapperContext( *this, mrModel.mxMajorGridLines.create() ); case C_TOKEN( majorTickMark ): mrModel.mnMajorTickMark = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_out : XML_cross ); - return 0; + return nullptr; case C_TOKEN(axPos): mrModel.mnAxisPos = rAttribs.getToken( XML_val, XML_TOKEN_INVALID ); - return 0; + return nullptr; case C_TOKEN( minorGridlines ): return new ShapePrWrapperContext( *this, mrModel.mxMinorGridLines.create() ); case C_TOKEN( minorTickMark ): mrModel.mnMinorTickMark = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_none : XML_cross ); - return 0; + return nullptr; case C_TOKEN( numFmt ): mrModel.maNumberFormat.setAttributes( rAttribs ); - return 0; + return nullptr; case C_TOKEN( scaling ): return this; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( tickLblPos ): mrModel.mnTickLabelPos = rAttribs.getToken( XML_val, XML_nextTo ); - return 0; + return nullptr; case C_TOKEN( title ): { bool bVerticalDefault = mrModel.mnAxisPos == XML_l || mrModel.mnAxisPos == XML_r; @@ -149,20 +149,20 @@ ContextHandlerRef AxisContextBase::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( logBase ): mrModel.mofLogBase = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( max ): mrModel.mofMax = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( min ): mrModel.mofMin = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( orientation ): mrModel.mnOrientation = rAttribs.getToken( XML_val, XML_minMax ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } CatAxisContext::CatAxisContext( ContextHandler2Helper& rParent, AxisModel& rModel ) : @@ -181,22 +181,22 @@ ContextHandlerRef CatAxisContext::onCreateContext( sal_Int32 nElement, const Att { case C_TOKEN( auto ): mrModel.mbAuto = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( lblAlgn ): mrModel.mnLabelAlign = rAttribs.getToken( XML_val, XML_ctr ); - return 0; + return nullptr; case C_TOKEN( lblOffset ): mrModel.mnLabelOffset = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( noMultiLvlLbl ): mrModel.mbNoMultiLevel = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( tickLblSkip ): mrModel.mnTickLabelSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( tickMarkSkip ): mrModel.mnTickMarkSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } @@ -217,25 +217,25 @@ ContextHandlerRef DateAxisContext::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( auto ): mrModel.mbAuto = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( baseTimeUnit ): mrModel.monBaseTimeUnit = rAttribs.getToken( XML_val, XML_days ); - return 0; + return nullptr; case C_TOKEN( lblOffset ): mrModel.mnLabelOffset = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( majorTimeUnit ): mrModel.mnMajorTimeUnit = rAttribs.getToken( XML_val, XML_days ); - return 0; + return nullptr; case C_TOKEN( majorUnit ): mrModel.mofMajorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( minorTimeUnit ): mrModel.mnMinorTimeUnit = rAttribs.getToken( XML_val, XML_days ); - return 0; + return nullptr; case C_TOKEN( minorUnit ): mrModel.mofMinorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } @@ -255,10 +255,10 @@ ContextHandlerRef SerAxisContext::onCreateContext( sal_Int32 nElement, const Att { case C_TOKEN( tickLblSkip ): mrModel.mnTickLabelSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( tickMarkSkip ): mrModel.mnTickMarkSkip = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } @@ -278,15 +278,15 @@ ContextHandlerRef ValAxisContext::onCreateContext( sal_Int32 nElement, const Att { case C_TOKEN( crossBetween ): mrModel.mnCrossBetween = rAttribs.getToken( XML_val, XML_between ); - return 0; + return nullptr; case C_TOKEN( dispUnits ): return new AxisDispUnitsContext( *this, mrModel.mxDispUnits.create() ); case C_TOKEN( majorUnit ): mrModel.mofMajorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( minorUnit ): mrModel.mofMinorUnit = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; } return AxisContextBase::onCreateContext( nElement, rAttribs ); } diff --git a/oox/source/drawingml/chart/chartcontextbase.cxx b/oox/source/drawingml/chart/chartcontextbase.cxx index 74bc6c112dd2..676a9c4b94d6 100644 --- a/oox/source/drawingml/chart/chartcontextbase.cxx +++ b/oox/source/drawingml/chart/chartcontextbase.cxx @@ -40,7 +40,7 @@ ShapePrWrapperContext::~ShapePrWrapperContext() ContextHandlerRef ShapePrWrapperContext::onCreateContext( sal_Int32 nElement, const AttributeList& ) { - return (isRootElement() && (nElement == C_TOKEN( spPr ))) ? new ShapePropertiesContext( *this, mrModel ) : 0; + return (isRootElement() && (nElement == C_TOKEN( spPr ))) ? new ShapePropertiesContext( *this, mrModel ) : nullptr; } LayoutContext::LayoutContext( ContextHandler2Helper& rParent, LayoutModel& rModel ) : @@ -70,35 +70,35 @@ ContextHandlerRef LayoutContext::onCreateContext( sal_Int32 nElement, const Attr { case C_TOKEN( x ): mrModel.mfX = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( y ): mrModel.mfY = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( w ): mrModel.mfW = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( h ): mrModel.mfH = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( xMode ): mrModel.mnXMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( yMode ): mrModel.mnYMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( wMode ): mrModel.mnWMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( hMode ): mrModel.mnHMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; + return nullptr; case C_TOKEN( layoutTarget ): mrModel.mnTarget = rAttribs.getToken( XML_val, XML_outer ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx index 89f59c5c9628..0f9bd9dc4078 100644 --- a/oox/source/drawingml/chart/chartconverter.cxx +++ b/oox/source/drawingml/chart/chartconverter.cxx @@ -153,7 +153,7 @@ Reference< XDataSequence > ChartConverter::createDataSequence( } } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx index 5a7035b46bdf..4e86209951d1 100644 --- a/oox/source/drawingml/chart/chartdrawingfragment.cxx +++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx @@ -50,7 +50,7 @@ void ShapeAnchor::importExt( const AttributeList& rAttribs ) void ShapeAnchor::setPos( sal_Int32 nElement, sal_Int32 nParentContext, const OUString& rValue ) { - AnchorPosModel* pAnchorPos = 0; + AnchorPosModel* pAnchorPos = nullptr; switch( nParentContext ) { case CDR_TOKEN( from ): @@ -160,7 +160,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con return new GraphicShapeContext( *this, ShapePtr(), mxShape ); case CDR_TOKEN( graphicFrame ): if( !mbOleSupport ) - return 0; + return nullptr; mxShape.reset( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ); return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape, true ); case CDR_TOKEN( grpSp ): @@ -173,7 +173,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con case CDR_TOKEN( ext ): if( mxAnchor.get() ) mxAnchor->importExt( rAttribs ); - return 0; + return nullptr; } break; @@ -187,7 +187,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con } break; } - return 0; + return nullptr; } void ChartDrawingFragment::onCharacters( const OUString& rChars ) diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx index b3587515222a..b55ce0d223cb 100644 --- a/oox/source/drawingml/chart/chartspacefragment.cxx +++ b/oox/source/drawingml/chart/chartspacefragment.cxx @@ -63,18 +63,18 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( style ): mrModel.mnStyle = rAttribs.getInteger( XML_val, 2 ); - return 0; + return nullptr; case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); case C_TOKEN( userShapes ): mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ); - return 0; + return nullptr; case C_TOKEN( pivotSource ): mrModel.mbPivotChart = true; - return 0; + return nullptr; case C_TOKEN (externalData): mrModel.maSheetPath = getFragmentPathFromRelId(rAttribs.getString(R_TOKEN(id),OUString())); - return 0; + return nullptr; } break; @@ -85,7 +85,7 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const { mrModel.mbAutoTitleDel = rAttribs.getBool( XML_val, !bMSO2007Document ); - return 0; + return nullptr; } case C_TOKEN( backWall ): return new WallFloorContext( *this, mrModel.mxBackWall.create() ); @@ -93,7 +93,7 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const { // default value is XML_gap for MSO 2007 and XML_zero in OOXML mrModel.mnDispBlanksAs = rAttribs.getToken( XML_val, bMSO2007Document ? XML_gap : XML_zero ); - return 0; + return nullptr; } case C_TOKEN( floor ): return new WallFloorContext( *this, mrModel.mxFloor.create() ); @@ -103,10 +103,10 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const return new PlotAreaContext( *this, mrModel.mxPlotArea.create() ); case C_TOKEN( plotVisOnly ): mrModel.mbPlotVisOnly = rAttribs.getBool( XML_val, !bMSO2007Document ); - return 0; + return nullptr; case C_TOKEN( showDLblsOverMax ): mrModel.mbShowLabelsOverMax = rAttribs.getBool( XML_val, !bMSO2007Document ); - return 0; + return nullptr; case C_TOKEN( sideWall ): return new WallFloorContext( *this, mrModel.mxSideWall.create() ); case C_TOKEN( title ): @@ -116,7 +116,7 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 950550bf9de4..4f66eb0043d8 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -71,7 +71,7 @@ struct TitleLayoutInfo ModelRef< LayoutModel > mxLayout; /// The layout model, if existing. GetShapeFunc mpGetShape; /// Helper function to receive the title shape. - inline explicit TitleLayoutInfo() : mpGetShape( 0 ) {} + inline explicit TitleLayoutInfo() : mpGetShape( nullptr ) {} void convertTitlePos( ConverterRoot& rRoot, diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx b/oox/source/drawingml/chart/datasourcecontext.cxx index 10ac7c652015..ea754a917281 100644 --- a/oox/source/drawingml/chart/datasourcecontext.cxx +++ b/oox/source/drawingml/chart/datasourcecontext.cxx @@ -38,13 +38,13 @@ using namespace ::com::sun::star; DoubleSequenceContext::DoubleSequenceContext( ContextHandler2Helper& rParent, DataSequenceModel& rModel ) : DataSequenceContextBase( rParent, rModel ), mnPtIndex( -1 ), - mpNumberFormatter( NULL ) + mpNumberFormatter( nullptr ) { } DoubleSequenceContext::~DoubleSequenceContext() { - if( mpNumberFormatter != NULL ) + if( mpNumberFormatter != nullptr ) { delete mpNumberFormatter; } @@ -71,7 +71,7 @@ ContextHandlerRef DoubleSequenceContext::onCreateContext( sal_Int32 nElement, co return this; case C_TOKEN( ptCount ): mrModel.mnPointCount = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( pt ): mnPtIndex = rAttribs.getInteger( XML_idx, -1 ); return this; @@ -86,7 +86,7 @@ ContextHandlerRef DoubleSequenceContext::onCreateContext( sal_Int32 nElement, co } break; } - return 0; + return nullptr; } void DoubleSequenceContext::onCharacters( const OUString& rChars ) @@ -130,7 +130,7 @@ void DoubleSequenceContext::onCharacters( const OUString& rChars ) else { double fValue = rChars.toDouble(); - Color* pColor = NULL; + Color* pColor = nullptr; OUString aFormattedValue; pNumFrmt->GetOutputString( fValue, nKey, aFormattedValue, &pColor ); mrModel.maData[ mnPtIndex ] <<= aFormattedValue; @@ -153,7 +153,7 @@ void DoubleSequenceContext::onCharacters( const OUString& rChars ) SvNumberFormatter* DoubleSequenceContext::getNumberFormatter() { - if( mpNumberFormatter == NULL ) + if( mpNumberFormatter == nullptr ) { uno::Reference<uno::XComponentContext> rContext = this->getFilter().getComponentContext(); @@ -201,7 +201,7 @@ ContextHandlerRef StringSequenceContext::onCreateContext( sal_Int32 nElement, co { case C_TOKEN( ptCount ): mrModel.mnPointCount = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( pt ): mnPtIndex = rAttribs.getInteger( XML_idx, -1 ); return this; @@ -216,7 +216,7 @@ ContextHandlerRef StringSequenceContext::onCreateContext( sal_Int32 nElement, co } break; } - return 0; + return nullptr; } void StringSequenceContext::onCharacters( const OUString& rChars ) @@ -277,7 +277,7 @@ ContextHandlerRef DataSourceContext::onCreateContext( sal_Int32 nElement, const } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 4ab75cbc52e8..6661ea2e177b 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -129,10 +129,10 @@ struct AutoFormatEntry }; #define AUTOFORMAT_COLOR( first, last, themed_style, color_token ) \ - { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, 100, 0, false } + { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, 100, nullptr, false } #define AUTOFORMAT_COLORMOD( first, last, themed_style, color_token, mod_token, mod_value ) \ - { first, last, themed_style, color_token, mod_token, mod_value, 100, 0, false } + { first, last, themed_style, color_token, mod_token, mod_value, 100, nullptr, false } #define AUTOFORMAT_ACCENTSMOD( first, themed_style, mod_token, mod_value ) \ AUTOFORMAT_COLORMOD( first, first, themed_style, XML_accent1, mod_token, mod_value ), \ @@ -146,7 +146,7 @@ struct AutoFormatEntry { first, last, themed_style, XML_TOKEN_INVALID, XML_TOKEN_INVALID, 0, line_width, pattern, false } #define AUTOFORMAT_FADED( first, last, themed_style, color_token, line_width ) \ - { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, line_width, 0, true } + { first, last, themed_style, color_token, XML_TOKEN_INVALID, 0, line_width, nullptr, true } #define AUTOFORMAT_FADEDACCENTS( first, themed_style, line_width ) \ AUTOFORMAT_FADED( first, first, themed_style, XML_accent1, line_width ), \ @@ -411,7 +411,7 @@ const AutoFormatEntry* lclGetAutoFormatEntry( const AutoFormatEntry* pEntries, s for( ; pEntries && (pEntries->mnFirstStyleIdx >= 0); ++pEntries ) if( (pEntries->mnFirstStyleIdx <= nStyle) && (nStyle <= pEntries->mnLastStyleIdx) ) return pEntries; - return 0; + return nullptr; } struct AutoTextEntry @@ -460,7 +460,7 @@ const AutoTextEntry* lclGetAutoTextEntry( const AutoTextEntry* pEntries, sal_Int for( ; pEntries && (pEntries->mnFirstStyleIdx >= 0); ++pEntries ) if( (pEntries->mnFirstStyleIdx <= nStyle) && (nStyle <= pEntries->mnLastStyleIdx) ) return pEntries; - return 0; + return nullptr; } // These PropIds arrays will be indexed into using a ShapePropertyId enum (include/oox/drawingml/shapepropertymap.hxx) @@ -541,36 +541,36 @@ struct ObjectTypeFormatEntry { obj_type, prop_type, auto_lines, auto_fills, auto_effects, auto_texts, true } #define TYPEFORMAT_LINE( obj_type, prop_type, auto_texts, auto_lines ) \ - { obj_type, prop_type, auto_lines, 0, 0, auto_texts, false } + { obj_type, prop_type, auto_lines, nullptr, nullptr, auto_texts, false } static const ObjectTypeFormatEntry spObjTypeFormatEntries[] = { // object type property info auto text auto line auto fill auto effect - TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, &saCommonPropInfo, 0, spNoFormats, spChartSpaceFill, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_CHARTTITLE, &saCommonPropInfo, spChartTitleTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, &saCommonPropInfo, spOtherTexts, spNoFormats, spNoFormats, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, &saCommonPropInfo, 0, 0 /* eq to Ch2 */, spPlotArea2dFills, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA3D, &saCommonPropInfo, 0, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_WALL, &saCommonPropInfo, 0, spWallFloorLines, spWallFloorFills, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_FLOOR, &saCommonPropInfo, 0, spWallFloorLines, spWallFloorFills, 0 /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, &saCommonPropInfo, nullptr, spNoFormats, spChartSpaceFill, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_CHARTTITLE, &saCommonPropInfo, spChartTitleTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, &saCommonPropInfo, spOtherTexts, spNoFormats, spNoFormats, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, &saCommonPropInfo, nullptr, nullptr /* eq to Ch2 */, spPlotArea2dFills, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA3D, &saCommonPropInfo, nullptr, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_WALL, &saCommonPropInfo, nullptr, spWallFloorLines, spWallFloorFills, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_FLOOR, &saCommonPropInfo, nullptr, spWallFloorLines, spWallFloorFills, nullptr /* eq to Ch2 */ ), TYPEFORMAT_LINE( OBJECTTYPE_AXIS, &saCommonPropInfo, spOtherTexts, spAxisLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_AXISTITLE, &saCommonPropInfo, spAxisTitleTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_FRAME( OBJECTTYPE_AXISUNIT, &saCommonPropInfo, spAxisTitleTexts, 0 /* eq in Ch2 */, 0 /* eq in Ch2 */, 0 /* eq in Ch2 */ ), - TYPEFORMAT_LINE( OBJECTTYPE_MAJORGRIDLINE, &saCommonPropInfo, 0, spMajorGridLines ), - TYPEFORMAT_LINE( OBJECTTYPE_MINORGRIDLINE, &saCommonPropInfo, 0, spMinorGridLines ), - TYPEFORMAT_LINE( OBJECTTYPE_LINEARSERIES2D, &saLinearPropInfo, 0, spLinearSeriesLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES2D, &saFilledPropInfo, 0, spFilledSeriesLines, spFilledSeries2dFills, spFilledSeriesEffects ), - TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES3D, &saFilledPropInfo, 0, spFilledSeriesLines, spFilledSeries3dFills, spFilledSeriesEffects ), - TYPEFORMAT_FRAME( OBJECTTYPE_DATALABEL, &saCommonPropInfo, spOtherTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_LINE( OBJECTTYPE_TRENDLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_TRENDLINELABEL, &saCommonPropInfo, spOtherTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ), - TYPEFORMAT_LINE( OBJECTTYPE_ERRORBAR, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_SERLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_LEADERLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_DROPLINE, &saCommonPropInfo, 0, spOtherLines ), - TYPEFORMAT_LINE( OBJECTTYPE_HILOLINE, &saLinearPropInfo, 0, spOtherLines ), - TYPEFORMAT_FRAME( OBJECTTYPE_UPBAR, &saCommonPropInfo, 0, spUpDownBarLines, spUpBarFills, spUpDownBarEffects ), - TYPEFORMAT_FRAME( OBJECTTYPE_DOWNBAR, &saCommonPropInfo, 0, spUpDownBarLines, spDownBarFills, spUpDownBarEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_AXISTITLE, &saCommonPropInfo, spAxisTitleTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_FRAME( OBJECTTYPE_AXISUNIT, &saCommonPropInfo, spAxisTitleTexts, nullptr /* eq in Ch2 */, nullptr /* eq in Ch2 */, nullptr /* eq in Ch2 */ ), + TYPEFORMAT_LINE( OBJECTTYPE_MAJORGRIDLINE, &saCommonPropInfo, nullptr, spMajorGridLines ), + TYPEFORMAT_LINE( OBJECTTYPE_MINORGRIDLINE, &saCommonPropInfo, nullptr, spMinorGridLines ), + TYPEFORMAT_LINE( OBJECTTYPE_LINEARSERIES2D, &saLinearPropInfo, nullptr, spLinearSeriesLines ), + TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES2D, &saFilledPropInfo, nullptr, spFilledSeriesLines, spFilledSeries2dFills, spFilledSeriesEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_FILLEDSERIES3D, &saFilledPropInfo, nullptr, spFilledSeriesLines, spFilledSeries3dFills, spFilledSeriesEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_DATALABEL, &saCommonPropInfo, spOtherTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_LINE( OBJECTTYPE_TRENDLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_FRAME( OBJECTTYPE_TRENDLINELABEL, &saCommonPropInfo, spOtherTexts, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */, nullptr /* eq to Ch2 */ ), + TYPEFORMAT_LINE( OBJECTTYPE_ERRORBAR, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_SERLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_LEADERLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_DROPLINE, &saCommonPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_LINE( OBJECTTYPE_HILOLINE, &saLinearPropInfo, nullptr, spOtherLines ), + TYPEFORMAT_FRAME( OBJECTTYPE_UPBAR, &saCommonPropInfo, nullptr, spUpDownBarLines, spUpBarFills, spUpDownBarEffects ), + TYPEFORMAT_FRAME( OBJECTTYPE_DOWNBAR, &saCommonPropInfo, nullptr, spUpDownBarLines, spDownBarFills, spUpDownBarEffects ), TYPEFORMAT_LINE( OBJECTTYPE_DATATABLE, &saCommonPropInfo, spOtherTexts, spDataTableLines ) }; @@ -904,7 +904,7 @@ namespace { const TextCharacterProperties* lclGetTextProperties( const ModelRef< TextBody >& rxTextProp ) { return (rxTextProp.is() && !rxTextProp->getParagraphs().empty()) ? - &rxTextProp->getParagraphs().front()->getProperties().getTextCharacterProperties() : 0; + &rxTextProp->getParagraphs().front()->getProperties().getTextCharacterProperties() : nullptr; } } // namespace @@ -974,7 +974,7 @@ void ObjectTypeFormatter::convertTextFormatting( PropertySet& rPropSet, const Mo void ObjectTypeFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const ModelRef< TextBody >& rxTextProp ) { - convertFrameFormatting( rPropSet, rxShapeProp, 0, -1 ); + convertFrameFormatting( rPropSet, rxShapeProp, nullptr, -1 ); convertTextFormatting( rPropSet, rxTextProp ); } @@ -987,7 +987,7 @@ void ObjectTypeFormatter::convertAutomaticFill( PropertySet& rPropSet, sal_Int32 { ShapePropertyMap aPropMap( mrModelObjHelper, *mrEntry.mpPropInfo ); ModelRef< Shape > xShapeProp; - maFillFormatter.convertFormatting( aPropMap, xShapeProp, 0, nSeriesIdx ); + maFillFormatter.convertFormatting( aPropMap, xShapeProp, nullptr, nSeriesIdx ); rPropSet.setProperties( aPropMap ); } @@ -1041,7 +1041,7 @@ sal_Int32 ObjectFormatter::getMaxSeriesIndex() const void ObjectFormatter::convertFrameFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, ObjectType eObjType, sal_Int32 nSeriesIdx ) { if( ObjectTypeFormatter* pFormat = mxData->getTypeFormatter( eObjType ) ) - pFormat->convertFrameFormatting( rPropSet, rxShapeProp, 0, nSeriesIdx ); + pFormat->convertFrameFormatting( rPropSet, rxShapeProp, nullptr, nSeriesIdx ); } void ObjectFormatter::convertFrameFormatting( PropertySet& rPropSet, const ModelRef< Shape >& rxShapeProp, const PictureOptionsModel& rPicOptions, ObjectType eObjType, sal_Int32 nSeriesIdx ) diff --git a/oox/source/drawingml/chart/plotareacontext.cxx b/oox/source/drawingml/chart/plotareacontext.cxx index f19adbd309a5..f821755d50a1 100644 --- a/oox/source/drawingml/chart/plotareacontext.cxx +++ b/oox/source/drawingml/chart/plotareacontext.cxx @@ -52,28 +52,28 @@ ContextHandlerRef View3DContext::onCreateContext( sal_Int32 nElement, const Attr { case C_TOKEN( depthPercent ): mrModel.mnDepthPercent = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( hPercent ): mrModel.monHeightPercent = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( perspective ): mrModel.mnPerspective = rAttribs.getInteger( XML_val, 30 ); - return 0; + return nullptr; case C_TOKEN( rAngAx ): mrModel.mbRightAngled = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( rotX ): // default value dependent on chart type mrModel.monRotationX = rAttribs.getInteger( XML_val ); - return 0; + return nullptr; case C_TOKEN( rotY ): // default value dependent on chart type mrModel.monRotationY = rAttribs.getInteger( XML_val ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } WallFloorContext::WallFloorContext( ContextHandler2Helper& rParent, WallFloorModel& rModel ) : @@ -102,7 +102,7 @@ ContextHandlerRef WallFloorContext::onCreateContext( sal_Int32 nElement, const A } break; } - return 0; + return nullptr; } DataTableContext::DataTableContext( ContextHandler2Helper& rParent, DataTableModel& rModel ) : @@ -133,7 +133,7 @@ ContextHandlerRef DataTableContext::onCreateContext( sal_Int32 nElement, const A } break; } - return 0; + return nullptr; } PlotAreaContext::PlotAreaContext( ContextHandler2Helper& rParent, PlotAreaModel& rModel ) : @@ -196,7 +196,7 @@ ContextHandlerRef PlotAreaContext::onCreateContext( sal_Int32 nElement, const At } break; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index 54771b80bf7a..ea16e1b0c697 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -173,7 +173,7 @@ void AxesSetConverter::convertFromModel( const Reference< XDiagram >& rxDiagram, { ModelRef< AxisModel > xZAxis = lclGetOrCreateAxis( mrModel.maAxes, API_Z_AXIS, C_TOKEN( serAx ), bMSO2007Doc ); AxisConverter aZAxisConv( *this, *xZAxis ); - aZAxisConv.convertFromModel( xCoordSystem, aTypeGroups, 0, nAxesSetIdx, API_Z_AXIS ); + aZAxisConv.convertFromModel( xCoordSystem, aTypeGroups, nullptr, nAxesSetIdx, API_Z_AXIS ); } // convert all chart type groups, this converts all series data and formatting @@ -356,7 +356,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) if( !xTypeGroup->maSeries.empty() ) { // try to find a compatible axes set for the type group - AxesSetModel* pAxesSet = 0; + AxesSetModel* pAxesSet = nullptr; for( AxesSetVector::iterator aASIt = aAxesSets.begin(), aASEnd = aAxesSets.end(); !pAxesSet && (aASIt != aASEnd); ++aASIt ) if( (*aASIt)->maTypeGroups.front()->maAxisIds == xTypeGroup->maAxisIds ) pAxesSet = aASIt->get(); diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx index 9306e6371089..c0016ba0e2d9 100644 --- a/oox/source/drawingml/chart/seriescontext.cxx +++ b/oox/source/drawingml/chart/seriescontext.cxx @@ -42,31 +42,31 @@ ContextHandlerRef lclDataLabelSharedCreateContext( ContextHandler2& rContext, { case C_TOKEN( delete ): orModel.mbDeleted = rAttribs.getBool( XML_val, !bMSO2007 ); - return 0; + return nullptr; case C_TOKEN( dLblPos ): orModel.monLabelPos = rAttribs.getToken( XML_val, XML_TOKEN_INVALID ); - return 0; + return nullptr; case C_TOKEN( numFmt ): orModel.maNumberFormat.setAttributes( rAttribs ); - return 0; + return nullptr; case C_TOKEN( showBubbleSize ): orModel.mobShowBubbleSize = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showCatName ): orModel.mobShowCatName = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showLegendKey ): orModel.mobShowLegendKey = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showPercent ): orModel.mobShowPercent = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showSerName ): orModel.mobShowSerName = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( showVal ): orModel.mobShowVal = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( separator ): // collect separator text in onCharacters() return &rContext; @@ -75,7 +75,7 @@ ContextHandlerRef lclDataLabelSharedCreateContext( ContextHandler2& rContext, case C_TOKEN( txPr ): return new TextBodyContext( rContext, orModel.mxTextProp.create() ); } - return 0; + return nullptr; } void lclDataLabelSharedCharacters( ContextHandler2& rContext, const OUString& rChars, DataLabelModelBase& orModel ) @@ -102,7 +102,7 @@ ContextHandlerRef DataLabelContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( idx ): mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( layout ): return new LayoutContext( *this, mrModel.mxLayout.create() ); case C_TOKEN( tx ): @@ -138,7 +138,7 @@ ContextHandlerRef DataLabelsContext::onCreateContext( sal_Int32 nElement, const return new ShapePrWrapperContext( *this, mrModel.mxLeaderLines.create() ); case C_TOKEN( showLeaderLines ): mrModel.mbShowLeaderLines = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } return lclDataLabelSharedCreateContext( *this, nElement, rAttribs, mrModel, bMSO2007Doc ); } @@ -164,21 +164,21 @@ ContextHandlerRef PictureOptionsContext::onCreateContext( sal_Int32 nElement, co { case C_TOKEN( applyToEnd ): mrModel.mbApplyToEnd = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( applyToFront ): mrModel.mbApplyToFront = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( applyToSides ): mrModel.mbApplyToSides = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( pictureFormat ): mrModel.mnPictureFormat = rAttribs.getToken( XML_val, XML_stretch ); - return 0; + return nullptr; case C_TOKEN( pictureStackUnit ): mrModel.mfStackUnit = rAttribs.getDouble( XML_val, 1.0 ); - return 0; + return nullptr; } - return 0; + return nullptr; } ErrorBarContext::ErrorBarContext( ContextHandler2Helper& rParent, ErrorBarModel& rModel ) : @@ -197,27 +197,27 @@ ContextHandlerRef ErrorBarContext::onCreateContext( sal_Int32 nElement, const At { case C_TOKEN( errBarType ): mrModel.mnTypeId = rAttribs.getToken( XML_val, XML_both ); - return 0; + return nullptr; case C_TOKEN( errDir ): mrModel.mnDirection = rAttribs.getToken( XML_val, XML_TOKEN_INVALID ); - return 0; + return nullptr; case C_TOKEN( errValType ): mrModel.mnValueType = rAttribs.getToken( XML_val, XML_fixedVal ); - return 0; + return nullptr; case C_TOKEN( minus ): return new DataSourceContext( *this, mrModel.maSources.create( ErrorBarModel::MINUS ) ); case C_TOKEN( noEndCap ): mrModel.mbNoEndCap = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( plus ): return new DataSourceContext( *this, mrModel.maSources.create( ErrorBarModel::PLUS ) ); case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( val ): mrModel.mfValue = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; } - return 0; + return nullptr; } TrendlineLabelContext::TrendlineLabelContext( ContextHandler2Helper& rParent, TrendlineLabelModel& rModel ) : @@ -237,7 +237,7 @@ ContextHandlerRef TrendlineLabelContext::onCreateContext( sal_Int32 nElement, co return new LayoutContext( *this, mrModel.mxLayout.create() ); case C_TOKEN( numFmt ): mrModel.maNumberFormat.setAttributes( rAttribs ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( tx ): @@ -245,7 +245,7 @@ ContextHandlerRef TrendlineLabelContext::onCreateContext( sal_Int32 nElement, co case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); } - return 0; + return nullptr; } TrendlineContext::TrendlineContext( ContextHandler2Helper& rParent, TrendlineModel& rModel ) : @@ -264,36 +264,36 @@ ContextHandlerRef TrendlineContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( backward ): mrModel.mfBackward = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( dispEq ): mrModel.mbDispEquation = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( dispRSqr ): mrModel.mbDispRSquared = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( forward ): mrModel.mfForward = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( intercept ): mrModel.mfIntercept = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( name ): return this; // collect name in onCharacters() case C_TOKEN( order ): mrModel.mnOrder = rAttribs.getInteger( XML_val, 2 ); - return 0; + return nullptr; case C_TOKEN( period ): mrModel.mnPeriod = rAttribs.getInteger( XML_val, 2 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( trendlineLbl ): return new TrendlineLabelContext( *this, mrModel.mxLabel.create() ); case C_TOKEN( trendlineType ): mrModel.mnTypeId = rAttribs.getToken( XML_val, XML_linear ); - return 0; + return nullptr; } - return 0; + return nullptr; } void TrendlineContext::onCharacters( const OUString& rChars ) @@ -321,17 +321,17 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( bubble3D ): mrModel.mobBubble3d = rAttribs.getBool( XML_val ); - return 0; + return nullptr; case C_TOKEN( explosion ): // if the 'val' attribute is missing, series explosion remains unchanged mrModel.monExplosion = rAttribs.getInteger( XML_val ); - return 0; + return nullptr; case C_TOKEN( idx ): mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( invertIfNegative ): mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( marker ): return this; case C_TOKEN( pictureOptions ): @@ -346,16 +346,16 @@ ContextHandlerRef DataPointContext::onCreateContext( sal_Int32 nElement, const A { case C_TOKEN( size ): mrModel.monMarkerSize = rAttribs.getInteger( XML_val, 5 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxMarkerProp.create() ); case C_TOKEN( symbol ): mrModel.monMarkerSymbol = rAttribs.getToken( XML_val, XML_none ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } SeriesContextBase::SeriesContextBase( ContextHandler2Helper& rParent, SeriesModel& rModel ) : @@ -376,10 +376,10 @@ ContextHandlerRef SeriesContextBase::onCreateContext( sal_Int32 nElement, const { case C_TOKEN( idx ): mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( order ): mrModel.mnOrder = rAttribs.getInteger( XML_val, -1 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); case C_TOKEN( tx ): @@ -392,16 +392,16 @@ ContextHandlerRef SeriesContextBase::onCreateContext( sal_Int32 nElement, const { case C_TOKEN( size ): mrModel.mnMarkerSize = rAttribs.getInteger( XML_val, 5 ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxMarkerProp.create() ); case C_TOKEN( symbol ): mrModel.mnMarkerSymbol = rAttribs.getToken( XML_val, XML_none ); - return 0; + return nullptr; } break; } - return 0; + return nullptr; } AreaSeriesContext::AreaSeriesContext( ContextHandler2Helper& rParent, SeriesModel& rModel ) : @@ -466,12 +466,12 @@ ContextHandlerRef BarSeriesContext::onCreateContext( sal_Int32 nElement, const A return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) ); case C_TOKEN( invertIfNegative ): mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( pictureOptions ): return new PictureOptionsContext( *this, mrModel.mxPicOptions.create(bMSO2007Doc) ); case C_TOKEN( shape ): mrModel.monShape = rAttribs.getToken( bMSO2007Doc ? XML_val : XML_box ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( val ): @@ -501,7 +501,7 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons { case C_TOKEN( bubble3D ): mrModel.mbBubble3d = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( bubbleSize ): return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::POINTS ) ); case C_TOKEN( dLbls ): @@ -512,7 +512,7 @@ ContextHandlerRef BubbleSeriesContext::onCreateContext( sal_Int32 nElement, cons return new ErrorBarContext( *this, mrModel.maErrorBars.create(bMSO2007Doc) ); case C_TOKEN( invertIfNegative ): mrModel.mbInvertNeg = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( xVal ): @@ -554,7 +554,7 @@ ContextHandlerRef LineSeriesContext::onCreateContext( sal_Int32 nElement, const return this; case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( val ): @@ -590,7 +590,7 @@ ContextHandlerRef PieSeriesContext::onCreateContext( sal_Int32 nElement, const A return new DataPointContext( *this, mrModel.maPoints.create(bMSO2007Doc) ); case C_TOKEN( explosion ): mrModel.mnExplosion = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( val ): return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) ); } @@ -626,7 +626,7 @@ ContextHandlerRef RadarSeriesContext::onCreateContext( sal_Int32 nElement, const return this; case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( val ): return new DataSourceContext( *this, mrModel.maSources.create( SeriesModel::VALUES ) ); } @@ -662,7 +662,7 @@ ContextHandlerRef ScatterSeriesContext::onCreateContext( sal_Int32 nElement, con return this; case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( trendline ): return new TrendlineContext( *this, mrModel.maTrendlines.create(bMSO2007Doc) ); case C_TOKEN( xVal ): diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 7f10324c0dc2..db5de738dd13 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -61,7 +61,7 @@ int lclSgn( double nVal ) Reference< XLabeledDataSequence > lclCreateLabeledDataSequence( const ConverterRoot& rParent, DataSourceModel* pValues, const OUString& rRole, - TextModel* pTitle = 0 ) + TextModel* pTitle = nullptr ) { // create data sequence for values Reference< XDataSequence > xValueSeq; @@ -703,7 +703,7 @@ Reference< XLabeledDataSequence > SeriesConverter::createLabeledDataSequence( SeriesModel::SourceType eSourceType, const OUString& rRole, bool bUseTextLabel ) { DataSourceModel* pValues = mrModel.maSources.get( eSourceType ).get(); - TextModel* pTitle = bUseTextLabel ? mrModel.mxText.get() : 0; + TextModel* pTitle = bUseTextLabel ? mrModel.mxText.get() : nullptr; return lclCreateLabeledDataSequence( *this, pValues, rRole, pTitle ); } diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx index 4e9f4a395215..06ae7cc13149 100644 --- a/oox/source/drawingml/chart/titlecontext.cxx +++ b/oox/source/drawingml/chart/titlecontext.cxx @@ -60,7 +60,7 @@ ContextHandlerRef TextContext::onCreateContext( sal_Int32 nElement, const Attrib OSL_ENSURE( !mrModel.mxDataSeq, "TextContext::onCreateContext - multiple data sequences" ); return this; // collect value in onCharacters() } - return 0; + return nullptr; } void TextContext::onCharacters( const OUString& rChars ) @@ -97,7 +97,7 @@ ContextHandlerRef TitleContext::onCreateContext( sal_Int32 nElement, const Attri case C_TOKEN( overlay ): mrModel.mbOverlay = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); @@ -108,7 +108,7 @@ ContextHandlerRef TitleContext::onCreateContext( sal_Int32 nElement, const Attri case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); } - return 0; + return nullptr; } LegendContext::LegendContext( ContextHandler2Helper& rParent, LegendModel& rModel ) : @@ -131,11 +131,11 @@ ContextHandlerRef LegendContext::onCreateContext( sal_Int32 nElement, const Attr case C_TOKEN( legendPos ): mrModel.mnPosition = rAttribs.getToken( XML_val, XML_r ); - return 0; + return nullptr; case C_TOKEN( overlay ): mrModel.mbOverlay = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( spPr ): return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() ); @@ -143,7 +143,7 @@ ContextHandlerRef LegendContext::onCreateContext( sal_Int32 nElement, const Attr case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx b/oox/source/drawingml/chart/typegroupcontext.cxx index 2dc3d35e30d4..56d76c83603f 100644 --- a/oox/source/drawingml/chart/typegroupcontext.cxx +++ b/oox/source/drawingml/chart/typegroupcontext.cxx @@ -49,13 +49,13 @@ ContextHandlerRef UpDownBarsContext::onCreateContext( sal_Int32 nElement, const return new ShapePrWrapperContext( *this, mrModel.mxDownBars.create() ); case C_TOKEN( gapWidth ): mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( upBars ): return new ShapePrWrapperContext( *this, mrModel.mxUpBars.create() ); } break; } - return 0; + return nullptr; } AreaTypeGroupContext::AreaTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -74,24 +74,24 @@ ContextHandlerRef AreaTypeGroupContext::onCreateContext( sal_Int32 nElement, con { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( dropLines ): return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() ); case C_TOKEN( gapDepth ): mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( grouping ): mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered ); - return 0; + return nullptr; case C_TOKEN( ser ): return new AreaSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } BarTypeGroupContext::BarTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -110,36 +110,36 @@ ContextHandlerRef BarTypeGroupContext::onCreateContext( sal_Int32 nElement, cons { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( barDir ): mrModel.mnBarDir = rAttribs.getToken( XML_val, XML_col ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( gapDepth ): mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( gapWidth ): mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( grouping ): mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered ); - return 0; + return nullptr; case C_TOKEN( overlap ): mrModel.mnOverlap = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( ser ): return new BarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( serLines ): return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() ); case C_TOKEN( shape ): mrModel.mnShape = rAttribs.getToken( XML_val, XML_box ); - return 0; + return nullptr; case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } BubbleTypeGroupContext::BubbleTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -158,28 +158,28 @@ ContextHandlerRef BubbleTypeGroupContext::onCreateContext( sal_Int32 nElement, c { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( bubble3D ): mrModel.mbBubble3d = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( bubbleScale ): mrModel.mnBubbleScale = rAttribs.getInteger( XML_val, 100 ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( ser ): return new BubbleSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( showNegBubbles ): mrModel.mbShowNegBubbles = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( sizeRepresents ): mrModel.mnSizeRepresents = rAttribs.getToken( XML_val, XML_area ); - return 0; + return nullptr; case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } LineTypeGroupContext::LineTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -198,34 +198,34 @@ ContextHandlerRef LineTypeGroupContext::onCreateContext( sal_Int32 nElement, con { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( dropLines ): return new ShapePrWrapperContext( *this, mrModel.mxDropLines.create() ); case C_TOKEN( gapDepth ): mrModel.mnGapDepth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( grouping ): mrModel.mnGrouping = rAttribs.getToken( XML_val, bMSO2007Doc ? XML_standard : XML_clustered ); - return 0; + return nullptr; case C_TOKEN( hiLowLines ): return new ShapePrWrapperContext( *this, mrModel.mxHiLowLines.create() ); case C_TOKEN( marker ): mrModel.mbShowMarker = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( ser ): return new LineSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( smooth ): mrModel.mbSmooth = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; case C_TOKEN( upDownBars ): return new UpDownBarsContext( *this, mrModel.mxUpDownBars.create() ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } PieTypeGroupContext::PieTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -246,34 +246,34 @@ ContextHandlerRef PieTypeGroupContext::onCreateContext( sal_Int32 nElement, cons return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( firstSliceAng ): mrModel.mnFirstAngle = rAttribs.getInteger( XML_val, 0 ); - return 0; + return nullptr; case C_TOKEN( gapWidth ): mrModel.mnGapWidth = rAttribs.getInteger( XML_val, 150 ); - return 0; + return nullptr; case C_TOKEN( holeSize ): mrModel.mnHoleSize = rAttribs.getInteger( XML_val, 10 ); - return 0; + return nullptr; case C_TOKEN( ofPieType ): mrModel.mnOfPieType = rAttribs.getToken( XML_val, XML_pie ); - return 0; + return nullptr; case C_TOKEN( secondPieSize ): mrModel.mnSecondPieSize = rAttribs.getInteger( XML_val, 75 ); - return 0; + return nullptr; case C_TOKEN( ser ): return new PieSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( serLines ): return new ShapePrWrapperContext( *this, mrModel.mxSerLines.create() ); case C_TOKEN( splitPos ): mrModel.mfSplitPos = rAttribs.getDouble( XML_val, 0.0 ); - return 0; + return nullptr; case C_TOKEN( splitType ): mrModel.mnSplitType = rAttribs.getToken( XML_val, XML_auto ); - return 0; + return nullptr; case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } RadarTypeGroupContext::RadarTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -292,19 +292,19 @@ ContextHandlerRef RadarTypeGroupContext::onCreateContext( sal_Int32 nElement, co { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( radarStyle ): mrModel.mnRadarStyle = rAttribs.getToken( XML_val, XML_standard ); - return 0; + return nullptr; case C_TOKEN( ser ): return new RadarSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } ScatterTypeGroupContext::ScatterTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -323,19 +323,19 @@ ContextHandlerRef ScatterTypeGroupContext::onCreateContext( sal_Int32 nElement, { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( dLbls ): return new DataLabelsContext( *this, mrModel.mxLabels.create(bMSO2007Doc) ); case C_TOKEN( scatterStyle ): mrModel.mnScatterStyle = rAttribs.getInteger( XML_val, XML_marker ); - return 0; + return nullptr; case C_TOKEN( ser ): return new ScatterSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( varyColors ): mrModel.mbVaryColors = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } SurfaceTypeGroupContext::SurfaceTypeGroupContext( ContextHandler2Helper& rParent, TypeGroupModel& rModel ) : @@ -354,14 +354,14 @@ ContextHandlerRef SurfaceTypeGroupContext::onCreateContext( sal_Int32 nElement, { case C_TOKEN( axId ): mrModel.maAxisIds.push_back( rAttribs.getInteger( XML_val, -1 ) ); - return 0; + return nullptr; case C_TOKEN( ser ): return new SurfaceSeriesContext( *this, mrModel.maSeries.create(bMSO2007Doc) ); case C_TOKEN( wireframe ): mrModel.mbWireframe = rAttribs.getBool( XML_val, !bMSO2007Doc ); - return 0; + return nullptr; } - return 0; + return nullptr; } } // namespace chart diff --git a/oox/source/drawingml/clrschemecontext.cxx b/oox/source/drawingml/clrschemecontext.cxx index d16a14f5992a..9037232dcdeb 100644 --- a/oox/source/drawingml/clrschemecontext.cxx +++ b/oox/source/drawingml/clrschemecontext.cxx @@ -91,7 +91,7 @@ ContextHandlerRef clrSchemeContext::onCreateContext( case A_TOKEN( folHlink ): return new clrSchemeColorContext( *this, mrClrScheme, getBaseToken( nElement ) ); } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx index 3236c5adafb1..7a198c29c1c8 100644 --- a/oox/source/drawingml/colorchoicecontext.cxx +++ b/oox/source/drawingml/colorchoicecontext.cxx @@ -129,7 +129,7 @@ void ColorValueContext::onStartElement( const AttributeList& rAttribs ) mrColor.addTransformation( nElement ); break; } - return 0; + return nullptr; } ColorContext::ColorContext( ContextHandler2Helper& rParent, Color& rColor ) : @@ -151,7 +151,7 @@ ColorContext::ColorContext( ContextHandler2Helper& rParent, Color& rColor ) : case A_TOKEN( prstClr ): return new ColorValueContext( *this, mrColor ); } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index 9eabc38637f1..88aa8a72961f 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -663,7 +663,7 @@ ContextHandlerRef XYAdjustHandleContext::onCreateContext( sal_Int32 aElementToke { if ( aElementToken == A_TOKEN( pos ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_PolarAdjustHandle @@ -714,7 +714,7 @@ ContextHandlerRef PolarAdjustHandleContext::onCreateContext( sal_Int32 aElementT { if ( aElementToken == A_TOKEN( pos ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_AdjustHandleList @@ -750,7 +750,7 @@ ContextHandlerRef AdjustHandleListContext::onCreateContext( sal_Int32 aElementTo mrAdjustHandleList.push_back( aAdjustHandle ); return new PolarAdjustHandleContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() ); } - return 0; + return nullptr; } // CT_ConnectionSite @@ -777,7 +777,7 @@ ContextHandlerRef ConnectionSiteContext::onCreateContext( sal_Int32 aElementToke { if ( aElementToken == A_TOKEN( pos ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrConnectionSite.pos ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DMoveTo @@ -803,7 +803,7 @@ ContextHandlerRef Path2DMoveToContext::onCreateContext( sal_Int32 aElementToken, { if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DLineTo @@ -829,7 +829,7 @@ ContextHandlerRef Path2DLineToContext::onCreateContext( sal_Int32 aElementToken, { if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DQuadBezierTo @@ -862,7 +862,7 @@ ContextHandlerRef Path2DQuadBezierToContext::onCreateContext( sal_Int32 aElement { if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, nCount++ ? mrPt2 : mrPt1 ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DCubicBezierTo @@ -899,7 +899,7 @@ ContextHandlerRef Path2DCubicBezierToContext::onCreateContext( sal_Int32 aElemen if ( aElementToken == A_TOKEN( pt ) ) return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, nCount++ ? nCount == 2 ? mrControlPt2 : mrEndPt : mrControlPt1 ); // CT_AdjPoint2D - return 0; + return nullptr; } // CT_Path2DContext @@ -1097,7 +1097,7 @@ ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken, } break; } - return 0; + return nullptr; } // CT_Path2DList @@ -1133,7 +1133,7 @@ ContextHandlerRef Path2DListContext::onCreateContext( sal_Int32 aElementToken, c mrPath2DList.push_back( aPath2D ); return new Path2DContext( *this, rAttribs, mrCustomShapeProperties, mrSegments, mrPath2DList.back() ); } - return 0; + return nullptr; } // CT_CustomGeometry2D @@ -1176,7 +1176,7 @@ ContextHandlerRef CustomShapeGeometryContext::onCreateContext( sal_Int32 aElemen return new ConnectionSiteContext( *this, rAttribs, mrCustomShapeProperties, mrCustomShapeProperties.getConnectionSiteList().back() ); } } - return 0; + return nullptr; } // CT_PresetGeometry2D diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx index 9006c1265f42..c818d8b69990 100644 --- a/oox/source/drawingml/diagram/datamodelcontext.cxx +++ b/oox/source/drawingml/diagram/datamodelcontext.cxx @@ -65,7 +65,7 @@ public: rConnection.mnDestOrder = rAttribs.getInteger( XML_destOrd, 0 ); // skip CT_extLst - return 0; + return nullptr; } default: break; @@ -183,7 +183,7 @@ public: return new PresLayoutVarsContext( *this, mrPoint ); case DGM_TOKEN( style ): // skip CT_shapeStyle - return 0; + return nullptr; default: break; } @@ -223,7 +223,7 @@ public: switch( aElementToken ) { case DGM_TOKEN( extLst ): - return 0; + return nullptr; case DGM_TOKEN( prSet ): OSL_TRACE( "diagram property set for point"); return new PropertiesContext( *this, mrPoint, rAttribs ); @@ -355,7 +355,7 @@ DataModelContext::onCreateContext( ::sal_Int32 aElement, case DGM_TOKEN( whole ): // CT_WholeE2oFormatting // TODO - return 0; + return nullptr; case DGM_TOKEN( extLst ): case A_TOKEN( ext ): break; diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx index f3868f1c9b0f..92f6e4e1883f 100644 --- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx +++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx @@ -76,7 +76,7 @@ DiagramDefinitionContext::onCreateContext( ::sal_Int32 aElement, } case DGM_TOKEN( clrData ): // TODO, does not matter for the UI. skip. - return 0; + return nullptr; case DGM_TOKEN( sampData ): mpLayout->getSampData().reset( new DiagramData ); return new DataModelContext( *this, mpLayout->getSampData() ); diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx index 9105e9e6d61c..1ceb8dce9094 100644 --- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx +++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx @@ -128,11 +128,11 @@ DiagramQStylesFragmentHandler::DiagramQStylesFragmentHandler( XmlFilterBase& rFi switch( getCurrentElement() ) { case XML_ROOT_CONTEXT: - return nElement == DGM_TOKEN(styleDef) ? this : NULL; + return nElement == DGM_TOKEN(styleDef) ? this : nullptr; case DGM_TOKEN(styleDef): - return nElement == DGM_TOKEN(styleLbl) ? this : NULL; + return nElement == DGM_TOKEN(styleLbl) ? this : nullptr; case DGM_TOKEN(styleLbl): - return nElement == DGM_TOKEN(style) ? this : NULL; + return nElement == DGM_TOKEN(style) ? this : nullptr; case DGM_TOKEN(style): { switch( nElement ) @@ -150,11 +150,11 @@ DiagramQStylesFragmentHandler::DiagramQStylesFragmentHandler( XmlFilterBase& rFi return createStyleMatrixContext(nElement,rAttribs, maStyleEntry.maTextStyle); } - return 0; + return nullptr; } } - return 0; + return nullptr; } void DiagramQStylesFragmentHandler::onStartElement( const AttributeList& rAttribs ) @@ -190,9 +190,9 @@ ColorFragmentHandler::ColorFragmentHandler( ::oox::core::XmlFilterBase& rFilter, switch( getCurrentElement() ) { case XML_ROOT_CONTEXT: - return nElement == DGM_TOKEN(colorsDef) ? this : NULL; + return nElement == DGM_TOKEN(colorsDef) ? this : nullptr; case DGM_TOKEN(colorsDef): - return nElement == DGM_TOKEN(styleLbl) ? this : NULL; + return nElement == DGM_TOKEN(styleLbl) ? this : nullptr; case DGM_TOKEN(styleLbl): { switch( nElement ) @@ -219,7 +219,7 @@ ColorFragmentHandler::ColorFragmentHandler( ::oox::core::XmlFilterBase& rFilter, } } - return 0; + return nullptr; } void ColorFragmentHandler::onStartElement( const AttributeList& rAttribs ) diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx index 93080691f310..1075c69c8493 100644 --- a/oox/source/drawingml/diagram/layoutnodecontext.cxx +++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx @@ -276,7 +276,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement, break; } case DGM_TOKEN( extLst ): - return 0; + return nullptr; case DGM_TOKEN( alg ): { // CT_Algorithm diff --git a/oox/source/drawingml/drawingmltypes.cxx b/oox/source/drawingml/drawingmltypes.cxx index 31529ed68be7..b25b94fd6705 100644 --- a/oox/source/drawingml/drawingmltypes.cxx +++ b/oox/source/drawingml/drawingmltypes.cxx @@ -204,7 +204,7 @@ TextVerticalAdjust GetTextVerticalAdjust( sal_Int32 nToken ) const char* GetTextVerticalAdjust( TextVerticalAdjust eAdjust ) { - const char* sVerticalAdjust = 0; + const char* sVerticalAdjust = nullptr; switch( eAdjust ) { case TextVerticalAdjust_BOTTOM: @@ -248,7 +248,7 @@ TabAlign GetTabAlign( sal_Int32 aToken ) const char* GetHatchPattern( const drawing::Hatch& rHatch ) { - const char* sPattern = 0; + const char* sPattern = nullptr; const sal_Int32 nAngle = rHatch.Angle > 1800 ? rHatch.Angle - 1800 : rHatch.Angle; // Angle ~ 0° (horizontal) if( (nAngle >= 0 && nAngle < 225) || nAngle >= 1575 ) diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx index 3f79cb7a93a3..041595382f1d 100644 --- a/oox/source/drawingml/effectpropertiescontext.cxx +++ b/oox/source/drawingml/effectpropertiescontext.cxx @@ -116,7 +116,7 @@ ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, } mrEffectProperties.m_Effects.pop_back(); - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx index a45dd787670d..c212ba7e5de7 100644 --- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx +++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx @@ -84,7 +84,7 @@ ContextHandlerRef GradientFillContext::onCreateContext( mrGradientProps.moTileRect = GetRelativeRect( rAttribs.getFastAttributeList() ); break; } - return 0; + return nullptr; } PatternFillContext::PatternFillContext( ContextHandler2Helper& rParent, @@ -105,7 +105,7 @@ ContextHandlerRef PatternFillContext::onCreateContext( case A_TOKEN( fgClr ): return new ColorContext( *this, mrPatternProps.maPattFgColor ); } - return 0; + return nullptr; } ColorChangeContext::ColorChangeContext( ContextHandler2Helper& rParent, @@ -134,7 +134,7 @@ ContextHandlerRef ColorChangeContext::onCreateContext( case A_TOKEN( clrTo ): return new ColorContext( *this, mrBlipProps.maColorChangeTo ); } - return 0; + return nullptr; } BlipContext::BlipContext( ContextHandler2Helper& rParent, @@ -190,7 +190,7 @@ ContextHandlerRef BlipContext::onCreateContext( mrBlipProps.moContrast = rAttribs.getInteger( XML_contrast ); break; } - return 0; + return nullptr; } DuotoneContext::DuotoneContext( ContextHandler2Helper& rParent, @@ -212,7 +212,7 @@ DuotoneContext::~DuotoneContext() { if( mnColorIndex < 2 ) return new ColorValueContext( *this, mrBlipProps.maDuotoneColors[mnColorIndex++] ); - return 0; + return nullptr; } BlipFillContext::BlipFillContext( ContextHandler2Helper& rParent, @@ -253,7 +253,7 @@ ContextHandlerRef BlipFillContext::onCreateContext( mrBlipProps.moFillRect = GetRelativeRect( rAttribs.getFastAttributeList() ); break; } - return 0; + return nullptr; } FillPropertiesContext::FillPropertiesContext( ContextHandler2Helper& rParent, FillProperties& rFillProps ) : @@ -274,14 +274,14 @@ ContextHandlerRef FillPropertiesContext::createFillContext( { switch( nElement ) { - case A_TOKEN( noFill ): { rFillProps.moFillType = getBaseToken( nElement ); return 0; }; + case A_TOKEN( noFill ): { rFillProps.moFillType = getBaseToken( nElement ); return nullptr; }; case A_TOKEN( solidFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new SolidFillContext( rParent, rAttribs, rFillProps ); }; case A_TOKEN( gradFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new GradientFillContext( rParent, rAttribs, rFillProps.maGradientProps ); }; case A_TOKEN( pattFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new PatternFillContext( rParent, rAttribs, rFillProps.maPatternProps ); }; case A_TOKEN( blipFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new BlipFillContext( rParent, rAttribs, rFillProps.maBlipProps ); }; - case A_TOKEN( grpFill ): { rFillProps.moFillType = getBaseToken( nElement ); return 0; }; // TODO + case A_TOKEN( grpFill ): { rFillProps.moFillType = getBaseToken( nElement ); return nullptr; }; // TODO } - return 0; + return nullptr; } SimpleFillPropertiesContext::SimpleFillPropertiesContext( ContextHandler2Helper& rParent, Color& rColor ) : @@ -316,7 +316,7 @@ ContextHandlerRef BlipExtensionContext::onCreateContext( case OOX_TOKEN( a14, imgProps ): return new ArtisticEffectContext( *this, mrBlipProps.maEffect ); } - return 0; + return nullptr; } ArtisticEffectContext::ArtisticEffectContext( ContextHandler2Helper& rParent, ArtisticEffectProperties& rEffect ) : @@ -352,7 +352,7 @@ ContextHandlerRef ArtisticEffectContext::onCreateContext( // effects maEffect.msName = ArtisticEffectProperties::getEffectString( nElement ); if( maEffect.isEmpty() ) - return 0; + return nullptr; // effect attributes sal_Int32 aAttribs[19] = { @@ -371,7 +371,7 @@ ContextHandlerRef ArtisticEffectContext::onCreateContext( } } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 7c82395f822d..116f793d22d6 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -156,7 +156,7 @@ ContextHandlerRef GraphicalObjectFrameContext::onCreateContext( sal_Int32 aEleme else { SAL_WARN("oox", "OOX: Ignore graphicsData of :" << sUri ); - return 0; + return nullptr; } } break; @@ -232,7 +232,7 @@ ContextHandlerRef OleObjectGraphicDataContext::onCreateContext( sal_Int32 nEleme return new GraphicShapeContext( *this, mpMasterShapePtr, mpShapePtr ); break; } - return 0; + return nullptr; } DiagramGraphicDataContext::DiagramGraphicDataContext( ContextHandler2Helper& rParent, ShapePtr pShapePtr ) @@ -290,7 +290,7 @@ ContextHandlerRef ChartGraphicDataContext::onCreateContext( ::sal_Int32 nElement { mrChartShapeInfo.maFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ); } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx index dc4f79cb13a7..a00c0843d10e 100644 --- a/oox/source/drawingml/hyperlinkcontext.cxx +++ b/oox/source/drawingml/hyperlinkcontext.cxx @@ -156,7 +156,7 @@ ContextHandlerRef HyperLinkContext::onCreateContext( switch( aElement ) { case A_TOKEN( extLst ): - return 0; + return nullptr; case A_TOKEN( snd ): // TODO use getEmbeddedWAVAudioFile() here break; diff --git a/oox/source/drawingml/linepropertiescontext.cxx b/oox/source/drawingml/linepropertiescontext.cxx index bc5395dab4d7..8376df069822 100644 --- a/oox/source/drawingml/linepropertiescontext.cxx +++ b/oox/source/drawingml/linepropertiescontext.cxx @@ -129,7 +129,7 @@ ContextHandlerRef LinePropertiesContext::onCreateContext( sal_Int32 nElement, co } break; } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/objectdefaultcontext.cxx b/oox/source/drawingml/objectdefaultcontext.cxx index 0b1024152990..a1d19b2842b1 100644 --- a/oox/source/drawingml/objectdefaultcontext.cxx +++ b/oox/source/drawingml/objectdefaultcontext.cxx @@ -44,7 +44,7 @@ ContextHandlerRef objectDefaultContext::onCreateContext( sal_Int32 aElementToken case A_TOKEN( txDef ): return new spDefContext( *this, mrTheme.getTxDef() ); } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/scene3dcontext.cxx b/oox/source/drawingml/scene3dcontext.cxx index 2514d8f348b6..5af3b83a93dd 100644 --- a/oox/source/drawingml/scene3dcontext.cxx +++ b/oox/source/drawingml/scene3dcontext.cxx @@ -63,9 +63,9 @@ ContextHandlerRef Scene3DPropertiesContext::onCreateContext( sal_Int32 aElementT case A_TOKEN( backdrop ): case A_TOKEN( extLst ): - return 0; // TODO: later (backdrop is not supported by core anyway) + return nullptr; // TODO: later (backdrop is not supported by core anyway) } - return 0; + return nullptr; } Shape3DPropertiesContext::Shape3DPropertiesContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, Shape3DProperties& r3DProperties ) throw() @@ -110,7 +110,7 @@ ContextHandlerRef Shape3DPropertiesContext::onCreateContext( sal_Int32 aElementT case A_TOKEN( contourClr ): return new ColorContext( *this, mr3DProperties.maContourColor ); } - return 0; + return nullptr; } Scene3DRotationPropertiesContext::Scene3DRotationPropertiesContext( ContextHandler2Helper& rParent, RotationProperties& rRotationProperties ) throw() @@ -129,7 +129,7 @@ ContextHandlerRef Scene3DRotationPropertiesContext::onCreateContext( sal_Int32 a mrRotationProperties.mnRevolution = rAttribs.getInteger( XML_rev, 0 ); break; } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d39d3ddf1574..7d329b23ecd1 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -228,7 +228,7 @@ void Shape::setServiceName( const sal_Char* pServiceName ) const ShapeStyleRef* Shape::getShapeStyleRef( sal_Int32 nRefType ) const { ShapeStyleRefMap::const_iterator aIt = maShapeStyleRefs.find( nRefType ); - return (aIt == maShapeStyleRefs.end()) ? 0 : &aIt->second; + return (aIt == maShapeStyleRefs.end()) ? nullptr : &aIt->second; } void Shape::addShape( @@ -300,7 +300,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText ) mpShapeRefLinePropPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) ); mpShapeRefFillPropPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) ); mpCustomShapePropertiesPtr = CustomShapePropertiesPtr( new CustomShapeProperties( *rReferencedShape.mpCustomShapePropertiesPtr.get() ) ); - mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : NULL ); + mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : nullptr ); mpShapeRefEffectPropPtr = EffectPropertiesPtr( new EffectProperties( *rReferencedShape.mpEffectPropertiesPtr.get() ) ); mpMasterTextListStyle = TextListStylePtr( new TextListStyle( *rReferencedShape.mpMasterTextListStyle.get() ) ); maShapeStyleRefs = rReferencedShape.maShapeStyleRefs; @@ -389,7 +389,7 @@ void Shape::addChildren( std::vector< ShapePtr >::iterator aIter( rMaster.maChildren.begin() ); while( aIter != rMaster.maChildren.end() ) { (*aIter)->setMasterTextListStyle( mpMasterTextListStyle ); - (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, getFillProperties(), NULL, pShapeMap ); + (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, getFillProperties(), nullptr, pShapeMap ); } } @@ -1192,7 +1192,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase ) Graphic aGraphic; GraphicFilter aFilter( false ); - if ( aFilter.ImportGraphic( aGraphic, "", mpTempStream, GRFILTER_FORMAT_NOTFOUND, NULL, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( NULL ) ) != GRFILTER_OK ) + if ( aFilter.ImportGraphic( aGraphic, "", mpTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != GRFILTER_OK ) { SAL_WARN( "oox.drawingml", OSL_THIS_FUNC << "Unable to import rendered stream into graphic object" ); diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 5bb38a4f9581..b0a609c36307 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -99,7 +99,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const case XML_txXfrm: { mpShapePtr->getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot ); - return 0; + return nullptr; } case XML_cNvSpPr: break; diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx index a1ae52d367c1..77e3704f7418 100644 --- a/oox/source/drawingml/shapegroupcontext.cxx +++ b/oox/source/drawingml/shapegroupcontext.cxx @@ -77,7 +77,7 @@ ContextHandlerRef ShapeGroupContext::onCreateContext( sal_Int32 aElementToken, c case XML_grpSpPr: return new ShapePropertiesContext( *this, *mpGroupShapePtr ); case XML_nvGrpSpPr: - return 0; + return nullptr; case XML_spPr: return new ShapePropertiesContext( *this, *mpGroupShapePtr ); /* diff --git a/oox/source/drawingml/shapestylecontext.cxx b/oox/source/drawingml/shapestylecontext.cxx index 1f805f8bd46a..6074f34ed6ee 100644 --- a/oox/source/drawingml/shapestylecontext.cxx +++ b/oox/source/drawingml/shapestylecontext.cxx @@ -60,7 +60,7 @@ ContextHandlerRef ShapeStyleContext::onCreateContext( sal_Int32 aElementToken, c return new ColorContext( *this, rStyleRef.maPhClr ); } } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index fc8e8a95cf6a..d639c7c4de66 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -143,7 +143,7 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& TableStyle* CreateTableStyle(const OUString& styleId) { - TableStyle* pTableStyle = NULL; + TableStyle* pTableStyle = nullptr; if(styleId == "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}") { //Medium Style 2 Accent 1 pTableStyle = new TableStyle(); //first row style @@ -223,7 +223,7 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt { ::oox::core::XmlFilterBase& rBase( const_cast< ::oox::core::XmlFilterBase& >( rFilterBase ) ); - TableStyle* pTableStyle = NULL; + TableStyle* pTableStyle = nullptr; if ( mpTableStyle ) pTableStyle = &*mpTableStyle; else if ( rBase.getTableStyles() ) @@ -263,7 +263,7 @@ void TableProperties::pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBa CreateTableColumns( xColumnRowRange->getColumns(), mvTableGrid ); CreateTableRows( xColumnRowRange->getRows(), mvTableRows ); - TableStyle* pTableStyleToDelete = NULL; + TableStyle* pTableStyleToDelete = nullptr; const TableStyle& rTableStyle( getUsedTableStyle( rFilterBase, pTableStyleToDelete ) ); sal_Int32 nRow = 0; const std::vector< TableRow >::const_iterator aTableRowEnd( mvTableRows.end() ); diff --git a/oox/source/drawingml/table/tablestyletextstylecontext.cxx b/oox/source/drawingml/table/tablestyletextstylecontext.cxx index f1e64ff76e13..9153360602c3 100644 --- a/oox/source/drawingml/table/tablestyletextstylecontext.cxx +++ b/oox/source/drawingml/table/tablestyletextstylecontext.cxx @@ -67,16 +67,16 @@ TableStyleTextStyleContext::onCreateContext( ::sal_Int32 aElementToken, const At return this; case A_TOKEN( ea ): // CT_TextFont mrTableStylePart.getAsianFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( cs ): // CT_TextFont mrTableStylePart.getComplexFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( sym ): // CT_TextFont mrTableStylePart.getSymbolFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( latin ): // CT_TextFont mrTableStylePart.getLatinFont().setAttributes( rAttribs ); - return 0; + return nullptr; case A_TOKEN( fontRef ): // CT_FontReference { diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index c0a198ea435a..20d3b2683d2d 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -94,7 +94,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken SAL_WARN("oox", "TextParagraphContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); } - return 0; + return nullptr; } RegularTextRunContext::RegularTextRunContext( ContextHandler2Helper& rParent, TextRunPtr pRunPtr ) @@ -177,7 +177,7 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con SAL_WARN("oox", "TextBodyContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index cc274377c466..52aa309b97eb 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -142,7 +142,7 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement break; } - return 0; + return nullptr; } } } diff --git a/oox/source/drawingml/texteffectscontext.cxx b/oox/source/drawingml/texteffectscontext.cxx index 28a4b98ff646..1badb7322917 100644 --- a/oox/source/drawingml/texteffectscontext.cxx +++ b/oox/source/drawingml/texteffectscontext.cxx @@ -283,7 +283,7 @@ void TextEffectsContext::processAttributes(const AttributeList& rAttribs) void TextEffectsContext::onStartElement(const oox::AttributeList& rAttribs) { - if(mpGrabBagStack.get() == NULL) + if(mpGrabBagStack.get() == nullptr) { OUString aGrabBagName = lclGetGrabBagName(mnCurrentElement); mpGrabBagStack.reset(new GrabBagStack(aGrabBagName)); diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index b001728750f5..135ef3140bf7 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -143,7 +143,7 @@ sal_Int32 TextField::insertAt( Reference< XPropertySet > xProps( xAt, UNO_QUERY); PropertySet aPropSet( xProps ); - maTextParagraphProperties.pushToPropSet( &rFilterBase, xProps, aioBulletList, NULL, true, 18 ); + maTextParagraphProperties.pushToPropSet( &rFilterBase, xProps, aioBulletList, nullptr, true, 18 ); TextCharacterProperties aTextCharacterProps( rTextCharacterStyle ); aTextCharacterProps.assignUsed( maTextParagraphProperties.getTextCharacterProperties() ); diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index f66d2e03c301..397cabd2650d 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -517,7 +517,7 @@ void TextParagraphProperties::dump() const Reference< css::text::XTextRange > xRange( xStart, UNO_QUERY ); xStart->gotoEnd( sal_True ); Reference< XPropertySet > xPropSet( xRange, UNO_QUERY ); - pushToPropSet( NULL, xPropSet, emptyMap, NULL, false, 0 ); + pushToPropSet( nullptr, xPropSet, emptyMap, nullptr, false, 0 ); PropertySet pSet( xPropSet ); pSet.dump(); } diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index f811cdb60f5c..c152a99eb679 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -142,7 +142,7 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() { Sequence< TabStop > aSeq( nTabCount ); TabStop * aArray = aSeq.getArray(); - OSL_ENSURE( aArray != NULL, "sequence array is NULL" ); + OSL_ENSURE( aArray != nullptr, "sequence array is NULL" ); ::std::copy( maTabList.begin(), maTabList.end(), aArray ); rPropertyMap.setProperty( PROP_ParaTabStops, aSeq); } diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx index 8f4b7bcd410e..e2cca699d1c4 100644 --- a/oox/source/drawingml/theme.cxx +++ b/oox/source/drawingml/theme.cxx @@ -67,7 +67,7 @@ const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) cons const TextFont* Theme::resolveFont( const OUString& rName ) const { - const TextCharacterProperties* pCharProps = 0; + const TextCharacterProperties* pCharProps = nullptr; /* Resolves the following names: +mj-lt, +mj-ea, +mj-cs -- major Latin, Asian, Complex font +mn-lt, +mn-ea, +mn-cs -- minor Latin, Asian, Complex font @@ -103,7 +103,7 @@ const TextFont* Theme::resolveFont( const OUString& rName ) const else if (rName == "minorEastAsia" || rName == "majorEastAsia") return &pCharProps->maAsianFont; } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx index a65ce7c1419d..ea9208a1c2ec 100644 --- a/oox/source/drawingml/themeelementscontext.cxx +++ b/oox/source/drawingml/themeelementscontext.cxx @@ -65,7 +65,7 @@ ContextHandlerRef FillStyleListContext::onCreateContext( sal_Int32 nElement, con mrFillStyleList.push_back( FillPropertiesPtr( new FillProperties ) ); return FillPropertiesContext::createFillContext( *this, nElement, rAttribs, *mrFillStyleList.back() ); } - return 0; + return nullptr; } class LineStyleListContext : public ContextHandler2 @@ -92,7 +92,7 @@ ContextHandlerRef LineStyleListContext::onCreateContext( sal_Int32 nElement, con mrLineStyleList.push_back( LinePropertiesPtr( new LineProperties ) ); return new LinePropertiesContext( *this, rAttribs, *mrLineStyleList.back() ); } - return 0; + return nullptr; } class EffectStyleListContext : public ContextHandler2 @@ -124,7 +124,7 @@ ContextHandlerRef EffectStyleListContext::onCreateContext( sal_Int32 nElement, c return new EffectPropertiesContext( *this, *mrEffectStyleList.back() ); break; } - return 0; + return nullptr; } class FontSchemeContext : public ContextHandler2 @@ -171,7 +171,7 @@ ContextHandlerRef FontSchemeContext::onCreateContext( sal_Int32 nElement, const mxCharProps->maComplexFont.setAttributes( rAttribs ); break; } - return 0; + return nullptr; } void FontSchemeContext::onEndElement() @@ -214,7 +214,7 @@ ContextHandlerRef ThemeElementsContext::onCreateContext( sal_Int32 nElement, con case A_TOKEN( bgFillStyleLst ): // CT_BackgroundFillStyleList return new FillStyleListContext( *this, mrTheme.getBgFillStyleList() ); } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/themefragmenthandler.cxx b/oox/source/drawingml/themefragmenthandler.cxx index edb044bbd823..dc142f7c3269 100644 --- a/oox/source/drawingml/themefragmenthandler.cxx +++ b/oox/source/drawingml/themefragmenthandler.cxx @@ -58,15 +58,15 @@ ContextHandlerRef ThemeFragmentHandler::onCreateContext( sal_Int32 nElement, con case A_TOKEN( objectDefaults ): // CT_ObjectStyleDefaults return new objectDefaultContext( *this, mrTheme ); case A_TOKEN( extraClrSchemeLst ): // CT_ColorSchemeList - return 0; + return nullptr; case A_TOKEN( custClrLst ): // CustomColorList - return 0; + return nullptr; case A_TOKEN( ext ): // CT_OfficeArtExtension - return 0; + return nullptr; } break; } - return 0; + return nullptr; } } // namespace drawingml diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx index 3f4b35f33639..e7f47f78b380 100644 --- a/oox/source/drawingml/transform2dcontext.cxx +++ b/oox/source/drawingml/transform2dcontext.cxx @@ -95,7 +95,7 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, break; } } - return 0; + return nullptr; } switch( aElementToken ) @@ -114,7 +114,7 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, break; } - return 0; + return nullptr; } } // namespace drawingml |