Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: smarttags ::

unpublished interface XSmartTagAction
Base Interfaces
XSmartTagAction
┗ ::com::sun::star::lang::XInitialization

::com::sun::star::lang::XInitialization
(referenced interface's summary:)
initializes an object directly after its creation.
Usage Restrictions
not published
Description
provides access to smart tag actions.
Since
OOo 2.3

Methods' Summary
getName obtains a name that describes this action component.  
getDescription obtains a detailed description of this action component.  
getSmartTagName obtains the name of one specific smart tag type supported by this action component.  
getSmartTagCaption obtains the caption of the smart tag type for using in user interfaces.  
getActionCount obtains the number of actions provided for a specifiy smart tag type.  
getActionID obtains a unique integer identifier for an action.  
getActionCaptionFromID obtains a caption for a specified action for use in user interfaces.  
getActionNameFromID obtains a language independant name of an action.  
invokeAction invokes an action.  
isCaptionDynamic determines whether a caption is dynamic.  
isShowSmartTagIndicator determines whether the smart tag indicator should be visible.  
Attributes' Summary
SmartTagCount the number of smart tag types supported by this action component.  
Methods' Details
getName
string
getName( [in] ::com::sun::star::lang::Locale  aLocale );

Description
obtains a name that describes this action component.
Parameter aLocale
Is used for localization of the name.
Returns
the name describing the action component.
getDescription
string
getDescription( [in] ::com::sun::star::lang::Locale  aLocale );

Description
obtains a detailed description of this action component.
Parameter aLocale
Is used for localization of the description.
Returns
the description of the action component.
getSmartTagName
string
getSmartTagName( [in] long  nSmartTagIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
obtains the name of one specific smart tag type supported by this action component.
Parameter nSmartTagIndex
Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively).
Returns
an unique name of the smart tag type. Smart tag type names are always in the format of namespaceURI#tagname.
Throws
com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount.
getSmartTagCaption
string
getSmartTagCaption( [in] long  nSmartTagIndex,
[in] ::com::sun::star::lang::Locale  aLocale )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
obtains the caption of the smart tag type for using in user interfaces.
Parameter nSmartTagIndex
Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively).
Parameter aLocale
Is used for localization of the caption.
Returns
the caption associated with the smart tag type.
Throws
com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount
getActionCount
long
getActionCount( [in] string  aSmartTagName,
[in] ::com::sun::star::frame::XController  xController,
[in] ::com::sun::star::container::XStringKeyMap  xProperties );

Description
obtains the number of actions provided for a specifiy smart tag type.
Parameter aSmartTagName
Name of the wanted smart tag type. This is one of the names obtained by getSmartTagName()
Parameter xController
The current controller of the document.
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 );

Description
obtains a unique integer identifier for an action.
Parameter aSmartTagName
Name of the wanted smart tag type. This is one of the names obtained by getSmartTagName()
Parameter nActionIndex
The index of the action for the given smart tag type.
Parameter xController
The current controller of the document.
Returns
the unique integer identifier for the requested action.
Throws
com::sun::star::lang::IllegalArgumentException if the specified nActionIndex is greater than the number of available actions for the specified smart tag type.
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 );

Description
obtains a caption for a specified action for use in user interfaces.
Parameter nActionID
The identifier of the requested action.
Parameter aApplicationName
A string containing the name of the calling application.
Parameter aLocale
Is used for localization of the caption.
Parameter xProperties
Contains additional smart tag properties collected by the smart tag recognizer.
Parameter aText
The calling application can pass the text of the smart tag to the action component.
Parameter aXML
A string that is a XML representation of the smart tag.
Parameter xController
The current controller of the document.
Parameter xTarget
A text range representing the smart tag in the document.
Returns
the caption of the requested action.
Throws
com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized.
getActionNameFromID
string
getActionNameFromID( [in] long  nActionID,
[in] ::com::sun::star::frame::XController  xController )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
obtains a language independant name of an action.
Parameter nActionID
The identifier of the requested action.
Parameter xController
The current controller of the document.
Returns
the language independant name of the specified action.
Throws
com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized.
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 );

Description
invokes an action.
Parameter nActionID
The identifier of the requested action.
Parameter aApplicationName
A string containing the name of the calling application.
Parameter xController
The current controller of the document.
Parameter xTarget
A text range representing the smart tag in the document.
Parameter xProperties
Contains the smart tag properties collected by the smart tag recognizer.
Parameter aText
The calling application can pass the text of the smart tag to the action component.
Parameter aXML
A string that is a XML representation of the smart tag.
Parameter aLocale
Is used for localization of the action.
Throws
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 );

Description
determines whether a caption is dynamic.
Parameter nActionID
The identifier of the requested action.
Parameter aApplicationName
A string containing the name of the calling application.
Parameter xController
The current controller of the document.
Parameter aLocale
Is used for localization.
Returns
a boolean indicating whether the caption is dynamic.
Throws
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 );

Description
determines whether the smart tag indicator should be visible.
Parameter nActionID
The identifier of the requested action.
Parameter aApplicationName
A string containing the name of the calling application.
Parameter xController
The current controller of the document.
Parameter aLocale
Is used for localization.
Returns
a boolean indicating whether the smart tag indicator should be visible.
Throws
com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized.
Attributes' Details
SmartTagCount
[ readonly ] long SmartTagCount;
Description
the number of smart tag types supported by this action component.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.