63 #ifndef STOFF_OLE_PARSER_H 64 #define STOFF_OLE_PARSER_H 69 #include <librevenge-stream/librevenge-stream.h> 102 std::vector<shared_ptr<OleDirectory> > &getDirectoryList();
104 shared_ptr<OleDirectory> getDirectory(std::string
const &dir);
111 OleContent(std::string
const &dir, std::string
const &base) :
112 m_dir(dir), m_base(base), m_isParsed(false), m_position(), m_imageData(), m_imageType(
"")
123 if (m_dir.empty())
return m_base;
124 return m_dir+
"/"+m_base;
147 bool getImageData(librevenge::RVNGBinaryData &data, std::string &type)
const 149 if (m_imageData.empty()) {
159 void setImageData(librevenge::RVNGBinaryData
const &data, std::string
const &type)
183 m_hasCompObj(false), m_clsName(
""), m_clipName(
""), m_parsed(false), m_inUse(false) { }
190 m_contentList.push_back(
OleContent(m_dir,base));
195 std::vector<std::string> res;
196 for (
size_t i=0; i<m_contentList.size(); ++i) {
197 if (m_contentList[i].isParsed())
continue;
198 res.push_back(m_contentList[i].getOleName());
267 shared_ptr<STOFFOLEParserInternal::State>
m_state;
std::string getBaseName()
returns the base name
Definition: STOFFOLEParser.hxx:116
bool isParsed() const
returns true if the object if parsed
Definition: STOFFOLEParser.hxx:127
bool m_parsed
a flag to know if the directory is parsed or not
Definition: STOFFOLEParser.hxx:217
std::string getOleName() const
returns the ole name
Definition: STOFFOLEParser.hxx:121
shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:474
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:176
Definition: STOFFDebug.hxx:198
bool m_isParsed
true if the data has been parsed
Definition: STOFFOLEParser.hxx:170
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:209
STOFFInputStreamPtr m_input
the main input
Definition: STOFFOLEParser.hxx:203
librevenge::RVNGBinaryData m_imageData
the image content ( if known )
Definition: STOFFOLEParser.hxx:174
std::string m_dir
the directory
Definition: STOFFOLEParser.hxx:166
OleDirectory(STOFFInputStreamPtr input, std::string const &dir)
constructor
Definition: STOFFOLEParser.hxx:182
shared_ptr< STOFFOLEParserInternal::State > m_state
the class state
Definition: STOFFOLEParser.hxx:267
STOFFPosition m_position
the image position (if known)
Definition: STOFFOLEParser.hxx:172
bool getImageData(librevenge::RVNGBinaryData &data, std::string &type) const
returns the image data
Definition: STOFFOLEParser.hxx:147
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:211
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:215
bool m_inUse
a flag to know if the directory is currently used
Definition: STOFFOLEParser.hxx:219
void setImageData(librevenge::RVNGBinaryData const &data, std::string const &type)
sets the image data
Definition: STOFFOLEParser.hxx:159
void addNewBase(std::string const &base)
add a new base file
Definition: STOFFOLEParser.hxx:185
std::vector< OleContent > m_contentList
the list of base name
Definition: STOFFOLEParser.hxx:207
std::string m_dir
the dir name
Definition: STOFFOLEParser.hxx:205
std::vector< std::string > getUnparsedOles() const
returns the list of unknown ole
Definition: STOFFOLEParser.hxx:193
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:137
std::string m_base
the base name
Definition: STOFFOLEParser.hxx:168
void setPosition(STOFFPosition const &pos)
set the image position
Definition: STOFFOLEParser.hxx:142
void setParsed(bool flag=true)
sets the parsed flag
Definition: STOFFOLEParser.hxx:132
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:213
Internal: internal method to keep ole directory and their content.
Definition: STOFFOLEParser.hxx:180