[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - oox/source
Cédric Bosdonnat
cedric.bosdonnat at free.fr
Fri Jun 21 02:00:42 PDT 2013
oox/source/vml/vmlshape.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 08db0b22bdce0f779e4af01a209aef1be29e9907
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Fri Jun 21 10:47:42 2013 +0200
n#820504: Some imported VML paths are closed, try to detect the
Change-Id: Idefd0277a85bd7b2b727f59cc4e568869b4932a1
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 414cc03..d34bf33 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -683,12 +683,19 @@ awt::Rectangle LineShape::getRelRectangle() const
// ============================================================================
BezierShape::BezierShape(Drawing& rDrawing)
- : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape")
+ : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape") // TODO Could we need both Open and Closed?
{
}
Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
{
+ // If we have an 'x' in the last part of the path it means it is closed...
+ sal_Int32 nPos = maShapeModel.maVmlPath.lastIndexOf(',');
+ if ( nPos != -1 && maShapeModel.maVmlPath.copy(nPos).indexOf('x') != -1 )
+ {
+ const_cast<BezierShape*>( this )->setService( "com.sun.star.drawing.ClosedBezierShape" );
+ }
+
Reference< XShape > xShape = SimpleShape::implConvertAndInsert( rxShapes, rShapeRect );
awt::Rectangle aCoordSys = getCoordSystem();
More information about the Libreoffice-commits
mailing list