writerfilter/source/rtftok/rtfdocumentimpl.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit b1be18f0e36bac7a82edc8f0b30de6127ff1352b
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Sep 22 13:56:05 2014 +0100

    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 <mst...@redhat.com>

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 62a7794..9f35f26 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(
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to