1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SchXMLImport.hxx,v $
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
,
54 enum SchXMLTableElemTokenMap
56 XML_TOK_TABLE_HEADER_COLS
,
57 XML_TOK_TABLE_COLUMNS
,
59 XML_TOK_TABLE_HEADER_ROWS
,
64 enum SchXMLChartElemTokenMap
66 XML_TOK_CHART_PLOT_AREA
,
68 XML_TOK_CHART_SUBTITLE
,
73 enum SchXMLPlotAreaElemTokenMap
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
97 XML_TOK_AXIS_CATEGORIES
,
101 // ----------------------------------------
103 enum SchXMLChartAttrMap
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
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
,
129 XML_TOK_PA_PROJECTION
,
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
,
142 XML_TOK_AXIS_STYLE_NAME
145 enum SchXMLLegendAttrMap
147 XML_TOK_LEGEND_POSITION
,
150 XML_TOK_LEGEND_STYLE_NAME
153 enum SchXMLAutoStyleAttrMap
159 enum SchXMLCellAttrMap
161 XML_TOK_CELL_VAL_TYPE
,
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
,
183 class SchXMLImport
: public SvXMLImport
186 com::sun::star::uno::Reference
< com::sun::star::task::XStatusIndicator
> mxStatusIndicator
;
188 SchXMLImportHelper maImportHelper
;
191 virtual SvXMLImportContext
*CreateContext(
193 const ::rtl::OUString
& rLocalName
,
194 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
199 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& xServiceFactory
,
200 sal_uInt16 nImportFlags
= IMPORT_ALL
);
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
);
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_