summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport9.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 930cbdc41b4f..5f45cbcc7109 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1049,6 +1049,28 @@ DECLARE_OOXMLEXPORT_TEST(tdf112169, "tdf112169.odt")
// LO crashed while export because of character background color handling
}
+DECLARE_OOXMLEXPORT_TEST(testTdf103090, "tdf103090.odt")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ // Get bookmark name
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:bookmarkStart", "name");
+
+ // Ensure that name has no spaces
+ CPPUNIT_ASSERT(bookmarkName.indexOf(" ") < 0);
+
+ // Get PAGEREF field
+ OUString fieldName = getXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText");
+
+ // Ensure that PAGEREF field refers exactly our bookmark
+ OUString expectedFieldName(" PAGEREF ");
+ expectedFieldName += bookmarkName;
+ expectedFieldName += " \\h ";
+ CPPUNIT_ASSERT_EQUAL(expectedFieldName, fieldName);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */