Main Page
Namespaces
Classes
Files
File List
File Members
MSK4Zone.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
#ifndef MSK4_ZONE
35
# define MSK4_ZONE
36
37
#include <map>
38
#include <string>
39
40
#include "
MWAWDebug.hxx
"
41
#include "
MWAWEntry.hxx
"
42
#include "
MWAWInputStream.hxx
"
43
#include "
MWAWPageSpan.hxx
"
44
45
#include "
MSKParser.hxx
"
46
47
class
MWAWHeader
;
48
class
MWAWSubDocument
;
49
typedef
shared_ptr<MWAWSubDocument>
MWAWSubDocumentPtr
;
50
51
class
MSK4Parser
;
52
class
MSK4Text
;
53
class
MSKGraph
;
54
55
namespace
MSK4ZoneInternal
56
{
57
struct
State;
58
}
59
namespace
MSK4ParserInternal
60
{
61
class
SubDocument;
62
}
63
81
class
MSK4Zone
:
public
MSKParser
82
{
83
friend
class
MSK4ParserInternal::SubDocument
;
84
friend
class
MSK4Parser
;
85
friend
class
MSKGraph
;
86
friend
class
MSK4Text
;
87
88
public
:
90
MSK4Zone
(
MWAWInputStreamPtr
input,
MWAWParserStatePtr
parserState,
91
MSK4Parser
&parser, std::string
const
&oleName);
93
~MSK4Zone
();
94
95
protected
:
97
void
init
();
98
103
bool
parseHeaderIndex
(
MWAWInputStreamPtr
&input);
104
106
bool
parseHeaderIndexEntry
(
MWAWInputStreamPtr
&input);
107
109
bool
createZones
(
bool
mainOle);
110
114
void
readContentZones
(
MWAWEntry
const
&entry,
bool
mainOle);
115
117
MWAWContentListenerPtr
createListener
118
(WPXDocumentInterface *interface,
119
MWAWSubDocumentPtr
&header,
MWAWSubDocumentPtr
&footer);
120
122
float
pageHeight
()
const
;
124
float
pageWidth
()
const
;
125
127
Vec2f
getPageTopLeft
()
const
;
128
130
void
newPage
(
int
number);
131
135
void
sendFootNote
(
int
id
);
137
void
readFootNote
(
int
id
);
138
140
void
sendFrameText
(
MWAWEntry
const
&entry, std::string
const
&frame);
141
143
void
sendRBIL
(
int
id
,
Vec2i
const
&sz);
144
146
void
sendOLE
(
int
id
,
MWAWPosition
const
&pos, WPXPropertyList frameExtras);
147
149
MWAWEntry
getTextPosition
()
const
;
150
152
void
parse
(WPXDocumentInterface *) {
153
MWAW_DEBUG_MSG
((
"MSK4Zone::parse: must not be called\n"
));
154
}
155
156
//
157
// low level
158
//
159
161
bool
readPRNT
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry,
MWAWPageSpan
&page);
162
166
bool
readDOP
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry,
MWAWPageSpan
&page);
167
171
bool
readFRAM
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
172
176
bool
readRLRB
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
177
181
bool
readSELN
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
182
184
void
setAscii
(std::string
const
&oleName);
185
186
private
:
187
MSK4Zone
(
MSK4Zone
const
&orig);
188
MSK4Zone
&
operator=
(
MSK4Zone
const
&orig);
189
protected
:
190
//
191
// data
192
//
193
195
MSK4Parser
*
m_mainParser
;
196
198
shared_ptr<MSK4ZoneInternal::State>
m_state
;
199
201
std::multimap<std::string, MWAWEntry>
m_entryMap
;
202
204
MWAWPageSpan
m_pageSpan
;
205
207
shared_ptr<MSK4Text>
m_textParser
;
208
210
shared_ptr<MSKGraph>
m_graphParser
;
211
};
212
#endif
213
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Generated on Sat May 4 2013 11:47:11 for libmwaw by
doxygen
1.8.3.1