writerfilter/source/rtftok/rtfdocumentimpl.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 95803f44cfa0dc62b500e931e401e0593b0c3eae
Author: Miklos Vajna <vmik...@suse.cz>
Date:   Tue Apr 10 15:42:23 2012 +0200

    fdo#47802 fix crash on RTF import of shapes inside tables
    
    We already ignore textframes inside tables, the same should be done with
    textboxes till they can be handled properly.

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 6277004..729e569 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1128,7 +1128,11 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword 
nKeyword)
             m_aStates.top().nDestinationState = DESTINATION_SHAPE;
             break;
         case RTF_SHPINST:
-            m_aStates.top().nDestinationState = DESTINATION_SHAPEINSTRUCTION;
+            // Don't try to support shapes inside tables for now.
+            if (m_pCurrentBuffer != &m_aTableBuffer)
+                m_aStates.top().nDestinationState = 
DESTINATION_SHAPEINSTRUCTION;
+            else
+                m_aStates.top().nDestinationState = DESTINATION_SKIP;
             break;
         case RTF_NESTTABLEPROPS:
             m_aStates.top().nDestinationState = 
DESTINATION_NESTEDTABLEPROPERTIES;
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to