Go to the documentation of this file.
34 #ifndef SUPERPAINT_PARSER
35 # define SUPERPAINT_PARSER
40 #include <librevenge/librevenge.h>
71 void parse(librevenge::RVNGDrawingInterface *documentInterface);
78 void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
113 shared_ptr<SuperPaintParserInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:231
bool sendText(int id)
try to send a text box content
Definition: SuperPaintParser.cxx:376
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
bool createZones()
finds the different objects zones
Definition: SuperPaintParser.cxx:297
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
@ MWAW_T_SUPERPAINT
SuperPaint: export drawing and paint v1 document.
Definition: MWAWDocument.hxx:150
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
void init()
inits all internal variables
Definition: SuperPaintParser.cxx:230
virtual ~SubDocument()
destructor
Definition: SuperPaintParser.cxx:171
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
Type
the type
Definition: SuperPaintParser.cxx:62
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:282
MWAWBox2f m_box
the bdbox
Definition: SuperPaintParser.cxx:72
Internal: the shape of a SuperPaintParser.
Definition: SuperPaintParser.cxx:60
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
@ MWAW_K_PAINT
bitmap graphic
Definition: MWAWDocument.hxx:84
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:130
void setPage(int pg) const
sets the page
Definition: MWAWPosition.hxx:189
bool readPictures()
try to read the main picture zone(draw):
Definition: SuperPaintParser.cxx:428
@ boldBit
Definition: MWAWFont.hxx:182
virtual ~SuperPaintParser()
destructor
Definition: SuperPaintParser.cxx:226
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
shared_ptr< SuperPaintParserInternal::State > m_state
the state
Definition: SuperPaintParser.hxx:113
bool sendBitmap()
try to send a bitmap(paint)
Definition: SuperPaintParser.cxx:852
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
MWAWDocument::Kind m_kind
the file type
Definition: SuperPaintParser.cxx:122
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:227
Kind
an enum to define the kind of document
Definition: MWAWDocument.hxx:80
bool readHeader()
try to the header zone
Definition: SuperPaintParser.cxx:1104
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: SuperPaintParser.cxx:199
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
@ Simple
Definition: MWAWFont.hxx:49
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
bool readBitmap(bool onlyCheck=false)
try to read a bitmap(paint): 576*720
Definition: SuperPaintParser.cxx:872
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWPageSpan.hxx:151
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
double getMarginLeft() const
returns the left margin
Definition: MWAWPageSpan.hxx:126
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: MWAWGraphicStyle.hxx:247
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ Picture
Definition: SuperPaintParser.cxx:62
@ embossBit
Definition: MWAWFont.hxx:182
bool readPrintInfo()
try to read the print info zone
Definition: SuperPaintParser.cxx:1150
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:112
SubDocument & operator=(SubDocument const &orig)
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:171
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
@ Polygon
Definition: MWAWGraphicShape.hxx:49
std::ostream & operator<<(std::ostream &o, Shape const &shape)
Definition: SuperPaintParser.cxx:87
SubDocumentType
Definition: libmwaw_internal.hxx:178
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
Internal: the state of a SuperPaintParser.
Definition: SuperPaintParser.cxx:114
double getMarginRight() const
returns the right margin
Definition: MWAWPageSpan.hxx:131
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: SuperPaintParser.cxx:184
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:268
Justification
an enum used to defined the paragraph justification: left, center, right, full ...
Definition: MWAWParagraph.hxx:87
@ shadowBit
Definition: MWAWFont.hxx:183
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
Shape(Type type, MWAWBox2f const &box)
constructor
Definition: SuperPaintParser.cxx:64
@ Group
Definition: SuperPaintParser.cxx:62
T y() const
second element
Definition: libmwaw_internal.hxx:620
SuperPaintParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: SuperPaintParser.cxx:220
MWAWFont m_font
the textbox font
Definition: SuperPaintParser.cxx:80
shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:501
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: SuperPaintParser.cxx:174
SubDocument(SubDocument const &orig)
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:375
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
This class provides all the functions needed by applications to parse many pre-MacOSX documents.
Definition: MWAWDocument.hxx:70
T x() const
first element
Definition: libmwaw_internal.hxx:615
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:201
double m_interline
the interline in percent
Definition: SuperPaintParser.cxx:84
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:113
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
#define M_PI
Definition: libmwaw_internal.hxx:49
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:242
double getPageLength() const
returns the page length (form width without margin )
Definition: MWAWPageSpan.hxx:146
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:262
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
static bool getColor(int id, MWAWColor &color)
try to return the color corresponding to an id
Definition: SuperPaintParser.cxx:129
Type m_type
the type
Definition: MWAWGraphicShape.hxx:191
Definition: libmwaw_internal.hxx:142
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:293
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
int m_id
the subdocument id
Definition: SuperPaintParser.cxx:193
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
MWAWGraphicShape m_shape
the graphic shape
Definition: SuperPaintParser.cxx:76
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:245
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
SubDocument(SuperPaintParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: SuperPaintParser.cxx:168
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
@ GraphicShape
Definition: SuperPaintParser.cxx:62
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:383
Internal: the subdocument of a SuperPaintParser.
Definition: SuperPaintParser.cxx:166
friend std::ostream & operator<<(std::ostream &o, Shape const &shape)
operator<<
Definition: SuperPaintParser.cxx:87
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1013
@ italicBit
Definition: MWAWFont.hxx:182
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:348
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: SuperPaintParser.cxx:1039
void parse(librevenge::RVNGDrawingInterface *documentInterface)
virtual function used to parse the input
Definition: SuperPaintParser.cxx:243
bool readShape()
try to read a shape(draw):
Definition: SuperPaintParser.cxx:451
@ TextBox
Definition: SuperPaintParser.cxx:62
@ Page
Definition: MWAWPosition.hxx:51
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
std::vector< Shape > m_shapeList
the list of shapes
Definition: SuperPaintParser.cxx:126
@ JustificationRight
Definition: MWAWParagraph.hxx:88
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: SuperPaintParser.cxx:274
State()
constructor
Definition: SuperPaintParser.cxx:116
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
the main class to read a SuperPaint v1 file (SPTG)
Definition: SuperPaintParser.hxx:59
Internal: the structures of a SuperPaintParser.
Definition: SuperPaintParser.cxx:57
shared_ptr< MWAWPict > m_bitmap
the bitmap (v1)
Definition: SuperPaintParser.cxx:124
@ WNone
Definition: MWAWPosition.hxx:53
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:254
MWAWGraphicStyle m_style
the graphic style
Definition: SuperPaintParser.cxx:78
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
Type m_type
the shape type
Definition: SuperPaintParser.cxx:70
Class to store font.
Definition: MWAWFont.hxx:44
MWAWParagraph::Justification m_justify
the textbox justification
Definition: SuperPaintParser.cxx:82
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:103
MWAWEntry m_entry
the picture/textbox entry
Definition: SuperPaintParser.cxx:74
bool sendPictures()
try to send the different pictures
Definition: SuperPaintParser.cxx:324
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
static MWAWPictData * get(MWAWInputStreamPtr input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:445
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:118
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Generated on Wed Jun 17 2020 06:30:13 for libmwaw by
doxygen 1.8.18