ScoopParser.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33 
34 #ifndef SCOOP_PARSER
35 # define SCOOP_PARSER
36 
37 #include <string>
38 #include <vector>
39 
40 #include <librevenge/librevenge.h>
41 
42 #include "MWAWDebug.hxx"
43 #include "MWAWInputStream.hxx"
44 
45 #include "MWAWParser.hxx"
46 
47 namespace ScoopParserInternal
48 {
49 struct FrameZone;
50 struct Paragraph;
51 struct Shape;
52 struct TextZone;
53 
54 struct State;
55 
56 class SubDocument;
57 }
58 
62 class ScoopParser final : public MWAWGraphicParser
63 {
65 public:
67  ScoopParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
69  ~ScoopParser() final;
70 
72  bool checkHeader(MWAWHeader *header, bool strict=false) final;
73 
74  // the main parse function
75  void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
76 
77 protected:
79  void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
80 
81 protected:
83  bool createZones();
84 
85  // Intermediate level
86 
88  bool readPrintInfo();
90  bool readHeader();
91 
94  bool readTextZone(ScoopParserInternal::TextZone &tZone);
96  bool readTextZoneParagraph(ScoopParserInternal::Paragraph &para, int id);
97 
99  bool readFont(MWAWFont &font);
101  bool readParagraph(MWAWParagraph &para, bool define=false);
103  bool readText(MWAWEntry &entry, std::string const &what);
104 
106  bool readShapesList(std::vector<ScoopParserInternal::Shape> &shapes);
108  bool readShape(ScoopParserInternal::Shape &shape, int id);
110  bool readBitmap(MWAWEntry const &entry, MWAWEmbeddedObject &object, bool compressed=true);
111 
112  //
113  // low level
114  //
115 
116  //
117  // data
118  //
119 
121  bool send(ScoopParserInternal::Shape const &shape, MWAWVec2i const &decal);
123  bool sendText(long tZoneId, int subZone);
125  bool sendText(ScoopParserInternal::Paragraph const &paragraph);
126 
128  std::shared_ptr<ScoopParserInternal::State> m_state;
129 };
130 #endif
131 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
ScoopParserInternal::Shape::m_verticalMode
int m_verticalMode
the vertical position: 0: center, 1: bottom, 2: top, 3: justify
Definition: ScoopParser.cxx:98
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
ScoopParserInternal::Shape::m_flips
bool m_flips[2]
the flip flags
Definition: ScoopParser.cxx:100
ScoopParserInternal::Paragraph::m_paragraph
MWAWParagraph m_paragraph
the paragraph style
Definition: ScoopParser.cxx:159
MWAWParagraph::m_justify
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
ScoopParserInternal::TextZone::m_font
MWAWFont m_font
the default font (or maybe the story font)
Definition: ScoopParser.cxx:207
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
ScoopParserInternal::Paragraph
Internal: a paragraph of a ScoopParser.
Definition: ScoopParser.cxx:137
MWAWParser::getFontConverter
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
MWAWFont::set
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
ScoopParserInternal::SubDocument
Internal: the subdocument of a ScoopParser.
Definition: ScoopParser.cxx:294
MWAWGraphicListenerPtr
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
ScoopParserInternal::Shape::m_rotation
int m_rotation
the rotation
Definition: ScoopParser.cxx:96
MWAWGraphicShape::getBdBox
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:197
ScoopParserInternal::SubDocument::SubDocument
SubDocument(ScoopParser &pars, MWAWInputStreamPtr const &input, long zoneId, int subZoneId)
Definition: ScoopParser.cxx:296
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
ScoopParserInternal::TextZone::m_storyEntry
MWAWEntry m_storyEntry
the story name entry
Definition: ScoopParser.cxx:205
ScoopParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: ScoopParser.cxx:1921
ScoopParserInternal::TextZoneShape::m_flips
bool m_flips[2]
the flip flags
Definition: ScoopParser.cxx:186
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MWAWPictBitmapIndexed::setColors
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:452
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWParser::getGraphicListener
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
MWAWGraphicStyle::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:491
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
ScoopParserInternal::Shape
Internal: the shape of a ScoopParser.
Definition: ScoopParser.cxx:60
MWAWParagraph::m_tabs
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
ScoopParserInternal::Paragraph::m_text
MWAWEntry m_text
the text entry
Definition: ScoopParser.cxx:151
ScoopParserInternal::TextZoneShape::m_box
MWAWBox2f m_box
the bounding box
Definition: ScoopParser.cxx:178
ScoopParserInternal::Shape::m_page
int m_page
the page
Definition: ScoopParser.cxx:92
MWAWGraphicShape::pie
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
MWAWGraphicShape::m_path
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:234
MWAWPictBitmapIndexed::set
void set(int i, int j, int v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:431
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MWAWGraphicStyle::m_verticalAlignment
VerticalAlignment m_verticalAlignment
related to text area
Definition: MWAWGraphicStyle.hxx:652
ScoopParserInternal::Shape::m_textId
long m_textId
the text main id
Definition: ScoopParser.cxx:108
MWAWColor::white
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
ScoopParserInternal::Special::m_value
int m_value
the special value
Definition: ScoopParser.cxx:132
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
ScoopParserInternal::Paragraph::m_cPosToFontMap
std::map< int, MWAWFont > m_cPosToFontMap
a map character position to font
Definition: ScoopParser.cxx:153
MWAWTabStop::CENTER
@ CENTER
Definition: MWAWParagraph.hxx:48
ScoopParserInternal::Shape::m_vertices
std::vector< MWAWVec2i > m_vertices
the vertices: poly, spline, ...
Definition: ScoopParser.cxx:105
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
MWAWFont::setWidthStreching
void setWidthStreching(float scale=1.0)
sets the text width streching
Definition: MWAWFont.hxx:303
ScoopParser
the main class to read a Scoop v1 file
Definition: ScoopParser.hxx:63
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MWAWGraphicShape
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
ScoopParser::readParagraph
bool readParagraph(MWAWParagraph &para, bool define=false)
try to read a paragraph style
Definition: ScoopParser.cxx:1295
MWAWParagraph::m_spacings
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
MWAWDocument::MWAW_T_SCOOP
@ MWAW_T_SCOOP
Scoop: v1.
Definition: MWAWDocument.hxx:253
MWAWGraphicShape::line
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
ScoopParserInternal::State::m_patterns
std::vector< MWAWGraphicStyle::Pattern > m_patterns
the list of patterns
Definition: ScoopParser.cxx:252
MWAWPrinter.hxx
MWAWDocument::MWAW_K_DRAW
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
ScoopParserInternal::SubDocument::operator=
SubDocument & operator=(SubDocument const &orig)=delete
ScoopParserInternal::State::m_rightPage
int m_rightPage
the right-bottom page
Definition: ScoopParser.cxx:244
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MWAWPictBitmap::getBinary
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
ScoopParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: ScoopParser.cxx:330
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
ScoopParserInternal::State::m_layoutDimension
MWAWVec2i m_layoutDimension
the layout dimension
Definition: ScoopParser.cxx:248
ScoopParser::readText
bool readText(MWAWEntry &entry, std::string const &what)
try to read a text zone
Definition: ScoopParser.cxx:1496
ScoopParserInternal::State::m_shapes
std::vector< Shape > m_shapes
the main list of shapes
Definition: ScoopParser.cxx:254
ScoopParserInternal::Shape::m_ids
long m_ids[4]
the list of ids
Definition: ScoopParser.cxx:112
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
ScoopParserInternal::SubDocument::m_id
long m_id
the textzone id
Definition: ScoopParser.cxx:322
MWAWFont::embossBit
@ embossBit
Definition: MWAWFont.hxx:190
MWAWGraphicShape::circle
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
ScoopParserInternal::Paragraph::m_cPosToKernelMap
std::map< int, float > m_cPosToKernelMap
a map character position to kernel modifier
Definition: ScoopParser.cxx:155
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
ScoopParserInternal
Internal: the structures of a ScoopParser.
Definition: ScoopParser.cxx:57
MWAWSubDocument.hxx
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
ScoopParserInternal::TextZoneShape::m_slants
float m_slants[2]
the slant values: original, decal?
Definition: ScoopParser.cxx:182
ScoopParserInternal::TextZone::TextZone
TextZone()
constructor
Definition: ScoopParser.cxx:193
MWAWGraphicShape::polygon
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
ScoopParserInternal::Special::m_type
int m_type
the special type: 1: numeric, 2: roman, 3: Alpha, 4: time, 5: date numeric, 6: date alpha
Definition: ScoopParser.cxx:130
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
ScoopParserInternal::Paragraph::m_cPosToSpecialMap
std::map< std::pair< int, int >, Special > m_cPosToSpecialMap
a map character positions to special field
Definition: ScoopParser.cxx:157
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
MWAWParagraph::AtLeast
@ AtLeast
Definition: MWAWParagraph.hxx:94
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWFont::m_extra
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
ScoopParserInternal::State::m_thumbnailSize
MWAWVec2i m_thumbnailSize
the number of page using in thumbnail display
Definition: ScoopParser.cxx:246
ScoopParserInternal::State
Internal: the state of a ScoopParser.
Definition: ScoopParser.cxx:216
MWAWGraphicStyle::V_AlignCenter
@ V_AlignCenter
Definition: MWAWGraphicStyle.hxx:56
ScoopParserInternal::Shape::Shape
Shape()
constructor
Definition: ScoopParser.cxx:62
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
ScoopParser::readPrintInfo
bool readPrintInfo()
try to read the print info zone
Definition: ScoopParser.cxx:2071
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
ScoopParserInternal::Shape::m_entries
MWAWEntry m_entries[4]
the list of entries
Definition: ScoopParser.cxx:114
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
libmwaw::Debug::dumpFile
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
ScoopParserInternal::State::initPatterns
void initPatterns()
init the patterns
Definition: ScoopParser.cxx:261
ScoopParserInternal::State::State
State()
constructor
Definition: ScoopParser.cxx:218
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:589
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
ScoopParser::ScoopParser
ScoopParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: ScoopParser.cxx:351
ScoopParserInternal::TextZoneShape
Internal: a text zone shape of a ScoopParser.
Definition: ScoopParser.cxx:164
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
ScoopParser::readHeader
bool readHeader()
try to the header zone
Definition: ScoopParser.cxx:1957
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MWAWGraphicShape::m_vertices
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:232
MWAWParser::setGraphicListener
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
ScoopParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: ScoopParser.cxx:307
ScoopParser::~ScoopParser
~ScoopParser() final
destructor
Definition: ScoopParser.cxx:360
M_PI
#define M_PI
Definition: libmwaw_internal.hxx:52
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
MWAWPictData.hxx
MWAWPageSpan::getFormWidth
double getFormWidth() const
returns the page width
Definition: MWAWPageSpan.hxx:122
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
ScoopParserInternal::Special
Internal: a special field of a ScoopParser.
Definition: ScoopParser.cxx:122
ScoopParserInternal::State::m_idToTextZoneMap
std::map< long, TextZone > m_idToTextZoneMap
the text zone map: id to text zone
Definition: ScoopParser.cxx:258
ScoopParserInternal::Shape::m_boxes
MWAWBox2f m_boxes[2]
the bounding boxes: final and original
Definition: ScoopParser.cxx:94
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWVec2< int >
MWAWGraphicListener.hxx
MWAWTabStop::m_alignment
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
MWAWFont::getDebugString
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
ScoopParser::createZones
bool createZones()
finds the different objects zones
Definition: ScoopParser.cxx:467
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
ScoopParser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: ScoopParser.cxx:367
MWAWGraphicStyle::setPattern
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:502
ScoopParserInternal::TextZone::m_paragraphs
std::vector< Paragraph > m_paragraphs
the paragraph list
Definition: ScoopParser.cxx:209
MWAWGraphicParser
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
MWAWColor::black
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
ScoopParser::readTextZoneParagraph
bool readTextZoneParagraph(ScoopParserInternal::Paragraph &para, int id)
try to read a frame paragraph
Definition: ScoopParser.cxx:1061
MWAWTabStop::m_position
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
ScoopParserInternal::State::m_numPages
int m_numPages
the number of pages
Definition: ScoopParser.cxx:238
ScoopParserInternal::TextZoneShape::TextZoneShape
TextZoneShape()
constructor
Definition: ScoopParser.cxx:166
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
ScoopParserInternal::Special::Special
Special()
constructor
Definition: ScoopParser.cxx:124
MWAWGraphicShape::arc
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWGraphicStyle::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:597
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
ScoopParser::readFont
bool readFont(MWAWFont &font)
try to read a font style
Definition: ScoopParser.cxx:1250
MWAWGraphicStyle::V_AlignJustify
@ V_AlignJustify
Definition: MWAWGraphicStyle.hxx:56
ScoopParserInternal::State::m_displayMode
int m_displayMode
the display mode 0: thumbnail, 1: one page, 2: facings pages, 3: one page+scrap
Definition: ScoopParser.cxx:240
MWAWBox2::center
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
MWAWGraphicStyle.hxx
ScoopParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: ScoopParser.cxx:304
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWParagraph::m_marginsUnit
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
ScoopParser::readBitmap
bool readBitmap(MWAWEntry const &entry, MWAWEmbeddedObject &object, bool compressed=true)
try to read a bitmap
Definition: ScoopParser.cxx:1840
MWAWGraphicStyle::V_AlignBottom
@ V_AlignBottom
Definition: MWAWGraphicStyle.hxx:56
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWPictBitmapIndexed
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:361
ScoopParser::send
bool send(ScoopParserInternal::Shape const &shape, MWAWVec2i const &decal)
try to send a shape
Definition: ScoopParser.cxx:501
MWAWGraphicShape::path
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
ScoopParser::readTextZone
bool readTextZone(ScoopParserInternal::TextZone &tZone)
try to read the data associated to a text zone: its name, its content, the list of shape which displa...
Definition: ScoopParser.cxx:842
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
ScoopParserInternal::Paragraph::Paragraph
Paragraph()
constructor
Definition: ScoopParser.cxx:139
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
ScoopParserInternal::Shape::m_type
int m_type
the shape type
Definition: ScoopParser.cxx:85
ScoopParserInternal::State::m_leftPage
int m_leftPage
the left-top page
Definition: ScoopParser.cxx:242
ScoopParser.hxx
ScoopParser::readShape
bool readShape(ScoopParserInternal::Shape &shape, int id)
try to read a shape
Definition: ScoopParser.cxx:1561
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MWAW_N_ELEMENTS
#define MWAW_N_ELEMENTS(m)
Definition: libmwaw_internal.hxx:111
ScoopParserInternal::SubDocument::SubDocument
SubDocument(SubDocument const &orig)=delete
ScoopParserInternal::TextZone::m_shapes
std::vector< TextZoneShape > m_shapes
the list of shapes displaying this text
Definition: ScoopParser.cxx:211
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
ScoopParserInternal::TextZone::m_id
long m_id
the text zone id
Definition: ScoopParser.cxx:203
ScoopParserInternal::TextZoneShape::m_verticalMode
int m_verticalMode
the vertical position: 0: center, 1: bottom, 2: top, 3: justify
Definition: ScoopParser.cxx:184
MWAWGraphicShape::polyline
static MWAWGraphicShape polyline(MWAWBox2f const &box)
static constructor to create a polyline
Definition: MWAWGraphicShape.hxx:157
ScoopParserInternal::Shape::m_style
MWAWGraphicStyle m_style
the graphic style
Definition: ScoopParser.cxx:87
ScoopParserInternal::TextZoneShape::m_page
int m_page
the page
Definition: ScoopParser.cxx:176
MWAWFont::Script
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
MWAWInputStream.hxx
ScoopParserInternal::TextZone
Internal: a text zone of a ScoopParser.
Definition: ScoopParser.cxx:191
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:84
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
librevenge
Definition: MWAWDocument.hxx:57
ScoopParser::sendText
bool sendText(long tZoneId, int subZone)
try to send the text of a text zone
Definition: ScoopParser.cxx:747
MWAWGraphicStyle::m_rotate
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:627
MWAWPictBitmap.hxx
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MWAWTabStop::RIGHT
@ RIGHT
Definition: MWAWParagraph.hxx:48
MWAWBox2< float >
ScoopParserInternal::TextZoneShape::m_limits
int m_limits[2]
the paragraph id list corresponding to this shape
Definition: ScoopParser.cxx:180
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
ScoopParser::readShapesList
bool readShapesList(std::vector< ScoopParserInternal::Shape > &shapes)
try to read a list of shape
Definition: ScoopParser.cxx:1524
ScoopParser::m_state
std::shared_ptr< ScoopParserInternal::State > m_state
the state
Definition: ScoopParser.hxx:128
MWAWGraphicShape::PathData
a simple path component
Definition: MWAWGraphicShape.hxx:53
ScoopParser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: ScoopParser.cxx:425
MWAWGraphicStyle::hasSurface
bool hasSurface() const
returns true if the interior surface is defined
Definition: MWAWGraphicStyle.hxx:523
MWAWGraphicShape::rectangle
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
ScoopParserInternal::Shape::m_local
int m_local[2]
the local values: circle: angles, rect: round dimension
Definition: ScoopParser.cxx:102
MWAWPageSpan::getFormLength
double getFormLength() const
returns the page length
Definition: MWAWPageSpan.hxx:117
ScoopParserInternal::SubDocument::m_subId
int m_subId
the sub zone id
Definition: ScoopParser.cxx:324
ScoopParserInternal::Shape::m_mode
int m_mode
the mode: 0 copy, 1: or, ...
Definition: ScoopParser.cxx:89
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
ScoopParserInternal::State::m_hasScrapPage
bool m_hasScrapPage
a flag to know if some shape are on the scrap page
Definition: ScoopParser.cxx:250
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
MWAWFont::setUnderlineStyle
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
MWAWParser::resetGraphicListener
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
ScoopParserInternal::Shape::m_children
std::vector< Shape > m_children
the list of children: group
Definition: ScoopParser.cxx:117
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MWAWGraphicListener
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
ScoopParserInternal::State::m_idToParagraphMap
std::map< long, MWAWParagraph > m_idToParagraphMap
the style map: id to paragraph
Definition: ScoopParser.cxx:256
ScoopParserInternal::Shape::m_textLinkId
int m_textLinkId
the text link id
Definition: ScoopParser.cxx:110
ScoopParserInternal::Paragraph::m_numChar
int m_numChar
the number of characters
Definition: ScoopParser.cxx:149

Generated on Wed Jun 25 2025 00:00:00 for libmwaw by doxygen 1.8.20