fix loosed formatting to endnotes and footnotes in Word-to-HTML and Word-to-FO converters

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1149022 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-21 03:34:56 +00:00
parent 3f0760921f
commit b4ae01ff14
2 changed files with 36 additions and 4 deletions

View File

@ -284,7 +284,17 @@ public class WordToFoConverter extends AbstractWordConverter
backwardLink.appendChild( createNoteInline( textIndex + " " ) ); backwardLink.appendChild( createNoteInline( textIndex + " " ) );
backwardLink.setAttribute( "id", forwardLinkName ); backwardLink.setAttribute( "id", forwardLinkName );
endnote.appendChild( backwardLink ); endnote.appendChild( backwardLink );
processCharacters( doc, Integer.MIN_VALUE, endnoteTextRange, endnote );
blocksProperies.push( new BlockProperies( "", -1, false, false ) );
try
{
processCharacters( doc, Integer.MIN_VALUE, endnoteTextRange,
endnote );
}
finally
{
blocksProperies.pop();
}
this.endnotes.add( endnote ); this.endnotes.add( endnote );
} }
@ -317,8 +327,16 @@ public class WordToFoConverter extends AbstractWordConverter
footnoteBody.appendChild( footnoteBlock ); footnoteBody.appendChild( footnoteBlock );
footNote.appendChild( footnoteBody ); footNote.appendChild( footnoteBody );
processCharacters( doc, Integer.MIN_VALUE, footnoteTextRange, blocksProperies.push( new BlockProperies( "", -1, false, false ) );
footnoteBlock ); try
{
processCharacters( doc, Integer.MIN_VALUE, footnoteTextRange,
footnoteBlock );
}
finally
{
blocksProperies.pop();
}
} }
protected void processHyperlink( HWPFDocumentCore wordDocument, protected void processHyperlink( HWPFDocumentCore wordDocument,

View File

@ -437,7 +437,15 @@ public class WordToHtmlConverter extends AbstractWordConverter
span.setAttribute( "class", type + "notetext" ); span.setAttribute( "class", type + "notetext" );
note.appendChild( span ); note.appendChild( span );
processCharacters( doc, Integer.MIN_VALUE, noteTextRange, span ); this.blocksProperies.add( new BlockProperies( "", -1 ) );
try
{
processCharacters( doc, Integer.MIN_VALUE, noteTextRange, span );
}
finally
{
this.blocksProperies.pop();
}
} }
protected void processPageref( HWPFDocumentCore hwpfDocument, protected void processPageref( HWPFDocumentCore hwpfDocument,
@ -658,6 +666,12 @@ public class WordToHtmlConverter extends AbstractWordConverter
} }
final Element tableElement = htmlDocumentFacade.createTable(); final Element tableElement = htmlDocumentFacade.createTable();
tableElement
.setAttribute(
"class",
htmlDocumentFacade.getOrCreateCssClass(
tableElement.getTagName(), "t",
"table-layout:fixed;border-collapse:collapse;border-spacing:0;" ) );
if ( tableHeader.hasChildNodes() ) if ( tableHeader.hasChildNodes() )
{ {
tableElement.appendChild( tableHeader ); tableElement.appendChild( tableHeader );