Auxiliary functions for TxtPosDesc methods

Build 1501 on 14/Nov/2017  This topic last edited on: 9/May/2012, at 13:02

Folllowing functions may be used as auxiliary, when dealing with TxtPosDesc. Note: these functions require specific constants. See Constants for TxtPosDesc functions.

' HasTS: true if the text postion description object has a

' complete text status set of valid properties

'

Function HasTS(objDesc)

  HasTS = (objDesc.GetType = tptText)

End Function

 

' IsCmd: true if the text postion description object is 

' a markup command

'

Function IsCmd(objDesc)

  IsCmd = (objDesc.GetType = tptInCmd Or objDesc.GetType = tptStartCmd Or objdesc.Type = tptEndCmd)

End Function

 

' HasChar: true if the text postion description object has a valid character 

' property value

'

Function HasChar(objDesc)

  HasChar = (objDesc.GetType = tptInCmd Or objDesc.GetType = tptText Or objDesc.GetType = tptInExtCmd)

End Function

 

' HasMS: true if the text postion description object has a

' complete material status set of valid properties

'

Function HasMS(objDesc)

  If HasTS(objDesc) Then 

    HasMS = True

  ElseIf IsCmd(objDesc) Then

    HasMS = (objDesc.GetJustElementType <> jeleNone)

  Else

    HasMS = False

  End If

End Function