|
||||||||||
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.ListStyleConverter
public class ListStyleConverter
Field Summary | |
---|---|
(package private) boolean |
bNeedSaveEnumCounter
|
private java.util.Hashtable |
listStyleLevelNames
|
Fields inherited from class writer2latex.latex.StyleConverter |
---|
declarations, styleMap, styleNames |
Fields inherited from class writer2latex.latex.ConverterHelper |
---|
config, ofr, palette |
Constructor Summary | |
---|---|
ListStyleConverter(OfficeReader ofr,
Config config,
ConverterPalette palette)
Constructs a new ListStyleConverter . |
Method Summary | |
---|---|
void |
appendDeclarations(LaTeXDocumentPortion pack,
LaTeXDocumentPortion decl)
|
void |
applyListItemStyle(java.lang.String sStyleName,
int nLevel,
boolean bHeader,
boolean bRestart,
int nStartValue,
BeforeAfter ba)
Apply a list style to a list item. |
void |
applyListStyle(java.lang.String sStyleName,
int nLevel,
boolean bOrdered,
boolean bContinue,
BeforeAfter ba)
Apply a list style to an ordered or unordered list. |
private void |
createLabels(ListStyle style,
java.lang.String[] sName,
int nMaxLevel,
boolean bDeclareCounters,
boolean bRenewLabels,
boolean bUseTextStyle,
LaTeXDocumentPortion ldp)
Create LaTeX list labels from an OOo list style. |
private void |
createListStyle(java.lang.String sStyleName)
Create "Writer style" lists based on a List Style. |
private void |
createListStyleLabels(java.lang.String sStyleName)
Create labels for default lists (enumerate/itemize) based on a List Style |
private java.lang.String |
getDisplayName(java.lang.String sName)
|
private java.lang.String |
getLength(ListStyle style,
int nLevel,
java.lang.String sProperty)
|
static java.lang.String |
numFormat(java.lang.String sFormat)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
boolean bNeedSaveEnumCounter
private java.util.Hashtable listStyleLevelNames
Constructor Detail |
---|
public ListStyleConverter(OfficeReader ofr, Config config, ConverterPalette palette)
Constructs a new ListStyleConverter
.
Method Detail |
---|
public void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
appendDeclarations
in class StyleConverter
public void applyListStyle(java.lang.String sStyleName, int nLevel, boolean bOrdered, boolean bContinue, BeforeAfter ba)
Apply a list style to an ordered or unordered list.
public void applyListItemStyle(java.lang.String sStyleName, int nLevel, boolean bHeader, boolean bRestart, int nStartValue, BeforeAfter ba)
Apply a list style to a list item.
private void createListStyleLabels(java.lang.String sStyleName)
Create labels for default lists (enumerate/itemize) based on a List Style
private void createListStyle(java.lang.String sStyleName)
Create "Writer style" lists based on a List Style.
A list in writer is really a sequence of numbered paragraphs, so this is also how we implement it in LaTeX. The enivronment + redefined \item defines three hooks: \writerlistleftskip, \writerlistparindent, \writerlistlabel which are used by exported paragraph styles to apply numbering.
private void createLabels(ListStyle style, java.lang.String[] sName, int nMaxLevel, boolean bDeclareCounters, boolean bRenewLabels, boolean bUseTextStyle, LaTeXDocumentPortion ldp)
Create LaTeX list labels from an OOo list style. Examples:
Bullets:
\newcommand\labelliststylei{\textbullet} \newcommand\labelliststyleii{*} \newcommand\labelliststyleiii{\textstylebullet{>}}
Numbering:
\newcounter{liststylei} \newcounter{liststyleii}[liststylei] \newcounter{liststyleiii}[liststyleii] \renewcommand\theliststylei{\Roman{liststylei}} \renewcommand\theliststyleii{\Roman{liststylei}.\arabic{liststyleii}} \renewcommand\theliststyleiii{\alph{liststyleiii}} \newcommand\labelliststylei{\textstylelabel{\theliststylei .}} \newcommand\labelliststyleii{\textstylelabel{\theliststyleii .}} \newcommand\labelliststyleiii{\textstylelabel{\theliststyleiii )}}
style
- the OOo list style to usesName
- an array of label basenames to usenMaxLevel
- the highest level in this numberingbDeclareCounters
- true if counters should be declared (they may
exist already, eg. "section", "subsection"... or "enumi", "enumii"...bRenewLabels
- true if labels should be defined with \renewcommandbUseTextStyle
- true if labels should be formatted with the associated text style
(rather than \newcommand).ldp
- the LaTeXDocumentPortion
to add LaTeX code to.private java.lang.String getLength(ListStyle style, int nLevel, java.lang.String sProperty)
private java.lang.String getDisplayName(java.lang.String sName)
public static final java.lang.String numFormat(java.lang.String sFormat)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |