diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-24 10:37:05 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-27 15:19:14 +0200 |
commit | b25eb9f78b55ba10636c56e6723b66939239b3f5 (patch) | |
tree | caf368eff409d7ee4acbed88493b1509476812d9 /oox | |
parent | 781904af36158b72c131f2d72e562e92f73a9bd2 (diff) |
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)
Conflicts:
oox/source/vml/vmlformatting.cxx
Change-Id: I2a4bb07fc9167e056a52c7adfbee9e1ef8e2636c
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 20 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 806c62460b25..69d9b3506e54 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 4551eee21fa7..1cb47724c140 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -715,7 +715,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") { } |