summaryrefslogtreecommitdiffstats
path: root/include/test/container
diff options
context:
space:
mode:
Diffstat (limited to 'include/test/container')
-rw-r--r--include/test/container/xchild.hxx34
-rw-r--r--include/test/container/xelementaccess.hxx46
-rw-r--r--include/test/container/xenumeration.hxx36
-rw-r--r--include/test/container/xenumerationaccess.hxx34
-rw-r--r--include/test/container/xindexaccess.hxx46
-rw-r--r--include/test/container/xnameaccess.hxx46
-rw-r--r--include/test/container/xnamecontainer.hxx60
-rw-r--r--include/test/container/xnamed.hxx49
-rw-r--r--include/test/container/xnamereplace.hxx48
9 files changed, 399 insertions, 0 deletions
diff --git a/include/test/container/xchild.hxx b/include/test/container/xchild.hxx
new file mode 100644
index 000000000..60efed6fc
--- /dev/null
+++ b/include/test/container/xchild.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#ifndef INCLUDED_TEST_CONTAINER_XCHILD_HXX
+#define INCLUDED_TEST_CONTAINER_XCHILD_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XChild
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testGetSetParent();
+
+protected:
+ ~XChild() {}
+};
+}
+
+#endif // INCLUDED_TEST_CONTAINER_XCHILD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/container/xelementaccess.hxx b/include/test/container/xelementaccess.hxx
new file mode 100644
index 000000000..95ee85162
--- /dev/null
+++ b/include/test/container/xelementaccess.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_CONTAINER_XELEMENTACCESS_HXX
+#define INCLUDED_TEST_CONTAINER_XELEMENTACCESS_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Type.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XElementAccess
+{
+public:
+ XElementAccess(css::uno::Type const& rType)
+ : m_aType(rType)
+ {
+ }
+
+ void testGetElementType();
+ void testHasElements();
+
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+protected:
+ ~XElementAccess() {}
+
+private:
+ css::uno::Type m_aType;
+};
+
+} // namespace apitest
+
+#endif // INCLUDED_TEST_CONTAINER_XELEMENTACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/container/xenumeration.hxx b/include/test/container/xenumeration.hxx
new file mode 100644
index 000000000..0d39a0dc9
--- /dev/null
+++ b/include/test/container/xenumeration.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_CONTAINER_XENUMERATION_HXX
+#define INCLUDED_TEST_CONTAINER_XENUMERATION_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XEnumeration
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testHasMoreElements();
+ void testNextElement();
+
+protected:
+ ~XEnumeration() {}
+};
+} // namespace apitest
+
+#endif // INCLUDED_TEST_CONTAINER_XENUMERATION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/container/xenumerationaccess.hxx b/include/test/container/xenumerationaccess.hxx
new file mode 100644
index 000000000..272172c8d
--- /dev/null
+++ b/include/test/container/xenumerationaccess.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#ifndef INCLUDED_TEST_CONTAINER_XENUMERATIONACCESS_HXX
+#define INCLUDED_TEST_CONTAINER_XENUMERATIONACCESS_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XEnumerationAccess
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testCreateEnumeration();
+
+protected:
+ ~XEnumerationAccess() {}
+};
+}
+
+#endif // INCLUDED_TEST_CONTAINER_XENUMERATIONACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/container/xindexaccess.hxx b/include/test/container/xindexaccess.hxx
new file mode 100644
index 000000000..64a34b8bf
--- /dev/null
+++ b/include/test/container/xindexaccess.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_CONTAINER_XINDEXACCESS_HXX
+#define INCLUDED_TEST_CONTAINER_XINDEXACCESS_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XIndexAccess
+{
+public:
+ XIndexAccess(sal_Int32 nItems)
+ : m_nItems(nItems)
+ {
+ }
+
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+ void testGetCount();
+ void testGetByIndex();
+ // will throw an exception and should fail if not
+ void testGetByIndexException();
+
+protected:
+ ~XIndexAccess() {}
+
+private:
+ sal_Int32 m_nItems;
+};
+
+} // namespace apitest
+
+#endif // INCLUDED_TEST_CONTAINER_XINDEXACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/container/xnameaccess.hxx b/include/test/container/xnameaccess.hxx
new file mode 100644
index 000000000..960cf6782
--- /dev/null
+++ b/include/test/container/xnameaccess.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_CONTAINER_XNAMEACCESS_HXX
+#define INCLUDED_TEST_CONTAINER_XNAMEACCESS_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XNameAccess
+{
+public:
+ XNameAccess(const OUString& rName)
+ : m_aName(rName)
+ {
+ }
+
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testGetByName();
+ void testGetElementNames();
+ void testHasByName();
+
+protected:
+ ~XNameAccess() {}
+
+private:
+ OUString const m_aName;
+};
+
+} // namespace apitest
+
+#endif // INCLUDED_TEST_CONTAINER_XNAMEACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/container/xnamecontainer.hxx b/include/test/container/xnamecontainer.hxx
new file mode 100644
index 000000000..221ef2a44
--- /dev/null
+++ b/include/test/container/xnamecontainer.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX
+#define INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX
+
+#include <rtl/ustring.hxx>
+#include <test/testdllapi.hxx>
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XNameContainer
+{
+public:
+ // removes default entry
+ XNameContainer()
+ : m_aName("XNameContainer")
+ {
+ }
+ // removes given entry
+ XNameContainer(const OUString& rNameToRemove)
+ : m_aName(rNameToRemove)
+ {
+ }
+
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+ virtual void setElement(const css::uno::Any& rElement) { m_aElement = rElement; }
+
+ void testInsertByName();
+ void testInsertByNameEmptyName();
+ void testInsertByNameDuplicate();
+ void testInsertByNameInvalidElement();
+ void testRemoveByName();
+ void testRemoveByNameEmptyName();
+ void testRemoveByNameNoneExistingElement();
+
+protected:
+ ~XNameContainer() {}
+
+private:
+ OUString m_aName;
+ css::uno::Any m_aElement;
+};
+
+} // namespace apitest
+
+#endif // INCLUDED_TEST_CONTAINER_XNAMECONTAINER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/container/xnamed.hxx b/include/test/container/xnamed.hxx
new file mode 100644
index 000000000..ff4c4616d
--- /dev/null
+++ b/include/test/container/xnamed.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_CONTAINER_XNAMED_HXX
+#define INCLUDED_TEST_CONTAINER_XNAMED_HXX
+
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XNamed
+{
+public:
+ XNamed(const OUString& rTestName)
+ : m_aTestName(rTestName)
+ {
+ }
+
+ void testGetName();
+ void testSetName();
+ // special case, here name is equal to links URL
+ void testSetNameByScSheetLinkObj();
+ void testSetNameThrowsException();
+
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+protected:
+ ~XNamed() {}
+
+private:
+ OUString m_aTestName;
+};
+}
+
+#endif // INCLUDED_TEST_CONTAINER_XNAMED_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/test/container/xnamereplace.hxx b/include/test/container/xnamereplace.hxx
new file mode 100644
index 000000000..ecf2fac83
--- /dev/null
+++ b/include/test/container/xnamereplace.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_CONTAINER_XNAMEREPLACE_HXX
+#define INCLUDED_TEST_CONTAINER_XNAMEREPLACE_HXX
+
+#include <rtl/ustring.hxx>
+#include <test/testdllapi.hxx>
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XNameReplace
+{
+public:
+ XNameReplace(const OUString& rName)
+ : m_aReplacementName(rName)
+ {
+ }
+
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+ void testReplaceByName();
+
+ void setElement(const css::uno::Any& rElement) { m_aReplacementElement = rElement; }
+
+protected:
+ ~XNameReplace() {}
+
+private:
+ OUString m_aReplacementName;
+ css::uno::Any m_aReplacementElement;
+};
+
+} // namespace apitest
+
+#endif // INCLUDED_TEST_CONTAINER_XNAMEREPLACE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */