WPSOLEObject.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Major Contributor(s):
10  * Copyright (C) 2009, 2011 Alonso Laurent (alonso@loria.fr)
11  * Copyright (C) 2006, 2007 Andrew Ziem
12  * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
13  * Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
14  * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
15  *
16  * For minor contributions see the git repository.
17  *
18  * Alternatively, the contents of this file may be used under the terms
19  * of the GNU Lesser General Public License Version 2.1 or later
20  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
21  * applicable instead of those above.
22  *
23  * For further information visit http://libwps.sourceforge.net
24  */
25 
26 /*
27  */
28 
29 #ifndef WPS_OLE_OBJECT_H
30 #define WPS_OLE_OBJECT_H
31 
32 #include <string>
33 
34 #include <librevenge-stream/librevenge-stream.h>
35 
36 #include "libwps_internal.h"
37 #include "libwps_tools_win.h"
38 
42 {
43 public:
46 
49 
51  static bool readMetafile(std::shared_ptr<WPSStream> stream, WPSEmbeddedObject &object,
52  long endPos=-1, bool strict=false);
54  static bool readOLE(std::shared_ptr<WPSStream> stream, WPSEmbeddedObject &object, long endPos=-1);
58  static bool readWMF(std::shared_ptr<WPSStream> stream, WPSEmbeddedObject &object,long endPos=-1);
59 
60 protected:
62  static bool readString(std::shared_ptr<WPSStream> stream, std::string &name, long endPos);
64  static bool checkIsWMF(std::shared_ptr<WPSStream> stream, long endPos);
65 
67  static bool readEmbeddedOLE(std::shared_ptr<WPSStream> stream, WPSEmbeddedObject &object, long endPos);
69  static bool readStaticOLE(std::shared_ptr<WPSStream> stream, WPSEmbeddedObject &object, long endPos);
70 };
71 
72 #endif
73 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSOLEObject.h
libwps::DebugStream::str
static std::string str()
Definition: WPSDebug.h:200
libwps::DebugFile::addPos
static void addPos(long)
Definition: WPSDebug.h:220
libwps::Debug::dumpFile
bool dumpFile(librevenge::RVNGBinaryData &, char const *)
Definition: WPSDebug.h:180
libwps
Definition: libwps_internal.cpp:38
WPSOLEObject::readStaticOLE
static bool readStaticOLE(std::shared_ptr< WPSStream > stream, WPSEmbeddedObject &object, long endPos)
try to read a static OLE: 0x0105 0000 0[35]00 ...
Definition: WPSOLEObject.cpp:265
libwps::DebugFile::skipZone
static void skipZone(long, long)
Definition: WPSDebug.h:226
WPSOLEObject::readMetafile
static bool readMetafile(std::shared_ptr< WPSStream > stream, WPSEmbeddedObject &object, long endPos=-1, bool strict=false)
try to read a metafile data
Definition: WPSOLEObject.cpp:43
Vec2f
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
libwps::readU32
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
WPSOLEObject::readOLE
static bool readOLE(std::shared_ptr< WPSStream > stream, WPSEmbeddedObject &object, long endPos=-1)
try to read a OLE: 0x0105 ...
Definition: WPSOLEObject.cpp:139
WPSOLEObject::readEmbeddedOLE
static bool readEmbeddedOLE(std::shared_ptr< WPSStream > stream, WPSEmbeddedObject &object, long endPos)
try to read a embedded OLE: 0x0105 0000 0200 ...
Definition: WPSOLEObject.cpp:190
libwps::read32
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
libwps::DebugFile::addNote
static void addNote(char const *)
Definition: WPSDebug.h:221
WPSOLEObject::readWMF
static bool readWMF(std::shared_ptr< WPSStream > stream, WPSEmbeddedObject &object, long endPos=-1)
try to read a wmf file: 0x0[12]00 0xXX00(with XX>=9)
Definition: WPSOLEObject.cpp:102
WPSEmbeddedObject
small class use to define a embedded object
Definition: libwps_internal.h:1076
libwps::DebugStream
Definition: WPSDebug.h:191
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
libwps_tools_win.h
libwps::readData
bool readData(RVNGInputStreamPtr &input, unsigned long size, librevenge::RVNGBinaryData &data)
try to read sz bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:332
libwps::readU16
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
libwps_tools_win::Language::name
std::string name(long id)
returns the name given Windows© id
Definition: libwps_tools_win.cpp:7332
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPSDebug.h
libwps::read16
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
WPSOLEObject
a class used to parse/retrieve an OLE object
Definition: WPSOLEObject.h:41
libwps_internal.h
WPSOLEObject::~WPSOLEObject
~WPSOLEObject()
destructor
Definition: WPSOLEObject.h:48
WPSStream.h
WPSOLEObject::readString
static bool readString(std::shared_ptr< WPSStream > stream, std::string &name, long endPos)
try to read a stream
Definition: WPSOLEObject.cpp:340
libwps::DebugFile
Definition: WPSDebug.h:207
WPSStringStream.h
WPSOLEObject::checkIsWMF
static bool checkIsWMF(std::shared_ptr< WPSStream > stream, long endPos)
check if a wmf header
Definition: WPSOLEObject.cpp:366
WPSOLEObject::WPSOLEObject
WPSOLEObject()
constructor knowing the file stream
Definition: WPSOLEObject.h:45

Generated on Sat Mar 21 2020 12:28:46 for libwps by doxygen 1.8.17