LibreOffice: XSmartTagAction Interface Reference

LibreOffice LibreOffice 26.2 SDK API Reference

Loading...
Searching...
No Matches
XSmartTagAction Interface Reference

provides access to smart tag actions. More...

`import "XSmartTagAction.idl";`

Inheritance diagram for XSmartTagAction:

## Public Member Functions
string | getName ([in] ::com::sun::star::lang::Locale aLocale)
| obtains a name that describes this action component.
string | getDescription ([in] ::com::sun::star::lang::Locale aLocale)
| obtains a detailed description of this action component.
string | getSmartTagName ([in] long nSmartTagIndex) raises ( com::sun::star::lang::IndexOutOfBoundsException )
| obtains the name of one specific smart tag type supported by this action component.
string | getSmartTagCaption ([in] long nSmartTagIndex, [in] ::com::sun::star::lang::Locale aLocale) raises ( com::sun::star::lang::IndexOutOfBoundsException )
| obtains the caption of the smart tag type for using in user interfaces.
long | getActionCount ([in] string aSmartTagName, [in] com::sun::star::frame::XController xController, [in] com::sun::star::container::XStringKeyMap xProperties)
| obtains the number of actions provided for a specified smart tag type.
long | getActionID ([in] string aSmartTagName, [in] long nActionIndex, [in] com::sun::star::frame::XController xController) raises ( com::sun::star::lang::IllegalArgumentException )
| obtains a unique integer identifier for an action.
string | getActionCaptionFromID ([in] long nActionID, [in] string aApplicationName, [in] ::com::sun::star::lang::Locale aLocale, [in] com::sun::star::container::XStringKeyMap xProperties, [in] string aText, [in] string aXML, [in] com::sun::star::frame::XController xController, [in] com::sun::star::text::XTextRange xTarget) raises ( com::sun::star::lang::IllegalArgumentException )
| obtains a caption for a specified action for use in user interfaces.
string | getActionNameFromID ([in] long nActionID, [in] com::sun::star::frame::XController xController) raises ( com::sun::star::lang::IllegalArgumentException )
| obtains a language independent name of an action.
void | invokeAction ([in] long nActionID, [in] string aApplicationName, [in] com::sun::star::frame::XController xController, [in] com::sun::star::text::XTextRange xTarget, [in] com::sun::star::container::XStringKeyMap xProperties, [in] string aText, [in] string aXML, [in] ::com::sun::star::lang::Locale aLocale) raises ( com::sun::star::lang::IllegalArgumentException )
| invokes an action.
boolean | isCaptionDynamic ([in] long nActionID, [in] string aApplicationName, [in] com::sun::star::frame::XController xController, [in] ::com::sun::star::lang::Locale aLocale) raises ( com::sun::star::lang::IllegalArgumentException )
| determines whether a caption is dynamic.
boolean | isShowSmartTagIndicator ([in] long nActionID, [in] string aApplicationName, [in] com::sun::star::frame::XController xController, [in] ::com::sun::star::lang::Locale aLocale) raises ( com::sun::star::lang::IllegalArgumentException )
| determines whether the smart tag indicator should be visible.
Public Member Functions inherited from XInitialization
void | initialize ([in] sequence< any > aArguments) raises ( com::sun::star::uno::Exception )
| initializes the object.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Public Attributes
long | SmartTagCount
| the number of smart tag types supported by this action component.

## Detailed Description

provides access to smart tag actions.

Since
  OOo 2.3

## Member Function Documentation

## ◆ getActionCaptionFromID()

string getActionCaptionFromID | ( | [in] long | nActionID,
|  | [in] string | aApplicationName,
|  | [in] ::com::sun::star::lang::Locale | aLocale,
|  | [in] com::sun::star::container::XStringKeyMap | xProperties,
|  | [in] string | aText,
|  | [in] string | aXML,
|  | [in] com::sun::star::frame::XController | xController,
|  | [in] com::sun::star::text::XTextRange | xTarget )
raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |

obtains a caption for a specified action for use in user interfaces.

Parameters

  nActionID | The identifier of the requested action.
  aApplicationName | A string containing the name of the calling application.
  aLocale | Is used for localization of the caption.
  xProperties | Contains additional smart tag properties collected by the smart tag recognizer.
  aText | The calling application can pass the text of the smart tag to the action component.
  aXML | A string that is a XML representation of the smart tag.
  xController | The current controller of the document.
  xTarget | A text range representing the smart tag in the document.

Returns
  the caption of the requested action.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the ActionID is not recognized.

## ◆ getActionCount()

long getActionCount | ( | [in] string | aSmartTagName,
|  | [in] com::sun::star::frame::XController | xController,
|  | [in] com::sun::star::container::XStringKeyMap | xProperties )

obtains the number of actions provided for a specified smart tag type.

Parameters

  aSmartTagName | Name of the wanted smart tag type. This is one of the names obtained by getSmartTagName()
  xController | The current controller of the document.
  xProperties | Contains the smart tag properties collected by the smart tag recognizer.

Returns
  the number of actions available for the given smart tag type.

## ◆ getActionID()

long getActionID | ( | [in] string | aSmartTagName,
|  | [in] long | nActionIndex,
|  | [in] com::sun::star::frame::XController | xController )
raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |

obtains a unique integer identifier for an action.

Parameters

  aSmartTagName | Name of the wanted smart tag type. This is one of the names obtained by getSmartTagName()
  nActionIndex | The index of the action for the given smart tag type.
  xController | The current controller of the document.

Returns
  the unique integer identifier for the requested action.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the specified nActionIndex is greater than the number of available actions for the specified smart tag type.

## ◆ getActionNameFromID()

string getActionNameFromID | ( | [in] long | nActionID,
|  | [in] com::sun::star::frame::XController | xController )
raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |

obtains a language independent name of an action.

Parameters

  nActionID | The identifier of the requested action.
  xController | The current controller of the document.

Returns
  the language independent name of the specified action.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the ActionID is not recognized.

## ◆ getDescription()

string getDescription | ( | [in] ::com::sun::star::lang::Locale | aLocale | ) |

obtains a detailed description of this action component.

Parameters

  aLocale | Is used for localization of the description.

Returns
  the description of the action component.

## ◆ getName()

string getName | ( | [in] ::com::sun::star::lang::Locale | aLocale | ) |

obtains a name that describes this action component.

Parameters

  aLocale | Is used for localization of the name.

Returns
  the name describing the action component.

## ◆ getSmartTagCaption()

string getSmartTagCaption | ( | [in] long | nSmartTagIndex,
|  | [in] ::com::sun::star::lang::Locale | aLocale )
raises | ( | com::sun::star::lang::IndexOutOfBoundsException ) |  |  |

obtains the caption of the smart tag type for using in user interfaces.

Parameters

  nSmartTagIndex | Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively).
  aLocale | Is used for localization of the caption.

Returns
  the caption associated with the smart tag type.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if nSmartTagIndex is greater than SmartTagCount

## ◆ getSmartTagName()

string getSmartTagName | ( | [in] long | nSmartTagIndex | ) |
raises | ( | com::sun::star::lang::IndexOutOfBoundsException ) |  |  |

obtains the name of one specific smart tag type supported by this action component.

Parameters

  nSmartTagIndex | Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively).

Returns
  a unique name of the smart tag type. Smart tag type names are always in the format of namespaceURI#tagname.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if nSmartTagIndex is greater than SmartTagCount.

## ◆ invokeAction()

void invokeAction | ( | [in] long | nActionID,
|  | [in] string | aApplicationName,
|  | [in] com::sun::star::frame::XController | xController,
|  | [in] com::sun::star::text::XTextRange | xTarget,
|  | [in] com::sun::star::container::XStringKeyMap | xProperties,
|  | [in] string | aText,
|  | [in] string | aXML,
|  | [in] ::com::sun::star::lang::Locale | aLocale )
raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |

invokes an action.

Parameters

  nActionID | The identifier of the requested action.
  aApplicationName | A string containing the name of the calling application.
  xController | The current controller of the document.
  xTarget | A text range representing the smart tag in the document.
  xProperties | Contains the smart tag properties collected by the smart tag recognizer.
  aText | The calling application can pass the text of the smart tag to the action component.
  aXML | A string that is a XML representation of the smart tag.
  aLocale | Is used for localization of the action.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the ActionID is not recognized.

## ◆ isCaptionDynamic()

boolean isCaptionDynamic | ( | [in] long | nActionID,
|  | [in] string | aApplicationName,
|  | [in] com::sun::star::frame::XController | xController,
|  | [in] ::com::sun::star::lang::Locale | aLocale )
raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |

determines whether a caption is dynamic.

Parameters

  nActionID | The identifier of the requested action.
  aApplicationName | A string containing the name of the calling application.
  xController | The current controller of the document.
  aLocale | Is used for localization.

Returns
  a boolean indicating whether the caption is dynamic.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the ActionID is not recognized.

## ◆ isShowSmartTagIndicator()

boolean isShowSmartTagIndicator | ( | [in] long | nActionID,
|  | [in] string | aApplicationName,
|  | [in] com::sun::star::frame::XController | xController,
|  | [in] ::com::sun::star::lang::Locale | aLocale )
raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |

determines whether the smart tag indicator should be visible.

Parameters

  nActionID | The identifier of the requested action.
  aApplicationName | A string containing the name of the calling application.
  xController | The current controller of the document.
  aLocale | Is used for localization.

Returns
  a boolean indicating whether the smart tag indicator should be visible.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the ActionID is not recognized.

## Member Data Documentation

## ◆ SmartTagCount

long SmartTagCount
| attributereadonly

the number of smart tag types supported by this action component.

The documentation for this interface was generated from the following file:

- com/sun/star/smarttags/XSmartTagAction.idl