Go to the documentation of this file.
38 #ifndef SCRIPT_WRITER_PARSER
39 # define SCRIPT_WRITER_PARSER
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:299
the main class to read a Script Writer 1.3 file
Definition: ScriptWriterParser.hxx:65
std::vector< MWAWTabStop > m_tabs[2]
the left/right columns tabulations
Definition: ScriptWriterParser.cxx:249
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
SubDocument(ScriptWriterParser &pars, MWAWInputStreamPtr const &input, HFData const &hf)
Definition: ScriptWriterParser.cxx:257
@ MWAW_T_SCRIPTWRITER
Script Writer: v1.3.
Definition: MWAWDocument.hxx:249
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MWAWVec2i m_pageNumberOrigin
the page number origin, only valid if 0<dim[0]<1000
Definition: ScriptWriterParser.cxx:189
bool createZones()
finds the different objects zones
Definition: ScriptWriterParser.cxx:402
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MWAWVec2i m_position
the position in the text zone
Definition: ScriptWriterParser.cxx:113
@ ColumnBreak
Definition: MWAWListener.hxx:58
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
Internal: the paragraph of a ScriptWriterParser.
Definition: ScriptWriterParser.cxx:66
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
int m_height
the height
Definition: ScriptWriterParser.cxx:111
bool readTextZone()
try to read the main text zone
Definition: ScriptWriterParser.cxx:1152
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
bool empty() const
return true if the paragraph is empty
Definition: ScriptWriterParser.cxx:76
bool readCharStyle(ScriptWriterParserInternal::Page &page, int column)
try to read the character style
Definition: ScriptWriterParser.cxx:869
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
ScriptWriterParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: ScriptWriterParser.cxx:309
@ boldBit
Definition: MWAWFont.hxx:190
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
bool hasPageNumber() const
returns true if the zone has a page number
Definition: ScriptWriterParser.cxx:184
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
std::shared_ptr< ScriptWriterParserInternal::State > m_state
the state
Definition: ScriptWriterParser.hxx:127
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
std::map< int, std::array< Paragraph, 2 > > m_zoneToParagraphsMap
a map id to left/right paragraph
Definition: ScriptWriterParser.cxx:148
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
SubDocument & operator=(SubDocument const &)=delete
bool readPicture(MWAWEntry &entry)
try to read a picture entry
Definition: ScriptWriterParser.cxx:1133
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:109
Internal: the page of a ScriptWriterParser.
Definition: ScriptWriterParser.cxx:137
int m_numChar
the number of caracters
Definition: ScriptWriterParser.cxx:130
bool readHFStyle(std::map< int, MWAWFont > &posToFontMap)
try to read the hf style
Definition: ScriptWriterParser.cxx:929
bool m_hasTitlePage
a flag to know if the first page is a title page
Definition: ScriptWriterParser.cxx:240
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: ScriptWriterParser.cxx:328
@ Simple
Definition: MWAWFont.hxx:49
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MWAWEntry m_picture
the picture entry
Definition: ScriptWriterParser.cxx:197
MWAWBox2i m_position
the frame bounding box
Definition: ScriptWriterParser.cxx:128
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
MWAWVec2i m_dateOrigin
the date field origin, only valid if 0<dim[0]<1000
Definition: ScriptWriterParser.cxx:191
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWPageSpan.hxx:157
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
SubDocument(SubDocument const &)=delete
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: ScriptWriterParser.cxx:287
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:190
Defines MWAWCell (cell content and format)
@ TableDimBit
Definition: MWAWTable.hxx:56
@ Date
Definition: libmwaw_internal.hxx:401
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
bool send(ScriptWriterParserInternal::HFData const &hf)
try to send a header/footer
Definition: ScriptWriterParser.cxx:1347
HFData const * m_hfData
the header/footer zone
Definition: ScriptWriterParser.cxx:281
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWEntry m_entries[2]
the text and the style entries
Definition: ScriptWriterParser.cxx:132
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
State()
constructor
Definition: ScriptWriterParser.cxx:204
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
@ AtLeast
Definition: MWAWParagraph.hxx:94
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
std::vector< Frame > m_frames
the list of frames
Definition: ScriptWriterParser.cxx:171
Internal: the subdocument of a ScriptWriterParser.
Definition: ScriptWriterParser.cxx:255
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
int m_actPage
the actual page
Definition: ScriptWriterParser.cxx:222
bool m_lastPage
a flag to know if this page is the last one
Definition: ScriptWriterParser.cxx:146
@ shadowBit
Definition: MWAWFont.hxx:191
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
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:113
~ScriptWriterParser() final
destructor
Definition: ScriptWriterParser.cxx:321
bool readFrame(ScriptWriterParserInternal::Frame &frame)
try to read a frame entry
Definition: ScriptWriterParser.cxx:725
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWEntry m_mainZoneEntry
the main zone entry
Definition: ScriptWriterParser.cxx:244
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
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
T x() const
first element
Definition: libmwaw_internal.hxx:668
int m_lineSpacing
the default line spacing
Definition: ScriptWriterParser.cxx:229
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
Internal: the state of a ScriptWriterParser.
Definition: ScriptWriterParser.cxx:202
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:108
int m_numPages
the number of page of the final document
Definition: ScriptWriterParser.cxx:222
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
@ PageBreak
Definition: MWAWListener.hxx:58
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
int m_numChar
the number of caracters
Definition: ScriptWriterParser.cxx:109
a class which stores section properties
Definition: MWAWSection.hxx:46
Definition: libmwaw_internal.hxx:144
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: ScriptWriterParser.cxx:267
void setColsSize(std::vector< float > const &cSize)
define the columns size (in point)
Definition: MWAWTable.hxx:133
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
MWAWBox2i m_picturePosition
the picture position
Definition: ScriptWriterParser.cxx:195
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
friend std::ostream & operator<<(std::ostream &o, Paragraph const ¶)
an operator<<
Definition: ScriptWriterParser.cxx:81
@ Char
Definition: MWAWPosition.hxx:51
int m_lineSpacingPercent[2]
the default line spacing percent
Definition: ScriptWriterParser.cxx:231
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
std::map< std::pair< int, int >, MWAWFont > m_zonePosToFontMap[2]
two map zone, position to a font, one for each potential columns
Definition: ScriptWriterParser.cxx:150
bool readPage(ScriptWriterParserInternal::Page &page)
try to read page
Definition: ScriptWriterParser.cxx:1006
int m_columnSepPos
the column separator position
Definition: ScriptWriterParser.cxx:235
int m_align
the alignment
Definition: ScriptWriterParser.cxx:115
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
int m_leftMargins[6]
the left margin positions
Definition: ScriptWriterParser.cxx:233
bool readPrintInfo()
try to read the print information
Definition: ScriptWriterParser.cxx:1196
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
Page()
constructor
Definition: ScriptWriterParser.cxx:139
bool hasDate() const
returns true if the zone has a date
Definition: ScriptWriterParser.cxx:179
bool readDocument()
try to read the document header
Definition: ScriptWriterParser.cxx:446
@ italicBit
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
int m_columnOriginPos
the second column left margin
Definition: ScriptWriterParser.cxx:237
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
Paragraph()
constructor
Definition: ScriptWriterParser.cxx:68
int m_documentType
the document type: 0: advanced, 1: normal, 2: dual
Definition: ScriptWriterParser.cxx:225
Defines MWAWTextListener: the libmwaw word processor listener.
std::vector< ScriptWriterParserInternal::Page > m_pages
the pages list
Definition: ScriptWriterParser.cxx:242
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: ScriptWriterParser.cxx:1262
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
@ JustificationFull
Definition: MWAWParagraph.hxx:90
@ JustificationRight
Definition: MWAWParagraph.hxx:91
Internal: the data of a header footer of a ScriptWriterParser.
Definition: ScriptWriterParser.cxx:155
bool m_hasPicture
a flag to know if there is a picture
Definition: ScriptWriterParser.cxx:193
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
bool empty() const
returns true if the zone is empty
Definition: ScriptWriterParser.cxx:174
~SubDocument() final
destructor
Definition: ScriptWriterParser.cxx:264
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
Internal: the structures of a ScriptWriterParser.
Definition: ScriptWriterParser.cxx:63
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: ScriptWriterParser.cxx:358
HFData m_hfData[2]
the header/footer data
Definition: ScriptWriterParser.cxx:247
bool readFont(MWAWFont &font)
try to read a font
Definition: ScriptWriterParser.cxx:841
MWAWFont m_defaultFont
the default font
Definition: ScriptWriterParser.cxx:227
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Definition: MWAWDocument.hxx:57
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
int m_numFrames
the number of frames: text zone
Definition: ScriptWriterParser.cxx:169
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
Internal: the frame of a ScriptWriterParser.
Definition: ScriptWriterParser.cxx:120
bool sendMainZone()
try to send the main text zone
Definition: ScriptWriterParser.cxx:1316
bool sendText(ScriptWriterParserInternal::Frame const &frame)
try to send a frame text
Definition: ScriptWriterParser.cxx:1468
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
HFData()
constructor
Definition: ScriptWriterParser.cxx:157
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
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Frame()
constructor
Definition: ScriptWriterParser.cxx:122
Generated on Wed Jun 25 2025 00:00:00 for libmwaw by
doxygen 1.8.20