From 99f69d31a8296a532beacd9a49ff1490ccfef044 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Thu, 28 Jul 2011 09:06:56 +0000 Subject: [PATCH] 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 --- .../hwpf/converter/AbstractWordConverter.java | 22 ++++++------ .../poi/hwpf/converter/WordToFoConverter.java | 5 +-- .../hwpf/converter/WordToHtmlConverter.java | 34 +++++++++---------- 3 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java index d27b867151..45e29a4a8a 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -95,10 +95,10 @@ public abstract class AbstractWordConverter private final Set bookmarkStack = new LinkedHashSet(); - private PicturesManager fileManager; - private FontReplacer fontReplacer = new DefaultFontReplacer(); + private PicturesManager picturesManager; + protected Triplet getCharacterRunTriplet( CharacterRun characterRun ) { Triplet original = new Triplet(); @@ -111,11 +111,6 @@ public abstract class AbstractWordConverter public abstract Document getDocument(); - public PicturesManager getFileManager() - { - return fileManager; - } - public FontReplacer getFontReplacer() { return fontReplacer; @@ -158,6 +153,11 @@ public abstract class AbstractWordConverter return count; } + public PicturesManager getPicturesManager() + { + return picturesManager; + } + protected int getTableCellEdgesIndexSkipCount( Table table, int r, int[] tableCellEdges, int currentEdgeIndex, int c, TableCell tableCell ) @@ -774,14 +774,14 @@ public abstract class AbstractWordConverter protected abstract void processTable( HWPFDocumentCore wordDocument, Element flow, Table table ); - public void setFileManager( PicturesManager fileManager ) + public void setFontReplacer( FontReplacer fontReplacer ) { - this.fileManager = fileManager; + this.fontReplacer = fontReplacer; } - public void setFontReplacer( FontReplacer fontReplacer ) + public void setPicturesManager( PicturesManager fileManager ) { - this.fontReplacer = fontReplacer; + this.picturesManager = fileManager; } protected int tryDeadField( HWPFDocumentCore wordDocument, Range range, diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java index d566e9aff8..8121e2cd9c 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java @@ -359,8 +359,9 @@ public class WordToFoConverter extends AbstractWordConverter * HWPF object, contained picture data and properties */ protected void processImage( Element currentBlock, boolean inlined, - Picture picture ) { - PicturesManager fileManager = getFileManager(); + Picture picture ) + { + PicturesManager fileManager = getPicturesManager(); if ( fileManager != null ) { String url = fileManager.savePicture( picture ); 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 ebc1a673fb..f17a76c130 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java @@ -61,22 +61,6 @@ import static org.apache.poi.hwpf.converter.AbstractWordUtils.TWIPS_PER_INCH; public class WordToHtmlConverter extends AbstractWordConverter { - /** - * Holds properties values, applied to current p element. Those - * properties shall not be doubled in children span 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 .getLogger( WordToHtmlConverter.class ); @@ -315,7 +299,7 @@ public class WordToHtmlConverter extends AbstractWordConverter protected void processImage( Element currentBlock, boolean inlined, Picture picture ) { - PicturesManager fileManager = getFileManager(); + PicturesManager fileManager = getPicturesManager(); if ( fileManager != null ) { String url = fileManager.savePicture( picture ); @@ -707,4 +691,20 @@ public class WordToHtmlConverter extends AbstractWordConverter } } + /** + * Holds properties values, applied to current p element. Those + * properties shall not be doubled in children span elements. + */ + private static class BlockProperies + { + final String pFontName; + final int pFontSize; + + public BlockProperies( String pFontName, int pFontSize ) + { + this.pFontName = pFontName; + this.pFontSize = pFontSize; + } + } + } -- 2.39.5