Eclipse warnings, Generics, unused members in some exapmles and scratchpad classes.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1668480 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2015-03-22 21:45:03 +00:00
parent dad8d1547c
commit b0f0aca92a
13 changed files with 61 additions and 67 deletions

View File

@ -93,12 +93,12 @@ public class ReadCustomPropertySets
out(" No. of sections: " + sectionCount); out(" No. of sections: " + sectionCount);
/* Print the list of sections: */ /* Print the list of sections: */
List sections = ps.getSections(); List<Section> sections = ps.getSections();
int nr = 0; int nr = 0;
for (Iterator i = sections.iterator(); i.hasNext();) for (Iterator<Section> i = sections.iterator(); i.hasNext();)
{ {
/* Print a single section: */ /* Print a single section: */
Section sec = (Section) i.next(); Section sec = i.next();
out(" Section " + nr++ + ":"); out(" Section " + nr++ + ":");
String s = hex(sec.getFormatID().getBytes()); String s = hex(sec.getFormatID().getBytes());
s = s.substring(0, s.length() - 1); s = s.substring(0, s.length() - 1);

View File

@ -21,10 +21,10 @@ package org.apache.poi.hdf.event;
import org.apache.poi.hdf.model.util.BTreeSet; import org.apache.poi.hdf.model.util.BTreeSet;
import org.apache.poi.hdf.model.util.NumberFormatter; import org.apache.poi.hdf.model.util.NumberFormatter;
import org.apache.poi.hdf.model.hdftypes.*; import org.apache.poi.hdf.model.hdftypes.*;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
@Deprecated @Deprecated
public final class EventBridge implements HDFLowLevelParsingListener public final class EventBridge implements HDFLowLevelParsingListener
@ -71,11 +71,11 @@ public final class EventBridge implements HDFLowLevelParsingListener
BTreeSet _hdrCharacterRuns = new BTreeSet(); BTreeSet _hdrCharacterRuns = new BTreeSet();
int _sectionCounter = 1; int _sectionCounter = 1;
ArrayList _hdrs = new ArrayList(); List<HeaderFooter[]> _hdrs = new ArrayList<HeaderFooter[]>();
private boolean _holdParagraph = false; private boolean _holdParagraph = false;
private int _endHoldIndex = -1; private int _endHoldIndex = -1;
private ArrayList _onHold; private List<PropertyNode> _onHold;
public EventBridge(HDFParsingListener listener) public EventBridge(HDFParsingListener listener)
{ {
@ -119,7 +119,7 @@ public final class EventBridge implements HDFLowLevelParsingListener
{ {
for (int x = 1; x < _sectionCounter; x++) for (int x = 1; x < _sectionCounter; x++)
{ {
HeaderFooter[] hdrArray = (HeaderFooter[])_hdrs.get(x-1); HeaderFooter[] hdrArray = _hdrs.get(x-1);
HeaderFooter hf = null; HeaderFooter hf = null;
if (!hdrArray[HeaderFooter.HEADER_EVEN - 1].isEmpty()) if (!hdrArray[HeaderFooter.HEADER_EVEN - 1].isEmpty())
@ -210,7 +210,7 @@ public final class EventBridge implements HDFLowLevelParsingListener
_holdParagraph = false; _holdParagraph = false;
_endHoldIndex = -1; _endHoldIndex = -1;
flushHeldParagraph(); flushHeldParagraph();
_onHold = new ArrayList(); _onHold = new ArrayList<PropertyNode>();
} }
} }
@ -219,7 +219,7 @@ public final class EventBridge implements HDFLowLevelParsingListener
CharacterProperties chp = (CharacterProperties)StyleSheet.uncompressProperty(byteChpx, _currentStd.getCHP(), _stsh); CharacterProperties chp = (CharacterProperties)StyleSheet.uncompressProperty(byteChpx, _currentStd.getCHP(), _stsh);
ArrayList textList = BTreeSet.findProperties(start, end, _text.root); List<PropertyNode> textList = BTreeSet.findProperties(start, end, _text.root);
String text = getTextFromNodes(textList, start, end); String text = getTextFromNodes(textList, start, end);
_listener.characterRun(chp, text, start - _fcMin, end - _fcMin); _listener.characterRun(chp, text, start - _fcMin, end - _fcMin);
@ -241,7 +241,7 @@ public final class EventBridge implements HDFLowLevelParsingListener
} }
private void flushHeaderProps(int start, int end) private void flushHeaderProps(int start, int end)
{ {
ArrayList list = BTreeSet.findProperties(start, end, _hdrSections.root); List<PropertyNode> list = BTreeSet.findProperties(start, end, _hdrSections.root);
int size = list.size(); int size = list.size();
for (int x = 0; x < size; x++) for (int x = 0; x < size; x++)
@ -253,7 +253,7 @@ public final class EventBridge implements HDFLowLevelParsingListener
//SepxNode node = new SepxNode(-1, secStart, secEnd, oldNode.getSepx()); //SepxNode node = new SepxNode(-1, secStart, secEnd, oldNode.getSepx());
//bodySection(node); //bodySection(node);
ArrayList parList = BTreeSet.findProperties(secStart, secEnd, _hdrParagraphs.root); List<PropertyNode> parList = BTreeSet.findProperties(secStart, secEnd, _hdrParagraphs.root);
int parSize = parList.size(); int parSize = parList.size();
for (int y = 0; y < parSize; y++) for (int y = 0; y < parSize; y++)
@ -265,7 +265,7 @@ public final class EventBridge implements HDFLowLevelParsingListener
PapxNode parNode = new PapxNode(parStart, parEnd, oldParNode.getPapx()); PapxNode parNode = new PapxNode(parStart, parEnd, oldParNode.getPapx());
paragraph(parNode); paragraph(parNode);
ArrayList charList = BTreeSet.findProperties(parStart, parEnd, _hdrCharacterRuns.root); List<PropertyNode> charList = BTreeSet.findProperties(parStart, parEnd, _hdrCharacterRuns.root);
int charSize = charList.size(); int charSize = charList.size();
for (int z = 0; z < charSize; z++) for (int z = 0; z < charSize; z++)
@ -282,7 +282,7 @@ public final class EventBridge implements HDFLowLevelParsingListener
} }
} }
private String getTextFromNodes(ArrayList list, int start, int end) private String getTextFromNodes(List<PropertyNode> list, int start, int end)
{ {
int size = list.size(); int size = list.size();

View File

@ -36,14 +36,14 @@ import org.apache.poi.hdf.model.hdftypes.PropertyNode;
* *
*/ */
@Deprecated @Deprecated
public final class BTreeSet extends AbstractSet public final class BTreeSet extends AbstractSet<PropertyNode>
{ {
/* /*
* Instance Variables * Instance Variables
*/ */
public BTreeNode root; public BTreeNode root;
private Comparator comparator = null; private Comparator<PropertyNode> comparator = null;
private int order; private int order;
int size = 0; int size = 0;
@ -59,7 +59,7 @@ public final class BTreeSet extends AbstractSet
this(6); // Default order for a BTreeSet is 32 this(6); // Default order for a BTreeSet is 32
} }
public BTreeSet(Collection c) public BTreeSet(Collection<PropertyNode> c)
{ {
this(6); // Default order for a BTreeSet is 32 this(6); // Default order for a BTreeSet is 32
addAll(c); addAll(c);
@ -70,7 +70,7 @@ public final class BTreeSet extends AbstractSet
this(order, null); this(order, null);
} }
public BTreeSet(int order, Comparator comparator) public BTreeSet(int order, Comparator<PropertyNode> comparator)
{ {
this.order = order; this.order = order;
this.comparator = comparator; this.comparator = comparator;
@ -81,18 +81,18 @@ public final class BTreeSet extends AbstractSet
/* /*
* Public Methods * Public Methods
*/ */
public boolean add(Object x) throws IllegalArgumentException public boolean add(PropertyNode x) throws IllegalArgumentException
{ {
if (x == null) throw new IllegalArgumentException(); if (x == null) throw new IllegalArgumentException();
return root.insert(x, -1); return root.insert(x, -1);
} }
public boolean contains(Object x) public boolean contains(PropertyNode x)
{ {
return root.includes(x); return root.includes(x);
} }
public boolean remove(Object x) public boolean remove(PropertyNode x)
{ {
if (x == null) return false; if (x == null) return false;
return root.delete(x, -1); return root.delete(x, -1);
@ -109,14 +109,14 @@ public final class BTreeSet extends AbstractSet
size = 0; size = 0;
} }
public java.util.Iterator iterator() public java.util.Iterator<PropertyNode> iterator()
{ {
return new Iterator(); return new Iterator();
} }
public static ArrayList findProperties(int start, int end, BTreeSet.BTreeNode root) public static List<PropertyNode> findProperties(int start, int end, BTreeSet.BTreeNode root)
{ {
ArrayList results = new ArrayList(); List<PropertyNode> results = new ArrayList<PropertyNode>();
BTreeSet.Entry[] entries = root.entries; BTreeSet.Entry[] entries = root.entries;
for(int x = 0; x < entries.length; x++) for(int x = 0; x < entries.length; x++)
@ -124,7 +124,7 @@ public final class BTreeSet extends AbstractSet
if(entries[x] != null) if(entries[x] != null)
{ {
BTreeSet.BTreeNode child = entries[x].child; BTreeSet.BTreeNode child = entries[x].child;
PropertyNode xNode = (PropertyNode)entries[x].element; PropertyNode xNode = entries[x].element;
if(xNode != null) if(xNode != null)
{ {
int xStart = xNode.getStart(); int xStart = xNode.getStart();
@ -135,7 +135,7 @@ public final class BTreeSet extends AbstractSet
{ {
if(child != null) if(child != null)
{ {
ArrayList beforeItems = findProperties(start, end, child); List<PropertyNode> beforeItems = findProperties(start, end, child);
results.addAll(beforeItems); results.addAll(beforeItems);
} }
results.add(xNode); results.add(xNode);
@ -150,7 +150,7 @@ public final class BTreeSet extends AbstractSet
{ {
if(child != null) if(child != null)
{ {
ArrayList beforeItems = findProperties(start, end, child); List<PropertyNode> beforeItems = findProperties(start, end, child);
results.addAll(beforeItems); results.addAll(beforeItems);
} }
break; break;
@ -158,7 +158,7 @@ public final class BTreeSet extends AbstractSet
} }
else if(child != null) else if(child != null)
{ {
ArrayList afterItems = findProperties(start, end, child); List<PropertyNode> afterItems = findProperties(start, end, child);
results.addAll(afterItems); results.addAll(afterItems);
} }
} }
@ -172,9 +172,9 @@ public final class BTreeSet extends AbstractSet
/* /*
* Private methods * Private methods
*/ */
int compare(Object x, Object y) int compare(PropertyNode x, PropertyNode y)
{ {
return (comparator == null ? ((Comparable)x).compareTo(y) : comparator.compare(x, y)); return (comparator == null ? x.compareTo(y) : comparator.compare(x, y));
} }
@ -192,12 +192,12 @@ public final class BTreeSet extends AbstractSet
* chance of receiving a NullPointerException. The Iterator.delete method is supported. * chance of receiving a NullPointerException. The Iterator.delete method is supported.
*/ */
private class Iterator implements java.util.Iterator private class Iterator implements java.util.Iterator<PropertyNode>
{ {
private int index = 0; private int index = 0;
private Stack parentIndex = new Stack(); // Contains all parentIndicies for currentNode private Stack<Integer> parentIndex = new Stack<Integer>(); // Contains all parentIndicies for currentNode
private Object lastReturned = null; private PropertyNode lastReturned = null;
private Object next; private PropertyNode next;
private BTreeNode currentNode; private BTreeNode currentNode;
Iterator() Iterator()
@ -211,7 +211,7 @@ public final class BTreeSet extends AbstractSet
return next != null; return next != null;
} }
public Object next() public PropertyNode next()
{ {
if (next == null) throw new NoSuchElementException(); if (next == null) throw new NoSuchElementException();
@ -241,7 +241,7 @@ public final class BTreeSet extends AbstractSet
return temp; return temp;
} }
private Object nextElement() private PropertyNode nextElement()
{ {
if (currentNode.isLeaf()) if (currentNode.isLeaf())
{ {
@ -250,13 +250,13 @@ public final class BTreeSet extends AbstractSet
else if (!parentIndex.empty()) else if (!parentIndex.empty())
{ //All elements have been returned, return successor of lastReturned if it exists { //All elements have been returned, return successor of lastReturned if it exists
currentNode = currentNode.parent; currentNode = currentNode.parent;
index = ((Integer)parentIndex.pop()).intValue(); index = parentIndex.pop().intValue();
while (index == currentNode.nrElements) while (index == currentNode.nrElements)
{ {
if (parentIndex.empty()) break; if (parentIndex.empty()) break;
currentNode = currentNode.parent; currentNode = currentNode.parent;
index = ((Integer)parentIndex.pop()).intValue(); index = parentIndex.pop().intValue();
} }
if (index == currentNode.nrElements) return null; //Reached root and he has no more children if (index == currentNode.nrElements) return null; //Reached root and he has no more children
@ -289,7 +289,7 @@ public final class BTreeSet extends AbstractSet
public static class Entry public static class Entry
{ {
public Object element; public PropertyNode element;
public BTreeNode child; public BTreeNode child;
} }
@ -309,11 +309,11 @@ public final class BTreeSet extends AbstractSet
entries[0] = new Entry(); entries[0] = new Entry();
} }
boolean insert(Object x, int parentIndex) boolean insert(PropertyNode x, int parentIndex)
{ {
if (isFull()) if (isFull())
{ // If full, you must split and promote splitNode before inserting { // If full, you must split and promote splitNode before inserting
Object splitNode = entries[nrElements / 2].element; PropertyNode splitNode = entries[nrElements / 2].element;
BTreeNode rightSibling = split(); BTreeNode rightSibling = split();
if (isRoot()) if (isRoot())
@ -354,7 +354,7 @@ public final class BTreeSet extends AbstractSet
return false; return false;
} }
boolean includes(Object x) boolean includes(PropertyNode x)
{ {
int index = childToInsertAt(x, true); int index = childToInsertAt(x, true);
if (index == -1) return true; if (index == -1) return true;
@ -362,7 +362,7 @@ public final class BTreeSet extends AbstractSet
return entries[index].child.includes(x); return entries[index].child.includes(x);
} }
boolean delete(Object x, int parentIndex) boolean delete(PropertyNode x, int parentIndex)
{ {
int i = childToInsertAt(x, true); int i = childToInsertAt(x, true);
int priorParentIndex = parentIndex; int priorParentIndex = parentIndex;
@ -438,7 +438,7 @@ public final class BTreeSet extends AbstractSet
* Creates a new BTreeSet.root which contains only the splitNode and pointers * Creates a new BTreeSet.root which contains only the splitNode and pointers
* to it's left and right child. * to it's left and right child.
*/ */
private void splitRoot(Object splitNode, BTreeNode left, BTreeNode right) private void splitRoot(PropertyNode splitNode, BTreeNode left, BTreeNode right)
{ {
BTreeNode newRoot = new BTreeNode(null); BTreeNode newRoot = new BTreeNode(null);
newRoot.entries[0].element = splitNode; newRoot.entries[0].element = splitNode;
@ -450,7 +450,7 @@ public final class BTreeSet extends AbstractSet
BTreeSet.this.root = newRoot; BTreeSet.this.root = newRoot;
} }
private void insertSplitNode(Object splitNode, BTreeNode left, BTreeNode right, int insertAt) private void insertSplitNode(PropertyNode splitNode, BTreeNode left, BTreeNode right, int insertAt)
{ {
for (int i = nrElements; i >= insertAt; i--) entries[i + 1] = entries[i]; for (int i = nrElements; i >= insertAt; i--) entries[i + 1] = entries[i];
@ -462,7 +462,7 @@ public final class BTreeSet extends AbstractSet
nrElements++; nrElements++;
} }
private void insertNewElement(Object x, int insertAt) private void insertNewElement(PropertyNode x, int insertAt)
{ {
for (int i = nrElements; i > insertAt; i--) entries[i] = entries[i - 1]; for (int i = nrElements; i > insertAt; i--) entries[i] = entries[i - 1];
@ -482,7 +482,7 @@ public final class BTreeSet extends AbstractSet
* element is contained in the calling BTreeNode than the position of the element * element is contained in the calling BTreeNode than the position of the element
* in entries[] is returned. * in entries[] is returned.
*/ */
private int childToInsertAt(Object x, boolean position) private int childToInsertAt(PropertyNode x, boolean position)
{ {
int index = nrElements / 2; int index = nrElements / 2;
@ -509,7 +509,7 @@ public final class BTreeSet extends AbstractSet
} }
private void deleteElement(Object x) private void deleteElement(PropertyNode x)
{ {
int index = childToInsertAt(x, false); int index = childToInsertAt(x, false);
for (; index < (nrElements - 1); index++) entries[index] = entries[index + 1]; for (; index < (nrElements - 1); index++) entries[index] = entries[index + 1];
@ -568,12 +568,12 @@ public final class BTreeSet extends AbstractSet
} }
} }
private void switchWithSuccessor(Object x) private void switchWithSuccessor(PropertyNode x)
{ {
int index = childToInsertAt(x, false); int index = childToInsertAt(x, false);
BTreeNode temp = entries[index + 1].child; BTreeNode temp = entries[index + 1].child;
while (temp.entries[0] != null && temp.entries[0].child != null) temp = temp.entries[0].child; while (temp.entries[0] != null && temp.entries[0].child != null) temp = temp.entries[0].child;
Object successor = temp.entries[0].element; PropertyNode successor = temp.entries[0].element;
temp.entries[0].element = entries[index].element; temp.entries[0].element = entries[index].element;
entries[index].element = successor; entries[index].element = successor;
} }

View File

@ -1034,7 +1034,6 @@ public abstract class AbstractWordConverter
} }
} }
@SuppressWarnings( "unused" )
protected boolean processOle2( HWPFDocument wordDocument, Element block, protected boolean processOle2( HWPFDocument wordDocument, Element block,
Entry entry ) throws Exception Entry entry ) throws Exception
{ {

View File

@ -38,7 +38,6 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
* @author Nick Burch * @author Nick Burch
*/ */
public final class Word6Extractor extends POIOLE2TextExtractor { public final class Word6Extractor extends POIOLE2TextExtractor {
private POIFSFileSystem fs;
private HWPFOldDocument doc; private HWPFOldDocument doc;
/** /**
@ -64,7 +63,6 @@ public final class Word6Extractor extends POIOLE2TextExtractor {
* @deprecated Use {@link #Word6Extractor(DirectoryNode)} instead * @deprecated Use {@link #Word6Extractor(DirectoryNode)} instead
*/ */
@Deprecated @Deprecated
@SuppressWarnings( "unused" )
public Word6Extractor( DirectoryNode dir, POIFSFileSystem fs ) public Word6Extractor( DirectoryNode dir, POIFSFileSystem fs )
throws IOException throws IOException
{ {

View File

@ -68,7 +68,6 @@ public final class WordExtractor extends POIOLE2TextExtractor
* @deprecated Use {@link #WordExtractor(DirectoryNode)} instead * @deprecated Use {@link #WordExtractor(DirectoryNode)} instead
*/ */
@Deprecated @Deprecated
@SuppressWarnings( "unused" )
public WordExtractor( DirectoryNode dir, POIFSFileSystem fs ) public WordExtractor( DirectoryNode dir, POIFSFileSystem fs )
throws IOException throws IOException
{ {
@ -109,7 +108,11 @@ public final class WordExtractor extends POIOLE2TextExtractor
// Process the first argument as a file // Process the first argument as a file
FileInputStream fin = new FileInputStream( args[0] ); FileInputStream fin = new FileInputStream( args[0] );
WordExtractor extractor = new WordExtractor( fin ); WordExtractor extractor = new WordExtractor( fin );
try {
System.out.println( extractor.getText() ); System.out.println( extractor.getText() );
} finally {
extractor.close();
}
} }
/** /**

View File

@ -62,7 +62,6 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
* {@link #CHPFormattedDiskPage(byte[], int, CharIndexTranslator)} * {@link #CHPFormattedDiskPage(byte[], int, CharIndexTranslator)}
* instead * instead
*/ */
@SuppressWarnings( "unused" )
public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin, public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin,
TextPieceTable tpt ) TextPieceTable tpt )
{ {
@ -145,7 +144,6 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
* @deprecated Use {@link #toByteArray(CharIndexTranslator)} instead * @deprecated Use {@link #toByteArray(CharIndexTranslator)} instead
*/ */
@Deprecated @Deprecated
@SuppressWarnings( "unused" )
protected byte[] toByteArray(CharIndexTranslator translator, int fcMin) protected byte[] toByteArray(CharIndexTranslator translator, int fcMin)
{ {
return toByteArray( translator ); return toByteArray( translator );

View File

@ -382,7 +382,7 @@ public final class CharacterProperties
cp.setDttmPropRMark( (DateAndTime) getDttmPropRMark().clone() ); cp.setDttmPropRMark( (DateAndTime) getDttmPropRMark().clone() );
cp.setDttmDispFldRMark( (DateAndTime) getDttmDispFldRMark().clone() ); cp.setDttmDispFldRMark( (DateAndTime) getDttmDispFldRMark().clone() );
cp.setXstDispFldRMark( getXstDispFldRMark().clone() ); cp.setXstDispFldRMark( getXstDispFldRMark().clone() );
cp.setShd( (ShadingDescriptor) getShd().clone() ); cp.setShd( getShd().clone() );
cp.setBrc( (BorderCode) getBrc().clone() ); cp.setBrc( (BorderCode) getBrc().clone() );
return cp; return cp;

View File

@ -570,7 +570,7 @@ public final class CharacterRun extends Range
cp._props.setDttmDispFldRMark((DateAndTime)_props.getDttmDispFldRMark(). cp._props.setDttmDispFldRMark((DateAndTime)_props.getDttmDispFldRMark().
clone()); clone());
cp._props.setXstDispFldRMark(_props.getXstDispFldRMark().clone()); cp._props.setXstDispFldRMark(_props.getXstDispFldRMark().clone());
cp._props.setShd((ShadingDescriptor)_props.getShd().clone()); cp._props.setShd(_props.getShd().clone());
return cp; return cp;
} }

View File

@ -17,10 +17,6 @@
package org.apache.poi.hwpf.usermodel; package org.apache.poi.hwpf.usermodel;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import org.apache.poi.hwpf.model.ListTables; import org.apache.poi.hwpf.model.ListTables;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
@ -52,7 +48,7 @@ import org.apache.poi.hwpf.sprm.ParagraphSprmCompressor;
*/ */
public final class HWPFList public final class HWPFList
{ {
private static POILogger log = POILogFactory.getLogger( HWPFList.class ); //private static POILogger log = POILogFactory.getLogger( HWPFList.class );
private boolean _ignoreLogicalLeftIdentation = false; private boolean _ignoreLogicalLeftIdentation = false;
private LFO _lfo; private LFO _lfo;

View File

@ -43,7 +43,7 @@ public final class ParagraphProperties extends PAPAbstractType implements
pp.setBrcBar( (BorderCode) getBrcBar().clone() ); pp.setBrcBar( (BorderCode) getBrcBar().clone() );
pp.setDcs( getDcs().clone() ); pp.setDcs( getDcs().clone() );
pp.setLspd( (LineSpacingDescriptor) getLspd().clone() ); pp.setLspd( (LineSpacingDescriptor) getLspd().clone() );
pp.setShd( (ShadingDescriptor) getShd().clone() ); pp.setShd( getShd().clone() );
pp.setPhe( getPhe().clone() ); pp.setPhe( getPhe().clone() );
return pp; return pp;
} }

View File

@ -53,7 +53,7 @@ public final class TableCellDescriptor extends TCAbstractType implements
throws CloneNotSupportedException throws CloneNotSupportedException
{ {
TableCellDescriptor tc = (TableCellDescriptor)super.clone(); TableCellDescriptor tc = (TableCellDescriptor)super.clone();
tc.setShd( (ShadingDescriptor) getShd().clone() ); tc.setShd( getShd().clone() );
tc.setBrcTop((BorderCode)getBrcTop().clone()); tc.setBrcTop((BorderCode)getBrcTop().clone());
tc.setBrcLeft((BorderCode)getBrcLeft().clone()); tc.setBrcLeft((BorderCode)getBrcLeft().clone());
tc.setBrcBottom((BorderCode)getBrcBottom().clone()); tc.setBrcBottom((BorderCode)getBrcBottom().clone());

View File

@ -71,7 +71,7 @@ public final class TableProperties extends TAPAbstractType implements Cloneable
tap.setRgshd( new ShadingDescriptor[getRgshd().length] ); tap.setRgshd( new ShadingDescriptor[getRgshd().length] );
for ( int x = 0; x < getRgshd().length; x++ ) for ( int x = 0; x < getRgshd().length; x++ )
{ {
tap.getRgshd()[x] = (ShadingDescriptor) getRgshd()[x].clone(); tap.getRgshd()[x] = getRgshd()[x].clone();
} }
tap.setBrcBottom( (BorderCode) getBrcBottom().clone() ); tap.setBrcBottom( (BorderCode) getBrcBottom().clone() );
@ -81,7 +81,7 @@ public final class TableProperties extends TAPAbstractType implements Cloneable
tap.setBrcTop( (BorderCode) getBrcTop().clone() ); tap.setBrcTop( (BorderCode) getBrcTop().clone() );
tap.setBrcVertical( (BorderCode) getBrcVertical().clone() ); tap.setBrcVertical( (BorderCode) getBrcVertical().clone() );
tap.setShdTable( (ShadingDescriptor) getShdTable().clone() ); tap.setShdTable( getShdTable().clone() );
tap.setRgbrcInsideDefault_0( (BorderCode) getRgbrcInsideDefault_0() tap.setRgbrcInsideDefault_0( (BorderCode) getRgbrcInsideDefault_0()
.clone() ); .clone() );