public class OfficeDrawTools extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OfficeDrawTools.ParagraphContainer |
static class |
OfficeDrawTools.UndoMarkupContainer |
Constructor and Description |
---|
OfficeDrawTools() |
Modifier and Type | Method and Description |
---|---|
static void |
changeTextOfParagraph(int nPara,
int beginn,
int length,
String replace,
com.sun.star.lang.XComponent xComponent)
change the text of a paragraph
|
static OfficeDrawTools.ParagraphContainer |
getAllParagraphs(com.sun.star.lang.XComponent xComponent)
get all paragraphs of a impress document
|
static com.sun.star.lang.Locale |
getDocumentLocale(com.sun.star.lang.XComponent xComponent) |
static com.sun.star.drawing.XDrawPage |
getDrawPageByIndex(com.sun.star.lang.XComponent xComponent,
int nIndex)
get draw page by index
|
static int |
getDrawPageCount(com.sun.star.lang.XComponent xComponent)
get the page count for standard pages
|
static com.sun.star.drawing.XDrawPage |
getHandoutMasterPage(com.sun.star.lang.XComponent xComponent)
in impress each documents has one handout page
|
static com.sun.star.drawing.XDrawPage |
getMasterPageByIndex(com.sun.star.lang.XComponent xComponent,
int nIndex)
get master page by index
|
static int |
getMasterPageCount(com.sun.star.lang.XComponent xComponent)
get the page count for master pages
|
static com.sun.star.drawing.XDrawPage |
getNotesPage(com.sun.star.drawing.XDrawPage xDrawPage)
in impress documents each normal draw page has a corresponding notes page
|
static com.sun.star.awt.Size |
getPageSize(com.sun.star.drawing.XDrawPage xDrawPage)
get size of the given page
|
static int |
getParagraphFromCurrentPage(com.sun.star.lang.XComponent xComponent)
get the first paragraph of current draw page
|
static com.sun.star.drawing.XShapes |
getShapes(com.sun.star.drawing.XDrawPage xPage)
get shapes of a page
|
static com.sun.star.drawing.XDrawPage |
insertNewDrawPageByIndex(com.sun.star.lang.XComponent xComponent,
int nIndex)
creates and inserts a draw page into the giving position,
the method returns the new created page
|
static com.sun.star.drawing.XDrawPage |
insertNewMasterPageByIndex(com.sun.star.lang.XComponent xComponent,
int nIndex)
creates and inserts a new master page into the giving position,
the method returns the new created page
|
static boolean |
isImpressDocument(com.sun.star.lang.XComponent xComponent)
test if a Presentation Document is supported.
|
static boolean |
isParagraphInNotesPage(int nPara,
com.sun.star.lang.XComponent xComponent)
true: if paragraph is in a notes page
|
static void |
removeMarkup(OfficeDrawTools.UndoMarkupContainer undoMarkup,
com.sun.star.lang.XComponent xComponent)
remove the last mark up
|
static void |
setCurrentPage(int nPara,
com.sun.star.lang.XComponent xComponent)
set the current draw page for a given paragraph
|
static void |
setLanguageOfParagraph(int nPara,
int beginn,
int length,
com.sun.star.lang.Locale locale,
com.sun.star.lang.XComponent xComponent)
change the language of a paragraph
|
static void |
setMarkup(int nPara,
com.sun.star.linguistic2.SingleProofreadingError error,
OfficeDrawTools.UndoMarkupContainer undoMarkup,
com.sun.star.lang.XComponent xComponent)
mark up an error in a paragraph /remove last mark up if error == null
|
static void |
setMasterPage(com.sun.star.drawing.XDrawPage xDrawPage,
com.sun.star.drawing.XDrawPage xMasterPage)
sets given masterpage at the drawpage
|
public static int getDrawPageCount(com.sun.star.lang.XComponent xComponent)
public static com.sun.star.drawing.XDrawPage getDrawPageByIndex(com.sun.star.lang.XComponent xComponent, int nIndex) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException
com.sun.star.lang.IndexOutOfBoundsException
com.sun.star.lang.WrappedTargetException
public static com.sun.star.drawing.XDrawPage insertNewDrawPageByIndex(com.sun.star.lang.XComponent xComponent, int nIndex) throws Exception
Exception
public static com.sun.star.awt.Size getPageSize(com.sun.star.drawing.XDrawPage xDrawPage) throws com.sun.star.beans.UnknownPropertyException, com.sun.star.lang.WrappedTargetException
com.sun.star.beans.UnknownPropertyException
com.sun.star.lang.WrappedTargetException
public static int getMasterPageCount(com.sun.star.lang.XComponent xComponent)
public static com.sun.star.drawing.XDrawPage getMasterPageByIndex(com.sun.star.lang.XComponent xComponent, int nIndex) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException
com.sun.star.lang.IndexOutOfBoundsException
com.sun.star.lang.WrappedTargetException
public static com.sun.star.drawing.XDrawPage insertNewMasterPageByIndex(com.sun.star.lang.XComponent xComponent, int nIndex)
public static void setMasterPage(com.sun.star.drawing.XDrawPage xDrawPage, com.sun.star.drawing.XDrawPage xMasterPage)
public static boolean isImpressDocument(com.sun.star.lang.XComponent xComponent)
public static com.sun.star.drawing.XDrawPage getNotesPage(com.sun.star.drawing.XDrawPage xDrawPage)
public static com.sun.star.drawing.XDrawPage getHandoutMasterPage(com.sun.star.lang.XComponent xComponent)
public static com.sun.star.drawing.XShapes getShapes(com.sun.star.drawing.XDrawPage xPage)
public static OfficeDrawTools.ParagraphContainer getAllParagraphs(com.sun.star.lang.XComponent xComponent)
public static void changeTextOfParagraph(int nPara, int beginn, int length, String replace, com.sun.star.lang.XComponent xComponent)
public static void setLanguageOfParagraph(int nPara, int beginn, int length, com.sun.star.lang.Locale locale, com.sun.star.lang.XComponent xComponent)
public static void setCurrentPage(int nPara, com.sun.star.lang.XComponent xComponent)
public static int getParagraphFromCurrentPage(com.sun.star.lang.XComponent xComponent)
public static boolean isParagraphInNotesPage(int nPara, com.sun.star.lang.XComponent xComponent)
public static com.sun.star.lang.Locale getDocumentLocale(com.sun.star.lang.XComponent xComponent)
public static void removeMarkup(OfficeDrawTools.UndoMarkupContainer undoMarkup, com.sun.star.lang.XComponent xComponent)
public static void setMarkup(int nPara, com.sun.star.linguistic2.SingleProofreadingError error, OfficeDrawTools.UndoMarkupContainer undoMarkup, com.sun.star.lang.XComponent xComponent)