|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwriter2latex.latex.ConverterHelper
writer2latex.latex.StyleConverter
writer2latex.latex.ParConverter
public class ParConverter
Field Summary | |
---|---|
private boolean |
bNeedArrayBslash
|
Fields inherited from class writer2latex.latex.StyleConverter |
---|
declarations, styleMap, styleNames |
Fields inherited from class writer2latex.latex.ConverterHelper |
---|
config, ofr, palette |
Constructor Summary | |
---|---|
ParConverter(OfficeReader ofr,
Config config,
ConverterPalette palette)
Constructs a new ParConverter . |
Method Summary | |
---|---|
void |
appendDeclarations(LaTeXDocumentPortion pack,
LaTeXDocumentPortion decl)
|
void |
applyAlignment(StyleWithProperties style,
boolean bIsSimple,
boolean bInherit,
BeforeAfter ba)
|
private void |
applyCellParStyle(java.lang.String sName,
BeforeAfter ba,
Context context,
boolean bNoTextPar,
boolean bLastInBlock)
|
private void |
applyLineSpacing(StyleWithProperties style,
BeforeAfter ba)
Apply line spacing from a style. |
private void |
applyMargins(StyleWithProperties style,
BeforeAfter ba)
Apply margin+alignment properties from a style. |
private void |
applyParProperties(StyleWithProperties style,
BeforeAfter ba)
Apply all paragraph properties. |
private void |
applyParStyle(java.lang.String sName,
BeforeAfter ba,
Context context,
boolean bNoTextPar)
Use a paragraph style in LaTeX. |
private void |
applyParStyle(java.lang.String sName,
BeforeAfter ba,
Context context,
boolean bNoTextPar,
boolean bBreakInside)
|
private void |
createAutomaticParStyle(StyleWithProperties style,
Context context)
|
private java.lang.String |
createBorder(java.lang.String sLeft,
java.lang.String sRight,
java.lang.String sTop,
java.lang.String sHeight,
java.lang.String sColor)
Helper: Create a horizontal border. |
private void |
createParStyle(java.lang.String sName)
Convert a paragraph style to LaTeX. |
private void |
createSimpleParStyle(StyleWithProperties style,
Context context)
|
private void |
createSoftParStyle(StyleWithProperties style,
Context context)
|
void |
handleParagraph(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp,
Context oc,
boolean bLastInBlock)
Process a text:p tag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean bNeedArrayBslash
Constructor Detail |
---|
public ParConverter(OfficeReader ofr, Config config, ConverterPalette palette)
Constructs a new ParConverter
.
Method Detail |
---|
public void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
appendDeclarations
in class StyleConverter
public void handleParagraph(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc, boolean bLastInBlock)
Process a text:p tag
node
- The text:h element node containing the headingldp
- The LaTeXDocumentPortion
to add LaTeX code tooc
- The current contextbLastInBlock
- If this is true, the paragraph is the
last one in a block, and we need no trailing blank line (eg. right before
\end{enumerate}).private void applyCellParStyle(java.lang.String sName, BeforeAfter ba, Context context, boolean bNoTextPar, boolean bLastInBlock)
private void applyParStyle(java.lang.String sName, BeforeAfter ba, Context context, boolean bNoTextPar)
Use a paragraph style in LaTeX.
sName
- the name of the text styleba
- a BeforeAfter
to put code intocontext
- the current context. This method will use and update the formatting contextbNoTextPar
- true if this paragraph has no text content (hence character formatting is not needed)private void applyParStyle(java.lang.String sName, BeforeAfter ba, Context context, boolean bNoTextPar, boolean bBreakInside)
private void createParStyle(java.lang.String sName)
Convert a paragraph style to LaTeX.
A soft style is declared in styleDeclarations
as
\newenvironment...
A hard style is used by applying LaTeX code directly
sName
- the OOo name of the styleprivate void createAutomaticParStyle(StyleWithProperties style, Context context)
private void createSimpleParStyle(StyleWithProperties style, Context context)
private void createSoftParStyle(StyleWithProperties style, Context context)
private void applyLineSpacing(StyleWithProperties style, BeforeAfter ba)
Apply line spacing from a style.
style
- the paragraph style to useba
- a BeforeAfter
to put code intoprivate java.lang.String createBorder(java.lang.String sLeft, java.lang.String sRight, java.lang.String sTop, java.lang.String sHeight, java.lang.String sColor)
Helper: Create a horizontal border. Currently unused
private void applyMargins(StyleWithProperties style, BeforeAfter ba)
Apply margin+alignment properties from a style.
style
- the paragraph style to useba
- a BeforeAfter
to put code intopublic void applyAlignment(StyleWithProperties style, boolean bIsSimple, boolean bInherit, BeforeAfter ba)
private void applyParProperties(StyleWithProperties style, BeforeAfter ba)
Apply all paragraph properties.
style
- the paragraph style to useba
- a BeforeAfter
to put code into
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |