fix ScDatabaseRangeObj test, fdo#43312

This commit is contained in:
Markus Mohrhard
2011-12-27 07:47:45 +01:00
parent 32f38931ee
commit 6fdac8946b
3 changed files with 13 additions and 7 deletions

View File

@@ -170,8 +170,10 @@ public class ScDatabaseRangeObj extends TestCase {
"Error getting test object from spreadsheet document", e);
}
if (dbRanges.hasByName("dbRange")) {
dbRanges.removeByName("dbRange");
String dbName = "dbRange";
if (dbRanges.hasByName(dbName)) {
dbRanges.removeByName(dbName);
}
@@ -185,22 +187,22 @@ public class ScDatabaseRangeObj extends TestCase {
try {
// we need to add it
dbRanges.addNewByName("dbRanges",new CellRangeAddress((short)0, 0, 0, 0, 5));
dbRanges.addNewByName(dbName,new CellRangeAddress((short)0, 0, 0, 0, 5));
xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class,
dbrNA.getByName(
"dbRange"));
dbName));
XCellRangeReferrer aReferrer = (XCellRangeReferrer) UnoRuntime.queryInterface(
XCellRangeReferrer.class,
dbrNA.getByName("dbRange"));
dbrNA.getByName(dbName));
XCellRangeAddressable aRangeA = (XCellRangeAddressable) UnoRuntime.queryInterface(
XCellRangeAddressable.class,
aReferrer.getReferredCells());
aRange = aRangeA.getRangeAddress();
oObj = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),
dbrNA.getByName("dbRange"));
dbrNA.getByName(dbName));
} catch (com.sun.star.lang.WrappedTargetException e) {
e.printStackTrace(log);
throw new StatusException(

View File

@@ -219,3 +219,7 @@ sc.ScCellRangeObj::com::sun::star::chart::XChartData
### fdo43376 ###
sc.ScDDELinksObj
sc.ScDDELinkObj
### fdo44167 ###
sc.ScDatabaseRangeObj::com::sun::star::sheet::XDatabaseRange
sc.ScDatabaseRangeObj::com::sun::star::util::XRefreshable

View File

@@ -48,7 +48,7 @@
-o sc.ScDataPilotItemsObj
-o sc.ScDataPilotTableObj
-o sc.ScDataPilotTablesObj
# fdo43312 -o sc.ScDatabaseRangeObj
-o sc.ScDatabaseRangeObj
# -o sc.ScDatabaseRangesObj
# -o sc.ScDocumentConfiguration
# -o sc.ScDrawPageObj