summaryrefslogtreecommitdiffstats
path: root/chart2/qa
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/chart2export.cxx24
-rw-r--r--chart2/qa/extras/chart2geometry.cxx32
2 files changed, 3 insertions, 53 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 817f3d1734a2..dabf7b4ed277 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -404,29 +404,7 @@ xmlDocUniquePtr Chart2ExportTest::parseExport(const OUString& rDir, const OUStri
void Chart2ExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
{
- static struct { char const * pPrefix; char const * pURI; } const aNamespaces[] =
- {
- { "w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main" },
- { "v", "urn:schemas-microsoft-com:vml" },
- { "c", "http://schemas.openxmlformats.org/drawingml/2006/chart" },
- { "a", "http://schemas.openxmlformats.org/drawingml/2006/main" },
- { "mc", "http://schemas.openxmlformats.org/markup-compatibility/2006" },
- { "wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape" },
- { "wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" },
- { "wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" },
- { "office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" },
- { "table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0" },
- { "text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0" },
- { "xlink", "http://www.w3c.org/1999/xlink" },
- { "c15", "http://schemas.microsoft.com/office/drawing/2012/chart" }
- };
- for(size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i)
- {
- xmlXPathRegisterNs(
- pXmlXPathCtx,
- reinterpret_cast<xmlChar const *>(aNamespaces[i].pPrefix),
- reinterpret_cast<xmlChar const *>(aNamespaces[i].pURI));
- }
+ XmlTestTools::registerOOXMLNamespaces(pXmlXPathCtx);
}
namespace {
diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx
index 4f57654a3587..d6c243ccfd76 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -139,36 +139,8 @@ xmlDocUniquePtr Chart2GeometryTest::parseExport(const OUString& rDir, const OUSt
void Chart2GeometryTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
{
- static struct
- {
- char const* pPrefix;
- char const* pURI;
- } const aNamespaces[] = {
- // OOXML
- { "w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main" },
- { "v", "urn:schemas-microsoft-com:vml" },
- { "c", "http://schemas.openxmlformats.org/drawingml/2006/chart" },
- { "a", "http://schemas.openxmlformats.org/drawingml/2006/main" },
- { "mc", "http://schemas.openxmlformats.org/markup-compatibility/2006" },
- { "wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape" },
- { "wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" },
- { "wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" },
- { "c15", "http://schemas.microsoft.com/office/drawing/2012/chart" },
- // ODF
- { "office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" },
- { "chart", "urn:oasis:names:tc:opendocument:xmlns:chart:1.0" },
- { "draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" },
- { "style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0" },
- { "svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" },
- { "table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0" },
- { "text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0" },
- { "xlink", "http://www.w3c.org/1999/xlink" },
- };
- for (size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i)
- {
- xmlXPathRegisterNs(pXmlXPathCtx, reinterpret_cast<xmlChar const*>(aNamespaces[i].pPrefix),
- reinterpret_cast<xmlChar const*>(aNamespaces[i].pURI));
- }
+ XmlTestTools::registerOOXMLNamespaces(pXmlXPathCtx);
+ XmlTestTools::registerODFNamespaces(pXmlXPathCtx);
}
static OString OU2O(std::u16string_view sOUSource)