Go to the documentation of this file.
38 #ifndef HAN_MAC_WRD_K_TEXT
39 # define HAN_MAC_WRD_K_TEXT
103 bool readStyles(std::shared_ptr<HanMacWrdKZone> zone);
105 bool readSections(std::shared_ptr<HanMacWrdKZone> zone);
138 std::shared_ptr<HanMacWrdKTextInternal::State>
m_state;
bool valid() const
returns true if the zone data exists
Definition: HanMacWrdKParser.hxx:83
static Section getSection(const State &state, const long id)
Definition: HanMacWrdKText.cxx:272
@ Time
Definition: libmwaw_internal.hxx:401
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
@ reverseVideoBit
Definition: MWAWFont.hxx:192
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
the main class to read a HanMac Word-K file
Definition: HanMacWrdKParser.hxx:186
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:78
int m_type
the type
Definition: HanMacWrdKText.cxx:96
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
void resizeBorders(size_t newSize)
a function used to resize the borders list ( adding empty borders if needed )
Definition: MWAWParagraph.hxx:122
@ ColumnBreak
Definition: MWAWListener.hxx:58
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
bool canSendTextAsGraphic(long id, long subId)
check if we can send a textzone as graphic
Definition: HanMacWrdKText.cxx:519
libmwaw::DebugFile & ascii() const
returns the debug file
Definition: HanMacWrdKParser.hxx:133
Position
basic position enum
Definition: libmwaw_internal.hxx:176
int m_numPages
Definition: HanMacWrdKText.cxx:265
long m_id
the zone id
Definition: HanMacWrdKParser.hxx:142
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
@ boldBit
Definition: MWAWFont.hxx:190
Token & operator=(Token const &)=default
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
@ CENTER
Definition: MWAWParagraph.hxx:48
the main class to read the text part of HanMac Word file
Definition: HanMacWrdKText.hxx:62
void setWidthStreching(float scale=1.0)
sets the text width streching
Definition: MWAWFont.hxx:303
std::string name() const
returns the zone name
Definition: HanMacWrdKParser.hxx:122
void setProperty(HanMacWrdKTextInternal::Paragraph const ¶, float width)
send the ruler properties
Definition: HanMacWrdKText.cxx:1209
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:109
@ outlineBit
Definition: MWAWFont.hxx:191
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
friend std::ostream & operator<<(std::ostream &o, Token const &tkn)
operator<<
Definition: HanMacWrdKText.cxx:190
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
@ Simple
Definition: MWAWFont.hxx:49
@ None
Definition: libmwaw_internal.hxx:335
int version() const
returns the file version
Definition: HanMacWrdKText.cxx:297
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
bool readSections(std::shared_ptr< HanMacWrdKZone > zone)
try to read a section info zone (type 4)
Definition: HanMacWrdKText.cxx:1481
friend std::ostream & operator<<(std::ostream &o, Section const &sec)
operator<<
Definition: HanMacWrdKText.cxx:147
Internal: class to store a section of a HanMacWrdKText.
Definition: HanMacWrdKText.cxx:106
std::vector< double > m_colSep
the columns separator width
Definition: HanMacWrdKText.cxx:167
void newPage(int number)
adds a new page
Definition: HanMacWrdKParser.cxx:206
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
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
int m_type
the type
Definition: HanMacWrdKText.cxx:231
@ DECIMAL
Definition: MWAWParagraph.hxx:48
std::shared_ptr< HanMacWrdKTextInternal::State > m_state
the state
Definition: HanMacWrdKText.hxx:138
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
@ PageCount
Definition: libmwaw_internal.hxx:401
long m_id
the identificator
Definition: HanMacWrdKText.cxx:233
@ Date
Definition: libmwaw_internal.hxx:401
Internal: the state of a HanMacWrdKText.
Definition: HanMacWrdKText.cxx:240
std::vector< long > const & getTokenIdList() const
returns the list of zoneId which corresponds to the token
Definition: HanMacWrdKText.cxx:322
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
bool readParagraph(HanMacWrdKZone const &zone, HanMacWrdKTextInternal::Paragraph ¶) const
try to read a paragraph in a text zone
Definition: HanMacWrdKText.cxx:1215
@ NoBreakBit
Definition: MWAWParagraph.hxx:88
bool readFontNames(std::shared_ptr< HanMacWrdKZone > zone)
try to read the fonts name zone (type 5)
Definition: HanMacWrdKText.cxx:1021
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:186
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
bool readToken(HanMacWrdKZone const &zone, HanMacWrdKTextInternal::Token &token) const
try to read an token in a text zone
Definition: HanMacWrdKText.cxx:1436
State()
constructor
Definition: HanMacWrdKText.cxx:242
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
std::multimap< long, std::shared_ptr< HanMacWrdKZone > > m_IdTextMaps
the map of id -> text zone
Definition: HanMacWrdKText.cxx:258
void getHeaderFooterId(long &headerId, long &footerId) const
return sthe header/footer id
Definition: HanMacWrdKText.cxx:316
void updateTextZoneTypes(std::map< long, int > const &idTypeMap)
update the text zone type with map id->type
Definition: HanMacWrdKText.cxx:327
@ boxedRoundedBit
Definition: MWAWFont.hxx:196
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWVariable< int > m_breakStatus
a list of bits: 0x1 (unbreakable), 0x2 (do not break after)
Definition: MWAWParagraph.hxx:169
std::vector< long > m_tokenIdList
the token id list
Definition: HanMacWrdKText.cxx:262
@ shadowBit
Definition: MWAWFont.hxx:191
Section()
constructor
Definition: HanMacWrdKText.cxx:108
@ Bottom
Definition: libmwaw_internal.hxx:176
bool readTextZone(std::shared_ptr< HanMacWrdKZone > zone)
try to read a text zone (type 1)
Definition: HanMacWrdKText.cxx:452
int numPages() const
returns the number of pages
Definition: HanMacWrdKText.cxx:304
int m_version
the file version
Definition: HanMacWrdKText.cxx:256
long end() const
returns the last position in the input
Definition: HanMacWrdKParser.hxx:72
HanMacWrdKText(HanMacWrdKParser &parser)
constructor
Definition: HanMacWrdKText.cxx:286
a border
Definition: libmwaw_internal.hxx:333
int computeNumPages(HanMacWrdKZone const &zone) const
compute the number of pages present in a zone
Definition: HanMacWrdKText.cxx:353
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:108
@ VMiddle
Definition: libmwaw_internal.hxx:176
std::vector< double > m_colWidth
the columns width
Definition: HanMacWrdKText.cxx:165
std::map< long, Section > m_sectionList
the list of section
Definition: HanMacWrdKText.cxx:264
float size() const
returns the font size
Definition: MWAWFont.hxx:270
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
@ boxedBit
Definition: MWAWFont.hxx:195
a class which stores section properties
Definition: MWAWSection.hxx:46
~Token()
destructor
Definition: HanMacWrdKText.cxx:186
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 first position in the input
Definition: HanMacWrdKParser.hxx:67
MWAWParserStatePtr m_parserState
the parser state
Definition: HanMacWrdKText.hxx:135
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:406
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool sendText(long id, long subId, MWAWListenerPtr listener=MWAWListenerPtr())
send a text zone
Definition: HanMacWrdKText.cxx:532
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
uint16_t m_decimalCharacter
the decimal char
Definition: MWAWParagraph.hxx:80
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
std::map< long, int > m_IdTypeMaps
the zone frame type if known
Definition: HanMacWrdKText.cxx:260
MWAWInputStreamPtr m_input
the main input
Definition: HanMacWrdKParser.hxx:148
long m_id
the id
Definition: HanMacWrdKText.cxx:169
@ Top
Definition: libmwaw_internal.hxx:176
Internal: class to store the paragraph properties of a HanMacWrdKText.
Definition: HanMacWrdKText.cxx:60
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
bool readStyles(std::shared_ptr< HanMacWrdKZone > zone)
try to read the style zone (type 3)
Definition: HanMacWrdKText.cxx:1082
long m_footerId
the footer text zone id or 0
Definition: HanMacWrdKText.cxx:269
@ Double
Definition: libmwaw_internal.hxx:337
Paragraph()
Constructor.
Definition: HanMacWrdKText.cxx:62
virtual ~HanMacWrdKText()
destructor
Definition: HanMacWrdKText.cxx:293
@ italicBit
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
@ Dot
Definition: MWAWFont.hxx:49
Defines MWAWTextListener: the libmwaw word processor listener.
int m_numCols
the number of column
Definition: HanMacWrdKText.cxx:163
bool readFont(HanMacWrdKZone const &zone, MWAWFont &font) const
try to read a font in a text zone
Definition: HanMacWrdKText.cxx:896
@ Right
Definition: libmwaw_internal.hxx:176
std::string m_extra
extra data, mainly for debugging
Definition: HanMacWrdKText.cxx:235
MWAWVariable< librevenge::RVNGUnit > m_spacingsInterlineUnit
the interline unit PERCENT or INCH, ...
Definition: MWAWParagraph.hxx:158
@ JustificationFull
Definition: MWAWParagraph.hxx:90
Internal: the structures of a HanMacWrdKText.
Definition: HanMacWrdKText.cxx:58
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
Internal: class to store the token properties of a HanMacWrdKText.
Definition: HanMacWrdKText.cxx:175
bool getColor(int colId, int patternId, MWAWColor &color) const
returns the color associated with a pattern
Definition: HanMacWrdKParser.cxx:189
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
long fileBeginPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:91
~Paragraph() final
destructor
Definition: HanMacWrdKText.cxx:101
Token()
Constructor.
Definition: HanMacWrdKText.cxx:177
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: HanMacWrdKText.cxx:1584
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:130
bool m_addPageBreak
flag to store a force page break
Definition: HanMacWrdKText.cxx:98
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
bool sendMainText()
send the main text zone
Definition: HanMacWrdKText.cxx:549
@ Left
Definition: libmwaw_internal.hxx:176
@ BAR
Definition: MWAWParagraph.hxx:48
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:352
HanMacWrdKText(HanMacWrdKText const &orig)=delete
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
Paragraph & operator=(Paragraph &&)=default
int m_actualPage
Definition: HanMacWrdKText.cxx:265
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
@ Double
Definition: MWAWFont.hxx:51
long m_headerId
the header text zone id or 0
Definition: HanMacWrdKText.cxx:267
MWAWSection getSection() const
returns a MWAWSection
Definition: HanMacWrdKText.cxx:117
std::string m_extra
extra string string
Definition: HanMacWrdKText.cxx:171
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Token & operator=(Token &&)=default
Small class used to store the decoded zone of HanMacWrdKParser.
Definition: HanMacWrdKParser.hxx:58
bool sendZone(long zId)
send a zone
Definition: HanMacWrdKParser.cxx:182
bool m_parsed
true if the zone is sended
Definition: HanMacWrdKParser.hxx:154
@ Dash
Definition: MWAWFont.hxx:49
@ RIGHT
Definition: MWAWParagraph.hxx:48
Class to store font.
Definition: MWAWFont.hxx:44
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
@ Title
Definition: libmwaw_internal.hxx:401
HanMacWrdKParser * m_mainParser
the main parser;
Definition: HanMacWrdKText.hxx:141
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
@ NoBreakWithNextBit
Definition: MWAWParagraph.hxx:88
HanMacWrdKText & operator=(HanMacWrdKText const &orig)=delete
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
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
long length() const
returns the zone size
Definition: HanMacWrdKParser.hxx:77
Paragraph & operator=(Paragraph const &)=default
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20