diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-19 17:49:29 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-07-16 11:17:57 +0200 |
commit | 326460072a42d849b46ab88b48580825bdb0bcc7 (patch) | |
tree | 84f10fe05410382ffe4571497106f7c50ab94b04 /writerfilter/source/rtftok/rtfdocumentimpl.cxx | |
parent | 12a49fb66a8d3380b9a57ec1c252c2981f1724b1 (diff) |
abi#2720 RTF import: handle non-graphic object after a graphic one
Change-Id: I9416b6e7cf3677006215fcbde458ed341c4e3e9e
(cherry picked from commit 3cab1adf19d553663685e8198f0ec3f258a37c36)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index cc627a5e5bed..befbb4204a89 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -779,13 +779,15 @@ int RTFDocumentImpl::resolvePict(bool bInline) // Wrap it in an XShape. uno::Reference<drawing::XShape> xShape; - xShape = m_pSdrImport->getCurrentShape();//Mapper().PopPendingShape(); + xShape = m_pSdrImport->getCurrentShape(); if (xShape.is()) { uno::Reference<lang::XServiceInfo> xSI(xShape, uno::UNO_QUERY_THROW); - assert(xSI->supportsService("com.sun.star.drawing.GraphicObjectShape")); + if(!xSI->supportsService("com.sun.star.drawing.GraphicObjectShape")) + xShape.clear(); } - else + + if (!xShape.is()) { if (m_xModelFactory.is()) xShape.set(m_xModelFactory->createInstance( |