summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-07-20 21:22:14 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-07-22 11:19:56 +0200
commit5ccf0dac637345bab3d3a4e37ea6707c6d9bd0a6 (patch)
treeb18de026f4efa470e52fd9dda02df8c7982e99b9 /writerfilter
parent7e6cf79dee36fcbb856e84cc250ddb5bea7f7c88 (diff)
tdf#134400 RTF import: fix unexpected inner properties for picture-in-textframe
Regression from commit 4ab658b56f5c6ff0082d38d8ace1924d11e30e96 (RTF import: implement support for tables inside text frames, 2013-06-16), the problem was that both the outer "textbox" and the inner "picture frame" object had a shapeType property, and the properties were stored in a vector. So by the time RTFSdrImport::initShape() looked up the shape type for the inner shape, it thought it's not a picture frame, leading to data loss. (cherry picked from commit 5a083be34456e91427d0f2e2fea172f49f4502db) Change-Id: I4a536789371619d1d54afa8c8d41c7d273b0d21b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99118 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99167 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 85f61129b1f3..ddd2337a9945 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -1129,6 +1129,11 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
m_rImport.Mapper().endShape();
}
}
+
+ // If the shape has an inner shape, the inner object's properties should not be influenced by
+ // the outer one.
+ rShape.getProperties().clear();
+
m_xShape = xShape;
}