summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-26 11:26:56 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-06-28 07:19:16 +0000
commitc1dcb685db2f489da2aff65fb910bbcc298e91bd (patch)
treef57793f8dfa67aa7d9a5213895fc986c1d9cf9c6 /oox
parent8fc18ed289279fc3bba6e4a346a8ce89a428d770 (diff)
n#820504: start a new subpath with m and t in VML path decoding
Change-Id: I7bac4b111ede5e815d2ed121c18f4cfe1ad0950e (cherry picked from commit 8d6eb11d6965ee93e72513f5e01b67f598edf6c3) (cherry picked from commit ff28c7b26b097a3213766cf2ba6f36a4b77b185f) Reviewed-on: https://gerrit.libreoffice.org/4587 Tested-by: Fridrich Strba <fridrich@documentfoundation.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'oox')
-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 7c1d9b2dc2a4..46d61a362036 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();