Package com.sun.star.text

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


                    + 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

        if (cell!=null){
            String cellname = (String) ((XPropertySet)UnoRuntime
                    .queryInterface(XPropertySet.class,cell))
                    .getPropertyValue("CellName");

            XTextTablesSupplier tableSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument);
            XNameAccess tablenames = tableSupplier.getTextTables();
            XIndexAccess tableindex = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, tablenames);
            Logger.getLogger("com.CompPad").log(Level.FINE,"tableindex "+tableindex);
            for (int i=0; i < tableindex.getCount(); i++){
                XTextTable table = (XTextTable)UnoRuntime.queryInterface(XTextTable.class,tableindex.getByIndex(i));
                XCell tcell = table.getCellByName(cellname);
View Full Code Here

            // 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

   * @return null if table with name not found
   * @throws WrappedTargetException
   */
  public XTextTable getTable (String name) throws WrappedTargetException
  {
    XTextTablesSupplier xTablesSupplier = (XTextTablesSupplier)(UnoRuntime.queryInterface (XTextTablesSupplier.class, getDocument ()));
    XNameAccess xNamedTables = xTablesSupplier.getTextTables();
    try {
      Object table = xNamedTables.getByName (name);
      return (XTextTable)(UnoRuntime.queryInterface (XTextTable.class, table));
      // return (XCellRange)(UnoRuntime.queryInterface (XCellRange.class, table));
    }
View Full Code Here

                    // 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

  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

                    + 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

  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

            // 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

Related Classes of com.sun.star.text.XTextTablesSupplier

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.