[Libreoffice-commits] core.git: oox/source
Mike Kaganski
mike.kaganski at collabora.com
Thu Jan 12 15:48:45 UTC 2017
oox/source/vml/vmlshape.cxx | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 6bc2c54711fc3e798c440978a78d03488f14f0d9
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Wed Jan 11 10:37:28 2017 +0300
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 0b68675..ad44bcf 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;
}
More information about the Libreoffice-commits
mailing list