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 FULL_WRT_STRUCT
00039 # define FULL_WRT_STRUCT
00040
00041 #include <librevenge/librevenge.h>
00042
00043 #include "libmwaw_internal.hxx"
00044
00045 #include "MWAWDebug.hxx"
00046 #include "MWAWEntry.hxx"
00047
00049 namespace FullWrtStruct
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 {
00065 m_frameBorder.m_style=MWAWBorder::None;
00066 for (int w=0; w < 3; w++) m_type[w]=0;
00067 }
00069 static MWAWBorder getBorder(int type);
00071 void addTo(MWAWGraphicStyle &style) const;
00073 bool hasShadow() const
00074 {
00075 return m_shadowDepl[0]||m_shadowDepl[1];
00076 }
00078 bool read(shared_ptr<FullWrtStruct::Entry> zone, int fSz);
00080 std::vector<MWAWVariable<MWAWBorder> > getParagraphBorders() const;
00082 friend std::ostream &operator<<(std::ostream &o, Border const &p);
00083
00085 int m_type[3];
00087 MWAWBorder m_frameBorder;
00089 MWAWColor m_frontColor;
00091 MWAWColor m_backColor;
00093 MWAWColor m_shadowColor;
00095 MWAWVec2i m_shadowDepl;
00097 MWAWColor m_color[2];
00099 int m_flags;
00101 std::string m_extra;
00102 };
00103
00105 struct Entry : public MWAWEntry {
00106 Entry(MWAWInputStreamPtr input);
00107 ~Entry();
00108
00110 friend std::ostream &operator<<(std::ostream &o, Entry const &entry);
00111
00113 bool valid() const;
00115 void update();
00117 void closeDebugFile();
00118
00120 libmwaw::DebugFile &getAsciiFile();
00122 bool operator==(const Entry &a) const;
00124 bool operator!=(const Entry &a) const
00125 {
00126 return !operator==(a);
00127 }
00128
00130 MWAWInputStreamPtr m_input;
00132 int m_nextId;
00134 int m_type;
00136 int m_typeId;
00138 int m_values[3];
00140 librevenge::RVNGBinaryData m_data;
00142 shared_ptr<libmwaw::DebugFile> m_asciiFile;
00143 private:
00144 Entry(Entry const &);
00145 Entry &operator=(Entry const &);
00146 };
00147 typedef shared_ptr<Entry> EntryPtr;
00148
00150 struct ZoneHeader {
00152 ZoneHeader() : m_type(-1), m_docId(-1), m_fileId(-1), m_wrapping(-1), m_extra("") {}
00154 virtual ~ZoneHeader() { }
00156 bool read(shared_ptr<FullWrtStruct::Entry> zone);
00158 friend std::ostream &operator<<(std::ostream &o, ZoneHeader const &dt);
00160 int m_type;
00162 int m_docId;
00164 int m_fileId;
00166 int m_wrapping;
00168 std::string m_extra;
00169 };
00170 }
00171
00172 #endif
00173