summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-22 13:56:05 +0100
committerMichael Stahl <mstahl@redhat.com>2014-10-02 21:39:12 +0200
commitb1be18f0e36bac7a82edc8f0b30de6127ff1352b (patch)
tree6c38bc70d15ae231e4b447b1a528c31becfad2d6
parentccb32f41b9bd9cdd6d8eca72c4d173bccb8a7e73 (diff)
Related: fdo#37691 \shptxt ... \jpegblip
text shape with jpeg data, should we throw away the text shape here or keep it ? Change-Id: I9e4463b5863bf68cdcd18ea5d1f6c831a0de8ec9 (cherry picked from commit cfbcce701cd6dc3af6086428399136efef33ff59) Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 62a779486d0b..9f35f264e2d5 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -789,9 +789,14 @@ int RTFDocumentImpl::resolvePict(bool const bInline,
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"))
+ {
+ //fdo37691-1.rtf
+ SAL_WARN("writerfilter.rtf", "cannot set graphic on existing shape, creating a new GraphicObjectShape");
+ xShape.set(NULL);
+ }
}
- else
+ if (!xShape.is())
{
if (m_xModelFactory.is())
xShape.set(m_xModelFactory->createInstance(