poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1149031 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
Date Thu, 21 Jul 2011 03:55:25 GMT
Author: sergey
Date: Thu Jul 21 03:55:24 2011
New Revision: 1149031

URL: http://svn.apache.org/viewvc?rev=1149031&view=rev
Log:
better default css for endnotes in Word-to-HTML converter

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java?rev=1149031&r1=1149030&r2=1149031&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java Thu
Jul 21 03:55:24 2011
@@ -407,15 +407,17 @@ public class WordToHtmlConverter extends
     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
         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" );



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message