xref: /AOO41X/main/writerperfect/source/filter/Style.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19  *
20  * For further information visit http://libwpd.sourceforge.net
21  *
22  */
23 
24 /* "This product is not manufactured, approved, or supported by
25  * Corel Corporation or Corel Corporation Limited."
26  */
27 
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"
38 
39 class TopLevelElementStyle
40 {
41 public:
TopLevelElementStyle()42     TopLevelElementStyle() : mpsMasterPageName(NULL) { }
~TopLevelElementStyle()43     virtual ~TopLevelElementStyle() { if (mpsMasterPageName) delete mpsMasterPageName; }
setMasterPageName(WPXString & sMasterPageName)44     void setMasterPageName(WPXString &sMasterPageName) { mpsMasterPageName = new WPXString(sMasterPageName); }
getMasterPageName() const45     const WPXString * getMasterPageName() const { return mpsMasterPageName; }
46 
47 private:
48     WPXString *mpsMasterPageName;
49 };
50 
51 class Style
52 {
53  public:
Style(const WPXString & psName)54     Style(const WPXString &psName) : msName(psName) {}
~Style()55     virtual ~Style() {}
56 
write(DocumentHandler *) const57     virtual void write(DocumentHandler * /* pHandler */) const {};
getName() const58     const WPXString &getName() const { return msName; }
59 
60  private:
61     WPXString msName;
62 };
63 #endif
64