update dev300-m58
[ooovba.git] / xmloff / source / draw / ximppage.hxx
blobe5c881673026ffaa5b5cfa32713094f635889a81
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: ximppage.hxx,v $
10 * $Revision: 1.10 $
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 _XIMPPAGE_HXX
32 #define _XIMPPAGE_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 "ximpshap.hxx"
41 //////////////////////////////////////////////////////////////////////////////
42 // draw:g context (RECURSIVE)
44 class SdXMLGenericPageContext : public SvXMLImportContext
46 // the shape group this group is working on
47 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes;
49 protected:
50 rtl::OUString maPageLayoutName;
51 rtl::OUString maUseHeaderDeclName;
52 rtl::OUString maUseFooterDeclName;
53 rtl::OUString maUseDateTimeDeclName;
54 rtl::OUString msNavOrder;
56 void SetLocalShapesContext(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rNew)
57 { mxShapes = rNew; }
59 /** sets the page style on this page */
60 void SetStyle( rtl::OUString& rStyleName );
62 /** sets the presentation layout at this page. It is used for drawing pages and for the handout master */
63 void SetLayout();
65 /** deletes all shapes on this drawing page */
66 void DeleteAllShapes();
68 const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
69 SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
71 /** sets the properties from a page master style with the given name on this contexts page */
72 void SetPageMaster( rtl::OUString& rsPageMasterName );
74 void SetNavigationOrder();
76 public:
77 TYPEINFO();
79 SdXMLGenericPageContext( SvXMLImport& rImport, USHORT nPrfx, const rtl::OUString& rLocalName,
80 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
81 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
82 virtual ~SdXMLGenericPageContext();
84 virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
85 virtual SvXMLImportContext *CreateChildContext(
86 USHORT nPrefix, const rtl::OUString& rLocalName,
87 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
88 virtual void EndElement();
90 const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext() const
91 { return mxShapes; }
92 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext()
93 { return mxShapes; }
97 #endif // _XIMPGROUP_HXX