public class Main
extends com.sun.star.lib.uno.helper.WeakBase
implements com.sun.star.task.XJobExecutor, com.sun.star.lang.XServiceDisplayName, com.sun.star.lang.XServiceInfo, com.sun.star.linguistic2.XProofreader, com.sun.star.linguistic2.XLinguServiceEventBroadcaster, com.sun.star.lang.XEventListener
| Constructor and Description |
|---|
Main(com.sun.star.uno.XComponentContext xCompContext) |
| Modifier and Type | Method and Description |
|---|---|
static com.sun.star.lang.XSingleComponentFactory |
__getComponentFactory(String sImplName)
Get XSingleComponentFactory
Default method called by LO/OO extensions
|
static boolean |
__writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey regKey)
Write keys to registry
Default method called by LO/OO extensions
|
boolean |
addLinguServiceEventListener(com.sun.star.linguistic2.XLinguServiceEventListener eventListener)
Add a listener that allow re-checking the document after changing the
options in the configuration dialog box.
|
void |
disposing(com.sun.star.lang.EventObject source)
Remove internal stored text if document disposes
Interface: XEventListener
|
com.sun.star.linguistic2.ProofreadingResult |
doProofreading(String docID,
String paraText,
com.sun.star.lang.Locale locale,
int startOfSentencePos,
int nSuggestedBehindEndOfSentencePosition,
com.sun.star.beans.PropertyValue[] propertyValues)
Runs the grammar checker on paragraph text.
|
String |
getImplementationName()
Get the implementation name of the LT service
interface: XServiceInfo
|
com.sun.star.lang.Locale[] |
getLocales() |
String |
getServiceDisplayName(com.sun.star.lang.Locale locale)
Get the display name of the LT service
Interface: XServiceDisplayName
|
String[] |
getSupportedServiceNames()
Get the names of supported services
interface: XServiceInfo
|
boolean |
hasLocale(com.sun.star.lang.Locale locale) |
void |
ignoreRule(String ruleId,
com.sun.star.lang.Locale locale)
Called when "Ignore" is selected e.g. in the context menu for an error.
|
boolean |
isSpellChecker()
We leave spell checking to OpenOffice/LibreOffice.
|
boolean |
removeLinguServiceEventListener(com.sun.star.linguistic2.XLinguServiceEventListener eventListener)
Remove a listener from the event listeners list.
|
void |
resetIgnoreRules()
Called on rechecking the document - resets the ignore status for rules that
was set in the spelling dialog box or in the context menu.
|
boolean |
supportsService(String sServiceName)
Test if the service is supported by LT
interface: XServiceInfo
|
void |
trigger(String sEvent)
Triggers a registered event
interface: XJobExecutor
|
public final com.sun.star.linguistic2.ProofreadingResult doProofreading(String docID, String paraText, com.sun.star.lang.Locale locale, int startOfSentencePos, int nSuggestedBehindEndOfSentencePosition, com.sun.star.beans.PropertyValue[] propertyValues)
doProofreading in interface com.sun.star.linguistic2.XProofreaderdocID - document IDparaText - paragraph textlocale - Locale the text LocalestartOfSentencePos - start of sentence positionnSuggestedBehindEndOfSentencePosition - end of sentence positionpublic final boolean isSpellChecker()
isSpellChecker in interface com.sun.star.linguistic2.XProofreaderpublic final com.sun.star.lang.Locale[] getLocales()
getLocales in interface com.sun.star.linguistic2.XSupportedLocalespublic final boolean hasLocale(com.sun.star.lang.Locale locale)
hasLocale in interface com.sun.star.linguistic2.XSupportedLocaleslocale - The Locale to check
interface: XProofreaderpublic final boolean addLinguServiceEventListener(com.sun.star.linguistic2.XLinguServiceEventListener eventListener)
addLinguServiceEventListener in interface com.sun.star.linguistic2.XLinguServiceEventBroadcastereventListener - the listener to be addedpublic final boolean removeLinguServiceEventListener(com.sun.star.linguistic2.XLinguServiceEventListener eventListener)
removeLinguServiceEventListener in interface com.sun.star.linguistic2.XLinguServiceEventBroadcastereventListener - the listener to be removedpublic String[] getSupportedServiceNames()
getSupportedServiceNames in interface com.sun.star.lang.XServiceInfopublic boolean supportsService(String sServiceName)
supportsService in interface com.sun.star.lang.XServiceInfopublic String getImplementationName()
getImplementationName in interface com.sun.star.lang.XServiceInfopublic static com.sun.star.lang.XSingleComponentFactory __getComponentFactory(String sImplName)
public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey regKey)
public void trigger(String sEvent)
trigger in interface com.sun.star.task.XJobExecutorpublic void ignoreRule(String ruleId, com.sun.star.lang.Locale locale)
ignoreRule in interface com.sun.star.linguistic2.XProofreaderpublic void resetIgnoreRules()
resetIgnoreRules in interface com.sun.star.linguistic2.XProofreaderpublic String getServiceDisplayName(com.sun.star.lang.Locale locale)
getServiceDisplayName in interface com.sun.star.lang.XServiceDisplayNamepublic void disposing(com.sun.star.lang.EventObject source)
disposing in interface com.sun.star.lang.XEventListener