summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-04-10 15:42:23 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-04-10 15:51:40 +0200
commit95803f44cfa0dc62b500e931e401e0593b0c3eae (patch)
treeea338c953bfede149ffc256a255b35ee6b648165
parentc8ef940ae0fc8db4354039a13de46fa986a70cff (diff)
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.
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 627700426c83..729e56988237 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;