[Libreoffice-commits] core.git: oox/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Apr 17 10:35:00 PDT 2014
oox/source/drawingml/customshapepresetdata.cxx | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
New commits:
commit a87e8268f8c32387052adf9a9283834dcf83e5ab
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Apr 17 17:28:20 2014 +0200
oox customshapepresetdata: empty is an empty string sequence
In case the data is empty, the data loader still set the proper type for
the sequence, while the generated code used a string sequence. Do the
same to keep testcases happy, there is no visual difference anyway.
Change-Id: I1b9be4486184a2a84c384f1365cc68dd45b8eee0
diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx
index 6d3a281..7e4ecde 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -751,44 +751,50 @@ void CustomShapeProperties::initializePresetDataMap()
if (aLine == "AdjustmentValues")
{
aStream.ReadLine(aLine);
- comphelper::SequenceAsVector<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues;
if (aLine != "([]com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue) {}")
{
+ comphelper::SequenceAsVector<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues;
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());
}
- aPropertyMap.setProperty(PROP_AdjustmentValues, aAdjustmentValues.getAsConstList());
+ else
+ aPropertyMap.setProperty(PROP_AdjustmentValues, uno::Sequence<OUString>(0));
}
else if (aLine == "Equations")
{
aStream.ReadLine(aLine);
- comphelper::SequenceAsVector<OUString> aEquations;
if (aLine != "([]string) {}")
{
+ comphelper::SequenceAsVector<OUString> aEquations;
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());
}
- aPropertyMap.setProperty(PROP_Equations, aEquations.getAsConstList());
+ else
+ aPropertyMap.setProperty(PROP_Equations, uno::Sequence<OUString>(0));
}
else if (aLine == "Handles")
{
aStream.ReadLine(aLine);
- comphelper::SequenceAsVector< uno::Sequence<beans::PropertyValue> > aHandles;
if (aLine != "([][]com.sun.star.beans.PropertyValue) {}")
{
+ comphelper::SequenceAsVector< uno::Sequence<beans::PropertyValue> > aHandles;
OString aExpectedPrefix("([][]com.sun.star.beans.PropertyValue) { ");
assert(aLine.startsWith(aExpectedPrefix));
OString aValue = aLine.copy(aExpectedPrefix.getLength(), aLine.getLength() - aExpectedPrefix.getLength() - strlen(" }"));
lcl_parseHandles(aHandles, aValue);
+ aPropertyMap.setProperty(PROP_Handles, aHandles.getAsConstList());
}
- aPropertyMap.setProperty(PROP_Handles, aHandles.getAsConstList());
+ else
+ aPropertyMap.setProperty(PROP_Handles, uno::Sequence<OUString>(0));
}
else if (aLine == "MirroredX")
{
More information about the Libreoffice-commits
mailing list