diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-01 09:50:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-01 09:50:34 +0100 |
commit | 79d3c022394d6e07c1f4268f11233b9600ff4360 (patch) | |
tree | 7aa72908c030a8d24ef63f6e49c365231a60d31f /oox | |
parent | 2ec7457eec4535e81e4a32b48df5ab45d39476db (diff) |
cid#1401592: bFlipX and bFlipY won't both be true
Change-Id: If5ab5d340166b5eedb97773a9907eee1b188027e
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 8def04fd7fe4..b0e76deae013 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 ) ); } |