1 /*
2 * This file is part of the KDE project
3 *
4 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
5 *
6 * Contact: Amit Aggarwal <amit.5.aggarwal@nokia.com>
7 *
8 * Copyright (C) 2007-2009 Thorsten Zachmann <zachmann@kde.org>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 * 02110-1301 USA
24 *
25 */
26 
27 #ifndef PRESENTATION_VARIABLE_H
28 #define PRESENTATION_VARIABLE_H
29 
30 #include <KoVariable.h>
31 
32 #include <KPrDeclarations.h>
33 
34 /**
35  * This is a PresentationVariable for document declaration.
36  * Ex: - Footer, Header, Date-time etc
37  */
38 class PresentationVariable : public KoVariable
39 {
40 public:
41     /**
42      * Constructor.
43      */
44     PresentationVariable();
45 
46     void setProperties(const KoProperties *props) override;
47 
48     ///reimplemented
49     void saveOdf(KoShapeSavingContext &context) override;
50 
51     ///reimplemented
52     bool loadOdf(const KoXmlElement &element, KoShapeLoadingContext &context) override;
53 
54 private:
55     void resize(const QTextDocument *document, QTextInlineObject &object, int posInDocument, const QTextCharFormat &format, QPaintDevice *pd) override;
56 
57     KPrDeclarations::Type m_type;
58 };
59 
60 #endif
61 
62