/// <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());
         }
     }
 }