summaryrefslogtreecommitdiff
path: root/oox/source/vml/vmlformatting.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/vml/vmlformatting.cxx')
-rw-r--r--oox/source/vml/vmlformatting.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 2cbb4ca24fca..a5d75346284d 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -311,7 +311,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
{
switch ( state )
{
- case MOVE_REL: // 2* params -> param count reset
+ case MOVE_REL:
+ aCoordList.resize(2, 0); // 2* params -> param count reset
if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 )
{
rPointLists.push_back( ::std::vector< Point >() );
@@ -323,18 +324,20 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
nParamCount = 2;
break;
- case MOVE_ABS: // 2 params -> no param count reset
+ case MOVE_ABS:
+ aCoordList.resize(2, 0); // 2 params -> no param count reset
if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 )
{
rPointLists.push_back( ::std::vector< Point >() );
rFlagLists.push_back( ::std::vector< PolygonFlags >() );
}
- rPointLists.back().push_back( Point( (aCoordList[ 0 ]), (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) );
+ rPointLists.back().push_back( Point( (aCoordList[ 0 ]), aCoordList[ 1 ] ) );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();
break;
- case BEZIER_REL: // 6* params -> param count reset
+ case BEZIER_REL:
+ aCoordList.resize(6, 0); // 6* params -> param count reset
rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 0 ],
aCurrentPoint.Y + aCoordList[ 1 ] ) );
rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 2 ],
@@ -348,7 +351,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
nParamCount = 6;
break;
- case BEZIER_ABS: // 6* params -> param count reset
+ case BEZIER_ABS:
+ aCoordList.resize(6, 0); // 6* params -> param count reset
rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) );
rPointLists.back().push_back( Point( aCoordList[ 2 ], aCoordList[ 3 ] ) );
rPointLists.back().push_back( Point( aCoordList[ 4 ], aCoordList[ 5 ] ) );
@@ -359,7 +363,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
nParamCount = 6;
break;
- case LINE_REL: // 2* params -> param count reset
+ case LINE_REL:
+ aCoordList.resize(2, 0); // 2* params -> param count reset
rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 0 ],
aCurrentPoint.Y + aCoordList[ 1 ] ) );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
@@ -367,8 +372,9 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
nParamCount = 2;
break;
- case LINE_ABS: // 2* params -> param count reset
- rPointLists.back().push_back( Point( aCoordList[ 0 ], (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) );
+ case LINE_ABS:
+ aCoordList.resize(2, 0); // 2* params -> param count reset
+ rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();
nParamCount = 2;