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);
109 OleContent(std::string
const &dir, std::string
const &base) :
110 m_dir(dir), m_base(base), m_isParsed(false), m_position(), m_imageData(), m_imageType(
"")
121 if (m_dir.empty())
return m_base;
122 return m_dir+
"/"+m_base;
145 bool getImageData(librevenge::RVNGBinaryData &data, std::string &type)
const 147 if (m_imageData.empty()) {
157 void setImageData(librevenge::RVNGBinaryData
const &data, std::string
const &type)
181 m_hasCompObj(false), m_clsName(
""), m_clipName(
""), m_parsed(false), m_inUse(false) { }
188 m_contentList.push_back(
OleContent(m_dir,base));
193 std::vector<std::string> res;
194 for (
size_t i=0; i<m_contentList.size(); ++i) {
195 if (m_contentList[i].isParsed())
continue;
196 res.push_back(m_contentList[i].getOleName());
266 shared_ptr<STOFFOLEParserInternal::State>
m_state;
std::string getBaseName()
returns the base name
Definition: STOFFOLEParser.hxx:114
bool m_parsed
a flag to know if the directory is parsed or not
Definition: STOFFOLEParser.hxx:215
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:174
Definition: STOFFDebug.hxx:198
bool getImageData(librevenge::RVNGBinaryData &data, std::string &type) const
returns the image data
Definition: STOFFOLEParser.hxx:145
bool m_isParsed
true if the data has been parsed
Definition: STOFFOLEParser.hxx:168
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:207
STOFFInputStreamPtr m_input
the main input
Definition: STOFFOLEParser.hxx:201
librevenge::RVNGBinaryData m_imageData
the image content ( if known )
Definition: STOFFOLEParser.hxx:172
std::string m_dir
the directory
Definition: STOFFOLEParser.hxx:164
std::vector< std::string > getUnparsedOles() const
returns the list of unknown ole
Definition: STOFFOLEParser.hxx:191
OleDirectory(STOFFInputStreamPtr input, std::string const &dir)
constructor
Definition: STOFFOLEParser.hxx:180
shared_ptr< STOFFOLEParserInternal::State > m_state
the class state
Definition: STOFFOLEParser.hxx:266
STOFFPosition m_position
the image position (if known)
Definition: STOFFOLEParser.hxx:170
OleContent(std::string const &dir, std::string const &base)
constructor
Definition: STOFFOLEParser.hxx:109
bool m_hasCompObj
true if the directory contains a compobj object
Definition: STOFFOLEParser.hxx:209
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:213
bool m_inUse
a flag to know if the directory is currently used
Definition: STOFFOLEParser.hxx:217
std::string getOleName() const
returns the ole name
Definition: STOFFOLEParser.hxx:119
void setImageData(librevenge::RVNGBinaryData const &data, std::string const &type)
sets the image data
Definition: STOFFOLEParser.hxx:157
bool isParsed() const
returns true if the object if parsed
Definition: STOFFOLEParser.hxx:125
void addNewBase(std::string const &base)
add a new base file
Definition: STOFFOLEParser.hxx:183
std::vector< OleContent > m_contentList
the list of base name
Definition: STOFFOLEParser.hxx:205
std::string m_dir
the dir name
Definition: STOFFOLEParser.hxx:203
structure use to store an object content
Definition: STOFFOLEParser.hxx:107
Kind
an enum to define the kind of document
Definition: STOFFDocument.hxx:66
STOFFPosition const & getPosition() const
return the image position
Definition: STOFFOLEParser.hxx:135
std::string m_base
the base name
Definition: STOFFOLEParser.hxx:166
void setPosition(STOFFPosition const &pos)
set the image position
Definition: STOFFOLEParser.hxx:140
void setParsed(bool flag=true)
sets the parsed flag
Definition: STOFFOLEParser.hxx:130
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:211
Internal: internal method to keep ole directory and their content.
Definition: STOFFOLEParser.hxx:178