WPDocument.h   WPDocument.h 
skipping to change at line 29 skipping to change at line 29
* For further information visit http://libwpd.sourceforge.net * For further information visit http://libwpd.sourceforge.net
*/ */
/* "This product is not manufactured, approved, or supported by /* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited." * Corel Corporation or Corel Corporation Limited."
*/ */
#ifndef WPDOCUMENT_H #ifndef WPDOCUMENT_H
#define WPDOCUMENT_H #define WPDOCUMENT_H
#include "WPXStream.h"
/* The "WPD_CONFIDENCE_NONE=0" must not be removed for the type detection t o work well */ /* The "WPD_CONFIDENCE_NONE=0" must not be removed for the type detection t o work well */
enum WPDConfidence { WPD_CONFIDENCE_NONE=0, WPD_CONFIDENCE_POOR, WPD_CONFID enum WPDConfidence { WPD_CONFIDENCE_NONE=0, WPD_CONFIDENCE_UNSUPPORTED_ENCR
ENCE_LIKELY, WPD_CONFIDENCE_GOOD, WPD_CONFIDENCE_EXCELLENT }; YPTION, WPD_CONFIDENCE_SUPPORTED_ENCRYPTION, WPD_CONFIDENCE_EXCELLENT };
enum WPDResult { WPD_OK, WPD_FILE_ACCESS_ERROR, WPD_PARSE_ERROR, WPD_UNSUPP enum WPDResult { WPD_OK, WPD_FILE_ACCESS_ERROR, WPD_PARSE_ERROR, WPD_UNSUPP
ORTED_ENCRYPTION_ERROR, WPD_OLE_ERROR, WPD_UNKNOWN_ERROR }; ORTED_ENCRYPTION_ERROR, WPD_PASSWORD_MISSMATCH_ERROR, WPD_OLE_ERROR, WPD_UN
KNOWN_ERROR };
enum WPDPasswordMatch { WPD_PASSWORD_MATCH_NONE, WPD_PASSWORD_MATCH_DONTKNO
W, WPD_PASSWORD_MATCH_OK };
enum WPDFileFormat { WPD_FILE_FORMAT_WP6, WPD_FILE_FORMAT_WP5, WPD_FILE_FOR
MAT_WP42, WPD_FILE_FORMAT_WP3, WPD_FILE_FORMAT_WP1, WPD_FILE_FORMAT_UNKNOWN
};
class WPXHLListenerImpl; class WPXDocumentInterface;
class WPXInputStream;
/** /**
This class provides all the functions an application would need to parse This class provides all the functions an application would need to parse
WordPerfect documents. WordPerfect documents.
*/ */
class WPDocument class WPDocument
{ {
public: public:
static WPDConfidence isFileFormatSupported(WPXInputStream *input, bo static WPDConfidence isFileFormatSupported(WPXInputStream *input);
ol partialContent); static WPDPasswordMatch verifyPassword(WPXInputStream *input, const
static WPDResult parse(WPXInputStream *input, WPXHLListenerImpl *lis char *password);
tenerImpl); static WPDResult parse(WPXInputStream *input, WPXDocumentInterface *
documentInterface, const char *password);
static WPDResult parseSubDocument(WPXInputStream *input, WPXDocument
Interface *documentInterface, WPDFileFormat fileFormat);
}; };
#endif /* WPDOCUMENT_H */ #endif /* WPDOCUMENT_H */
 End of changes. 4 change blocks. 
11 lines changed or deleted 19 lines changed or added


 WPXProperty.h   WPXProperty.h 
skipping to change at line 30 skipping to change at line 30
*/ */
/* "This product is not manufactured, approved, or supported by /* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited." * Corel Corporation or Corel Corporation Limited."
*/ */
#ifndef WPXPROPERTY_H #ifndef WPXPROPERTY_H
#define WPXPROPERTY_H #define WPXPROPERTY_H
#include "WPXString.h" #include "WPXString.h"
enum WPXUnit { INCH, PERCENT, POINT, TWIP }; enum WPXUnit { WPX_INCH, WPX_PERCENT, WPX_POINT, WPX_TWIP, WPX_GENERIC };
class WPXProperty class WPXProperty
{ {
public: public:
virtual ~WPXProperty(); virtual ~WPXProperty();
virtual int getInt() const = 0; virtual int getInt() const = 0;
virtual float getFloat() const = 0; virtual double getDouble() const = 0;
virtual WPXString getStr() const = 0; virtual WPXString getStr() const = 0;
virtual WPXProperty * clone() const = 0; virtual WPXProperty * clone() const = 0;
}; };
class WPXPropertyFactory class WPXPropertyFactory
{ {
public: public:
static WPXProperty * newStringProp(const WPXString &str); static WPXProperty * newStringProp(const WPXString &str);
static WPXProperty * newStringProp(const char *str); static WPXProperty * newStringProp(const char *str);
static WPXProperty * newIntProp(const int val); static WPXProperty * newIntProp(const int val);
static WPXProperty * newBoolProp(const bool val); static WPXProperty * newBoolProp(const bool val);
static WPXProperty * newInchProp(const float val); static WPXProperty * newDoubleProp(const double val);
static WPXProperty * newPercentProp(const float val); static WPXProperty * newInchProp(const double val);
static WPXProperty * newPointProp(const float val); static WPXProperty * newPercentProp(const double val);
static WPXProperty * newTwipProp(const float val); static WPXProperty * newPointProp(const double val);
static WPXProperty * newTwipProp(const double val);
}; };
#endif /* WPXPROPERTY_H */ #endif /* WPXPROPERTY_H */
 End of changes. 3 change blocks. 
6 lines changed or deleted 7 lines changed or added


 WPXPropertyList.h   WPXPropertyList.h 
skipping to change at line 48 skipping to change at line 48
{ {
public: public:
WPXPropertyList(); WPXPropertyList();
WPXPropertyList(const WPXPropertyList &); WPXPropertyList(const WPXPropertyList &);
virtual ~WPXPropertyList(); virtual ~WPXPropertyList();
void insert(const char * name, WPXProperty *prop); void insert(const char * name, WPXProperty *prop);
void insert(const char * name, const char *val); void insert(const char * name, const char *val);
void insert(const char * name, const int val); void insert(const char * name, const int val);
void insert(const char * name, const bool val); void insert(const char * name, const bool val);
void insert(const char * name, const WPXString &val); void insert(const char * name, const WPXString &val);
void insert(const char * name, const float val, const WPXUnit units = INCH); void insert(const char * name, const double val, const WPXUnit units = WPX_INCH);
void remove(const char * name); void remove(const char * name);
const WPXProperty * operator[](const char *name) const; const WPXProperty * operator[](const char *name) const;
const WPXPropertyList& operator=(const WPXPropertyList& propList); const WPXPropertyList& operator=(const WPXPropertyList& propList);
void clear(); void clear();
class Iter class Iter
{ {
public: public:
Iter(const WPXPropertyList &propList); Iter(const WPXPropertyList &propList);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 WPXPropertyListVector.h   WPXPropertyListVector.h 
skipping to change at line 29 skipping to change at line 29
* *
* For further information visit http://libwpd.sourceforge.net * For further information visit http://libwpd.sourceforge.net
*/ */
/* "This product is not manufactured, approved, or supported by /* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited." * Corel Corporation or Corel Corporation Limited."
*/ */
#ifndef WPXPROPERTYLISTVECTOR_H #ifndef WPXPROPERTYLISTVECTOR_H
#define WPXPROPERTYLISTVECTOR_H #define WPXPROPERTYLISTVECTOR_H
#include <sys/types.h>
class WPXPropertyList; #include "WPXPropertyList.h"
class WPXPropertyListVectorImpl; class WPXPropertyListVectorImpl;
class WPXPropertyListVectorIterImpl; class WPXPropertyListVectorIterImpl;
// NOTE: this class is meant to be used in libwpd's headers (to work around
symbol problems
// when different versions of the STL are in use), and should not be used i
nside your application
// (it will only slow it down with a pointless layer of abstraction)
class WPXPropertyListVector class WPXPropertyListVector
{ {
public: public:
WPXPropertyListVector(const WPXPropertyListVector &); WPXPropertyListVector(const WPXPropertyListVector &);
WPXPropertyListVector(); WPXPropertyListVector();
virtual ~WPXPropertyListVector(); virtual ~WPXPropertyListVector();
virtual void append(const WPXPropertyList &elem); void append(const WPXPropertyList &elem);
virtual size_t count() const; void append(const WPXPropertyListVector &vec);
unsigned long count() const;
const WPXPropertyList& operator[](unsigned long index) const;
WPXPropertyListVector& operator=(const WPXPropertyListVector& vect);
class Iter class Iter
{ {
public: public:
Iter(const WPXPropertyListVector &vect); Iter(const WPXPropertyListVector &vect);
virtual ~Iter(); virtual ~Iter();
void rewind(); void rewind();
bool next(); bool next();
bool last(); bool last();
const WPXPropertyList & operator()() const; const WPXPropertyList & operator()() const;
private: private:
WPXPropertyListVectorIterImpl *m_iterImpl; WPXPropertyListVectorIterImpl *m_iterImpl;
Iter(const Iter&); Iter(const Iter&);
Iter& operator=(const Iter&); Iter& operator=(const Iter&);
}; };
friend class WPXPropertyListVector::Iter;
friend class WPXPropertyListVector::Iter;
private: private:
WPXPropertyListVectorImpl *m_impl; WPXPropertyListVectorImpl *m_impl;
WPXPropertyListVector& operator=(WPXPropertyListVector&);
}; };
#endif /* WPXPROPERTYLISTVECTOR_H */ #endif /* WPXPROPERTYLISTVECTOR_H */
 End of changes. 10 change blocks. 
23 lines changed or deleted 19 lines changed or added


 WPXStream.h   WPXStream.h 
skipping to change at line 27 skipping to change at line 27
* *
* For further information visit http://libwpd.sourceforge.net * For further information visit http://libwpd.sourceforge.net
*/ */
/* "This product is not manufactured, approved, or supported by /* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited." * Corel Corporation or Corel Corporation Limited."
*/ */
#ifndef WPXSTREAM_H #ifndef WPXSTREAM_H
#define WPXSTREAM_H #define WPXSTREAM_H
#include <stdio.h>
#include "libwpd_types.h"
enum WPX_SEEK_TYPE enum WPX_SEEK_TYPE
{ {
WPX_SEEK_CUR, WPX_SEEK_CUR,
WPX_SEEK_SET WPX_SEEK_SET
}; };
class WPXInputStream class WPXInputStream
{ {
public: public:
WPXInputStream(bool supportsOLE) : WPXInputStream() {}
m_supportsOLE(supportsOLE) {}
virtual ~WPXInputStream() {} virtual ~WPXInputStream() {}
/** /**
Analyses the content of the input stream to see whether it is an OLE 2 storage. Analyses the content of the input stream to see whether it is an OLE 2 storage.
\return A boolean value that should be true if the input stream is a n OLE2 storage \return A boolean value that should be true if the input stream is a n OLE2 storage
and false if it is not the case and false if it is not the case
*/ */
virtual bool isOLEStream() = 0; virtual bool isOLEStream() = 0;
/** /**
Extracts a \c PerfectOffice_MAIN stream from an OLE2 storage. Extracts a \c PerfectOffice_MAIN stream from an OLE2 storage.
\return Should be a pointer to WPXInputStream constructed from the \ c PerfectOffice_MAIN stream if it exists. \return Should be a pointer to WPXInputStream constructed from the \ c PerfectOffice_MAIN stream if it exists.
\return Should be 0, if the \c PerfectOffice_MAIN stream does not ex ist inside the OLE2 storage \return Should be 0, if the \c PerfectOffice_MAIN stream does not ex ist inside the OLE2 storage
or if the input stream is not an OLE2 storage. or if the input stream is not an OLE2 storage.
*/ */
virtual WPXInputStream * getDocumentOLEStream() = 0; virtual WPXInputStream * getDocumentOLEStream(const char *name) = 0;
/** /**
Tries to read a given number of bytes starting from the current posi tion inside the input stream. Tries to read a given number of bytes starting from the current posi tion inside the input stream.
\param numBytes Number of bytes desired to be read. \param numBytes Number of bytes desired to be read.
\param numBytesRead Number of bytes that were possible to be read. \param numBytesRead Number of bytes that were possible to be read.
\return Should be a pointer to an array of numBytesRead bytes (uint8 _t[numBytesRead]). \return Should be a pointer to an array of numBytesRead bytes (unsig ned char[numBytesRead]).
\return Optionally it could be 0 if the desired number of bytes coul d not be read. \return Optionally it could be 0 if the desired number of bytes coul d not be read.
*/ */
const virtual uint8_t *read(size_t numBytes, size_t &numBytesRead) = 0; virtual const unsigned char *read(unsigned long numBytes, unsigned l ong &numBytesRead) = 0;
/** /**
Moves to the next location inside the input stream. Moves to the next location inside the input stream.
\param offset The offset of the location inside the input stream to move to. \param offset The offset of the location inside the input stream to move to.
It is relative either to the current position or to the beginning of the input stream It is relative either to the current position or to the beginning of the input stream
depending on the value of the \c seekType parameter. depending on the value of the \c seekType parameter.
\param seekType Determines whether the \c offset is relative to the \param seekType Determines whether the \c offset is relative to the
beginning of the input stream (\c WPX_SEEK_SET) or to the current po sition (\c WPX_SEEK_CUR). beginning of the input stream (\c WPX_SEEK_SET) or to the current po sition (\c WPX_SEEK_CUR).
\return An integer value that should be 0 (zero) if the seek was suc cessful and any other value \return An integer value that should be 0 (zero) if the seek was suc cessful and any other value
if it failed (i.e. the requested \c offset is beyond the end of the input stream or before its beginning). if it failed (i.e. the requested \c offset is beyond the end of the input stream or before its beginning).
*/ */
skipping to change at line 87 skipping to change at line 84
Returns the actual position inside the input stream. Returns the actual position inside the input stream.
\return A long integer value that should correspond to the position of the next location to be read in the input stream. \return A long integer value that should correspond to the position of the next location to be read in the input stream.
*/ */
virtual long tell() = 0; virtual long tell() = 0;
/** /**
Determines whether the current position is at the end of the stream. Determines whether the current position is at the end of the stream.
\return A boolean value that should be true if the next location to be read in the input stream \return A boolean value that should be true if the next location to be read in the input stream
is beyond its end. In all other cases, it should be false. is beyond its end. In all other cases, it should be false.
*/ */
virtual bool atEOS() = 0; virtual bool atEOS() = 0;
private:
bool m_supportsOLE;
}; };
#endif #endif
 End of changes. 6 change blocks. 
10 lines changed or deleted 4 lines changed or added


 WPXStreamImplementation.h   WPXStreamImplementation.h 
skipping to change at line 35 skipping to change at line 35
#include "WPXStream.h" #include "WPXStream.h"
class WPXFileStreamPrivate; class WPXFileStreamPrivate;
class WPXFileStream: public WPXInputStream class WPXFileStream: public WPXInputStream
{ {
public: public:
explicit WPXFileStream(const char* filename); explicit WPXFileStream(const char* filename);
~WPXFileStream(); ~WPXFileStream();
const uint8_t *read(size_t numBytes, size_t &numBytesRead); const unsigned char *read(unsigned long numBytes, unsigned long &num BytesRead);
long tell(); long tell();
int seek(long offset, WPX_SEEK_TYPE seekType); int seek(long offset, WPX_SEEK_TYPE seekType);
bool atEOS(); bool atEOS();
bool isOLEStream(); bool isOLEStream();
WPXInputStream *getDocumentOLEStream(const char * name); WPXInputStream *getDocumentOLEStream(const char * name);
/* This method will be replaced by the above method in next release
cycle */
WPXInputStream *getDocumentOLEStream();
private: private:
WPXFileStreamPrivate* d; WPXFileStreamPrivate* d;
WPXFileStream(const WPXFileStream&); // copy is not allowed WPXFileStream(const WPXFileStream&); // copy is not allowed
WPXFileStream& operator=(const WPXFileStream&); // assignment is not allowed WPXFileStream& operator=(const WPXFileStream&); // assignment is not allowed
}; };
class WPXStringStreamPrivate; class WPXStringStreamPrivate;
class WPXStringStream: public WPXInputStream class WPXStringStream: public WPXInputStream
{ {
public: public:
WPXStringStream(const char *data, const unsigned int dataSize); WPXStringStream(const unsigned char *data, const unsigned int dataSi ze);
~WPXStringStream(); ~WPXStringStream();
const uint8_t *read(size_t numBytes, size_t &numBytesRead); const unsigned char *read(unsigned long numBytes, unsigned long &num BytesRead);
long tell(); long tell();
int seek(long offset, WPX_SEEK_TYPE seekType); int seek(long offset, WPX_SEEK_TYPE seekType);
bool atEOS(); bool atEOS();
bool isOLEStream(); bool isOLEStream();
WPXInputStream *getDocumentOLEStream(const char * name); WPXInputStream *getDocumentOLEStream(const char * name);
/* This method will be replaced by the above method in next release
cycle */
WPXInputStream *getDocumentOLEStream();
private: private:
WPXStringStreamPrivate* d; WPXStringStreamPrivate* d;
WPXStringStream(const WPXStringStream&); // copy is not allowed WPXStringStream(const WPXStringStream&); // copy is not allowed
WPXStringStream& operator=(const WPXStringStream&); // assignment is not allowed WPXStringStream& operator=(const WPXStringStream&); // assignment is not allowed
}; };
#endif // __WPXSTREAMIMPLEMENTATION_H__ #endif // __WPXSTREAMIMPLEMENTATION_H__
 End of changes. 5 change blocks. 
9 lines changed or deleted 3 lines changed or added


 WPXString.h   WPXString.h 
skipping to change at line 36 skipping to change at line 36
#ifndef WPXSTRING_H #ifndef WPXSTRING_H
#define WPXSTRING_H #define WPXSTRING_H
class WPXStringImpl; class WPXStringImpl;
class WPXString class WPXString
{ {
public: public:
WPXString(); WPXString();
WPXString(const WPXString &); WPXString(const WPXString &, bool escapeXML = false);
WPXString(const WPXString &, bool escapeXML);
WPXString(const char *str); WPXString(const char *str);
~WPXString(); ~WPXString();
const char * cstr() const; const char * cstr() const;
int len() const; int len() const;
void sprintf(const char *format, ...); void sprintf(const char *format, ...);
void append(const WPXString &s); void append(const WPXString &s);
void append(const char *s); void append(const char *s);
void append(const char c); void append(const char c);
void clear(); void clear();
WPXString& operator=(const WPXString &); WPXString& operator=(const WPXString &str);
bool operator==(const char *); WPXString& operator=(const char *s);
bool operator==(const WPXString &str); bool operator==(const char *s) const;
bool operator==(const WPXString &str) const;
bool operator!() const;
inline bool operator!=(const char *s) const { return !operator==(s);
}
inline bool operator!=(const WPXString &str) const { return !operato
r==(str); }
class Iter class Iter
{ {
public: public:
Iter(const WPXString &str); Iter(const WPXString &str);
virtual ~Iter(); virtual ~Iter();
void rewind(); void rewind();
bool next(); bool next();
bool last(); bool last();
const char * operator()() const; const char * operator()() const;
 End of changes. 2 change blocks. 
5 lines changed or deleted 10 lines changed or added


 libwpd.h   libwpd.h 
skipping to change at line 29 skipping to change at line 29
* For further information visit http://libwpd.sourceforge.net * For further information visit http://libwpd.sourceforge.net
*/ */
/* "This product is not manufactured, approved, or supported by /* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited." * Corel Corporation or Corel Corporation Limited."
*/ */
#ifndef LIBWPD_H #ifndef LIBWPD_H
#define LIBWPD_H #define LIBWPD_H
#include "WPXHLListenerImpl.h" #define LIBWPD_VERSION_MAJOR 0
#define LIBWPD_VERSION_MINOR 9
#define LIBWPD_VERSION_REVISION 0
#define LIBWPD_VERSION_STRING "0.9.0"
#include "WPXDocumentInterface.h"
#include "WPDocument.h" #include "WPDocument.h"
#endif /* LIBWPD_H */ #endif /* LIBWPD_H */
 End of changes. 1 change blocks. 
1 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/