Package org.odftoolkit.odfdom.dom.element.table

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableCellElement.removeAttributeNS()


          cleanCell(newCellEle);
          getOdfElement().insertBefore(newCellEle, positionCell.getOdfElement());
          newCell = ownerTable.getCellInstance(newCellEle, 0, 0);
        } else { //the second and other cover line
          TableCoveredTableCellElement newCellEle = (TableCoveredTableCellElement) refCell.getOdfElement().cloneNode(true);
          newCellEle.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-columns-repeated");
          getOdfElement().insertBefore(newCellEle, positionCell.getOdfElement());
          newCell = ownerTable.getCellInstance(newCellEle, 0, 0);
        }
      } else if ((refCell.getOdfElement() == positionCell.getOdfElement())
          && (refCell.getColumnsRepeatedNumber() > 1)) //repeated number
View Full Code Here


              .newOdfElement((OdfFileDom) mTableElement.getOwnerDocument(), OdfName.newName(
                  OdfDocumentNamespace.TABLE, "covered-table-cell"));
          if (columnsRepeatedNumber > 1) {
            newCellEle.setTableNumberColumnsRepeatedAttribute(columnsRepeatedNumber);
          } else {
            newCellEle.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-columns-repeated");
          }
          aRow.appendChild(newCellEle);
        }

        coveredLength = aCellEle.getTableNumberColumnsSpannedAttribute() - columnsRepeatedNumber;
View Full Code Here

          coveredLength -= newCellEle.getTableNumberColumnsRepeatedAttribute();
        } else {
          TableTableCellElement coveredCell = (TableTableCellElement) refCell.getCoverCell().getOdfElement();
          TableTableCellElement newCellEle = (TableTableCellElement) coveredCell.cloneNode(true);
          cleanCell(newCellEle);
          newCellEle.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-rows-spanned");
          aRow.appendChild(newCellEle);
          coveredLength = coveredCell.getTableNumberColumnsSpannedAttribute() - columnsRepeatedNumber;
        }
        i = i + columnsRepeatedNumber;
      }
View Full Code Here

    if (rowCount == (mnEndRow - mnStartRow + 1)
        && colCount == (mnEndColumn - mnStartColumn + 1)
        && !mbSpreadsheet) {
      if (firstCell.getOdfElement() instanceof TableTableCellElement) {
        TableTableCellElement firstCellElement = (TableTableCellElement) (firstCell.getOdfElement());
        firstCellElement.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-columns-spanned");
        firstCellElement.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-rows-spanned");
        firstCellElement.setOfficeValueTypeAttribute(OfficeValueTypeAttribute.Value.STRING.toString());
      }
      //just copy the text of the other cells to this first cell
      for (int i = mnStartRow; i < mnEndRow + 1; i++) {
View Full Code Here

        && colCount == (mnEndColumn - mnStartColumn + 1)
        && !mbSpreadsheet) {
      if (firstCell.getOdfElement() instanceof TableTableCellElement) {
        TableTableCellElement firstCellElement = (TableTableCellElement) (firstCell.getOdfElement());
        firstCellElement.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-columns-spanned");
        firstCellElement.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-rows-spanned");
        firstCellElement.setOfficeValueTypeAttribute(OfficeValueTypeAttribute.Value.STRING.toString());
      }
      //just copy the text of the other cells to this first cell
      for (int i = mnStartRow; i < mnEndRow + 1; i++) {
        for (int j = mnStartColumn; j < mnEndColumn + 1; j++) {
View Full Code Here

        && colCount > (mnEndColumn - mnStartColumn + 1)
        && (mnEndColumn - mnStartColumn) > 0) {
      //the first cell, set the span attribute
      if (firstCell.getOdfElement() instanceof TableTableCellElement) {
        TableTableCellElement firstCellElement = (TableTableCellElement) (firstCell.getOdfElement());
        firstCellElement.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-columns-spanned");
        firstCellElement.setTableNumberRowsSpannedAttribute(Integer.valueOf(mnEndRow - mnStartRow + 1));
        firstCellElement.setOfficeValueTypeAttribute(OfficeValueTypeAttribute.Value.STRING.toString());
      }
      //the other cell, copy the content to first cell
      //if it is also in the first column of the cell range, set to the covered cell
View Full Code Here

        && colCount == (mnEndColumn - mnStartColumn + 1)
        && (mnEndRow - mnStartRow) > 0) {
      //the first cell, set the span attribute
      if (firstCell.getOdfElement() instanceof TableTableCellElement) {
        TableTableCellElement firstCellElement = (TableTableCellElement) (firstCell.getOdfElement());
        firstCellElement.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-rows-spanned");
        firstCellElement.setTableNumberColumnsSpannedAttribute(Integer.valueOf(mnEndColumn - mnStartColumn + 1));
        firstCellElement.setOfficeValueTypeAttribute(OfficeValueTypeAttribute.Value.STRING.toString());
      }
      //the other cell, copy the content to first cell
      //if it is also in the first row of the cell range, set to the covered cell
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.