From 6bc2c54711fc3e798c440978a78d03488f14f0d9 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 11 Jan 2017 10:37:28 +0300 Subject: tdf#104414: don't stop on exception from SwXFrame::setPosition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib6d4e398d546d6fe250b9c1efe099ae8eef2d580 Reviewed-on: https://gerrit.libreoffice.org/32978 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- oox/source/vml/vmlshape.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 0b68675ae72e..ad44bcf56d76 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -1081,8 +1081,16 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes } // Hacky way of ensuring the shape is correctly sized/positioned - xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) ); - xShape->setPosition( awt::Point( rShapeRect.X, rShapeRect.Y ) ); + try + { + // E.g. SwXFrame::setPosition() unconditionally throws + xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) ); + xShape->setPosition( awt::Point( rShapeRect.X, rShapeRect.Y ) ); + } + catch (const ::css::uno::Exception&) + { + // TODO: try some other way to ensure size/position + } return xShape; } -- cgit