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

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


    if(isCleanStyle){
      for (OdfTableColumn column : resultList) {
        for (int i = 0; i < column.getCellCount(); i++) {
          TableTableCellElement cellElement = (TableTableCellElement) (column
              .getCellByIndex(i).mCellElement);
          cellElement.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "style-name");
        }
      }
    }   
    return resultList;
  }
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() - refCell.getColumnsRepeatedNumber();
        }
        i = i + refCell.getColumnsRepeatedNumber();
View Full Code Here

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

          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)) {
View Full Code Here

            }
            // find the cover cell, now start cell clone.
            if (coverCellEle instanceof TableTableCellElement) {
              TableTableCellElement newCellEle = (TableTableCellElement) (coverCellEle.cloneNode(true));
              cleanCell(newCellEle);
              newCellEle.removeAttributeNS(tableNameSpace, "number-rows-spanned");
              newRow.appendChild(newCellEle);
              // deal with the following covered cell, spread
              // sheet need change these covered cell to cell.
              if (mIsSpreadsheet) {
                // update column repeated number.
View Full Code Here

              // deal with the following covered cell, spread
              // sheet need change these covered cell to cell.
              if (mIsSpreadsheet) {
                // update column repeated number.
                int columnsSpannedNumber = newCellEle.getTableNumberColumnsSpannedAttribute();
                newCellEle.removeAttributeNS(tableNameSpace, "number-columns-spanned");
                int newColumnRepeatedNumber = newCellEle.getTableNumberColumnsRepeatedAttribute()
                    * columnsSpannedNumber;
                if (newColumnRepeatedNumber > 1) {
                  newCellEle.setTableNumberColumnsRepeatedAttribute(newColumnRepeatedNumber);
                } else {
View Full Code Here

                int newColumnRepeatedNumber = newCellEle.getTableNumberColumnsRepeatedAttribute()
                    * columnsSpannedNumber;
                if (newColumnRepeatedNumber > 1) {
                  newCellEle.setTableNumberColumnsRepeatedAttribute(newColumnRepeatedNumber);
                } else {
                  newCellEle.removeAttributeNS(tableNameSpace, "number-columns-repeated");
                }
                // ignore the following covered cell of
                // reference row.
                // added by Daisy because of a bug in demo4
                // cellElement is a covered cell. coverCellEle
View Full Code Here

          i += tableNumberColumnsRepeated * tableNumberColumnsSpanned;
          cellElement = (TableTableCellElementBase) cellElement.getNextSibling();
          if (tableNumberColumnsSpanned > 1) {
            int j = 1;
            if (mIsSpreadsheet) {
              newCellEle.removeAttributeNS(tableNameSpace, "number-columns-spanned");
              int newColumnRepeatedNumber = tableNumberColumnsRepeated * tableNumberColumnsSpanned;
              if (newColumnRepeatedNumber > 1) {
                newCellEle.setTableNumberColumnsRepeatedAttribute(newColumnRepeatedNumber);
              } else {
                newCellEle.removeAttributeNS(tableNameSpace, "number-columns-repeated");
View Full Code Here

              newCellEle.removeAttributeNS(tableNameSpace, "number-columns-spanned");
              int newColumnRepeatedNumber = tableNumberColumnsRepeated * tableNumberColumnsSpanned;
              if (newColumnRepeatedNumber > 1) {
                newCellEle.setTableNumberColumnsRepeatedAttribute(newColumnRepeatedNumber);
              } else {
                newCellEle.removeAttributeNS(tableNameSpace, "number-columns-repeated");
              }
              // cellElement is not a covered cell.
              // below codes will count
              // (newColumnRepeatedNumber-1) covered cell.
              int tempi = newColumnRepeatedNumber;
View Full Code Here

          TableTableCellElement newCellEle = (TableTableCellElement) coverRefCellEle.cloneNode(true);
          cleanCell(newCellEle);
          insertCellElementBefore(getOdfElement(), positionCell.getOdfElement(), newCellEle, count);
        } else { //the second and other cover line
          TableCoveredTableCellElement newCellEle = (TableCoveredTableCellElement) refCell.getOdfElement().cloneNode(true);
          newCellEle.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-columns-repeated");
          insertCellElementBefore(getOdfElement(), positionCell.getOdfElement(), newCellEle, count);
        }
      } else if ((refCell.getOdfElement() == positionCell.getOdfElement())
          && (refCell.getColumnsRepeatedNumber() > 1)) //repeated number
      {
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.