1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _XMLOFF_XIMPCUSTOMSHAPE_HXX_
25 #define _XMLOFF_XIMPCUSTOMSHAPE_HXX_
26 
27 #include <xmloff/xmlictxt.hxx>
28 #include <xmloff/xmluconv.hxx>
29 #include <rtl/ustring.hxx>
30 #include <vector>
31 #include <com/sun/star/uno/Reference.h>
32 #include <com/sun/star/beans/PropertyValue.hpp>
33 #ifndef __com_sun_star_beans_PropertyValues_hpp__
34 #include <com/sun/star/beans/PropertyValues.hpp>
35 #endif
36 #include <com/sun/star/drawing/XShape.hpp>
37 #include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
38 
39 namespace com { namespace sun { namespace star {
40 	namespace container { class XIndexContainer; }
41 	namespace beans { class XPropertySet; }
42 	namespace xml { namespace sax { class XAttributeList; } }
43 } } }
44 
45 class SdXMLCustomShapeContext;
46 class XMLEnhancedCustomShapeContext : public SvXMLImportContext
47 {
48 	SvXMLUnitConverter& mrUnitConverter;
49 	com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& mrxShape;
50 	std::vector< com::sun::star::beans::PropertyValue >& mrCustomShapeGeometry;
51 
52 	std::vector< com::sun::star::beans::PropertyValue > maExtrusion;
53 	std::vector< com::sun::star::beans::PropertyValue > maPath;
54 	std::vector< com::sun::star::beans::PropertyValue > maTextPath;
55 	std::vector< com::sun::star::beans::PropertyValues > maHandles;
56 	std::vector< rtl::OUString > maEquations;
57 	std::vector< rtl::OUString > maEquationNames;
58 
59 public:
60 
61 	TYPEINFO();
62 
63 	XMLEnhancedCustomShapeContext( SvXMLImport& rImport, ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > &, sal_uInt16 nPrefix,
64 		const ::rtl::OUString& rLocalName, std::vector< com::sun::star::beans::PropertyValue >& rCustomShapeGeometry );
65 
66 	virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
67 	virtual void EndElement();
68 
69 	SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
70 		const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
71 };
72 
73 #endif
74