diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-10-29 09:59:27 +0100 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-10-29 11:24:31 +0000 |
commit | f3162ccd18cd31323e4a0c18648332d6a493e4c7 (patch) | |
tree | f3af25e7de95901bc9040b8152b484cf7c1c4188 /writerfilter | |
parent | b9b4554d064d91ced74b6e476bcc383e2c55e75d (diff) |
tdf#94835: crash while loading RTF with \dppolygon token fixed
RTF token \dppolygon now creates a PolyPolygonShape
test included
Change-Id: I065eaac0ca1b8a59f02c3198363180ab244a3942
Reviewed-on: https://gerrit.libreoffice.org/19665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index f50d355f96ce..6f447c8a1905 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3369,6 +3369,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) case RTF_DPELLIPSE: case RTF_DPTXBX: case RTF_DPPOLYLINE: + case RTF_DPPOLYGON: { sal_Int32 nType = 0; switch (nKeyword) @@ -3380,6 +3381,9 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) // The reason this is not a simple CustomShape is that in the old syntax we have no ViewBox info. m_aStates.top().aDrawingObject.xShape.set(getModelFactory()->createInstance("com.sun.star.drawing.PolyLineShape"), uno::UNO_QUERY); break; + case RTF_DPPOLYGON: + m_aStates.top().aDrawingObject.xShape.set(getModelFactory()->createInstance("com.sun.star.drawing.PolyPolygonShape"), uno::UNO_QUERY); + break; case RTF_DPRECT: m_aStates.top().aDrawingObject.xShape.set(getModelFactory()->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY); break; |