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: ximpcustomshape.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 ************************************************************************/
31 #ifndef _XMLOFF_XIMPCUSTOMSHAPE_HXX_
32 #define _XMLOFF_XIMPCUSTOMSHAPE_HXX_
34 #include <xmloff/xmlictxt.hxx>
35 #include <xmloff/xmluconv.hxx>
36 #include <rtl/ustring.hxx>
38 #include <com/sun/star/uno/Reference.h>
39 #include <com/sun/star/beans/PropertyValue.hpp>
40 #ifndef __com_sun_star_beans_PropertyValues_hpp__
41 #include <com/sun/star/beans/PropertyValues.hpp>
43 #include <com/sun/star/drawing/XShape.hpp>
44 #include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
46 namespace com
{ namespace sun
{ namespace star
{
47 namespace container
{ class XIndexContainer
; }
48 namespace beans
{ class XPropertySet
; }
49 namespace xml
{ namespace sax
{ class XAttributeList
; } }
52 class SdXMLCustomShapeContext
;
53 class XMLEnhancedCustomShapeContext
: public SvXMLImportContext
55 SvXMLUnitConverter
& mrUnitConverter
;
56 com::sun::star::uno::Reference
< com::sun::star::drawing::XShape
>& mrxShape
;
57 std::vector
< com::sun::star::beans::PropertyValue
>& mrCustomShapeGeometry
;
59 std::vector
< com::sun::star::beans::PropertyValue
> maExtrusion
;
60 std::vector
< com::sun::star::beans::PropertyValue
> maPath
;
61 std::vector
< com::sun::star::beans::PropertyValue
> maTextPath
;
62 std::vector
< com::sun::star::beans::PropertyValues
> maHandles
;
63 std::vector
< rtl::OUString
> maEquations
;
64 std::vector
< rtl::OUString
> maEquationNames
;
70 XMLEnhancedCustomShapeContext( SvXMLImport
& rImport
, ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> &, sal_uInt16 nPrefix
,
71 const ::rtl::OUString
& rLocalName
, std::vector
< com::sun::star::beans::PropertyValue
>& rCustomShapeGeometry
);
73 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
74 virtual void EndElement();
76 SvXMLImportContext
*CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
77 const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);