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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef HMWK_GRAPH
00039 # define HMWK_GRAPH
00040
00041 #include <map>
00042 #include <string>
00043 #include <vector>
00044
00045 #include <libwpd/libwpd.h>
00046
00047 #include "libmwaw_internal.hxx"
00048
00049 #include "MWAWDebug.hxx"
00050 #include "MWAWInputStream.hxx"
00051
00052 namespace HMWKGraphInternal
00053 {
00054 struct Frame;
00055 struct ShapeGraph;
00056 struct FootnoteFrame;
00057 struct Group;
00058 struct PictureFrame;
00059 struct Table;
00060 struct TableCell;
00061 struct TextBox;
00062
00063 struct Picture;
00064
00065 struct State;
00066 class SubDocument;
00067 }
00068
00069 struct HMWKZone;
00070 class HMWKParser;
00071
00077 class HMWKGraph
00078 {
00079 friend class HMWKParser;
00080 friend class HMWKGraphInternal::SubDocument;
00081 friend struct HMWKGraphInternal::Table;
00082
00083 public:
00085 HMWKGraph(HMWKParser &parser);
00087 virtual ~HMWKGraph();
00088
00090 int version() const;
00091
00093 int numPages() const;
00094
00095 protected:
00096
00098 bool getColor(int colId, int patternId, MWAWColor &color) const;
00099
00101 bool sendPageGraphics(std::vector<long> const &doNotSendIds);
00103 void flushExtra();
00104
00105
00106
00107
00108
00109
00111 bool readFrames(shared_ptr<HMWKZone> zone);
00113 bool readPicture(shared_ptr<HMWKZone> zone);
00115 void prepareStructures();
00116
00117
00118
00120 bool sendFrame(long frameId, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList());
00122 bool sendPicture(long pictId, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList());
00123
00125 bool sendText(long textId, long id, bool asGraphic=false);
00128 std::map<long,int> getTextFrameInformations() const;
00129
00130
00131
00132
00133
00135 bool checkGroupStructures(long fileId, long fileSubId, std::multimap<long, long> &seens, bool inGroup);
00136
00138 bool sendPicture(HMWKGraphInternal::Picture const &picture, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList());
00140 bool sendFrame(HMWKGraphInternal::Frame const &frame, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList());
00142 bool sendShapeGraph(HMWKGraphInternal::ShapeGraph const &shape, MWAWPosition pos);
00144 bool sendPictureFrame(HMWKGraphInternal::PictureFrame const &pict, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList());
00146 bool sendEmptyPicture(MWAWPosition pos);
00148 bool sendTextBox(HMWKGraphInternal::TextBox const &textbox, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList());
00150 bool sendTableUnformatted(long fId);
00151
00153 bool sendGroup(long fId, MWAWPosition pos);
00155 bool sendGroup(HMWKGraphInternal::Group const &group, MWAWPosition pos);
00157 bool canCreateGraphic(HMWKGraphInternal::Group const &group);
00159 void sendGroupChild(HMWKGraphInternal::Group const &group, MWAWPosition const &pos);
00161 void sendGroup(HMWKGraphInternal::Group const &group, MWAWGraphicListenerPtr &listener);
00162
00164 shared_ptr<HMWKGraphInternal::ShapeGraph> readShapeGraph(shared_ptr<HMWKZone> zone, HMWKGraphInternal::Frame const &header);
00166 shared_ptr<HMWKGraphInternal::FootnoteFrame> readFootnoteFrame(shared_ptr<HMWKZone> zone, HMWKGraphInternal::Frame const &header);
00168 shared_ptr<HMWKGraphInternal::Group> readGroup(shared_ptr<HMWKZone> zone, HMWKGraphInternal::Frame const &header);
00170 shared_ptr<HMWKGraphInternal::PictureFrame> readPictureFrame(shared_ptr<HMWKZone> zone, HMWKGraphInternal::Frame const &header);
00172 shared_ptr<HMWKGraphInternal::Table> readTable(shared_ptr<HMWKZone> zone, HMWKGraphInternal::Frame const &header);
00174 shared_ptr<HMWKGraphInternal::TextBox> readTextBox(shared_ptr<HMWKZone> zone, HMWKGraphInternal::Frame const &header, bool isMemo);
00175
00176 private:
00177 HMWKGraph(HMWKGraph const &orig);
00178 HMWKGraph &operator=(HMWKGraph const &orig);
00179
00180 protected:
00181
00182
00183
00185 MWAWParserStatePtr m_parserState;
00186
00188 shared_ptr<HMWKGraphInternal::State> m_state;
00189
00191 HMWKParser *m_mainParser;
00192 };
00193 #endif
00194