summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorYogeshBharate <yogesh.bharate@synerzip.com>2014-01-02 15:03:02 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-13 17:08:01 +0100
commitdbd42432c7b8f8149080bb13b103b35f2532eee8 (patch)
tree1e3ddcc768c184ce40392417b1c34c0b9a7c75ac /sw/qa
parent1b00be2ed1f911aec07ab2ef9432168cfa333c6d (diff)
fdo#69613: Code changes for TOC with flag '\x' should get preserved after RT.
Issue : TOC field flag '\x' was not getting preserved after RT. Implementation : Provided import & export support for TOC field flag '\x'. XML file difference : In document.xml, Before: ‒<w:r w:rsidR="00A9725D"> ‒<w:instrText xml:space="preserve"> TOC \o "1-3" </w:instrText> </w:r> ‒<w:r w:rsidR="008A34F6"> ‒<w:instrText> \h </w:instrText> </w:r> ‒<w:r w:rsidR="00A9725D"> ‒<w:instrText xml:space="preserve"> \x </w:instrText> After: ‒<w:instrText> TOC \x \o "1-3" \h </w:instrText> Conflicts: sw/inc/tox.hxx sw/inc/unoprnms.hxx sw/source/core/unocore/unoidx.cxx sw/source/core/unocore/unomap.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/ui/index/cntex.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/PropertyIds.cxx writerfilter/source/dmapper/PropertyIds.hxx Reviewed on: https://gerrit.libreoffice.org/7257 Change-Id: I8f196446a3beb8deea6b7ddde50e16c9cea73cd9
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docxbin0 -> 18620 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx b/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx
new file mode 100644
index 000000000000..adf7fd92494d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 4fe902d0fd7a..7727bc1a5e26 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2384,6 +2384,16 @@ DECLARE_OOXMLEXPORT_TEST(testFieldFlagB,"TOC_field_b.docx")
CPPUNIT_ASSERT(contents.match(" TOC \\b \"bookmark111\" \\o \"1-9\" \\h"));
}
+DECLARE_OOXMLEXPORT_TEST(testPreserveXfieldTOC, "PreserveXfieldTOC.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc,"/w:document/w:body/w:p[2]/w:r[2]/w:instrText");
+ xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
+ OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
+ CPPUNIT_ASSERT(contents.match(" TOC \\x \\f \\o \"1-3\" \\h"));
+}
#endif
CPPUNIT_PLUGIN_IMPLEMENT();