[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa test/Library_subsequenttest.mk test/source

2023-08-27 Thread anfanite396 (via logerrit)
 include/test/text/footnote.hxx  |   27 ++
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv |1 
 qadevOOo/tests/java/ifc/text/_Footnote.java |   47 
 sw/qa/api/SwXFootnote.cxx   |5 +
 test/Library_subsequenttest.mk  |1 
 test/source/text/footnote.cxx   |   31 +++
 7 files changed, 63 insertions(+), 50 deletions(-)

New commits:
commit 8496f805da8ea9f2585b7485b448dda52557db9a
Author: anfanite396 
AuthorDate: Thu Aug 24 19:50:12 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Sun Aug 27 10:51:38 2023 +0200

tdf#45904: Move _Footnote Java tests to C++

Change-Id: I1e69267a72296f55fac12326ec69d3c29e63561a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156055
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/text/footnote.hxx b/include/test/text/footnote.hxx
new file mode 100644
index ..9970ee43cc3b
--- /dev/null
+++ b/include/test/text/footnote.hxx
@@ -0,0 +1,27 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST Footnote
+{
+public:
+virtual css::uno::Reference init() = 0;
+virtual ~Footnote();
+void testFootnoteProperties();
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index d71eb77d943b..65ed25b15758 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -594,7 +594,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/text/_Defaults \
 qadevOOo/tests/java/ifc/text/_DocumentIndex \
 qadevOOo/tests/java/ifc/text/_DocumentSettings \
-qadevOOo/tests/java/ifc/text/_Footnote \
 qadevOOo/tests/java/ifc/text/_FootnoteSettings \
 qadevOOo/tests/java/ifc/text/_GenericTextDocument \
 qadevOOo/tests/java/ifc/text/_LineNumberingProperties \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv
index 125fef2ec96d..98181e7e1929 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv
@@ -14,4 +14,3 @@
 "SwXFootnote";"com::sun::star::text::XTextContent";"getAnchor()"
 "SwXFootnote";"com::sun::star::text::XText";"insertTextContent()"
 "SwXFootnote";"com::sun::star::text::XText";"removeTextContent()"
-"SwXFootnote";"com::sun::star::text::Footnote";"ReferenceId#optional"
diff --git a/qadevOOo/tests/java/ifc/text/_Footnote.java 
b/qadevOOo/tests/java/ifc/text/_Footnote.java
deleted file mode 100644
index 4af1725644be..
--- a/qadevOOo/tests/java/ifc/text/_Footnote.java
+++ /dev/null
@@ -1,47 +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 com.sun.star.text.Footnote
-* service properties :
-* 
-*   ReferenceId
-*  
-* Properties testing is automated by lib.MultiPropertyTest.
-* @see com.sun.star.text.Footnote
-*/
-public class _Footnote extends MultiPropertyTest {
-
-/**
-* This property can be VOID, and in case if it is so new
-* value must be defined.
-*/
-public void _ReferenceId() {
-final Short val1 = Short.valueOf( (short) 1);
-final Short val2 = Short.valueOf( (short) 2);
-
-log.println("Testing with custom Property tester");
-testProperty("ReferenceId", val1, val2);
-}
-
-} //finish class _Footnote
-
diff --git a/sw/qa/api/SwXFootnote.cxx b/sw/qa/api/SwXFootnote.cxx
index ea3ec0231e55..5c6f7418d941 100644
--- a/sw/qa/api/SwXFootnote.cxx
+++ b/sw/qa/api/SwXFootnote.cxx
@@ -9,6 +9,7 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-27 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst |1 
 qadevOOo/Jar_OOoRunner.mk |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMarks.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java|  128 
--
 sw/qa/api/SwXReferenceMarks.cxx   |  128 
--
 sw/qa/unoapi/sw_2.sce |1 
 6 files changed, 54 insertions(+), 212 deletions(-)

New commits:
commit 9a4f776e5ad7e0b47a884765a11c72a8f7ada6dc
Author: anfanite396 
AuthorDate: Thu Aug 24 15:23:55 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Sun Aug 27 08:21:26 2023 +0200

tdf#45904: Remove old SwXReferenceMarks Java test

Change-Id: I8830e54fdba98d3cfd1e2844e7faf02e55e7d0ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156044
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 304220026084..2d5bcd4b7d6d 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -153,7 +153,6 @@ job219=sw.SwXModule
 job221=sw.SwXPrintSettings
 job222=sw.SwXPropertySet
 job223=sw.SwXPropertySetInfo
-job225=sw.SwXReferenceMarks
 job226=sw.SwXStyle
 job228=sw.SwXStyleFamily
 job229=sw.SwXTableCellText
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 60343d0958d0..d71eb77d943b 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1109,7 +1109,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXPrintSettings \
 qadevOOo/tests/java/mod/_sw/SwXPropertySet \
 qadevOOo/tests/java/mod/_sw/SwXPropertySetInfo \
-qadevOOo/tests/java/mod/_sw/SwXReferenceMarks \
 qadevOOo/tests/java/mod/_sw/SwXShape \
 qadevOOo/tests/java/mod/_sw/SwXStyle \
 qadevOOo/tests/java/mod/_sw/SwXStyleFamily \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMarks.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMarks.csv
deleted file mode 100644
index bcc24a043220..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMarks.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXReferenceMarks";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXReferenceMarks";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXReferenceMarks";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXReferenceMarks";"com::sun::star::container::XIndexAccess";"getCount()"
-"SwXReferenceMarks";"com::sun::star::container::XIndexAccess";"getByIndex()"
-"SwXReferenceMarks";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXReferenceMarks";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java 
b/qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java
deleted file mode 100644
index 40b99adeccc1..
--- a/qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java
+++ /dev/null
@@ -1,128 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.container.XNamed;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XReferenceMarksSupplier;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- * Test for object which is represented by service
- * com.sun.star.text.ReferenceMarks. 
- * Object implements the following interfaces :
- * 
- *   com::sun::star::container::XNameAccess
- *   com::sun::star::container::XIndexAccess
- *   com::sun::star::container::XElementAccess
- *  
- * This object test  is NOT  designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XNameAccess
- * @see com.sun.star.container.XIndexAccess
- * @see 

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa test/Library_subsequenttest.mk test/source

2023-08-26 Thread anfanite396 (via logerrit)
 include/test/text/xfootnote.hxx |   36 
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv |2 
 qadevOOo/tests/java/ifc/text/_XFootnote.java|  101 
 sw/qa/api/SwXFootnote.cxx   |5 
 test/Library_subsequenttest.mk  |1 
 test/source/text/xfootnote.cxx  |   41 
 7 files changed, 82 insertions(+), 105 deletions(-)

New commits:
commit 0ab3f09011e4c4c1b85dda72f81f252899162ab5
Author: anfanite396 
AuthorDate: Sat Aug 12 01:04:27 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Sat Aug 26 16:21:44 2023 +0200

tdf#45904: Move _XFootnote Java tests to C++

Change-Id: Ibdc28ab8818860b9c94abeac33713607dbcf8df4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155635
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/text/xfootnote.hxx b/include/test/text/xfootnote.hxx
new file mode 100644
index ..eb6f8bd0bd5e
--- /dev/null
+++ b/include/test/text/xfootnote.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/.
+ */
+
+#pragma once
+
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XFootnote
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testGetSetLabel();
+
+protected:
+~XFootnote() {}
+};
+
+} // namespace apitest
+
+/* 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 9e89070e0a97..60343d0958d0 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -623,7 +623,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/text/_XDocumentIndex \
 qadevOOo/tests/java/ifc/text/_XDocumentIndexesSupplier \
 qadevOOo/tests/java/ifc/text/_XEndnotesSupplier \
-qadevOOo/tests/java/ifc/text/_XFootnote \
 qadevOOo/tests/java/ifc/text/_XFootnotesSettingsSupplier \
 qadevOOo/tests/java/ifc/text/_XFootnotesSupplier \
 qadevOOo/tests/java/ifc/text/_XLineNumberingProperties \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv
index 888987553a39..125fef2ec96d 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnote.csv
@@ -10,8 +10,6 @@
 "SwXFootnote";"com::sun::star::text::XTextRange";"getEnd()"
 "SwXFootnote";"com::sun::star::text::XTextRange";"getString()"
 "SwXFootnote";"com::sun::star::text::XTextRange";"setString()"
-"SwXFootnote";"com::sun::star::text::XFootnote";"getLabel()"
-"SwXFootnote";"com::sun::star::text::XFootnote";"setLabel()"
 "SwXFootnote";"com::sun::star::text::XTextContent";"attach()"
 "SwXFootnote";"com::sun::star::text::XTextContent";"getAnchor()"
 "SwXFootnote";"com::sun::star::text::XText";"insertTextContent()"
diff --git a/qadevOOo/tests/java/ifc/text/_XFootnote.java 
b/qadevOOo/tests/java/ifc/text/_XFootnote.java
deleted file mode 100644
index 6aedd2c75263..
--- a/qadevOOo/tests/java/ifc/text/_XFootnote.java
+++ /dev/null
@@ -1,101 +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.MultiMethodTest;
-import com.sun.star.text.XFootnote;
-
-
-/**
- * Testing com.sun.star.text.XFootnote
- * interface methods :
- * 
- *   getLabel()
- *   setLabel()
- *  
- * Test is  NOT  multithread compliant. 
- * @see com.sun.star.text.XFootnote
- */
-public class _XFootnote extends MultiMethodTest {
-
-public XFootnote oObj = null;// oObj filled by MultiMethodTest
-
-/**
- * Test calls the method. 
- * Has  OK  status if 

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa test/Library_subsequenttest.mk test/source

2023-08-26 Thread anfanite396 (via logerrit)
 include/test/text/documentindexmark.hxx  |   31 

 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv |3 
 qadevOOo/tests/java/ifc/text/_DocumentIndexMark.java |   38 
-
 sw/qa/api/SwXDocumentIndexMark.cxx   |5 
 test/Library_subsequenttest.mk   |1 
 test/source/text/documentindexmark.cxx   |   69 
++
 7 files changed, 105 insertions(+), 43 deletions(-)

New commits:
commit d1fef008f10da02700fe9d46bc86c3a50cae7a21
Author: anfanite396 
AuthorDate: Tue Aug 1 19:39:26 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Sat Aug 26 13:30:26 2023 +0200

tdf#45904: Move _DocumentIndexMark Java tests to C++

Change-Id: I144d06ab3abb47134060d554a4016009246aa739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155163
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/text/documentindexmark.hxx 
b/include/test/text/documentindexmark.hxx
new file mode 100644
index ..228668c3b070
--- /dev/null
+++ b/include/test/text/documentindexmark.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 
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST DocumentIndexMark
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testDocumentIndexMarkProperties();
+
+protected:
+~DocumentIndexMark() {}
+};
+}
+
+/* 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 336b99b81e9a..9e89070e0a97 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -593,7 +593,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/text/_CellRange \
 qadevOOo/tests/java/ifc/text/_Defaults \
 qadevOOo/tests/java/ifc/text/_DocumentIndex \
-qadevOOo/tests/java/ifc/text/_DocumentIndexMark \
 qadevOOo/tests/java/ifc/text/_DocumentSettings \
 qadevOOo/tests/java/ifc/text/_Footnote \
 qadevOOo/tests/java/ifc/text/_FootnoteSettings \
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 6e02c6c3f748..cc1e491f1987 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv
@@ -4,8 +4,5 @@
 
"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::DocumentIndexMark";"PrimaryKey"
-"SwXDocumentIndexMark";"com::sun::star::text::DocumentIndexMark";"SecondaryKey"
-"SwXDocumentIndexMark";"com::sun::star::text::DocumentIndexMark";"IsMainEntry"
 "SwXDocumentIndexMark";"com::sun::star::text::XTextContent";"attach()"
 "SwXDocumentIndexMark";"com::sun::star::text::XTextContent";"getAnchor()"
diff --git a/qadevOOo/tests/java/ifc/text/_DocumentIndexMark.java 
b/qadevOOo/tests/java/ifc/text/_DocumentIndexMark.java
deleted file mode 100644
index d78730727e12..
--- a/qadevOOo/tests/java/ifc/text/_DocumentIndexMark.java
+++ /dev/null
@@ -1,38 +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 com.sun.star.text.DocumentIndexMark
-* service properties :
-* 
-*   PrimaryKey
-*   SecondaryKey
-*   IsMainEntry
-*  
-* Properties testing is automated by lib.MultiPropertyTest.
-* @see 

[Libreoffice-commits] core.git: qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-26 Thread anfanite396 (via logerrit)
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java|   75 
--
 sw/qa/unoapi/sw_1.sce|1 
 4 files changed, 84 deletions(-)

New commits:
commit 38170c21461a5933fe6b2341532ef6527b5a65b6
Author: anfanite396 
AuthorDate: Fri Aug 25 21:00:33 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Sat Aug 26 13:30:06 2023 +0200

tdf#45904: Remove old SwXAutoTextContainer Java test

Change-Id: Idcb3c17e328894bbd64939f2e3ad076204b35bd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156113
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 950cdbf57fd4..336b99b81e9a 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1088,7 +1088,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject \
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView \
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject \
-qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer \
 qadevOOo/tests/java/mod/_sw/SwXAutoTextEntry \
 qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup \
 qadevOOo/tests/java/mod/_sw/SwXBodyText \
diff --git 
a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv
deleted file mode 100644
index d1c6e381eb9b..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXAutoTextContainer";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXAutoTextContainer";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXAutoTextContainer";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXAutoTextContainer";"com::sun::star::container::XIndexAccess#optional";"getCount()"
-"SwXAutoTextContainer";"com::sun::star::container::XIndexAccess#optional";"getByIndex()"
-"SwXAutoTextContainer";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXAutoTextContainer";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java 
b/qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java
deleted file mode 100644
index edaa1aed98e4..
--- a/qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java
+++ /dev/null
@@ -1,75 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XAutoTextContainer;
-import com.sun.star.uno.UnoRuntime;
-
-/**
-* Test for object which is represented by service
-* com.sun.star.text.AutoTextContainer.
-* Object implements the following interfaces :
-* 
-*   com::sun::star::container::XNameAccess
-*   com::sun::star::container::XElementAccess
-*   com::sun::star::text::XAutoTextContainer
-* 
-* @see com.sun.star.container.XNameAccess
-* @see com.sun.star.container.XElementAccess
-* @see com.sun.star.text.XAutoTextContainer
-* @see com.sun.star.text.AutoTextContainer
-* @see ifc.container._XNameAccess
-* @see ifc.container._XElementAccess
-* @see ifc.text._XAutoTextContainer
-*/
-public class SwXAutoTextContainer extends TestCase {
-
-/**
-* Creating a TestEnvironment for the interfaces to be tested.
-* Creates an instance of the service
-* com.sun.star.text.AutoTextContainer.
-*/
-@Override
-public TestEnvironment createTestEnvironment(
-TestParameters Param, PrintWriter log ) throws Exception {
-XAutoTextContainer  oContainer = null;
-
-// creation of testobject here
-// first we write what we are intend to do to log file
-log.println("creating an AutoTextContainer");
-XMultiServiceFactory myMSF = Param.getMSF();
-Object oInst = myMSF.createInstance
-

[Libreoffice-commits] core.git: 2 commits - framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-25 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst   |2 
 qadevOOo/Jar_OOoRunner.mk   |2 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnotes.csv|4 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXParagraphEnumeration.csv |2 
 qadevOOo/tests/java/mod/_sw/SwXFootnotes.java   |  110 
---
 qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java|  141 
--
 sw/qa/api/SwXFootnotes.cxx  |   98 
++
 sw/qa/unoapi/sw_2.sce   |2 
 8 files changed, 40 insertions(+), 321 deletions(-)

New commits:
commit b0652124dc92d5f62cef19f63a98aa8b68f5a850
Author: anfanite396 
AuthorDate: Thu Aug 24 15:07:11 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:30:11 2023 +0200

tdf#45904: Remove old SwXParagraphEnumeration Java test

Change-Id: Ia8b639e016971e389d24d4468492af902d1dc35b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156042
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 7dfab8feb3af..304220026084 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -150,7 +150,6 @@ job216=sw.SwXFrames
 job217=sw.SwXHeadFootText
 job218=sw.SwXLineNumberingProperties
 job219=sw.SwXModule
-job220=sw.SwXParagraphEnumeration
 job221=sw.SwXPrintSettings
 job222=sw.SwXPropertySet
 job223=sw.SwXPropertySetInfo
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 3a9d0503cba8..950cdbf57fd4 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1109,7 +1109,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXModule \
 qadevOOo/tests/java/mod/_sw/SwXNumberingRules \
 qadevOOo/tests/java/mod/_sw/SwXParagraph \
-qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration \
 qadevOOo/tests/java/mod/_sw/SwXPrintSettings \
 qadevOOo/tests/java/mod/_sw/SwXPropertySet \
 qadevOOo/tests/java/mod/_sw/SwXPropertySetInfo \
diff --git 
a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXParagraphEnumeration.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXParagraphEnumeration.csv
deleted file mode 100644
index 9462032b1fed..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXParagraphEnumeration.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"SwXParagraphEnumeration";"com::sun::star::container::XEnumeration";"hasMoreElements()"
-"SwXParagraphEnumeration";"com::sun::star::container::XEnumeration";"nextElement()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java 
b/qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java
deleted file mode 100644
index 3e17bfce35fe..
--- a/qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java
+++ /dev/null
@@ -1,141 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XEnumerationAccess;
-import com.sun.star.text.ControlCharacter;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- * Test for object which is represented by service
- * com.sun.star.text.ParagraphEnumeration. 
- * Object implements the following interfaces :
- * 
- *   com::sun::star::container::XEnumeration
- *  
- * This object test  is NOT  designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XEnumeration
- * @see ifc.container._XEnumeration
- */
-public class SwXParagraphEnumeration extends TestCase {
-XTextDocument xTextDoc = null;
-
-/**
-* Creates text document.
-*/
-@Override
-protected void initialize( TestParameters tParam, 

[Libreoffice-commits] core.git: 2 commits - framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-25 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst   |2 
 qadevOOo/Jar_OOoRunner.mk   |2 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexes.csv  |7 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv |2 
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java |  108 
--
 qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java|  156 
--
 sw/qa/unoapi/sw_1.sce   |1 
 sw/qa/unoapi/sw_2.sce   |1 
 8 files changed, 279 deletions(-)

New commits:
commit 3b2d95ab67456c7d7b5e51ffcb664702c6c4d71b
Author: anfanite396 
AuthorDate: Thu Aug 24 14:39:46 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:29:41 2023 +0200

tdf#45904: Remove old SwXFieldEnumeration Java test

Change-Id: I5bbefc7c1c5ac9ebd88669ac328bba28183b76ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156033
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 643db28208ef..080b808d825b 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -142,7 +142,6 @@ job203=sw.SwXBodyText
 job206=sw.SwXCell
 job208=sw.SwXDocumentIndexMark
 job209=sw.SwXEndnoteProperties
-job210=sw.SwXFieldEnumeration
 job211=sw.SwXFieldMaster
 job212=sw.SwXFootnote
 job213=sw.SwXFootnoteProperties
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index ebd98b2dd049..a11c799ab852 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1098,7 +1098,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark \
 qadevOOo/tests/java/mod/_sw/SwXDrawPage \
 qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties \
-qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration \
 qadevOOo/tests/java/mod/_sw/SwXFieldMaster \
 qadevOOo/tests/java/mod/_sw/SwXFootnote \
 qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties \
diff --git 
a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv
deleted file mode 100644
index 9b2391fc092b..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFieldEnumeration.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"SwXFieldEnumeration";"com::sun::star::container::XEnumeration";"hasMoreElements()"
-"SwXFieldEnumeration";"com::sun::star::container::XEnumeration";"nextElement()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java 
b/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java
deleted file mode 100644
index dcfbf1c2f81e..
--- a/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java
+++ /dev/null
@@ -1,156 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XEnumerationAccess;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XDependentTextField;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextFieldsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-
-/**
- * Object implements the following interfaces :
- * 
- *   com::sun::star::container::XEnumeration
- *  
- * This object test  is NOT  designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XEnumeration
- * @see ifc.container._XEnumeration
- */
-public class SwXFieldEnumeration extends TestCase {
-XTextDocument xTextDoc;
-
-/**
-* Creates text document.
-*/
-@Override
-protected void initialize( TestParameters tParam, PrintWriter log ) throws 
Exception {
-SOfficeFactory SOF = 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-25 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst|1 
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXStyleFamilies.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java|   97 
--
 sw/qa/api/SwXStyleFamilies.cxx   |3 
 sw/qa/unoapi/sw_2.sce|1 
 6 files changed, 110 deletions(-)

New commits:
commit 1dca3e5839089608b640a1b9f69d1c8521d4b10e
Author: anfanite396 
AuthorDate: Thu Aug 24 15:32:36 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:29:06 2023 +0200

tdf#45904: Remove old SwXStyleFamilies Java test

Change-Id: I3057e4a2fcf1b057d35050bfeb7c22fbad19325b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156045
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index f3befca0..e24f9f945c86 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -159,7 +159,6 @@ job222=sw.SwXPropertySet
 job223=sw.SwXPropertySetInfo
 job225=sw.SwXReferenceMarks
 job226=sw.SwXStyle
-job227=sw.SwXStyleFamilies
 job228=sw.SwXStyleFamily
 job229=sw.SwXTableCellText
 job230=sw.SwXTableRows
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index de423c3bc624..37c36f18c0f1 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1119,7 +1119,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXReferenceMarks \
 qadevOOo/tests/java/mod/_sw/SwXShape \
 qadevOOo/tests/java/mod/_sw/SwXStyle \
-qadevOOo/tests/java/mod/_sw/SwXStyleFamilies \
 qadevOOo/tests/java/mod/_sw/SwXStyleFamily \
 qadevOOo/tests/java/mod/_sw/SwXTableCellText \
 qadevOOo/tests/java/mod/_sw/SwXTableColumns \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXStyleFamilies.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXStyleFamilies.csv
deleted file mode 100644
index f2f3e1303856..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXStyleFamilies.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXStyleFamilies";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXStyleFamilies";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXStyleFamilies";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXStyleFamilies";"com::sun::star::container::XIndexAccess#optional";"getCount()"
-"SwXStyleFamilies";"com::sun::star::container::XIndexAccess#optional";"getByIndex()"
-"SwXStyleFamilies";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXStyleFamilies";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java 
b/qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java
deleted file mode 100644
index ebbc4690aa69..
--- a/qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java
+++ /dev/null
@@ -1,97 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.container.XNameAccess;
-import com.sun.star.style.XStyleFamiliesSupplier;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-
-
-/**
- * Test for object which is represented by service
- * com.sun.star.style.StyleFamilies. 
- * Object implements the following interfaces :
- * 
- *   com::sun::star::container::XNameAccess
- *   com::sun::star::container::XElementAccess
- *   com::sun::star::container::XIndexAccess
- *  
- * This object test  is NOT  designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XNameAccess
- * @see com.sun.star.container.XElementAccess
- * @see com.sun.star.container.XIndexAccess
- * @see com.sun.star.style.StyleFamilies
- * @see ifc.container._XNameAccess
- * @see ifc.container._XElementAccess
- * @see ifc.container._XIndexAccess
- */
-public 

[Libreoffice-commits] core.git: qadevOOo/objdsc sw/qa

2023-08-25 Thread anfanite396 (via logerrit)
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextField.csv |8 
 sw/qa/api/SwXTextField.cxx   |  114 ++-
 2 files changed, 64 insertions(+), 58 deletions(-)

New commits:
commit 4453918e67a137440432381ef3bb2d03841e55d5
Author: anfanite396 
AuthorDate: Thu Aug 24 16:16:38 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:28:28 2023 +0200

tdf#45904: Move SwXTextField Java tests to C++

Change-Id: I11052e68289507778767df0d69cc8924f394b4f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156047
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextField.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextField.csv
index 647254ff5cbe..e9f43eda6983 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextField.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextField.csv
@@ -1,9 +1,3 @@
-"SwXTextField";"com::sun::star::lang::XComponent";"dispose()"
-"SwXTextField";"com::sun::star::lang::XComponent";"addEventListener()"
-"SwXTextField";"com::sun::star::lang::XComponent";"removeEventListener()"
-"SwXTextField";"com::sun::star::text::TextContent";"AnchorType#optional"
-"SwXTextField";"com::sun::star::text::TextContent";"AnchorTypes#optional"
-"SwXTextField";"com::sun::star::text::TextContent";"TextWrap#optional"
 "SwXTextField";"com::sun::star::text::XTextField";"getPresentation()"
 
"SwXTextField";"com::sun::star::beans::XPropertySet#optional";"getPropertySetInfo()"
 
"SwXTextField";"com::sun::star::beans::XPropertySet#optional";"setPropertyValue()"
@@ -12,5 +6,3 @@
 
"SwXTextField";"com::sun::star::beans::XPropertySet#optional";"removePropertyChangeListener()"
 
"SwXTextField";"com::sun::star::beans::XPropertySet#optional";"addVetoableChangeListener()"
 
"SwXTextField";"com::sun::star::beans::XPropertySet#optional";"removeVetoableChangeListener()"
-"SwXTextField";"com::sun::star::text::XTextContent";"attach()"
-"SwXTextField";"com::sun::star::text::XTextContent";"getAnchor()"
diff --git a/sw/qa/api/SwXTextField.cxx b/sw/qa/api/SwXTextField.cxx
index 5c8464233131..e22ab89e47b1 100644
--- a/sw/qa/api/SwXTextField.cxx
+++ b/sw/qa/api/SwXTextField.cxx
@@ -7,9 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
+#include 
+#include 
 #include 
-#include 
+#include 
+#include 
+#include 
 
 #include 
 
@@ -27,71 +30,82 @@
 
 using namespace css;
 using namespace css::uno;
-using namespace css::beans;
 
 namespace
 {
 /**
  * Initial tests for SwXTextField.
  */
-struct SwXTextField final : public test::BootstrapFixture,
-public unotest::MacrosTest,
-public apitest::XComponent
+struct SwXTextField final : public UnoApiTest,
+public apitest::XPropertySet,
+public apitest::XComponent,
+public apitest::TextContent,
+public apitest::XTextContent,
+public apitest::XTextField
 {
-virtual void setUp() override;
-void tearDown() override;
+SwXTextField()
+: UnoApiTest("")
+, TextContent(text::TextContentAnchorType_AS_CHARACTER,
+  text::TextContentAnchorType_AS_CHARACTER, 
text::WrapTextMode_NONE,
+  text::WrapTextMode_NONE)
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xFieldMaster(
+xMSF->createInstance("com.sun.star.text.FieldMaster.Database"), 
UNO_QUERY_THROW);
+
+xFieldMaster->setPropertyValue("DataBaseName", Any(OUString("Address 
Book File")));
+xFieldMaster->setPropertyValue("DataTableName", 
Any(OUString("address")));
+xFieldMaster->setPropertyValue("DataColumnName", 
Any(OUString("FIRSTNAME")));
+
+Reference xField(
+xMSF->createInstance("com.sun.star.text.TextField.Database"), 
UNO_QUERY_THROW);
+xField->attachTextFieldMaster(xFieldMaster);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+Reference xFieldAsContent(xField, UNO_QUERY_THROW);
+xText->insertTextContent(xCursor, xFieldAsContent, false);
+
+mxTextRange = Reference(xCursor, UNO_QUERY_THROW);
+mxTextContent = Reference(
+xMSF->createInstance("com.sun.star.text.TextField.DateTime"), 
UNO_QUERY_THROW);
+
+return Reference(xField, UNO_QUERY_THROW);
+}
 
-Reference init() override;
-void 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/CppunitTest_sw_apitests.mk sw/qa

2023-08-25 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst  |1 
 qadevOOo/Jar_OOoRunner.mk  |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextEmbeddedObjects.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java|  121 
--
 sw/CppunitTest_sw_apitests.mk  |1 
 sw/qa/api/SwXTextEmbeddedObjects.cxx   |  100 

 sw/qa/unoapi/sw_3.sce  |1 
 7 files changed, 101 insertions(+), 131 deletions(-)

New commits:
commit 534326bf573ace5877c7d790b37399623aa71d79
Author: anfanite396 
AuthorDate: Thu Aug 24 16:47:30 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:27:53 2023 +0200

tdf#45904: Move SwXTextEmbeddedObjects Java tests to C++

Change-Id: I05ad9e264162e3fb97ebea814f59ed44bf23056a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156050
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index e1f01f7a2fc0..f3befca0 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -165,7 +165,6 @@ job229=sw.SwXTableCellText
 job230=sw.SwXTableRows
 job231=sw.SwXTextColumns
 job232=sw.SwXTextDefaults
-job233=sw.SwXTextEmbeddedObjects
 job234=sw.SwXTextField
 job237=sw.SwXTextFrameText
 job238=sw.SwXTextGraphicObjects
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 9c0af119c032..de423c3bc624 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1129,7 +1129,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXTextDefaults \
 qadevOOo/tests/java/mod/_sw/SwXTextDocument \
 qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject \
-qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects \
 qadevOOo/tests/java/mod/_sw/SwXTextField \
 qadevOOo/tests/java/mod/_sw/SwXTextFrame \
 qadevOOo/tests/java/mod/_sw/SwXTextFrameText \
diff --git 
a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextEmbeddedObjects.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextEmbeddedObjects.csv
deleted file mode 100644
index 89ab2d561f04..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextEmbeddedObjects.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXTextEmbeddedObjects";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXTextEmbeddedObjects";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXTextEmbeddedObjects";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXTextEmbeddedObjects";"com::sun::star::container::XIndexAccess";"getCount()"
-"SwXTextEmbeddedObjects";"com::sun::star::container::XIndexAccess";"getByIndex()"
-"SwXTextEmbeddedObjects";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXTextEmbeddedObjects";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java 
b/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java
deleted file mode 100644
index 4b0e3ae7239b..
--- a/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java
+++ /dev/null
@@ -1,121 +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 mod._sw;
-
-import com.sun.star.beans.XPropertySet;
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextEmbeddedObjectsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-
-public class SwXTextEmbeddedObjects extends TestCase {
-
-XTextDocument oDoc;
-
-/**
- * in general this method creates a testdocument
- *
- *  @param tParamclass which contains additional test parameters
- *  @param logclass to log 

[Libreoffice-commits] core.git: include/test qadevOOo/objdsc sw/qa test/Library_subsequenttest.mk test/source

2023-08-25 Thread anfanite396 (via logerrit)
 include/test/text/xtextrangecompare.hxx |   37 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBodyText.csv |2 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnoteText.csv |2 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXHeadFootText.csv |2 
 sw/qa/api/SwXBodyText.cxx   |6 
 sw/qa/api/SwXFootnoteText.cxx   |6 
 sw/qa/api/SwXHeadFootText.cxx   |   34 ++--
 test/Library_subsequenttest.mk  |1 
 test/source/text/xtextrangecompare.cxx  |   76 
++
 9 files changed, 143 insertions(+), 23 deletions(-)

New commits:
commit 7a762a2c7ec5fe107697c06d31bc7a184011a338
Author: anfanite396 
AuthorDate: Fri Aug 11 23:29:32 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:25:53 2023 +0200

tdf#45904: Move _XTextRangeCompare Java tests to C++

Change-Id: I40390a8b05f0e685a9408f0c486f6129633bc5b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155634
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/text/xtextrangecompare.hxx 
b/include/test/text/xtextrangecompare.hxx
new file mode 100644
index ..b7e36a5cc445
--- /dev/null
+++ b/include/test/text/xtextrangecompare.hxx
@@ -0,0 +1,37 @@
+/* -*- 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 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XTextRangeCompare
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testCompareRegionStarts();
+void testCompareRegionEnds();
+
+protected:
+~XTextRangeCompare() {}
+};
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBodyText.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBodyText.csv
index 45ebfd332ec9..44603eda85f2 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBodyText.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBodyText.csv
@@ -1,6 +1,4 @@
 
"SwXBodyText";"com::sun::star::text::XTextRangeMover#optional";"moveTextRange()"
-"SwXBodyText";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionStarts()"
-"SwXBodyText";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionEnds()"
 "SwXBodyText";"com::sun::star::text::XSimpleText";"createTextCursor()"
 "SwXBodyText";"com::sun::star::text::XSimpleText";"createTextCursorByRange()"
 "SwXBodyText";"com::sun::star::text::XSimpleText";"insertString()"
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnoteText.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnoteText.csv
index 3f3663b8c2dd..6bba3d3cf263 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnoteText.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXFootnoteText.csv
@@ -1,6 +1,4 @@
 
"SwXFootnoteText";"com::sun::star::text::XTextRangeMover#optional";"moveTextRange()"
-"SwXFootnoteText";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionStarts()"
-"SwXFootnoteText";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionEnds()"
 "SwXFootnoteText";"com::sun::star::text::XSimpleText";"createTextCursor()"
 
"SwXFootnoteText";"com::sun::star::text::XSimpleText";"createTextCursorByRange()"
 "SwXFootnoteText";"com::sun::star::text::XSimpleText";"insertString()"
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXHeadFootText.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXHeadFootText.csv
index 0602fbf2e584..7e780f968a58 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXHeadFootText.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXHeadFootText.csv
@@ -1,6 +1,4 @@
 
"SwXHeadFootText";"com::sun::star::text::XTextRangeMover#optional";"moveTextRange()"
-"SwXHeadFootText";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionStarts()"
-"SwXHeadFootText";"com::sun::star::text::XTextRangeCompare#optional";"compareRegionEnds()"
 "SwXHeadFootText";"com::sun::star::text::XSimpleText";"createTextCursor()"
 
"SwXHeadFootText";"com::sun::star::text::XSimpleText";"createTextCursorByRange()"
 "SwXHeadFootText";"com::sun::star::text::XSimpleText";"insertString()"
diff --git a/sw/qa/api/SwXBodyText.cxx b/sw/qa/api/SwXBodyText.cxx
index d364ba3a8aa0..69fb22a959b2 100644
--- a/sw/qa/api/SwXBodyText.cxx
+++ b/sw/qa/api/SwXBodyText.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -36,7 +37,8 @@ class 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-25 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst|1 
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMark.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java|  117 
--
 sw/qa/unoapi/sw_2.sce|1 
 5 files changed, 127 deletions(-)

New commits:
commit 52f785d15197b4ef645ae08015994f5accf2ec8e
Author: anfanite396 
AuthorDate: Thu Aug 24 15:13:21 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:25:02 2023 +0200

tdf#45904: Remove old SwXReferenceMark Java test

Change-Id: I81acf617726b7e7e5b5510b0d6d7677c7d08aba5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156043
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index bcabcb80168d..e1f01f7a2fc0 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -157,7 +157,6 @@ job220=sw.SwXParagraphEnumeration
 job221=sw.SwXPrintSettings
 job222=sw.SwXPropertySet
 job223=sw.SwXPropertySetInfo
-job224=sw.SwXReferenceMark
 job225=sw.SwXReferenceMarks
 job226=sw.SwXStyle
 job227=sw.SwXStyleFamilies
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 3d5e9824b413..9c0af119c032 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1116,7 +1116,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXPrintSettings \
 qadevOOo/tests/java/mod/_sw/SwXPropertySet \
 qadevOOo/tests/java/mod/_sw/SwXPropertySetInfo \
-qadevOOo/tests/java/mod/_sw/SwXReferenceMark \
 qadevOOo/tests/java/mod/_sw/SwXReferenceMarks \
 qadevOOo/tests/java/mod/_sw/SwXShape \
 qadevOOo/tests/java/mod/_sw/SwXStyle \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMark.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMark.csv
deleted file mode 100644
index bdabc0f82d21..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXReferenceMark.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXReferenceMark";"com::sun::star::lang::XComponent";"dispose()"
-"SwXReferenceMark";"com::sun::star::lang::XComponent";"addEventListener()"
-"SwXReferenceMark";"com::sun::star::lang::XComponent";"removeEventListener()"
-"SwXReferenceMark";"com::sun::star::container::XNamed";"getName()"
-"SwXReferenceMark";"com::sun::star::container::XNamed";"setName()"
-"SwXReferenceMark";"com::sun::star::text::XTextContent";"attach()"
-"SwXReferenceMark";"com::sun::star::text::XTextContent";"getAnchor()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java 
b/qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java
deleted file mode 100644
index 8b257ba13342..
--- a/qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java
+++ /dev/null
@@ -1,117 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.container.XNamed;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- * Test for object which is represented by service
- * com.sun.star.text.ReferenceMark. 
- * Object implements the following interfaces :
- * 
- *   com::sun::star::container::XNamed
- *   com::sun::star::lang::XComponent
- *   com::sun::star::text::XTextContent
- *  
- * This object test  is NOT  designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XNamed
- * @see com.sun.star.lang.XComponent
- * @see com.sun.star.text.XTextContent
- * @see com.sun.star.text.ReferenceMark
- * @see ifc.container._XNamed
- * @see ifc.lang._XComponent
- * @see ifc.text._XTextContent
- */
-public class SwXReferenceMark extends TestCase {
-XTextDocument 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/CppunitTest_sw_apitests.mk sw/qa

2023-08-25 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst   |1 
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldMasters.csv |5 
 qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java|  125 
--
 sw/CppunitTest_sw_apitests.mk   |1 
 sw/qa/api/SwXTextFieldMasters.cxx   |   86 
++
 sw/qa/unoapi/sw_3.sce   |1 
 7 files changed, 87 insertions(+), 133 deletions(-)

New commits:
commit 0440f57a096c2d8da704b3bc409ecfd74202ac8f
Author: anfanite396 
AuthorDate: Thu Aug 24 17:09:56 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:24:06 2023 +0200

tdf#45904: Move SwXTextFieldMasters Java tests to C++

Change-Id: Ifa185b24fe49f2c88e4d3687a09ebce5987503a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156051
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 6e1d1cbe8d65..bcabcb80168d 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -168,7 +168,6 @@ job231=sw.SwXTextColumns
 job232=sw.SwXTextDefaults
 job233=sw.SwXTextEmbeddedObjects
 job234=sw.SwXTextField
-job235=sw.SwXTextFieldMasters
 job237=sw.SwXTextFrameText
 job238=sw.SwXTextGraphicObjects
 job239=sw.SwXTextPortionEnumeration
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index cb0422a1dbe3..3d5e9824b413 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1132,7 +1132,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject \
 qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects \
 qadevOOo/tests/java/mod/_sw/SwXTextField \
-qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters \
 qadevOOo/tests/java/mod/_sw/SwXTextFrame \
 qadevOOo/tests/java/mod/_sw/SwXTextFrameText \
 qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject \
diff --git 
a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldMasters.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldMasters.csv
deleted file mode 100644
index 4cc2e926c4eb..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldMasters.csv
+++ /dev/null
@@ -1,5 +0,0 @@
-"SwXTextFieldMasters";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXTextFieldMasters";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXTextFieldMasters";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXTextFieldMasters";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXTextFieldMasters";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java 
b/qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java
deleted file mode 100644
index 3f6d70705a41..
--- a/qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java
+++ /dev/null
@@ -1,125 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextFieldsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- *
- * initial description
- * @see com.sun.star.container.XContainer
- * @see com.sun.star.container.XElementAccess
- * @see com.sun.star.container.XNameAccess
- * @see com.sun.star.container.XNameContainer
- * @see com.sun.star.container.XNameReplace
- *
- */
-public class SwXTextFieldMasters extends TestCase {
-
-XTextDocument xTextDoc;
-
-/**
- * in general this method creates a testdocument
- *
- *  @param tParamclass which contains additional test parameters
- *  @param logclass to log the test state and result
- *
- *
- *  @see TestParameters
- *@see PrintWriter
- *
-   

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa test/Library_subsequenttest.mk test/source

2023-08-25 Thread anfanite396 (via logerrit)
 include/test/text/xautotextcontainer.hxx |   45 +++
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv |2 
 qadevOOo/tests/java/ifc/text/_XAutoTextContainer.java|  132 
--
 sw/qa/api/SwXAutoTextContainer.cxx   |   15 -
 test/Library_subsequenttest.mk   |1 
 test/source/text/xautotextcontainer.cxx  |   54 

 7 files changed, 112 insertions(+), 138 deletions(-)

New commits:
commit 7b999ca22824e102d283a8b7327fa2717db6568a
Author: anfanite396 
AuthorDate: Fri Aug 11 19:13:08 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:23:23 2023 +0200

tdf#45904: Move _XAutoTextContainer Java tests to C++

Change-Id: Ie6ebc43c52204984cb6196f539c735701d13dc22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155627
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/text/xautotextcontainer.hxx 
b/include/test/text/xautotextcontainer.hxx
new file mode 100644
index ..a2ab07497362
--- /dev/null
+++ b/include/test/text/xautotextcontainer.hxx
@@ -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/.
+ */
+
+#pragma once
+
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XAutoTextContainer
+{
+public:
+XAutoTextContainer(OUString aNameToRemove)
+: m_aName(std::move(aNameToRemove))
+{
+}
+
+virtual css::uno::Reference init() = 0;
+
+void testInsertNewByName();
+void testRemoveByName();
+
+protected:
+~XAutoTextContainer() {}
+
+private:
+OUString m_aName;
+};
+
+} // namespace apitest
+
+/* 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 71b0beaa1b9d..cb0422a1dbe3 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -616,7 +616,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/text/_TextTable \
 qadevOOo/tests/java/ifc/text/_TextTableRow \
 qadevOOo/tests/java/ifc/text/_ViewSettings \
-qadevOOo/tests/java/ifc/text/_XAutoTextContainer \
 qadevOOo/tests/java/ifc/text/_XAutoTextEntry \
 qadevOOo/tests/java/ifc/text/_XAutoTextGroup \
 qadevOOo/tests/java/ifc/text/_XBookmarksSupplier \
diff --git 
a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv
index 25352ae1f972..d1c6e381eb9b 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXAutoTextContainer.csv
@@ -5,5 +5,3 @@
 
"SwXAutoTextContainer";"com::sun::star::container::XIndexAccess#optional";"getByIndex()"
 
"SwXAutoTextContainer";"com::sun::star::container::XElementAccess";"getElementType()"
 
"SwXAutoTextContainer";"com::sun::star::container::XElementAccess";"hasElements()"
-"SwXAutoTextContainer";"com::sun::star::text::XAutoTextContainer";"insertNewByName()"
-"SwXAutoTextContainer";"com::sun::star::text::XAutoTextContainer";"removeByName()"
diff --git a/qadevOOo/tests/java/ifc/text/_XAutoTextContainer.java 
b/qadevOOo/tests/java/ifc/text/_XAutoTextContainer.java
deleted file mode 100644
index fed159a320b2..
--- a/qadevOOo/tests/java/ifc/text/_XAutoTextContainer.java
+++ /dev/null
@@ -1,132 +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.MultiMethodTest;
-
-import com.sun.star.text.XAutoTextContainer;
-import com.sun.star.text.XAutoTextGroup;
-
-/**
- * Testing com.sun.star.text.XAutoTextContainer
- * interface methods :
- * 
- *   

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa test/Library_subsequenttest.mk test/source

2023-08-25 Thread anfanite396 (via logerrit)
 include/test/text/baseindexmark.hxx  |   31 
++
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndexMark.csv |1 
 qadevOOo/tests/java/ifc/text/_BaseIndexMark.java |   36 

 sw/qa/api/SwXDocumentIndexMark.cxx   |5 -
 test/Library_subsequenttest.mk   |1 
 test/source/text/baseindexmark.cxx   |   45 
++
 7 files changed, 81 insertions(+), 39 deletions(-)

New commits:
commit bb8f57dfa17e108c4cd5d08a538077c3d2c6f195
Author: anfanite396 
AuthorDate: Tue Aug 1 15:35:01 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:21:53 2023 +0200

tdf#45904: Move _BaseIndexMark Java tests to C++

Change-Id: Ie6c09c0cfedbad8168281af354590ab7c9dd374e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155162
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/text/baseindexmark.hxx 
b/include/test/text/baseindexmark.hxx
new file mode 100644
index ..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 
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST BaseIndexMark
+{
+public:
+virtual css::uno::Reference 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..
--- 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 com.sun.star.text.BaseIndexMark
-* service properties :
-* 
-*   AlternativeText
-*  
-* Properties testing is automated by lib.MultiPropertyTest.
-* @see com.sun.star.text.BaseIndexMark
-*/
-public class _BaseIndexMark extends MultiPropertyTest {
-
-}  // finish class _BaseIndexMark
-
-
diff --git 

[Libreoffice-commits] core.git: include/test qadevOOo/objdsc sw/qa test/Library_subsequenttest.mk test/source

2023-08-25 Thread anfanite396 (via logerrit)
 include/test/text/numberingrules.hxx|   31 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXChapterNumbering.csv |4 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXNumberingRules.csv   |4 
 sw/qa/api/SwXChapterNumbering.cxx   |5 
 sw/qa/api/SwXNumberingRules.cxx |5 
 test/Library_subsequenttest.mk  |1 
 test/source/text/numberingrules.cxx |   77 
++
 7 files changed, 117 insertions(+), 10 deletions(-)

New commits:
commit 594665e757c4adec4d243e4c33299877b2264552
Author: anfanite396 
AuthorDate: Mon Jul 31 16:14:34 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 25 08:21:14 2023 +0200

tdf#45904 Move _NumberingRules Java tests to C++

Change-Id: I86d559767204e1e8e1fd232db63f26a5c1ce67da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155089
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/text/numberingrules.hxx 
b/include/test/text/numberingrules.hxx
new file mode 100644
index ..a6db84bd054e
--- /dev/null
+++ b/include/test/text/numberingrules.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 
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST NumberingRules
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testNumberingRulesProperties();
+
+protected:
+~NumberingRules() {}
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git 
a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXChapterNumbering.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXChapterNumbering.csv
index 89a3669e18d9..d06312d6d1ee 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXChapterNumbering.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXChapterNumbering.csv
@@ -3,10 +3,6 @@
 
"SwXChapterNumbering";"com::sun::star::container::XElementAccess";"getElementType()"
 
"SwXChapterNumbering";"com::sun::star::container::XElementAccess";"hasElements()"
 
"SwXChapterNumbering";"com::sun::star::container::XIndexReplace";"replaceByIndex()"
-"SwXChapterNumbering";"com::sun::star::text::NumberingRules";"IsAbsoluteMargins#optional"
-"SwXChapterNumbering";"com::sun::star::text::NumberingRules";"IsAutomatic#optional"
-"SwXChapterNumbering";"com::sun::star::text::NumberingRules";"IsContinuousNumbering#optional"
-"SwXChapterNumbering";"com::sun::star::text::NumberingRules";"Name#optional"
 
"SwXChapterNumbering";"com::sun::star::beans::XPropertySet#optional";"getPropertySetInfo()"
 
"SwXChapterNumbering";"com::sun::star::beans::XPropertySet#optional";"setPropertyValue()"
 
"SwXChapterNumbering";"com::sun::star::beans::XPropertySet#optional";"getPropertyValue()"
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXNumberingRules.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXNumberingRules.csv
index 6b30de486f46..45c9cbb2e25f 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXNumberingRules.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXNumberingRules.csv
@@ -3,10 +3,6 @@
 
"SwXNumberingRules";"com::sun::star::container::XElementAccess";"getElementType()"
 "SwXNumberingRules";"com::sun::star::container::XElementAccess";"hasElements()"
 
"SwXNumberingRules";"com::sun::star::container::XIndexReplace";"replaceByIndex()"
-"SwXNumberingRules";"com::sun::star::text::NumberingRules";"IsAbsoluteMargins#optional"
-"SwXNumberingRules";"com::sun::star::text::NumberingRules";"IsAutomatic#optional"
-"SwXNumberingRules";"com::sun::star::text::NumberingRules";"IsContinuousNumbering#optional"
-"SwXNumberingRules";"com::sun::star::text::NumberingRules";"Name#optional"
 
"SwXNumberingRules";"com::sun::star::beans::XPropertySet#optional";"getPropertySetInfo()"
 
"SwXNumberingRules";"com::sun::star::beans::XPropertySet#optional";"setPropertyValue()"
 
"SwXNumberingRules";"com::sun::star::beans::XPropertySet#optional";"getPropertyValue()"
diff --git a/sw/qa/api/SwXChapterNumbering.cxx 
b/sw/qa/api/SwXChapterNumbering.cxx
index 30dc352535c5..5a676da9c042 100644
--- a/sw/qa/api/SwXChapterNumbering.cxx
+++ b/sw/qa/api/SwXChapterNumbering.cxx
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -29,7 +30,8 @@ namespace
 class SwXChapterNumbering final : public UnoApiTest,
   public apitest::XPropertySet,
   public apitest::XElementAccess,
-  public 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-23 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst   |1 
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmark.csv |   10 -
 qadevOOo/tests/java/mod/_sw/SwXBookmark.java|  101 
 sw/qa/api/SwXBookmark.cxx   |   96 ---
 sw/qa/unoapi/sw_1.sce   |1 
 6 files changed, 37 insertions(+), 173 deletions(-)

New commits:
commit 6d9f68e47a1984fe310293ea2318e314f4a18bb2
Author: anfanite396 
AuthorDate: Thu Aug 17 16:45:43 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 23 15:30:47 2023 +0200

tdf#45904: Remove old SwXBookmark Java test

Change-Id: If17818329b805a03b975e105ea97f7c6cc16d1a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155767
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 209b3ad1bcb8..6e1d1cbe8d65 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -139,7 +139,6 @@ job200=sw.SwAccessibleTableCellView
 job201=sw.SwAccessibleTextFrameView
 job202=sw.SwAccessibleTextGraphicObject
 job203=sw.SwXBodyText
-job204=sw.SwXBookmark
 job206=sw.SwXCell
 job207=sw.SwXDocumentIndexes
 job208=sw.SwXDocumentIndexMark
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 52cccbc05110..a539bc96c16a 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1094,7 +1094,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXAutoTextEntry \
 qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup \
 qadevOOo/tests/java/mod/_sw/SwXBodyText \
-qadevOOo/tests/java/mod/_sw/SwXBookmark \
 qadevOOo/tests/java/mod/_sw/SwXCell \
 qadevOOo/tests/java/mod/_sw/SwXCellRange \
 qadevOOo/tests/java/mod/_sw/SwXChapterNumbering \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmark.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmark.csv
deleted file mode 100644
index 5508d6f1bd0a..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmark.csv
+++ /dev/null
@@ -1,10 +0,0 @@
-"SwXBookmark";"com::sun::star::lang::XComponent";"dispose()"
-"SwXBookmark";"com::sun::star::lang::XComponent";"addEventListener()"
-"SwXBookmark";"com::sun::star::lang::XComponent";"removeEventListener()"
-"SwXBookmark";"com::sun::star::text::TextContent";"AnchorType#optional"
-"SwXBookmark";"com::sun::star::text::TextContent";"AnchorTypes#optional"
-"SwXBookmark";"com::sun::star::text::TextContent";"TextWrap#optional"
-"SwXBookmark";"com::sun::star::container::XNamed";"getName()"
-"SwXBookmark";"com::sun::star::container::XNamed";"setName()"
-"SwXBookmark";"com::sun::star::text::XTextContent";"attach()"
-"SwXBookmark";"com::sun::star::text::XTextContent";"getAnchor()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXBookmark.java 
b/qadevOOo/tests/java/mod/_sw/SwXBookmark.java
deleted file mode 100644
index 034a64b8e827..
--- a/qadevOOo/tests/java/mod/_sw/SwXBookmark.java
+++ /dev/null
@@ -1,101 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- * Test for object which is represented by service
- * com.sun.star.text.Bookmark. 
- * Object implements the following interfaces :
- * 
- *   com::sun::star::container::XNamed
- *   com::sun::star::lang::XComponent
- *   com::sun::star::text::XTextContent
- *   com::sun::star::text::TextContent
- *  
- * This object test  is NOT  designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XNamed
- * @see com.sun.star.lang.XComponent
- * @see com.sun.star.text.XTextContent
- * @see com.sun.star.text.TextContent
- * @see ifc.container._XNamed
- * @see ifc.lang._XComponent
- * 

[Libreoffice-commits] core.git: qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-23 Thread anfanite396 (via logerrit)
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndex.csv |   41 ---
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java|  118 
--
 sw/qa/api/SwXDocumentIndex.cxx   |  102 
+++-
 sw/qa/unoapi/sw_1.sce|1 
 5 files changed, 46 insertions(+), 217 deletions(-)

New commits:
commit bb720ac6aba93256c0ecdd8e50b29e750428ff49
Author: anfanite396 
AuthorDate: Thu Aug 17 18:55:12 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 23 15:30:00 2023 +0200

tdf#45904: Remove old SwXDocumentIndex Java test

Change-Id: Idca41ac1aed35552a749eb62e886c06cec94b3e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155790
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 4fcb8728eb98..52cccbc05110 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1098,7 +1098,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXCell \
 qadevOOo/tests/java/mod/_sw/SwXCellRange \
 qadevOOo/tests/java/mod/_sw/SwXChapterNumbering \
-qadevOOo/tests/java/mod/_sw/SwXDocumentIndex \
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes \
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark \
 qadevOOo/tests/java/mod/_sw/SwXDrawPage \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndex.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndex.csv
deleted file mode 100644
index cd591f1205cc..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXDocumentIndex.csv
+++ /dev/null
@@ -1,41 +0,0 @@
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"Title"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"IsProtected"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleHeading"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel1"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel2#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel3#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel4#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel5#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel6#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel7#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel8#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel9#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleLevel10#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ParaStyleSeparator#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"TextColumns"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"BackGraphic"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"BackGraphicLocation"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"BackColor"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"BackTransparent"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"LevelFormat#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"CreateFromChapter#optional"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"ContentSection"
-"SwXDocumentIndex";"com::sun::star::text::BaseIndex";"HeaderSection"
-"SwXDocumentIndex";"com::sun::star::lang::XComponent";"dispose()"
-"SwXDocumentIndex";"com::sun::star::lang::XComponent";"addEventListener()"
-"SwXDocumentIndex";"com::sun::star::lang::XComponent";"removeEventListener()"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"UseAlphabeticalSeparators#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"UseKeyAsEntry#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"UseCombinedEntries#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"IsCaseSensitive#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"UsePP#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"UseDash#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"UseUpperCase#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"MainEntryCharacterStyleName#optional"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"DocumentIndexMarks"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"Locale"
-"SwXDocumentIndex";"com::sun::star::text::DocumentIndex";"SortAlgorithm"
-"SwXDocumentIndex";"com::sun::star::text::XDocumentIndex";"getServiceName()"
-"SwXDocumentIndex";"com::sun::star::text::XDocumentIndex";"update()"
-"SwXDocumentIndex";"com::sun::star::text::XTextContent";"attach()"
-"SwXDocumentIndex";"com::sun::star::text::XTextContent";"getAnchor()"
diff --git 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/CppunitTest_sw_apitests.mk sw/qa

2023-08-23 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst |1 
 qadevOOo/Jar_OOoRunner.mk |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextTables.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXTextTables.java|  118 --
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXTextTables.cxx   |   97 
 sw/qa/unoapi/sw_4.sce |1 
 7 files changed, 98 insertions(+), 128 deletions(-)

New commits:
commit 2c5dfcf4b076aa8a75423a26b0804d5afc90ff0f
Author: anfanite396 
AuthorDate: Thu Aug 17 22:57:29 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 23 15:27:08 2023 +0200

tdf#45904: Move SwXTextTables Java tests to C++

Change-Id: I3946e68ce5c8a9611c243e427bc94c277c0a5456
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155810
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 0104075a89b8..209b3ad1bcb8 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -177,7 +177,6 @@ job240=sw.SwXTextRanges
 job241=sw.SwXTextSearch
 job242=sw.SwXTextSection
 job244=sw.SwXTextTableRow
-job245=sw.SwXTextTables
 job246=sw.SwXViewSettings
 job247=sw.XMLContentExporter
 job248=sw.XMLExporter
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 4347ae7f24fe..4fcb8728eb98 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1150,7 +1150,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXTextTable \
 qadevOOo/tests/java/mod/_sw/SwXTextTableCursor \
 qadevOOo/tests/java/mod/_sw/SwXTextTableRow \
-qadevOOo/tests/java/mod/_sw/SwXTextTables \
 qadevOOo/tests/java/mod/_sw/SwXTextView \
 qadevOOo/tests/java/mod/_sw/SwXTextViewCursor \
 qadevOOo/tests/java/mod/_sw/SwXViewSettings \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextTables.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextTables.csv
deleted file mode 100644
index 7fb1526deef1..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextTables.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXTextTables";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXTextTables";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXTextTables";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXTextTables";"com::sun::star::container::XIndexAccess";"getCount()"
-"SwXTextTables";"com::sun::star::container::XIndexAccess";"getByIndex()"
-"SwXTextTables";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXTextTables";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTables.java 
b/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
deleted file mode 100644
index 28ad076e4f98..
--- a/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
+++ /dev/null
@@ -1,118 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextTable;
-import com.sun.star.text.XTextTablesSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- *
- * initial description
- * @see com.sun.star.container.XElementAccess
- * @see com.sun.star.container.XIndexAccess
- * @see com.sun.star.container.XNameAccess
- *
- */
-public class SwXTextTables extends TestCase {
-XTextDocument xTextDoc;
-
-@Override
-protected void initialize( TestParameters tParam, PrintWriter log ) throws 
Exception {
-SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
-
-log.println( "creating a textdocument" );
-xTextDoc = SOF.createTextDoc( null );
-}
-
-@Override
-protected void cleanup( TestParameters 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/CppunitTest_sw_apitests.mk sw/qa

2023-08-23 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst   |1 
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextSections.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXTextSections.java|  122 
--
 sw/CppunitTest_sw_apitests.mk   |1 
 sw/qa/api/SwXTextSections.cxx   |  100 
 sw/qa/unoapi/sw_3.sce   |1 
 7 files changed, 101 insertions(+), 132 deletions(-)

New commits:
commit 49c4f0581c7a926f0ab836241f912c70fc9cac75
Author: anfanite396 
AuthorDate: Thu Aug 17 22:04:54 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 23 15:26:51 2023 +0200

tdf#45904: Move SwXTextSections Java tests to C++

Change-Id: I24f7098f71a126790a177715a85fcea2724cb4aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155808
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index c7bf6a1386a3..0104075a89b8 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -176,7 +176,6 @@ job239=sw.SwXTextPortionEnumeration
 job240=sw.SwXTextRanges
 job241=sw.SwXTextSearch
 job242=sw.SwXTextSection
-job243=sw.SwXTextSections
 job244=sw.SwXTextTableRow
 job245=sw.SwXTextTables
 job246=sw.SwXViewSettings
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 3c2e2d780fa1..4347ae7f24fe 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1147,7 +1147,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXTextRanges \
 qadevOOo/tests/java/mod/_sw/SwXTextSearch \
 qadevOOo/tests/java/mod/_sw/SwXTextSection \
-qadevOOo/tests/java/mod/_sw/SwXTextSections \
 qadevOOo/tests/java/mod/_sw/SwXTextTable \
 qadevOOo/tests/java/mod/_sw/SwXTextTableCursor \
 qadevOOo/tests/java/mod/_sw/SwXTextTableRow \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextSections.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextSections.csv
deleted file mode 100644
index 990ae764df98..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextSections.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXTextSections";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXTextSections";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXTextSections";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXTextSections";"com::sun::star::container::XIndexAccess";"getCount()"
-"SwXTextSections";"com::sun::star::container::XIndexAccess";"getByIndex()"
-"SwXTextSections";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXTextSections";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextSections.java 
b/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
deleted file mode 100644
index c00d0cb5ed94..
--- a/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
+++ /dev/null
@@ -1,122 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.container.XNameAccess;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextSectionsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- *
- * initial description
- * @see com.sun.star.text.XText
- *
- */
-public class SwXTextSections extends TestCase {
-XTextDocument xTextDoc;
-
-@Override
-protected void initialize( TestParameters tParam, PrintWriter log ) throws 
Exception {
-SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
-log.println( "creating a textdocument" );
-xTextDoc = SOF.createTextDoc( null );
-   

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/CppunitTest_sw_apitests.mk sw/qa

2023-08-21 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst |1 
 qadevOOo/Jar_OOoRunner.mk |1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldTypes.csv |6 
 qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java|  126 
--
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXTextFieldTypes.cxx   |   85 ++
 sw/qa/unoapi/sw_3.sce |1 
 7 files changed, 86 insertions(+), 135 deletions(-)

New commits:
commit 63464fdf552ce82ec29631f0736edd43c0ba4146
Author: anfanite396 
AuthorDate: Sat Jul 8 08:59:58 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Aug 21 10:35:18 2023 +0200

Move SwXTextFieldTypes Java tests to C++

Change-Id: I77ca9bc6cd0db626df826e2084514d34becf39bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154208
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 0d1d4e10b391..c7bf6a1386a3 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -170,7 +170,6 @@ job232=sw.SwXTextDefaults
 job233=sw.SwXTextEmbeddedObjects
 job234=sw.SwXTextField
 job235=sw.SwXTextFieldMasters
-job236=sw.SwXTextFieldTypes
 job237=sw.SwXTextFrameText
 job238=sw.SwXTextGraphicObjects
 job239=sw.SwXTextPortionEnumeration
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 0ba2007cb2d5..3c2e2d780fa1 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1137,7 +1137,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects \
 qadevOOo/tests/java/mod/_sw/SwXTextField \
 qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters \
-qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes \
 qadevOOo/tests/java/mod/_sw/SwXTextFrame \
 qadevOOo/tests/java/mod/_sw/SwXTextFrameText \
 qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldTypes.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldTypes.csv
deleted file mode 100644
index 7a466b54f492..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextFieldTypes.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-"SwXTextFieldTypes";"com::sun::star::util::XRefreshable";"refresh()"
-"SwXTextFieldTypes";"com::sun::star::util::XRefreshable";"addRefreshListener()"
-"SwXTextFieldTypes";"com::sun::star::util::XRefreshable";"removeRefreshListener()"
-"SwXTextFieldTypes";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXTextFieldTypes";"com::sun::star::container::XElementAccess";"hasElements()"
-"SwXTextFieldTypes";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java 
b/qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java
deleted file mode 100644
index 03cb9721e750..
--- a/qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java
+++ /dev/null
@@ -1,126 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextFieldsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- *
- * initial description
- * @see com.sun.star.container.XContainer
- * @see com.sun.star.container.XElementAccess
- * @see com.sun.star.container.XEnumerationAccess
- *
- */
-public class SwXTextFieldTypes extends TestCase {
-
-XTextDocument xTextDoc;
-
-/**
- * in general this method creates a testdocument
- *
- *  @param tParamclass which contains additional test parameters
- *  @param logclass to log the test state and result
- *
- *
- *  @see TestParameters
- *@see PrintWriter
- *
- */
-@Override
-protected void 

[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sw/qa

2023-08-21 Thread anfanite396 (via logerrit)
 framework/qa/complex/api_internal/api.lst|1 
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmarks.csv |7 
 qadevOOo/tests/java/mod/_sw/SwXBookmarks.java|  101 ---
 sw/qa/unoapi/sw_1.sce|1 
 5 files changed, 111 deletions(-)

New commits:
commit d71d61326f4ed87151bb4cee1185561f3ae49204
Author: anfanite396 
AuthorDate: Wed Aug 16 21:57:21 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Aug 21 10:34:46 2023 +0200

tdf#45904: Remove old SwXBookmarks Java test

Change-Id: Ie8d66b74192d1741922a7728934317859821fa00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155745
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 096e10dc81cb..0d1d4e10b391 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -140,7 +140,6 @@ job201=sw.SwAccessibleTextFrameView
 job202=sw.SwAccessibleTextGraphicObject
 job203=sw.SwXBodyText
 job204=sw.SwXBookmark
-job205=sw.SwXBookmarks
 job206=sw.SwXCell
 job207=sw.SwXDocumentIndexes
 job208=sw.SwXDocumentIndexMark
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 60e1df69111b..0ba2007cb2d5 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -1095,7 +1095,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup \
 qadevOOo/tests/java/mod/_sw/SwXBodyText \
 qadevOOo/tests/java/mod/_sw/SwXBookmark \
-qadevOOo/tests/java/mod/_sw/SwXBookmarks \
 qadevOOo/tests/java/mod/_sw/SwXCell \
 qadevOOo/tests/java/mod/_sw/SwXCellRange \
 qadevOOo/tests/java/mod/_sw/SwXChapterNumbering \
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmarks.csv 
b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmarks.csv
deleted file mode 100644
index 49db753ce896..
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXBookmarks.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"SwXBookmarks";"com::sun::star::container::XNameAccess";"getByName()"
-"SwXBookmarks";"com::sun::star::container::XNameAccess";"getElementNames()"
-"SwXBookmarks";"com::sun::star::container::XNameAccess";"hasByName()"
-"SwXBookmarks";"com::sun::star::container::XIndexAccess";"getCount()"
-"SwXBookmarks";"com::sun::star::container::XIndexAccess";"getByIndex()"
-"SwXBookmarks";"com::sun::star::container::XElementAccess";"getElementType()"
-"SwXBookmarks";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java 
b/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java
deleted file mode 100644
index 3c830212e7cc..
--- a/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java
+++ /dev/null
@@ -1,101 +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 mod._sw;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.container.XNameAccess;
-import com.sun.star.text.XBookmarksSupplier;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- * Test for object which is represented by service
- * com.sun.star.text.Bookmarks. 
- * Object implements the following interfaces :
- * 
- *   com::sun::star::container::XNameAccess
- *   com::sun::star::container::XElementAccess
- *  
- * This object test  is NOT  designed to be run in several
- * threads concurrently.
- * @see com.sun.star.container.XNameAccess
- * @see com.sun.star.container.XElementAccess
- * @see ifc.container._XNameAccess
- * @see ifc.container._XElementAccess
- */
-public class SwXBookmarks extends TestCase {
-XTextDocument xTextDoc;
-SOfficeFactory SOF;
-
-/**
-* Creates text document.
-*/
-@Override
-protected void initialize( TestParameters tParam, PrintWriter log ) throws 
Exception {
-

[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-08-14 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk  |1 
 sw/qa/api/SwXTableCellText.cxx |  103 +
 2 files changed, 104 insertions(+)

New commits:
commit b9e72b2577da2a0a61e95ff8a0a7f289f194c59b
Author: anfanite396 
AuthorDate: Thu Jul 6 11:18:21 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Aug 14 21:06:56 2023 +0200

Move SwXTableCellText Java tests to C++

Change-Id: Iea2113030bb82ee02bd84140f5def7040b4f4fcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154087
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index fb500fa990c5..93bc9453113e 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -37,6 +37,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXReferenceMark \
 sw/qa/api/SwXStyleFamilies \
 sw/qa/api/SwXReferenceMarks \
+sw/qa/api/SwXTableCellText \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
diff --git a/sw/qa/api/SwXTableCellText.cxx b/sw/qa/api/SwXTableCellText.cxx
new file mode 100644
index ..733ba36415fd
--- /dev/null
+++ b/sw/qa/api/SwXTableCellText.cxx
@@ -0,0 +1,103 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXTableCellText.
+ */
+class SwXTableCellText final : public UnoApiTest,
+   public apitest::XEnumerationAccess,
+   public apitest::XElementAccess,
+   public apitest::XSimpleText,
+   public apitest::XTextRange,
+   public apitest::XText
+{
+public:
+SwXTableCellText()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType::get())
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+Reference 
xTable(xMSF->createInstance("com.sun.star.text.TextTable"),
+   UNO_QUERY_THROW);
+xText->insertTextContent(xCursor, xTable, false);
+
+Reference xCell = xTable->getCellByName("A1");
+Reference xCellText(xCell, UNO_QUERY_THROW);
+xCellText->setString("SwXTableCellText");
+
+mxTextContent = Reference(
+xMSF->createInstance("com.sun.star.text.TextTable"), 
UNO_QUERY_THROW);
+
+return Reference(xCellText->getText(), UNO_QUERY_THROW);
+}
+
+Reference getTextContent() override { return 
mxTextContent; };
+
+CPPUNIT_TEST_SUITE(SwXTableCellText);
+CPPUNIT_TEST(testCreateEnumeration);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testCreateTextCursor);
+CPPUNIT_TEST(testCreateTextCursorByRange);
+CPPUNIT_TEST(testInsertString);
+CPPUNIT_TEST(testInsertControlCharacter);
+CPPUNIT_TEST(testGetEnd);
+CPPUNIT_TEST(testGetSetString);
+CPPUNIT_TEST(testGetStart);
+CPPUNIT_TEST(testGetText);
+CPPUNIT_TEST(testInsertRemoveTextContent);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference mxTextContent;
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXTableCellText);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-08-14 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk   |1 
 sw/qa/api/SwXReferenceMarks.cxx |  120 
 2 files changed, 121 insertions(+)

New commits:
commit 88fe6dc44919b0a525e06bf0ac6e628b0f6c8a28
Author: anfanite396 
AuthorDate: Thu Jul 6 11:06:42 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Aug 14 21:06:38 2023 +0200

Move SwXReferenceMarks Java tests to C++

Change-Id: I3d825590e60190cf95f514b5df606a83ea4193b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154086
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index ef7799763231..fb500fa990c5 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -36,6 +36,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXParagraphEnumeration \
 sw/qa/api/SwXReferenceMark \
 sw/qa/api/SwXStyleFamilies \
+sw/qa/api/SwXReferenceMarks \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
diff --git a/sw/qa/api/SwXReferenceMarks.cxx b/sw/qa/api/SwXReferenceMarks.cxx
new file mode 100644
index ..699647f3e5e6
--- /dev/null
+++ b/sw/qa/api/SwXReferenceMarks.cxx
@@ -0,0 +1,120 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXReferenceMark.
+ */
+class SwXReferenceMark final : public test::BootstrapFixture,
+   public unotest::MacrosTest,
+   public apitest::XElementAccess,
+   public apitest::XIndexAccess,
+   public apitest::XNameAccess
+{
+public:
+SwXReferenceMark();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+
+CPPUNIT_TEST_SUITE(SwXReferenceMark);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetByName);
+CPPUNIT_TEST(testGetElementNames);
+CPPUNIT_TEST(testHasByName);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference mxTextDocument;
+};
+
+SwXReferenceMark::SwXReferenceMark()
+: XElementAccess(cppu::UnoType::get())
+, XIndexAccess(2)
+, XNameAccess("SwXReferenceMark2")
+{
+}
+
+void SwXReferenceMark::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxTextDocument = Reference(
+loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"),
+uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT(mxTextDocument.is());
+}
+
+void SwXReferenceMark::tearDown()
+{
+if (mxTextDocument.is())
+mxTextDocument->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXReferenceMark::init()
+{
+Reference xMSF(mxTextDocument, 
UNO_QUERY_THROW);
+
+Reference xText = mxTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+//RefMark 1
+Reference xRefMark1 = 
xMSF->createInstance("com.sun.star.text.ReferenceMark");
+Reference xNamed1(xRefMark1, UNO_QUERY_THROW);
+xNamed1->setName("SwXReferenceMark1");
+
+Reference xTextContent1(xRefMark1, UNO_QUERY_THROW);
+xText->insertTextContent(xCursor, xTextContent1, false);
+
+//RefMark 2
+Reference xRefMark2 = 
xMSF->createInstance("com.sun.star.text.ReferenceMark");
+Reference xNamed2(xRefMark2, UNO_QUERY_THROW);
+xNamed2->setName("SwXReferenceMark2");
+
+Reference xTextContent2(xRefMark2, UNO_QUERY_THROW);
+xText->insertTextContent(xCursor, xTextContent2, false);
+
+// Getting ReferenceMarks from Text Document
+Reference xRefMarkSupp(mxTextDocument, 
UNO_QUERY_THROW);
+
+return Reference(xRefMarkSupp->getReferenceMarks(), 
UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXReferenceMark);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-18 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk  |1 
 sw/qa/api/SwXReferenceMark.cxx |   97 +
 2 files changed, 98 insertions(+)

New commits:
commit 9b7df92ba0cc911f956bf159d106aa001c30de52
Author: anfanite396 
AuthorDate: Thu Jul 6 11:01:38 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 19 03:03:37 2023 +0200

Move SwXReferenceMark Java tests to C++

Change-Id: I95777931fd039b22983218d7472c3f7037e6c62d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154085
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 0e3f265b1d19..ef7799763231 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -34,6 +34,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXHeadFootText \
 sw/qa/api/SwXNumberingRules \
 sw/qa/api/SwXParagraphEnumeration \
+sw/qa/api/SwXReferenceMark \
 sw/qa/api/SwXStyleFamilies \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
diff --git a/sw/qa/api/SwXReferenceMark.cxx b/sw/qa/api/SwXReferenceMark.cxx
new file mode 100644
index ..bf7b14dc8090
--- /dev/null
+++ b/sw/qa/api/SwXReferenceMark.cxx
@@ -0,0 +1,97 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXReferenceMark.
+ */
+class SwXReferenceMark final : public UnoApiTest,
+   public apitest::XComponent,
+   public apitest::XTextContent,
+   public apitest::XNamed
+
+{
+public:
+SwXReferenceMark()
+: UnoApiTest("")
+, XNamed("SwXReferenceMark")
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+Reference xRefMark = 
xMSF->createInstance("com.sun.star.text.ReferenceMark");
+Reference xNamed(xRefMark, UNO_QUERY_THROW);
+xNamed->setName("SwXReferenceMark");
+
+Reference xTextContent(xRefMark, UNO_QUERY_THROW);
+xText->insertTextContent(xCursor, xTextContent, false);
+
+mxTextRange = Reference(xCursor, 
uno::UNO_QUERY_THROW);
+mxTextContent = Reference(
+xMSF->createInstance("com.sun.star.text.ReferenceMark"), 
UNO_QUERY_THROW);
+
+return xRefMark;
+}
+
+Reference getTextRange() override { return mxTextRange; 
};
+Reference getTextContent() override { return 
mxTextContent; };
+bool isAttachSupported() override { return true; }
+void triggerDesktopTerminate() override { mxDesktop->terminate(); };
+
+CPPUNIT_TEST_SUITE(SwXReferenceMark);
+CPPUNIT_TEST(testAttach);
+CPPUNIT_TEST(testGetAnchor);
+CPPUNIT_TEST(testDispose);
+CPPUNIT_TEST(testAddEventListener);
+CPPUNIT_TEST(testRemoveEventListener);
+CPPUNIT_TEST(testGetName);
+CPPUNIT_TEST(testSetName);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference mxTextRange;
+Reference mxTextContent;
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXReferenceMark);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-18 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXParagraphEnumeration.cxx |   96 ++
 2 files changed, 97 insertions(+)

New commits:
commit 08a322995cd54038c9d210f5016f57b1fe9e738a
Author: anfanite396 
AuthorDate: Thu Jul 6 10:47:22 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 19 03:03:08 2023 +0200

Move SwXParagraphEnumeration Java tests to C++

Change-Id: I8315d52e75ddbe3b4f844fcb645f857da3d12acb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154084
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 659b582b49c0..0e3f265b1d19 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -33,6 +33,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXFootnotes \
 sw/qa/api/SwXHeadFootText \
 sw/qa/api/SwXNumberingRules \
+sw/qa/api/SwXParagraphEnumeration \
 sw/qa/api/SwXStyleFamilies \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
diff --git a/sw/qa/api/SwXParagraphEnumeration.cxx 
b/sw/qa/api/SwXParagraphEnumeration.cxx
new file mode 100644
index ..7e7ddd6d188a
--- /dev/null
+++ b/sw/qa/api/SwXParagraphEnumeration.cxx
@@ -0,0 +1,96 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXParagraphEnumeration.
+ */
+class SwXParagraphEnumeration final : public UnoApiTest, public 
apitest::XEnumeration
+{
+public:
+SwXParagraphEnumeration()
+: UnoApiTest("")
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+for (int i = 0; i < 5; i++)
+{
+try
+{
+xText->insertString(xCursor, "The quick brown fox jumps over 
the lazy dog", false);
+xText->insertControlCharacter(xCursor, 
text::ControlCharacter::LINE_BREAK, false);
+xText->insertString(xCursor, "THE QUICK BROWN FOX JUMPS OVER 
THE LAZY DOG", false);
+xText->insertControlCharacter(xCursor, 
text::ControlCharacter::LINE_BREAK, false);
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+
+try
+{
+xText->insertControlCharacter(xCursor, 
text::ControlCharacter::PARAGRAPH_BREAK,
+  false);
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+}
+
+Reference xEnumAccess(xText, 
UNO_QUERY_THROW);
+Reference xEnum = 
xEnumAccess->createEnumeration();
+
+return Reference(xEnum, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXParagraphEnumeration);
+CPPUNIT_TEST(testHasMoreElements);
+CPPUNIT_TEST(testNextElement);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXParagraphEnumeration);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: 3 commits - sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-13 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |3 
 sw/qa/api/SwXFieldEnumeration.cxx |  109 ++
 sw/qa/api/SwXFrames.cxx   |   90 +
 sw/qa/api/SwXNumberingRules.cxx   |  134 ++
 4 files changed, 336 insertions(+)

New commits:
commit 73367f09716f5709264885486a2bb03626d39884
Author: anfanite396 
AuthorDate: Tue Jul 11 21:05:30 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 14 03:13:35 2023 +0200

Move SwXNumberingRules Java tests to C++

Change-Id: I3f5b1b6ce5ed475ef923f2c605c6ada7d29e0439
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154336
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index e0af4cb0b29d..659b582b49c0 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -32,6 +32,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXFootnoteText \
 sw/qa/api/SwXFootnotes \
 sw/qa/api/SwXHeadFootText \
+sw/qa/api/SwXNumberingRules \
 sw/qa/api/SwXStyleFamilies \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
diff --git a/sw/qa/api/SwXNumberingRules.cxx b/sw/qa/api/SwXNumberingRules.cxx
new file mode 100644
index ..74febc1c027a
--- /dev/null
+++ b/sw/qa/api/SwXNumberingRules.cxx
@@ -0,0 +1,134 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXNumberingRules.
+ */
+class SwXNumberingRules final : public UnoApiTest,
+public apitest::XElementAccess,
+public apitest::XIndexAccess,
+public apitest::XPropertySet
+{
+public:
+SwXNumberingRules()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType>::get())
+, XIndexAccess(10)
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xIndexAccess;
+Reference xNumRules;
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+try
+{
+xText->insertString(xCursor, "The quick brown fox jumps over the 
lazy dog", false);
+xText->insertControlCharacter(xCursor, 
text::ControlCharacter::PARAGRAPH_BREAK, false);
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+
+Reference xStyleFam(xTextDocument, 
UNO_QUERY_THROW);
+
+try
+{
+Reference xStyleFamNames = 
xStyleFam->getStyleFamilies();
+Reference xNumStyles(
+xStyleFamNames->getByName("NumberingStyles"), UNO_QUERY_THROW);
+xIndexAccess = Reference(xNumStyles, 
UNO_QUERY_THROW);
+}
+catch (lang::WrappedTargetException&)
+{
+}
+catch (container::NoSuchElementException&)
+{
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+
+try
+{
+Reference 
xPropSet(xIndexAccess->getByIndex(0), UNO_QUERY_THROW);
+xNumRules = Reference(
+xPropSet->getPropertyValue("NumberingRules"), UNO_QUERY_THROW);
+}
+catch (lang::WrappedTargetException&)
+{
+}
+catch (lang::IndexOutOfBoundsException&)
+{
+}
+catch (beans::UnknownPropertyException&)
+{
+}
+catch (lang::IllegalArgumentException&)
+{
+}
+
+return Reference(xNumRules, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXNumberingRules);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetPropertySetInfo);
+CPPUNIT_TEST(testSetPropertyValue);
+CPPUNIT_TEST(testGetPropertyValue);
+CPPUNIT_TEST(testPropertyChangeListener);
+CPPUNIT_TEST(testVetoableChangeListener);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXNumberingRules);
+}
+
+/* vim:set shiftwidth=4 

[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-13 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk|1 
 sw/qa/api/SwXDocumentIndexes.cxx |   84 +++
 2 files changed, 85 insertions(+)

New commits:
commit 0fa8010a07c6e6fd7d3506087a417bf84e948e16
Author: anfanite396 
AuthorDate: Tue Jul 11 15:55:49 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 14 03:13:03 2023 +0200

Move SwXDocumentIndexes Java tests to C++

Change-Id: Ib764152762e55ba56df765f425b0f9254113c280
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154297
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index cc2cede24ad4..c1d323dc5df1 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -22,6 +22,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXBookmarks \
 sw/qa/api/SwXChapterNumbering \
 sw/qa/api/SwXDocumentIndex \
+sw/qa/api/SwXDocumentIndexes \
 sw/qa/api/SwXDocumentIndexMark \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnote \
diff --git a/sw/qa/api/SwXDocumentIndexes.cxx b/sw/qa/api/SwXDocumentIndexes.cxx
new file mode 100644
index ..91be0e5c8448
--- /dev/null
+++ b/sw/qa/api/SwXDocumentIndexes.cxx
@@ -0,0 +1,84 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXDocumentIndexes.
+ */
+class SwXDocumentIndexes final : public UnoApiTest,
+ public apitest::XElementAccess,
+ public apitest::XIndexAccess,
+ public apitest::XNameAccess
+{
+public:
+SwXDocumentIndexes()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType::get())
+, XIndexAccess(1)
+, XNameAccess("Table of Contents1")
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+Reference xTextContent(
+xMSF->createInstance("com.sun.star.text.ContentIndex"), 
UNO_QUERY_THROW);
+
+xText->insertTextContent(xCursor, xTextContent, false);
+Reference xDocIndSupp(xTextDocument, 
UNO_QUERY_THROW);
+
+return Reference(xDocIndSupp->getDocumentIndexes(), 
UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXDocumentIndexes);
+CPPUNIT_TEST(testGetByName);
+CPPUNIT_TEST(testGetElementNames);
+CPPUNIT_TEST(testHasByName);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXDocumentIndexes);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-12 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk  |1 
 sw/qa/api/SwXStyleFamilies.cxx |   84 +
 2 files changed, 85 insertions(+)

New commits:
commit 23e25ed6c053a1bca6733c3ab05daca9ba28727e
Author: anfanite396 
AuthorDate: Wed Jul 12 13:56:05 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 12 16:31:38 2023 +0200

Move SwXStyleFamilies Java tests to C++

Change-Id: I1a399f33e71d05506b86b66c5ac15a9fe1106cba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154347
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 871f7fbe1c50..cc2cede24ad4 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -29,6 +29,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXFootnoteText \
 sw/qa/api/SwXFootnotes \
 sw/qa/api/SwXHeadFootText \
+sw/qa/api/SwXStyleFamilies \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
diff --git a/sw/qa/api/SwXStyleFamilies.cxx b/sw/qa/api/SwXStyleFamilies.cxx
new file mode 100644
index ..52b0ac95f61e
--- /dev/null
+++ b/sw/qa/api/SwXStyleFamilies.cxx
@@ -0,0 +1,84 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXStyleFamilies.
+ */
+class SwXStyleFamilies final : public UnoApiTest,
+   public apitest::XElementAccess,
+   public apitest::XIndexAccess,
+   public apitest::XNameAccess
+
+{
+public:
+SwXStyleFamilies()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType::get())
+, XIndexAccess(7)
+, XNameAccess("CharacterStyles")
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xStyleFamSupp(xTextDocument, 
UNO_QUERY_THROW);
+Reference xSF = 
xStyleFamSupp->getStyleFamilies();
+
+// Sequence aNames = xSF->getElementNames();
+// std::cout << aNames[0] << std::endl;
+
+return Reference(xSF, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXStyleFamilies);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetByName);
+CPPUNIT_TEST(testGetElementNames);
+CPPUNIT_TEST(testHasByName);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXStyleFamilies);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-12 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXChapterNumbering.cxx |   87 ++
 2 files changed, 88 insertions(+)

New commits:
commit c6397c905ac2ef9cd0eea488aa0da814b36f08fe
Author: anfanite396 
AuthorDate: Mon Jul 10 21:00:38 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 12 16:30:13 2023 +0200

Move SwXChapterNumbering Java tests to C++

Change-Id: I891f74f73b18cd0ccc3b45e455913da292e558a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154275
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 34a44a706fc2..871f7fbe1c50 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -20,6 +20,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXBodyText \
 sw/qa/api/SwXBookmark \
 sw/qa/api/SwXBookmarks \
+sw/qa/api/SwXChapterNumbering \
 sw/qa/api/SwXDocumentIndex \
 sw/qa/api/SwXDocumentIndexMark \
 sw/qa/api/SwXDocumentSettings \
diff --git a/sw/qa/api/SwXChapterNumbering.cxx 
b/sw/qa/api/SwXChapterNumbering.cxx
new file mode 100644
index ..b8985e0ec92b
--- /dev/null
+++ b/sw/qa/api/SwXChapterNumbering.cxx
@@ -0,0 +1,87 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXChapterNumbering.
+ */
+class SwXChapterNumbering final : public UnoApiTest,
+  public apitest::XPropertySet,
+  public apitest::XElementAccess,
+  public apitest::XIndexAccess
+{
+public:
+SwXChapterNumbering()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType>::get())
+, XIndexAccess(10)
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xCNSupplier(xTextDocument, 
UNO_QUERY_THROW);
+Reference 
xCNRules(xCNSupplier->getChapterNumberingRules(),
+UNO_QUERY_THROW);
+
+try
+{
+Reference 
xIndexReplace(xCNRules->getByIndex(1),
+  UNO_QUERY_THROW);
+}
+catch (Exception&)
+{
+}
+return Reference(xCNRules, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXChapterNumbering);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetPropertySetInfo);
+CPPUNIT_TEST(testSetPropertyValue);
+CPPUNIT_TEST(testGetPropertyValue);
+CPPUNIT_TEST(testPropertyChangeListener);
+CPPUNIT_TEST(testVetoableChangeListener);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXChapterNumbering);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-10 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk  |1 
 sw/qa/api/SwXDocumentIndexMark.cxx |  107 +
 2 files changed, 108 insertions(+)

New commits:
commit a389e6bd7aacfa4e1ff1ea3a46199fb381d1131f
Author: anfanite396 
AuthorDate: Sat Jun 24 21:12:30 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 10 14:33:41 2023 +0200

Move SwXDocumentIndexMark Java tests to C++

Change-Id: I3aa19a10af87a6a41c9538dd6d743a8656a3a0b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153557
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 4ef0a90bae61..34a44a706fc2 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -21,6 +21,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXBookmark \
 sw/qa/api/SwXBookmarks \
 sw/qa/api/SwXDocumentIndex \
+sw/qa/api/SwXDocumentIndexMark \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnote \
 sw/qa/api/SwXFootnoteProperties \
diff --git a/sw/qa/api/SwXDocumentIndexMark.cxx 
b/sw/qa/api/SwXDocumentIndexMark.cxx
new file mode 100644
index ..2afa1aab1f85
--- /dev/null
+++ b/sw/qa/api/SwXDocumentIndexMark.cxx
@@ -0,0 +1,107 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXDocumentIndexMark.
+ */
+class SwXDocumentIndexMark final : public test::BootstrapFixture,
+   public unotest::MacrosTest,
+   public apitest::XComponent,
+   public apitest::XTextContent
+{
+public:
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+uno::Reference getTextRange() override;
+uno::Reference getTextContent() override;
+bool isAttachSupported() override { return true; }
+uno::Reference getTextDocument() { return 
mxTextDocument; }
+void triggerDesktopTerminate() override { mxDesktop->terminate(); }
+
+CPPUNIT_TEST_SUITE(SwXDocumentIndexMark);
+CPPUNIT_TEST(testDispose);
+CPPUNIT_TEST(testAddEventListener);
+CPPUNIT_TEST(testRemoveEventListener);
+CPPUNIT_TEST(testAttach);
+CPPUNIT_TEST(testGetAnchor);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+uno::Reference mxTextDocument;
+uno::Reference mxTextRange;
+uno::Reference mxTextContent;
+};
+
+void SwXDocumentIndexMark::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxTextDocument = uno::Reference(
+loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"),
+uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT(mxTextDocument.is());
+}
+
+void SwXDocumentIndexMark::tearDown()
+{
+if (mxTextDocument.is())
+mxTextDocument->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXDocumentIndexMark::init()
+{
+Reference xMSF(mxTextDocument, 
UNO_QUERY_THROW);
+
+Reference xText = getTextDocument()->getText();
+Reference xCursor = xText->createTextCursor();
+
+Reference xDIM(
+xMSF->createInstance("com.sun.star.text.DocumentIndexMark"), 
UNO_QUERY_THROW);
+
+mxTextRange = uno::Reference(xCursor, 
uno::UNO_QUERY_THROW);
+mxTextContent = uno::Reference(
+xMSF->createInstance("com.sun.star.text.DocumentIndex"), 
uno::UNO_QUERY_THROW);
+xText->insertTextContent(xCursor, xDIM, false);
+
+return Reference(xDIM, UNO_QUERY_THROW);
+}
+
+uno::Reference SwXDocumentIndexMark::getTextRange() { return 
mxTextRange; }
+
+uno::Reference SwXDocumentIndexMark::getTextContent() { 
return mxTextContent; }
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXDocumentIndexMark);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: 2 commits - sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-10 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk  |2 
 sw/qa/api/SwXAutoTextContainer.cxx |   75 
 sw/qa/api/SwXBookmarks.cxx |   85 +
 3 files changed, 162 insertions(+)

New commits:
commit bcbfdd2fe4d61ea619689a9754e018c691bf6ef7
Author: anfanite396 
AuthorDate: Sun Jul 9 21:35:33 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 10 14:33:08 2023 +0200

Move SwXBookmarks Java tests to C++

Change-Id: Ia640c59c97889c27f1c7b3ecf3b2630ac1d5e1f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154231
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index b750e3d81d56..4ef0a90bae61 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -19,6 +19,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXAutoTextContainer \
 sw/qa/api/SwXBodyText \
 sw/qa/api/SwXBookmark \
+sw/qa/api/SwXBookmarks \
 sw/qa/api/SwXDocumentIndex \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnote \
diff --git a/sw/qa/api/SwXBookmarks.cxx b/sw/qa/api/SwXBookmarks.cxx
new file mode 100644
index ..34babbbd3ce8
--- /dev/null
+++ b/sw/qa/api/SwXBookmarks.cxx
@@ -0,0 +1,85 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXBookmarks.
+ */
+class SwXBookmarks final : public UnoApiTest,
+   public apitest::XElementAccess,
+   public apitest::XIndexAccess,
+   public apitest::XNameAccess
+{
+public:
+SwXBookmarks()
+: UnoApiTest("")
+, XElementAccess(cppu::UnoType::get())
+, XIndexAccess(1)
+, XNameAccess("Bookmark")
+{
+}
+
+virtual void setUp() override
+{
+UnoApiTest::setUp();
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxComponent = loadFromDesktop("private:factory/swriter");
+CPPUNIT_ASSERT(mxComponent.is());
+}
+
+Reference init() override
+{
+Reference xTextDocument(mxComponent, 
UNO_QUERY_THROW);
+Reference xMSF(mxComponent, 
UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+Reference 
xBookmark(xMSF->createInstance("com.sun.star.text.Bookmark"),
+UNO_QUERY_THROW);
+xText->insertTextContent(xCursor, xBookmark, false);
+
+Reference xSupplier(xTextDocument, 
UNO_QUERY_THROW);
+Reference xNameAccess = 
xSupplier->getBookmarks();
+
+return Reference(xNameAccess, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE(SwXBookmarks);
+CPPUNIT_TEST(testGetByName);
+CPPUNIT_TEST(testGetElementNames);
+CPPUNIT_TEST(testHasByName);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXBookmarks);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 74d286e269b727ae6731b426ec4d12dbfbc0212e
Author: anfanite396 
AuthorDate: Sun Jul 9 12:53:46 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 10 14:32:55 2023 +0200

Move SwXAutoTextContainer Java tests to C++

Change-Id: Ib785d9c1d143f0f51247ae73f01d9ee6d3806947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154230
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index b37b8cf0af7d..b750e3d81d56 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -16,6 +16,7 @@ $(eval $(call 
gb_CppunitTest_use_external,sw_apitests,boost_headers))
 $(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_apitests))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_apitests, \
+sw/qa/api/SwXAutoTextContainer \
 sw/qa/api/SwXBodyText \
 sw/qa/api/SwXBookmark \
 sw/qa/api/SwXDocumentIndex \
diff --git a/sw/qa/api/SwXAutoTextContainer.cxx 
b/sw/qa/api/SwXAutoTextContainer.cxx
new file mode 100644
index ..838aa5e2adbe
--- /dev/null
+++ b/sw/qa/api/SwXAutoTextContainer.cxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice 

[Libreoffice-commits] core.git: sc/source

2023-07-06 Thread anfanite396 (via logerrit)
 sc/source/ui/inc/output.hxx   |5 +
 sc/source/ui/view/output2.cxx |  106 +-
 2 files changed, 89 insertions(+), 22 deletions(-)

New commits:
commit 1d2380516ac9871743c5a5455f0734d02be8eade
Author: anfanite396 
AuthorDate: Thu Apr 20 20:33:56 2023 +0530
Commit: Hossein 
CommitDate: Thu Jul 6 11:18:38 2023 +0200

tdf#129847 Show "more content" red arrow along with ### indication

Change-Id: Ia753772d5db34094d7d201c1ed72663b2022b1a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150703
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index c70058785a8b..4694e1672556 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -30,6 +30,8 @@
 #include 
 #include 
 
+struct ScCellInfo;
+
 namespace sc {
 class SpellCheckContext;
 }
@@ -278,6 +280,9 @@ private:
 
 std::unique_ptr CreateOutputEditEngine();
 
+void SetClipMarks( OutputAreaParam , ScCellInfo* pClipMarkCell,
+   SvxCellHorJustify eOutHorJust, bool bHasHashText, 
tools::Long nLayoutSign );
+
 void ShowClipMarks( DrawEditParam& rParam, tools::Long nEngineWidth, const 
Size& aCellSize,
 bool bMerged, OutputAreaParam& aAreaParam, bool bTop );
 
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 77518ce05bf7..2e80e8e4bbbc 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -150,7 +150,7 @@ public:
 
 bool SetText( const ScRefCellValue& rCell );   // TRUE -> drop pOldPattern
 voidSetHashText();
-void SetTextToWidthOrHash( ScRefCellValue& rCell, tools::Long nWidth );
+bool SetTextToWidthOrHash( ScRefCellValue& rCell, tools::Long nWidth );
 voidSetAutoText( const OUString& rAutoText );
 
 SvxCellOrientation  GetOrient() const{ return eAttrOrient; }
@@ -599,7 +599,7 @@ void ScDrawStringsVars::RepeatToFill( tools::Long nColWidth 
)
 TextChanged();
 }
 
-void ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, 
tools::Long nWidth )
+bool ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, 
tools::Long nWidth )
 {
 // #i113045# do the single-character width calculations in logic units
 if (bPixelToLogic)
@@ -608,7 +608,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( 
ScRefCellValue& rCell, tools::Long
 CellType eType = rCell.getType();
 if (eType != CELLTYPE_VALUE && eType != CELLTYPE_FORMULA)
 // must be a value or formula cell.
-return;
+return false;
 
 if (eType == CELLTYPE_FORMULA)
 {
@@ -616,11 +616,11 @@ void ScDrawStringsVars::SetTextToWidthOrHash( 
ScRefCellValue& rCell, tools::Long
 if (pFCell->GetErrCode() != FormulaError::NONE || 
pOutput->mbShowFormulas)
 {
 SetHashText();  // If the error string doesn't fit, always use 
"###". Also for "display formulas" (#i116691#)
-return;
+return true;
 }
 // If it's formula, the result must be a value.
 if (!pFCell->IsValue())
-return;
+return false;
 }
 
 sal_uLong nFormat = GetResultValueFormat();
@@ -628,18 +628,18 @@ void ScDrawStringsVars::SetTextToWidthOrHash( 
ScRefCellValue& rCell, tools::Long
 {
 // Not 'General' number format.  Set hash text and bail out.
 SetHashText();
-return;
+return true;
 }
 
 double fVal = rCell.getValue();
 
 const SvNumberformat* pNumFormat = 
pOutput->mpDoc->GetFormatTable()->GetEntry(nFormat);
 if (!pNumFormat)
-return;
+return false;
 
 tools::Long nMaxDigit = GetMaxDigitWidth();
 if (!nMaxDigit)
-return;
+return false;
 
 sal_uInt16 nNumDigits = static_cast(nWidth / nMaxDigit);
 {
@@ -648,7 +648,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( 
ScRefCellValue& rCell, tools::Long
 {
 aString = sTempOut;
 // Failed to get output string.  Bail out.
-return;
+return false;
 }
 aString = sTempOut;
 }
@@ -687,7 +687,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( 
ScRefCellValue& rCell, tools::Long
 {
 aString = sTempOut;
 // Failed to get output string.  Bail out.
-return;
+return false;
 }
 aString = sTempOut;
 }
@@ -697,11 +697,12 @@ void ScDrawStringsVars::SetTextToWidthOrHash( 
ScRefCellValue& rCell, tools::Long
 {
 // Even after the decimal adjustment the text doesn't fit.  Give up.
 SetHashText();
-return;
+return true;
 }
 
 TextChanged();
 maLastCell.clear();   // #i113022# equal cell and format in another column 
may give different string
+return false;
 }
 
 void ScDrawStringsVars::SetAutoText( const OUString& rAutoText )
@@ -1876,11 +1877,41 

[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-05 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXFootnote.cxx |  123 ++
 2 files changed, 124 insertions(+)

New commits:
commit 03ba4196865bd445208f39f31475ea82b39b9e17
Author: anfanite396 
AuthorDate: Mon Jun 26 16:55:48 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Jul 5 10:44:18 2023 +0200

Move SwXFootnote Java tests to C++

Change-Id: Id78be9ba0f42a7fcc4685b188de40dcfb4ccdbf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153589
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 67aaf351ec39..b37b8cf0af7d 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -20,6 +20,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXBookmark \
 sw/qa/api/SwXDocumentIndex \
 sw/qa/api/SwXDocumentSettings \
+sw/qa/api/SwXFootnote \
 sw/qa/api/SwXFootnoteProperties \
 sw/qa/api/SwXFootnoteText \
 sw/qa/api/SwXFootnotes \
diff --git a/sw/qa/api/SwXFootnote.cxx b/sw/qa/api/SwXFootnote.cxx
new file mode 100644
index ..24e7db3844ce
--- /dev/null
+++ b/sw/qa/api/SwXFootnote.cxx
@@ -0,0 +1,123 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXFootnote.
+ */
+class SwXFootnote final : public test::BootstrapFixture,
+  public unotest::MacrosTest,
+  public apitest::XComponent,
+  public apitest::XSimpleText,
+  public apitest::XTextRange,
+  public apitest::XTextContent,
+  public apitest::XText
+{
+public:
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+Reference getTextRange() override;
+Reference getTextContent() override;
+bool isAttachSupported() override { return true; }
+Reference getTextDocument() { return mxTextDocument; }
+void triggerDesktopTerminate() override {}
+
+CPPUNIT_TEST_SUITE(SwXFootnote);
+CPPUNIT_TEST(testDispose);
+CPPUNIT_TEST(testAddEventListener);
+CPPUNIT_TEST(testRemoveEventListener);
+CPPUNIT_TEST(testAttach);
+CPPUNIT_TEST(testGetAnchor);
+CPPUNIT_TEST(testCreateTextCursor);
+CPPUNIT_TEST(testCreateTextCursorByRange);
+CPPUNIT_TEST(testInsertString);
+CPPUNIT_TEST(testInsertControlCharacter);
+CPPUNIT_TEST(testGetEnd);
+CPPUNIT_TEST(testGetSetString);
+CPPUNIT_TEST(testGetStart);
+CPPUNIT_TEST(testGetText);
+// CPPUNIT_TEST(testInsertRemoveTextContent);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference mxTextDocument;
+Reference mxTextRange;
+Reference mxTextContent;
+};
+
+void SwXFootnote::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxTextDocument = Reference(
+loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"),
+uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT(mxTextDocument.is());
+}
+
+void SwXFootnote::tearDown()
+{
+if (mxTextDocument.is())
+mxTextDocument->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXFootnote::init()
+{
+Reference xMSF(mxTextDocument, 
UNO_QUERY_THROW);
+
+Reference 
xFootnote(xMSF->createInstance("com.sun.star.text.Footnote"),
+ UNO_QUERY_THROW);
+
+Reference xText = getTextDocument()->getText();
+Reference xCursor = xText->createTextCursor();
+
+xText->insertTextContent(xCursor, xFootnote, false);
+
+mxTextRange = Reference(xCursor, UNO_QUERY_THROW);
+mxTextContent = Reference(
+xMSF->createInstance("com.sun.star.text.Footnote"), UNO_QUERY_THROW);
+
+return Reference(xFootnote, UNO_QUERY_THROW);
+}
+
+Reference SwXFootnote::getTextRange() { return mxTextRange; }
+
+Reference SwXFootnote::getTextContent() { return 
mxTextContent; }
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXFootnote);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-03 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXHeadFootText.cxx |  120 ++
 2 files changed, 121 insertions(+)

New commits:
commit ba4aa9e6f0e4947d1e111bdb4c765a6b58307d48
Author: anfanite396 
AuthorDate: Tue Jun 27 15:20:59 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 3 15:38:03 2023 +0200

Move SwXHeadFootText Java tests to C++

Change-Id: I9288d5d9835cf4559daac720c368a2d8f8222165
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153636
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 62a12ae01e79..67aaf351ec39 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -23,6 +23,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXFootnoteProperties \
 sw/qa/api/SwXFootnoteText \
 sw/qa/api/SwXFootnotes \
+sw/qa/api/SwXHeadFootText \
 sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
diff --git a/sw/qa/api/SwXHeadFootText.cxx b/sw/qa/api/SwXHeadFootText.cxx
new file mode 100644
index ..ca51ba8c0069
--- /dev/null
+++ b/sw/qa/api/SwXHeadFootText.cxx
@@ -0,0 +1,120 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXHeadFootTextText.
+ */
+class SwXHeadFootTextText final : public test::BootstrapFixture,
+  public unotest::MacrosTest,
+  public apitest::XElementAccess,
+  public apitest::XSimpleText,
+  public apitest::XTextRange,
+  public apitest::XText,
+  public apitest::XEnumerationAccess
+{
+public:
+SwXHeadFootTextText();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+Reference getTextContent() override { return 
mxTextContent; };
+
+CPPUNIT_TEST_SUITE(SwXHeadFootTextText);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testCreateTextCursor);
+CPPUNIT_TEST(testCreateTextCursorByRange);
+CPPUNIT_TEST(testInsertString);
+CPPUNIT_TEST(testInsertControlCharacter);
+CPPUNIT_TEST(testGetEnd);
+CPPUNIT_TEST(testGetSetString);
+CPPUNIT_TEST(testGetStart);
+CPPUNIT_TEST(testGetText);
+// CPPUNIT_TEST(testInsertRemoveTextContent);
+CPPUNIT_TEST(testCreateEnumeration);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference component_;
+Reference mxTextContent;
+};
+
+SwXHeadFootTextText::SwXHeadFootTextText()
+: XElementAccess(cppu::UnoType::get())
+{
+}
+
+void SwXHeadFootTextText::setUp()
+{
+test::BootstrapFixture::setUp();
+mxDesktop.set(
+
frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
+}
+
+void SwXHeadFootTextText::tearDown()
+{
+if (component_.is())
+component_->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXHeadFootTextText::init()
+{
+component_ = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+Reference xTextDocument(component_, UNO_QUERY_THROW);
+Reference xMSF(component_, UNO_QUERY_THROW);
+
+Reference xStyleFam(xTextDocument, 
UNO_QUERY_THROW);
+Reference xStyleFamNames = 
xStyleFam->getStyleFamilies();
+
+Reference 
xPageStyles(xStyleFamNames->getByName("PageStyles"),
+  UNO_QUERY_THROW);
+Reference xStyle(xPageStyles->getByName("Standard"), 
UNO_QUERY_THROW);
+
+Reference xPropSet(xStyle, UNO_QUERY_THROW);
+
+xPropSet->setPropertyValue("HeaderIsOn", uno::Any(true));
+xPropSet->setPropertyValue("FooterIsOn", uno::Any(true));
+Reference xText(xPropSet->getPropertyValue("HeaderText"), 
UNO_QUERY_THROW);
+
+return Reference(xText, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXHeadFootTextText);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-03 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXBookmark.cxx |  116 ++
 2 files changed, 117 insertions(+)

New commits:
commit 5a3e0414e6f613ea417c4868faceb210274ad0f0
Author: anfanite396 
AuthorDate: Fri Jun 23 22:08:31 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 3 15:37:12 2023 +0200

Move SwXBookmark Java tests to C++

Change-Id: I6a4b62ba6815ba6d88c9ab1b59c7e30556520a1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153534
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index c19f0c4e27c1..62a12ae01e79 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -17,6 +17,7 @@ $(eval $(call 
gb_CppunitTest_use_common_precompiled_header,sw_apitests))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXBodyText \
+sw/qa/api/SwXBookmark \
 sw/qa/api/SwXDocumentIndex \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnoteProperties \
diff --git a/sw/qa/api/SwXBookmark.cxx b/sw/qa/api/SwXBookmark.cxx
new file mode 100644
index ..0d916cfc01de
--- /dev/null
+++ b/sw/qa/api/SwXBookmark.cxx
@@ -0,0 +1,116 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXBookmark.
+ */
+class SwXBookmark final : public test::BootstrapFixture,
+  public unotest::MacrosTest,
+  public apitest::XComponent,
+  public apitest::XNamed,
+  public apitest::XTextContent
+{
+public:
+SwXBookmark();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+Reference getTextRange() override;
+Reference getTextContent() override;
+bool isAttachSupported() override { return true; }
+Reference getTextDocument() { return mxTextDocument; }
+void triggerDesktopTerminate() override { mxDesktop->terminate(); }
+
+CPPUNIT_TEST_SUITE(SwXBookmark);
+CPPUNIT_TEST(testDispose);
+CPPUNIT_TEST(testAddEventListener);
+CPPUNIT_TEST(testRemoveEventListener);
+CPPUNIT_TEST(testGetName);
+CPPUNIT_TEST(testSetName);
+CPPUNIT_TEST(testAttach);
+CPPUNIT_TEST(testGetAnchor);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference mxTextDocument;
+Reference mxTextRange;
+Reference mxTextContent;
+};
+
+SwXBookmark::SwXBookmark()
+: XNamed("Bookmark")
+{
+}
+
+void SwXBookmark::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+mxTextDocument = Reference(
+loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"),
+UNO_QUERY_THROW);
+CPPUNIT_ASSERT(mxTextDocument.is());
+}
+
+void SwXBookmark::tearDown()
+{
+if (mxTextDocument.is())
+mxTextDocument->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXBookmark::init()
+{
+Reference xMSF(mxTextDocument, 
UNO_QUERY_THROW);
+
+Reference xText = getTextDocument()->getText();
+Reference xCursor = xText->createTextCursor();
+
+Reference 
xBookmark(xMSF->createInstance("com.sun.star.text.Bookmark"),
+UNO_QUERY_THROW);
+
+xText->insertTextContent(xCursor, xBookmark, false);
+mxTextRange = Reference(xCursor, UNO_QUERY_THROW);
+mxTextContent = Reference(
+xMSF->createInstance("com.sun.star.text.Bookmark"), UNO_QUERY_THROW);
+
+return Reference(xBookmark, UNO_QUERY_THROW);
+}
+
+Reference SwXBookmark::getTextRange() { return mxTextRange; }
+
+Reference SwXBookmark::getTextContent() { return 
mxTextContent; }
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXBookmark);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-07-03 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |3 -
 sw/qa/api/SwXFootnotes.cxx|  100 ++
 2 files changed, 102 insertions(+), 1 deletion(-)

New commits:
commit a4e44a55f96fd6bc0be1afe9018944d3d8d3930e
Author: anfanite396 
AuthorDate: Tue Jun 27 11:40:16 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 3 15:36:31 2023 +0200

Move SwXFootnotes Java tests to C++

Change-Id: I905ed0b99d6fd6bb73b1278b62d5e06b25f410c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153635
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 9960dc51..c19f0c4e27c1 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -20,8 +20,9 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXDocumentIndex \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnoteProperties \
-sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXFootnoteText \
+sw/qa/api/SwXFootnotes \
+sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
 ))
diff --git a/sw/qa/api/SwXFootnotes.cxx b/sw/qa/api/SwXFootnotes.cxx
new file mode 100644
index ..5b704500dda0
--- /dev/null
+++ b/sw/qa/api/SwXFootnotes.cxx
@@ -0,0 +1,100 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXFootnotesText.
+ */
+class SwXFootnotesText final : public test::BootstrapFixture,
+   public unotest::MacrosTest,
+   public apitest::XElementAccess,
+   public apitest::XIndexAccess
+{
+public:
+SwXFootnotesText();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+
+CPPUNIT_TEST_SUITE(SwXFootnotesText);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetCount);
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference component_;
+};
+
+SwXFootnotesText::SwXFootnotesText()
+: XElementAccess(cppu::UnoType::get())
+, XIndexAccess(1)
+{
+}
+
+void SwXFootnotesText::setUp()
+{
+test::BootstrapFixture::setUp();
+mxDesktop.set(
+
frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
+}
+
+void SwXFootnotesText::tearDown()
+{
+if (component_.is())
+component_->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXFootnotesText::init()
+{
+component_ = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+Reference xTextDocument(component_, UNO_QUERY_THROW);
+Reference xMSF(component_, UNO_QUERY_THROW);
+
+Reference 
xFootnote(xMSF->createInstance("com.sun.star.text.Footnote"),
+ UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+xText->insertTextContent(xCursor, xFootnote, false);
+
+Reference xSupplier(xTextDocument, 
UNO_QUERY_THROW);
+
+return Reference(xSupplier->getFootnotes(), UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXFootnotesText);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-06-28 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXFootnoteText.cxx |  118 ++
 2 files changed, 119 insertions(+)

New commits:
commit 50e154fe5cea061a1b820ab2135d4d60b7bc1bc9
Author: anfanite396 
AuthorDate: Mon Jun 26 19:50:13 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 28 11:13:20 2023 +0200

Move SwXFootnoteText Java tests to C++

Change-Id: I7f3477799f532f52993cd0add51185bfd15c7446
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153631
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index f3c0c76bc91a..9960dc51 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -21,6 +21,7 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXDocumentSettings \
 sw/qa/api/SwXFootnoteProperties \
 sw/qa/api/SwXTextFrame \
+sw/qa/api/SwXFootnoteText \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
 ))
diff --git a/sw/qa/api/SwXFootnoteText.cxx b/sw/qa/api/SwXFootnoteText.cxx
new file mode 100644
index ..9e8bab00c544
--- /dev/null
+++ b/sw/qa/api/SwXFootnoteText.cxx
@@ -0,0 +1,118 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXFootnoteText.
+ */
+class SwXFootnoteText final : public test::BootstrapFixture,
+  public unotest::MacrosTest,
+  public apitest::XElementAccess,
+  public apitest::XSimpleText,
+  public apitest::XTextRange,
+  public apitest::XText,
+  public apitest::XEnumerationAccess
+{
+public:
+SwXFootnoteText();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+Reference getTextContent() override { return 
mxTextContent; };
+
+CPPUNIT_TEST_SUITE(SwXFootnoteText);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testCreateTextCursor);
+CPPUNIT_TEST(testCreateTextCursorByRange);
+CPPUNIT_TEST(testInsertString);
+CPPUNIT_TEST(testInsertControlCharacter);
+CPPUNIT_TEST(testGetEnd);
+CPPUNIT_TEST(testGetSetString);
+CPPUNIT_TEST(testGetStart);
+CPPUNIT_TEST(testGetText);
+// CPPUNIT_TEST(testInsertRemoveTextContent);
+CPPUNIT_TEST(testCreateEnumeration);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+Reference component_;
+Reference mxTextContent;
+};
+
+SwXFootnoteText::SwXFootnoteText()
+: XElementAccess(cppu::UnoType::get())
+{
+}
+
+void SwXFootnoteText::setUp()
+{
+test::BootstrapFixture::setUp();
+mxDesktop.set(
+
frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
+}
+
+void SwXFootnoteText::tearDown()
+{
+if (component_.is())
+component_->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXFootnoteText::init()
+{
+component_ = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+Reference xTextDocument(component_, UNO_QUERY_THROW);
+Reference xMSF(component_, UNO_QUERY_THROW);
+
+Reference 
xFootnote(xMSF->createInstance("com.sun.star.text.Footnote"),
+ UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+xText->insertTextContent(xCursor, xFootnote, false);
+
+Reference xFootText(xFootnote, UNO_QUERY_THROW);
+xFootText->setString("SwXFootnoteText");
+mxTextContent = Reference(
+xMSF->createInstance("com.sun.star.text.Footnote"), UNO_QUERY_THROW);
+
+return Reference(xFootText->getText(), UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXFootnoteText);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-06-27 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk   |3 -
 sw/qa/api/SwXFootnoteProperties.cxx |   96 
 2 files changed, 98 insertions(+), 1 deletion(-)

New commits:
commit dab294beb861b651e02ff8598aa5b30fd852f5d3
Author: anfanite396 
AuthorDate: Mon Jun 26 17:16:30 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 27 14:47:10 2023 +0200

Move SwXFootnotesSupplier Java tests to C++

Change-Id: Ib6b33d33dc813400526b0d641faefbfdeea9fc0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153610
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index e71270e4d4db..f3c0c76bc91a 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -19,7 +19,8 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sw_apitests, \
 sw/qa/api/SwXBodyText \
 sw/qa/api/SwXDocumentIndex \
 sw/qa/api/SwXDocumentSettings \
-   sw/qa/api/SwXTextFrame \
+sw/qa/api/SwXFootnoteProperties \
+sw/qa/api/SwXTextFrame \
 sw/qa/api/SwXTextField \
 sw/qa/api/SwXTextTable \
 ))
diff --git a/sw/qa/api/SwXFootnoteProperties.cxx 
b/sw/qa/api/SwXFootnoteProperties.cxx
new file mode 100644
index ..e716181a5594
--- /dev/null
+++ b/sw/qa/api/SwXFootnoteProperties.cxx
@@ -0,0 +1,96 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXFootnoteProperties.
+ */
+class SwXFootnoteProperties final : public test::BootstrapFixture,
+public unotest::MacrosTest,
+public apitest::XElementAccess,
+public apitest::XIndexAccess
+{
+public:
+SwXFootnoteProperties();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+
+CPPUNIT_TEST_SUITE(SwXFootnoteProperties);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+uno::Reference component_;
+};
+
+SwXFootnoteProperties::SwXFootnoteProperties()
+: XElementAccess(cppu::UnoType::get())
+, XIndexAccess(3)
+{
+}
+
+void SwXFootnoteProperties::setUp()
+{
+test::BootstrapFixture::setUp();
+mxDesktop.set(
+
frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
+}
+
+void SwXFootnoteProperties::tearDown()
+{
+if (component_.is())
+component_->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXFootnoteProperties::init()
+{
+component_ = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+Reference xTextDocument(component_, UNO_QUERY_THROW);
+Reference xMSF(component_, UNO_QUERY_THROW);
+
+Reference 
xFootnote(xMSF->createInstance("com.sun.star.text.Footnote"),
+ UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+Reference xCursor = xText->createTextCursor();
+
+xText->insertTextContent(xCursor, xFootnote, false);
+
+Reference xFootnotesSupplier(xTextDocument, 
UNO_QUERY_THROW);
+
+return Reference(xFootnotesSupplier->getFootnoteSettings(), 
UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXFootnoteProperties);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/CppunitTest_sw_apitests.mk sw/qa

2023-06-26 Thread anfanite396 (via logerrit)
 sw/CppunitTest_sw_apitests.mk |1 
 sw/qa/api/SwXBodyText.cxx |  100 ++
 2 files changed, 101 insertions(+)

New commits:
commit ed78d54f7caf1d556ed16f8c78437845541377be
Author: anfanite396 
AuthorDate: Fri Jun 23 16:58:15 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 26 14:38:50 2023 +0200

Move SwXBodyText Java tests to C++

Change-Id: I5d2807125fb374d8d05718d8bf5415d30f1a992a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153503
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 716607dbe404..e71270e4d4db 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -16,6 +16,7 @@ $(eval $(call 
gb_CppunitTest_use_external,sw_apitests,boost_headers))
 $(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_apitests))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_apitests, \
+sw/qa/api/SwXBodyText \
 sw/qa/api/SwXDocumentIndex \
 sw/qa/api/SwXDocumentSettings \
sw/qa/api/SwXTextFrame \
diff --git a/sw/qa/api/SwXBodyText.cxx b/sw/qa/api/SwXBodyText.cxx
new file mode 100644
index ..d364ba3a8aa0
--- /dev/null
+++ b/sw/qa/api/SwXBodyText.cxx
@@ -0,0 +1,100 @@
+/* -*- 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/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+using namespace css;
+using namespace css::uno;
+
+namespace
+{
+/**
+ * Initial tests for SwXBodyText.
+ */
+class SwXBodyText final : public test::BootstrapFixture,
+  public unotest::MacrosTest,
+  public apitest::XElementAccess,
+  public apitest::XTextRange,
+  public apitest::XSimpleText,
+  public apitest::XEnumerationAccess
+{
+public:
+SwXBodyText();
+virtual void setUp() override;
+void tearDown() override;
+
+Reference init() override;
+
+CPPUNIT_TEST_SUITE(SwXBodyText);
+CPPUNIT_TEST(testCreateTextCursor);
+CPPUNIT_TEST(testCreateTextCursorByRange);
+CPPUNIT_TEST(testInsertString);
+CPPUNIT_TEST(testInsertControlCharacter);
+CPPUNIT_TEST(testGetElementType);
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetText);
+CPPUNIT_TEST(testGetStart);
+CPPUNIT_TEST(testGetEnd);
+CPPUNIT_TEST(testGetSetString);
+CPPUNIT_TEST(testCreateEnumeration);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+uno::Reference component_;
+};
+
+SwXBodyText::SwXBodyText()
+: XElementAccess(cppu::UnoType::get())
+{
+}
+
+void SwXBodyText::setUp()
+{
+test::BootstrapFixture::setUp();
+mxDesktop.set(
+
frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
+}
+
+void SwXBodyText::tearDown()
+{
+if (component_.is())
+component_->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+Reference SwXBodyText::init()
+{
+component_ = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+Reference xTextDocument(component_, UNO_QUERY_THROW);
+Reference xMSF(component_, UNO_QUERY_THROW);
+
+Reference xText = xTextDocument->getText();
+
+return Reference(xText, UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwXBodyText);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2023-05-11 Thread anfanite396 (via logerrit)
 include/vcl/salnativewidgets.hxx  |   18 
 vcl/inc/menubarvalue.hxx  |   49 ++
 vcl/source/outdev/nativecontrols.cxx  |1 
 vcl/source/window/menubarwindow.cxx   |1 
 vcl/win/gdi/salnativewidgets-luna.cxx |1 
 5 files changed, 52 insertions(+), 18 deletions(-)

New commits:
commit 35845a056e332c1d78d536b613aeb3183af09a91
Author: anfanite396 
AuthorDate: Fri Mar 17 21:00:19 2023 +0530
Commit: Hossein 
CommitDate: Thu May 11 10:35:53 2023 +0200

tdf#97228 Move MenubarValue class to separate include file

Change-Id: I5da4bb1765f91d1f9d78e27221d243d5c2ef92e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149076
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 21c852b6acbd..907c3b618f88 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -446,24 +446,6 @@ class SAL_DLLPUBLIC_RTTI SpinbuttonValue final : public 
ImplControlValue
 SpinbuttonValue & operator =(SpinbuttonValue &&) = delete; // due to 
ImplControlValue
 };
 
-/*  MenubarValue:
- *
- *  Value container for menubars specifying height of adjacent docking area
- */
-class MenubarValue final : public ImplControlValue
-{
-public:
-MenubarValue() : ImplControlValue( ControlType::Menubar, 0 )
-{ maTopDockingAreaHeight=0; }
-virtual ~MenubarValue() override;
-virtual MenubarValue* clone() const override;
-MenubarValue(MenubarValue const &) = default;
-MenubarValue(MenubarValue &&) = default;
-MenubarValue & operator =(MenubarValue const &) = delete; // due to 
ImplControlValue
-MenubarValue & operator =(MenubarValue &&) = delete; // due to 
ImplControlValue
-int maTopDockingAreaHeight;
-};
-
 /* MenupopupValue:
  *
  * Value container for menu items; specifies the rectangle for the whole item 
which
diff --git a/vcl/inc/menubarvalue.hxx b/vcl/inc/menubarvalue.hxx
new file mode 100644
index ..0185037ba326
--- /dev/null
+++ b/vcl/inc/menubarvalue.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/.
+ *
+ * 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 .
+ */
+
+#ifndef INCLUDED_VCL_INC_MENUBARVALUE_HXX
+#define INCLUDED_VCL_INC_MENUBARVALUE_HXX
+
+#include 
+#include 
+
+/*  MenubarValue:
+ *
+ *  Value container for menubars specifying height of adjacent docking area
+ */
+class MenubarValue final : public ImplControlValue
+{
+public:
+MenubarValue()
+: ImplControlValue(ControlType::Menubar, 0)
+{
+maTopDockingAreaHeight = 0;
+}
+virtual ~MenubarValue() override;
+virtual MenubarValue* clone() const override;
+MenubarValue(MenubarValue const&) = default;
+MenubarValue(MenubarValue&&) = default;
+MenubarValue& operator=(MenubarValue const&) = delete; // due to 
ImplControlValue
+MenubarValue& operator=(MenubarValue&&) = delete; // due to 
ImplControlValue
+int maTopDockingAreaHeight;
+};
+
+#endif // INCLUDED_VCL_INC_MENUBARVALUE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/outdev/nativecontrols.cxx 
b/vcl/source/outdev/nativecontrols.cxx
index cee9408d6cfb..1b035c72bd2d 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index 0109bb559503..89e6b9246148 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include "bufferdevice.hxx"
+#include 
 
 // document closing button
 #define IID_DOCUMENTCLOSE 1
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx 
b/vcl/win/gdi/salnativewidgets-luna.cxx
index c837cb7a1c82..0dd5b2dd7442 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 


[Libreoffice-commits] core.git: idl/source

2023-03-17 Thread anfanite396 (via logerrit)
 idl/source/objects/object.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 34f7c8cce9c16861940f403f9a633fe8b26ba4ad
Author: anfanite396 
AuthorDate: Thu Mar 9 15:00:20 2023 +0530
Commit: Andreas Heinisch 
CommitDate: Fri Mar 17 14:25:46 2023 +

tdf#145538 Use range based for loops

Change-Id: I546bbcd6de02f9a31db6dcb34b4493bd165c0661
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148527
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 8c3cfb7b28ba..ccee5c08f16c 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -106,9 +106,8 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, 
SvTokenStream & rInStm,
 SAL_WARN( "idl", "new slot : " << rAttr.GetSlotId().getString() );
 }
 
-for( size_t n = 0; n < aAttrList.size(); n++ )
+for( const auto  : aAttrList )
 {
-SvMetaAttribute * pS = aAttrList[n];
 if( pS->GetName() == rAttr.GetName() )
 {
 // values have to match


[Libreoffice-commits] core.git: vcl/inc

2023-02-01 Thread anfanite396 (via logerrit)
 vcl/inc/vcleventlisteners.hxx |5 +
 vcl/inc/vclstatuslistener.hxx |6 +-
 vcl/inc/watchdog.hxx  |5 +
 vcl/inc/widgetdraw/WidgetDefinition.hxx   |5 +
 vcl/inc/widgetdraw/WidgetDefinitionReader.hxx |5 +
 vcl/inc/win/DWriteTextRenderer.hxx|5 +
 vcl/inc/win/scoped_gdi.hxx|5 +
 vcl/inc/win/wingdiimpl.hxx|5 +
 vcl/inc/wizdlg.hxx|6 +-
 9 files changed, 9 insertions(+), 38 deletions(-)

New commits:
commit 31605a4f46cbe5a231122da9bfb07c859522ec3d
Author: anfanite396 
AuthorDate: Wed Feb 1 21:27:15 2023 +0530
Commit: Julien Nabet 
CommitDate: Wed Feb 1 17:56:16 2023 +

tdf#143148 Use pragma once instead of include guards

Change-Id: I49ee5a87b2a0fb093095de74ab039ebdd91762fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146461
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/vcl/inc/vcleventlisteners.hxx b/vcl/inc/vcleventlisteners.hxx
index a1e34d397d02..4ae223dc7a47 100644
--- a/vcl/inc/vcleventlisteners.hxx
+++ b/vcl/inc/vcleventlisteners.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
-#define INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
+#pragma once
 
 #include 
 
@@ -34,6 +33,4 @@ private:
 mutable bool m_updated = false;
 };
 
-#endif // INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vclstatuslistener.hxx b/vcl/inc/vclstatuslistener.hxx
index 2335a66e7343..aedcf3c70ead 100644
--- a/vcl/inc/vclstatuslistener.hxx
+++ b/vcl/inc/vclstatuslistener.hxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_VCL_VCLSTATUSLISTENER_HXX
-#define INCLUDED_VCL_VCLSTATUSLISTENER_HXX
+#pragma once
 
 #include 
 #include 
@@ -90,7 +89,4 @@ void VclStatusListener::dispose()
 mWidget.clear();
 }
 
-
-#endif // INCLUDED_VCL_VCLSTATUSLISTENER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/watchdog.hxx b/vcl/inc/watchdog.hxx
index 9202e432f07a..6e21461fa8b2 100644
--- a/vcl/inc/watchdog.hxx
+++ b/vcl/inc/watchdog.hxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_VCL_INC_WATCHDOG_H
-#define INCLUDED_VCL_INC_WATCHDOG_H
+#pragma once
 
 #include 
 #include 
@@ -27,6 +26,4 @@ public:
 static void stop();
 };
 
-#endif // INCLUDED_VCL_INC_WATCHDOG_H
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/widgetdraw/WidgetDefinition.hxx 
b/vcl/inc/widgetdraw/WidgetDefinition.hxx
index 7ba1ce0e8ae6..4176cc661485 100644
--- a/vcl/inc/widgetdraw/WidgetDefinition.hxx
+++ b/vcl/inc/widgetdraw/WidgetDefinition.hxx
@@ -8,8 +8,7 @@
  *
  */
 
-#ifndef INCLUDED_VCL_INC_WIDGETDEFINITION_HXX
-#define INCLUDED_VCL_INC_WIDGETDEFINITION_HXX
+#pragma once
 
 #include 
 #include 
@@ -291,6 +290,4 @@ public:
 
 } // end vcl namespace
 
-#endif // INCLUDED_VCL_INC_WIDGETDEFINITION_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx 
b/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx
index fe2ebb6d613c..98e8154e151a 100644
--- a/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx
+++ b/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx
@@ -8,8 +8,7 @@
  *
  */
 
-#ifndef INCLUDED_VCL_INC_WIDGETDEFINITIONREADER_HXX
-#define INCLUDED_VCL_INC_WIDGETDEFINITIONREADER_HXX
+#pragma once
 
 #include 
 #include 
@@ -40,6 +39,4 @@ public:
 
 } // end vcl namespace
 
-#endif // INCLUDED_VCL_INC_WIDGETDEFINITIONREADER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/DWriteTextRenderer.hxx 
b/vcl/inc/win/DWriteTextRenderer.hxx
index 67094052ebb5..d4bb45e5895b 100644
--- a/vcl/inc/win/DWriteTextRenderer.hxx
+++ b/vcl/inc/win/DWriteTextRenderer.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_WIN_DWRITERENDERER_HXX
-#define INCLUDED_VCL_INC_WIN_DWRITERENDERER_HXX
+#pragma once
 
 #include 
 #include 
@@ -87,6 +86,4 @@ private:
 D2D1::Matrix3x2F maTransform;
 };
 
-#endif // INCLUDED_VCL_INC_WIN_DWRITERENDERER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/scoped_gdi.hxx b/vcl/inc/win/scoped_gdi.hxx
index d02ad9545749..86846e9860d6 100644
--- a/vcl/inc/win/scoped_gdi.hxx
+++ b/vcl/inc/win/scoped_gdi.hxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_VCL_INC_WIN_SCOPED_GDI_HXX
-#define INCLUDED_VCL_INC_WIN_SCOPED_GDI_HXX
+#pragma once
 
 #include 
 #include 
@@ -70,6 +69,4 @@ private:
 HDC m_hDC;
 };
 
-#endif // INCLUDED_VCL_INC_WIN_SCOPED_GDI_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s