oox/source/vml/vmlformatting.cxx | 20 ++++++++++---------- oox/source/vml/vmlshape.cxx | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-)
New commits: commit 442ad6eef9d6e1588e4985e97ec3eafd6289f9ae Author: Cédric Bosdonnat <[email protected]> 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. Change-Id: I2a4bb07fc9167e056a52c7adfbee9e1ef8e2636c diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 02559d4..d59ff6a 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -319,7 +319,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& 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 @@ -350,7 +350,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 LINE_REL: // 2* params -> param count reset @@ -358,14 +358,14 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& 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 @@ -389,12 +389,12 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& r // Move on to current command state switch ( rPath[ i ] ) { - case 't': state = MOVE_REL; nTokenLen = 0; nParamCount = 2 * 2; break; - case 'm': state = MOVE_ABS; nTokenLen = 0; nParamCount = 2 * 2; break; - case 'v': state = BEZIER_REL; nTokenLen = 0; nParamCount = 2 * 6; break; - case 'c': state = BEZIER_ABS; nTokenLen = 0; nParamCount = 2 * 6; break; - case 'r': state = LINE_REL; nTokenLen = 0; nParamCount = 2 * 2; break; - case 'l': state = LINE_ABS; nTokenLen = 0; nParamCount = 2 * 2; break; + case 't': state = MOVE_REL; nTokenLen = 0; nParamCount = 2; break; + case 'm': state = MOVE_ABS; nTokenLen = 0; nParamCount = 2; break; + case 'v': state = BEZIER_REL; nTokenLen = 0; nParamCount = 6; break; + case 'c': state = BEZIER_ABS; nTokenLen = 0; nParamCount = 6; break; + case 'r': state = LINE_REL; nTokenLen = 0; nParamCount = 2; break; + case 'l': state = LINE_ABS; nTokenLen = 0; nParamCount = 2; break; case 'x': state = CLOSE; nTokenLen = 0; break; case 'e': state = END; break; } diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index d34bf33..44910b5 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -683,7 +683,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") { }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
