summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx110
1 files changed, 44 insertions, 66 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 1aeac9ae2d1f..9f01e3469313 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -94,72 +94,50 @@ struct NamespaceIds: public rtl::StaticWithInit<
{
Sequence< beans::Pair< OUString, sal_Int32 > > operator()()
{
- static const char* const namespaceURIs[] = {
- "http://www.w3.org/XML/1998/namespace",
- "http://schemas.openxmlformats.org/package/2006/relationships",
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
- "http://purl.oclc.org/ooxml/officeDocument/relationships",
- "http://schemas.openxmlformats.org/drawingml/2006/main",
- "http://purl.oclc.org/ooxml/drawingml/main",
- "http://schemas.openxmlformats.org/drawingml/2006/diagram",
- "http://purl.oclc.org/ooxml/drawingml/diagram",
- "http://schemas.openxmlformats.org/drawingml/2006/chart",
- "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing",
- "urn:schemas-microsoft-com:vml",
- "urn:schemas-microsoft-com:office:office",
- "urn:schemas-microsoft-com:office:word",
- "urn:schemas-microsoft-com:office:excel",
- "urn:schemas-microsoft-com:office:powerpoint",
- "http://schemas.microsoft.com/office/2006/activeX",
- "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
- "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
- "http://schemas.microsoft.com/office/excel/2006/main",
- "http://schemas.openxmlformats.org/presentationml/2006/main",
- "http://schemas.openxmlformats.org/markup-compatibility/2006",
- "http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2",
- "http://schemas.microsoft.com/office/drawing/2008/diagram",
- "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",
- "http://schemas.libreoffice.org/",
- "http://schemas.microsoft.com/office/powerpoint/2010/main",
- "http://schemas.microsoft.com/office/powerpoint/2012/main"
- };
-
- static const sal_Int32 namespaceIds[] = {
- NMSP_xml,
- NMSP_packageRel,
- NMSP_officeRel,
- NMSP_officeRel,
- NMSP_dml,
- NMSP_dml,
- NMSP_dmlDiagram,
- NMSP_dmlDiagram,
- NMSP_dmlChart,
- NMSP_dmlChartDr,
- NMSP_vml,
- NMSP_vmlOffice,
- NMSP_vmlWord,
- NMSP_vmlExcel,
- NMSP_vmlPowerpoint,
- NMSP_ax,
- NMSP_xls,
- NMSP_xm,
- NMSP_dmlSpreadDr,
- NMSP_ppt,
- NMSP_mce,
- NMSP_mceTest,
- NMSP_dsp,
- NMSP_xls14Lst,
- NMSP_loext,
- NMSP_p14,
- NMSP_p15,
- };
-
- Sequence< beans::Pair< OUString, sal_Int32 > > aRet(SAL_N_ELEMENTS(namespaceIds));
- for( sal_Int32 i=0; i<aRet.getLength(); ++i )
- aRet[i] = make_Pair(
- OUString::createFromAscii(namespaceURIs[i]),
- namespaceIds[i]);
- return aRet;
+ return css::uno::Sequence<css::beans::Pair<OUString, sal_Int32>>{
+ {"http://www.w3.org/XML/1998/namespace", NMSP_xml},
+ {"http://schemas.openxmlformats.org/package/2006/relationships",
+ NMSP_packageRel},
+ {"http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ NMSP_officeRel},
+ {"http://purl.oclc.org/ooxml/officeDocument/relationships",
+ NMSP_officeRel},
+ {"http://schemas.openxmlformats.org/drawingml/2006/main", NMSP_dml},
+ {"http://purl.oclc.org/ooxml/drawingml/main", NMSP_dml},
+ {"http://schemas.openxmlformats.org/drawingml/2006/diagram",
+ NMSP_dmlDiagram},
+ {"http://purl.oclc.org/ooxml/drawingml/diagram", NMSP_dmlDiagram},
+ {"http://schemas.openxmlformats.org/drawingml/2006/chart",
+ NMSP_dmlChart},
+ {"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing",
+ NMSP_dmlChartDr},
+ {"urn:schemas-microsoft-com:vml", NMSP_vml},
+ {"urn:schemas-microsoft-com:office:office", NMSP_vmlOffice},
+ {"urn:schemas-microsoft-com:office:word", NMSP_vmlWord},
+ {"urn:schemas-microsoft-com:office:excel", NMSP_vmlExcel},
+ {"urn:schemas-microsoft-com:office:powerpoint", NMSP_vmlPowerpoint},
+ {"http://schemas.microsoft.com/office/2006/activeX", NMSP_ax},
+ {"http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ NMSP_xls},
+ {"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
+ NMSP_xm},
+ {"http://schemas.microsoft.com/office/excel/2006/main",
+ NMSP_dmlSpreadDr},
+ {"http://schemas.openxmlformats.org/presentationml/2006/main",
+ NMSP_ppt},
+ {"http://schemas.openxmlformats.org/markup-compatibility/2006",
+ NMSP_mce},
+ {"http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2",
+ NMSP_mceTest},
+ {"http://schemas.microsoft.com/office/drawing/2008/diagram",
+ NMSP_dsp},
+ {"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",
+ NMSP_xls14Lst},
+ {"http://schemas.libreoffice.org/", NMSP_loext},
+ {"http://schemas.microsoft.com/office/powerpoint/2010/main",
+ NMSP_p14},
+ {"http://schemas.microsoft.com/office/powerpoint/2012/main",
+ NMSP_p15}};
}
};