Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/fileoperations.inc Fri Jan 13 22:02:09 2012 @@ -1,138 +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 : [email protected] -'* -'* short description : check the internal file dialog ( extended tests ) -'* -'\****************************************************************************** - -function hSaveLoadDelSuccess( cFile as string ) as integer - - '///<h3>Successfully save, close, load, close and delete a file</h3> - '///<i>Uses</i>: framework\tools\t_stringtools.inc<br><br> - '///<u>Input</u>: - '///<ol> - '///+<li>Filename incl. extension (string)</li> - '///</ol> - '///<u>Returns</u>: - '///<ol> - '///+<li>Errorcode (integer)</li> - '///<ul> - '///+<li>0 = all ok</li> - '///+<li>1 = Saving failed</li> - '///+<li>2 = Closing the file failed</li> - '///+<li>3 = Reloading failed</li> - '///+<li>4 = Closing the file failed</li> - '///+<li>5 = Deleting failed</li> - '///+<li>-1 = Post operation error</li> - '///</ul> - '///</ol> - '///<u>Description</u>: - '///<ul> - - dim brc as boolean - dim cFileExt as string : cFileExt = cFile & hGetSuffix( "current" ) - - const CFN = "hSaveLoadDelSuccess::" - - printlog( "" ) - printlog( CFN & "Enter with option: " & cFile & "/" & cFileExt ) - - '///+<li>Close the navigator if it exists</li> - kontext "Navigator" - hCloseDialog( Navigator, "close,optional" ) - - '///+<li>Save the current file, overwriting existing</li> - brc = hSaveFileExpectSuccess( cFile , TRUE ) ' save and overwrite - if ( brc ) then - - '///+<li>Close the file</li> - brc = hDestroyDocument() - if ( brc ) then - - '///+<li>Reload the file</li> - brc = hLoadFileExpectSuccess( cFileExt ) - if ( brc ) then - - '///+<li>Close the document</li> - brc = hDestroyDocument() - if ( brc ) then - - '///+<li>Delete the file via FileOpen</li> - brc = hDeleteFileViaFileOpen( cFileExt ) - if ( brc ) then - printlog( CFN & "Save, close, load, close, delete ok" ) - hSaveLoadDelSuccess() = 0 - else - warnlog( CFN & "Failed to delete file" ) - hSaveLoadDelSuccess() = 5 - endif - - else - warnlog( CFN & "Failed to close file" ) - hSaveLoadDelSuccess() = 4 - endif - - else - warnlog( CFN & "Failed to load file" ) - hSaveLoadDelSuccess() = 3 - endif - - - else - warnlog( CFN & "Closing file failed" ) - hSaveLoadDelSuccess() = 2 - endif - - else - warnlog( CFN & "Saving failed" ) - hSaveLoadDelSuccess() = 1 - endif - - '///+<li>Close possible Messagebox (#i33946#)</li> - kontext "active" - if ( active.exists( 1 ) ) then - printlog( CFN & "Unexpected message: " & active.getText() ) - qaerrorlog( "#i33946# - message when deleting last document in folder" ) - active.ok() - hSaveLoadDelSuccess() = 6 - endif - - '///+<li>Close document</li> - brc = hDestroyDocument() - - '///</ul> - -end function - -'******************************************************************************* +***** function hLoadFileExpectSuccess( fpath as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/formcontrols.inc Fri Jan 13 22:02:09 2012 @@ -1,41 +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 : [email protected] -' ** -' ** short description : Tools to draw and select form controls in basic-ide -' ** -'\****************************************************************************** - -private const ICONTROLCOUNT = 22 - -'******************************************************************************* +***** function hGetControlParams( cParam as string ) as integer Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/help_tools.inc Fri Jan 13 22:02:09 2012 @@ -1,56 +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 : [email protected] -'* -'* short description : Replacements for routines in t_lists.inc adds some -'* -'\****************************************************************************** - -function hOpenHelp() as boolean - - printlog( "Open Help Browser" ) - - HelpContents - kontext "StarOfficeHelp" - if ( StarOfficeHelp.exists( 5 ) ) then - hOpenHelp() = TRUE - else - warnlog( "Unable to open help browser" ) - hOpenHelp() = FALSE - endif - - -end function - -'******************************************************************************* +***** function hCloseHelp() as boolean Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/options_tools.inc Fri Jan 13 22:02:09 2012 @@ -1,86 +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 : [email protected] -'* -'* short description : tools for options tests -'* -'\****************************************************************************** - -sub GetPathList ( ls1 () as String, ls2 () as String, ls3 () as String ) - - Dim lsInterim ( 50 ) as String - Dim i as Integer - Dim sList as String - Dim bNewCreate as Boolean - '///routine to get the correct comparison list for path-options - '///+ if the list does not exist => CreatePathList - '///+ you can find the lists for all languages in separate files - '///+[TesttoolPath]\framework\options\input\paths_[LanguageCode].txt - ls1 (0) = 0 : ls2 (0) = 0 : ls3 (0) = 0 - sList = gTesttoolPath + "framework\optional\input\options\paths_" + iSprache + ".txt" - sList = convertpath( sList ) - - if App.Dir ( sList ) = "" then - bNewCreate = TRUE - CreatePathList - else - bNewCreate = FALSE - end if - - if bAsianLan = TRUE then - select case iSystemSprache - case 01, 33, 34, 39, 46, 49 - ListRead ( lsInterim (), sList, "utf8" ) - case else - - if bNewCreate = FALSE then - CreatePathList - endif - - ListRead ( lsInterim (), sList, "utf8" ) - end select - - else - ListRead ( lsInterim (), sList , "utf8" ) - end if - - for i = 1 to ListCount ( lsInterim () ) - ListAppend ( ls1 (), Left ( lsInterim (i), Instr ( lsInterim (i), ";" ) - 1 ) ) - ListAppend ( ls2 (), Mid ( lsInterim (i), Len ( lsInterim (i) ) - 2, 1 ) ) - ListAppend ( ls3 (), Right ( lsInterim (i), 1 ) ) - next i - -end sub - -'******************************************************************************* +***** sub CreatePathList Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/pbrowser_tools.inc Fri Jan 13 22:02:09 2012 @@ -1,67 +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 : [email protected] -'* -'* short description : Tools for working with the property browser for formcontrols -'* -'\****************************************************************************** - -function hOpenPropertyBrowser() as boolean - - '///<h3>Open the BASIC property browser</h3> - - const CFN = "framework::tools::includes::pbrowser_tools.inc::hOpenPropertyBrowser(): " - - kontext "ControlPropertiesTabControl" - if ( ControlPropertiesTabControl.exists() ) then - printlog( "Property Browser is already open, no action taken" ) - hOpenPropertyBrowser() = true - else - if ( hUseAsyncSlot( "ContextProperties" ) <> -1 ) then - kontext "ControlPropertiesTabControl" - if ( ControlPropertiesTabControl.exists( 2 ) ) then - ControlPropertiesTabControl.setPage( TabGeneralControl ) - hOpenPropertyBrowser() = true - else - warnlog( CFN & "Dialog <ControlPropertiesTabControl> is not available" ) - hOpenPropertyBrowser() = false - endif - else - warnlog( CFN & "Could not execute <ContextProperties> slot" ) - hOpenPropertyBrowser() = false - endif - endif - -end function - -'******************************************************************************* +***** function hClosePropertyBrowser() as boolean Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/private_environment.inc Fri Jan 13 22:02:09 2012 @@ -1,107 +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 : [email protected] -'* -'* short description : Tools to ease working with private environment -'* -'\****************************************************************************** - -function hGetPrivateHttpServer( _proxy as string, _port as string ) as boolean - - - '///<h3>Retrieve the name and port for a private http server</h3><br> - - '///<u>Function parameters:</u><br> - '///<ol> - - '///+<li>Fully qualified server name incl. domain (string)</li> - '///<ul> - '///+<li>The string comes without a protocol part (no http://)</li> - '///</ul> - - '///+<li>Server port (string)</li> - '///<ul> - '///+<li>Please remember limits for integer data type</li> - '///</ul> - - '///</ol> - - '///<u>Returns:</u><br> - - '///<ol> - '///+<li>Error condition (boolean)</li> - '///<ul> - '///+<li>"TRUE": Data was retrieved successfully</li> - '///+<li>"FALSE": Any error </li> - '///</ul> - '///</ol> - - use "global\tools\includes\optional\t_key_tools.inc" - - const CFN = "hGetPrivateHttpServer::" - dim cFile as string - dim cDataSet( 100 ) as string - dim iErr as integer - - '///<u>Description:</u> - '///<ul> - '///+<li>Get the source file</li> - cFile = hGetPrivateInputFile( false ) - printlog( CFN & "Using input file: " & cFile ) - - '///+<li>Retrieve the information from the datafile</li> - iErr = hGetDataFileSection( cFile, cDataSet(), "http_proxy", "", "" ) - if ( iErr = 0 ) then - hGetPrivateHttpServer() = false - exit function - endif - - '///+<li>Extract the proxy name</li> - _proxy = hGetValueForKeyAsString( cDataSet(), "name" ) - - '///+<li>Append the domain</li> - _proxy = _proxy & hGetValueForKeyAsString( cDataSet(), "domain" ) - - '///+<li>Get the port</li> - _port = hGetValueForKeyAsString( cDataSet() , "port" ) - - '///+<li>Print a log</li> - printlog( CFN & _proxy & ":" & _port ) - '///</ul> - - hGetPrivateHttpServer() = true - -end function - -'******************************************************************************* +***** function hGetPrivateFtpServer( _proxy as string, _port as string ) as boolean Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/scriptorganizer_tools.inc Fri Jan 13 22:02:09 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 : [email protected] -'* -'* short description : Test scripting-organizers / document-attached scripts -'* -'\****************************************************************************** - -function hCreateScriptingObject( cName as string ) as boolean - - '///<h3>Create a new scripting object for the current module</h3> - '///<i>Starting point: Script organizer is open, module selected</i><br> - '///<u>Input</u>: - '///<ol> - '///+<li>Name of the module (string)</li> - '///<ul> - '///+<li>Any name the organizer can accept</li> - '///</ul> - '///</ol> - '///<u>Returns</u>: - '///<ol> - '///+<li>Errorcondition</li> - '///<ul> - '///+<li>TRUE on success</li> - '///+<li>FALSE on failure or invalid user input</li> - '///</ul> - '///</ol> - '///<u>Description</u>: - '///<ul> - - - const CFN = "hNewScriptingObject::" - - '///+<li>Verify that the "Create..." button is enabled</li> - if ( PBCreate.isEnabled() ) then - - '///+<li>Click "Create..." to open the naming dialog</li> - hClickButton( PBCreate ) - - '///+<li>Name the new script</li> - Kontext "ScriptNameDlg" - if ( ScriptNameDlg.exists( 2 ) ) then - - EFObjectName.setText( cName ) - ScriptNameDlg.OK() - hCreateScriptingObject() = true - - endif - - else - printlog( CFN & "Button is disabled" ) - hCreateScriptingObject() = false - endif - - '///+<li>Verify that we are back on the script organizer</li> - kontext "ScriptOrganizer" - if ( not ScriptOrganizer.exists( 2 ) ) then - warnlog( CFN & "Could not return to ScriptOrganizer" ) - hCreateScriptingObject() = false - endif - - '///</ul> - -end function - -'******************************************************************************* +***** function hRenameScriptingObject( cName as string ) as boolean Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/spadmin_tools.inc Fri Jan 13 22:02:09 2012 @@ -1,90 +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 : [email protected] -'* -'* short description : helper functions for SPAdmin -'* -'\****************************************************************************** - -function hGetPrinterPosition( cName as string, bWarn as boolean ) as integer - - '///<h3>Find a printer queue in the SpAdmin list</h3> - ' IN: - ' cName = Name of the queue to look for - ' bWarn = if TRUE we warn if the queue does not exist - - const CFN = "hGetPrinterPosition::" - - if ( cName = "" ) then - warnlog( CFN & "Invalid Parameter passed to function: Empty String" ) - hGetPrinterPosition() = -1 - exit function - endif - - dim iCurrentQueue as integer - dim bFound as boolean - dim iPrinterCount as integer - iPrintercount = LBPrinters.getItemCount() - - Kontext "SpAdmin" - bFound = false - - for iCurrentQueue = 1 to iPrinterCount - - wait( 200 ) - - LBPrinters.select( iCurrentQueue ) - if ( LBPrinters.getseltext() = cName ) then - bFound = true - exit for - endif - - next iCurrentQueue - - ' warn if queue was not found and we requested a warning - if ( not bFound and bWarn ) then - iCurrentQueue = 0 - printlog( CFN & "The specified printer queue could not be found" ) - endif - - ' print a message that the printer queue exists - if ( bFound ) then - printlog( CFN & "Printer Queue was found at pos " & iCurrentQueue ) - endif - - Kontext "SpAdmin" - hGetPrinterPosition() = iCurrentQueue - -end function - -'******************************************************************************* +***** function hDelPrinter( cPrinterName as string ) as integer Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/template_tools.inc Fri Jan 13 22:02:09 2012 @@ -1,133 +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 : [email protected] -'* -'* short description : Helper functions to ease usage of templates -'* -'\****************************************************************************** - -function hFindTemplate( sTemplateName as string ) as integer - - '///<H3>Find a template by name in FileNewFromTemplate</H3> - '///<i>Starting point: Templates and Documents dialog</i><br> - '///<u>Input</u>: - '///<ol> - '///+<li> Name of the template to search for (string)</li> - '///</ol> - '///<u>Returns</u>: - '///<ol> - '///+<li> Index of the Template in the containing folder (integer)</li> - '///<ul> - '///+<li>1 ... n : Index of the template (Position in folder)</li> - '///+<li>0 : No template found by given name</li> - '///</ul> - '///</ol> - '///<u>Description</u>: - '///<ul> - const CFN = "hFindTemplate::" - - dim brc as boolean - brc = false - dim irc as integer - irc = 0 - - dim iObjectFolder as integer - dim iObjectFolders as integer - - dim iItemCount as integer - dim iCurrentItem as integer - dim cCurrentItem as string - - '///+<li>select the templates from the category list</li> - hSelectCategory( "TEMPLATES" ) - - '///+<li>run through every item in the list to find the template.</li> - ' NOTE: If the name of the template is not unique, the function will find - ' the first occurrence - ' NOTE: As we do not know the name of "My Templates" (it is localized) we - ' need to search all folders.. - iObjectFolders = FileList.getItemCount() - - '///<ul> - for iObjectFolder = 1 to iObjectFolders - - '///+<li>Select the (next) folder</li> - hSelectFileFolder( iObjectFolder , true ) - - '///+<li>Retrieve the number of items within the folder</li> - iItemCount = FileList.getItemCount() - - '///+<li>For each item in the folder do:</li> - '///<ul> - for iCurrentItem = 1 to iItemCount - - '///+<li>Select the (next) item</li> - FileList.select( iCurrentItem ) - - '///+<li>Get the name of the item</li> - cCurrentItem = FileList.getSelText() - - '///+<li>If this is the item we are searching for, exit</li> - if ( cCurrentItem = sTemplateName ) then - irc = iCurrentItem : if ( irc = 0 ) then irc = 1 ' strange hack - brc = true - exit for - endif - - next iCurrentItem - '///</ul> - - '///+<li>Exit the outer loop</li> - if ( brc ) then - exit for - endif - - '///+<li>Click "Up one level"</li> - UpOneLevel.click() - - next iObjectFolder - '///</ul> - - if ( brc ) then - printlog( CFN & "Template found: " & cCurrentItem ) - else - printlog( CFN & "Template could not be found." ) - endif - - '///+<li>Return the index of the requested template</li> - hFindTemplate() = irc - '///</ul> - -end function -'******************************************************************************* +***** function hSelectCategory( cCategory as string ) as boolean Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/toolbar_tools.inc Fri Jan 13 22:02:09 2012 @@ -1,92 +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 : [email protected] -'* -'* short description : global update test (Standardbar) -'* -'\*************************************************************************** - -function hAccessStandardBar() as boolean - - '///<h3>Verify that the Standard Bar exists</h3> - '///<i>This function works for all gApplications</i><br> - '///<u>Input</u>: - '///<ol> - '///+<li>Nothing</li> - '///</ol> - '///<u>Returns</u>: - '///<ol> - '///+<li>Errorcondition (boolean)</li> - '///<ul> - '///+<li>TRUE if StandardBar exists</li> - '///+<li>FALSE if standardBar does not exist</li> - '///</ul> - '///</ol> - '///<u>Description</u>: - '///<ul> - const CFN = "hAccessStandardBar::" - dim brc as boolean - - printlog( CFN & "Enter" ) - - '///+<li>Open a new document</li> - hCreateDocument() - - '///+<li>Try to access the standardbar (query .exists())</li> - kontext "StandardBar" - if ( StandardBar.exists() ) then - if ( standardbar.isVisible() ) then - printlog( CFN & "StandardBar is visible. Good." ) - brc = true - else - warnlog( "The StandardBar is not visible in " & gApplication ) - brc = false - endif - else - warnlog( "The StandardBar does not exist in " & gApplication ) - brc = false - endif - - '///+<li>Close the navigator</li> - kontext "Navigator" - hCloseDialog( Navigator, "close,optional" ) - - '///+<li>Close the document</li> - hDestroyDocument() - hAccessStandardBar() = brc - printlog( CFN & "Exit" ) - '///</ul> - -end function - -'******************************************************************************* +***** function hResetStandardBar() as boolean Modified: incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc?rev=1231333&r1=1231332&r2=1231333&view=diff ============================================================================== --- incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc (original) +++ incubator/ooo/trunk/main/testautomation/framework/tools/includes/wizards.inc Fri Jan 13 22:02:09 2012 @@ -1,126 +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 : [email protected] -'* -'* short description : helper functions for the wizards -'* -'\****************************************************************************** - -function hWaitForWizard() as integer - - const CFN = "hWaitForWizard::" - const MAXTRIES = 10 - - '///<h3>Wait for any wizard to open</h3> - '///<i>Uses: framework/tools/input/menuentries.txt</i><br> - '///<i>NOTE: Not all wizards are known to this function yet.</i><br> - '///<u>Input</u>: - '///<ol> - '///+<li>Nothing</li> - '///</ol> - '///<u>Returns</u>: - '///<ol> - '///+<li>Unique ID of the open wizard</li> - '///<ul> - '///+<li>0: In case of any error</li> - '///+<li>1-n: The unique ID of the currently open wizard (integer)</li> - '///+</ul> - '///</ol> - '///<u>Description</u>: - '///<ul> - - dim iOpen as integer - dim iWait as integer - '///+<li>Determine the open wizard by trying wizard.exists()</li> - for iWait = 1 to MAXTRIES - - iOpen = 0 - - kontext "AutopilotLetter" - if ( AutopilotLetter.exists() ) then - printlog( CFN & "Autopilot Letter is open" ) - iOpen = hGetWizardParams( "LETTER" , "ID" ) - exit for - endif - - kontext "AutopilotFax" - if ( AutopilotFax.exists() ) then - printlog( CFN & "Autopilot Fax is open" ) - iOpen = hGetWizardParams( "FAX" , "ID" ) - exit for - endif - - kontext "AutopilotAgenda" - if ( AutopilotAgenda.exists() ) then - printlog( CFN & "Autopilot Agenda is open" ) - iOpen = hGetWizardParams( "AGENDA" , "ID" ) - exit for - endif - - Kontext "MailMergeWizard" - if ( MailMergeWizard.exists() ) then - printlog( CFN & "Mailmerge Wizard is open" ) - iOpen = hGetWizardParams( "MAILMERGE" , "ID" ) - exit for - endif - - Kontext "AutopilotPraesentation1" - if ( AutopilotPraesentation1.exists() ) then - printlog( CFN & "Presentation Wizard is open" ) - iOpen = hGetWizardParams( "IMPRESS" , "ID" ) - exit for - endif - - Kontext "AutoPilotEuroKonverter" - if ( AutoPilotEuroKonverter.exists() ) then - printlog( CFN & "Euro Converter is open" ) - iOpen = hGetWizardParams( "EUROCONV" , "ID" ) - exit for - endif - - Kontext "DocumentConverter" - if ( DocumentConverter.exists( 1 ) ) then - printlog( CFN & "Document Converter is open" ) - iOpen = hGetWizardParams( "DOCCONV" , "ID" ) - exit for - endif - - next iWait - - hWaitForWizard() = iOpen - '///</ul> - -end function - -'******************************************************************************* +***** function hSetTemplateSavePath( cFile as string ) as integer
