summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport/odfexport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-05-30 14:56:40 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-05-30 15:59:03 +0200
commit6f179ce5c5469d1c53e4bb7736384b2d9ce51926 (patch)
tree9aa262bb78e6066ec298d03fb8241ca5aca9f2ad /sw/qa/extras/odfexport/odfexport.cxx
parent831de14f660ba4faf4cac716e30246c8dc0386f1 (diff)
ODT export: fix lost <text:user-field-decl> for fields in frames in headers
This is similar to commit 6bb241ccc61c6904efec95978fa17e33c0eb1df3 (ODT export: fix lost <text:user-field-decl> for fields in tables in headers, 2019-05-29), but here the container we want to ignore (between the header and the field) is a text frame, not a table cell. Change-Id: I6e8006fbd666802070cfeb88ca4528c66cc6d559 Reviewed-on: https://gerrit.libreoffice.org/73205 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/qa/extras/odfexport/odfexport.cxx')
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 8725efcc500b..4c17893e2310 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -260,6 +260,15 @@ DECLARE_ODFEXPORT_TEST(testUserFieldDecl, "user-field-decl.odt")
assertXPath(pXmlDoc, "//style:header/text:user-field-decls/text:user-field-decl", 2);
}
+DECLARE_ODFEXPORT_TEST(testUserFieldDeclFly, "user-field-decl-fly.odt")
+{
+ if (xmlDocPtr pXmlDoc = parseExport("styles.xml"))
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 2;
+ // Actual: 1', i.e. the in-textframe field had no declaration (in the header), while the
+ // outside-textframe one had the declaration.
+ assertXPath(pXmlDoc, "//style:header/text:user-field-decls/text:user-field-decl", 2);
+}
+
DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
{
//Counting the Number of Frames and checking with the expected count