summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
diff options
context:
space:
mode:
authorJean-Sebastien Bevilacqua <realitix@gmail.com>2017-02-16 10:16:50 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-28 07:05:30 +0000
commit4d5ce76d894d2335b551f8c2b29437e2049894f0 (patch)
tree152ac7f5dabfc7f7cb1df385dac8ed63a3afa1d1 /sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
parentb3549aacabffad3c4c66d901938d59e4789eef22 (diff)
tdf#105975 Add Set field parsing (docx) in LibreOffice Writer
Introduction ------------ In MSWord, you can create a variable with `SET` field and then reference it later in a formula. When you save your file as `docx`, this `SET` field is registered in you file. In its current state, LibreOffice can't parse the `SET` field in `docx` file. Context of this fix ------------------- This fix is entirely located in the `DomainMapper_Impl.cxx` file because it's where the parsing is done. How this fix works ------------------ First, we add `SET` support by adding it to the `aFields[]` variable. Next, to handle the `SET` constant, we add a condition (swith case) in `DomainMapper_Impl::CloseFieldCommand()` to call `handleFieldSet`. Finally, `handleFieldSet` works like `handleFieldAsk` with small differences. Note ---- I have renamed `lcl_ExctractAskVariableAndHint` to `lcl_ExctractVariableAndHint` because this function is used for both `ASK` and `SET` fields. Change-Id: I2bf948e26e8506ac151d1d0bc8556721bbe0392b Reviewed-on: https://gerrit.libreoffice.org/34333 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index ec8b13621001..d473a13f73e2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -432,7 +432,7 @@ DECLARE_OOXMLEXPORT_TEST(testFDO76163 , "fdo76163.docx")
if (!pXmlDoc)
return;
//docx file after RT is getting corrupted.
- assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink/w:r[11]/w:fldChar", "fldCharType", "end" );
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink/w:r[10]/w:fldChar", "fldCharType", "end" );
}
DECLARE_OOXMLEXPORT_TEST(testFDO78659, "fdo78659.docx")