aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad
diff options
context:
space:
mode:
authorSergey Vladimirov <sergey@apache.org>2011-07-21 03:55:24 +0000
committerSergey Vladimirov <sergey@apache.org>2011-07-21 03:55:24 +0000
commit356990061c075dfb88aac5c36750b66b36ad2a68 (patch)
tree60a269c225bb9f2e65c2580a5bcd28427538ba38 /src/scratchpad
parent590972a8bca256531b2a03c3f68a84eee4719b23 (diff)
downloadpoi-356990061c075dfb88aac5c36750b66b36ad2a68.tar.gz
poi-356990061c075dfb88aac5c36750b66b36ad2a68.zip
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
Diffstat (limited to 'src/scratchpad')
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
index bd2472fbf0..032d732c11 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
@@ -407,15 +407,17 @@ public class WordToHtmlConverter extends AbstractWordConverter
protected void processNoteAutonumbered( HWPFDocument doc, String type,
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 backwardNoteLink = type + "note_back_" + textIndex;
Element anchor = htmlDocumentFacade.createHyperlink( "#"
+ forwardNoteLink );
anchor.setAttribute( "name", backwardNoteLink );
- anchor.setAttribute( "class", type + "noteanchor" );
+ anchor.setAttribute( "class", textIndexClass + " " + type
+ + "noteanchor" );
anchor.setTextContent( textIndex );
block.appendChild( anchor );
@@ -432,6 +434,8 @@ public class WordToHtmlConverter extends AbstractWordConverter
Element bookmark = htmlDocumentFacade.createBookmark( forwardNoteLink );
bookmark.setAttribute( "href", "#" + backwardNoteLink );
bookmark.setTextContent( textIndex );
+ bookmark.setAttribute( "class", textIndexClass + " " + type
+ + "noteindex" );
note.appendChild( bookmark );
Element span = htmlDocumentFacade.getDocument().createElement( "span" );