/**
* create an environment for the test
*/
public void before() {
Object oInterface = null;
XSpreadsheetDocument xSheetDoc = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)param.getMSF() );
// the cell range
CellRangeAddress sCellRangeAdress = new CellRangeAddress();
sCellRangeAdress.Sheet = 0;
sCellRangeAdress.StartColumn = 1;
sCellRangeAdress.StartRow = 0;
sCellRangeAdress.EndColumn = mMaxFieldIndex-1;
sCellRangeAdress.EndRow = mMaxFieldIndex - 1;
// position of the data pilot table
CellAddress sCellAdress = new CellAddress();
sCellAdress.Sheet = 0;
sCellAdress.Column = 7;
sCellAdress.Row = 8;
try {
log.println( "Creating a Spreadsheet document" );
xSheetDoc = SOF.createCalcDoc(null);
} catch (com.sun.star.uno.Exception e) {
// Some exception occures.FAILED
e.printStackTrace();
throw new StatusException( "Couldn't create document", e );
}
log.println("Getting a sheet");
XSpreadsheets xSpreadsheets = (XSpreadsheets)xSheetDoc.getSheets();
XSpreadsheet oSheet = null;
XSpreadsheet oSheet2 = null;
XIndexAccess oIndexAccess = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets);