aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.hh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-12-09 20:09:35 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-12-09 20:09:35 +0100
commit920fa8da6fa59cc1c993b7b0020fa121f09f04fb (patch)
tree3ff1846db93ab1bd4dfa51374b65490f06587ab6 /src/styleengine.hh
parent4dca98aacfef91d9cad0f25fd161d84be71d24b1 (diff)
use output parameter in StyleEngine::computeValue()
This way an assignment is avoided in case of an invalid or unsupported value for the given property. E.g. it is not allowed to specify a percentage for border-width.
Diffstat (limited to 'src/styleengine.hh')
-rw-r--r--src/styleengine.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/styleengine.hh b/src/styleengine.hh
index ff6c53aa..521e760e 100644
--- a/src/styleengine.hh
+++ b/src/styleengine.hh
@@ -23,8 +23,10 @@ class StyleEngine : public Doctree {
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);
- dw::core::style::Length computeLength (CssLength value, dw::core::style::Font *font);
+ void computeValue (int *dest, CssLength value, dw::core::style::Font *font);
+ void computeValue (int *dest, CssLength value, dw::core::style::Font *font,
+ int percentageBase);
+ void computeLength (dw::core::style::Length *dest, CssLength value, dw::core::style::Font *font);
public:
StyleEngine (dw::core::Layout *layout);