ITextRange2::Linearize method

Translates the built-up math, ruby, and other inline objects in this range to linearized form.

Syntax


HRESULT Linearize(
  [in]  long Flags
);

Parameters

Flags [in]

Type: long

A combination of the following flags.

tomMathAlphabetics
tomMathBuildDownOutermost
tomMathBuildUpArgOrZone
tomMathRemoveOutermost
tomPlain
tomTeX

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information about COM error codes, see Error Handling in COM.

Return codeDescription
E_OUTOFMEMORY

Insufficient memory.

 

Remarks

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.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

ITextRange2
ITextRange2::BuildUpMath

 

 

Community Additions

ADD
Show:
© 2014 Microsoft