summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-04-17 15:37:24 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-17 16:54:19 +0200
commit79940e2da54c320d3dda0149bc9ac21ad45dccd5 (patch)
tree6146277d4b4751c19c9d3f670cf14db37aa86c0d
parentb7feee55782f83e356611a90c8a22e3509880ac2 (diff)
oox customshapepresetdata: allow empty adjustment list
Change-Id: I842a464ddc0403d63698b2f9b52d4362af1e46c3
-rw-r--r--oox/source/drawingml/customshapepresetdata.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx
index a3740a9bb6a5..8875f77ec42c 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -664,12 +664,15 @@ void CustomShapeProperties::initializePresetDataMap()
if (aLine == "AdjustmentValues")
{
aStream.ReadLine(aLine);
- OString aExpectedPrefix("([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { ");
- assert(aLine.startsWith(aExpectedPrefix));
-
comphelper::SequenceAsVector<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues;
- OString aValue = aLine.copy(aExpectedPrefix.getLength(), aLine.getLength() - aExpectedPrefix.getLength() - strlen(" }"));
- lcl_parseAdjustmentValues(aAdjustmentValues, aValue);
+ if (aLine != "([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}")
+ {
+ OString aExpectedPrefix("([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) { ");
+ assert(aLine.startsWith(aExpectedPrefix));
+
+ OString aValue = aLine.copy(aExpectedPrefix.getLength(), aLine.getLength() - aExpectedPrefix.getLength() - strlen(" }"));
+ lcl_parseAdjustmentValues(aAdjustmentValues, aValue);
+ }
aPropertyMap.setProperty(PROP_AdjustmentValues, aAdjustmentValues.getAsConstList());
}
else if (aLine == "Equations")