Package ag.ion.bion.officelayer.text

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


   * @author Andreas Br�ker
   */
  public static String moveRowCounterValue(int count, String cellName) throws TextException {
    int newRowCounterValue = getRowCounterValue(cellName) + count;
    if (newRowCounterValue < 1)
      throw new TextException("The new row counter value is not valid.");
    return getColumnCharacter(cellName) + newRowCounterValue;
  }
View Full Code Here


   * @author Andreas Br�ker
   */
  public static String moveRowCounterValueTo(int newRowCounterValue, String cellName)
      throws TextException {
    if (newRowCounterValue < 0)
      throw new TextException("The submitted row counter value is not valid.");
    return getColumnCharacter(cellName) + newRowCounterValue;
  }
View Full Code Here

   * @author Andreas Br�ker
   */
  public static String moveColumnIndex(int count, String cellName) throws TextException {
    int newColumnIndex = getColumnIndex(cellName) + count;
    if (newColumnIndex < 0)
      throw new TextException("The new column index is not valid.");
    return getColumnCharacter(newColumnIndex) + getRowCounterValue(cellName);
  }
View Full Code Here

   *
   * @author Andreas Br�ker
   */
  public static String moveColumnIndexTo(int newColumnIndex, String cellName) throws TextException {
    if (newColumnIndex < 0)
      throw new TextException("The submitted column index is not valid.");
    int rowIndex = getRowCounterValue(cellName);
    return getColumnCharacter(newColumnIndex) + rowIndex;
  }
View Full Code Here

        textFields[i] = new TextField(textDocument, dependentTextFields[i]);
      }
      return textFields;
    }
    catch(Exception exception) {
      throw new TextException(exception);
    }
  }
View Full Code Here

      XTextRange pageEnd = textViewCursor.getStart();
      PagePosition endPagePosition = new PagePosition(textDocument, pageEnd);
      return new Page(textDocument, startPagePosition, endPagePosition);
    }
    catch(Exception exception) {
      TextException textException = new TextException(exception.getMessage());
      textException.initCause(exception);
      throw textException;
    }
  }
View Full Code Here

   *
   * @author Andreas Br�ker
   */
  public IPageStyle getPageStyle() throws TextException {
    if (document == null || !(document instanceof ITextDocument))
      throw new TextException("Text style not available");
    try {
      XPropertySet xPropertySet = (XPropertySet) UnoRuntime
          .queryInterface(XPropertySet.class, xTextRange);
      String pageStyleName = xPropertySet.getPropertyValue(
          "PageStyleName").toString();
      XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) UnoRuntime
          .queryInterface(XStyleFamiliesSupplier.class,
              ((ITextDocument) document).getXTextDocument());
      XNameAccess xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
      Any any = (Any) xNameAccess.getByName("PageStyles");
      XNameContainer xNameContainer = (XNameContainer) any.getObject();
      any = (Any) xNameContainer.getByName(pageStyleName);
      XStyle style = (XStyle) any.getObject();
      return new PageStyle(style);
    } catch (Exception exception) {
      TextException textException = new TextException(exception
          .getMessage());
      textException.initCause(exception);
      throw textException;
    }
  }
View Full Code Here

      try {
        return comparator.compareRegionStarts(thisCompareRange
            .getXTextRange().getStart(), textRangeToCompare
            .getXTextRange().getStart());
      } catch (Exception exception) {
        throw new TextException(exception);
      }
    } catch (Exception exception) {
      throw new TextException(exception);
    }
  }
View Full Code Here

    try {
      XCellRangeData xCellRangeData = (XCellRangeData) UnoRuntime
          .queryInterface(XCellRangeData.class, xCellRange);
      xCellRangeData.setDataArray(values);
    } catch (Exception exception) {
      TextException textException = new TextException(exception
          .getMessage());
      textException.initCause(exception);
      throw textException;
    }
  }
View Full Code Here

    int rowIndex = TextTableCellNameHelper.getRowIndex(name);
    try {
      return new TextTableCell(textDocument, xCellRange
          .getCellByPosition(columnIndex, rowIndex));
    } catch (IllegalArgumentException illegalArgumentException) {
      throw new TextException("A column with the name " + name
          + " is not available.");
    } catch (IndexOutOfBoundsException indexOutOfBoundsException) {
      throw new TextException("A column with the name " + name
          + " is not available.");
    }
  }
View Full Code Here

TOP

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

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.