diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-04 18:39:19 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-04 18:39:19 +0100 |
commit | ef2a0c6c92693ba98b2c2d78fe58fc3decc4d039 (patch) | |
tree | 5b639ec1f036ffb894645cf68604f8521764abec /src/styleengine.hh | |
parent | 5b731bd8a0147e6ff9f2a69339312a9a1e08ae2e (diff) |
add wordStyle() method to StyleEngine
Diffstat (limited to 'src/styleengine.hh')
-rw-r--r-- | src/styleengine.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/styleengine.hh b/src/styleengine.hh index a9440aa7..8257c994 100644 --- a/src/styleengine.hh +++ b/src/styleengine.hh @@ -11,6 +11,7 @@ class StyleEngine : public Doctree { class Node : public DoctreeNode { public: dw::core::style::Style *style; + dw::core::style::Style *wordStyle; const char *styleAttribute; bool inheritBackgroundColor; }; @@ -20,6 +21,7 @@ class StyleEngine : public Doctree { CssContext *cssContext; dw::core::style::Style *style0 (CssPropertyList *nonCssHints = NULL); + dw::core::style::Style *wordStyle0 (CssPropertyList *nonCssHints = NULL); void apply (dw::core::style::StyleAttrs *attrs, CssPropertyList *props); int computeValue (CssLength value, dw::core::style::Font *font); @@ -56,6 +58,14 @@ class StyleEngine : public Doctree { else return style0 (); }; + inline dw::core::style::Style *wordStyle () { + dw::core::style::Style *s = stack->getRef (stack->size () - 1)->wordStyle; + if (s) + return s; + else + return wordStyle0 (); + }; + }; #endif |