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
MSK4Parser
;
47
class
MSK4Text
;
48
class
MSKGraph
;
49
50
namespace
MSK4ZoneInternal
51
{
52
struct
State;
53
}
54
namespace
MSK4ParserInternal
55
{
56
class
SubDocument;
57
}
58
76
class
MSK4Zone
:
public
MSKParser
77
{
78
friend
class
MSK4ParserInternal::SubDocument
;
79
friend
class
MSK4Parser
;
80
friend
class
MSKGraph
;
81
friend
class
MSK4Text
;
82
83
public
:
85
MSK4Zone
(
MWAWInputStreamPtr
input,
MWAWParserStatePtr
parserState,
86
MSK4Parser
&parser, std::string
const
&oleName);
88
~MSK4Zone
();
89
90
protected
:
92
void
init
();
93
98
bool
parseHeaderIndex
(
MWAWInputStreamPtr
&input);
99
101
bool
parseHeaderIndexEntry
(
MWAWInputStreamPtr
&input);
102
104
bool
createZones
(
bool
mainOle);
105
109
void
readContentZones
(
MWAWEntry
const
&entry,
bool
mainOle);
110
112
MWAWContentListenerPtr
createListener
113
(WPXDocumentInterface *interface,
114
MWAWSubDocumentPtr
&header,
MWAWSubDocumentPtr
&footer);
115
117
double
getTextHeight
()
const
;
118
120
Vec2f
getPageTopLeft
()
const
;
121
123
void
newPage
(
int
number);
124
128
void
sendFootNote
(
int
id
);
130
void
readFootNote
(
int
id
);
131
133
void
sendFrameText
(
MWAWEntry
const
&entry, std::string
const
&frame);
134
136
void
sendRBIL
(
int
id
,
Vec2i
const
&sz);
137
139
void
sendOLE
(
int
id
,
MWAWPosition
const
&pos, WPXPropertyList frameExtras);
140
142
MWAWEntry
getTextPosition
()
const
;
143
145
void
parse
(WPXDocumentInterface *) {
146
MWAW_DEBUG_MSG
((
"MSK4Zone::parse: must not be called\n"
));
147
}
149
bool
checkHeader
(
MWAWHeader
*,
bool
) {
150
MWAW_DEBUG_MSG
((
"MSK4Zone::checkHeader: must not be called\n"
));
151
return
false
;
152
}
153
154
//
155
// low level
156
//
157
159
bool
readPRNT
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry,
MWAWPageSpan
&page);
160
164
bool
readDOP
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry,
MWAWPageSpan
&page);
165
169
bool
readFRAM
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
170
174
bool
readRLRB
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
175
179
bool
readSELN
(
MWAWInputStreamPtr
input,
MWAWEntry
const
&entry);
180
182
void
setAscii
(std::string
const
&oleName);
183
184
private
:
185
MSK4Zone
(
MSK4Zone
const
&orig);
186
MSK4Zone
&
operator=
(
MSK4Zone
const
&orig);
187
protected
:
188
//
189
// data
190
//
191
193
MSK4Parser
*
m_mainParser
;
194
196
shared_ptr<MSK4ZoneInternal::State>
m_state
;
197
199
std::multimap<std::string, MWAWEntry>
m_entryMap
;
200
202
shared_ptr<MSK4Text>
m_textParser
;
203
205
shared_ptr<MSKGraph>
m_graphParser
;
206
};
207
#endif
208
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Generated on Wed Jul 10 2013 18:15:29 for libmwaw by
doxygen
1.8.4