diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-12-06 09:22:53 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-12-06 09:11:30 +0000 |
commit | c2e070d9a8192e7aceed64a63c716c7317843747 (patch) | |
tree | 13fc89a8f1a2039de7475bac2a67d216dd7b9c39 /writerfilter | |
parent | 252008d49203344ebe69e727a260a48bc76d7a82 (diff) |
tdf#104317 RTF import: avoid setting CustomShapeGeometry on a line shape
Even Santa Claus knows it has no such property.
Change-Id: I46e27868c62fabd10c6447956e40e55962ee284b
Reviewed-on: https://gerrit.libreoffice.org/31668
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 61cde990e775..fa05c83e9e02 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -941,13 +941,17 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap if (obFlipH == true || obFlipV == true) { - // This has to be set after position and size is set, otherwise flip will affect the position. - comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry")); - if (obFlipH == true) - aCustomShapeGeometry["MirroredX"] <<= true; - if (obFlipV == true) - aCustomShapeGeometry["MirroredY"] <<= true; - xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList())); + // Line shapes have no CustomShapeGeometry. + if (nType != ESCHER_ShpInst_Line) + { + // This has to be set after position and size is set, otherwise flip will affect the position. + comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry")); + if (obFlipH == true) + aCustomShapeGeometry["MirroredX"] <<= true; + if (obFlipV == true) + aCustomShapeGeometry["MirroredY"] <<= true; + xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList())); + } } if (rShape.nHoriOrientRelation != 0) |