Lo basic: ThisComponent

Hello!
Please, can someone tel me most simple example for using ThisComponent command in LO basic?

Many thanks!!!

See Andrew Pitonyak’s Useful Macro Information For OpenOffice.org chapter 3.6.9.2. ThisComponent

Good example is in the Listing 3.8: Verify that a document is a text document.

  Dim s As String
  s = "com.sun.star.text.TextDocument"
  If ThisComponent.supportsService(s) Then
    Print "The document is a text document"
  Else
    Print "The document is not a text document"
  End If

Hello!
Many thanks for the answer!!!
Please, what is .supportsService(s) meaning?

Regards, a!

supportsService