63 #ifndef STOFF_OLE_PARSER_H 64 #define STOFF_OLE_PARSER_H 69 #include <librevenge-stream/librevenge-stream.h> 102 std::vector<std::shared_ptr<OleDirectory> > &getDirectoryList();
104 std::shared_ptr<OleDirectory> getDirectory(std::string
const &dir);
128 if (m_dir.empty())
return m_base;
129 return m_dir+
"/"+m_base;
152 bool getImageData(librevenge::RVNGBinaryData &data, std::string &type)
const 154 if (m_imageData.empty()) {
164 void setImageData(librevenge::RVNGBinaryData
const &data, std::string
const &type)
192 , m_hasCompObj(false)
203 m_contentList.push_back(
OleContent(m_dir,base));
208 std::vector<std::string> res;
209 for (
auto const &c : m_contentList) {
210 if (c.isParsed())
continue;
211 res.push_back(c.getOleName());
280 std::shared_ptr<STOFFOLEParserInternal::State>
m_state;
std::string getBaseName()
returns the base name
Definition: STOFFOLEParser.hxx:121
bool isParsed() const
returns true if the object if parsed
Definition: STOFFOLEParser.hxx:132
bool m_parsed
a flag to know if the directory is parsed or not
Definition: STOFFOLEParser.hxx:230
std::string getOleName() const
returns the ole name
Definition: STOFFOLEParser.hxx:126
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: STOFFOLEParser.hxx:86
std::string m_imageType
the image type ( if known)
Definition: STOFFOLEParser.hxx:181
Definition: STOFFDebug.hxx:210
bool m_isParsed
true if the data has been parsed
Definition: STOFFOLEParser.hxx:175
This class provides all the functions an application would need to parse StarOffice documents...
Definition: STOFFDocument.hxx:55
STOFFDocument::Kind m_kind
the ole kind
Definition: STOFFOLEParser.hxx:222
STOFFInputStreamPtr m_input
the main input
Definition: STOFFOLEParser.hxx:216
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:485
librevenge::RVNGBinaryData m_imageData
the image content ( if known )
Definition: STOFFOLEParser.hxx:179
std::string m_dir
the directory
Definition: STOFFOLEParser.hxx:171
STOFFPosition m_position
the image position (if known)
Definition: STOFFOLEParser.hxx:177
bool getImageData(librevenge::RVNGBinaryData &data, std::string &type) const
returns the image data
Definition: STOFFOLEParser.hxx:152
OleContent(std::string const &dir, std::string const &base)
constructor
Definition: STOFFOLEParser.hxx:111
bool m_hasCompObj
true if the directory contains a compobj object
Definition: STOFFOLEParser.hxx:224
Low level: namespace used to define/store the data used by STOFFOLEParser.
Definition: STOFFOLEParser.cxx:93
std::string m_clipName
the compobj clipname
Definition: STOFFOLEParser.hxx:228
bool m_inUse
a flag to know if the directory is currently used
Definition: STOFFOLEParser.hxx:232
void setImageData(librevenge::RVNGBinaryData const &data, std::string const &type)
sets the image data
Definition: STOFFOLEParser.hxx:164
std::shared_ptr< STOFFOLEParserInternal::State > m_state
the class state
Definition: STOFFOLEParser.hxx:280
void addNewBase(std::string const &base)
add a new base file
Definition: STOFFOLEParser.hxx:198
std::vector< OleContent > m_contentList
the list of base name
Definition: STOFFOLEParser.hxx:220
std::string m_dir
the dir name
Definition: STOFFOLEParser.hxx:218
std::vector< std::string > getUnparsedOles() const
returns the list of unknown ole
Definition: STOFFOLEParser.hxx:206
structure use to store an object content
Definition: STOFFOLEParser.hxx:109
Kind
an enum to define the kind of document
Definition: STOFFDocument.hxx:66
STOFFPosition const & getPosition() const
return the image position
Definition: STOFFOLEParser.hxx:142
std::string m_base
the base name
Definition: STOFFOLEParser.hxx:173
OleDirectory(STOFFInputStreamPtr &input, std::string const &dir)
constructor
Definition: STOFFOLEParser.hxx:187
void setPosition(STOFFPosition const &pos)
set the image position
Definition: STOFFOLEParser.hxx:147
void setParsed(bool flag=true)
sets the parsed flag
Definition: STOFFOLEParser.hxx:137
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: STOFFPosition.hxx:47
std::string m_clsName
the compobj CLSname
Definition: STOFFOLEParser.hxx:226
Internal: internal method to keep ole directory and their content.
Definition: STOFFOLEParser.hxx:185