summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc498
-rwxr-xr-xtestautomation/dbaccess/optional/includes/db_Mozilla.inc284
-rwxr-xr-xtestautomation/dbaccess/optional/includes/misc_Macros.inc242
-rwxr-xr-xtestautomation/framework/required/includes/topten.inc622
-rwxr-xr-xtestautomation/framework/required/includes/wizard_fax.inc208
-rwxr-xr-xtestautomation/global/tools/includes/optional/t_ole.inc42
-rw-r--r--testautomation/global/tools/includes/optional/t_xml_filter1.inc1522
-rwxr-xr-xtestautomation/writer/optional/includes/stylist/w_stylist.inc2044
-rw-r--r--testautomation/writer/required/includes/w_001a_.inc960
9 files changed, 3211 insertions, 3211 deletions
diff --git a/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc b/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
index cbe14ee9dcb0..4e26e64d3a56 100644
--- a/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
+++ b/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
@@ -1,249 +1,249 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: ch2_xml_format.inc,v $
-'*
-'* $Revision: 1.2 $
-'*
-'* last change: $Author: obo $ $Date: 2008-07-22 10:36:42 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/***********************************************************************
-'*
-'* owner : oliver.craemer@sun.com
-'*
-'* short description : Verify the Chart2 XML file format
-'*
-'************************************************************************
-'*
-' #1 tCompareXMLFormatCreate ' Verify Chart2 XML file format by using three characteristcs on new chart
-' #1 tCompareXMLFormatLoad ' Verify Chart2 XML file format by using three characteristcs on loaded chart
-'*
-'\***********************************************************************
-
-testcase tCompareXMLFormatCreate
-'///+ Test purpose: Verify within three characteristics that there is really a chart
-
- dim sOutputFile as string
- dim sUnpackedStorageDir as string
- dim sChartContentXML as string
-
- gApplication = "WRITER"
- sOutputFile = convertpath(gOfficepath & "user\work\Chart2_XML.odt")
- sUnpackedStorageDir = (gOfficePath & ConvertPath("user\work\chart2_XML2"))
- sChartContentXML = (gOfficePath & ConvertPath("user\work\chart2_XML2") & ConvertPath("\Object 1\content.xml"))
-
- '/// File / New / Text
- printlog " Open new Writer document"
- call hNewDocument
- '/// Insert chart with Insert / Object / Chart
- printlog " Insert chart with Insert / Object / Chart"
- InsertChart
- '/// Save document to <i>gOfficepath</i>/user/work/Chart2_XML.odt
- printlog " Save document to <i>gOfficepath</i>/user/work/Chart2_XML.odt"
- if NOT hFileSaveAsKill (sOutputFile) then
- warnlog "Saving test document failed -> Aborting"
- call hCloseDocument
- goto endsub
- else
- printlog "File saved successfully."
- endif
- '/// File / Close
- call hCloseDocument
- sleep(3)
- printlog "File closed"
- '/// Uncompress with <i>unzip</i> or <i>jar</i> the
- '///+ <i>gOfficepath</i>/user/work/verySimpleChart.ods document
- '///+ into <i>gOfficePath</i>/user/work/chart2_XML-directory
- printlog "Unpack storage of test document."
- UnpackStorage(sOutputFile, sUnpackedStorageDir)
- printlog "Read the test documents DOM."
- '/// Load the XML file <i>gOfficePath</i>/user/work/chart2_XML/Object 1/content.xml
- '///+ in an XML editor
- SAXReadFile(sChartContentXML)
- printlog "Set the DOM pointer to document root"
- printlog "|-/"
- SAXSeekElement("/")
- printlog " |-office:document-content"
- '/// Open the element 'office:document-content'
- SAXSeekElement("office:document-content")
- printlog " |-office:body"
- '/// Open the element 'office:body'
- SAXSeekElement("office:body")
- printlog " |-office:chart"
- '/// Open the element 'office:chart'
- SAXSeekElement("office:chart")
- printlog " |-chart:chart"
- '/// Open the element 'chart:chart'
- SAXSeekElement("chart:chart")
- '/// Get the attribute value for <i>chart:class</i>.
- '///+ If it is 'chart:bar' the first characteristics validation has been
- '///+ passed.
- if SAXGetAttributeValue("chart:class") = "chart:bar" then
- printlog "This is a bar chart as expected"
- else
- warnlog "This is no bar chart, it is a " & SaxGetAttributeValue("chart:class")
- endif
- printlog "Seek for chart:plot-area"
- printlog " |-chart:plot-area"
- '/// Open the element 'chart:plot-area'
- SAXSeekElement("chart:plot-area")
- '/// If the attribute value of 'chart:data-source-has-labels' is 'both'
- '///+ the second characteristics validation has been passed.
- if SAXGetAttributeValue("chart:data-source-has-labels") = "both" then
- printlog "The label attribute for chart:plot-area is correct"
- else
- warnlog "The lable attribute is not both, it is " & SaxGetAttributeValue("chart:data-source-has-labels")
- endif
- printlog "Seek for chart:series"
- printlog " |-chart:series"
- '/// Open the element 'chart:series'
- SAXSeekElement("chart:series")
- '/// If the attribute valie of 'chart:values-cell-range-address' is local-table.$B$2:.$B$5''
- '///+ the hird characteristics validation has been passed.
- if SAXGetAttributeValue("chart:values-cell-range-address") = "local-table.$B$2:.$B$5" then
- printlog "The cell range for chart:series is correct"
- else
- warnlog "The cell range is not local-table.$B$2:.$B$5, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
- endif
- ' DEBUG: printlog "I'm here: " & SAXGetElementName
- '/// Close the XML editor.
- SAXRelease
-endcase
-'
-'--------------------------------------------------------------------
-'
-testcase tCompareXMLFormatLoad
-'///+ Test purpose: Verify within three characteristics that there is really a chart
-
- dim sOutputFile as string
- dim sUnpackedStorageDir as string
- dim sChartContentXML as string
-
- gApplication = "CALC"
- sOutputFile = convertpath(gOfficepath & "user\work\verySimpleChart.ods")
- sUnpackedStorageDir = (gOfficePath & ConvertPath("user\work\chart2_XML"))
- sChartContentXML = (gOfficePath & ConvertPath("user\work\chart2_XML") & ConvertPath("\Object 1\content.xml"))
-
- '/// File / Open / <i>gTestToolPath</i>/chart2/update/input/verySimpleChart.ods
- '/// File / Save As / <i>gOfficepath</i>/user/work/verySimpleChart.ods
- if fLoadVerySimpleChartAndSaveLocal() > 0 then
- warnlog "Loading test document failed!"
- goto endsub
- else
- printlog "Test document has successfully been loaded."
- endif
-
- '/// Select the chart object using the navigator
- printlog "Select chart using navigator"
- if fSelectFirstOLE = 0 then
- printlog "Chart is selected"
- else
- warnlog "Chart could not be selected"
- call hCloseDocument
- goto endsub
- endif
-
- '/// Activate chart with Edit / Object / Edit
- printlog "Activate chart by Edit / Object / Edit"
- EditObjectEdit
-
- 'Save document localy
- Kontext "DocumentCalc"
- '/// Press twice <ESCAPE> to leave the chart object
- DocumentCalc.TypeKeys "<ESCAPE>" , 2 'Leave chart and unselect it
- '/// Press <CTRL+HOME> to get to cell A1
- DocumentCalc.TypeKeys "<MOD1 HOME>"
- '/// Press <F9> to re-calculate the spreadsheet and the objects
- DocumentCalc.TypeKeys "<F9>"
- '/// Save the document again
- if NOT hFileSave (sOutputFile) then
- warnlog "Saving test document localy failed -> Aborting"
- call hCloseDocument
- goto endsub
- else
- printlog "File with very simple chart saved successfully."
- endif
- '/// File / Close
- call hCloseDocument
- sleep(3)
- printlog "File with very simple chart closed"
- '/// Uncompress with <i>unzip</i> or <i>jar</i> the
- '///+ <i>gOfficepath</i>/user/work/verySimpleChart.ods document
- '///+ into <i>gOfficePath</i>/user/work/chart2_XML-directory
- printlog "Unpack storage of test document."
- UnpackStorage(sOutputFile, sUnpackedStorageDir)
- printlog "Read the test documents DOM."
- '/// Load the XML file <i>gOfficePath</i>/user/work/chart2_XML/Object 1/content.xml
- '///+ in an XML editor
- SAXReadFile(sChartContentXML)
- printlog "Set the DOM pointer to document root"
- printlog "|-/"
- SAXSeekElement("/")
- printlog " |-office:document-content"
- '/// Open the element 'office:document-content'
- SAXSeekElement("office:document-content")
- printlog " |-office:body"
- '/// Open the element 'office:body'
- SAXSeekElement("office:body")
- printlog " |-office:chart"
- '/// Open the element 'office:chart'
- SAXSeekElement("office:chart")
- printlog " |-chart:chart"
- '/// Open the element 'chart:chart'
- SAXSeekElement("chart:chart")
- '/// Get the attribute value for <i>chart:class</i>.
- '///+ If it is 'chart:bar' the first characteristics validation has been
- '///+ passed.
- if SAXGetAttributeValue("chart:class") = "chart:bar" then
- printlog "This is a bar chart as expected"
- else
- warnlog "This is no bar chart, it is a " & SaxGetAttributeValue("chart:class")
- endif
- printlog "Seek for chart:plot-area"
- printlog " |-chart:plot-area"
- '/// Open the element 'chart:plot-area'
- SAXSeekElement("chart:plot-area")
- '/// If the attribute value of 'table:cell-range-address' is 'Sheet1.A1:Sheet1.B2'
- '///+ the second characteristics validation has been passed.
- if SAXGetAttributeValue("table:cell-range-address") = "Sheet1.A1:B2" then
- printlog "The cell range for chart:plot-area is correct"
- else
- warnlog "#i100780#: The cell range is not Sheet1.A1:B2, it is " & SaxGetAttributeValue("table:cell-range-address")
- endif
- printlog "Seek for chart:series"
- printlog " |-chart:series"
- '/// Open the element 'chart:series'
- SAXSeekElement("chart:series")
- '/// If the attribute valie of 'chart:values-cell-range-address' is Sheet1.A1:Sheet1.A2''
- '///+ the hird characteristics validation has been passed.
- if SAXGetAttributeValue("chart:values-cell-range-address") = "Sheet1.A1:A2" then
- printlog "The cell range for chart:series is correct"
- else
- warnlog "#i100780#: The cell range is not Sheet1.A1:A2, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
- endif
- ' DEBUG: printlog "I'm here: " & SAXGetElementName
- '/// Close the XML editor.
- SAXRelease
-endcase
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: ch2_xml_format.inc,v $
+'*
+'* $Revision: 1.2 $
+'*
+'* last change: $Author: obo $ $Date: 2008-07-22 10:36:42 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/***********************************************************************
+'*
+'* owner : oliver.craemer@sun.com
+'*
+'* short description : Verify the Chart2 XML file format
+'*
+'************************************************************************
+'*
+' #1 tCompareXMLFormatCreate ' Verify Chart2 XML file format by using three characteristcs on new chart
+' #1 tCompareXMLFormatLoad ' Verify Chart2 XML file format by using three characteristcs on loaded chart
+'*
+'\***********************************************************************
+
+testcase tCompareXMLFormatCreate
+'///+ Test purpose: Verify within three characteristics that there is really a chart
+
+ dim sOutputFile as string
+ dim sUnpackedStorageDir as string
+ dim sChartContentXML as string
+
+ gApplication = "WRITER"
+ sOutputFile = convertpath(gOfficepath & "user\work\Chart2_XML.odt")
+ sUnpackedStorageDir = (gOfficePath & ConvertPath("user\work\chart2_XML2"))
+ sChartContentXML = (gOfficePath & ConvertPath("user\work\chart2_XML2") & ConvertPath("\Object 1\content.xml"))
+
+ '/// File / New / Text
+ printlog " Open new Writer document"
+ call hNewDocument
+ '/// Insert chart with Insert / Object / Chart
+ printlog " Insert chart with Insert / Object / Chart"
+ InsertChart
+ '/// Save document to <i>gOfficepath</i>/user/work/Chart2_XML.odt
+ printlog " Save document to <i>gOfficepath</i>/user/work/Chart2_XML.odt"
+ if NOT hFileSaveAsKill (sOutputFile) then
+ warnlog "Saving test document failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "File saved successfully."
+ endif
+ '/// File / Close
+ call hCloseDocument
+ sleep(3)
+ printlog "File closed"
+ '/// Uncompress with <i>unzip</i> or <i>jar</i> the
+ '///+ <i>gOfficepath</i>/user/work/verySimpleChart.ods document
+ '///+ into <i>gOfficePath</i>/user/work/chart2_XML-directory
+ printlog "Unpack storage of test document."
+ UnpackStorage(sOutputFile, sUnpackedStorageDir)
+ printlog "Read the test documents DOM."
+ '/// Load the XML file <i>gOfficePath</i>/user/work/chart2_XML/Object 1/content.xml
+ '///+ in an XML editor
+ SAXReadFile(sChartContentXML)
+ printlog "Set the DOM pointer to document root"
+ printlog "|-/"
+ SAXSeekElement("/")
+ printlog " |-office:document-content"
+ '/// Open the element 'office:document-content'
+ SAXSeekElement("office:document-content")
+ printlog " |-office:body"
+ '/// Open the element 'office:body'
+ SAXSeekElement("office:body")
+ printlog " |-office:chart"
+ '/// Open the element 'office:chart'
+ SAXSeekElement("office:chart")
+ printlog " |-chart:chart"
+ '/// Open the element 'chart:chart'
+ SAXSeekElement("chart:chart")
+ '/// Get the attribute value for <i>chart:class</i>.
+ '///+ If it is 'chart:bar' the first characteristics validation has been
+ '///+ passed.
+ if SAXGetAttributeValue("chart:class") = "chart:bar" then
+ printlog "This is a bar chart as expected"
+ else
+ warnlog "This is no bar chart, it is a " & SaxGetAttributeValue("chart:class")
+ endif
+ printlog "Seek for chart:plot-area"
+ printlog " |-chart:plot-area"
+ '/// Open the element 'chart:plot-area'
+ SAXSeekElement("chart:plot-area")
+ '/// If the attribute value of 'chart:data-source-has-labels' is 'both'
+ '///+ the second characteristics validation has been passed.
+ if SAXGetAttributeValue("chart:data-source-has-labels") = "both" then
+ printlog "The label attribute for chart:plot-area is correct"
+ else
+ warnlog "The lable attribute is not both, it is " & SaxGetAttributeValue("chart:data-source-has-labels")
+ endif
+ printlog "Seek for chart:series"
+ printlog " |-chart:series"
+ '/// Open the element 'chart:series'
+ SAXSeekElement("chart:series")
+ '/// If the attribute valie of 'chart:values-cell-range-address' is local-table.$B$2:.$B$5''
+ '///+ the hird characteristics validation has been passed.
+ if SAXGetAttributeValue("chart:values-cell-range-address") = "local-table.$B$2:.$B$5" then
+ printlog "The cell range for chart:series is correct"
+ else
+ warnlog "The cell range is not local-table.$B$2:.$B$5, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
+ endif
+ ' DEBUG: printlog "I'm here: " & SAXGetElementName
+ '/// Close the XML editor.
+ SAXRelease
+endcase
+'
+'--------------------------------------------------------------------
+'
+testcase tCompareXMLFormatLoad
+'///+ Test purpose: Verify within three characteristics that there is really a chart
+
+ dim sOutputFile as string
+ dim sUnpackedStorageDir as string
+ dim sChartContentXML as string
+
+ gApplication = "CALC"
+ sOutputFile = convertpath(gOfficepath & "user\work\verySimpleChart.ods")
+ sUnpackedStorageDir = (gOfficePath & ConvertPath("user\work\chart2_XML"))
+ sChartContentXML = (gOfficePath & ConvertPath("user\work\chart2_XML") & ConvertPath("\Object 1\content.xml"))
+
+ '/// File / Open / <i>gTestToolPath</i>/chart2/update/input/verySimpleChart.ods
+ '/// File / Save As / <i>gOfficepath</i>/user/work/verySimpleChart.ods
+ if fLoadVerySimpleChartAndSaveLocal() > 0 then
+ warnlog "Loading test document failed!"
+ goto endsub
+ else
+ printlog "Test document has successfully been loaded."
+ endif
+
+ '/// Select the chart object using the navigator
+ printlog "Select chart using navigator"
+ if fSelectFirstOLE = 0 then
+ printlog "Chart is selected"
+ else
+ warnlog "Chart could not be selected"
+ call hCloseDocument
+ goto endsub
+ endif
+
+ '/// Activate chart with Edit / Object / Edit
+ printlog "Activate chart by Edit / Object / Edit"
+ EditObjectEdit
+
+ 'Save document localy
+ Kontext "DocumentCalc"
+ '/// Press twice <ESCAPE> to leave the chart object
+ DocumentCalc.TypeKeys "<ESCAPE>" , 2 'Leave chart and unselect it
+ '/// Press <CTRL+HOME> to get to cell A1
+ DocumentCalc.TypeKeys "<MOD1 HOME>"
+ '/// Press <F9> to re-calculate the spreadsheet and the objects
+ DocumentCalc.TypeKeys "<F9>"
+ '/// Save the document again
+ if NOT hFileSave (sOutputFile) then
+ warnlog "Saving test document localy failed -> Aborting"
+ call hCloseDocument
+ goto endsub
+ else
+ printlog "File with very simple chart saved successfully."
+ endif
+ '/// File / Close
+ call hCloseDocument
+ sleep(3)
+ printlog "File with very simple chart closed"
+ '/// Uncompress with <i>unzip</i> or <i>jar</i> the
+ '///+ <i>gOfficepath</i>/user/work/verySimpleChart.ods document
+ '///+ into <i>gOfficePath</i>/user/work/chart2_XML-directory
+ printlog "Unpack storage of test document."
+ UnpackStorage(sOutputFile, sUnpackedStorageDir)
+ printlog "Read the test documents DOM."
+ '/// Load the XML file <i>gOfficePath</i>/user/work/chart2_XML/Object 1/content.xml
+ '///+ in an XML editor
+ SAXReadFile(sChartContentXML)
+ printlog "Set the DOM pointer to document root"
+ printlog "|-/"
+ SAXSeekElement("/")
+ printlog " |-office:document-content"
+ '/// Open the element 'office:document-content'
+ SAXSeekElement("office:document-content")
+ printlog " |-office:body"
+ '/// Open the element 'office:body'
+ SAXSeekElement("office:body")
+ printlog " |-office:chart"
+ '/// Open the element 'office:chart'
+ SAXSeekElement("office:chart")
+ printlog " |-chart:chart"
+ '/// Open the element 'chart:chart'
+ SAXSeekElement("chart:chart")
+ '/// Get the attribute value for <i>chart:class</i>.
+ '///+ If it is 'chart:bar' the first characteristics validation has been
+ '///+ passed.
+ if SAXGetAttributeValue("chart:class") = "chart:bar" then
+ printlog "This is a bar chart as expected"
+ else
+ warnlog "This is no bar chart, it is a " & SaxGetAttributeValue("chart:class")
+ endif
+ printlog "Seek for chart:plot-area"
+ printlog " |-chart:plot-area"
+ '/// Open the element 'chart:plot-area'
+ SAXSeekElement("chart:plot-area")
+ '/// If the attribute value of 'table:cell-range-address' is 'Sheet1.A1:Sheet1.B2'
+ '///+ the second characteristics validation has been passed.
+ if SAXGetAttributeValue("table:cell-range-address") = "Sheet1.A1:B2" then
+ printlog "The cell range for chart:plot-area is correct"
+ else
+ warnlog "#i100780#: The cell range is not Sheet1.A1:B2, it is " & SaxGetAttributeValue("table:cell-range-address")
+ endif
+ printlog "Seek for chart:series"
+ printlog " |-chart:series"
+ '/// Open the element 'chart:series'
+ SAXSeekElement("chart:series")
+ '/// If the attribute valie of 'chart:values-cell-range-address' is Sheet1.A1:Sheet1.A2''
+ '///+ the hird characteristics validation has been passed.
+ if SAXGetAttributeValue("chart:values-cell-range-address") = "Sheet1.A1:A2" then
+ printlog "The cell range for chart:series is correct"
+ else
+ warnlog "#i100780#: The cell range is not Sheet1.A1:A2, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
+ endif
+ ' DEBUG: printlog "I'm here: " & SAXGetElementName
+ '/// Close the XML editor.
+ SAXRelease
+endcase
diff --git a/testautomation/dbaccess/optional/includes/db_Mozilla.inc b/testautomation/dbaccess/optional/includes/db_Mozilla.inc
index 6d0680eb9620..d846719489d9 100755
--- a/testautomation/dbaccess/optional/includes/db_Mozilla.inc
+++ b/testautomation/dbaccess/optional/includes/db_Mozilla.inc
@@ -1,142 +1,142 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: db_Mozilla.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 07:43:41 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : marc.neumann@sun.com
-'*
-'* short description : Address book mozilla
-'*
-'\***********************************************************************
-sub db_Mozilla
-
- ' Information for this test under
- ' http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book
-
- if fCreateMozillaAddressbookDatasource(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb")) then
-
- tQueryAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
- tSortAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
- else
- tQueryAddressbook("")
- tSortAddressbook("")
- endif
-
-end sub
-'-------------------------------------------------------------------------
-testcase tQueryAddressbook( sFileName )
-
- if ( not fOpenDatabase(sFileName) ) then
- warnlog "Database can't be open"
- printlog "May be you find a solution under http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book"
- goto endsub
- endif
-
- fOpenNewQueryDesign
-
- Kontext "AddTables"
- TableName.Select 1
- '/// Add database table to Query.
- AddTable.Click
- sleep(2)
- if AddTables.exists(2) then
- CloseDlg.Click ' When the AddTables dialog still exists then close him
- endif
- sleep(1)
- Kontext "QueryDesignCriterion"
- Field.Select(1)
- sleep(1)
- Kontext "Toolbar"
- '/// Executing query
- printlog "- Executing query"
- ExecuteBtn.Click
- sleep(5)
- Kontext "TableView"
- if NOT DataWindow.Exists(3) then
- warnlog "Execution of a query failed!"
- end if
-
- call fCloseQueryDesign()
-
- call fCloseDatabase()
-
-endcase
-'-------------------------------------------------------------------------
-testcase tSortAddressbook( sFileName )
-
- Dim sRecordCount as String
-
- '/// open the database file created in the bas file
- printlog "open the database file created in the bas file"
-
- if ( not fOpenDatabase(sFileName) ) then
- warnlog "Database can't be open"
- goto endsub
- endif
-
- '/// open the first table
- printlog "open the first table"
- Kontext "ContainerView"
- ViewTables
- TableTree.select(1)
- OpenTable ' uno-Slot .uno:DB/Open
-
- sleep(2)
-
- '/// count the records in the table
- printlog "count the records in the table"
- Kontext "TableView"
- LastRecord.Click
- sRecordCount = AllRecords.caption()
-
- '/// sort the table
- printlog "sort the table"
- Kontext "Toolbar"
- SortAscending.Click
- sleep(1)
-
- '/// count the table again and check if there are the same count of records then before sorting
- printlog "count the table again and check if there are the same count of records then before sorting"
- Kontext "TableView"
- LastRecord.Click
- if (sRecordCount <> AllRecords.caption() ) then
- warnlog "issue i61611 occur. The records are double after sorting."
- endif
-
- '/// close the table
- printlog "close the table"
- call fCloseTableView()
-
- '/// close the database
- printlog "close the database"
- call fCloseDatabase()
-
-endcase
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: db_Mozilla.inc,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008-06-16 07:43:41 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : marc.neumann@sun.com
+'*
+'* short description : Address book mozilla
+'*
+'\***********************************************************************
+sub db_Mozilla
+
+ ' Information for this test under
+ ' http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book
+
+ if fCreateMozillaAddressbookDatasource(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb")) then
+
+ tQueryAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
+ tSortAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
+ else
+ tQueryAddressbook("")
+ tSortAddressbook("")
+ endif
+
+end sub
+'-------------------------------------------------------------------------
+testcase tQueryAddressbook( sFileName )
+
+ if ( not fOpenDatabase(sFileName) ) then
+ warnlog "Database can't be open"
+ printlog "May be you find a solution under http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book"
+ goto endsub
+ endif
+
+ fOpenNewQueryDesign
+
+ Kontext "AddTables"
+ TableName.Select 1
+ '/// Add database table to Query.
+ AddTable.Click
+ sleep(2)
+ if AddTables.exists(2) then
+ CloseDlg.Click ' When the AddTables dialog still exists then close him
+ endif
+ sleep(1)
+ Kontext "QueryDesignCriterion"
+ Field.Select(1)
+ sleep(1)
+ Kontext "Toolbar"
+ '/// Executing query
+ printlog "- Executing query"
+ ExecuteBtn.Click
+ sleep(5)
+ Kontext "TableView"
+ if NOT DataWindow.Exists(3) then
+ warnlog "Execution of a query failed!"
+ end if
+
+ call fCloseQueryDesign()
+
+ call fCloseDatabase()
+
+endcase
+'-------------------------------------------------------------------------
+testcase tSortAddressbook( sFileName )
+
+ Dim sRecordCount as String
+
+ '/// open the database file created in the bas file
+ printlog "open the database file created in the bas file"
+
+ if ( not fOpenDatabase(sFileName) ) then
+ warnlog "Database can't be open"
+ goto endsub
+ endif
+
+ '/// open the first table
+ printlog "open the first table"
+ Kontext "ContainerView"
+ ViewTables
+ TableTree.select(1)
+ OpenTable ' uno-Slot .uno:DB/Open
+
+ sleep(2)
+
+ '/// count the records in the table
+ printlog "count the records in the table"
+ Kontext "TableView"
+ LastRecord.Click
+ sRecordCount = AllRecords.caption()
+
+ '/// sort the table
+ printlog "sort the table"
+ Kontext "Toolbar"
+ SortAscending.Click
+ sleep(1)
+
+ '/// count the table again and check if there are the same count of records then before sorting
+ printlog "count the table again and check if there are the same count of records then before sorting"
+ Kontext "TableView"
+ LastRecord.Click
+ if (sRecordCount <> AllRecords.caption() ) then
+ warnlog "issue i61611 occur. The records are double after sorting."
+ endif
+
+ '/// close the table
+ printlog "close the table"
+ call fCloseTableView()
+
+ '/// close the database
+ printlog "close the database"
+ call fCloseDatabase()
+
+endcase
diff --git a/testautomation/dbaccess/optional/includes/misc_Macros.inc b/testautomation/dbaccess/optional/includes/misc_Macros.inc
index 69a2d658c0d7..3b2ab6bf2345 100755
--- a/testautomation/dbaccess/optional/includes/misc_Macros.inc
+++ b/testautomation/dbaccess/optional/includes/misc_Macros.inc
@@ -1,121 +1,121 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: misc_RegisterDatabase.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008/06/16 07:43:42 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : marc.neumann@sun.com
-'*
-'* short description : macros in databases
-'*
-'\***********************************************************************
-
-sub misc_Macros
-
- printlog "------------------- misc_Macros.inc ------------------------"
-
- call tMacros
-
-end sub
-'-------------------------------------------------------------------------
-testcase tMacros
-
- hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
-
- dim sFileName as String
- sFileName = ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
- app.FileCopy ConvertPath(gTesttoolPath + "/dbaccess/optional/input/hsql_datasource/hsql_macros_in_subdocument.odb"), ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
-
- ' delete the backup file
- if fileexists(sFileName + "backup.odb") then
- app.kill sFileName + "backup.odb"
- endif
-
- FileOpen
- sleep (1)
- Kontext "OeffnenDlg"
- '/// open the given file
- printlog "open the file: " + sFileName
- Dateiname.SetText sFileName
- sleep (3)
- Oeffnen.Click
- sleep (3)
-
- printlog "check if the subdocument contains macros dialog appear"
- Kontext "MessageBox"
- if (MessageBox.exists(1)) then
- MessageBox.OK
- else
- warnlog "the subdocument contains macros dialog does not appear"
- endif
-
- MigrateMacros
-
- WaitSlot(10)
-
- Kontext "MacroMigration"
- if not (MacroMigration.exists(1)) then
- warnlog "MacroMigration wizard does not appear"
- endif
-
- NextButton.click
-
- DatabaseFile.settext sFileName + "backup.odb"
-
- NextButton.click
- sleep(20)
- MacroMigration.OK
-
- call fCloseDatabase
-
- printlog "open the database again to see if the message box appear again"
-
- FileOpen
- sleep (1)
- Kontext "OeffnenDlg"
- '/// open the given file
- printlog "open the file: " + sFileName
- Dateiname.SetText sFileName
- sleep (3)
- Oeffnen.Click
- sleep (3)
-
- Kontext "MessageBox"
- if (MessageBox.exists(1)) then
- warnlog "MessageBox about macros appear. Should not after migration."
- else
- 'nothing
- endif
-
- call fCloseDatabase
-
- hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
-
-endcase
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: misc_RegisterDatabase.inc,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008/06/16 07:43:42 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : marc.neumann@sun.com
+'*
+'* short description : macros in databases
+'*
+'\***********************************************************************
+
+sub misc_Macros
+
+ printlog "------------------- misc_Macros.inc ------------------------"
+
+ call tMacros
+
+end sub
+'-------------------------------------------------------------------------
+testcase tMacros
+
+ hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
+
+ dim sFileName as String
+ sFileName = ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
+ app.FileCopy ConvertPath(gTesttoolPath + "/dbaccess/optional/input/hsql_datasource/hsql_macros_in_subdocument.odb"), ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
+
+ ' delete the backup file
+ if fileexists(sFileName + "backup.odb") then
+ app.kill sFileName + "backup.odb"
+ endif
+
+ FileOpen
+ sleep (1)
+ Kontext "OeffnenDlg"
+ '/// open the given file
+ printlog "open the file: " + sFileName
+ Dateiname.SetText sFileName
+ sleep (3)
+ Oeffnen.Click
+ sleep (3)
+
+ printlog "check if the subdocument contains macros dialog appear"
+ Kontext "MessageBox"
+ if (MessageBox.exists(1)) then
+ MessageBox.OK
+ else
+ warnlog "the subdocument contains macros dialog does not appear"
+ endif
+
+ MigrateMacros
+
+ WaitSlot(10)
+
+ Kontext "MacroMigration"
+ if not (MacroMigration.exists(1)) then
+ warnlog "MacroMigration wizard does not appear"
+ endif
+
+ NextButton.click
+
+ DatabaseFile.settext sFileName + "backup.odb"
+
+ NextButton.click
+ sleep(20)
+ MacroMigration.OK
+
+ call fCloseDatabase
+
+ printlog "open the database again to see if the message box appear again"
+
+ FileOpen
+ sleep (1)
+ Kontext "OeffnenDlg"
+ '/// open the given file
+ printlog "open the file: " + sFileName
+ Dateiname.SetText sFileName
+ sleep (3)
+ Oeffnen.Click
+ sleep (3)
+
+ Kontext "MessageBox"
+ if (MessageBox.exists(1)) then
+ warnlog "MessageBox about macros appear. Should not after migration."
+ else
+ 'nothing
+ endif
+
+ call fCloseDatabase
+
+ hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
+
+endcase
diff --git a/testautomation/framework/required/includes/topten.inc b/testautomation/framework/required/includes/topten.inc
index 8fc5ac835af4..549fe8f56fd1 100755
--- a/testautomation/framework/required/includes/topten.inc
+++ b/testautomation/framework/required/includes/topten.inc
@@ -1,328 +1,328 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: topten.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:19:04 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Smoke test (load/save/clipboard)
-'*
-'\***********************************************************************
-
-sub topten
-
- gApplication = "WRITER"
- call Top_ten_test
-
- gApplication = "CALC"
- call Top_ten_test
-
- gApplication = "IMPRESS"
- call Top_ten_test
-
- gApplication = "DRAW"
- call Top_ten_test
-
- gApplication = "MATH"
- call Top_ten_test
-
- gApplication = "HTML"
- call Top_ten_test
-
- gApplication = "MASTERDOCUMENT"
- call Top_ten_test
-
-end sub
-
-'*******************************************************************************
-
-testcase Top_ten_test
- dim sUserWorkDirectory as string
- dim sFilename_native as String
- dim sFilename_export as String
- dim sFilter_native as string
- dim sFilter_export as String
- dim bExportFile as boolean
-
- sUserWorkDirectory = gOfficePath & "user\work\"
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: topten.inc,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008-06-16 12:19:04 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : joerg.skottke@sun.com
+'*
+'* short description : Smoke test (load/save/clipboard)
+'*
+'\***********************************************************************
+
+sub topten
+
+ gApplication = "WRITER"
+ call Top_ten_test
+
+ gApplication = "CALC"
+ call Top_ten_test
+
+ gApplication = "IMPRESS"
+ call Top_ten_test
+
+ gApplication = "DRAW"
+ call Top_ten_test
+
+ gApplication = "MATH"
+ call Top_ten_test
+
+ gApplication = "HTML"
+ call Top_ten_test
+
+ gApplication = "MASTERDOCUMENT"
+ call Top_ten_test
+
+end sub
+
+'*******************************************************************************
+
+testcase Top_ten_test
+ dim sUserWorkDirectory as string
+ dim sFilename_native as String
+ dim sFilename_export as String
+ dim sFilter_native as string
+ dim sFilter_export as String
+ dim bExportFile as boolean
+
+ sUserWorkDirectory = gOfficePath & "user\work\"
bExportFile = true
- printlog( "Current document type: " & gApplication )
-
- ' set the filenames and their filters. HTML is not exported
- if ( gApplication = "HTML" ) then
- sFilename_native = "ls_test.html"
+ printlog( "Current document type: " & gApplication )
+
+ ' set the filenames and their filters. HTML is not exported
+ if ( gApplication = "HTML" ) then
+ sFilename_native = "ls_test.html"
sFilename_export = "ls_test.htm"
- bExportFile = FALSE
- else
- sFilename_native = "ls_test" & hGetSuffix( "current" )
- sFilename_export = "ls_test" & hGetSuffix( "569" )
- endif
-
- printlog( "File (current): " & sFilename_native )
- printlog( "File (src569).: " & sFilename_export )
+ bExportFile = FALSE
+ else
+ sFilename_native = "ls_test" & hGetSuffix( "current" )
+ sFilename_export = "ls_test" & hGetSuffix( "569" )
+ endif
+
+ printlog( "File (current): " & sFilename_native )
+ printlog( "File (src569).: " & sFilename_export )
- ' Delete the workfiles, they might have been left over by prior incomplete testrun
- hDeleteFile( sUserWorkDirectory & sFilename_native )
- hDeleteFile( sUserWorkDirectory & sFilename_export )
+ ' Delete the workfiles, they might have been left over by prior incomplete testrun
+ hDeleteFile( sUserWorkDirectory & sFilename_native )
+ hDeleteFile( sUserWorkDirectory & sFilename_export )
- ' Set the API filternames for the current application (native XML format)
- select case gApplication
- case "WRITER" : sFilter_native = "writer8"
- case "CALC" : sFilter_native = "calc8"
- case "DRAW" : sFilter_native = "draw8"
- case "IMPRESS" : sFilter_native = "impress8"
- case "MATH" : sFilter_native = "math8"
- case "MASTERDOCUMENT" : sFilter_native = "writerglobal8"
+ ' Set the API filternames for the current application (native XML format)
+ select case gApplication
+ case "WRITER" : sFilter_native = "writer8"
+ case "CALC" : sFilter_native = "calc8"
+ case "DRAW" : sFilter_native = "draw8"
+ case "IMPRESS" : sFilter_native = "impress8"
+ case "MATH" : sFilter_native = "math8"
+ case "MASTERDOCUMENT" : sFilter_native = "writerglobal8"
case "HTML" : sFilter_native = "HTML"
- case else : warnlog "Invalid gApplication: " & gApplication
- end select
-
- printlog( "Create a new document" )
+ case else : warnlog "Invalid gApplication: " & gApplication
+ end select
+
+ printlog( "Create a new document" )
call hNewDocument
-
- printlog( "Clipboard" )
+
+ printlog( "Clipboard" )
call CutCopyPaste
-
- printlog( "Save (default-fileformat): " & sFilename_native )
- call hFileSaveAsKill ( sUserWorkDirectory & sFilename_native )
-
- if ( bExportFile ) then
-
- ' Set the API filternames for the current application (StarOffice 5.2 binary format)
- select case gApplication
- case "WRITER" : sFilter_export = "StarWriter 5.0"
- case "CALC" : sFilter_export = "StarCalc 5.0"
- case "DRAW" : sFilter_export = "StarDraw 5.0"
- case "IMPRESS" : sFilter_export = "StarImpress 5.0"
- case "MATH" : sFilter_export = "StarMath 5.0"
- case "MASTERDOCUMENT" : sFilter_export = "StarWriter 5.0/GlobalDocument"
- case else : warnlog "Invalid gApplication: " & gApplication
- end select
-
- printlog( "Save (5.2-fileformat): " & sFilename_export )
- hFileSaveAsWithFilterKill( sUserWorkDirectory & sFilename_export , sFilter_export )
-
- printlog( "Close" )
- FileClose
+
+ printlog( "Save (default-fileformat): " & sFilename_native )
+ call hFileSaveAsKill ( sUserWorkDirectory & sFilename_native )
+
+ if ( bExportFile ) then
+
+ ' Set the API filternames for the current application (StarOffice 5.2 binary format)
+ select case gApplication
+ case "WRITER" : sFilter_export = "StarWriter 5.0"
+ case "CALC" : sFilter_export = "StarCalc 5.0"
+ case "DRAW" : sFilter_export = "StarDraw 5.0"
+ case "IMPRESS" : sFilter_export = "StarImpress 5.0"
+ case "MATH" : sFilter_export = "StarMath 5.0"
+ case "MASTERDOCUMENT" : sFilter_export = "StarWriter 5.0/GlobalDocument"
+ case else : warnlog "Invalid gApplication: " & gApplication
+ end select
+
+ printlog( "Save (5.2-fileformat): " & sFilename_export )
+ hFileSaveAsWithFilterKill( sUserWorkDirectory & sFilename_export , sFilter_export )
+
+ printlog( "Close" )
+ FileClose
+
+ ' There should be no alien warning
+ kontext "active"
+ If ( active.exists( 1 ) ) then
+ warnlog( "Unexpected messagebox: '" & active.getText & "'" )
+ Active.Yes
+ else
+ printlog( "No more alien warning on closing the document. Good." )
+ endif
+ else
+ FileClose
+
+ kontext "active"
+ if ( Active.Exists( 1 ) ) then
+ warnlog( "Unexpected Active after saving: '" & active.getText & "'" )
+ try
+ Active.Yes()
+ catch
+ Active.No()
+ endcatch
+ endif
+ endif
- ' There should be no alien warning
- kontext "active"
- If ( active.exists( 1 ) ) then
- warnlog( "Unexpected messagebox: '" & active.getText & "'" )
- Active.Yes
- else
- printlog( "No more alien warning on closing the document. Good." )
- endif
- else
- FileClose
-
- kontext "active"
- if ( Active.Exists( 1 ) ) then
- warnlog( "Unexpected Active after saving: '" & active.getText & "'" )
- try
- Active.Yes()
- catch
- Active.No()
- endcatch
- endif
- endif
-
- printlog( "Load (default-fileformat): " & sFilename_native )
- call hFileOpen( sUserWorkDirectory & sFilename_native )
+ printlog( "Load (default-fileformat): " & sFilename_native )
+ call hFileOpen( sUserWorkDirectory & sFilename_native )
- if ( bExportFile ) then
- printlog( "Change the document" )
- hChangeDoc()
- printlog( "Save" )
- hFileSave()
- endif
-
- printlog( "Close" )
- FileClose
-
if ( bExportFile ) then
-
- printlog( "Load (5.2-fileformat): " & sFilename_export )
+ printlog( "Change the document" )
+ hChangeDoc()
+ printlog( "Save" )
+ hFileSave()
+ endif
+
+ printlog( "Close" )
+ FileClose
+
+ if ( bExportFile ) then
+
+ printlog( "Load (5.2-fileformat): " & sFilename_export )
call hFileOpen (sUserWorkDirectory & sFilename_export)
-
- if ( gApplication = "MATH" AND iSprache = 84 AND gPlatform="lin" ) then
- try
- kontext "DocumentMath"
- DocumentMath.MouseDown(50,50)
- DocumentMath.MouseUp(50,50)
- qaErrorLog( "Use workaround focus problem for math and language vi/84" )
- ' Needed by AndreSchnabel, not manual reproduceable, only with TestTool
- catch
- qaErrorLog( "Workaround focus problem failed." )
- endcatch
+
+ if ( gApplication = "MATH" AND iSprache = 84 AND gPlatform="lin" ) then
+ try
+ kontext "DocumentMath"
+ DocumentMath.MouseDown(50,50)
+ DocumentMath.MouseUp(50,50)
+ qaErrorLog( "Use workaround focus problem for math and language vi/84" )
+ ' Needed by AndreSchnabel, not manual reproduceable, only with TestTool
+ catch
+ qaErrorLog( "Workaround focus problem failed." )
+ endcatch
endif
- ' Modify the export document to trigger the alien warning on next save
- printlog( "Change the document" )
+ ' Modify the export document to trigger the alien warning on next save
+ printlog( "Change the document" )
hChangeDoc()
-
- printlog( "Save" )
- FileSave
-
- Kontext "AlienWarning"
- if ( AlienWarning.exists( 3 ) ) then
- printlog( "Closing expected alien warning. Good." )
- AlienWarning.OK()
- else
- warnlog( "Alien warning is missing" )
- endif
-
- kontext "active"
- if ( Active.Exists( 3 ) ) then
- warnlog( "Unexpected messagebox: '" & active.getText & "'" )
+
+ printlog( "Save" )
+ FileSave
+
+ Kontext "AlienWarning"
+ if ( AlienWarning.exists( 3 ) ) then
+ printlog( "Closing expected alien warning. Good." )
+ AlienWarning.OK()
+ else
+ warnlog( "Alien warning is missing" )
+ endif
+
+ kontext "active"
+ if ( Active.Exists( 3 ) ) then
+ warnlog( "Unexpected messagebox: '" & active.getText & "'" )
Active.yes
else
- printlog( "No unexpected messages on save. Good." )
- endif
-
- printlog( "Close" )
- FileClose
-
- kontext "active"
- if ( Active.Exists() ) then
- warnlog( "Unexpected messagebox: '" & active.getText & "'" )
- Active.Yes()
- else
- printlog( "No more alien warning to close. Good." )
- endif
- endif
-
- hDeleteFile( sUserWorkDirectory & sFilename_native )
- hDeleteFile( sUserWorkDirectory & sFilename_export )
-
-endcase
-
-'*******************************************************************************
-
-sub CutCopyPaste
- dim sSelectAll as string
-
- ' In Spain Select All is CTRL+E; CTRL+A is FileOpen
- if (iSprache=34) then
- sSelectAll = "<Mod1 e>"
- else
- sSelectAll = "<Mod1 a>"
- endif
-
- select case gApplication
- case "WRITER", "HTML", "MASTERDOCUMENT"
- kontext "documentwriter"
- DocumentWriter.TypeKeys "This is a test.<Return>"
- printlog( " cut" )
- DocumentWriter.TypeKeys sSelectAll
- DocumentWriter.TypeKeys "<Mod1 x>"
- Wait( 500 )
- printlog( " paste" )
- DocumentWriter.TypeKeys "<Mod1 v>"
- Wait( 500 )
- printlog( " copy" )
- DocumentWriter.TypeKeys sSelectAll
- DocumentWriter.TypeKeys "<Mod1 c>"
- Wait( 500 )
- printlog( " paste" )
- DocumentWriter.TypeKeys "<Mod1 v>"
- Wait( 500 )
- case "CALC" : Kontext "DocumentCalc"
- DocumentCalc.TypeKeys "This is a test.<Return>"
- DocumentCalc.TypeKeys "<Up>"
- printlog( " cut" )
- DocumentCalc.TypeKeys "<Mod1 x>"
- Wait( 500 )
- printlog( " paste" )
- DocumentCalc.TypeKeys "<Down>"
- DocumentCalc.TypeKeys "<Mod1 v>"
- Wait( 500 )
- printlog( " copy" )
- DocumentCalc.TypeKeys "<Mod1 c>"
- Wait( 500 )
- printlog( " paste" )
- DocumentCalc.TypeKeys "<Down>"
- DocumentCalc.TypeKeys "<Mod1 v>"
- Wait( 500 )
- case "DRAW" : Kontext "DocumentDraw"
- hRechteckErstellen ( 30, 30, 60, 60 )
- gMouseClick ( 1, 1 )
- printlog( " cut" )
- DocumentDraw.TypeKeys sSelectAll
- DocumentDraw.TypeKeys "<Mod1 x>"
- Wait( 500 )
- printlog( " paste" )
- DocumentDraw.TypeKeys "<Mod1 v>"
- Wait( 500 )
- printlog( " copy" )
- gMouseClick ( 1, 1 )
- DocumentDraw.TypeKeys sSelectAll
- DocumentDraw.TypeKeys "<Mod1 c>"
- Wait( 500 )
- printlog( " paste" )
- gMouseClick ( 1, 1 )
- DocumentDraw.TypeKeys "<Mod1 v>"
- case "IMPRESS": Kontext "DocumentImpress"
- hRechteckErstellen ( 30, 30, 60, 60 )
- gMouseClick ( 1, 1 )
- printlog( " cut" )
- DocumentImpress.TypeKeys sSelectAll
- DocumentImpress.TypeKeys "<Mod1 x>"
- Wait( 500 )
- printlog( " paste" )
- DocumentImpress.TypeKeys "<Mod1 v>"
- Wait( 500 )
- printlog( " copy" )
- gMouseClick ( 1, 1 )
- DocumentImpress.TypeKeys sSelectAll
- DocumentImpress.TypeKeys "<Mod1 c>"
- Wait( 500 )
- printlog( " paste" )
- gMouseClick ( 1, 1 )
- DocumentImpress.TypeKeys "<Mod1 v>"
- case "MATH" : SchreibenInMathdok "a over b"
- printlog( " cut" )
- hUseAsyncSlot( "EditSelectAllMath" )
- hUseAsyncSlot( "EditCut" )
- printlog( " paste" )
- hUseAsyncSlot( "EditPaste" )
- printlog( " copy" )
- hUseAsyncSlot( "EditSelectAllMath" )
- hUseAsyncSlot( "EditCopy" )
- printlog( " paste" )
- hUseAsyncSlot( "EditPaste" )
-
- end select
-end sub
-
-
-
+ printlog( "No unexpected messages on save. Good." )
+ endif
+
+ printlog( "Close" )
+ FileClose
+
+ kontext "active"
+ if ( Active.Exists() ) then
+ warnlog( "Unexpected messagebox: '" & active.getText & "'" )
+ Active.Yes()
+ else
+ printlog( "No more alien warning to close. Good." )
+ endif
+ endif
+
+ hDeleteFile( sUserWorkDirectory & sFilename_native )
+ hDeleteFile( sUserWorkDirectory & sFilename_export )
+
+endcase
+
+'*******************************************************************************
+
+sub CutCopyPaste
+ dim sSelectAll as string
+
+ ' In Spain Select All is CTRL+E; CTRL+A is FileOpen
+ if (iSprache=34) then
+ sSelectAll = "<Mod1 e>"
+ else
+ sSelectAll = "<Mod1 a>"
+ endif
+
+ select case gApplication
+ case "WRITER", "HTML", "MASTERDOCUMENT"
+ kontext "documentwriter"
+ DocumentWriter.TypeKeys "This is a test.<Return>"
+ printlog( " cut" )
+ DocumentWriter.TypeKeys sSelectAll
+ DocumentWriter.TypeKeys "<Mod1 x>"
+ Wait( 500 )
+ printlog( " paste" )
+ DocumentWriter.TypeKeys "<Mod1 v>"
+ Wait( 500 )
+ printlog( " copy" )
+ DocumentWriter.TypeKeys sSelectAll
+ DocumentWriter.TypeKeys "<Mod1 c>"
+ Wait( 500 )
+ printlog( " paste" )
+ DocumentWriter.TypeKeys "<Mod1 v>"
+ Wait( 500 )
+ case "CALC" : Kontext "DocumentCalc"
+ DocumentCalc.TypeKeys "This is a test.<Return>"
+ DocumentCalc.TypeKeys "<Up>"
+ printlog( " cut" )
+ DocumentCalc.TypeKeys "<Mod1 x>"
+ Wait( 500 )
+ printlog( " paste" )
+ DocumentCalc.TypeKeys "<Down>"
+ DocumentCalc.TypeKeys "<Mod1 v>"
+ Wait( 500 )
+ printlog( " copy" )
+ DocumentCalc.TypeKeys "<Mod1 c>"
+ Wait( 500 )
+ printlog( " paste" )
+ DocumentCalc.TypeKeys "<Down>"
+ DocumentCalc.TypeKeys "<Mod1 v>"
+ Wait( 500 )
+ case "DRAW" : Kontext "DocumentDraw"
+ hRechteckErstellen ( 30, 30, 60, 60 )
+ gMouseClick ( 1, 1 )
+ printlog( " cut" )
+ DocumentDraw.TypeKeys sSelectAll
+ DocumentDraw.TypeKeys "<Mod1 x>"
+ Wait( 500 )
+ printlog( " paste" )
+ DocumentDraw.TypeKeys "<Mod1 v>"
+ Wait( 500 )
+ printlog( " copy" )
+ gMouseClick ( 1, 1 )
+ DocumentDraw.TypeKeys sSelectAll
+ DocumentDraw.TypeKeys "<Mod1 c>"
+ Wait( 500 )
+ printlog( " paste" )
+ gMouseClick ( 1, 1 )
+ DocumentDraw.TypeKeys "<Mod1 v>"
+ case "IMPRESS": Kontext "DocumentImpress"
+ hRechteckErstellen ( 30, 30, 60, 60 )
+ gMouseClick ( 1, 1 )
+ printlog( " cut" )
+ DocumentImpress.TypeKeys sSelectAll
+ DocumentImpress.TypeKeys "<Mod1 x>"
+ Wait( 500 )
+ printlog( " paste" )
+ DocumentImpress.TypeKeys "<Mod1 v>"
+ Wait( 500 )
+ printlog( " copy" )
+ gMouseClick ( 1, 1 )
+ DocumentImpress.TypeKeys sSelectAll
+ DocumentImpress.TypeKeys "<Mod1 c>"
+ Wait( 500 )
+ printlog( " paste" )
+ gMouseClick ( 1, 1 )
+ DocumentImpress.TypeKeys "<Mod1 v>"
+ case "MATH" : SchreibenInMathdok "a over b"
+ printlog( " cut" )
+ hUseAsyncSlot( "EditSelectAllMath" )
+ hUseAsyncSlot( "EditCut" )
+ printlog( " paste" )
+ hUseAsyncSlot( "EditPaste" )
+ printlog( " copy" )
+ hUseAsyncSlot( "EditSelectAllMath" )
+ hUseAsyncSlot( "EditCopy" )
+ printlog( " paste" )
+ hUseAsyncSlot( "EditPaste" )
+
+ end select
+end sub
+
+
+
diff --git a/testautomation/framework/required/includes/wizard_fax.inc b/testautomation/framework/required/includes/wizard_fax.inc
index c36cbc1421be..cadd441e8ae6 100755
--- a/testautomation/framework/required/includes/wizard_fax.inc
+++ b/testautomation/framework/required/includes/wizard_fax.inc
@@ -1,106 +1,106 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: wizard_fax.inc,v $
-'*
-'* $Revision: 1.2 $
-'*
-'* last change: $Author: rt $ $Date: 2008-09-04 09:16:59 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : joerg.skottke@sun.com
-'*
-'* short description : Update Test for Fax Wizard
-'*
-'\******************************************************************************
-
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: wizard_fax.inc,v $
+'*
+'* $Revision: 1.2 $
+'*
+'* last change: $Author: rt $ $Date: 2008-09-04 09:16:59 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : joerg.skottke@sun.com
+'*
+'* short description : Update Test for Fax Wizard
+'*
+'\******************************************************************************
+
testcase tUpdtWizardFax
- printlog( "Resource test for the fax wizard" )
-
- dim iErr as integer
- dim brc as boolean
-
- dim cTemplateName as string
- dim cTemplatePath as string
-
- ' Build the filename we want to save the template as.
- cTemplateName = "FWK-testtool-faxtemplate.ott"
- cTemplatePath = gOfficePath & "user\template\" & cTemplateName
- cTemplatePath = convertpath( cTemplatePath )
-
- FileAutopilotFax
-
- kontext "AutopilotFax"
- if ( AutopilotFax.exists( 2 ) ) then
-
- kontext "AutopilotFax"
- call DialogTest( AutopilotFax, 1 )
- hClickNextButton()
-
- kontext "AutopilotFax"
- call DialogTest( AutopilotFax, 2 )
- hClickNextButton()
-
- kontext "AutopilotFax"
- call DialogTest( AutopilotFax, 3 )
- hClickNextButton()
-
- kontext "AutopilotFax"
- call DialogTest( AutopilotFax, 4 )
- hClickNextButton()
-
- kontext "AutopilotFax"
- call DialogTest( AutopilotFax, 5 )
-
- printlog( "Name the template for further usage" )
- TemplateName.setText( cTemplateName )
-
- hSetTemplateSavePath( cTemplatePath )
-
- hFinishWizard( 1 )
-
- kontext "StandardBar"
- hWaitForObject( Speichern, 5000 )
-
- brc = hDestroyDocument()
- if ( not brc ) then
- qaerrorlog( "#i59233# The wizard does not display the new template" )
- endif
-
- printlog( "Delete the user-template: " & cTemplatePath )
- hDeleteFile( cTemplatePath )
-
- else
- warnlog( "Fax wizard did not open/exceeded timeout" )
- endif
-
- while( getDocumentCount() > 0 )
- hDestroyDocument()
- wend
-
-
-endcase
+ printlog( "Resource test for the fax wizard" )
+
+ dim iErr as integer
+ dim brc as boolean
+
+ dim cTemplateName as string
+ dim cTemplatePath as string
+
+ ' Build the filename we want to save the template as.
+ cTemplateName = "FWK-testtool-faxtemplate.ott"
+ cTemplatePath = gOfficePath & "user\template\" & cTemplateName
+ cTemplatePath = convertpath( cTemplatePath )
+
+ FileAutopilotFax
+
+ kontext "AutopilotFax"
+ if ( AutopilotFax.exists( 2 ) ) then
+
+ kontext "AutopilotFax"
+ call DialogTest( AutopilotFax, 1 )
+ hClickNextButton()
+
+ kontext "AutopilotFax"
+ call DialogTest( AutopilotFax, 2 )
+ hClickNextButton()
+
+ kontext "AutopilotFax"
+ call DialogTest( AutopilotFax, 3 )
+ hClickNextButton()
+
+ kontext "AutopilotFax"
+ call DialogTest( AutopilotFax, 4 )
+ hClickNextButton()
+
+ kontext "AutopilotFax"
+ call DialogTest( AutopilotFax, 5 )
+
+ printlog( "Name the template for further usage" )
+ TemplateName.setText( cTemplateName )
+
+ hSetTemplateSavePath( cTemplatePath )
+
+ hFinishWizard( 1 )
+
+ kontext "StandardBar"
+ hWaitForObject( Speichern, 5000 )
+
+ brc = hDestroyDocument()
+ if ( not brc ) then
+ qaerrorlog( "#i59233# The wizard does not display the new template" )
+ endif
+
+ printlog( "Delete the user-template: " & cTemplatePath )
+ hDeleteFile( cTemplatePath )
+
+ else
+ warnlog( "Fax wizard did not open/exceeded timeout" )
+ endif
+
+ while( getDocumentCount() > 0 )
+ hDestroyDocument()
+ wend
+
+
+endcase
diff --git a/testautomation/global/tools/includes/optional/t_ole.inc b/testautomation/global/tools/includes/optional/t_ole.inc
index 457704f20b13..10a913102a18 100755
--- a/testautomation/global/tools/includes/optional/t_ole.inc
+++ b/testautomation/global/tools/includes/optional/t_ole.inc
@@ -65,15 +65,15 @@ end function
'*******************************************************************************
-function hGetOleObjectName( ObjectType as string ) as string
-
- dim oUnoOfficeConnection as object
- dim oUnoConfigurationAccess as object
- dim aPropertyValue(1) as new com.sun.star.beans.PropertyValue
+function hGetOleObjectName( ObjectType as string ) as string
+
+ dim oUnoOfficeConnection as object
+ dim oUnoConfigurationAccess as object
+ dim aPropertyValue(1) as new com.sun.star.beans.PropertyValue
dim xViewRoot as object
dim cConfigString as string
- dim cString as string
-
+ dim cString as string
+
const CFN = "global::tools::includes::optional::t_ole.inc::hGetOleObjectName(): "
' Test function parameters. They are <> gApplication as the API is case sensitive
@@ -94,22 +94,22 @@ function hGetOleObjectName( ObjectType as string ) as string
if ( VERBOSE ) then printlog( CFN & "Retrieving OLE name for: " & ObjectType )
- ' ...Embedding is physical path, ObjectNames the top node
- aPropertyValue( 0 ).Name = "nodepath"
+ ' ...Embedding is physical path, ObjectNames the top node
+ aPropertyValue( 0 ).Name = "nodepath"
aPropertyValue( 0 ).Value = "/org.openoffice.Office.Embedding/ObjectNames/" & ObjectType
- ' Connect to remote UNO
- oUnoOfficeConnection = hGetUnoService( TRUE )
-
- if ( isNull( oUnoOfficeConnection )) then
- warnlog( CFN & "Failed to establish UNO connection, hGetUnoService failed" )
- hGetOleObjectName() = ""
+ ' Connect to remote UNO
+ oUnoOfficeConnection = hGetUnoService( TRUE )
+
+ if ( isNull( oUnoOfficeConnection )) then
+ warnlog( CFN & "Failed to establish UNO connection, hGetUnoService failed" )
+ hGetOleObjectName() = ""
else
- ' Get a configuration provider
+ ' Get a configuration provider
oUnoConfigurationAccess = oUnoOfficeConnection.createInstance( "com.sun.star.configuration.ConfigurationProvider" )
' Get access
- xViewRoot = oUnoConfigurationAccess.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aPropertyValue() )
+ xViewRoot = oUnoConfigurationAccess.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aPropertyValue() )
cConfigString = xViewRoot.getByName( "ObjectUIName" )
' The string contains placeholders %PRODUCTNAME and %PRODUCTVERSION which have to be replaced
@@ -119,11 +119,11 @@ function hGetOleObjectName( ObjectType as string ) as string
else
cString = gProductName & " " & gOfficeVersion & " " & right( cConfigString, len( cConfigString ) - 29 )
endif
-
+
endif
- hGetOleObjectName() = cString
-
+ hGetOleObjectName() = cString
+
end function
'*******************************************************************************
@@ -139,7 +139,7 @@ function GetOleDefaultNames()
gOLEChart = hGetOleObjectName( "Chart" )
gOLEImpress = hGetOleObjectName( "Impress" )
gOLEDraw = hGetOleObjectName( "Draw" )
- gOLEMath = hGetOleObjectName( "Math" )
+ gOLEMath = hGetOleObjectName( "Math" )
end function
diff --git a/testautomation/global/tools/includes/optional/t_xml_filter1.inc b/testautomation/global/tools/includes/optional/t_xml_filter1.inc
index 96992320558c..226e2fd25e89 100644
--- a/testautomation/global/tools/includes/optional/t_xml_filter1.inc
+++ b/testautomation/global/tools/includes/optional/t_xml_filter1.inc
@@ -1,828 +1,828 @@
-'encoding UTF-8 Do not remove or change this line!
-'*******************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: t_xml_filter1.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-13 10:27:09 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/******************************************************************************
-'*
-'* owner : helge.delfs@sun.com
-'*
-'* short description : Tools / XML Filter Settings Resource Test
-'*
-'\******************************************************************************
-
+'encoding UTF-8 Do not remove or change this line!
+'*******************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: t_xml_filter1.inc,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008-06-13 10:27:09 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/******************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Tools / XML Filter Settings Resource Test
+'*
+'\******************************************************************************
+
testcase tToolsXMLFilterSettings
- Dim iCountOfXSLTStylesAtBeginning as integer
- Dim iCountOfXSLTStylesAfterInstallCheck as integer
- Dim iApplicationEntries as integer
- Dim ia as integer
- Dim ib as integer
- Dim ic as integer
- Dim iCountMsgBox as integer
- Dim sErrorPointerTextForResultfile as string
- Dim sFilterPackagePath as string
- Dim sDocXMLTestFile as string
- Dim sWhichFilterToUse as string
- Dim sTempReadFilterName as string
- Dim bREMOVEXSLT as boolean
- Dim bJavaBroken as boolean
-
- 'Not being used for Writer/WEB
- if gApplication = "HTML" then
- goto endsub
- endif
-
- 'Define the pointer where all warnlogs/QAErrorLogs will come from in this routine.
- sErrorPointerTextForResultfile = "global::tools::inc::t_xml_filter1,inc::tToolsXMLFilterSettings: "
-
- 'Later it will be detected if the JRE is working with the office installation
- 'Here bJavaBroken will be set to the default behaviour (Java is detected and is working)
- bJavaBroken = FALSE
-
- '/// Opening new document.
- printlog "- Opening new (application) document."
- call hNewDocument
- '/// Calling the menu item <i>Tools -&gt; XML Filter Settings</i>
- ToolsXMLFilterSettings
- printlog "- XML Filter Settings"
- Kontext "XMLFilterSettings"
- if XMLFilterSettings.Exists(1) then
- call Dialogtest (XMLFilterSettings)
- else
- warnlog sErrorPointerTextForResultfile & "Slot to open the 'XML Filter Settings dialog' failed. Exiting."
- goto endsub
- end if
- 'Counting the existing XSLT stylesheets to verify them after the
- 'XSLT stylesheet Check. Setting bREMOVEXSLT = FALSE which only will
- 'be TRUE if the count of before and after the check are different.
- bREMOVEXSLT = FALSE
- iCountOfXSLTStylesAtBeginning = FilterList.GetItemCount
- '/// Closing the XML Filter Settings-dialog.
- printlog "Closing the 'XML Filter Settings'-dialog."
- CloseBtn.Click
- '/// Checking if there are any XSLT stylesheets available (<i>finitialXMLSetting(&quot;docbook or word or excel&quot;)</i>).
- printlog " + Checking if there are any XSLT stylesheets available."
- select case gApplication
- case "CALC" : sWhichFilterToUse = "excel"
- case "WRITER" : sWhichFilterToUse = "word"
- case else : sWhichFilterToUse = "docbook"
- end select
- if finitialXMLSetting(sWhichFilterToUse) = FALSE then
- warnlog "It wasn't possible to use/install external XML filter. Test aborting!"
- goto endsub
- end if
- ToolsXMLFilterSettings
- printlog "Open XML Filter Settings dialog again."
- Kontext "XMLFilterSettings"
- iCountOfXSLTStylesAfterInstallCheck = FilterList.GetItemCount
- if iCountOfXSLTStylesAfterInstallCheck <> iCountOfXSLTStylesAtBeginning then
- bREMOVEXSLT = TRUE
- end if
- '/// Checking disabling of buttons on this dialog.
- printlog " + Checking that Edit/Test/Delete/SaveToPackage buttons disabled when no filter is selected."
- if EditBtn.IsEnabled then
- FilterList.Typekeys "<MOD1 SPACE>"
- sleep(1)
- end if
- if EditBtn.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "Edit button: Enabled when no entry is selected!?"
- end if
- if TestXSLTs.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "TestXSLTs button: Enabled when no entry is selected!?"
- end if
- if DeleteBtn.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "Delete button: Enabled when no entry is selected!?"
- end if
- if SaveToPackage.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "SaveToPackage button: Enabled when no entry is selected!?"
- end if
- '/// Checking disabling of buttons on this dialog.
- printlog " + Checking that Edit/Test/Delete/SaveToPackage buttons enabled when one filter is selected."
- if NOT EditBtn.IsEnabled then
- FilterList.Typekeys "<SPACE>"
- sleep(1)
- end if
- if NOT EditBtn.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "Edit button: Disabled when one entry is selected!?"
- end if
- if NOT TestXSLTs.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "TestXSLTs button: Disabled when one entry is selected!?"
- end if
- if NOT DeleteBtn.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "Delete button: Disabled when one entry is selected!?"
- end if
- if NOT SaveToPackage.IsEnabled then
- warnlog sErrorPointerTextForResultfile & "SaveToPackage button: Disabled when one entry is selected!?"
- end if
- '/// <i>[Loop]</i>
- '///+ <ol><li>Clicking the &quot;New&quot; button</li>
- '///+ <li>Clicking the &quot;Edit&quot; button</li></ol>
- Kontext "XMLFilterSettings"
- FilterList.TypeKeys "<HOME>"
- for ic = 1 to iCountOfXSLTStylesAfterInstallCheck
- Kontext "XMLFilterSettings"
+ Dim iCountOfXSLTStylesAtBeginning as integer
+ Dim iCountOfXSLTStylesAfterInstallCheck as integer
+ Dim iApplicationEntries as integer
+ Dim ia as integer
+ Dim ib as integer
+ Dim ic as integer
+ Dim iCountMsgBox as integer
+ Dim sErrorPointerTextForResultfile as string
+ Dim sFilterPackagePath as string
+ Dim sDocXMLTestFile as string
+ Dim sWhichFilterToUse as string
+ Dim sTempReadFilterName as string
+ Dim bREMOVEXSLT as boolean
+ Dim bJavaBroken as boolean
+
+ 'Not being used for Writer/WEB
+ if gApplication = "HTML" then
+ goto endsub
+ endif
+
+ 'Define the pointer where all warnlogs/QAErrorLogs will come from in this routine.
+ sErrorPointerTextForResultfile = "global::tools::inc::t_xml_filter1,inc::tToolsXMLFilterSettings: "
+
+ 'Later it will be detected if the JRE is working with the office installation
+ 'Here bJavaBroken will be set to the default behaviour (Java is detected and is working)
+ bJavaBroken = FALSE
+
+ '/// Opening new document.
+ printlog "- Opening new (application) document."
+ call hNewDocument
+ '/// Calling the menu item <i>Tools -&gt; XML Filter Settings</i>
+ ToolsXMLFilterSettings
+ printlog "- XML Filter Settings"
+ Kontext "XMLFilterSettings"
+ if XMLFilterSettings.Exists(1) then
+ call Dialogtest (XMLFilterSettings)
+ else
+ warnlog sErrorPointerTextForResultfile & "Slot to open the 'XML Filter Settings dialog' failed. Exiting."
+ goto endsub
+ end if
+ 'Counting the existing XSLT stylesheets to verify them after the
+ 'XSLT stylesheet Check. Setting bREMOVEXSLT = FALSE which only will
+ 'be TRUE if the count of before and after the check are different.
+ bREMOVEXSLT = FALSE
+ iCountOfXSLTStylesAtBeginning = FilterList.GetItemCount
+ '/// Closing the XML Filter Settings-dialog.
+ printlog "Closing the 'XML Filter Settings'-dialog."
+ CloseBtn.Click
+ '/// Checking if there are any XSLT stylesheets available (<i>finitialXMLSetting(&quot;docbook or word or excel&quot;)</i>).
+ printlog " + Checking if there are any XSLT stylesheets available."
+ select case gApplication
+ case "CALC" : sWhichFilterToUse = "excel"
+ case "WRITER" : sWhichFilterToUse = "word"
+ case else : sWhichFilterToUse = "docbook"
+ end select
+ if finitialXMLSetting(sWhichFilterToUse) = FALSE then
+ warnlog "It wasn't possible to use/install external XML filter. Test aborting!"
+ goto endsub
+ end if
+ ToolsXMLFilterSettings
+ printlog "Open XML Filter Settings dialog again."
+ Kontext "XMLFilterSettings"
+ iCountOfXSLTStylesAfterInstallCheck = FilterList.GetItemCount
+ if iCountOfXSLTStylesAfterInstallCheck <> iCountOfXSLTStylesAtBeginning then
+ bREMOVEXSLT = TRUE
+ end if
+ '/// Checking disabling of buttons on this dialog.
+ printlog " + Checking that Edit/Test/Delete/SaveToPackage buttons disabled when no filter is selected."
+ if EditBtn.IsEnabled then
+ FilterList.Typekeys "<MOD1 SPACE>"
+ sleep(1)
+ end if
+ if EditBtn.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "Edit button: Enabled when no entry is selected!?"
+ end if
+ if TestXSLTs.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "TestXSLTs button: Enabled when no entry is selected!?"
+ end if
+ if DeleteBtn.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "Delete button: Enabled when no entry is selected!?"
+ end if
+ if SaveToPackage.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "SaveToPackage button: Enabled when no entry is selected!?"
+ end if
+ '/// Checking disabling of buttons on this dialog.
+ printlog " + Checking that Edit/Test/Delete/SaveToPackage buttons enabled when one filter is selected."
+ if NOT EditBtn.IsEnabled then
+ FilterList.Typekeys "<SPACE>"
+ sleep(1)
+ end if
+ if NOT EditBtn.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "Edit button: Disabled when one entry is selected!?"
+ end if
+ if NOT TestXSLTs.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "TestXSLTs button: Disabled when one entry is selected!?"
+ end if
+ if NOT DeleteBtn.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "Delete button: Disabled when one entry is selected!?"
+ end if
+ if NOT SaveToPackage.IsEnabled then
+ warnlog sErrorPointerTextForResultfile & "SaveToPackage button: Disabled when one entry is selected!?"
+ end if
+ '/// <i>[Loop]</i>
+ '///+ <ol><li>Clicking the &quot;New&quot; button</li>
+ '///+ <li>Clicking the &quot;Edit&quot; button</li></ol>
+ Kontext "XMLFilterSettings"
+ FilterList.TypeKeys "<HOME>"
+ for ic = 1 to iCountOfXSLTStylesAfterInstallCheck
+ Kontext "XMLFilterSettings"
if ( XMLFilterSettings.exists( 2 ) ) then
-
- 'read the filter names from the dialog.
+
+ 'read the filter names from the dialog.
sTempReadFilterName = FilterList.GetItemText(ic)
-
- 'lower case comparison!
- sTempReadFilterName = lcase(sTempReadFilterName)
- if InStr(sTempReadFilterName , sWhichFilterToUse) <> 0 then
- FilterList.TypeKeys "<DOWN> " , ic-1
- ' printlog "DEBUG: Filtername: " & FilterList.GetItemText(ic)
- WaitSlot() ' Sort of NOOP
+
+ 'lower case comparison!
+ sTempReadFilterName = lcase(sTempReadFilterName)
+ if InStr(sTempReadFilterName , sWhichFilterToUse) <> 0 then
+ FilterList.TypeKeys "<DOWN> " , ic-1
+ ' printlog "DEBUG: Filtername: " & FilterList.GetItemText(ic)
+ WaitSlot() ' Sort of NOOP
endif
else
warnlog( "XML Filter Settings dialog too slow/not displayed" )
- endif
- next ic
- for ia = 1 to 2
- Kontext "XMLFilterSettings"
- select case ia
- case 1 : printlog "+- New"
- NewBtn.Click
- case 2 : printlog "+- Edit"
- EditBtn.Click
- end select
- sleep(1)
- Kontext "XMLFilter"
- if XMLFilter.Exists(2) then
- select case ia
- case 1 : printlog " (XML Filter: New)"
- case 2 : printlog " (XML Filter: Edit)"
- end select
- call Dialogtest (XMLFilter)
- Tabcontrol.SetPage TabXMLGeneral
- Kontext "TabXMLGeneral"
- printlog " +- TabXMLGeneral"
- if ia = 1 then
- '/// If the &quot;New&quot;-button has been used:
- call Dialogtest (TabXMLGeneral)
- iApplicationEntries = Application.GetItemCount
- '///+ <ul><li>Checking the count of applications. Should be 8.</li></ul>
- printlog " Checking the count of applications. Should be 8."
- if iApplicationEntries <> 8 then
- warnlog " +- There should be 8 applications listed in the 'Application'-listbox but there are " & iApplicationEntries & " available!"
- else
- printlog " +- 8 applications listed in 'Application' listbox."
- end if
- end if
- Kontext "XMLFilter"
- Tabcontrol.SetPage TabXMLTransformation
- Kontext "TabXMLTransformation"
- printlog " +- TabXMLTransformation"
- call Dialogtest (TabXMLTransformation)
- '/// On tab page &quot;Transformation&quot; press all &quot;Browse&quot;-buttons.
- printlog " +- On tab page 'Transformation' press all 'Browse'-buttons."
- for ib = 1 to 4
- Kontext "TabXMLTransformation"
- select case ib
- case 1 : printlog " +- Browse button 'DTD'"
- DTDBrowse.Click
- case 2 : printlog " +- Browse button 'XSLT for export'"
- XSLTForExportBrowse.Click
- case 3 : printlog " +- Browse button 'XSLT for import'"
- XSLTForImportBrowse.Click
- case 4 : printlog " +- Browse button 'Template for import'"
- BrowseTemplateForImport.Click
- end select
-
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists(3) then
- '/// After every click on &quot;Browse&quot;-button an &quot;FileOpen&quot;-dialog shoud be visible. Cancel that dialog.
- printlog " +- After every click on 'Browse'-button an 'FileOpen'-dialog shoud be visible. Cancel that dialog."
- call Dialogtest (OeffnenDlg)
- OeffnenDlg.Cancel
-
- else
- warnlog sErrorPointerTextForResultfile & "File Open dialog did not appeared."
- end if
- next ib
- '/// [Loop end]
+ endif
+ next ic
+ for ia = 1 to 2
+ Kontext "XMLFilterSettings"
+ select case ia
+ case 1 : printlog "+- New"
+ NewBtn.Click
+ case 2 : printlog "+- Edit"
+ EditBtn.Click
+ end select
+ sleep(1)
+ Kontext "XMLFilter"
+ if XMLFilter.Exists(2) then
+ select case ia
+ case 1 : printlog " (XML Filter: New)"
+ case 2 : printlog " (XML Filter: Edit)"
+ end select
+ call Dialogtest (XMLFilter)
+ Tabcontrol.SetPage TabXMLGeneral
+ Kontext "TabXMLGeneral"
+ printlog " +- TabXMLGeneral"
+ if ia = 1 then
+ '/// If the &quot;New&quot;-button has been used:
+ call Dialogtest (TabXMLGeneral)
+ iApplicationEntries = Application.GetItemCount
+ '///+ <ul><li>Checking the count of applications. Should be 8.</li></ul>
+ printlog " Checking the count of applications. Should be 8."
+ if iApplicationEntries <> 8 then
+ warnlog " +- There should be 8 applications listed in the 'Application'-listbox but there are " & iApplicationEntries & " available!"
+ else
+ printlog " +- 8 applications listed in 'Application' listbox."
+ end if
+ end if
Kontext "XMLFilter"
- if ( XMLFilter.exists( 3 ) ) then
- printlog " +- Closing 'XML Filter: New Filter'-dialog."
+ Tabcontrol.SetPage TabXMLTransformation
+ Kontext "TabXMLTransformation"
+ printlog " +- TabXMLTransformation"
+ call Dialogtest (TabXMLTransformation)
+ '/// On tab page &quot;Transformation&quot; press all &quot;Browse&quot;-buttons.
+ printlog " +- On tab page 'Transformation' press all 'Browse'-buttons."
+ for ib = 1 to 4
+ Kontext "TabXMLTransformation"
+ select case ib
+ case 1 : printlog " +- Browse button 'DTD'"
+ DTDBrowse.Click
+ case 2 : printlog " +- Browse button 'XSLT for export'"
+ XSLTForExportBrowse.Click
+ case 3 : printlog " +- Browse button 'XSLT for import'"
+ XSLTForImportBrowse.Click
+ case 4 : printlog " +- Browse button 'Template for import'"
+ BrowseTemplateForImport.Click
+ end select
+
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists(3) then
+ '/// After every click on &quot;Browse&quot;-button an &quot;FileOpen&quot;-dialog shoud be visible. Cancel that dialog.
+ printlog " +- After every click on 'Browse'-button an 'FileOpen'-dialog shoud be visible. Cancel that dialog."
+ call Dialogtest (OeffnenDlg)
+ OeffnenDlg.Cancel
+
+ else
+ warnlog sErrorPointerTextForResultfile & "File Open dialog did not appeared."
+ end if
+ next ib
+ '/// [Loop end]
+ Kontext "XMLFilter"
+ if ( XMLFilter.exists( 3 ) ) then
+ printlog " +- Closing 'XML Filter: New Filter'-dialog."
XMLFilter.Cancel
else
warnlog( "XML Filter Dialog not available" )
- endif
- '/// Closing &quot;XML Filter: New Filter&quot;-dialog
- else
- warnlog "XML Filter dialog did not appeared!"
- end if
- next ia
- Kontext "XMLFilterSettings"
- '/// Clicking &quot;Test XLSTs&quot;-button.
- printlog "+- Clicking 'Test XLSTs'-button."
- TestXSLTs.Click
-
- 'If it's an Import filter it makes no sense to test the export.
- if sWhichFilterToUse = "docbook" then
-
- printlog "+- E X P O R T (Writer, Impress)"
- Kontext "TestXMLFilter"
- if TestXMLFilter.Exists( 3 ) then
- call Dialogtest(TestXMLFilter)
- else
- warnlog sErrorPointerTextForResultfile & "Testing of the XML filter not possible. Exiting."
- Kontext "XMLFilterSettings"
- '/// Closing the &quot;XML Filter Settings&quot;-dialog.
- printlog "+- Closing the 'XML Filter Settings'-dialog."
- 'Deinstall the XSLT stylesheet if this routine has
- 'added one at the beginning.
- if bREMOVEXSLT = TRUE then
- call sRemoveXSLTFilter
- end if
- Kontext "XMLFilterSettings"
- CloseBtn.Click
- '/// Closing the opened application document.
- printlog "- Closing the opened application document."
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- end if
- 'Here the routine stops if the test dialog is not opening.
- goto endsub
- end if
- ExportBrowseBtn.Click
- '/// Press first &quot;Browse&quot;-button on the &quot;Test XML Filter&quot;-dialog.
- printlog " +-Press first 'Browse'-button on the 'Test XML Filter'-dialog."
-
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists( 3 ) then
- call Dialogtest (OeffnenDlg)
- OeffnenDlg.Cancel
- '/// Closing 'FileOpen'-Dialog.
- printlog " +- Closing 'FileOpen'-Dialog."
- else
- warnlog sErrorPointerTextForResultfile & "File Open dialog did not occoured?!"
+ endif
+ '/// Closing &quot;XML Filter: New Filter&quot;-dialog
+ else
+ warnlog "XML Filter dialog did not appeared!"
end if
-
+ next ia
+ Kontext "XMLFilterSettings"
+ '/// Clicking &quot;Test XLSTs&quot;-button.
+ printlog "+- Clicking 'Test XLSTs'-button."
+ TestXSLTs.Click
+
+ 'If it's an Import filter it makes no sense to test the export.
+ if sWhichFilterToUse = "docbook" then
+
+ printlog "+- E X P O R T (Writer, Impress)"
+ Kontext "TestXMLFilter"
+ if TestXMLFilter.Exists( 3 ) then
+ call Dialogtest(TestXMLFilter)
+ else
+ warnlog sErrorPointerTextForResultfile & "Testing of the XML filter not possible. Exiting."
+ Kontext "XMLFilterSettings"
+ '/// Closing the &quot;XML Filter Settings&quot;-dialog.
+ printlog "+- Closing the 'XML Filter Settings'-dialog."
+ 'Deinstall the XSLT stylesheet if this routine has
+ 'added one at the beginning.
+ if bREMOVEXSLT = TRUE then
+ call sRemoveXSLTFilter
+ end if
+ Kontext "XMLFilterSettings"
+ CloseBtn.Click
+ '/// Closing the opened application document.
+ printlog "- Closing the opened application document."
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ call hCloseDocument
+ end if
+ 'Here the routine stops if the test dialog is not opening.
+ goto endsub
+ end if
+ ExportBrowseBtn.Click
+ '/// Press first &quot;Browse&quot;-button on the &quot;Test XML Filter&quot;-dialog.
+ printlog " +-Press first 'Browse'-button on the 'Test XML Filter'-dialog."
+
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists( 3 ) then
+ call Dialogtest (OeffnenDlg)
+ OeffnenDlg.Cancel
+ '/// Closing 'FileOpen'-Dialog.
+ printlog " +- Closing 'FileOpen'-Dialog."
+ else
+ warnlog sErrorPointerTextForResultfile & "File Open dialog did not occoured?!"
+ end if
+
Kontext "TestXMLFilter"
- if ( TestXMLFilter.exists( 2 ) ) then
- '/// If the application is Writer (because the default XSLT stylesheets are only Writer filter).
- '///+<ul><li>Clicking on &quot;Current Document&quot;-button.</li></ul>
- if gApplication = "WRITER" then
- printlog " +- Clicking on 'Current Document'-button."
- CurrentDocument.Click
-
- '/// If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
- Kontext "Messagebox"
- if MessageBox.Exists( 5 ) then
- warnlog Messagebox.GetText
- try
- Messagebox.Cancel
- catch
- Messagebox.OK
- endcatch
- else
- try
- Kontext "XMLFilterOutput"
- if XMLFilterOutput.Exists(1) then
- '/// &quot;XML Filter Output&quot;-dialog should be visible.
- printlog " +- 'XML Filter Output'-dialog should be visible."
- call Dialogtest(XMLFilterOutput)
- '/// Clicking &quot;Validate&quot;-button.
- printlog " +- Clicking 'Validate'-button."
- Validate.Click
- WaitSlot( 2000 )
- '/// Checking that the validate output control is visible inside the window.
- printlog " +- Checking that the validate output control is visible inside the window."
- if NOT ValidateOutput.isVisible then
- warnlog " +- Validate output is not visible!"
- end if
- '/// Closing &quot;XML Filter Output&quot;-dialog.
- printlog " +- Closing 'XML Filter Output'-dialog."
- XMLFilterOutput.Close
-
- else
- warnlog sErrorPointerTextForResultfile & "XML Filter Ouput dialog did not occoured."
- end if
- catch
- warnlog "Testing of XSLTs does not work."
- endcatch
- end if
- else
- Kontext "TestXMLFilter"
- printlog " +- 'Current Document'-button should not be enabled if no !"
- if CurrentDocument.IsEnabled then
- Kontext "DocumentWriter"
- try
- DocumentWriter.TypeKeys "A writer document exists!"
- catch
- QAErrorLog "'Current Document'-button is enabled but a 'Writer' XML filter has been selected! If there's no Writer document (may be in the background) also opened it would be a bug!"
- endcatch
+ if ( TestXMLFilter.exists( 2 ) ) then
+ '/// If the application is Writer (because the default XSLT stylesheets are only Writer filter).
+ '///+<ul><li>Clicking on &quot;Current Document&quot;-button.</li></ul>
+ if gApplication = "WRITER" then
+ printlog " +- Clicking on 'Current Document'-button."
+ CurrentDocument.Click
+
+ '/// If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
+ Kontext "Messagebox"
+ if MessageBox.Exists( 5 ) then
+ warnlog Messagebox.GetText
+ try
+ Messagebox.Cancel
+ catch
+ Messagebox.OK
+ endcatch
+ else
+ try
+ Kontext "XMLFilterOutput"
+ if XMLFilterOutput.Exists(1) then
+ '/// &quot;XML Filter Output&quot;-dialog should be visible.
+ printlog " +- 'XML Filter Output'-dialog should be visible."
+ call Dialogtest(XMLFilterOutput)
+ '/// Clicking &quot;Validate&quot;-button.
+ printlog " +- Clicking 'Validate'-button."
+ Validate.Click
+ WaitSlot( 2000 )
+ '/// Checking that the validate output control is visible inside the window.
+ printlog " +- Checking that the validate output control is visible inside the window."
+ if NOT ValidateOutput.isVisible then
+ warnlog " +- Validate output is not visible!"
+ end if
+ '/// Closing &quot;XML Filter Output&quot;-dialog.
+ printlog " +- Closing 'XML Filter Output'-dialog."
+ XMLFilterOutput.Close
+
+ else
+ warnlog sErrorPointerTextForResultfile & "XML Filter Ouput dialog did not occoured."
+ end if
+ catch
+ warnlog "Testing of XSLTs does not work."
+ endcatch
+ end if
+ else
+ Kontext "TestXMLFilter"
+ printlog " +- 'Current Document'-button should not be enabled if no !"
+ if CurrentDocument.IsEnabled then
+ Kontext "DocumentWriter"
+ try
+ DocumentWriter.TypeKeys "A writer document exists!"
+ catch
+ QAErrorLog "'Current Document'-button is enabled but a 'Writer' XML filter has been selected! If there's no Writer document (may be in the background) also opened it would be a bug!"
+ endcatch
end if
- end if
+ end if
else
warnlog( "FATAL: TestXMLFilter not available" )
- end if
+ end if
printlog "+- I M P O R T"
endif
-
+
Kontext "TestXMLFilter"
- if ( TestXMLFilter.exists( 2 ) ) then
- '/// Clicking &quot;Browse&quot;-button (Import).
- printlog " +- Clicking 'Browse'-button (Import)."
- ImportBrowseBtn.Click
-
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists( 2 ) then
- call Dialogtest (OeffnenDlg)
- '/// Closing &quot;FileOpen&quot;-dialog.
- printlog " +- Closing 'FileOpen'-dialog."
- OeffnenDlg.Cancel
- else
- warnlog sErrorPointerTextForResultfile & "File Open dialog did not occoured?!"
+ if ( TestXMLFilter.exists( 2 ) ) then
+ '/// Clicking &quot;Browse&quot;-button (Import).
+ printlog " +- Clicking 'Browse'-button (Import)."
+ ImportBrowseBtn.Click
+
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists( 2 ) then
+ call Dialogtest (OeffnenDlg)
+ '/// Closing &quot;FileOpen&quot;-dialog.
+ printlog " +- Closing 'FileOpen'-dialog."
+ OeffnenDlg.Cancel
+ else
+ warnlog sErrorPointerTextForResultfile & "File Open dialog did not occoured?!"
end if
else
warnlog( "FATAL: Dialog <TestXMLFilter> is not available" )
endif
-
- Kontext "TestXMLFilter"
- '/// Checking if 'Display Source'-checkbox is checked (should not be!).
- printlog " +- Checking if 'Display Source'-checkbox is checked (should not be!)."
- if NOT DisplaySource.IsChecked then
- DisplaySource.Check
- else
- warnlog " +- Display source should be NOT checked as default!"
- end if
- Kontext "TestXMLFilter"
- select case sWhichFilterToUse
- case "docbook" : '/// If DocBook XML is being tested use a DocBook XML file.
- sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\docbook.xml")
- case "word" : '/// If Word XML is being tested use a Word XML file.
- sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\word.xml")
- case "excel" : '/// If Excel XML is being tested use a Excel XML file.
- sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\excel.xml")
- case "xhtml" : '/// If XHTML is being tested that use a XHTML file.
- sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\xhtml.xhtml")
- case else : warnlog sErrorPointerTextForResultfile & "Wrong parameter has been used! Exiting"
- Kontext "TestXMLFilter"
- '/// Closing the &quot;Test XML Filter&quot;-dialog.
- printlog " +- Closing the 'Test XML Filter'-dialog"
- CloseBtn.Click
- Kontext "XMLFilterSettings"
- '/// Closing the &quot;XML Filter Settings&quot;-dialog.
- printlog "+- Closing the 'XML Filter Settings'-dialog."
- 'Deinstall the XSLT stylesheet if this routine has
- 'added one at the beginning.
- if bREMOVEXSLT = TRUE then
- call sRemoveXSLTFilter
- end if
- Kontext "XMLFilterSettings"
- CloseBtn.Click
- '/// Closing the opened application document.
- printlog "- Closing the opened application document."
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- Call hCloseDocument
- end if
- goto endsub
- end select
- '/// Clicking &quot;Browse&quot;-button (Import) again to test it with the XML file.
- printlog " +- Clicking 'Browse'-button (Import) again to test it the XML file."
- ImportBrowseBtn.Click
-
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists( 3 ) then
- call Dialogtest (OeffnenDlg)
- Dateiname.SetText sDocXMLTestFile
- Oeffnen.Click
- try
- ' If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
- Kontext "Messagebox"
- if Messagebox.Exists(2) then
- for iCountMsgBox = 1 to 5
- Kontext "Messagebox"
- if MessageBox.Exists(2) then
- if MessageBox.GetRT = 304 then
- if iCountMsgBox = 1 then
- warnlog sErrorPointerTextForResultfile & "No output window was visible! Exiting routine!"
- endif
- QAErrorLog "Dialog (" & iCountMsgBox & "): " & Messagebox.GetText
- Messagebox.OK
- bJavaBroken = TRUE
- if iCountMsgBox > 3 then
- warnlog "Instead of 3 times the missing Java RT box will be shown " & iCountMsgBox & " times."
- endif
- end if
- else
- exit for
- endif
- next iCountMsgBox
- endif
- Kontext "XMLFilterOutput"
- if XMLFilterOutput.Exists(3) then
- '/// &quot;XML Filter Output&quot;-dialog should be visible.
- printlog " +- 'XML Filter Output'-dialog should be visible."
- call Dialogtest(XMLFilterOutput)
- '/// Clicking &quot;Validate&quot;-button.
- printlog " +- Clicking 'Validate'-button."
- Validate.Click
-
- Kontext "Messagebox"
- if Messagebox.Exists( 2 ) then
- if bJavaBroken then
- Messagebox.OK
- else
- warnlog Messagebox.GetText
- Messagebox.OK
- endif
- endif
- '/// Checking that the validate output control is visible inside the window.
- printlog " +- Checking that the validate output control is visible inside the window."
- Kontext "XMLFilterOutput"
- if NOT ValidateOutput.isVisible then
- warnlog " +- Validate output is not visible!"
- end if
- '/// Closing &quot;XML Filter Output&quot;-dialog.
- printlog " +- Closing 'XML Filter Output'-dialog."
- Kontext "XMLFilterOutput"
- XMLFilterOutput.Close
- else
- warnlog sErrorPointerTextForResultfile & "No output window was visible! Exiting routine!"
- Kontext "TestXMLFilter"
- '/// Closing the &quot;Test XML Filter&quot;-dialog.
- printlog " +- Closing the 'Test XML Filter'-dialog"
- CloseBtn.Click
- Kontext "XMLFilterSettings"
- '/// Closing the &quot;XML Filter Settings&quot;-dialog.
- printlog "+- Closing the 'XML Filter Settings'-dialog."
- 'Deinstall the XSLT stylesheet if this routine has
- 'added one at the beginning.
- if bREMOVEXSLT = TRUE then
- call sRemoveXSLTFilter
- end if
- Kontext "XMLFilterSettings"
- CloseBtn.Click
- '/// Closing the opened application document.
- printlog "- Closing the opened application document."
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- end if
- 'Here the routine stops if there is no Java installed or the output was not visible.
- goto endsub
- end if
- catch
- '/// If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
- Kontext "Messagebox"
- if MessageBox.Exists( 2 ) then
- warnlog Messagebox.GetText
- Messagebox.OK
- warnlog sErrorPointerTextForResultfile & "Java is not usable! Exiting routine!"
- Kontext "TestXMLFilter"
- '/// Closing the &quot;Test XML Filter&quot;-dialog.
- printlog " +- Closing the 'Test XML Filter'-dialog"
- CloseBtn.Click
- Kontext "XMLFilterSettings"
- '/// Closing the &quot;XML Filter Settings&quot;-dialog.
- printlog "+- Closing the 'XML Filter Settings'-dialog."
- 'Deinstall the XSLT stylesheet if this routine has
- 'added one at the beginning.
- if bREMOVEXSLT = TRUE then
- call sRemoveXSLTFilter
- end if
- Kontext "XMLFilterSettings"
- CloseBtn.Click
- '/// Closing the opened application document.
- printlog "- Closing the opened application document."
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- end if
- goto endsub
- end if
- endcatch
- else
- warnlog sErrorPointerTextForResultfile & "File Open dialog missing! Not able to load test documents. Exiting routine!"
- Kontext "TestXMLFilter"
- '/// Closing the &quot;Test XML Filter&quot;-dialog.
- printlog " +- Closing the 'Test XML Filter'-dialog"
- CloseBtn.Click
- Kontext "XMLFilterSettings"
- '/// Closing the &quot;XML Filter Settings&quot;-dialog.
- printlog "+- Closing the 'XML Filter Settings'-dialog."
- 'Deinstall the XSLT stylesheet if this routine has
- 'added one at the beginning.
- if bREMOVEXSLT = TRUE then
- call sRemoveXSLTFilter
- end if
- Kontext "XMLFilterSettings"
- CloseBtn.Click
- '/// Closing the opened application document.
- printlog "- Closing the opened application document."
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- end if
- goto endsub
- end if
- '/// Closing the tested XML document
- printlog " +- Closing the tested XML document"
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- else
- QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
- end if
-
+
+ Kontext "TestXMLFilter"
+ '/// Checking if 'Display Source'-checkbox is checked (should not be!).
+ printlog " +- Checking if 'Display Source'-checkbox is checked (should not be!)."
+ if NOT DisplaySource.IsChecked then
+ DisplaySource.Check
+ else
+ warnlog " +- Display source should be NOT checked as default!"
+ end if
+ Kontext "TestXMLFilter"
+ select case sWhichFilterToUse
+ case "docbook" : '/// If DocBook XML is being tested use a DocBook XML file.
+ sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\docbook.xml")
+ case "word" : '/// If Word XML is being tested use a Word XML file.
+ sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\word.xml")
+ case "excel" : '/// If Excel XML is being tested use a Excel XML file.
+ sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\excel.xml")
+ case "xhtml" : '/// If XHTML is being tested that use a XHTML file.
+ sDocXMLTestFile = ConvertPath(gTestToolPath & "global\input\xml_filter\xhtml.xhtml")
+ case else : warnlog sErrorPointerTextForResultfile & "Wrong parameter has been used! Exiting"
+ Kontext "TestXMLFilter"
+ '/// Closing the &quot;Test XML Filter&quot;-dialog.
+ printlog " +- Closing the 'Test XML Filter'-dialog"
+ CloseBtn.Click
+ Kontext "XMLFilterSettings"
+ '/// Closing the &quot;XML Filter Settings&quot;-dialog.
+ printlog "+- Closing the 'XML Filter Settings'-dialog."
+ 'Deinstall the XSLT stylesheet if this routine has
+ 'added one at the beginning.
+ if bREMOVEXSLT = TRUE then
+ call sRemoveXSLTFilter
+ end if
+ Kontext "XMLFilterSettings"
+ CloseBtn.Click
+ '/// Closing the opened application document.
+ printlog "- Closing the opened application document."
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ Call hCloseDocument
+ end if
+ goto endsub
+ end select
+ '/// Clicking &quot;Browse&quot;-button (Import) again to test it with the XML file.
+ printlog " +- Clicking 'Browse'-button (Import) again to test it the XML file."
+ ImportBrowseBtn.Click
+
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists( 3 ) then
+ call Dialogtest (OeffnenDlg)
+ Dateiname.SetText sDocXMLTestFile
+ Oeffnen.Click
+ try
+ ' If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then
+ for iCountMsgBox = 1 to 5
+ Kontext "Messagebox"
+ if MessageBox.Exists(2) then
+ if MessageBox.GetRT = 304 then
+ if iCountMsgBox = 1 then
+ warnlog sErrorPointerTextForResultfile & "No output window was visible! Exiting routine!"
+ endif
+ QAErrorLog "Dialog (" & iCountMsgBox & "): " & Messagebox.GetText
+ Messagebox.OK
+ bJavaBroken = TRUE
+ if iCountMsgBox > 3 then
+ warnlog "Instead of 3 times the missing Java RT box will be shown " & iCountMsgBox & " times."
+ endif
+ end if
+ else
+ exit for
+ endif
+ next iCountMsgBox
+ endif
+ Kontext "XMLFilterOutput"
+ if XMLFilterOutput.Exists(3) then
+ '/// &quot;XML Filter Output&quot;-dialog should be visible.
+ printlog " +- 'XML Filter Output'-dialog should be visible."
+ call Dialogtest(XMLFilterOutput)
+ '/// Clicking &quot;Validate&quot;-button.
+ printlog " +- Clicking 'Validate'-button."
+ Validate.Click
+
+ Kontext "Messagebox"
+ if Messagebox.Exists( 2 ) then
+ if bJavaBroken then
+ Messagebox.OK
+ else
+ warnlog Messagebox.GetText
+ Messagebox.OK
+ endif
+ endif
+ '/// Checking that the validate output control is visible inside the window.
+ printlog " +- Checking that the validate output control is visible inside the window."
+ Kontext "XMLFilterOutput"
+ if NOT ValidateOutput.isVisible then
+ warnlog " +- Validate output is not visible!"
+ end if
+ '/// Closing &quot;XML Filter Output&quot;-dialog.
+ printlog " +- Closing 'XML Filter Output'-dialog."
+ Kontext "XMLFilterOutput"
+ XMLFilterOutput.Close
+ else
+ warnlog sErrorPointerTextForResultfile & "No output window was visible! Exiting routine!"
+ Kontext "TestXMLFilter"
+ '/// Closing the &quot;Test XML Filter&quot;-dialog.
+ printlog " +- Closing the 'Test XML Filter'-dialog"
+ CloseBtn.Click
+ Kontext "XMLFilterSettings"
+ '/// Closing the &quot;XML Filter Settings&quot;-dialog.
+ printlog "+- Closing the 'XML Filter Settings'-dialog."
+ 'Deinstall the XSLT stylesheet if this routine has
+ 'added one at the beginning.
+ if bREMOVEXSLT = TRUE then
+ call sRemoveXSLTFilter
+ end if
+ Kontext "XMLFilterSettings"
+ CloseBtn.Click
+ '/// Closing the opened application document.
+ printlog "- Closing the opened application document."
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ call hCloseDocument
+ end if
+ 'Here the routine stops if there is no Java installed or the output was not visible.
+ goto endsub
+ end if
+ catch
+ '/// If Java is not [correctly] installed a messagebox will be shown and the test of the filter will be canceled!
+ Kontext "Messagebox"
+ if MessageBox.Exists( 2 ) then
+ warnlog Messagebox.GetText
+ Messagebox.OK
+ warnlog sErrorPointerTextForResultfile & "Java is not usable! Exiting routine!"
+ Kontext "TestXMLFilter"
+ '/// Closing the &quot;Test XML Filter&quot;-dialog.
+ printlog " +- Closing the 'Test XML Filter'-dialog"
+ CloseBtn.Click
+ Kontext "XMLFilterSettings"
+ '/// Closing the &quot;XML Filter Settings&quot;-dialog.
+ printlog "+- Closing the 'XML Filter Settings'-dialog."
+ 'Deinstall the XSLT stylesheet if this routine has
+ 'added one at the beginning.
+ if bREMOVEXSLT = TRUE then
+ call sRemoveXSLTFilter
+ end if
+ Kontext "XMLFilterSettings"
+ CloseBtn.Click
+ '/// Closing the opened application document.
+ printlog "- Closing the opened application document."
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ call hCloseDocument
+ end if
+ goto endsub
+ end if
+ endcatch
+ else
+ warnlog sErrorPointerTextForResultfile & "File Open dialog missing! Not able to load test documents. Exiting routine!"
+ Kontext "TestXMLFilter"
+ '/// Closing the &quot;Test XML Filter&quot;-dialog.
+ printlog " +- Closing the 'Test XML Filter'-dialog"
+ CloseBtn.Click
+ Kontext "XMLFilterSettings"
+ '/// Closing the &quot;XML Filter Settings&quot;-dialog.
+ printlog "+- Closing the 'XML Filter Settings'-dialog."
+ 'Deinstall the XSLT stylesheet if this routine has
+ 'added one at the beginning.
+ if bREMOVEXSLT = TRUE then
+ call sRemoveXSLTFilter
+ end if
+ Kontext "XMLFilterSettings"
+ CloseBtn.Click
+ '/// Closing the opened application document.
+ printlog "- Closing the opened application document."
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ call hCloseDocument
+ end if
+ goto endsub
+ end if
+ '/// Closing the tested XML document
+ printlog " +- Closing the tested XML document"
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ call hCloseDocument
+ else
+ QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
+ end if
+
Kontext "TestXMLFilter"
- if ( TestXMLFilter.exists( 1 ) ) then
- if bJavaBroken = FALSE then
- '/// Clicking on &quot;Recent File&quot;-Button.
- printlog " +- Clicking on 'Recent File'-Button."
- RecentFile.Click
-
- Kontext "XMLFilterOutput"
- '/// &quot;XML Filter Output&quot;-dialog should be visible.
- printlog " +- 'XML Filter Output'-dialog should be visible."
-
- Kontext "XMLFilterOutput"
- '/// Closing &quot;XML Filter Output&quot;-dialog.
- printlog " +- Closing 'XML Filter Output'-dialog."
- XMLFilterOutput.Close
-
- '/// Closing the tested XML document
- printlog " +- Closing the tested XML document"
- '/// ...if there is more than 1 document opened.
- if GetDocumentCount > 1 then
- call hCloseDocument
- else
- QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
- end if
-
- Kontext "TestXMLFilter"
- '/// Closing the &quot;Test XML Filter&quot;-dialog.
- printlog " +- Closing the 'Test XML Filter'-dialog"
+ if ( TestXMLFilter.exists( 1 ) ) then
+ if bJavaBroken = FALSE then
+ '/// Clicking on &quot;Recent File&quot;-Button.
+ printlog " +- Clicking on 'Recent File'-Button."
+ RecentFile.Click
+
+ Kontext "XMLFilterOutput"
+ '/// &quot;XML Filter Output&quot;-dialog should be visible.
+ printlog " +- 'XML Filter Output'-dialog should be visible."
+
+ Kontext "XMLFilterOutput"
+ '/// Closing &quot;XML Filter Output&quot;-dialog.
+ printlog " +- Closing 'XML Filter Output'-dialog."
+ XMLFilterOutput.Close
+
+ '/// Closing the tested XML document
+ printlog " +- Closing the tested XML document"
+ '/// ...if there is more than 1 document opened.
+ if GetDocumentCount > 1 then
+ call hCloseDocument
+ else
+ QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
+ end if
+
+ Kontext "TestXMLFilter"
+ '/// Closing the &quot;Test XML Filter&quot;-dialog.
+ printlog " +- Closing the 'Test XML Filter'-dialog"
endif
else
warnlog( "Dialog <TestXMLFilter> is not available" )
endif
-
- CloseBtn.Click
+
+ CloseBtn.Click
Kontext "XMLFilterSettings"
- if ( XMLFilterSettings.exists( 1 ) ) then
- '/// Clicking &quot;Delete&quot;-button.
- printlog " +- Clicking 'Delete'-button"
- DeleteBtn.Click
- Kontext
- if Active.Exists(1) then
- if Active.GetRT = 304 then
- Active.No
- end if
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ '/// Clicking &quot;Delete&quot;-button.
+ printlog " +- Clicking 'Delete'-button"
+ DeleteBtn.Click
+ Kontext
+ if Active.Exists(1) then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
end if
else
warnlog( "Dialog <XMLFilterSettings> is not available" )
endif
-
- '/// Clicking 'Save to Package'-button.
- Kontext "XMLFilterSettings"
- if ( XMLFilterSettings.exists( 1 ) ) then
-
- printlog " +- Clicking 'Save to Package'-button."
- SaveToPackage.Click
-
- Kontext "SpeichernDlg"
- if SpeichernDlg.Exists( 3 ) then
- call Dialogtest(SpeichernDlg)
- SpeichernDlg.Cancel
- '/// Closing 'File Save As'-Dialog.
- printlog " +- Closing 'File Save As'-Dialog."
- else
- warnlog sErrorPointerTextForResultfile & "Save As dialog missing!"
+
+ '/// Clicking 'Save to Package'-button.
+ Kontext "XMLFilterSettings"
+ if ( XMLFilterSettings.exists( 1 ) ) then
+
+ printlog " +- Clicking 'Save to Package'-button."
+ SaveToPackage.Click
+
+ Kontext "SpeichernDlg"
+ if SpeichernDlg.Exists( 3 ) then
+ call Dialogtest(SpeichernDlg)
+ SpeichernDlg.Cancel
+ '/// Closing 'File Save As'-Dialog.
+ printlog " +- Closing 'File Save As'-Dialog."
+ else
+ warnlog sErrorPointerTextForResultfile & "Save As dialog missing!"
end if
else
warnlog( "Dialog <XMLFilterSettings> is not available" )
endif
-
- '/// Clicking 'Open Package'-button.
- Kontext "XMLFilterSettings"
- if ( XMLFilterSettings.exists( 1 ) ) then
- printlog " +- Clicking 'Open Package'-button."
- OpenPackage.Click
-
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists( 3 ) then
- call Dialogtest(OeffnenDlg)
- OeffnenDlg.Cancel
- '/// Closing 'FileOpen'-Dialog.
- printlog " +- Closing 'FileOpen'-Dialog."
- else
- warnlog sErrorPointerTextForResultfile & "File open dialog missing!"
- end if
+
+ '/// Clicking 'Open Package'-button.
+ Kontext "XMLFilterSettings"
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ printlog " +- Clicking 'Open Package'-button."
+ OpenPackage.Click
+
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists( 3 ) then
+ call Dialogtest(OeffnenDlg)
+ OeffnenDlg.Cancel
+ '/// Closing 'FileOpen'-Dialog.
+ printlog " +- Closing 'FileOpen'-Dialog."
+ else
+ warnlog sErrorPointerTextForResultfile & "File open dialog missing!"
+ end if
else
warnlog( "Dialog <XMLFilterSettings> is not available" )
endif
- '/// Closing the &quot;XML Filter Settings&quot;-dialog.
- Kontext "XMLFilterSettings"
- if ( XMLFilterSettings.exists( 1 ) ) then
- printlog "+- Closing the 'XML Filter Settings'-dialog."
- 'Deinstall the XSLT stylesheet if this routine has
- 'added one at the beginning.
- if bREMOVEXSLT = TRUE then
- call sRemoveXSLTFilter
- end if
+ '/// Closing the &quot;XML Filter Settings&quot;-dialog.
+ Kontext "XMLFilterSettings"
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ printlog "+- Closing the 'XML Filter Settings'-dialog."
+ 'Deinstall the XSLT stylesheet if this routine has
+ 'added one at the beginning.
+ if bREMOVEXSLT = TRUE then
+ call sRemoveXSLTFilter
+ end if
else
warnlog( "Dialog <XMLFilterSettings> is not available" )
endif
- Kontext "XMLFilterSettings"
- if ( XMLFilterSettings.exists( 1 ) ) then
- CloseBtn.Click
+ Kontext "XMLFilterSettings"
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ CloseBtn.Click
'/// Closing the opened application document.
else
warnlog( "Dialog <XMLFilterSettings> is not available" )
endif
-
- printlog "- Closing the opened application document."
- '/// ...if there is more than 1 document opened.
- if ( hFileCloseAll() <> 2 ) then
- QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
+
+ printlog "- Closing the opened application document."
+ '/// ...if there is more than 1 document opened.
+ if ( hFileCloseAll() <> 2 ) then
+ QAErrorLog "#i27370# Normaly there should be a second document but there is none!"
end if
-endcase
-
-'-------------------------------------------------------------------------
-
-sub fInitialXMLSetting( sXMLFilterType as string ) as boolean
-'/// This small function adds the latest and greatest XSLT stylesheet
-'///+ to the office.<br>
-'///+ The result is TRUE if the packages are already available or if they
-'///+ have been installed successfully in this routine.
-'/// <u>Input</u>: excel, word, docbook, xhtml
-'/// <u>Output</u>: TRUE or FALSE
- Dim iCountOfDefaultXSLTStyles as integer
- Dim iSecondCountOfDefaultXSLTStyles as integer
- Dim sFilterPackagePath as string
- Dim sTempReadFilterName as string
- Dim ia as integer
-
- 'Setting boolean to FALSE
- fInitialXMLSetting = FALSE
- '/// Opening new document.
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Opening new " & gApplication & " document."
- call hNewDocument
- '/// Calling the menu item <i>Tools -&gt; XML Filter Settings</i>
- ToolsXMLFilterSettings
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Opening the XML Filter Settings dialog."
- Kontext "XMLFilterSettings"
- call Dialogtest (XMLFilterSettings)
- '/// Checking if there are any XSLT stylesheets available.
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Checking if there are any XSLT stylesheets available."
- iCountOfDefaultXSLTStyles = FilterList.GetItemCount
- ' printlog "DEBUG (a): " & iCountOfDefaultXSLTStyles
- if iCountOfDefaultXSLTStyles <> 0 then
- '/// Check if the same filter already exists.
- 'Using lowercased input parameter.
- sXMLFilterType = lcase(sXMLFilterType)
- for ia = 1 to iCountOfDefaultXSLTStyles
- Kontext "XMLFilterSettings"
- 'read the filter names from the dialog.
- sTempReadFilterName = FilterList.GetItemText(ia)
- ' printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: DEBUG: (" & ia & ") " & sTempReadFilterName
- 'lower case comparison!
- sTempReadFilterName = lcase(sTempReadFilterName)
- 'if a _part_ of the filtername matches the readed filter name the criteria is true!
- if InStr(sTempReadFilterName , sXMLFilterType) <> 0 then
- fInitialXMLSetting = TRUE
- Kontext "XMLFilterSettings"
- CloseBtn.Click
- Call hCloseDocument
- exit sub
- end if
- next ia
- 'if no filter name maches the for...next loop will be left
- 'and the same routine as used for 0 filter installed will
- 'be used to install a filter package.
- end if
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: The XML filter is not available: Adding the " & sXMLFilterType & " XML filter."
- '///+ The packages will be used from &quot;qatesttool/global/input/xslt_stylesheets/*.jar&quot;
- ' printlog "DEBUG: " & sXMLFilterType
- select case sXMLFilterType
- case "excel" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\excel.jar")
- case "word" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\word.jar")
- case "docbook" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\docbook.jar")
- case "xhtml" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\xhtml.jar")
- end select
- OpenPackage.Click
+endcase
+
+'-------------------------------------------------------------------------
+
+sub fInitialXMLSetting( sXMLFilterType as string ) as boolean
+'/// This small function adds the latest and greatest XSLT stylesheet
+'///+ to the office.<br>
+'///+ The result is TRUE if the packages are already available or if they
+'///+ have been installed successfully in this routine.
+'/// <u>Input</u>: excel, word, docbook, xhtml
+'/// <u>Output</u>: TRUE or FALSE
+ Dim iCountOfDefaultXSLTStyles as integer
+ Dim iSecondCountOfDefaultXSLTStyles as integer
+ Dim sFilterPackagePath as string
+ Dim sTempReadFilterName as string
+ Dim ia as integer
+
+ 'Setting boolean to FALSE
+ fInitialXMLSetting = FALSE
+ '/// Opening new document.
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Opening new " & gApplication & " document."
+ call hNewDocument
+ '/// Calling the menu item <i>Tools -&gt; XML Filter Settings</i>
+ ToolsXMLFilterSettings
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Opening the XML Filter Settings dialog."
+ Kontext "XMLFilterSettings"
+ call Dialogtest (XMLFilterSettings)
+ '/// Checking if there are any XSLT stylesheets available.
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Checking if there are any XSLT stylesheets available."
+ iCountOfDefaultXSLTStyles = FilterList.GetItemCount
+ ' printlog "DEBUG (a): " & iCountOfDefaultXSLTStyles
+ if iCountOfDefaultXSLTStyles <> 0 then
+ '/// Check if the same filter already exists.
+ 'Using lowercased input parameter.
+ sXMLFilterType = lcase(sXMLFilterType)
+ for ia = 1 to iCountOfDefaultXSLTStyles
+ Kontext "XMLFilterSettings"
+ 'read the filter names from the dialog.
+ sTempReadFilterName = FilterList.GetItemText(ia)
+ ' printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: DEBUG: (" & ia & ") " & sTempReadFilterName
+ 'lower case comparison!
+ sTempReadFilterName = lcase(sTempReadFilterName)
+ 'if a _part_ of the filtername matches the readed filter name the criteria is true!
+ if InStr(sTempReadFilterName , sXMLFilterType) <> 0 then
+ fInitialXMLSetting = TRUE
+ Kontext "XMLFilterSettings"
+ CloseBtn.Click
+ Call hCloseDocument
+ exit sub
+ end if
+ next ia
+ 'if no filter name maches the for...next loop will be left
+ 'and the same routine as used for 0 filter installed will
+ 'be used to install a filter package.
+ end if
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: The XML filter is not available: Adding the " & sXMLFilterType & " XML filter."
+ '///+ The packages will be used from &quot;qatesttool/global/input/xslt_stylesheets/*.jar&quot;
+ ' printlog "DEBUG: " & sXMLFilterType
+ select case sXMLFilterType
+ case "excel" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\excel.jar")
+ case "word" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\word.jar")
+ case "docbook" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\docbook.jar")
+ case "xhtml" : sFilterPackagePath = ConvertPath(gTestToolPath & "global\input\xslt_stylesheets\xhtml.jar")
+ end select
+ OpenPackage.Click
Kontext "OeffnenDlg"
- if ( OeffnenDlg.exists( 2 ) ) then
- call Dialogtest (OeffnenDlg)
- Dateiname.SetText sFilterPackagePath
+ if ( OeffnenDlg.exists( 2 ) ) then
+ call Dialogtest (OeffnenDlg)
+ Dateiname.SetText sFilterPackagePath
Oeffnen.Click
-
- Kontext
- if Active.Exists(3) then
- if Active.GetRT = 304 then
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: " & Active.GetText
- Active.OK
- Kontext "XMLFilterSettings"
- iSecondCountOfDefaultXSLTStyles = FilterList.GetItemCount
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Checking again the count of installed XSLT stylesheets."
- if iSecondCountOfDefaultXSLTStyles <> (iCountOfDefaultXSLTStyles+1) then
- warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: It was not possible to add " & sXMLFilterType & "-XML filter!"
- warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Test aborted!"
- exit sub
- else
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: XML filter has been installed!"
- fInitialXMLSetting = TRUE
- end if
- end if
+
+ Kontext
+ if Active.Exists(3) then
+ if Active.GetRT = 304 then
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: " & Active.GetText
+ Active.OK
+ Kontext "XMLFilterSettings"
+ iSecondCountOfDefaultXSLTStyles = FilterList.GetItemCount
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Checking again the count of installed XSLT stylesheets."
+ if iSecondCountOfDefaultXSLTStyles <> (iCountOfDefaultXSLTStyles+1) then
+ warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: It was not possible to add " & sXMLFilterType & "-XML filter!"
+ warnlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Test aborted!"
+ exit sub
+ else
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: XML filter has been installed!"
+ fInitialXMLSetting = TRUE
+ end if
+ end if
end if
else
warnlog( "Dialog <OeffnenDlg> is not available" )
endif
-
+
Kontext "XMLFilterSettings"
- if ( XMLFilterSettings.exists( 1 ) ) then
- '/// Closing the XML Filter Settings-dialog.
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Closing the 'XML Filter Settings'-dialog."
+ if ( XMLFilterSettings.exists( 1 ) ) then
+ '/// Closing the XML Filter Settings-dialog.
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Closing the 'XML Filter Settings'-dialog."
CloseBtn.Click
else
warnlog( "Dialog <XMLFilterSettings> is not available" )
- endif
- '/// Closing the opened application document.
- printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Closing the opened application document."
- call hCloseDocument
-end sub
-
-'-------------------------------------------------------------------------
-
-sub sRemoveXSLTFilter
- Dim sXMLFilterType as string
- Dim iCountOfDefaultXSLTStyles as integer
- Dim ia as integer
- Dim sTempReadFilterName as string
- Kontext "XMLFilterSettings"
- select case gApplication
- case "CALC" : sXMLFilterType = "excel"
- case "WRITER" : sXMLFilterType = "word"
- case else : sXMLFilterType = "docbook"
- end select
- iCountOfDefaultXSLTStyles = FilterList.GetItemCount
- if iCountOfDefaultXSLTStyles <> 0 then
- '/// Search for the filter in filter list.
- 'Using lowercased input parameter.
- for ia = 1 to iCountOfDefaultXSLTStyles
- Kontext "XMLFilterSettings"
- 'read the filter names from the dialog.
- sTempReadFilterName = FilterList.GetItemText(ia)
- 'lower case comparison!
- if InStr(sTempReadFilterName , sXMLFilterType) <> 0 then
- '/// If the filter has been found delete it.
- FilterList.TypeKeys "<HOME>"
- wait( 100 )
- FilterList.TypeKeys "<DOWN>" , (ia-1)
- wait( 100 )
- DeleteBtn.Click
- Kontext
- if Active.Exists(1) then
- if Active.GetRT = 304 then
- Active.Yes
- end if
- end if
- exit sub
- end if
- next ia
- else
- warnlog "The count of XML filters has to be >0! Problem?"
- end if
-end sub
-
+ endif
+ '/// Closing the opened application document.
+ printlog "global::tools::inc::t_xml_filter1,inc::fInitialXMLSetting: Closing the opened application document."
+ call hCloseDocument
+end sub
+
+'-------------------------------------------------------------------------
+
+sub sRemoveXSLTFilter
+ Dim sXMLFilterType as string
+ Dim iCountOfDefaultXSLTStyles as integer
+ Dim ia as integer
+ Dim sTempReadFilterName as string
+ Kontext "XMLFilterSettings"
+ select case gApplication
+ case "CALC" : sXMLFilterType = "excel"
+ case "WRITER" : sXMLFilterType = "word"
+ case else : sXMLFilterType = "docbook"
+ end select
+ iCountOfDefaultXSLTStyles = FilterList.GetItemCount
+ if iCountOfDefaultXSLTStyles <> 0 then
+ '/// Search for the filter in filter list.
+ 'Using lowercased input parameter.
+ for ia = 1 to iCountOfDefaultXSLTStyles
+ Kontext "XMLFilterSettings"
+ 'read the filter names from the dialog.
+ sTempReadFilterName = FilterList.GetItemText(ia)
+ 'lower case comparison!
+ if InStr(sTempReadFilterName , sXMLFilterType) <> 0 then
+ '/// If the filter has been found delete it.
+ FilterList.TypeKeys "<HOME>"
+ wait( 100 )
+ FilterList.TypeKeys "<DOWN>" , (ia-1)
+ wait( 100 )
+ DeleteBtn.Click
+ Kontext
+ if Active.Exists(1) then
+ if Active.GetRT = 304 then
+ Active.Yes
+ end if
+ end if
+ exit sub
+ end if
+ next ia
+ else
+ warnlog "The count of XML filters has to be >0! Problem?"
+ end if
+end sub
+
diff --git a/testautomation/writer/optional/includes/stylist/w_stylist.inc b/testautomation/writer/optional/includes/stylist/w_stylist.inc
index a3a2e4147247..f2df65b18172 100755
--- a/testautomation/writer/optional/includes/stylist/w_stylist.inc
+++ b/testautomation/writer/optional/includes/stylist/w_stylist.inc
@@ -1,1022 +1,1022 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: w_stylist.inc,v $
-'*
-'* $Revision: 1.2 $
-'*
-'* last change: $Author: vg $ $Date: 2008-08-18 12:36:39 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : helge.delfs@sun.com
-'*
-'* short description : Test common stylist functions and assigning styles
-'*
-'************************************************************************
-'*
-' #1 tFormatStylist1
-' #1 tFormatStylist2
-' #1 tFormatStylist3
-' #1 tFormatStylist4
-' #1 tFormatStylist5
-' #1 tFormatStylist6
-' #1 tFormatStylist7
-' #1 tAssigningStyles1
-' #1 tAssigningStyles2
-' #1 tAssigningStyles3
-' #1 tAssigningStyles4
-' #1 tAssigningStyles5
-' #1 tAssigningStyles6
-' #1 tAssigningStyles7
-' #1 tKeyboardShortcutToStyles
-'*
-'\***********************************************************************
-
-sub w_stylist
- printLog Chr(13) + "--------- Level 1 - Format / Stylist ----------"
-
- Call tFormatStylist1 ' all methods on stylist
- Call tFormatStylist2 ' interacting between documents
- Call tFormatStylist3 ' show all templates
- Call tFormatStylist4 ' search/create templates
- Call tFormatStylist5 ' select templet in stylist
- Call tFormatStylist6 ' new template from selection
- Call tFormatStylist7 ' new template from selection, modified via ContextMenu.
- Call tAssigningStyles1
- Call tAssigningStyles2
- Call tAssigningStyles3
- Call tAssigningStyles4
- Call tAssigningStyles5
- Call tAssigningStyles6
- Call tAssigningStyles7
- Call tKeyboardShortcutToStyles
-
-end sub
-
-' **********************************************************************
-
-testcase tFormatStylist1
- Dim xPos as long
- Dim yPos as long
- Dim xSize%
- Dim ySize%
-
- printlog "- Format / Stylist : all methods with Navigator as window"
- printlog "New writerdocument"
- Call hNewDocument
- printlog " - Call Stylist with F11"
- printlog "Call stylist with <F11> aand proof all windowmethods at stylist"
- Call wTypeKeys "<F11>"
- Kontext "Stylist"
- if Stylist.NotExists then
- Warnlog "No Stylist with <F11>"
- FormatStylist
- end if
- xPos = Stylist.GetPosX
- yPos = Stylist.GetPosY
- xSize% = Stylist.GetSizeX
- ySize% = Stylist.GetSizeY
-
- printlog " - move Stylist"
- Stylist.Move 10, 10
- Sleep 1
- Stylist.Move 300, 400
- Sleep 1
- Stylist.Move 590, 790
- Sleep 1
- Stylist.Move xPos, yPos
- Sleep 1
-
- printlog " - size Stylist"
- try
- Stylist.Size 300, 400
- catch
- Warnlog "Sizen Stylist doesn't work.. see #i32449"
- endcatch
- Sleep 1
- try
- Stylist.Size xSize%, ySize%
- catch
- Warnlog "Sizen Stylist doesn't work.. see #i32449"
- endcatch
- Sleep 1
-
- printlog " - close Stylist and reopen ( has to be the same size )"
- xPos = Stylist.GetPosX
- yPos = Stylist.GetPosY
- xSize% = Stylist.GetSizeX
- ySize% = Stylist.GetSizeY
- FormatStylist
- Sleep 1
- FormatStylist
- if xPos <> Stylist.GetPosX then Warnlog "x-Pos. has been changed : Not -> "+ xPos + " but -> "+ Stylist.GetPosX
- if yPos <> Stylist.GetPosY then Warnlog "y-Pos. has been changed : Not -> "+ yPos + " but -> "+ Stylist.GetPosY
- if xSize% <> Stylist.GetSizeX then Warnlog "x-Size has been changed : Not -> "+ xSize% + " but -> "+ Stylist.GetSizeX
- if ySize% <> Stylist.GetSizeY then Warnlog "y-Size has been changed : Not -> "+ ySize% + " but -> "+ Stylist.GetSizeY
-
- printlog " - dock Stylist"
- Stylist.Dock
- Sleep 1
- if NOT Stylist.IsDocked then Warnlog "Stylist has not been docked in"
- Stylist.Undock
- Sleep 1
-
- Stylist.Close
- printlog "Close document"
- Call hCloseDocument
-
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist2
- Dim xPos%
- Dim yPos%
- Dim xSize%
- Dim ySize%
-
- printlog "- Format/Stylist : Methods from Stylist as Window between more than one document"
- printlog " New document"
- Call hNewDocument
- printlog "check all methods of Stylist as Window between more than one document"
- Call wTypeKeys "Test the stylist functions"
- printlog " - Call Stylist in first document and check in a second document"
- Sleep 2
- Kontext "Stylist"
- If Not Stylist.Exists then FormatStylist
- Sleep 2
- Call hNewDocument
- Call wTypeKeys "Test the stylist functions"
- Sleep 2
- Kontext "Stylist"
- if Stylist.NotExists then Warnlog "No Stylist in new document"
-
- printlog " - Close all documents and reopen"
- Sleep 2
- Call hCloseDocument
- Sleep 2
- Call hCloseDocument
- Sleep 2
- Call hNewDocument
- Sleep 2
- Call wTypeKeys "Test the stylist functions"
- Kontext "Stylist"
- if Stylist.NotExists then Warnlog "No Stylist in a new document"
-
- printlog " - Dock Stylist in first document and check in a new if docked"
- Sleep 2
- Stylist.Dock
- Sleep 1
- Call hNewDocument
- Call wTypeKeys "Test the stylist functions"
- Kontext "Stylist"
- if NOT Stylist.IsDocked then Warnlog "Stylist is not docked in new document"
-
- printlog " - Close all documents, reopen one and check docked Stylist"
- Call hCloseDocument
- Sleep 2
- Call hCloseDocument
- Sleep 2
- Call hNewDocument
- Kontext "Stylist"
- if NOT Stylist.IsDocked then Warnlog "Stylist is not docked in new document"
-
- printlog " - Close Stylist with <F11>"
- Stylist.Undock
- Sleep 1
- Call wTypeKeys "<F11>"
- Kontext "Stylist"
- if NOT Stylist.NotExists then
- Warnlog "Stylist is still open"
- Stylist.Close
- end if
- printlog "Close document"
- Call hCloseDocument
-
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist3
- Dim i as Integer
- Dim AllStyles as integer
- Dim j as integer
- Dim RemString as string
- printlog "- Format / Stylist : select all Style properties"
-
- Call hNewDocument
- printlog " New writerdocument"
- FormatStylist
- printlog "Select all style properties in stylist"
- Kontext "Stylist"
- if Stylist.NotExists then FormatStylist
- printlog " - Paragraph Styles"
- Absatzvorlagen.Click
-
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- wait 500
- if i = 2 then ' All Styles
- Vorlagenliste.TypeKeys "<Home>"
- AllStyles = 1
- For j = 1 to 200
- RemString = Vorlagenliste.Gettext
- 'Include this, if you want to see the styles in writerdocument
- 'SetClipboard Vorlagenliste.Gettext
- 'Kontext "DocumentWriter"
- 'DocumentWriter.TypeKeys GetClipboardtext + "<Return>"
- 'Kontext "Stylist"
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.Gettext <> RemString then
- AllStyles = AllStyles + 1
- else
- j = 202
- if AllStyles <> "122" then
- Select Case iSprache
- Case 07
- warnlog "Double styles in stylist"
- Case 55
- warnlog "Missing Style in Stylist"
- Case 31
- warnlog "Missing Style in Stylist"
- Case else
- Warnlog "There are " + AllStyles + " styles in this category and not 122!"
- end select
- else
- printlog "There are " + AllStyles + " styles in this category!"
- end if
- end if
- next j
- end if
- Sleep 1
- next i
-
- Zeichenvorlagen.Click
- Sleep 2
- printlog " - Chapter Styles"
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- AllStyles = AllStyles + 1
- Sleep 1
- next i
-
- Rahmenvorlagen.Click
- Sleep 2
- printlog " - Frame Styles"
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- AllStyles = AllStyles + 1
- Sleep 1
- next i
-
- Seitenvorlagen.Click
- Sleep 2
- printlog " - Page Styles"
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- AllStyles = AllStyles + 1
- Sleep 1
- next i
- Stylist.Close
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist4
- Dim i as Integer
- Dim AlterWert$
- Dim NeuerWert$
-
- printlog "- Format / Stylist : check created Styles"
- printlog "New writerdocument"
- Call hNewDocument
- printlog " - create Paragraph Style in Stylist"
- Call wStyleCreate ( "ATesttool", "Paragraph", true )
- Kontext "Stylist"
- printlog "Check if Style has been added in stylist"
- if wStyleSelect ( "ATesttool", "Paragraph" ) = false then Warnlog "Paragraph Style has not been found"
-
- printlog " - Create Character Style in Stylist"
- Call wStyleCreate ( "BTesttool", "Character", true )
- if wStyleSelect ( "BTesttool", "Character" ) = false then Warnlog "Character Style has not been found!"
- printlog " - Create Frame Style in Stylist"
- Call wStyleCreate ( "CTesttool", "Frame", true )
- if wStyleSelect ( "CTesttool", "Frame" ) = false then Warnlog "Frame Style has not been found!"
-
- printlog " - Create Page Style in Stylist"
- Call wStyleCreate ( "DTesttool", "Page", true )
- if wStyleSelect ( "DTesttool", "Page" ) = false then Warnlog "Page Style has not been found"
-
- printlog " - creating Styles should not have been affecting to new documents"
- ' To avoid focus problems on unix first close stylist
- Kontext "Stylist"
- if Stylist.Exists then FormatStylist
- Call hNewDocument
- Kontext "Stylist"
- if Not Stylist.Exists then FormatStylist
-
- if wStyleSelect ( "ATesttool", "Paragraph" ) = true then Warnlog "Paragraph Style has been found in new document"
- if wStyleSelect ( "BTesttool", "Character" ) = true then Warnlog "Character Style has been found in new document"
- 'if wStyleSelect ( "CTesttool", "Frame" ) = true then Warnlog "Frame Style has been found in new document"
- if wStyleSelect ( "DTesttool", "Page" ) = true then Warnlog "Page Style has been found in new document"
-
- Call hCloseDocument
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist5
- Dim SuchMal as string, i as integer
- Dim bStyleFound as boolean
-
- printlog "- Format / Stylist : select Style"
- printlog "New writerdocument"
- if bAsianLan = True then
- printlog "- Not in Asian languages!"
- goto endsub
- end if
- Call hNewDocument
- Call wTypeKeys "Dies ist ein formatierter Text <Shift Home>"
- printlog " - format Text"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- StrikeThrough.Select 2
- Outline.Check
- TabFontEffects.OK
-
- printlog " - adjust to Standard-Format through the Stylist"
- printlog "adjust to Standard-Format through the Stylist"
- FormatStylist
- Kontext "Stylist"
- if Stylist.NotExists then FormatStylist
- 'Get name for 'default' template
- Kontext "TextObjectbar"
- SuchMal = Vorlage.GetSelText
- printlog "Using " & SuchMal & " as 'default'"
- Kontext "Stylist"
-
- Vorlagenliste.TypeKeys "<Home>"
- bStyleFound = false
- for i=1 to Vorlagenliste.GetItemCount
- Vorlagenliste.Select i
- if Vorlagenliste.GetText = Suchmal then
- Vorlagenliste.TypeKeys "<Return>"
- bStyleFound = true
- exit for
- end if
- next i
- Stylist.Close
-
- if bStyleFound = false then
- Warnlog "Style: " & Suchmal & " has not been found in Stylist"
- Call hCloseDocument
- goto endsub
- end if
-
- printlog " - check format"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if StrikeThrough.GetSelIndex = 2 then Warnlog "Wrong entry selected in StrikeThrough"
- if Outline.IsChecked then Warnlog "Format Outline is still checked"
- TabFontEffects.OK
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist6
- Dim i as integer
-
- printlog "- Format / Stylist : new Style from selection"
- printlog "New writerdocument"
- Call hNewDocument
- Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
- printlog "create a new style from selection"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Shadow.Check
- StrikeThrough.Select 2
- Overline.Select 2
- OverlineColor.Select 6
- Outline.Check
- Effects.Select 3
- Blinking.Check
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- URLName.SetText "www.mikeportnoy.com"
- TabHyperlinkZeichen.OK
-
- printlog " - Create Character Style from selection"
- Kontext "Stylist"
- if not Stylist.Exists then FormatStylist
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- Sleep 1
-
- AusSelektion.OpenMenu
- Sleep 1
- hMenuSelectNr(1)
- Sleep 1
-
- Kontext "VorlageErzeugen"
- if VorlageErzeugen.Exists then
- VorlagenName.SetText "Testtool"
- VorlageErzeugen.OK
- else
- Warnlog "Creating Style did not work. Dialog not up!"
- end if
-
- printlog " - assign new Character Style to a new text"
- wTypeKeys "<Home><Down>",3
- wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- if Vorlagenliste.GetSeltext <> "Testtool" then 'Go find the entry.
- Vorlagenliste.TypeKeys "<Home>"
- For i = 1 to 100
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
- i = 102
- end if
- next i
- end if
- Vorlagenliste.TypeKeys "<Return>" 'Assign to text.
- Stylist.Close
- if i = 101 then
- Warnlog "Created Style could not be found in Stylist!"
- else
- Printlog " - check Style"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
- if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
- if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
- if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
- if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#TabHyperlink: URL is wrong " + URLName.Gettext
- TabHyperlinkZeichen.OK
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist7
- Dim i as integer
-
- printlog "- Format / Stylist : new Style from selection, then modified via the ContextMenu."
- printlog "New writerdocument"
- Call hNewDocument
- Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
- printlog "create a new style from selection"
-
- printlog " - Create Character Style from selection"
- Kontext "Stylist"
- if not Stylist.Exists then FormatStylist
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- Sleep 1
-
- AusSelektion.OpenMenu
- Sleep 1
- hMenuSelectNr(1)
- Sleep 1
-
- Kontext "VorlageErzeugen"
- if VorlageErzeugen.Exists then
- VorlagenName.SetText "Testtool"
- VorlageErzeugen.OK
- else
- Warnlog "Creating Style did not work. Dialog not up!"
- end if
-
- printlog " Open ContextMenu over the 'Testtool' Style."
- Kontext "Stylist"
- if not Stylist.Exists then FormatStylist
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- if Vorlagenliste.GetSeltext <> "Testtool" then
- Vorlagenliste.TypeKeys "<Home>"
- For i = 1 to 100
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.GetSeltext = "Testtool" then
- i = 102
- end if
- next i
- if i = 101 then
- warnlog "No Testtool -Stylist found. Check if new stylists can be created. Test ends."
- goto endsub
- end if
- end if
- Vorlagenliste.TypeKeys "<SHIFT F10>" 'Open ContextMenu
- Sleep 1
- printlog " Select 'Modify'"
- Call hMenuSelectNr(2) 'Modify
- Sleep 1
-
- printlog " Goto Tabpage 'Font Effects' and change some settings."
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Shadow.Check
- StrikeThrough.Select 2
- Overline.Select 2
- OverlineColor.Select 6
- Outline.Check
- Effects.Select 3
- Blinking.Check
- TabFontEffects.OK
-
- printlog " - assign new Character Style to a new text"
- wTypeKeys "<Home><Down>",3
- wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
-
- if Vorlagenliste.GetSeltext <> "Testtool" then
- Vorlagenliste.TypeKeys "<Home>"
- For i = 1 to 100
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
- i = 102
- end if
- next i
- end if
- Vorlagenliste.TypeKeys "<Return>" 'Assign Style to Text.
- Stylist.Close
- if i = 101 then
- Warnlog "Created Style could not be found in Stylist!"
- else
- Printlog " - check Style"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
- if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
- if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
- if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
- if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
- TabFontEffects.OK
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles1
- Dim i as integer
- Dim sStyles() as string
- Dim sTemp as string
- Dim j as integer
- Dim bStyleInList as boolean
-
- printlog "UI and Strings check"
- Call hNewDocument
- printlog "Open a new writerdocument"
- printlog "Check if the following strings and only those strings are present:"
- printlog "Clear formatting"
- printlog "Heading 1"
- printlog "Heading 2"
- printlog "Heading 3"
- printlog "Default"
- printlog "Text body"
- printlog "More..."
- Select Case iSprache
- Case 01 : sStyles = Array("Clear formatting", "Default", "Heading 1", "Heading 2", "Heading 3", "Text body", "More...")
- Case 07 : sStyles = Array("Отменить форматирование", "Базовый", "Заголовок 1", "Заголовок 2", "Заголовок 3", "Основной текст", "Дополнительно...")
- Case 31 : sStyles = Array("Opmaak wissen", "Kop 1", "Kop 2", "Kop 3", "Standaard", "Tekstblok", "Meer...")
- Case 33 : sStyles = Array("Effacer le formatage", "Corps de texte", "Par défaut", "Titre 1", "Titre 2", "Titre 3", "Autres...")
- Case 34 : sStyles = Array("Borrar formato", "Cuerpo de texto", "Encabezado 1", "Encabezado 2", "Encabezado 3", "Predeterminado", "Más...")
- Case 36 : sStyles = Array("Formázás törlése", "Alapértelmezett", "Címsor 1", "Címsor 2", "Címsor 3", "Szövegtörzs", "További...")
- Case 39 : sStyles = Array("Cancella formattazione", "Corpo testo", "Intestazione 1", "Intestazione 2", "Intestazione 3", "Standard", "Extra...")
- Case 46 : sStyles = Array("Radera formatering", "Brödtext", "Överskrift 1", "Överskrift 2", "Överskrift 3", "Standard", "Mer...")
- Case 48 : sStyles = Array("Wyczyść formatowanie", "Domyślnie", "Nagłówek 1", "Nagłówek 2", "Nagłówek 3", "Treść tekstu", "Więcej...")
- Case 49 : sStyles = Array("Formatierung löschen", "Standard", "Textkörper", "Überschrift 1", "Überschrift 2", "Überschrift 3", "Weitere...")
- Case 55 : sStyles = Array("Limpar formatação", "Corpo do texto", "Padrão", "Título 1", "Título 2", "Título 3", "Mais...")
- Case 81 : sStyles = Array("書式設定の解除", "本文", "標準", "見出し 1", "見出し 2", "見出し 3", "詳細...")
- Case 82 : sStyles = Array("서식 지우기", "기본값", "제목 1", "제목 2", "제목 3", "텍스트 본문", "자세히...")
- Case 86 : sStyles = Array("清除格式", "默认", "标题 1", "标题 2", "标题 3", "正文", "更多(~M)...")
- Case 88 : sStyles = Array("清除格式", "內文", "標題 1", "標題 2", "標題 3", "預設", "更多...")
- Case 90 : sStyles = Array("Biçimlendirmeyi temizle", "Başlık 1", "Başlık 2", "Başlık 3", "Metin gövdesi", "Varsayılan", "Diğer...")
- Case else : Warnlog "Current language not supported. Please add styles to list!"
- Kontext "Textobjectbar"
- printlog "- Current Styles: "
- For i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- printlog Vorlage.GetSelText
- next i
- Call hCloseDocument
- exit sub
- end select
-
- 'Check number of entrys....have to be seven
- Kontext "Textobjectbar"
- if Vorlage.GetItemCount <> 7 then
- Select case iSprache
- case 82 : warnlog "Korean: Number of styles in styleslistbox wrong"
- case else : Warnlog "Not 7 entrys in Styles & Formatting combobox but: " & Vorlage.GetItemCount
- end select
- end if
-
- For i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- sTemp = Vorlage.GetSelText
- printlog "- check style: " & sTemp
- bStyleInList = false
- For j = 0 to 6
- if sStyles(j) = sTemp then
- bStyleInList = true
- end if
- next j
-
- if bStyleInList = true then
- printlog "- style " & sTemp & " found in list"
- else
- if iSprache <> 82 then Warnlog "- style " & sTemp & " wasn't found in list!"
- end if
- next i
-
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles2
- Dim i as integer
- Dim sTemp as string
-
- printlog "- Apply Style"
- printlog "New writerdocument"
- Call hNewDocument
- printlog "Insert dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Select whole dummytext"
- Call wTypeKeys "<Mod1 A>"
- printlog "Apply style 'Heading 1' through Styles & Formatting combobox"
- Kontext "Textobjectbar"
- for i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- sTemp = Vorlage.GetSelText
- if Instr(sTemp, "1") then
- Vorlage.TypeKeys "<Return>"
- exit for
- end if
- next i
-
- printlog "Check if style has been applied to paragraph"
- Call wTypeKeys "<Mod1 Home><End>"
- Call wTypeKeys "<Left>", 2
-
- Kontext "Textobjectbar"
- if Vorlage.GetSeltext <> sTemp then
- Warnlog "Seems style has not been completely applied to paragraph!"
- end if
-
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles3
-
- printlog "- Create a new style"
- printlog "Open a new writerdocument"
- Call hNewDocument
- printlog "Insert a dummy text"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Select the whole dummy text"
- Call wTypeKeys "<Mod1 A>"
- printlog "Format / Character"
- FormatCharacter
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- printlog "Apply first font in list and select 2nd Typeface"
- if gAsianSup = True then
- FontWest.Select 1
- StyleWest.Select 2
- else
- Font.Select 1
- Style.Select 1
- end if
- TabFont.Ok
-
- printlog "Enter 'MyStyle' in Stylelistbox"
- Kontext "Textobjectbar"
- Vorlage.TypeKeys "<Mod1 A>"
- Vorlage.TypeKeys "MyStyle<Return>"
-
- printlog "Check if style has been applied to the combobox"
- Call wTypeKeys "<Mod1 End>"
-
- wait 500
- Kontext "Textobjectbar"
- try
- Vorlage.Select "MyStyle"
- catch
- Warnlog "Seems style has not been applied to combobox"
- endcatch
-
- printlog "Check if style has been applied to paragraph"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>", 2
-
- Kontext "Textobjectbar"
- if Vorlage.GetSelText <> "MyStyle" then
- Warnlog "Seems style has not been applied to paragraph"
- end if
-
- printlog "Close Document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles4
- Dim i as integer
- Dim sTemp as string
- Dim sStyle as integer
-
- printlog "- Clear formatting: whole paragraph"
- printlog "Open a new writer document"
- Call hNewDocument
- printlog "Insert a dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Select whole dummytext"
- Call wTypeKeys "<Mod1 A>"
- printlog "Apply style 'Heading 1' through Styles & Formatting combobox"
- Kontext "Textobjectbar"
- ' remeber default style
- sStyle = Vorlage.GetSelIndex
- for i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- sTemp = Vorlage.GetSelText
- if Instr(sTemp, "1") then
- Vorlage.TypeKeys "<Return>"
- exit for
- end if
- next i
-
- printlog "choose 'Clear formatting' in combobox"
- Kontext "Textobjectbar"
- Vorlage.Select 1
- Vorlage.TypeKeys "<Return>"
- wait 500
- printlog "Check if style has been set to default"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>", 3
-
- wait 500
- Kontext "Textobjectbar"
- if Vorlage.GetSelIndex <> sStyle then
- warnlog "Seems paragraph has not been set to default! " & Vorlage.GetSelText & "(" & Vorlage.GetSelIndex & ")"
- end if
-
- printlog "Close Document"
- Call hCloseDocument
-
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles5
-
- printlog "- Clear formatting: whole paragraph with hard formatting of some characters"
- printlog " - 1. Cursor outside of hard formatted string"
- printlog "Open a new writer document"
- Call hNewDocument
- printlog "Insert a dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Highlight first line in dummy text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift End>"
-
- printlog "Format / Bold"
- Kontext "TextObjectbar"
- if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
- Fett.Click
- Wait 500
-
- printlog "Set cursor outside of bold formatted text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down><Right>"
-
- printlog "Select 'Clear Formatting' in Style-Listbox"
- Kontext "Textobjectbar"
- Vorlage.Select 1
- Vorlage.TypeKeys "<Return>"
- wait 500
-
- printlog "Check that first line is still bold and has not been reset"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>"
-
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 0 then
- Warnlog "Style 'Bold' has been reset!"
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles6
-
- Dim iStandard as integer
-
- printlog "- Clear formatting: whole paragraph with hard formatting of some characters"
- printlog " - 2. Cursor inside of hard formatted string"
- printlog "Open a new writer document"
- Call hNewDocument
- printlog "Insert a dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Highlight first line in dummy text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift End>"
-
- printlog "Format / Bold"
- Kontext "TextObjectbar"
- if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
- Fett.Click
- Wait 500
-
- printlog "Point cursor to first highlighted word of bold formatted text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>"
-
- printlog "Select 'Format / Default Formatting' in Style-Listbox"
- FormatDefaultWriter
- wait 500
-
- printlog "first highlighted word should be set to 'Standard'"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>"
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 1 then
- Warnlog "Style 'Bold' has not been reset!"
- end if
-
- printlog "Check that rest of first line is still bold and has not been reset"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End><Left>"
-
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 1 then
- Warnlog "Style 'Bold' has not been reset!"
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles7
-
- printlog "More ..."
- printlog "Open a new writer document"
- Call hNewDocument
-
- printlog "Select 'More...' in Style-Listbox"
- Kontext "Textobjectbar"
- Vorlage.Select Vorlage.GetItemCount
- Vorlage.TypeKeys "<Return>"
- wait 500
-
- printlog "The Stylist should have been opened"
- Kontext "Stylist"
- if Not Stylist.Exists then
- Warnlog "'Styles and Formatting' doesn't open if 'More...' is selected in Style-Listbox"
- else
- printlog "In Style group listbox 'Automatic' should be selected"
- if Gruppenliste.GetSelIndex <> 5 then
- Warnlog "Seems 'Automatic' is not selected per default in 'Styles and Formatting'"
- end if
- Stylist.Close
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tKeyboardShortcutToStyles()
- dim sTempa as string
- dim sTempb as string
- dim sTempc as string
- dim i as integer
- dim x as integer
-
- printlog "open new application document"
- call hNewDocument()
-
- printlog "get current default style from TextObjectBar"
- kontext "TextObjectBar"
- sTempa = Vorlage.getSelText
- sTempc = sTempa
- for i = 3 to 0 step -1
- printlog "Perform the Keycombination <CTRL>+3 (2,1,0) and check, if Style in TextObjectBar changed"
- printlog "- <Ctrl>+<"+i+"> -> Heading "+i+" style"
- Call hTypeKeys("<Mod1 "+i+">")
- sleep 1
- kontext "TextObjectBar"
- sTempb = sTempa
- sTempa = Vorlage.getSelText
- if (sTempa <> sTempb) then
- printlog "OK: Heading changed: '" + sTempa + "'"
- else
- warnlog "Heading didn't change: '" + sTempa + "'"
- end if
- next i
- kontext "DocumentWriter"
- DocumentWriter.TypeKeys("<MOD1 SHIFT 0>")
- sleep (2)
- kontext "TextObjectBar"
- sTempa = Vorlage.getSelText
-
- printlog "should now be the default from the beginning"
- if (uCase(gApplication)<>"HTML") then
- if (sTempa = sTempc) then
- printlog "OK: Heading changed to default: '" + sTempa + "'"
- else
- warnlog "Heading didn't change to default. Should have been: '" + sTempc + "' but was: '" + sTempa + "'"
- end if
- end if
-
- printlog "close document"
- call hCloseDocument()
-endcase
-
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: w_stylist.inc,v $
+'*
+'* $Revision: 1.2 $
+'*
+'* last change: $Author: vg $ $Date: 2008-08-18 12:36:39 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Test common stylist functions and assigning styles
+'*
+'************************************************************************
+'*
+' #1 tFormatStylist1
+' #1 tFormatStylist2
+' #1 tFormatStylist3
+' #1 tFormatStylist4
+' #1 tFormatStylist5
+' #1 tFormatStylist6
+' #1 tFormatStylist7
+' #1 tAssigningStyles1
+' #1 tAssigningStyles2
+' #1 tAssigningStyles3
+' #1 tAssigningStyles4
+' #1 tAssigningStyles5
+' #1 tAssigningStyles6
+' #1 tAssigningStyles7
+' #1 tKeyboardShortcutToStyles
+'*
+'\***********************************************************************
+
+sub w_stylist
+ printLog Chr(13) + "--------- Level 1 - Format / Stylist ----------"
+
+ Call tFormatStylist1 ' all methods on stylist
+ Call tFormatStylist2 ' interacting between documents
+ Call tFormatStylist3 ' show all templates
+ Call tFormatStylist4 ' search/create templates
+ Call tFormatStylist5 ' select templet in stylist
+ Call tFormatStylist6 ' new template from selection
+ Call tFormatStylist7 ' new template from selection, modified via ContextMenu.
+ Call tAssigningStyles1
+ Call tAssigningStyles2
+ Call tAssigningStyles3
+ Call tAssigningStyles4
+ Call tAssigningStyles5
+ Call tAssigningStyles6
+ Call tAssigningStyles7
+ Call tKeyboardShortcutToStyles
+
+end sub
+
+' **********************************************************************
+
+testcase tFormatStylist1
+ Dim xPos as long
+ Dim yPos as long
+ Dim xSize%
+ Dim ySize%
+
+ printlog "- Format / Stylist : all methods with Navigator as window"
+ printlog "New writerdocument"
+ Call hNewDocument
+ printlog " - Call Stylist with F11"
+ printlog "Call stylist with <F11> aand proof all windowmethods at stylist"
+ Call wTypeKeys "<F11>"
+ Kontext "Stylist"
+ if Stylist.NotExists then
+ Warnlog "No Stylist with <F11>"
+ FormatStylist
+ end if
+ xPos = Stylist.GetPosX
+ yPos = Stylist.GetPosY
+ xSize% = Stylist.GetSizeX
+ ySize% = Stylist.GetSizeY
+
+ printlog " - move Stylist"
+ Stylist.Move 10, 10
+ Sleep 1
+ Stylist.Move 300, 400
+ Sleep 1
+ Stylist.Move 590, 790
+ Sleep 1
+ Stylist.Move xPos, yPos
+ Sleep 1
+
+ printlog " - size Stylist"
+ try
+ Stylist.Size 300, 400
+ catch
+ Warnlog "Sizen Stylist doesn't work.. see #i32449"
+ endcatch
+ Sleep 1
+ try
+ Stylist.Size xSize%, ySize%
+ catch
+ Warnlog "Sizen Stylist doesn't work.. see #i32449"
+ endcatch
+ Sleep 1
+
+ printlog " - close Stylist and reopen ( has to be the same size )"
+ xPos = Stylist.GetPosX
+ yPos = Stylist.GetPosY
+ xSize% = Stylist.GetSizeX
+ ySize% = Stylist.GetSizeY
+ FormatStylist
+ Sleep 1
+ FormatStylist
+ if xPos <> Stylist.GetPosX then Warnlog "x-Pos. has been changed : Not -> "+ xPos + " but -> "+ Stylist.GetPosX
+ if yPos <> Stylist.GetPosY then Warnlog "y-Pos. has been changed : Not -> "+ yPos + " but -> "+ Stylist.GetPosY
+ if xSize% <> Stylist.GetSizeX then Warnlog "x-Size has been changed : Not -> "+ xSize% + " but -> "+ Stylist.GetSizeX
+ if ySize% <> Stylist.GetSizeY then Warnlog "y-Size has been changed : Not -> "+ ySize% + " but -> "+ Stylist.GetSizeY
+
+ printlog " - dock Stylist"
+ Stylist.Dock
+ Sleep 1
+ if NOT Stylist.IsDocked then Warnlog "Stylist has not been docked in"
+ Stylist.Undock
+ Sleep 1
+
+ Stylist.Close
+ printlog "Close document"
+ Call hCloseDocument
+
+endcase
+
+' **********************************************************************
+
+testcase tFormatStylist2
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
+ Dim ySize%
+
+ printlog "- Format/Stylist : Methods from Stylist as Window between more than one document"
+ printlog " New document"
+ Call hNewDocument
+ printlog "check all methods of Stylist as Window between more than one document"
+ Call wTypeKeys "Test the stylist functions"
+ printlog " - Call Stylist in first document and check in a second document"
+ Sleep 2
+ Kontext "Stylist"
+ If Not Stylist.Exists then FormatStylist
+ Sleep 2
+ Call hNewDocument
+ Call wTypeKeys "Test the stylist functions"
+ Sleep 2
+ Kontext "Stylist"
+ if Stylist.NotExists then Warnlog "No Stylist in new document"
+
+ printlog " - Close all documents and reopen"
+ Sleep 2
+ Call hCloseDocument
+ Sleep 2
+ Call hCloseDocument
+ Sleep 2
+ Call hNewDocument
+ Sleep 2
+ Call wTypeKeys "Test the stylist functions"
+ Kontext "Stylist"
+ if Stylist.NotExists then Warnlog "No Stylist in a new document"
+
+ printlog " - Dock Stylist in first document and check in a new if docked"
+ Sleep 2
+ Stylist.Dock
+ Sleep 1
+ Call hNewDocument
+ Call wTypeKeys "Test the stylist functions"
+ Kontext "Stylist"
+ if NOT Stylist.IsDocked then Warnlog "Stylist is not docked in new document"
+
+ printlog " - Close all documents, reopen one and check docked Stylist"
+ Call hCloseDocument
+ Sleep 2
+ Call hCloseDocument
+ Sleep 2
+ Call hNewDocument
+ Kontext "Stylist"
+ if NOT Stylist.IsDocked then Warnlog "Stylist is not docked in new document"
+
+ printlog " - Close Stylist with <F11>"
+ Stylist.Undock
+ Sleep 1
+ Call wTypeKeys "<F11>"
+ Kontext "Stylist"
+ if NOT Stylist.NotExists then
+ Warnlog "Stylist is still open"
+ Stylist.Close
+ end if
+ printlog "Close document"
+ Call hCloseDocument
+
+endcase
+
+' **********************************************************************
+
+testcase tFormatStylist3
+ Dim i as Integer
+ Dim AllStyles as integer
+ Dim j as integer
+ Dim RemString as string
+ printlog "- Format / Stylist : select all Style properties"
+
+ Call hNewDocument
+ printlog " New writerdocument"
+ FormatStylist
+ printlog "Select all style properties in stylist"
+ Kontext "Stylist"
+ if Stylist.NotExists then FormatStylist
+ printlog " - Paragraph Styles"
+ Absatzvorlagen.Click
+
+ for i=1 to Gruppenliste.GetItemCount
+ Gruppenliste.Select i
+ wait 500
+ if i = 2 then ' All Styles
+ Vorlagenliste.TypeKeys "<Home>"
+ AllStyles = 1
+ For j = 1 to 200
+ RemString = Vorlagenliste.Gettext
+ 'Include this, if you want to see the styles in writerdocument
+ 'SetClipboard Vorlagenliste.Gettext
+ 'Kontext "DocumentWriter"
+ 'DocumentWriter.TypeKeys GetClipboardtext + "<Return>"
+ 'Kontext "Stylist"
+ Vorlagenliste.TypeKeys "<Down>"
+ if Vorlagenliste.Gettext <> RemString then
+ AllStyles = AllStyles + 1
+ else
+ j = 202
+ if AllStyles <> "122" then
+ Select Case iSprache
+ Case 07
+ warnlog "Double styles in stylist"
+ Case 55
+ warnlog "Missing Style in Stylist"
+ Case 31
+ warnlog "Missing Style in Stylist"
+ Case else
+ Warnlog "There are " + AllStyles + " styles in this category and not 122!"
+ end select
+ else
+ printlog "There are " + AllStyles + " styles in this category!"
+ end if
+ end if
+ next j
+ end if
+ Sleep 1
+ next i
+
+ Zeichenvorlagen.Click
+ Sleep 2
+ printlog " - Chapter Styles"
+ for i=1 to Gruppenliste.GetItemCount
+ Gruppenliste.Select i
+ AllStyles = AllStyles + 1
+ Sleep 1
+ next i
+
+ Rahmenvorlagen.Click
+ Sleep 2
+ printlog " - Frame Styles"
+ for i=1 to Gruppenliste.GetItemCount
+ Gruppenliste.Select i
+ AllStyles = AllStyles + 1
+ Sleep 1
+ next i
+
+ Seitenvorlagen.Click
+ Sleep 2
+ printlog " - Page Styles"
+ for i=1 to Gruppenliste.GetItemCount
+ Gruppenliste.Select i
+ AllStyles = AllStyles + 1
+ Sleep 1
+ next i
+ Stylist.Close
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tFormatStylist4
+ Dim i as Integer
+ Dim AlterWert$
+ Dim NeuerWert$
+
+ printlog "- Format / Stylist : check created Styles"
+ printlog "New writerdocument"
+ Call hNewDocument
+ printlog " - create Paragraph Style in Stylist"
+ Call wStyleCreate ( "ATesttool", "Paragraph", true )
+ Kontext "Stylist"
+ printlog "Check if Style has been added in stylist"
+ if wStyleSelect ( "ATesttool", "Paragraph" ) = false then Warnlog "Paragraph Style has not been found"
+
+ printlog " - Create Character Style in Stylist"
+ Call wStyleCreate ( "BTesttool", "Character", true )
+ if wStyleSelect ( "BTesttool", "Character" ) = false then Warnlog "Character Style has not been found!"
+ printlog " - Create Frame Style in Stylist"
+ Call wStyleCreate ( "CTesttool", "Frame", true )
+ if wStyleSelect ( "CTesttool", "Frame" ) = false then Warnlog "Frame Style has not been found!"
+
+ printlog " - Create Page Style in Stylist"
+ Call wStyleCreate ( "DTesttool", "Page", true )
+ if wStyleSelect ( "DTesttool", "Page" ) = false then Warnlog "Page Style has not been found"
+
+ printlog " - creating Styles should not have been affecting to new documents"
+ ' To avoid focus problems on unix first close stylist
+ Kontext "Stylist"
+ if Stylist.Exists then FormatStylist
+ Call hNewDocument
+ Kontext "Stylist"
+ if Not Stylist.Exists then FormatStylist
+
+ if wStyleSelect ( "ATesttool", "Paragraph" ) = true then Warnlog "Paragraph Style has been found in new document"
+ if wStyleSelect ( "BTesttool", "Character" ) = true then Warnlog "Character Style has been found in new document"
+ 'if wStyleSelect ( "CTesttool", "Frame" ) = true then Warnlog "Frame Style has been found in new document"
+ if wStyleSelect ( "DTesttool", "Page" ) = true then Warnlog "Page Style has been found in new document"
+
+ Call hCloseDocument
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tFormatStylist5
+ Dim SuchMal as string, i as integer
+ Dim bStyleFound as boolean
+
+ printlog "- Format / Stylist : select Style"
+ printlog "New writerdocument"
+ if bAsianLan = True then
+ printlog "- Not in Asian languages!"
+ goto endsub
+ end if
+ Call hNewDocument
+ Call wTypeKeys "Dies ist ein formatierter Text <Shift Home>"
+ printlog " - format Text"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ StrikeThrough.Select 2
+ Outline.Check
+ TabFontEffects.OK
+
+ printlog " - adjust to Standard-Format through the Stylist"
+ printlog "adjust to Standard-Format through the Stylist"
+ FormatStylist
+ Kontext "Stylist"
+ if Stylist.NotExists then FormatStylist
+ 'Get name for 'default' template
+ Kontext "TextObjectbar"
+ SuchMal = Vorlage.GetSelText
+ printlog "Using " & SuchMal & " as 'default'"
+ Kontext "Stylist"
+
+ Vorlagenliste.TypeKeys "<Home>"
+ bStyleFound = false
+ for i=1 to Vorlagenliste.GetItemCount
+ Vorlagenliste.Select i
+ if Vorlagenliste.GetText = Suchmal then
+ Vorlagenliste.TypeKeys "<Return>"
+ bStyleFound = true
+ exit for
+ end if
+ next i
+ Stylist.Close
+
+ if bStyleFound = false then
+ Warnlog "Style: " & Suchmal & " has not been found in Stylist"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " - check format"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ if StrikeThrough.GetSelIndex = 2 then Warnlog "Wrong entry selected in StrikeThrough"
+ if Outline.IsChecked then Warnlog "Format Outline is still checked"
+ TabFontEffects.OK
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tFormatStylist6
+ Dim i as integer
+
+ printlog "- Format / Stylist : new Style from selection"
+ printlog "New writerdocument"
+ Call hNewDocument
+ Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
+ printlog "create a new style from selection"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ Shadow.Check
+ StrikeThrough.Select 2
+ Overline.Select 2
+ OverlineColor.Select 6
+ Outline.Check
+ Effects.Select 3
+ Blinking.Check
+ Kontext
+ Active.Setpage TabHyperlinkZeichen
+ Kontext "TabHyperlinkZeichen"
+ URLName.SetText "www.mikeportnoy.com"
+ TabHyperlinkZeichen.OK
+
+ printlog " - Create Character Style from selection"
+ Kontext "Stylist"
+ if not Stylist.Exists then FormatStylist
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ Sleep 1
+
+ AusSelektion.OpenMenu
+ Sleep 1
+ hMenuSelectNr(1)
+ Sleep 1
+
+ Kontext "VorlageErzeugen"
+ if VorlageErzeugen.Exists then
+ VorlagenName.SetText "Testtool"
+ VorlageErzeugen.OK
+ else
+ Warnlog "Creating Style did not work. Dialog not up!"
+ end if
+
+ printlog " - assign new Character Style to a new text"
+ wTypeKeys "<Home><Down>",3
+ wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ if Vorlagenliste.GetSeltext <> "Testtool" then 'Go find the entry.
+ Vorlagenliste.TypeKeys "<Home>"
+ For i = 1 to 100
+ Vorlagenliste.TypeKeys "<Down>"
+ if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
+ i = 102
+ end if
+ next i
+ end if
+ Vorlagenliste.TypeKeys "<Return>" 'Assign to text.
+ Stylist.Close
+ if i = 101 then
+ Warnlog "Created Style could not be found in Stylist!"
+ else
+ Printlog " - check Style"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
+ if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
+ if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
+ if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
+ if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
+ if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
+ if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
+ Kontext
+ Active.Setpage TabHyperlinkZeichen
+ Kontext "TabHyperlinkZeichen"
+ if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#TabHyperlink: URL is wrong " + URLName.Gettext
+ TabHyperlinkZeichen.OK
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tFormatStylist7
+ Dim i as integer
+
+ printlog "- Format / Stylist : new Style from selection, then modified via the ContextMenu."
+ printlog "New writerdocument"
+ Call hNewDocument
+ Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
+ printlog "create a new style from selection"
+
+ printlog " - Create Character Style from selection"
+ Kontext "Stylist"
+ if not Stylist.Exists then FormatStylist
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ Sleep 1
+
+ AusSelektion.OpenMenu
+ Sleep 1
+ hMenuSelectNr(1)
+ Sleep 1
+
+ Kontext "VorlageErzeugen"
+ if VorlageErzeugen.Exists then
+ VorlagenName.SetText "Testtool"
+ VorlageErzeugen.OK
+ else
+ Warnlog "Creating Style did not work. Dialog not up!"
+ end if
+
+ printlog " Open ContextMenu over the 'Testtool' Style."
+ Kontext "Stylist"
+ if not Stylist.Exists then FormatStylist
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ if Vorlagenliste.GetSeltext <> "Testtool" then
+ Vorlagenliste.TypeKeys "<Home>"
+ For i = 1 to 100
+ Vorlagenliste.TypeKeys "<Down>"
+ if Vorlagenliste.GetSeltext = "Testtool" then
+ i = 102
+ end if
+ next i
+ if i = 101 then
+ warnlog "No Testtool -Stylist found. Check if new stylists can be created. Test ends."
+ goto endsub
+ end if
+ end if
+ Vorlagenliste.TypeKeys "<SHIFT F10>" 'Open ContextMenu
+ Sleep 1
+ printlog " Select 'Modify'"
+ Call hMenuSelectNr(2) 'Modify
+ Sleep 1
+
+ printlog " Goto Tabpage 'Font Effects' and change some settings."
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ Shadow.Check
+ StrikeThrough.Select 2
+ Overline.Select 2
+ OverlineColor.Select 6
+ Outline.Check
+ Effects.Select 3
+ Blinking.Check
+ TabFontEffects.OK
+
+ printlog " - assign new Character Style to a new text"
+ wTypeKeys "<Home><Down>",3
+ wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+
+ if Vorlagenliste.GetSeltext <> "Testtool" then
+ Vorlagenliste.TypeKeys "<Home>"
+ For i = 1 to 100
+ Vorlagenliste.TypeKeys "<Down>"
+ if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
+ i = 102
+ end if
+ next i
+ end if
+ Vorlagenliste.TypeKeys "<Return>" 'Assign Style to Text.
+ Stylist.Close
+ if i = 101 then
+ Warnlog "Created Style could not be found in Stylist!"
+ else
+ Printlog " - check Style"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
+ if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
+ if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
+ if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
+ if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
+ if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
+ if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
+ TabFontEffects.OK
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tAssigningStyles1
+ Dim i as integer
+ Dim sStyles() as string
+ Dim sTemp as string
+ Dim j as integer
+ Dim bStyleInList as boolean
+
+ printlog "UI and Strings check"
+ Call hNewDocument
+ printlog "Open a new writerdocument"
+ printlog "Check if the following strings and only those strings are present:"
+ printlog "Clear formatting"
+ printlog "Heading 1"
+ printlog "Heading 2"
+ printlog "Heading 3"
+ printlog "Default"
+ printlog "Text body"
+ printlog "More..."
+ Select Case iSprache
+ Case 01 : sStyles = Array("Clear formatting", "Default", "Heading 1", "Heading 2", "Heading 3", "Text body", "More...")
+ Case 07 : sStyles = Array("Отменить форматирование", "Базовый", "Заголовок 1", "Заголовок 2", "Заголовок 3", "Основной текст", "Дополнительно...")
+ Case 31 : sStyles = Array("Opmaak wissen", "Kop 1", "Kop 2", "Kop 3", "Standaard", "Tekstblok", "Meer...")
+ Case 33 : sStyles = Array("Effacer le formatage", "Corps de texte", "Par défaut", "Titre 1", "Titre 2", "Titre 3", "Autres...")
+ Case 34 : sStyles = Array("Borrar formato", "Cuerpo de texto", "Encabezado 1", "Encabezado 2", "Encabezado 3", "Predeterminado", "Más...")
+ Case 36 : sStyles = Array("Formázás törlése", "Alapértelmezett", "Címsor 1", "Címsor 2", "Címsor 3", "Szövegtörzs", "További...")
+ Case 39 : sStyles = Array("Cancella formattazione", "Corpo testo", "Intestazione 1", "Intestazione 2", "Intestazione 3", "Standard", "Extra...")
+ Case 46 : sStyles = Array("Radera formatering", "Brödtext", "Överskrift 1", "Överskrift 2", "Överskrift 3", "Standard", "Mer...")
+ Case 48 : sStyles = Array("Wyczyść formatowanie", "Domyślnie", "Nagłówek 1", "Nagłówek 2", "Nagłówek 3", "Treść tekstu", "Więcej...")
+ Case 49 : sStyles = Array("Formatierung löschen", "Standard", "Textkörper", "Überschrift 1", "Überschrift 2", "Überschrift 3", "Weitere...")
+ Case 55 : sStyles = Array("Limpar formatação", "Corpo do texto", "Padrão", "Título 1", "Título 2", "Título 3", "Mais...")
+ Case 81 : sStyles = Array("書式設定の解除", "本文", "標準", "見出し 1", "見出し 2", "見出し 3", "詳細...")
+ Case 82 : sStyles = Array("서식 지우기", "기본값", "제목 1", "제목 2", "제목 3", "텍스트 본문", "자세히...")
+ Case 86 : sStyles = Array("清除格式", "默认", "标题 1", "标题 2", "标题 3", "正文", "更多(~M)...")
+ Case 88 : sStyles = Array("清除格式", "內文", "標題 1", "標題 2", "標題 3", "預設", "更多...")
+ Case 90 : sStyles = Array("Biçimlendirmeyi temizle", "Başlık 1", "Başlık 2", "Başlık 3", "Metin gövdesi", "Varsayılan", "Diğer...")
+ Case else : Warnlog "Current language not supported. Please add styles to list!"
+ Kontext "Textobjectbar"
+ printlog "- Current Styles: "
+ For i = 1 to Vorlage.GetItemCount
+ Vorlage.Select i
+ printlog Vorlage.GetSelText
+ next i
+ Call hCloseDocument
+ exit sub
+ end select
+
+ 'Check number of entrys....have to be seven
+ Kontext "Textobjectbar"
+ if Vorlage.GetItemCount <> 7 then
+ Select case iSprache
+ case 82 : warnlog "Korean: Number of styles in styleslistbox wrong"
+ case else : Warnlog "Not 7 entrys in Styles & Formatting combobox but: " & Vorlage.GetItemCount
+ end select
+ end if
+
+ For i = 1 to Vorlage.GetItemCount
+ Vorlage.Select i
+ sTemp = Vorlage.GetSelText
+ printlog "- check style: " & sTemp
+ bStyleInList = false
+ For j = 0 to 6
+ if sStyles(j) = sTemp then
+ bStyleInList = true
+ end if
+ next j
+
+ if bStyleInList = true then
+ printlog "- style " & sTemp & " found in list"
+ else
+ if iSprache <> 82 then Warnlog "- style " & sTemp & " wasn't found in list!"
+ end if
+ next i
+
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tAssigningStyles2
+ Dim i as integer
+ Dim sTemp as string
+
+ printlog "- Apply Style"
+ printlog "New writerdocument"
+ Call hNewDocument
+ printlog "Insert dummytext"
+ if wBlindtextEinfuegen = false then
+ Call hCloseDocument
+ exit sub
+ end if
+
+ printlog "Select whole dummytext"
+ Call wTypeKeys "<Mod1 A>"
+ printlog "Apply style 'Heading 1' through Styles & Formatting combobox"
+ Kontext "Textobjectbar"
+ for i = 1 to Vorlage.GetItemCount
+ Vorlage.Select i
+ sTemp = Vorlage.GetSelText
+ if Instr(sTemp, "1") then
+ Vorlage.TypeKeys "<Return>"
+ exit for
+ end if
+ next i
+
+ printlog "Check if style has been applied to paragraph"
+ Call wTypeKeys "<Mod1 Home><End>"
+ Call wTypeKeys "<Left>", 2
+
+ Kontext "Textobjectbar"
+ if Vorlage.GetSeltext <> sTemp then
+ Warnlog "Seems style has not been completely applied to paragraph!"
+ end if
+
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tAssigningStyles3
+
+ printlog "- Create a new style"
+ printlog "Open a new writerdocument"
+ Call hNewDocument
+ printlog "Insert a dummy text"
+ if wBlindtextEinfuegen = false then
+ Call hCloseDocument
+ exit sub
+ end if
+
+ printlog "Select the whole dummy text"
+ Call wTypeKeys "<Mod1 A>"
+ printlog "Format / Character"
+ FormatCharacter
+ Kontext
+ Active.Setpage TabFont
+ Kontext "TabFont"
+ printlog "Apply first font in list and select 2nd Typeface"
+ if gAsianSup = True then
+ FontWest.Select 1
+ StyleWest.Select 2
+ else
+ Font.Select 1
+ Style.Select 1
+ end if
+ TabFont.Ok
+
+ printlog "Enter 'MyStyle' in Stylelistbox"
+ Kontext "Textobjectbar"
+ Vorlage.TypeKeys "<Mod1 A>"
+ Vorlage.TypeKeys "MyStyle<Return>"
+
+ printlog "Check if style has been applied to the combobox"
+ Call wTypeKeys "<Mod1 End>"
+
+ wait 500
+ Kontext "Textobjectbar"
+ try
+ Vorlage.Select "MyStyle"
+ catch
+ Warnlog "Seems style has not been applied to combobox"
+ endcatch
+
+ printlog "Check if style has been applied to paragraph"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Right>", 2
+
+ Kontext "Textobjectbar"
+ if Vorlage.GetSelText <> "MyStyle" then
+ Warnlog "Seems style has not been applied to paragraph"
+ end if
+
+ printlog "Close Document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tAssigningStyles4
+ Dim i as integer
+ Dim sTemp as string
+ Dim sStyle as integer
+
+ printlog "- Clear formatting: whole paragraph"
+ printlog "Open a new writer document"
+ Call hNewDocument
+ printlog "Insert a dummytext"
+ if wBlindtextEinfuegen = false then
+ Call hCloseDocument
+ exit sub
+ end if
+
+ printlog "Select whole dummytext"
+ Call wTypeKeys "<Mod1 A>"
+ printlog "Apply style 'Heading 1' through Styles & Formatting combobox"
+ Kontext "Textobjectbar"
+ ' remeber default style
+ sStyle = Vorlage.GetSelIndex
+ for i = 1 to Vorlage.GetItemCount
+ Vorlage.Select i
+ sTemp = Vorlage.GetSelText
+ if Instr(sTemp, "1") then
+ Vorlage.TypeKeys "<Return>"
+ exit for
+ end if
+ next i
+
+ printlog "choose 'Clear formatting' in combobox"
+ Kontext "Textobjectbar"
+ Vorlage.Select 1
+ Vorlage.TypeKeys "<Return>"
+ wait 500
+ printlog "Check if style has been set to default"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Right>", 3
+
+ wait 500
+ Kontext "Textobjectbar"
+ if Vorlage.GetSelIndex <> sStyle then
+ warnlog "Seems paragraph has not been set to default! " & Vorlage.GetSelText & "(" & Vorlage.GetSelIndex & ")"
+ end if
+
+ printlog "Close Document"
+ Call hCloseDocument
+
+endcase
+
+' **********************************************************************
+
+testcase tAssigningStyles5
+
+ printlog "- Clear formatting: whole paragraph with hard formatting of some characters"
+ printlog " - 1. Cursor outside of hard formatted string"
+ printlog "Open a new writer document"
+ Call hNewDocument
+ printlog "Insert a dummytext"
+ if wBlindtextEinfuegen = false then
+ Call hCloseDocument
+ exit sub
+ end if
+
+ printlog "Highlight first line in dummy text"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Shift End>"
+
+ printlog "Format / Bold"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ Fett.Click
+ Wait 500
+
+ printlog "Set cursor outside of bold formatted text"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down><Right>"
+
+ printlog "Select 'Clear Formatting' in Style-Listbox"
+ Kontext "Textobjectbar"
+ Vorlage.Select 1
+ Vorlage.TypeKeys "<Return>"
+ wait 500
+
+ printlog "Check that first line is still bold and has not been reset"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Right>"
+
+ Kontext "TextObjectbar"
+ if Fett.Getstate(2) = 0 then
+ Warnlog "Style 'Bold' has been reset!"
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tAssigningStyles6
+
+ Dim iStandard as integer
+
+ printlog "- Clear formatting: whole paragraph with hard formatting of some characters"
+ printlog " - 2. Cursor inside of hard formatted string"
+ printlog "Open a new writer document"
+ Call hNewDocument
+ printlog "Insert a dummytext"
+ if wBlindtextEinfuegen = false then
+ Call hCloseDocument
+ exit sub
+ end if
+
+ printlog "Highlight first line in dummy text"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Shift End>"
+
+ printlog "Format / Bold"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ Fett.Click
+ Wait 500
+
+ printlog "Point cursor to first highlighted word of bold formatted text"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Right>"
+
+ printlog "Select 'Format / Default Formatting' in Style-Listbox"
+ FormatDefaultWriter
+ wait 500
+
+ printlog "first highlighted word should be set to 'Standard'"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Right>"
+ Kontext "TextObjectbar"
+ if Fett.Getstate(2) = 1 then
+ Warnlog "Style 'Bold' has not been reset!"
+ end if
+
+ printlog "Check that rest of first line is still bold and has not been reset"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<End><Left>"
+
+ Kontext "TextObjectbar"
+ if Fett.Getstate(2) = 1 then
+ Warnlog "Style 'Bold' has not been reset!"
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tAssigningStyles7
+
+ printlog "More ..."
+ printlog "Open a new writer document"
+ Call hNewDocument
+
+ printlog "Select 'More...' in Style-Listbox"
+ Kontext "Textobjectbar"
+ Vorlage.Select Vorlage.GetItemCount
+ Vorlage.TypeKeys "<Return>"
+ wait 500
+
+ printlog "The Stylist should have been opened"
+ Kontext "Stylist"
+ if Not Stylist.Exists then
+ Warnlog "'Styles and Formatting' doesn't open if 'More...' is selected in Style-Listbox"
+ else
+ printlog "In Style group listbox 'Automatic' should be selected"
+ if Gruppenliste.GetSelIndex <> 5 then
+ Warnlog "Seems 'Automatic' is not selected per default in 'Styles and Formatting'"
+ end if
+ Stylist.Close
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tKeyboardShortcutToStyles()
+ dim sTempa as string
+ dim sTempb as string
+ dim sTempc as string
+ dim i as integer
+ dim x as integer
+
+ printlog "open new application document"
+ call hNewDocument()
+
+ printlog "get current default style from TextObjectBar"
+ kontext "TextObjectBar"
+ sTempa = Vorlage.getSelText
+ sTempc = sTempa
+ for i = 3 to 0 step -1
+ printlog "Perform the Keycombination <CTRL>+3 (2,1,0) and check, if Style in TextObjectBar changed"
+ printlog "- <Ctrl>+<"+i+"> -> Heading "+i+" style"
+ Call hTypeKeys("<Mod1 "+i+">")
+ sleep 1
+ kontext "TextObjectBar"
+ sTempb = sTempa
+ sTempa = Vorlage.getSelText
+ if (sTempa <> sTempb) then
+ printlog "OK: Heading changed: '" + sTempa + "'"
+ else
+ warnlog "Heading didn't change: '" + sTempa + "'"
+ end if
+ next i
+ kontext "DocumentWriter"
+ DocumentWriter.TypeKeys("<MOD1 SHIFT 0>")
+ sleep (2)
+ kontext "TextObjectBar"
+ sTempa = Vorlage.getSelText
+
+ printlog "should now be the default from the beginning"
+ if (uCase(gApplication)<>"HTML") then
+ if (sTempa = sTempc) then
+ printlog "OK: Heading changed to default: '" + sTempa + "'"
+ else
+ warnlog "Heading didn't change to default. Should have been: '" + sTempc + "' but was: '" + sTempa + "'"
+ end if
+ end if
+
+ printlog "close document"
+ call hCloseDocument()
+endcase
+
diff --git a/testautomation/writer/required/includes/w_001a_.inc b/testautomation/writer/required/includes/w_001a_.inc
index 1b33d5360606..75f3bb9cf7ca 100644
--- a/testautomation/writer/required/includes/w_001a_.inc
+++ b/testautomation/writer/required/includes/w_001a_.inc
@@ -1,480 +1,480 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: w_001a_.inc,v $
-'*
-'* $Revision: 1.2 $
-'*
-'* last change: $Author: vg $ $Date: 2008-08-18 12:40:41 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org. If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : helge.delfs@sun.com
-'*
-'* short description: Testcases for the Writer Required-test.
-'*
-'\***********************************************************************
-
-sub w_001a_
-
- printLog Chr(13) + "--------- File Menu (w_001a_.inc) ----------"
- gApplication = "WRITER"
-
- Call tFileProperties
-
- Call tFileTemplatesOrganize
- Call tFileTemplatesAddressbookSource
- Call tFileTemplatesSave
- Call tFileTemplatesEdit
-
- Call tFilePagePreview
- Call tPrintCommon()
- Call tPrintGeneral()
- Call tPrintApplication()
- Call tPrintLayout()
- Call tPrintOptions()
- Call tFilePrinterSetup
-
- 'Writer Master Document
- gApplication = "MASTERDOCUMENT"
- Call tMasterDocFilePagePreview
- gApplication = "WRITER"
-
-end sub
-
-'-----------------------------------------------------------
-
-testcase tFileProperties
- PrintLog "- File / Properties"
-
- printlog " Open new document"
- Call hNewDocument
-
- printlog " File / Properties"
- FileProperties
-
- WaitSlot(5000)
- Kontext
- try
- active.SetPage TabDokument
- catch
- Warnlog "Dialog 'FileProperties' not up! (Bug#99828)"
- goto endsub
- endcatch
-
- printlog " Switch to Tabpage 'General'"
- Kontext "TabDokument"
- Call DialogTest (TabDokument)
-
- printlog " Switch to Tabpage 'Description'"
- Kontext
- active.SetPage TabDokumentinfo
- Kontext "TabDokumentinfo"
- Call DialogTest (TabDokumentinfo)
-
-
- QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed."
- ' printlog " Switch to Tabpage 'User defined'"
- ' Kontext
- ' active.SetPage TabBenutzer
- ' Kontext "TabBenutzer"
- ' Call DialogTest ( TabBenutzer )
-
- ' Wait 500
-
- ' Infofelder.Click
- ' printlog " Click 'Infofields'"
- ' Kontext "InfonamenBearbeiten"
- ' printlog " Close upcoming dialog with 'Cancel'"
- ' Call DialogTest (InfonamenBearbeiten)
- ' InfonamenBearbeiten.Cancel
-
- printlog " Switch to Tabpage 'Internet'"
- Kontext
- active.SetPage TabInternet
- Kontext "TabInternet"
- Call DialogTest (TabInternet)
-
- printlog " Switch to Tabpage 'Statistics' and close dialog"
- Kontext
- active.SetPage TabStatistik
- Kontext "TabStatistik"
- Call DialogTest (TabStatistik)
- TabStatistik.Close
-
- Sleep 1
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesOrganize
- Dim i as integer
-
- PrintLog " Open new document."
- Call hNewDocument
- PrintLog " File / Templates / Organize"
- FileTemplatesOrganize
- Kontext "DVVerwalten"
- For i = 1 to 50
- if DVVerwalten.Exists then
- i = 51
- else
- Sleep 5
- end if
- next i
- if Not DVVerwalten.Exists then
- Warnlog "Dialog 'Template Management' not up !"
- Call hCloseDocument
- goto endsub
- end if
- wait 500
- PrintLog " Select first entry in left list of dialog 'Template Management' (should be 'My Templates')"
- ListeLinks.Select 1
- ListeLinks.TypeKeys "<Home>"
- Sleep 1
- Befehle.Click
- wait 500
- PrintLog " Select 'Commands -> Import Template'"
- Call hMenuSelectNr(3)
- Wait 500
- PrintLog " Close Filedialog."
- if gUseSysDlg = False then
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists then
- OeffnenDlg.Cancel
- else
- Warnlog "FileOpen dialog not up!"
- end if
- end if
-
- PrintLog " Select 'Commands -> Printer Settings"
- Kontext "DVVerwalten"
- Sleep 1
- Befehle.Click
- wait 500
- Call hMenuSelectNr(4)
-
- PrintLog " Cancel 'Printer-Setup' dialog"
- Kontext "DruckerEinrichten"
- if DruckerEinrichten.Exists then
- DruckerEinrichten.Cancel
- else
- Warnlog "Printersettings dialog is not up!"
- end if
-
- PrintLog " Select first entry in right list"
- Kontext "DVVerwalten"
- ListeRechts.Select 1
-
- PrintLog " Select pushbutton 'File..'"
- if WelcheDatei.IsEnabled then
- WelcheDatei.Click
- if gUseSysDlg = False then
- PrintLog " Cancel Filedialog"
- Kontext "OeffnenDlg"
- OeffnenDlg.Cancel
- end if
- end if
-
- PrintLog " Select pushbutton 'Address Book'"
- Kontext "DVVerwalten"
- AddressBook.Click
- Kontext "AddressbookSource"
- PrintLog " Cancel Dialog 'Address Book-Assignment'"
- if AddressbookSource.Exists then
- AddressbookSource.Cancel
- else
- Warnlog "the Dialog ' Address Book Source' wasnt up!"
- end if
-
- PrintLog " Close dialog"
- Kontext "DVVerwalten"
- DVVerwalten.Close
-
- PrintLog " Close active document."
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesAddressbookSource
-
- PrintLog " Open new document"
- Call hNewDocument
-
- PrintLog " File / Templates /Address Book Source..."
- UseBindings
- FileTemplatesAddressbookSource
-
- WaitSlot(2000)
- PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'"
- Kontext "AddressbookSource"
- if AddressbookSource.Exists then
- Call DialogTest (AddressbookSource)
- Administrate.Click
- Sleep 2
- PrintLog " Close 'Data Source Administration' with 'Cancel'"
- Kontext "DatabaseProperties"
- if Not DatabaseProperties.Exists then
- Kontext "AddressSourceAutopilot"
- if AddressSourceAutopilot.Exists then
- AddressSourceAutopilot.Cancel
- end if
- Kontext "AddressbookSource"
- AddressbookSource.Cancel
- else
- PrintLog " DatabaseProperties.SetPage TabConnection"
- Kontext "TabConnection"
- Call DialogTest ( TabConnection )
- Kontext "DatabaseProperties"
- DatabaseProperties.Close
- Kontext "AddressbookSource"
- PrintLog " Close dialog"
- AddressbookSource.Cancel
- end if
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesSave
- if gApplication = "MASTERDOCUMENT" then
- qaErrorLog " tFileTemplatesSave has been disabled in Masterdocument."
- goto endsub
- end if
- printlog "- File / Templates / Save"
- Call hNewDocument
- printlog " Open new document"
- FileTemplatesSave
- printlog " File / Templates / Save"
-
- Kontext "DokumentVorlagen"
- Call DialogTest ( DokumentVorlagen )
- printlog " On 'Templates' dialog click 'Organizer'"
-
- Verwalten.Click
- Kontext "DVVerwalten"
- DVVerwalten.Close
- printlog " Close dialog 'Template Management'"
-
- Kontext "DokumentVorlagen"
- DokumentVorlagen.Cancel
- printlog " Close 'Templates' dialog"
-
- printlog " Close active document"
- Call hCloseDocument
- gApplication = "WRITER"
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesEdit
- printlog "- File / Templates / Edit"
-
- printlog " Open new document"
- Call hNewDocument
- printlog " File / Templates / Edit"
- FileTemplatesEdit
-
- if gUseSysDlg = False then
- printlog " Cancel Filedialog"
- Kontext "OeffnenDlg"
- OeffnenDlg.Cancel
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFilePagePreview
- PrintLog "- File / Page Preview"
- Dim gehtnicht as boolean
- gehtnicht = FALSE
- printlog " Open new document"
- Select Case gApplication
- Case "WRITER"
- Call hNewDocument
-
- Case "MASTERDOCUMENT"
- Call hNewDocument
-
- Case "HTML"
- printlog "Not in Writer/Web!"
- goto endsub
- end select
-
- printlog " Enter some text in document"
- Call wTypeKeys("Just a small change!")
- printlog " File / Page Preview"
- FilePageView
- WaitSlot (1000)
- Kontext "DocPageViewWriter"
- if DocPageViewWriter.NotExists then
- Warnlog "Page Preview is not coming up!"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.No
- end if
- end if
- else
- if gehtnicht=FALSE then
- Kontext "PreviewObjectbar"
- if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
- printlog " Select 'Zoom 100%' in toolbar"
- try
- Massstab.Select 4
- catch
- Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
- endcatch
-
- printlog " Click 'Print Page Preview' in toolbar"
- Kontext "PreviewObjectbar"
- DruckenSeitenansicht.Click
- Kontext "Active"
- if Active.Exists then
- QAErrorlog "No default printer!"
- Active.ok
- Sleep 1
- Kontext "Printing"
- if Printing.Exists then Printing.Cancel
- else
- printlog " Close 'Print' dialog with cancel"
- Kontext "Printing"
- Printing.Cancel
- end if
-
- printlog " Close Page Preview with button 'Close Preview' in toolbar"
- Kontext "PreviewObjectbar"
- SeitenansichtSchliessen.Click
- else
- Warnlog "Objectbar not addressable!"
- end if
- end if
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFilePrinterSetup
- PrintLog " Open new document"
- Call hNewDocument
-
- PrintLog " File / Printer Settings"
- FilePrintersettings
- Kontext "Active"
- WaitSlot(1000)
- if Active.Exists then
- if Active.GetRT = 304 then
- QAErrorLog "No Default Printer!"
- Active.Ok
- Sleep 2
- Kontext "DruckerEinrichten"
- if DruckerEinrichten.Exists then
- Call DialogTest ( DruckerEinrichten )
- DruckerEinrichten.Cancel
- end if
- end if
- else
- Kontext "DruckerEinrichten"
- Call DialogTest ( DruckerEinrichten )
- DruckerEinrichten.Cancel
- PrintLog " Cancel 'Printer Setup' dialog"
- end if
- PrintLog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tMasterDocFilePagePreview
- PrintLog "- File / Page Preview"
- Dim gehtnicht as boolean
- gehtnicht = FALSE
- gApplication = "MASTERDOCUMENT"
- printlog " Open new document"
- Call hNewDocument
-
- printlog " Enter some text in document"
- Call wTypeKeys("Just a small change!")
- printlog " File / Page Preview"
- FilePageView
- WaitSlot (1000)
- Kontext "DocPageViewWriter"
- if DocPageViewWriter.NotExists then
- Warnlog "Page Preview is not coming up!"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.No
- end if
- end if
- else
- if gehtnicht=FALSE then
- Kontext "PreviewObjectbar"
- if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
- printlog " Select 'Zoom 100%' in toolbar"
- try
- Massstab.Select 4
- catch
- Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
- endcatch
-
- printlog " Click 'Print Page Preview' in toolbar"
- Kontext "PreviewObjectbar"
- DruckenSeitenansicht.Click
- Kontext "Active"
- if Active.Exists then
- QAErrorlog "No default printer!"
- Active.ok
- Sleep 1
- Kontext "Printing"
- if Printing.Exists then Printing.Cancel
- else
- printlog " Close 'Print' dialog with cancel"
- Kontext "Printing"
- Printing.Cancel
- end if
-
- printlog " Close Page Preview with button 'Close Preview' in toolbar"
- Kontext "PreviewObjectbar"
- SeitenansichtSchliessen.Click
- else
- Warnlog "Objectbar not addressable!"
- end if
- end if
-
- printlog " Close active document"
- Call hCloseDocument
- gApplication = "WRITER"
-endcase
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: w_001a_.inc,v $
+'*
+'* $Revision: 1.2 $
+'*
+'* last change: $Author: vg $ $Date: 2008-08-18 12:40:41 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org. If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description: Testcases for the Writer Required-test.
+'*
+'\***********************************************************************
+
+sub w_001a_
+
+ printLog Chr(13) + "--------- File Menu (w_001a_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tFileProperties
+
+ Call tFileTemplatesOrganize
+ Call tFileTemplatesAddressbookSource
+ Call tFileTemplatesSave
+ Call tFileTemplatesEdit
+
+ Call tFilePagePreview
+ Call tPrintCommon()
+ Call tPrintGeneral()
+ Call tPrintApplication()
+ Call tPrintLayout()
+ Call tPrintOptions()
+ Call tFilePrinterSetup
+
+ 'Writer Master Document
+ gApplication = "MASTERDOCUMENT"
+ Call tMasterDocFilePagePreview
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tFileProperties
+ PrintLog "- File / Properties"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " File / Properties"
+ FileProperties
+
+ WaitSlot(5000)
+ Kontext
+ try
+ active.SetPage TabDokument
+ catch
+ Warnlog "Dialog 'FileProperties' not up! (Bug#99828)"
+ goto endsub
+ endcatch
+
+ printlog " Switch to Tabpage 'General'"
+ Kontext "TabDokument"
+ Call DialogTest (TabDokument)
+
+ printlog " Switch to Tabpage 'Description'"
+ Kontext
+ active.SetPage TabDokumentinfo
+ Kontext "TabDokumentinfo"
+ Call DialogTest (TabDokumentinfo)
+
+
+ QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed."
+ ' printlog " Switch to Tabpage 'User defined'"
+ ' Kontext
+ ' active.SetPage TabBenutzer
+ ' Kontext "TabBenutzer"
+ ' Call DialogTest ( TabBenutzer )
+
+ ' Wait 500
+
+ ' Infofelder.Click
+ ' printlog " Click 'Infofields'"
+ ' Kontext "InfonamenBearbeiten"
+ ' printlog " Close upcoming dialog with 'Cancel'"
+ ' Call DialogTest (InfonamenBearbeiten)
+ ' InfonamenBearbeiten.Cancel
+
+ printlog " Switch to Tabpage 'Internet'"
+ Kontext
+ active.SetPage TabInternet
+ Kontext "TabInternet"
+ Call DialogTest (TabInternet)
+
+ printlog " Switch to Tabpage 'Statistics' and close dialog"
+ Kontext
+ active.SetPage TabStatistik
+ Kontext "TabStatistik"
+ Call DialogTest (TabStatistik)
+ TabStatistik.Close
+
+ Sleep 1
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesOrganize
+ Dim i as integer
+
+ PrintLog " Open new document."
+ Call hNewDocument
+ PrintLog " File / Templates / Organize"
+ FileTemplatesOrganize
+ Kontext "DVVerwalten"
+ For i = 1 to 50
+ if DVVerwalten.Exists then
+ i = 51
+ else
+ Sleep 5
+ end if
+ next i
+ if Not DVVerwalten.Exists then
+ Warnlog "Dialog 'Template Management' not up !"
+ Call hCloseDocument
+ goto endsub
+ end if
+ wait 500
+ PrintLog " Select first entry in left list of dialog 'Template Management' (should be 'My Templates')"
+ ListeLinks.Select 1
+ ListeLinks.TypeKeys "<Home>"
+ Sleep 1
+ Befehle.Click
+ wait 500
+ PrintLog " Select 'Commands -> Import Template'"
+ Call hMenuSelectNr(3)
+ Wait 500
+ PrintLog " Close Filedialog."
+ if gUseSysDlg = False then
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "FileOpen dialog not up!"
+ end if
+ end if
+
+ PrintLog " Select 'Commands -> Printer Settings"
+ Kontext "DVVerwalten"
+ Sleep 1
+ Befehle.Click
+ wait 500
+ Call hMenuSelectNr(4)
+
+ PrintLog " Cancel 'Printer-Setup' dialog"
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists then
+ DruckerEinrichten.Cancel
+ else
+ Warnlog "Printersettings dialog is not up!"
+ end if
+
+ PrintLog " Select first entry in right list"
+ Kontext "DVVerwalten"
+ ListeRechts.Select 1
+
+ PrintLog " Select pushbutton 'File..'"
+ if WelcheDatei.IsEnabled then
+ WelcheDatei.Click
+ if gUseSysDlg = False then
+ PrintLog " Cancel Filedialog"
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+ end if
+
+ PrintLog " Select pushbutton 'Address Book'"
+ Kontext "DVVerwalten"
+ AddressBook.Click
+ Kontext "AddressbookSource"
+ PrintLog " Cancel Dialog 'Address Book-Assignment'"
+ if AddressbookSource.Exists then
+ AddressbookSource.Cancel
+ else
+ Warnlog "the Dialog ' Address Book Source' wasnt up!"
+ end if
+
+ PrintLog " Close dialog"
+ Kontext "DVVerwalten"
+ DVVerwalten.Close
+
+ PrintLog " Close active document."
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesAddressbookSource
+
+ PrintLog " Open new document"
+ Call hNewDocument
+
+ PrintLog " File / Templates /Address Book Source..."
+ UseBindings
+ FileTemplatesAddressbookSource
+
+ WaitSlot(2000)
+ PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'"
+ Kontext "AddressbookSource"
+ if AddressbookSource.Exists then
+ Call DialogTest (AddressbookSource)
+ Administrate.Click
+ Sleep 2
+ PrintLog " Close 'Data Source Administration' with 'Cancel'"
+ Kontext "DatabaseProperties"
+ if Not DatabaseProperties.Exists then
+ Kontext "AddressSourceAutopilot"
+ if AddressSourceAutopilot.Exists then
+ AddressSourceAutopilot.Cancel
+ end if
+ Kontext "AddressbookSource"
+ AddressbookSource.Cancel
+ else
+ PrintLog " DatabaseProperties.SetPage TabConnection"
+ Kontext "TabConnection"
+ Call DialogTest ( TabConnection )
+ Kontext "DatabaseProperties"
+ DatabaseProperties.Close
+ Kontext "AddressbookSource"
+ PrintLog " Close dialog"
+ AddressbookSource.Cancel
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesSave
+ if gApplication = "MASTERDOCUMENT" then
+ qaErrorLog " tFileTemplatesSave has been disabled in Masterdocument."
+ goto endsub
+ end if
+ printlog "- File / Templates / Save"
+ Call hNewDocument
+ printlog " Open new document"
+ FileTemplatesSave
+ printlog " File / Templates / Save"
+
+ Kontext "DokumentVorlagen"
+ Call DialogTest ( DokumentVorlagen )
+ printlog " On 'Templates' dialog click 'Organizer'"
+
+ Verwalten.Click
+ Kontext "DVVerwalten"
+ DVVerwalten.Close
+ printlog " Close dialog 'Template Management'"
+
+ Kontext "DokumentVorlagen"
+ DokumentVorlagen.Cancel
+ printlog " Close 'Templates' dialog"
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesEdit
+ printlog "- File / Templates / Edit"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " File / Templates / Edit"
+ FileTemplatesEdit
+
+ if gUseSysDlg = False then
+ printlog " Cancel Filedialog"
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFilePagePreview
+ PrintLog "- File / Page Preview"
+ Dim gehtnicht as boolean
+ gehtnicht = FALSE
+ printlog " Open new document"
+ Select Case gApplication
+ Case "WRITER"
+ Call hNewDocument
+
+ Case "MASTERDOCUMENT"
+ Call hNewDocument
+
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ printlog " Enter some text in document"
+ Call wTypeKeys("Just a small change!")
+ printlog " File / Page Preview"
+ FilePageView
+ WaitSlot (1000)
+ Kontext "DocPageViewWriter"
+ if DocPageViewWriter.NotExists then
+ Warnlog "Page Preview is not coming up!"
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
+ end if
+ else
+ if gehtnicht=FALSE then
+ Kontext "PreviewObjectbar"
+ if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
+ printlog " Select 'Zoom 100%' in toolbar"
+ try
+ Massstab.Select 4
+ catch
+ Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
+ endcatch
+
+ printlog " Click 'Print Page Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ DruckenSeitenansicht.Click
+ Kontext "Active"
+ if Active.Exists then
+ QAErrorlog "No default printer!"
+ Active.ok
+ Sleep 1
+ Kontext "Printing"
+ if Printing.Exists then Printing.Cancel
+ else
+ printlog " Close 'Print' dialog with cancel"
+ Kontext "Printing"
+ Printing.Cancel
+ end if
+
+ printlog " Close Page Preview with button 'Close Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ SeitenansichtSchliessen.Click
+ else
+ Warnlog "Objectbar not addressable!"
+ end if
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFilePrinterSetup
+ PrintLog " Open new document"
+ Call hNewDocument
+
+ PrintLog " File / Printer Settings"
+ FilePrintersettings
+ Kontext "Active"
+ WaitSlot(1000)
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorLog "No Default Printer!"
+ Active.Ok
+ Sleep 2
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists then
+ Call DialogTest ( DruckerEinrichten )
+ DruckerEinrichten.Cancel
+ end if
+ end if
+ else
+ Kontext "DruckerEinrichten"
+ Call DialogTest ( DruckerEinrichten )
+ DruckerEinrichten.Cancel
+ PrintLog " Cancel 'Printer Setup' dialog"
+ end if
+ PrintLog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFilePagePreview
+ PrintLog "- File / Page Preview"
+ Dim gehtnicht as boolean
+ gehtnicht = FALSE
+ gApplication = "MASTERDOCUMENT"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Enter some text in document"
+ Call wTypeKeys("Just a small change!")
+ printlog " File / Page Preview"
+ FilePageView
+ WaitSlot (1000)
+ Kontext "DocPageViewWriter"
+ if DocPageViewWriter.NotExists then
+ Warnlog "Page Preview is not coming up!"
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
+ end if
+ else
+ if gehtnicht=FALSE then
+ Kontext "PreviewObjectbar"
+ if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
+ printlog " Select 'Zoom 100%' in toolbar"
+ try
+ Massstab.Select 4
+ catch
+ Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
+ endcatch
+
+ printlog " Click 'Print Page Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ DruckenSeitenansicht.Click
+ Kontext "Active"
+ if Active.Exists then
+ QAErrorlog "No default printer!"
+ Active.ok
+ Sleep 1
+ Kontext "Printing"
+ if Printing.Exists then Printing.Cancel
+ else
+ printlog " Close 'Print' dialog with cancel"
+ Kontext "Printing"
+ Printing.Cancel
+ end if
+
+ printlog " Close Page Preview with button 'Close Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ SeitenansichtSchliessen.Click
+ else
+ Warnlog "Objectbar not addressable!"
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase