[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - oox/source
Cédric Bosdonnat
cedric.bosdonnat at free.fr
Fri Jun 28 00:23:29 PDT 2013
oox/source/vml/vmlformatting.cxx | 20 ++++++++++----------
oox/source/vml/vmlshape.cxx | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 4f82681a1cdefc0547c8765f8d189bdaf0cab33d
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.
Change-Id: I2a4bb07fc9167e056a52c7adfbee9e1ef8e2636c
(cherry picked from commit 442ad6eef9d6e1588e4985e97ec3eafd6289f9ae)
Reviewed-on: https://gerrit.libreoffice.org/4535
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 ed6355b..f434084 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -314,7 +314,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
@@ -345,7 +345,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
@@ -353,14 +353,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
@@ -384,12 +384,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 124807c..bdde233 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -628,7 +628,7 @@ Reference<XShape> LineShape::implConvertAndInsert(const Reference<XShapes>& rxSh
// ============================================================================
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