1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_XMLOFF_SOURCE_DRAW_XIMPPAGE_HXX
21 #define INCLUDED_XMLOFF_SOURCE_DRAW_XIMPPAGE_HXX
23 #include <xmloff/xmlictxt.hxx>
24 #include "sdxmlimp_impl.hxx"
25 #include <xmloff/nmspmap.hxx>
26 #include <com/sun/star/drawing/XShapes.hpp>
27 #include <com/sun/star/office/XAnnotationAccess.hpp>
28 #include <tools/rtti.hxx>
29 #include "ximpshap.hxx"
31 // draw:g context (RECURSIVE)
33 class SdXMLGenericPageContext
: public SvXMLImportContext
35 // the shape group this group is working on
36 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShapes
> mxShapes
;
37 ::com::sun::star::uno::Reference
< ::com::sun::star::office::XAnnotationAccess
> mxAnnotationAccess
;
40 OUString maPageLayoutName
;
41 OUString maUseHeaderDeclName
;
42 OUString maUseFooterDeclName
;
43 OUString maUseDateTimeDeclName
;
46 void SetLocalShapesContext(com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rNew
)
49 /** sets the page style on this page */
50 void SetStyle( OUString
& rStyleName
);
52 /** sets the presentation layout at this page. It is used for drawing pages and for the handout master */
55 /** deletes all shapes on this drawing page */
56 void DeleteAllShapes();
58 const SdXMLImport
& GetSdImport() const { return static_cast<const SdXMLImport
&>(GetImport()); }
59 SdXMLImport
& GetSdImport() { return static_cast<SdXMLImport
&>(GetImport()); }
61 /** sets the properties from a page master style with the given name on this contexts page */
62 void SetPageMaster( OUString
& rsPageMasterName
);
64 void SetNavigationOrder();
69 SdXMLGenericPageContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
, const OUString
& rLocalName
,
70 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
71 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
);
72 virtual ~SdXMLGenericPageContext();
74 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
75 virtual SvXMLImportContext
*CreateChildContext(
76 sal_uInt16 nPrefix
, const OUString
& rLocalName
,
77 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
78 virtual void EndElement() SAL_OVERRIDE
;
80 const com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& GetLocalShapesContext() const
82 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& GetLocalShapesContext()
86 #endif // INCLUDED_XMLOFF_SOURCE_DRAW_XIMPPAGE_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */