[Libreoffice-commits] .: 4 commits - qadevOOo/tests sc/qa test/inc test/Library_subsequenttest.mk test/Package_inc.mk test/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Wed Feb 1 15:29:49 PST 2012
dev/null |binary
qadevOOo/tests/java/ifc/container/_XNamed.java | 3
qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DDELinksEnumeration.java | 4
qadevOOo/tests/java/mod/_sc/ScSheetLinkObj.java | 2
qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java | 2
qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsEnumeration.java | 4
qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsObj.java | 4
sc/qa/unoapi/sc.sce | 116 +++++-----
sc/qa/unoapi/testdocuments/ScSheetLinksObj.ods |binary
test/Library_subsequenttest.mk | 1
test/Package_inc.mk | 1
test/inc/test/container/xnamereplace.hxx | 56 ++++
test/source/container/xnamereplace.cxx | 48 ++++
13 files changed, 171 insertions(+), 70 deletions(-)
New commits:
commit 513bbdf9c4664e2677537acb9387df84349529cd
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 1 22:30:11 2012 +0100
remove unused test document, use the ods version instead
diff --git a/sc/qa/unoapi/testdocuments/ScSheetLinksObj.sdc b/sc/qa/unoapi/testdocuments/ScSheetLinksObj.sdc
deleted file mode 100644
index a7f43fe..0000000
Binary files a/sc/qa/unoapi/testdocuments/ScSheetLinksObj.sdc and /dev/null differ
commit 5bd82e6c7bad871689106158f2a82d56e7bffb35
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 31 21:04:27 2012 +0100
prevent hanging junit tests
diff --git a/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsEnumeration.java
index 1068af5..b81a4b5 100644
--- a/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsEnumeration.java
@@ -75,9 +75,7 @@ public class ScUniqueCellFormatsEnumeration extends TestCase {
* Disposes Spreadsheet document.
*/
protected void cleanup(TestParameters tParam, PrintWriter log) {
- //add this lines after synchronisation
- //log.println(" disposing xSheetDoc ");
- //DesktopTools.closeDoc(xSheetDoc);
+ util.DesktopTools.closeDoc(xSheetDoc);
}
protected TestEnvironment createTestEnvironment(TestParameters tParam,
diff --git a/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsObj.java b/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsObj.java
index e85fcb2..5a59204 100644
--- a/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScUniqueCellFormatsObj.java
@@ -74,9 +74,7 @@ public class ScUniqueCellFormatsObj extends TestCase {
* Disposes Spreadsheet document.
*/
protected void cleanup(TestParameters tParam, PrintWriter log) {
- //add this lines after synchronisation
- //log.println(" disposing xSheetDoc ");
- //DesktopTools.closeDoc(xSheetDoc);
+ util.DesktopTools.closeDoc(xSheetDoc);
}
protected TestEnvironment createTestEnvironment(TestParameters tParam,
commit bd6187ae9fdf2535333d372be65f01131262d385
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jan 31 20:49:16 2012 +0100
add test for XNameReplace
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index fea04b6..727b230 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/container/xelementaccess \
test/source/container/xindexaccess \
test/source/container/xnamecontainer \
+ test/source/container/xnamereplace \
test/source/container/xnamed \
test/source/sheet/cellproperties \
test/source/sheet/datapilotfield \
diff --git a/test/Package_inc.mk b/test/Package_inc.mk
index c424707..7199974 100644
--- a/test/Package_inc.mk
+++ b/test/Package_inc.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Package_add_file,test_inc,inc/test/container/xelementaccess.hxx
$(eval $(call gb_Package_add_file,test_inc,inc/test/container/xnamed.hxx,test/container/xnamed.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/container/xindexaccess.hxx,test/container/xindexaccess.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/container/xnamecontainer.hxx,test/container/xnamecontainer.hxx))
+$(eval $(call gb_Package_add_file,test_inc,inc/test/container/xnamereplace.hxx,test/container/xnamereplace.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/cellproperties.hxx,test/sheet/cellproperties.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/xdatapilottable.hxx,test/sheet/xdatapilottable.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/xdatapilotfieldgrouping.hxx,test/sheet/xdatapilotfieldgrouping.hxx))
diff --git a/test/inc/test/container/xnamereplace.hxx b/test/inc/test/container/xnamereplace.hxx
new file mode 100644
index 0000000..e91d5a7
--- /dev/null
+++ b/test/inc/test/container/xnamereplace.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Markus Mohrhard <markus.mohrhard at googlemail.com> (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <test/testdllapi.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
+using namespace com::sun::star;
+
+namespace apitest {
+
+class OOO_DLLPUBLIC_TEST XNameReplace
+{
+public:
+ XNameReplace(const rtl::OUString& rName): maName(rName) {}
+
+ virtual uno::Reference< uno::XInterface > init() = 0;
+
+ void testReplaceByName();
+
+ virtual uno::Any getAnyElementForNameReplace() = 0;
+
+private:
+ rtl::OUString maName;
+
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/container/xnamereplace.cxx b/test/source/container/xnamereplace.cxx
new file mode 100644
index 0000000..b9b6073
--- /dev/null
+++ b/test/source/container/xnamereplace.cxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Markus Mohrhard <markus.mohrhard at googlemail.com> (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include <test/container/xnamereplace.hxx>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include "cppunit/extensions/HelperMacros.h"
+
+using namespace com::sun::star::uno;
+
+namespace apitest {
+
+void XNameReplace::testReplaceByName()
+{
+ uno::Reference< container::XNameReplace > xNameReplace(init(), UNO_QUERY_THROW);
+ xNameReplace->replaceByName(maName, getAnyElementForNameReplace());
+ Any aAny = xNameReplace->getByName( maName );
+ uno::Reference< uno::XInterface > xElement(aAny, UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xElement.is());
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 8272f05bef063f5cf8ed1d1d31f8c7bfa6b07d38
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Jan 30 11:03:12 2012 +0100
try to enable all sc subsequenttests
diff --git a/qadevOOo/tests/java/ifc/container/_XNamed.java b/qadevOOo/tests/java/ifc/container/_XNamed.java
index 81d9130..caed7cf 100644
--- a/qadevOOo/tests/java/ifc/container/_XNamed.java
+++ b/qadevOOo/tests/java/ifc/container/_XNamed.java
@@ -124,7 +124,7 @@ public class _XNamed extends MultiMethodTest {
// special case, here name is equals to links URL.
NewName = "file:///c:/somename/from/XNamed";
} else if (testobjname.equals("ScDDELinkObj")) {
- String fileName = utils.getFullTestDocName("ScDDELinksObj.sdc");
+ String fileName = utils.getFullTestDocName("ScDDELinksObj.ods");
NewName = "soffice|" + fileName + "!Sheet1.A2";
} else if (testobjname.equals("SwXAutoTextGroup")) {
//This avoids a GPF
@@ -162,4 +162,4 @@ public class _XNamed extends MultiMethodTest {
tRes.tested("setName()", result);
}
-}
\ No newline at end of file
+}
diff --git a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DDELinksEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DDELinksEnumeration.java
index 0406f91..cffc51b 100644
--- a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DDELinksEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DDELinksEnumeration.java
@@ -94,7 +94,7 @@ public class ScIndexEnumeration_DDELinksEnumeration extends TestCase {
XMultiServiceFactory oMSF = (XMultiServiceFactory)Param.getMSF();
// load the predefined testdocument
- String testdoc = utils.getFullTestURL("ScDDELinksObj.sdc");
+ String testdoc = utils.getFullTestURL("ScDDELinksObj.ods");
try {
oDoc = SOfficeFactory.getFactory(oMSF).loadDocument(testdoc);
} catch (com.sun.star.lang.IllegalArgumentException e) {
@@ -129,7 +129,7 @@ public class ScIndexEnumeration_DDELinksEnumeration extends TestCase {
throw new StatusException( "Couldn't get a spreadsheet", e);
}
- testdoc = utils.getFullTestDocName("ScDDELinksObj.sdc");
+ testdoc = utils.getFullTestDocName("ScDDELinksObj.ods");
log.println("filling some cells");
try {
oSheet.getCellByPosition(5, 5).setFormula(
diff --git a/qadevOOo/tests/java/mod/_sc/ScSheetLinkObj.java b/qadevOOo/tests/java/mod/_sc/ScSheetLinkObj.java
index 1a6fa83..b814f63 100644
--- a/qadevOOo/tests/java/mod/_sc/ScSheetLinkObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScSheetLinkObj.java
@@ -146,7 +146,7 @@ public class ScSheetLinkObj extends TestCase {
// creating link. Doesn't matter that it refers to unexistant object.
// this is for proper work of XAccess tests.
- String sURL = utils.getFullTestDocName("ScSheetLinksObj.sdc");
+ String sURL = utils.getFullTestDocName("ScSheetLinksObj.ods");
SL.link(sURL, "Sheet1", "", "", com.sun.star.sheet.SheetLinkMode.VALUE);
// Getting links.
diff --git a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java
index f6355fe..2391eb5 100644
--- a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java
@@ -256,7 +256,7 @@ public class ScTableSheetObj extends TestCase {
tEnv.addObjRelation("XSheetAuditing.DependentCellAddress", new CellAddress((short)0, 9, 6));
// add an existing sheet for linking
- tEnv.addObjRelation("XSheetLinkable.LinkSheet", "ScSheetLinksObj.sdc");
+ tEnv.addObjRelation("XSheetLinkable.LinkSheet", "ScSheetLinksObj.ods");
//adding Scenario and with that a ScenarioSheet-Relation for Scenario and XScenarioEnhanced
XScenariosSupplier scene = (XScenariosSupplier) UnoRuntime.queryInterface(
diff --git a/sc/qa/unoapi/sc.sce b/sc/qa/unoapi/sc.sce
index 1a38b3a..28b2cf7 100644
--- a/sc/qa/unoapi/sc.sce
+++ b/sc/qa/unoapi/sc.sce
@@ -50,76 +50,76 @@
-o sc.ScDataPilotTablesObj
-o sc.ScDatabaseRangeObj
# -o sc.ScDatabaseRangesObj
-# -o sc.ScDocumentConfiguration
-# -o sc.ScDrawPageObj
-# -o sc.ScDrawPagesObj
-# -o sc.ScFilterDescriptorBase
-# -o sc.ScFunctionListObj
-# -o sc.ScHeaderFieldObj
-# -o sc.ScHeaderFieldsObj
-# -o sc.ScHeaderFooterContentObj
-# -o sc.ScHeaderFooterTextCursor
-# -o sc.ScHeaderFooterTextObj
-# -o sc.ScIndexEnumeration_CellAnnotationsEnumeration
-# -o sc.ScIndexEnumeration_CellAreaLinksEnumeration
-# -o sc.ScIndexEnumeration_DDELinksEnumeration
-# -o sc.ScIndexEnumeration_DataPilotFieldsEnumeration
-# -o sc.ScIndexEnumeration_DataPilotItemsEnumeration
-# -o sc.ScIndexEnumeration_DataPilotTablesEnumeration
-# -o sc.ScIndexEnumeration_DatabaseRangesEnumeration
-# -o sc.ScIndexEnumeration_FunctionDescriptionEnumeration
-# -o sc.ScIndexEnumeration_LabelRangesEnumeration
-# -o sc.ScIndexEnumeration_NamedRangesEnumeration
-# -o sc.ScIndexEnumeration_ScenariosEnumeration
-# -o sc.ScIndexEnumeration_SheetCellRangesEnumeration
-# -o sc.ScIndexEnumeration_SheetLinksEnumeration
-# -o sc.ScIndexEnumeration_SpreadsheetViewPanesEnumeration
-# -o sc.ScIndexEnumeration_SpreadsheetsEnumeration
-# -o sc.ScIndexEnumeration_SubTotalFieldsEnumeration
-# -o sc.ScIndexEnumeration_TableAutoFormatEnumeration
-# -o sc.ScIndexEnumeration_TableChartsEnumeration
-# -o sc.ScIndexEnumeration_TableColumnsEnumeration
-# -o sc.ScIndexEnumeration_TableConditionalEntryEnumeration
-# -o sc.ScIndexEnumeration_TableRowsEnumeration
-# -o sc.ScIndexEnumeration_TextFieldEnumeration
-# -o sc.ScLabelRangeObj
-# -o sc.ScLabelRangesObj
-# -o sc.ScModelObj
-# -o sc.ScNamedRangeObj
-# -o sc.ScNamedRangesObj
-# -o sc.ScRecentFunctionsObj
+-o sc.ScDocumentConfiguration
+-o sc.ScDrawPageObj
+-o sc.ScDrawPagesObj
+-o sc.ScFilterDescriptorBase
+-o sc.ScFunctionListObj
+-o sc.ScHeaderFieldObj
+-o sc.ScHeaderFieldsObj
+-o sc.ScHeaderFooterContentObj
+-o sc.ScHeaderFooterTextCursor
+-o sc.ScHeaderFooterTextObj
+-o sc.ScIndexEnumeration_CellAnnotationsEnumeration
+-o sc.ScIndexEnumeration_CellAreaLinksEnumeration
+-o sc.ScIndexEnumeration_DDELinksEnumeration
+-o sc.ScIndexEnumeration_DataPilotFieldsEnumeration
+-o sc.ScIndexEnumeration_DataPilotItemsEnumeration
+-o sc.ScIndexEnumeration_DataPilotTablesEnumeration
+-o sc.ScIndexEnumeration_DatabaseRangesEnumeration
+-o sc.ScIndexEnumeration_FunctionDescriptionEnumeration
+-o sc.ScIndexEnumeration_LabelRangesEnumeration
+-o sc.ScIndexEnumeration_NamedRangesEnumeration
+-o sc.ScIndexEnumeration_ScenariosEnumeration
+-o sc.ScIndexEnumeration_SheetCellRangesEnumeration
+-o sc.ScIndexEnumeration_SheetLinksEnumeration
+-o sc.ScIndexEnumeration_SpreadsheetViewPanesEnumeration
+-o sc.ScIndexEnumeration_SpreadsheetsEnumeration
+-o sc.ScIndexEnumeration_SubTotalFieldsEnumeration
+-o sc.ScIndexEnumeration_TableAutoFormatEnumeration
+-o sc.ScIndexEnumeration_TableChartsEnumeration
+-o sc.ScIndexEnumeration_TableColumnsEnumeration
+-o sc.ScIndexEnumeration_TableConditionalEntryEnumeration
+-o sc.ScIndexEnumeration_TableRowsEnumeration
+-o sc.ScIndexEnumeration_TextFieldEnumeration
+-o sc.ScLabelRangeObj
+-o sc.ScLabelRangesObj
+-o sc.ScModelObj
+-o sc.ScNamedRangeObj
+-o sc.ScNamedRangesObj
+-o sc.ScRecentFunctionsObj
# -o sc.ScScenariosObj
# -o sc.ScShapeObj
# -o sc.ScSheetLinkObj
-# -o sc.ScSheetLinksObj
-# -o sc.ScSpreadsheetSettings
-# -o sc.ScSpreadsheetSettingsObj
-# -o sc.ScStyleFamiliesObj
-# -o sc.ScStyleFamilyObj
+-o sc.ScSheetLinksObj
+-o sc.ScSpreadsheetSettings
+-o sc.ScSpreadsheetSettingsObj
+-o sc.ScStyleFamiliesObj
+-o sc.ScStyleFamilyObj
# -o sc.ScStyleObj
-# -o sc.ScSubTotalDescriptorBase
-# -o sc.ScSubTotalFieldObj
+-o sc.ScSubTotalDescriptorBase
+-o sc.ScSubTotalFieldObj
# # i84656 -o sc.ScTabViewObj
# -o sc.ScTableColumnObj
-# -o sc.ScTableColumnsObj
-# -o sc.ScTableConditionalEntry
-# -o sc.ScTableConditionalFormat
+-o sc.ScTableColumnsObj
+-o sc.ScTableConditionalEntry
+-o sc.ScTableConditionalFormat
# -o sc.ScTableRowObj
-# -o sc.ScTableRowsObj
+-o sc.ScTableRowsObj
# -o sc.ScTableSheetObj
-# -o sc.ScUniqueCellFormatsEnumeration
-# -o sc.ScUniqueCellFormatsObj
+-o sc.ScUniqueCellFormatsEnumeration
+-o sc.ScUniqueCellFormatsObj
# -o sc.ScTableSheetsObj
-# -o sc.ScTableValidationObj
-# -o sc.ScViewPaneObj
+-o sc.ScTableValidationObj
+#-o sc.ScViewPaneObj
# #i89411 -o sc.XMLContentExporter
# #i89411 -o sc.XMLContentImporter
# #i89411 -o sc.XMLExporter
# #i89411 -o sc.XMLImporter
# #i89411 -o sc.XMLMetaExporter
# #i89411 -o sc.XMLMetaImporter
-# -o sc.XMLSettingsExporter
-# -o sc.XMLSettingsImporter
-# -o sc.XMLStylesExporter
-# -o sc.XMLStylesImporter
-# -o sc.XMLExporter
+-o sc.XMLSettingsExporter
+-o sc.XMLSettingsImporter
+-o sc.XMLStylesExporter
+-o sc.XMLStylesImporter
+-o sc.XMLExporter
diff --git a/sc/qa/unoapi/testdocuments/ScSheetLinksObj.ods b/sc/qa/unoapi/testdocuments/ScSheetLinksObj.ods
new file mode 100644
index 0000000..e5e5513
Binary files /dev/null and b/sc/qa/unoapi/testdocuments/ScSheetLinksObj.ods differ
More information about the Libreoffice-commits
mailing list