summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-01-11 10:37:28 +0300
committerCaolán McNamara <caolanm@redhat.com>2017-01-12 15:48:25 +0000
commit6bc2c54711fc3e798c440978a78d03488f14f0d9 (patch)
tree50363a04f4e5fbaf8e51f25ab010ad76e8507040 /oox
parent1d7cf3f0391214a17593eced752e2a1786c0a1e3 (diff)
tdf#104414: don't stop on exception from SwXFrame::setPosition
Change-Id: Ib6d4e398d546d6fe250b9c1efe099ae8eef2d580 Reviewed-on: https://gerrit.libreoffice.org/32978 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/vml/vmlshape.cxx12
1 files changed, 10 insertions, 2 deletions
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;
}