better default css for endnotes in Word-to-HTML converter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1149031 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee1624ad5b
commit
a38b32750b
@ -407,15 +407,17 @@ public class WordToHtmlConverter extends AbstractWordConverter
|
|||||||
protected void processNoteAutonumbered( HWPFDocument doc, String type,
|
protected void processNoteAutonumbered( HWPFDocument doc, String type,
|
||||||
int noteIndex, Element block, Range noteTextRange )
|
int noteIndex, Element block, Range noteTextRange )
|
||||||
{
|
{
|
||||||
String textIndex = String.valueOf( noteIndex + 1 );
|
final String textIndex = String.valueOf( noteIndex + 1 );
|
||||||
|
final String textIndexClass = htmlDocumentFacade.getOrCreateCssClass(
|
||||||
|
"a", "a", "vertical-align:super;font-size:smaller;" );
|
||||||
final String forwardNoteLink = type + "note_" + textIndex;
|
final String forwardNoteLink = type + "note_" + textIndex;
|
||||||
final String backwardNoteLink = type + "note_back_" + textIndex;
|
final String backwardNoteLink = type + "note_back_" + textIndex;
|
||||||
|
|
||||||
Element anchor = htmlDocumentFacade.createHyperlink( "#"
|
Element anchor = htmlDocumentFacade.createHyperlink( "#"
|
||||||
+ forwardNoteLink );
|
+ forwardNoteLink );
|
||||||
anchor.setAttribute( "name", backwardNoteLink );
|
anchor.setAttribute( "name", backwardNoteLink );
|
||||||
anchor.setAttribute( "class", type + "noteanchor" );
|
anchor.setAttribute( "class", textIndexClass + " " + type
|
||||||
|
+ "noteanchor" );
|
||||||
anchor.setTextContent( textIndex );
|
anchor.setTextContent( textIndex );
|
||||||
block.appendChild( anchor );
|
block.appendChild( anchor );
|
||||||
|
|
||||||
@ -432,6 +434,8 @@ public class WordToHtmlConverter extends AbstractWordConverter
|
|||||||
Element bookmark = htmlDocumentFacade.createBookmark( forwardNoteLink );
|
Element bookmark = htmlDocumentFacade.createBookmark( forwardNoteLink );
|
||||||
bookmark.setAttribute( "href", "#" + backwardNoteLink );
|
bookmark.setAttribute( "href", "#" + backwardNoteLink );
|
||||||
bookmark.setTextContent( textIndex );
|
bookmark.setTextContent( textIndex );
|
||||||
|
bookmark.setAttribute( "class", textIndexClass + " " + type
|
||||||
|
+ "noteindex" );
|
||||||
note.appendChild( bookmark );
|
note.appendChild( bookmark );
|
||||||
|
|
||||||
Element span = htmlDocumentFacade.getDocument().createElement( "span" );
|
Element span = htmlDocumentFacade.getDocument().createElement( "span" );
|
||||||
|
Loading…
Reference in New Issue
Block a user