1. mst
  2. ooo340

Commits

Ivo Hinkelmann  committed b7c5ef7 Merge

CWS-TOOLING: integrate CWS automation007

  • Participants
  • Parent commits cb2d2b1, f06e859
  • Branches default

Comments (0)

Files changed (93)

File testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc

View file
  • Ignore whitespace
-'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

File testautomation/chart2/required/ch2_updt_calc.bas

View file
  • Ignore whitespace
-'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_updt_calc.bas,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $
-'*
-'* 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 : Resource Test for all chart specific menues
-'*
-'\************************************************************************************************
-
-sub main
-    use "chart2\tools\ch_tools_common.inc"
-    use "chart2\tools\ch_tools_chart_type.inc"
-    use "chart2\tools\ch_tools_titles.inc"
-    use "chart2\tools\ch_tools_axes.inc"
-    use "chart2\tools\ch_tools_grids.inc"
-    use "chart2\tools\ch_tools_legend.inc"
-    use "chart2\tools\ch_tools_data_labels.inc"
-    use "chart2\tools\ch_tools_statistics.inc"
-    use "chart2\tools\ch_tools_tab_pages.inc"
-    use "chart2\tools\ch_tools_select.inc"
-    use "chart2\required\includes\ch2_wizard.inc"
-    use "chart2\required\includes\ch2_file.inc"
-    use "chart2\required\includes\ch2_view.inc"
-    use "chart2\required\includes\ch2_insert_ctl.inc"
-    use "chart2\required\includes\ch2_insert.inc"
-    use "chart2\required\includes\ch2_format.inc"
-    use "chart2\required\includes\ch2_format1.inc"
-    use "chart2\required\includes\ch2_window.inc"
-    use "chart2\required\includes\ch2_toolbars.inc"
-    use "chart2\required\includes\ch2_menu.inc"
-    use "chart2\required\includes\ch2_ole.inc"
-
-    Call hStatusIn("Chart2", "ch2_updt_calc.bas")
-
-    printlog "----------------------------------------"
-    printlog "C h a r t 2   i n  S p r e a d s h e e t"
-    printlog "           U p d a t e t e s t"
-    printlog "----------------------------------------"
-    printLog Chr(13) + "-----------  Chart2 Wizard  ------------"
-    Call tCreateNewChart
-    printLog Chr(13) + "-----------  Chart2 Menu  ------------"
-    call tMainMenu        
-    printLog Chr(13) + "----------  Chart2 File Menu  ----------"
-    call tFileClose
-    call tFileSaveAsOTS
-    call tFileSaveAsSXC
-    call tFileSaveAsSTC
-    call tFileSaveAsXLS
-    call tFileSaveAsXLT
-    call tFileSaveAsSDC
-    call tFileSaveAsVOR
-    call tFileReload                
-    printLog Chr(13) + "----------  Chart2 View Menu -----------"
-    Call tViewToolbars
-    Call tViewToolbarsCustomize
-    Call tViewFullScreen              
-    printLog Chr(13) + "--------  Chart2 Insert Menu  ----------"
-    call tInsertTitle
-    call tInsertAxes
-    call tInsertGrids
-    call tInsertLegend
-    call tInsertDataLabels
-    call tInsertTrendLines
-    call tInsertMeanValueLines
-    call tInsertYErrorBars
-    call tInsertSpecialCharacter
-    printLog Chr(13) + "-------- Chart2 CTL Features  ----------"
-    call tTitleTextDirection
-    call tLegendTextDirection
-    call tXAxisTextDirection
-    call tDataSeriesTextDirection
-    call tEquationTextDirection
-    call tDataPointTextDirection
-    printlog Chr(13) + "---------  Chart2 Format Menu  ---------"
-    call tFormatObjectProperties
-    call tFormatObjectPropertiesPieChart
-    call tFormatPositonAndSize
-    call tFormatArrangement
-    Call tFormatTitleMaintitle
-    Call tFormatTitleSubtitle
-    Call tFormatTitleXAxistitle
-    Call tFormatTitleYAxistitle
-    Call tFormatTitleZAxistitle
-    Call tFormatTitleAllTitles
-    Call tFormatAxisXAxis
-    Call tFormatAxisYAxis
-    Call tFormatAxisZAxis
-    Call tFormatAxisSecondaryXAxis
-    Call tFormatAxisSecondaryYAxis
-    Call tFormatAxisAllAxes
-    Call tFormatXAxisMainGrid
-    Call tFormatYAxisMainGrid
-    Call tFormatZAxisMainGrid
-    call tFormatXAxisMinorGrid
-    Call tFormatYAxisMinorGrid
-    Call tFormatAllAxesGrids
-    Call tFormatLegend
-    Call tFormatChartWall
-    Call tFormatChartFloor
-    Call tFormatChartArea
-    Call tFormatChartType
-    call tFormatDataRanges
-    Call tFormat3DView                
-    printlog Chr(13) + "---------  Chart2 Window Menu  ---------"
-    Call tWindowNewWindowAndClose
-    printLog Chr(13) + "----------  Chart2 Toolbars  -----------"      
-    Call tdummyToolbar
-    printLog Chr(13) + "--------- Chart2 as OLE object ---------"
-    Call tChartOLE("WRITER")
-    Call tChartOLE("CALC")
-    Call tChartOLE("IMPRESS")
-    Call tChartOLE("DRAW")
-    Call tChartOLE("HTML")
-    Call tChartOLE("MASTERDOCUMENT")       
-    Call hStatusOut
-    
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub LoadIncludeFiles             
-    use "global\system\includes\master.inc"
-    use "global\system\includes\gvariabl.inc"
-    use "global\tools\includes\optional\t_set_standard_controls.inc"
-    Call GetUseFiles 
-    gApplication = "CALC"
-end sub
-
+'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_updt_calc.bas,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $
+'*
+'* 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 : Resource Test for all chart specific menues
+'*
+'\************************************************************************************************
+
+sub main
+    use "chart2\tools\ch_tools_common.inc"
+    use "chart2\tools\ch_tools_chart_type.inc"
+    use "chart2\tools\ch_tools_titles.inc"
+    use "chart2\tools\ch_tools_axes.inc"
+    use "chart2\tools\ch_tools_grids.inc"
+    use "chart2\tools\ch_tools_legend.inc"
+    use "chart2\tools\ch_tools_data_labels.inc"
+    use "chart2\tools\ch_tools_statistics.inc"
+    use "chart2\tools\ch_tools_tab_pages.inc"
+    use "chart2\tools\ch_tools_select.inc"
+    use "chart2\required\includes\ch2_wizard.inc"
+    use "chart2\required\includes\ch2_file.inc"
+    use "chart2\required\includes\ch2_view.inc"
+    use "chart2\required\includes\ch2_insert_ctl.inc"
+    use "chart2\required\includes\ch2_insert.inc"
+    use "chart2\required\includes\ch2_format.inc"
+    use "chart2\required\includes\ch2_format1.inc"
+    use "chart2\required\includes\ch2_window.inc"
+    use "chart2\required\includes\ch2_toolbars.inc"
+    use "chart2\required\includes\ch2_menu.inc"
+    use "chart2\required\includes\ch2_ole.inc"
+
+    Call hStatusIn("Chart2", "ch2_updt_calc.bas")
+
+    printlog "----------------------------------------"
+    printlog "C h a r t 2   i n  S p r e a d s h e e t"
+    printlog "           U p d a t e t e s t"
+    printlog "----------------------------------------"
+    printLog Chr(13) + "-----------  Chart2 Wizard  ------------"
+    Call tCreateNewChart
+    printLog Chr(13) + "-----------  Chart2 Menu  ------------"
+    call tMainMenu        
+    printLog Chr(13) + "----------  Chart2 File Menu  ----------"
+    call tFileClose
+    call tFileSaveAsOTS
+    call tFileSaveAsSXC
+    call tFileSaveAsSTC
+    call tFileSaveAsXLS
+    call tFileSaveAsXLT
+    call tFileSaveAsSDC
+    call tFileSaveAsVOR
+    call tFileReload                
+    printLog Chr(13) + "----------  Chart2 View Menu -----------"
+    Call tViewToolbars
+    Call tViewToolbarsCustomize
+    Call tViewFullScreen              
+    printLog Chr(13) + "--------  Chart2 Insert Menu  ----------"
+    call tInsertTitle
+    call tInsertAxes
+    call tInsertGrids
+    call tInsertLegend
+    call tInsertDataLabels
+    call tInsertTrendLines
+    call tInsertMeanValueLines
+    call tInsertYErrorBars
+    call tInsertSpecialCharacter
+    printLog Chr(13) + "-------- Chart2 CTL Features  ----------"
+    call tTitleTextDirection
+    call tLegendTextDirection
+    call tXAxisTextDirection
+    call tDataSeriesTextDirection
+    call tEquationTextDirection
+    call tDataPointTextDirection
+    printlog Chr(13) + "---------  Chart2 Format Menu  ---------"
+    call tFormatObjectProperties
+    call tFormatObjectPropertiesPieChart
+    call tFormatPositonAndSize
+    call tFormatArrangement
+    Call tFormatTitleMaintitle
+    Call tFormatTitleSubtitle
+    Call tFormatTitleXAxistitle
+    Call tFormatTitleYAxistitle
+    Call tFormatTitleZAxistitle
+    Call tFormatTitleAllTitles
+    Call tFormatAxisXAxis
+    Call tFormatAxisYAxis
+    Call tFormatAxisZAxis
+    Call tFormatAxisSecondaryXAxis
+    Call tFormatAxisSecondaryYAxis
+    Call tFormatAxisAllAxes
+    Call tFormatXAxisMainGrid
+    Call tFormatYAxisMainGrid
+    Call tFormatZAxisMainGrid
+    call tFormatXAxisMinorGrid
+    Call tFormatYAxisMinorGrid
+    Call tFormatAllAxesGrids
+    Call tFormatLegend
+    Call tFormatChartWall
+    Call tFormatChartFloor
+    Call tFormatChartArea
+    Call tFormatChartType
+    call tFormatDataRanges
+    Call tFormat3DView                
+    printlog Chr(13) + "---------  Chart2 Window Menu  ---------"
+    Call tWindowNewWindowAndClose
+    printLog Chr(13) + "----------  Chart2 Toolbars  -----------"      
+    Call tdummyToolbar
+    printLog Chr(13) + "--------- Chart2 as OLE object ---------"
+    Call tChartOLE("WRITER")
+    Call tChartOLE("CALC")
+    Call tChartOLE("IMPRESS")
+    Call tChartOLE("DRAW")
+    Call tChartOLE("HTML")
+    Call tChartOLE("MASTERDOCUMENT")       
+    Call hStatusOut
+    
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub LoadIncludeFiles             
+    use "global\system\includes\master.inc"
+    use "global\system\includes\gvariabl.inc"
+    use "global\tools\includes\optional\t_set_standard_controls.inc"
+    Call GetUseFiles 
+    gApplication = "CALC"
+end sub
+

File testautomation/chart2/required/includes/ch2_format.inc

  • Ignore whitespace
File contents unchanged.

File testautomation/dbaccess/optional/includes/db_Mozilla.inc

View file
  • Ignore whitespace
-'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

File testautomation/dbaccess/optional/includes/misc_Macros.inc

View file
  • Ignore whitespace
-'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    

File testautomation/extensions/optional/input/options/readme.txt

View file
  • Ignore whitespace
-Important: The hander component extensionoptions.jar in the extensions may not 
-contain exactly the same sources as the one build in the handler directory. To
-make sure that debugging works build the handler directory and put the 
-extensionoptions.jar into the extension.
-
-
-
-leaf1.oxt: Defines a leaf under the node WriterNode
-================================================================================
-
-leaf2.oxt: Defines a leaf under a node that has a name which requires special 
-"xml encoding". The name is "My Writer's & Settings". The node is not assigned 
-to a Module and the Node/AllModules property is not true. This is a typical 
-scenario when a Node had been added to an existing Module and later the Module 
-was removed. This is a situation which actually should not occur. In this case 
-DO NOT show the Node in the OOo's options dialog, because it shows only nodes 
-for a particular module and in this case the Module for the Node is unknown.
-In the Extension Manager's 
-options dialog this Node can be shown because the Module is irrelevant.
-See also nodes5.oxt.
-================================================================================
-
-leaves1.oxt: multiple ordered leaves under available nodes. The leaves Lables are 
-localized for en-US and de. The following leaves should appear:
-
-Writer:
--leaves1 Writer 1 en-US
--leaves1 Writer 2 en-US
--leaves1 Writer 3 en-US
-
-Calc:
--leaves1 Calc 3 en-US
--leaves1 Calc 3 en-US
--leaves1 Calc 3 en-US
-
-Draw:
--leaves1 Draw 3 en-US
--leaves1 Draw 3 en-US
--leaves1 Draw 3 en-US
-
-If a german office is used then the strings contain "de" instead of "en-US".
-================================================================================
-
-leaves2.oxt: Same as leaves1.oxt. Use together with leaves1.oxt to test the 
-grouping of leaves.
-================================================================================
-
-leaves3.oxt: Same as leaves1.oxt, but the leaves are not ordered.
-================================================================================
-
-nodes1.oxt: Defines one node which has AllModules set and which has 
-no children. Therefore this node should not be displayed.
-================================================================================
-
-nodes2.oxt: Defines 3 nodes which use AllModules and which form an 
-ordered group. Every node defines also 3 nodes which have a determined order.
-
--nodes2 node 1 en-US
-     -nodes2 node 1 leaf 1 en-US
-     -nodes2 node 1 leaf 2 en-US
-     -nodes2 node 1 leaf 3 en-US
-
--nodes2 node 2 en-US
-     -nodes2 node 2 leaf 1 en-US
-     -nodes2 node 2 leaf 2 en-US
-     -nodes2 node 2 leaf 3 en-US
-
--nodes2 node 3 en-US
-     -nodes2 node 3 leaf 1 en-US
-     -nodes2 node 3 leaf 2 en-US
-     -nodes2 node 3 leaf 3 en-US
-
-================================================================================
-
-nodes3.oxt: Defines 3 nodes which are placed under different existing Modules. 
-The nodes and there leaves are ordered.
-
-Context Writer:
-- nodes3 node 1
-        nodes3 node 1 leaf 1 en-US
-	nodes3 node 1 leaf 2 en-US
-	nodes3 node 1 leaf 3 en-US
-
-- nodes3 node 2
-        nodes3 node 2 leaf 1 en-US
-	nodes3 node 2 leaf 2 en-US
-	nodes3 node 2 leaf 3 en-US
-
-- nodes3 node 3
-        nodes3 node 3 leaf 1 en-US
-	nodes3 node 3 leaf 2 en-US
-	nodes3 node 3 leaf 3 en-US
-
-Context Calc:
-- nodes3 node 1
-        nodes3 node 1 leaf 1 en-US
-	nodes3 node 1 leaf 2 en-US
-	nodes3 node 1 leaf 3 en-US
-
-- nodes3 node 3
-        nodes3 node 3 leaf 1 en-US
-	nodes3 node 3 leaf 2 en-US
-	nodes3 node 3 leaf 3 en-US
-
-Context Draw:
-- nodes3 node 2
-        nodes3 node 2 leaf 1 en-US
-	nodes3 node 2 leaf 2 en-US
-	nodes3 node 2 leaf 3 en-US
-
-================================================================================
-
-nodes4.oxt: Same as nodes3.oxt. Use together with nodes3.txt to test the 
-grouping of nodes.
-================================================================================
-
-nodes5.oxt: Defines a node which in turn defines 3 leaves. The Node
-is not assigned to a Module and the AllModule property is false (which is the 
-default).This may happen when a node 
-had been added to an already existing Module and then this Module was removed. For 
-example, an extension adds a node to the "Writer  Module" and the 
-next office update removes the "Writer Module" (which is rather inconceivable). 
-Then the node and its leaves MUST NOT be displayed in OOo's options dialog, 
-because the Module is not known. However, it can be displayed in the 
-options dialog of the Extension Manager. See also the description for leaf2.oxt.
-================================================================================
-
-modules1.oxt: Defines two Modules and three Nodes. The Nodes may not 
-be displayed in OOo's options dialog because there is currently no application 
-which uses this Module. However the Nodes are displayed in the options dialog 
-of the Extension Manager.
-There are three Nodes defined. The relation ship is this:
-
--module1
-	-node 1
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
- 	-node 2
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-	-node 3
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-
--module2
-	-node1
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-	-node3
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-
-The options dialog of the Extension Manager shall display only three nodes:
-
-	-node 1
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
- 	-node 2
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-	-node 3
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-
-or 
-
-	-node 1
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
- 	-node 3
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-	-node 2
-	      -leaf 1
-	      -leaf 2
-	      -leaf 3
-
-Since the order of Module|s is not defined, the dialog may display first the 
-Nodes from module2 and then from module1. If a node is already displayed then 
-it is not shown again.
-
-================================================================================
-
-modules2.oxt: Same as modules1, except that the order of nodes and leaves 
-is not defined.
+Important: The hander component extensionoptions.jar in the extensions may not 
+contain exactly the same sources as the one build in the handler directory. To
+make sure that debugging works build the handler directory and put the 
+extensionoptions.jar into the extension.
+
+
+
+leaf1.oxt: Defines a leaf under the node WriterNode
+================================================================================
+
+leaf2.oxt: Defines a leaf under a node that has a name which requires special 
+"xml encoding". The name is "My Writer's & Settings". The node is not assigned 
+to a Module and the Node/AllModules property is not true. This is a typical 
+scenario when a Node had been added to an existing Module and later the Module 
+was removed. This is a situation which actually should not occur. In this case 
+DO NOT show the Node in the OOo's options dialog, because it shows only nodes 
+for a particular module and in this case the Module for the Node is unknown.
+In the Extension Manager's 
+options dialog this Node can be shown because the Module is irrelevant.
+See also nodes5.oxt.
+================================================================================
+
+leaves1.oxt: multiple ordered leaves under available nodes. The leaves Lables are 
+localized for en-US and de. The following leaves should appear:
+
+Writer:
+-leaves1 Writer 1 en-US
+-leaves1 Writer 2 en-US
+-leaves1 Writer 3 en-US
+
+Calc:
+-leaves1 Calc 3 en-US
+-leaves1 Calc 3 en-US
+-leaves1 Calc 3 en-US
+
+Draw:
+-leaves1 Draw 3 en-US
+-leaves1 Draw 3 en-US
+-leaves1 Draw 3 en-US
+
+If a german office is used then the strings contain "de" instead of "en-US".
+================================================================================
+
+leaves2.oxt: Same as leaves1.oxt. Use together with leaves1.oxt to test the 
+grouping of leaves.
+================================================================================
+
+leaves3.oxt: Same as leaves1.oxt, but the leaves are not ordered.
+================================================================================
+
+nodes1.oxt: Defines one node which has AllModules set and which has 
+no children. Therefore this node should not be displayed.
+================================================================================
+
+nodes2.oxt: Defines 3 nodes which use AllModules and which form an 
+ordered group. Every node defines also 3 nodes which have a determined order.
+
+-nodes2 node 1 en-US
+     -nodes2 node 1 leaf 1 en-US
+     -nodes2 node 1 leaf 2 en-US
+     -nodes2 node 1 leaf 3 en-US
+
+-nodes2 node 2 en-US
+     -nodes2 node 2 leaf 1 en-US
+     -nodes2 node 2 leaf 2 en-US
+     -nodes2 node 2 leaf 3 en-US
+
+-nodes2 node 3 en-US
+     -nodes2 node 3 leaf 1 en-US
+     -nodes2 node 3 leaf 2 en-US
+     -nodes2 node 3 leaf 3 en-US
+
+================================================================================
+
+nodes3.oxt: Defines 3 nodes which are placed under different existing Modules. 
+The nodes and there leaves are ordered.
+
+Context Writer:
+- nodes3 node 1
+        nodes3 node 1 leaf 1 en-US
+	nodes3 node 1 leaf 2 en-US
+	nodes3 node 1 leaf 3 en-US
+
+- nodes3 node 2
+        nodes3 node 2 leaf 1 en-US
+	nodes3 node 2 leaf 2 en-US
+	nodes3 node 2 leaf 3 en-US
+
+- nodes3 node 3
+        nodes3 node 3 leaf 1 en-US
+	nodes3 node 3 leaf 2 en-US
+	nodes3 node 3 leaf 3 en-US
+
+Context Calc:
+- nodes3 node 1
+        nodes3 node 1 leaf 1 en-US
+	nodes3 node 1 leaf 2 en-US
+	nodes3 node 1 leaf 3 en-US
+
+- nodes3 node 3
+        nodes3 node 3 leaf 1 en-US
+	nodes3 node 3 leaf 2 en-US
+	nodes3 node 3 leaf 3 en-US
+
+Context Draw:
+- nodes3 node 2
+        nodes3 node 2 leaf 1 en-US
+	nodes3 node 2 leaf 2 en-US
+	nodes3 node 2 leaf 3 en-US
+
+================================================================================
+
+nodes4.oxt: Same as nodes3.oxt. Use together with nodes3.txt to test the 
+grouping of nodes.
+================================================================================
+
+nodes5.oxt: Defines a node which in turn defines 3 leaves. The Node
+is not assigned to a Module and the AllModule property is false (which is the 
+default).This may happen when a node 
+had been added to an already existing Module and then this Module was removed. For 
+example, an extension adds a node to the "Writer  Module" and the 
+next office update removes the "Writer Module" (which is rather inconceivable). 
+Then the node and its leaves MUST NOT be displayed in OOo's options dialog, 
+because the Module is not known. However, it can be displayed in the 
+options dialog of the Extension Manager. See also the description for leaf2.oxt.
+================================================================================
+
+modules1.oxt: Defines two Modules and three Nodes. The Nodes may not 
+be displayed in OOo's options dialog because there is currently no application 
+which uses this Module. However the Nodes are displayed in the options dialog 
+of the Extension Manager.
+There are three Nodes defined. The relation ship is this:
+
+-module1
+	-node 1
+	      -leaf 1
+	      -leaf 2
+	      -leaf 3
+ 	-node 2
+	      -leaf 1
+	      -leaf 2
+	      -leaf 3
+	-node 3
+	      -leaf 1
+	      -leaf 2
+	      -leaf 3
+
+-module2
+	-node1
+	      -leaf 1
+	      -leaf 2
+	      -leaf 3
+	-node3
+	      -leaf 1
+	      -leaf 2
+	      -leaf 3
+
+The options dialog of the Extension Manager shall display only three nodes:
+
+	-node 1