Examples of OdfTable


Examples of org.odftoolkit.odfdom.doc.table.OdfTable

        Assert.assertTrue(node instanceof TableTableCellElement);
        TableTableCellElement td = (TableTableCellElement) lst.item(i);
        TableTableRowElement tr = (TableTableRowElement) td.getParentNode();
        Assert.assertNotNull(tr);

        OdfTable table = OdfTableRow.getInstance(tr).getTable();
        Assert.assertNotNull(table);
        Assert.assertTrue(table == OdfTableCell.getInstance(td).getTable());
      }
    } catch (Exception e) {
      Logger.getLogger(TableTest.class.getName()).log(Level.SEVERE, e.getMessage(), e);
View Full Code Here

Examples of org.openoffice.odf.doc.element.table.OdfTable

            OdfFileDom contentDoc = doc.getContentDom();

            // Remove the default table added in construction
            Element spreadsheetElement = ( Element ) contentDoc.getElementsByTagNameNS( OdfNamespace.OFFICE.getUri(),
                "spreadsheet" ).item( 0 );
            OdfTable table = ( OdfTable ) ( spreadsheetElement.getElementsByTagNameNS( OdfNamespace.TABLE.getUri(),
                "table" ).item( 0 ) );
            table.getParentNode().removeChild( table );

            // create the table
            table = new OdfTable( contentDoc );
            table.setName( "Export" ); //$NON-NLS-1$
            Element officeSpreadsheet = ( Element ) contentDoc.getElementsByTagNameNS( OdfNamespace.OFFICE.getUri(),
                "spreadsheet" ).item( 0 );
            officeSpreadsheet.appendChild( table );

            // header
            OdfTableRow headerRow = new OdfTableRow( contentDoc );
            table.appendChild( headerRow );
            LinkedHashMap<String, Short> attributeNameMap = new LinkedHashMap<String, Short>();
            if ( this.exportDn )
            {
                short cellNum = ( short ) 0;
                //attributeNameMap.put( "dn", new Short( cellNum ) ); //$NON-NLS-1$
View Full Code Here

Examples of org.openoffice.odf.doc.element.table.OdfTable

            OdfFileDom contentDoc = doc.getContentDom();

            // Remove the default table added in construction
            Element spreadsheetElement = ( Element ) contentDoc.getElementsByTagNameNS( OdfNamespace.OFFICE.getUri(),
                "spreadsheet" ).item( 0 ); //$NON-NLS-1$
            OdfTable table = ( OdfTable ) ( spreadsheetElement.getElementsByTagNameNS( OdfNamespace.TABLE.getUri(),
                "table" ).item( 0 ) ); //$NON-NLS-1$
            table.getParentNode().removeChild( table );

            // create the table
            table = new OdfTable( contentDoc );
            table.setName( "Export" ); //$NON-NLS-1$
            Element officeSpreadsheet = ( Element ) contentDoc.getElementsByTagNameNS( OdfNamespace.OFFICE.getUri(),
                "spreadsheet" ).item( 0 ); //$NON-NLS-1$
            officeSpreadsheet.appendChild( table );

            // header
            OdfTableRow headerRow = new OdfTableRow( contentDoc );
            table.appendChild( headerRow );
            LinkedHashMap<String, Short> attributeNameMap = new LinkedHashMap<String, Short>();
            if ( this.exportDn )
            {
                //                short cellNum = ( short ) 0;
                //attributeNameMap.put( "dn", new Short( cellNum ) ); //$NON-NLS-1$
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.