[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source

Cédric Bosdonnat cedric.bosdonnat at free.fr
Fri Jun 28 00:17:56 PDT 2013


 oox/source/vml/vmlformatting.cxx |   20 ++++++++++----------
 oox/source/vml/vmlshape.cxx      |    2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 6d2c2f5cd7bb849b84c23b9b4213a2b02be4ef19
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Jun 24 10:37:05 2013 +0200

    n#820504: VML path import fixes: get back missing points
    
    nParamsCount was set to the double of the expected value, but the code
    handling the command only took the first set of parameters. Removing
    this 2* in nParamsCount.
    
    (cherry picked from commit 442ad6eef9d6e1588e4985e97ec3eafd6289f9ae)
    (cherry picked from commit 10cd569334971949b82bbccfd7a29334e374cc47)
    
    Conflicts:
    	oox/source/vml/vmlformatting.cxx
    
    Change-Id: I2a4bb07fc9167e056a52c7adfbee9e1ef8e2636c
    Reviewed-on: https://gerrit.libreoffice.org/4585
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 9be2c68..21f0b0d 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -318,7 +318,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
                     rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) );
                     rFlagLists.back().push_back( PolygonFlags_NORMAL );
                     aCurrentPoint = rPointLists.back().back();
-                    nParamCount = 2 * 2;
+                    nParamCount = 2;
                     break;
 
                 case MOVE_ABS: // 2 params -> no param count reset
@@ -349,7 +349,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
                     rFlagLists.back().push_back( PolygonFlags_CONTROL );
                     rFlagLists.back().push_back( PolygonFlags_NORMAL );
                     aCurrentPoint = rPointLists.back().back();
-                    nParamCount = 2 * 6;
+                    nParamCount = 6;
                     break;
 
                 case LINE_REL: // 2* params -> param count reset
@@ -357,14 +357,14 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
                                             aCurrentPoint.Y + aCoordList[ 1 ] ) );
                     rFlagLists.back().push_back( PolygonFlags_NORMAL );
                     aCurrentPoint = rPointLists.back().back();
-                    nParamCount = 2 * 2;
+                    nParamCount = 2;
                     break;
 
                 case LINE_ABS: // 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 * 2;
+                    nParamCount = 2;
                     break;
 
                 case CLOSE: // 0 param
@@ -397,17 +397,17 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
             {
             // Single-character commands
             case 't': // rmoveto
-                state = MOVE_REL; nParamCount = 2 * 2; break;
+                state = MOVE_REL; nParamCount = 2; break;
             case 'm': // moveto
-                state = MOVE_ABS; nParamCount = 2 * 2; break;
+                state = MOVE_ABS; nParamCount = 2; break;
             case 'v': // rcurveto
-                state = BEZIER_REL; nParamCount = 2 * 6; break;
+                state = BEZIER_REL; nParamCount = 6; break;
             case 'c': // curveto
-                state = BEZIER_ABS; nParamCount = 2 * 6; break;
+                state = BEZIER_ABS; nParamCount = 6; break;
             case 'r': // rlineto
-                state = LINE_REL; nParamCount = 2 * 2; break;
+                state = LINE_REL; nParamCount = 2; break;
             case 'l': // lineto
-                state = LINE_ABS; nParamCount = 2 * 2; break;
+                state = LINE_ABS; nParamCount = 2; break;
             case 'x': // close
                 state = CLOSE; break;
             case 'e': // end
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index b77adf6..0d0f80f 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -700,7 +700,7 @@ awt::Rectangle LineShape::getRelRectangle() const
 // ============================================================================
 
 BezierShape::BezierShape(Drawing& rDrawing)
-    : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape") // TODO Could we need both Open and Closed?
+    : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape")
 {
 }
 


More information about the Libreoffice-commits mailing list