HandleInheritance() public method

public HandleInheritance ( ) : void
return void
 /**
 * Register a RtfParagraphStyle with this RtfStylesheetList.
 *
 * @param rtfParagraphStyle The RtfParagraphStyle to add.
 */
 public void RegisterParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
 {
     RtfParagraphStyle tempStyle = new RtfParagraphStyle(this.document, rtfParagraphStyle);
     tempStyle.SetStyleNumber(this.styleMap.Count);
     tempStyle.HandleInheritance();
     this.styleMap[tempStyle.GetStyleName()] = tempStyle;
 }
        /// <summary>
        /// Register a RtfParagraphStyle with this RtfStylesheetList.
        /// </summary>
        /// <param name="rtfParagraphStyle">The RtfParagraphStyle to add.</param>
        public void RegisterParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
        {
            RtfParagraphStyle tempStyle = new RtfParagraphStyle(Document, rtfParagraphStyle);

            tempStyle.HandleInheritance();
            tempStyle.SetStyleNumber(_styleMap.Count);
            _styleMap[tempStyle.GetStyleName()] = tempStyle;
        }
 /// <summary>
 /// Handles the inheritance of paragraph style settings. All settings that
 /// have not been modified will be inherited from the base RtfParagraphStyle.
 /// If this RtfParagraphStyle is not based on another one, then nothing happens.
 /// </summary>
 public void HandleInheritance()
 {
     if (_basedOnName != null && Document.GetDocumentHeader().GetRtfParagraphStyle(_basedOnName) != null)
     {
         _baseStyle = Document.GetDocumentHeader().GetRtfParagraphStyle(_basedOnName);
         _baseStyle.HandleInheritance();
         if (!((_modified & ModifiedAlignment) == ModifiedAlignment))
         {
             _alignment = _baseStyle.GetAlignment();
         }
         if (!((_modified & ModifiedIndentLeft) == ModifiedIndentLeft))
         {
             _indentLeft = _baseStyle.GetIndentLeft();
         }
         if (!((_modified & ModifiedIndentRight) == ModifiedIndentRight))
         {
             _indentRight = _baseStyle.GetIndentRight();
         }
         if (!((_modified & ModifiedSpacingBefore) == ModifiedSpacingBefore))
         {
             _spacingBefore = _baseStyle.GetSpacingBefore();
         }
         if (!((_modified & ModifiedSpacingAfter) == ModifiedSpacingAfter))
         {
             _spacingAfter = _baseStyle.GetSpacingAfter();
         }
         if (!((_modified & ModifiedFontName) == ModifiedFontName))
         {
             SetFontName(_baseStyle.GetFontName());
         }
         if (!((_modified & ModifiedFontSize) == ModifiedFontSize))
         {
             Size = _baseStyle.GetFontSize();
         }
         if (!((_modified & ModifiedFontStyle) == ModifiedFontStyle))
         {
             SetStyle(_baseStyle.GetFontStyle());
         }
         if (!((_modified & ModifiedFontColor) == ModifiedFontColor))
         {
             SetColor(_baseStyle.Color);
         }
         if (!((_modified & ModifiedLineLeading) == ModifiedLineLeading))
         {
             SetLineLeading(_baseStyle.GetLineLeading());
         }
         if (!((_modified & ModifiedKeepTogether) == ModifiedKeepTogether))
         {
             SetKeepTogether(_baseStyle.GetKeepTogether());
         }
         if (!((_modified & ModifiedKeepTogetherWithNext) == ModifiedKeepTogetherWithNext))
         {
             SetKeepTogetherWithNext(_baseStyle.GetKeepTogetherWithNext());
         }
     }
 }