MRWText.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33 
34 /*
35  * Parser to Mariner Write text document
36  *
37  */
38 #ifndef MRW_TEXT
39 # define MRW_TEXT
40 
41 #include "libmwaw_internal.hxx"
42 #include "MWAWDebug.hxx"
43 
44 class MWAWEntry;
45 class MWAWFont;
47 typedef shared_ptr<MWAWParserState> MWAWParserStatePtr;
48 class MWAWSubDocument;
49 
50 namespace MRWTextInternal
51 {
52 struct Paragraph;
53 struct State;
54 struct Table;
55 struct Zone;
56 }
57 
58 struct MRWEntry;
59 class MRWParser;
60 
66 class MRWText
67 {
68  friend class MRWParser;
69 public:
71  MRWText(MRWParser &parser);
73  virtual ~MRWText();
74 
76  int version() const;
77 
79  int numPages() const;
80 
81 protected:
83  void setProperty(MRWTextInternal::Paragraph const &ruler);
84 
86  void flushExtra();
87 
88  //
89  // intermediate level
90  //
92  bool send(int zoneId);
94  bool send(MRWTextInternal::Zone const &zone, MWAWEntry const &entry);
95 
97  bool findTableStructure(MRWTextInternal::Table &table, MWAWEntry const &entry);
99  bool sendTable(MRWTextInternal::Table &table);
101  bool readTextStruct(MRWEntry const &entry, int zoneId);
103  bool readZone(MRWEntry const &entry, int zoneId);
105  int computeNumPages(MRWTextInternal::Zone const &zone) const;
107  bool readFonts(MRWEntry const &entry, int zoneId);
108 
110  bool readFontNames(MRWEntry const &entry, int zoneId);
111 
113  bool readRulers(MRWEntry const &entry, int zoneId);
114 
116  bool readPLCZone(MRWEntry const &entry, int zoneId);
117 
119  bool readStyleNames(MRWEntry const &entry, int zoneId);
120 
121 private:
122  MRWText(MRWText const &orig);
123  MRWText &operator=(MRWText const &orig);
124 
125 protected:
126  //
127  // data
128  //
131 
133  shared_ptr<MRWTextInternal::State> m_state;
134 
137 };
138 #endif
139 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:

Generated on Tue Apr 30 2013 06:31:11 for libmwaw by doxygen 1.8.3.1