Main Page
Namespaces
Classes
Files
File List
File Members
MWAWOLEParser.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
* freely inspired from istorage :
36
* ------------------------------------------------------------
37
* Generic OLE Zones furnished with a copy of the file header
38
*
39
* Compound Storage (32 bit version)
40
* Storage implementation
41
*
42
* This file contains the compound file implementation
43
* of the storage interface.
44
*
45
* Copyright 1999 Francis Beaudet
46
* Copyright 1999 Sylvain St-Germain
47
* Copyright 1999 Thuy Nguyen
48
* Copyright 2005 Mike McCormack
49
*
50
* This library is free software; you can redistribute it and/or
51
* modify it under the terms of the GNU Lesser General Public
52
* License as published by the Free Software Foundation; either
53
* version 2.1 of the License, or (at your option) any later version.
54
*
55
* This library is distributed in the hope that it will be useful,
56
* but WITHOUT ANY WARRANTY; without even the implied warranty of
57
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
58
* Lesser General Public License for more details.
59
*
60
* ------------------------------------------------------------
61
*/
62
63
#ifndef MWAW_OLE_PARSER_H
64
#define MWAW_OLE_PARSER_H
65
66
#include <string>
67
#include <vector>
68
69
#include <libwpd-stream/libwpd-stream.h>
70
71
#include "
libmwaw_internal.hxx
"
72
#include "
MWAWInputStream.hxx
"
73
74
#include "
MWAWDebug.hxx
"
75
76
class
WPXBinaryData;
77
78
namespace
MWAWOLEParserInternal
79
{
80
class
CompObj;
81
}
82
86
class
MWAWOLEParser
87
{
88
public
:
91
MWAWOLEParser
(std::string mainName);
92
94
~MWAWOLEParser
();
95
98
bool
parse
(
MWAWInputStreamPtr
fileInput);
99
101
std::vector<std::string>
const
&
getNotParse
()
const
{
102
return
m_unknownOLEs
;
103
}
104
106
std::vector<int>
const
&
getObjectsId
()
const
{
107
return
m_objectsId
;
108
}
110
std::vector<MWAWPosition>
const
&
getObjectsPosition
()
const
{
111
return
m_objectsPosition
;
112
}
114
std::vector<WPXBinaryData>
const
&
getObjects
()
const
{
115
return
m_objects
;
116
}
118
std::vector<std::string>
const
&
getObjectsType
()
const
{
119
return
m_objectsType
;
120
}
121
123
bool
getObject
(
int
id
, WPXBinaryData &obj,
MWAWPosition
&pos, std::string &type)
const
;
124
128
void
setObject
(
int
id
, WPXBinaryData
const
&obj,
MWAWPosition
const
&pos,
129
std::string
const
&type);
130
131
protected
:
132
134
static
bool
readOle
(
MWAWInputStreamPtr
ip, std::string
const
&oleName,
135
libmwaw::DebugFile
&ascii);
137
static
bool
readMM
(
MWAWInputStreamPtr
input, std::string
const
&oleName,
138
libmwaw::DebugFile
&ascii);
140
static
bool
readObjInfo
(
MWAWInputStreamPtr
input, std::string
const
&oleName,
141
libmwaw::DebugFile
&ascii);
143
bool
readCompObj
(
MWAWInputStreamPtr
ip, std::string
const
&oleName,
144
libmwaw::DebugFile
&ascii);
145
147
static
bool
isOlePres
(
MWAWInputStreamPtr
ip, std::string
const
&oleName);
149
static
bool
readOlePres
(
MWAWInputStreamPtr
ip, WPXBinaryData &data,
MWAWPosition
&pos,
150
libmwaw::DebugFile
&ascii);
151
153
static
bool
isOle10Native
(
MWAWInputStreamPtr
ip, std::string
const
&oleName);
155
static
bool
readOle10Native
(
MWAWInputStreamPtr
ip, WPXBinaryData &data,
156
libmwaw::DebugFile
&ascii);
157
161
bool
readContents
(
MWAWInputStreamPtr
input, std::string
const
&oleName,
162
WPXBinaryData &pict,
MWAWPosition
&pos,
libmwaw::DebugFile
&ascii);
163
169
bool
readCONTENTS
(
MWAWInputStreamPtr
input, std::string
const
&oleName,
170
WPXBinaryData &pict,
MWAWPosition
&pos,
libmwaw::DebugFile
&ascii);
171
172
174
std::string
m_avoidOLE
;
176
std::vector<std::string>
m_unknownOLEs
;
177
179
std::vector<WPXBinaryData>
m_objects
;
181
std::vector<MWAWPosition>
m_objectsPosition
;
183
std::vector<int>
m_objectsId
;
185
std::vector<std::string>
m_objectsType
;
186
188
shared_ptr<MWAWOLEParserInternal::CompObj>
m_compObjIdName
;
189
190
};
191
192
#endif
193
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Generated on Thu Apr 24 2014 14:47:42 for libmwaw by
doxygen
1.8.3.1