merge the formfield patch from ooo-build
[ooovba.git] / xmloff / source / draw / ximp3dobject.hxx
blob8b7f7a76ac9dae37327f34b98c86fcfaa666dace
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: ximp3dobject.hxx,v $
10 * $Revision: 1.9 $
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 _XIMP3DOBJECT_HXX
32 #define _XIMP3DOBJECT_HXX
34 #include <xmloff/xmlictxt.hxx>
35 #include "sdxmlimp_impl.hxx"
36 #include <xmloff/nmspmap.hxx>
37 #include <com/sun/star/drawing/XShapes.hpp>
38 #include <tools/rtti.hxx>
39 #include <com/sun/star/drawing/HomogenMatrix.hpp>
40 #include <com/sun/star/drawing/Direction3D.hpp>
41 #include <com/sun/star/drawing/Position3D.hpp>
42 #include "ximpshap.hxx"
44 //////////////////////////////////////////////////////////////////////////////
45 // common shape context
47 class SdXML3DObjectContext : public SdXMLShapeContext
49 protected:
50 // the shape group this object should be created inside
52 com::sun::star::drawing::HomogenMatrix mxHomMat;
53 BOOL mbSetTransform;
56 void SetStyle();
57 void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape);
59 public:
60 TYPEINFO();
62 SdXML3DObjectContext( SvXMLImport& rImport,
63 sal_uInt16 nPrfx,
64 const rtl::OUString& rLocalName,
65 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
66 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
67 sal_Bool bTemporaryShape);
68 virtual ~SdXML3DObjectContext();
70 virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
71 virtual void EndElement();
74 //////////////////////////////////////////////////////////////////////////////
75 // dr3d:3dcube context
77 class SdXML3DCubeObjectShapeContext : public SdXML3DObjectContext
79 ::basegfx::B3DVector maMinEdge;
80 ::basegfx::B3DVector maMaxEdge;
81 BOOL mbMinEdgeUsed;
82 BOOL mbMaxEdgeUsed;
84 public:
85 TYPEINFO();
87 SdXML3DCubeObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
88 const rtl::OUString& rLocalName,
89 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
90 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
91 sal_Bool bTemporaryShape);
92 virtual ~SdXML3DCubeObjectShapeContext();
94 virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
95 virtual void EndElement();
98 //////////////////////////////////////////////////////////////////////////////
99 // dr3d:3dsphere context
101 class SdXML3DSphereObjectShapeContext : public SdXML3DObjectContext
103 ::basegfx::B3DVector maCenter;
104 ::basegfx::B3DVector maSize;
105 BOOL mbCenterUsed;
106 BOOL mbSizeUsed;
108 public:
109 TYPEINFO();
111 SdXML3DSphereObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
112 const rtl::OUString& rLocalName,
113 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
114 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
115 sal_Bool bTemporaryShape);
116 virtual ~SdXML3DSphereObjectShapeContext();
118 virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
119 virtual void EndElement();
122 //////////////////////////////////////////////////////////////////////////////
123 // polygonbased context
125 class SdXML3DPolygonBasedShapeContext : public SdXML3DObjectContext
127 rtl::OUString maPoints;
128 rtl::OUString maViewBox;
130 public:
131 TYPEINFO();
133 SdXML3DPolygonBasedShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
134 const rtl::OUString& rLocalName,
135 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
136 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
137 sal_Bool bTemporaryShape);
138 virtual ~SdXML3DPolygonBasedShapeContext();
140 virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
141 virtual void EndElement();
144 //////////////////////////////////////////////////////////////////////////////
145 // dr3d:3dlathe context
147 class SdXML3DLatheObjectShapeContext : public SdXML3DPolygonBasedShapeContext
149 public:
150 TYPEINFO();
152 SdXML3DLatheObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
153 const rtl::OUString& rLocalName,
154 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
155 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
156 sal_Bool bTemporaryShape);
157 virtual ~SdXML3DLatheObjectShapeContext();
159 virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
160 virtual void EndElement();
163 //////////////////////////////////////////////////////////////////////////////
164 // dr3d:3dextrude context
166 class SdXML3DExtrudeObjectShapeContext : public SdXML3DPolygonBasedShapeContext
168 public:
169 TYPEINFO();
171 SdXML3DExtrudeObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
172 const rtl::OUString& rLocalName,
173 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
174 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
175 sal_Bool bTemporaryShape);
176 virtual ~SdXML3DExtrudeObjectShapeContext();
178 virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
179 virtual void EndElement();
182 #endif // _XIMP3DOBJECT_HXX