writer2latex.xhtml
Class DrawConverter
public class DrawConverter
DrawConverter.java
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1, as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
Copyright: 2002-2007 by Henrik Just
All Rights Reserved.
Version 0.5 (2007-04-17)
static int | ABSOLUTE - Identifies objects that should be positioned absolute (using the css
attribute postion:absolute)
|
static int | CENTERED - Identifies objects that should be placed centered
|
static int | FLOATING - Identifies objects that should be displayed as floats, either alone
or with text wrap (using the css attribute float:left or float:right)
|
static int | INLINE - Identifies objects that should be displayed inline.
|
void | convertDrawContent(Element onode)
|
Element | createForm() - Create form, if there is a form in this document
|
void | flushFrames(Element hnode)
|
Element | getDrawAnchor(Element onode) - A draw element with a hyperlink is represented as two elements,
eg.
|
Element | getRealDrawElement(Element onode) - A draw element with a hyperlink is represented as two elements,
eg.
|
void | handleDrawElement(Element onode, Element hnodeBlock, Element hnodeInline, int nMode) - Convert a draw element to xhtml.
|
applyStyle , getCellSc , getDrawCv , getFrameSc , getListSc , getMathCv , getPageSc , getParSc , getPresentationSc , getRowSc , getSectionSc , getStyleCv , getTableCv , getTableSc , getTextCv , getTextSc |
ABSOLUTE
public static final int ABSOLUTE
Identifies objects that should be positioned absolute (using the css
attribute postion:absolute)
CENTERED
public static final int CENTERED
Identifies objects that should be placed centered
FLOATING
public static final int FLOATING
Identifies objects that should be displayed as floats, either alone
or with text wrap (using the css attribute float:left or float:right)
INLINE
public static final int INLINE
Identifies objects that should be displayed inline.
convertDrawContent
public void convertDrawContent(Element onode)
createForm
public Element createForm()
Create form, if there is a form in this document
- the form element, or null if there are no forms in the document
flushFrames
public void flushFrames(Element hnode)
getDrawAnchor
public Element getDrawAnchor(Element onode)
A draw element with a hyperlink is represented as two elements,
eg.
<draw:a><draw:image/></draw:a>
.
We thus need methods to switch between the two elements.
This method takes a
draw
-element.
If this element is contained in a hyperlink, the hyperlink is returned.
Otherwise null is returned.
onode
- the draw:a
element
- the hyperlink element, if any
getRealDrawElement
public Element getRealDrawElement(Element onode)
A draw element with a hyperlink is represented as two elements,
eg.
<draw:a><draw:image/></draw:a>
.
We thus need methods to switch between the two elements.
This method takes a
draw
-element.
If this element is a hyperlink, the child element is returned.
Otherwise the argument is returned unchanged.
onode
- the draw:a
element
- the corresponding element
handleDrawElement
public void handleDrawElement(Element onode,
Element hnodeBlock,
Element hnodeInline,
int nMode)
Convert a draw element to xhtml. The presentation depends on the
parameter
nMode
:
DrawConverter.INLINE
: Presented inline. The hnode
must accept inline content. An inline container must be
provided.DrawConverter.FLOAT
: Presented as a float. The hnode
must accept block/flow content. A block container must be
provided.DrawConverter.ABSOLUTE
: Presented at an absolute
position. A block container must be provided.
Containers for block and inline elements should be supplied.
The containers may be identical (flow container).
Note: A draw:text-box will be ignored in inline mode.
onode
- the draw elementhnodeBlock
- the xhtml element to attach the converted element to if it's a block elementhnodeInline
- the xhtml element to attach the converted element to if it's an inline elementnMode
- identifies how the element should be presented