diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-07-30 17:32:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-07-31 09:18:54 +0200 |
commit | de455fcaa725343bc516fa13cf1bf5253178a0a6 (patch) | |
tree | 7742581a6bd7fa9da3539f6b23216277f431ab81 | |
parent | 0ea06dd96c513e3daa881896679507189aeb2034 (diff) |
Always pair openTable/closeTable calls
`--convert-to epub doc/ooo24702-1.doc` (i.e., attachment
4 SMS SPECIFICATIONS.doc at
<https://bz.apache.org/ooo/show_bug.cgi?id=24702#c1>) issues some calls to
XMLTableContext::startElement and XMLTableContext::endElement without any
matching calls to XMLTableContext::CreateChildContext, so closeTable was called
without a matching openTable call, ultimately causing
> soffice.bin: sax/source/expatwrap/saxwriter.cxx:1184: virtual void (anonymous namespace)::SAXWriter::endElement(const rtl::OUString &): Assertion `aName == m_pSaxWriterHelper->m_DebugStartedElements.top()' failed.
to fire.
Change-Id: I41c3071ace0934143881c77e4b00c23e79ff7ea2
Reviewed-on: https://gerrit.libreoffice.org/76618
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | writerperfect/source/writer/exp/xmltbli.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/writerperfect/source/writer/exp/xmltbli.cxx b/writerperfect/source/writer/exp/xmltbli.cxx index a96582ecc3f9..263b6c3af414 100644 --- a/writerperfect/source/writer/exp/xmltbli.cxx +++ b/writerperfect/source/writer/exp/xmltbli.cxx @@ -239,7 +239,10 @@ void XMLTableContext::startElement( void XMLTableContext::endElement(const OUString& /*rName*/) { - GetImport().GetGenerator().closeTable(); + if (m_bTableOpened) + { + GetImport().GetGenerator().closeTable(); + } } } // namespace exp |