diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-19 17:49:29 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-19 18:01:16 +0200 |
commit | 3cab1adf19d553663685e8198f0ec3f258a37c36 (patch) | |
tree | 6503d63917c1a22614dba02520594b0c104cd885 /writerfilter | |
parent | ef3e481be37a387f6549a561daee890da6712cf5 (diff) |
abi#2720 RTF import: handle non-graphic object after a graphic one
Change-Id: I9416b6e7cf3677006215fcbde458ed341c4e3e9e
Diffstat (limited to 'writerfilter')
-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 d162aa4a2c85..a2b0c60ce0b2 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -768,13 +768,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("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); |