diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-10 19:56:36 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-10 19:56:36 +0100 |
commit | fb551355dfb2f49d56cdaab8a55ed3cb00ec7dc8 (patch) | |
tree | cfeb5ea081e99b037b0f50ea3dfc51f166958828 /src/css.hh | |
parent | b70459d1949191d86f3e420985c4b3dedc85f81a (diff) |
convert table code to new style handling
Diffstat (limited to 'src/css.hh')
-rw-r--r-- | src/css.hh | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -21,6 +21,7 @@ class CssProperty { CSS_PROPERTY_BORDER_BOTTOM_STYLE, CSS_PROPERTY_BORDER_BOTTOM_WIDTH, CSS_PROPERTY_BORDER_COLLAPSE, + CSS_PROPERTY_BORDER_COLOR, CSS_PROPERTY_BORDER_LEFT_COLOR, CSS_PROPERTY_BORDER_LEFT_STYLE, CSS_PROPERTY_BORDER_LEFT_WIDTH, @@ -28,9 +29,11 @@ class CssProperty { CSS_PROPERTY_BORDER_RIGHT_STYLE, CSS_PROPERTY_BORDER_RIGHT_WIDTH, CSS_PROPERTY_BORDER_SPACING, + CSS_PROPERTY_BORDER_STYLE, CSS_PROPERTY_BORDER_TOP_COLOR, CSS_PROPERTY_BORDER_TOP_STYLE, CSS_PROPERTY_BORDER_TOP_WIDTH, + CSS_PROPERTY_BORDER_WIDTH, CSS_PROPERTY_BOTTOM, CSS_PROPERTY_CAPTION_SIDE, CSS_PROPERTY_CLEAR, @@ -72,6 +75,7 @@ class CssProperty { CSS_PROPERTY_OUTLINE_STYLE, CSS_PROPERTY_OUTLINE_WIDTH, CSS_PROPERTY_OVERFLOW, + CSS_PROPERTY_PADDING, CSS_PROPERTY_PADDING_BOTTOM, CSS_PROPERTY_PADDING_LEFT, CSS_PROPERTY_PADDING_RIGHT, @@ -118,8 +122,15 @@ class CssProperty { }; class CssPropertyList : public lout::misc::SimpleVector <CssProperty> { + int refCount; + public: - CssPropertyList() : lout::misc::SimpleVector <CssProperty> (1) {}; + CssPropertyList() : lout::misc::SimpleVector <CssProperty> (1) { + refCount = 0; + }; + CssPropertyList(const CssPropertyList &p) : lout::misc::SimpleVector <CssProperty> (p) { + refCount = 0; + }; static CssPropertyList *parse (const char *buf); void set (CssProperty::Name name, CssProperty::Value value); @@ -134,6 +145,9 @@ class CssPropertyList : public lout::misc::SimpleVector <CssProperty> { set (name, v); }; void apply (CssPropertyList *props); + + inline void ref () { refCount++; } + inline void unref () { if(--refCount == 0) delete this; } }; /** \todo proper implementation */ |