DOORS Strikethru Function

Several Users want to select multiple object text and strikthru all selected object text.

Is there any shotcut function (e.g. ctr s) to strikethru all the selected object text at once.

How to write a dxl that will strikethru multiple selected object text.

Any suggestion or hint is appreciated.

Thanks,

FZ
faisal.zahidi@boeing.com - Wed Sep 28 12:50:53 EDT 2011

Re: DOORS Strikethru Function
llandale - Wed Sep 28 14:34:13 EDT 2011

If you are editing a single object text (in-place-editing), I don't think there is a way to select more than one contiguous group of letters.

If you are saying that the user wants to select several objects, then strike the entire text of all of them out, then that would be a fairly simple DXL, something like this:

Buffer bufText = create()
for obj in (current Module) do
{  if (isDeleted(obj))    continue
   if (!isSelected(obj))  continue
   bufText = "{//strikeout "   // ?strikethrough?
   bufText += richTextWithOle(obj."Object Text")
   bufText += "}"
   obj."Object Text" = richText(bufText)
}
delete(bufText)


>> Seems to me there's a function that retrieves all the selected objects into a Skip list.
>> I'm sure I got the formating commands wrong and someone will please correct.
>> The IDX file that deploys the DXL into a menu can be used to define a cntrl-shortut to invoke it directly; but I've never actually done that, and someone will please fill that part in.

 

 

  • Louie

 

 

Re: DOORS Strikethru Function
Mathias Mamsch - Fri Sep 30 10:19:13 EDT 2011

I ended up just using the clipboard functions to paste stuff in from DXL at place of the selection. I think you might be able to call "Copy" from the menu. Get the text from the clipboard, annotate it, and paste it back in. Just an idea. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DOORS Strikethru Function
faisal.zahidi@boeing.com - Fri Sep 30 17:48:15 EDT 2011

llandale - Wed Sep 28 14:34:13 EDT 2011

If you are editing a single object text (in-place-editing), I don't think there is a way to select more than one contiguous group of letters.

If you are saying that the user wants to select several objects, then strike the entire text of all of them out, then that would be a fairly simple DXL, something like this:

Buffer bufText = create()
for obj in (current Module) do
{  if (isDeleted(obj))    continue
   if (!isSelected(obj))  continue
   bufText = "{//strikeout "   // ?strikethrough?
   bufText += richTextWithOle(obj."Object Text")
   bufText += "}"
   obj."Object Text" = richText(bufText)
}
delete(bufText)


>> Seems to me there's a function that retrieves all the selected objects into a Skip list.
>> I'm sure I got the formating commands wrong and someone will please correct.
>> The IDX file that deploys the DXL into a menu can be used to define a cntrl-shortut to invoke it directly; but I've never actually done that, and someone will please fill that part in.

 

 

  • Louie

 

 

I tried to run the following code but failed to strikethru selected object text.
I believe that we need to chunk the paragraph and use the RichText rt function to use the strike function.

Any suggestion is appreciated.

Second suggestion- clipboard cut/paste option is not clear to me how to implement.

FZ
Object obj
Buffer bufText = create()
for obj in (current Module) do
{ if (isDeleted(obj)) continue
if (!isSelected(obj)) continue
bufText = "{\\strike "
bufText += richTextWithOle(obj."Object Text")
bufText += "}"
obj."Object Text" = richText(bufText)
}
delete(bufText)

Re: DOORS Strikethru Function
faisal.zahidi@boeing.com - Wed Oct 26 13:10:48 EDT 2011

faisal.zahidi@boeing.com - Fri Sep 30 17:48:15 EDT 2011
I tried to run the following code but failed to strikethru selected object text.
I believe that we need to chunk the paragraph and use the RichText rt function to use the strike function.

Any suggestion is appreciated.

Second suggestion- clipboard cut/paste option is not clear to me how to implement.

FZ
Object obj
Buffer bufText = create()
for obj in (current Module) do
{ if (isDeleted(obj)) continue
if (!isSelected(obj)) continue
bufText = "{\\strike "
bufText += richTextWithOle(obj."Object Text")
bufText += "}"
obj."Object Text" = richText(bufText)
}
delete(bufText)

Here is a script how to strikethru selected object...works!!!

int strikethru(Object currObj) {
if ( null currObj ) {
ack (NLS_("promote: null object."))
return -1
}

if ( isDeleted currObj ) return level(currObj)

Buffer text = create
string s = richTextWithOle currObj.(NLS_("Object Text"))
if (length (s) > 0) {
text = (NLS_("{\\strike "))
text += richTextFragment( s )
text += (NLS_("}"))

currObj.(NLS_("Object Text")) = richText stringOf(text)
}
return 0
}
// when you move an object, you lose the current selection.
// So better build a skip list of selected objects first

Object firstObj = null
Object lastObj = null

Skip selection = create()
Object o
for o in current Module do
{ //
if ( isSelected(o) )
{ //
put(selection, o, o)

if ( null firstObj ) firstObj = o
lastObj = o
}
}

for o in selection do
{ //
strikethru(o)
}

FZ