summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-06-03 20:55:12 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-06-04 09:05:12 +0200
commit1ba1bb1cacdc8825d01559859100a2b575967e55 (patch)
treee0d21b37df7f8ea23c05b9b7c9c841d40b22f338 /sw
parentfa6e97f08a656a7093f6d9c5ecdb2bdc081b7116 (diff)
test: introduce XmlTestTools::registerOOXMLNamespaces() to reduce copy&paste
sc/ could potentially benefit from this as well, that's not yet done here. Change-Id: I03d0b4afa21a02c74d34aab6e03ab53991df29dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116679 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/unit/swmodeltestbase.cxx55
1 files changed, 1 insertions, 54 deletions
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index 7a158abf7e3b..9cb362bf3ff5 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -697,60 +697,7 @@ xmlDocUniquePtr SwModelTestBase::parseExportInternal(const OUString& url,
void SwModelTestBase::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
{
// docx
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w"),
- BAD_CAST("http://schemas.openxmlformats.org/wordprocessingml/2006/main"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("v"), BAD_CAST("urn:schemas-microsoft-com:vml"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("mc"),
- BAD_CAST("http://schemas.openxmlformats.org/markup-compatibility/2006"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("wps"),
- BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingShape"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("wpg"),
- BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("wp"),
- BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("wp14"),
- BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("a"),
- BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/main"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("pic"),
- BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/picture"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("rels"),
- BAD_CAST("http://schemas.openxmlformats.org/package/2006/relationships"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w14"),
- BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordml"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w15"),
- BAD_CAST("http://schemas.microsoft.com/office/word/2012/wordml"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("m"),
- BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/math"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("ContentType"),
- BAD_CAST("http://schemas.openxmlformats.org/package/2006/content-types"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("lc"),
- BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("cp"),
- BAD_CAST("http://schemas.openxmlformats.org/package/2006/metadata/core-properties"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("extended-properties"),
- BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("custom-properties"),
- BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("vt"),
- BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dcterms"), BAD_CAST("http://purl.org/dc/terms/"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("a14"),
- BAD_CAST("http://schemas.microsoft.com/office/drawing/2010/main"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("c"),
- BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/chart"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("o"),
- BAD_CAST("urn:schemas-microsoft-com:office:office"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w10"),
- BAD_CAST("urn:schemas-microsoft-com:office:word"));
+ XmlTestTools::registerOOXMLNamespaces(pXmlXpathCtx);
// odt
XmlTestTools::registerODFNamespaces(pXmlXpathCtx);
// reqif-xhtml