diff options
Diffstat (limited to 'qadevOOo/tests/basic/ifc/form')
82 files changed, 3366 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/ifc/form/DataAwareControlModel/form_DataAwareControlModel.xba b/qadevOOo/tests/basic/ifc/form/DataAwareControlModel/form_DataAwareControlModel.xba new file mode 100644 index 000000000000..0c9db8458419 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/DataAwareControlModel/form_DataAwareControlModel.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_DataAwareControlModel" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.DataAwareControlModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("DataField") + + PropertyTester.TestProperty("BoundField") + + PropertyTester.TestProperty("LabelControl") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/DataAwareControlModel/script.xlb b/qadevOOo/tests/basic/ifc/form/DataAwareControlModel/script.xlb new file mode 100644 index 000000000000..cbe78d65b476 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/DataAwareControlModel/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_DataAwareControlModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_DataAwareControlModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/FormComponent/form_FormComponent.xba b/qadevOOo/tests/basic/ifc/form/FormComponent/form_FormComponent.xba new file mode 100644 index 000000000000..f11a8be4f78d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/FormComponent/form_FormComponent.xba @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_FormComponent" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.FormComponent +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("Name") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/FormComponent/script.xlb b/qadevOOo/tests/basic/ifc/form/FormComponent/script.xlb new file mode 100644 index 000000000000..f999080e1a7b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/FormComponent/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_FormComponent" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_FormComponent"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/FormControlModel/form_FormControlModel.xba b/qadevOOo/tests/basic/ifc/form/FormControlModel/form_FormControlModel.xba new file mode 100644 index 000000000000..53bedcab043b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/FormControlModel/form_FormControlModel.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_FormControlModel" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.FormControlModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + PropertyTester.TestProperty("ClassId") + + PropertyTester.TestProperty("TabIndex") + + PropertyTester.TestProperty("Tag") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/FormControlModel/script.xlb b/qadevOOo/tests/basic/ifc/form/FormControlModel/script.xlb new file mode 100644 index 000000000000..a6243bd9efbe --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/FormControlModel/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_FormControlModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_FormControlModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XApproveActionBroadcaster/form_XApproveActionBroadcaster.xba b/qadevOOo/tests/basic/ifc/form/XApproveActionBroadcaster/form_XApproveActionBroadcaster.xba new file mode 100644 index 000000000000..0ef5c09973a3 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XApproveActionBroadcaster/form_XApproveActionBroadcaster.xba @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XApproveActionBroadcaster" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +Dim L1called as Boolean +Dim L2called as Boolean + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XApproveActionBroadcaster +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim list1 As Object, list2 As Object + + Test.StartMethod("addApproveActionListener()") + bOK = true + + list1 = createUnoListener("L1_", "com.sun.star.form.XApproveActionListener") + list2 = createUnoListener("L2_", "com.sun.star.form.XApproveActionListener") + + oObj.addApproveActionListener(list1) + oObj.addApproveActionListener(list2) + + Test.StartMethod("removeApproveActionListener()") + + oObj.removeApproveActionListener(list1) + + L1called = false + L2called = false + + Out.Log("The action for listener calling must be perfomed interactively") + bOK = bOK AND L2called + Test.MethodTested("addApproveActionListener()", TRUE) + + bOK = bOK AND NOT L1called + Test.MethodTested("removeApproveActionListener()", TRUE) + + oObj.removeApproveActionListener(list2) + + Out.Log("Skipping all XApproveActionBroadcaster methods, since they need user interaction") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + + +Function L1_approveAction() As Boolean + L1called = true + Out.Log("Listener 1 is called") + L1_approveAction = true +End Function + +Function L2_approveAction() As Boolean + L2called = true + Out.Log("Listener 2 is called") + L2_approveAction = true +End Function +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XApproveActionBroadcaster/script.xlb b/qadevOOo/tests/basic/ifc/form/XApproveActionBroadcaster/script.xlb new file mode 100644 index 000000000000..5d5f874e601f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XApproveActionBroadcaster/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XApproveActionBroadcaster" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XApproveActionBroadcaster"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XBoundComponent/form_XBoundComponent.xba b/qadevOOo/tests/basic/ifc/form/XBoundComponent/form_XBoundComponent.xba new file mode 100644 index 000000000000..905a7717374e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XBoundComponent/form_XBoundComponent.xba @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XBoundComponent" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Sub prepareCommit() +' Function checkCommit() As Boolean + +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XBoundComponent +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("commit()") + bOK = true + + prepareCommit() + + bOK = bOK AND oObj.commit() + + bOK = bOK AND checkCommit() + Test.MethodTested("commit()", bOK) + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XBoundComponent/script.xlb b/qadevOOo/tests/basic/ifc/form/XBoundComponent/script.xlb new file mode 100644 index 000000000000..8923e06adb1b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XBoundComponent/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XBoundComponent" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XBoundComponent"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XBoundControl/form_XBoundControl.xba b/qadevOOo/tests/basic/ifc/form/XBoundControl/form_XBoundControl.xba new file mode 100644 index 000000000000..8e422769893d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XBoundControl/form_XBoundControl.xba @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XBoundControl" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XBoundControl +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim old As Boolean, res As Boolean + + + Test.StartMethod("getLock()") + bOK = true + old = oObj.getLock() + Test.MethodTested("getLock()", bOK) + + Test.StartMethod("setLock()") + bOK = true + oObj.setLock(NOT old) + res = oObj.getLock() + bOK = bOK AND (NOT old = res) + Test.MethodTested("setLock()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XBoundControl/script.xlb b/qadevOOo/tests/basic/ifc/form/XBoundControl/script.xlb new file mode 100644 index 000000000000..51aa56875df6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XBoundControl/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XBoundControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XBoundControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XChangeBroadcaster/form_XChangeBroadcaster.xba b/qadevOOo/tests/basic/ifc/form/XChangeBroadcaster/form_XChangeBroadcaster.xba new file mode 100644 index 000000000000..ea8649cafa1f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XChangeBroadcaster/form_XChangeBroadcaster.xba @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XChangeBroadcaster" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XChangeBroadcaster +'************************************************************************* +On Error Goto ErrHndl + Dim list1 As Object, list2 As Object + Dim bOK As Boolean + + + Test.StartMethod("addChangeListener()") + bOK = true + + + list1 = createUnoListener("L1_", "com.sun.star.form.XChangeListener") + list2 = createUnoListener("L2_", "com.sun.star.form.XChangeListener") + + oObj.addChangeListener(list1) + oObj.addChangeListener(list2) + + Test.StartMethod("removeChangeListener()") + + oObj.removeChangeListener(list1) + + L1called = false + L2called = false + + Out.Log("The action for listener calling must be perfomed interactively") + + bOK = bOK AND L2called + Test.MethodTested("addChangeListener()", bOK) + + bOK = bOK AND NOT L1called + Test.MethodTested("removeChangeListener()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Dim L1called as Boolean +Dim L2called as Boolean + +Sub L1_disposing() +End Sub + +Sub L2_disposing() +End Sub + +Sub L1_changed() + L1called = true + +End Sub + +Sub L2_changed() + L2called = true + +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XChangeBroadcaster/script.xlb b/qadevOOo/tests/basic/ifc/form/XChangeBroadcaster/script.xlb new file mode 100644 index 000000000000..0d0a0564d411 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XChangeBroadcaster/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XChangeBroadcaster" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XChangeBroadcaster"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XFormController/form_XFormController.xba b/qadevOOo/tests/basic/ifc/form/XFormController/form_XFormController.xba new file mode 100644 index 000000000000..d36eb98b1bb6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XFormController/form_XFormController.xba @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XFormController" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global otherWin As Object + +'************************************************************************* + + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XFormController +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim cntrl As Object + Dim list1 As Object, list2 As Object + + Test.StartMethod("getCurrentControl()") + bOK = true + cntrl = oObj.getCurrentControl() + bOK = bOK AND NOT isNull(cntrl) + Test.MethodTested("getCurrentControl()", bOK) + + Test.StartMethod("addActivateListener()") + bOK = true + list1 = createUnoListener("L1_", "com.sun.star.form.XFormControllerListener") + list2 = createUnoListener("L2_", "com.sun.star.form.XFormControllerListener") + oObj.addActivateListener(list1) + oObj.addActivateListener(list2) + + Test.StartMethod("removeActivateListener()") + oObj.removeActivateListener(list1) + + if NOT hasUnoInterfaces(cntrl, "com.sun.star.awt.XWindow") then + Out.Log("The oObj.getCurrentControl() return object doesn't support") + Out.Log("com.sun.star.awt.XWindow interface required for testing !!!") + Out.Log("Interface test must be redesigned thus !!!") + else + cntrl.setFocus() + wait(500) + otherWin.setFocus() + wait(500) + end if + + Test.MethodTested("addActivateListener()", L2called) + Test.MethodTested("removeActivateListener()", _ + L2called AND NOT L1called) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Dim L1called As Boolean +Dim L2called As Boolean + +Sub L1_formActivated(ev As Object) + L1called = true + Out.Log("L1 activated Called !!!!!!!!!") +end Sub + +Sub L1_formDeactivated(ev As Object) + L1called = true + Out.Log("L1 deactivated Called !!!!!!!!!") +end Sub + +Sub L2_formActivated() + L2called = true + Out.Log("L2 activated Called !!!!!!!!!") +end Sub + +Sub L2_formDeactivated() + L2called = true + Out.Log("L2 deactivated Called !!!!!!!!!") +end Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XFormController/script.xlb b/qadevOOo/tests/basic/ifc/form/XFormController/script.xlb new file mode 100644 index 000000000000..e917316626d8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XFormController/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XFormController" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XFormController"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XFormsSupplier/form_XFormsSupplier.xba b/qadevOOo/tests/basic/ifc/form/XFormsSupplier/form_XFormsSupplier.xba new file mode 100644 index 000000000000..7331731b5827 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XFormsSupplier/form_XFormsSupplier.xba @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XFormsSupplier" script:language="StarBasic"> + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + +' Be sure that all variables are dimensioned: +option explicit + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XFormsSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oForms as Object +' + Test.StartMethod("getForms()") + bOK = TRUE + oForms = oObj.getForms() + bOK = bOK AND hasUnoInterfaces(oForms, "com.sun.star.container.XNameContainer") + Test.MethodTested("getForms()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XFormsSupplier/script.xlb b/qadevOOo/tests/basic/ifc/form/XFormsSupplier/script.xlb new file mode 100644 index 000000000000..40d6cbcd2aa6 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XFormsSupplier/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> + <library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XFormsSupplier" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="form_XFormsSupplier"/> + </library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XGrid/form_XGrid.xba b/qadevOOo/tests/basic/ifc/form/XGrid/form_XGrid.xba new file mode 100644 index 000000000000..05bf75dda434 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XGrid/form_XGrid.xba @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XGrid" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XGrid +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oldPos As Long, newPos as Long, getPos as Long + + Test.StartMethod("getCurrentColumnPosition()") + Test.StartMethod("setCurrentColumnPosition()") + + bOK = true + oldPos = oObj.getCurrentColumnPosition() + if oldPos = 0 then newPos = 1 else newPos = 0 + oObj.setCurrentColumnPosition(newPos) + getPos = oObj.getCurrentColumnPosition() + + bOK = bOK AND (newPos = getPos) + Out.Log("Position was " + oldPos + ", set to " + newPos + _ + ", get " + getPos) + + Test.MethodTested("getCurrentColumnPosition()", bOK) + Test.MethodTested("setCurrentColumnPosition()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XGrid/script.xlb b/qadevOOo/tests/basic/ifc/form/XGrid/script.xlb new file mode 100644 index 000000000000..6cd1f0fe06df --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XGrid/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XGrid" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XGrid"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XGridColumnFactory/form_XGridColumnFactory.xba b/qadevOOo/tests/basic/ifc/form/XGridColumnFactory/form_XGridColumnFactory.xba new file mode 100644 index 000000000000..d5a0ee2539b4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XGridColumnFactory/form_XGridColumnFactory.xba @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XGridColumnFactory" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XGridColumnFactory +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim aTypes As Variant + Dim nCount As Integer + + Test.StartMethod("createColumn()") + bOK = true + bOk = bOK AND isObject(oObj.createColumn("CheckBox")) + Test.MethodTested("createColumn()", bOK) + + Test.StartMethod("getColumnTypes()") + bOK = true + bOK = bOK AND (uBound(oObj.getColumnTypes()) >= 1) + Test.MethodTested("getColumnTypes()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XGridColumnFactory/script.xlb b/qadevOOo/tests/basic/ifc/form/XGridColumnFactory/script.xlb new file mode 100644 index 000000000000..601f0fd987d8 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XGridColumnFactory/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XGridColumnFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XGridColumnFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XGridFieldDataSupplier/form_XGridFieldDataSupplier.xba b/qadevOOo/tests/basic/ifc/form/XGridFieldDataSupplier/form_XGridFieldDataSupplier.xba new file mode 100644 index 000000000000..92f9a21b2006 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XGridFieldDataSupplier/form_XGridFieldDataSupplier.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XGridFieldDataSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XGridFieldDataSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim types As Variant + Dim data As Variant + Dim tmp as String + Dim i as Integer + Dim fieldCount as Integer + Dim row As Long + Dim dat As Variant + + Test.StartMethod("queryFieldDataType()") + bOK = true + types = oObj.queryFieldDataType(oCoreRefl.forName("string")) + + tmp = "" + fieldCount = 0 + for i = lbound(types()) to ubound(types()) + tmp = tmp + " " + types(i) + if types(i) then fieldCount = fieldCount + 1 + next i + Out.Log("array returned : (" + tmp + ")") + bOK = bOK AND (ubound(types()) > 0) + + Test.MethodTested("queryFieldDataType()", bOK) + + Test.StartMethod("queryFieldData()") + bOK = true + row = 1 + dat = oObj.queryFieldData(row, oCoreRefl.forName("string")) + if isNull(dat) OR isEmpty(dat) then + Out.Log("NULL value returned.") + bOK = false + else + Out.Log("The length of array returned :" + (ubound(data()) + 1) + bOK = bOK AND ((ubound(data()) + 1) = fieldCount) + end if + Test.MethodTested("queryFieldData()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XGridFieldDataSupplier/script.xlb b/qadevOOo/tests/basic/ifc/form/XGridFieldDataSupplier/script.xlb new file mode 100644 index 000000000000..1d5d8440227a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XGridFieldDataSupplier/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XGridFieldDataSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XGridFieldDataSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XImageProducerSupplier/form_XImageProducerSupplier.xba b/qadevOOo/tests/basic/ifc/form/XImageProducerSupplier/form_XImageProducerSupplier.xba new file mode 100644 index 000000000000..5bbab625e604 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XImageProducerSupplier/form_XImageProducerSupplier.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XImageProducerSupplier" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XImageProducerSupplier +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oProducer As Object + + Test.StartMethod("getImageProducer()") + bOK = true + oProducer = oObj.getImageProducer() + bOK = bOK AND NOT isNull(oProducer) + bOK = bOK AND hasUnoInterfaces(oProducer, "com.sun.star.awt.XImageProducer") + Test.MethodTested("getImageProducer()", bOK) + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XImageProducerSupplier/script.xlb b/qadevOOo/tests/basic/ifc/form/XImageProducerSupplier/script.xlb new file mode 100644 index 000000000000..fe2be29da26d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XImageProducerSupplier/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XImageProducerSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XImageProducerSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XLoadListener/form_XLoadListener.xba b/qadevOOo/tests/basic/ifc/form/XLoadListener/form_XLoadListener.xba new file mode 100644 index 000000000000..1e94cd458653 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XLoadListener/form_XLoadListener.xba @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XLoadListener" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XLoadListener +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + + Test.StartMethod("loaded()") + bOK = true + Out.Log("nothing to test here") + Test.MethodTested("loaded()", bOK) + + Test.StartMethod("unloading()") + bOK = true + Out.Log("nothing to test here") + Test.MethodTested("unloading()", bOK) + + Test.StartMethod("unloaded()") + bOK = true + Out.Log("nothing to test here") + Test.MethodTested("unloaded()", bOK) + + Test.StartMethod("reloading()") + bOK = true + Out.Log("nothing to test here") + Test.MethodTested("reloading()", bOK) + + Test.StartMethod("reloaded()") + bOK = true + Out.Log("nothing to test here") + Test.MethodTested("reloaded()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XLoadListener/script.xlb b/qadevOOo/tests/basic/ifc/form/XLoadListener/script.xlb new file mode 100644 index 000000000000..5848d5f258f7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XLoadListener/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XLoadListener" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XLoadListener"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XLoadable/form_XLoadable.xba b/qadevOOo/tests/basic/ifc/form/XLoadable/form_XLoadable.xba new file mode 100644 index 000000000000..d1d9e77f8f28 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XLoadable/form_XLoadable.xba @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XLoadable" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XLoadable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim bLoaded As Boolean + Dim list As Object + + list = createUnoListener("L_", "com.sun.star.form.XLoadListener") + initListener() + + Test.StartMethod("isLoaded()") + bOK = true + bLoaded = oObj.isLoaded() + if bLoaded then oObj.unload() + bLoaded = oObj.isLoaded() + bOK = bOK AND NOT bLoaded + Test.MethodTested("isLoaded()", bOK) + + Test.StartMethod("addLoadListener()") + oObj.addLoadListener(list) + + Test.StartMethod("load()") + bOK = true + oObj.load() + bOK = bOK AND oObj.isLoaded() + bOK = bOK AND loaded + Test.MethodTested("load()", bOK) + + Test.StartMethod("reload()") + bOK = true + oObj.reload() + bOK = bOK AND oObj.isLoaded() + bOK = bOK AND reloaded + Test.MethodTested("reload()", bOK) + + Test.StartMethod("unload()") + bOK = true + oObj.unload() + bOK = bOK AND NOT oObj.isLoaded() + bOK = bOK AND unloaded + Test.MethodTested("unload()", bOK) + + bOK = loaded AND reloaded AND reloading AND unloaded AND unloading + Test.MethodTested("addLoadListener()", bOK) + + Test.StartMethod("removeLoadListener()") + bOK = true + oObj.removeLoadListener(list) + initListener() + oObj.load() + bOK = bOK AND NOT loaded + Test.MethodTested("removeLoadListener()", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Sub initListener() + loaded = false + reloaded = false + reloading = false + unloaded = false + unloading = false +End Sub + +Dim loaded As Boolean +Dim reloaded As Boolean +Dim reloading As Boolean +Dim unloaded As Boolean +Dim unloading As Boolean + +Sub L_loaded() + Out.Log("Listener: loaded") + loaded = true +End Sub +Sub L_reloaded() + Out.Log("Listener: reloaded") + reloaded = true +End Sub +Sub L_reloading() + Out.Log("Listener: reloading") + reloading = true +End Sub +Sub L_unloaded() + Out.Log("Listener: unloaded") + unloaded = true +End Sub +Sub L_unloading() + Out.Log("Listener: unloading") + unloading = true +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XLoadable/script.xlb b/qadevOOo/tests/basic/ifc/form/XLoadable/script.xlb new file mode 100644 index 000000000000..ca0a5811fed2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XLoadable/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XLoadable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XLoadable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XReset/form_XReset.xba b/qadevOOo/tests/basic/ifc/form/XReset/form_XReset.xba new file mode 100644 index 000000000000..dddd3f2bdc1d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XReset/form_XReset.xba @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XReset" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +Dim nCB1Val as Integer, nCB2Val As Integer + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XReset +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oListener1 as Object, oListener2 As Object + Dim nCount As Integer + + bOK = true + nCount = 0 'oCollection.count + nCB1Val = 0 + nCB2Val = 0 + + Out.Log("create two listeners...") + oListener1 = createUNOListener("CB1_", "com.sun.star.form.XResetListener") + oListener2 = createUNOListener("CB2_", "com.sun.star.form.XResetListener") + + ' add listeners to objectif initialized + if NOT (isNull(oListener1)) then + oObj.addResetListener(oListener1) + end if + if NOT (isNull(oListener2)) then + oObj.addResetListener(oListener2) + end if + + + Test.StartMethod("addResetListener()") + oObj.reset() + wait(1000) + bOK = bOK AND (nCB1Val = 1) AND (nCB2Val = 1) + Test.MethodTested("addResetListener()", bOK) + + Test.StartMethod("removeResetListener()") + Out.Log("removing Listener 2") + oObj.removeResetListener(oListener2) + oObj.reset() + wait(1000) + bOK = bOK AND (nCB1Val = 2) AND (nCB2Val = 1) + Test.MethodTested("removeResetListener()", bOK) + + Test.StartMethod("reset()") + bOK = bOK AND (nCB1Val = 2) AND (nCB2Val = 1) + Test.MethodTested("reset()", bOK) + + Out.Log("removing Listener 1") + oObj.removeResetListener(oListener1) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +' callback routine called resetting for listener1 +Sub CB1_resetted + Out.Log("Callback CB1 resetted") + nCB1Val = nCB1Val + 1 +End Sub' callback routine called resetting for listener2 + +Sub CB2_resetted + Out.Log("Callback CB2 resetted") + nCB2Val = nCB2Val + 1 +End Sub + +' callback routine is invoked before resetting a component. +Function CB1_approveReset() as Boolean + Out.Log("Callback CB1 approve Reset") + CB1_approveReset = true +end Function + +Function CB2_approveReset() as Boolean + Out.Log("Callback CB2 approve Reset") + CB2_approveReset = true +end Function +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XReset/script.xlb b/qadevOOo/tests/basic/ifc/form/XReset/script.xlb new file mode 100644 index 000000000000..a50d97e7218d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XReset/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XReset" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XReset"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XSubmit/form_XSubmit.xba b/qadevOOo/tests/basic/ifc/form/XSubmit/form_XSubmit.xba new file mode 100644 index 000000000000..596faa3e214e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XSubmit/form_XSubmit.xba @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XSubmit" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XSubmit +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim list1 As Object, list2 As Object + Dim event As new com.sun.star.awt.MouseEvent + + Test.StartMethod("addSubmitListener()") + + l1Called = 0 : l2Called = 0 + + bOK = true + list1 = createUnoListener("L1_", "com.sun.star.form.XSubmitListener") + list2 = createUnoListener("L2_", "com.sun.star.form.XSubmitListener") + + Out.Log("add two listeners") + oObj.addSubmitListener(list1) + oObj.addSubmitListener(list2) + + Test.StartMethod("removeSubmitListener()") + Out.Log("remove listener 1") + oObj.removeSubmitListener(list1) + + Test.StartMethod("submit()") + + l1Called = false + l2Called = false + + oObj.TargetURL = "someserver" + oObj.submit(NULL_OBJECT, event) + + wait(500) + + Out.Log("Listener1 was called " + l1Called + " times." + Out.Log("Listener2 was called " + l2Called + " times." + + Test.MethodTested("addSubmitListener()", l2Called = 1) + Test.MethodTested("submit()", l2Called > 0) + Test.MethodTested("removeSubmitListener()", l1Called = 0) + + Out.Log("remove listener 2") + oObj.removeSubmitListener(list2) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub + +Dim l1Called As Integer +Dim l2Called As Integer + +Function L1_approveSubmit() As Boolean + l1Called = l1Called + 1 + L1_approveSubmit = true +End Function + +Function L2_approveSubmit() As Boolean + l2Called = l2Called + 1 + L2_approveSubmit = true +End Function +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XSubmit/script.xlb b/qadevOOo/tests/basic/ifc/form/XSubmit/script.xlb new file mode 100644 index 000000000000..6950c8f3fac2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XSubmit/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XSubmit" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XSubmit"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/XUpdateBroadcaster/form_XUpdateBroadcaster.xba b/qadevOOo/tests/basic/ifc/form/XUpdateBroadcaster/form_XUpdateBroadcaster.xba new file mode 100644 index 000000000000..818646f50657 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XUpdateBroadcaster/form_XUpdateBroadcaster.xba @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_XUpdateBroadcaster" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + +'************************************************************************* +' This Interface/Service test depends on the following GLOBAL variables, +' which must be specified in the object creation: + +' - Global bCustomUpdate As Boolean +' properties are not changed to call listener +' Sub UpdateComponent() + +'************************************************************************* + + + + +Const BOUND = 2 +Const CONSTRAINED = 4 +Const MAYBENULL = 8 +Const READONLY = 16 + +Dim oListener1 As Object +Dim oListener2 As Object +Dim nCB1appVal As Boolean +Dim nCB2appVal As Boolean +Dim nCB1updVal As Boolean +Dim nCB2updVal As Boolean + + +Sub RunTest() + +'************************************************************************* +' INTERFACE: +' com.sun.star.form.XUpdateBroadcaster +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim bAllOK As Boolean + + Out.Log("Creating Listeners...") + oListener1 = createUNOListener("CB1_","com.sun.star.form.XUpdateListener") + oListener2 = createUNOListener("CB2_","com.sun.star.form.XUpdateListener") + bOK = NOT isNULL(oListener1) AND NOT isNULL(oListener2) + + CountersReset() + + bAllOK = bOK + + Test.StartMethod("addUpdateListener()") + bOK = true + oObj.addUpdateListener(oListener1) + oObj.addUpdateListener(oListener2) + + if bCustomUpdate then + Out.Log("Object specific update function was called.") + UpdateComponent() + else + Out.Log("Interfacetest update function was called.") + TryToUpdate() + end if + wait(1000) + + bOK = bOK AND nCB1appVal AND nCB2appVal AND nCB1updVal AND nCB2updVal + + Test.MethodTested("addUpdateListener()", bOK) + + Test.StartMethod("removeUpdateListener()") + bOK = true + Out.Log("Removing Listener 1") + oObj.removeUpdateListener(oListener1) + countersReset() + + if bCustomUpdate then + Out.Log("Object specific update function was called.") + UpdateComponent() + else + Out.Log("Interfacetest update function was called.") + TryToUpdate() + end if + wait(1000) + + bOK = bOK AND NOT nCB1appVal AND nCB2appVal AND NOT nCB1updVal AND nCB2updVal + Test.MethodTested("removeUpdateListener()", bOK) + + Out.Log("Removing Listener 2") + oObj.removeUpdateListener(oListener2) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +Function CB1_approveUpdate As Boolean + Out.Log("CallBack for Listener1 approveUpdate was called.") + nCB1appVal = TRUE + CB1_approveUpdate = TRUE +End Function + +Function CB2_approveUpdate As Boolean + Out.Log("CallBack for Listener2 approveUpdate was called.") + nCB2appVal = TRUE + CB2_approveUpdate = TRUE +End Function + +Sub CB1_Updated + Out.Log("CallBack for Listener1 Updated was called.") + nCB1updVal = TRUE +End Sub + +Sub CB2_Updated + Out.Log("CallBack for Listener2 Updated was called.") + nCB2updVal = TRUE +End Sub + +Sub TryToUpdate() + Dim i as Integer + Dim props as Variant, attr As Variant + + if hasUnoInterfaces(oObj, "com.sun.star.beans.XPropertySet") then + props() = oObj.getPropertySetInfo().getProperties() + + for i = lbound(props()) to ubound(props()) + PropertyTester.TestProperty(props(i).Name) + next i + else + Out.Log("XPropertySet isn't supported.") + end if +End Sub + +Sub countersReset() + nCB1updVal = FALSE + nCB2updVal = FALSE + nCB1appVal = FALSE + nCB2appVal = FALSE +End sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/XUpdateBroadcaster/script.xlb b/qadevOOo/tests/basic/ifc/form/XUpdateBroadcaster/script.xlb new file mode 100644 index 000000000000..d0484c6b2661 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/XUpdateBroadcaster/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_XUpdateBroadcaster" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_XUpdateBroadcaster"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/CheckBox/form_component_CheckBox.xba b/qadevOOo/tests/basic/ifc/form/component/CheckBox/form_component_CheckBox.xba new file mode 100644 index 000000000000..9ef151888d79 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/CheckBox/form_component_CheckBox.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_CheckBox" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.CheckBox +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("DefaultState") + + PropertyTester.TestProperty("RefValue") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/CheckBox/script.xlb b/qadevOOo/tests/basic/ifc/form/component/CheckBox/script.xlb new file mode 100644 index 000000000000..e67dd95c1988 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/CheckBox/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_CheckBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_CheckBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/ComboBox/form_component_ComboBox.xba b/qadevOOo/tests/basic/ifc/form/component/ComboBox/form_component_ComboBox.xba new file mode 100644 index 000000000000..fd80cd4913f9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/ComboBox/form_component_ComboBox.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_ComboBox" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.ComboBox +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("DefaultText") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/ComboBox/script.xlb b/qadevOOo/tests/basic/ifc/form/component/ComboBox/script.xlb new file mode 100644 index 000000000000..9add91431d91 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/ComboBox/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_ComboBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_ComboBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/CommandButton/form_component_CommandButton.xba b/qadevOOo/tests/basic/ifc/form/component/CommandButton/form_component_CommandButton.xba new file mode 100644 index 000000000000..937c8010fe17 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/CommandButton/form_component_CommandButton.xba @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_CommandButton" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.CommandButton +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim n as Integer + + Test.StartMethod("ButtonType") + bOK = true + Dim ButtonTypes(4) as Variant + ButtonTypes(0) = com.sun.star.form.FormButtonType.PUSH + ButtonTypes(1) = com.sun.star.form.FormButtonType.SUBMIT + ButtonTypes(2) = com.sun.star.form.FormButtonType.URL + ButtonTypes(3) = com.sun.star.form.FormButtonType.RESET + + for n = 0 to ubound(ButtonTypes())-1 + oObj.setPropertyValue("ButtonType", _ + createUnoValue("byte", ButtonTypes(n))) + bOK = bOK AND (oObj.getPropertyValue("ButtonType") = ButtonTypes(n)) + next + + Test.MethodTested("ButtonType", bOK) + + PropertyTester.TestProperty("TargetFrame") + + PropertyTester.TestProperty("TargetURL") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/CommandButton/script.xlb b/qadevOOo/tests/basic/ifc/form/component/CommandButton/script.xlb new file mode 100644 index 000000000000..461782f0c8b5 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/CommandButton/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_CommandButton" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_CommandButton"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/CurrencyField/form_component_CurrencyField.xba b/qadevOOo/tests/basic/ifc/form/component/CurrencyField/form_component_CurrencyField.xba new file mode 100644 index 000000000000..d728c99eb801 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/CurrencyField/form_component_CurrencyField.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_CurrencyField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.CurrencyField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim newVal, oldVal As Double + + bOK = true + oldVal = oObj.DefaultValue + Test.StartMethod("DefaultValue") + Out.Log("value before: "+oldVal) + if (oldVal <> 30) then + oObj.DefaultValue = 30 + else + oObj.DefaultValue = 35 + endif + newVal = oObj.DefaultValue + Out.Log("value after: "+newVal) + bOK = bOK AND (newVal <> oldVal) + Test.MethodTested("DefaultValue", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/CurrencyField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/CurrencyField/script.xlb new file mode 100644 index 000000000000..ed12a18c8d2f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/CurrencyField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_CurrencyField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_CurrencyField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DataForm/form_component_DataForm.xba b/qadevOOo/tests/basic/ifc/form/component/DataForm/form_component_DataForm.xba new file mode 100644 index 000000000000..40d43ad36c84 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DataForm/form_component_DataForm.xba @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DataForm" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DataForm +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("MasterFields") + + PropertyTester.TestProperty("DetailFields") + + Test.StartMethod("Cycle") + bOK = true + + oObj.Cycle = com.sun.star.form.TabulatorCycle.RECORDS + bOK = bOK AND oObj.Cycle = com.sun.star.form.TabulatorCycle.RECORDS + + oObj.Cycle = com.sun.star.form.TabulatorCycle.CURRENT + bOK = bOK AND oObj.Cycle = com.sun.star.form.TabulatorCycle.CURRENT + + Test.MethodTested("Cycle", bOK) + + Test.StartMethod("NavigationBarMode") + bOK = true + + oObj.NavigationBarMode = com.sun.star.form.NavigationBarMode.NONE + bOK = bOK AND oObj.NavigationBarMode = com.sun.star.form.NavigationBarMode.NONE + + oObj.NavigationBarMode = com.sun.star.form.NavigationBarMode.CURRENT + bOK = bOK AND oObj.NavigationBarMode = com.sun.star.form.NavigationBarMode.CURRENT + + Test.MethodTested("NavigationBarMode", bOK) + + PropertyTester.TestProperty("AllowInserts") + + PropertyTester.TestProperty("AllowUpdates") + + PropertyTester.TestProperty("AllowDeletes") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DataForm/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DataForm/script.xlb new file mode 100644 index 000000000000..664644c5a8e7 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DataForm/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DataForm" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DataForm"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseComboBox/form_component_DatabaseComboBox.xba b/qadevOOo/tests/basic/ifc/form/component/DatabaseComboBox/form_component_DatabaseComboBox.xba new file mode 100644 index 000000000000..2e7fea0b24ac --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseComboBox/form_component_DatabaseComboBox.xba @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DatabaseComboBox" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DatabaseComboBox +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("ConvertEmptyToNull") + + PropertyTester.TestProperty("ListSource") + + PropertyTester.TestProperty("ListSourceType") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseComboBox/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DatabaseComboBox/script.xlb new file mode 100644 index 000000000000..9a13df9ecbaf --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseComboBox/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DatabaseComboBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DatabaseComboBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseFormattedField/form_component_DatabaseFormattedField.xba b/qadevOOo/tests/basic/ifc/form/component/DatabaseFormattedField/form_component_DatabaseFormattedField.xba new file mode 100644 index 000000000000..04d2e1c889c4 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseFormattedField/form_component_DatabaseFormattedField.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DatabaseFormattedField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DatabaseFormattedField +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("ConvertEmptyToNull") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseFormattedField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DatabaseFormattedField/script.xlb new file mode 100644 index 000000000000..d7a0d5757768 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseFormattedField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DatabaseFormattedField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DatabaseFormattedField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseImageControl/form_component_DatabaseImageControl.xba b/qadevOOo/tests/basic/ifc/form/component/DatabaseImageControl/form_component_DatabaseImageControl.xba new file mode 100644 index 000000000000..728949a09f2f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseImageControl/form_component_DatabaseImageControl.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DatabaseImageControl" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DatabaseImageControl +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("ReadOnly") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseImageControl/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DatabaseImageControl/script.xlb new file mode 100644 index 000000000000..a83e10101fba --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseImageControl/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DatabaseImageControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DatabaseImageControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseListBox/form_component_DatabaseListBox.xba b/qadevOOo/tests/basic/ifc/form/component/DatabaseListBox/form_component_DatabaseListBox.xba new file mode 100644 index 000000000000..de6ec59f2c4a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseListBox/form_component_DatabaseListBox.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DatabaseListBox" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DatabaseListBox +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim newVal, oldVal As Variant + + bOK = true + oldVal = oObj.BoundColumn + Test.StartMethod("BoundColumn") + Out.Log("value before: "+oldVal) + + if (oldVal <> 30) then + oObj.BoundColumn = 30 + else + oObj.BoundColumn = 35 + endif + + newVal = oObj.BoundColumn + Out.Log("value after: "+newVal) + + bOK = bOK AND (newVal <> oldVal) + Test.MethodTested("BoundColumn", bOK) + + PropertyTester.TestProperty("ListSourceType") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseListBox/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DatabaseListBox/script.xlb new file mode 100644 index 000000000000..7f028d823990 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseListBox/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DatabaseListBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DatabaseListBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabasePatternField/form_component_DatabasePatternField.xba b/qadevOOo/tests/basic/ifc/form/component/DatabasePatternField/form_component_DatabasePatternField.xba new file mode 100644 index 000000000000..c8293ba62987 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabasePatternField/form_component_DatabasePatternField.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DatabasePatternField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DatabasePatternField +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("ConvertEmptyToNull") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabasePatternField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DatabasePatternField/script.xlb new file mode 100644 index 000000000000..143700c9c972 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabasePatternField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DatabasePatternField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DatabasePatternField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseTextField/form_component_DatabaseTextField.xba b/qadevOOo/tests/basic/ifc/form/component/DatabaseTextField/form_component_DatabaseTextField.xba new file mode 100644 index 000000000000..8881952ded1d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseTextField/form_component_DatabaseTextField.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DatabaseTextField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DatabaseTextField +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("ConvertEmptyToNull") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DatabaseTextField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DatabaseTextField/script.xlb new file mode 100644 index 000000000000..7b30d30e1de3 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DatabaseTextField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DatabaseTextField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DatabaseTextField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/DateField/form_component_DateField.xba b/qadevOOo/tests/basic/ifc/form/component/DateField/form_component_DateField.xba new file mode 100644 index 000000000000..2f8be6b80641 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DateField/form_component_DateField.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_DateField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.DateField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim newVal, oldVal As Long + + Test.StartMethod("DefaultDate") + bOK = true + oldVal = oObj.DefaultDate + Out.Log("value before: "+oldVal) + if (oldVal <> 111111) then + oObj.DefaultDate = 111111 + else + oObj.DefaultDate = 222222 + endif + newVal = oObj.DefaultDate + Out.Log("value after: "+newVal) + bOK = bOK AND (newVal <> oldVal) + Test.MethodTested("DefaultDate", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/DateField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/DateField/script.xlb new file mode 100644 index 000000000000..4d8344ba21c9 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/DateField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_DateField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_DateField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/FileControl/form_component_FileControl.xba b/qadevOOo/tests/basic/ifc/form/component/FileControl/form_component_FileControl.xba new file mode 100644 index 000000000000..002b38e433b0 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/FileControl/form_component_FileControl.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_FileControl" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.FileControl +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("DefaultText") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/FileControl/script.xlb b/qadevOOo/tests/basic/ifc/form/component/FileControl/script.xlb new file mode 100644 index 000000000000..642acb13e896 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/FileControl/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_FileControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_FileControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/GridControl/form_component_GridControl.xba b/qadevOOo/tests/basic/ifc/form/component/GridControl/form_component_GridControl.xba new file mode 100644 index 000000000000..e35443864828 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/GridControl/form_component_GridControl.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_GridControl" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.GridControl +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("Border") + + PropertyTester.TestProperty("Enabled") + + PropertyTester.TestProperty("FontDescriptor") + + PropertyTester.TestProperty("RowHeight") + + PropertyTester.TestProperty("Tabstop") + + PropertyTester.TestProperty("TextColor") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/GridControl/script.xlb b/qadevOOo/tests/basic/ifc/form/component/GridControl/script.xlb new file mode 100644 index 000000000000..f1a7c5df658f --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/GridControl/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_GridControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_GridControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/HTMLForm/form_component_HTMLForm.xba b/qadevOOo/tests/basic/ifc/form/component/HTMLForm/form_component_HTMLForm.xba new file mode 100644 index 000000000000..e6f3b9711297 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/HTMLForm/form_component_HTMLForm.xba @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_HTMLForm" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.HTMLForm +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("TargetFrame") + + PropertyTester.TestProperty("TargetURL") + + Test.StartMethod("SubmitMethod") + bOK = true + + oObj.SubmitMethod = com.sun.star.form.FormSubmitMethod.GET + bOK = bOK AND oObj.SubmitMethod = com.sun.star.form.FormSubmitMethod.GET + + oObj.SubmitMethod = com.sun.star.form.FormSubmitMethod.POST + bOK = bOK AND oObj.SubmitMethod = com.sun.star.form.FormSubmitMethod.POST + + Test.MethodTested("SubmitMethod", bOK) + + Test.StartMethod("SubmitEncoding") + bOK = true + + oObj.SubmitEncoding = com.sun.star.form.FormSubmitEncoding.URL + bOK = bOK AND oObj.SubmitEncoding = com.sun.star.form.FormSubmitEncoding.URL + + oObj.SubmitEncoding = com.sun.star.form.FormSubmitEncoding.MULTIPART + bOK = bOK AND oObj.SubmitEncoding = com.sun.star.form.FormSubmitEncoding.MULTIPART + + Test.MethodTested("SubmitEncoding", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/HTMLForm/script.xlb b/qadevOOo/tests/basic/ifc/form/component/HTMLForm/script.xlb new file mode 100644 index 000000000000..002789e0051e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/HTMLForm/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_HTMLForm" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_HTMLForm"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/HiddenControl/form_component_HiddenControl.xba b/qadevOOo/tests/basic/ifc/form/component/HiddenControl/form_component_HiddenControl.xba new file mode 100644 index 000000000000..58e460bc3651 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/HiddenControl/form_component_HiddenControl.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_HiddenControl" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.HiddenControl +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("HiddenValue") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/HiddenControl/script.xlb b/qadevOOo/tests/basic/ifc/form/component/HiddenControl/script.xlb new file mode 100644 index 000000000000..4a6708a28552 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/HiddenControl/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_HiddenControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_HiddenControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/ImageButton/form_component_ImageButton.xba b/qadevOOo/tests/basic/ifc/form/component/ImageButton/form_component_ImageButton.xba new file mode 100644 index 000000000000..217989a6c0be --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/ImageButton/form_component_ImageButton.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_ImageButton" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.ImageButton +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + Test.StartMethod("ButtonType") + bOK = true + + oObj.ButtonType = com.sun.star.form.FormButtonType.PUSH + bOK = bOK AND oObj.ButtonType = com.sun.star.form.FormButtonType.PUSH + + oObj.ButtonType = com.sun.star.form.FormButtonType.SUBMIT + bOK = bOK AND oObj.ButtonType = com.sun.star.form.FormButtonType.SUBMIT + + Test.MethodTested("ButtonType", bOK) + + PropertyTester.TestProperty("TargetFrame") + + PropertyTester.TestProperty("TargetURL") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/ImageButton/script.xlb b/qadevOOo/tests/basic/ifc/form/component/ImageButton/script.xlb new file mode 100644 index 000000000000..3a543d2069ad --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/ImageButton/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_ImageButton" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_ImageButton"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/ListBox/form_component_ListBox.xba b/qadevOOo/tests/basic/ifc/form/component/ListBox/form_component_ListBox.xba new file mode 100644 index 000000000000..dd3859fd789d --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/ListBox/form_component_ListBox.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_ListBox" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.ListBox +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim newVal, oldVal As Variant + + bOK = true + Test.StartMethod("DefaultSelection") + + oldVal = oObj.DefaultSelection(0) + Out.Log("value before: "+oldVal) + + if (oldVal <> 3) then + Out.Log("setting to 3") + oObj.DefaultSelection = Array(3) + else + Out.Log("setting to 5") + oObj.DefaultSelection = Array(5) + endif + + newVal = oObj.DefaultSelection(0) + Out.Log("value after: "+newVal) + + bOK = bOK AND (newVal <> oldVal) + Test.MethodTested("DefaultSelection", bOK) + + + PropertyTester.TestProperty("ListSource") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/ListBox/script.xlb b/qadevOOo/tests/basic/ifc/form/component/ListBox/script.xlb new file mode 100644 index 000000000000..10420c2c5b72 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/ListBox/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_ListBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_ListBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/NumericField/form_component_NumericField.xba b/qadevOOo/tests/basic/ifc/form/component/NumericField/form_component_NumericField.xba new file mode 100644 index 000000000000..3346a612858b --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/NumericField/form_component_NumericField.xba @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_NumericField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.NumericField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim newVal, oldVal As Variant + + bOK = true + Test.StartMethod("DefaultValue") + oldVal = oObj.DefaultValue + Out.Log("value before: "+oldVal) + if (oldVal <> 3) then + Out.Log("setting to 3") + oObj.DefaultValue = 3 + else + Out.Log("setting to 5") + oObj.DefaultValue = 5 + endif + newVal = oObj.DefaultValue + Out.Log("value after: "+newVal) + bOK = bOK AND (newVal <> oldVal) + Test.MethodTested("DefaultValue", bOK) + + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/NumericField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/NumericField/script.xlb new file mode 100644 index 000000000000..078c55194b6a --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/NumericField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_NumericField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_NumericField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/PatternField/form_component_PatternField.xba b/qadevOOo/tests/basic/ifc/form/component/PatternField/form_component_PatternField.xba new file mode 100644 index 000000000000..154b73b09bae --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/PatternField/form_component_PatternField.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_PatternField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.PatternField +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("DefaultText") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/PatternField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/PatternField/script.xlb new file mode 100644 index 000000000000..6c5bdae42648 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/PatternField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_PatternField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_PatternField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/RadioButton/form_component_RadioButton.xba b/qadevOOo/tests/basic/ifc/form/component/RadioButton/form_component_RadioButton.xba new file mode 100644 index 000000000000..7f3f60369f5e --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/RadioButton/form_component_RadioButton.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_RadioButton" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.RadioButton +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("DefaultState") + + PropertyTester.TestProperty("RefValue") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/RadioButton/script.xlb b/qadevOOo/tests/basic/ifc/form/component/RadioButton/script.xlb new file mode 100644 index 000000000000..f51b6fb36ba2 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/RadioButton/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_RadioButton" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_RadioButton"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/TextField/form_component_TextField.xba b/qadevOOo/tests/basic/ifc/form/component/TextField/form_component_TextField.xba new file mode 100644 index 000000000000..03f0215bbe96 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/TextField/form_component_TextField.xba @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_TextField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.TextField +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + + PropertyTester.TestProperty("DefaultText") + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/TextField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/TextField/script.xlb new file mode 100644 index 000000000000..c6725494a9ee --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/TextField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_TextField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_TextField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/ifc/form/component/TimeField/form_component_TimeField.xba b/qadevOOo/tests/basic/ifc/form/component/TimeField/form_component_TimeField.xba new file mode 100644 index 000000000000..35ad56c293ae --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/TimeField/form_component_TimeField.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="form_component_TimeField" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + + +Sub RunTest() + +'************************************************************************* +' SERVICE: +' com.sun.star.form.component.TimeField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim newVal, oldVal As Long + + bOK = true + oldVal = oObj.DefaultTime + Test.StartMethod("DefaultTime") + Out.Log("value before: "+oldVal) + if (oldVal <> 4322) then + oObj.DefaultTime = 4321 + else + oObj.DefaultTime = 4322 + endif + newVal = oObj.DefaultTime + Out.Log("value after: "+newVal) + bOK = bOK AND (newVal <> oldVal) + Test.MethodTested("DefaultTime", bOK) + +Exit Sub +ErrHndl: + Test.Exception() + bOK = false + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/ifc/form/component/TimeField/script.xlb b/qadevOOo/tests/basic/ifc/form/component/TimeField/script.xlb new file mode 100644 index 000000000000..8ad20ef90241 --- /dev/null +++ b/qadevOOo/tests/basic/ifc/form/component/TimeField/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="form_component_TimeField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="form_component_TimeField"/> +"</library:library> |