Examples of XTextTablesSupplier


Examples of com.sun.star.text.XTextTablesSupplier

            // Set the name to TableHeader
            xRefMark.setName ( "TableHeader" );
           
            // Get the TextTablesSupplier interface of the document
            XTextTablesSupplier xTableSupplier = ( XTextTablesSupplier )
                UnoRuntime.queryInterface(XTextTablesSupplier.class, mxDoc);

            // Get an XIndexAccess of TextTables
            XIndexAccess xTables = (XIndexAccess)UnoRuntime.queryInterface(
                XIndexAccess.class, xTableSupplier.getTextTables());

            // We've only inserted one table, so get the first one from index zero
            XTextTable xTable = ( XTextTable ) UnoRuntime.queryInterface (
                XTextTable.class, xTables.getByIndex( 0 ) );
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

                    + uE.getMessage(), uE);
        }

        XMultiServiceFactory msf = (XMultiServiceFactory)
            UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
        XTextTablesSupplier oTTSupp = (XTextTablesSupplier)
            UnoRuntime.queryInterface(XTextTablesSupplier.class, msf);
        oObj = oTTSupp.getTextTables();

        if ( oTable != null ) {
            log.println("Creating instance...");
            tEnv = new TestEnvironment(oObj);
        }
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

                    // Set the name to TableHeader
                    xRefMark.setName ( "TableHeader" );

                    // Get the TextTablesSupplier interface of the document
                    XTextTablesSupplier xTableSupplier = ( XTextTablesSupplier ) UnoRuntime.queryInterface
                                                            ( XTextTablesSupplier.class, mxDoc );

                    // Get an XIndexAccess of TextTables
                    XIndexAccess xTables = ( XIndexAccess ) UnoRuntime.queryInterface ( XIndexAccess.class,
                                                            xTableSupplier.getTextTables() );

                    // We've only inserted one table, so get the first one from index zero
                    XTextTable xTable = ( XTextTable ) UnoRuntime.queryInterface ( XTextTable.class,
                                                            xTables.getByIndex( 0 ) );
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

   * @return all available text tables
   *
   * @author Andreas Br�ker
   */
  public ITextTable[] getTextTables() {
    XTextTablesSupplier xTextTablesSupplier = (XTextTablesSupplier) UnoRuntime
        .queryInterface(XTextTablesSupplier.class, textDocument
            .getXTextDocument());
    XNameAccess xNameAccess = xTextTablesSupplier.getTextTables();
    XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
        XIndexAccess.class, xNameAccess);
    ITextTable[] textTables = new ITextTable[xIndexAccess.getCount()];
    for (int i = 0, n = xIndexAccess.getCount(); i < n; i++) {
      try {
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

   *
   * @author Andreas Br�ker
   */
  public ITextTable getTextTable(String name) throws TextException {
    try {
      XTextTablesSupplier xTextTablesSupplier = (XTextTablesSupplier) UnoRuntime
          .queryInterface(XTextTablesSupplier.class, textDocument
              .getXTextDocument());
      XNameAccess xNameAccess = xTextTablesSupplier.getTextTables();
      Any any = (Any) xNameAccess.getByName(name);
      XTextTable textTable = (XTextTable) any.getObject();
      if (textTable.getColumns().getCount() <= ITextTable.MAX_COLUMNS_IN_TABLE) {
        return new TextTable(textDocument, textTable);
      } else {
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

   * @return all available text tables
   *
   * @author Andreas Br�ker
   */
  public ITextTable[] getTextTables() {
    XTextTablesSupplier xTextTablesSupplier = (XTextTablesSupplier)UnoRuntime.queryInterface(XTextTablesSupplier.class, textDocument.getXTextDocument());
    XNameAccess xNameAccess = xTextTablesSupplier.getTextTables();
    XIndexAccess xIndexAccess = (XIndexAccess)UnoRuntime.queryInterface(XIndexAccess.class, xNameAccess);
    ITextTable[] textTables = new ITextTable[xIndexAccess.getCount()];
    for(int i=0, n=xIndexAccess.getCount(); i<n; i++) {
      try {
        Any any = (Any)xIndexAccess.getByIndex(i);
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

   *
   * @author Andreas Br�ker
   */
  public ITextTable getTextTable(String name) throws TextException {
    try {
      XTextTablesSupplier xTextTablesSupplier = (XTextTablesSupplier)UnoRuntime.queryInterface(XTextTablesSupplier.class, textDocument.getXTextDocument());
      XNameAccess xNameAccess = xTextTablesSupplier.getTextTables();
      Any any = (Any)xNameAccess.getByName(name);
      XTextTable textTable = (XTextTable)any.getObject();
      if(textTable.getColumns().getCount() <= ITextTable.MAX_COLUMNS_IN_TABLE) {
        return new TextTable(textDocument, textTable);
      }
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

            // Set the name to TableHeader
            xRefMark.setName ( "TableHeader" );
           
            // Get the TextTablesSupplier interface of the document
            XTextTablesSupplier xTableSupplier = ( XTextTablesSupplier )
                UnoRuntime.queryInterface(XTextTablesSupplier.class, mxDoc);

            // Get an XIndexAccess of TextTables
            XIndexAccess xTables = (XIndexAccess)UnoRuntime.queryInterface(
                XIndexAccess.class, xTableSupplier.getTextTables());

            // We've only inserted one table, so get the first one from index zero
            XTextTable xTable = ( XTextTable ) UnoRuntime.queryInterface (
                XTextTable.class, xTables.getByIndex( 0 ) );
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

  private XIndexAccess createCollection() {
    XNameAccess oNA = null;

    if ( iDsc instanceof TableDsc ) {
      XTextTablesSupplier oTTS = (XTextTablesSupplier)
          UnoRuntime.queryInterface(
                    XTextTablesSupplier.class, xParent );

      oNA = oTTS.getTextTables();
    }
    if ( iDsc instanceof FrameDsc ) {
      XTextFramesSupplier oTTS = (XTextFramesSupplier)
          UnoRuntime.queryInterface(
                    XTextFramesSupplier.class, xParent );

      oNA = oTTS.getTextFrames();
    }
    if ( iDsc instanceof BookmarkDsc ) {
      XBookmarksSupplier oTTS = (XBookmarksSupplier)
          UnoRuntime.queryInterface(
                    XBookmarksSupplier.class, xParent );

      oNA = oTTS.getBookmarks();
    }

    if ( iDsc instanceof FootnoteDsc ) {
      XFootnotesSupplier oTTS = (XFootnotesSupplier)
          UnoRuntime.queryInterface(
                    XFootnotesSupplier.class, xParent );

      return( oTTS.getFootnotes() );
    }

    if ( iDsc instanceof TextSectionDsc ) {
      XTextSectionsSupplier oTSS = (XTextSectionsSupplier)
          UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.text.XTextTablesSupplier

            // Set the name to TableHeader
            xRefMark.setName ( "TableHeader" );
           
            // Get the TextTablesSupplier interface of the document
            XTextTablesSupplier xTableSupplier = ( XTextTablesSupplier )
                UnoRuntime.queryInterface(XTextTablesSupplier.class, mxDoc);

            // Get an XIndexAccess of TextTables
            XIndexAccess xTables = (XIndexAccess)UnoRuntime.queryInterface(
                XIndexAccess.class, xTableSupplier.getTextTables());

            // We've only inserted one table, so get the first one from index zero
            XTextTable xTable = ( XTextTable ) UnoRuntime.queryInterface (
                XTextTable.class, xTables.getByIndex( 0 ) );
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.