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.
Was this topic helpful?
Document Information
Modified date:
01 May 2020
UID
swg21443634