Package org.docx4j.toc.switches
Class CSwitch
java.lang.Object
org.docx4j.toc.switches.AbstractSwitch
org.docx4j.toc.switches.SelectorSwitch
org.docx4j.toc.switches.CSwitch
- All Implemented Interfaces:
SwitchInterface
\c field-argument
Includes figures, tables, charts, and other items that are numbered
by a SEQ field (ยง2.16.5.63).
The sequence identifier designated by text in this switch's field-argument,
which corresponds to the caption label, shall match the identifier
in the corresponding SEQ field.
- Since:
- 11.5.4
-
Field Summary
FieldsFields inherited from class org.docx4j.toc.switches.AbstractSwitch
EMPTY, ERROR_NOT_VALID_HEADING_LEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringextractInstr(List<Object> instructions) protected static StringgetIdentifierFromInstr(String instr) Get the identifier from, for example SEQ Figure \* ARABICintbooleanbooleanparseFieldArgument(String fieldArgument) Default implementation doesn't need to parse at all.postprocess(P p, WordprocessingMLPackage wordMLPackage) We detected a SEQ in the P, so before we put the P in the TOC, lets resolve the SEQ to a number.voidprocess(P p, SwitchProcessorInterface sp) voidprocess(Style s, SwitchProcessorInterface sp) Methods inherited from class org.docx4j.toc.switches.AbstractSwitch
getEndLevel, getStartLevel, getStyleLevelMap, isSelectorSwitch, prepareArgument
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
CSwitch
public CSwitch()
-
-
Method Details
-
getPriority
public int getPriority() -
getItemIdentifier
-
parseFieldArgument
Description copied from class:AbstractSwitchDefault implementation doesn't need to parse at all.- Specified by:
parseFieldArgumentin interfaceSwitchInterface- Overrides:
parseFieldArgumentin classAbstractSwitch- Parameters:
fieldArgument- .- Returns:
- error string if any for exception
-
hasFieldArgument
public boolean hasFieldArgument() -
process
-
process
-
isDetected
public boolean isDetected() -
postprocess
We detected a SEQ in the P, so before we put the P in the TOC, lets resolve the SEQ to a number.- Parameters:
p-
-
extractInstr
-
getIdentifierFromInstr
Get the identifier from, for example SEQ Figure \* ARABIC
-