summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-24 10:37:05 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-06-28 07:17:35 +0000
commit6d2c2f5cd7bb849b84c23b9b4213a2b02be4ef19 (patch)
tree0c3ccb86cecfa813b7a9ca7c707ceff2faac2694 /oox
parenta176d3645722746563f6dda3d9807dbe2cad1b01 (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) (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@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/vml/vmlformatting.cxx20
-rw-r--r--oox/source/vml/vmlshape.cxx2
2 files changed, 11 insertions, 11 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 9be2c6881cee..21f0b0db2b80 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 b77adf64c16c..0d0f80f0a73c 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")
{
}