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_ITEM_HXX
00039 # define STAR_ITEM_HXX
00040
00041 #include <map>
00042 #include <vector>
00043
00044 #include <libstaroffice/STOFFDocument.hxx>
00045
00046 #include "STOFFDebug.hxx"
00047
00048 class StarAttribute;
00049
00053 class StarItem
00054 {
00055 public:
00057 explicit StarItem(int which) : m_attribute(), m_which(which), m_surrogateId(0), m_localId(false)
00058 {
00059 }
00061 StarItem(shared_ptr<StarAttribute> attribute, int which) : m_attribute(attribute), m_which(which), m_surrogateId(0), m_localId(false)
00062 {
00063 }
00065 shared_ptr<StarAttribute> m_attribute;
00067 int m_which;
00069 int m_surrogateId;
00071 bool m_localId;
00072 private:
00073 StarItem(StarItem const &);
00074 StarItem &operator=(StarItem const &);
00075 };
00076
00079 class StarItemSet
00080 {
00081 public:
00083 StarItemSet() : m_style(""), m_family(0), m_whichToItemMap()
00084 {
00085 }
00087 bool empty() const
00088 {
00089 return m_whichToItemMap.empty();
00090 }
00092 bool add(shared_ptr<StarItem> item);
00094 std::string printChild() const;
00096 librevenge::RVNGString m_style;
00098 int m_family;
00100 std::map<int, shared_ptr<StarItem> > m_whichToItemMap;
00101 };
00102
00104 class StarItemStyle
00105 {
00106 public:
00108 enum FamilyStyle {
00109 F_Char=1, F_Paragraph=2, F_Frame=4, F_Page=8, F_Pseudo=0x10, F_ALL=0xFE
00110 };
00112 StarItemStyle() : m_family(0), m_mask(0), m_itemSet(), m_helpId(0)
00113 {
00114 }
00116 friend std::ostream &operator<<(std::ostream &o, StarItemStyle const &style);
00118 librevenge::RVNGString m_names[4];
00120 int m_family;
00122 int m_mask;
00124 StarItemSet m_itemSet;
00126 unsigned m_helpId;
00127 };
00128
00129 #endif
00130