![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Removing Underlines Challenge Topic Summary: Created On: 12-Feb-2004 19:15 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Removing Underlines Challenge
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.