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 Underlines Challenge
Topic Summary:
Created On: 12-Feb-2004 19:15
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.
 12-Feb-2004 19:15
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Hi -

I have this object w/this Object Text value where the highlighted words represents strikethrough text:

Before the SCAP: CDMA Channel Assigned message or C7:SCAP: CDMA RF Channel Resource Configure message is received (in between calls), the MCCce shall send idle pattern 0xAA 0x55 to the XCDR/PSI-CE.

What I want to do is remove all underlines of this object w/o removing the strikethroughs so the above string would look like this:

Before the SCAP: CDMA Channel Assigned message or C7:SCAP: CDMA RF Channel Resource Configure message is received (in between calls), the MCCce shall send idle pattern 0xAA 0x55 to the XCDR/PSI-CE.

Here is some code that I developed so far. My logic seems to be correct but my DXL is a little bit off. Could anyone give me some direction of what to do?

Thanks for any help given,



-------------------------
pete.kowalski(at)motorola.com

Edited: 12-Feb-2004 at 19:24 by Pete Kowalski
Report this to a Moderator Report this to a Moderator
 13-Feb-2004 23:19
User is offline View Users Profile Print this message


Robert Padilla

Posts: 13
Joined: 5-Jan-2004

How about something like...

Object obj = current Object
Buffer b = create
b = richText(obj."Object Text")
//print stringOf(b) "\n"
Regexp reg1 = regexp "\\\\ul.*\\\\ulnone"
if (reg1 stringOf(b)) then {
//print "\n(" (start 0) ":" (end 0) ")\n"
... with the start and stop locations you can easily remove the underline start and stop codes.
... this was just a grasp... this can be recursively on the string...
... There probably is a much simplier method
}
setempty
delete b
Report this to a Moderator Report this to a Moderator
 16-Feb-2004 16:43
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Pete,

To solve your challenge, I would use a similar technique to the one I used in our Normalize Rich Text Markup script. In this script, the rich text segments are read chunk by chunk, and then the rich text string is rebulit to you new specifications.

Comment out the following lines so that no action is taken to rebuild the strikethru text.

if ( rt.strikethru ) {
//markupPrefix = "{\\strike " markupPrefix
//markupSuffix = markupSuffix "}"
}

I have a presentation and white paper called DOORS Rich Text - Behind the Markup that I presented at the Telelogic 2003 UGC that covers the subject.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.