merge the formfield patch from ooo-build
[ooovba.git] / xmloff / inc / SchXMLImport.hxx
blob396a2ba5d26b7649781c0fe3fc56e8810dda8649
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SchXMLImport.hxx,v $
10 * $Revision: 1.28 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SCH_XMLIMPORT_HXX_
31 #define SCH_XMLIMPORT_HXX_
33 #include <xmloff/SchXMLImportHelper.hxx>
34 #include <xmloff/xmlimp.hxx>
35 #include <xmloff/xmltkmap.hxx>
36 #include <xmloff/xmlictxt.hxx>
37 #include <xmloff/prhdlfac.hxx>
38 #include <xmloff/families.hxx>
40 /* ----------------------------------------
41 these enums are used for the
42 SvXMLTokenMapEntries to distinguish
43 the tokens in switch-directives
44 ----------------------------------------*/
46 enum SchXMLDocElemTokenMap
48 XML_TOK_DOC_AUTOSTYLES,
49 XML_TOK_DOC_STYLES,
50 XML_TOK_DOC_META,
51 XML_TOK_DOC_BODY
54 enum SchXMLTableElemTokenMap
56 XML_TOK_TABLE_HEADER_COLS,
57 XML_TOK_TABLE_COLUMNS,
58 XML_TOK_TABLE_COLUMN,
59 XML_TOK_TABLE_HEADER_ROWS,
60 XML_TOK_TABLE_ROWS,
61 XML_TOK_TABLE_ROW
64 enum SchXMLChartElemTokenMap
66 XML_TOK_CHART_PLOT_AREA,
67 XML_TOK_CHART_TITLE,
68 XML_TOK_CHART_SUBTITLE,
69 XML_TOK_CHART_LEGEND,
70 XML_TOK_CHART_TABLE
73 enum SchXMLPlotAreaElemTokenMap
75 XML_TOK_PA_AXIS,
76 XML_TOK_PA_SERIES,
77 XML_TOK_PA_WALL,
78 XML_TOK_PA_FLOOR,
79 XML_TOK_PA_LIGHT_SOURCE,
80 XML_TOK_PA_STOCK_GAIN,
81 XML_TOK_PA_STOCK_LOSS,
82 XML_TOK_PA_STOCK_RANGE
85 enum SchXMLSeriesElemTokenMap
87 XML_TOK_SERIES_DATA_POINT,
88 XML_TOK_SERIES_DOMAIN,
89 XML_TOK_SERIES_MEAN_VALUE_LINE,
90 XML_TOK_SERIES_REGRESSION_CURVE,
91 XML_TOK_SERIES_ERROR_INDICATOR
94 enum SchXMLAxisElemTokenMap
96 XML_TOK_AXIS_TITLE,
97 XML_TOK_AXIS_CATEGORIES,
98 XML_TOK_AXIS_GRID
101 // ----------------------------------------
103 enum SchXMLChartAttrMap
105 XML_TOK_CHART_HREF,
106 XML_TOK_CHART_CLASS,
107 XML_TOK_CHART_WIDTH,
108 XML_TOK_CHART_HEIGHT,
109 XML_TOK_CHART_STYLE_NAME,
110 XML_TOK_CHART_ADDIN_NAME,
111 XML_TOK_CHART_COL_MAPPING,
112 XML_TOK_CHART_ROW_MAPPING
115 enum SchXMLPlotAreaAttrTokenMap
117 XML_TOK_PA_X,
118 XML_TOK_PA_Y,
119 XML_TOK_PA_WIDTH,
120 XML_TOK_PA_HEIGHT,
121 XML_TOK_PA_STYLE_NAME,
122 XML_TOK_PA_TRANSFORM,
123 XML_TOK_PA_CHART_ADDRESS,
124 XML_TOK_PA_TABLE_NUMBER_LIST,
125 XML_TOK_PA_DS_HAS_LABELS,
126 XML_TOK_PA_VRP,
127 XML_TOK_PA_VPN,
128 XML_TOK_PA_VUP,
129 XML_TOK_PA_PROJECTION,
130 XML_TOK_PA_DISTANCE,
131 XML_TOK_PA_FOCAL_LENGTH,
132 XML_TOK_PA_SHADOW_SLANT,
133 XML_TOK_PA_SHADE_MODE,
134 XML_TOK_PA_AMBIENT_COLOR,
135 XML_TOK_PA_LIGHTING_MODE
138 enum SchXMLAxisAttrTokenMap
140 XML_TOK_AXIS_DIMENSION,
141 XML_TOK_AXIS_NAME,
142 XML_TOK_AXIS_STYLE_NAME
145 enum SchXMLLegendAttrMap
147 XML_TOK_LEGEND_POSITION,
148 XML_TOK_LEGEND_X,
149 XML_TOK_LEGEND_Y,
150 XML_TOK_LEGEND_STYLE_NAME
153 enum SchXMLAutoStyleAttrMap
155 XML_TOK_AS_FAMILY,
156 XML_TOK_AS_NAME
159 enum SchXMLCellAttrMap
161 XML_TOK_CELL_VAL_TYPE,
162 XML_TOK_CELL_VALUE
165 enum SchXMLSeriesAttrMap
167 XML_TOK_SERIES_CELL_RANGE,
168 XML_TOK_SERIES_LABEL_ADDRESS,
169 XML_TOK_SERIES_ATTACHED_AXIS,
170 XML_TOK_SERIES_STYLE_NAME,
171 XML_TOK_SERIES_CHART_CLASS
174 enum SchXMLRegEquationAttrMap
176 XML_TOK_REGEQ_STYLE_NAME,
177 XML_TOK_REGEQ_DISPLAY_EQUATION,
178 XML_TOK_REGEQ_DISPLAY_R_SQUARE,
179 XML_TOK_REGEQ_POS_X,
180 XML_TOK_REGEQ_POS_Y
183 class SchXMLImport : public SvXMLImport
185 private:
186 com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
188 SchXMLImportHelper maImportHelper;
190 protected:
191 virtual SvXMLImportContext *CreateContext(
192 sal_uInt16 nPrefix,
193 const ::rtl::OUString& rLocalName,
194 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
196 public:
197 // #110680#
198 SchXMLImport(
199 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
200 sal_uInt16 nImportFlags = IMPORT_ALL );
202 // #110680#
203 SchXMLImport(
204 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
205 com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel,
206 com::sun::star::uno::Reference< com::sun::star::document::XGraphicObjectResolver > &,
207 sal_Bool bLoadDoc, sal_Bool bShowProgress );
209 virtual ~SchXMLImport() throw ();
211 // XServiceInfo ( : SvXMLExport )
212 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
214 SvXMLImportContext* CreateStylesContext( const ::rtl::OUString& rLocalName,
215 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
217 // XImporter
218 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);
221 #endif // SCH_XMLIMPORT_HXX_