diff options
author | Joe Schaefer <joes@apache.org> | 2012-11-26 02:32:20 +0000 |
---|---|---|
committer | Joe Schaefer <joes@apache.org> | 2012-11-26 02:32:20 +0000 |
commit | b6fac6a8a6875c73b8e16a9ef796e3180a0f6821 (patch) | |
tree | 7ce477961b834a26632160e714bd0eebe88d686b /test | |
parent | 8f4457b94f439f3b8a4a8611f98daa411b615e9e (diff) |
mv ooo to top-level
Notes
Notes:
ignore: aoo
Diffstat (limited to 'test')
16 files changed, 0 insertions, 3285 deletions
diff --git a/test/testoo/source/testcase/BVTFunction.java b/test/testoo/source/testcase/BVTFunction.java deleted file mode 100644 index b92250adb22a..000000000000 --- a/test/testoo/source/testcase/BVTFunction.java +++ /dev/null @@ -1,766 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -/** - * - */ -package testcase; - -import static org.junit.Assert.*; -import static org.openoffice.test.vcl.Tester.*; -import static testlib.AppUtil.*; -import static testlib.UIMap.*; - -import java.awt.Rectangle; -import java.io.File; - -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.openoffice.test.common.FileUtil; -import org.openoffice.test.common.GraphicsUtil; - -import testlib.CalcUtil; -import testlib.Log; - -/** - * - */ -public class BVTFunction { - - - @Rule - public Log LOG = new Log(); - - @Before - public void setUp() throws Exception { - app.start(); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - - @Test - public void testExportAsPDF() throws Exception { - String file = testFile("export_pdf.odt"); - String exportTo = fullPath("temp/odt.pdf"); - - app.dispatch(".uno:Open", 3); - submitOpenDlg(file); - writer.waitForExistence(10, 2); - app.dispatch(".uno:ExportToPDF"); - PDFGeneralPage.ok(); - FileUtil.deleteFile(exportTo); - submitSaveDlg(exportTo); - assertTrue("PDF is exported?", new File(exportTo).exists()); - assertTrue(toolbox(".HelpId:standardbar").exists(5)); - button(".uno:ExportDirectToPDF").click(); - assertEquals("PDF - Portable Document Format (.pdf)", FileSave_FileType.getSelText()); - FileSave.cancel(); - } - - /** - * Test the File -- Print Dialog show - * - */ - @Test - public void testPrintDialog() - { - //Create a new text document - app.dispatch("private:factory/swriter", 3); - sleep(3); - app.dispatch(".uno:Print", 3); - assertTrue(File_PrintDlg.exists(5)); - File_PrintDlg.cancel(); - } - - /** - * Test the File -- Java Dialog show - * - */ - @Test - public void testJavaDialog() - { - - //Create a new text document and launch a Wizards dialog which need JVM work correctly. - app.dispatch("private:factory/swriter", 3); - File tempfile=new File(oo.getUserInstallation(),"user/template/myAgendaTemplate.ott"); - FileUtil.deleteFile(tempfile); - sleep(3); - app.dispatch("service:com.sun.star.wizards.agenda.CallWizard?start"); - sleep(5); - assertTrue(Wizards_AgendaDialog.exists(10)); - Wizards_AgendaDialog_FinishButton.click(); - sleep(10); - writer.focus(); - sleep(1); - app.dispatch(".uno:SelectAll", 3); - typeKeys("<$copy>"); - //System.out.println("now txt:"+app.getClipboard()); -// assertTrue(app.getClipboard().startsWith("<Name>")); - assertNotNull(app.getClipboard()); - } - - /** - * Test the Tools / Macros / Organize Dialogs" show - * - */ - @Test - public void testMacroToolsOrgDialog() - { - app.dispatch(".uno:MacroOrganizer?TabId:short=1"); - assertTrue(MacroDialogsPage.exists(5)); - MacroDialogsPage.cancel(); - } - - - /** - * Test the About Dialog show - * - */ - @Test - public void testAboutDialog() - { - app.dispatch(".uno:About"); - assertTrue(AboutDialog.exists(5)); - AboutDialog.ok(); - } - - /** - * Test inserting a picture in text document - * @throws Exception - */ - - - @Test - public void testInsertPictureInDocument() throws Exception { - String bmp_green = testFile("pure_green_64x64.bmp"); - String bmp_red = testFile("pure_red_64x64.bmp"); - - //Create a new text document - app.dispatch("private:factory/swriter", 3); - sleep(3); - - //Insert a picture fully filled with green - writer.click(400, 400); - app.dispatch(".uno:InsertGraphic", 3); - submitOpenDlg(bmp_green); - sleep(3); - writer.click(0.5, 0.5); - sleep(1); - - // Verify if the picture is inserted successfully - Rectangle rectangle = GraphicsUtil.findRectangle(writer.getScreenRectangle(), 0xFF00FF00); - - assertNotNull("Green rectangle: " + rectangle, rectangle); - - //insert another picture - app.dispatch(".uno:InsertGraphic", 3); - submitOpenDlg(bmp_red); - sleep(3); - writer.click(0.5, 0.5); - sleep(1); - // Verify if the picture is inserted successfully - rectangle = GraphicsUtil.findRectangle(writer.getScreenRectangle(), 0xFFFF0000); - assertNotNull("Red rectangle: " + rectangle, rectangle); - } - - - @Test - public void testInsertPictureInSpreadsheet() throws Exception { - String bmp_green = testFile("pure_green_64x64.bmp"); - String bmp_red = testFile("pure_red_64x64.bmp"); - - //Create a new text document - app.dispatch("private:factory/scalc", 3); - sleep(3); - - //Insert a picture fully filled with green - app.dispatch(".uno:InsertGraphic", 3); - submitOpenDlg(bmp_green); - sleep(3); - calc.click(0.5, 0.5); - sleep(1); - - // Verify if the picture is inserted successfully - Rectangle rectangle = GraphicsUtil.findRectangle(calc.getScreenRectangle(), 0xFF00FF00); - - assertNotNull("Green rectangle: " + rectangle, rectangle); -// assertEquals(new Rectangle(0,0,64,64), rectangle); - CalcUtil.selectRange("C1"); - //insert another picture - app.dispatch(".uno:InsertGraphic", 3); - submitOpenDlg(bmp_red); - sleep(3); - calc.click(0.5, 0.5); - sleep(1); - // Verify if the picture is inserted successfully - rectangle = GraphicsUtil.findRectangle(calc.getScreenRectangle(), 0xFFFF0000); - assertNotNull("Red rectangle: " + rectangle, rectangle); - } - - @Test - public void testInsertPictureInPresentation() throws Exception { - String bmp_green = testFile("pure_green_64x64.bmp"); - String bmp_red = testFile("pure_red_64x64.bmp"); - - //Create a new text document - app.dispatch("private:factory/simpress?slot=6686"); - PresentationWizard.ok(); - sleep(3); - - //Insert a picture fully filled with green - app.dispatch(".uno:InsertGraphic", 3); - submitOpenDlg(bmp_green); - sleep(3); - impress.click(5,5); - sleep(1); - - // Verify if the picture is inserted successfully - Rectangle rectangle = GraphicsUtil.findRectangle(impress.getScreenRectangle(), 0xFF00FF00); - - assertNotNull("Green rectangle: " + rectangle, rectangle); -// assertEquals(new Rectangle(0,0,64,64), rectangle); - - //insert another picture - app.dispatch(".uno:InsertGraphic", 3); - submitOpenDlg(bmp_red); - sleep(3); - impress.click(1, 1); - sleep(1); - // Verify if the picture is inserted successfully - rectangle = GraphicsUtil.findRectangle(impress.getScreenRectangle(), 0xFFFF0000); - assertNotNull("Red rectangle: " + rectangle, rectangle); - } - - @Test - public void testSlideShow() throws Exception { - String file = testFile("slideshow.odp"); - app.dispatch(".uno:Open", 3); - submitOpenDlg(file); - impress.waitForExistence(10, 2); - app.dispatch(".uno:Presentation", 3); - sleep(3); - Rectangle rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFFFF0000); - assertNotNull("1st slide appears", rectangle); - SlideShow.click(0.5, 0.5); - sleep(2); - rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFF00FF00); - assertNotNull("2nd slide appears", rectangle); - typeKeys("<enter>"); - sleep(2); - rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFF0000FF); - assertNotNull("3rd slide appears", rectangle); - SlideShow.click(0.5, 0.5); - sleep(2); - rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFF0000FF); - assertNull("The end", rectangle); - SlideShow.click(0.5, 0.5); - sleep(3); - assertFalse("Quit", SlideShow.exists()); - } - - @Test - public void testFind() { - String file = testFile("find.odt"); - app.dispatch(".uno:Open", 3); - submitOpenDlg(file); - writer.waitForExistence(10, 2); - app.dispatch(".uno:SearchDialog", 3); - FindDlg_For.setText("OpenOffice"); - FindDlg_Find.click(); - sleep(1); - writer.focus(); - typeKeys("<$copy>"); - assertEquals("OpenOffice", app.getClipboard()); - FindDlg_FindAll.click(); - sleep(1); - writer.focus(); - typeKeys("<$copy>"); - assertEquals("OpenOfficeOpenOfficeOpenOffice", app.getClipboard()); - FindDlg_ReplaceWith.setText("Awesome OpenOffice"); - FindDlg_ReplaceAll.click(); - sleep(1); - msgbox("Search key replaced 3 times.").ok(); - FindDlg.close(); - sleep(1); - app.dispatch(".uno:SelectAll", 3); - typeKeys("<$copy>"); - assertEquals("Apache Awesome OpenOffice is comprised of six personal productivity applications: a word processor (and its web-authoring component), spreadsheet, presentation graphics, drawing, equation editor, and database. Awesome OpenOffice is released on Windows, Solaris, Linux and Macintosh operation systems, with more communities joining, including a mature FreeBSD port. Awesome OpenOffice is localized, supporting over 110 languages worldwide. ", app.getClipboard()); - } - - @Test - public void testFillInSpreadsheet() { - String[][] expected1 = new String[][] { - {"1"}, - {"1"}, - {"1"}, - {"1"}, - {"1"}, - {"1"}, - }; - String[][] expected2 = new String[][] { - {"2"}, - {"2"}, - {"2"}, - {"2"}, - {"2"}, - {"2"}, - }; - - String[][] expected3 = new String[][] { - {"Hi friends","Hi friends","Hi friends", "Hi friends"} - }; - - String[][] expected4 = new String[][] { - {"99999.999","99999.999","99999.999", "99999.999"} - }; - String[][] expected5 = new String[][] { - - { "99999.999", "-10" }, - { "100000.999", "-9" }, - { "100001.999", "-8" }, - { "100002.999", "-7" }, - { "100003.999", "-6" } - - }; - //Create a new text document - app.dispatch("private:factory/scalc", 3); - sleep(3); - - CalcUtil.selectRange("C5"); - typeKeys("1<enter>"); - CalcUtil.selectRange("C5:C10"); - app.dispatch(".uno:FillDown", 3); - assertArrayEquals("Fill Down:", expected1, CalcUtil.getCellTexts("C5:C10")); - - CalcUtil.selectRange("D10"); - typeKeys("2<enter>"); - CalcUtil.selectRange("D5:D10"); - app.dispatch(".uno:FillUp", 3); - assertArrayEquals("Fill Up:", expected2, CalcUtil.getCellTexts("D5:D10")); - - CalcUtil.selectRange("A1"); - typeKeys("Hi friends<enter>"); - CalcUtil.selectRange("A1:D1"); - app.dispatch(".uno:FillRight", 3); - assertArrayEquals("Fill Right:", expected3, CalcUtil.getCellTexts("A1:D1")); - - CalcUtil.selectRange("D2"); - typeKeys("99999.999<enter>"); - CalcUtil.selectRange("A2:D2"); - app.dispatch(".uno:FillLeft", 3); - assertArrayEquals("Fill left:", expected4, CalcUtil.getCellTexts("A2:D2")); - - CalcUtil.selectRange("E1"); - typeKeys("99999.999<tab>-10<enter>"); - - CalcUtil.selectRange("E1:F5"); - app.dispatch(".uno:FillSeries", 3); - FillSeriesDlg.ok(); - sleep(1); - assertArrayEquals("Fill series..", expected5, CalcUtil.getCellTexts("E1:F5")); - } - - @Test - public void testSort() { - String[][] expected1 = new String[][] { - { "-9999999" }, - { "-1.1" }, - { "-1.1" }, - { "0" }, - { "0" }, - { "0.1" }, - { "10" }, - { "12" }, - { "9999999" }, - { "9999999" }, - - }; - String[][] expected2 = new String[][] { - { "TRUE", "Oracle" }, - { "TRUE", "OpenOffice" }, - { "FALSE", "OpenOffice" }, - { "TRUE", "IBM" }, - { "FALSE", "IBM" }, - { "TRUE", "Google" }, - { "FALSE", "facebook " }, - { "TRUE", "Apache" }, - { "TRUE", "!yahoo" }, - { "TRUE", "" }, - - }; - - String[][] expected3 = new String[][] { { "Sunday" }, { "Monday" }, - { "Tuesday" }, { "Wednesday" }, { "Thursday" }, { "Friday" }, - { "Saturday" }, - - }; - - String[][] expected4 = new String[][] { { "-$10.00" }, { "$0.00" }, - { "$0.00" }, { "$1.00" }, { "$3.00" }, { "$9.00" }, - { "$123.00" }, { "$200.00" }, { "$400.00" }, { "$10,000.00" }, - - }; - String file = testFile("sort.ods"); - app.dispatch(".uno:Open", 3); - submitOpenDlg(file); - calc.waitForExistence(10, 2); - CalcUtil.selectRange("A1:A10"); - app.dispatch(".uno:DataSort"); - SortWarningDlg_Current.click(); - assertEquals(1, SortPage_By1.getSelIndex()); - SortPage.ok(); - sleep(1); - assertArrayEquals("Sorted Data", expected1, CalcUtil.getCellTexts("A1:A10")); - CalcUtil.selectRange("B1:C10"); - app.dispatch(".uno:DataSort"); - - SortPage_By1.select(2); - SortPage_Descending1.check(); - assertFalse(SortPage_By3.isEnabled()); - assertFalse(SortPage_Ascending3.isEnabled()); - assertFalse(SortPage_Descending3.isEnabled()); - SortPage_By2.select(1); - assertTrue(SortPage_By3.isEnabled()); - assertTrue(SortPage_Ascending3.isEnabled()); - assertTrue(SortPage_Descending3.isEnabled()); - SortPage_Descending2.check(); - SortPage_By2.select(0); - assertFalse(SortPage_By3.isEnabled()); - assertFalse(SortPage_Ascending3.isEnabled()); - assertFalse(SortPage_Descending3.isEnabled()); - SortPage_By2.select(1); - SortPage.ok(); - sleep(1); - - assertArrayEquals("Sorted Data", expected2, CalcUtil.getCellTexts("B1:C10")); - CalcUtil.selectRange("D1:D7"); - app.dispatch(".uno:DataSort"); - SortWarningDlg_Current.click(); - SortOptionsPage.select(); - SortOptionsPage_RangeContainsColumnLabels.uncheck(); - SortOptionsPage_CustomSortOrder.check(); - SortOptionsPage_CustomSortOrderList.select("Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"); - SortOptionsPage.ok(); - sleep(1); - assertArrayEquals("Sorted Data", expected3, CalcUtil.getCellTexts("D1:D7")); - - CalcUtil.selectRange("E1:E10"); - app.dispatch(".uno:DataSort"); - SortWarningDlg_Current.click(); - SortPage.ok(); - sleep(1); - assertArrayEquals("Sorted Data", expected4, CalcUtil.getCellTexts("E1:E10")); - } - - /** - * Test insert a chart in a draw document - * 1. New a draw document - * 2. Insert a chart - * 3. Check if the chart is inserted successfully - * @throws Exception - */ - @Test - public void testInsertChartInDraw() throws Exception{ - - // Create a new drawing document - app.dispatch("private:factory/sdraw", 3); - sleep(3); - - // Insert a chart - app.dispatch(".uno:InsertObjectChart", 3); - sleep(3); - - // Verify if the chart is inserted successfully - assertTrue(chart.exists(3)); - // Focus on edit pane - draw.click(5,5); - sleep(1); - } - - /** - * Test insert a chart in a text document - * 1. New a text document - * 2. Insert a chart - * 3. Check if the chart is inserted successfully - * @throws Exception - */ - @Test - public void testInsertChartInDocument() throws Exception{ - - // Create a new text document - app.dispatch("private:factory/swriter", 3); - sleep(3); - - // Insert a chart - app.dispatch(".uno:InsertObjectChart", 3); - sleep(3); - - // Verify if the chart is inserted successfully - assertTrue(chart.exists(3)); - // Focus on edit pane - writer.click(5,5); - sleep(1); - } - - /** - * Test insert a chart in a spreadsheet document - * 1. New a spreadsheet document - * 2. Insert a chart - * 3. Check if the chart is inserted successfully - * @throws Exception - */ - @Test - public void testInsertChartInSpreadsheet() throws Exception{ - - // Create a new spreadsheet document - app.dispatch("private:factory/scalc", 3); - sleep(3); - - // Insert a chart - app.dispatch(".uno:InsertObjectChart", 3); - sleep(3); - Chart_Wizard.ok(); - - // Verify if the chart is inserted successfully - assertTrue(chart.exists(3)); - // Focus on edit pane - calc.click(5,5); - sleep(1); - } - - /** - * Test insert a chart in a presentation document - * 1. New a presentation document - * 2. Insert a chart - * 3. Check if the chart is inserted successfully - * @throws Exception - */ - @Test - public void testInsertChartInPresentation() throws Exception{ - - // Create a new presentation document - app.dispatch("private:factory/simpress?slot=6686"); - PresentationWizard.ok(); - sleep(3); - - // Insert a chart - app.dispatch(".uno:InsertObjectChart", 3); - sleep(3); - - // Verify if the chart is inserted successfully - assertTrue(chart.exists(3)); - // Focus on edit pane - impress.click(5,5); - sleep(1); - } - - /** - * Test insert a table in a draw document - * 1. New a draw document - * 2. Insert a default table - * 3. Check if the table is inserted successfully - * @throws Exception - */ - @Test - public void testInsertTableInDraw() throws Exception{ - - // Create a new drawing document - app.dispatch("private:factory/sdraw", 3); - sleep(3); - - // Insert a table - app.dispatch(".uno:InsertTable", 3); - InsertTable.ok(); - sleep(3); - - // Verify if the table toolbar is active - assertTrue(Table_Toolbar.exists(3)); - - // Focus on edit pane - draw.click(5,5); - sleep(1); - } - - /** - * Test insert a table in a text document - * 1. New a text document - * 2. Insert a default table - * 3. Check if the table is inserted successfully - * @throws Exception - */ - @Test - public void testInsertTableInDocument() throws Exception{ - - // Create a new text document - app.dispatch("private:factory/swriter", 3); - sleep(3); - - // Insert a table - app.dispatch(".uno:InsertTable", 3); - writer_InsertTable.ok(); - sleep(3); - - // Verify if the table toolbar is active - assertTrue(Table_Toolbar.exists(3)); - -// // Check the statusbar to verify if the table is inserted successfully -// assertEquals("Table1:A1", StatusBar.getItemText(7)); - // Focus on edit pane - writer.click(5,5); - sleep(1); - } - - /** - * Test insert a table in a presentation document - * 1. New a presentation document - * 2. Insert a default table - * 3. Check if the table is inserted successfully - * @throws Exception - */ - @Test - public void testInsertTableInPresentation() throws Exception{ - - // Create a new presentation document - app.dispatch("private:factory/simpress?slot=6686"); - PresentationWizard.ok(); - sleep(3); - - // Insert a table - app.dispatch(".uno:InsertTable", 3); - InsertTable.ok(); - sleep(3); - - // Verify if the table toolbar is active - assertTrue(Table_Toolbar.exists(3)); - -// // Check the statusbar to verify if the table is inserted successfully -// assertEquals("Table selected", StatusBar.getItemText(0)); - // Focus on edit pane - impress.click(5,5); - sleep(1); - } - - - /** - * Test insert a function in a spreadsheet document via Sum button - * 1. New a spreadsheet document - * 2. Insert a function via Sum button - * 3. Check if the result is correct - * @throws Exception - */ - @Test - public void testInsertFunctionInSCViaSumButton() throws Exception{ - - // Create a new spreadsheet document - app.dispatch("private:factory/scalc", 3); - sleep(3); - - // Insert source numbers - String sourceNumber1 = "5"; - String sourceNumber2 = "3"; - String expectedResult = "8"; - CalcUtil.selectRange("A1"); - typeKeys(sourceNumber1); - CalcUtil.selectRange("B1"); - typeKeys(sourceNumber2); - - // Insert a function via Sum button - CalcUtil.selectRange("C1"); - SC_InputBar_Sum.click(); - typeKeys("<enter>"); - - // Verify if the calculated result is equal to the expected result - assertEquals("The calculated result", expectedResult, CalcUtil.getCellText("C1")); - } - - /** - * Test insert a function in a spreadsheet document via inputbar - * 1. New a spreadsheet document - * 2. Insert a function via inputbar: POWER - * 3. Check if the result is correct - * @throws Exception - */ - @Test - public void testInsertFunctionInSCViaInputbar() throws Exception{ - - // Create a new spreadsheet document - app.dispatch("private:factory/scalc", 3); - sleep(3); - - // Insert source numbers and expected result - String sourceBase = "5"; - String sourcePower = "3"; - String expectedResult = "125"; - CalcUtil.selectRange("A1"); - typeKeys(sourceBase); - CalcUtil.selectRange("B1"); - typeKeys(sourcePower); - - // Insert a function via inputbar: POWER - CalcUtil.selectRange("D1"); - SC_InputBar_Input.inputKeys("=POWER(A1;B1)"); - typeKeys("<enter>"); - - // Verify if the calculated result is equal to the expected result - assertEquals("The calculated result", expectedResult, CalcUtil.getCellText("D1")); - } - - /** - * Test insert a function in a spreadsheet document via Function Wizard Dialog - * 1. New a spreadsheet document - * 2. Insert a function via Function Wizard Dialog: ABS - * 3. Check if the result is correct - * @throws Exception - */ - @Test - public void testInsertFunctionInSCViaFunctionWizard() throws Exception{ - - // Create a new spreadsheet document - app.dispatch("private:factory/scalc", 3); - sleep(3); - - // Insert source number - String sourceNumber = "-5"; - String expectedResult = "5"; - CalcUtil.selectRange("A1"); - typeKeys(sourceNumber); - typeKeys("<enter>"); - - // Insert a function via Function Wizard Dialog: ABS - CalcUtil.selectRange("B1"); - app.dispatch(".uno:FunctionDialog", 3); - SC_FunctionWizardDlg_FunctionList.doubleClick(5,5); - - SC_FunctionWizardDlg_Edit1.inputKeys("A1"); - SC_FunctionWizardDlg.ok(); - - // Verify if the calculated result is equal to the expected result - assertEquals("The calculated result", expectedResult, CalcUtil.getCellText("B1")); - } -} diff --git a/test/testoo/source/testcase/LongRun.java b/test/testoo/source/testcase/LongRun.java deleted file mode 100644 index 8f22d8de3541..000000000000 --- a/test/testoo/source/testcase/LongRun.java +++ /dev/null @@ -1,373 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - -package testcase; -import static org.junit.Assert.*; -import static org.openoffice.test.vcl.Tester.*; -import static testlib.AppUtil.*; -import static testlib.UIMap.*; - -import java.awt.Rectangle; -import java.awt.image.BufferedImage; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.openoffice.test.common.Condition; -import org.openoffice.test.common.FileUtil; -import org.openoffice.test.common.GraphicsUtil; -import org.openoffice.test.common.SystemUtil; - -import testlib.CalcUtil; -import testlib.Log; - -public class LongRun { - - @Rule - public Log LOG = new Log(); - - /** - * @throws java.lang.Exception - */ - @Before - public void setUp() throws Exception { - app.start(); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - Rectangle rect = new Rectangle(400, 200, 60, 60); - Condition condition = new Condition() { - @Override - public boolean value() { - BufferedImage image = GraphicsUtil.screenshot(rect); - for (int x = 0; x < image.getWidth();x++) { - for (int y = 0; y < image.getHeight();y++) { - if (image.getRGB(x, y) == 0xFF000000) { - return true; - } - } - } - return false; - } - - }; - - /** - * Test New/Save a text document - * - * @throws Exception - */ - @Test - public void testLongRun() throws Exception { - startcenter.menuItem("File->New->Text Document").select(); - writer.focus(); - typeText("Long-running test..."); -// for (int i = 0; i < 1000000; i++) { -// long start = System.currentTimeMillis(); -// calc.menuItem("File->New->Spreadsheet").select(); -//// Tester.click(840, 420); -//// sleep(1); -// -//// condition.waitForTrue("Time out to wait the control to be enabled!", 5, 0.5); -//// Tester.click(400, 200); -//// // Close it by clicking main menu -// calc.menuItem("File->Close").select(); -//// app.dispatch(".uno:CloseDoc"); -//// sleep(0.3); -//// System.out.println(calc.getScreenRectangle()); -//// Tester.click(1670, 70); -// long end = System.currentTimeMillis(); -// System.out.println("Iterator: " + i + ", Elapsed Hours: " + ((end - start))); -// // -// // // sleep(1); -// } - -// app.reset(); - - for(int i = 0 ; i < 1000; i++){ - long start = System.currentTimeMillis(); - saveNewDocument("helloworld_saveas.odt"); - saveNewDocument("helloworld_saveas.ott"); - saveNewDocument("helloworld_saveas.sxw"); - saveNewDocument("helloworld_saveas.stw"); - saveNewDocument("helloworld_saveas.doc"); - saveNewDocument("helloworld_saveas.txt"); - saveNewSpreadsheet("helloworld_saveas.ods"); - saveNewSpreadsheet("helloworld_saveas.ots"); - saveNewSpreadsheet("helloworld_saveas.sxc"); - saveNewSpreadsheet("helloworld_saveas.stc"); - saveNewSpreadsheet("helloworld_saveas.xls"); - saveNewPresentation("helloworld_saveas.odp"); - saveNewPresentation("helloworld_saveas.otp"); - saveNewPresentation("helloworld_saveas.ppt"); - saveNewPresentation("helloworld_saveas.pot"); - saveNewPresentation("helloworld_saveas.sxi"); - saveNewPresentation("helloworld_saveas.sti"); - saveNewMath("math_saveas.sxm"); - saveNewMath("math_saveas.mml"); - saveNewDrawing("draw_saveas.odg"); - saveNewDrawing("draw_saveas.otg"); - saveNewDrawing("draw_saveas.sxd"); - saveNewDrawing("draw_saveas.std"); - long end = System.currentTimeMillis(); - LOG.info("Iterator: " + i + ", Elapsed Hours: " + ((end - start) / 3600000)); - SystemUtil.execScript("ps -eo vsz,rss,comm | grep soffice.bin"); - } - } - - private void saveNewDocument(String file) { - String saveTo = fullPath("temp/" + file); - // Create a new text document - writer.menuItem("File->New->Text Document").select(); - sleep(3); - - // Input some text by keyboard - writer.focus(); - - String text = "~!@#$%^&*()_+QWERTYUIOP{}|:LKJHGFDSAZXCVBNM<>? "; - typeText(text); - writer.menuItem("Edit->Select All").select(); - app.setClipboard(".wrong"); - sleep(1); - typeKeys("<$copy>"); - sleep(1); - - // Verify the text via system clip board - Assert.assertEquals("The typed text into writer", text, - app.getClipboard()); - - // Set the text style - writer.openContextMenu(); - menuItem("Character...").select(); - EffectsPage.select(); - EffectsPage_Color.select("Magenta"); - EffectsPage.ok(); - sleep(2); - - // Save the text document - writer.menuItem("File->Save As...").select(); - FileUtil.deleteFile(saveTo); - submitSaveDlg(saveTo); - if (AlienFormatDlg.exists(3)) - AlienFormatDlg.ok(); - - // Close it by clicking main menu - writer.menuItem("File->Close").select(); -// openStartcenter(); - // Reopen the saved file - writer.menuItem("File->Open...").select(); - submitOpenDlg(saveTo); - writer.waitForExistence(10, 2); - - writer.menuItem("Edit->Select All").select(); - app.setClipboard(".wrong"); - typeKeys("<$copy>"); - sleep(1); - // Verify if the text still exists in the file - Assert.assertEquals("The typed text into writer is saved!", text, - app.getClipboard()); - writer.menuItem("File->Close").select(); - } - - private void saveNewSpreadsheet(String file) { - String saveTo = fullPath("temp/" + file); - String text = "Hello Openoffice"; - writer.menuItem("File->New->Spreadsheet").select(); - calc.waitForExistence(10, 2); - CalcUtil.selectRange("A65536"); - typeKeys(text); - calc.menuItem("File->Save As...").select(); - FileUtil.deleteFile(saveTo); - submitSaveDlg(saveTo); - if (AlienFormatDlg.exists(3)) - AlienFormatDlg.ok(); - // Close it by clicking main menu - calc.menuItem("File->Close").select(); -// openStartcenter(); - // Reopen the saved file - writer.menuItem("File->Open...").select(); - submitOpenDlg(saveTo); - calc.waitForExistence(10, 2); - Assert.assertEquals("The typed text is saved!", text, - CalcUtil.getCellText("A65536")); - calc.menuItem("File->Close").select(); - } - - private void saveNewPresentation(String file) { - String saveTo = fullPath("temp/" + file); - String text = "Hello Openoffice"; - writer.menuItem("File->New->Presentation").select(); - PresentationWizard.ok(); - impress.waitForExistence(10, 2); - sleep(2); - impress.click(0.01, 0.01); - typeKeys(text); - sleep(2); - impress.doubleClick(0.1, 0.5); - - impress.menuItem("File->Save As...").select(); - FileUtil.deleteFile(saveTo); - submitSaveDlg(saveTo); - if (AlienFormatDlg.exists(3)) - AlienFormatDlg.ok(); - // Close it by clicking main menu - impress.menuItem("File->Close").select(); -// openStartcenter(); - // Reopen the saved file - sleep(2); - writer.menuItem("File->Open...").select(); - submitOpenDlg(saveTo); - impress.waitForExistence(10, 2); - sleep(2); - impress.click(3, 3); - typeKeys("<tab><enter>"); - impress.menuItem("Edit->Select All").select(); - // app.setClipboard(".wrong"); - typeKeys("<$copy>"); - sleep(1); - Assert.assertEquals("The typed text is saved!", text, - app.getClipboard()); - impress.menuItem("File->Close").select(); - } - - - /** - * New/Save a draw document 1. New a draw document 2. Insert a picture 3. - * Save it as the input filename 4. Reopen the saved file 5. Check if the - * picture is still there - * - * @param filename - * : filename to be saved - * @throws Exception - */ - public void saveNewDrawing(String filename) { - String saveTo = fullPath("temp/" + filename); - String bmp_green = testFile("pure_green_64x64.bmp"); - - // Create a new drawing document - writer.menuItem("File->New->Drawing").select(); - sleep(3); - - // Insert a picture fully filled with green - draw.menuItem("Insert->Picture->From File...").select(); - submitOpenDlg(bmp_green); - sleep(3); - // Focus on edit pane - draw.click(5, 5); - sleep(1); - - // Verify if the picture is inserted successfully - Rectangle rectangle = GraphicsUtil.findRectangle( - draw.getScreenRectangle(), 0xFF00FF00); - assertNotNull("Green rectangle: " + rectangle, rectangle); - - // Save the drawing - draw.menuItem("File->Save As...").select(); - FileUtil.deleteFile(saveTo); - submitSaveDlg(saveTo); - // If the format is supported by OO1.0, ask whether to change to the - // latest format - if (AlienFormatDlg.exists(3)) - AlienFormatDlg.ok(); // Keep the current format - - // Close it by clicking main menu - draw.menuItem("File->Close").select(); -// openStartcenter(); - - // Reopen the saved file - writer.menuItem("File->Open...").select(); - submitOpenDlg(saveTo); - draw.waitForExistence(10, 2); - draw.click(5, 5); - sleep(1); - // Verify if the picture still exists in the file - Rectangle rectangle1 = GraphicsUtil.findRectangle( - draw.getScreenRectangle(), 0xFF00FF00); - assertNotNull("Green rectangle: " + rectangle1, rectangle1); - draw.menuItem("File->Close").select(); - } - - - /** - * New/Save a math 1. New a math 2. Insert a formula 3. Save it as the input - * filename 4. Reopen the saved file 5. Check if the formula is still there - * - * @param filename - * : filename to be saved - * @throws Exception - */ - public void saveNewMath(String filename) { - String saveTo = fullPath("temp/" + filename); - - // Create a new math - writer.menuItem("File->New->Formula").select(); - sleep(3); - - // Verify if the Elements window is active - assertTrue(math_ElementsWindow.exists(3)); - - // Insert a formula - String text = "5 times 3 = 15"; - typeText(text); - math_EditWindow.menuItem("Edit->Select All").select(); - typeKeys("<$copy>"); - sleep(1); - - // Verify the text via system clip board - assertEquals("The typed formula into math", text, app.getClipboard()); - - // Save the formula - math_EditWindow.menuItem("File->Save As...").select(); - FileUtil.deleteFile(saveTo); - submitSaveDlg(saveTo); - // If the format is supported by OO1.0, ask whether to change to the - // latest format - if (AlienFormatDlg.exists(3)) - AlienFormatDlg.ok(); // Keep the current format - - // Close it by clicking main menu - math_EditWindow.menuItem("File->Close").select(); -// openStartcenter(); - - // Reopen the saved file - writer.menuItem("File->Open...").select(); - submitOpenDlg(saveTo); - math_EditWindow.waitForExistence(10, 2); - - // Verify if the formula still exists in the file - math_EditWindow.menuItem("Edit->Select All").select(); - typeKeys("<$copy>"); - sleep(1); - assertEquals("The typed formula into math is saved", text, - app.getClipboard()); - - // Close the file to avoid the app closing the Elements window - // automatically - math_EditWindow.menuItem("File->Close").select(); - } - -} diff --git a/test/testoo/source/testcase/SayHelloToOO.java b/test/testoo/source/testcase/SayHelloToOO.java deleted file mode 100644 index 1897643b04b8..000000000000 --- a/test/testoo/source/testcase/SayHelloToOO.java +++ /dev/null @@ -1,86 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testcase; - -import static org.junit.Assert.*; -import static testlib.AppUtil.*; -import static testlib.UIMap.*; - -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; - -import testlib.CalcUtil; -import testlib.Log; - -/** - * Before running the testing class, you need specify the AOO location firstly with system property openoffice.home. - * - * @author test - * - */ -public class SayHelloToOO { - - /** - * TestCapture helps us to do - * 1. Take a screenshot when failure occurs. - * 2. Collect extra data when OpenOffice crashes. - */ - @Rule - public Log LOG = new Log(); - - - /** - * Do some setup task before running test - * @throws Exception - */ - @Before - public void setUp() throws Exception { - //Start OpenOffice - app.start(); - } - - /** - * Clean task after testing - * @throws Exception - */ - @After - public void tearDown() throws Exception { - //Close OpenOffice - app.close(); - } - - /** - * Implement the case - */ - @Test - public void helloOO() { - startcenter.menuItem("File->New->Spreadsheet").select(); - calc.waitForExistence(10, 3); - typeKeys("Hello"); - assertEquals("Assert", "Hello", CalcUtil.getCellInput("A1")); - } - -} diff --git a/test/testoo/source/testcase/SmokeTest.java b/test/testoo/source/testcase/SmokeTest.java deleted file mode 100644 index b0a5d68171b9..000000000000 --- a/test/testoo/source/testcase/SmokeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testcase; - -import static org.junit.Assert.*; -import static org.openoffice.test.common.FileUtil.*; -import static testlib.AppUtil.*; -import static testlib.UIMap.*; - -import java.io.File; - -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; - -import testlib.Log; - -public class SmokeTest { - - @Rule - public Log LOG = new Log(); - - File smoketestOutput; - - @Before - public void setUp() throws Exception { - app.getOpenOffice().cleanUserInstallation(); - app.start(); - smoketestOutput = new File(oo.getUserInstallation(), "user/temp"); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - @Test - public void testMacro() { - testFile("TestExtension.oxt"); - String file = testFile("smoketestdoc.sxw"); - // Open sample file smoketestdoc.sxw - app.dispatch(".uno:Open", 3); - submitOpenDlg(file); - writer.waitForEnabled(10, 2); - // Run test cases - app.dispatch("vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?language=Basic&location=document", 120); - String smoketestlog = readFileAsString(new File(smoketestOutput, "smoketest.log")); - String testclosurelog = readFileAsString(new File(smoketestOutput, "testclosure.log")); - LOG.info(smoketestlog + "\n" + testclosurelog); - assertTrue("No Error", !smoketestlog.contains("error") && !testclosurelog.contains("error")); - - } -} diff --git a/test/testoo/source/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java b/test/testoo/source/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java deleted file mode 100644 index c113d9843b5c..000000000000 --- a/test/testoo/source/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java +++ /dev/null @@ -1,211 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -/** - * - */ -package testcase.formula.catalog; - -import static testlib.AppUtil.*; -import static testlib.UIMap.*; -import static org.junit.Assert.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import testlib.Log; - -/** - * - */ -public class AddDeleteSymbolsFromCatalog { - - @Rule - public Log LOG = new Log(); - - @Before - public void setUp() throws Exception { - app.start(); - - // New a formula document - startcenter.menuItem("File->New->Formula").select(); - sleep(3); - - // Click catalog button - math_CatalogButton.click(); - sleep(1); - - // Verify if the "Symbols" dialog pop up - assertTrue("Symbols dialog does not pop up", math_SymbolsDlg.exists(3)); - - // Select "Special", click "Edit" button - math_SymbolsDlgListbox.select("Special"); - math_SymbolsDlgEditButton.click(); - sleep(1); - - // Verify if the "Edit Symbols" dialog pop up - assertTrue("Edit Symbols dialog does not pop up", math_EditSymbolsDlg.exists(3)); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - /** - * Test add custom symbols from Catalog->Symbols - * @throws Exception - */ - @Test - public void testAddSymbolFromCatalog() throws Exception{ - - // Choose a symbol which is not in the list, click "Add" and "OK" - String selectedSymbol; - boolean bSelectSymbolNotInList; - int nListCount; - int nIndex = 1; - do { - math_EditSymbolsDlgViewControl.click(100*nIndex, 10); // risk: after 6 or 7 circles, this will click out of ViewControl - sleep(1); - selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - nIndex++; - // Find if the selected symbol is already in the list - bSelectSymbolNotInList = false; - nListCount = math_EditSymbolsDlgSymbol.getItemCount(); - for (int i=0; i<nListCount; i++) { - if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))) { - bSelectSymbolNotInList = true; - break; - } - } - } while (bSelectSymbolNotInList); - math_EditSymbolsDlgAdd.click(); - math_EditSymbolsDlg.ok(); - sleep(1); - - // Verify if the symbol is added to Symbol set - math_SymbolsDlgEditButton.click(); - bSelectSymbolNotInList = false; - nListCount = math_EditSymbolsDlgSymbol.getItemCount(); - for (int i=0; i<nListCount; i++) { - if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))) { - bSelectSymbolNotInList = true; - break; - } - } - assertTrue("Symbol is not added to Symbol set", bSelectSymbolNotInList); - - // Close all dialogs - math_EditSymbolsDlg.cancel(); - math_SymbolsDlg.close(); - app.dispatch(".uno:CloseDoc"); - } - - /** - * Test modify font of custom symbols from Catalog->Symbols - * @throws Exception - */ - @Test - public void testModifySymbolFontFromCatalog() throws Exception{ - - // Modify the font of selected symbol - //String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - int oldSymbolFontIndex = math_EditSymbolsDlgFont.getSelIndex(); - int modifiedSymbolFondIndex = (oldSymbolFontIndex+1==math_EditSymbolsDlgFont.getItemCount()) ? 0 : (oldSymbolFontIndex+1); - math_EditSymbolsDlgFont.select(modifiedSymbolFondIndex); // select the next font of old font - String modifiedSymbolFont = math_EditSymbolsDlgFont.getSelText(); - String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - math_EditSymbolsDlgModify.click(); - math_EditSymbolsDlg.ok(); - sleep(1); - - // Verify if the font of symbol is modified successfully - math_SymbolsDlgEditButton.click(); - math_EditSymbolsDlgSymbol.select(selectedSymbol); - assertEquals("Font of symbol is not modified successfully", modifiedSymbolFont, math_EditSymbolsDlgFont.getSelText()); - - // Close all dialogs - math_EditSymbolsDlg.cancel(); - math_SymbolsDlg.close(); - app.dispatch(".uno:CloseDoc"); - } - - /** - * Test modify typeface of custom symbols from Catalog->Symbols - * @throws Exception - */ - @Test - public void testModifySymbolTypefaceFromCatalog() throws Exception{ - - // Modify the typeface of selected symbol -// String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - int oldSymbolTypefaceIndex = math_EditSymbolsDlgTypeface.getSelIndex(); - int modifiedSymbolTypefaceIndex = (oldSymbolTypefaceIndex+1==math_EditSymbolsDlgTypeface.getItemCount()) ? 0 : (oldSymbolTypefaceIndex+1); - math_EditSymbolsDlgTypeface.select(modifiedSymbolTypefaceIndex); // select the next typeface of old typeface - String modifiedSymbolTypeface= math_EditSymbolsDlgTypeface.getSelText(); - String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - math_EditSymbolsDlgModify.click(); - math_EditSymbolsDlg.ok(); - sleep(1); - - // Verify if the typeface of symbol is modified successfully - math_SymbolsDlgEditButton.click(); - math_EditSymbolsDlgSymbol.select(selectedSymbol); - assertEquals("Typeface of symbol is not modified successfully", modifiedSymbolTypeface, math_EditSymbolsDlgTypeface.getSelText()); - - // Close all dialogs - math_EditSymbolsDlg.cancel(); - math_SymbolsDlg.close(); - app.dispatch(".uno:CloseDoc"); - } - - /** - * Test delete custom symbols from Catalog->Symbols - * @throws Exception - */ - @Test - public void testDeleteSymbolFromCatalog() throws Exception{ - - // Delete the selected symbol - String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - math_EditSymbolsDlgDelete.click(); - math_EditSymbolsDlg.ok(); - sleep(1); - - // Verify if the selected symbol is deleted successfully - math_SymbolsDlgEditButton.click(); - boolean isDeleted = true; - for (int i=0; i<math_EditSymbolsDlgSymbol.getItemCount(); i++) { - if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))){ - isDeleted = false; - break; - } - } - assertTrue("Symbol is not deleted successfully", isDeleted); - - // Close all dialogs - math_EditSymbolsDlg.cancel(); - math_SymbolsDlg.close(); - app.dispatch(".uno:CloseDoc"); - } -} diff --git a/test/testoo/source/testcase/formula/catalog/InputCharacterFromCatalogDlg.java b/test/testoo/source/testcase/formula/catalog/InputCharacterFromCatalogDlg.java deleted file mode 100644 index 604fdc6e121b..000000000000 --- a/test/testoo/source/testcase/formula/catalog/InputCharacterFromCatalogDlg.java +++ /dev/null @@ -1,155 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -/** - * - */ -package testcase.formula.catalog; - -import static testlib.AppUtil.*; -import static testlib.UIMap.*; -import static org.junit.Assert.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import testlib.Log; - -/** - * - */ -public class InputCharacterFromCatalogDlg { - - @Rule - public Log LOG = new Log(); - - @Before - public void setUp() throws Exception { - app.start(); - - // New a formula document - startcenter.menuItem("File->New->Formula").select(); - sleep(3); - - // Click catalog button - math_CatalogButton.click(); - sleep(1); - - // Verify if the "Symbols" dialog pop up - assertTrue("Symbols dialog does not pop up", math_SymbolsDlg.exists(3)); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - /** - * Test input Greek character from Catalog->Symbols - * @throws Exception - */ - @Test - public void testInputGreekFromCatalog() throws Exception{ - - // Select "Greek", click "Edit" button to get the selected Symbol - math_SymbolsDlgListbox.select("Greek"); - math_SymbolsDlgEditButton.click(); - sleep(1); - String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - math_EditSymbolsDlg.ok(); - sleep(1); - - // Insert the selected symbol - math_SymbolsDlgInsertButton.click(); - math_SymbolsDlgCloseButton.click(); - - // Verify if the symbol is inserted successfully - math_EditWindow.activate(); - math_EditWindow.menuItem("Edit->Select All").select(); - math_EditWindow.menuItem("Edit->Copy").select(); - sleep(1); - assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard()); // add "%" in the front, add " " in the end - - // Close all dialogs - app.dispatch(".uno:CloseDoc"); - } - - /** - * Test input iGreek character from Catalog->Symbols - * @throws Exception - */ - @Test - public void testInputIGreekFromCatalog() throws Exception{ - - // Select "iGreek", click "Edit" button to get the selected Symbol - math_SymbolsDlgListbox.select("iGreek"); - math_SymbolsDlgEditButton.click(); - sleep(1); - String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - math_EditSymbolsDlg.ok(); - sleep(1); - - // Insert the selected symbol - math_SymbolsDlgInsertButton.click(); - math_SymbolsDlgCloseButton.click(); - - // Verify if the symbol is inserted successfully - math_EditWindow.click(5, 5); - math_EditWindow.menuItem("Edit->Select All").select(); - math_EditWindow.menuItem("Edit->Copy").select(); - sleep(1); - assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard()); // add "%" in the front, add " " in the end - - // Close all dialogs - app.dispatch(".uno:CloseDoc"); - } - - /** - * Test input Special character from Catalog->Symbols - * @throws Exception - */ - @Test - public void testInputSpecialFromCatalog() throws Exception{ - - // Select "Special", "Insert" the default first symbol - math_SymbolsDlgListbox.select("Special"); - math_SymbolsDlgInsertButton.click(); - - // Click "Edit" button to get the selected Symbol - math_SymbolsDlgEditButton.click(); - sleep(1); - String selectedSymbol = math_EditSymbolsDlgSymbol.getText(); - math_EditSymbolsDlg.ok(); - math_SymbolsDlgCloseButton.click(); - - // Verify if the symbol is inserted successfully - math_EditWindow.click(5, 5); - math_EditWindow.menuItem("Edit->Select All").select(); - math_EditWindow.menuItem("Edit->Copy").select(); - sleep(1); - assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard()); // add "%" in the front, add " " in the end - - // Close all dialogs - app.dispatch(".uno:CloseDoc"); - } -} diff --git a/test/testoo/source/testcase/formula/importexport/CreateFormulaInDifferentWays.java b/test/testoo/source/testcase/formula/importexport/CreateFormulaInDifferentWays.java deleted file mode 100644 index 87d0a5c258be..000000000000 --- a/test/testoo/source/testcase/formula/importexport/CreateFormulaInDifferentWays.java +++ /dev/null @@ -1,232 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -/** - * - */ -package testcase.formula.importexport; - -import static testlib.AppUtil.*; -import static testlib.UIMap.*; -import static org.junit.Assert.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.openoffice.test.common.FileUtil; -import testlib.Log; - -/** - * - */ -public class CreateFormulaInDifferentWays { - - @Rule - public Log LOG = new Log(); - - @Before - public void setUp() throws Exception { - app.start(); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - /** - * Test elements window active and inactive - * @throws Exception - */ - @Test - public void testElementsWindowActive() throws Exception{ - - // New a formula document - startcenter.menuItem("File->New->Formula").select(); - sleep(3); - - // Check if the "View->Elements" menu is selected - math_EditWindow.menuItem("View").select(); - boolean viewElements = math_EditWindow.menuItem("View->Elements").isSelected(); - - // If the menu is selected, the Elements window should display - assertEquals("Elements window displays correctly", viewElements, math_ElementsWindow.exists()); - - // Active or inactive the Elements window, it should display correctly - math_EditWindow.menuItem("View->Elements").select(); - sleep(1); - math_EditWindow.menuItem("View").select(); - viewElements = math_EditWindow.menuItem("View->Elements").isSelected(); - assertEquals("Elements window display correctly", viewElements, math_ElementsWindow.exists()); - } - - /** - * Test create a formula from Elements window - * @throws Exception - */ - @Test - public void testCreateFormulaFromElementsWindow() throws Exception{ - String saveTo = fullPath("temp/" + "FormulaFromElements.odf"); - - // New a formula document - startcenter.menuItem("File->New->Formula").select(); - sleep(3); - - // Make Elements window pop up - math_EditWindow.menuItem("View").select(); - if (!math_EditWindow.menuItem("View->Elements").isSelected()) { - math_EditWindow.menuItem("View->Elements").select(); - } - math_EditWindow.click(1, 1); - - // Click a formula in Elements window and edit the formula in the commands window - math_ElementsRelations.click(); - math_ElementsRelationsNotEqual.click(); - sleep(0.5); - typeKeys("a"); - math_EditWindow.menuItem("Edit->Next Marker").select(); - sleep(0.5); - typeKeys("b"); - String insertedFormula = "a <> b"; - - // Verify if the formula is correct - app.dispatch(".uno:Select"); - app.dispatch(".uno:Copy"); - sleep(1); - assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard()); // add " " - - // Save the formula - math_EditWindow.menuItem("File->Save As...").select(); - FileUtil.deleteFile(saveTo); - submitSaveDlg(saveTo); - - // Close and reopen it - math_EditWindow.menuItem("File->Close").select(); - openStartcenter(); - startcenter.menuItem("File->Open...").select(); - submitOpenDlg(saveTo); - math_EditWindow.waitForExistence(10, 2); - - // Verify if the formula still exists in the file, and correct - math_EditWindow.menuItem("Edit->Select All").select(); - app.dispatch(".uno:Copy"); - sleep(1); - assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard()); // add " " - - // Close all dialogs - app.dispatch(".uno:CloseDoc"); - } - - /** - * Test create a formula from right click menu in equation editor - * @throws Exception - */ - @Test - public void testCreateFormulaFromRightClickMenu() throws Exception{ - String saveTo = fullPath("temp/" + "FormulaFromRightClickMenu.odf"); - - // New a formula document - startcenter.menuItem("File->New->Formula").select(); - sleep(3); - - // Right click in equation editor, choose "Functions->More->arcsin(x)", input a - math_EditWindow.rightClick(5, 5); - typeKeys("<down>"); - typeKeys("<down>"); - typeKeys("<down>"); - typeKeys("<down>"); - typeKeys("<enter>"); - sleep(0.5); - typeKeys("<up>"); - typeKeys("<enter>"); - sleep(0.5); - typeKeys("<enter>"); - sleep(0.5); - typeKeys("a"); - String insertedFormula = "arcsin(a)"; - - // Verify if the formula is correct - math_EditWindow.menuItem("Edit->Select All").select(); - app.dispatch(".uno:Copy"); - sleep(1); - assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard()); // add " " - - // Save the formula - math_EditWindow.menuItem("File->Save As...").select(); - FileUtil.deleteFile(saveTo); - submitSaveDlg(saveTo); - - // Close and reopen it - math_EditWindow.menuItem("File->Close").select(); - openStartcenter(); - startcenter.menuItem("File->Open...").select(); - submitOpenDlg(saveTo); - math_EditWindow.waitForExistence(10, 2); - - // Verify if the formula still exists in the file, and correct - math_EditWindow.menuItem("Edit->Select All").select(); - app.dispatch(".uno:Copy"); - sleep(1); - assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard()); // add " " - - // Close all dialogs - app.dispatch(".uno:CloseDoc"); - } - - /** - * Test undo/redo in math - * @throws Exception - */ - @Test - public void testUndoRedoInMath() throws Exception{ - - // New a formula document - startcenter.menuItem("File->New->Formula").select(); - sleep(3); - - // Make Elements window pop up (For AOO3.4: View->Elements) - math_EditWindow.menuItem("View").select(); - if (!math_EditWindow.menuItem("View->Elements").isSelected()) { - math_EditWindow.menuItem("View->Elements").select(); - } - math_EditWindow.click(1, 1); - - // Click a formula in Elements window and edit the formula in the commands window - math_ElementsUnaryBinary.click(); - math_ElementsUnaryBinaryPlus.click(); - sleep(1); - typeKeys("a"); // "+a"; - - // Undo and verify if it works fine - math_EditWindow.menuItem("Edit->Undo: Insert").select(); - math_EditWindow.menuItem("Edit->Select All").select(); - app.dispatch(".uno:Copy"); - assertEquals("The inserted formula into math", "+<?> ", app.getClipboard()); // add " " - - // Redo and verify if it works fine - math_EditWindow.menuItem("Edit->Redo: Insert").select(); - math_EditWindow.menuItem("Edit->Select All").select(); - app.dispatch(".uno:Copy"); - assertEquals("The inserted formula into math", "+a ", app.getClipboard()); // add " " - } -} diff --git a/test/testoo/source/testcase/sc/sheet/InsertSheet.java b/test/testoo/source/testcase/sc/sheet/InsertSheet.java deleted file mode 100644 index 528abf00c225..000000000000 --- a/test/testoo/source/testcase/sc/sheet/InsertSheet.java +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ -package testcase.sc.sheet; - -import static org.junit.Assert.*; -import static testlib.UIMap.*; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import testlib.Log; - -/** - * Before running the testing class, you need specify the AOO location firstly with system property openoffice.home. - * - * - */ - -public class InsertSheet { - - @Rule - public Log LOG = new Log(); - - @Before - public void setUp() throws Exception { - app.start(); - app.dispatch("private:factory/scalc"); - calc.waitForExistence(10, 3); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - /** - * Insert one sheet in different place - * @throws Exception - */ - @Test - public void testInsertMultipleSheet(){ - //Open Insert Sheet dialog via main menu Insert-> Sheet - calc.menuItem("Insert->Sheet...").select(); - //Change new sheet number into 3 to insert 3 new sheet one time - SCSheetNumber.setText("3"); - //Click OK button to create sheet with default setting - SCInsertSheetDlg.ok(); - //Verify new sheets have been inserted before Sheet1 - calc.menuItem("Edit->Sheet->Select...").select(); - assertArrayEquals(new String[] { "Sheet4", "Sheet5", "Sheet6", "Sheet1", "Sheet2", "Sheet3" }, SCSheetsList.getItemsText()); - SCSelectSheetsDlg.ok(); - } - - /** - * Insert one sheet in different place - * @throws Exception - */ - @Test - public void testInsertOneSheet(){ - //Open Insert Sheet dialog via main menu Insert-> Sheet - calc.menuItem("Insert->Sheet...").select(); - //Click OK button to create sheet with default setting - SCInsertSheetDlg.ok(); - //Verify new sheet has been inserted before Sheet1 - calc.menuItem("Edit->Sheet->Select...").select(); - assertArrayEquals(new String[]{"Sheet4", "Sheet1", "Sheet2", "Sheet3"},SCSheetsList.getItemsText()); - SCSelectSheetsDlg.ok(); - } -} diff --git a/test/testoo/source/testcase/sc/subtotals/SubtotalsFunctions.java b/test/testoo/source/testcase/sc/subtotals/SubtotalsFunctions.java deleted file mode 100644 index c62c4902878a..000000000000 --- a/test/testoo/source/testcase/sc/subtotals/SubtotalsFunctions.java +++ /dev/null @@ -1,329 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - -/** - * - */ -package testcase.sc.subtotals; - -import static org.junit.Assert.*; -import static org.openoffice.test.vcl.Tester.*; -import static testlib.AppUtil.*; -import static testlib.UIMap.*; - -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; - -import testlib.CalcUtil; -import testlib.Log; - -/** - * - * - */ -public class SubtotalsFunctions { - - @Rule - public Log LOG = new Log(); - - @Before - public void setUp() throws Exception { - app.start(); - String file = testFile("sc/SubtotalsSampleFile.ods"); - startcenter.menuItem("File->Open...").select(); - submitOpenDlg(file); - sleep(2); - CalcUtil.selectRange("A1:E7"); - calc.menuItem("Data->Subtotals...").select(); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - /** - * - * Verify Average function in SubTotals - */ - @Test - public void testAverage() { - SCSubTotalsGroupByListBox.select("Team"); - SCCalcSubTotalForColumns.click(10, 25); - SCCalcSubTotolsFuncionList.select("Average"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "2", "A", "Chcomic" }, - { "CS", "30", "5", "A", "Ally" }, { "MS", "10", "1", "A", "Joker" }, { "", "20", "", "A Average", "" }, { "BS", "20", "4", "B", "Elle" }, - { "MS", "10", "3", "B", "Kevin" }, { "", "15", "", "B Average", "" }, { "BS", "20", "6", "C", "Sweet" }, { "", "20", "", "C Average", "" }, - { "", "18.33333333", "", "Grand Total", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify Count Numbers only function in SubTotals - */ - @Test - public void testCountNumbersOnly() { - SCCalcSubTotalForColumns.click(10, 45); - SCCalcSubTotolsFuncionList.select("Count (numbers only)"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS Count", "", "3", "", "" }, { "CS", "30", "5", "A", "Ally" }, - { "CS Count", "", "1", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Count", "", "2", "", "" }, - { "Grand Total", "", "6", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify Max Numbers function in SubTotals - */ - @Test - public void testMax() { - SCCalcSubTotalForColumns.click(10, 45); - SCCalcSubTotolsFuncionList.select("Max"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS Max", "", "6", "", "" }, { "CS", "30", "5", "A", "Ally" }, - { "CS Max", "", "5", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Max", "", "3", "", "" }, - { "Grand Total", "", "6", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify Min Numbers function in SubTotals - */ - @Test - public void testMin() { - SCCalcSubTotalForColumns.click(10, 45); - SCCalcSubTotolsFuncionList.select("Min"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS Min", "", "2", "", "" }, { "CS", "30", "5", "A", "Ally" }, - { "CS Min", "", "5", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Min", "", "1", "", "" }, - { "Grand Total", "", "1", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify Product function in SubTotals - */ - @Test - public void testProduct() { - SCCalcSubTotalForColumns.click(10, 45); - SCCalcSubTotolsFuncionList.select("Product"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS Product", "", "48", "", "" }, { "CS", "30", "5", "A", "Ally" }, - { "CS Product", "", "5", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Product", "", "3", "", "" }, - { "Grand Total", "", "720", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify StDevP (Population) function in SubTotals - */ - @Test - public void testStDevPPopulation() { - SCCalcSubTotalForColumns.click(10, 45); - SCCalcSubTotolsFuncionList.select("StDevP (Population)"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS StDev", "", "1.63299316", "", "" }, - { "CS", "30", "5", "A", "Ally" }, { "CS StDev", "", "0", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, - { "MS StDev", "", "1", "", "" }, { "Grand Total", "", "1.70782513", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify sum function in SubTotals - */ - @Test - public void testSum() { - SCCalcSubTotalForColumns.click(10, 45); - SCCalcSubTotolsFuncionList.select("Sum"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS Sum", "", "12", "", "" }, { "CS", "30", "5", "A", "Ally" }, - { "CS Sum", "", "5", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Sum", "", "4", "", "" }, - { "Grand Total", "", "21", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify Var Sample function in SubTotals - */ - @Test - public void testVarSample() { - SCCalcSubTotalForColumns.click(10, 45); - SCCalcSubTotolsFuncionList.select("Var (Sample)"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS Var", "", "4", "", "" }, { "CS", "30", "5", "A", "Ally" }, - { "CS Var", "", "#DIV/0!", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Var", "", "2", "", "" }, - { "Grand Total", "", "3.5", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - } - - /** - * - * Verify Don't sort in Sub totals - */ - @Test - public void testDoNotSortOption() { - SCSubTotalsGroupByListBox.select("Team"); - SCCalcSubTotalForColumns.click(10, 25); - SCSubTotalsOptionsTabPage.select(); - SCSubtotalsPreSortToGroupCheckBox.uncheck(); - SCSubTotalsOptionsTabPage.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "", "20", "", "B Sum", "" }, { "BS", "20", "6", "C", "Sweet" }, { "", "20", "", "C Sum", "" }, { "BS", "20", "2", "A", "Chcomic" }, - { "CS", "30", "5", "A", "Ally" }, { "MS", "10", "1", "A", "Joker" }, { "", "60", "", "A Sum", "" }, { "MS", "10", "3", "B", "Kevin" }, - { "", "10", "", "B Sum", "" }, { "", "110", "", "Grand Total", "" } }, CalcUtil.getCellTexts("A1:E12")); - } - - /** - * - * Verify SubTotals Options default UI - */ - @Test - public void testDefaultUI() { - assertArrayEquals("Group List: ", new String[] { "- none -", "Level", "Code", "No.", "Team", "Name" }, SCSubTotalsGroupByListBox.getItemsText()); - - SCSubTotalsOptionsTabPage.select(); - assertFalse(SCSubtotalsInsertPageBreakCheckBox.isChecked()); - assertFalse(SCSubtotalsCaseSensitiveCheckBox.isChecked()); - assertTrue(SCSubtotalsPreSortToGroupCheckBox.isChecked()); - assertTrue(SCSubtotalSortAscendingRadioButton.isChecked()); - assertFalse(SCSubtotalSortDescendingRadioButton.isChecked()); - assertFalse(SCSubtotalsIncludeFormatsCheckBox.isChecked()); - assertFalse(SCSubtotalsCustomSortOrderCheckBox.isChecked()); - assertFalse(SCSubtotalsCustomSortListBox.isEnabled()); - SCSubTotalsOptionsTabPage.ok(); - } - - /** - * - * Verify Subtotals using all group - */ - @Test - public void testUsingAllGroup() { - SCSubTotalsGroup1Dialog.select(); - SCSubTotalsGroupByListBox.select("Level"); - SCCalcSubTotalForColumns.click(10, 45); - SCSubTotalsGroup2Dialog.select(); - SCSubTotalsGroupByListBox.select("Team"); - SCCalcSubTotalForColumns.click(10, 25); - SCCalcSubTotolsFuncionList.select("Max"); - SCSubTotalsGroup3Dialog.select(); - SCSubTotalsGroupByListBox.select("Name"); - SCCalcSubTotalForColumns.click(10, 25); - SCSubTotalsGroup1Dialog.select(); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "2", "A", "Chcomic" }, - { "", "20", "", "", "Chcomic Sum" }, { "", "20", "", "A Max", "" }, { "BS", "20", "4", "B", "Elle" }, { "", "20", "", "", "Elle Sum" }, - { "", "20", "", "B Max", "" }, { "BS", "20", "6", "C", "Sweet" }, { "", "20", "", "", "Sweet Sum" }, { "", "20", "", "C Max", "" }, - { "BS Sum", "", "12", "", "" }, { "CS", "30", "5", "A", "Ally" }, { "", "30", "", "", "Ally Sum" }, { "", "30", "", "A Max", "" }, - { "CS Sum", "", "5", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "", "10", "", "", "Joker Sum" }, { "", "10", "", "A Max", "" }, - { "MS", "10", "3", "B", "Kevin" }, { "", "10", "", "", "Kevin Sum" }, { "", "10", "", "B Max", "" }, { "MS Sum", "", "4", "", "" }, - { "Grand Total", "", "21", "", "" } }, CalcUtil.getCellTexts("A1:E23")); - } - - - /** - * - * Verify Subtotals_Recalculate and refresh results when data rows deleted. - */ - @Test - public void testRecalculateAfterRowDeleted() { - SCCalcSubTotalForColumns.click(10,45); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table before deleting row", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "6", "C", "Sweet" }, { "BS", "20", "2", "A", "Chcomic" }, { "BS Sum", "", "12", "", "" }, { "CS", "30", "5", "A", "Ally" }, - { "CS Sum", "", "5", "", "" }, { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Sum", "", "4", "", "" }, - { "Grand Total", "", "21", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - - CalcUtil.selectRange("A3:E3"); - calc.menuItem("Edit->Delete Cells...").select(); - SCDeleteCellsDeleteRowsRadioButton.check(); - SCDeleteCellsDialog.ok(); - sleep(1); - - assertArrayEquals("Subtotal table after deleting row", new String[][] { { "Level", "Code", "No.", "Team", "Name" }, { "BS", "20", "4", "B", "Elle" }, - { "BS", "20", "2", "A", "Chcomic" }, { "BS Sum", "", "6", "", "" }, { "CS", "30", "5", "A", "Ally" }, { "CS Sum", "", "5", "", "" }, - { "MS", "10", "1", "A", "Joker" }, { "MS", "10", "3", "B", "Kevin" }, { "MS Sum", "", "4", "", "" }, { "Grand Total", "", "15", "", "" }, - { "", "", "", "", "" } }, CalcUtil.getCellTexts("A1:E11")); - - } - - /** - * - * Verify Recalculates when source data changed with Average function in SubTotals - */ - @Test - public void testRecalculateWhenDataChanged() { - SCSubTotalsGroupByListBox.select("Team"); - SCCalcSubTotalForColumns.click(10,25); - SCCalcSubTotolsFuncionList.select("Average"); - SCSubTotalsGroup1Dialog.ok(); - sleep(1); - - CalcUtil.selectRange("B4"); - typeKeys("40" + "<enter>"); - sleep(1); - assertEquals("30",CalcUtil.getCellText("B5")); - assertEquals("23.33333333",CalcUtil.getCellText("B11")); - - CalcUtil.selectRange("B7"); - typeKeys("50" + "<enter>"); - sleep(1); - assertEquals("35",CalcUtil.getCellText("B8")); - assertEquals("30",CalcUtil.getCellText("B11")); - - CalcUtil.selectRange("B9"); - typeKeys("30" + "<enter>"); - sleep(1); - assertEquals("30",CalcUtil.getCellText("B10")); - assertEquals("31.66666667",CalcUtil.getCellText("B11")); - } -} diff --git a/test/testoo/source/testcase/sc/validity/ValidityDateSupport1024Columns.java b/test/testoo/source/testcase/sc/validity/ValidityDateSupport1024Columns.java deleted file mode 100644 index 9199bbb67a5f..000000000000 --- a/test/testoo/source/testcase/sc/validity/ValidityDateSupport1024Columns.java +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testcase.sc.validity; - -import static testlib.AppUtil.*; -import static testlib.UIMap.*; - -import java.io.File; - -import org.junit.After; -import static org.junit.Assert.*; -import static org.openoffice.test.vcl.Tester.*; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.openoffice.test.vcl.IDList; -import org.openoffice.test.vcl.widgets.VclMessageBox; - - -import testlib.CalcUtil; -import testlib.Log; - - -public class ValidityDateSupport1024Columns { - private static IDList idList = new IDList(new File("./ids")); - public static final VclMessageBox ActiveMsgBox = new VclMessageBox(idList.getId("UID_ACTIVE"), "Message on message box."); - - @Rule - public Log LOG = new Log(); - - @Before - public void setUp() throws Exception { - app.start(); - } - - @After - public void tearDown() throws Exception { - app.close(); - } - - /** - * test Allow Greater than or equal to Date type in Validity, support 1024 columns. - */ - @Test - public void testValidityDateSupport1024Columns() { - startcenter.menuItem("File->New->Spreadsheet").select(); - CalcUtil.selectRange("Sheet1.ALM1000:Sheet1.ALO1005"); - calc.menuItem("Data->Validity...").select(); - - SC_ValidityCriteriaTabpage.select(); - SC_ValidityCriteriaAllowList.select("Date"); - SC_ValidityDecimalCompareOperator.select("greater than"); - SC_ValiditySourceInput.setText("01/01/08"); - SC_ValidityErrorAlertTabPage.select(); - SC_ValidityShowErrorMessage.check(); - SC_ValidityErrorMessageTitle.setText("Stop to enter"); - SC_ValidityErrorMessage.setText("Invalid value"); - SC_ValidityErrorAlertTabPage.ok(); - - CalcUtil.selectRange("Sheet1.ALM1001"); - SC_InputBar_Input.activate(); - typeKeys("02/01/08<enter>"); - assertEquals("02/01/08",CalcUtil.getCellText("Sheet1.ALM1001")); - - CalcUtil.selectRange("Sheet1.ALM1002"); - SC_InputBar_Input.activate(); - typeKeys("01/02/08<enter>"); - assertEquals("01/02/08",CalcUtil.getCellText("Sheet1.ALM1002")); - - CalcUtil.selectRange("Sheet1.ALM1003"); - SC_InputBar_Input.activate(); - typeKeys("01/01/08<enter>"); - assertEquals("Invalid value",ActiveMsgBox.getMessage()); - ActiveMsgBox.ok(); - assertEquals("",CalcUtil.getCellText("Sheet1.ALM1003")); - - CalcUtil.selectRange("Sheet1.AML1003"); - SC_InputBar_Input.activate(); - typeKeys("12/31/07<enter>"); - assertEquals("Invalid value",ActiveMsgBox.getMessage()); - ActiveMsgBox.ok(); - assertEquals("",CalcUtil.getCellText("Sheet1.AML1003")); - } -} - diff --git a/test/testoo/source/testlib/CalcUtil.java b/test/testoo/source/testlib/CalcUtil.java deleted file mode 100644 index bdf006ac4aaa..000000000000 --- a/test/testoo/source/testlib/CalcUtil.java +++ /dev/null @@ -1,258 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testlib; - -import static org.openoffice.test.vcl.Tester.*; -import static testlib.UIMap.*; - -import java.lang.reflect.Array; -import java.util.StringTokenizer; -import java.util.logging.Logger; - - - - -public class CalcUtil { - - private static Logger LOG = Logger.getLogger(CalcUtil.class.getName()); - - /** - * Select a range. - * - * @param range - * e.g. Sheet1.A10, Sheet1.A11:B30, A11, A30:B45 - */ - public static void selectRange(String range) { - SC_InputBar_Position.click(0.5, 0.5); - SC_InputBar_Position.setText(range); - typeKeys("<enter>"); - sleep(1); - } - - /** - * Get the input at the given cell. If the cell is a formula, return the - * formula rather than the result - * - * @param cell - * @return - */ - public static String getCellInput(String cell) { - if (cell != null) - selectRange(cell); - String caption = SC_InputBar_Input.getCaption(); - //Fix: When formulaEdit's caption is blank, the hook will return the document window's caption - // So if it's document window caption, return "" - return caption.contains("[12479]") ? "": caption; - } - - /** - * Get the text at the given cell. If the cell is a formula, return the - * result rather than the formula - * - * @param cell - * @return - */ - public static String getCellText(String cell) { - app.setClipboard("$$$$"); - selectRange(cell); - typeKeys("<$copy>"); - String content = app.getClipboard(); - if (content.endsWith("\r\n")) - content = content.substring(0, content.length() - 2); - else if (content.endsWith("\n")) - content = content.substring(0, content.length() - 1); - - return content; - } - - - /** - * convert the format of column number to integer - * e.g. - * A -> 1 - * AA -> 27 - * AMJ -> 1024 - * @param no - * @return - */ - public static int toIntColumnNo(String no) { - int len = no.length(); - int ret = 0; - for(int i = 0; i < len; i++) { - char c = no.charAt(len - i - 1); - ret += Math.pow(26, i) * (c - 'A' + 1); - } - - return ret; - } - - /** - * Convert the format of column number to char - * @param no - * @return - */ - public static String toCharColumnNo(int no){ - String ret = ""; - int f = 0; - do { - f = (no - 1) / 26; - int s = (no - 1) % 26; - ret = (char)('A' + s) + ret; - no = f; - } while (f != 0); - return ret; - } - - /** - * Parse location string into integer values - * @param loc e.g. A1 - * @return - */ - public static int[] parseLocation(String loc) { - int i = 0; - for (; i < loc.length(); i++) { - char c = loc.charAt(i); - if (c >= '0' && c <= '9') - break; - } - - String col = loc.substring(0, i); - String row = loc.substring(i); - int sC = toIntColumnNo(col); - int sR = Integer.parseInt(row); - return new int[]{sC, sR}; - } - - /** - * Parse range string into integer values - * @param range e.g. A3:F9 - * @return - */ - public static int[] parseRange(String range) { - int dotIndex = range.indexOf("."); - if (dotIndex != -1) { - range = range.substring(dotIndex + 1); - } - - String[] locs = range.split(":"); - int[] ret = new int[4]; - int[] start = parseLocation(locs[0]); - ret[0] = start[0]; - ret[1] = start[1]; - if (locs.length == 1) { - ret[2] = start[0]; - ret[3] = start[1]; - } else { - int[] end = parseLocation(locs[1]); - ret[2] = end[0]; - ret[3] = end[1]; - } - - return ret; - } - - /** - * Get the text at the given cells. If the cell is a formula, return the - * result rather than the formula. - * Note: - * - * @param range e.g. A3:D9 - * @return - */ - public static String[][] getCellTexts(String range) { - selectRange(range); - int[] intRange = parseRange(range); - int rowCount = intRange[3]-intRange[1]+1; - int colCount = intRange[2]-intRange[0]+1; - String[][] texts = new String[rowCount][colCount]; - - app.setClipboard("$$$$"); - typeKeys("<$copy>"); - sleep(1); - String text = app.getClipboard(); - StringTokenizer tokenizer = new StringTokenizer(text, "\"\t\n", true); - int state = 0; - String cellContent = ""; - int r=0, c = 0; - while (tokenizer.hasMoreTokens()) { - String token = tokenizer.nextToken(); - switch (state) { - case 0: - if ("\"".equals(token)) { - state = 1; - } else if ("\t".equals(token)) { - texts[r][c] = cellContent; - cellContent = ""; - c++; - } else if ("\n".equals(token)) { - if (cellContent.endsWith("\r")) - cellContent = cellContent.substring(0, cellContent.length() - 1); - texts[r][c] = cellContent; - cellContent = ""; - c = 0; - r++; - } else{ - cellContent += token; - } - break; - case 1: - if ("\"".equals(token)) { - state = 0; - } else { - cellContent += token; - } - break; - } - } - - LOG.info("Text of range [" + range + "]:\n" + arrayToString(texts)); - return texts; - } - - private static String arrayToString(Object array) { - if (array == null) - return "null"; - if (!array.getClass().isArray()) - return array.toString(); - - int len = Array.getLength(array); - String ret = "{"; - for (int i= 0; i < len; i++) { - Object el = Array.get(array, i); - if (el == null) { - ret += "null"; - } else if (el.getClass().isArray()) { - ret += arrayToString(el); - } else { - ret += "\"" + el + "\""; - } - - if (i + 1 != len) - ret += ","; - - } - ret += "}"; - return ret; - } -}
\ No newline at end of file diff --git a/test/testoo/source/testlib/Log.java b/test/testoo/source/testlib/Log.java deleted file mode 100644 index e76de4092e9d..000000000000 --- a/test/testoo/source/testlib/Log.java +++ /dev/null @@ -1,102 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - -package testlib; - -import java.io.File; -import java.io.IOException; -import java.util.logging.FileHandler; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.logging.SimpleFormatter; - -import org.junit.rules.TestWatcher; -import org.junit.runner.Description; -import org.openoffice.test.OpenOffice; -import org.openoffice.test.common.GraphicsUtil; -import org.openoffice.test.common.Testspace; -import org.openoffice.test.vcl.client.CommunicationException; - -/** - * The class is used to capture extra information during the testing, including - * 1. Take a screenshot when testing is failed. 2. Collect data as the clue when - * oo crashes. - * - */ -public class Log extends TestWatcher { - static File screenshotOutput = null; - static File logOutput = null; - static Logger logger; - static { - screenshotOutput = Testspace.getFile("output/screenshot"); - screenshotOutput.mkdirs(); - - logOutput = Testspace.getFile("output/logs"); - logOutput.mkdirs(); - try { - logger = Logger.getLogger("vclauto"); - FileHandler fh = new FileHandler(logOutput.getAbsolutePath() + "/" + "%u.log", true); - logger.addHandler(fh); - logger.setLevel(Level.ALL); - SimpleFormatter sf = new SimpleFormatter(); - fh.setFormatter(sf); - // ConsoleHandler ch = new ConsoleHandler(); - // logger.addHandler(ch); - // logger.setLevel(Level.ALL); - // ch.setFormatter(sf); - } catch (IOException e) { - // ignore; - } - } - - @Override - protected void starting(Description description) { - logger.info("Start " + description); - super.starting(description); - } - - @Override - protected void failed(Throwable e, Description description) { - super.failed(e, description); - String screenshotType = null; - if (e instanceof AssertionError) { - screenshotType = "failure"; - } else { - screenshotType = "error"; - } - - File file = new File(screenshotOutput, description.getClassName() + "." + description.getMethodName() + "." + screenshotType + ".png"); - GraphicsUtil.screenShot(file.getAbsolutePath()); - logger.log(Level.SEVERE, "Testing is failed. Screenshot: " + file.getAbsolutePath(), e); - // Check if crash occurs! - if (e instanceof CommunicationException) { - logger.severe("Pay attention! OpenOffice maybe crashed or freezed. "); - // If testcase is failed, kill AOO to avoid impacting the following - // test cases. - OpenOffice.killAll(); - } - - } - - public void info(String message) { - logger.info(message); - } -} diff --git a/test/testoo/source/testlib/UIMap.java b/test/testoo/source/testlib/UIMap.java deleted file mode 100644 index 95ffe964e0fb..000000000000 --- a/test/testoo/source/testlib/UIMap.java +++ /dev/null @@ -1,354 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testlib; -import java.io.File; - -import org.openoffice.test.OpenOffice; -import org.openoffice.test.vcl.IDList; -import org.openoffice.test.vcl.client.Constant; -import org.openoffice.test.vcl.widgets.VclApp; -import org.openoffice.test.vcl.widgets.VclButton; -import org.openoffice.test.vcl.widgets.VclComboBox; -import org.openoffice.test.vcl.widgets.VclControl; -import org.openoffice.test.vcl.widgets.VclDialog; -import org.openoffice.test.vcl.widgets.VclDockingWin; -import org.openoffice.test.vcl.widgets.VclEditBox; -import org.openoffice.test.vcl.widgets.VclField; -import org.openoffice.test.vcl.widgets.VclListBox; -import org.openoffice.test.vcl.widgets.VclMenuItem; -import org.openoffice.test.vcl.widgets.VclMessageBox; -import org.openoffice.test.vcl.widgets.VclStatusBar; -import org.openoffice.test.vcl.widgets.VclTabControl; -import org.openoffice.test.vcl.widgets.VclTabPage; -import org.openoffice.test.vcl.widgets.VclToolBox; -import org.openoffice.test.vcl.widgets.VclWindow; - -/** - * Define all UI controls in the class. - * One control should be defined once and only once. - * - */ -public class UIMap { - private static IDList idList = new IDList(new File("./ids")); - public static final VclMessageBox ActiveMsgBox = new VclMessageBox(Constant.UID_ACTIVE); - public static final VclMessageBox MsgBox_AdditionalRowsNotSaved = new VclMessageBox(Constant.UID_ACTIVE, "Additional rows were not saved."); - public static final VclTabControl ActiveTabControl = new VclTabControl(Constant.UID_ACTIVE); - - public static VclEditBox editbox(String id) { - return new VclEditBox(idList.getId(id)); - } - - - public static VclControl control(String id) { - return new VclControl(idList.getId(id)); - } - - public static VclWindow window(String id) { - return new VclWindow(idList.getId(id)); - } - - public static VclDialog dialog(String id) { - return new VclDialog(idList.getId(id)); - } - - public static VclTabPage tabpage(String id) { - return new VclTabPage(idList.getId(id)); - } - - public static VclListBox listbox(String id) { - return new VclListBox(idList.getId(id)); - } - - public static VclComboBox combobox(String id) { - return new VclComboBox(idList.getId(id)); - } - - public static VclToolBox toolbox(String id) { - return new VclToolBox(idList.getId(id)); - } - - - public static VclButton button(String id) { - return new VclButton(idList.getId(id)); - } - - - public static VclMessageBox msgbox(String text) { - return new VclMessageBox(idList.getId("UID_ACTIVE"), text); - } - - - public static VclMenuItem menuItem(String text) { - return new VclMenuItem(text); - } - - public static VclStatusBar statusbar(String id) { - return new VclStatusBar(idList.getId(id)); - } - - public static VclField field(String id){ - return new VclField(idList.getId(id)); - } - - public static VclDockingWin dockingwin(String id){ - return new VclDockingWin(idList.getId(id)); - } - public static final OpenOffice oo = new OpenOffice(null); - public static final VclApp app = VclApp.getDefault(); - public static final VclWindow writer = window("SW_HID_EDIT_WIN"); - public static final VclWindow startcenter = window("FWK_HID_BACKINGWINDOW"); - public static final VclWindow calc = window("SC_HID_SC_WIN_GRIDWIN"); - public static final VclWindow impress = window("SD_HID_SDDRAWVIEWSHELL"); - public static final VclDialog FilePicker = dialog("SVT_HID_EXPLORERDLG_FILE"); - public static final VclListBox FilePicker_FileType = listbox("fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_FILETYPE"); - public static final VclButton FilePicker_Open = button("fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_OPEN"); - public static final VclComboBox FilePicker_Path = combobox("SVT_HID_FILEDLG_AUTOCOMPLETEBOX"); - public static final VclDialog FileSave = dialog("SVT_HID_FILESAVE_DIALOG"); - public static final VclListBox FileSave_FileType = listbox("SVT_HID_FILESAVE_FILETYPE"); - public static final VclButton FileSave_Save = button("SVT_HID_FILESAVE_DOSAVE"); - public static final VclComboBox FileSave_Path = combobox("SVT_HID_FILESAVE_FILEURL"); - public static final VclButton SC_InputBar_FunctionWizard = button("SC_HID_INSWIN_CALC"); - public static final VclButton SC_InputBar_Sum = button("SC_HID_INSWIN_SUMME"); - public static final VclButton SC_InputBar_Function = button("SC_HID_INSWIN_FUNC"); - public static final VclToolBox SC_InputBar = toolbox("SC_HID_SC_INPUTWIN"); - public static final VclComboBox SC_InputBar_Position = combobox("SC_HID_INSWIN_POS"); - public static final VclWindow SC_InputBar_Input = window("SC_HID_INSWIN_INPUT"); - public static final VclTabPage EffectsPage = tabpage("CUI_HID_SVXPAGE_CHAR_EFFECTS"); - public static final VclListBox EffectsPage_Color = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_FONTCOLOR"); - public static final VclDialog AlienFormatDlg = dialog("SFX2_HID_WARNING_ALIENFORMAT"); - public static final VclWindow draw = window("SD_HID_SDGRAPHICVIEWSHELL"); - public static final VclTabPage SortPage = tabpage("SC_HID_SCPAGE_SORT_FIELDS"); - public static final VclListBox SortPage_By1 = listbox("sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT1"); - public static final VclButton SortPage_Ascending1 = button("sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP1"); - public static final VclButton SortPage_Descending1 = button("sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN1"); - public static final VclListBox SortPage_By2 = listbox("sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT2"); - public static final VclButton SortPage_Ascending2 = button("sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP2"); - public static final VclButton SortPage_Descending2 = button("sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN2"); - public static final VclListBox SortPage_By3 = listbox("sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT3"); - public static final VclButton SortPage_Ascending3 = button("sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP3"); - public static final VclButton SortPage_Descending3 = button("sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN3"); - public static final VclTabPage PDFGeneralPage = tabpage("HID_FILTER_PDF_OPTIONS"); - public static final VclButton StartCenter_CalcButton = button(".HelpId:StartCenter:CalcButton"); - public static final VclButton StartCenter_ImpressButton = button(".HelpId:StartCenter:ImpressButton"); - public static final VclButton StartCenter_WriterButton = button(".HelpId:StartCenter:WriterButton"); - public static final VclButton StartCenter_OpenButton = button(".HelpId:StartCenter:OpenButton"); - public static final VclButton StartCenter_DrawButton = button(".HelpId:StartCenter:DrawButton"); - public static final VclButton StartCenter_DBButton = button(".HelpId:StartCenter:DBButton"); - public static final VclButton StartCenter_MathButton = button(".HelpId:StartCenter:MathButton"); - public static final VclButton StartCenter_TemplateButton = button(".HelpId:StartCenter:TemplateButton"); - public static final VclButton StartCenter_TemplateRepository = button(".HelpId:StartCenter:TemplateRepository"); - public static final VclButton StartCenter_Extensions = button(".HelpId:StartCenter:Extensions"); - public static final VclButton StartCenter_Info = button(".HelpId:StartCenter:Info"); - public static final VclWindow SlideShow = window("SD_HID_SD_WIN_PRESENTATION"); - public static final VclDialog FindDlg = dialog(".uno:SearchDialog"); - public static final VclComboBox FindDlg_For = combobox("svx:ComboBox:RID_SVXDLG_SEARCH:ED_SEARCH"); - public static final VclComboBox FindDlg_ReplaceWith = combobox("svx:ComboBox:RID_SVXDLG_SEARCH:ED_REPLACE"); - public static final VclButton FindDlg_Find = button("svx:PushButton:RID_SVXDLG_SEARCH:BTN_SEARCH"); - public static final VclButton FindDlg_FindAll = button("svx:PushButton:RID_SVXDLG_SEARCH:BTN_SEARCH_ALL"); - public static final VclButton FindDlg_Replace = button("svx:PushButton:RID_SVXDLG_SEARCH:BTN_REPLACE"); - public static final VclButton FindDlg_ReplaceAll = button("svx:PushButton:RID_SVXDLG_SEARCH:BTN_REPLACE_ALL"); - public static final VclButton FindDlg_MatchCase = button("svx:CheckBox:RID_SVXDLG_SEARCH:CB_MATCH_CASE"); - public static final VclButton FindDlg_WholeWord = button("svx:CheckBox:RID_SVXDLG_SEARCH:CB_WHOLE_WORDS"); - public static final VclButton FindDlg_More = button("svx:MoreButton:RID_SVXDLG_SEARCH:BTN_MORE"); - public static final VclWindow chart = window("CHART2_HID_SCH_WIN_DOCUMENT"); - public static final VclDialog Chart_Wizard = dialog("CHART2_HID_SCH_CHART_AUTO_FORMAT"); - public static final VclDialog File_PrintDlg = dialog(".HelpID:vcl:PrintDialog:Dialog"); - public static final VclWindow ImpressOutline = window("SD_HID_SDOUTLINEVIEWSHELL"); - public static final VclWindow ImpressSlideSorter = window("SD_HID_SD_WIN_DOCUMENT"); - public static final VclWindow ImpressHandout = window(".uno:HandoutMode"); - public static final VclDialog InsertTable = dialog("cui:ModalDialog:RID_SVX_NEWTABLE_DLG"); - public static final VclToolBox Table_Toolbar = toolbox(".HelpId:tableobjectbar"); - public static final VclStatusBar StatusBar = statusbar("FWK_HID_STATUSBAR"); - public static final VclDialog writer_InsertTable = dialog(".uno:InsertTable"); - public static final VclWindow math_PreviewWindow = window("STARMATH_HID_SMA_WIN_DOCUMENT"); - public static final VclWindow math_EditWindow = window("STARMATH_HID_SMA_COMMAND_WIN_EDIT"); - public static final VclControl math_ElementsWindow = control("STARMATH_HID_SMA_OPERATOR_WIN"); - public static final VclEditBox SC_FunctionWizardDlg_MultiLineEdit = editbox("FORMULA_HID_FORMULA_FAP_FORMULA"); - public static final VclDialog SC_FunctionWizardDlg = dialog("FORMULA_HID_FORMULADLG_FORMULA"); - public static final VclListBox SC_FunctionWizardDlg_FunctionList = listbox("FORMULA_HID_FORMULA_LB_FUNCTION"); - public static final VclEditBox SC_FunctionWizardDlg_Edit1 = editbox("FORMULA_HID_FORMULA_FAP_EDIT1"); - public static final VclButton math_CatalogButton = button(".uno:SymbolCatalogue"); - public static final VclDialog math_SymbolsDlg = dialog("starmath:ModalDialog:RID_SYMBOLDIALOG"); - public static final VclListBox math_SymbolsDlgListbox = listbox("starmath:ListBox:RID_SYMBOLDIALOG:1"); - public static final VclButton math_SymbolsDlgEditButton = button("starmath:PushButton:RID_SYMBOLDIALOG:1"); - public static final VclButton math_SymbolsDlgInsertButton = button("starmath:PushButton:RID_SYMBOLDIALOG:2"); - public static final VclButton math_SymbolsDlgCloseButton = button("starmath:PushButton:RID_SYMBOLDIALOG:3"); - public static final VclDialog math_EditSymbolsDlg = dialog("starmath:ModalDialog:RID_SYMDEFINEDIALOG"); - public static final VclButton math_EditSymbolsDlgAdd = button("starmath:PushButton:RID_SYMDEFINEDIALOG:1"); - public static final VclButton math_EditSymbolsDlgModify = button("starmath:PushButton:RID_SYMDEFINEDIALOG:2"); - public static final VclButton math_EditSymbolsDlgDelete = button("starmath:PushButton:RID_SYMDEFINEDIALOG:3"); - public static final VclControl math_EditSymbolsDlgViewControl = control("STARMATH_HID_SMA_CONTROL_FONTCHAR_VIEW"); - public static final VclComboBox math_EditSymbolsDlgSymbol = combobox("starmath:ComboBox:RID_SYMDEFINEDIALOG:4"); - public static final VclListBox math_EditSymbolsDlgFont = listbox("starmath:ListBox:RID_SYMDEFINEDIALOG:1"); - public static final VclComboBox math_EditSymbolsDlgTypeface = combobox("starmath:ComboBox:RID_SYMDEFINEDIALOG:3"); - public static final VclDialog Wizards_AgendaDialog = dialog("WIZARDS_HID_AGWIZ"); - public static final VclButton Wizards_AgendaDialog_FinishButton = button("WIZARDS_HID_AGWIZ_CREATE"); - public static final VclTabPage MacroDialogsPage = tabpage("basctl:TabPage:RID_TP_DLGS"); - public static final VclDialog AboutDialog = dialog(".uno:About"); - public static final VclButton math_ElementsRelations = button("STARMATH_HID_SMA_RELATIONS_CAT"); - public static final VclButton math_ElementsRelationsNotEqual = button("STARMATH_HID_SMA_XNEQY"); - public static final VclButton math_ElementsUnaryBinary = button("STARMATH_HID_SMA_UNBINOPS_CAT"); - public static final VclButton math_ElementsUnaryBinaryPlus = button("STARMATH_HID_SMA_PLUSX"); - public static final VclControl MacroWarningOK = control("Ok"); - public static final VclListBox OptionsDlgList = listbox("CUI_HID_OFADLG_TREELISTBOX"); - public static final VclDialog OptionsDlg = dialog("CUI_HID_OFADLG_OPTIONS_TREE"); - public static final VclButton OptionsDlg_MacroSecurityButton = button("cui:PushButton:RID_SVXPAGE_INET_SECURITY:PB_SEC_MACROSEC"); - public static final VclControl MacroSecurityDlg = control("XMLSECURITY_HID_XMLSEC_TP_SECLEVEL"); - public static final VclButton MacroSecurityDlg_Low = button("xmlsecurity:RadioButton:RID_XMLSECTP_SECLEVEL:RB_LOW"); - public static final VclWindow Basic_EditWindow = window("BASCTL_HID_BASICIDE_EDITORWINDOW"); - public static final VclDialog writer_ConvertTableToTextDlg = dialog(".uno:ConvertTableText"); - public static final VclWindow writer_Navigator = window("SW_HID_NAVIGATION_PI"); - public static final VclListBox writer_NavigatorList = listbox("SW_HID_NAVIGATOR_TREELIST"); - public static final VclControl writer_FrameDlg = control("SW_HID_FRM_STD"); - public static final VclField SC_NumberOfColumnsRowsToInsert = field("1502452023"); - public static final VclDialog SC_InsertColumnsRowsdialog = dialog("26166"); - public static final VclButton SC_InsertColumnsRowsAfterSelectColumn = button("1502446395"); - public static final VclButton WizardNextButton = button("SVT_HID_WIZARD_NEXT"); - public static final VclTabPage ChartRangeChooseTabPage = tabpage("chart2:TabPage:TP_RANGECHOOSER"); - public static final VclButton WizardBackButton = button("SVT_HID_WIZARD_PREVIOUS"); - public static final VclTabPage ChartTypeChooseTabPage = tabpage("CHART2_HID_DIAGRAM_TYPE"); - public static final VclControl ChartWizardRoadMap = control("CHART2_HID_SCH_WIZARD_ROADMAP"); - public static final VclButton DataPilotTableToExistPlaceRadioButton = button("2569093658"); - public static final VclEditBox DataPilotTableToExistPlaceEditBox = editbox("2569095195"); - public static final VclDialog CreateDataPilotTableDialog = dialog("26151"); - public static final VclControl DataPilotFieldSelect = control("59030"); - public static final VclButton DataPilotAutomaticallyUpdateCheckBox = button("3643262003"); - public static final VclButton DataPilotTableUpdateButton = button("3643265586"); - public static final VclButton SD_DateAndTimeFooterOnSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_DATETIME"); - public static final VclButton SD_FixedDateAndTimeFooterOnSlide = button("sd:RadioButton:RID_SD_TABPAGE_HEADERFOOTER:RB_DATETIME_FIXED"); - public static final VclEditBox SD_FixedDateAndTimeOnSlideInput = editbox("sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_DATETIME_FIXED"); - public static final VclButton SD_FooterTextOnSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_FOOTER"); - public static final VclEditBox SD_FooterTextOnSlideInput = editbox("sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_FOOTER_FIXED"); - public static final VclButton SD_SlideNumAsFooterOnSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_SLIDENUMBER"); - public static final VclButton SD_ApplyToAllButtonOnSlideFooter = button("sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLYTOALL"); - public static final VclControl SD_SlidelistInNaviagtor = control("HID_SD_NAVIGATOR_TLB"); - public static final VclControl SD_HeaderAndFooterDialog = control("HID_SD_TABPAGE_HEADERFOOTER_SLIDE"); - public static final VclButton SD_ApplyButtonOnSlideFooter = button("sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLY"); - public static final VclButton SD_InsertPageButtonOnToolbar = button(".uno:InsertPage"); - public static final VclControl DataPilotPaneRowArea = control("59036"); - public static final VclEditBox DataPilotFieldDisplayNameEditBox = editbox("971868166"); - public static final VclButton DataPilotFieldShowItemWithoutDataCheckBox = button("971867238"); - public static final VclTabPage DataPilotFieldOptionFieldTabPageDialog = tabpage("26550"); - public static final VclTabPage DataPilotFieldOptionSubTotalsTabPageDialog = tabpage("25760"); - public static final VclTabPage DataPilotFieldOptionSortTabPageDialog = tabpage("25763"); - public static final VclButton DataPilotFieldOptionSubTotalsManuallyRadioButton = button("958956137"); - public static final VclButton DataPilotFieldOptionSortDescendingRadioButton = button("958972620"); - public static final VclControl DataPiloPaneDataArea = control("59038"); - public static final VclControl DataPilotColumnArea = control("59034"); - public static final VclButton SD_HeaderTextOnNotes = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_HEADER"); - public static final VclEditBox SD_HeaderTextOnNotesInput = editbox("sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_HEADER_FIXED"); - public static final VclTabPage SD_HeaderAndFooterOnNotesTabPage = tabpage("SD_HID_SD_TABPAGE_HEADERFOOTER_NOTESHANDOUT"); - public static final VclButton SD_FooterNotShowOn1stSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_NOTONTITLE"); - public static final VclTabPage SortOptionsPage = tabpage("SC_HID_SCPAGE_SORT_OPTIONS"); - public static final VclButton SortOptionsPage_CaseSensitive = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_CASESENSITIVE"); - public static final VclButton SortOptionsPage_CopyResultTo = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_COPYRESULT"); - public static final VclEditBox SortOptionsPage_CopyResultToEdit = editbox("sc:Edit:RID_SCPAGE_SORT_OPTIONS:ED_OUTAREA"); - public static final VclDialog DefineNamesDlg = dialog(".uno:DefineName"); - public static final VclEditBox DefineNamesDlg_NameEdit = editbox("sc:Edit:RID_SCDLG_NAMES:ED_ASSIGN"); - public static final VclListBox SortOptionsPage_CopyResultToCellRange = listbox("sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_OUTAREA"); - public static final VclWindow SpreadSheetCells = window("58818"); - public static final VclButton DataPilotFieldOptionSubTotalsNeverRadioButton = button("958956135"); - public static final VclButton DataPilotFieldOptionSortAscendingRadioButton = button("958972619"); - public static final VclControl DataPilotPanePageArea = control("59032"); - public static final VclButton OnlyDisplayTopNItemCheckBox = button("1495745540"); - public static final VclField NumberOfItemShowInTopNEditBox = field("1495750661"); - public static final VclDialog FieldTopNSettingDialog = dialog("59039"); - public static final VclButton SD_AutoUpdateTimeFooter = button("sd:RadioButton:RID_SD_TABPAGE_HEADERFOOTER:RB_DATETIME_AUTOMATIC"); - public static final VclListBox SD_AutoUpdateTimeFooterType = listbox("sd:ListBox:RID_SD_TABPAGE_HEADERFOOTER:CB_DATETIME_FORMAT"); - public static final VclButton DataPilotButton = button("59270"); - public static final VclDockingWin DataPilotPanel = dockingwin("3643260928"); - public static final VclListBox SCSubTotalsGroupByListBox = listbox("SC_HID_SC_SUBT_GROUP"); - public static final VclControl SCCalcSubTotalForColumns = control("SC_HID_SC_SUBT_COLS"); - public static final VclTabPage SCSubTotalsGroup1Dialog = tabpage("SC_HID_SCPAGE_SUBT_GROUP1"); - public static final VclButton SCSubtotalsInsertPageBreakCheckBox = button("sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_PAGEBREAK"); - public static final VclButton SCSubtotalsCaseSensitiveCheckBox = button("sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_CASE"); - public static final VclButton SCSubtotalsPreSortToGroupCheckBox = button("sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_SORT"); - public static final VclButton SCSubtotalSortAscendingRadioButton = button("sc:RadioButton:RID_SCPAGE_SUBT_OPTIONS:BTN_ASCENDING"); - public static final VclButton SCSubtotalSortDescendingRadioButton = button("sc:RadioButton:RID_SCPAGE_SUBT_OPTIONS:BTN_DESCENDING"); - public static final VclButton SCSubtotalsIncludeFormatsCheckBox = button("sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_FORMATS"); - public static final VclButton SCSubtotalsCustomSortOrderCheckBox = button("sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_USERDEF"); - public static final VclListBox SCSubtotalsCustomSortListBox = listbox("sc:ListBox:RID_SCPAGE_SUBT_OPTIONS:LB_USERDEF"); - public static final VclListBox SC_ValidityCriteriaAllowList = listbox("sc:ListBox:TP_VALIDATION_VALUES:LB_ALLOW"); - public static final VclTabPage SC_ValidityCriteriaTabpage = tabpage("sc:TabPage:TP_VALIDATION_VALUES"); - public static final VclButton SC_ValidityAllowBlankCells = button("sc:CheckBox:TP_VALIDATION_VALUES:TSB_ALLOW_BLANKS"); - public static final VclButton SC_ValidityShowSelectionList = button("sc:CheckBox:TP_VALIDATION_VALUES:CB_SHOWLIST"); - public static final VclButton SC_ValiditySortEntriesAscending = button("sc:CheckBox:TP_VALIDATION_VALUES:CB_SORTLIST"); - public static final VclButton SC_ValiditySourcePicker = button("sc:ImageButton:TP_VALIDATION_VALUES:RB_VALIDITY_REF"); - public static final VclTabPage SC_ValidityErrorAlertTabPage = tabpage("sc:TabPage:TP_VALIDATION_ERROR"); - public static final VclButton SC_ValidityShowErrorMessage = button("sc:TriStateBox:TP_VALIDATION_ERROR:TSB_SHOW"); - public static final VclListBox SC_ValidityErrorAlertActionList = listbox("sc:ListBox:TP_VALIDATION_ERROR:LB_ACTION"); - public static final VclEditBox SC_ValidityErrorMessageTitle = editbox("sc:Edit:TP_VALIDATION_ERROR:EDT_TITLE"); - public static final VclEditBox SC_ValidityErrorMessage = editbox("sc:MultiLineEdit:TP_VALIDATION_ERROR:EDT_ERROR"); - public static final VclButton SC_ValidityErrorBrowseButton = button("sc:PushButton:TP_VALIDATION_ERROR:BTN_SEARCH"); - public static final VclTabPage SCSubTotalsOptionsTabPage = tabpage("SC_HID_SCPAGE_SUBT_OPTIONS"); - public static final VclButton SCDeleteCellsDeleteRowsRadioButton = button("sc:RadioButton:RID_SCDLG_DELCELL:BTN_DELROWS"); - public static final VclDialog SCDeleteCellsDialog = dialog(".uno:DeleteCell"); - public static final VclTabPage SCSubTotalsGroup2Dialog = tabpage("SC_HID_SCPAGE_SUBT_GROUP2"); - public static final VclTabPage SCSubTotalsGroup3Dialog = tabpage("SC_HID_SCPAGE_SUBT_GROUP3"); - public static final VclListBox SCCalcSubTotolsFuncionList = listbox("SC_HID_SC_SUBT_FUNC"); - public static final VclEditBox SC_ValiditySourceInput = editbox("sc:Edit:TP_VALIDATION_VALUES:EDT_MIN"); - public static final VclListBox SC_ValidityDecimalCompareOperator = listbox("sc:ListBox:TP_VALIDATION_VALUES:LB_VALUE"); - public static final VclEditBox SC_ValidityMaxValueInput = editbox("sc:Edit:TP_VALIDATION_VALUES:EDT_MAX"); - public static final VclEditBox SC_ValidityEntries = editbox("sc:MultiLineEdit:TP_VALIDATION_VALUES:EDT_LIST"); - public static final VclTabPage SC_ValidityInputHelpTabPage = tabpage("sc:TabPage:TP_VALIDATION_INPUTHELP"); - public static final VclButton SC_ValidityInputHelpCheckbox = button("sc:TriStateBox:TP_VALIDATION_INPUTHELP:TSB_HELP"); - public static final VclEditBox SC_ValidityInputHelpTitle = editbox("sc:Edit:TP_VALIDATION_INPUTHELP:EDT_TITLE"); - public static final VclEditBox SC_ValidityHelpMessage = editbox("sc:MultiLineEdit:TP_VALIDATION_INPUTHELP:EDT_INPUTHELP"); - public static final VclButton OptionsDlg_SortListsTabCopy = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_COPY"); - public static final VclButton SortOptionsPage_RangeContainsColumnLabels = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_LABEL"); - public static final VclButton SortOptionsPage_CustomSortOrder = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_SORT_USER"); - public static final VclButton SortOptionsPage_IncludeFormats = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_FORMATS"); - public static final VclListBox SortOptionsPage_CustomSortOrderList = listbox("sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_SORT_USER"); - public static final VclButton SortOptionsPage_TopToBottom = button("sc:RadioButton:RID_SCPAGE_SORT_OPTIONS:BTN_TOP_DOWN"); - public static final VclButton SortOptionsPage_LeftToRight = button("sc:RadioButton:RID_SCPAGE_SORT_OPTIONS:BTN_LEFT_RIGHT"); - public static final VclButton OptionsDlg_SortListsTabNew = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_NEW"); - public static final VclButton OptionsDlg_SortListsTabAdd = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_ADD"); - public static final VclTabPage FormatCellsDlg_NumbersPage = tabpage("CUI_HID_NUMBERFORMAT"); - public static final VclListBox FormatCellsDlg_NumbersPageCategory = listbox("cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CATEGORY"); - public static final VclListBox FormatCellsDlg_NumbersPageCurrencyFormat = listbox("cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CURRENCY"); - public static final VclTabPage DataPilotFieldOptionFiledSubtotalsPage = tabpage("25762"); - public static final VclControl SC_DataPilotOptionSubtotalFunctionList = control("59029"); - public static final VclDialog PresentationWizard = dialog("SD_HID_SD_AUTOPILOT_PAGE1"); - public static final VclDialog FillSeriesDlg = dialog(".uno:FillSeries"); - public static final VclDialog SortWarningDlg = dialog("sc:ModalDialog:RID_SCDLG_SORT_WARNING"); - public static final VclButton SortWarningDlg_Extend = button("sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_EXTSORT"); - public static final VclButton SortWarningDlg_Current = button("sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_CURSORT"); - // Spreadsheet: "Sheet" dialog - public static final VclDialog SCInsertSheetDlg = dialog("sc:ModalDialog:RID_SCDLG_INSERT_TABLE"); - public static final VclButton SCBeforeCurrentSheet = button("sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_BEFORE"); - public static final VclButton SCAfterCurrentSheet = button("sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_BEHIND"); - public static final VclButton SCNewSheet = button("sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_NEW"); - public static final VclButton SCNewSheetFromFile = button("sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_FROMFILE"); - public static final VclEditBox SCNewSheetName = editbox("sc:Edit:RID_SCDLG_INSERT_TABLE:ED_TABNAME"); - public static final VclField SCSheetNumber = field("sc:NumericField:RID_SCDLG_INSERT_TABLE:NF_COUNT"); - public static final VclListBox SCFromFileSheetList = listbox("sc:MultiListBox:RID_SCDLG_INSERT_TABLE:LB_TABLES"); - public static final VclButton SCFromFileBrowse = button("sc:PushButton:RID_SCDLG_INSERT_TABLE:BTN_BROWSE"); - public static final VclButton SCFromFileLink = button("sc:CheckBox:RID_SCDLG_INSERT_TABLE:CB_LINK"); - // Spreadsheet: "Select Sheets" dialog - public static final VclDialog SCSelectSheetsDlg = dialog(".uno:SelectTables"); - public static final VclListBox SCSheetsList = listbox("SC_HID_SELECTTABLES"); - - - -} diff --git a/test/testoo/source/testsuite/BVT.java b/test/testoo/source/testsuite/BVT.java deleted file mode 100644 index 65596c0c40f2..000000000000 --- a/test/testoo/source/testsuite/BVT.java +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testsuite; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -import testcase.BVTFileType; -import testcase.BVTFunction; -import testcase.SmokeTest; - -@RunWith(Suite.class) -@SuiteClasses({SmokeTest.class, BVTFileType.class, BVTFunction.class}) -public class BVT { - -} diff --git a/test/testoo/source/testsuite/TestSampleAsMS2003.java b/test/testoo/source/testsuite/TestSampleAsMS2003.java deleted file mode 100644 index 28cb22fc9de8..000000000000 --- a/test/testoo/source/testsuite/TestSampleAsMS2003.java +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testsuite; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collection; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Suite; -import org.junit.runners.Parameterized.Parameters; -import org.junit.runners.Suite.SuiteClasses; - -import testcase.TestSample; -import testsuite.TestSampleAsMS2003.SetParams; - -@RunWith(Suite.class) -@SuiteClasses({SetParams.class, TestSample.class }) -public class TestSampleAsMS2003 { - - @RunWith(Parameterized.class) - public static class SetParams { - @Parameters - public static Collection<Object[]> data() { - TestSample.repos = "../samples"; - TestSample.params = new String[][]{ - {".*\\.((docx)|(docm)|(dotx)|(dotm))$", "doc", "writer"}, - {".*\\.((xlsx)|(xltx)|(xlsm)|(xltm))$", "xls", "calc"}, - {".*\\.((pptx)|(pptm)|(potm)|(potx))$", "ppt", "impress"} - }; - return new ArrayList<Object[]>(); - } - } -} diff --git a/test/testoo/source/testsuite/TestSampleAsOriginal.java b/test/testoo/source/testsuite/TestSampleAsOriginal.java deleted file mode 100644 index 6e8ae16156b9..000000000000 --- a/test/testoo/source/testsuite/TestSampleAsOriginal.java +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -package testsuite; - -import java.util.ArrayList; -import java.util.Collection; - -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -import testcase.TestSample; -import testsuite.TestSampleAsOriginal.SetParams; - -@RunWith(Suite.class) -@SuiteClasses({SetParams.class, TestSample.class }) -public class TestSampleAsOriginal { - - @RunWith(Parameterized.class) - public static class SetParams { - @Parameters - public static Collection<Object[]> data() { - TestSample.repos = "../samples"; - TestSample.params = new String[][]{ - {".*\\.((odt)|(ott)|(sxw)|(stw)|(doc)|(dot))$", null, "writer"}, - {".*\\.((ods)|(ots)|(sxc)|(stc)|(xls)|(xlt))$", null, "calc"}, - {".*\\.((odp)|(otp)|(sxi)|(sti)|(ppt)|(pot))$", null, "impress"} - }; - return new ArrayList<Object[]>(); - } - } -} |