summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-04-17 15:48:11 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-17 16:54:19 +0200
commitea06c516a8b8b2d8dbf0dadba1e8c2196cb89449 (patch)
tree975b1aa79e8c035416f68402d440a9e64df52186 /oox
parent0e44c6592b558ac70f87031a9ddb1d131fb802b2 (diff)
oox customshapepresetdata: allow empty equation list
Change-Id: Ie18c3e631c266d4281df8b92d08ddeaaef20e8d7
Diffstat (limited to 'oox')
-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 71add4fca3d2..97e9b741991e 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -682,12 +682,15 @@ void CustomShapeProperties::initializePresetDataMap()
else if (aLine == "Equations")
{
aStream.ReadLine(aLine);
- OString aExpectedPrefix("([]string) { ");
- assert(aLine.startsWith(aExpectedPrefix));
-
comphelper::SequenceAsVector<OUString> aEquations;
- OString aValue = aLine.copy(aExpectedPrefix.getLength(), aLine.getLength() - aExpectedPrefix.getLength() - strlen(" }"));
- lcl_parseEquations(aEquations, aValue);
+ if (aLine != "([]string) {}")
+ {
+ OString aExpectedPrefix("([]string) { ");
+ assert(aLine.startsWith(aExpectedPrefix));
+
+ OString aValue = aLine.copy(aExpectedPrefix.getLength(), aLine.getLength() - aExpectedPrefix.getLength() - strlen(" }"));
+ lcl_parseEquations(aEquations, aValue);
+ }
aPropertyMap.setProperty(PROP_Equations, aEquations.getAsConstList());
}
else if (aLine == "Handles")