rename fileManager variable of type PicturesManager to picturesManager

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1151770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-28 09:06:56 +00:00
parent aeeed4ee06
commit 45b4dc4a88
3 changed files with 32 additions and 31 deletions

View File

@ -95,10 +95,10 @@ public abstract class AbstractWordConverter
private final Set<Bookmark> bookmarkStack = new LinkedHashSet<Bookmark>(); private final Set<Bookmark> bookmarkStack = new LinkedHashSet<Bookmark>();
private PicturesManager fileManager;
private FontReplacer fontReplacer = new DefaultFontReplacer(); private FontReplacer fontReplacer = new DefaultFontReplacer();
private PicturesManager picturesManager;
protected Triplet getCharacterRunTriplet( CharacterRun characterRun ) protected Triplet getCharacterRunTriplet( CharacterRun characterRun )
{ {
Triplet original = new Triplet(); Triplet original = new Triplet();
@ -111,11 +111,6 @@ public abstract class AbstractWordConverter
public abstract Document getDocument(); public abstract Document getDocument();
public PicturesManager getFileManager()
{
return fileManager;
}
public FontReplacer getFontReplacer() public FontReplacer getFontReplacer()
{ {
return fontReplacer; return fontReplacer;
@ -158,6 +153,11 @@ public abstract class AbstractWordConverter
return count; return count;
} }
public PicturesManager getPicturesManager()
{
return picturesManager;
}
protected int getTableCellEdgesIndexSkipCount( Table table, int r, protected int getTableCellEdgesIndexSkipCount( Table table, int r,
int[] tableCellEdges, int currentEdgeIndex, int c, int[] tableCellEdges, int currentEdgeIndex, int c,
TableCell tableCell ) TableCell tableCell )
@ -774,16 +774,16 @@ public abstract class AbstractWordConverter
protected abstract void processTable( HWPFDocumentCore wordDocument, protected abstract void processTable( HWPFDocumentCore wordDocument,
Element flow, Table table ); Element flow, Table table );
public void setFileManager( PicturesManager fileManager )
{
this.fileManager = fileManager;
}
public void setFontReplacer( FontReplacer fontReplacer ) public void setFontReplacer( FontReplacer fontReplacer )
{ {
this.fontReplacer = fontReplacer; this.fontReplacer = fontReplacer;
} }
public void setPicturesManager( PicturesManager fileManager )
{
this.picturesManager = fileManager;
}
protected int tryDeadField( HWPFDocumentCore wordDocument, Range range, protected int tryDeadField( HWPFDocumentCore wordDocument, Range range,
int currentTableLevel, int beginMark, Element currentBlock ) int currentTableLevel, int beginMark, Element currentBlock )
{ {

View File

@ -359,8 +359,9 @@ public class WordToFoConverter extends AbstractWordConverter
* HWPF object, contained picture data and properties * HWPF object, contained picture data and properties
*/ */
protected void processImage( Element currentBlock, boolean inlined, protected void processImage( Element currentBlock, boolean inlined,
Picture picture ) { Picture picture )
PicturesManager fileManager = getFileManager(); {
PicturesManager fileManager = getPicturesManager();
if ( fileManager != null ) if ( fileManager != null )
{ {
String url = fileManager.savePicture( picture ); String url = fileManager.savePicture( picture );

View File

@ -61,22 +61,6 @@ import static org.apache.poi.hwpf.converter.AbstractWordUtils.TWIPS_PER_INCH;
public class WordToHtmlConverter extends AbstractWordConverter public class WordToHtmlConverter extends AbstractWordConverter
{ {
/**
* Holds properties values, applied to current <tt>p</tt> element. Those
* properties shall not be doubled in children <tt>span</tt> elements.
*/
private static class BlockProperies
{
final String pFontName;
final int pFontSize;
public BlockProperies( String pFontName, int pFontSize )
{
this.pFontName = pFontName;
this.pFontSize = pFontSize;
}
}
private static final POILogger logger = POILogFactory private static final POILogger logger = POILogFactory
.getLogger( WordToHtmlConverter.class ); .getLogger( WordToHtmlConverter.class );
@ -315,7 +299,7 @@ public class WordToHtmlConverter extends AbstractWordConverter
protected void processImage( Element currentBlock, boolean inlined, protected void processImage( Element currentBlock, boolean inlined,
Picture picture ) Picture picture )
{ {
PicturesManager fileManager = getFileManager(); PicturesManager fileManager = getPicturesManager();
if ( fileManager != null ) if ( fileManager != null )
{ {
String url = fileManager.savePicture( picture ); String url = fileManager.savePicture( picture );
@ -707,4 +691,20 @@ public class WordToHtmlConverter extends AbstractWordConverter
} }
} }
/**
* Holds properties values, applied to current <tt>p</tt> element. Those
* properties shall not be doubled in children <tt>span</tt> elements.
*/
private static class BlockProperies
{
final String pFontName;
final int pFontSize;
public BlockProperies( String pFontName, int pFontSize )
{
this.pFontName = pFontName;
this.pFontSize = pFontSize;
}
}
} }