Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Removing RTF Control Tags from Text
Topic Summary:
Created On: 19-Dec-2005 23:29
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 19-Dec-2005 23:29
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

Hi,

When I place the contents of lets say the "Object Text" attribute into a buffer, all of the hidden RTF Control tags go into the buffer as well.

Is there any method that will clean out all of the RTF Control Tags and just put the raw text into the buffer?

-------------------------
Paul Miller
Specification Practices Specialist,
EuroCyber,
Melbourne, Australia.
Mobile: +61 (0)418 135 103
Web Site: http://www.eurocyber.biz
E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz
Report this to a Moderator Report this to a Moderator
 20-Dec-2005 09:06
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

How are you putting the attribute value into the buffer?

The following works fine:

Object o = current
Buffer buf = create

// add text inlcuding RTF markup to buffer
buf += richText o."Object Text"

// add plain text to buffer
buf += o."Object Text" ""

print stringOf(buf)

delete(buf)

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 20-Dec-2005 15:15
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You can strip all the rich text from a string by writing a function
[] Goes through all the RichTextParagraphs in the string.
[] get the text via rtp.text
[] insert an EOL before the 2nd and additional chunks.

Going through the RichText chunks of the string doesn't work since there's a bug where the rt.eol command (or whatever its called) incorroectly returns true causing such a function to insert extra EOLs where there is none.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.