Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


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

unpublished interface XSmartTagRecognizer
Base Interfaces
XSmartTagRecognizer
┗ ::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 a smart tag recognizer.
Since
OOo 2.3

Methods' Summary
getName obtains a name that describes this recognizer component.  
getDescription obtains a detailed description of this recognizer component.  
getSmartTagName obtains the name of one specific smart tag type supported by this recognizer component.  
getSmartTagDownloadURL obtains the URL that can be used to download new or updated recognizers.  
recognize recognizes smart tags.  
hasPropertyPage indicates whether there is a property page for a smart tag type.  
displayPropertyPage launches the property page for a smart tag type.  
Attributes' Summary
SmartTagCount The number of smart tag types supported by this recognizer component.  
Methods' Details
getName
string
getName( [in] ::com::sun::star::lang::Locale  aLocale );

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

Description
obtains a detailed description of this recognizer component.
Parameter aLocale
Is used for localization of the description.
Returns
the description of the recognizer 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 recognizer component.
Parameter nSmartTagIndex
Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively).
Returns
the 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
getSmartTagDownloadURL
string
getSmartTagDownloadURL( [in] long  nSmartTagIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
obtains the URL that can be used to download new or updated recognizers.
Parameter nSmartTagIndex
Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively).
Returns
the download URL.
Throws
com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount
recognize
void
recognize( [in] string  aText,
[in] long  nStart,
[in] long  nLength,
[in] SmartTagRecognizerMode  eDataType,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] ::com::sun::star::text::XTextMarkup  xTextMarkup,
[in] string  aApplicationName,
[in] ::com::sun::star::frame::XController  xController,
[in] ::com::sun::star::i18n::XBreakIterator  xTokenizer );

Description
recognizes smart tags.
Parameter aText
The text that should be scanned by the recognizer. aText is UFT16 encoded.
Parameter nStart
Denotes the start position of the region to scan.
Parameter nLength
Denotes the length of the text to scan.
Parameter eDataType
This value indicates the type of the passed text.
Parameter aLocale
Is used to indicate the language of the passed text.
Parameter xTextMarkup
This object is used to submit any recognized smart tags to the calling application.
Parameter aApplicationName
A string containing the name of the calling application.
Parameter xController
The current controller of the document.
Parameter xTokenizer
This can be used to tokenize the string to recognize.
hasPropertyPage
boolean
hasPropertyPage( [in] long  nSmartTagIndex,
[in] ::com::sun::star::lang::Locale  aLocale )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
indicates whether there is a property page for a smart tag type.
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 property page.
Returns
true if there is a property page matching the requested smart tag type and locale.
Throws
com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount
displayPropertyPage
void
displayPropertyPage( [in] long  nSmartTagIndex,
[in] ::com::sun::star::lang::Locale  aLocale )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
launches the property page for a smart tag type.
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 property page.
Throws
com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount
Attributes' Details
SmartTagCount
[ readonly ] long SmartTagCount;
Description
The number of smart tag types supported by this recognizer component.
Top of Page

Apache Software Foundation

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

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