Example #1
0
  void
  SVGStylable::updateChildrenStyle()
  {
    css::CSSStyleDeclaration& styleDecl = const_cast<css::CSSStyleDeclaration&>(GET_SIMPLE_VAL(Style));
    SVGElement * asElement = dynamic_cast<SVGElement*>(this);
    if(asElement) {
      dom::Node *domchild = asElement->getFirstChild();
      SVGStylable *child = dynamic_cast<SVGStylable*>(domchild);
      while (domchild) {
	if(child) {
	  //std::cerr << (void*) const_cast<css::CSSStyleDeclaration&>(child->GET_SIMPLE_VAL(Style)).getParent() << __FL__;
	  const_cast<css::CSSStyleDeclaration&>(child->GET_SIMPLE_VAL(Style)).setParent(&styleDecl);
	  //std::cerr << (void*) const_cast<css::CSSStyleDeclaration&>(child->GET_SIMPLE_VAL(Style)).getParent() << __FL__;
	}
	domchild = domchild->getNextSibling();
	child = dynamic_cast<SVGStylable*>(domchild);
      }
    }

  }