You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/01/13 23:00:41 UTC
svn commit: r1231327 [2/3] - in /incubator/ooo/trunk/main/testautomation:
global/required/includes/ global/tools/includes/optional/
global/tools/includes/required/ spreadsheet/optional/includes/printscale/
spreadsheet/tools/includes/
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc Fri Jan 13 22:00:40 2012
@@ -1,96 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-'*
-'* owner : gregor.hartmann@oracle.com
-'*
-'* short description : Helpers for accessing treelists
-'*
-'\******************************************************************************
-
-function hGetNodeCount( oControl as object ) as integer
-
- '///<h3>Retrieve the number of visible (open) nodes from a treelist</h3>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Treelist control object (Object)</li>
- '///<ul>
- '///+<li>Object must exist in current context</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Number of items in treelist</li>
- '///<ul>
- '///+<li>0 on any error</li>
- '///+<li>> 0 Number of items</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
-
- const CFN = "hGetNodeCount::"
- const RETVAL_FAILURE = 0
- dim iCount as integer
-
- '///+<li>Verify that the control exists</li>
- if ( oControl.exists( 5 ) ) then
-
- '///+<li>Verify that the control is enabled</li>
- if ( oControl.isEnabled() ) then
-
- if ( GVERBOSE ) then printlog( CFN & "Regular access, control available and enabled" )
-
- '///+<li>get the number of items from the control</li>
- iCount = oControl.getItemCount()
- else
- printlog( CFN & "Failure: Control claims to be disabled." )
- iCount = RETVAL_FAILURE
- endif
- else
- try
- printlog( CFN & "Forcing access to non existing control" )
- iCount = oControl.getItemCount()
- catch
- printlog( CFN & "Failure: Control not available." )
- iCount = RETVAL_FAILURE
- endcatch
- endif
-
- if ( GVERBOSE ) then printlog( CFN & "Exit with nodecount = " & iCount )
-
- hGetNodeCount = iCount
- '///</ul>
-
-end function
-
-'*******************************************************************************
+*****
function hSelectTopNode( oControl as object ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc Fri Jan 13 22:00:40 2012
@@ -1,47 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-******
-'*
-'* owner : gregor.hartmann@oracle.com
-'*
-'* short description : Get the UI names for default filters
-'*
-'\******************************************************************************
-
-global gWriterFilter as String
-global gCalcFilter as String
-global gImpressFilter as String
-global gMasterDocFilter as String
-global gMathFilter as String
-global gDrawFilter as String
-global gHTMLFilter as String
-'*******************************************************************************
+*****
sub GetDefaultFilterNames()
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc Fri Jan 13 22:00:40 2012
@@ -1,37 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-'*
-'* Owner : helge.delfs@oracle.com
-'*
-'* short description : simple XML-Parser for XML-Files from Registration-Database and Routines to work with SAX-Parser in Testtool
-'*
-'***********************************************************************************
+*********
' #1 hXMLGotoElement
' #1 hXMLGetFirstCharsForElement
' #1 ExtractSections
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc Fri Jan 13 22:00:40 2012
@@ -1,389 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-'*
-'* owner : thorsten.bosbach@oracle.com
-'*
-'* short description : Global Routines for Document Handling
-'*
-'\*************************************************************************************
-
-sub hNewDocument ( optional bANewDoc )
- '/// hNewDocument : open a new document dependent on 'gApplication' ///'
- dim sTemp as string
-
- if IsMissing ( bANewDoc ) <> TRUE then
- if bANewDoc = TRUE then
- gNoNewDoc = FALSE
- else
- gNoNewDoc = TRUE
- end if
- end if
-
- select case gApplication
- case "WRITER"
- Kontext "DocumentWriter"
- if gNoNewDoc = TRUE then
- FileOpen "FileName", "private:factory/swriter", "SynchronMode", TRUE
- else
- FileOpen "FileName", "private:factory/swriter", "FrameName", "_default", "SynchronMode", TRUE
- end if
- if ( DocumentWriter.IsMax() = false ) then
- DocumentWriter.Maximize()
- Wait( 2000 )
- end if
- case "CALC"
- Kontext "DocumentCalc"
- if gNoNewDoc = TRUE then
- FileOpen "FileName", "private:factory/scalc", "SynchronMode", TRUE
- else
- FileOpen "FileName", "private:factory/scalc", "FrameName", "_default", "SynchronMode", TRUE
- end if
- if ( DocumentCalc.IsMax() = false ) then
- DocumentCalc.Maximize()
- Wait( 2000 )
- end if
- case "IMPRESS"
- Kontext "DocumentImpress"
- if gNoNewDoc = TRUE then
- FileOpen "FileName", "private:factory/simpress", "SynchronMode", TRUE
- else
- FileOpen "FileName", "private:factory/simpress", "FrameName", "_default", "SynchronMode", TRUE
- Kontext "AutoPilotPraesentation1"
- if AutoPilotPraesentation1.Exists (2) then
- Printlog "------------------------------The Impress-Autopilot was active------------------"
- Startwithwizard.Check ' opposite of the checkboxs' title
- AutoPilotPraesentation1.OK
- Sleep 2
- Kontext "SeitenLayout"
- SeitenLayout.Cancel
- end if
- Kontext "DocumentImpress"
- Sleep 2
- if ( DocumentImpress.IsMax() = false ) then
- DocumentImpress.Maximize()
- Wait( 2000 )
- end if
- end if
- case "DRAW"
- Kontext "DocumentDraw"
- if gNoNewDoc = TRUE then
- FileOpen "FileName", "private:factory/sdraw", "SynchronMode", TRUE
- else
- FileOpen "FileName", "private:factory/sdraw", "FrameName", "_default", "SynchronMode", TRUE
- end if
- if ( DocumentDraw.IsMax() = false ) then
- DocumentDraw.Maximize()
- Wait( 2000 )
- end if
- case "MASTERDOCUMENT"
- Kontext "DocumentMasterDoc"
- if gNoNewDoc = TRUE then
- FileOpen "FileName", "private:factory/swriter/GlobalDocument", "SynchronMode", TRUE
- else
- FileOpen "FileName", "private:factory/swriter/GlobalDocument", "FrameName", "_default", "SynchronMode", TRUE
- end if
- Kontext "Navigator"
- sleep (1)
- if Navigator.Exists(5) then Navigator.Close
- Kontext "DocumentMasterDoc"
- if ( DocumentMasterDoc.IsMax() = false ) then
- DocumentMasterDoc.Maximize()
- Wait( 2000 )
- end if
- case "MATH"
- Kontext "DocumentMath"
- if gNoNewDoc = TRUE then
- FileOpen "FileName", "private:factory/smath", "SynchronMode", TRUE
- else
- FileOpen "FileName", "private:factory/smath", "FrameName", "_default", "SynchronMode", TRUE
- end if
- Kontext "DocumentMath"
- if ( DocumentMath.IsMax() = false ) then
- DocumentMath.Maximize()
- Wait( 2000 )
- end if
- case "HTML"
- Kontext "DocumentWriterWeb"
- if gNoNewDoc = TRUE then
- FileOpen "FileName", "private:factory/swriter/web", "SynchronMode", TRUE
- else
- FileOpen "FileName", "private:factory/swriter/web", "FrameName", "_default", "SynchronMode", TRUE
- end if
- Kontext "DocumentWriterWeb"
- if ( DocumentWriterWeb.IsMax() = false ) then
- DocumentWriterWeb.Maximize()
- Wait( 2000 )
- end if
- case "DATABASE"
- FileOpen "FileName", "private:factory/sdatabase?Interactive", "FrameName", "_default", "SynchronMode", TRUE
- Kontext "DatabaseWizard"
- if DatabaseWizard.exists(5) then
- FinishBtn.click
- kontext "SpeichernDlg"
- if SpeichernDlg.exists(5) then
- if (Dateiname.getSelText = "") then
- sTemp = convertPath(gOfficePath + "user/work/hNewDocument.odb")
- if fileExists(sTemp) then
- app.kill(sTemp)
- endif
- qaErrorlog "## lost default filename"
- Dateiname.setText "hNewDocument"
- endif
- Speichern.click
- Kontext "DATABASE"
- else
- warnlog "t_doc1.inc::hNewDocument():: Can't create Database Document 2"
- endif
- else
- warnlog "t_doc1.inc::hNewDocument():: Can't create Database Document 1"
- endif
- case "BASIC"
- ToolsMacroMacro
- kontext "makro"
- if makro.exists(5) then
- MakroAus.typeKeys "<home>"
- sTemp = ""
- while (NOT bearbeiten.isEnabled) AND (sTemp <> MakroAus.getSelText)
- sTemp = MakroAus.getSelText
- MakroAus.typeKeys "<down>+"
- wend
- if (bearbeiten.isEnabled) then
- bearbeiten.click
- else
- qaErrorlog "Can't edit document."
- endif
- else
- warnlog "Can't open Basic IDE."
- endif
- case else : WarnLog "hNewDocument: No Applikation named '" + gApplication + "' exists in this routine!"
- end select
- Sleep 2
-
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-function hCreateLabels() as Boolean
-
- hCreateLabels() = false
-
- FileOpen( "FileName", "private:factory/swriter?slot=21051", "FrameName", "_default", "SynchronMode", TRUE )
-
- Kontext
- if ( Active.exists( 5 ) ) then
- Active.setPage TabEtiketten
-
- if ( TabEtiketten.exists( 1 ) ) then
- if ( Tabetiketten.isVisible() ) then
- hCreateLabels() = true
- else
- warnlog( "<TabEtiketten> is not visible" )
- endif
- else
- warnlog( "<TabEtiketten> not open" )
- endif
- else
- warnlog( "Failed to open <TabEtiketten>" )
- endif
-
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hCreateBusinessCards() as Boolean
-
- hCreateBusinessCards() = false
-
- FileOpen( "FileName", "private:factory/swriter?slot=21052", "FrameName", "_default", "SynchronMode", TRUE )
-
- Kontext
- if ( Active.exists( 5 ) ) then
- Active.setPage TabEtikettenMedium
-
- if ( TabEtikettenMedium.exists( 1 ) ) then
- if ( TabetikettenMedium.isVisible() ) then
- hCreateBusinessCards() = true
- else
- warnlog( "<TabEtikettenMedium> is not visible" )
- endif
- else
- warnlog( "<TabEtikettenMedium> not open" )
- endif
- else
- warnlog( "Failed to open <TabEtikettenMedium>" )
- endif
-
-end function
-'
-'-------------------------------------------------------------------------------
-'
-function hCloseDocument()
-
- hUseAsyncSlot( "FileClose")
-
- Kontext "Active"
- if ( Active.Exists( 2 ) ) then
- try
- Active.No
- catch
- Active.click( 202 )
- endcatch
- end if
-
- WaitSlot( 2000 )
-
-end function
-'
-'-------------------------------------------------------------------------------
-'
-sub gMouseClick ( X%, Y%, optional _mousebutton )
-
- dim oDocument as object
- dim mousebutton as integer
-
- ' Handle infamous optional parameter
- if ( IsMissing( _mousebutton ) ) then
- mousebutton = 1
- else
- mousebutton = _mousebutton
- endif
-
- hSetDocumentContext() ' set kontext to current document type
- oDocument = hSetDocumentObject() ' get the current document object
-
- autoexecute = false
- oDocument.MouseDown ( X%, Y%, mousebutton )
- oDocument.MouseUp ( X%, Y%, mousebutton )
- autoexecute = true
- wait( 1000 )
-
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub gMouseDoubleClick ( X%, Y% )
-
- dim oDocument as object
-
- hSetDocumentContext() ' set kontext to current document type
- oDocument = hSetDocumentObject() ' get the current document object
- oDocument.MouseDoubleClick ( X%, Y% )
- wait( 1000 )
-
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub gMouseMove ( BeginX%, BeginY%, EndX%, EndY% )
-
- dim oDocument as object
-
- hSetDocumentContext() ' set kontext to current document type
- oDocument = hSetDocumentObject() ' get the current document object
- oDocument.MouseDown ( BeginX%, BeginY% )
- oDocument.MouseMove ( EndX%, EndY%)
- oDocument.MouseUp ( EndX%, EndY% )
- wait( 1000 )
-
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub gMouseDown ( BeginX%, BeginY% )
-
- dim oDocument as object
-
- hSetDocumentContext() ' set kontext to current document type
- oDocument = hSetDocumentObject() ' get the current document object
- oDocument.MouseDown ( BeginX%, BeginY% )
- wait( 300 )
-
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub gMouseMove2 ( EndX%, EndY% )
-
- dim oDocument as object
-
- hSetDocumentContext() ' set kontext to current document type
- oDocument = hSetDocumentObject() ' get the current document object
- oDocument.MouseMove ( EndX%, EndY%)
- wait( 300 )
-
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub gMouseUp ( EndX%, EndY% )
-
- dim oDocument as object
-
- hSetDocumentContext() ' set kontext to current document type
- oDocument = hSetDocumentObject() ' get the current document object
- oDocument.MouseUp ( EndX%, EndY% )
- wait( 300 )
-
-end sub
-'
-'-------------------------------------------------------------------------------
-'
-sub hTypeKeys ( OutputText , optional _iLoop as Integer )
-
- const CFN = "global::tools::includes::required::t_doc1.inc::hTypeKeys(): "
-
- dim iRepeat as integer
- dim iLoop as integer
- dim oDocument as object
-
- ' Handle infamous optional parameter
- If ( IsMissing( _iLoop ) ) then
- iLoop = 1
- else
- iLoop = _iLoop
- endif
-
- hSetDocumentContext() ' set kontext to current document type
- oDocument = hSetDocumentObject() ' Get the document object we want to write to
-
- try
- for iRepeat = 1 to iLoop
- oDocument.TypeKeys( OutputText )
- wait( 200 )
- next iRepeat
- catch
- warnlog( CFN & "Failed to send keystroke to given context" )
- endcatch
-
-end sub
-
-'*******************************************************************************
+*****
function hSetDocumentContext() as string
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc Fri Jan 13 22:00:40 2012
@@ -1,45 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-******
-'*
-'* Owner : thorsten.bosbach@oracle.com
-'*
-'* short description : Global routines for loading, saving, printing, export
-'*
-'\******************************************************************************
-function hGrafikEinfuegen( cFile as string ) as Boolean
-
- hGrafikEinfuegen() = hInsertGraphic( cFile, "Static" )
-
-end function
-
-'*******************************************************************************
+*****
function hGrafikVerknuepftEinfuegen( cFile as string ) as Boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc Fri Jan 13 22:00:40 2012
@@ -1,55 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-******
-'*
-'* owner : gregor.hartmann@oracle.com
-'*
-'* short description : Retrieve and set filternames and suffixes
-'*
-'\******************************************************************************
-
-private const LENGTH_OF_FILTERFILE = 100
-private const FILE_DATA_SIZE = 300
-
-function hCheckForBinfilters() as boolean
- try
- hGetSuffix( "569" )
- hCheckForBinfilters() = true
- catch
- warnlog( "Optional legacy filters package is not installed" )
- printlog( "Please restart the setup to install the missing filters" )
- hCheckForBinfilters() = false
- endcatch
-
-end function
-
-'*******************************************************************************
+*****
function hGetSuffix( optional cBuildId as string ) as string
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_lists.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_lists.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_lists.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_lists.inc Fri Jan 13 22:00:40 2012
@@ -1,452 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-'*
-'* owner : helge.delfs@oracle.com
-'*
-'* short description : general routines to work with lists (arrays)
-'*
-'\******************************************************************
-
-function ListCount ( lsList() as String ) as Integer
- 'Author: tz
- '///Returns the number of list entries.
- '///+<u>Input</u>: The list (only string lists are possible)
- '///+<u>Return</u>: The number of entries
- ListCount = Val(lsList(0))
-end function
-
-'-------------------------------------------------------------------------
-
-function ListCopy ( lsList1() as String, lsList2() as String ) as Boolean
- 'Author: tz
- '///Copies all entries out of one list into another list.
- '///+<u>Input</u>:<ol><lo>list which should be copied</li><li>An empty list</li></ol>After this function the 2nd list is a copy of the 1st list.
- '///+<u>Return</u>: If copy of the list is correct this function returns TRUE otherweise FALSE
-
- Dim ii as Integer
-
- ListAllDelete ( lsList2() )
- for ii=1 to ListCount ( lsList1() )
- ListAppend ( lsList2(), lsList1(ii) )
- next ii
-
- if ListCount ( lsList1() ) = ListCount ( lsList2 () ) then
- ListCopy = TRUE
- else
- ListCopy = FALSE
- end if
-end function
-
-'-------------------------------------------------------------------------
-
-sub ListAllDelete ( lsList() as String )
- 'Author: tz
- '///Deletes a complete list.
- '///+<u>Input</u>: The list (only string lists are possible)
- lsList(0) = "0"
-end sub
-
-'-------------------------------------------------------------------------
-
-sub ListAppend ( lsList() as String, sNewEntry as String )
- 'Author: tz
- '///Appends a new entry at the end of the list.
- '///+<u>Input</u>: <ol><li>the list (only string lists are possible)</li><li>The new entry</li></ol>
- lsList(0) = Val(lsList(0)) + 1
- lsList( lsList(0) ) = sNewEntry
-end sub
-
-'-------------------------------------------------------------------------
-
-function ListDelete ( lsList() as String, iNr as Integer ) as Boolean
- 'Author: tz
- '///Deletes an entry out of the list on a defined position (iNr).
- '///+<u>Input</u>: <ol><li>The list (only string lists are possible)</li><li>The position of the entry</li></ol>
- '///+<u>Return</u>: TRUE if the entry was deleted otherweise FALSE
-
-
- Dim i%, ListenAnzahl as Integer
-
- ListenAnzahl = listcount( lsList() )
-
- if iNr > ListenAnzahl then
- ListDelete = FALSE
- Exit Function
- end if
-
- for i% = iNr to ListenAnzahl
- lsList( i% ) = lsList( i% + 1 )
- next i%
-
- lsList(0) = ListenAnzahl - 1
-
- ListDelete = TRUE
-end function
-
-'-------------------------------------------------------------------------
-
-function ListDeleteString ( lsList() as String, sText as String ) as Boolean
- 'Author: tz
- '///Deletes the 1st string in the list which is equal to the input string.
- '///+<u>Input</u>: <ol><li>The list (only string lists are possible)</li><li>The string</li></ol>
- '///+<u>Return</u>: TRUE if the entry was deleted otherwise FALSE
- Dim i as Integer : Dim EintragsNr as Integer : Dim ListenAnzahl as Integer
-
- ListenAnzahl = Val(lsList(0))
- EintragsNr = 0
- for i = 1 to ListenAnzahl
- if lsList(i) = sText then
- EintragsNr = i
- i = ListenAnzahl + 1
- end if
- next i
- if EintragsNr = 0 then
- ListDeleteString = FALSE
- else
- ListDeleteString = ListDelete ( lsList(), EintragsNr )
- end if
-end function
-
-'-------------------------------------------------------------------------
-
-function ListInsert ( lsList() as String, ZeileNr%, sWert$ ) as Boolean
- 'Author: tz
- '///Inserts a string at a defined position in the list.
- '///+<u>Input</u>: <ol><li>The list (only string lists are possible)</li><li>The position</li><li>The string</li></ol>
- '///+<u>Return</u>: TRUE if the entry was inserted otherwise FALSE
- Dim i% : Dim ListenAnzahl as Integer
-
- ListenAnzahl = Val(lsList(0))
- if ZeileNr% > ListenAnzahl then
- ListInsert = FALSE
- Exit Function
- end if
-
- ' Nach hinten verschieben, hinten beginnend
- for i% = ListenAnzahl to ZeileNr% step -1
- lsList( i%+1 ) = lsList( i% )
- next i%
-
- ' Einfuegen
- lsList( ZeileNr% ) = sWert$
- lsFile(0) = ListenAnzahl + 1
- ListInsert = TRUE
-
-end function
-
-'-------------------------------------------------------------------------
-
-function ListRead ( lsList() as String, Datei$, optional sEncode as String ) as Boolean
- 'Author: tz
- '///+Opens a file and insert all rows into a list (row for row).
- '///+<u>Input</u>: <ol><li>The list (old list entries will be deleted)</li><li>The file</li><li><b>optional</b>: The encoding "UTF8"</li></ol>
- '///+<u>Return</u>: TRUE or FALSE if this routine can read the file.
- Dim bUTF8 as Boolean
- Dim i%
- Dim CompareList(15000) as String
-
- if Dir( Datei$ ) = "" then
- Warnlog "ListRead: " + Datei$ + " is missing!"
- ListRead = FALSE
- exit function
- end if
-
- if IsMissing ( sEncode ) = TRUE then
- bUTF8 = FALSE
- else
- if UCASE ( sEncode ) = "UFT8" OR UCASE ( sEncode ) = "UTF8" then
- bUTF8 = TRUE
- else
- Warnlog "ListRead :" + sEncode + " - Encoding is unkown!"
- bUTF8 = FALSE
- end if
- end if
-
- ListAllDelete ( lsList() ) ' clean up the list
-
- if bUTF8 = TRUE then
- Dim textin as object, sfa as object, xInput as object ' for UTF-8-input-routines
- Dim iC as Integer
-
- textin = createUnoService( "com.sun.star.io.TextInputStream" ) ' uno-handling to input an UFT-8-File
- textin.setEncoding("utf8") '
- sfa = createUnoService( "com.sun.star.ucb.SimpleFileAccess" ) '
- xInput = sfa.openFileRead( Datei$ ) '
- textin.setInputStream( xInput ) '
-
- do until textin.isEOF() '
- i% = Val(lsList(0)) + 1
- lsList(0) = i%
- lsList( i% ) = textin.readLine() '
- loop
- xInput.closeInput ' uno-file-close
-
- 'INFO: (TZ) Only to workaround a problem with UNIX-Files...
- if Right ( lsList(i%), 1 ) = Chr(10) then
- lsList(i%) = Left ( lsList(i%), Len ( lsList(i%) ) - 1 )
- end if
- 'INFO: (TBO) Remove the BOM http://www.unicode.org/versions/Unicode4.0.0/ch15.pdf
- if (left(lsList(1), 1) = chr(&HFEFF)) then
- lsList(1) = right(lsList(1), Len(lsList(1)) - 1)
- end if
- else
- Dim FileNum%
-
- FileNum% = FreeFile
- Open Datei$ for input as #FileNum%
-
- do until EOF(#FileNum%) ' all from LIS-file
- i% = Val(lsList(0)) + 1
- lsList(0) = i%
- Line Input #FileNum%, lsList( i% )
- loop
- Close #FileNum%
- end if
- ListRead = TRUE
-end function
-
-'-------------------------------------------------------------------------
-
-function ListWrite ( lsList() as String, Datei$, optional sEncode as String) as Boolean
- 'Author: tz
- '///+Writes a list into a file (an existing file will be deleted before)
- '///+<u>Input</u>: <ol><li>The list</li><li>The file</li><li><b>optional</b>: The encoding "UTF8"</li></ol>
- '///+<u>return</u>: TRUE or FALSE if this routine can read the file.
-
- Dim bUTF8 as Boolean
- Dim i%
-
- if Dir (Datei$) <> "" then
- Kill(Datei$) ' the file must be deleted if you use 'UTF8'
- endif
-
- if IsMissing ( sEncode ) = TRUE then
- bUTF8 = FALSE
- else
- if UCASE ( sEncode ) = "UTF8" then
- bUTF8 = TRUE
- else
- Warnlog "ListWrite :" + sEncode + " - Encoding is unkown!"
- bUTF8 = FALSE
- end if
- end if
-
- if bUTF8 = TRUE then
- Dim textout as object, sfa as object, xOutput as object ' for UTF-8-output-routines
-
- textout = createUnoService( "com.sun.star.io.TextOutputStream" ) ' uno-handling to output an UFT-8-File
- textout.setEncoding("utf8") '
- sfa = createUnoService( "com.sun.star.ucb.SimpleFileAccess" ) '
- xOutput = sfa.openFileWrite( Datei$ ) '
- textout.setOutputStream( xOutput ) '
-
- for i%=1 to ListCount ( lsList() )
- textout.writeString( lsList( i% ) + Chr(13) + Chr(10) ) '
- next i%
- xOutput.closeOutput ' uno-file-close
- else
- Dim FileNum% : Dim iLast%
-
- FileNum% = FreeFile
- Open Datei$ for Output as #FileNum%
- iLast% = Val(lsList(0))
- i%=1
- do while i% <= iLast%
- Print #FileNum%, lsList(i%)
- i% = i% +1
- loop
- Close #FileNum%
- endif
-
- ListWrite = TRUE
-end function
-
-'-------------------------------------------------------------------------
-
-function ListReadAppend( lsList() as String , Datei$, optional sEncode as String ) as Boolean
- 'Author: tz
- '///+Appends a list into a file (If the file exists the file will be deleted before!).
- '///+<u>Input</u>: <ol><li>The list</li><li>The file</li><li><b>optional</b>: The encoding "UTF8"</li></ol>
- '///+<u>return</u>: TRUE or FALSE if this routine can read the file.
-
- Dim bUTF8 as Boolean
- Dim i%
- Dim CompareList() as String
- Dim isCounter as Integer
- Dim FileNum%
-
- if Dir( Datei$ ) = "" then
- Warnlog "ListReadAppend : " + Datei$ + " is missing!"
- ListReadAppend = FALSE
- exit function
- end if
-
- isCounter = ListCount ( lsList() )
-
- if IsMissing ( sEncode ) = TRUE then
- bUTF8 = FALSE
- else
- if UCASE ( sEncode ) = "UFT8" OR UCASE ( sEncode ) = "UTF8" then
- bUTF8 = TRUE
- else
- Warnlog "ListRead : " + sEncode + " - Encoding is unkown!"
- bUTF8 = FALSE
- end if
- end if
-
- if bUTF8 = TRUE then
- Dim textin as object, sfa as object, xInput as object ' for UTF-8-input-routines
-
- textin = createUnoService( "com.sun.star.io.TextInputStream" ) ' uno-handling to input an UFT-8-File
- textin.setEncoding("utf8") '
- sfa = createUnoService( "com.sun.star.ucb.SimpleFileAccess" ) '
- xInput = sfa.openFileRead( Datei$ ) '
- textin.setInputStream( xInput ) '
-
- do until textin.isEOF() '
- i% = Val(lsList(0)) + 1
- lsList(0) = i%
- lsList( i% ) = textin.readLine() '
- loop
- xInput.closeInput ' uno-file-close
-
- 'INFO: (TZ) Only to workaround a problem with UNIX-Files...
- if Right ( lsList(i%), 1 ) = Chr(10) then
- lsList(i%) = Left ( lsList(i%), Len ( lsList(i%) ) - 1 )
- end if
- '...
- else
- FileNum% = FreeFile
- Open Datei$ for input as #FileNum%
-
- do until EOF(FileNum%) ' All from LIST-file
- i% = Val(lsList(0)) + 1
- lsList(0) = i%
- Line Input #FileNum%, lsList( i% )
- loop
- Close #FileNum%
- end if
-
- ListReadAppend = TRUE
-
-end function
-
-'-------------------------------------------------------------------------
-
-function ListWriteAppend( lsList() as String, Datei$, optional sEncode as String ) as Boolean
- 'Author: tz
- '///+Writes a list into a file (If the files exist all entries will be appended).
- '///+<u>Input</u>: <ol><li>The list</li><li>The file</li><li><b>optional</b>: The encoding "UTF8"</li></ol>
- '///+<u>return</u>: TRUE or FALSE if this routine can read the file.
-
- Dim bUTF8 as Boolean
- Dim i%
- Dim DummyList ( 15000 ) as String
-
- if IsMissing ( sEncode ) = TRUE then
- bUTF8 = FALSE
- else
- if UCASE ( sEncode ) = "UTF8" then
- bUTF8 = TRUE
- else
- Warnlog "ListRead :" + sEncode + " - Encoding is unkown!"
- bUTF8 = FALSE
- end if
- end if
-
- if bUTF8 = TRUE then
- Dim sfa as object, xOutput as object, textout as object ' for UTF-8-output-routines
-
- ListRead ( DummyList(), Datei$, "utf8" ) ' read old file in another list
- for i% = 1 to ListCount ( lsList() )
- ListAppend ( DummyList(), lsList(i%) ) ' add the new list at the old list
- next i%
-
- textout = createUnoService( "com.sun.star.io.TextOutputStream" ) ' uno-handling to output an UFT-8-File
- textout.setEncoding("utf8") '
- sfa = createUnoService( "com.sun.star.ucb.SimpleFileAccess" ) '
- xOutput = sfa.openFileWrite( Datei$ ) '
- textout.setOutputStream( xOutput ) '
-
- for i%=1 to ListCount (DummyList())
- textout.writeString( DummyList( i% ) + Chr(13) + Chr(10 ) '
- next i%
- xOutput.closeOutput ' uno-file-close
- else
- Dim FileNum%
-
- FileNum% = FreeFile
- Open Datei$ for Append as #FileNum%
-
- for i% = 1 to Val(lsList(0))
- Print #FileNum%, lsList(i%)
- next i%
-
- Close #FileNum%
- end if
- ListWriteAppend = TRUE
-
-end function
-
-'-------------------------------------------------------------------------
-
-sub ListSort ( lsList() as String, optional UpDown as Boolean )
- 'Author: tz
- '///+Sorts a list upward per default or downward if optional parameter is FALSE with quicksort method.
- '///+<u>Input</u>: Unsorted list
-
- Dim Listenanzahl as Integer, i as Integer, j as Integer
- Dim Zwischenspeicher as String
-
- ListenAnzahl = Val(lsList(0))
- for i=ListenAnzahl-1 to 1 step -1
- for j=1 to i
- if UpDown = FALSE then
- ' upward sorting
- if uCase ( lsList(j) ) < uCase ( lsList(j+1) ) then
- Zwischenspeicher = lsList (j) ' invert value (i) with value (i+1)
- lsList (j) = lsList(j+1)
- lsList (j+1) = Zwischenspeicher
- end if
- else
- ' Downward sorting
- if uCase ( lsList(j) ) > uCase ( lsList(j+1) ) then
- Zwischenspeicher = lsList (j) ' invert value (i) with value (i+1)
- lsList (j) = lsList(j+1)
- lsList (j+1) = Zwischenspeicher
- end if
- end if
- next j
- next i
-end sub
-
-'*******************************************************************************
+*****
function gCompare2Lists( aListOne() as String, aListTwo() as String ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_menu.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_menu.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_menu.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_menu.inc Fri Jan 13 22:00:40 2012
@@ -1,58 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-******
-'*
-'* Owner : thorsten.bosbach@oracle.com
-'*
-'* short description : wrappers for accessing menues (context-, bar-, button- menues)
-'*
-'\******************************************************************************
-
-function hMenuItemGetCount as Integer
-
- '/// OUTPUT: number of entries in the activated menu (without seperators) ///'
- '///+ menu left open ///'
- dim iCurrentMenuItem as integer
- dim iValidMenuItems as integer
- sleep( 2 )
-
- iValidMenuItems = 0
- for iCurrentMenuItem = 1 to MenuGetItemCount
- if ( NOT MenuIsSeperator ( iCurrentMenuItem ) ) then
- iValidMenuItems = iValidMenuItems + 1
- endif
- next iCurrentMenuItem
- hMenuItemGetCount = iValidMenuItems
-
-end function
-
-'*******************************************************************************
+*****
function hMenuSelectNr ( EintragsNr as Integer ) as String
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_option2.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_option2.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_option2.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_option2.inc Fri Jan 13 22:00:40 2012
@@ -1,295 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-'*
-'* owner : thorsten.bosbach@oracle.com
-'*
-'* short description : Tools library for options testcases
-'*
-'\***********************************************************************
-
-function OptionTabPageZaehler ( SollAnzahl as Integer, optional Ausnahme as Boolean )
- 'parameter Ausnahme is depracted
- Dim IstAnzahl
- Kontext "ExtrasOptionenDlg"
- IstAnzahl = Optionsliste.GetItemCount - iSectionNumber
- if Ausnahme = FALSE then
- if IstAnzahl <> SollAnzahl then WarnLog "Number of tabpages old : " + SollAnzahl + " new : " + IstAnzahl
- end if
- OptionTabPageZaehler = IstAnzahl
-end function
-
-'-------------------------------------------------------------------------
-
-sub ToPosInOptionlist ( Sprung as Integer )
- Dim i as Integer
- Kontext "OptionenDlg"
- Optionsliste.TypeKeys "<HOME>"
- for i = 1 to 12
- Optionsliste.TypeKeys "-<DOWN>"
- next i
- Optionsliste.Select Sprung
- Optionsliste.TypeKeys "+"
-end sub
-
-'-------------------------------------------------------------------------
-
-sub DialogeFuerTypenKontrollieren
- ' Complete test for path-options, for all entries the file-dialog or the path-dialog will be opened
- Dim i as Integer
- Dim iCount as Integer
- Dim iErrorCount as integer
- dim iExitCounter as integer : iExitCounter = 0
- Kontext "TabPfade"
- Typ.TypeKeys "<Down><Down><Home>"
- iCount = 0
- iErrorCount = 0
- for i=1 to Typ.GetItemCount
- if i<>1 then Typ.TypeKeys "<Down>"
- printlog " "+typ.getText
- if ( bAsianLan <> TRUE ) then
- try
- Bearbeiten.Click
-
- do while( iExitCounter <= 10 )
-
- kontext "Active"
- if ( active.exists() ) then
- iErrorCount = iErrorCount + 1
- if (iErrorCount > 1) then
- Warnlog active.getText
- endif
- qaErrorlog "#i69014# gallery path doesn't exist: '" + active.getText + "'"
- printlog active.getText
- active.ok
- endif
-
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists() then
- if ( Dateityp.IsVisible ) then
- Warnlog "The normal FileOpen-Dialog is visible with the Filetype-Listbox => BUG!"
- endif
- OeffnenDlg.Cancel
- exit do
- endif
-
- Kontext "PfadeAuswaehlen"
- if ( PfadeAuswaehlen.exists() ) then
- PfadeAuswaehlen.Cancel
- exit do
- endif
-
- iExitCounter = iExitCounter + 1
- loop
- Kontext "TabPfade"
- catch
- Warnlog "Error on entry " & i & "!"
- Exceptlog
- endcatch
- else
- try
- if ( Bearbeiten.IsEnabled ) then
- Bearbeiten.Click
-
- do while( iExitCounter <= 10 )
-
- kontext "Active"
- if active.exists () then
- iErrorCount = iErrorCount + 1
- if (iErrorCount > 1) then
- Warnlog active.getText
- endif
- qaErrorlog "WorkAround for #109107# has to come up only once @'Add-Ins'! else BUG!"
- active.ok
- endif
-
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists() then
- if ( Dateityp.IsVisible ) then
- Warnlog "The normal FileOpen-Dialog is visible with the Filetype-Listbox => BUG!"
- endif
- OeffnenDlg.Cancel
- exit do
- endif
-
- Kontext "PfadeAuswaehlen"
- if ( PfadeAuswaehlen.exists() ) then
- PfadeAuswaehlen.Cancel
- exit do
- end if
-
- iExitCounter = iExitCounter + 1
- loop
- Kontext "TabPfade"
- else
- iCount = iCount + 1
- end if
- catch
- Warnlog "Error on entry " & i & "!"
- Exceptlog
- endcatch
- end if
- next i
- if iCount > 3 then Warnlog "There are more than 3 entries are disabled!"
-
-end sub
-
-'-------------------------------------------------------------------------
-
-function hSetMacroSecurity( iLevel as integer ) as integer
-
- '///<h3>Set macro security level via GUI</h3>
- '///<i>Set the macro security by accessing the Tools/Options->
- '///+ OpenOffice.org/Security::Macro... Tabpage</i><br><br>
-
- '///<u>Parameter(s):</u><br>
- '///<ol>
-
- '///+<li>Desired macro security level (Integer). Following symbolic names are defined:</li>
- '///<ul>
- '///+<li>GC_MACRO_SECURITY_LEVEL_LOW (0) for low security</li>
- '///+<li>GC_MACRO_SECURITY_LEVEL_MEDIUM (1) for medium security</li>
- '///+<li>GC_MACRO_SECURITY_LEVEL_HIGH (2) for high security</li>
- '///+<li>GC_MACRO_SECURITY_LEVEL_VERYHIGH (3) for very high security</li>
- '///</ul>
-
- '///</ol>
-
-
- '///<u>Returns:</u><br>
- '///<ol>
- '///+<li>Previous security level (Integer)</li>
- '///<ul>
- '///+<li>GC_MACRO_SECURITY_LEVEL_LOW (0) for low security</li>
- '///+<li>GC_MACRO_SECURITY_LEVEL_MEDIUM (1) for medium security</li>
- '///+<li>GC_MACRO_SECURITY_LEVEL_HIGH (2) for high security</li>
- '///+<li>GC_MACRO_SECURITY_LEVEL_VERYHIGH (3) for very high security</li>
- '///+<li>-1 on error</li>
- '///</ul>
- '///</ol>
-
-
-
- '///Switch between macro security levels in Tools/Options
- '///<ul>
- const CFN = "hSetMacroSecurity::"
- const RETVAL_FAILURE = -1
- const DEFAULT_WAIT_TIME = 2
-
- dim iOldSecurityLevel as integer
-
- dim caLevel( 3 ) as string
- caLevel( 0 ) = "low"
- caLevel( 1 ) = "medium"
- caLevel( 2 ) = "high"
- caLevel( 3 ) = "very high"
-
- if ( ( iLevel < GC_MACRO_SECURITY_LEVEL_LOW ) or ( iLevel > GC_MACRO_SECURITY_LEVEL_VERYHIGH ) ) then
- warnlog( CFN & "Invalid index (0...3) passed to function: " & ilevel )
- hSetMacroSecurity() = RETVAL_FAILURE
- exit function
- end if
-
- '///+<li>Open Tools/Options -> OpenOffice.org/Security</li>
- ToolsOptions
- hToolsOptions( "Staroffice" , "Security" )
-
- '///+<li>Click on the macro security button</li>
- Kontext "TabSecurity"
- if ( MacroSecurity.exists( DEFAULT_WAIT_TIME ) ) then
- MacroSecurity.click()
-
- '///+<li>Ensure we are on the Security Level page</li>
- kontext "Active"
- if ( Active.exists( DEFAULT_WAIT_TIME ) ) then
-
- Kontext
- active.setpage TabSecurityLevel
-
- '///+<li>Get the current setting (=returnvalue)</li>
- Kontext "TabSecurityLevel"
- if ( TabSecurityLevel.exists( 2 ) ) then
- if ( veryhigh.isChecked() ) then
- iOldSecurityLevel = GC_MACRO_SECURITY_LEVEL_VERYHIGH
- elseif( high.isChecked() ) then
- iOldSecurityLevel = GC_MACRO_SECURITY_LEVEL_HIGH
- elseif( medium.isChecked() ) then
- iOldSecurityLevel = GC_MACRO_SECURITY_LEVEL_MEDIUM
- elseif( low.isChecked() ) then
- iOldSecurityLevel = GC_MACRO_SECURITY_LEVEL_LOW
- end if
- else
- printlog( CFN & "Security Tabpage not available. Aborting." )
- kontext "OptionenDlg"
- if ( OptionenDlg.exists( DEFAULT_WAIT_TIME ) ) then
- OptionenDlg.cancel()
- else
- warnlog( CFN & "Unrecoverable error, status unknown." )
- endif
- hSetMacroSecurity() = RETVAL_FAILURE
- exit function
- endif
-
- '///+<li>Set the new security level</li>
- select case iLevel
- case GC_MACRO_SECURITY_LEVEL_LOW : low.check()
- case GC_MACRO_SECURITY_LEVEL_MEDIUM : medium.check()
- case GC_MACRO_SECURITY_LEVEL_HIGH : high.check()
- case GC_MACRO_SECURITY_LEVEL_VERYHIGH : veryhigh.check()
- end select
-
- printlog( CFN & "Setting macro security level to " & caLevel( iLevel ) )
-
- else
- printlog( CFN & "Macro Security Dialog did not open. Aborting." )
- kontext "OptionenDlg"
- if ( OptionenDlg.exists( DEFAULT_WAIT_TIME ) ) then
- OptionenDlg.cancel()
- else
- warnlog( CFN & "Unrecoverable error, status unknown." )
- endif
- hSetMacroSecurity() = RETVAL_FAILURE
- exit function
- endif
-
- '///+<li>Close Tools/Options</li>
- TabSecurityLevel.ok()
- else
- warnlog( CFN & "The Macro Security Button is not available" )
- iOldSecurityLevel = RETVAL_FAILURE
- end if
- Kontext "OptionenDLG"
- OptionenDLG.OK()
- '///</ul>
- hSetMacroSecurity() = iOldSecurityLevel
-end function
-
-'*******************************************************************************
+*****
function hGetMacroSecurityAPI() as integer
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_tools1.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_tools1.inc?rev=1231327&r1=1231326&r2=1231327&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_tools1.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_tools1.inc Fri Jan 13 22:00:40 2012
@@ -1,84 +1,26 @@
'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
+' Licensed to the Apache Software Foundation (ASF) under one
+' or more contributor license agreements. See the NOTICE file
+' distributed with this work for additional information
+' regarding copyright ownership. The ASF licenses this file
+' to you under the Apache License, Version 2.0 (the
+' "License"); you may not use this file except in compliance
+' with the License. You may obtain a copy of the License at
+'
+' http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing,
+' software distributed under the License is distributed on an
+' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+' KIND, either express or implied. See the License for the
+' specific language governing permissions and limitations
+' under the License.
'
'*************************************************************************
-******
-'*
-'* owner : gregor.hartmann@oracle.com
-'*
-'* short description : Tools (1)
-'*
-'\******************************************************************************
-
-private SLEEP_TIME_REQUESTED as integer
-private SLEEP_CALLS_SUM as integer
-private SLEEP_TIME_USED as integer
-
-function GetClipboardText as string
-
- '/// Returns the correct clipboard text (also if there is a 'RETURN' at it's end.
- Dim i% : Dim CBText$
- Dim Zwischen$
-
- wait 500
- GetClipboardText = ""
- CBText$ = GetClipboard
-
- if CBText$ = "" then
- GetClipboardText = ""
- exit function
- end if
-
- if asc ( Right( CBText$, 1 )) = 10 then
- Zwischen$ = Mid( CBText$, 1, len(CBText$)-1 )
- if Zwischen$ <> "" then
- if asc ( Right( Zwischen$, 1 )) = 13 then
- GetClipboardText = Mid( Zwischen$, 1, len(Zwischen$)-1 )
- else
- GetClipboardText = Zwischen$
- end if
- else
- GetClipboardText = Zwischen$
- end if
- else
- if asc ( Right( CBText$, 1 )) = 13 then
- Zwischen$ = Mid( CBText$, 1, len(CBText$)-1 )
- if asc ( Right( Zwischen$, 1 )) = 10 then
- GetClipboardText = Mid( Zwischen$, 1, len(Zwischen$)-1 )
- else
- GetClipboardText = Zwischen$
- end if
- else
- GetClipboardText = CBText$
- end if
- end if
-
-end function
-'*******************************************************************************
+*****
function hDoubleClickInList ( window, Selektion as String, optional bFocus as boolean ) as Boolean