IBM Support

How to insert bullets and indents using DXL

Question & Answer


Question

How can you automate bullet and indent functionality using DXL in IBM Rational DOORS?

Cause

The "bullet and indent" functionality can be accessed in Edit in Place mode by using the "Ctrl-Shift-L" key combination.
However the menu and toolbar options to add bullets use core C code, so that behavior is not available directly through DXL perms.

Answer

A DXL function named "applyTextFormattingToParagraph" can be used to insert bullets and set the indentation width.
Here is an example and description of the function:

Declaration


    string applyTextFormattingToParagraph(string s, bool addBullets, int
    indentLevel, int paraNumber)

Operation
Applies bullet and/or indent style to the given text, overwriting any existing bulleting/indenting.


    If addBullets is true, adds bullet style.
    If indentLevel is nonzero, adds indenting to the value of indentLevel.
    The units for indentLevel are twips = twentieths of a point.
    If paraNumber is zero, the formatting is applied to all the text.
    Otherwise it is only applied to the specified paragraph number.

The input string s must be rich text. For example, from string s =
richText o."Object Text".

Returns a rich text string which describes the text with the formatting
applied.

Example:


    Object o = current
    string s = o."Object text"
    o."Object text" = richText (applyTextFormattingToParagraph(richText
    s,true,0,0))


Adds bullet style to all of the current object's text.

[{"Product":{"code":"SSKR2T","label":"IBM Engineering Requirements Management DOORS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.2.0.4;9.2.0.3;9.2.0.2;9.2.0.1;9.1;9.2;9.1.0.2;9.0;8.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
01 May 2020

UID

swg21443634