MWAWDocument Class Reference

This class provides all the functions needed by applications to parse many pre-MacOSX documents. More...

`#include <MWAWDocument.hxx>`

## Public Types
enum | Confidence { MWAW_C_NONE =0 , MWAW_C_UNSUPPORTED_ENCRYPTION , MWAW_C_SUPPORTED_ENCRYPTION , MWAW_C_EXCELLENT }
| an enum which defines if we have confidence that a file is supported More...
enum | Kind { MWAW_K_UNKNOWN =0 , MWAW_K_TEXT , MWAW_K_DRAW , MWAW_K_PAINT , MWAW_K_PRESENTATION , MWAW_K_SPREADSHEET , MWAW_K_DATABASE }
| an enum to define the kind of document More...
enum | Result { MWAW_R_OK =0 , MWAW_R_FILE_ACCESS_ERROR , MWAW_R_OLE_ERROR , MWAW_R_PARSE_ERROR , MWAW_R_PASSWORD_MISSMATCH_ERROR , MWAW_R_UNKNOWN_ERROR }
| an enum which defines the result of the file parsing More...
enum | Type { MWAW_T_UNKNOWN =0 , MWAW_T_ACTA , MWAW_T_ADOBEILLUSTRATOR , MWAW_T_BEAGLEWORKS , MWAW_T_CLARISRESOLVE , MWAW_T_CLARISWORKS , MWAW_T_DBASE , MWAW_T_DOCMAKER , MWAW_T_EDOC , MWAW_T_FAMILYTREEMAKER , MWAW_T_FILEMAKER , MWAW_T_FOXBASE , MWAW_T_FRAMEMAKER , MWAW_T_FULLIMPACT , MWAW_T_FULLPAINT , MWAW_T_FULLWRITE , MWAW_T_GREATWORKS , MWAW_T_HANMACWORDJ , MWAW_T_HANMACWORDK , MWAW_T_INFOGENIE , MWAW_T_KALEIDAGRAPH , MWAW_T_LIGHTWAYTEXT , MWAW_T_MACDOC , MWAW_T_MACDRAFT , MWAW_T_MACDRAW , MWAW_T_MACDRAWPRO , MWAW_T_MACPAINT , MWAW_T_MARINERWRITE , MWAW_T_MINDWRITE , MWAW_T_MORE , MWAW_T_MICROSOFTFILE , MWAW_T_MICROSOFTMULTIPLAN , MWAW_T_MICROSOFTWORD , MWAW_T_MICROSOFTWORKS , MWAW_T_MACWRITE , MWAW_T_MACWRITEPRO , MWAW_T_NISUSWRITER , MWAW_T_OVERVUE , MWAW_T_PAGEMAKER , MWAW_T_PIXELPAINT , MWAW_T_RAGTIME , MWAW_T_READYSETGO , MWAW_T_SUPERPAINT , MWAW_T_SYMPOSIUM , MWAW_T_TEACHTEXT , MWAW_T_TEXEDIT , MWAW_T_TRAPEZE , MWAW_T_WINGZ , MWAW_T_WRITENOW , MWAW_T_WRITERPLUS , MWAW_T_XPRESS , MWAW_T_ZWRITE , MWAW_T_4DIMENSION , MWAW_T_RESERVED1 , MWAW_T_RESERVED2 , MWAW_T_RESERVED3 , MWAW_T_RESERVED4 , MWAW_T_RESERVED5 , MWAW_T_RESERVED6 , MWAW_T_RESERVED7 , MWAW_T_RESERVED8 , MWAW_T_RESERVED9 , MWAW_T_RESERVED10 , MWAW_T_RESERVED11 , MWAW_T_RESERVED12 , MWAW_T_RESERVED13 , MWAW_T_RESERVED14 , MWAW_T_RESERVED15 , MWAW_T_RESERVED16 , MWAW_T_RESERVED17 , MWAW_T_RESERVED18 , MWAW_T_RESERVED19 , MWAW_T_RESERVED20 , MWAW_T_RESERVED21 , MWAW_T_RESERVED22 , MWAW_T_RESERVED23 , MWAW_T_RESERVED24 , MWAW_T_RESERVED25 , MWAW_T_RESERVED26 , MWAW_T_RESERVED27 , MWAW_T_RESERVED28 , MWAW_T_RESERVED29 , MWAW_T_CLARISDRAW =MWAW_T_RESERVED1 , MWAW_T_APPLEPICT =MWAW_T_RESERVED2 , MWAW_T_STYLE =MWAW_T_RESERVED3 , MWAW_T_FREEHAND =MWAW_T_RESERVED4 , MWAW_T_CRICKETDRAW =MWAW_T_RESERVED5 , MWAW_T_MAXWRITE =MWAW_T_RESERVED6 , MWAW_T_MOUSEWRITE =MWAW_T_RESERVED7 , MWAW_T_POWERPOINT =MWAW_T_RESERVED8 , MWAW_T_CORELPAINTER =MWAW_T_RESERVED9 , MWAW_T_CANVAS =MWAW_T_RESERVED10 , MWAW_T_DRAWINGTABLE =MWAW_T_RESERVED11 , MWAW_T_JAZZLOTUS =MWAW_T_RESERVED12 , MWAW_T_WORDMAKER =MWAW_T_RESERVED13 , MWAW_T_STUDENTWRITING =MWAW_T_RESERVED14 , MWAW_T_SCRIPTWRITER =MWAW_T_RESERVED15 , MWAW_T_SCOOP =MWAW_T_RESERVED16 , MWAW_T_SPRINGBOARD_PUBLISHER =MWAW_T_RESERVED17 }
| an enum to define the different type of document More...

## Static Public Member Functions
static MWAWLIB Confidence | isFileFormatSupported (librevenge::RVNGInputStream *input, Type &type, Kind &kind)
| Analyzes the content of an input stream to see if it can be parsed.
static MWAWLIB Result | parse (librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface, char const *password=nullptr)
| Parses the input stream content.
static MWAWLIB Result | parse (librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *documentInterface, char const *password=nullptr)
| Parses the input stream content.
static MWAWLIB Result | parse (librevenge::RVNGInputStream *input, librevenge::RVNGPresentationInterface *documentInterface, char const *password=nullptr)
| Parses the input stream content.
static MWAWLIB Result | parse (librevenge::RVNGInputStream *input, librevenge::RVNGSpreadsheetInterface *documentInterface, char const *password=nullptr)
| Parses the input stream content.
static MWAWLIB bool | decodeGraphic (librevenge::RVNGBinaryData const &binary, librevenge::RVNGDrawingInterface *documentInterface)
| Parses the graphic contained in the binary data and called documentInterface to reconstruct a graphic.
static MWAWLIB bool | decodeSpreadsheet (librevenge::RVNGBinaryData const &binary, librevenge::RVNGSpreadsheetInterface *documentInterface)
| Parses the spreadsheet contained in the binary data and called documentInterface to reconstruct a spreadsheet.
static MWAWLIB bool | decodeText (librevenge::RVNGBinaryData const &binary, librevenge::RVNGTextInterface *documentInterface)
| Parses the text contained in the binary data and called documentInterface to reconstruct a text.

## Detailed Description

This class provides all the functions needed by applications to parse many pre-MacOSX documents.

## Member Enumeration Documentation

## ◆ Confidence

enum MWAWDocument::Confidence

an enum which defines if we have confidence that a file is supported

Enumerator
MWAW_C_NONE | not supported
MWAW_C_UNSUPPORTED_ENCRYPTION | encryption not supported
MWAW_C_SUPPORTED_ENCRYPTION | encryption supported
MWAW_C_EXCELLENT | supported

## ◆ Kind

enum MWAWDocument::Kind

an enum to define the kind of document

Enumerator
MWAW_K_UNKNOWN | unknown
MWAW_K_TEXT | word processing file
MWAW_K_DRAW | vectorized grphic
MWAW_K_PAINT | bitmap graphic
MWAW_K_PRESENTATION | presentation graphic
MWAW_K_SPREADSHEET | spreadsheet
MWAW_K_DATABASE | database

## ◆ Result

enum MWAWDocument::Result

an enum which defines the result of the file parsing

Enumerator
MWAW_R_OK | conversion ok
MWAW_R_FILE_ACCESS_ERROR | problem when accessing file
MWAW_R_OLE_ERROR | problem when reading the OLE structure
MWAW_R_PARSE_ERROR | problem when parsing the file
MWAW_R_PASSWORD_MISSMATCH_ERROR | problem when using the given password
MWAW_R_UNKNOWN_ERROR | unknown error

## ◆ Type

enum MWAWDocument::Type

an enum to define the different type of document

Enumerator
MWAW_T_UNKNOWN | Unrecognised file type.
MWAW_T_ACTA | Acta (v2 and Classic v1).
MWAW_T_ADOBEILLUSTRATOR | Adobe Illustrator: TODO.
MWAW_T_BEAGLEWORKS | BeagleWorks (v1.0)/WordPerfect Works (v1.2): export database(as spreadsheet), draw, paint, spreadsheet and text files.
MWAW_T_CLARISRESOLVE | Claris Resolve (v1.1).
MWAW_T_CLARISWORKS | ClarisWorks/AppleWorks: all versions, export database (as spreadsheet), draw(as text), paint, presentation, spreadsheet, text document.
MWAW_T_DBASE | DBase: TODO.
MWAW_T_DOCMAKER | DocMaker (v4).
MWAW_T_EDOC | eDOC (v2)
MWAW_T_FAMILYTREEMAKER | Family Tree Maker: TODO.
MWAW_T_FILEMAKER | FileMaker: TODO.
MWAW_T_FOXBASE | FoxBase: TODO.
MWAW_T_FRAMEMAKER | FrameMaker: TODO.
MWAW_T_FULLIMPACT | FullImpact: TODO.
MWAW_T_FULLPAINT | FullPaint: v1 ( same format as MacPaint file).
MWAW_T_FULLWRITE | FullWrite Professional: basic.
MWAW_T_GREATWORKS | GreatWorks (v1-v2): export text, drawing, paint and spreadsheet document.
MWAW_T_HANMACWORDJ | HanMac Word-J (v2.0.4).
MWAW_T_HANMACWORDK | HanMac Word-K (v2.0.5-2.0.6).
MWAW_T_INFOGENIE | InfoGenie: TODO.
MWAW_T_KALEIDAGRAPH | Kaleida Graph: TODO.
MWAW_T_LIGHTWAYTEXT | LightWayText (only v4 Mac format).
MWAW_T_MACDOC | MacDoc (v1.3).
MWAW_T_MACDRAFT | MacDraft: v1, v4-v5.
MWAW_T_MACDRAW | MacDraw: v0-v1.
MWAW_T_MACDRAWPRO | MacDraw II: v1.0-v1.1, MacDraw Pro: v1.
MWAW_T_MACPAINT | MacPaint: v1-v2.
MWAW_T_MARINERWRITE | Mariner Write (only v1.6-v3.5 Mac Classic).
MWAW_T_MINDWRITE | MindWrite.
MWAW_T_MORE | More (v2-3): retrieve the organization part but not the slide/tree parts.
MWAW_T_MICROSOFTFILE | Microsoft File(data base): TODO.
MWAW_T_MICROSOFTMULTIPLAN | Microsoft Multiplan: v1.11.
MWAW_T_MICROSOFTWORD | Microsoft Word (v1-v5).
MWAW_T_MICROSOFTWORKS | Microsoft Works Mac: export database(as spreadsheet), graphic, spreadsheet and text files.
MWAW_T_MACWRITE | MacWrite.
MWAW_T_MACWRITEPRO | MacWrite II/Pro.
MWAW_T_NISUSWRITER | Nisus Writer (v3.4-v6.5).
MWAW_T_OVERVUE | OverVUE: TODO.
MWAW_T_PAGEMAKER | PageMaker: TODO.
MWAW_T_PIXELPAINT | PixelPaint: v1-v2.1.
MWAW_T_RAGTIME | RagTime: -Mac v2.1-v3.2: done, -all v5.0-v6.5: incomplete, only try to retrieve the picture/shape/textboxes.
MWAW_T_READYSETGO | Ready,Set,Go! : v1-v5, v6, v7.7 (only Mac) and Design Studio v2
MWAW_T_SUPERPAINT | SuperPaint: export drawing and paint v1 document. Note the other documents v2-v3 seems to be basic MacPaint/Pict files
MWAW_T_SYMPOSIUM | Symposium: TODO.
MWAW_T_TEACHTEXT | TeachText/SimpleText.
MWAW_T_TEXEDIT | Tex-Edit (v2).
MWAW_T_TRAPEZE | Trapeze spreadsheet: TODO.
MWAW_T_WINGZ | Wingz (v1.1).
MWAW_T_WRITENOW | WriteNow.
MWAW_T_WRITERPLUS | WriterPlus.
MWAW_T_XPRESS | XPress: TODO.
MWAW_T_ZWRITE | Z-Write (v1.3).
MWAW_T_4DIMENSION | 4th Dimension: TODO
MWAW_T_RESERVED1 | Used for ClarisDraw v1 file: see below.
MWAW_T_RESERVED2 | Used for Apple's Pict file: see below.
MWAW_T_RESERVED3 | Used for Style v1.6: see below.
MWAW_T_RESERVED4 | Used for FreeHand: see below.
MWAW_T_RESERVED5 | Used for Cricket Draw: see below.
MWAW_T_RESERVED6 | Used for MaxWrite: see below.
MWAW_T_RESERVED7 | Used for MouseWrite: see below.
MWAW_T_RESERVED8 | Used for PowerPoint: see below.
MWAW_T_RESERVED9 | Used for Corel Painter: see below.
MWAW_T_RESERVED10 | Used for Deneba Canvas: see below.
MWAW_T_RESERVED11 | Used for Drawing Table: see below.
MWAW_T_RESERVED12 | Used for Jazz Lotus: see below.
MWAW_T_RESERVED13 | Used for WordMaker: see below.
MWAW_T_RESERVED14 | Used for Student Writing Center: see below.
MWAW_T_RESERVED15 | Used for Script Writer: see below.
MWAW_T_RESERVED16 | Used for Scoop: see below.
MWAW_T_RESERVED17 | Used for SpringBoard Publisher: see below.
MWAW_T_RESERVED18 | Reserved for future used.
MWAW_T_RESERVED19 | Reserved for future used.
MWAW_T_RESERVED20 | Reserved for future used.
MWAW_T_RESERVED21 | Reserved for future used.
MWAW_T_RESERVED22 | Reserved for future used.
MWAW_T_RESERVED23 | Reserved for future used.
MWAW_T_RESERVED24 | Reserved for future used.
MWAW_T_RESERVED25 | Reserved for future used.
MWAW_T_RESERVED26 | Reserved for future used.
MWAW_T_RESERVED27 | Reserved for future used.
MWAW_T_RESERVED28 | Reserved for future used.
MWAW_T_RESERVED29 | Reserved for future used.
MWAW_T_CLARISDRAW | Claris Draw: v1.0.1-v1.0.3. Note same enum as MWAW_T_RESERVED1
MWAW_T_APPLEPICT | Apple Pict: v1 or v2. Note same enum as MWAW_T_RESERVED2
MWAW_T_STYLE | Style: v1.6, v1.9. Note same enum as MWAW_T_RESERVED3
MWAW_T_FREEHAND | FreeHand: v1. Note same enum as MWAW_T_RESERVED4
MWAW_T_CRICKETDRAW | Cricket Draw: v1.0.1 and v1.1.1. Note same enum as MWAW_T_RESERVED5
MWAW_T_MAXWRITE | MaxWrite: v1. Note same enum as MWAW_T_RESERVED6
MWAW_T_MOUSEWRITE | MouseWrite: v1. Note same enum as MWAW_T_RESERVED7
MWAW_T_POWERPOINT | PowerPoint: v1-v4 and pc v2-v4,95. Note same enum as MWAW_T_RESERVED8
MWAW_T_CORELPAINTER | Corel Painter: Fractal Design Painter Mac v1-v4, MetaCreations Mac v5-v6, Corel Painter Mac v7-v10 and Fractal Design Painter Windows v3. Note same enum as MWAW_T_RESERVED9
MWAW_T_CANVAS | Deneba Canvas mac: v2-v3 and v5-v8, windows: v3 and v5-v6 and probably v7-v8 ADC Canvas mac: v9-v10, windows: probably v9-v11. Note same enum as MWAW_T_RESERVED10
MWAW_T_DRAWINGTABLE | Drawing Table: v1. Note same enum as MWAW_T_RESERVED11
MWAW_T_JAZZLOTUS | Jazz (Lotus): v1 ; retrieve the spreadsheet and if the resource fork is available, the writer document. Note same enum as MWAW_T_RESERVED12
MWAW_T_WORDMAKER | WordMaker: v1. Note same enum as MWAW_T_RESERVED13
MWAW_T_STUDENTWRITING | Student Writing Center: v1. Note same enum as MWAW_T_RESERVED14
MWAW_T_SCRIPTWRITER | Script Writer: v1.3. Note same enum as MWAW_T_RESERVED15
MWAW_T_SCOOP | Scoop: v1. Note same enum as MWAW_T_RESERVED16
MWAW_T_SPRINGBOARD_PUBLISHER | SpringBoard Publisher: v2. Note same enum as MWAW_T_RESERVED17

## Member Function Documentation

## ◆ decodeGraphic()

bool MWAWDocument::decodeGraphic | ( | librevenge::RVNGBinaryData const & | binary,
|  | librevenge::RVNGDrawingInterface * | documentInterface )
| static

Parses the graphic contained in the binary data and called documentInterface to reconstruct a graphic.

The input is normally send to a librevenge::RVNGXXXInterface with mimeType="image/mwaw-odg", ie. it must correspond to a picture created by the MWAWGraphicEncoder class via a MWAWPropertyEncoder.

Parameters

  binary | a list of librevenge::RVNGDrawingInterface stored in a documentInterface,
  documentInterface | the RVNGDrawingInterface which will convert the graphic is some specific format.

Note
  this function appears with MWAW_GRAPHIC_VERSION==1 in libmwaw-0.2

## ◆ decodeSpreadsheet()

bool MWAWDocument::decodeSpreadsheet | ( | librevenge::RVNGBinaryData const & | binary,
|  | librevenge::RVNGSpreadsheetInterface * | documentInterface )
| static

Parses the spreadsheet contained in the binary data and called documentInterface to reconstruct a spreadsheet.

The input is normally send to a librevenge::RVNGXXXInterface with mimeType="image/mwaw-ods", ie. it must correspond to a spreadsheet created by the MWAWSpreadsheetInterface class via a MWAWPropertyEncoder.

Parameters

  binary | a list of librevenge::RVNGSpreadsheetInterface stored in a documentInterface,
  documentInterface | the RVNGSpreadsheetInterface which will convert the spreadsheet is some specific format.

Note
  this function appears in libmwaw-0.3.0 (and returns always false). It was only implemented with MWAW_SPREADSHEET_VERSION==2 in libmwaw-0.3.1

## ◆ decodeText()

bool MWAWDocument::decodeText | ( | librevenge::RVNGBinaryData const & | binary,
|  | librevenge::RVNGTextInterface * | documentInterface )
| static

Parses the text contained in the binary data and called documentInterface to reconstruct a text.

The input is normally send to a librevenge::RVNGXXXInterface with mimeType="image/mwaw-odt", ie. it must correspond to a text created by the MWAWTextInterface class via a MWAWPropertyEncoder.

Parameters

  binary | a list of librevenge::RVNGTextInterface stored in a documentInterface,
  documentInterface | the RVNGTextInterface which will convert the text is some specific format.

Note
  Reserved for future use. Actually, it only returns false.

## ◆ isFileFormatSupported()

MWAWDocument::Confidence MWAWDocument::isFileFormatSupported | ( | librevenge::RVNGInputStream * | input,
|  | MWAWDocument::Type & | type,
|  | Kind & | kind )
| static

Analyzes the content of an input stream to see if it can be parsed.

Parameters

  input | The input stream
  type | The document type ( filled if the file is supported )
  kind | The document kind ( filled if the file is supported )

Returns
  A confidence value which represents the likelyhood that the content from the input stream can be parsed

Note
  encryption enum appears with MWAW_TEXT_VERSION==2

## ◆ parse() [1/4]

MWAWDocument::Result MWAWDocument::parse | ( | librevenge::RVNGInputStream * | input,
|  | librevenge::RVNGDrawingInterface * | documentInterface,
|  | char const * | password = nullptr )
| static

Parses the input stream content.

It will make callbacks to the functions provided by a librevenge::RVNGDrawingInterface class implementation when needed. This is often commonly called the 'main parsing routine'.

Parameters

  input | The input stream
  documentInterface | A RVNGDrawingInterface implementation
  password | The file password

Note
  this function appears with MWAW_GRAPHIC_VERSION==2 in libmwaw-0.3

## ◆ parse() [2/4]

MWAWDocument::Result MWAWDocument::parse | ( | librevenge::RVNGInputStream * | input,
|  | librevenge::RVNGPresentationInterface * | documentInterface,
|  | char const * | password = nullptr )
| static

Parses the input stream content.

It will make callbacks to the functions provided by a librevenge::RVNGPresentationInterface class implementation when needed. This is often commonly called the 'main parsing routine'.

Parameters

  input | The input stream
  documentInterface | A RVNGPresentationInterface implementation
  password | The file password

Note
  this function appeared in libmwaw-0.3.0 ( and returns MWAW_R_UNKNOWN_ERROR ). It was implemented in libmwaw-0.3.3 ( MWAW_PRESENTATION_VERSION==1 )

## ◆ parse() [3/4]

MWAWDocument::Result MWAWDocument::parse | ( | librevenge::RVNGInputStream * | input,
|  | librevenge::RVNGSpreadsheetInterface * | documentInterface,
|  | char const * | password = nullptr )
| static

Parses the input stream content.

It will make callbacks to the functions provided by a librevenge::RVNGSpreadsheetInterface class implementation when needed. This is often commonly called the 'main parsing routine'.

Parameters

  input | The input stream
  documentInterface | A RVNGSpreadsheetInterface implementation
  password | The file password

Note
  this function appears with MWAW_SPREADSHEET_VERSION==1 in libmwaw-0.3

## ◆ parse() [4/4]

MWAWDocument::Result MWAWDocument::parse | ( | librevenge::RVNGInputStream * | input,
|  | librevenge::RVNGTextInterface * | documentInterface,
|  | char const * | password = nullptr )
| static

Parses the input stream content.

It will make callbacks to the functions provided by a librevenge::RVNGTextInterface class implementation when needed. This is often commonly called the 'main parsing routine'.

Parameters

  input | The input stream
  documentInterface | A RVNGTextInterface implementation
  password | The file password

Note
  password appears with MWAW_TEXT_VERSION==2

The documentation for this class was generated from the following files:

- MWAWDocument.hxx
- MWAWDocument.cxx