sw/qa/extras/ooxmlexport/data/textinput.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 11 +++++++++++ sw/source/filter/ww8/docxexport.cxx | 6 ++++-- 3 files changed, 15 insertions(+), 2 deletions(-)
New commits: commit 72131204cadbd20678a41b1da910bf66740c0886 Author: Vasily Melenchuk <[email protected]> AuthorDate: Mon Apr 15 17:22:04 2019 +0300 Commit: Thorsten Behrens <[email protected]> CommitDate: Mon Apr 29 15:19:59 2019 +0200 docx export: implement text-input field export It is expected that <text:text-input> will be converted to {FORMTEXT} MS field, but practical implementation was missing. Reviewed-on: https://gerrit.libreoffice.org/70786 Reviewed-by: Thorsten Behrens <[email protected]> Tested-by: Thorsten Behrens <[email protected]> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport13.cxx Change-Id: Ifd17a523e253555a240f853bea5f21572d90d853 Reviewed-on: https://gerrit.libreoffice.org/71506 Reviewed-by: Thorsten Behrens <[email protected]> Tested-by: Thorsten Behrens <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/textinput.odt b/sw/qa/extras/ooxmlexport/data/textinput.odt new file mode 100644 index 000000000000..04b8d054c354 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/textinput.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index d7d41b1d1e36..25fc6b4d69f7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -771,6 +771,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105444, "tdf105444.docx") assertXPath(pXmlComm, "/w:comments/w:comment/w:p", 1); } +DECLARE_OOXMLEXPORT_TEST(testTextInput, "textinput.odt") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + // Ensure we have a formfield + assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText", " FORMTEXT "); + // and it's content is not gone + assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:t", "SomeText"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index cd52c0768833..e4a2d274544e 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -375,9 +375,11 @@ void DocxExport::DoComboBox(const OUString& rName, m_pDocumentFS->endElementNS( XML_w, XML_ffData ); } -void DocxExport::DoFormText(const SwInputField* /*pField*/) +void DocxExport::DoFormText(const SwInputField* pField) { - SAL_INFO("sw.ww8", "TODO DocxExport::ForFormText()" ); + assert(pField); + const OUString sStr = FieldString(ww::eFORMTEXT); + OutputField(pField, ww::eFORMTEXT, sStr); } OString DocxExport::OutputChart( uno::Reference< frame::XModel > const & xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr const & m_pSerializer ) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
