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

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