diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/objectformatter.cxx | 35 | ||||
-rw-r--r-- | oox/source/drawingml/shapepropertymap.cxx | 15 | ||||
-rw-r--r-- | oox/source/token/properties.pl | 1 |
3 files changed, 40 insertions, 11 deletions
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 297ad7b4df6b..adcc3f3eb648 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -469,7 +469,8 @@ static const sal_Int32 spnCommonPropIds[] = PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_FillStyle, PROP_FillColor, PROP_FillTransparence, PROP_INVALID, PROP_FillGradientName, PROP_FillBitmapName, PROP_FillBitmapMode, PROP_FillBitmapSizeX, PROP_FillBitmapSizeY, - PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, PROP_FillBitmapRectanglePoint + PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, PROP_FillBitmapRectanglePoint, + PROP_END_LIST }; /** Property identifiers for linear data series, to be used in ShapePropertyInfo. */ @@ -479,17 +480,37 @@ static const sal_Int32 spnLinearPropIds[] = PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, - PROP_INVALID, PROP_INVALID, PROP_INVALID + PROP_INVALID, PROP_INVALID, PROP_INVALID, + PROP_END_LIST }; /** Property identifiers for filled data series, to be used in ShapePropertyInfo. */ static const sal_Int32 spnFilledPropIds[] = { - PROP_BorderStyle, PROP_BorderWidth, PROP_BorderColor, PROP_BorderTransparency, PROP_BorderDashName, - PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, PROP_INVALID, - PROP_FillStyle, PROP_Color, PROP_Transparency, PROP_GradientName, - PROP_FillBitmapName, PROP_FillBitmapMode, PROP_FillBitmapSizeX, PROP_FillBitmapSizeY, - PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, PROP_FillBitmapRectanglePoint + PROP_BorderStyle, + PROP_BorderWidth, + PROP_BorderColor, + PROP_BorderTransparency, + PROP_BorderDashName, + PROP_INVALID, + PROP_INVALID, + PROP_INVALID, + PROP_INVALID, + PROP_INVALID, + PROP_INVALID, + PROP_INVALID, + PROP_FillStyle, + PROP_Color, + PROP_Transparency, + PROP_GradientName, + PROP_FillBitmapName, + PROP_FillBitmapMode, + PROP_FillBitmapSizeX, + PROP_FillBitmapSizeY, + PROP_FillBitmapPositionOffsetX, + PROP_FillBitmapPositionOffsetY, + PROP_FillBitmapRectanglePoint, + PROP_END_LIST }; /** Property info for common chart objects, to be used in ShapePropertyMap. */ diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx index 2ea89e63b9e8..446282bc26fa 100644 --- a/oox/source/drawingml/shapepropertymap.cxx +++ b/oox/source/drawingml/shapepropertymap.cxx @@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno; namespace { -static const sal_Int32 spnDefaultShapeIds[ SHAPEPROP_END ] = +static const sal_Int32 spnDefaultShapeIds[ SHAPEPROP_END + 1 ] = // one for the PROP_END_LIST { PROP_LineStyle, PROP_LineWidth, PROP_LineColor, PROP_LineTransparence, PROP_LineDash, PROP_LineJoint, PROP_LineStartName, PROP_LineStartWidth, PROP_LineStartCenter, PROP_LineEndName, PROP_LineEndWidth, PROP_LineEndCenter, @@ -47,7 +47,8 @@ static const sal_Int32 spnDefaultShapeIds[ SHAPEPROP_END ] = PROP_FillBitmapURL, PROP_FillBitmapMode, PROP_FillBitmapSizeX, PROP_FillBitmapSizeY, PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, PROP_FillBitmapRectanglePoint, PROP_FillHatch, - PROP_ShadowXDistance + PROP_ShadowXDistance, + PROP_END_LIST }; } // namespace @@ -56,13 +57,19 @@ ShapePropertyInfo ShapePropertyInfo::DEFAULT( spnDefaultShapeIds, true, false, f ShapePropertyInfo::ShapePropertyInfo( const sal_Int32* pnPropertyIds, bool bNamedLineMarker, bool bNamedLineDash, bool bNamedFillGradient, bool bNamedFillBitmapUrl ) : - mpnPropertyIds( pnPropertyIds ), mbNamedLineMarker( bNamedLineMarker ), mbNamedLineDash( bNamedLineDash ), mbNamedFillGradient( bNamedFillGradient ), mbNamedFillBitmapUrl( bNamedFillBitmapUrl ) { - OSL_ENSURE( mpnPropertyIds != 0, "ShapePropertyInfo::ShapePropertyInfo - missing property identifiers" ); + assert(pnPropertyIds); + for(size_t i = 0;; ++i) + { + if(pnPropertyIds[i] == PROP_END_LIST) + break; + + maPropertyIds.push_back(pnPropertyIds[i]); + } } diff --git a/oox/source/token/properties.pl b/oox/source/token/properties.pl index d2a2d80153ef..3a8e87208410 100644 --- a/oox/source/token/properties.pl +++ b/oox/source/token/properties.pl @@ -53,6 +53,7 @@ foreach( sort( keys( %props ) ) ) print( IDFILE "const sal_Int32 PROP_COUNT = $i;\n" ); print( IDFILE "const sal_Int32 PROP_INVALID = -1;\n" ); +print( IDFILE "const sal_Int32 PROP_END_LIST = -2;\n" ); close( IDFILE ); close( NAMEFILE ); |