Class TextDoc
java.lang.Object
com.github.oowekyala.ooxml.messages.TextDoc
-
Field Summary
FieldsModifier and TypeFieldDescriptionThis list has one entry for each line, denoting the start offset of the line.private final Stringprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcolumnFromOffset(int lineNumber, int offset) private intgetLineLengthWithLineSeparator(Scanner scanner) Sums the line length without the line separation and the characters which matched the line separation pattern(package private) ContextLinesgetLinesAround(@com.github.oowekyala.ooxml.messages.Annots.OneBased int line, int numLinesAround) Returns the full source.intlineNumberFromOffset(int offset)
-
Field Details
-
lineOffsets
This list has one entry for each line, denoting the start offset of the line. The start offset of the next line includes the length of the line terminator (1 for \r|\n, 2 for \r\n). -
lines
-
sourceCodeLength
private final int sourceCodeLength -
sourceCode
-
-
Constructor Details
-
TextDoc
TextDoc(String sourceCode)
-
-
Method Details
-
getTextString
Returns the full source. -
getLinesAround
ContextLines getLinesAround(@com.github.oowekyala.ooxml.messages.Annots.OneBased int line, int numLinesAround) -
getLineLengthWithLineSeparator
Sums the line length without the line separation and the characters which matched the line separation pattern- Parameters:
scanner- the scanner from which to read the line's length- Returns:
- the length of the line with the line separator.
-
lineNumberFromOffset
public int lineNumberFromOffset(int offset) -
columnFromOffset
public int columnFromOffset(int lineNumber, int offset)
-