[Libreoffice-commits] .: qadevOOo/tests sc/qa

Jan Holesovsky kendy at kemper.freedesktop.org
Thu May 31 02:05:46 PDT 2012


 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java                 |    2 ++
 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java                     |    2 ++
 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java                    |    2 ++
 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java                          |    2 ++
 qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java                           |    2 ++
 qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java                          |    2 ++
 qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java |    2 ++
 qadevOOo/tests/java/mod/_sc/XMLSettingsExporter.java                          |    2 +-
 qadevOOo/tests/java/mod/_sc/XMLStylesExporter.java                            |    4 ++--
 sc/qa/complex/dataPilot/CheckDataPilot.java                                   |    3 +++
 sc/qa/complex/sc/CalcRTL.java                                                 |    4 ++++
 11 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit e43966b29cc36ce36245cfb2c63c3e24a0eb523f
Author: Stefan Knorr (astron) <heinzlesspam at gmail.com>
Date:   Wed May 30 14:58:27 2012 +0200

    Fix up unit tests that assumed two or more sheets per default

diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
index 7ef352c..d43b020 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
@@ -133,6 +133,8 @@ public class ScDataPilotFieldGroupItemObj extends TestCase
         XSpreadsheet oSheet2 = null;
         XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface (
             XIndexAccess.class, xSpreadsheets);
+        // Make sure there are at least two sheets
+        xSpreadsheets.insertNewByName("Some Sheet", (short)0);
 
         try
         {
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java
index 71a6991..d8c0617 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java
@@ -132,6 +132,8 @@ public class ScDataPilotFieldGroupObj extends TestCase
         XSpreadsheet oSheet2 = null;
         XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface (
             XIndexAccess.class, xSpreadsheets);
+        // Make sure there are at least two sheets
+        xSpreadsheets.insertNewByName("Some Sheet", (short)0);
 
         try
         {
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java
index 152c1d8..078414b 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java
@@ -132,6 +132,8 @@ public class ScDataPilotFieldGroupsObj extends TestCase
         XSpreadsheet oSheet2 = null;
         XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface (
             XIndexAccess.class, xSpreadsheets);
+        // Make sure there are at least two sheets
+        xSpreadsheets.insertNewByName("Some Sheet", (short)0);
 
         try
         {
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java
index c19e8da..0498741 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java
@@ -154,6 +154,8 @@ public class ScDataPilotFieldObj extends TestCase {
         XSpreadsheet oSheet2 = null;
         XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
                                             XIndexAccess.class, xSpreadsheets);
+        // Make sure there are at least two sheets
+        xSpreadsheets.insertNewByName("Some Sheet", (short)0);
 
         try {
             oSheet = (XSpreadsheet) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java
index c50a327..bb8f165 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java
@@ -155,6 +155,8 @@ public class ScDataPilotItemObj extends TestCase {
         XSpreadsheet oSheet2 = null;
         XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
                                             XIndexAccess.class, xSpreadsheets);
+        // Make sure there are at least two sheets
+        xSpreadsheets.insertNewByName("Some Sheet", (short)0);
 
         try {
             oSheet = (XSpreadsheet) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java
index ac9971b..a7adb9a 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java
@@ -155,6 +155,8 @@ public class ScDataPilotItemsObj extends TestCase {
         XSpreadsheet oSheet2 = null;
         XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
                                             XIndexAccess.class, xSpreadsheets);
+        // Make sure there are at least two sheets
+        xSpreadsheets.insertNewByName("Some Sheet", (short)0);
 
         try {
             oSheet = (XSpreadsheet) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java
index 5755966..cedac1c 100644
--- a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java
@@ -157,6 +157,8 @@ public class ScIndexEnumeration_DataPilotItemsEnumeration
         XSpreadsheet oSheet2 = null;
         XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
                                             XIndexAccess.class, xSpreadsheets);
+        // Make sure there are at least two sheets
+        xSpreadsheets.insertNewByName("Some Sheet", (short)0);
 
         try {
             oSheet = (XSpreadsheet) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_sc/XMLSettingsExporter.java b/qadevOOo/tests/java/mod/_sc/XMLSettingsExporter.java
index b0931e5..4f863bf 100644
--- a/qadevOOo/tests/java/mod/_sc/XMLSettingsExporter.java
+++ b/qadevOOo/tests/java/mod/_sc/XMLSettingsExporter.java
@@ -142,7 +142,7 @@ public class XMLSettingsExporter extends TestCase {
                 UnoRuntime.queryInterface(XPropertySet.class, xController);
             xPropSet.setPropertyValue("ShowGrid", "false");
 
-            util.CalcTools.fillCalcSheetWithContent(xSheetDoc,1, 3, 3, 50, 50);
+            util.CalcTools.fillCalcSheetWithContent(xSheetDoc, 0, 3, 3, 50, 50);
 
         } catch (com.sun.star.uno.Exception e) {
             e.printStackTrace(log) ;
diff --git a/qadevOOo/tests/java/mod/_sc/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_sc/XMLStylesExporter.java
index 578c188..61000bd 100644
--- a/qadevOOo/tests/java/mod/_sc/XMLStylesExporter.java
+++ b/qadevOOo/tests/java/mod/_sc/XMLStylesExporter.java
@@ -156,8 +156,8 @@ public class XMLStylesExporter extends TestCase {
                 UnoRuntime.queryInterface(XStyle.class,SC);
             StyleFamilyName.insertByName(newName, StyleCell);
 
-            log.println("fill sheet 1 with contnet...");
-            util.CalcTools.fillCalcSheetWithContent(xSheetDoc, 1, 3, 3, 50, 100);
+            log.println("fill sheet 1 with content...");
+            util.CalcTools.fillCalcSheetWithContent(xSheetDoc, 0, 3, 3, 50, 100);
 
         } catch (com.sun.star.uno.Exception e) {
             e.printStackTrace(log);
diff --git a/sc/qa/complex/dataPilot/CheckDataPilot.java b/sc/qa/complex/dataPilot/CheckDataPilot.java
index b042f25..45ae373 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 0abeb8a..389afec 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'",


More information about the Libreoffice-commits mailing list