summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/test/text/baseindexmark.hxx31
-rw-r--r--qadevOOo/Jar_OOoRunner.mk1
-rw-r--r--qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv1
-rw-r--r--qadevOOo/tests/java/ifc/text/_BaseIndexMark.java36
-rw-r--r--sw/qa/api/SwXDocumentIndexMark.cxx5
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/text/baseindexmark.cxx45
7 files changed, 81 insertions, 39 deletions
diff --git a/include/test/text/baseindexmark.hxx b/include/test/text/baseindexmark.hxx
new file mode 100644
index 000000000000..e6835a6d1122
--- /dev/null
+++ b/include/test/text/baseindexmark.hxx
@@ -0,0 +1,31 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST BaseIndexMark
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testBaseIndexMarkProperties();
+
+protected:
+ ~BaseIndexMark() {}
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index a539bc96c16a..71b0beaa1b9d 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -589,7 +589,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/text/_BaseFrame \
qadevOOo/tests/java/ifc/text/_BaseFrameProperties \
qadevOOo/tests/java/ifc/text/_BaseIndex \
- qadevOOo/tests/java/ifc/text/_BaseIndexMark \
qadevOOo/tests/java/ifc/text/_CellProperties \
qadevOOo/tests/java/ifc/text/_CellRange \
qadevOOo/tests/java/ifc/text/_Defaults \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv
index 9bf2b782aa0b..6e02c6c3f748 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv
@@ -4,7 +4,6 @@
"SwXDocumentIndexMark";"com::sun::star::text::TextContent";"AnchorType#optional"
"SwXDocumentIndexMark";"com::sun::star::text::TextContent";"AnchorTypes#optional"
"SwXDocumentIndexMark";"com::sun::star::text::TextContent";"TextWrap#optional"
-"SwXDocumentIndexMark";"com::sun::star::text::BaseIndexMark";"AlternativeText"
"SwXDocumentIndexMark";"com::sun::star::text::DocumentIndexMark";"PrimaryKey"
"SwXDocumentIndexMark";"com::sun::star::text::DocumentIndexMark";"SecondaryKey"
"SwXDocumentIndexMark";"com::sun::star::text::DocumentIndexMark";"IsMainEntry"
diff --git a/qadevOOo/tests/java/ifc/text/_BaseIndexMark.java b/qadevOOo/tests/java/ifc/text/_BaseIndexMark.java
deleted file mode 100644
index a80d7488a37f..000000000000
--- a/qadevOOo/tests/java/ifc/text/_BaseIndexMark.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package ifc.text;
-
-import lib.MultiPropertyTest;
-
-/**
-* Testing <code>com.sun.star.text.BaseIndexMark</code>
-* service properties :
-* <ul>
-* <li><code> AlternativeText</code></li>
-* </ul> <p>
-* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
-* @see com.sun.star.text.BaseIndexMark
-*/
-public class _BaseIndexMark extends MultiPropertyTest {
-
-} // finish class _BaseIndexMark
-
-
diff --git a/sw/qa/api/SwXDocumentIndexMark.cxx b/sw/qa/api/SwXDocumentIndexMark.cxx
index 2afa1aab1f85..cccb83733055 100644
--- a/sw/qa/api/SwXDocumentIndexMark.cxx
+++ b/sw/qa/api/SwXDocumentIndexMark.cxx
@@ -10,6 +10,7 @@
#include <test/bootstrapfixture.hxx>
#include <test/lang/xcomponent.hxx>
#include <test/text/xtextcontent.hxx>
+#include <test/text/baseindexmark.hxx>
#include <unotest/macros_test.hxx>
#include <com/sun/star/frame/Desktop.hpp>
@@ -33,7 +34,8 @@ namespace
class SwXDocumentIndexMark final : public test::BootstrapFixture,
public unotest::MacrosTest,
public apitest::XComponent,
- public apitest::XTextContent
+ public apitest::XTextContent,
+ public apitest::BaseIndexMark
{
public:
virtual void setUp() override;
@@ -52,6 +54,7 @@ public:
CPPUNIT_TEST(testRemoveEventListener);
CPPUNIT_TEST(testAttach);
CPPUNIT_TEST(testGetAnchor);
+ CPPUNIT_TEST(testBaseIndexMarkProperties);
CPPUNIT_TEST_SUITE_END();
private:
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 76798568d58b..f86818722d10 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -188,6 +188,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/table/xtablecolumns \
test/source/table/xtablerows \
test/source/text/baseindex \
+ test/source/text/baseindexmark \
test/source/text/numberingrules \
test/source/text/textcontent \
test/source/text/xsimpletext \
diff --git a/test/source/text/baseindexmark.cxx b/test/source/text/baseindexmark.cxx
new file mode 100644
index 000000000000..755b55856cf8
--- /dev/null
+++ b/test/source/text/baseindexmark.cxx
@@ -0,0 +1,45 @@
+/* -*- 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/.
+ */
+
+#include <test/cppunitasserthelper.hxx>
+#include <test/text/baseindexmark.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/TestAssert.h>
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+
+namespace apitest
+{
+void BaseIndexMark::testBaseIndexMarkProperties()
+{
+ Reference<beans::XPropertySet> xBaseIndexMark(init(), UNO_QUERY_THROW);
+ OUString propName;
+ uno::Any aNewValue;
+
+ propName = "AlternativeText";
+ OUString aAlternativeTextGet = "";
+ CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue AlternativeText",
+ xBaseIndexMark->getPropertyValue(propName) >>= aAlternativeTextGet);
+
+ OUString aAlternativeTextSet = "testProperty";
+ aNewValue <<= aAlternativeTextSet;
+ xBaseIndexMark->setPropertyValue(propName, aNewValue);
+ CPPUNIT_ASSERT(xBaseIndexMark->getPropertyValue(propName) >>= aAlternativeTextGet);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set PropertyValue AlternativeText", aAlternativeTextGet,
+ aAlternativeTextSet);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */