protected void processNoteAnchor( HWPFDocument doc,
CharacterRun characterRun, final Element block )
{
{
Notes footnotes = doc.getFootnotes();
int noteIndex = footnotes
.getNoteIndexByAnchorPosition( characterRun
.getStartOffset() );
if ( noteIndex != -1 )
{
Range footnoteRange = doc.getFootnoteRange();
int rangeStartOffset = footnoteRange.getStartOffset();
int noteTextStartOffset = footnotes
.getNoteTextStartOffset( noteIndex );
int noteTextEndOffset = footnotes
.getNoteTextEndOffset( noteIndex );
Range noteTextRange = new Range( rangeStartOffset
+ noteTextStartOffset, rangeStartOffset
+ noteTextEndOffset, doc );
processFootnoteAutonumbered( doc, noteIndex, block,
noteTextRange );
return;
}
}
{
Notes endnotes = doc.getEndnotes();
int noteIndex = endnotes.getNoteIndexByAnchorPosition( characterRun
.getStartOffset() );
if ( noteIndex != -1 )
{
Range endnoteRange = doc.getEndnoteRange();
int rangeStartOffset = endnoteRange.getStartOffset();
int noteTextStartOffset = endnotes
.getNoteTextStartOffset( noteIndex );
int noteTextEndOffset = endnotes
.getNoteTextEndOffset( noteIndex );
Range noteTextRange = new Range( rangeStartOffset
+ noteTextStartOffset, rangeStartOffset
+ noteTextEndOffset, doc );