Translates the built-up math, ruby, and other inline objects in the specified range to linear form.
HRESULT MathBuildDown( _Inout_ ITextRange2 *prg, _In_ ITextStrings *pstrs, _In_ long Flags );
- prg [in, out]
On input, a text range object that contains the built-up math objects to convert to linear form. On output, the object contains the linear form.
- pstrs [in]
Strings collection used for manipulations.
- Flags [in]
A combination of the following flags.
If the linearization is successful, the originally selected range is replaced by the linearized version.
If the tomMathRemoveOutermost or tomMathBuildDownOutermost build down mode is specified, the build down operation can be affected by the tomMathChangeMask values. The main purpose of these build-down modes is to facilitate transformations of the build-up math object as exposed by math context menus.
For example, to convert a stacked fraction to a linear fraction as in (a+b/c)/(u+x/y)→((a+b/c))⁄((u+x/y)), parentheses must be inserted; otherwise, you get a transformation that looks incorrect, as in (a+b/c)/(u+x/y)→(a+b/c)⁄(u+x/y), even though internally the linear fraction still has the original numerator and denominator.
The build-down process automatically inserts the parentheses, because the linear format for this case has parentheses, and the special change is made to replace the stacked-fraction operator U+002F by the linear fraction operator U+2215. Build up doesn't discard the parentheses for U+2215, but it does for U+002F.
This function is exported by the RichEdit 6.0 or later msftedit.dll.