sw/qa/extras/ooxmlexport/data/date_field_in_shape.docx |binary sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx | 5 +++++ writerfilter/source/dmapper/DomainMapper.cxx | 9 +++++---- 3 files changed, 10 insertions(+), 4 deletions(-)
New commits: commit d163b651dc3dd017cdb3327d87a7cf88003238e9 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Mon Jul 22 11:12:47 2019 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Mon Jul 22 19:25:03 2019 +0200 MSForms: DOCX filter: fix crash when the date field is inside a shape Change-Id: Ida6ff48e6e743e41dd793e31c11065f870e8959b Reviewed-on: https://gerrit.libreoffice.org/76117 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/sw/qa/extras/ooxmlexport/data/date_field_in_shape.docx b/sw/qa/extras/ooxmlexport/data/date_field_in_shape.docx new file mode 100644 index 000000000000..ff3c637c34f3 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/date_field_in_shape.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx index b5b6b6040216..872fb9651fb1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx @@ -664,6 +664,11 @@ DECLARE_OOXMLEXPORT_TEST( testTdf66401, "tdf66401.docx") } } +DECLARE_OOXMLEXPORT_TEST( testDateFieldInShape, "date_field_in_shape.docx" ) +{ + // This was crashed on export. +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index f219330d52a2..483d567dcafc 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3286,11 +3286,12 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) m_pImpl->m_pSdtHelper->getLocale().truncate(); return; } - if((m_pImpl->hasTableManager() && m_pImpl->getTableManager().isInTable()) || - m_pImpl->m_nTableDepth > 0) + bool bIsInTable = (m_pImpl->hasTableManager() && m_pImpl->getTableManager().isInTable()) || + (m_pImpl->m_nTableDepth > 0); + if(bIsInTable || m_pImpl->IsInShape()) { - // Inside a table we need to import date field earlier - m_pImpl->m_pSdtHelper->createDateContentControl(true); + // Inside an object we need to import date field earlier + m_pImpl->m_pSdtHelper->createDateContentControl(bIsInTable); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits