diff options
Diffstat (limited to 'qadevOOo/tests/basic/mod/toolkit')
128 files changed, 5594 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleButton/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleButton/script.xlb new file mode 100644 index 000000000000..a6b222a89e98 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleButton/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="toolkit_AccessibleButton" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleButton"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleButton/toolkit_AccessibleButton.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleButton/toolkit_AccessibleButton.xba new file mode 100644 index 000000000000..cdf6cca0bc2d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleButton/toolkit_AccessibleButton.xba @@ -0,0 +1,90 @@ +<?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="toolkit_AccessibleButton" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +Global accText As String +Global accButton As Object +Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleButton +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + thRunner.initialize(Array("OpenToolkitDialog","slot:5302",oDoc)) + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"OK") + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Cancel") + accText = oObj.getText() + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(oObj) then + oObj.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleCheckBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleCheckBox/script.xlb new file mode 100644 index 000000000000..431bfc1a2fad --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleCheckBox/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="toolkit_AccessibleCheckBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleCheckBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleCheckBox/toolkit_AccessibleCheckBox.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleCheckBox/toolkit_AccessibleCheckBox.xba new file mode 100644 index 000000000000..29cd48ec0f33 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleCheckBox/toolkit_AccessibleCheckBox.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="toolkit_AccessibleCheckBox" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global accButton As Object +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleCheckBox +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + thRunner.initialize(Array("OpenToolkitDialog",".uno:InsertTable",oDoc)) + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.CHECK_BOX) + Out.Log("Implementation name: "+oObj.getImplementationName()) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Cancel") + accText = oObj.getText() + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleComboBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleComboBox/script.xlb new file mode 100644 index 000000000000..0204ce2c78ba --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleComboBox/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="toolkit_AccessibleComboBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleComboBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleComboBox/toolkit_AccessibleComboBox.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleComboBox/toolkit_AccessibleComboBox.xba new file mode 100644 index 000000000000..9c4f8cdd33b7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleComboBox/toolkit_AccessibleComboBox.xba @@ -0,0 +1,92 @@ +<?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="toolkit_AccessibleComboBox" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global accButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleComboBox +'************************************************************************* +On Error Goto ErrHndl + Dim accEdit As Object, oWin As Object + Dim xRoot As Object, oMSF As Object + Dim tk As Object, thRunner As Object + Dim tabControl As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + thRunner.initialize(Array("OpenToolkitDialog",".uno:FontDialog",oDoc)) + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + 'utils.at_printAccessibleTree(xRoot) + tabControl = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PAGE_TAB_LIST) + tabControl.selectAccessibleChild(0) + wait(500) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PANEL,"","AccessibleComboBox") + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Cancel") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownComboBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownComboBox/script.xlb new file mode 100644 index 000000000000..bd6ae8ee8aa3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownComboBox/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="toolkit_AccessibleDropDownComboBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleDropDownComboBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownComboBox/toolkit_AccessibleDropDownComboBox.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownComboBox/toolkit_AccessibleDropDownComboBox.xba new file mode 100644 index 000000000000..123cc23d9224 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownComboBox/toolkit_AccessibleDropDownComboBox.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="toolkit_AccessibleDropDownComboBox" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleDropDownComboBox +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.COMBO_BOX,"","AccessibleDropDownComboBox") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.doAccessibleAction(0) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownListBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownListBox/script.xlb new file mode 100644 index 000000000000..561d9b7bb7e0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownListBox/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="toolkit_AccessibleDropDownListBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleDropDownListBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownListBox/toolkit_AccessibleDropDownListBox.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownListBox/toolkit_AccessibleDropDownListBox.xba new file mode 100644 index 000000000000..997d57d51aac --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleDropDownListBox/toolkit_AccessibleDropDownListBox.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="toolkit_AccessibleDropDownListBox" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleDropDownListBox +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + wait(1000) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.COMBO_BOX,"","AccessibleDropDownListBox") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.doAccessibleAction(0) + wait(500) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleEdit/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleEdit/script.xlb new file mode 100644 index 000000000000..ee0304901c65 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleEdit/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="toolkit_AccessibleEdit" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleEdit"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleEdit/toolkit_AccessibleEdit.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleEdit/toolkit_AccessibleEdit.xba new file mode 100644 index 000000000000..6755e723b91a --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleEdit/toolkit_AccessibleEdit.xba @@ -0,0 +1,111 @@ +<?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="toolkit_AccessibleEdit" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global accButton As Object +Global readOnly as Boolean +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleEdit +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps() + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:HyperlinkDialog" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = tk.getActiveTopWindow + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TEXT) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Close") + Out.Log("Implementation name: "+oObj.getImplementationName()) + + ' because of auto adding http:// in edit field when focus lost + oObj.setText("AccessibleEdit") + wait(500) + accButton.grabFocus() + wait(500) + oObj.grabFocus() + accText = oObj.getText() + + hasChangeableAttrs = false + readOnly = false + else + Out.Log("QueryDispatch FAILED. Cannot open Hyperlink dialog...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleFixedText/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleFixedText/script.xlb new file mode 100644 index 000000000000..d996e6c999d9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleFixedText/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="toolkit_AccessibleFixedText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleFixedText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleFixedText/toolkit_AccessibleFixedText.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleFixedText/toolkit_AccessibleFixedText.xba new file mode 100644 index 000000000000..045837681cdb --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleFixedText/toolkit_AccessibleFixedText.xba @@ -0,0 +1,97 @@ +<?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="toolkit_AccessibleFixedText" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global accButton As Object +Global readOnly as Boolean + +Global oText as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleFixedText +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps() + +' oDoc = utils.createDocument("swriter", cObjectName) + + Dim xText as object + oText = createUnoService("com.sun.star.awt.UnoControlFixedText") + xText = createUnoService("com.sun.star.awt.UnoControlFixedTextModel") + oText.setModel(xText) + oText.setText("FixedText") + + Dim oDialog as object + Dim xDialog as Object + oDialog = createUnoService("com.sun.star.awt.UnoControlDialog") + xDialog = createUnoService("com.sun.star.awt.UnoControlDialogModel") + oDialog.setModel(xDialog) + oDialog.addControl("Text", oText) + oDialog.setVisible(true) + oDialog.setPosSize(0, 0, 200, 100, com.sun.star.awt.PosSize.SIZE) + + + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + oWin = tk.getActiveTopWindow + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.LABEL) + Out.Log("Implementation name: "+oObj.getImplementationName()) + accText = oObj.getText() + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oText.setEnable(false) + oText.setEnable(true) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleList/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleList/script.xlb new file mode 100644 index 000000000000..090d45a86e1a --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleList/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="toolkit_AccessibleList" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="toolkit_AccessibleList"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleList/toolkit_AccessibleList.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleList/toolkit_AccessibleList.xba new file mode 100644 index 000000000000..6cce6f2cb361 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleList/toolkit_AccessibleList.xba @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="toolkit_AccessibleList" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' "com::sun::star::accessibility::XAccessibleEventBroadcaster#optional" + ' needs the following Global variables: + +' "com::sun::star::accessibility::XAccessibleSelection" + ' needs the following Global variables: +Global multiSelection As Boolean + +Global accButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.toolkit.AccessibleList +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps() + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:HyperlinkDialog" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + multiSelection = false + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = tk.getActiveTopWindow + xRoot = utils.at_getAccessibleObject(oWin) + accButton = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Close") + + 'Selecting 'New Document' tab + Dim oTree as Object + oTree = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TREE) + + oTree.selectAccessibleChild(3) + wait(500) + + Out.log("# Getting the ListBox") + Dim oParent as Object + oParent = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PANEL,"",_ + "com.sun.star.comp.toolkit.AccessibleListBox") + + Out.log("# Getting the first child") + + oObj = oParent.getAccessibleChild(0) + + Out.Log("Implementation name: "+oObj.getImplementationName()) + + else + Out.Log("QueryDispatch FAILED. Cannot open Hyperlink dialog...") + End If + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.grabFocus() +end Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleListBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleListBox/script.xlb new file mode 100644 index 000000000000..1d1b4d88e164 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleListBox/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="toolkit_AccessibleListBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleListBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleListBox/toolkit_AccessibleListBox.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleListBox/toolkit_AccessibleListBox.xba new file mode 100644 index 000000000000..8b1ebd72bfd4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleListBox/toolkit_AccessibleListBox.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="toolkit_AccessibleListBox" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleListBox +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps(), xAccSel As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:HyperlinkDialog" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = tk.getActiveTopWindow + xRoot = utils.at_getAccessibleObject(oWin) + xAccSel = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TREE) + xAccSel.selectAccessibleChild(3) + wait(3000) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.LIST,"File type","com.sun.star.comp.toolkit.AccessibleListBox") + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Close") + Out.Log("Implementation name: "+oObj.getImplementationName()) + else + Out.Log("QueryDispatch FAILED. Cannot open Hyperlink dialog...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(2000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleListItem/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleListItem/script.xlb new file mode 100644 index 000000000000..aa75b46d13b7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleListItem/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="toolkit_AccessibleListItem" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleListItem"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleListItem/toolkit_AccessibleListItem.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleListItem/toolkit_AccessibleListItem.xba new file mode 100644 index 000000000000..dd23f1c85529 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleListItem/toolkit_AccessibleListItem.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="toolkit_AccessibleListItem" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global accButton As Object +Global accList As Object +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleListItem +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps() + Dim xAccSel As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:HyperlinkDialog" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = tk.getActiveTopWindow + xRoot = utils.at_getAccessibleObject(oWin) + xAccSel = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TREE) + xAccSel.selectAccessibleChild(3) + wait(2000) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Close") + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.LIST_ITEM) + Out.Log("Implementation name: "+oObj.getImplementationName()) + accText = oObj.getText() + readOnly = true + else + Out.Log("QueryDispatch FAILED. Cannot open Hyperlink dialog...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + 'accList.selectAccessibleChild(1) + 'wait(500) + 'accList.selectAccessibleChild(0) + 'wait(500) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenu/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenu/script.xlb new file mode 100644 index 000000000000..cd5e59dd69db --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenu/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="toolkit_AccessibleMenu" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleMenu"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenu/toolkit_AccessibleMenu.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenu/toolkit_AccessibleMenu.xba new file mode 100644 index 000000000000..928878d5338c --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenu/toolkit_AccessibleMenu.xba @@ -0,0 +1,86 @@ +<?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="toolkit_AccessibleMenu" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global menu As Object +Global multiSelection As Boolean +Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleMenu +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim tk As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.MENU,"Edit") + menu = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.MENU,"File") + Out.Log("Implementation name: "+oObj.getImplementationName()) + + multiSelection = false + accText = oObj.getText() + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + menu.doAccessibleAction(0) + wait(500) + oObj.doAccessibleAction(0) + wait(500) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuBar/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuBar/script.xlb new file mode 100644 index 000000000000..9c40aa2566f8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuBar/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="toolkit_AccessibleMenuBar" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleMenuBar"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuBar/toolkit_AccessibleMenuBar.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuBar/toolkit_AccessibleMenuBar.xba new file mode 100644 index 000000000000..2a01f35872dd --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuBar/toolkit_AccessibleMenuBar.xba @@ -0,0 +1,75 @@ +<?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="toolkit_AccessibleMenuBar" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleMenuBar +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim tk As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.MENU_BAR) + multiSelection = false + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuItem/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuItem/script.xlb new file mode 100644 index 000000000000..ccb73385ce33 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuItem/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="toolkit_AccessibleMenuItem" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleMenuItem"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuItem/toolkit_AccessibleMenuItem.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuItem/toolkit_AccessibleMenuItem.xba new file mode 100644 index 000000000000..f7d8a2592999 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuItem/toolkit_AccessibleMenuItem.xba @@ -0,0 +1,82 @@ +<?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="toolkit_AccessibleMenuItem" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleMenuItem +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim tk As Object + Dim oMenu as Object + Dim oMenuCont as Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oMenu = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.MENU) + oMenuCont = oMenu.getAccessibleContext() + oMenuCont.doAccessibleAction(0) + oObj = oMenu.getAccessibleChild(1) + + Out.Log("Implementation Name: "+oObj.getImplementationName()) + accText = oObj.getText() + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuSeparator/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuSeparator/script.xlb new file mode 100644 index 000000000000..b9a1d9b3fbe9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuSeparator/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="toolkit_AccessibleMenuSeparator" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleMenuSeparator"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuSeparator/toolkit_AccessibleMenuSeparator.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuSeparator/toolkit_AccessibleMenuSeparator.xba new file mode 100644 index 000000000000..3686b15884c5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleMenuSeparator/toolkit_AccessibleMenuSeparator.xba @@ -0,0 +1,77 @@ +<?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="toolkit_AccessibleMenuSeparator" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleMenuSeparator +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim tk As Object + Dim oMenu as Object + Dim oMenuCont as Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oMenu = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.MENU) + oMenuCont = oMenu.getAccessibleContext() + oMenuCont.doAccessibleAction(0) + oObj = oMenu.getAccessibleChild(4) + + Out.Log("Implementation Name: "+oObj.getImplementationName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleRadioButton/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleRadioButton/script.xlb new file mode 100644 index 000000000000..14c997ba6b9e --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleRadioButton/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="toolkit_AccessibleRadioButton" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleRadioButton"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleRadioButton/toolkit_AccessibleRadioButton.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleRadioButton/toolkit_AccessibleRadioButton.xba new file mode 100644 index 000000000000..255807510f08 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleRadioButton/toolkit_AccessibleRadioButton.xba @@ -0,0 +1,102 @@ +<?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="toolkit_AccessibleRadioButton" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global accButton As Object +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleRadioButton +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps(), ichControl As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:HyperlinkDialog" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + ichControl = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TREE,"IconChoiceControl") + ichControl.selectAccessibleChild(0) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.RADIO_BUTTON,"Web") + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Close") + Out.Log("Implementation name: "+oObj.getImplementationName()) + accText = oObj.getText() + readOnly = true + else + Out.Log("QueryDispatch FAILED. Cannot open Hyperlink dialog...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleScrollBar/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleScrollBar/script.xlb new file mode 100644 index 000000000000..92c76fe2720f --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleScrollBar/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="toolkit_AccessibleScrollBar" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleScrollBar"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleScrollBar/toolkit_AccessibleScrollBar.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleScrollBar/toolkit_AccessibleScrollBar.xba new file mode 100644 index 000000000000..6e0b7a5fac8f --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleScrollBar/toolkit_AccessibleScrollBar.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="toolkit_AccessibleScrollBar" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleScrollBar +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim tk As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SCROLL_BAR) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.MENU,"Help") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + accButton.doAccessibleAction(0) + wait(500) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBar/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBar/script.xlb new file mode 100644 index 000000000000..e1da2c9db3e6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBar/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="toolkit_AccessibleStatusBar" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="toolkit_AccessibleStatusBar"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBar/toolkit_AccessibleStatusBar.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBar/toolkit_AccessibleStatusBar.xba new file mode 100644 index 000000000000..26e026754d66 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBar/toolkit_AccessibleStatusBar.xba @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="toolkit_AccessibleStatusBar" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oWin As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.toolkit.AccessibleStatusBar +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("swriter", cObjectName) + + Dim xController As Object + xController = oDoc.getCurrentController() + + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.STATUS_BAR) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim newPosSize as Variant + newPosSize = oWin.getPosSize() + newPosSize.Width = newPosSize.Width - 20 + newPosSize.Height = newPosSize.Height - 20 + newPosSize.X = newPosSize.X + 20 + newPosSize.Y = newPosSize.Y + 20 + oWin.setPosSize(newPosSize.X, newPosSize.Y, newPosSize.Width, _ + newPosSize.Height, com.sun.star.awt.PosSize.POSSIZE) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBarItem/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBarItem/script.xlb new file mode 100644 index 000000000000..fbdbad2f7d8d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBarItem/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="toolkit_AccessibleStatusBarItem" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="toolkit_AccessibleStatusBarItem"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBarItem/toolkit_AccessibleStatusBarItem.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBarItem/toolkit_AccessibleStatusBarItem.xba new file mode 100644 index 000000000000..82c866c4c0bc --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleStatusBarItem/toolkit_AccessibleStatusBarItem.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="toolkit_AccessibleStatusBarItem" 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 + + +' REQUIRED VARIABLES for interface/service tests: + +' "com::sun::star::accessibility::XAccessibleText" + ' needs the following Global variables: + Global accText as String + Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.toolkit.AccessibleStatusBarItem +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("swriter", cObjectName) + + Dim xController As Object + xController = oDoc.getCurrentController() + + Dim xRoot As Object + Dim oWin as Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + Dim oStatusBar as Object + oStatusBar = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.STATUS_BAR) + oObj = oStatusBar.getAccessibleChild(0) + + readOnly = true + accText = oObj.getText() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim oText as Object + oText = oDoc.getText() + + Dim oEnum as Object + Dim oParagraph as Object + oEnum = oText.createEnumeration() ' get all paragraphs + while oEnum.hasMoreElements() + oParagraph = oEnum.nextElement() ' get the last paragraph + wend + oParagraph.BreakType = com.sun.star.style.BreakType.PAGE_AFTER + + Dim oCursor as Object + oCursor = oText.createTextCursor() + oCursor.gotoEnd(false) 'Goto to the end of document + oText.insertControlCharacter(oCursor, 0, false) ' insert a new paragraph + oCursor.setString("AccessibleStatusBarItem") ' insert text +end Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleTabControl/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabControl/script.xlb new file mode 100644 index 000000000000..3e7b1abec77a --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabControl/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="toolkit_AccessibleTabControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleTabControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleTabControl/toolkit_AccessibleTabControl.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabControl/toolkit_AccessibleTabControl.xba new file mode 100644 index 000000000000..e629d6599886 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabControl/toolkit_AccessibleTabControl.xba @@ -0,0 +1,101 @@ +<?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="toolkit_AccessibleTabControl" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accButton As Object +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleTabControl +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps() + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:InsertField" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PAGE_TAB_LIST) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Close") + Out.Log("Implementation name: "+oObj.getImplementationName()) + multiSelection = false + else + Out.Log("QueryDispatch FAILED. Cannot open InsertField dialog...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.selectAccessibleChild(1) + wait(500) + oObj.selectAccessibleChild(0) + wait(500) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleTabPage/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabPage/script.xlb new file mode 100644 index 000000000000..680de388231d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabPage/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="toolkit_AccessibleTabPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleTabPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleTabPage/toolkit_AccessibleTabPage.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabPage/toolkit_AccessibleTabPage.xba new file mode 100644 index 000000000000..5b1d43d057f9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleTabPage/toolkit_AccessibleTabPage.xba @@ -0,0 +1,106 @@ +<?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="toolkit_AccessibleTabPage" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accButton As Object + Global accText as String + Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleTabPage +'************************************************************************* +On Error Goto ErrHndl + Dim xController As Object, oWin As Object + Dim xDispatcher As Object, xRoot As Object + Dim tk As Object, urlTransformer As Object + Dim url As New com.sun.star.util.URL + Dim noProps() + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:InsertField" + urlTransformer.parseStrict(url) + wait(500) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Close") + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PAGE_TAB) + Out.Log("Implementation name: "+oObj.getImplementationName()) + accText = oObj.getText() + readOnly = true + + else + Out.Log("QueryDispatch FAILED. Cannot open InsertField dialog...") + End If + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + wait(500) + accButton.grabFocus() + wait(500) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBox/script.xlb new file mode 100644 index 000000000000..1961c1b191fa --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBox/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="toolkit_AccessibleToolBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleToolBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBox/toolkit_AccessibleToolBox.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBox/toolkit_AccessibleToolBox.xba new file mode 100644 index 000000000000..d5d9fcccb371 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBox/toolkit_AccessibleToolBox.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="toolkit_AccessibleToolBox" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleToolBox +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim tk As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TOOL_BAR) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.MENU,"Help") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + wait(500) + accButton.doAccessibleAction(0) + wait(500) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBoxItem/script.xlb b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBoxItem/script.xlb new file mode 100644 index 000000000000..cea24c1a4c50 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBoxItem/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="toolkit_AccessibleToolBoxItem" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_AccessibleToolBoxItem"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBoxItem/toolkit_AccessibleToolBoxItem.xba b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBoxItem/toolkit_AccessibleToolBoxItem.xba new file mode 100644 index 000000000000..d3306b53de08 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/AccessibleToolBoxItem/toolkit_AccessibleToolBoxItem.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="toolkit_AccessibleToolBoxItem" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global accText As String +Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.AccessibleToolBoxItem +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim tk As Object + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TOGGLE_BUTTON,"Bold") + accText = oObj.getText() + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.grabFocus() + oObj.doAccessibleAction(0) + wait(500) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/TabController/script.xlb b/qadevOOo/tests/basic/mod/toolkit/TabController/script.xlb new file mode 100644 index 000000000000..cc590c6b462d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/TabController/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="toolkit_TabController" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_TabController"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/TabController/toolkit_TabController.xba b/qadevOOo/tests/basic/mod/toolkit/TabController/toolkit_TabController.xba new file mode 100644 index 000000000000..986b40cd1ed6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/TabController/toolkit_TabController.xba @@ -0,0 +1,75 @@ +<?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="toolkit_TabController" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oXTabControllerModel As Object +Global oXTabControllerContainer As Object +Global bHasNoModel as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.TabController +'************************************************************************* +On Error Goto ErrHndl + Dim oModel, oDrawPage, oShape As Object + Dim oController, oCtrll As Object + + oObj = createUnoService("com.sun.star.awt.TabController") + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.createUNOControlShape("CommandButton", "UnoControlButton") + toolkittools.addShape(oShape) + oDrawPage = oDoc.getDrawPage() + + oModel = oShape.getControl() + oController = oDoc.getCurrentController() + oCtrll = oController.getControl(oModel) + oXTabControllerContainer = oCtrll.getContext() + oXTabControllerModel = oDrawPage.getForms().getByIndex(0) + bHasNoModel = False + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/TabControllerModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/TabControllerModel/script.xlb new file mode 100644 index 000000000000..529bde7dbe55 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/TabControllerModel/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="toolkit_TabControllerModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_TabControllerModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/TabControllerModel/toolkit_TabControllerModel.xba b/qadevOOo/tests/basic/mod/toolkit/TabControllerModel/toolkit_TabControllerModel.xba new file mode 100644 index 000000000000..4f4e503fa9d2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/TabControllerModel/toolkit_TabControllerModel.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="toolkit_TabControllerModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global XTabControlModel1 As Object +Global XTabControlModel2 As Object +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.TabControllerModel +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1, oShape2, oShape3 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = ToolkitTools.createControlShape("CommandButton") + oShape2 = ToolkitTools.createControlShape("TextField") + oShape3 = ToolkitTools.createControlShape("TextField") + + toolkittools.addShape(oShape1) + toolkittools.addShape(oShape2) + toolkittools.addShape(oShape3) + + XTabControlModel1 = oShape1.getControl() + XTabControlModel2 = oShape2.getControl() + oPersistInstance = oShape3.getControl() + + oObj = createUnoService("com.sun.star.awt.TabControllerModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/Toolkit/script.xlb b/qadevOOo/tests/basic/mod/toolkit/Toolkit/script.xlb new file mode 100644 index 000000000000..4cd335890e3a --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/Toolkit/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="toolkit_Toolkit" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_Toolkit"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/Toolkit/toolkit_Toolkit.xba b/qadevOOo/tests/basic/mod/toolkit/Toolkit/toolkit_Toolkit.xba new file mode 100644 index 000000000000..c7a5c1ec9529 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/Toolkit/toolkit_Toolkit.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="toolkit_Toolkit" 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 CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.Toolkit +'************************************************************************* +On Error Goto ErrHndl + Dim oCtrl As Object + Dim oFrame As Object + Dim oWnd As Object + Dim oToolkit As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + oCtrl = oDoc.getCurrentController() + oFrame = oCtrl.getFrame() + oWnd = oFrame.getComponentWindow() + oToolkit = oWnd.getToolkit() + + oObj = oToolkit +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlButton/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlButton/script.xlb new file mode 100644 index 000000000000..0711c53b0208 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlButton/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="toolkit_UnoControlButton" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlButton"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlButton/toolkit_UnoControlButton.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlButton/toolkit_UnoControlButton.xba new file mode 100644 index 000000000000..09a50acf78a0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlButton/toolkit_UnoControlButton.xba @@ -0,0 +1,111 @@ +<?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="toolkit_UnoControlButton" 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 + + + +' REQUIRED VARIABLES for interface/service tests: + +' Required for com.sun.star.awt.XView: + Global oGraphics As Object + +' Required for com.sun.star.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.awt.XControl: + Global oContext As Object + Global oWinpeer As Object + Global oToolkit As Object + Global oModel As Object + +' Required for com.sun.star.awt.XWindow: + Global oXWindow as Object + Global oCtrlShape as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlButton +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = ToolkitTools.createUnoControlShape("CommandButton", "UnoControlButton") + oShape2 = ToolkitTools.createUnoControlShape("CommandButton", "UnoControlButton") + oShape3 = ToolkitTools.createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200, 200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlButtonModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlButtonModel/script.xlb new file mode 100644 index 000000000000..d210fe68754f --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlButtonModel/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="toolkit_UnoControlButtonModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlButtonModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlButtonModel/toolkit_UnoControlButtonModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlButtonModel/toolkit_UnoControlButtonModel.xba new file mode 100644 index 000000000000..3af179132798 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlButtonModel/toolkit_UnoControlButtonModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlButtonModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlButtonModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlButtonModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlButtonModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBox/script.xlb new file mode 100644 index 000000000000..986d920ef299 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBox/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="toolkit_UnoControlCheckBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlCheckBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBox/toolkit_UnoControlCheckBox.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBox/toolkit_UnoControlCheckBox.xba new file mode 100644 index 000000000000..3fc1a61aadf5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBox/toolkit_UnoControlCheckBox.xba @@ -0,0 +1,119 @@ +<?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="toolkit_UnoControlCheckBox" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object +Global oXWindow as Object + Global oCtrlShape as Object + +Global bIL_itemStateChanged As Boolean +Global oEventItemListener As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlCheckBox +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape1, oShape2, oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin, oKit, oDevice As Object + Dim oDoc2 As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("CheckBox", "UnoControlCheckBox") + oShape2 = createUnoControlShape("CheckBox", "UnoControlCheckBox") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() + + bIL_itemStateChanged = False + out.log("create listener for item events") + Dim oIListener As Object + oIListener = createUnoListener("IL_", "com.sun.star.awt.XItemListener") + oObj.addItemListener(oIListener) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub + +Sub IL_itemStateChanged(rEvent As Object) + bIL_itemStateChanged = True + Out.Log("CallBack for ItemListener itemStateChanged was called.") + oEventItemListener = rEvent +End Sub + +Sub IL_disposing(sEvent As Object) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBoxModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBoxModel/script.xlb new file mode 100644 index 000000000000..5ebe3bf41882 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBoxModel/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="toolkit_UnoControlCheckBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlCheckBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBoxModel/toolkit_UnoControlCheckBoxModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBoxModel/toolkit_UnoControlCheckBoxModel.xba new file mode 100644 index 000000000000..749f3c6513f6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCheckBoxModel/toolkit_UnoControlCheckBoxModel.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="toolkit_UnoControlCheckBoxModel" 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 + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlCheckBoxModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlCheckBoxModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlCheckBoxModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBox/script.xlb new file mode 100644 index 000000000000..427663e3d8a8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBox/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="toolkit_UnoControlComboBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlComboBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBox/toolkit_UnoControlComboBox.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBox/toolkit_UnoControlComboBox.xba new file mode 100644 index 000000000000..0edac329fae2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBox/toolkit_UnoControlComboBox.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="toolkit_UnoControlComboBox" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + +Global oXWindow as Object +Global oCtrlShape as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlComboBox +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("ComboBox", "UnoControlComboBox") + oShape2 = createUnoControlShape("ComboBox", "UnoControlComboBox") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBoxModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBoxModel/script.xlb new file mode 100644 index 000000000000..2008e44613c6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBoxModel/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="toolkit_UnoControlComboBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlComboBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBoxModel/toolkit_UnoControlComboBoxModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBoxModel/toolkit_UnoControlComboBoxModel.xba new file mode 100644 index 000000000000..00b7e4ee7cd9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlComboBoxModel/toolkit_UnoControlComboBoxModel.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="toolkit_UnoControlComboBoxModel" 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 + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlComboBoxModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlComboBoxModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlComboBoxModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlContainer/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainer/script.xlb new file mode 100644 index 000000000000..119527ba4551 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainer/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="toolkit_UnoControlContainer" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlContainer"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlContainer/toolkit_UnoControlContainer.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainer/toolkit_UnoControlContainer.xba new file mode 100644 index 000000000000..332ba4bedf03 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainer/toolkit_UnoControlContainer.xba @@ -0,0 +1,113 @@ +<?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="toolkit_UnoControlContainer" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + +Global oXWindow as Object +Global oCtrlShape as Object + +Global oXControl1 as Object +Global oXControl2 as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlContainer +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oCurrCtrl2 As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createControlShape("CommandButton") + oShape2 = createUnoControlShape("CommandButton", "UnoControlButton") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oObj = createUnoService("com.sun.star.awt.UnoControlContainer") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlContainer") + + oCurrCtrl = oDoc.getCurrentController() + oXControl1 = oCurrCtrl.getControl(oShape1.getControl()) + oXControl2 = oCurrCtrl.getControl(oShape2.getControl()) + + oModel = oShape1.getControl() + oObj.setModel(oModel) + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlContainerModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainerModel/script.xlb new file mode 100644 index 000000000000..438ed8669057 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainerModel/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="toolkit_UnoControlContainerModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlContainerModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlContainerModel/toolkit_UnoControlContainerModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainerModel/toolkit_UnoControlContainerModel.xba new file mode 100644 index 000000000000..b868a147c0a6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlContainerModel/toolkit_UnoControlContainerModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlContainerModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlContainerModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlContainerModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlContainerModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyField/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyField/script.xlb new file mode 100644 index 000000000000..c54c2fa36c54 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyField/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="toolkit_UnoControlCurrencyField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlCurrencyField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyField/toolkit_UnoControlCurrencyField.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyField/toolkit_UnoControlCurrencyField.xba new file mode 100644 index 000000000000..234d300050ea --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyField/toolkit_UnoControlCurrencyField.xba @@ -0,0 +1,105 @@ +<?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="toolkit_UnoControlCurrencyField" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + + Global oXWindow as Object + Global oCtrlShape as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlCurrencyField +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + bOK = true + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("CurrencyField", "UnoControlCurrencyField") + oShape2 = createUnoControlShape("CurrencyField", "UnoControlCurrencyField") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200, 200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyFieldModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyFieldModel/script.xlb new file mode 100644 index 000000000000..8448f3cd59e8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyFieldModel/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="toolkit_UnoControlCurrencyFieldModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlCurrencyFieldModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyFieldModel/toolkit_UnoControlCurrencyFieldModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyFieldModel/toolkit_UnoControlCurrencyFieldModel.xba new file mode 100644 index 000000000000..68afb6cc714d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlCurrencyFieldModel/toolkit_UnoControlCurrencyFieldModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlCurrencyFieldModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlCurrencyFieldModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlCurrencyFieldModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlCurrencyFieldModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDateField/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateField/script.xlb new file mode 100644 index 000000000000..46178921b46d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateField/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="toolkit_UnoControlDateField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlDateField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDateField/toolkit_UnoControlDateField.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateField/toolkit_UnoControlDateField.xba new file mode 100644 index 000000000000..308a949f7a68 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateField/toolkit_UnoControlDateField.xba @@ -0,0 +1,102 @@ +<?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="toolkit_UnoControlDateField" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + Global oXWindow as Object + Global oCtrlShape as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlDateField +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("DateField", "UnoControlDateField") + oShape2 = createUnoControlShape("DateField", "UnoControlDateField") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDateFieldModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateFieldModel/script.xlb new file mode 100644 index 000000000000..6f5adb3fc56e --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateFieldModel/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="toolkit_UnoControlDateFieldModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlDateFieldModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDateFieldModel/toolkit_UnoControlDateFieldModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateFieldModel/toolkit_UnoControlDateFieldModel.xba new file mode 100644 index 000000000000..b6f8ec986368 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDateFieldModel/toolkit_UnoControlDateFieldModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlDateFieldModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlDateFieldModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlDateFieldModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlDateFieldModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDialog/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialog/script.xlb new file mode 100644 index 000000000000..b8391fefcd5f --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialog/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="toolkit_UnoControlDialog" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlDialog"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDialog/toolkit_UnoControlDialog.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialog/toolkit_UnoControlDialog.xba new file mode 100644 index 000000000000..355a359c9e04 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialog/toolkit_UnoControlDialog.xba @@ -0,0 +1,108 @@ +<?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="toolkit_UnoControlDialog" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + Global oXWindow as Object + Global oCtrlShape as Object + +Global oXControl1 as Object +Global oXControl2 as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlDialog +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + Dim oDlgModel As Object + Dim oButModel As Object + Dim oDlgControl As Object + Dim oComponentInstance As Object + Dim oComponentModel As Object + Dim oXWindowModel As Object + + oDlgModel = createUnoService("com.sun.star.awt.UnoControlDialogModel") + oDlgControl = createUnoService("com.sun.star.awt.UnoControlDialog") + oDlgControl.setModel(oDlgModel) + + oComponentModel = createUnoService("com.sun.star.awt.UnoControlDialogModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlDialog") + oComponentInstance.setModel(oComponentModel) + + oXWindowModel = createUnoService("com.sun.star.awt.UnoControlDialogModel") + oXWindow = createUnoService("com.sun.star.awt.UnoControlDialog") + oXWindow.setModel(oXWindowModel) + + oButModel = createUnoService("com.sun.star.awt.UnoControlButtonModel") + oXControl1 = createUnoService("com.sun.star.awt.UnoControlButton") + oXControl1.setModel(oButModel) + oButModel = createUnoService("com.sun.star.awt.UnoControlButtonModel") + oXControl2 = createUnoService("com.sun.star.awt.UnoControlButton") + oXControl2.setModel(oButModel) + + oDlgControl.setVisible(true) + oDlgControl.setPosSize(0, 0, 200, 100, com.sun.star.awt.PosSize.SIZE) + oContext = oDlgModel + oModel = oDlgModel + oWinpeer = oDlgControl.getPeer() + oToolkit = oWinpeer.getToolkit() + oDevice = oToolKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oDlgControl +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oXWindow.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDialogModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialogModel/script.xlb new file mode 100644 index 000000000000..f69b248965ff --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialogModel/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="toolkit_UnoControlDialogModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlDialogModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlDialogModel/toolkit_UnoControlDialogModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialogModel/toolkit_UnoControlDialogModel.xba new file mode 100644 index 000000000000..ce69c0d9f05f --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlDialogModel/toolkit_UnoControlDialogModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlDialogModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlDialogModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlDialogModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlDialogModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlEdit/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlEdit/script.xlb new file mode 100644 index 000000000000..128160b10445 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlEdit/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="toolkit_UnoControlEdit" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlEdit"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlEdit/toolkit_UnoControlEdit.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlEdit/toolkit_UnoControlEdit.xba new file mode 100644 index 000000000000..3c618b535f46 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlEdit/toolkit_UnoControlEdit.xba @@ -0,0 +1,101 @@ +<?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="toolkit_UnoControlEdit" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + Global oXWindow as Object + Global oCtrlShape as Object + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlEdit +'************************************************************************* +On Error Goto ErrHndl + + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("TextField", "UnoControlEdit") + oShape2 = createUnoControlShape("TextField", "UnoControlEdit") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlEditModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlEditModel/script.xlb new file mode 100644 index 000000000000..326335148b23 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlEditModel/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="toolkit_UnoControlEditModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlEditModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlEditModel/toolkit_UnoControlEditModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlEditModel/toolkit_UnoControlEditModel.xba new file mode 100644 index 000000000000..b0845c0bff7b --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlEditModel/toolkit_UnoControlEditModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlEditModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlEditModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlEditModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlEditModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControl/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControl/script.xlb new file mode 100644 index 000000000000..ae32f6ea9950 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControl/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="toolkit_UnoControlFileControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlFileControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControl/toolkit_UnoControlFileControl.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControl/toolkit_UnoControlFileControl.xba new file mode 100644 index 000000000000..0b79bc6f512d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControl/toolkit_UnoControlFileControl.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="toolkit_UnoControlFileControl" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + Global oXWindow as Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlFileControl +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("FileControl", "UnoControlFileControl") + oShape2 = createUnoControlShape("FileControl", "UnoControlFileControl") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControlModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControlModel/script.xlb new file mode 100644 index 000000000000..56de55222b68 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControlModel/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="toolkit_UnoControlFileControlModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlFileControlModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControlModel/toolkit_UnoControlFileControlModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControlModel/toolkit_UnoControlFileControlModel.xba new file mode 100644 index 000000000000..e1c380e17ac2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFileControlModel/toolkit_UnoControlFileControlModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlFileControlModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlFileControlModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlFileControlModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlFileControlModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedLineModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedLineModel/script.xlb new file mode 100644 index 000000000000..dd2e8444701a --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedLineModel/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="toolkit_UnoControlFixedLineModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlFixedLineModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedLineModel/toolkit_UnoControlFixedLineModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedLineModel/toolkit_UnoControlFixedLineModel.xba new file mode 100644 index 000000000000..7381254bf6f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedLineModel/toolkit_UnoControlFixedLineModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlFixedLineModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlFixedLineModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlFixedLineModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlFixedLineModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedText/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedText/script.xlb new file mode 100644 index 000000000000..29c3cec5fc5a --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedText/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="toolkit_UnoControlFixedText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlFixedText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedText/toolkit_UnoControlFixedText.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedText/toolkit_UnoControlFixedText.xba new file mode 100644 index 000000000000..fb38ddf4ac05 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedText/toolkit_UnoControlFixedText.xba @@ -0,0 +1,102 @@ +<?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="toolkit_UnoControlFixedText" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + Global oXWindow as Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlFixedText +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("FixedText", "UnoControlFixedText") + oShape2 = createUnoControlShape("FixedText", "UnoControlFixedText") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedTextModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedTextModel/script.xlb new file mode 100644 index 000000000000..f1ce26a05892 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedTextModel/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="toolkit_UnoControlFixedTextModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlFixedTextModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedTextModel/toolkit_UnoControlFixedTextModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedTextModel/toolkit_UnoControlFixedTextModel.xba new file mode 100644 index 000000000000..b53f02dc7328 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFixedTextModel/toolkit_UnoControlFixedTextModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlFixedTextModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlFixedTextModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlFixedTextModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlFixedTextModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedField/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedField/script.xlb new file mode 100644 index 000000000000..726226fcf6ea --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedField/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="toolkit_UnoControlFormattedField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlFormattedField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedField/toolkit_UnoControlFormattedField.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedField/toolkit_UnoControlFormattedField.xba new file mode 100644 index 000000000000..72ca1af457bb --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedField/toolkit_UnoControlFormattedField.xba @@ -0,0 +1,100 @@ +<?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="toolkit_UnoControlFormattedField" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics as Object +Global oContext as Object +Global oWinpeer as Object +Global oToolkit as Object +Global oModel as Object + Global oXWindow as Object + Global oCtrlShape as Object + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlFormattedField +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("DatabaseFormattedField", "UnoControlFormattedField") + oShape2 = createUnoControlShape("DatabaseFormattedField", "UnoControlFormattedField") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedFieldModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedFieldModel/script.xlb new file mode 100644 index 000000000000..73bb0e286271 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedFieldModel/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="toolkit_UnoControlFormattedFieldModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlFormattedFieldModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedFieldModel/toolkit_UnoControlFormattedFieldModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedFieldModel/toolkit_UnoControlFormattedFieldModel.xba new file mode 100644 index 000000000000..62896a07eb7d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlFormattedFieldModel/toolkit_UnoControlFormattedFieldModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlFormattedFieldModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlFormattedFieldModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlFormattedFieldModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlFormattedFieldModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBox/script.xlb new file mode 100644 index 000000000000..0454145693ee --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBox/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="toolkit_UnoControlGroupBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlGroupBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBox/toolkit_UnoControlGroupBox.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBox/toolkit_UnoControlGroupBox.xba new file mode 100644 index 000000000000..421861498abb --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBox/toolkit_UnoControlGroupBox.xba @@ -0,0 +1,102 @@ +<?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="toolkit_UnoControlGroupBox" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object +Global oModel As Object + Global oXWindow As Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlGroupBox +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("GroupBox", "UnoControlGroupBox") + oShape2 = createUnoControlShape("GroupBox", "UnoControlGroupBox") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBoxModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBoxModel/script.xlb new file mode 100644 index 000000000000..73bb067d5088 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBoxModel/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="toolkit_UnoControlGroupBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlGroupBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBoxModel/toolkit_UnoControlGroupBoxModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBoxModel/toolkit_UnoControlGroupBoxModel.xba new file mode 100644 index 000000000000..a3c92925e56d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlGroupBoxModel/toolkit_UnoControlGroupBoxModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlGroupBoxModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlGroupBoxModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlGroupBoxModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlGroupBoxModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControl/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControl/script.xlb new file mode 100644 index 000000000000..63245cf93214 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControl/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="toolkit_UnoControlImageControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlImageControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControl/toolkit_UnoControlImageControl.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControl/toolkit_UnoControlImageControl.xba new file mode 100644 index 000000000000..2e1bab326619 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControl/toolkit_UnoControlImageControl.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="toolkit_UnoControlImageControl" 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. +' +'************************************************************************* +'************************************************************************* + + + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object +Global oModel As Object + Global oXWindow As Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlImageControl +'************************************************************************* +On Error Goto ErrHndl + + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("DatabaseImageControl", "UnoControlImageControl") + oShape2 = createUnoControlShape("DatabaseImageControl", "UnoControlImageControl") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControlModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControlModel/script.xlb new file mode 100644 index 000000000000..223db88b87f9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControlModel/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="toolkit_UnoControlImageControlModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlImageControlModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControlModel/toolkit_UnoControlImageControlModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControlModel/toolkit_UnoControlImageControlModel.xba new file mode 100644 index 000000000000..a4dd93c1dc37 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlImageControlModel/toolkit_UnoControlImageControlModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlImageControlModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlImageControlModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlImageControlModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlImageControlModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlListBox/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBox/script.xlb new file mode 100644 index 000000000000..c448b854cf6d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBox/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="toolkit_UnoControlListBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlListBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlListBox/toolkit_UnoControlListBox.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBox/toolkit_UnoControlListBox.xba new file mode 100644 index 000000000000..cc4e392e4538 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBox/toolkit_UnoControlListBox.xba @@ -0,0 +1,120 @@ +<?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="toolkit_UnoControlListBox" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object +Global oModel As Object + Global oXWindow As Object + Global oCtrlShape as Object + +Global bIL_itemStateChanged As Boolean +Global oEventItemListener As Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlListBox +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + Dim oIListener As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("ListBox", "UnoControlListBox") + oShape2 = createUnoControlShape("ListBox", "UnoControlListBox") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() + + oIListener = createUnoListener("IL_", "com.sun.star.awt.XItemListener") + oObj.addItemListener(oIListener) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub + +Sub IL_itemStateChanged(rEvent As Object) + bIL_itemStateChanged = True + Out.Log("CallBack for ItemListener itemStateChanged was called.") + oEventItemListener = rEvent +End Sub + +Sub IL_disposing +End Sub + + +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlListBoxModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBoxModel/script.xlb new file mode 100644 index 000000000000..9dfa0ec136f6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBoxModel/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="toolkit_UnoControlListBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlListBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlListBoxModel/toolkit_UnoControlListBoxModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBoxModel/toolkit_UnoControlListBoxModel.xba new file mode 100644 index 000000000000..c7357ea35cb5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlListBoxModel/toolkit_UnoControlListBoxModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlListBoxModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlListBoxModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlListBoxModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlListBoxModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericField/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericField/script.xlb new file mode 100644 index 000000000000..9ae20caef36b --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericField/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="toolkit_UnoControlNumericField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlNumericField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericField/toolkit_UnoControlNumericField.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericField/toolkit_UnoControlNumericField.xba new file mode 100644 index 000000000000..fe1a5bbd8d42 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericField/toolkit_UnoControlNumericField.xba @@ -0,0 +1,101 @@ +<?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="toolkit_UnoControlNumericField" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object +Global oModel As Object + Global oXWindow As Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlNumericField +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("NumericField", "UnoControlNumericField") + oShape2 = createUnoControlShape("NumericField", "UnoControlNumericField") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericFieldModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericFieldModel/script.xlb new file mode 100644 index 000000000000..69cefe22c6c2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericFieldModel/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="toolkit_UnoControlNumericFieldModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlNumericFieldModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericFieldModel/toolkit_UnoControlNumericFieldModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericFieldModel/toolkit_UnoControlNumericFieldModel.xba new file mode 100644 index 000000000000..d51bd158bb81 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlNumericFieldModel/toolkit_UnoControlNumericFieldModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlNumericFieldModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlNumericFieldModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlNumericFieldModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlNumericFieldModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternField/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternField/script.xlb new file mode 100644 index 000000000000..9c3d25c7388c --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternField/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="toolkit_UnoControlPatternField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlPatternField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternField/toolkit_UnoControlPatternField.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternField/toolkit_UnoControlPatternField.xba new file mode 100644 index 000000000000..dd388abb226d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternField/toolkit_UnoControlPatternField.xba @@ -0,0 +1,101 @@ +<?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="toolkit_UnoControlPatternField" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object +Global oModel As Object + Global oXWindow As Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlPatternField +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = createUnoControlShape("PatternField", "UnoControlPatternField") + oShape2 = createUnoControlShape("PatternField", "UnoControlPatternField") + oShape3 = createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternFieldModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternFieldModel/script.xlb new file mode 100644 index 000000000000..6ad1924c4bc8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternFieldModel/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="toolkit_UnoControlPatternFieldModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlPatternFieldModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternFieldModel/toolkit_UnoControlPatternFieldModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternFieldModel/toolkit_UnoControlPatternFieldModel.xba new file mode 100644 index 000000000000..79100440d9b0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlPatternFieldModel/toolkit_UnoControlPatternFieldModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlPatternFieldModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlPatternFieldModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlPatternFieldModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlPatternFieldModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlProgressBarModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlProgressBarModel/script.xlb new file mode 100644 index 000000000000..075c3a895184 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlProgressBarModel/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="toolkit_UnoControlProgressBarModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlProgressBarModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlProgressBarModel/toolkit_UnoControlProgressBarModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlProgressBarModel/toolkit_UnoControlProgressBarModel.xba new file mode 100644 index 000000000000..b7c29f52e8d1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlProgressBarModel/toolkit_UnoControlProgressBarModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlProgressBarModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlProgressBarModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlProgressBarModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlProgressBarModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButton/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButton/script.xlb new file mode 100644 index 000000000000..217d9be6abba --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButton/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="toolkit_UnoControlRadioButton" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlRadioButton"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButton/toolkit_UnoControlRadioButton.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButton/toolkit_UnoControlRadioButton.xba new file mode 100644 index 000000000000..2add360c7e3b --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButton/toolkit_UnoControlRadioButton.xba @@ -0,0 +1,101 @@ +<?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="toolkit_UnoControlRadioButton" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object +Global oModel As Object + Global oXWindow As Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlRadioButton +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = ToolkitTools.createUnoControlShape("RadioButton", "UnoControlRadioButton") + oShape2 = ToolkitTools.createUnoControlShape("RadioButton", "UnoControlRadioButton") + oShape3 = ToolkitTools.createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButtonModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButtonModel/script.xlb new file mode 100644 index 000000000000..92945cdf6628 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButtonModel/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="toolkit_UnoControlRadioButtonModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlRadioButtonModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButtonModel/toolkit_UnoControlRadioButtonModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButtonModel/toolkit_UnoControlRadioButtonModel.xba new file mode 100644 index 000000000000..2496fe4ea242 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlRadioButtonModel/toolkit_UnoControlRadioButtonModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlRadioButtonModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlRadioButtonModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlRadioButtonModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlRadioButtonModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlScrollBarModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlScrollBarModel/script.xlb new file mode 100644 index 000000000000..4f21af164b08 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlScrollBarModel/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="toolkit_UnoControlScrollBarModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlScrollBarModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlScrollBarModel/toolkit_UnoControlScrollBarModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlScrollBarModel/toolkit_UnoControlScrollBarModel.xba new file mode 100644 index 000000000000..5499593310f7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlScrollBarModel/toolkit_UnoControlScrollBarModel.xba @@ -0,0 +1,57 @@ +<?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="toolkit_UnoControlScrollBarModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlScrollBarModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlScrollBarModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlScrollBarModel") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeField/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeField/script.xlb new file mode 100644 index 000000000000..f690e03f5ac1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeField/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="toolkit_UnoControlTimeField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlTimeField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeField/toolkit_UnoControlTimeField.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeField/toolkit_UnoControlTimeField.xba new file mode 100644 index 000000000000..328b09ab7b44 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeField/toolkit_UnoControlTimeField.xba @@ -0,0 +1,101 @@ +<?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="toolkit_UnoControlTimeField" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oGraphics As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object +Global oModel As Object + Global oXWindow As Object + Global oCtrlShape as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlTimeField +'************************************************************************* +On Error Goto ErrHndl + Dim oShape1 As Object + Dim oShape2 As Object + Dim oShape3 As Object + Dim oCurrCtrl As Object + Dim oWin As Object + Dim oKit As Object + Dim oDevice As Object + Dim oDoc2 As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + + oShape1 = ToolkitTools.createUnoControlShape("TimeField", "UnoControlTimeField") + oShape2 = ToolkitTools.createUnoControlShape("TimeField", "UnoControlTimeField") + oShape3 = ToolkitTools.createControlShape("TextField") + + ToolkitTools.addShape(oShape1) + ToolkitTools.addShape(oShape2) + ToolkitTools.addShape(oShape3) + + oModel = oShape1.getControl() + oCurrCtrl = oDoc.getCurrentController() + oWin = oCurrCtrl.getControl(oModel).getPeer() + oKit = oWin.getToolkit() + oDevice = oKit.createScreenCompatibleDevice(200,200) + oGraphics = oDevice.createGraphics() + + oObj = oCurrCtrl.getControl(oModel) + oComponentInstance = oDoc.getCurrentcontroller.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oDoc2.getCurrentController().getFrame().getComponentWindow() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + 'Re-open this document to close it successfully + Dim oDoc2 As Object + oDoc2 = utils.createDocument("swriter", cObjectName & "1") + oDoc2.Dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeFieldModel/script.xlb b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeFieldModel/script.xlb new file mode 100644 index 000000000000..992d18f57bc7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeFieldModel/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="toolkit_UnoControlTimeFieldModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="toolkit_UnoControlTimeFieldModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeFieldModel/toolkit_UnoControlTimeFieldModel.xba b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeFieldModel/toolkit_UnoControlTimeFieldModel.xba new file mode 100644 index 000000000000..c12c377b5f9d --- /dev/null +++ b/qadevOOo/tests/basic/mod/toolkit/UnoControlTimeFieldModel/toolkit_UnoControlTimeFieldModel.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="toolkit_UnoControlTimeFieldModel" 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 + + +' REQUIRED VARIABLES for interface/service tests: +Global oComponentInstance As Object +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' toolkit.UnoControlTimeFieldModel +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.awt.UnoControlTimeFieldModel") + oComponentInstance = createUnoService("com.sun.star.awt.UnoControlTimeFieldModel") + oPersistInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> |