[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/qa writerfilter/source

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 1 03:25:17 UTC 2019


 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 142962c13cf95b52f9e6a53af7d23de516b15303
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Jul 22 11:12:47 2019 +0200
Commit:     Aron Budea <aron.budea at collabora.com>
CommitDate: Thu Aug 1 05:24:44 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.zolnai at collabora.com>
    (cherry picked from commit d163b651dc3dd017cdb3327d87a7cf88003238e9)
    Reviewed-on: https://gerrit.libreoffice.org/76206
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Aron Budea <aron.budea at 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 458c91652873..1b30405018f0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -705,6 +705,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 936523501232..253662695a1f 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3394,11 +3394,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);
         }
     }
 


More information about the Libreoffice-commits mailing list