Package ag.ion.bion.officelayer.text

Examples of ag.ion.bion.officelayer.text.ITextTableCell


    for (int i = 0; i < tableRows.length; i++) {
      ITextTableRow tableRow = tableRows[i];
      if (tableRow != null) {
        ITextTableCell[] cells = tableRow.getCells();
        for (int j = 0; j < cells.length; j++) {
          ITextTableCell cell = cells[j];
          if (cell != null) {
            IFormulaService formulaService = cell
                .getFormulaService();
            if (formulaService != null) {
              IFormula formula = formulaService.getFormula();
              if (formula != null) {
                formulaCells.add(cell);
View Full Code Here


      throws TextException {
    try {
      ITextRange thisCompareRange = this;
      if (document instanceof ITextDocument) {
        ITextDocument textDocument = (ITextDocument) document;
        ITextTableCell thisCompareRangeCell = thisCompareRange
            .getCell();
        ITextTableCell textRangeToCompareCell = textRangeToCompare
            .getCell();
        if (thisCompareRangeCell != null
            && textRangeToCompareCell == null) {
          XTextContent textTable = thisCompareRangeCell
              .getTextTable().getXTextContent();
          XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime
              .queryInterface(XSelectionSupplier.class,
                  textDocument.getXTextDocument()
                      .getCurrentController());
          selectionSupplier.select(textTable);
          XTextViewCursorSupplier xTextViewCursorSupplier = (XTextViewCursorSupplier) UnoRuntime
              .queryInterface(XTextViewCursorSupplier.class,
                  textDocument.getXTextDocument()
                      .getCurrentController());
          xTextViewCursorSupplier.getViewCursor().goLeft((short) 1,
              false);
          thisCompareRange = textDocument.getViewCursorService()
              .getViewCursor().getTextCursorFromEnd().getEnd();
        } else if (textRangeToCompareCell != null
            && thisCompareRangeCell == null) {
          XTextContent textTable = textRangeToCompareCell
              .getTextTable().getXTextContent();
          XSelectionSupplier selectionSupplier = (XSelectionSupplier) UnoRuntime
              .queryInterface(XSelectionSupplier.class,
                  textDocument.getXTextDocument()
                      .getCurrentController());
          selectionSupplier.select(textTable);
          XTextViewCursorSupplier xTextViewCursorSupplier = (XTextViewCursorSupplier) UnoRuntime
              .queryInterface(XTextViewCursorSupplier.class,
                  textDocument.getXTextDocument()
                      .getCurrentController());
          xTextViewCursorSupplier.getViewCursor().goLeft((short) 1,
              false);
          textRangeToCompare = textDocument.getViewCursorService()
              .getViewCursor().getTextCursorFromEnd().getEnd();
        } else if (thisCompareRangeCell != null
            && textRangeToCompareCell != null) {
          XTextContent thisCompareRangeTable = thisCompareRangeCell
              .getTextTable().getXTextContent();
          XTextContent textRangeToCompareTable = textRangeToCompareCell
              .getTextTable().getXTextContent();
          boolean sameTable = UnoRuntime.areSame(
              thisCompareRangeTable, textRangeToCompareTable);
          if (sameTable) {
            ITextTableCellName thisCompareRangeCellName = thisCompareRangeCell
                .getName();
            ITextTableCellName textRangeToCompareCellName = textRangeToCompareCell
                .getName();
            int thisCompareRangeCellRow = thisCompareRangeCellName
                .getRowIndex();
            int thisCompareRangeCellCol = thisCompareRangeCellName
                .getColumnIndex();
View Full Code Here

            if(x<cells.length-2) {
              cellNames.append("+");
            }
        }
       
        ITextTableCell formulaCell= row.getCells()[i];
        formulaCell.getFormulaService().setFormula(cellNames.toString());
      }
    }
    catch (TextException exception) {
      exception.printStackTrace();
    }
View Full Code Here

    for(int i = 0; i < tableRows.length; i++) {
      ITextTableRow tableRow = tableRows[i];
      if(tableRow != null) {
        ITextTableCell[] cells = tableRow.getCells();
        for(int j = 0; j < cells.length; j++) {
          ITextTableCell cell = cells[j];
          if(cell != null) {
            IFormulaService formulaService = cell.getFormulaService();
            if(formulaService != null) {
              IFormula formula = formulaService.getFormula();
              if(formula != null) {
                formulaCells.add(cell);
              }
View Full Code Here

   *
   * @author Markus Kr�ger
   */
  private IClonedObject clonePreprocessor (IDestinationPosition position, boolean adoptContent, boolean generateReturnValue, PropertyKeysContainer propertyKeysContainer) throws CloneException {
    if (position.getType() != null && ITextTableCell.class.isAssignableFrom(position.getType())) {
       ITextTableCell cell = (ITextTableCell)position.getDestinationObject();
       return recreateCell(cell, adoptContent, generateReturnValue, propertyKeysContainer);  
    }
    else if (ITextRange.class.isAssignableFrom(position.getType())) {
      try {
       if(textTableCellRange == null) {
View Full Code Here

        verticalPosition = textTableCellName.getColumnIndex();
      if(horizontalPosition == -1)
        horizontalPosition = textTableCellName.getRowIndex();     
     
      if (cellPropertyStore != null && verticalPosition != -1 &&  horizontalPosition != -1) {
        ITextTableCell tableCell = table.getCell(verticalPosition, horizontalPosition);
        recreateCell(tableCell, adoptContent, false, propertyKeysContainer);
      }
    }
    catch (Exception exception) {
      CloneException cloneException =  new CloneException(exception.getMessage());
View Full Code Here

   */
  public IETextTableCell getCell(int columnIndex, int rowIndex, int columnCount) throws TextException {
    int tableNumber = rowIndex/(ITextTable.MAX_CELLS_IN_TABLE/columnCount);
    int rowNumber = rowIndex - (tableNumber*(ITextTable.MAX_CELLS_IN_TABLE/columnCount))-1;
   
    ITextTableCell textTableCell = textTableCellRange[tableNumber].getCell(columnIndex,rowNumber);
    String cellName = TextTableCellNameHelper.getColumnCharacter(columnIndex) + TextTableCellNameHelper.getRowCounterValue(rowIndex);
    ETextTableCell tableCell = new ETextTableCell(textTableCell,cellName,textTable);
   
    return tableCell;
  }
View Full Code Here

        newTable.getRow(rows).setAutoHeight(textTable.getRow(rows).getAutoHeight());
       
        int columnArrayLength = cellCloneServices[rows].length;
        for (int columns = 0; columns < columnArrayLength ; columns++) {
          ICloneService cellClone = cellCloneServices[rows][columns];
          ITextTableCell textTableCell = newTable.getCell(columns, rows);
          CloneDestinationPosition destinationCell = new CloneDestinationPosition(textTableCell, textTableCell.getClass());
          cellClone.cloneToPositionNoReturn(destinationCell, adoptContent,propertyKeysContainer);               
        }
      }
     
      if (createSpace) {
View Full Code Here

      tablePropertyStore = new TextTablePropertyStore(textTable);
      cellCloneServices = new ICloneService[rowCount][columnCount];
     
      for (int i=0;i<rowCount;i++) {
        for (int h=0;h<columnCount;h++){ 
          ITextTableCell currentTableCell = textTable.getCell(h,i);
          cellCloneServices[i][h] = currentTableCell.getCloneService();
        }
      }
    }
    catch(TextException exception) {
      CloneException cloneException =  new CloneException(exception.getMessage());
View Full Code Here

    for(int i = 0; i < tableNumber; i++) {
      help = help + textTableManagement.getTextTable(i).getRowCount();
    }
    rowNumber = rowNumber - help+1;
   
    ITextTableCell textTableCell = textTableManagement.getTextTable(tableNumber).getCell(TextTableCellNameHelper.getColumnCharacter(cellName) + rowNumber);
    ETextTableCell tableCell = new ETextTableCell(textTableCell,cellName, this);
    return tableCell;
  }
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.text.ITextTableCell

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.