merge the formfield patch from ooo-build
[ooovba.git] / writerperfect / source / filter / Style.hxx
blobf7e2233e0b800c82853c4f0abadcde694bbe6e78
1 /* Style: A base class from which all other styles are inherited, includes
2 * a name.
4 * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * For further information visit http://libwpd.sourceforge.net
24 /* "This product is not manufactured, approved, or supported by
25 * Corel Corporation or Corel Corporation Limited."
28 #ifndef _STYLE_H
29 #define _STYLE_H
30 #if defined _MSC_VER
31 #pragma warning( push, 1 )
32 #endif
33 #include <libwpd/libwpd.h>
34 #if defined _MSC_VER
35 #pragma warning( pop )
36 #endif
37 #include "DocumentElement.hxx"
39 class TopLevelElementStyle
41 public:
42 TopLevelElementStyle() : mpsMasterPageName(NULL) { }
43 virtual ~TopLevelElementStyle() { if (mpsMasterPageName) delete mpsMasterPageName; }
44 void setMasterPageName(WPXString &sMasterPageName) { mpsMasterPageName = new WPXString(sMasterPageName); }
45 const WPXString * getMasterPageName() const { return mpsMasterPageName; }
47 private:
48 WPXString *mpsMasterPageName;
51 class Style
53 public:
54 Style(const WPXString &psName) : msName(psName) {}
55 virtual ~Style() {}
57 virtual void write(DocumentHandler * /* pHandler */) const {};
58 const WPXString &getName() const { return msName; }
60 private:
61 WPXString msName;
63 #endif