XSpreadsheet.class, xIA.getByIndex(addr.Sheet));
}
catch (com.sun.star.uno.Exception e)
{
e.printStackTrace();
throw new StatusException("Failed to get the spreadsheet object.", e);
}
// Check the integrity of the data on the inserted sheet.
if (!checkDrillDownSheetContent(xSheet, data))
{
log.println("dataintegrity check on the inserted sheet failed");
testResult = false;
continue;
}
log.println(" sheet data integrity check passed");
// Remove the sheet just inserted.
XNamed xNamed = (XNamed)UnoRuntime.queryInterface(XNamed.class, xSheet);
String name = xNamed.getName();
try
{
xSheets.removeByName(name);
}
catch (com.sun.star.uno.Exception e)
{
e.printStackTrace();
throw new StatusException("Failed to removed the inserted sheet named " + name + ".", e);
}
}
else if (newSheetCount == sheetCount)
{
if (data.length > 1)