oox/source/vml/vmlshape.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
New commits: commit 79d3c022394d6e07c1f4268f11233b9600ff4360 Author: Stephan Bergmann <[email protected]> Date: Wed Mar 1 09:50:34 2017 +0100 cid#1401592: bFlipX and bFlipY won't both be true Change-Id: If5ab5d340166b5eedb97773a9907eee1b188027e diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 8def04f..b0e76de 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -18,6 +18,8 @@ */ #include <algorithm> +#include <cassert> + #include <boost/optional.hpp> #include "oox/vml/vmlshape.hxx" @@ -800,19 +802,17 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes // The associated properties "PROP_MirroredX" and "PROP_MirroredY" have to be set here so that direction change will occur internally. if (bFlipX || bFlipY) { - css::uno::Sequence< css::beans::PropertyValue > aPropSequence ( - bFlipX && bFlipY ? 2 : 1); - int nPropertyIndex = 0; + assert(!(bFlipX && bFlipY)); + css::uno::Sequence< css::beans::PropertyValue > aPropSequence (1); if (bFlipX) { - aPropSequence [nPropertyIndex].Name = "MirroredX"; - aPropSequence [nPropertyIndex].Value <<= bFlipX; - nPropertyIndex++; + aPropSequence [0].Name = "MirroredX"; + aPropSequence [0].Value <<= bFlipX; } - if (bFlipY) + else { - aPropSequence [nPropertyIndex].Name = "MirroredY"; - aPropSequence [nPropertyIndex].Value <<= bFlipY; + aPropSequence [0].Name = "MirroredY"; + aPropSequence [0].Value <<= bFlipY; } aPropertySet.setAnyProperty(PROP_CustomShapeGeometry, makeAny( aPropSequence ) ); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
