[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 2 commits - oox/source

Cédric Bosdonnat cedric.bosdonnat at free.fr
Wed Jun 26 02:33:21 PDT 2013


 oox/source/vml/vmlformatting.cxx |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 8d6eb11d6965ee93e72513f5e01b67f598edf6c3
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Wed Jun 26 11:26:56 2013 +0200

    n#820504: start a new subpath with m and t in VML path decoding
    
    Change-Id: I7bac4b111ede5e815d2ed121c18f4cfe1ad0950e

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index a40e93e..949712b 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -311,11 +311,16 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& 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();
@@ -323,6 +328,11 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& 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();
commit 7f7a1294e2d0da30a58d897558a18a13dbc5e690
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jun 24 11:39:30 2013 +0200

    Forgot to remove one case where nParamCount is set to twice the value
    
    Change-Id: I3649364a889b7ef6ce7ac4316a1621b6328170eb

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index d59ff6a..a40e93e 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -339,7 +339,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& r
                     rFlagLists.back().push_back( PolygonFlags_CONTROL );
                     rFlagLists.back().push_back( PolygonFlags_NORMAL );
                     aCurrentPoint = rPointLists.back().back();
-                    nParamCount = 2 * 6;
+                    nParamCount = 6;
                     break;
 
                 case BEZIER_ABS: // 6* params -> param count reset


More information about the Libreoffice-commits mailing list