[Libreoffice-commits] .: writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Tue Apr 10 06:51:16 PDT 2012


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

New commits:
commit 95803f44cfa0dc62b500e931e401e0593b0c3eae
Author: Miklos Vajna <vmiklos at 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;


More information about the Libreoffice-commits mailing list