summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-22 13:56:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-22 17:32:09 +0100
commitcfbcce701cd6dc3af6086428399136efef33ff59 (patch)
tree5b15e19ecd3332c8a826f5d4b02fced58473be20
parent4f917d47776addcd041a0ce3ec719f752643f8ef (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
-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 2fdbccd9cb61..78c2d712a0b3 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -808,9 +808,14 @@ int RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XSh
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("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY);