diff src/styleengine.hh @ 659:920e6090d6d6

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.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Tue, 09 Dec 2008 20:09:35 +0100
parents ea961706be66
children 109eaf60aea2
line wrap: on
line diff
--- a/src/styleengine.hh	Tue Dec 09 18:48:47 2008 +0100
+++ b/src/styleengine.hh	Tue Dec 09 20:09:35 2008 +0100
@@ -23,8 +23,10 @@
       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);