From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- qadevOOo/tests/java/mod/_i18n/BreakIterator.java | 98 ++++++++++++++++++++++ qadevOOo/tests/java/mod/_i18n/CalendarImpl.java | 61 ++++++++++++++ qadevOOo/tests/java/mod/_i18n/ChapterCollator.java | 65 ++++++++++++++ .../java/mod/_i18n/CharacterClassification.java | 68 +++++++++++++++ qadevOOo/tests/java/mod/_i18n/Collator.java | 62 ++++++++++++++ .../tests/java/mod/_i18n/IndexEntrySupplier.java | 67 +++++++++++++++ qadevOOo/tests/java/mod/_i18n/LocaleData.java | 67 +++++++++++++++ .../java/mod/_i18n/NumberFormatCodeMapper.java | 71 ++++++++++++++++ qadevOOo/tests/java/mod/_i18n/Transliteration.java | 62 ++++++++++++++ 9 files changed, 621 insertions(+) create mode 100644 qadevOOo/tests/java/mod/_i18n/BreakIterator.java create mode 100644 qadevOOo/tests/java/mod/_i18n/CalendarImpl.java create mode 100644 qadevOOo/tests/java/mod/_i18n/ChapterCollator.java create mode 100644 qadevOOo/tests/java/mod/_i18n/CharacterClassification.java create mode 100644 qadevOOo/tests/java/mod/_i18n/Collator.java create mode 100644 qadevOOo/tests/java/mod/_i18n/IndexEntrySupplier.java create mode 100644 qadevOOo/tests/java/mod/_i18n/LocaleData.java create mode 100644 qadevOOo/tests/java/mod/_i18n/NumberFormatCodeMapper.java create mode 100644 qadevOOo/tests/java/mod/_i18n/Transliteration.java (limited to 'qadevOOo/tests/java/mod/_i18n') diff --git a/qadevOOo/tests/java/mod/_i18n/BreakIterator.java b/qadevOOo/tests/java/mod/_i18n/BreakIterator.java new file mode 100644 index 000000000..b7d0491d6 --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/BreakIterator.java @@ -0,0 +1,98 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; +import util.SOfficeFactory; +import util.utils; + +import com.sun.star.lang.Locale; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.text.XTextDocument; +import com.sun.star.text.XTextRange; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XInterface; + +/** +* Test for object which is represented by service +* com.sun.star.i18n.BreakIterator.

+* Object implements the following interfaces : +*

+* This object test is NOT designed to be run in several +* threads concurrently. +* @see ifc.i18n._XBreakIterator +*/ +public class BreakIterator extends TestCase { + + XComponent xTextDoc; + + /** + * Loads a Text document with name 'Iterator.sxw' from test + * documents directory + */ + @Override + protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception { + SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); + log.println( "creating a drawdoc" ); + xTextDoc = SOF.loadDocument(utils.getFullTestURL("Iterator.sxw")); + } + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.BreakIterator. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance( "com.sun.star.i18n.BreakIterator" ); + XInterface oObj = (XInterface) oInterface; + + TestEnvironment tEnv = new TestEnvironment( oObj ); + + tEnv.addObjRelation("Locale", new Locale("en", "US", "")); + + XTextDocument xDoc = UnoRuntime.queryInterface + (XTextDocument.class, xTextDoc); + XTextRange xTextRange = xDoc.getText(); + tEnv.addObjRelation("UnicodeString", xTextRange.getString()); + + return tEnv; + } // finish method getTestEnvironment + + /** + * Disposes the Text document loaded before. + */ + @Override + protected void cleanup( TestParameters tParam, PrintWriter log ) { + log.println( " disposing xTextDoc " ); + xTextDoc.dispose(); + } + +} // finish class BreakIterator + diff --git a/qadevOOo/tests/java/mod/_i18n/CalendarImpl.java b/qadevOOo/tests/java/mod/_i18n/CalendarImpl.java new file mode 100644 index 000000000..3c7fdee7b --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/CalendarImpl.java @@ -0,0 +1,61 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** +* Test for object which is represented by service +* com.sun.star.i18n.Calendar.

+* Object implements the following interfaces : +*

+* @see ifc.i18n._XCalendar +*/ +public class CalendarImpl extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.Calendar. + */ + @Override + protected TestEnvironment createTestEnvironment + (TestParameters Param, PrintWriter log) throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance + ( "com.sun.star.i18n.LocaleCalendar" ); + XInterface oObj = (XInterface) oInterface; + + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + + } // finish method getTestEnvironment + +} + diff --git a/qadevOOo/tests/java/mod/_i18n/ChapterCollator.java b/qadevOOo/tests/java/mod/_i18n/ChapterCollator.java new file mode 100644 index 000000000..4a8ecb338 --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/ChapterCollator.java @@ -0,0 +1,65 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** +* Test for object which is represented by service +* com.sun.star.i18n.ChapterCollator.

+* Object implements the following interfaces : +*

+* This object test is NOT designed to be run in several +* threads concurrently. +* @see ifc.i18n._XCollator +* @see ifc.lang._XServiceInfo +*/ +public class ChapterCollator extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.ChapterCollator. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance + ( "com.sun.star.i18n.ChapterCollator" ); + XInterface oObj = (XInterface) oInterface; + + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + } // finish method getTestEnvironment + +} + diff --git a/qadevOOo/tests/java/mod/_i18n/CharacterClassification.java b/qadevOOo/tests/java/mod/_i18n/CharacterClassification.java new file mode 100644 index 000000000..a2c8b8b6c --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/CharacterClassification.java @@ -0,0 +1,68 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** + * Test for object which is represented by service + * com.sun.star.i18n.CharacterClassification.

+ * + * Object implements the following interfaces : + *

+ * + * This object test is NOT designed to be run in several + * threads concurrently. + * + * @see com.sun.star.i18n.XCharacterClassification + * @see ifc.i18n._XCharacterClassification + */ +public class CharacterClassification extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.CharacterClassification. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance + ( "com.sun.star.i18n.CharacterClassification" ); + XInterface oObj = (XInterface) oInterface; + + log.println( " creating a new environment for CharacterClassification object" ); + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + } // finish method getTestEnvironment + +} // finish class CharacterClassification + diff --git a/qadevOOo/tests/java/mod/_i18n/Collator.java b/qadevOOo/tests/java/mod/_i18n/Collator.java new file mode 100644 index 000000000..6738f8072 --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/Collator.java @@ -0,0 +1,62 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** +* Test for object which is represented by service +* com.sun.star.i18n.Collator.

+* Object implements the following interfaces : +*

+* This object test is NOT designed to be run in several +* threads concurrently. +* @see ifc.i18n._XCollator +*/ +public class Collator extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.Collator. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance( "com.sun.star.i18n.Collator" ); + XInterface oObj = (XInterface) oInterface; + + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + } // finish method getTestEnvironment + +} + diff --git a/qadevOOo/tests/java/mod/_i18n/IndexEntrySupplier.java b/qadevOOo/tests/java/mod/_i18n/IndexEntrySupplier.java new file mode 100644 index 000000000..f27ed3e43 --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/IndexEntrySupplier.java @@ -0,0 +1,67 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** + * Test for object which is represented by service + * com.sun.star.i18n.IndexEntrySupplier.

+ * + * Object implements the following interfaces : + *

+ * + * This object test is NOT designed to be run in several + * threads concurrently. + * + * @see com.sun.star.i18n.XIndexEntrySupplier + * @see ifc.i18n._XIndexEntrySupplier + */ +public class IndexEntrySupplier extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.IndexEntrySupplier. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance + ( "com.sun.star.i18n.IndexEntrySupplier" ); + XInterface oObj = (XInterface) oInterface; + + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + } // finish method getTestEnvironment + +} + diff --git a/qadevOOo/tests/java/mod/_i18n/LocaleData.java b/qadevOOo/tests/java/mod/_i18n/LocaleData.java new file mode 100644 index 000000000..a99fc17a2 --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/LocaleData.java @@ -0,0 +1,67 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** + * Test for object which is represented by service + * com.sun.star.i18n.LocaleData.

+ * + * Object implements the following interfaces : + *

+ * + * This object test is NOT designed to be run in several + * threads concurrently. + * + * @see com.sun.star.i18n.XLocaleData + * @see ifc.i18n._XLocaleData + */ +public class LocaleData extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.LocaleData. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance( "com.sun.star.i18n.LocaleData" ); + XInterface oObj = (XInterface) oInterface; + + log.println( " creating a new environment for LocaleData object" ); + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + } // finish method getTestEnvironment + +} // finish class LocaleData + diff --git a/qadevOOo/tests/java/mod/_i18n/NumberFormatCodeMapper.java b/qadevOOo/tests/java/mod/_i18n/NumberFormatCodeMapper.java new file mode 100644 index 000000000..92c42ac06 --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/NumberFormatCodeMapper.java @@ -0,0 +1,71 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** + * Test for object which is represented by service + * com.sun.star.i18n.NumberFormatCodeMapper.

+ * + * Object implements the following interfaces : + *

+ * + * This object test is NOT designed to be run in several + * threads concurrently. + * + * @see com.sun.star.lang.XServiceInfo + * @see com.sun.star.i18n.XNumberFormatCode + * @see ifc.lang._XServiceInfo + * @see ifc.i18n._XNumberFormatCode + */ +public class NumberFormatCodeMapper extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.NumberFormatCodeMapper. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance + ( "com.sun.star.i18n.NumberFormatCodeMapper" ); + XInterface oObj = (XInterface) oInterface; + + log.println( " creating a new environment for NumberFormatCodeMapper object" ); + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + } // finish method getTestEnvironment + +} // finish class NumberFormatCodeMapper + diff --git a/qadevOOo/tests/java/mod/_i18n/Transliteration.java b/qadevOOo/tests/java/mod/_i18n/Transliteration.java new file mode 100644 index 000000000..64a588c43 --- /dev/null +++ b/qadevOOo/tests/java/mod/_i18n/Transliteration.java @@ -0,0 +1,62 @@ +/* + * 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._i18n; + +import java.io.PrintWriter; + +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.XInterface; + +/** +* Test for object which is represented by service +* com.sun.star.i18n.Transliteration.

+* Object implements the following interfaces : +*

+* This object test is NOT designed to be run in several +* threads concurrently. +* @see ifc.i18n._XTransliteration +*/ +public class Transliteration extends TestCase { + + /** + * Creating a TestEnvironment for the interfaces to be tested. + * Creates an instance of the service + * com.sun.star.i18n.Transliteration. + */ + @Override + public TestEnvironment createTestEnvironment( TestParameters Param, + PrintWriter log ) + throws Exception { + XMultiServiceFactory xMSF = Param.getMSF(); + Object oInterface = xMSF.createInstance( "com.sun.star.i18n.Transliteration" ); + XInterface oObj = (XInterface) oInterface; + + TestEnvironment tEnv = new TestEnvironment( oObj ); + + return tEnv; + } // finish method getTestEnvironment + +} + -- cgit v1.2.3