:: com :: sun :: star :: linguistic2 ::

interface XGrammarChecker
Base Interfaces
XGrammarCheckerXSupportedLocales

XSupportedLocales
(referenced interface's summary:)
Offers information about which languages are supported by the object.

Methods' Summary
isSpellChecker whether is the text checked by the spellchecker  
startDocument start checking document. This enables the grammar checker to maintain state information about the document  
startParagraph start checking paragraph  
endParagraph end checking paragraph  
endDocument end checking document  
doGrammarChecking start checking  
getEndOfSentencePos get the end position of the specific text  
getStartOfSentencePos get the start index of the specific text  
requiresPreviousText check whether the checker needs the previous text to judge current grammar error  
hasCheckingDialog check whether the checker has the checking dialog  
hasOptionsDialog check whether the checker has the options dialog  
runCheckingDialog call a dialog by which users can the grammar error.  
runOptionsDialog call a dialog in order to display the setting options  
Methods' Details
isSpellChecker
boolean
isSpellChecker( [in] ::com::sun::star::lang::Locale  aLocale );

Description
whether is the text checked by the spellchecker
Returns
true If yes, false otherwise.
startDocument
void
startDocument( [in] long  nDocId )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
start checking document. This enables the grammar checker to maintain state information about the document
Parameter nDocId
the Document ID.
Throws
IllegalArgumentException when any argument is wrong.
startParagraph
void
startParagraph( [in] long  nDocId )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
start checking paragraph
Parameter nDocId
the Document ID.
Throws
IllegalArgumentException when any argument is wrong.
endParagraph
void
endParagraph( [in] long  nDocId )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
end checking paragraph
Parameter nDocId
the Document ID.
Throws
IllegalArgumentException when any argument is wrong.
endDocument
void
endDocument( [in] long  nDocId )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
end checking document
Parameter nDocId
the Document ID.
Throws
IllegalArgumentException when any argument is wrong.
doGrammarChecking
void
doGrammarChecking( [in] long  nDocId,
[in] ::com::sun::star::text::XFlatParagraph  xFlatPara,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] long  nStartOfSentencePos,
[in] long  nSuggestedSentenceEndPos )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
start checking
Parameter nDocId
the Document ID.
Parameter rFlatParaText
the flat text to be checked.
Parameter xFlatPara
the flat paragraph to be checked.
Parameter aLocale
Language used in the text.
Parameter nStartOfSentencePos
Start Index of the text.
Parameter nSuggestedSentenceEndPos
Probable end position of the text.
Throws
IllegalArgumentException when any argument is wrong.
getEndOfSentencePos
long
getEndOfSentencePos( [in] long  nDocId,
[in] string  aFlatParaText,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] long  nStartOfSentencePos )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
get the end position of the specific text
Parameter nDocId
the Document ID.
Parameter rFlatParaText
the text.
Parameter aLocale
Language used in the text.
Parameter nStartOfSentencePos
Start Index of the text.
Returns
the locale for the language identified. If no language could be identified, the locale will be empty.
Throws
IllegalArgumentException when any argument is wrong.
getStartOfSentencePos
long
getStartOfSentencePos( [in] long  nDocId,
[in] string  aFlatParaText,
[in] ::com::sun::star::lang::Locale  aLocale )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
get the start index of the specific text
Parameter nDocId
the Document ID.
Parameter rFlatParaText
the text.
Parameter aLocale
Language used in the text.
Returns
the locale for the language identified. If no language could be identified, the locale will be empty.
Throws
IllegalArgumentException when any argument is wrong.
requiresPreviousText
boolean
requiresPreviousText();

Description
check whether the checker needs the previous text to judge current grammar error
Returns
true If it needs false otherwise.
hasCheckingDialog
boolean
hasCheckingDialog();

Description
check whether the checker has the checking dialog
Returns
true If it has false otherwise.
hasOptionsDialog
boolean
hasOptionsDialog();

Description
check whether the checker has the options dialog
Returns
true If it has false otherwise.
runCheckingDialog
void
runCheckingDialog( [in] long  nDocId )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
call a dialog by which users can the grammar error.
Parameter nDocId
the DocumentId.
Throws
IllegalArgumentException when any argument is wrong.
runOptionsDialog
void
runOptionsDialog( [in] long  nDocId )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
call a dialog in order to display the setting options
Parameter nDocId
the DocumentId.
Throws
IllegalArgumentException when any argument is wrong.
Top of Page