Beispiel #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Apply the paragraph style, that is modify the TsTextProps object that is the style
 /// of each of the selected (or partly selected) paragraphs and clear all explicit
 /// paragraph formatting.
 /// </summary>
 /// <param name="strNewVal">the name of a new style</param>
 /// <returns>
 /// Returns <c>false</c> if the paragraph properties can't be retrieved,
 /// otherwise <c>true</c>.
 /// </returns>
 /// <remarks>
 ///     <p>Formerly <c>AfVwRootSite::FormatParas</c>.</p>
 ///     <p>The functionality for the other cases when FormatParas was called still needs
 /// to be ported when we need it. They should be put in separate methods.</p>
 ///     <p>ApplyParagraphStyle begins by getting the paragraph properties from the
 /// selection. If paragraph properties cannot be retrieved through a selection,
 /// ApplyParagraphStyle returns false. If no text properties are retrieved in vttp,
 /// ApplyParagraphStyle returns true since there is nothing to do.</p>
 ///     <p>Next, immediate changes are made to paragraph properties retrieved from the
 /// selection, and the variable vttp is updated.</p>
 ///     <p>If ApplyParagraphStyle has not returned as described above, it narrows the range
 /// of TsTextProps to those that are not <c>null</c>. Then, it saves the view selection
 /// level information by calling AllTextSelInfo on the selection. To "fake" a property
 /// change, PropChanged is called on the SilDataAccess pointer. Finally, the selection
 /// is restored by a call to MakeTextSelection on the RootBox pointer.</p>
 /// </remarks>
 /// ------------------------------------------------------------------------------------
 public override bool ApplyParagraphStyle(string strNewVal)
 {
     if (m_decoratedEditingHelper != null)
     {
         return(m_decoratedEditingHelper.ApplyParagraphStyle(strNewVal));
     }
     return(base.ApplyParagraphStyle(strNewVal));
 }