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 FP_MWAW_STRUCT
00039 # define FP_MWAW_STRUCT
00040
00041 #include <libwpd/libwpd.h>
00042
00043 #include "libmwaw_internal.hxx"
00044
00045 #include "MWAWDebug.hxx"
00046 #include "MWAWEntry.hxx"
00047
00049 namespace FWStruct
00050 {
00051
00052
00053 struct Entry;
00055 bool getColor(int color, MWAWColor &col);
00057 std::string getTypeName(int type);
00058
00060 struct Border {
00062 Border() :m_frameBorder(), m_frontColor(MWAWColor::black()), m_backColor(MWAWColor::white()),
00063 m_shadowColor(MWAWColor::black()), m_shadowDepl(0,0), m_flags(0), m_extra("") {
00064 m_frameBorder.m_style=MWAWBorder::None;
00065 for (int w=0; w < 3; w++) m_type[w]=0;
00066 }
00068 static MWAWBorder getBorder(int type);
00070 void addToFrame(WPXPropertyList &pList) const;
00072 bool hasShadow() const {
00073 return m_shadowDepl[0]||m_shadowDepl[1];
00074 }
00076 bool read(shared_ptr<FWStruct::Entry> zone, int fSz);
00078 std::vector<Variable<MWAWBorder> > getParagraphBorders() const;
00080 friend std::ostream &operator<<(std::ostream &o, Border const &p);
00081
00083 int m_type[3];
00085 MWAWBorder m_frameBorder;
00087 MWAWColor m_frontColor;
00089 MWAWColor m_backColor;
00091 MWAWColor m_shadowColor;
00093 Vec2i m_shadowDepl;
00095 MWAWColor m_color[2];
00097 int m_flags;
00099 std::string m_extra;
00100 };
00101
00103 struct Entry : public MWAWEntry {
00104 Entry(MWAWInputStreamPtr input);
00105 ~Entry();
00106
00108 friend std::ostream &operator<<(std::ostream &o, Entry const &entry);
00109
00111 bool valid() const;
00113 void update();
00115 void closeDebugFile();
00116
00118 libmwaw::DebugFile &getAsciiFile();
00120 bool operator==(const Entry &a) const;
00122 bool operator!=(const Entry &a) const {
00123 return !operator==(a);
00124 }
00125
00127 MWAWInputStreamPtr m_input;
00129 int m_nextId;
00131 int m_type;
00133 int m_typeId;
00135 int m_values[3];
00137 WPXBinaryData m_data;
00139 shared_ptr<libmwaw::DebugFile> m_asciiFile;
00140 private:
00141 Entry(Entry const &);
00142 Entry &operator=(Entry const &);
00143 };
00144 typedef shared_ptr<Entry> EntryPtr;
00145
00147 struct ZoneHeader {
00149 ZoneHeader() : m_type(-1), m_docId(-1), m_fileId(-1), m_wrapping(-1), m_extra("") {}
00151 virtual ~ZoneHeader() { }
00153 bool read(shared_ptr<FWStruct::Entry> zone);
00155 friend std::ostream &operator<<(std::ostream &o, ZoneHeader const &dt);
00157 int m_type;
00159 int m_docId;
00161 int m_fileId;
00163 int m_wrapping;
00165 std::string m_extra;
00166 };
00167 }
00168
00169 #endif
00170