[Libreoffice-commits] core.git: include/oox oox/source
Caolán McNamara
caolanm at redhat.com
Mon Jul 7 04:02:05 PDT 2014
include/oox/drawingml/shapepropertymap.hxx | 8 ++++----
oox/source/drawingml/chart/objectformatter.cxx | 5 ++++-
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit aacfd5038d05a02f8b1eade3a5896d3d7e959f3d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 7 11:44:23 2014 +0100
fix crash loading ooo100546-1.xls
regressions around inserted extra enum values
into ShapePropertyId
Change-Id: I06696c8cfe4acc3836723c31d5e714bd7d8439b3
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx
index f451cc0..13e8e50 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -30,12 +30,14 @@ namespace oox { class ModelObjectHelper; }
namespace oox {
namespace drawingml {
-
-
/** Enumeration for various properties related to drawing shape formatting.
This is an abstraction for shape formatting properties that have different
names in various implementations, e.g. drawing shapes vs. chart objects.
+
+ If you *insert* ids into this list, then update spnCommonPropIds, spnLinearPropIds
+ and spnFilledPropIds of oox/source/drawingml/chart/objectformatter.cxx if
+ the newly inserted enum is inside the range they cover
*/
enum ShapePropertyId
{
@@ -69,8 +71,6 @@ enum ShapePropertyId
SHAPEPROP_END
};
-
-
struct OOX_DLLPUBLIC ShapePropertyInfo
{
std::vector<sal_Int32> maPropertyIds;
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 7849f6b..dd54c7d 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -452,6 +452,8 @@ const AutoTextEntry* lclGetAutoTextEntry( const AutoTextEntry* pEntries, sal_Int
return 0;
}
+// These PropIds arrays will be indexed into using a ShapePropertyId enum (include/oox/drawingml/shapepropertymap.hxx)
+
/** Property identifiers for common chart objects, to be used in ShapePropertyInfo. */
static const sal_Int32 spnCommonPropIds[] =
{
@@ -468,7 +470,7 @@ static const sal_Int32 spnLinearPropIds[] =
{
PROP_LineStyle, PROP_LineWidth, PROP_Color, PROP_Transparency, PROP_LineDashName,
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_INVALID, PROP_INVALID,
PROP_END_LIST
@@ -492,6 +494,7 @@ static const sal_Int32 spnFilledPropIds[] =
PROP_FillStyle,
PROP_Color,
PROP_Transparency,
+ PROP_INVALID,
PROP_GradientName,
PROP_FillBitmapName,
PROP_FillBitmapMode,
More information about the Libreoffice-commits
mailing list