diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-07 10:52:54 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-07 10:53:15 +0100 |
commit | ebe80ac6713b67b1801ede3d1e9038cb2c93cb11 (patch) | |
tree | 1d35631c43f79c2bee0c714a0ea1d93bc7495b2d /chart2 | |
parent | a800cc780b60d61fd871ec5598c80a431e13903f (diff) |
Clean up use of libxml2 BAD_CAST
Change-Id: Ia48681f1be4fb3c51ea6805a2dab1b8b957540d0
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index ad5859b450c8..cd98f216777e 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -227,24 +227,27 @@ xmlDocPtr Chart2ExportTest::parseExport(const OUString& rDir, const OUString& rF void Chart2ExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) { - struct { xmlChar* pPrefix; xmlChar* pURI; } aNamespaces[] = + struct { char const * pPrefix; char const * pURI; } aNamespaces[] = { - { BAD_CAST("w"), BAD_CAST("http://schemas.openxmlformats.org/wordprocessingml/2006/main") }, - { BAD_CAST("v"), BAD_CAST("urn:schemas-microsoft-com:vml") }, - { BAD_CAST("c"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/chart") }, - { BAD_CAST("a"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/main") }, - { BAD_CAST("mc"), BAD_CAST("http://schemas.openxmlformats.org/markup-compatibility/2006") }, - { BAD_CAST("wps"), BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingShape") }, - { BAD_CAST("wpg"), BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingGroup") }, - { BAD_CAST("wp"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing") }, - { BAD_CAST("office"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0") }, - { BAD_CAST("table"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:table:1.0") }, - { BAD_CAST("text"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:text:1.0") }, - { BAD_CAST("xlink"), BAD_CAST("http://www.w3c.org/1999/xlink") } + { "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" } }; for(size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i) { - xmlXPathRegisterNs(pXmlXPathCtx, aNamespaces[i].pPrefix, aNamespaces[i].pURI ); + xmlXPathRegisterNs( + pXmlXPathCtx, + reinterpret_cast<xmlChar const *>(aNamespaces[i].pPrefix), + reinterpret_cast<xmlChar const *>(aNamespaces[i].pURI)); } } |