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
44
#include "
MSKParser.hxx
"
45
46
class
MWAWHeader
;
47
class
MWAWSubDocument
;
48
typedef
shared_ptr<MWAWSubDocument>
MWAWSubDocumentPtr
;
49
50
class
MSK4Parser
;
51
class
MSK4Text
;
52
class
MSKGraph
;
53
54
namespace
MSK4ZoneInternal
55
{
56
struct
State;
57
}
58
namespace
MSK4ParserInternal
59
{
60
class
SubDocument;
61
}
62
80
class
MSK4Zone
:
public
MSKParser
81
{
82
friend
class
MSK4ParserInternal::SubDocument
;
83
friend
class
MSK4Parser
;
84
friend
class
MSKGraph
;
85
friend
class
MSK4Text
;
86
87
public
:
89
MSK4Zone
(
MWAWInputStreamPtr
input,
MWAWParserStatePtr
parserState,
90
MSK4Parser
&parser, std::string
const
&oleName);
92
~MSK4Zone
();
93
94
protected
:
96
void
init
();
97
102
bool
parseHeaderIndex
(
MWAWInputStreamPtr
&input);
103
105
bool
parseHeaderIndexEntry
(
MWAWInputStreamPtr
&input);
106
108
bool
createZones
(
bool
mainOle);
109
113
void
readContentZones
(
MWAWEntry
const
&entry,
bool
mainOle);
114
116
MWAWContentListenerPtr
createListener
117
(WPXDocumentInterface *interface,
118
MWAWSubDocumentPtr
&header,
MWAWSubDocumentPtr
&footer);
119
121
double
getTextHeight
()
const
;
122
124
Vec2f
getPageTopLeft
()
const
;
125
127
void
newPage
(
int
number);
128
132
void
sendFootNote
(
int
id
);
134
void
readFootNote
(
int
id
);
135
137
void
sendFrameText
(
MWAWEntry
const
&entry, std::string
const
&frame);
138
140
void
sendRBIL
(
int
id
,
Vec2i
const
&sz);
141
143
void
sendOLE
(
int
id
,
MWAWPosition
const
&pos, WPXPropertyList frameExtras);
144
146
MWAWEntry
getTextPosition
()
const
;
147
149
void
parse
(WPXDocumentInterface *) {
150
MWAW_DEBUG_MSG
((
"MSK4Zone::parse: must not be called\n"
));
151
}
153
bool
checkHeader
(
MWAWHeader
*,
bool
) {
154
MWAW_DEBUG_MSG
((
"MSK4Zone::checkHeader: must not be called\n"
));
155
return
false
;
156
}
157
158
//
159
// low level
160
//
161
163
bool
readPRNT
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry,
MWAWPageSpan
&page);
164
168
bool
readDOP
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry,
MWAWPageSpan
&page);
169
173
bool
readFRAM
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
174
178
bool
readRLRB
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
179
183
bool
readSELN
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
184
186
void
setAscii
(std::string
const
&oleName);
187
188
private
:
189
MSK4Zone
(
MSK4Zone
const
&orig);
190
MSK4Zone
&
operator=
(
MSK4Zone
const
&orig);
191
protected
:
192
//
193
// data
194
//
195
197
MSK4Parser
*
m_mainParser
;
198
200
shared_ptr<MSK4ZoneInternal::State>
m_state
;
201
203
std::multimap<std::string, MWAWEntry>
m_entryMap
;
204
206
shared_ptr<MSK4Text>
m_textParser
;
207
209
shared_ptr<MSKGraph>
m_graphParser
;
210
};
211
#endif
212
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Generated on Wed May 22 2013 18:12:37 for libmwaw by
doxygen
1.8.1.2