Package com.sun.star.text

Examples of com.sun.star.text.XTextTable.initialize()


            XTextTable xTable = (XTextTable) UnoRuntime.queryInterface(
                XTextTable.class, mxDocFactory .createInstance(
                    "com.sun.star.text.TextTable" ) );
           
            // Specify that we want the table to have 4 rows and 4 columns
            xTable.initialize( 4, 4 );
           
            // Insert the table into the document
            mxDocText.insertTextContent( mxDocCursor, xTable, false);
            // Get an XIndexAccess of the table rows
            XIndexAccess xRows = xTable.getRows();
View Full Code Here


            // Make sure we have at least one group name
            if ( aGroupNames.length > 0 )
            {
                // initialise the table to have a row for every autotext group
                // in a single column + one additional row for a header
                xTable.initialize( aGroupNames.length+1,1);

                // Access the XPropertySet of the table
                XPropertySet xTableProps = (XPropertySet)UnoRuntime.queryInterface(
                    XPropertySet.class, xTable );
               
View Full Code Here

        XTextCursor textCursor = documentText.createTextCursor();

        XTextTable table = (XTextTable)UnoRuntime.queryInterface( XTextTable.class,
            m_document.createInstance( "com.sun.star.text.TextTable" )
        );
        table.initialize( 1, 1 );
        documentText.insertTextContent( textCursor, table, false );

        // insert our sample control
        XPropertySet textControl = m_formLayer.insertControlLine( "DatabaseTextField", "Test", "", 10 );
View Full Code Here

        documentText.insertString( textCursor, "text field, and vice versa.\n", false );

        XTextTable table = (XTextTable)UnoRuntime.queryInterface( XTextTable.class,
            m_document.createInstance( "com.sun.star.text.TextTable" )
        );
        table.initialize( 1, 1 );
        documentText.insertTextContent( textCursor, table, false );

        // insert our sample control
        XPropertySet textControl = m_formLayer.insertControlLine( "DatabaseTextField", "enter some text", "", 30 );
View Full Code Here

    XTextTable TT = (XTextTable)UnoRuntime.queryInterface(
                            ifcClass, SrvObj );
                     
    if ( rows > 0 && columns > 0 )  {
      TT.initialize( rows, columns );
    }

    return TT;

  }
View Full Code Here

    //create instance of a text table
   
    Object oInt = oDocMSF.createInstance("com.sun.star.text.TextTable");
    XTextTable TT = (XTextTable) UnoRuntime.queryInterface(XTextTable.class,oInt);
    //initialize the text table with 4 columns an 4 rows
    TT.initialize(4,4);
   
       
    //insert the table
    oText.insertTextContent(oCursor, TT, false);
    // get first Row
View Full Code Here

                    XTextTable xTable = (XTextTable) UnoRuntime.queryInterface(
                            XTextTable.class, mxDocFactory .createInstance(
                                    "com.sun.star.text.TextTable" ) );

                    // Specify that we want the table to have 4 rows and 4 columns
                    xTable.initialize( 4, 4 );

                    // Insert the table into the document
                    mxDocText.insertTextContent( mxDocCursor, xTable, false);
                    // Get an XIndexAccess of the table rows
                    XIndexAccess xRows = xTable.getRows();
View Full Code Here

                    if ( aGroupNames.length > 0 )
                    {
                            // initialise the table to have a row for every autotext group
                            //in a single column + one
                            // additional row for a header
                            xTable.initialize( aGroupNames.length+1,1);

                            // Access the XPropertySet of the table
                            XPropertySet xTableProps = (XPropertySet)UnoRuntime.queryInterface(
                                    XPropertySet.class, xTable );
View Full Code Here

              .getXTextDocument());
      Object newTable = xMultiServiceFactory
          .createInstance("com.sun.star.text.TextTable");
      XTextTable newTextTable = (XTextTable) UnoRuntime.queryInterface(
          XTextTable.class, newTable);
      newTextTable.initialize(rows, columns);

      TextTable textTable = new TextTable(textDocument, newTextTable);
      return textTable;
    } catch (Exception exception) {
      TextException textException = new TextException(exception
View Full Code Here

      if (textContent instanceof IParagraph) {
        Object object = xMultiServiceFactory
        .createInstance("com.sun.star.text.TextTable");
        XTextTable xTable = (XTextTable) UnoRuntime.queryInterface(
            XTextTable.class, object);
        xTable.initialize(1, 1);
        xText.insertTextContent(textRange.getXTextRange(), xTable,
            false);
        XRelativeTextContentInsert xRelativeTextContentInsert = (XRelativeTextContentInsert) UnoRuntime
        .queryInterface(XRelativeTextContentInsert.class, xText);
        xRelativeTextContentInsert.insertTextContentAfter(textContent
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.