Go to the documentation of this file.
28 #include <librevenge-stream/librevenge-stream.h>
56 void parse(librevenge::RVNGTextInterface *documentInterface)
override;
65 std::shared_ptr<WPSContentListener>
createListener(librevenge::RVNGTextInterface *interface);
103 std::shared_ptr<PocketWordParserInternal::State>
m_state;
std::shared_ptr< PocketWordParserInternal::State > m_state
the main state
Definition: PocketWord.h:103
int m_version
the file version
Definition: PocketWord.cpp:102
bool readParagraphUnkn(WPSEntry const &entry)
try to read a paragraph unknown zone: tabs, link?
Definition: PocketWord.cpp:902
bool readUnkn8(WPSEntry const &entry)
try to read the unknown zone 8: one by file, maybe prefs
Definition: PocketWord.cpp:1158
WPSEntry getEntry(int id, int &type) const
returns an entry corresponding to a file identificator
Definition: PocketWord.cpp:70
std::shared_ptr< WPSContentListener > m_listener
the listener (if set)
Definition: PocketWord.h:101
libwps::Justification m_justify
the justification
Definition: WPSParagraph.h:116
#define WPS_STRIKEOUT_BIT
Definition: libwps_internal.h:507
int m_listLevelIndex
the actual level index
Definition: WPSParagraph.h:121
static std::string str()
Definition: WPSDebug.h:200
static bool open(std::string const &)
Definition: WPSDebug.h:215
WPSPageSpan m_pageSpan
the page span
Definition: PocketWord.cpp:116
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
static void addPos(long)
Definition: WPSDebug.h:220
long end() const
returns the end offset
Definition: WPSEntry.h:78
bool dumpFile(librevenge::RVNGBinaryData &, char const *)
Definition: WPSDebug.h:180
void setLength(long l)
sets the zone size
Definition: WPSEntry.h:62
double m_margins[3]
the margins
Definition: WPSParagraph.h:101
bool readSound(WPSEntry const &entry, WPSEmbeddedObject &object)
try to read a sound definition (maybe a picture)
Definition: PocketWord.cpp:1009
bool readParagraphDims(WPSEntry const &entry)
try to read a paragraph dimensions' zone which follows the paragraph zone
Definition: PocketWord.cpp:859
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
@ BULLET
Definition: libwps_internal.h:246
static void reset()
Definition: WPSDebug.h:224
void setMarginRight(const double marginRight)
Definition: WPSPageSpan.h:134
static void skipZone(long, long)
Definition: WPSDebug.h:226
~PocketWordParser() override
destructor
Definition: PocketWord.cpp:132
#define WPS_REVERSEVIDEO_BIT
Definition: libwps_internal.h:511
PocketWordParser(const PocketWordParser &)=delete
define the font properties
Definition: WPSFont.h:37
@ Char
Definition: WPSPosition.h:43
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:89
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
bool readSoundData(WPSEntry const &entry, long pictSize, WPSEmbeddedObject &object)
try to read a sound data (maybe a picture)
Definition: PocketWord.cpp:1117
std::map< int, librevenge::RVNGString > m_idToFontNameMap
the correspondance between index and font name
Definition: PocketWord.cpp:118
ListLevel m_listLevel
the actual level
Definition: WPSParagraph.h:123
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:39
Definition: WPSParser.h:36
void setId(int i)
sets the id
Definition: WPSEntry.h:163
std::shared_ptr< WPSContentListener > createListener(librevenge::RVNGTextInterface *interface)
creates the main listener
Definition: PocketWord.cpp:150
libwps::NumberingType m_type
the type of the level
Definition: WPSList.h:98
void parse(librevenge::RVNGTextInterface *documentInterface) override
called by WPSDocument to parse the file
Definition: PocketWord.cpp:181
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: WPSPosition.h:214
Definition: libwps_internal.h:152
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
WPSColor m_color
the font color
Definition: WPSFont.h:91
class to store the paragraph properties
Definition: WPSParagraph.h:58
void setBegin(long off)
sets the begin offset
Definition: WPSEntry.h:57
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string ( with correct encoding ).
Definition: libwps_internal.cpp:836
bool sendParagraph(size_t paraId)
try to read and send a paragraph
Definition: PocketWord.cpp:535
bool checkFilePosition(long pos) const
check if the file position is correct or not
Definition: PocketWord.cpp:136
void checkUnparsed()
try to parse the unparsed zones
Definition: PocketWord.cpp:278
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:87
bool readFontNames(WPSEntry const &entry)
try to read the font names
Definition: PocketWord.cpp:347
libwps_tools_win::Font::Type m_encoding
the file encoding
Definition: PocketWord.cpp:104
the state of PocketWord
Definition: PocketWord.cpp:51
static void addNote(char const *)
Definition: WPSDebug.h:221
RVNGInputStreamPtr & getInput()
Definition: WPSParser.h:47
std::map< int, size_t > m_idToEntryMap
the file id to (type, entry) index
Definition: PocketWord.cpp:111
long begin() const
returns the begin offset
Definition: WPSEntry.h:73
double m_size
font size
Definition: WPSFont.h:85
bool readPageDims(WPSEntry const &entry)
try to read the page dimension
Definition: PocketWord.cpp:436
small class use to define a embedded object
Definition: libwps_internal.h:1077
int id() const
returns the entry id
Definition: WPSEntry.h:158
void setMarginTop(const double marginTop)
Definition: WPSPageSpan.h:138
long length() const
returns the length of the zone
Definition: WPSEntry.h:83
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
bool m_badFile
some file does not respect the unique indice conditions, ...
Definition: PocketWord.cpp:106
Definition: WPSDebug.h:192
This class parses some Pocket Word.
Definition: PocketWord.h:46
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
long m_eof
the last file position
Definition: PocketWord.cpp:100
void setMarginBottom(const double marginBottom)
Definition: WPSPageSpan.h:142
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: PocketWord.cpp:1238
bool createZones()
try to read the different zones
Definition: PocketWord.cpp:221
libwps::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: WPSParser.h:65
bool readUnkn2021(WPSEntry const &entry, int type)
try to read the unknown zone 20 and 21: one by file, find always no data, maybe style
Definition: PocketWord.cpp:1199
Definition: WPSPageSpan.h:39
bool readData(RVNGInputStreamPtr &input, unsigned long size, librevenge::RVNGBinaryData &data)
try to read sz bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:332
friend class PocketWordParserInternal::SubDocument
Definition: PocketWord.h:47
bool getColor(int id, WPSColor &col) const
try to retrieve a color
Definition: PocketWord.cpp:85
std::map< int, std::vector< size_t > > m_typeToEntryMap
a type to a list of (type,entry) indices
Definition: PocketWord.cpp:113
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
librevenge::RVNGString m_bullet
the bullet if we have an bullet level
Definition: WPSList.h:101
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:40
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
the class to store a color
Definition: libwps_internal.h:281
double m_labelIndent
the list indent
Definition: WPSList.h:93
Definition: PocketWord.cpp:47
PocketWordParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN)
constructor
Definition: PocketWord.cpp:124
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: WPSEntry.h:120
bool readParagraphList(WPSEntry const &entry, std::vector< int > ¶Id)
try to read a paragraph list
Definition: PocketWord.cpp:959
@ JustificationCenter
Definition: libwps_internal.h:249
void setMarginLeft(const double marginLeft)
Definition: WPSPageSpan.h:130
void sendData()
try to send all the data
Definition: PocketWord.cpp:1290
@ JustificationRight
Definition: libwps_internal.h:250
PocketWordParser & operator=(const PocketWordParser &)=delete
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
std::vector< std::pair< int, WPSEntry > > m_typeEntryList
the list of type, entry
Definition: PocketWord.cpp:109
static void setStream(RVNGInputStreamPtr)
Definition: WPSDebug.h:212
State(libwps_tools_win::Font::Type encoding)
constructor
Definition: PocketWord.cpp:53
Generated on Sun Sep 6 2020 13:16:59 for libwps by
doxygen 1.8.20