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: ximppage.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 ************************************************************************/
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 <com/sun/star/office/XAnnotationAccess.hpp>
39 #include <tools/rtti.hxx>
40 #include "ximpshap.hxx"
42 //////////////////////////////////////////////////////////////////////////////
43 // draw:g context (RECURSIVE)
45 class SdXMLGenericPageContext
: public SvXMLImportContext
47 // the shape group this group is working on
48 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShapes
> mxShapes
;
49 ::com::sun::star::uno::Reference
< ::com::sun::star::office::XAnnotationAccess
> mxAnnotationAccess
;
52 rtl::OUString maPageLayoutName
;
53 rtl::OUString maUseHeaderDeclName
;
54 rtl::OUString maUseFooterDeclName
;
55 rtl::OUString maUseDateTimeDeclName
;
56 rtl::OUString msNavOrder
;
58 void SetLocalShapesContext(com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rNew
)
61 /** sets the page style on this page */
62 void SetStyle( rtl::OUString
& rStyleName
);
64 /** sets the presentation layout at this page. It is used for drawing pages and for the handout master */
67 /** deletes all shapes on this drawing page */
68 void DeleteAllShapes();
70 const SdXMLImport
& GetSdImport() const { return (const SdXMLImport
&)GetImport(); }
71 SdXMLImport
& GetSdImport() { return (SdXMLImport
&)GetImport(); }
73 /** sets the properties from a page master style with the given name on this contexts page */
74 void SetPageMaster( rtl::OUString
& rsPageMasterName
);
76 void SetNavigationOrder();
81 SdXMLGenericPageContext( SvXMLImport
& rImport
, USHORT nPrfx
, const rtl::OUString
& rLocalName
,
82 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
83 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
);
84 virtual ~SdXMLGenericPageContext();
86 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
87 virtual SvXMLImportContext
*CreateChildContext(
88 USHORT nPrefix
, const rtl::OUString
& rLocalName
,
89 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
90 virtual void EndElement();
92 const com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& GetLocalShapesContext() const
94 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& GetLocalShapesContext()
99 #endif // _XIMPGROUP_HXX