changeset 1742:6ff5d5aeb9a5

inline setNonCssHint()
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 14 Oct 2010 09:04:52 +0200
parents b35adbe0366c
children ebbf47417126
files src/styleengine.cc src/styleengine.hh
diffstat 2 files changed, 12 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/styleengine.cc	Wed Oct 13 10:33:38 2010 +0200
+++ b/src/styleengine.cc	Thu Oct 14 09:04:52 2010 +0200
@@ -135,20 +135,6 @@
 };
 
 /**
- * \brief set properties that were definded using (mostly deprecated) HTML
- *    attributes (e.g. bgColor).
- */
-void StyleEngine::setNonCssHint (CssPropertyName name, CssValueType type,
-                                 CssPropertyValue value) {
-   Node *n = stack->getRef (stack->size () - 1);
-
-   if (!n->nonCssProperties)
-      n->nonCssProperties = new CssPropertyList (true);
-  
-   n->nonCssProperties->set(name, type, value); 
-}
-
-/**
  * \brief Instruct StyleEngine to use the nonCssHints from parent element
  * This is only used for tables where nonCssHints on the TABLE-element
  * (e.g. border=1) also affect child elements like TD.
--- a/src/styleengine.hh	Wed Oct 13 10:33:38 2010 +0200
+++ b/src/styleengine.hh	Thu Oct 14 09:04:52 2010 +0200
@@ -36,8 +36,14 @@
 
       dw::core::style::Style *style0 (int i);
       dw::core::style::Style *wordStyle0 ();
-      void setNonCssHint(CssPropertyName name, CssValueType type,
-                         CssPropertyValue value);
+      inline void setNonCssHint(CssPropertyName name, CssValueType type,
+                                CssPropertyValue value) {
+         Node *n = stack->getRef (stack->size () - 1);
+
+         if (!n->nonCssProperties)
+            n->nonCssProperties = new CssPropertyList (true);
+         n->nonCssProperties->set(name, type, value); 
+      }
       void preprocessAttrs (dw::core::style::StyleAttrs *attrs);
       void postprocessAttrs (dw::core::style::StyleAttrs *attrs);
       void apply (int i, dw::core::style::StyleAttrs *attrs, CssPropertyList *props);
@@ -65,14 +71,14 @@
       void endElement (int tag);
       void setPseudoLink ();
       void setPseudoVisited ();
-      void setNonCssHint(CssPropertyName name, CssValueType type,
-                         int value) {
+      inline void setNonCssHint(CssPropertyName name, CssValueType type,
+                                int value) {
          CssPropertyValue v;
          v.intVal = value;
          setNonCssHint (name, type, v);
       }
-      void setNonCssHint(CssPropertyName name, CssValueType type,
-                         const char *value) {
+      inline void setNonCssHint(CssPropertyName name, CssValueType type,
+                                const char *value) {
          CssPropertyValue v;
          v.strVal = dStrdup(value);
          setNonCssHint (name, type, v);