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
00039 # define STAR_OBJECT
00040
00041 #include <vector>
00042 #include <stack>
00043 #include <libstaroffice/STOFFDocument.hxx>
00044
00045 #include "STOFFDebug.hxx"
00046 #include "STOFFOLEParser.hxx"
00047
00048 #include "StarItemPool.hxx"
00049
00050 namespace StarObjectInternal
00051 {
00052 struct State;
00053 }
00054
00055 class StarAttributeManager;
00056 class StarFormatManager;
00057 class StarItemSet;
00058
00064 class StarObject
00065 {
00066 public:
00068 StarObject(char const *passwd, shared_ptr<STOFFOLEParser> oleParser, shared_ptr<STOFFOLEParser::OleDirectory> directory);
00070 virtual ~StarObject();
00071
00072
00073
00074
00075
00077 bool parse();
00079 STOFFDocument::Kind getDocumentKind() const;
00081 char const *getPassword() const
00082 {
00083 return m_password;
00084 }
00086 shared_ptr<STOFFOLEParser::OleDirectory> getOLEDirectory()
00087 {
00088 return m_directory;
00089 }
00091 shared_ptr<StarAttributeManager> getAttributeManager();
00093 shared_ptr<StarFormatManager> getFormatManager();
00095 librevenge::RVNGPropertyList const &getMetaData() const
00096 {
00097 return m_metaData;
00098 }
00100 librevenge::RVNGString getUserNameMetaData(int i) const;
00101
00103 void cleanPools();
00105 shared_ptr<StarItemPool> getNewItemPool(StarItemPool::Type type);
00109 shared_ptr<StarItemPool> findItemPool(StarItemPool::Type type, bool isInside);
00111 shared_ptr<StarItemPool> getCurrentPool(bool onlyInside=true);
00112
00114 bool readPersistData(StarZone &zone, long endPos);
00116 bool readSfxStyleSheets(STOFFInputStreamPtr input, std::string const &name);
00118 bool readItemSet(StarZone &zone, std::vector<STOFFVec2i> const &limits, long endPos,
00119 StarItemSet &itemSet, StarItemPool *pool=0, bool isDirect=false);
00120 protected:
00122 bool readPersistElements(STOFFInputStreamPtr input, std::string const &name);
00124 bool readSfxDocumentInformation(STOFFInputStreamPtr input, std::string const &name);
00126 bool readSfxPreview(STOFFInputStreamPtr input, std::string const &name);
00128 bool readSfxWindows(STOFFInputStreamPtr input, libstoff::DebugFile &ascii);
00130 bool readStarFrameworkConfigFile(STOFFInputStreamPtr input, libstoff::DebugFile &ascii);
00131
00132
00133
00134
00135 protected:
00137 StarObject(StarObject const &orig, bool duplicateState);
00139 char const *m_password;
00141 shared_ptr<STOFFOLEParser> m_oleParser;
00143 shared_ptr<STOFFOLEParser::OleDirectory> m_directory;
00144
00146 shared_ptr<StarObjectInternal::State> m_state;
00148 librevenge::RVNGPropertyList m_metaData;
00149
00150 private:
00151 StarObject(StarObject const &orig);
00152 StarObject &operator=(StarObject const &orig);
00153 };
00154
00155 #endif
00156