Package org.openxmlformats.schemas.wordprocessingml.x2006.main

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow


  protected void setUp() throws Exception {
    super.setUp();
  }

  public void testCreateRow() throws Exception {
    CTRow ctRow = CTRow.Factory.newInstance();
    assertNotNull(ctRow);
  }
View Full Code Here


        cursor.toParent();
        XmlObject o = cursor.getObject();
        if(!(o instanceof CTRow)){
            return null;
        }
        CTRow row = (CTRow)o;
        cursor.toParent();
        o = cursor.getObject();
        cursor.dispose();
        if(! (o instanceof CTTbl)){
            return null;
View Full Code Here

     * @param pos
     * @return  the inserted row
     */
    public XWPFTableRow insertNewTableRow(int pos){
        if(pos >= 0 && pos <= tableRows.size()){
            CTRow row = ctTbl.insertNewTr(pos);
            XWPFTableRow tableRow = new XWPFTableRow(row, this);
            tableRows.add(pos, tableRow);
            return tableRow;
        }
        return null;
View Full Code Here

        cursor.toParent();
        XmlObject o = cursor.getObject();
        if(!(o instanceof CTRow)){
            return null;
        }
        CTRow row = (CTRow)o;
        cursor.toParent();
        o = cursor.getObject();
        cursor.dispose();
        if(! (o instanceof CTTbl)){
            return null;
View Full Code Here

        cursor.toParent();
        XmlObject o = cursor.getObject();
        if(!(o instanceof CTRow)){
            return null;
        }
        CTRow row = (CTRow)o;
        cursor.toParent();
        o = cursor.getObject();
        cursor.dispose();
        if(! (o instanceof CTTbl)){
            return null;
View Full Code Here

  cursor.toParent();
  XmlObject o = cursor.getObject();
  if(!(o instanceof CTRow)){
      return null;
  }
  CTRow row = (CTRow)o;
  cursor.toParent();
  o = cursor.getObject();
  cursor.dispose();
  if(! (o instanceof CTTbl)){
      return null;
View Full Code Here

    cursor.toParent();
    XmlObject o = cursor.getObject();
    if(!(o instanceof CTRow)){
      return null;
    }
    CTRow row = (CTRow)o;
    cursor.toParent();
    o = cursor.getObject();
    if(! (o instanceof CTTbl)){
      return null;
    }
View Full Code Here

        cursor.toParent();
        XmlObject o = cursor.getObject();
        if(!(o instanceof CTRow)){
            return null;
        }
        CTRow row = (CTRow)o;
        cursor.toParent();
        o = cursor.getObject();
        cursor.dispose();
        if(! (o instanceof CTTbl)){
            return null;
View Full Code Here

    cursor.toParent();
    XmlObject o = cursor.getObject();
    if(!(o instanceof CTRow)){
      return null;
    }
    CTRow row = (CTRow)o;
    cursor.toParent();
    o = cursor.getObject();
        cursor.dispose();
    if(! (o instanceof CTTbl)){
      return null;
View Full Code Here

            return;
        }
        // iterate rows
        for (int rowC = 0; rowC < ctTbl.sizeOfTrArray(); rowC++) {
            XWPFTableRow tabRow = getTable().getRow(rowC);
            CTRow ctRow = tabRow.getCtRow();

            // if it is specified in meta tag get reference column
            // otherwise it is the last column of row
            int tempCellC = tabRow.getTableCells().size() - 1;
            if (dynamicColumnIndex != -1) {
                tempCellC = dynamicColumnIndex;
            }

            // we need to backup static columns of cell

            // TODO what will we do if colstart index bigger than column index?
            if (tempCellC > tabRow.getCtRow().sizeOfTcArray()) {
                continue;
            }

            // create dynamic columns
            int dynamicColumnAddIndex = 0;
            try {
                dynamicColumnAddIndex = getDynamicColumnAddIndex(tabRow, dynamicColumnIndex);
            } catch (OrcaReportRendererException e) {
                e.printStackTrace();
            }

            //check if row needs to be iterated or stretched.
            if (tabRow.getCell(dynamicColumnAddIndex).getCTTc().getTcPr().isSetGridSpan()) {
                BigInteger gridSpanVal = tabRow.getCell(dynamicColumnAddIndex).getCTTc().getTcPr().getGridSpan().getVal();
                tabRow.getCell(dynamicColumnAddIndex).getCTTc().getTcPr().getGridSpan().setVal(gridSpanVal.add(BigInteger.valueOf(columnDataList.size() - 1)));
            } else {
                XWPFTableCell tempCell = tabRow.getCell(dynamicColumnAddIndex);
                //add new cells to the row.
                for (int colC = 0; colC < columnDataList.size() - 1; colC++) {
                    XWPFTableCell tableCell = new XWPFTableCell(ctRow.insertNewTc(dynamicColumnAddIndex + colC), tabRow, getTable().getBody());
                    tabRow.getTableCells().add(dynamicColumnAddIndex + colC, tableCell);
                    DocXEngine.copyCell(tempCell, tableCell);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.