public abstract class ORootDoc extends OPropObj
| Modifier and Type | Class and Description |
|---|---|
class |
ORootDoc.Info
Document information (metadata).
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the document.
|
void |
deleteStyle(OStyle.Family family,
java.lang.String name)
Deletes from the document a style specified by family and name.
|
ORootDoc.Info |
info()
Returns the document's metadata information, such as author.
|
void |
logFields()
Writes to the log a listing of all text fields in the document.
|
void |
logServices()
Writes to the log a listing of the UNO services provided by the document.
|
void |
logShapes()
Writes to the log a listing of all shapes in the document.
|
void |
logStyles(boolean onlyInUse)
Writes to the log a listing of styles in the document, optionally selecting only those in use.
|
void |
logSummary()
Writes a summary of the document to the log.
|
int |
numPages()
Returns the number of document pages.
|
int |
numShapes()
Returns the number of shapes in the document.
|
int |
numStyles()
Returns the number of styles in the document.
|
static ORootDoc |
read(java.lang.String url)
Reads and opens a Writer, Calc, Draw, or Impress document.
|
void |
setupStyles()
Optional method to setup styles when a document is constructed.
|
java.util.Collection<OShape> |
shapes()
Returns a collection of all shapes in the document.
|
java.util.Collection<OShape> |
shapesByType(java.lang.String typeName)
Returns a collection of the shapes, of a specified type, in the document.
|
OStyle |
style(OStyle.Family family,
java.lang.String name)
Returns a style specified by family and name.
|
java.util.Collection<OStyle.Family> |
styleFamilies()
Returns a collection of all style families in the document.
|
java.util.Collection<OStyle> |
styles(boolean onlyInUse)
Returns a collection of styles in the document, optionally selecting only those in use.
|
java.util.Collection<OStyle> |
styles(OStyle.Family family,
boolean onlyInUse)
Returns a collection of selected styles in the document.
|
java.lang.String |
toString()
Returns a string representation of the document.
|
java.lang.String |
url()
Returns the document's URL.
|
java.lang.String |
write(java.lang.String url,
OFileFilter filter)
Writes the document to a URL using a specified file type.
|
java.lang.String |
writeProtected(java.lang.String url,
OFileFilter filter,
java.lang.String password)
Writes the document to a URL, password-protected, using a specified file type.
|
com.sun.star.lang.XMultiServiceFactory |
xGetMSFactory()
Gets the XMultiServiceFactory object.
|
com.sun.star.lang.XComponent |
xGetXComp()
Gets the XComponent object.
|
logProps, xGetPropSetpublic static ORootDoc read(java.lang.String url) throws com.sun.star.uno.Exception
url - the URLcom.sun.star.uno.Exceptionpublic ORootDoc.Info info() throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.lang.String url()
Calc document - private:factory/scalc; Draw document - private:factory/sdraw; Impress document - private:factory/simpress; Writer document - private:factory/swriter;
public int numPages()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic int numShapes()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.util.Collection<OShape> shapes() throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.util.Collection<OShape> shapesByType(java.lang.String typeName) throws com.sun.star.uno.Exception
typeName - the type namecom.sun.star.uno.Exceptionpublic void logShapes()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic int numStyles()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.util.Collection<OStyle.Family> styleFamilies() throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.util.Collection<OStyle> styles(boolean onlyInUse) throws com.sun.star.uno.Exception, com.sun.star.uno.Exception
onlyInUse - whether to select only styles in usecom.sun.star.uno.Exceptionpublic java.util.Collection<OStyle> styles(OStyle.Family family, boolean onlyInUse) throws com.sun.star.uno.Exception
family - the style familyonlyInUse - whether to select only styles in usecom.sun.star.uno.Exceptionpublic OStyle style(OStyle.Family family, java.lang.String name) throws com.sun.star.uno.Exception, com.sun.star.uno.Exception
family - the style familyname - the style namecom.sun.star.uno.Exceptionpublic void logStyles(boolean onlyInUse)
throws com.sun.star.uno.Exception
onlyInUse - whether to select only styles in usecom.sun.star.uno.Exceptionpublic void logFields()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic void logSummary()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic void logServices()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void deleteStyle(OStyle.Family family, java.lang.String name) throws com.sun.star.uno.Exception, com.sun.star.uno.Exception
family - the style familyname - the style namecom.sun.star.uno.Exceptionpublic void setupStyles()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.lang.String write(java.lang.String url,
OFileFilter filter)
throws com.sun.star.uno.Exception,
com.sun.star.uno.Exception
url - the URL to write tofilter - the file type to usecom.sun.star.uno.Exceptionpublic java.lang.String writeProtected(java.lang.String url,
OFileFilter filter,
java.lang.String password)
throws com.sun.star.uno.Exception
url - the URL to write tofilter - the file type to usepassword - the passwordcom.sun.star.uno.Exceptionpublic void close()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic com.sun.star.lang.XMultiServiceFactory xGetMSFactory()
public com.sun.star.lang.XComponent xGetXComp()