Go to the documentation of this file.
38 #ifndef HAN_MAC_WRD_J_TEXT
39 # define HAN_MAC_WRD_J_TEXT
144 std::shared_ptr<HanMacWrdJTextInternal::State>
m_state;
PLCType m_type
PLC type.
Definition: HanMacWrdJText.cxx:95
bool readTextZone(MWAWEntry const &entry, int actZone)
try to read a text zone ( type 5 )
Definition: HanMacWrdJText.cxx:1069
bool sendZone(long zId)
send a zone
Definition: HanMacWrdJParser.cxx:200
int version() const
returns the file version
Definition: HanMacWrdJText.cxx:445
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
Definition: libmwaw_internal.hxx:401
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:166
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
bool sendMainText()
send the main text zone
Definition: HanMacWrdJText.cxx:535
std::vector< Section > m_sectionList
the list of section
Definition: HanMacWrdJText.cxx:333
Definition: MWAWFont.hxx:192
std::vector< Paragraph > m_paragraphList
the list of paragraph
Definition: HanMacWrdJText.cxx:331
std::multimap< long, PLC > m_PLCMap
the plc map
Definition: HanMacWrdJText.cxx:254
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:474
a note
Definition: libmwaw_internal.hxx:445
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:78
Definition: HanMacWrdJText.cxx:234
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
bool readFonts(MWAWEntry const &entry)
try to read the fonts zone (type 0)
Definition: HanMacWrdJText.cxx:1567
int m_type
the token type
Definition: HanMacWrdJText.cxx:148
int m_id
the indentificator
Definition: HanMacWrdJText.cxx:97
void resizeBorders(size_t newSize)
a function used to resize the borders list ( adding empty borders if needed )
Definition: MWAWParagraph.hxx:121
Definition: MWAWListener.hxx:58
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
Definition: HanMacWrdJText.cxx:233
bool canSendTextAsGraphic(long id, long cPos)
check if we can send a textzone as graphic
Definition: HanMacWrdJText.cxx:485
MWAWParserStatePtr m_parserState
the parser state
Definition: HanMacWrdJText.hxx:141
Paragraph()
Constructor.
Definition: HanMacWrdJText.cxx:266
HanMacWrdJText * m_textParser
the text parser
Definition: HanMacWrdJText.cxx:384
Position
basic position enum
Definition: libmwaw_internal.hxx:176
MWAWEntry m_entry
the main entry
Definition: HanMacWrdJText.cxx:250
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
Definition: MWAWFont.hxx:190
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
virtual ~HanMacWrdJText()
destructor
Definition: HanMacWrdJText.cxx:441
std::string m_bookmark
the bookmark string
Definition: HanMacWrdJText.cxx:390
Definition: MWAWParagraph.hxx:48
void setWidthStreching(float scale=1.0)
sets the text width streching
Definition: MWAWFont.hxx:303
friend std::ostream & operator<<(std::ostream &o, Token const &tk)
operator<<
Definition: HanMacWrdJText.cxx:115
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:155
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:109
int computeNumPages(HanMacWrdJTextInternal::TextZone const &zone)
compute the number of pages present in a zone
Definition: HanMacWrdJText.cxx:847
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:563
Definition: MWAWFont.hxx:191
void newPage(int number)
adds a new page
Definition: HanMacWrdJParser.cxx:224
void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the overline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:388
class to store the paragraph properties
Definition: MWAWParagraph.hxx:84
std::shared_ptr< HanMacWrdJTextInternal::State > m_state
the state
Definition: HanMacWrdJText.hxx:144
Definition: HanMacWrdJText.cxx:61
Section()
constructor
Definition: HanMacWrdJText.cxx:164
Definition: MWAWFont.hxx:49
bool readClassicHeader(HanMacWrdJZoneHeader &header, long endPos=-1)
try to read a header of classic zone
Definition: HanMacWrdJParser.cxx:237
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
Definition: HanMacWrdJText.cxx:351
Definition: HanMacWrdJText.cxx:234
Definition: HanMacWrdJText.cxx:61
SubDocument(HanMacWrdJText &pars, MWAWInputStreamPtr const &input, long id, long cPos=0)
constructor to call a textzone
Definition: HanMacWrdJText.cxx:354
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:125
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:41
Internal: class to store a token of a HanMacWrdJText.
Definition: HanMacWrdJText.cxx:103
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:147
Definition: MWAWParagraph.hxx:48
std::string m_bookmark
the bookmark string
Definition: HanMacWrdJText.cxx:154
State()
constructor
Definition: HanMacWrdJText.cxx:313
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
Type
enum used to define the zone type
Definition: HanMacWrdJText.cxx:233
Internal: class to store a section of a HanMacWrdJText.
Definition: HanMacWrdJText.cxx:162
Definition: libmwaw_internal.hxx:401
Definition: libmwaw_internal.hxx:401
std::map< long, int > m_idTextZoneMap
a map textId -> id in m_textZoneList
Definition: HanMacWrdJText.cxx:341
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: HanMacWrdJText.cxx:417
void setStrikeOutType(Line::Type type=Line::Single)
sets the strikeoutline type
Definition: MWAWFont.hxx:435
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:427
int m_actualPage
Definition: HanMacWrdJText.cxx:342
std::vector< long > getTokenIdList() const
returns the list of zoneId which corresponds to the token
Definition: HanMacWrdJText.cxx:466
Definition: HanMacWrdJText.cxx:233
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:484
std::vector< MWAWVariable< MWAWBorder > > m_borders
list of border ( order MWAWBorder::Pos)
Definition: MWAWParagraph.hxx:185
the main class to read the text part of HanMac Word-J file
Definition: HanMacWrdJText.hxx:62
SubDocumentType
Definition: libmwaw_internal.hxx:188
Definition: HanMacWrdJText.cxx:233
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
PLC(PLCType w=Unknown, int id=0)
constructor
Definition: HanMacWrdJText.cxx:65
Definition: MWAWFont.hxx:196
Definition: MWAWParagraph.hxx:90
MWAWVariable< int > m_breakStatus
a list of bits: 0x1 (unbreakable), 0x2 (do not break after)
Definition: MWAWParagraph.hxx:168
void updateFootnoteInformations(long const &textZId, std::vector< long > const &fPosList)
update the footnote text zone id and the list of first char position
Definition: HanMacWrdJText.cxx:915
Type m_type
the zone type
Definition: HanMacWrdJText.cxx:248
Definition: MWAWFont.hxx:191
Definition: HanMacWrdJText.cxx:233
bool m_addPageBreak
flag to store a force page break
Definition: HanMacWrdJText.cxx:302
Definition: HanMacWrdJText.cxx:61
the main class to read a HanMac Word-J file
Definition: HanMacWrdJParser.hxx:109
Definition: libmwaw_internal.hxx:176
~SubDocument() final
destructor
Definition: HanMacWrdJText.cxx:372
SubDocument(HanMacWrdJText &pars, MWAWInputStreamPtr const &input, std::string const &text)
constructor to send a string
Definition: HanMacWrdJText.cxx:362
bool readFtnPos(MWAWEntry const &entry)
try to read the footnote position
Definition: HanMacWrdJText.cxx:2284
MWAWSection getSection() const
returns a MWAWSection
Definition: HanMacWrdJText.cxx:173
PLCType
different PLC types
Definition: HanMacWrdJText.cxx:61
bool readStyles(MWAWEntry const &entry)
try to read the style zone (type 2)
Definition: HanMacWrdJText.cxx:1730
a border
Definition: libmwaw_internal.hxx:333
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:107
Definition: HanMacWrdJText.cxx:351
Internal: class to store the paragraph properties of a HanMacWrdJText.
Definition: HanMacWrdJText.cxx:264
friend std::ostream & operator<<(std::ostream &o, Section const &sec)
operator<<
Definition: HanMacWrdJText.cxx:203
Definition: libmwaw_internal.hxx:176
std::string m_extra
extra string string
Definition: HanMacWrdJText.cxx:227
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:92
Internal: the state of a HanMacWrdJText.
Definition: HanMacWrdJText.cxx:311
float size() const
returns the font size
Definition: MWAWFont.hxx:270
long m_id
the id ( to be send)
Definition: HanMacWrdJText.cxx:150
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
Definition: MWAWFont.hxx:195
bool readFontNames(MWAWEntry const &entry)
try to read the fonts name zone (type 15)
Definition: HanMacWrdJText.cxx:1650
a class which stores section properties
Definition: MWAWSection.hxx:45
std::vector< MWAWFont > m_fontList
the font list
Definition: HanMacWrdJText.cxx:329
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:82
long m_cPos
the first charecter position
Definition: HanMacWrdJText.cxx:388
int numPages() const
returns the number of pages
Definition: HanMacWrdJText.cxx:452
bool readParagraph(HanMacWrdJTextInternal::Paragraph ¶, long endPos=-1)
try to read a paragraph ( reading up to endPos if endPos is defined )
Definition: HanMacWrdJText.cxx:1875
int m_version
the file version
Definition: HanMacWrdJText.cxx:327
const T & get() const
return the current value
Definition: libmwaw_internal.hxx:628
Definition: HanMacWrdJText.cxx:233
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:406
~Paragraph() final
destructor
Definition: HanMacWrdJText.cxx:305
Type m_type
the subdocument type
Definition: HanMacWrdJText.cxx:382
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
Internal: a struct used to store a text zone.
Definition: HanMacWrdJText.cxx:231
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
long m_ftnTextId
the footnote zone id;
Definition: HanMacWrdJText.cxx:335
a field
Definition: libmwaw_internal.hxx:399
Definition: libmwaw_internal.hxx:401
uint16_t m_decimalCharacter
the decimal char
Definition: MWAWParagraph.hxx:80
Definition: MWAWParagraph.hxx:90
bool readParagraphs(MWAWEntry const &entry)
try to read the paragraphs zone (type 1)
Definition: HanMacWrdJText.cxx:2092
int m_length
the token length in caller text
Definition: HanMacWrdJText.cxx:156
HanMacWrdJText(HanMacWrdJParser &parser)
constructor
Definition: HanMacWrdJText.cxx:434
Internal: the subdocument of a HanMacWrdJText.
Definition: HanMacWrdJText.cxx:347
Internal and low level: the PLC different types and their structures of a HanMacWrdJText.
Definition: HanMacWrdJText.cxx:63
Definition: libmwaw_internal.hxx:176
HanMacWrdJText & operator=(HanMacWrdJText const &orig)=delete
long end() const
returns the end offset
Definition: MWAWEntry.hxx:87
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: HanMacWrdJText.cxx:396
Definition: libmwaw_internal.hxx:337
bool readTextZonesList(MWAWEntry const &entry)
try to read the list of textzones ( type 4)
Definition: HanMacWrdJText.cxx:921
long m_id
the id
Definition: HanMacWrdJText.cxx:225
TextZone()
constructor
Definition: HanMacWrdJText.cxx:237
Internal: the structures of a HanMacWrdJText.
Definition: HanMacWrdJText.cxx:58
bool m_parsed
true if the zone is sended
Definition: HanMacWrdJText.cxx:259
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:149
Definition: MWAWFont.hxx:49
Definition: MWAWParagraph.hxx:88
bool decodeZone(MWAWEntry const &entry, librevenge::RVNGBinaryData &data)
try to decode a zone
Definition: HanMacWrdJParser.cxx:1168
bool getColor(int colId, int patternId, MWAWColor &color) const
returns the color associated with a pattern
Definition: HanMacWrdJParser.cxx:207
Definition: libmwaw_internal.hxx:176
std::vector< long > m_ftnFirstPosList
the footnote begin positions
Definition: HanMacWrdJText.cxx:337
MWAWVariable< librevenge::RVNGUnit > m_spacingsInterlineUnit
the interline unit PERCENT or INCH, ...
Definition: MWAWParagraph.hxx:157
Definition: MWAWParagraph.hxx:90
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:555
Definition: HanMacWrdJText.cxx:234
long m_id
the file zone id
Definition: HanMacWrdJText.cxx:252
int m_numPages
Definition: HanMacWrdJText.cxx:342
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
Paragraph & operator=(Paragraph const &)=default
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:98
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: HanMacWrdJText.cxx:2377
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:130
Token()
constructor
Definition: HanMacWrdJText.cxx:105
std::vector< TextZone > m_textZoneList
the list of text zone
Definition: HanMacWrdJText.cxx:339
bool readTextToken(long endPos, HanMacWrdJTextInternal::TextZone &zone)
try to read the token in the text zone
Definition: HanMacWrdJText.cxx:1329
SubDocument & operator=(SubDocument const &orig)=delete
Definition: libmwaw_internal.hxx:176
Definition: MWAWParagraph.hxx:48
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:352
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
Definition: libmwaw_internal.hxx:447
int m_numCols
the number of column
Definition: HanMacWrdJText.cxx:219
std::string m_extra
extra string string
Definition: HanMacWrdJText.cxx:158
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
Definition: MWAWFont.hxx:51
std::vector< double > m_colWidth
the columns width
Definition: HanMacWrdJText.cxx:221
std::vector< double > m_colSep
the columns separator width
Definition: HanMacWrdJText.cxx:223
Definition: HanMacWrdJText.cxx:61
int m_localId
the local id
Definition: HanMacWrdJText.cxx:152
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:551
HanMacWrdJParser * m_mainParser
the main parser;
Definition: HanMacWrdJText.hxx:147
Definition: MWAWFont.hxx:49
Definition: MWAWParagraph.hxx:48
bool readSections(MWAWEntry const &entry)
try to read the different sections
Definition: HanMacWrdJText.cxx:2173
Class to store font.
Definition: MWAWFont.hxx:43
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:189
Definition: libmwaw_internal.hxx:401
long m_id
the subdocument id
Definition: HanMacWrdJText.cxx:386
std::string m_extra
extra data
Definition: HanMacWrdJText.cxx:99
void updateTextZoneTypes(std::map< long, int > const &idTypeMap)
update the text zone type with map id->type
Definition: HanMacWrdJText.cxx:899
Definition: HanMacWrdJText.cxx:61
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: HanMacWrdJText.cxx:70
bool sendText(long id, long cPos, MWAWListenerPtr listener=MWAWListenerPtr())
send a text zone
Definition: HanMacWrdJText.cxx:523
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
const std::string & name() const
name of the entry
Definition: MWAWEntry.hxx:152
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
std::vector< Token > m_tokenList
the tokens list
Definition: HanMacWrdJText.cxx:256
bool readFont(MWAWFont &font, long endPos=-1)
try to read the font ( reading up to endPos if endPos is defined )
Definition: HanMacWrdJText.cxx:1438
Type
the subdocument type
Definition: HanMacWrdJText.cxx:351
Definition: MWAWParagraph.hxx:88
int m_type
the type
Definition: HanMacWrdJText.cxx:300
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Mon May 13 2019 06:38:57 for libmwaw by
doxygen 1.8.16