summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/vml/vmlformatting.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 31d4f3282713..267d8e5b5082 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -310,11 +310,16 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
// Upon finding the next command code, deal with stored
// coordinates for previous command and reset parameters counter if needed.
// See http://www.w3.org/TR/NOTE-VML#_Toc416858382 for params count reference
- if ( rPath[ i ] != ',' || nParamCount == 0)
+ if ( rPath[ i ] != ',' || nParamCount == 0 )
{
switch ( state )
{
case MOVE_REL: // 2* params -> 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[ 1 ] ) );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();
@@ -322,6 +327,11 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
break;
case MOVE_ABS: // 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[ 1 ] ) );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();