summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-09 18:44:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-09 18:41:56 +0000
commitd9b03172af1b81c0aede3e7e94e83d8932f26150 (patch)
tree77985980928ad06746f095436165cd0550906151 /oox
parentffdc5db260b7c17c47109f707b3664a3f3caafaa (diff)
Clean up Sequence construction
...to avoid silly errors like the one fixed with 37039fde1187c2e71bdde6e7fafd23c6ae8a871e "Missing comma." Change-Id: Iab4d25f44fd8867ee1ef5e15c209ada5c6ebb0c8 Reviewed-on: https://gerrit.libreoffice.org/19871 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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}};
}
};