poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1167491 - in /poi/trunk/src/ooxml: java/org/apache/poi/xslf/usermodel/ testcases/org/apache/poi/xslf/usermodel/
Date Sat, 10 Sep 2011 10:50:05 GMT
Author: yegor
Date: Sat Sep 10 10:50:05 2011
New Revision: 1167491

URL: http://svn.apache.org/viewvc?rev=1167491&view=rev
Log:
initial support for table styles in XSLF

Added:
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyle.java
      - copied, changed from r1159055, poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
      - copied, changed from r1159055, poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTableStyles.java
      - copied, changed from r1159055, poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTable.java
Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java?rev=1167491&r1=1167490&r2=1167491&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java Sat Sep 10 10:50:05
2011
@@ -64,9 +64,10 @@ public class XMLSlideShow  extends POIXM
     private CTPresentation _presentation;
     private List<XSLFSlide> _slides;
     private Map<String, XSLFSlideMaster> _masters;
+    private List<XSLFPictureData> _pictures;
+    private XSLFTableStyles _tableStyles;
     private XSLFNotesMaster _notesMaster;
     private XSLFCommentAuthors _commentAuthors;
-    protected List<XSLFPictureData> _pictures;
 
     public XMLSlideShow() {
         this(empty());
@@ -124,6 +125,8 @@ public class XMLSlideShow  extends POIXM
                 } else if (p instanceof XSLFSlideMaster) {
                     XSLFSlideMaster master = (XSLFSlideMaster)p;
                     _masters.put(p.getPackageRelationship().getId(), master);
+                }else if (p instanceof XSLFTableStyles){
+                    _tableStyles = (XSLFTableStyles)p;
                 } else if (p instanceof XSLFNotesMaster) {
                     _notesMaster = (XSLFNotesMaster)p;
                 } else if (p instanceof XSLFCommentAuthors) {
@@ -335,4 +338,8 @@ public class XMLSlideShow  extends POIXM
         return imageNumber - 1;
     }
 
+    public XSLFTableStyles getTableStyles(){
+        return _tableStyles;
+    }
+
 }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java?rev=1167491&r1=1167490&r2=1167491&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java Sat Sep 10 10:50:05
2011
@@ -190,6 +190,13 @@ public class XSLFRelation extends POIXML
     		null
     );
 
+    public static final XSLFRelation TABLE_STYLES = new XSLFRelation(
+          "application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml",
+          "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles",
+          "/ppt/tableStyles.xml",
+          XSLFTableStyles.class
+    );
+
    private XSLFRelation(String type, String rel, String defaultName, Class<? extends POIXMLDocumentPart>
cls) {
       super(type, rel, defaultName, cls);
 

Copied: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyle.java (from r1159055,
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyle.java?p2=poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyle.java&p1=poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java&r1=1159055&r2=1167491&rev=1167491&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyle.java Sat Sep 10
10:50:05 2011
@@ -19,68 +19,29 @@
 
 package org.apache.poi.xslf.usermodel;
 
-import org.apache.poi.util.Units;
-import org.apache.xmlbeans.XmlObject;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTable;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTableCell;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTableRow;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTGraphicalObjectFrame;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Iterator;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTTableStyle;
 
 /**
  * Represents a table in a .pptx presentation
  *
  * @author Yegor Kozlov
  */
-public class XSLFTableRow implements Iterable<XSLFTableCell> {
-    private CTTableRow _row;
-    private List<XSLFTableCell> _cells;
-    private XSLFTable _table;
-
-    /*package*/ XSLFTableRow(CTTableRow row, XSLFTable table){
-        _row = row;
-        _table = table;
-        _cells = new ArrayList<XSLFTableCell>(_row.sizeOfTcArray());
-        for(CTTableCell cell : _row.getTcList()) {
-            _cells.add(new XSLFTableCell(cell, table.getSheet()));
-        }
-    }
-
-    public CTTableRow getXmlObject(){
-        return _row;
-    }
+public class XSLFTableStyle {
+    private CTTableStyle _tblStyle;
 
-    public Iterator<XSLFTableCell> iterator(){
-        return _cells.iterator();
+    /*package*/ XSLFTableStyle(CTTableStyle style){
+        _tblStyle = style;
     }
 
-    public List<XSLFTableCell> getCells(){
-        return Collections.unmodifiableList(_cells);
+    public CTTableStyle getXmlObject(){
+        return _tblStyle;
     }
 
-    public double getHeight(){
-        return Units.toPoints(_row.getH());
+    public String getStyleName(){
+        return _tblStyle.getStyleName();
     }
 
-    public void setHeight(double height){
-        _row.setH(Units.toEMU(height));
+    public String getStyleId(){
+        return _tblStyle.getStyleId();
     }
-
-    public XSLFTableCell addCell(){
-        CTTableCell c = _row.addNewTc();
-        c.set(XSLFTableCell.prototype());
-        XSLFTableCell cell = new XSLFTableCell(c, _table.getSheet());
-        _cells.add(cell);
-
-        if(_table.getNumberOfColumns() < _row.sizeOfTcArray()) {
-            _table.getCTTable().getTblGrid().addNewGridCol().setW(Units.toEMU(100.0));  
 
-        }
-        return cell;
-    }
-
-
-}
+}
\ No newline at end of file

Copied: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java (from
r1159055, poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java?p2=poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java&p1=poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java&r1=1159055&r2=1167491&rev=1167491&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java Sat Sep 10
10:50:05 2011
@@ -19,204 +19,45 @@ package org.apache.poi.xslf.usermodel;
 import org.apache.poi.POIXMLDocumentPart;
 import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackageRelationship;
-import org.apache.poi.openxml4j.opc.TargetMode;
 import org.apache.poi.util.Beta;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlOptions;
-import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTConnector;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTGraphicalObjectFrame;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTShape;
+import org.apache.xmlbeans.XmlException;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTTableStyle;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTTableStyleList;
 
-import javax.xml.namespace.QName;
 import java.io.IOException;
-import java.io.OutputStream;
 import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
+import java.util.Collections;
 
 @Beta
-public abstract class XSLFSheet extends POIXMLDocumentPart {
-    private XSLFDrawing _drawing;
-    private List<XSLFShape> _shapes;
-    private CTGroupShape _spTree;
+public class XSLFTableStyles extends POIXMLDocumentPart implements Iterable<XSLFTableStyle>{
+    private CTTableStyleList _tblStyleLst;
+    private List<XSLFTableStyle> _styles;
 
-    public XSLFSheet(){
+    public XSLFTableStyles(){
         super();
     }
 
-    public XSLFSheet(PackagePart part, PackageRelationship rel){
+    public XSLFTableStyles(PackagePart part, PackageRelationship rel) throws IOException,
XmlException {
         super(part, rel);
-    }
-
-	public XMLSlideShow getSlideShow() {
-		return (XMLSlideShow)getParent();
-	}
-
-    protected List<XSLFShape> buildShapes(CTGroupShape spTree){
-        List<XSLFShape> shapes = new ArrayList<XSLFShape>();
-        for(XmlObject ch : spTree.selectPath("*")){
-            if(ch instanceof CTShape){ // simple shape
-                XSLFAutoShape shape = XSLFAutoShape.create((CTShape)ch, this);
-                shapes.add(shape);
-            } else if (ch instanceof CTGroupShape){
-                shapes.add(new XSLFGroupShape((CTGroupShape)ch, this));
-            } else if (ch instanceof CTConnector){
-                shapes.add(new XSLFConnectorShape((CTConnector)ch, this));
-            } else if (ch instanceof CTPicture){
-                shapes.add(new XSLFPictureShape((CTPicture)ch, this));
-            } else if (ch instanceof CTGraphicalObjectFrame){
-                XSLFGraphicFrame shape = XSLFGraphicFrame.create((CTGraphicalObjectFrame)ch,
this);
-                shapes.add(shape);
-            }
-        }
-        return shapes;
-    }
-
-    public abstract XmlObject getXmlObject();
 
-
-    private XSLFDrawing getDrawing(){
-        if(_drawing == null) {
-            _drawing = new XSLFDrawing(this, getSpTree());
+        _tblStyleLst = CTTableStyleList.Factory.parse(getPackagePart().getInputStream());
+        _styles = new ArrayList<XSLFTableStyle>(_tblStyleLst.sizeOfTblStyleArray());
+        for(CTTableStyle c : _tblStyleLst.getTblStyleList()){
+            _styles.add(new XSLFTableStyle(c));
         }
-        return _drawing;
-    }
-
-    private List<XSLFShape> getShapeList(){
-        if(_shapes == null){
-            _shapes = buildShapes(getSpTree());
-        }
-        return _shapes;
-    }
-
-    // shape factory methods
-
-    public XSLFAutoShape createAutoShape(){
-        List<XSLFShape> shapes = getShapeList();
-        XSLFAutoShape sh = getDrawing().createAutoShape();
-        shapes.add(sh);
-        return sh;
-    }
-
-    public XSLFFreeformShape createFreeform(){
-        List<XSLFShape> shapes = getShapeList();
-        XSLFFreeformShape sh = getDrawing().createFreeform();
-        shapes.add(sh);
-        return sh;
-    }
-
-    public XSLFTextBox createTextBox(){
-        List<XSLFShape> shapes = getShapeList();
-        XSLFTextBox sh = getDrawing().createTextBox();
-        shapes.add(sh);
-        return sh;
     }
 
-    public XSLFConnectorShape createConnector(){
-        List<XSLFShape> shapes = getShapeList();
-        XSLFConnectorShape sh = getDrawing().createConnector();
-        shapes.add(sh);
-        return sh;
+    public CTTableStyleList getXmlObject(){
+        return _tblStyleLst;
     }
 
-    public XSLFGroupShape createGroup(){
-        List<XSLFShape> shapes = getShapeList();
-        XSLFGroupShape sh = getDrawing().createGroup();
-        shapes.add(sh);
-        return sh;
+    public Iterator<XSLFTableStyle> iterator(){
+        return _styles.iterator();
     }
 
-    public XSLFPictureShape createPicture(int pictureIndex){
-        List<PackagePart>  pics = getPackagePart().getPackage()
-                .getPartsByName(Pattern.compile("/ppt/media/.*?"));
-
-        PackagePart pic = pics.get(pictureIndex);
-
-        PackageRelationship rel = getPackagePart().addRelationship(
-                pic.getPartName(), TargetMode.INTERNAL, XSLFRelation.IMAGES.getRelation());
-        addRelation(rel.getId(), new XSLFPictureData(pic, rel));
-
-        XSLFPictureShape sh = getDrawing().createPicture(rel.getId());
-        sh.resize();
-
-        getShapeList().add(sh);
-        return sh;
+    public List<XSLFTableStyle> getStyles(){
+        return Collections.unmodifiableList(_styles);
     }
-
-    public XSLFTable createTable(){
-        List<XSLFShape> shapes = getShapeList();
-        XSLFTable sh = getDrawing().createTable();
-        shapes.add(sh);
-        return sh;
-    }
-
-    public XSLFShape[] getShapes(){
-        return getShapeList().toArray(new XSLFShape[_shapes.size()]);
-    }
-
-    public boolean removeShape(XSLFShape xShape) {
-        XmlObject obj = xShape.getXmlObject();
-        CTGroupShape spTree = getSpTree();
-        if(obj instanceof CTShape){
-            spTree.getSpList().remove(obj);
-        } else if (obj instanceof CTGroupShape){
-            spTree.getGrpSpList().remove(obj);
-        } else if (obj instanceof CTConnector){
-            spTree.getCxnSpList().remove(obj);
-        } else {
-            throw new IllegalArgumentException("Unsupported shape: " + xShape);
-        }
-        return getShapeList().remove(xShape);
-    }
-
-    protected abstract String getRootElementName();
-
-    protected CTGroupShape getSpTree(){
-        if(_spTree == null) {
-            XmlObject root = getXmlObject();
-            XmlObject[] sp = root.selectPath(
-                    "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main'
.//*/p:spTree");
-            if(sp.length == 0) throw new IllegalStateException("CTGroupShape was not found");
-            _spTree = (CTGroupShape)sp[0];
-        }
-        return _spTree;
-    }
-
-    protected final void commit() throws IOException {
-        XmlOptions xmlOptions = new XmlOptions(DEFAULT_XML_OPTIONS);
-
-        Map<String, String> map = new HashMap<String, String>();
-        map.put(STRelationshipId.type.getName().getNamespaceURI(), "r");
-        map.put("http://schemas.openxmlformats.org/drawingml/2006/main", "a");
-        map.put("http://schemas.openxmlformats.org/presentationml/2006/main", "p");
-        xmlOptions.setSaveSuggestedPrefixes(map);
-        String docName = getRootElementName();
-        if(docName != null) {
-            xmlOptions.setSaveSyntheticDocumentElement(
-                    new QName("http://schemas.openxmlformats.org/presentationml/2006/main",
docName));
-        }
-
-        PackagePart part = getPackagePart();
-        OutputStream out = part.getOutputStream();
-        getXmlObject().save(out, xmlOptions);
-        out.close();
-    }
-
-    /**
-     * Set the contents of this sheet to be a copy of the source sheet.
-     *
-     * @param src the source sheet to copy data from
-     */
-    public void copy(XSLFSheet src){
-        _shapes = null;
-        _spTree = null;
-        _drawing = null;
-        getXmlObject().set(src.getXmlObject());
-    }
-
 }
\ No newline at end of file

Copied: poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTableStyles.java
(from r1159055, poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTable.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTableStyles.java?p2=poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTableStyles.java&p1=poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTable.java&r1=1159055&r2=1167491&rev=1167491&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTable.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTableStyles.java Sat
Sep 10 10:50:05 2011
@@ -30,121 +30,13 @@ import org.openxmlformats.schemas.presen
 /**
  * @author Yegor Kozlov
  */
-public class TestXSLFTable extends TestCase {
+public class TestXSLFTableStyles extends TestCase {
 
     public void testRead(){
-        XMLSlideShow  ppt = XSLFTestDataSamples.openSampleDocument("shapes.pptx");
+        XMLSlideShow  ppt = new XMLSlideShow();
+        XSLFTableStyles tblStyles = ppt.getTableStyles();
+        assertNotNull(tblStyles);
 
-        XSLFSlide slide = ppt.getSlides()[3];
-        XSLFShape[] shapes = slide.getShapes();
-        assertEquals(1, shapes.length);
-        assertTrue(shapes[0] instanceof XSLFTable);
-        XSLFTable tbl = (XSLFTable)shapes[0];
-        assertEquals(3, tbl.getNumberOfColumns());
-        assertEquals(6, tbl.getNumberOfRows());
-        assertNotNull(tbl.getCTTable());
-
-        List<XSLFTableRow> rows = tbl.getRows();
-        assertEquals(6, rows.size());
-
-        assertEquals(90.0, tbl.getColumnWidth(0));
-        assertEquals(240.0, tbl.getColumnWidth(1));
-        assertEquals(150.0, tbl.getColumnWidth(2));
-
-        for(XSLFTableRow row : tbl){
-            // all rows have the same height
-            assertEquals(29.2, row.getHeight());
-        }
-
-        XSLFTableRow row0 = rows.get(0);
-        List<XSLFTableCell> cells0 = row0.getCells();
-        assertEquals(3, cells0.size());
-        assertEquals("header1", cells0.get(0).getText());
-        assertEquals("header2", cells0.get(1).getText());
-        assertEquals("header3", cells0.get(2).getText());
-
-        XSLFTableRow row1 = rows.get(1);
-        List<XSLFTableCell> cells1 = row1.getCells();
-        assertEquals(3, cells1.size());
-        assertEquals("A1", cells1.get(0).getText());
-        assertEquals("B1", cells1.get(1).getText());
-        assertEquals("C1", cells1.get(2).getText());
-    }
-
-    public void testCreate() {
-        XMLSlideShow ppt = new XMLSlideShow();
-        XSLFSlide slide = ppt.createSlide();
-
-        XSLFTable tbl = slide.createTable();
-        assertNotNull(tbl.getCTTable());
-        assertNotNull(tbl.getCTTable().getTblGrid());
-        assertNotNull(tbl.getCTTable().getTblPr());
-        assertTrue(tbl.getXmlObject() instanceof CTGraphicalObjectFrame);
-        assertEquals("Table 1", tbl.getShapeName());
-        assertEquals(2, tbl.getShapeId());
-        assertEquals(0, tbl.getRows().size());
-        assertEquals(0, tbl.getCTTable().sizeOfTrArray());
-        assertEquals(0, tbl.getCTTable().getTblGrid().sizeOfGridColArray());
-
-        assertEquals(0, tbl.getNumberOfColumns());
-        assertEquals(0, tbl.getNumberOfRows());
-
-        XSLFTableRow row0 = tbl.addRow();
-        assertNotNull(row0.getXmlObject());
-        assertEquals(1, tbl.getNumberOfRows());
-        assertSame(row0, tbl.getRows().get(0));
-        assertEquals(20.0, row0.getHeight());
-        row0.setHeight(30.0);
-        assertEquals(30.0, row0.getHeight());
-
-        assertEquals(0, row0.getCells().size());
-        XSLFTableCell cell0 = row0.addCell();
-        assertNotNull(cell0.getXmlObject());
-        // by default table cell has no borders
-        assertTrue(cell0.getXmlObject().getTcPr().getLnB().isSetNoFill());
-        assertTrue(cell0.getXmlObject().getTcPr().getLnT().isSetNoFill());
-        assertTrue(cell0.getXmlObject().getTcPr().getLnL().isSetNoFill());
-        assertTrue(cell0.getXmlObject().getTcPr().getLnR().isSetNoFill());
-
-        assertSame(cell0, row0.getCells().get(0));
-        assertEquals(1, tbl.getNumberOfColumns());
-        assertEquals(100.0, tbl.getColumnWidth(0));
-        cell0.addNewTextParagraph().addNewTextRun().setText("POI");
-        assertEquals("POI", cell0.getText());
-
-        XSLFTableCell cell1 = row0.addCell();
-        assertSame(cell1, row0.getCells().get(1));
-        assertEquals(2, tbl.getNumberOfColumns());
-        assertEquals(100.0, tbl.getColumnWidth(1));
-        cell1.addNewTextParagraph().addNewTextRun().setText("Apache");
-        assertEquals("Apache", cell1.getText());
-
-        assertEquals(1.0, cell1.getBorderBottom());
-        cell1.setBorderBottom(2.0);
-        assertEquals(2.0, cell1.getBorderBottom());
-        assertNull(cell1.getBorderBottomColor());
-        cell1.setBorderBottomColor(Color.yellow);
-        assertEquals(Color.yellow, cell1.getBorderBottomColor());
-
-        assertEquals(1.0, cell1.getBorderTop());
-        cell1.setBorderTop(2.0);
-        assertEquals(2.0, cell1.getBorderTop());
-        assertNull(cell1.getBorderTopColor());
-        cell1.setBorderTopColor(Color.yellow);
-        assertEquals(Color.yellow, cell1.getBorderTopColor());
-
-        assertEquals(1.0, cell1.getBorderLeft());
-        cell1.setBorderLeft(2.0);
-        assertEquals(2.0, cell1.getBorderLeft());
-        assertNull(cell1.getBorderLeftColor());
-        cell1.setBorderLeftColor(Color.yellow);
-        assertEquals(Color.yellow, cell1.getBorderLeftColor());
-
-        assertEquals(1.0, cell1.getBorderRight());
-        cell1.setBorderRight(2.0);
-        assertEquals(2.0, cell1.getBorderRight());
-        assertNull(cell1.getBorderRightColor());
-        cell1.setBorderRightColor(Color.yellow);
-        assertEquals(Color.yellow, cell1.getBorderRightColor());
+        assertEquals(10, tblStyles.getStyles().size());
     }
 }
\ No newline at end of file



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


Mime
View raw message