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 STAR_OBJECT_TEXT
00039 # define STAR_OBJECT_TEXT
00040
00041 #include <vector>
00042
00043 #include "libstaroffice_internal.hxx"
00044 #include "StarObject.hxx"
00045
00046 class StarState;
00047
00048 namespace StarObjectTextInternal
00049 {
00051 struct Zone {
00053 Zone()
00054 {
00055 }
00057 virtual ~Zone();
00059 virtual bool send(STOFFListenerPtr listener, StarState &state) const=0;
00061 virtual void inventoryPage(StarState &) const
00062 {
00063 }
00064 };
00065
00067 struct Content {
00069 Content() : m_sectionName(""), m_zoneList()
00070 {
00071 }
00073 ~Content();
00075 bool send(STOFFListenerPtr listener, StarState &state) const;
00077 void inventoryPages(StarState &state) const;
00079 librevenge::RVNGString m_sectionName;
00081 std::vector<shared_ptr<Zone> > m_zoneList;
00082 };
00083
00084 struct GraphZone;
00085 struct SectionZone;
00086 struct TextZone;
00087 struct State;
00088 }
00089
00090 class StarZone;
00091
00097 class StarObjectText : public StarObject
00098 {
00099 public:
00101 StarObjectText(StarObject const &orig, bool duplicateState);
00103 virtual ~StarObjectText();
00104
00105
00106 bool parse();
00107
00109 bool updatePageSpans(std::vector<STOFFPageSpan> &pageSpan, int &numPages);
00111 bool sendPages(STOFFTextListenerPtr listener);
00112
00114 static bool readSWImageMap(StarZone &zone);
00115
00117 bool readSWContent(StarZone &zone, shared_ptr<StarObjectTextInternal::Content> &content);
00118 protected:
00119
00120
00121
00122
00124 bool readSfxStyleSheets(STOFFInputStreamPtr input, std::string const &fileName);
00126 bool readWriterDocument(STOFFInputStreamPtr input, std::string const &fileName);
00127
00129 bool readDrawingLayer(STOFFInputStreamPtr input, std::string const &fileName);
00130
00131 protected:
00133 bool readSWGraphNode(StarZone &zone, shared_ptr<StarObjectTextInternal::GraphZone> &graphZone);
00135 bool readSWJobSetUp(StarZone &zone);
00137 bool readSWOLENode(StarZone &zone);
00139 bool readSWSection(StarZone &zone, shared_ptr<StarObjectTextInternal::SectionZone> §ion);
00141 bool readSWTextZone(StarZone &zone, shared_ptr<StarObjectTextInternal::TextZone> &textZone);
00142
00143
00144
00145
00147 shared_ptr<StarObjectTextInternal::State> m_textState;
00148 private:
00149 StarObjectText &operator=(StarObjectText const &orig);
00150 };
00151 #endif
00152