diff options
author | Stefan Knorr (astron) <heinzlesspam@gmail.com> | 2012-05-30 14:58:27 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-05-31 11:05:27 +0200 |
commit | e43966b29cc36ce36245cfb2c63c3e24a0eb523f (patch) | |
tree | aa296d630672782d2212ba35c96567f838eb18c3 /sc/qa | |
parent | 7e7d0f41a53471caac4cd155642b01aa54a5869d (diff) |
Fix up unit tests that assumed two or more sheets per default
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/complex/dataPilot/CheckDataPilot.java | 3 | ||||
-rw-r--r-- | sc/qa/complex/sc/CalcRTL.java | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sc/qa/complex/dataPilot/CheckDataPilot.java b/sc/qa/complex/dataPilot/CheckDataPilot.java index b042f259072e..45ae37311f78 100644 --- a/sc/qa/complex/dataPilot/CheckDataPilot.java +++ b/sc/qa/complex/dataPilot/CheckDataPilot.java @@ -211,6 +211,9 @@ public class CheckDataPilot { XIndexAccess oIndexAccess = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets); + // Per default there's now just one sheet, make sure we have at least two, then + xSpreadsheets.insertNewByName("Some Sheet", (short)0); + try { oSheet = (XSpreadsheet) AnyConverter.toObject( new Type(XSpreadsheet.class),oIndexAccess.getByIndex(0)); diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java index 0abeb8abfca0..389afecf5dd2 100644 --- a/sc/qa/complex/sc/CalcRTL.java +++ b/sc/qa/complex/sc/CalcRTL.java @@ -106,6 +106,10 @@ public class CalcRTL /* extends ComplexTestCase */ XPropertySet set = UnoRuntime.queryInterface( XPropertySet.class, getSpreadsheet()); + + // Make sure there are at least 2 sheets, otherwise hiding a sheet won't work + xSheetDoc.getSheets().insertNewByName("Some Sheet", (short)0); + assertTrue("Problems when setting property 'IsVisible'", changeProperty(set, "IsVisible", Boolean.FALSE)); assertTrue("Problems when setting property 'IsVisible'", |