Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef WPS8_GRAPH
00027 # define WPS8_GRAPH
00028
00029 #include <list>
00030 #include <vector>
00031
00032 #include "libwps_internal.h"
00033
00034 #include "WPSDebug.h"
00035
00036 struct WPSOLEParserObject;
00037 class WPS8Parser;
00038
00039 namespace WPS8GraphInternal
00040 {
00041 struct State;
00042 }
00043
00054 class WPS8Graph
00055 {
00056 friend class WPS8Parser;
00057 public:
00059 WPS8Graph(WPS8Parser &parser);
00060
00062 ~WPS8Graph();
00063
00065 void setListener(WPSContentListenerPtr &listen)
00066 {
00067 m_listener = listen;
00068 }
00069
00074 void computePositions() const;
00075
00077 int numPages() const;
00078
00083 bool sendObject(WPSPosition const &pos, int id, bool ole);
00084
00086 bool sendIBGF(WPSPosition const &pos, int ibgfId);
00087
00095 void sendObjects(int page, int pageToIgnore=-2);
00096
00097 protected:
00099 int version() const;
00100
00104 void sendBorder(int borderId);
00105
00107 void storeObjects(std::vector<WPSOLEParserObject> const &objects,
00108 std::vector<int> const &ids);
00109
00111 bool readStructures(RVNGInputStreamPtr input);
00112
00113
00114
00118 bool readPICT(RVNGInputStreamPtr input, WPSEntry const &entry);
00119
00124 bool readIBGF(RVNGInputStreamPtr input, WPSEntry const &entry);
00125
00127 bool readBDR(RVNGInputStreamPtr input, WPSEntry const &entry);
00128
00132 bool readMetaFile(RVNGInputStreamPtr input, long endPos, librevenge::RVNGBinaryData &pict);
00133
00135 libwps::DebugFile &ascii()
00136 {
00137 return m_asciiFile;
00138 }
00139 private:
00140 WPS8Graph(WPS8Graph const &orig);
00141 WPS8Graph &operator=(WPS8Graph const &orig);
00142
00143 protected:
00145 WPSContentListenerPtr m_listener;
00146
00148 WPS8Parser &m_mainParser;
00149
00151 mutable shared_ptr<WPS8GraphInternal::State> m_state;
00152
00154 libwps::DebugFile &m_asciiFile;
00155 };
00156
00157 #endif
00158