summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-09-24 09:41:02 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-09-24 10:41:33 +0200
commitaf6b7d8ba30d395e5f4a17876526434cf0a06005 (patch)
treeb66020b08b0247b5afcc26accaf0469f6e21da13 /writerfilter/source
parentda9acd209918ac26b44bddcf7b38b8887d23bfef (diff)
fdo#49655 fix RTF import of text in the middle of table definition
Usually table text comes after the \intbl control word, but it turns out text is allowed earlier. Make sure such text is buffered, otherwise we'll send paragraph / run properties to the dmapper in the middle of table properties, which is obviously not allowed. Change-Id: I34f1df7e171316a7d926179689627301860d492f
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index f8200ff5907a..5e3365431b5b 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1006,6 +1006,14 @@ void RTFDocumentImpl::text(OUString& rString)
return;
}
+ // Are we in the middle of the table definition? (No cell defs yet, but we already have some cell props.)
+ if (m_aStates.top().aTableCellSprms.find(NS_ooxml::LN_CT_TcPrBase_vAlign).get() &&
+ m_aStates.top().nCells == 0)
+ {
+ m_aTableBuffer.push_back(make_pair(BUFFER_UTEXT, RTFValue::Pointer_t(new RTFValue(rString))));
+ return;
+ }
+
checkFirstRun();
checkNeedPap();