I have a dxl script to format the text in the Object Text, i.e., left justify plain text, multple levels of indentation of lists and bullets, while retaining Bold Sub-and Super-script, as well as symbols. all works until I have multiple bullets in a single object. When I replace the richText in the attribute, only the last bullet is displayed.

All the parameters are correct when going into the applyTextFormattingToParagraph() function, the richText markup is identical in the bulleted and unbulleted paragraph strings in the accumulator Buffer.

Buffer Process_Rich_Paragraph(RichTextParagraph  rtp, int paraNo) {
    Buffer aPara = create
    aPara += rtp.text
    if(rtp.isBullet) {
        return applyTextFormattingToParagraph(aPara,true,360,paraNo,250)
    } else return applyTextFormattingToParagraph(aPara,false,0,paraNo,0)
    delete aPara
//Main Program
Buffer ParaAccum = create
Object o = current
RichTextParagraph  rtp
int paraNo = 0
string s = probeRichAttr_ (o, "Object Text", false)
for rtp in s do {
    if (paraNo == 0) {
        ParaAccum += Process_Rich_Paragraph (rtp, paraNo)
    } else {
        ParaAccum += "\\par\\pard"
        ParaAccum += Process_Rich_Paragraph (rtp, paraNo)
o."Object Text" = richText ParaAccum
delete ParaAccum

as a test I put three bulleted paragraphs in a single object, indented one step. the result should be that the three bulleted lines should be indented 710 twips with initial indent 360 displaying all three bulleted lines.

Actually, only the last line is bulleted.

0 Answers