xref: /aoo41x/main/xmloff/source/draw/ximp3dscene.hxx (revision ecfe53c5)
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 _XIMP3DSCENE_HXX
25 #define _XIMP3DSCENE_HXX
26 
27 #include <xmloff/xmlictxt.hxx>
28 #include "sdxmlimp_impl.hxx"
29 #include <xmloff/nmspmap.hxx>
30 #include <com/sun/star/drawing/XShapes.hpp>
31 #include <tools/rtti.hxx>
32 #include <tools/color.hxx>
33 #include <ximpshap.hxx>
34 
35 //////////////////////////////////////////////////////////////////////////////
36 // dr3d:3dscene context
37 
38 class SdXML3DSceneShapeContext : public SdXMLShapeContext, public SdXML3DSceneAttributesHelper
39 {
40 	// the shape group this group is working on
41 	// this is the scene at the same time
42 	com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxChilds;
43 
GetSdImport() const44 	const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
GetSdImport()45 	SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
46 
47 protected:
SetLocalShapesContext(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> & rNew)48 	void SetLocalShapesContext(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rNew)
49 		{ mxChilds = rNew; }
50 
51 public:
52 	TYPEINFO();
53 
54 	SdXML3DSceneShapeContext(
55 		SvXMLImport& rImport,
56 		sal_uInt16 nPrfx,
57 		const rtl::OUString& rLocalName,
58 		const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
59 		com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
60         sal_Bool bTemporaryShape);
61 	virtual ~SdXML3DSceneShapeContext();
62 
63 	virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
64 	virtual void EndElement();
65 
66 	virtual SvXMLImportContext *CreateChildContext(
67 		sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
68 		const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
69 
GetLocalShapesContext() const70 	const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext() const
71 		{ return mxShapes; }
GetLocalShapesContext()72 	com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext()
73 		{ return mxShapes; }
74 };
75 
76 
77 #endif	//  _XIMPGROUP_HXX
78