xref: /aoo41x/main/xmloff/source/draw/ximpgrp.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 _XIMPGROUP_HXX
25 #define _XIMPGROUP_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 "ximpshap.hxx"
33 
34 //////////////////////////////////////////////////////////////////////////////
35 // draw:g context (RECURSIVE)
36 
37 class SdXMLGroupShapeContext : public SdXMLShapeContext
38 {
39 	// the shape group this group is working on
40 	com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxChilds;
41 
42 protected:
SetLocalShapesContext(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> & rNew)43 	void SetLocalShapesContext(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rNew)
44 		{ mxShapes = rNew; }
45 
46 public:
47 	TYPEINFO();
48 
49 	SdXMLGroupShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLocalName,
50 		const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
51 		com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
52         sal_Bool bTemporaryShape);
53 	virtual ~SdXMLGroupShapeContext();
54 
55 	virtual SvXMLImportContext *CreateChildContext(
56 		sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
57 		const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
58 	virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
59 	virtual void EndElement();
60 
GetLocalShapesContext() const61 	const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext() const
62 		{ return mxShapes; }
GetLocalShapesContext()63 	com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext()
64 		{ return mxShapes; }
65 };
66 
67 
68 #endif	//  _XIMPGROUP_HXX
69