public bool IsSameStyle(Node node) { if ((style_ == null) && (node.style_ == null)) { return(true); } if ((style_ != null) && (node.style_ == null)) { StyleAttributes styleAttributes = new StyleAttributes(); if (styleAttributes.HasSameStyle(style_)) { return(true); } } else if ((style_ == null) && (node.style_ != null)) { StyleAttributes styleAttributes = new StyleAttributes(); if (styleAttributes.HasSameStyle(node.style_)) { return(true); } } else if (((style_ != null) && (node.style_ != null)) && style_.HasSameStyle(node.style_)) { return(true); } return(false); }
public bool IsSameStyleParent() { if (parent_ != null) { if ((style_ != null) && (parent_.style_ == null)) { StyleAttributes styleAttributes = new StyleAttributes(); if (!styleAttributes.HasSameStyle(style_)) { return(true); } } else if ((style_ == null) && (parent_.style_ != null)) { StyleAttributes styleAttributes = new StyleAttributes(); if (!styleAttributes.HasSameStyle(parent_.style_)) { return(true); } } else if (((style_ != null) && (parent_.style_ != null)) && !parent_.style_.HasSameStyle(style_)) { if (parent_.type_.type == ElementType.Math) { StyleAttributes styleAttributes = new StyleAttributes(); if (styleAttributes.HasSameStyle(style_)) { return(false); } } return(true); } } return(false); }