MWAWDocument.hxx
Go to the documentation of this file.
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
/* libmwaw
* Version: MPL 2.0 / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
* Copyright (C) 2006, 2007 Andrew Ziem
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
*
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the LGPLv2+ are applicable
* instead of those above.
*/
#ifndef MWAWDOCUMENT_H
#define MWAWDOCUMENT_H
#ifdef _WINDLL
# ifdef BUILD_MWAW
# define MWAWLIB _declspec(dllexport)
# else
# define MWAWLIB _declspec(dllimport)
# endif
#else
# define MWAWLIB
#endif
#include <libwpd-stream/libwpd-stream.h>
enum MWAWConfidence { MWAW_CONFIDENCE_NONE=0, MWAW_CONFIDENCE_POOR, MWAW_CONFIDENCE_LIKELY, MWAW_CONFIDENCE_GOOD, MWAW_CONFIDENCE_EXCELLENT };
enum MWAWResult { MWAW_OK, MWAW_FILE_ACCESS_ERROR, MWAW_PARSE_ERROR, MWAW_OLE_ERROR, MWAW_UNKNOWN_ERROR };
class WPXDocumentInterface;
class WDBInterface;
class MWAWDocument
{
public:
enum DocumentType {
UNKNOWN, CW, FULLW, MINDW, MSWORD, MSWORKS, MW, MWPRO, NISUSW, WNOW, WPLUS,
HMAC, LWTEXT, MARIW, ZWRT, DM, ACT, ED, HMACJ, TEACH, TEDIT,
// added in 1.10 ...
BW, FRM, GW, MACD, MOCKP, MORE, PAGEMK, RGTIME, RSG, XP,
RESERVED1, RESERVED2, RESERVED3, RESERVED4, RESERVED5, RESERVED6, RESERVED7, RESERVED8,
RESERVED9
};
enum DocumentKind { K_UNKNOWN, K_TEXT, K_DRAW,
K_PAINT, K_PRESENTATION, K_SPREADSHEET, K_DATABASE
};
static MWAWLIB MWAWConfidence isFileFormatSupported(WPXInputStream *input, DocumentType &type, DocumentKind &kind);
static MWAWLIB MWAWResult parse(WPXInputStream *input, WPXDocumentInterface *documentInterface);
};
#endif /* MWAWDOCUMENT_H */
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAW_CONFIDENCE_POOR
Definition: MWAWDocument.hxx:51
MWAWDocument::MSWORKS
Definition: MWAWDocument.hxx:100
MWAW_CONFIDENCE_EXCELLENT
Definition: MWAWDocument.hxx:51
MWAWDocument::RSG
Definition: MWAWDocument.hxx:103
MWAWDocument::ZWRT
Definition: MWAWDocument.hxx:101
MWAW_CONFIDENCE_GOOD
Definition: MWAWDocument.hxx:51
MWAWDocument::MOCKP
Definition: MWAWDocument.hxx:103
MWAW_OK
Definition: MWAWDocument.hxx:53
MWAWDocument::XP
Definition: MWAWDocument.hxx:103
MWAWDocument::RESERVED4
Definition: MWAWDocument.hxx:104
MWAWDocument::FULLW
Definition: MWAWDocument.hxx:100
MWAWDocument
This class provides all the functions an application would need to parse Works documents.
Definition: MWAWDocument.hxx:62
MWAWDocument::MSWORD
Definition: MWAWDocument.hxx:100
MWAWDocument::RGTIME
Definition: MWAWDocument.hxx:103
MWAWDocument::K_PRESENTATION
Definition: MWAWDocument.hxx:110
MWAWResult
MWAWResult
enum which defines the result of the file parsing
Definition: MWAWDocument.hxx:53
MWAWDocument::ACT
Definition: MWAWDocument.hxx:101
MWAWDocument::RESERVED8
Definition: MWAWDocument.hxx:104
MWAWDocument::DocumentType
DocumentType
an enum to define the different type of document -ACT: Acta (v2 and Classic v1) -BW: BeagleWorks (v1...
Definition: MWAWDocument.hxx:99
MWAWDocument::CW
Definition: MWAWDocument.hxx:100
MWAWDocument::TEDIT
Definition: MWAWDocument.hxx:101
MWAWDocument::DocumentKind
DocumentKind
an enum to define the kind of document
Definition: MWAWDocument.hxx:109
MWAWDocument::WNOW
Definition: MWAWDocument.hxx:100
MWAWDocument::PAGEMK
Definition: MWAWDocument.hxx:103
MWAWDocument::RESERVED2
Definition: MWAWDocument.hxx:104
MWAW_CONFIDENCE_NONE
Definition: MWAWDocument.hxx:51
MWAWDocument::RESERVED6
Definition: MWAWDocument.hxx:104
MWAWDocument::UNKNOWN
Definition: MWAWDocument.hxx:100
MWAWDocument::MINDW
Definition: MWAWDocument.hxx:100
MWAWDocument::DM
Definition: MWAWDocument.hxx:101
MWAWDocument::NISUSW
Definition: MWAWDocument.hxx:100
MWAWDocument::FRM
Definition: MWAWDocument.hxx:103
MWAWDocument::MW
Definition: MWAWDocument.hxx:100
MWAWDocument::GW
Definition: MWAWDocument.hxx:103
MWAWDocument::RESERVED5
Definition: MWAWDocument.hxx:104
MWAWDocument::RESERVED7
Definition: MWAWDocument.hxx:104
MWAWDocument::WPLUS
Definition: MWAWDocument.hxx:100
MWAW_CONFIDENCE_LIKELY
Definition: MWAWDocument.hxx:51
MWAWDocument::RESERVED1
Definition: MWAWDocument.hxx:104
MWAWDocument::LWTEXT
Definition: MWAWDocument.hxx:101
MWAWLIB
#define MWAWLIB
Definition: MWAWDocument.hxx:44
MWAWDocument::MARIW
Definition: MWAWDocument.hxx:101
MWAW_PARSE_ERROR
Definition: MWAWDocument.hxx:53
MWAWDocument::parse
static MWAWLIB MWAWResult parse(WPXInputStream *input, WPXDocumentInterface *documentInterface)
Parses the input stream content.
Definition: MWAWDocument.cxx:204
MWAWDocument::TEACH
Definition: MWAWDocument.hxx:101
MWAWDocument::HMACJ
Definition: MWAWDocument.hxx:101
MWAWDocument::K_SPREADSHEET
Definition: MWAWDocument.hxx:110
MWAWDocument::K_UNKNOWN
Definition: MWAWDocument.hxx:109
MWAWDocument::K_DRAW
Definition: MWAWDocument.hxx:109
MWAWDocument::ED
Definition: MWAWDocument.hxx:101
MWAW_FILE_ACCESS_ERROR
Definition: MWAWDocument.hxx:53
MWAWDocument::K_DATABASE
Definition: MWAWDocument.hxx:110
MWAWDocument::BW
Definition: MWAWDocument.hxx:103
MWAWDocument::K_TEXT
Definition: MWAWDocument.hxx:109
MWAWDocument::HMAC
Definition: MWAWDocument.hxx:101
MWAWDocument::RESERVED9
Definition: MWAWDocument.hxx:105
MWAWDocument::MORE
Definition: MWAWDocument.hxx:103
MWAWDocument::MWPRO
Definition: MWAWDocument.hxx:100
MWAWConfidence
MWAWConfidence
enum which defines the confidence that a file format is supported
Definition: MWAWDocument.hxx:51
MWAWDocument::K_PAINT
Definition: MWAWDocument.hxx:110
MWAWDocument::MACD
Definition: MWAWDocument.hxx:103
MWAWDocument::isFileFormatSupported
static MWAWLIB MWAWConfidence isFileFormatSupported(WPXInputStream *input, DocumentType &type, DocumentKind &kind)
Analyzes the content of an input stream to see if it can be parsed.
Definition: MWAWDocument.cxx:112
MWAW_OLE_ERROR
Definition: MWAWDocument.hxx:53
MWAWDocument::RESERVED3
Definition: MWAWDocument.hxx:104
MWAW_UNKNOWN_ERROR
Definition: MWAWDocument.hxx:53