1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef SCH_XMLIMPORT_HXX_
20 #define SCH_XMLIMPORT_HXX_
22 #include <xmloff/SchXMLImportHelper.hxx>
23 #include <xmloff/xmlimp.hxx>
24 #include <xmloff/xmltkmap.hxx>
25 #include <xmloff/xmlictxt.hxx>
26 #include <xmloff/prhdlfac.hxx>
27 #include <xmloff/families.hxx>
29 /* ----------------------------------------
30 these enums are used for the
31 SvXMLTokenMapEntries to distinguish
32 the tokens in switch-directives
33 ----------------------------------------*/
35 enum SchXMLDocElemTokenMap
37 XML_TOK_DOC_AUTOSTYLES
,
43 enum SchXMLTableElemTokenMap
45 XML_TOK_TABLE_HEADER_COLS
,
46 XML_TOK_TABLE_COLUMNS
,
48 XML_TOK_TABLE_HEADER_ROWS
,
53 enum SchXMLChartElemTokenMap
55 XML_TOK_CHART_PLOT_AREA
,
57 XML_TOK_CHART_SUBTITLE
,
62 enum SchXMLPlotAreaElemTokenMap
64 XML_TOK_PA_COORDINATE_REGION_EXT
,
65 XML_TOK_PA_COORDINATE_REGION
,
70 XML_TOK_PA_LIGHT_SOURCE
,
71 XML_TOK_PA_STOCK_GAIN
,
72 XML_TOK_PA_STOCK_LOSS
,
73 XML_TOK_PA_STOCK_RANGE
76 enum SchXMLSeriesElemTokenMap
78 XML_TOK_SERIES_DATA_POINT
,
79 XML_TOK_SERIES_DOMAIN
,
80 XML_TOK_SERIES_MEAN_VALUE_LINE
,
81 XML_TOK_SERIES_REGRESSION_CURVE
,
82 XML_TOK_SERIES_ERROR_INDICATOR
85 // ----------------------------------------
87 enum SchXMLChartAttrMap
93 XML_TOK_CHART_STYLE_NAME
,
94 XML_TOK_CHART_ADDIN_NAME
,
95 XML_TOK_CHART_COL_MAPPING
,
96 XML_TOK_CHART_ROW_MAPPING
99 enum SchXMLPlotAreaAttrTokenMap
105 XML_TOK_PA_STYLE_NAME
,
106 XML_TOK_PA_TRANSFORM
,
107 XML_TOK_PA_CHART_ADDRESS
,
108 XML_TOK_PA_TABLE_NUMBER_LIST
,
109 XML_TOK_PA_DS_HAS_LABELS
,
113 XML_TOK_PA_PROJECTION
,
115 XML_TOK_PA_FOCAL_LENGTH
,
116 XML_TOK_PA_SHADOW_SLANT
,
117 XML_TOK_PA_SHADE_MODE
,
118 XML_TOK_PA_AMBIENT_COLOR
,
119 XML_TOK_PA_LIGHTING_MODE
122 enum SchXMLAutoStyleAttrMap
128 enum SchXMLCellAttrMap
130 XML_TOK_CELL_VAL_TYPE
,
134 enum SchXMLSeriesAttrMap
136 XML_TOK_SERIES_CELL_RANGE
,
137 XML_TOK_SERIES_LABEL_ADDRESS
,
138 XML_TOK_SERIES_ATTACHED_AXIS
,
139 XML_TOK_SERIES_STYLE_NAME
,
140 XML_TOK_SERIES_CHART_CLASS
143 enum SchXMLRegEquationAttrMap
145 XML_TOK_REGEQ_STYLE_NAME
,
146 XML_TOK_REGEQ_DISPLAY_EQUATION
,
147 XML_TOK_REGEQ_DISPLAY_R_SQUARE
,
152 class SchXMLImport
: public SvXMLImport
155 com::sun::star::uno::Reference
< com::sun::star::task::XStatusIndicator
> mxStatusIndicator
;
157 SchXMLImportHelper maImportHelper
;
160 virtual SvXMLImportContext
*CreateContext(
162 const OUString
& rLocalName
,
163 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
168 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& xContext
,
169 sal_uInt16 nImportFlags
= IMPORT_ALL
);
171 virtual ~SchXMLImport() throw ();
173 // XServiceInfo ( : SvXMLExport )
174 virtual OUString SAL_CALL
getImplementationName() throw( ::com::sun::star::uno::RuntimeException
);
176 SvXMLImportContext
* CreateStylesContext( const OUString
& rLocalName
,
177 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
180 virtual void SAL_CALL
setTargetDocument( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& xDoc
) throw(::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
183 #endif // SCH_XMLIMPORT_HXX_
185 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */