diff options
author | Jens Carl <j.carl43@gmx.de> | 2017-11-25 07:24:45 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2017-11-27 03:40:56 +0100 |
commit | 2d609053adb2f078fa7aa3ccdf3758f2f01e478f (patch) | |
tree | 57c7c4a94da03a964e098aea3ee86c0208729345 /qadevOOo | |
parent | eb384cf3792e3efc2473f26eee86b335804f2f9b (diff) |
tdf#45904 Move _XHeaderFooterContent Java tests to C++
Change-Id: I5e6ee9f44223c4b0b92ec32bb508d5b6c988689f
Reviewed-on: https://gerrit.libreoffice.org/45265
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'qadevOOo')
4 files changed, 0 insertions, 213 deletions
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 0064c67a5dcf..ca7efb955432 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -604,7 +604,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster \ qadevOOo/tests/java/ifc/sheet/_XFormulaQuery \ qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions \ - qadevOOo/tests/java/ifc/sheet/_XHeaderFooterContent \ qadevOOo/tests/java/ifc/sheet/_XMultipleOperation \ qadevOOo/tests/java/ifc/sheet/_XRangeSelection \ qadevOOo/tests/java/ifc/sheet/_XRecentFunctions \ @@ -1043,7 +1042,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_sc/ScFunctionListObj \ qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj \ qadevOOo/tests/java/mod/_sc/ScHeaderFieldsObj \ - qadevOOo/tests/java/mod/_sc/ScHeaderFooterContentObj \ qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextCursor \ qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextObj \ qadevOOo/tests/java/mod/_sc/ScImportDescriptorBase \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScHeaderFooterContentObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScHeaderFooterContentObj.csv deleted file mode 100644 index e04311b56418..000000000000 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScHeaderFooterContentObj.csv +++ /dev/null @@ -1,3 +0,0 @@ -"ScHeaderFooterContentObj";"com::sun::star::sheet::XHeaderFooterContent";"getLeftText()" -"ScHeaderFooterContentObj";"com::sun::star::sheet::XHeaderFooterContent";"getCenterText()" -"ScHeaderFooterContentObj";"com::sun::star::sheet::XHeaderFooterContent";"getRightText()" diff --git a/qadevOOo/tests/java/ifc/sheet/_XHeaderFooterContent.java b/qadevOOo/tests/java/ifc/sheet/_XHeaderFooterContent.java deleted file mode 100644 index b507618b8ec9..000000000000 --- a/qadevOOo/tests/java/ifc/sheet/_XHeaderFooterContent.java +++ /dev/null @@ -1,73 +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.sheet; - -import lib.MultiMethodTest; - -import com.sun.star.sheet.XHeaderFooterContent; -import com.sun.star.text.XText; - -/** - * Testing <code>com.sun.star.sheet.XHeaderFooterContent</code> - * interface methods : - * <ul> - * <li><code> getLeftText()</code></li> - * <li><code> getCenterText()</code></li> - * <li><code> getRightText()</code></li> - * </ul> <p> - * - * @see com.sun.star.sheet.XHeaderFooterContent - */ -public class _XHeaderFooterContent extends MultiMethodTest { - - public XHeaderFooterContent oObj = null; - - /** - * Test calls the method and checks string obtained from returned value. <p> - * Has <b>OK</b> status if obtained string is equal to <code>"LEFT"</code>. - * <p> - */ - public void _getLeftText() { - XText left = oObj.getLeftText(); - tRes.tested("getLeftText()",left.getString().equals("LEFT")); - } - - /** - * Test calls the method and checks string obtained from returned value. <p> - * Has <b>OK</b> status if obtained string is equal to <code>"RIGHT"</code>. - * <p> - */ - public void _getRightText() { - XText right = oObj.getRightText(); - tRes.tested("getRightText()",right.getString().equals("RIGHT")); - } - - /** - * Test calls the method and checks string obtained from returned value. <p> - * Has <b>OK</b> status if obtained string is equal to <code>"CENTER"</code>. - * <p> - */ - public void _getCenterText() { - XText center = oObj.getCenterText(); - tRes.tested("getCenterText()",center.getString().equals("CENTER")); - } - -} // finish class _XHeaderFooterContent - - diff --git a/qadevOOo/tests/java/mod/_sc/ScHeaderFooterContentObj.java b/qadevOOo/tests/java/mod/_sc/ScHeaderFooterContentObj.java deleted file mode 100644 index b74046367f52..000000000000 --- a/qadevOOo/tests/java/mod/_sc/ScHeaderFooterContentObj.java +++ /dev/null @@ -1,135 +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._sc; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.SOfficeFactory; - -import com.sun.star.beans.XPropertySet; -import com.sun.star.container.XNameAccess; -import com.sun.star.lang.XComponent; -import com.sun.star.sheet.XHeaderFooterContent; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.style.XStyle; -import com.sun.star.style.XStyleFamiliesSupplier; -import com.sun.star.text.XText; -import com.sun.star.uno.AnyConverter; -import com.sun.star.uno.Type; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - -/** -* Test for object which is represented by service -* <code>com.sun.star.sheet.HeaderFooterContent</code>. <p> -* Object implements the following interfaces : -* <ul> -* <li> <code>com::sun::star::sheet::XHeaderFooterContent</code></li> -* </ul> -* @see com.sun.star.sheet.HeaderFooterContent -* @see com.sun.star.sheet.XHeaderFooterContent -* @see ifc.sheet._XHeaderFooterContent -*/ -public class ScHeaderFooterContentObj extends TestCase { - private XSpreadsheetDocument xSpreadsheetDoc; - - /** - * Creates Spreadsheet document. - */ - @Override - protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception { - SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); - log.println( "creating a Spreadsheet document" ); - xSpreadsheetDoc = SOF.createCalcDoc(null); - } - - /** - * Disposes Spreadsheet document. - */ - @Override - protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing xSheetDoc " ); - XComponent oComp = UnoRuntime.queryInterface (XComponent.class, xSpreadsheetDoc); - util.DesktopTools.closeDoc(oComp); - } - - /** - * Creating a TestEnvironment for the interfaces to be tested. - * Retrieves the collection of style families available in the document - * using the interface <code>XStyleFamiliesSupplier</code>. - * Obtains default style from the style family <code>'PageStyles'</code>. - * Retrieves value of the property <code>'RightPageHeaderContent'</code>. - * Sets some text for every part of header or footer using the interface - * <code>XHeaderFooterContent</code> and sets new value of the property - * <code>'RightPageHeaderContent'</code>. The value of this property is the - * instance of the service <code>com.sun.star.sheet.HeaderFooterContent</code>. - * @see com.sun.star.style.XStyleFamiliesSupplier - * @see com.sun.star.sheet.XHeaderFooterContent - * @see com.sun.star.sheet.HeaderFooterContent - */ - @Override - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) throws Exception { - - XInterface oObj = null; - XPropertySet PropSet; - XNameAccess PageStyles = null; - XStyle StdStyle = null; - - XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface( - XStyleFamiliesSupplier.class, - xSpreadsheetDoc ); - XNameAccess StyleFamNames = StyleFam.getStyleFamilies(); - PageStyles = (XNameAccess) AnyConverter.toObject( - new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles")); - StdStyle = (XStyle) AnyConverter.toObject( - new Type(XStyle.class),PageStyles.getByName("Default")); - - //get the property-set - PropSet = UnoRuntime.queryInterface(XPropertySet.class, StdStyle); - - XHeaderFooterContent RPHC = null; - // creation of testobject here - // first we write what we are intend to do to log file - log.println( "creating a test environment" ); - RPHC = (XHeaderFooterContent) AnyConverter.toObject( - new Type(XHeaderFooterContent.class), - PropSet.getPropertyValue("RightPageHeaderContent")); - - XText center = RPHC.getCenterText(); - XText left = RPHC.getLeftText(); - XText right = RPHC.getRightText(); - - center.setString("CENTER"); - left.setString("LEFT"); - right.setString("RIGHT"); - - PropSet.setPropertyValue("RightPageHeaderContent", RPHC); - - // create testobject here - oObj = RPHC; - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - - } // finish method getTestEnvironment - -} // finish class ScHeaderFooterContentObj |