[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-0' - include/oox oox/source

Caolán McNamara caolanm at redhat.com
Tue Jul 8 05:17:02 PDT 2014


 include/oox/drawingml/shapepropertymap.hxx     |    8 ++++----
 oox/source/drawingml/chart/objectformatter.cxx |    5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit f03ae69617b37e7e55511d8eb4979390a0469968
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
    
    (cherry picked from commit aacfd5038d05a02f8b1eade3a5896d3d7e959f3d)
    
    Conflicts:
    	oox/source/drawingml/chart/objectformatter.cxx
    
    Change-Id: I06696c8cfe4acc3836723c31d5e714bd7d8439b3
    Reviewed-on: https://gerrit.libreoffice.org/10108
    Reviewed-by: Matúš Kukan <matus.kukan at collabora.com>
    Tested-by: Matúš Kukan <matus.kukan at collabora.com>
    (cherry picked from commit 9afdc6c3b4eb077b3e4279c5eec1e3dd9a4a8512)
    Reviewed-on: https://gerrit.libreoffice.org/10111
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

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 adcc3f3..54ef18a 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -460,7 +460,7 @@ 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[] =
@@ -478,7 +478,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
@@ -502,6 +502,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