summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-24 10:37:05 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-24 10:37:05 +0200
commit442ad6eef9d6e1588e4985e97ec3eafd6289f9ae (patch)
treed9a9bf4d6fdc237eb39e1492700cb02b4e7b8075 /oox
parent08db0b22bdce0f779e4af01a209aef1be29e9907 (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. Change-Id: I2a4bb07fc9167e056a52c7adfbee9e1ef8e2636c
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 02559d4b4018..d59ff6a6a3c6 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 d34bf336425c..44910b5a965d 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")
{
}