public class FlatParagraphTools extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FlatParagraphTools.FlatParagraphContainer |
Modifier and Type | Method and Description |
---|---|
void |
changeTextOfParagraph(int nPara,
int nStart,
int nLen,
String newText)
Change text of flat paragraph nPara
delete characters between nStart and nStart + nLen, insert newText at nStart
|
FlatParagraphTools.FlatParagraphContainer |
getAllFlatParagraphs(com.sun.star.lang.Locale fixedLocale)
Returns Text of all FlatParagraphs of Document
Returns null if it fails
|
int |
getCurNumFlatParagraph()
Returns Current Paragraph Number from FlatParagaph
Returns -1 if it fails
|
String |
getCurrentParaText()
return text of current paragraph
return null if it fails
|
com.sun.star.text.XFlatParagraph |
getFlatParagraphAt(int nPara)
Change text of flat paragraph nPara
delete characters between nStart and nStart + nLen, insert newText at nStart
|
List<String> |
getFlatParagraphs(List<Integer> nParas)
Returns Text of some FlatParagraphs defined in a List
Returns null if it fails
|
int |
getNumberOfAllFlatPara()
Returns Number of all FlatParagraphs of Document from current FlatParagraph
Returns negative value if it fails
|
com.sun.star.lang.Locale |
getPrimaryLanguageOfPartOfParagraph(int nPara,
int start,
int len,
com.sun.star.lang.Locale lastLocale)
Get the main language of paragraph
|
static com.sun.star.lang.Locale |
getPrimaryParagraphLanguage(com.sun.star.text.XFlatParagraph flatPara,
int start,
int len,
com.sun.star.lang.Locale fixedLocale,
com.sun.star.lang.Locale lastLocale,
boolean onlyPrimary)
Get the main language of paragraph
|
void |
init()
Initialize XFlatParagraphIterator
Set the new iterator only if it is not null
|
static boolean |
isBusy()
Returns the status of cursor tools
true: If a cursor tool in one or more threads is active
|
List<Boolean> |
isChecked(List<Integer> changedParas,
int nDiv)
Get information of checked status of all paragraphs
|
boolean |
isFlatParaFromIter()
is true if FlatParagraph is from Automatic Iteration
|
void |
markCurrentParagraph(List<SingleCheck.SentenceErrors> errorList)
add marks to existing marks of current paragraph
|
void |
markParagraphs(Map<Integer,List<SingleCheck.SentenceErrors>> changedParas)
Set marks to changed paragraphs
if override is true existing marks are removed and marks are new set
else the marks are added to the existing marks
|
static void |
reset()
Reset the busy flag
|
void |
setDisposed()
document is disposed: set all class variables to null
|
void |
setFlatParasAsChecked()
Marks all paragraphs as checked
|
void |
setFlatParasAsChecked(int from,
int to,
List<Boolean> isChecked)
Marks all paragraphs as checked with exception of the paragraphs "from" to "to"
|
void |
setLanguageOfParagraph(int nPara,
int nStart,
int nLen,
com.sun.star.lang.Locale locale)
Change text of flat paragraph nPara
delete characters between nStart and nStart + nLen, insert newText at nStart
|
public void setDisposed()
public void init()
public boolean isFlatParaFromIter()
public com.sun.star.text.XFlatParagraph getFlatParagraphAt(int nPara)
public String getCurrentParaText()
public int getCurNumFlatParagraph()
@Nullable public FlatParagraphTools.FlatParagraphContainer getAllFlatParagraphs(com.sun.star.lang.Locale fixedLocale)
@Nullable public List<String> getFlatParagraphs(List<Integer> nParas)
public static com.sun.star.lang.Locale getPrimaryParagraphLanguage(com.sun.star.text.XFlatParagraph flatPara, int start, int len, com.sun.star.lang.Locale fixedLocale, com.sun.star.lang.Locale lastLocale, boolean onlyPrimary) throws com.sun.star.lang.IllegalArgumentException
com.sun.star.lang.IllegalArgumentException
public com.sun.star.lang.Locale getPrimaryLanguageOfPartOfParagraph(int nPara, int start, int len, com.sun.star.lang.Locale lastLocale) throws com.sun.star.lang.IllegalArgumentException
com.sun.star.lang.IllegalArgumentException
public int getNumberOfAllFlatPara()
public void setFlatParasAsChecked(int from, int to, List<Boolean> isChecked)
public void setFlatParasAsChecked()
public List<Boolean> isChecked(List<Integer> changedParas, int nDiv)
public void markParagraphs(Map<Integer,List<SingleCheck.SentenceErrors>> changedParas)
public void markCurrentParagraph(List<SingleCheck.SentenceErrors> errorList)
public void changeTextOfParagraph(int nPara, int nStart, int nLen, String newText)
public void setLanguageOfParagraph(int nPara, int nStart, int nLen, com.sun.star.lang.Locale locale)
public static boolean isBusy()
public static void reset()