public String getDocumentDescription()
{ return"spreadsheet document";
}
publicvoid initializeDocument() throws com.sun.star.uno.Exception
{ final XCell cellA1 = getCellA1();
cellA1.setValue( INIT_VALUE );
assertEquals( "initializing the cell value didn't work", cellA1.getValue(), INIT_VALUE, 0);
XCellRange range = UnoRuntime.queryInterface( XCellRange.class,
((SpreadsheetDocument)m_document).getSheet(0) );
for ( int i=0; i<12; ++i )
{
XCell cell = range.getCellByPosition( 1, i );
cell.setFormula( "" );
}
}
publicvoid doSingleModification() throws com.sun.star.uno.Exception
{ final XCell cellA1 = getCellA1();
assertEquals( "initial cell value not as expected", INIT_VALUE, cellA1.getValue(), 0 );
cellA1.setValue( MODIFIED_VALUE );
assertEquals( "modified cell value not as expected", MODIFIED_VALUE, cellA1.getValue(), 0);
}
publicvoid verifyInitialDocumentState() throws com.sun.star.uno.Exception
{ final XCell cellA1 = getCellA1();
assertEquals( "cell A1 doesn't have its initial value", INIT_VALUE, cellA1.getValue(), 0 );
XCellRange range = UnoRuntime.queryInterface( XCellRange.class,
((SpreadsheetDocument)m_document).getSheet(0) ); for ( int i=0; i<12; ++i )
{ final XCell cell = range.getCellByPosition( 1, i );
assertEquals( "Cell B" + (i+1) + " not having its initial value (an empty string)", "", cell.getFormula() );
}
}
publicvoid verifySingleModificationDocumentState() throws com.sun.star.uno.Exception
{ final XCell cellA1 = getCellA1();
assertEquals( "cell A1 doesn't have the value which we gave it", MODIFIED_VALUE, cellA1.getValue(), 0 );
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.