Kaydet (Commit) 79940e2d authored tarafından Miklos Vajna's avatar Miklos Vajna

oox customshapepresetdata: allow empty adjustment list

Change-Id: I842a464ddc0403d63698b2f9b52d4362af1e46c3
üst b7feee55
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment