tdf#125103 Writer: input fields will be exported to docx

Changed the solution https://gerrit.libreoffice.org/#/c/70786/
of Vasily sligthly, so MS Office can recognize fields still
as fields.

Change-Id: Id45330a96dfe002685c6ef3dc62e408c5f9f46c4
Reviewed-on: https://gerrit.libreoffice.org/72868
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
This commit is contained in:
Ilhan Yesil
2019-05-23 17:52:04 +02:00
committed by Vasily Melenchuk
parent b6c94e4e04
commit 62aaaad156
2 changed files with 3 additions and 3 deletions

View File

@@ -245,7 +245,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextInput, "textinput.odt")
if (!pXmlDoc)
return;
// Ensure we have a formfield
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText", " FORMTEXT ");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText", " FILLIN \"\"");
// and it's content is not gone
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:t", "SomeText");
}

View File

@@ -378,8 +378,8 @@ void DocxExport::DoComboBox(const OUString& rName,
void DocxExport::DoFormText(const SwInputField* pField)
{
assert(pField);
const OUString sStr = FieldString(ww::eFORMTEXT);
OutputField(pField, ww::eFORMTEXT, sStr);
const OUString sStr = FieldString(ww::eFILLIN) + "\"" + pField->GetPar2() + "\"";
OutputField(pField, ww::eFILLIN, sStr);
}
OString DocxExport::OutputChart( uno::Reference< frame::XModel > const & xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr const & m_pSerializer )