Style.h
1/* Style: A base class from which all other styles are inherited, includes
2 * a name.
3 *
4 * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 * For further information visit http://libwpd.sourceforge.net
22 *
23 */
24
25/* "This product is not manufactured, approved, or supported by
26 * Corel Corporation or Corel Corporation Limited."
27 */
28
29#ifndef _STYLE_H
30#define _STYLE_H
31#include <libwpd/libwpd.h>
32#include "DocumentElement.h"
33
34#include <cstddef>
35
36class TopLevelElementStyle
37{
38public:
39 TopLevelElementStyle() : mpsMasterPageName(NULL) { }
40 virtual ~TopLevelElementStyle() { if (mpsMasterPageName) delete mpsMasterPageName; }
41 void setMasterPageName(_SH_String &sMasterPageName) { mpsMasterPageName = new _SH_String(sMasterPageName); }
42 const _SH_String * getMasterPageName() const { return mpsMasterPageName; }
43
44private:
45 _SH_String *mpsMasterPageName;
46};
47
48class Style
49{
50 public:
51 Style(const _SH_String &psName) : msName(psName) {}
52 virtual ~Style() {}
53
54 virtual void write(DocumentHandler &xHandler) const {};
55 const _SH_String &getName() const { return msName; }
56
57 private:
58 _SH_String msName;
59};
60#endif