Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef _XIMPPAGE_HXX
21 : : #define _XIMPPAGE_HXX
22 : :
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"
30 : :
31 : : //////////////////////////////////////////////////////////////////////////////
32 : : // draw:g context (RECURSIVE)
33 : :
34 : : class SdXMLGenericPageContext : public SvXMLImportContext
35 : : {
36 : : // the shape group this group is working on
37 : : ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxShapes;
38 : : ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotationAccess > mxAnnotationAccess;
39 : :
40 : : protected:
41 : : rtl::OUString maPageLayoutName;
42 : : rtl::OUString maUseHeaderDeclName;
43 : : rtl::OUString maUseFooterDeclName;
44 : : rtl::OUString maUseDateTimeDeclName;
45 : : rtl::OUString msNavOrder;
46 : :
47 : : void SetLocalShapesContext(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rNew)
48 : : { mxShapes = rNew; }
49 : :
50 : : /** sets the page style on this page */
51 : : void SetStyle( rtl::OUString& rStyleName );
52 : :
53 : : /** sets the presentation layout at this page. It is used for drawing pages and for the handout master */
54 : : void SetLayout();
55 : :
56 : : /** deletes all shapes on this drawing page */
57 : : void DeleteAllShapes();
58 : :
59 : : const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
60 : 1406 : SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
61 : :
62 : : /** sets the properties from a page master style with the given name on this contexts page */
63 : : void SetPageMaster( rtl::OUString& rsPageMasterName );
64 : :
65 : : void SetNavigationOrder();
66 : :
67 : : public:
68 : : TYPEINFO();
69 : :
70 : : SdXMLGenericPageContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLocalName,
71 : : const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
72 : : com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
73 : : virtual ~SdXMLGenericPageContext();
74 : :
75 : : virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
76 : : virtual SvXMLImportContext *CreateChildContext(
77 : : sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
78 : : const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
79 : : virtual void EndElement();
80 : :
81 : : const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext() const
82 : : { return mxShapes; }
83 : 150 : com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext()
84 : 150 : { return mxShapes; }
85 : : };
86 : :
87 : :
88 : : #endif // _XIMPGROUP_HXX
89 : :
90 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|