diff options
Diffstat (limited to 'qadevOOo/tests/basic/mod')
1135 files changed, 50380 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/mod/acceptor.uno/Acceptor/acceptor_uno_Acceptor.xba b/qadevOOo/tests/basic/mod/acceptor.uno/Acceptor/acceptor_uno_Acceptor.xba new file mode 100644 index 000000000000..d3cf577383df --- /dev/null +++ b/qadevOOo/tests/basic/mod/acceptor.uno/Acceptor/acceptor_uno_Acceptor.xba @@ -0,0 +1,49 @@ +<?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="acceptor_uno_Acceptor" 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: +' acceptor.Acceptor +'************************************************************************* + oObj = createUnoService("com.sun.star.connection.Acceptor") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/acceptor.uno/Acceptor/script.xlb b/qadevOOo/tests/basic/mod/acceptor.uno/Acceptor/script.xlb new file mode 100644 index 000000000000..d14418d951e3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/acceptor.uno/Acceptor/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="acceptor_uno_Acceptor" library:readonly="false" library:passwordprotected="false"> +<library:element library:name="acceptor_uno_Acceptor"/> +</library:library> diff --git a/qadevOOo/tests/basic/mod/acceptor/Acceptor/acceptor_Acceptor.xba b/qadevOOo/tests/basic/mod/acceptor/Acceptor/acceptor_Acceptor.xba new file mode 100644 index 000000000000..53f50f3d014d --- /dev/null +++ b/qadevOOo/tests/basic/mod/acceptor/Acceptor/acceptor_Acceptor.xba @@ -0,0 +1,49 @@ +<?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="acceptor_Acceptor" 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: +' acceptor.Acceptor +'************************************************************************* + oObj = createUnoService("com.sun.star.connection.Acceptor") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/acceptor/Acceptor/script.xlb b/qadevOOo/tests/basic/mod/acceptor/Acceptor/script.xlb new file mode 100644 index 000000000000..2e9396e490ce --- /dev/null +++ b/qadevOOo/tests/basic/mod/acceptor/Acceptor/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="acceptor_Acceptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="acceptor_Acceptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/adabas/ODriver/adabas_ODriver.xba b/qadevOOo/tests/basic/mod/adabas/ODriver/adabas_ODriver.xba new file mode 100644 index 000000000000..19188b8cf603 --- /dev/null +++ b/qadevOOo/tests/basic/mod/adabas/ODriver/adabas_ODriver.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="adabas_ODriver" 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: + +'for sdbc.XDriver +Global URL as String +Global info As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' adabas.ODriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbcx.adabas.ODriver") + + URL = adabasUrl + + Dim inf(1) As new com.sun.star.beans.PropertyValue + inf(0).Name = "user" : inf(0).Value = adabasUser + inf(1).Name = "password" : inf(1).Value = adabasPassword + + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/adabas/ODriver/script.xlb b/qadevOOo/tests/basic/mod/adabas/ODriver/script.xlb new file mode 100644 index 000000000000..95a44f640eea --- /dev/null +++ b/qadevOOo/tests/basic/mod/adabas/ODriver/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="adabas_ODriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="adabas_ODriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ado/ODriver/ado_ODriver.xba b/qadevOOo/tests/basic/mod/ado/ODriver/ado_ODriver.xba new file mode 100644 index 000000000000..414d42b5ba0e --- /dev/null +++ b/qadevOOo/tests/basic/mod/ado/ODriver/ado_ODriver.xba @@ -0,0 +1,67 @@ +<?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="ado_ODriver" 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: + +' for sdbc.XDriver +Global URL as String +Global info As Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' ado.ODriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbc.ado.ODriver") + + URL = adoUrl + + Dim inf(0) As new com.sun.star.beans.PropertyValue + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ado/ODriver/script.xlb b/qadevOOo/tests/basic/mod/ado/ODriver/script.xlb new file mode 100644 index 000000000000..e4411785825c --- /dev/null +++ b/qadevOOo/tests/basic/mod/ado/ODriver/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="ado_ODriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ado_ODriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/brdgfctr/BridgeFactory/brdgfctr_BridgeFactory.xba b/qadevOOo/tests/basic/mod/brdgfctr/BridgeFactory/brdgfctr_BridgeFactory.xba new file mode 100644 index 000000000000..aaeecf914e7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/brdgfctr/BridgeFactory/brdgfctr_BridgeFactory.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="brdgfctr_BridgeFactory" 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.lang.XComponent: +Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.bridge.XBridgeFactory +Global sProtocol As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' brdgfctr.BridgeFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.bridge.BridgeFactory") + + ' Required for com.sun.star.lang.XComponent: + oComponentInstance = oObj + + ' Required for com.sun.star.bridge.XBridgeFactory + sProtocol = "urp" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/brdgfctr/BridgeFactory/script.xlb b/qadevOOo/tests/basic/mod/brdgfctr/BridgeFactory/script.xlb new file mode 100644 index 000000000000..51e25f8a2a15 --- /dev/null +++ b/qadevOOo/tests/basic/mod/brdgfctr/BridgeFactory/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="brdgfctr_BridgeFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="brdgfctr_BridgeFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/bridgefac.uno/BridgeFactory/bridgefac_uno_BridgeFactory.xba b/qadevOOo/tests/basic/mod/bridgefac.uno/BridgeFactory/bridgefac_uno_BridgeFactory.xba new file mode 100644 index 000000000000..99e3550df4bf --- /dev/null +++ b/qadevOOo/tests/basic/mod/bridgefac.uno/BridgeFactory/bridgefac_uno_BridgeFactory.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="bridgefac_uno_BridgeFactory" 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.lang.XComponent: +Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.bridge.XBridgeFactory +Global sProtocol As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' brdgfctr.BridgeFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.bridge.BridgeFactory") + + ' Required for com.sun.star.lang.XComponent: + oComponentInstance = oObj + + ' Required for com.sun.star.bridge.XBridgeFactory + sProtocol = "urp" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/bridgefac.uno/BridgeFactory/script.xlb b/qadevOOo/tests/basic/mod/bridgefac.uno/BridgeFactory/script.xlb new file mode 100644 index 000000000000..fc97a359ebcf --- /dev/null +++ b/qadevOOo/tests/basic/mod/bridgefac.uno/BridgeFactory/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="bridgefac_uno_BridgeFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="bridgefac_uno_BridgeFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cached/CachedContentResultSetFactory/cached_CachedContentResultSetFactory.xba b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetFactory/cached_CachedContentResultSetFactory.xba new file mode 100644 index 000000000000..8104801121f7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetFactory/cached_CachedContentResultSetFactory.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="cached_CachedContentResultSetFactory" 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.ucb.XCachedContentResultSetFactory + Global oCachedContentResultSetStub As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cached.CachedContentResultSetFactory +'************************************************************************* +On Error Goto ErrHndl + Dim oUCB, oCI, oContent As Object + Dim args As Variant + Dim sURL, sCntURL As String + + oObj = createUnoService("com.sun.star.ucb.CachedContentResultSetFactory") + + args = Array("Local", "Office") + oUCB = createUnoService("com.sun.star.ucb.UniversalContentBroker") + oUCB.initialize(args()) + + sURL = utils.Path2URL(cTestDocsDir & "solibrary.jar") + sURL = utils.utils.StrReplace(sURL, "/", "%2F") + sCntURL = "vnd.sun.star.pkg://" & sURL & "/" + + oCI = oUCB.createContentIdentifier(sCntUrl) + oContent = oUCB.queryContent(oCI) + + Dim props(0) As new com.sun.star.beans.Property + Dim cmd As new com.sun.star.ucb.Command + Dim ocArg As new com.sun.star.ucb.OpenCommandArgument2 + Dim sortInfo() As new com.sun.star.ucb.NumberedSortingInfo + Dim oResSet, oDynResSet, oStubFactory As Object + + props(0).Name = "Title" + + ocArg.Mode = com.sun.star.ucb.OpenMode.ALL + ocArg.Priority = 10000 + ocArg.Properties = props() + ocArg.SortingInfo = sortInfo() + + cmd.Name = "open" + cmd.Handle = -1 + cmd.Argument = ocArg + + oDynResSet = oContent.execute(cmd, 0, NULL_OBJECT) + oResSet = oDynResSet.getStaticResultSet() + + oResSet.first() + out.log("Is result set OK? " + (oResSet.getString(1) = "com") ) + + oStubFactory = createUnoService("com.sun.star.ucb.CachedContentResultSetStubFactory") + oCachedContentResultSetStub = oStubFactory.createCachedContentResultSetStub(oResSet) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cached/CachedContentResultSetFactory/script.xlb b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetFactory/script.xlb new file mode 100644 index 000000000000..32d0ebe1aa7d --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetFactory/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="cached_CachedContentResultSetFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cached_CachedContentResultSetFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cached/CachedContentResultSetStubFactory/cached_CachedContentResultSetStubFactory.xba b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetStubFactory/cached_CachedContentResultSetStubFactory.xba new file mode 100644 index 000000000000..01e6bb7c72e3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetStubFactory/cached_CachedContentResultSetStubFactory.xba @@ -0,0 +1,94 @@ +<?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="cached_CachedContentResultSetStubFactory" 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.ucb.XCachedContentResultSetStubFactory + Global oContentResultSet As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cached.CachedContentResultSetStubFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.ucb.CachedContentResultSetStubFactory") + + Dim args As Variant + Dim oUCB As Object + args = Array("Local", "Office") + oUCB = createUnoService("com.sun.star.ucb.UniversalContentBroker") + oUCB.initialize(args()) + + Dim sURL, sCntURL As String + Dim oCI, oContent As Object + sURL = utils.Path2URL(cTestDocsDir & "solibrary.jar") + sURL = utils.utils.StrReplace(sURL, "/", "%2F") + sCntURL = "vnd.sun.star.pkg://" & sURL & "/" + + oCI = oUCB.createContentIdentifier(sCntUrl) + oContent = oUCB.queryContent(oCI) + + Dim props(0) As new com.sun.star.beans.Property + Dim cmd As new com.sun.star.ucb.Command + Dim ocArg As new com.sun.star.ucb.OpenCommandArgument2 + Dim sortInfo() As new com.sun.star.ucb.NumberedSortingInfo + Dim oDynResSet, oStubFactory As Object + + props(0).Name = "Title" + + ocArg.Mode = com.sun.star.ucb.OpenMode.ALL + ocArg.Priority = 10000 + ocArg.Properties = props() + ocArg.SortingInfo = sortInfo() + + cmd.Name = "open" + cmd.Handle = -1 + cmd.Argument = ocArg + + oDynResSet = oContent.execute(cmd, 0, NULL_OBJECT) + oContentResultSet = oDynResSet.getStaticResultSet() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cached/CachedContentResultSetStubFactory/script.xlb b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetStubFactory/script.xlb new file mode 100644 index 000000000000..dcbc6cd85a94 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedContentResultSetStubFactory/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="cached_CachedContentResultSetStubFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cached_CachedContentResultSetStubFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetFactory/cached_CachedDynamicResultSetFactory.xba b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetFactory/cached_CachedDynamicResultSetFactory.xba new file mode 100644 index 000000000000..d5ec1571e159 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetFactory/cached_CachedDynamicResultSetFactory.xba @@ -0,0 +1,96 @@ +<?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="cached_CachedDynamicResultSetFactory" 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.ucb.XCachedDynamicResultSetFactory + Global oResSetStub As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cached.CachedDynamicResultSetFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.ucb.CachedDynamicResultSetFactory") + + Dim args As Variant + Dim oUCB As Object + args = Array("Local", "Office") + oUCB = createUnoService("com.sun.star.ucb.UniversalContentBroker") + oUCB.initialize(args()) + + Dim sURL, sCntURL As String + Dim oCI, oContent As Object + sURL = utils.Path2URL(cTestDocsDir & "solibrary.jar") + sURL = utils.utils.StrReplace(sURL, "/", "%2F") + sCntURL = "vnd.sun.star.pkg://" & sURL & "/" + + oCI = oUCB.createContentIdentifier(sCntUrl) + oContent = oUCB.queryContent(oCI) + + Dim props(0) As new com.sun.star.beans.Property + Dim cmd As new com.sun.star.ucb.Command + Dim ocArg As new com.sun.star.ucb.OpenCommandArgument2 + Dim sortInfo() As new com.sun.star.ucb.NumberedSortingInfo + Dim oDynResSet, oStubFactory As Object + + props(0).Name = "Title" + + ocArg.Mode = com.sun.star.ucb.OpenMode.ALL + ocArg.Priority = 10000 + ocArg.Properties = props() + ocArg.SortingInfo = sortInfo() + + cmd.Name = "open" + cmd.Handle = -1 + cmd.Argument = ocArg + + oDynResSet = oContent.execute(cmd, 0, NULL_OBJECT) + + oStubFactory = createUnoService("com.sun.star.ucb.CachedDynamicResultSetStubFactory") + oResSetStub = oStubFactory.createCachedDynamicResultSetStub(oDynResSet) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetFactory/script.xlb b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetFactory/script.xlb new file mode 100644 index 000000000000..cce9bb842251 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetFactory/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="cached_CachedDynamicResultSetFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cached_CachedDynamicResultSetFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetStubFactory/cached_CachedDynamicResultSetStubFactory.xba b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetStubFactory/cached_CachedDynamicResultSetStubFactory.xba new file mode 100644 index 000000000000..d979d506b638 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetStubFactory/cached_CachedDynamicResultSetStubFactory.xba @@ -0,0 +1,94 @@ +<?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="cached_CachedDynamicResultSetStubFactory" 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.ucb.XCachedDynamicResultSetStubFactory + Global oResSet As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cached.CachedDynamicResultSetStubFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.ucb.CachedDynamicResultSetStubFactory") + + Dim args As Variant + Dim oUCB As Object + args = Array("Local", "Office") + oUCB = createUnoService("com.sun.star.ucb.UniversalContentBroker") + oUCB.initialize(args()) + + Dim sURL, sCntURL As String + Dim oCI, oContent As Object + sURL = utils.Path2URL(cTestDocsDir & "solibrary.jar") + sURL = utils.utils.StrReplace(sURL, "/", "%2F") + sCntURL = "vnd.sun.star.pkg://" & sURL & "/" + + oCI = oUCB.createContentIdentifier(sCntUrl) + oContent = oUCB.queryContent(oCI) + + Dim props(0) As new com.sun.star.beans.Property + Dim cmd As new com.sun.star.ucb.Command + Dim ocArg As new com.sun.star.ucb.OpenCommandArgument2 + Dim sortInfo() As new com.sun.star.ucb.NumberedSortingInfo + Dim oStubFactory As Object + + props(0).Name = "Title" + + ocArg.Mode = com.sun.star.ucb.OpenMode.ALL + ocArg.Priority = 10000 + ocArg.Properties = props() + ocArg.SortingInfo = sortInfo() + + cmd.Name = "open" + cmd.Handle = -1 + cmd.Argument = ocArg + + oResSet = oContent.execute(cmd, 0, NULL_OBJECT) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetStubFactory/script.xlb b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetStubFactory/script.xlb new file mode 100644 index 000000000000..175495d2475a --- /dev/null +++ b/qadevOOo/tests/basic/mod/cached/CachedDynamicResultSetStubFactory/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="cached_CachedDynamicResultSetStubFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cached_CachedDynamicResultSetStubFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/cmdmail_SimpleCommandMail.xba b/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/cmdmail_SimpleCommandMail.xba new file mode 100644 index 000000000000..76bf3537af96 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/cmdmail_SimpleCommandMail.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="cmdmail_SimpleCommandMail" 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: +' cmdmail.SimpleCommandMail +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.system.SimpleCommandMail") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/script.xlb b/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/script.xlb new file mode 100644 index 000000000000..d95fbd929c1f --- /dev/null +++ b/qadevOOo/tests/basic/mod/cmdmail/SimpleCommandMail/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="cmdmail_SimpleCommandMail" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cmdmail_SimpleCommandMail"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cnt/ChaosContentProvider/cnt_ChaosContentProvider.xba b/qadevOOo/tests/basic/mod/cnt/ChaosContentProvider/cnt_ChaosContentProvider.xba new file mode 100644 index 000000000000..d25c14f513b3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cnt/ChaosContentProvider/cnt_ChaosContentProvider.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="cnt_ChaosContentProvider" 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.ucb.XContentProvider: + Global ContentID1 As Object + Global ContentID2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cnt.ChaosContentProvider +'************************************************************************* + Dim oUCB As Object + oObj = createUNOService("com.sun.star.ucb.ChaosContentProvider") + oUCB = createUNOService("com.sun.star.comp.ucb.UniversalContentBroker") + ContentID1 = oUCB.createContentIdentifier("ftp://localhost") + ContentID2 = oUCB.createContentIdentifier("vnd.sun.star.help://") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cnt/ChaosContentProvider/script.xlb b/qadevOOo/tests/basic/mod/cnt/ChaosContentProvider/script.xlb new file mode 100644 index 000000000000..8f605cbbca17 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cnt/ChaosContentProvider/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="cnt_ChaosContentProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cnt_ChaosContentProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cnt/CntUnoDataContainer/cnt_CntUnoDataContainer.xba b/qadevOOo/tests/basic/mod/cnt/CntUnoDataContainer/cnt_CntUnoDataContainer.xba new file mode 100644 index 000000000000..1d224492b1cc --- /dev/null +++ b/qadevOOo/tests/basic/mod/cnt/CntUnoDataContainer/cnt_CntUnoDataContainer.xba @@ -0,0 +1,94 @@ +<?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="cnt_CntUnoDataContainer" 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.container.XIndexContainer: + Global oInstance As Variant 'for InsertByName + +' Required for XIndexReplace + Global oIdxReplaceInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cnt.CntUnoDataContainer +'************************************************************************* + Dim oDataContainer1 As Object + Dim oDataContainer2 As Object + Dim oInputStream As Object + Dim cFileName As String + Dim oFileAcc As Object + Dim hFile As Integer + + oObj = createUNOService("com.sun.star.ucb.DataContainer") + oDataContainer1 = createUNOService("com.sun.star.ucb.DataContainer") + oDataContainer2 = createUNOService("com.sun.star.ucb.DataContainer") + oIdxReplaceInstance = createUNOService("com.sun.star.ucb.DataContainer") + + oInstance = createUNOService("com.sun.star.ucb.DataContainer") + + oObj.Name = "oDataContainer0" + oDataContainer1.Name = "oDataContainer1" + oDataContainer2.Name = "oDataContainer2" + oInstance.Name = "XDataContainer3" + oIdxReplaceInstance.Name = "oIdxReplaceInstance" + + oObj.insertByIndex(0, oDataContainer1) + oObj.insertByIndex(1, oDataContainer2) + + cFileName = utils.getTempFileURL("CntUnoDataContainer.dat") + #hFile = freefile() + Open cFileName For Output As #hFile + print #hFile "String content from cnt.CntUnoDataContainer" + close #hFile + + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + oInputStream = oFileAcc.openFileRead(cFileName) + oObj.setInputStream(oInputStream) + oObj.setContentType("text/plain") + +End Sub + +Sub ResetStreams() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cnt/CntUnoDataContainer/script.xlb b/qadevOOo/tests/basic/mod/cnt/CntUnoDataContainer/script.xlb new file mode 100644 index 000000000000..d806d1fad5d4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cnt/CntUnoDataContainer/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="cnt_CntUnoDataContainer" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cnt_CntUnoDataContainer"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cnt/PropertyMatcherFactory/cnt_PropertyMatcherFactory.xba b/qadevOOo/tests/basic/mod/cnt/PropertyMatcherFactory/cnt_PropertyMatcherFactory.xba new file mode 100644 index 000000000000..144c36389578 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cnt/PropertyMatcherFactory/cnt_PropertyMatcherFactory.xba @@ -0,0 +1,49 @@ +<?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="cnt_PropertyMatcherFactory" 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: +' cnt.PropertyMatcherFactory +'************************************************************************* + oObj = createUNOService("com.sun.star.ucb.PropertyMatcherFactory") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cnt/PropertyMatcherFactory/script.xlb b/qadevOOo/tests/basic/mod/cnt/PropertyMatcherFactory/script.xlb new file mode 100644 index 000000000000..090026c261d5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cnt/PropertyMatcherFactory/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="cnt_PropertyMatcherFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cnt_PropertyMatcherFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/connector.uno/Connector/connector_uno_Connector.xba b/qadevOOo/tests/basic/mod/connector.uno/Connector/connector_uno_Connector.xba new file mode 100644 index 000000000000..b7435bab594c --- /dev/null +++ b/qadevOOo/tests/basic/mod/connector.uno/Connector/connector_uno_Connector.xba @@ -0,0 +1,49 @@ +<?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="connector_uno_Connector" 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: +' connectr.Connector +'************************************************************************* + oObj = createUNOService("com.sun.star.connection.Connector") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/connector.uno/Connector/script.xlb b/qadevOOo/tests/basic/mod/connector.uno/Connector/script.xlb new file mode 100644 index 000000000000..4ace609e6092 --- /dev/null +++ b/qadevOOo/tests/basic/mod/connector.uno/Connector/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="connector_uno_onnector" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="connector_uno_Connector"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/connectr/Connector/connectr_Connector.xba b/qadevOOo/tests/basic/mod/connectr/Connector/connectr_Connector.xba new file mode 100644 index 000000000000..900625d74de4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/connectr/Connector/connectr_Connector.xba @@ -0,0 +1,49 @@ +<?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="connectr_Connector" 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: +' connectr.Connector +'************************************************************************* + oObj = createUNOService("com.sun.star.connection.Connector") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/connectr/Connector/script.xlb b/qadevOOo/tests/basic/mod/connectr/Connector/script.xlb new file mode 100644 index 000000000000..0639ac0f938c --- /dev/null +++ b/qadevOOo/tests/basic/mod/connectr/Connector/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="connectr_Connector" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="connectr_Connector"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/corefl/CoreReflection/corefl_CoreReflection.xba b/qadevOOo/tests/basic/mod/corefl/CoreReflection/corefl_CoreReflection.xba new file mode 100644 index 000000000000..98333ea94bee --- /dev/null +++ b/qadevOOo/tests/basic/mod/corefl/CoreReflection/corefl_CoreReflection.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="corefl_CoreReflection" 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.lang.XComponent: +Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' corefl.CoreReflection +'************************************************************************* + oObj = createUNOService("com.sun.star.reflection.CoreReflection") + + ' Required for com.sun.star.lang.XComponent + oComponentInstance = oObj +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/corefl/CoreReflection/script.xlb b/qadevOOo/tests/basic/mod/corefl/CoreReflection/script.xlb new file mode 100644 index 000000000000..f29c9839c013 --- /dev/null +++ b/qadevOOo/tests/basic/mod/corefl/CoreReflection/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="corefl_CoreReflection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="corefl_CoreReflection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/corereflection.uno/CoreReflection/corereflection_uno_CoreReflection.xba b/qadevOOo/tests/basic/mod/corereflection.uno/CoreReflection/corereflection_uno_CoreReflection.xba new file mode 100644 index 000000000000..ce69bd070877 --- /dev/null +++ b/qadevOOo/tests/basic/mod/corereflection.uno/CoreReflection/corereflection_uno_CoreReflection.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="corereflection_uno_CoreReflection" 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.lang.XComponent: +Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' corefl.CoreReflection +'************************************************************************* + oObj = createUNOService("com.sun.star.reflection.CoreReflection") + + ' Required for com.sun.star.lang.XComponent + oComponentInstance = oObj +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/corereflection.uno/CoreReflection/script.xlb b/qadevOOo/tests/basic/mod/corereflection.uno/CoreReflection/script.xlb new file mode 100644 index 000000000000..1d7d7a488a49 --- /dev/null +++ b/qadevOOo/tests/basic/mod/corereflection.uno/CoreReflection/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="corereflection_uno_CoreReflection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="corereflection_uno_CoreReflection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/cpld/DLLComponentLoader/cpld_DLLComponentLoader.xba b/qadevOOo/tests/basic/mod/cpld/DLLComponentLoader/cpld_DLLComponentLoader.xba new file mode 100644 index 000000000000..9a5544f9f2b0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cpld/DLLComponentLoader/cpld_DLLComponentLoader.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="cpld_DLLComponentLoader" 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 cImpLoader As String +Global cImpURL As String +Global cImpName As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cpld.DLLComponentLoader +'************************************************************************* + oObj = createUNOService("com.sun.star.loader.SharedLibrary") + + cImpLoader = "com.sun.star.loader.SharedLibrary" + cImpURL = Path2URL(cTestDocsDir + "XImpReg.dll") + cImpName = "com.sun.star.comp.stoc.JavaComponentLoader" +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/cpld/DLLComponentLoader/script.xlb b/qadevOOo/tests/basic/mod/cpld/DLLComponentLoader/script.xlb new file mode 100644 index 000000000000..1d673ffb7d71 --- /dev/null +++ b/qadevOOo/tests/basic/mod/cpld/DLLComponentLoader/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="cpld_DLLComponentLoader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="cpld_DLLComponentLoader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ConnectionLineAccessibility/dbaccess_ConnectionLineAccessibility.xba b/qadevOOo/tests/basic/mod/dbaccess/ConnectionLineAccessibility/dbaccess_ConnectionLineAccessibility.xba new file mode 100644 index 000000000000..751479fca4ab --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ConnectionLineAccessibility/dbaccess_ConnectionLineAccessibility.xba @@ -0,0 +1,147 @@ +<?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="dbaccess_ConnectionLineAccessibility" 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 cancelButton As Object +Global queryWindow As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.ConnectionLineAccessibility +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object + + Dim dbSource As Object + dbSource = createUnoService("com.sun.star.sdb.DataSource") + + Dim info(2) As new com.sun.star.beans.PropertyValue + info(0).Name = "JavaDriverClass" + info(0).Value = "org.gjt.mm.mysql.Driver" + info(1).Name = "user" + info(1).Value = jdbcUser + info(2).Name = "password" + info(2).Value = jdbcPassword + dbSource.info = info() + dbSource.URL = jdbcUrl + + Dim dbContext As Object + dbContext = createUnoService("com.sun.star.sdb.DatabaseContext") + + Dim sourceName As String + sourceName = "AAADBSource for dbu-accessibility" + + if dbContext.hasByName(sourceName) then + dbContext.revokeObject(sourceName) + endif + + dbContext.registerObject(sourceName, dbSource) + + Dim connection As Object + connection = dbSource.getIsolatedConnection(jdbcUser, jdbcPassword) + + Dim statement As Object + statement = connection.createStatement() + + statement.executeUpdate("drop table if exists tst_table1") + statement.executeUpdate("drop table if exists tst_table2") + statement.executeUpdate("create table tst_table1 (id1 int)") + statement.executeUpdate("create table tst_table2 (id2 int)") + + Dim defContainer As Object + defContainer = dbSource.getQueryDefinitions() + + Dim newQuery As Object + newQuery = createUnoService("com.sun.star.sdb.QueryDefinition") + newQuery.Command = "select * from tst_table1, tst_table2 where " + _ + "tst_table1.id1=tst_table2.id2" + + defContainer.insertByName("Query1", newQuery) + + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + thRunner.initialize(Array("ExecuteDialog", "com.sun.star.sdb.DatasourceAdministrationDialog")) + wait(3000) + + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + + Dim pageTabList As Object + pageTabList = utils.at_getAccessibleObjectForRole(xRoot, 31) + + pageTabList.selectAccessibleChild(3) + wait(500) + + Dim editQueryButton As Object + editQueryButton = utils.at_getAccessibleObjectForRole(xRoot, 35, "Edit Query") + + cancelButton = utils.at_getAccessibleObjectForRole(xRoot, 35, "Cancel") + + editQueryButton.doAccessibleAction(0) + wait(1000) + + oWin = tk.getActiveTopWindow() + queryWindow = oWin + xRoot = utils.at_getAccessibleObject(oWin) + + oObj = utils.at_getAccessibleObjectForRole(xRoot, 0, "Relation") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + queryWindow.dispose() + if NOT isNull(cancelButton) then + cancelButton.doAccessibleAction(0) + wait(1000) + End If +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ConnectionLineAccessibility/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/ConnectionLineAccessibility/script.xlb new file mode 100644 index 000000000000..66ba217e7f6c --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ConnectionLineAccessibility/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="dbaccess_ConnectionLineAccessibility" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_ConnectionLineAccessibility"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/DBContentLoader/dbaccess_DBContentLoader.xba b/qadevOOo/tests/basic/mod/dbaccess/DBContentLoader/dbaccess_DBContentLoader.xba new file mode 100644 index 000000000000..5c7722b265bd --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/DBContentLoader/dbaccess_DBContentLoader.xba @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="dbaccess_DBContentLoader" 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: + +' For XFrameLoader +Global FrameLoaderURL As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.DBContentLoader +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sdb.ContentLoader") + + ' For XFrameLoader + FrameLoaderURL = ".component:DB/DataSourceBrowser" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/DBContentLoader/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/DBContentLoader/script.xlb new file mode 100644 index 000000000000..16dc4304c46c --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/DBContentLoader/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="dbaccess_DBContentLoader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_DBContentLoader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/JoinViewAccessibility/dbaccess_JoinViewAccessibility.xba b/qadevOOo/tests/basic/mod/dbaccess/JoinViewAccessibility/dbaccess_JoinViewAccessibility.xba new file mode 100644 index 000000000000..3b2b98a28618 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/JoinViewAccessibility/dbaccess_JoinViewAccessibility.xba @@ -0,0 +1,148 @@ +<?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="dbaccess_JoinViewAccessibility" 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 cancelButton As Object +Global queryWindow As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.JoinViewAccessibility +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object + + Dim dbSource As Object + dbSource = createUnoService("com.sun.star.sdb.DataSource") + + Dim info(2) As new com.sun.star.beans.PropertyValue + info(0).Name = "JavaDriverClass" + info(0).Value = "org.gjt.mm.mysql.Driver" + info(1).Name = "user" + info(1).Value = jdbcUser + info(2).Name = "password" + info(2).Value = jdbcPassword + dbSource.info = info() + dbSource.URL = jdbcUrl + + Dim dbContext As Object + dbContext = createUnoService("com.sun.star.sdb.DatabaseContext") + + Dim sourceName As String + sourceName = "AAADBSource for dbu-accessibility" + + if dbContext.hasByName(sourceName) then + dbContext.revokeObject(sourceName) + endif + + dbContext.registerObject(sourceName, dbSource) + + Dim connection As Object + connection = dbSource.getIsolatedConnection(jdbcUser, jdbcPassword) + + Dim statement As Object + statement = connection.createStatement() + + statement.executeUpdate("drop table if exists tst_table1") + statement.executeUpdate("drop table if exists tst_table2") + statement.executeUpdate("create table tst_table1 (id1 int)") + statement.executeUpdate("create table tst_table2 (id2 int)") + + Dim defContainer As Object + defContainer = dbSource.getQueryDefinitions() + + Dim newQuery As Object + newQuery = createUnoService("com.sun.star.sdb.QueryDefinition") + newQuery.Command = "select * from tst_table1, tst_table2 where " + _ + "tst_table1.id1=tst_table2.id2" + + defContainer.insertByName("Query1", newQuery) + + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + thRunner.initialize(Array("ExecuteDialog", "com.sun.star.sdb.DatasourceAdministrationDialog")) + wait(3000) + + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + + Dim pageTabList As Object + pageTabList = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PAGE_TAB_LIST) + + pageTabList.selectAccessibleChild(3) + wait(500) + + Dim editQueryButton As Object + editQueryButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON, "Edit Query") + + cancelButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON, "Cancel") + + editQueryButton.doAccessibleAction(0) + wait(1000) + + oWin = tk.getActiveTopWindow() + queryWindow = oWin + xRoot = utils.at_getAccessibleObject(oWin) + + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.VIEW_PORT) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(queryWindow) + if NOT isNull(cancelButton) then + cancelButton.doAccessibleAction(0) + wait(1000) + End If +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/JoinViewAccessibility/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/JoinViewAccessibility/script.xlb new file mode 100644 index 000000000000..8617aa03de8b --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/JoinViewAccessibility/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="dbaccess_JoinViewAccessibility" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_JoinViewAccessibility"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/OCommandDefinition/dbaccess_OCommandDefinition.xba b/qadevOOo/tests/basic/mod/dbaccess/OCommandDefinition/dbaccess_OCommandDefinition.xba new file mode 100644 index 000000000000..5635743679e1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/OCommandDefinition/dbaccess_OCommandDefinition.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="dbaccess_OCommandDefinition" 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: +' dbaccess.OCommandDefinition +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sdb.QueryDefinition") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/OCommandDefinition/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/OCommandDefinition/script.xlb new file mode 100644 index 000000000000..c4d19d9c021c --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/OCommandDefinition/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="dbaccess_OCommandDefinition" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_OCommandDefinition"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatabaseContext/dbaccess_ODatabaseContext.xba b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseContext/dbaccess_ODatabaseContext.xba new file mode 100644 index 000000000000..c90fc39d63ee --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseContext/dbaccess_ODatabaseContext.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="dbaccess_ODatabaseContext" 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.uno.XNamingService: + Global oObjectToRegister As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.ODatabaseContext +'************************************************************************* + oObj = createUNOService("com.sun.star.sdb.DatabaseContext") + oObjectToRegister = createUNOService("com.sun.star.sdb.DataSource") + oObjectToRegister.URL = "sdbc:dbase:" + utils.getTempFileURL("") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatabaseContext/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseContext/script.xlb new file mode 100644 index 000000000000..f1a5f0302285 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseContext/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="dbaccess_ODatabaseContext" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_ODatabaseContext"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatabaseSource/dbaccess_ODatabaseSource.xba b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseSource/dbaccess_ODatabaseSource.xba new file mode 100644 index 000000000000..b3fad24fc39f --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseSource/dbaccess_ODatabaseSource.xba @@ -0,0 +1,88 @@ +<?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="dbaccess_ODatabaseSource" 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 object disposing (the name of the source) +Global sourceName as String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.ODatabaseSource +'************************************************************************* +On Error Goto ErrHndl + Dim tmpDir as String, dbSrc as Object, dbContext as Object + + sourceName = "BasicODatabaseSource" + + oDoc = utils.createDocument("swriter", cObjectName) + dbContext =createUnoService("com.sun.star.sdb.DatabaseContext") + tmpDir = utils.getTempFileURL("") + + Out.Log("Creating datasource in " + tmpDir) + + dbSrc = createUnoService("com.sun.star.sdb.DataSource") + dbSrc.URL = "sdbc:dbase:" + tmpDir + + if dbContext.hasByName(sourceName) then + dbContext.revokeObject(sourceName) + endif + + dbContext.registerObject(sourceName, dbSrc) + + oObj = dbSrc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + Dim dbContext as Object + + dbContext =createUnoService("com.sun.star.sdb.DatabaseContext") + if dbContext.hasByName(sourceName) then + dbContext.revokeObject(sourceName) + endif + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatabaseSource/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseSource/script.xlb new file mode 100644 index 000000000000..6e67dd8ee35a --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatabaseSource/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="dbaccess_ODatabaseSource" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_ODatabaseSource"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatasourceAdministrationDialog/dbaccess_ODatasourceAdministrationDialog.xba b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceAdministrationDialog/dbaccess_ODatasourceAdministrationDialog.xba new file mode 100644 index 000000000000..7260d239d673 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceAdministrationDialog/dbaccess_ODatasourceAdministrationDialog.xba @@ -0,0 +1,67 @@ +<?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="dbaccess_ODatasourceAdministrationDialog" 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: + +' relation for com.sun.star.lang.XInitialization +Global aInitArgs As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.ODatasourceAdministrationDialog +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sdb.DatasourceAdministrationDialog") + + ' setting relation for com.sun.star.lang.XInitialization + Dim arg As new com.sun.star.beans.PropertyValue + arg.Name = "Title" + arg.Value = "ODatasourceAdministrationDialog" + + aInitArgs = Array(arg) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatasourceAdministrationDialog/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceAdministrationDialog/script.xlb new file mode 100644 index 000000000000..b70e65c3d620 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceAdministrationDialog/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="dbaccess_ODatasourceAdministrationDialog" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_ODatasourceAdministrationDialog"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatasourceBrowser/dbaccess_ODatasourceBrowser.xba b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceBrowser/dbaccess_ODatasourceBrowser.xba new file mode 100644 index 000000000000..db96d88a4c2d --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceBrowser/dbaccess_ODatasourceBrowser.xba @@ -0,0 +1,142 @@ +<?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="dbaccess_ODatasourceBrowser" 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: + +' variable for XComponent +Global oComponentInstance As Object + +' variable for XFormController +Global otherWin As Object + +' variable for XDispatchProvider +Global dispatchUrl As String + +' variable for frame.XController +Global oFrameToAttach As Object +Global oModelToAttach As Object +Global bHasNoViewData As Boolean +Global oObjToSuspend As Object +Global bHasNoModel As Boolean + +' variables for awt.XTabController +Global oXTabControllerModel as Object +Global oXTabControllerContainer as Object + +' variable for lang.XInitialization +Global aInitArgs As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.ODatasourceBrowser +'************************************************************************* +On Error Goto ErrHndl + Dim cntrlr As Object + Dim frame1 As Object, frame2 As Object + Dim url As new com.sun.star.util.URL + Dim dispatcher As Object + Dim oShape As Object, oDrawPage As Object, oModel As Object + Dim oController As Object, oCtrll As Object + Dim params(2) as new com.sun.star.beans.PropertyValue + Dim list1 as object, ctrl as object + +' oDoc = utils.createDocument("swriter", cObjectName) + oDoc = StarDesktop.loadComponentFromUrl("private:factory/swriter", "_blank",0 , args()) + + wait(500) + + cntrlr = oDoc.getCurrentController() + frame1 = StarDesktop.getCurrentFrame() + url.Complete = ".component:DB/DataSourceBrowser" + dispatcher = frame1.queryDispatch(url, "_beamer", 12) + dispatcher.dispatch(url, DimArray()) + + frame2 = frame1.findFrame("_beamer", 4) + frame2.setName("ODatasourceBrowser") + + oObj = frame2.getController() + + ' now initialize the browser to make him displaying a table in its gtrid. + ' This is required for activating of this control + params(0).Name = "DataSourceName" + params(0).Value = "Bibliography" + params(1).Name = "CommandType" + params(1).Value = com.sun.star.sdb.CommandType.TABLE + params(2).Name = "Command" + params(2).Value = "biblio" + + oObj.initialize(params()) + ' waiting while data loading ... + wait(2000) + +'setting variable for XComponent + oComponentInstance = oObj + +'setting variable for XDispatchProvider + dispatchUrl = ".uno:DataSourceBrowser/FormLetter" + +'setting variable for XController + oFrameToAttach = frame1 + oModelToAttach = oDoc + bHasNoViewData = true + oObjToSuspend = oObj + bHasNoModel = true + +'setting variables for awt.XTabController and for XFormController + oShape = toolkittools.createUNOControlShape("CommandButton", "UnoControlButton") + toolkittools.addShape(oShape) + oDrawPage = oDoc.getDrawPage() + + oModel = oShape.getControl() + oController = oDoc.getCurrentController() + otherWin = oController.getControl(oModel) + oXTabControllerContainer = otherWin.getContext() + oXTabControllerModel = oDrawPage.getForms().getByIndex(0) + +' setting variable for lang.XInitialization + aInitArgs = params() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ODatasourceBrowser/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceBrowser/script.xlb new file mode 100644 index 000000000000..1a70f0bd7f8f --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ODatasourceBrowser/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="dbaccess_ODatasourceBrowser" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_ODatasourceBrowser"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/OInteractionHandler/dbaccess_OInteractionHandler.xba b/qadevOOo/tests/basic/mod/dbaccess/OInteractionHandler/dbaccess_OInteractionHandler.xba new file mode 100644 index 000000000000..f9d73c83c5ac --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/OInteractionHandler/dbaccess_OInteractionHandler.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="dbaccess_OInteractionHandler" 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: +' dbaccess.OInteractionHandler +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sdb.InteractionHandler") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/OInteractionHandler/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/OInteractionHandler/script.xlb new file mode 100644 index 000000000000..019f9dc617cc --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/OInteractionHandler/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="dbaccess_OInteractionHandler" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_OInteractionHandler"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ORowSet/dbaccess_ORowSet.xba b/qadevOOo/tests/basic/mod/dbaccess/ORowSet/dbaccess_ORowSet.xba new file mode 100644 index 000000000000..60ef6a794bce --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ORowSet/dbaccess_ORowSet.xba @@ -0,0 +1,176 @@ +<?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="dbaccess_ORowSet" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.sdbc.XColumnLocate: + Global cExistantColumnName As String + +' Required for com.sun.star.sdbc.XResultSet + Global cXResultSetFirstRecord as String + Global cXResultSetLastRecord as String + Global cXResultSetRecord1 as String + Global cXResultSetRecord2 as String + Global cXResultSet2BeforeLastRecord as String + +' Required for com.sun.star.sdbc.XParameters + Global paramTypes as Variant + +' Required for com.sun.star.sdbc.XRow and com.sun.star.sdbc.XRowUpdate + Global rowTypes as Variant + Global rowTypesCol as Variant + +' Required for com.sun.star.sdbc.XResultSetUpdate + Global textColumn As String + + Global oConnection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.ORowSet +'************************************************************************* +On Error Goto ErrHndl + + Dim oRowSet As Object, facc As Object, dbSource As Object + Dim srcFile As String, dstFile As String, dbSrcURL As String + + ' Copying DB file to temp location + srcFile = utils.Path2URL(cTestDocsDir) + "TestDB/testDB.dbf" + dstFile = utils.getTempFileURL("TestDB.dbf") + dbSrcURL = "sdbc:dbase:" + utils.StrReplace(dstFile, "/testDB.dbf", "") + + facc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + if not facc.exists(srcFile) then + Out.log("could not find source of testDB.dbf: " + srcFile) + end if + if (facc.exists(dstFile)) then facc.kill(dstFile) + facc.copy(srcFile, dstFile) + + dbtools.RegisterDataSource("DBTest", dbSrcURL) + + oRowSet = createUnoService("com.sun.star.sdb.RowSet") + + oRowSet.DataSourceName = "DBTest" + oRowSet.Command = "TestDB" + oRowSet.CommandType = com.sun.star.sdb.CommandType.TABLE + + oRowSet.execute() + + wait(200) + + oConnection = oRowSet.ActiveConnection + + if NOT isObject(oConnection) then + Out.Log("oConnection wasn't retrieved properly !!!") + end if + + oRowSet.first() + + Out.Log("The first record has: '" + oRowSet.getString(1) + "'") + + oObj = oRowSet + + oComponentInstance = createUnoService("com.sun.star.sdb.RowSet") + cExistantColumnName = "_TEXT" + cXResultSetFirstRecord = "text1" + cXResultSetLastRecord = "text3" + cXResultSetRecord1 = "text1" + cXResultSetRecord2 = "text2" + cXResultSet2BeforeLastRecord = "text2" + + paramTypes = DimArray() + +' paramTypes = Array("boolean", "byte", "short", "int", "long", "float", "double", "string", _ +' "bytes", "date", "time", "timestamp", "binarystream", "characterstream", "object", _ +' "ref", "blob", "clob", "array") + + +' Dim dat As new com.sun.star.util.Date +' Dim tim As new com.sun.star.util.Time +' Dim datTim As new com.sun.star.util.DateTime + +' dat.Year = 2001 +' dat.Month = 1 +' dat.Day = 1 + +' tim.Hours = 1 +' tim.Minutes = 1 +' tim.Seconds = 1 + +' paramVal = Array(true, 11, 11, 111, NULL, 1.1, 11.11, "text1", NULL, dat, tim, NULL, NULL, NULL, NULL, +' NULL, NULL, NULL, NULL) + + ' for XRow and XRowUpdate + rowTypes = Array("string", "int", "long", "double", "float", "date", "datetm", "boolean") + rowTypesCol = Array(1, 2, 3, 4, 5, 6, 7, 9) +' rowTypes = Array("boolean", "byte", "short", "int", "long", "float", "double", "string", _ +' "bytes", "date", "time", "timestamp", "binarystream", "characterstream", "object", _ +' "numericobject") + + + +' Required for com.sun.star.sdbc.XResultSetUpdate + textColumn = "_TEXT" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() +On Error Goto ErrHndl + Out.Log("Closing DB connection ...") + oConnection.close() + + Out.Log("Revoking 'DBTest' datasource ...") + dbtools.RevokeDB("DBTest") +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/ORowSet/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/ORowSet/script.xlb new file mode 100644 index 000000000000..74871382da1c --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/ORowSet/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="dbaccess_ORowSet" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_ORowSet"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/OSQLMessageDialog/dbaccess_OSQLMessageDialog.xba b/qadevOOo/tests/basic/mod/dbaccess/OSQLMessageDialog/dbaccess_OSQLMessageDialog.xba new file mode 100644 index 000000000000..6a3b67c51849 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/OSQLMessageDialog/dbaccess_OSQLMessageDialog.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="dbaccess_OSQLMessageDialog" 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: +' dbaccess.OSQLMessageDialog +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sdb.ErrorMessageDialog") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/OSQLMessageDialog/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/OSQLMessageDialog/script.xlb new file mode 100644 index 000000000000..d4d9ae335fc4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/OSQLMessageDialog/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="dbaccess_OSQLMessageDialog" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_OSQLMessageDialog"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/SbaXGridControl/dbaccess_SbaXGridControl.xba b/qadevOOo/tests/basic/mod/dbaccess/SbaXGridControl/dbaccess_SbaXGridControl.xba new file mode 100644 index 000000000000..1ba1f7cac92d --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/SbaXGridControl/dbaccess_SbaXGridControl.xba @@ -0,0 +1,222 @@ +<?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="dbaccess_SbaXGridControl" 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 view.XSelectionSupplier +Global SelectableObj1 as Variant +Global SelectableObj2 as Variant + +' Required for awt.XControl +Global oModel As Object +Global oContext As Object +Global oWinpeer As Object +Global oToolkit As Object + +' Required for awt.XWindow +Global oXWindow As Object +Global oCtrlShape As Variant + +' Required for awt.XView +Global oGraphics As Object + +' Required for frame.XDispatch +Global dispatchURL As String + +' Required for XContainer +Global oElementToInsert As Object +Global oContainer As Object ' in case if the + ' component tested doesn't support XNameContainer + +' Required for XComponent +Global oComponentInstance As Object 'it will be disposed + +' Required for form.XUpdateBroadcaster +Global bCustomUpdate As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.SbaXGridControl +'************************************************************************* + Dim cntrlShape as Object, grid as Object + Dim size as new com.sun.star.awt.Size + Dim pos as new com.sun.star.awt.Point + Dim drawPage as Object, aForm as Object + Dim aColumn1 as Object, aColumn2 as Object + Dim theAccess as Object + Dim sel1(0) as Long, sel2(0) as Long + Dim device as Object + +On Error Goto ErrHndl + + oDoc = utils.createDocument("swriter", cObjectName) + + ' creating ControlShape with GridControl inside it + cntrlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") + grid = oDoc.createInstance("com.sun.star.form.component.GridControl") + grid.DefaultControl = "com.sun.star.form.control.InteractionGridControl" + pos.X = 15000 + pos.Y = 10000 + size.Width = 4500 + size.Height = 3000 + cntrlShape.setPosition(pos) + cntrlShape.setSize(size) + cntrlShape.setControl(grid) + + ' adding the shape with grid into the document + drawPage = oDoc.getDrawPage() + drawPage.add(cntrlShape) + + ' binding the form which contains a grid model to + ' the Bibliography database + aForm = drawPage.getForms().getByName("Standard") + aForm.DataSourceName = "Bibliography" + aForm.Command = "biblio" + aForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + ' creating and inserting some columns + aColumn1 = grid.createColumn("TextField") + aColumn1.DataField = "Identifier" + aColumn1.Label = "Identifier" + grid.insertByName("First", aColumn1) + aColumn2 = grid.createColumn("TextField") + aColumn2.DataField = "Address" + aColumn2.Label = "Address" + grid.insertByName("Second", aColumn2) + + ' Getting the controller of the Grid + theAccess = oDoc.getCurrentController() + oObj = theAccess.getControl(grid) + + ' setting variable for XSelectionSupplier + sel1(0) = 2 + sel2(0) = 5 + SelectableObj1 = sel1() + SelectableObj2 = sel2() + + ' setting variable for XControl + oContext = oDoc + oModel = grid + oWinpeer = oObj.getPeer() + oToolkit = oWinpeer.getToolkit() + + ' setting variable for XWindow + oXWindow = theAccess.getControl(cntrlShape.getControl()) + oCtrlShape = cntrlShape + + ' setting variable for XView + device = oToolkit.createScreenCompatibleDevice(200, 200) + oGraphics = device.createGraphics() + + 'setting variable for XDispatch + dispatchURL = ".uno:FormSlots/moveToNext" + + 'setting variables for XContainer + oElementToInsert = grid.createColumn("TextField") + oElementToInsert.DataField = "Author" + oElementToInsert.Label = "Author" + oContainer = grid + + 'setting variable for XComponent + cntrlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") + grid = oDoc.createInstance("com.sun.star.form.component.GridControl") + grid.DefaultControl = "com.sun.star.form.control.InteractionGridControl" + cntrlShape.setControl(grid) + drawPage.add(cntrlShape) + + + 'setting variable for XUpdateBroadcaster + bCustomUpdate = True + + oComponentInstance = theAccess.getControl(grid) + + ' Switching to non-design mode + switchDesignMode(oDoc) + + wait(200) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub UpdateComponent() + oObj.commit +End Sub + +Sub switchDesignMode(xDoc as Object) +On Error Goto ErrHndl + + Dim frame as Variant, disp as Variant, transf as Object + Dim URL as new com.sun.star.util.URL + Dim noProps() + Dim res as Boolean + + frame = xDoc.getCurrentController().getFrame() + URL.Complete = ".uno:SwitchControlDesignMode" + transf = createUnoService("com.sun.star.util.URLTransformer") + res = transf.parseStrict(URL) + + out.log("URL parsed :" + res) + + disp = frame.queryDispatch(URL, "", com.sun.star.frame.FrameSearchFlag.SELF _ + OR com.sun.star.frame.FrameSearchFlag.CHILDREN) + + out.log("disp get.") + + disp.dispatch(URL, noProps()) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Sub prepareCommit() + Out.Log("prepareCommit() called") + Out.Log("can be checked only interactively") +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean + checkCommit() = True +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/SbaXGridControl/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/SbaXGridControl/script.xlb new file mode 100644 index 000000000000..b4f0a13080d7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/SbaXGridControl/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="dbaccess_SbaXGridControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_SbaXGridControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbaccess/TableWindowAccessibility/dbaccess_TableWindowAccessibility.xba b/qadevOOo/tests/basic/mod/dbaccess/TableWindowAccessibility/dbaccess_TableWindowAccessibility.xba new file mode 100644 index 000000000000..b1db74c7a5cf --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/TableWindowAccessibility/dbaccess_TableWindowAccessibility.xba @@ -0,0 +1,147 @@ +<?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="dbaccess_TableWindowAccessibility" 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 cancelButton As Object +Global queryWindow As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dbaccess.TableWindowAccessibility +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object + + Dim dbSource As Object + dbSource = createUnoService("com.sun.star.sdb.DataSource") + + Dim info(2) As new com.sun.star.beans.PropertyValue + info(0).Name = "JavaDriverClass" + info(0).Value = "org.gjt.mm.mysql.Driver" + info(1).Name = "user" + info(1).Value = jdbcUser + info(2).Name = "password" + info(2).Value = jdbcPassword + dbSource.info = info() + dbSource.URL = jdbcUrl + + Dim dbContext As Object + dbContext = createUnoService("com.sun.star.sdb.DatabaseContext") + + Dim sourceName As String + sourceName = "AAADBSource for dbu-accessibility" + + if dbContext.hasByName(sourceName) then + dbContext.revokeObject(sourceName) + endif + + dbContext.registerObject(sourceName, dbSource) + + Dim connection As Object + connection = dbSource.getIsolatedConnection(jdbcUser, jdbcPassword) + + Dim statement As Object + statement = connection.createStatement() + + statement.executeUpdate("drop table if exists tst_table1") + statement.executeUpdate("drop table if exists tst_table2") + statement.executeUpdate("create table tst_table1 (id1 int)") + statement.executeUpdate("create table tst_table2 (id2 int)") + + Dim defContainer As Object + defContainer = dbSource.getQueryDefinitions() + + Dim newQuery As Object + newQuery = createUnoService("com.sun.star.sdb.QueryDefinition") + newQuery.Command = "select * from tst_table1, tst_table2 where " + _ + "tst_table1.id1=tst_table2.id2" + + defContainer.insertByName("Query1", newQuery) + + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(500) + thRunner.initialize(Array("ExecuteDialog", "com.sun.star.sdb.DatasourceAdministrationDialog")) + wait(3000) + + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + + Dim pageTabList As Object + pageTabList = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PAGE_TAB_LIST) + + pageTabList.selectAccessibleChild(3) + wait(500) + + Dim editQueryButton As Object + editQueryButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON, "Edit Query") + + cancelButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON, "Cancel") + + editQueryButton.doAccessibleAction(0) + wait(1000) + + oWin = tk.getActiveTopWindow() + queryWindow = oWin + xRoot = utils.at_getAccessibleObject(oWin) + + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PANEL) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(queryWindow) + if NOT isNull(cancelButton) then + cancelButton.doAccessibleAction(0) + wait(1000) + End If +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbaccess/TableWindowAccessibility/script.xlb b/qadevOOo/tests/basic/mod/dbaccess/TableWindowAccessibility/script.xlb new file mode 100644 index 000000000000..cb2d0914c866 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbaccess/TableWindowAccessibility/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="dbaccess_TableWindowAccessibility" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbaccess_TableWindowAccessibility"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dbpool/OConnectionPool/dbpool_OConnectionPool.xba b/qadevOOo/tests/basic/mod/dbpool/OConnectionPool/dbpool_OConnectionPool.xba new file mode 100644 index 000000000000..c50dfb3c9db8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbpool/OConnectionPool/dbpool_OConnectionPool.xba @@ -0,0 +1,55 @@ +<?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="dbpool_OConnectionPool" 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: +' dbpool.OConnectionPool +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sdbc.ConnectionPool") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dbpool/OConnectionPool/script.xlb b/qadevOOo/tests/basic/mod/dbpool/OConnectionPool/script.xlb new file mode 100644 index 000000000000..e13dd569d793 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dbpool/OConnectionPool/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="dbpool_OConnectionPool" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dbpool_OConnectionPool"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/defreg/NestedRegistry/defreg_NestedRegistry.xba b/qadevOOo/tests/basic/mod/defreg/NestedRegistry/defreg_NestedRegistry.xba new file mode 100644 index 000000000000..dfc9864cc068 --- /dev/null +++ b/qadevOOo/tests/basic/mod/defreg/NestedRegistry/defreg_NestedRegistry.xba @@ -0,0 +1,94 @@ +<?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="defreg_NestedRegistry" 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: + +' Requiered for com.sun.star.lang.XInitialization +Global aInitArgs As Variant + +Global oReg1 As Object +Global oReg2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' defreg.NestedRegistry +'************************************************************************* +On Error Goto ErrHndl + Dim cURL1 As String + Dim cURL2 As String + + oObj = createUnoService("com.sun.star.registry.NestedRegistry") + + oReg1 = createUnoService("com.sun.star.registry.SimpleRegistry") + oReg2 = createUnoService("com.sun.star.registry.SimpleRegistry") + cURL1 = utils.getTempFileURL("BAS_forNestedRegistry1.rdb") + cURL2 = utils.getTempFileURL("BAS_forNestedRegistry2.rdb") + + if FileExists(cURL1) then + kill(cURL1) + end if + + if FileExists(cURL2) then + kill(cURL2) + end if + + oReg1.open(cURL1, true, true) + oReg2.open(cURL2, false, true) + + Dim aArgs(1) As Object + aArgs(0) = oReg1 + aArgs(1) = oReg2 + + aInitArgs = aArgs() + + oObj.initialize(aInitArgs()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oReg1.close() + oReg2.close() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/defreg/NestedRegistry/script.xlb b/qadevOOo/tests/basic/mod/defreg/NestedRegistry/script.xlb new file mode 100644 index 000000000000..de1c9e0f9cfb --- /dev/null +++ b/qadevOOo/tests/basic/mod/defreg/NestedRegistry/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="defreg_NestedRegistry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="defreg_NestedRegistry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dtrans/generic/dtrans_generic.xba b/qadevOOo/tests/basic/mod/dtrans/generic/dtrans_generic.xba new file mode 100644 index 000000000000..48d73cc7a8fa --- /dev/null +++ b/qadevOOo/tests/basic/mod/dtrans/generic/dtrans_generic.xba @@ -0,0 +1,58 @@ +<?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="dtrans_generic" 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: +' dtrans.generic +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.datatransfer.clipboard.GenericClipboard") + if ( NOT hasUnoInterfaces(oObj,"com.sun.star.uno.XInterface")) then + Out.log("[ERROR!] System type is *nix, unable to create object...") + endif + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dtrans/generic/script.xlb b/qadevOOo/tests/basic/mod/dtrans/generic/script.xlb new file mode 100644 index 000000000000..d843008a52d5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dtrans/generic/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="dtrans_generic" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dtrans_generic"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dynamicloader.uno/Dynamic/dynamicloader_uno_Dynamic.xba b/qadevOOo/tests/basic/mod/dynamicloader.uno/Dynamic/dynamicloader_uno_Dynamic.xba new file mode 100644 index 000000000000..6e442178a2e4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dynamicloader.uno/Dynamic/dynamicloader_uno_Dynamic.xba @@ -0,0 +1,64 @@ +<?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="dynamicloader_uno_Dynamic" 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 + +'************************************************************************* +'!!! Doesnt currently work as service can't be instantiated. + +'************************************************************************* + + + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dynamicloader.Dynamic +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.loader.Dynamic") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dynamicloader.uno/Dynamic/script.xlb b/qadevOOo/tests/basic/mod/dynamicloader.uno/Dynamic/script.xlb new file mode 100644 index 000000000000..f5273b902284 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dynamicloader.uno/Dynamic/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="dynamicloader_uno_Dynamic" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dynamicloader_uno_Dynamic"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/dynamicloader/Dynamic/dynamicloader_Dynamic.xba b/qadevOOo/tests/basic/mod/dynamicloader/Dynamic/dynamicloader_Dynamic.xba new file mode 100644 index 000000000000..077d98e6dfc9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dynamicloader/Dynamic/dynamicloader_Dynamic.xba @@ -0,0 +1,64 @@ +<?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="dynamicloader_Dynamic" 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 + +'************************************************************************* +'!!! Doesnt currently work as service can't be instantiated. + +'************************************************************************* + + + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' dynamicloader.Dynamic +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.loader.Dynamic") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/dynamicloader/Dynamic/script.xlb b/qadevOOo/tests/basic/mod/dynamicloader/Dynamic/script.xlb new file mode 100644 index 000000000000..2543c346ec17 --- /dev/null +++ b/qadevOOo/tests/basic/mod/dynamicloader/Dynamic/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="dynamicloader_Dynamic" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="dynamicloader_Dynamic"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/file/calc/ODriver/file_calc_ODriver.xba b/qadevOOo/tests/basic/mod/file/calc/ODriver/file_calc_ODriver.xba new file mode 100644 index 000000000000..8f291cf47a0f --- /dev/null +++ b/qadevOOo/tests/basic/mod/file/calc/ODriver/file_calc_ODriver.xba @@ -0,0 +1,67 @@ +<?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="file_calc_ODriver" 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 sdbc.XDriver +Global URL as String +Global info As Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' file.calc.ODriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbc.calc.ODriver") + + URL = calcUrl + + Dim inf(0) As new com.sun.star.beans.PropertyValue + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/file/calc/ODriver/script.xlb b/qadevOOo/tests/basic/mod/file/calc/ODriver/script.xlb new file mode 100644 index 000000000000..0afe2c82b6d1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/file/calc/ODriver/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="file_calc_ODriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="file_calc_ODriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/file/dbase/ODriver/file_dbase_ODriver.xba b/qadevOOo/tests/basic/mod/file/dbase/ODriver/file_dbase_ODriver.xba new file mode 100644 index 000000000000..466c820fabe4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/file/dbase/ODriver/file_dbase_ODriver.xba @@ -0,0 +1,67 @@ +<?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="file_dbase_ODriver" 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 sdbc.XDriver +Global URL as String +Global info As Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' file.dbase.ODriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbc.dbase.ODriver") + + URL = dbaseUrl + + Dim inf(0) As new com.sun.star.beans.PropertyValue + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/file/dbase/ODriver/script.xlb b/qadevOOo/tests/basic/mod/file/dbase/ODriver/script.xlb new file mode 100644 index 000000000000..19753bcaac05 --- /dev/null +++ b/qadevOOo/tests/basic/mod/file/dbase/ODriver/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="file_dbase_ODriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="file_dbase_ODriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/file/flat/ODriver/file_flat_ODriver.xba b/qadevOOo/tests/basic/mod/file/flat/ODriver/file_flat_ODriver.xba new file mode 100644 index 000000000000..e055e9024316 --- /dev/null +++ b/qadevOOo/tests/basic/mod/file/flat/ODriver/file_flat_ODriver.xba @@ -0,0 +1,67 @@ +<?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="file_flat_ODriver" 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 sdbc.XDriver +Global URL as String +Global info As Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' file.flat.ODriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbc.flat.ODriver") + + URL = flatUrl + + Dim inf(0) As new com.sun.star.beans.PropertyValue + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/file/flat/ODriver/script.xlb b/qadevOOo/tests/basic/mod/file/flat/ODriver/script.xlb new file mode 100644 index 000000000000..5022f4ac0e9e --- /dev/null +++ b/qadevOOo/tests/basic/mod/file/flat/ODriver/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="file_flat_ODriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="file_flat_ODriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fileacc/SimpleFileAccess/fileacc_SimpleFileAccess.xba b/qadevOOo/tests/basic/mod/fileacc/SimpleFileAccess/fileacc_SimpleFileAccess.xba new file mode 100644 index 000000000000..fe9a7855fd36 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fileacc/SimpleFileAccess/fileacc_SimpleFileAccess.xba @@ -0,0 +1,49 @@ +<?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="fileacc_SimpleFileAccess" 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: +' fileacc.SimpleFileAccess +'************************************************************************* + oObj = createUNOService("com.sun.star.ucb.SimpleFileAccess") +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fileacc/SimpleFileAccess/script.xlb b/qadevOOo/tests/basic/mod/fileacc/SimpleFileAccess/script.xlb new file mode 100644 index 000000000000..09d867dc9f66 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fileacc/SimpleFileAccess/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="fileacc_SimpleFileAccess" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fileacc_SimpleFileAccess"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fop/FolderPicker/fop_FolderPicker.xba b/qadevOOo/tests/basic/mod/fop/FolderPicker/fop_FolderPicker.xba new file mode 100644 index 000000000000..41a08c3c44a8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fop/FolderPicker/fop_FolderPicker.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="fop_FolderPicker" 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: +' fop.FolderPicker +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.ui.dialogs.FolderPicker") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fop/FolderPicker/script.xlb b/qadevOOo/tests/basic/mod/fop/FolderPicker/script.xlb new file mode 100644 index 000000000000..d8eceef973c1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fop/FolderPicker/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="fop_FolderPicker" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fop_FolderPicker"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OButtonControl/forms_OButtonControl.xba b/qadevOOo/tests/basic/mod/forms/OButtonControl/forms_OButtonControl.xba new file mode 100644 index 000000000000..b571308e576e --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OButtonControl/forms_OButtonControl.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="forms_OButtonControl" 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: + +' 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 Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OButtonControl +'************************************************************************* +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) + + Out.Log("try to insert some shapes...") + oShape1 = toolkittools.addControlToDefaultForm("CommandButton", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("CommandButton", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +'Sub DisposeObj() +' 'Re-open this document to close it successfully +' oDoc2 = utils.createDocument("swriter", cObjectName + "2") +' oDoc2.Dispose() +'End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OButtonControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OButtonControl/script.xlb new file mode 100644 index 000000000000..c0f46b692949 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OButtonControl/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="forms_OButtonControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OButtonControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OButtonModel/forms_OButtonModel.xba b/qadevOOo/tests/basic/mod/forms/OButtonModel/forms_OButtonModel.xba new file mode 100644 index 000000000000..89a96c9e2467 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OButtonModel/forms_OButtonModel.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="forms_OButtonModel" 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: +' forms.OButtonModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim ctrlShape As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + ctrlShape = toolkittools.addControlToDefaultForm("CommandButton", 1000, 1000, 2000, 1000) + oObj = ctrlShape.getControl() + ctrlShape = toolkittools.addControlToDefaultForm("CommandButton", 1000, 3000, 2000, 1000) + oComponentInstance = ctrlShape.getControl() + ctrlShape = toolkittools.addControlToDefaultForm("CommandButton", 1000, 5000, 2000, 1000) + oPersistInstance = ctrlShape.getControl() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OButtonModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OButtonModel/script.xlb new file mode 100644 index 000000000000..1e6a3faf31f0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OButtonModel/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="forms_OButtonModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OButtonModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OCheckBoxControl/forms_OCheckBoxControl.xba b/qadevOOo/tests/basic/mod/forms/OCheckBoxControl/forms_OCheckBoxControl.xba new file mode 100644 index 000000000000..9bb51ee2f615 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCheckBoxControl/forms_OCheckBoxControl.xba @@ -0,0 +1,127 @@ +<?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="forms_OCheckBoxControl" 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 Variant + +' Required for awt.XItemListener + Global bIL_itemStateChanged As Boolean + Global oEventItemListener As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OCheckBoxControl +'************************************************************************* +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 + Dim oIListener As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) +' oDoc2 = utils.createDocument("swriter", cObjectName + "2") + + oShape1 = toolkittools.addControlToDefaultForm("CheckBox", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("CheckBox", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + oIListener = createUnoListener("IL_", "com.sun.star.awt.XItemListener") + oObj.addItemListener(oIListener) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub IL_itemStateChanged(rEvent As Object) + bIL_itemStateChanged = True + Out.Log("CallBack for ItemListener itemStateChanged was called.") + oEventItemListener = rEvent +End Sub + + +'Sub DisposeObj() +' 'Re-open this document to close it successfully +' oDoc2 = utils.createDocument("swriter", cObjectName + "2") +' oDoc2.Dispose() +'End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OCheckBoxControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OCheckBoxControl/script.xlb new file mode 100644 index 000000000000..bd422e9fb66e --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCheckBoxControl/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="forms_OCheckBoxControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OCheckBoxControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OCheckBoxModel/forms_OCheckBoxModel.xba b/qadevOOo/tests/basic/mod/forms/OCheckBoxModel/forms_OCheckBoxModel.xba new file mode 100644 index 000000000000..85c12933d4bb --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCheckBoxModel/forms_OCheckBoxModel.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="forms_OCheckBoxModel" 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 oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OCheckBoxModel +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDrawPage as Object + Dim oCntrlShape as Object + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + oCntrlShape = toolkittools.addControlToDefaultForm("CheckBox", 1000, 1000, 2000, 1000) + oObj = oCntrlShape.getControl() + oCntrlShape = toolkittools.addControlToDefaultForm("CheckBox", 1000, 3000, 2000, 1000) + oComponentInstance = oCntrlShape.getControl() + oCntrlShape = toolkittools.addControlToDefaultForm("CheckBox", 1000, 5000, 2000, 1000) + oPersistInstance = oCntrlShape.getControl() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OCheckBoxModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OCheckBoxModel/script.xlb new file mode 100644 index 000000000000..b81cae2daec5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCheckBoxModel/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="forms_OCheckBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OCheckBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OComboBoxControl/forms_OComboBoxControl.xba b/qadevOOo/tests/basic/mod/forms/OComboBoxControl/forms_OComboBoxControl.xba new file mode 100644 index 000000000000..bd3436e0c3d7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OComboBoxControl/forms_OComboBoxControl.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="forms_OComboBoxControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OComboBoxControl +'************************************************************************* +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 + "2") + + oShape1 = toolkittools.addControlToDefaultForm("ComboBox", 1000, 1000, 3000, 1500) + oShape2 = toolkittools.addControlToDefaultForm("ComboBox", 1000, 3000, 3000, 1500) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 3000, 1500) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OComboBoxControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OComboBoxControl/script.xlb new file mode 100644 index 000000000000..10d3c4651c86 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OComboBoxControl/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="forms_OComboBoxControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OComboBoxControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OComboBoxModel/forms_OComboBoxModel.xba b/qadevOOo/tests/basic/mod/forms/OComboBoxModel/forms_OComboBoxModel.xba new file mode 100644 index 000000000000..973aa92f5e73 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OComboBoxModel/forms_OComboBoxModel.xba @@ -0,0 +1,131 @@ +<?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="forms_OComboBoxModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +' for relation function checkCommit +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OComboBoxModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oCntrlShape As Object, oDrawPage As Object + + bOK = true + ' --- create a document if needed + + oDoc = utils.createDocument("swriter", cObjectName) + + + oCntrlShape = toolkittools.addControlToDefaultForm("ComboBox", 1000, 1000, 2000, 1000) + oObj = oCntrlShape.getControl() + oCntrlShape = toolkittools.addControlToDefaultForm("ComboBox", 1000, 3000, 2000, 1000) + oComponentInstance = oCntrlShape.getControl() + oCntrlShape = toolkittools.addControlToDefaultForm("ComboBox", 1000, 5000, 2000, 1000) + oPersistInstance = oCntrlShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Author" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global sChangedText As String + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Out.Log("prepareCommit() called.") + sChangedText = "_" + oObj.Text + oObj.Text = sChangedText + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowText As Variant + + rowText = oForm.getString(oForm.findColumn("Author")) + checkCommit() = (rowText = sChangedText) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.Text = "_" + oObj.Text + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OComboBoxModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OComboBoxModel/script.xlb new file mode 100644 index 000000000000..8f59ecd5288a --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OComboBoxModel/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="forms_OComboBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OComboBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OCurrencyControl/forms_OCurrencyControl.xba b/qadevOOo/tests/basic/mod/forms/OCurrencyControl/forms_OCurrencyControl.xba new file mode 100644 index 000000000000..c0594708a070 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCurrencyControl/forms_OCurrencyControl.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="forms_OCurrencyControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OCurrencyControl +'************************************************************************* +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) + + oShape1 = toolkittools.addControlToDefaultForm("CurrencyField", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("CurrencyField", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OCurrencyControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OCurrencyControl/script.xlb new file mode 100644 index 000000000000..a06c264fc157 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCurrencyControl/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="forms_OCurrencyControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OCurrencyControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OCurrencyModel/forms_OCurrencyModel.xba b/qadevOOo/tests/basic/mod/forms/OCurrencyModel/forms_OCurrencyModel.xba new file mode 100644 index 000000000000..e4c47dbcbcd2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCurrencyModel/forms_OCurrencyModel.xba @@ -0,0 +1,137 @@ +<?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="forms_OCurrencyModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OCurrencyModel +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true +' --- create a document if needed + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("CurrencyField", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("CurrencyField", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("CurrencyField", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Pages" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global aChangedValue As Double + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Out.Log("prepareCommit() called.") + if NOT (isNull(oObj.Value) OR isEmpty(oObj.Value)) then + aChangedValue = oObj.Value + 1 + else + aChangedValue = 1 + end if + oObj.Value = aChangedValue + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowValue As Variant + + rowValue = oForm.getDouble(oForm.findColumn("Pages")) + Out.Log("Value was set to " + aChangedValue ) + Out.Log("the value in current row is " + rowValue) + checkCommit() = (rowValue = aChangedValue) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.Value = oObj.Value + 1 + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OCurrencyModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OCurrencyModel/script.xlb new file mode 100644 index 000000000000..2ad36c4a5a60 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OCurrencyModel/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="forms_OCurrencyModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OCurrencyModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/ODatabaseForm/forms_ODatabaseForm.xba b/qadevOOo/tests/basic/mod/forms/ODatabaseForm/forms_ODatabaseForm.xba new file mode 100644 index 000000000000..c1f2102b06f5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ODatabaseForm/forms_ODatabaseForm.xba @@ -0,0 +1,212 @@ +<?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="forms_ODatabaseForm" 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: + +' for XPersistObject + Global oPersistInstance As Object + +' Required for com.sun.star.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + + ' Requiered for com.sun.star.container.XNameContainer + Global oInstance As Object 'instance to insert + + ' Required for com.sun.star.sdbc.XResultSet + Global cXResultSetFirstRecord as String + Global cXResultSetLastRecord as String + Global cXResultSetRecord1 as String + Global cXResultSetRecord2 as String + Global cXResultSet2BeforeLastRecord as String + +' Required for com.sun.star.sdbc.XColumnLocate: + Global cExistantColumnName As String + + ' Requiered for com.sun.star.container.XNameReplace + Global cNameToReplace As String 'name of instance to be replased + Global oReplaceInstance As Object 'instance, that will be inserted + 'instead old one + + Global oIdxReplaceInstance As Object + +' Required for com.sun.star.sdbc.XParameters + Global paramTypes as Variant + +' Required for com.sun.star.sdbc.XRow and com.sun.star.sdbc.XRowUpdate + Global rowTypes as Variant + Global rowTypesCol as Variant + +' Required for com.sun.star.sdbc.XResultSetUpdate + Global textColumn As String + +' Required for com.sun.star.awt.XTabControllerModel + Global XTabControlModel1 As Object + Global XTabControlModel2 As Object + + Global oConnection As Object + +' Required for com.sun.star.container.XContainer + Global oElementToInsert As Object + Global oContainer As Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.ODatabaseForm +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oRowSet As Object, facc As Object, dbSource As Object + Dim srcFile As String, dstFile As String, dbSrcURL As String + Dim oDrawPage As Object, oForms As Object, oForm As Object + Dim oShape1 As Object, oShape2 As Object + + bOK = true + + ' Copying DB file to temp location + srcFile = utils.Path2URL(cTestDocsDir) + "TestDB/testDB.dbf" + dstFile = utils.getTempFileURL("TestDB.dbf") + dbSrcURL = "sdbc:dbase:" + utils.StrReplace(dstFile, "/testDB.dbf", "") + + Out.Log("Copying file '" + srcFile + "' to '" + dstFile + "'") + facc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + if (facc.exists(dstFile)) then facc.kill(dstFile) + facc.copy(srcFile, dstFile) + + dbtools.RegisterDataSource("DBTest", dbSrcURL) + + ' Creating a form + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("ComboBox", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("TextField", 1000, 1000, 2000, 1000) + 'get control from document + oDrawPage = oDoc.DrawPage + oForms = oDrawPage.getForms() + + oForm = oForms.getByName("Standard") + + oForms.insertByName("Instance1", oDoc.createInstance("com.sun.star.form.component.Form")) + oForms.insertByName("Instance2", oDoc.createInstance("com.sun.star.form.component.Form")) + + oObj = oForm + + 'connect to a database + oForm.DataSourceName = "DBTest" + oForm.Command = "TestDB" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + oForm.Load() + + oConnection = oForm.ActiveConnection + Dim list as Object +' list = createUnoListener("C_", "com.sun.star.lang.XEventListener") +' oConnection.addEventListener(list) + + 'for XComponent + Out.Log("" + oForms.hasByName("Instance1") + "," + oForms.hasByName("Instance2")) + oComponentInstance = oForms.getByName("Instance1") + oPersistInstance = oForms.getByName("Instance2") + + 'for XNameContainer, XIndexContainer + oInstance = oDoc.createInstance("com.sun.star.form.component.ComboBox") + + 'for XContainer + oElementToInsert = oDoc.createInstance("com.sun.star.form.component.ComboBox") + + 'for XNameReplace + oReplaceInstance = oDoc.createInstance("com.sun.star.form.component.ComboBox") + oObj.insertByName(cObjectName + "Replace", oDoc.createInstance("com.sun.star.form.component.ComboBox")) + cNameToReplace = cObjectName + "Replace" + + 'for XIndexReplace + oIdxReplaceInstance = oDoc.createInstance("com.sun.star.form.component.ComboBox") + + cExistantColumnName = "_TEXT" + cXResultSetFirstRecord = "text1" + cXResultSetLastRecord = "text3" + cXResultSetRecord1 = "text1" + cXResultSetRecord2 = "text2" + cXResultSet2BeforeLastRecord = "text2" + + ' for XParameters + paramTypes = DimArray() +' paramTypes = Array("boolean", "byte", "short", "int", "long", "float", "double", "string", _ +' "bytes", "date", "time", "timestamp", "binarystream", "characterstream", "object", "objectwithinfo", _ +' "ref", "blob", "clob", "array") + + ' for XRow and XRowUpdate + rowTypes = Array("string", "int", "long", "double", "float", "date", "datetm", "boolean") + rowTypesCol = Array(1, 2, 3, 4, 5, 6, 7, 9) +' rowTypes = Array("boolean", "byte", "short", "int", "long", "float", "double", "string", _ +' "bytes", "date", "time", "timestamp", "binarystream", "characterstream", "object", "objectwithinfo", _ +' "ref", "blob", "clob", "array") + +' Required for com.sun.star.sdbc.XResultSetUpdate + textColumn = "_TEXT" + +' Required for com.sun.star.awt.XTabControllerModel + XTabControlModel1 = oShape1.getControl() + XTabControlModel2 = oShape2.getControl() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() +On Error Goto ErrHndl +'msgbox "Disposing ODatabaseForm" + Out.Log("Closing DB connection ...") + oConnection.close() + + Out.Log("Revoking 'DBTest' datasource ...") + dbtools.RevokeDB("DBTest") +'msgbox "ODatabaseForm disposed." +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub C_disposing() + Out.Log("!!! Connection disposed !!!") +' oConnection.close() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/ODatabaseForm/script.xlb b/qadevOOo/tests/basic/mod/forms/ODatabaseForm/script.xlb new file mode 100644 index 000000000000..558bb6821d40 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ODatabaseForm/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="forms_ODatabaseForm" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_ODatabaseForm"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/ODateControl/forms_ODateControl.xba b/qadevOOo/tests/basic/mod/forms/ODateControl/forms_ODateControl.xba new file mode 100644 index 000000000000..0a72fa971137 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ODateControl/forms_ODateControl.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="forms_ODateControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.ODateControl +'************************************************************************* +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) + + oShape1 = toolkittools.addControlToDefaultForm("DateField", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("DateField", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/ODateControl/script.xlb b/qadevOOo/tests/basic/mod/forms/ODateControl/script.xlb new file mode 100644 index 000000000000..39760a22b6dc --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ODateControl/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="forms_ODateControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_ODateControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/ODateModel/forms_ODateModel.xba b/qadevOOo/tests/basic/mod/forms/ODateModel/forms_ODateModel.xba new file mode 100644 index 000000000000..c038d6f2bef9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ODateModel/forms_ODateModel.xba @@ -0,0 +1,140 @@ +<?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="forms_ODateModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.ODateModel +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + ' --- create a document if needed + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("DateField", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("DateField", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("DateField", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Custom1" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global aChangedValue As Variant + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Dim dat As New com.sun.star.util.Date + + Out.Log("prepareCommit() called.") + if NOT (isNull(oObj.Date) OR isEmpty(oObj.Date)) then + aChangedValue = oObj.Date + 1 + else + aChangedValue = 1 + end if + oObj.Date = aChangedValue + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowValue As Variant + + oForm.updateRow() + oForm.reload() + rowValue = oObj.Date + Out.Log("Value was set to " + aChangedValue ) + Out.Log("the value in current row is " + rowValue) + checkCommit() = (rowValue = aChangedValue) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.Date = oObj.Date + 1 + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/ODateModel/script.xlb b/qadevOOo/tests/basic/mod/forms/ODateModel/script.xlb new file mode 100644 index 000000000000..52fb8db2a879 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ODateModel/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="forms_ODateModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_ODateModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OEditControl/forms_OEditControl.xba b/qadevOOo/tests/basic/mod/forms/OEditControl/forms_OEditControl.xba new file mode 100644 index 000000000000..30881b177270 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OEditControl/forms_OEditControl.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="forms_OEditControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OEditControl +'************************************************************************* +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 + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("TextField", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("TextField", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OEditControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OEditControl/script.xlb new file mode 100644 index 000000000000..764079c52396 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OEditControl/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="forms_OEditControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OEditControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OEditModel/forms_OEditModel.xba b/qadevOOo/tests/basic/mod/forms/OEditModel/forms_OEditModel.xba new file mode 100644 index 000000000000..d1aaab2517a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OEditModel/forms_OEditModel.xba @@ -0,0 +1,128 @@ +<?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="forms_OEditModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OEditModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("TextField", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("TextField", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Author" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global sChangedText As String + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Out.Log("prepareCommit() called.") + sChangedText = "_" + oObj.Text + oObj.Text = sChangedText + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowText As Variant + + rowText = oForm.getString(oForm.findColumn("Author")) + checkCommit() = (rowText = sChangedText) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.Text = "_" + oObj.Text + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OEditModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OEditModel/script.xlb new file mode 100644 index 000000000000..96715b5ae2e1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OEditModel/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="forms_OEditModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OEditModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OFileControlModel/forms_OFileControlModel.xba b/qadevOOo/tests/basic/mod/forms/OFileControlModel/forms_OFileControlModel.xba new file mode 100644 index 000000000000..50ddc2c0e558 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFileControlModel/forms_OFileControlModel.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="forms_OFileControlModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OFileControlModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("FileControl", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("FileControl", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("FileControl", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OFileControlModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OFileControlModel/script.xlb new file mode 100644 index 000000000000..79c36ddf2a22 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFileControlModel/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="forms_OFileControlModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OFileControlModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OFixedTextModel/forms_OFixedTextModel.xba b/qadevOOo/tests/basic/mod/forms/OFixedTextModel/forms_OFixedTextModel.xba new file mode 100644 index 000000000000..1f4d518652e5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFixedTextModel/forms_OFixedTextModel.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="forms_OFixedTextModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OFixedTextModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("FixedText", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("FixedText", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("FixedText", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OFixedTextModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OFixedTextModel/script.xlb new file mode 100644 index 000000000000..2181f2d0a32b --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFixedTextModel/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="forms_OFixedTextModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OFixedTextModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OFormattedControl/forms_OFormattedControl.xba b/qadevOOo/tests/basic/mod/forms/OFormattedControl/forms_OFormattedControl.xba new file mode 100644 index 000000000000..31ec92e4cc10 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFormattedControl/forms_OFormattedControl.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="forms_OFormattedControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OFormattedControl +'************************************************************************* +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) + + oShape1 = toolkittools.addControlToDefaultForm("FormattedField", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("FormattedField", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OFormattedControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OFormattedControl/script.xlb new file mode 100644 index 000000000000..f77a899327c0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFormattedControl/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="forms_OFormattedControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OFormattedControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OFormattedFieldWrapper/forms_OFormattedFieldWrapper.xba b/qadevOOo/tests/basic/mod/forms/OFormattedFieldWrapper/forms_OFormattedFieldWrapper.xba new file mode 100644 index 000000000000..d76b0bdbfe00 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFormattedFieldWrapper/forms_OFormattedFieldWrapper.xba @@ -0,0 +1,166 @@ +<?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="forms_OFormattedFieldWrapper" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.io.XPersistObject + Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OFormattedFieldWrapper +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("DatabaseFormattedField", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("DatabaseFormattedField", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("DatabaseFormattedField", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Custom2" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + + ' Switching to non-design mode + switchDesignMode(oDoc) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub switchDesignMode(xDoc as Object) +On Error Goto ErrHndl + + Dim frame as Variant, disp as Variant, transf as Object + Dim URL as new com.sun.star.util.URL + Dim noProps() + Dim res as Boolean + + frame = xDoc.getCurrentController().getFrame() + URL.Complete = ".uno:SwitchControlDesignMode" + transf = createUnoService("com.sun.star.util.URLTransformer") + res = transf.parseStrict(URL) + + out.log("URL parsed :" + res) + + disp = frame.queryDispatch(URL, "", com.sun.star.frame.FrameSearchFlag.SELF _ + OR com.sun.star.frame.FrameSearchFlag.CHILDREN) + + out.log("disp get.") + + disp.dispatch(URL, noProps()) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global sChangedText As String + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Out.Log("prepareCommit() called.") + + if isNull(oObj.EffectiveValue) OR isEmpty(oObj.EffectiveValue) then + oObj.EffectiveValue = "12" + endif + sChangedText = "9" + oObj.EffectiveValue + + Out.Log("Text was: '" + oObj.EffectiveValue + "', set to '" + sChangedText + "'") + + oObj.EffectiveValue = sChangedText + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowText As Variant + + rowText = oForm.getString(oForm.findColumn("Custom2")) + + Out.Log("Result test: '" + rowText + "'") + checkCommit() = (rowText = sChangedText) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.EffectiveValue = "_" + oObj.EffectiveValue + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OFormattedFieldWrapper/script.xlb b/qadevOOo/tests/basic/mod/forms/OFormattedFieldWrapper/script.xlb new file mode 100644 index 000000000000..3ec914585ae1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFormattedFieldWrapper/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="forms_OFormattedFieldWrapper" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OFormattedFieldWrapper"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OFormsCollection/forms_OFormsCollection.xba b/qadevOOo/tests/basic/mod/forms/OFormsCollection/forms_OFormsCollection.xba new file mode 100644 index 000000000000..4ecc02ce80cf --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFormsCollection/forms_OFormsCollection.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="forms_OFormsCollection" 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.container.XNameContainer: +Global oInstance As Object + +' Required for com.sun.star.container.XNameReplace: +Global cNameToReplace As String +Global oReplaceInstance As Object + +' Required for com.sun.star.container.XIndexReplace +Global oIdxReplaceInstance As Object + +' Required for com.sun.star.io.XPersistObject +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OFormsCollection +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oDrawPage As Object, oForms As Object, oForm As Object + + bOK = true + oDoc = utils.createDocument("swriter", cObjectName) + + oDrawPage = oDoc.DrawPage + oForms = oDrawPage.Forms + + oForm = oDoc.createInstance("com.sun.star.form.component.Form") + oForm.Name = "first form" + oForms.insertByIndex(0, oForm) + + oForm = oDoc.createInstance("com.sun.star.form.component.Form") + oForm.Name = "second form" + oForms.insertByIndex(1, oForm) + + oInstance = oDoc.createInstance("com.sun.star.form.component.Form") + oInstance.Name = "instance form" + + oReplaceInstance = oDoc.createInstance("com.sun.star.form.component.Form") + oReplaceInstance.Name = "replace form" + + oIdxReplaceInstance = oDoc.createInstance("com.sun.star.form.component.Form") + oIdxReplaceInstance.Name = "index replace form" + + cNameToReplace = "second form" + + oObj = oForms + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OFormsCollection/script.xlb b/qadevOOo/tests/basic/mod/forms/OFormsCollection/script.xlb new file mode 100644 index 000000000000..d2d253b60998 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OFormsCollection/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="forms_OFormsCollection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OFormsCollection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OGridControlModel/forms_OGridControlModel.xba b/qadevOOo/tests/basic/mod/forms/OGridControlModel/forms_OGridControlModel.xba new file mode 100644 index 000000000000..2631dd931902 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OGridControlModel/forms_OGridControlModel.xba @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="forms_OGridControlModel" 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 XPersistObject +Global oPersistInstance As Object + +' Required for XComponent +Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.container.XNameContainer + Global oInstance As Object 'instance to insert + +' Requiered for com.sun.star.view.XSelectionSupplier + Global SelectableObj1 As Variant + Global SelectableObj2 As Variant + +' Requiered for com.sun.star.container.XNameReplace + Global cNameToReplace As String 'name of instance to be replased + Global oReplaceInstance As Object 'instance, that will be inserted + 'instead old one + +' Requiered for com.sun.star.container.XIndexReplace + Global oIdxReplaceInstance As Object + +' Requiered for XContainer + Global oElementToInsert As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OGridControlModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean, i As Integer + Dim oShape As Object, oGridColumn As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("GridControl", 1000, 1000, 3000, 3000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("GridControl", 1000, 5000, 500, 500) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("GridControl", 1000, 9000, 500, 500) + oPersistInstance = oShape.getControl() + + 'insert Columns into Grid + for i = 0 to 10 + oGridColumn = oObj.createColumn("TextField") + oGridColumn.Label = "Label" + Str(i) + oGridColumn.DataField = "Data" + Str(i) + oObj.insertByName("Field" + i , oGridColumn) + + next i + + SelectableObj1 = oObj.getByName("Field" + 7) + SelectableObj2 = oObj.getByName("Field" + 5) + + 'for XNameContainer + oInstance = oObj.createColumn("TextField") + oInstance.Label = "LabelInstance" + oInstance.DataField = "DataInstance" + + oElementToInsert = oObj.createColumn("TextField") + oElementToInsert.Label = "LabelInstance" + oElementToInsert.DataField = "DataInstance" + + 'for XNameReplace + cNameToReplace = "Field2" + oReplaceInstance = oObj.createColumn("TextField") + oReplaceInstance.Label = "LabelReplace" + oReplaceInstance.DataField = "LabelReplace" + + 'for XIndexReplace + oIdxReplaceInstance = oObj.createColumn("TextField") + oIdxReplaceInstance.Label = "LabelIndexReplace" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OGridControlModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OGridControlModel/script.xlb new file mode 100644 index 000000000000..c525093365aa --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OGridControlModel/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="forms_OGridControlModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OGridControlModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OGroupBoxControl/forms_OGroupBoxControl.xba b/qadevOOo/tests/basic/mod/forms/OGroupBoxControl/forms_OGroupBoxControl.xba new file mode 100644 index 000000000000..39ab1062b729 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OGroupBoxControl/forms_OGroupBoxControl.xba @@ -0,0 +1,104 @@ +<?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="forms_OGroupBoxControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OGroupBoxControl +'************************************************************************* +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 + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("GroupBox", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("GroupBox", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OGroupBoxControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OGroupBoxControl/script.xlb new file mode 100644 index 000000000000..35becbb255d5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OGroupBoxControl/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="forms_OGroupBoxControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OGroupBoxControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OGroupBoxModel/forms_OGroupBoxModel.xba b/qadevOOo/tests/basic/mod/forms/OGroupBoxModel/forms_OGroupBoxModel.xba new file mode 100644 index 000000000000..101d322ab147 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OGroupBoxModel/forms_OGroupBoxModel.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="forms_OGroupBoxModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OGroupBoxModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + oShape = toolkittools.addControlToDefaultForm("GroupBox", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("GroupBox", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("GroupBox", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OGroupBoxModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OGroupBoxModel/script.xlb new file mode 100644 index 000000000000..e2797e9989d0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OGroupBoxModel/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="forms_OGroupBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OGroupBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OHiddenModel/forms_OHiddenModel.xba b/qadevOOo/tests/basic/mod/forms/OHiddenModel/forms_OHiddenModel.xba new file mode 100644 index 000000000000..809c8eef80aa --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OHiddenModel/forms_OHiddenModel.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="forms_OHiddenModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OHiddenModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oDrawPage As Object, oForm As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + addHiddenControl() + addHiddenControl() + addHiddenControl() + addHiddenControl() + addHiddenControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByIndex(0) + 'for xComponent + oComponentInstance = oForm.getByIndex(1) + oPersistInstance = oForm.getByIndex(2) + + oObj = oForm.getByIndex(oForm.count - 1) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub addHiddenControl() + Dim oDrawPage as Object + Dim oForm as Object, oForms as Object + Dim oControl as Object, oControlShape as Object + + oDrawPage = oDoc.DrawPage + oControlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") + oControl = oDoc.createInstance("com.sun.star.form.component.HiddenControl") + oForm = oDoc.createInstance("com.sun.star.form.component.Form") + oforms = oDrawPage.Forms + if oForms.count = 0 then + oForm.Name = "Form1" + oForms.insertbyindex(0,oForm) + endif + oForm = oForms.getByIndex(0) + oForm.insertByIndex(oForm.count,oControl) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OHiddenModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OHiddenModel/script.xlb new file mode 100644 index 000000000000..84d3638e9666 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OHiddenModel/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="forms_OHiddenModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OHiddenModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OImageButtonControl/forms_OImageButtonControl.xba b/qadevOOo/tests/basic/mod/forms/OImageButtonControl/forms_OImageButtonControl.xba new file mode 100644 index 000000000000..6eb28793b0da --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageButtonControl/forms_OImageButtonControl.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="forms_OImageButtonControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OImageButtonControl +'************************************************************************* +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 + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("ImageButton", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("ImageButton", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OImageButtonControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OImageButtonControl/script.xlb new file mode 100644 index 000000000000..c528e95c2999 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageButtonControl/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="forms_OImageButtonControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OImageButtonControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OImageButtonModel/forms_OImageButtonModel.xba b/qadevOOo/tests/basic/mod/forms/OImageButtonModel/forms_OImageButtonModel.xba new file mode 100644 index 000000000000..5a5592638500 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageButtonModel/forms_OImageButtonModel.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="forms_OImageButtonModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OImageButtonModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("ImageButton", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("ImageButton", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("ImageButton", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OImageButtonModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OImageButtonModel/script.xlb new file mode 100644 index 000000000000..52b34ca1effc --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageButtonModel/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="forms_OImageButtonModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OImageButtonModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OImageControlControl/forms_OImageControlControl.xba b/qadevOOo/tests/basic/mod/forms/OImageControlControl/forms_OImageControlControl.xba new file mode 100644 index 000000000000..6280f3c8f471 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageControlControl/forms_OImageControlControl.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="forms_OImageControlControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OImageControlControl +'************************************************************************* +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) + + oShape1 = toolkittools.createControlShapeWithDefaultControl("DatabaseImageControl") + oShape2 = toolkittools.createControlShapeWithDefaultControl("DatabaseImageControl") + oShape3 = toolkittools.createControlShapeWithDefaultControl("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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OImageControlControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OImageControlControl/script.xlb new file mode 100644 index 000000000000..5aaa204440bd --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageControlControl/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="forms_OImageControlControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OImageControlControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OImageControlModel/forms_OImageControlModel.xba b/qadevOOo/tests/basic/mod/forms/OImageControlModel/forms_OImageControlModel.xba new file mode 100644 index 000000000000..0f4d43f38c3d --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageControlModel/forms_OImageControlModel.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="forms_OImageControlModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OImageControlModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("DatabaseImageControl", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("DatabaseImageControl", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("DatabaseImageControl", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OImageControlModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OImageControlModel/script.xlb new file mode 100644 index 000000000000..7c723d3c110d --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OImageControlModel/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="forms_OImageControlModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OImageControlModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OListBoxControl/forms_OListBoxControl.xba b/qadevOOo/tests/basic/mod/forms/OListBoxControl/forms_OListBoxControl.xba new file mode 100644 index 000000000000..e5b2c3456baa --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OListBoxControl/forms_OListBoxControl.xba @@ -0,0 +1,121 @@ +<?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="forms_OListBoxControl" 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 Variant + +' Required for awt.XItemListener + Global bIL_itemStateChanged As Boolean + Global oEventItemListener As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OListBoxControl +'************************************************************************* +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 oIListener As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("ListBox", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("ListBox", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 1000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + oIListener = createUnoListener("IL_", "com.sun.star.awt.XItemListener") + oObj.addItemListener(oIListener) + +Exit Sub +ErrHndl: + Test.Exception() +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/forms/OListBoxControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OListBoxControl/script.xlb new file mode 100644 index 000000000000..04dc4fa3b92e --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OListBoxControl/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="forms_OListBoxControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OListBoxControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OListBoxModel/forms_OListBoxModel.xba b/qadevOOo/tests/basic/mod/forms/OListBoxModel/forms_OListBoxModel.xba new file mode 100644 index 000000000000..769466b6758b --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OListBoxModel/forms_OListBoxModel.xba @@ -0,0 +1,158 @@ +<?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="forms_OListBoxModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object +Global aList(1) As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OListBoxModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim aSelection(0 to 0) As Variant + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("ListBox", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("ListBox", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("ListBox", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'for UnoControlListBoxModel::SelectedItems + aList(0) = "Hello" + aList(1) = "World" + aSelection(0) = 1 + oObj.DefaultSelection = aSelection() + oObj.ListSource = aList() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Author" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global sChangedText As String + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Dim items As Variant + Dim item As Variant + + Out.Log("prepareCommit() called.") + items = oObj.SelectedItems + if ubound(items()) < 0 then + item = 0 + else + if items(0) = 0 then item = 1 else item = 0 + endif + + sChangedText = aList(item) + oObj.SelectedItems = Array(item) + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowText As Variant + + rowText = oForm.getString(oForm.findColumn("Author")) + checkCommit() = (rowText = sChangedText) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + Out.Log("UpdateComponent() called.") + + Dim items As Variant + Dim item As Variant + items = oObj.SelectedItems + if ubound(items()) < 0 then + item = 0 + else + if items(0) = 0 then item = 1 else item = 0 + endif + oObj.SelectedItems = Array(item) + + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OListBoxModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OListBoxModel/script.xlb new file mode 100644 index 000000000000..0c9c727d99e7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OListBoxModel/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="forms_OListBoxModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OListBoxModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/ONumericControl/forms_ONumericControl.xba b/qadevOOo/tests/basic/mod/forms/ONumericControl/forms_ONumericControl.xba new file mode 100644 index 000000000000..949c1b52187b --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ONumericControl/forms_ONumericControl.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="forms_ONumericControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.ONumericControl +'************************************************************************* +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 + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("NumericField", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("NumericField", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/ONumericControl/script.xlb b/qadevOOo/tests/basic/mod/forms/ONumericControl/script.xlb new file mode 100644 index 000000000000..4dae412199e0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ONumericControl/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="forms_ONumericControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_ONumericControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/ONumericModel/forms_ONumericModel.xba b/qadevOOo/tests/basic/mod/forms/ONumericModel/forms_ONumericModel.xba new file mode 100644 index 000000000000..117ba7bd2b7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ONumericModel/forms_ONumericModel.xba @@ -0,0 +1,127 @@ +<?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="forms_ONumericModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.ONumericModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("NumericField", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("NumericField", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Pages" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global nChangedVal As Variant + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Out.Log("prepareCommit() called.") + nChangedVal = oObj.Value + 1 + oObj.Value = nChangedVal + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowVal As Variant + + rowVal = oForm.getInt(oForm.findColumn("Pages")) + checkCommit() = (rowVal = nChangedVal) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.Value = oObj.Value + 1 + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/ONumericModel/script.xlb b/qadevOOo/tests/basic/mod/forms/ONumericModel/script.xlb new file mode 100644 index 000000000000..d44de2b54e64 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ONumericModel/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="forms_ONumericModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_ONumericModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OPatternControl/forms_OPatternControl.xba b/qadevOOo/tests/basic/mod/forms/OPatternControl/forms_OPatternControl.xba new file mode 100644 index 000000000000..65c1cc774822 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OPatternControl/forms_OPatternControl.xba @@ -0,0 +1,104 @@ +<?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="forms_OPatternControl" 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 Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OPatternControl +'************************************************************************* +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 + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("PatternField", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("PatternField", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape2.getControl()) + oCtrlShape = oShape1 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OPatternControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OPatternControl/script.xlb new file mode 100644 index 000000000000..1d7fd0303f27 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OPatternControl/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="forms_OPatternControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OPatternControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OPatternModel/forms_OPatternModel.xba b/qadevOOo/tests/basic/mod/forms/OPatternModel/forms_OPatternModel.xba new file mode 100644 index 000000000000..65ef760eed29 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OPatternModel/forms_OPatternModel.xba @@ -0,0 +1,128 @@ +<?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="forms_OPatternModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OPatternModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("PatternField", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("PatternField", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Author" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global sChangedText As String + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Out.Log("prepareCommit() called.") + sChangedText = "_" + oObj.Text + oObj.Text = sChangedText + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowText As Variant + + rowText = oForm.getString(oForm.findColumn("Author")) + checkCommit() = (rowText = sChangedText) + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.Text = "_" + oObj.Text + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OPatternModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OPatternModel/script.xlb new file mode 100644 index 000000000000..c8b4f8d4b089 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OPatternModel/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="forms_OPatternModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OPatternModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/ORadioButtonControl/forms_ORadioButtonControl.xba b/qadevOOo/tests/basic/mod/forms/ORadioButtonControl/forms_ORadioButtonControl.xba new file mode 100644 index 000000000000..d614220e637d --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ORadioButtonControl/forms_ORadioButtonControl.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="forms_ORadioButtonControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.ORadioButtonControl +'************************************************************************* +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 + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("RadioButton", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("RadioButton", 1000, 3000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 5000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape2.getControl()) + oCtrlShape = oShape1 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/ORadioButtonControl/script.xlb b/qadevOOo/tests/basic/mod/forms/ORadioButtonControl/script.xlb new file mode 100644 index 000000000000..0c79cbf8481c --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ORadioButtonControl/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="forms_ORadioButtonControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_ORadioButtonControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/ORadioButtonModel/forms_ORadioButtonModel.xba b/qadevOOo/tests/basic/mod/forms/ORadioButtonModel/forms_ORadioButtonModel.xba new file mode 100644 index 000000000000..64379f607c50 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ORadioButtonModel/forms_ORadioButtonModel.xba @@ -0,0 +1,132 @@ +<?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="forms_ORadioButtonModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.ORadioButtonModel +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("RadioButton", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("RadioButton", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("RadioButton", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + oForm.DataSourceName = "Bibliography" + oForm.Command = "biblio" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "Custom3" + + oForm.load() + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global aChangedVal As String + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + Out.Log("prepareCommit() called.") + aChangedVal = 1 - oObj.State + oObj.State = aChangedVal + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowVal As Variant + + rowVal = oForm.getBoolean(oForm.findColumn("Custom3")) + if rowVal = true then + checkCommit() = (aChangedVal = 1) + else + checkCommit() = (aChangedVal = 0) + end if + + exit function +ErrHndl: + Test.Exception() +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + oObj.State = 1 - oObj.State + oObj.commit() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/ORadioButtonModel/script.xlb b/qadevOOo/tests/basic/mod/forms/ORadioButtonModel/script.xlb new file mode 100644 index 000000000000..a364a4442441 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/ORadioButtonModel/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="forms_ORadioButtonModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_ORadioButtonModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OTimeControl/forms_OTimeControl.xba b/qadevOOo/tests/basic/mod/forms/OTimeControl/forms_OTimeControl.xba new file mode 100644 index 000000000000..d960cf290bc0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OTimeControl/forms_OTimeControl.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="forms_OTimeControl" 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 Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OTimeControl +'************************************************************************* +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 + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape1 = toolkittools.addControlToDefaultForm("TimeField", 1000, 1000, 2000, 1000) + oShape2 = toolkittools.addControlToDefaultForm("TimeField", 1000, 1000, 2000, 1000) + oShape3 = toolkittools.addControlToDefaultForm("TextField", 1000, 1000, 2000, 1000) + + 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 = oCurrCtrl.getControl(oShape2.getControl()) + oContext = oDoc + oWinpeer = oWin + oToolkit = oKit + oXWindow = oCurrCtrl.getControl(oShape3.getControl()) + oCtrlShape = oShape1 + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OTimeControl/script.xlb b/qadevOOo/tests/basic/mod/forms/OTimeControl/script.xlb new file mode 100644 index 000000000000..5ffb92c7d3e5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OTimeControl/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="forms_OTimeControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OTimeControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/forms/OTimeModel/forms_OTimeModel.xba b/qadevOOo/tests/basic/mod/forms/OTimeModel/forms_OTimeModel.xba new file mode 100644 index 000000000000..003dd7d1f30f --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OTimeModel/forms_OTimeModel.xba @@ -0,0 +1,182 @@ +<?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="forms_OTimeModel" 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: + +' for XComponent +Global oComponentInstance As Object + +' for XPersistObject +Global oPersistInstance As Object + +' for XUpdateBroadcaster +Global bCustomUpdate As Boolean + +Global oForm As Object + +Global oConnection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' forms.OTimeModel +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape As Object, oDrawPage As Object + + bOK = true + ' --- create a document if needed + + oDoc = utils.createDocument("swriter", cObjectName) + + oShape = toolkittools.addControlToDefaultForm("TimeField", 1000, 1000, 2000, 1000) + oObj = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("TimeField", 1000, 3000, 2000, 1000) + oComponentInstance = oShape.getControl() + oShape = toolkittools.addControlToDefaultForm("TimeField", 1000, 5000, 2000, 1000) + oPersistInstance = oShape.getControl() + + 'get control from document + oDrawPage = oDoc.DrawPage + oForm = oDrawPage.Forms.getByName("Standard") + + Dim oRowSet As Object, facc As Object, dbSource As Object + Dim srcFile As String, dstFile As String, dbSrcURL As String + + ' Copying DB file to temp location + srcFile = utils.Path2URL(cTestDocsDir) + "TestDB/testDB.dbf" + dstFile = utils.getTempFileURL("OTimeModelDB.dbf") + dbSrcURL = "sdbc:dbase:" + utils.StrReplace(dstFile, "/OTimeModelDB.dbf", "") + + facc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + if (facc.exists(dstFile)) then facc.kill(dstFile) + facc.copy(srcFile, dstFile) + + dbtools.RegisterDataSource("DBTest", dbSrcURL) + + oForm.DataSourceName = "DBTest" + oForm.Command = "OTimeModelDB" + oForm.CommandType = com.sun.star.sdb.CommandType.TABLE + + oObj.DataField = "_DOUBLE" + + oForm.load() + + oConnection = oForm.ActiveConnection + + ' for XUpdateBroadcaster + bCustomUpdate = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global aChangedValue As Variant + +' for XBoundComponent +Sub prepareCommit() +On Error Goto ErrHndl + + Out.Log("prepareCommit() called.") + if NOT (isNull(oObj.Time) OR isEmpty(oObj.Time)) then + Out.Log("The old value was: " + oObj.Time) + aChangedValue = oObj.Time + 150000 ' adding 15 minutes + else + aChangedValue = 150000 ' setting to 0:15 + end if + oObj.Time = aChangedValue + + exit sub +ErrHndl: + Test.Exception() +End Sub + +' for XBoundComponent +Function checkCommit() As Boolean +On Error Goto ErrHndl + Out.Log("checkCommit() called.") + Dim rowValue As Variant + + oForm.updateRow() + oForm.reload() + rowValue = oObj.Time + Out.Log("Value was set to " + aChangedValue ) + Out.Log("the value in current row is " + rowValue) + checkCommit() = abs(rowValue - aChangedValue) < 100 + + exit function +ErrHndl: + Test.Exception() + checkCommit() = false +End Function + +' for XUpdateBroadcaster +Sub UpdateComponent() + Out.Log("UpdateComponent() called.") + if NOT (isNull(oObj.Time) OR isEmpty(oObj.Time)) then + oObj.Time = oObj.Time + 150000 + else + oObj.Time = 150000 + end if + oObj.commit() + + exit sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() +On Error Goto ErrHndl + Out.Log("Closing DB connection ...") + oConnection.close() + + Out.Log("Revoking 'DBTest' datasource ...") + dbtools.RevokeDB("DBTest") +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/forms/OTimeModel/script.xlb b/qadevOOo/tests/basic/mod/forms/OTimeModel/script.xlb new file mode 100644 index 000000000000..bff6755c7966 --- /dev/null +++ b/qadevOOo/tests/basic/mod/forms/OTimeModel/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="forms_OTimeModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="forms_OTimeModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fps/FilePicker/fps_FilePicker.xba b/qadevOOo/tests/basic/mod/fps/FilePicker/fps_FilePicker.xba new file mode 100644 index 000000000000..bb80f58a4b2d --- /dev/null +++ b/qadevOOo/tests/basic/mod/fps/FilePicker/fps_FilePicker.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="fps_FilePicker" 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: + +' variable for XInitialization +Global aInitArgs As Variant + +' variable for XFilePickerControlAccess +Global controlId As Variant +Global controlInitVal As Variant + +'variable for XComponent +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fps.FilePicker +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.ui.dialogs.FilePicker") + +' setting variable for XInitialization + aInitArgs = Array(com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE) + +' setting variable for XFilePickerControlAccess + controlId = com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_LINK + controlInitVal = true + + oObj.initialize(aInitArgs) + 'oObj.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_READONLY, 0, false) + +' setting variable for XComponent + oComponentInstance = createUnoService("com.sun.star.ui.dialogs.FilePicker") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fps/FilePicker/script.xlb b/qadevOOo/tests/basic/mod/fps/FilePicker/script.xlb new file mode 100644 index 000000000000..fa0a9ddc26f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fps/FilePicker/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="fps_FilePicker" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fps_FilePicker"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ftransl/DataFormatTranslator/ftransl_DataFormatTranslator.xba b/qadevOOo/tests/basic/mod/ftransl/DataFormatTranslator/ftransl_DataFormatTranslator.xba new file mode 100644 index 000000000000..9f00c440b26b --- /dev/null +++ b/qadevOOo/tests/basic/mod/ftransl/DataFormatTranslator/ftransl_DataFormatTranslator.xba @@ -0,0 +1,53 @@ +<?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="ftransl_DataFormatTranslator" 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: +' ftransl.DataFormatTranslator +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.datatransfer.DataFormatTranslator") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ftransl/DataFormatTranslator/script.xlb b/qadevOOo/tests/basic/mod/ftransl/DataFormatTranslator/script.xlb new file mode 100644 index 000000000000..bf5657a4d179 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ftransl/DataFormatTranslator/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="ftransl_DataFormatTranslator" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ftransl_DataFormatTranslator"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwk/Desktop/fwk_Desktop.xba b/qadevOOo/tests/basic/mod/fwk/Desktop/fwk_Desktop.xba new file mode 100644 index 000000000000..388bdd03d1d0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/Desktop/fwk_Desktop.xba @@ -0,0 +1,66 @@ +<?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="fwk_Desktop" 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 frame.XDispatchProvider +Global dispatchUrl As String + +' Required for lang.XComponent +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fwk.Desktop +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("scalc", cObjectName) + oObj = createUnoService("com.sun.star.comp.framework.Desktop") + + dispatchUrl = ".uno:Open" + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwk/Desktop/script.xlb b/qadevOOo/tests/basic/mod/fwk/Desktop/script.xlb new file mode 100644 index 000000000000..e2589c5e447f --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/Desktop/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="fwk_Desktop" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwk_Desktop"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwk/DispatchRecorder/fwk_DispatchRecorder.xba b/qadevOOo/tests/basic/mod/fwk/DispatchRecorder/fwk_DispatchRecorder.xba new file mode 100644 index 000000000000..5c7c6db078ec --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/DispatchRecorder/fwk_DispatchRecorder.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="fwk_DispatchRecorder" 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 frame.XDispatchRecorder +Global dispRecFrame As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fwk.DispatchRecorder +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("swriter", cObjectName) + wait(1000) + Dim frame As Object + frame = createUnoService("com.sun.star.frame.Desktop").getCurrentFrame() + Dim dispRecSup As Object + dispRecSup = frame.getPropertyValue("DispatchRecorderSupplier") + if (isNull(dispRecSup)) then + dispRecSup = createUnoService("com.sun.star.comp.framework.DispatchRecorderSupplier") + end if + + oObj = dispRecSup.getDispatchRecorder() + + if (isNull(oObj)) then + oObj = createUnoService("com.sun.star.comp.framework.DispatchRecorder") + dispRecSup.setDispatchRecorder(oObj) + end if + + dispRecFrame = frame +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwk/DispatchRecorder/script.xlb b/qadevOOo/tests/basic/mod/fwk/DispatchRecorder/script.xlb new file mode 100644 index 000000000000..7139de0f6773 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/DispatchRecorder/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="fwk_DispatchRecorder" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwk_DispatchRecorder"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwk/DispatchRecorderSupplier/fwk_DispatchRecorderSupplier.xba b/qadevOOo/tests/basic/mod/fwk/DispatchRecorderSupplier/fwk_DispatchRecorderSupplier.xba new file mode 100644 index 000000000000..d33203ea01d4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/DispatchRecorderSupplier/fwk_DispatchRecorderSupplier.xba @@ -0,0 +1,53 @@ +<?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="fwk_DispatchRecorderSupplier" 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: +' fwk.DispatchRecorderSupplier +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.comp.framework.DispatchRecorderSupplier") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwk/DispatchRecorderSupplier/script.xlb b/qadevOOo/tests/basic/mod/fwk/DispatchRecorderSupplier/script.xlb new file mode 100644 index 000000000000..fdcaffe4c80f --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/DispatchRecorderSupplier/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="fwk_DispatchRecorderSupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwk_DispatchRecorderSupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwk/DocumentProperties/fwk_DocumentProperties.xba b/qadevOOo/tests/basic/mod/fwk/DocumentProperties/fwk_DocumentProperties.xba new file mode 100644 index 000000000000..a5736e5c8f51 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/DocumentProperties/fwk_DocumentProperties.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="fwk_DocumentProperties" 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 lang.XComponent +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fwk.DocumentProperties +'************************************************************************* +On Error Goto ErrHndl + oDoc = createDocument("swriter", cObjectName) + oObj = oDoc.DocumentInfo + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwk/DocumentProperties/script.xlb b/qadevOOo/tests/basic/mod/fwk/DocumentProperties/script.xlb new file mode 100644 index 000000000000..78ea70b266be --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/DocumentProperties/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="fwk_DocumentProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwk_DocumentProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwk/Frame/fwk_Frame.xba b/qadevOOo/tests/basic/mod/fwk/Frame/fwk_Frame.xba new file mode 100644 index 000000000000..87fb7b4b8d50 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/Frame/fwk_Frame.xba @@ -0,0 +1,64 @@ +<?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="fwk_Frame" 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 frame.XDispatchProvider +Global dispatchUrl As String + +'Required for lang.XComponent +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fwk.Frame +'************************************************************************* +On Error Goto ErrHndl + oDoc = createDocument("swriter", cObjectName) + oObj = oDoc.getCurrentController().getFrame() + dispatchUrl = ".uno:SwitchControlDesignMode" + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwk/Frame/script.xlb b/qadevOOo/tests/basic/mod/fwk/Frame/script.xlb new file mode 100644 index 000000000000..d7113b845558 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/Frame/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="fwk_Frame" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwk_Frame"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwk/JobHandler/fwk_JobHandler.xba b/qadevOOo/tests/basic/mod/fwk/JobHandler/fwk_JobHandler.xba new file mode 100644 index 000000000000..99b09c289a0b --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/JobHandler/fwk_JobHandler.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="fwk_JobHandler" 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 frame.XDispatchProvider +Global dispatchUrl As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fwk.JobHandler +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.comp.framework.JobHandler") + dispatchUrl = "vnd.sun.star.job:event=onMyEvent,alias=AddressBookSourcePilot,service=css.Service" +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwk/JobHandler/script.xlb b/qadevOOo/tests/basic/mod/fwk/JobHandler/script.xlb new file mode 100644 index 000000000000..f1ec1b0141c9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwk/JobHandler/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="fwk_JobHandler" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwk_JobHandler"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwl/FilterFactory/fwl_FilterFactory.xba b/qadevOOo/tests/basic/mod/fwl/FilterFactory/fwl_FilterFactory.xba new file mode 100644 index 000000000000..ff2632fb4e87 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/FilterFactory/fwl_FilterFactory.xba @@ -0,0 +1,94 @@ +<?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="fwl_FilterFactory" 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 lang.XMultiServiceFactory +Global cServiceName As String +Global bCreateInstanceWithoutArguments As Boolean +Global aArguments() As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fwl.FilterFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.framework.FilterFactory") + + Dim filterNames() As Variant + filterNames = oObj.getElementNames() + + Dim i As Integer + Dim filterType As String + Dim filterProps As Object + Dim filterImpl As String + Dim filName As String + for i = 0 to ubound(filterNames) + filterProps = oObj.getByName(filterNames(i)) + filterImpl = getPropertyValue(filterProps, "FilterService") + if Not isNULL(filterImpl) and len(filterImpl) > 0 then + filterType = getPropertyValue(filterProps, "Type") + Out.log("Found filter '" + filterNames(i) + "', type: " + _ + filterType + ", service name: '" + filterImpl + "'") + cServiceName = filterType + bCreateInstanceWithoutArguments = false + Dim args(0) As new com.sun.star.beans.PropertyValue + args(0).Name = "FilterName" + args(0).Value = filterNames(i) + endif + next i +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getPropertyValue(byVal props As Variant, propName As String) As String + Dim i As Integer + for i = 0 to ubound(props) + if props(i).Name = propName then + getPropertyValue = props(i).Value + exit function + endif + next i +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwl/FilterFactory/script.xlb b/qadevOOo/tests/basic/mod/fwl/FilterFactory/script.xlb new file mode 100644 index 000000000000..c217a3af39c3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/FilterFactory/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="fwl_FilterFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwl_FilterFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwl/FrameLoaderFactory/fwl_FrameLoaderFactory.xba b/qadevOOo/tests/basic/mod/fwl/FrameLoaderFactory/fwl_FrameLoaderFactory.xba new file mode 100644 index 000000000000..4ad75cd75e54 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/FrameLoaderFactory/fwl_FrameLoaderFactory.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="fwl_FrameLoaderFactory" 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 lang.XMultiServiceFactory +Global cServiceName As String +Global bCreateInstanceWithoutArguments As Boolean +Global aArguments() As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' fwl.FrameLoaderFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.frame.FrameLoaderFactory") + Dim names As Variant + names = oObj.getElementNames() + bCreateInstanceWithoutArguments = true + cServiceName = names(0) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwl/FrameLoaderFactory/script.xlb b/qadevOOo/tests/basic/mod/fwl/FrameLoaderFactory/script.xlb new file mode 100644 index 000000000000..104c95ef3f4e --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/FrameLoaderFactory/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="fwl_FrameLoaderFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwl_FrameLoaderFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwl/PathSettings/fwl_PathSettings.xba b/qadevOOo/tests/basic/mod/fwl/PathSettings/fwl_PathSettings.xba new file mode 100644 index 000000000000..fc72372c21e7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/PathSettings/fwl_PathSettings.xba @@ -0,0 +1,55 @@ +<?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="fwl_PathSettings" 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: +' fwl.PathSettings +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.framework.PathSettings") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwl/PathSettings/script.xlb b/qadevOOo/tests/basic/mod/fwl/PathSettings/script.xlb new file mode 100644 index 000000000000..b6a40766d988 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/PathSettings/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="fwl_PathSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwl_PathSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/fwl/TypeDetection/fwl_TypeDetection.xba b/qadevOOo/tests/basic/mod/fwl/TypeDetection/fwl_TypeDetection.xba new file mode 100644 index 000000000000..e8d3765fe108 --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/TypeDetection/fwl_TypeDetection.xba @@ -0,0 +1,55 @@ +<?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="fwl_TypeDetection" 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: +' fwl.TypeDetection +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.document.TypeDetection") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/fwl/TypeDetection/script.xlb b/qadevOOo/tests/basic/mod/fwl/TypeDetection/script.xlb new file mode 100644 index 000000000000..c2278d2ce37a --- /dev/null +++ b/qadevOOo/tests/basic/mod/fwl/TypeDetection/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="fwl_TypeDetection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="fwl_TypeDetection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/BreakIterator/i18n_BreakIterator.xba b/qadevOOo/tests/basic/mod/i18n/BreakIterator/i18n_BreakIterator.xba new file mode 100644 index 000000000000..b312c8f0eb64 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/BreakIterator/i18n_BreakIterator.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="i18n_BreakIterator" 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.i18n.XBreakIterator: +Global oLocale As Object +Global UnicodeString As String +Global ScriptType(2, 1) As Integer + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.BreakIterator +'************************************************************************* +On Error Goto ErrHndl + Dim _Locale As new com.sun.star.lang.Locale + _Locale.Country = "US" + _Locale.Language = "en" + oLocale = _Locale + + oDoc = utils.loadTestDocument("Iterator.sxw") + UnicodeString = oDoc.Text.String + + ScriptType(0, 0) = 1 : ScriptType(0, 1) = com.sun.star.i18n.ScriptType.LATIN + ScriptType(1, 0) = 12 : ScriptType(1, 1) = com.sun.star.i18n.ScriptType.LATIN + ScriptType(2, 0) = 50 : ScriptType(2, 1) = com.sun.star.i18n.ScriptType.LATIN + + oObj = createUnoService("com.sun.star.i18n.BreakIterator") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/BreakIterator/script.xlb b/qadevOOo/tests/basic/mod/i18n/BreakIterator/script.xlb new file mode 100644 index 000000000000..33ec5c154b27 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/BreakIterator/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="i18n_BreakIterator" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_BreakIterator"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/CalendarImpl/i18n_CalendarImpl.xba b/qadevOOo/tests/basic/mod/i18n/CalendarImpl/i18n_CalendarImpl.xba new file mode 100644 index 000000000000..6cd29daedb96 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/CalendarImpl/i18n_CalendarImpl.xba @@ -0,0 +1,55 @@ +<?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="i18n_CalendarImpl" 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: +' i18n.CalendarImpl +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.i18n.LocaleCalendar") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/CalendarImpl/script.xlb b/qadevOOo/tests/basic/mod/i18n/CalendarImpl/script.xlb new file mode 100644 index 000000000000..1b18e9675b43 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/CalendarImpl/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="i18n_CalendarImpl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_CalendarImpl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/ChapterCollator/i18n_ChapterCollator.xba b/qadevOOo/tests/basic/mod/i18n/ChapterCollator/i18n_ChapterCollator.xba new file mode 100644 index 000000000000..1116a9a08a2c --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/ChapterCollator/i18n_ChapterCollator.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="i18n_ChapterCollator" 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: + +' Required for com.sun.star.i18n.XCollator: + Global oLocal As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.ChapterCollator +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oLocaleData As Object + Dim allLocales As Object + + bOK = true + + oLocaleData = createUnoService("com.sun.star.i18n.LocaleData") + allLocales = oLocaleData.getAllInstalledLocaleNames() + Out.Log("Found " & ubound(allLocales) & " Locales registered in the system") + Randomize + oLocale = allLocales(rnd * ubound(allLocales)) + Out.Log("Choose for testing : " & oLocale.Country) + + oObj = createUnoService("com.sun.star.i18n.ChapterCollator") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/ChapterCollator/script.xlb b/qadevOOo/tests/basic/mod/i18n/ChapterCollator/script.xlb new file mode 100644 index 000000000000..506e3a58b291 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/ChapterCollator/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="i18n_ChapterCollator" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_ChapterCollator"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/CharacterClassification/i18n_CharacterClassification.xba b/qadevOOo/tests/basic/mod/i18n/CharacterClassification/i18n_CharacterClassification.xba new file mode 100644 index 000000000000..88a31605c2ff --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/CharacterClassification/i18n_CharacterClassification.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="i18n_CharacterClassification" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.CharacterClassification +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oObj = createUnoService("com.sun.star.i18n.CharacterClassification") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/CharacterClassification/script.xlb b/qadevOOo/tests/basic/mod/i18n/CharacterClassification/script.xlb new file mode 100644 index 000000000000..2f1ed0d41f20 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/CharacterClassification/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="i18n_CharacterClassification" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_CharacterClassification"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/Collator/i18n_Collator.xba b/qadevOOo/tests/basic/mod/i18n/Collator/i18n_Collator.xba new file mode 100644 index 000000000000..63510e3802a6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/Collator/i18n_Collator.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="i18n_Collator" 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: + +' Required for com.sun.star.i18n.XCollator: + Global oLocal As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.Collator +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oLocaleData As Object + Dim allLocales As Object + + bOK = true + + oLocaleData = createUnoService("com.sun.star.i18n.LocaleData") + allLocales = oLocaleData.getAllInstalledLocaleNames() + Out.Log("Found " & ubound(allLocales) & " Loacales registered in the system") + Randomize + oLocale = allLocales(rnd * ubound(allLocales)) + Out.Log("Choose for testing : " & oLocale.Country) + + oObj = createUnoService("com.sun.star.i18n.Collator") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/Collator/script.xlb b/qadevOOo/tests/basic/mod/i18n/Collator/script.xlb new file mode 100644 index 000000000000..8bb3b3f5b951 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/Collator/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="i18n_Collator" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_Collator"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/IndexEntrySupplier/i18n_IndexEntrySupplier.xba b/qadevOOo/tests/basic/mod/i18n/IndexEntrySupplier/i18n_IndexEntrySupplier.xba new file mode 100644 index 000000000000..f8d50fe85ee8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/IndexEntrySupplier/i18n_IndexEntrySupplier.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="i18n_IndexEntrySupplier" 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: + +' Required for com.sun.star.i18n.XIndexEntrySupplier: + Global oLocale As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.IndexEntrySupplier +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oLocaleData As Object + Dim allLocales As Variant + + bOK = true + + oObj = createUnoService("com.sun.star.i18n.IndexEntrySupplier") + + oLocaleData = createUnoService("com.sun.star.i18n.LocaleData") + allLocales = oLocaleData.getAllInstalledLocaleNames() + Out.Log("Found " & ubound(allLocales) & " Loacales registered in the system") + Randomize + oLocale = allLocales(rnd * ubound(allLocales)) + Out.Log("Choose for testing : " & oLocale.Country) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/IndexEntrySupplier/script.xlb b/qadevOOo/tests/basic/mod/i18n/IndexEntrySupplier/script.xlb new file mode 100644 index 000000000000..91614bb9cc38 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/IndexEntrySupplier/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="i18n_IndexEntrySupplier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_IndexEntrySupplier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/LocaleData/i18n_LocaleData.xba b/qadevOOo/tests/basic/mod/i18n/LocaleData/i18n_LocaleData.xba new file mode 100644 index 000000000000..621f091a4c35 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/LocaleData/i18n_LocaleData.xba @@ -0,0 +1,55 @@ +<?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="i18n_LocaleData" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.LocaleData +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oObj = createUnoService("com.sun.star.i18n.LocaleData") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/LocaleData/script.xlb b/qadevOOo/tests/basic/mod/i18n/LocaleData/script.xlb new file mode 100644 index 000000000000..770adbff147c --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/LocaleData/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="i18n_LocaleData" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_LocaleData"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/NumberFormatCodeMapper/i18n_NumberFormatCodeMapper.xba b/qadevOOo/tests/basic/mod/i18n/NumberFormatCodeMapper/i18n_NumberFormatCodeMapper.xba new file mode 100644 index 000000000000..724ec8bc4392 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/NumberFormatCodeMapper/i18n_NumberFormatCodeMapper.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="i18n_NumberFormatCodeMapper" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.NumberFormatCodeMapper +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + + oObj = createUNOService("com.sun.star.i18n.NumberFormatCodeMapper") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/NumberFormatCodeMapper/script.xlb b/qadevOOo/tests/basic/mod/i18n/NumberFormatCodeMapper/script.xlb new file mode 100644 index 000000000000..8e45fd58ec26 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/NumberFormatCodeMapper/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="i18n_NumberFormatCodeMapper" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_NumberFormatCodeMapper"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/TextSearch/i18n_TextSearch.xba b/qadevOOo/tests/basic/mod/i18n/TextSearch/i18n_TextSearch.xba new file mode 100644 index 000000000000..38f377430352 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/TextSearch/i18n_TextSearch.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="i18n_TextSearch" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.TextSearch +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oLocaleData As Object + Dim allLocales As Variant + + bOK = true + + oObj = createUnoService("com.sun.star.util.TextSearch") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/TextSearch/script.xlb b/qadevOOo/tests/basic/mod/i18n/TextSearch/script.xlb new file mode 100644 index 000000000000..3b1681a015e4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/TextSearch/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="i18n_TextSearch" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_TextSearch"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/i18n/Transliteration/i18n_Transliteration.xba b/qadevOOo/tests/basic/mod/i18n/Transliteration/i18n_Transliteration.xba new file mode 100644 index 000000000000..e956662887ba --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/Transliteration/i18n_Transliteration.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="i18n_Transliteration" 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: + +' Required for com.sun.star.i18n.XTransliteration: + Global oLocale As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' i18n.Transliteration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oLocaleData As Object + Dim allLocales As Variant + + bOK = true + + oObj = createUnoService("com.sun.star.i18n.Transliteration") + + oLocaleData = createUnoService("com.sun.star.i18n.LocaleData") + allLocales = oLocaleData.getAllInstalledLocaleNames() + Out.Log("Found " & ubound(allLocales) & " Loacales registered in the system") + Randomize + oLocale = allLocales(rnd * ubound(allLocales)) + Out.Log("Choose for testing : " & oLocale.Country) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/i18n/Transliteration/script.xlb b/qadevOOo/tests/basic/mod/i18n/Transliteration/script.xlb new file mode 100644 index 000000000000..0eba236b2239 --- /dev/null +++ b/qadevOOo/tests/basic/mod/i18n/Transliteration/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="i18n_Transliteration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="i18n_Transliteration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/implreg.uno/ImplementationRegistration/implreg_uno_ImplementationRegistration.xba b/qadevOOo/tests/basic/mod/implreg.uno/ImplementationRegistration/implreg_uno_ImplementationRegistration.xba new file mode 100644 index 000000000000..9b563413b4ac --- /dev/null +++ b/qadevOOo/tests/basic/mod/implreg.uno/ImplementationRegistration/implreg_uno_ImplementationRegistration.xba @@ -0,0 +1,53 @@ +<?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="implreg_uno_ImplementationRegistration" 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: +' impreg.ImplementationRegistration +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.registry.ImplementationRegistration") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/implreg.uno/ImplementationRegistration/script.xlb b/qadevOOo/tests/basic/mod/implreg.uno/ImplementationRegistration/script.xlb new file mode 100644 index 000000000000..d784018576be --- /dev/null +++ b/qadevOOo/tests/basic/mod/implreg.uno/ImplementationRegistration/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="implreg_uno_ImplementationRegistration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="implreg_uno_ImplementationRegistration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/impreg/ImplementationRegistration/impreg_ImplementationRegistration.xba b/qadevOOo/tests/basic/mod/impreg/ImplementationRegistration/impreg_ImplementationRegistration.xba new file mode 100644 index 000000000000..85f0af96a2ec --- /dev/null +++ b/qadevOOo/tests/basic/mod/impreg/ImplementationRegistration/impreg_ImplementationRegistration.xba @@ -0,0 +1,53 @@ +<?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="impreg_ImplementationRegistration" 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: +' impreg.ImplementationRegistration +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.registry.ImplementationRegistration") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/impreg/ImplementationRegistration/script.xlb b/qadevOOo/tests/basic/mod/impreg/ImplementationRegistration/script.xlb new file mode 100644 index 000000000000..041877695463 --- /dev/null +++ b/qadevOOo/tests/basic/mod/impreg/ImplementationRegistration/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="impreg_ImplementationRegistration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="impreg_ImplementationRegistration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/insp/Introspection/insp_Introspection.xba b/qadevOOo/tests/basic/mod/insp/Introspection/insp_Introspection.xba new file mode 100644 index 000000000000..f638f5970e89 --- /dev/null +++ b/qadevOOo/tests/basic/mod/insp/Introspection/insp_Introspection.xba @@ -0,0 +1,53 @@ +<?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="insp_Introspection" 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: +' insp.Introspection +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOservice("com.sun.star.beans.Introspection") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/insp/Introspection/script.xlb b/qadevOOo/tests/basic/mod/insp/Introspection/script.xlb new file mode 100644 index 000000000000..b8e2293cb2ff --- /dev/null +++ b/qadevOOo/tests/basic/mod/insp/Introspection/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="insp_Introspection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="insp_Introspection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/introspection.uno/Introspection/introspection_uno_Introspection.xba b/qadevOOo/tests/basic/mod/introspection.uno/Introspection/introspection_uno_Introspection.xba new file mode 100644 index 000000000000..828dc00fd3aa --- /dev/null +++ b/qadevOOo/tests/basic/mod/introspection.uno/Introspection/introspection_uno_Introspection.xba @@ -0,0 +1,53 @@ +<?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="introspection_uno_Introspection" 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: +' insp.Introspection +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOservice("com.sun.star.beans.Introspection") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/introspection.uno/Introspection/script.xlb b/qadevOOo/tests/basic/mod/introspection.uno/Introspection/script.xlb new file mode 100644 index 000000000000..4ab217cb167d --- /dev/null +++ b/qadevOOo/tests/basic/mod/introspection.uno/Introspection/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="introspection_uno_Introspection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="introspection_uno_Introspection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/inv/Invocation/inv_Invocation.xba b/qadevOOo/tests/basic/mod/inv/Invocation/inv_Invocation.xba new file mode 100644 index 000000000000..2c09dc234e10 --- /dev/null +++ b/qadevOOo/tests/basic/mod/inv/Invocation/inv_Invocation.xba @@ -0,0 +1,66 @@ +<?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="inv_Invocation" 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 lang.XSingleServiceFactory +Global aArguments As Variant +' Array of arguments for createInstanceWithArguments() + +Global aMustSupportInterface As Variant +' Array of Strings with names of interfaces which +' must be supported by created instance. + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' inv.Invocation +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.comp.stoc.Invocation") + + aArguments = Array(createUnoService("com.sun.star.io.Pipe")) + aMustSupportInterface = Array("com.sun.star.script.XInvocation") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/inv/Invocation/script.xlb b/qadevOOo/tests/basic/mod/inv/Invocation/script.xlb new file mode 100644 index 000000000000..2e4c535b3d39 --- /dev/null +++ b/qadevOOo/tests/basic/mod/inv/Invocation/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="inv_Invocation" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="inv_Invocation"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/invadp/InvocationAdapterFactory/invadp_InvocationAdapterFactory.xba b/qadevOOo/tests/basic/mod/invadp/InvocationAdapterFactory/invadp_InvocationAdapterFactory.xba new file mode 100644 index 000000000000..9c06686f88a5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/invadp/InvocationAdapterFactory/invadp_InvocationAdapterFactory.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="invadp_InvocationAdapterFactory" 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: +' invadp.InvocationAdapterFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.script.InvocationAdapterFactory") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/invadp/InvocationAdapterFactory/script.xlb b/qadevOOo/tests/basic/mod/invadp/InvocationAdapterFactory/script.xlb new file mode 100644 index 000000000000..63c430d94c45 --- /dev/null +++ b/qadevOOo/tests/basic/mod/invadp/InvocationAdapterFactory/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="invadp_InvocationAdapterFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="invadp_InvocationAdapterFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/invocadapt.uno/InvocationAdapterFactory/invocadapt_uno_InvocationAdapterFactory.xba b/qadevOOo/tests/basic/mod/invocadapt.uno/InvocationAdapterFactory/invocadapt_uno_InvocationAdapterFactory.xba new file mode 100644 index 000000000000..d370b7fc71bd --- /dev/null +++ b/qadevOOo/tests/basic/mod/invocadapt.uno/InvocationAdapterFactory/invocadapt_uno_InvocationAdapterFactory.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="invocadapt_uno_InvocationAdapterFactory" 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: +' invadp.InvocationAdapterFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.script.InvocationAdapterFactory") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/invocadapt.uno/InvocationAdapterFactory/script.xlb b/qadevOOo/tests/basic/mod/invocadapt.uno/InvocationAdapterFactory/script.xlb new file mode 100644 index 000000000000..19b4c1f42cd9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/invocadapt.uno/InvocationAdapterFactory/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="invocadapt_uno_InvocationAdapterFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="invocadapt_uno_InvocationAdapterFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/invocation.uno/Invocation/invocation_uno_Invocation.xba b/qadevOOo/tests/basic/mod/invocation.uno/Invocation/invocation_uno_Invocation.xba new file mode 100644 index 000000000000..4fa55415d165 --- /dev/null +++ b/qadevOOo/tests/basic/mod/invocation.uno/Invocation/invocation_uno_Invocation.xba @@ -0,0 +1,66 @@ +<?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="invocation_uno_Invocation" 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 lang.XSingleServiceFactory +Global aArguments As Variant +' Array of arguments for createInstanceWithArguments() + +Global aMustSupportInterface As Variant +' Array of Strings with names of interfaces which +' must be supported by created instance. + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' inv.Invocation +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.comp.stoc.Invocation") + + aArguments = Array(createUnoService("com.sun.star.io.Pipe")) + aMustSupportInterface = Array("com.sun.star.script.XInvocation") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/invocation.uno/Invocation/script.xlb b/qadevOOo/tests/basic/mod/invocation.uno/Invocation/script.xlb new file mode 100644 index 000000000000..4f2e7692c27d --- /dev/null +++ b/qadevOOo/tests/basic/mod/invocation.uno/Invocation/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="invocation_uno_Invocation" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="invocation_uno_Invocation"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/javaloader.uno/JavaComponentLoader/javaloader_uno_JavaComponentLoader.xba b/qadevOOo/tests/basic/mod/javaloader.uno/JavaComponentLoader/javaloader_uno_JavaComponentLoader.xba new file mode 100644 index 000000000000..c806734d4964 --- /dev/null +++ b/qadevOOo/tests/basic/mod/javaloader.uno/JavaComponentLoader/javaloader_uno_JavaComponentLoader.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="javaloader_uno_JavaComponentLoader" 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 cImpLoader As String +Global cImpURL As String +Global cImpName As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' javaloader.JavaComponentLoader +'************************************************************************* + oObj = createUNOService("com.sun.star.comp.stoc.JavaComponentLoader") + + cImpLoader = "com.sun.star.loader.JavaComponentLoader" + cImpURL = Path2URL(cTestDocsDir + "qadevlibs/MyPersistObjectImpl.jar") + cImpName = "com.sun.star.cmp.MyPersistObject" +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/javaloader.uno/JavaComponentLoader/script.xlb b/qadevOOo/tests/basic/mod/javaloader.uno/JavaComponentLoader/script.xlb new file mode 100644 index 000000000000..e0b833c7e263 --- /dev/null +++ b/qadevOOo/tests/basic/mod/javaloader.uno/JavaComponentLoader/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="javaloader_uno_JavaComponentLoader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="javaloader_uno_JavaComponentLoader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/javaloader/JavaComponentLoader/javaloader_JavaComponentLoader.xba b/qadevOOo/tests/basic/mod/javaloader/JavaComponentLoader/javaloader_JavaComponentLoader.xba new file mode 100644 index 000000000000..c14d2698ba7c --- /dev/null +++ b/qadevOOo/tests/basic/mod/javaloader/JavaComponentLoader/javaloader_JavaComponentLoader.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="javaloader_JavaComponentLoader" 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 cImpLoader As String +Global cImpURL As String +Global cImpName As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' javaloader.JavaComponentLoader +'************************************************************************* + oObj = createUNOService("com.sun.star.comp.stoc.JavaComponentLoader") + + cImpLoader = "com.sun.star.loader.JavaComponentLoader" + cImpURL = Path2URL(cTestDocsDir + "qadevlibs/MyPersistObjectImpl.jar") + cImpName = "com.sun.star.cmp.MyPersistObject" +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/javaloader/JavaComponentLoader/script.xlb b/qadevOOo/tests/basic/mod/javaloader/JavaComponentLoader/script.xlb new file mode 100644 index 000000000000..db572f55727b --- /dev/null +++ b/qadevOOo/tests/basic/mod/javaloader/JavaComponentLoader/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="javaloader_JavaComponentLoader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="javaloader_JavaComponentLoader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/javavm.uno/JavaVirtualMachine/javavm_uno_JavaVirtualMachine.xba b/qadevOOo/tests/basic/mod/javavm.uno/JavaVirtualMachine/javavm_uno_JavaVirtualMachine.xba new file mode 100644 index 000000000000..2c0279d2ecc6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/javavm.uno/JavaVirtualMachine/javavm_uno_JavaVirtualMachine.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="javavm_uno_JavaVirtualMachine" 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 + +'************************************************************************* +' To test this object we have to run JVM first + +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' jen.JavaVirtualMachine +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.comp.stoc.JavaVirtualMachine") + + if NOT oObj.isVMEnabled() then + Out.Log("JavaVirtualMaschine is NOT Enabled!!!") + Exit Sub + end if + + if NOT oObj.isVMStarted() then + Out.Log("JVM not started. Try to start it first...") + createUNOService("com.sun.star.loader.Java2") + Out.Log("JVM was started - " & oObj.isVMStarted()) + end if + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/javavm.uno/JavaVirtualMachine/script.xlb b/qadevOOo/tests/basic/mod/javavm.uno/JavaVirtualMachine/script.xlb new file mode 100644 index 000000000000..48b0f6f52c5d --- /dev/null +++ b/qadevOOo/tests/basic/mod/javavm.uno/JavaVirtualMachine/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="javavm_uno_JavaVirtualMachine" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="javavm_uno_JavaVirtualMachine"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/jdbc/JDBCDriver/jdbc_JDBCDriver.xba b/qadevOOo/tests/basic/mod/jdbc/JDBCDriver/jdbc_JDBCDriver.xba new file mode 100644 index 000000000000..d8a031ad9188 --- /dev/null +++ b/qadevOOo/tests/basic/mod/jdbc/JDBCDriver/jdbc_JDBCDriver.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="jdbc_JDBCDriver" 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 sdbc.XDriver +Global URL as String +Global info As Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' jdbc.JDBCDriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbc.JDBCDriver") + + URL = jdbcUrl + + Dim inf(2) As new com.sun.star.beans.PropertyValue + inf(0).Name = "user" : inf(0).Value = jdbcUser + inf(1).Name = "password" : inf(1).Value = jdbcPassword + inf(2).Name = "JavaDriverClass" : inf(2).Value = "org.gjt.mm.mysql.Driver" + + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/jdbc/JDBCDriver/script.xlb b/qadevOOo/tests/basic/mod/jdbc/JDBCDriver/script.xlb new file mode 100644 index 000000000000..9a68866b71da --- /dev/null +++ b/qadevOOo/tests/basic/mod/jdbc/JDBCDriver/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="jdbc_JDBCDriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="jdbc_JDBCDriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/jen/JavaVirtualMachine/jen_JavaVirtualMachine.xba b/qadevOOo/tests/basic/mod/jen/JavaVirtualMachine/jen_JavaVirtualMachine.xba new file mode 100644 index 000000000000..47bea5de3c8b --- /dev/null +++ b/qadevOOo/tests/basic/mod/jen/JavaVirtualMachine/jen_JavaVirtualMachine.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="jen_JavaVirtualMachine" 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 + +'************************************************************************* +' To test this object we have to run JVM first + +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' jen.JavaVirtualMachine +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.comp.stoc.JavaVirtualMachine") + + if NOT oObj.isVMEnabled() then + Out.Log("JavaVirtualMaschine is NOT Enabled!!!") + Exit Sub + end if + + if NOT oObj.isVMStarted() then + Out.Log("JVM not started. Try to start it first...") + createUNOService("com.sun.star.loader.Java2") + Out.Log("JVM was started - " & oObj.isVMStarted()) + end if + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/jen/JavaVirtualMachine/script.xlb b/qadevOOo/tests/basic/mod/jen/JavaVirtualMachine/script.xlb new file mode 100644 index 000000000000..ccc779c3c845 --- /dev/null +++ b/qadevOOo/tests/basic/mod/jen/JavaVirtualMachine/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="jen_JavaVirtualMachine" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="jen_JavaVirtualMachine"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/lng/DicList/lng_DicList.xba b/qadevOOo/tests/basic/mod/lng/DicList/lng_DicList.xba new file mode 100644 index 000000000000..27aeace995b7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lng/DicList/lng_DicList.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="lng_DicList" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' lng.DicList +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDic As Object + Dim oDic2 As Object + Dim vLocale As New com.sun.star.lang.Locale + + bOK = true + + vLocale.Language = "en" + vLocale.Country = "US" + vLocale.Variant = "WIN" + + ' Insert object creation code here... + + oObj = createUnoService("com.sun.star.lingu2.DicList") + + ' creating a user defined dictionary for XSearchableDictionaryList + + oObj.removeDictionary(oObj.getDictionaryByName("MyDictionary")) + oDic = oObj.createDictionary("NegativDic",vLocale,_ + com.sun.star.linguistic2.DictionaryType.NEGATIVE, "") + oDic2 = oObj.createDictionary("PositiveDic",vLocale,_ + com.sun.star.linguistic2.DictionaryType.POSITIVE, "") + oDic2.add("Positive", false, "") + oDic.add("Negative", true, "") + oObj.addDictionary(oDic) + oObj.addDictionary(oDic2) + oDic.setActive(true) + oDic2.setActive(true) + + oComponentInstance = oObj + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/lng/DicList/script.xlb b/qadevOOo/tests/basic/mod/lng/DicList/script.xlb new file mode 100644 index 000000000000..78260ca2ac31 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lng/DicList/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="lng_DicList" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="lng_DicList"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/lng/LinguProps/lng_LinguProps.xba b/qadevOOo/tests/basic/mod/lng/LinguProps/lng_LinguProps.xba new file mode 100644 index 000000000000..c7a6ae9a5d94 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lng/LinguProps/lng_LinguProps.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="lng_LinguProps" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' lng.LinguProps +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.linguistic2.LinguProperties") + oComponentInstance = createUnoService("com.sun.star.linguistic2.LinguProperties") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/lng/LinguProps/script.xlb b/qadevOOo/tests/basic/mod/lng/LinguProps/script.xlb new file mode 100644 index 000000000000..fd747fc2dde0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lng/LinguProps/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="lng_LinguProps" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="lng_LinguProps"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/lng/LngSvcMgr/lng_LngSvcMgr.xba b/qadevOOo/tests/basic/mod/lng/LngSvcMgr/lng_LngSvcMgr.xba new file mode 100644 index 000000000000..70d406def0fc --- /dev/null +++ b/qadevOOo/tests/basic/mod/lng/LngSvcMgr/lng_LngSvcMgr.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="lng_LngSvcMgr" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' lng.LngSvcMgr +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.linguistic2.LinguServiceManager") + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/lng/LngSvcMgr/script.xlb b/qadevOOo/tests/basic/mod/lng/LngSvcMgr/script.xlb new file mode 100644 index 000000000000..94a10ab5f22b --- /dev/null +++ b/qadevOOo/tests/basic/mod/lng/LngSvcMgr/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="lng_LngSvcMgr" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="lng_LngSvcMgr"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/lnn/Hyphenator/lnn_Hyphenator.xba b/qadevOOo/tests/basic/mod/lnn/Hyphenator/lnn_Hyphenator.xba new file mode 100644 index 000000000000..b6e6c0be7744 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lnn/Hyphenator/lnn_Hyphenator.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="lnn_Hyphenator" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.lang.XInitialization: + Global aInitArgs() As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' lnn.Hyphenator +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.linguistic2.Hyphenator") + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/lnn/Hyphenator/script.xlb b/qadevOOo/tests/basic/mod/lnn/Hyphenator/script.xlb new file mode 100644 index 000000000000..ac0d1ff48be1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lnn/Hyphenator/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="lnn_Hyphenator" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="lnn_Hyphenator"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/lnn/SpellChecker/lnn_SpellChecker.xba b/qadevOOo/tests/basic/mod/lnn/SpellChecker/lnn_SpellChecker.xba new file mode 100644 index 000000000000..4afb7eb5a0b8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lnn/SpellChecker/lnn_SpellChecker.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="lnn_SpellChecker" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.lang.XInitialization: + Global aInitArgs() As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' lnn.SpellChecker +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.linguistic2.SpellChecker") + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/lnn/SpellChecker/script.xlb b/qadevOOo/tests/basic/mod/lnn/SpellChecker/script.xlb new file mode 100644 index 000000000000..649d2228e69b --- /dev/null +++ b/qadevOOo/tests/basic/mod/lnn/SpellChecker/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="lnn_SpellChecker" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="lnn_SpellChecker"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/lnn/Thesaurus/lnn_Thesaurus.xba b/qadevOOo/tests/basic/mod/lnn/Thesaurus/lnn_Thesaurus.xba new file mode 100644 index 000000000000..624d0a04a1d0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/lnn/Thesaurus/lnn_Thesaurus.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="lnn_Thesaurus" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.lang.XInitialization: + Global aInitArgs() As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' lnn.Thesaurus +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.linguistic2.Thesaurus") + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/lnn/Thesaurus/script.xlb b/qadevOOo/tests/basic/mod/lnn/Thesaurus/script.xlb new file mode 100644 index 000000000000..73e702b69b8e --- /dev/null +++ b/qadevOOo/tests/basic/mod/lnn/Thesaurus/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="lnn_Thesaurus" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="lnn_Thesaurus"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/mcnttype/MimeContentTypeFactory/mcnttype_MimeContentTypeFactory.xba b/qadevOOo/tests/basic/mod/mcnttype/MimeContentTypeFactory/mcnttype_MimeContentTypeFactory.xba new file mode 100644 index 000000000000..596831c9b3bc --- /dev/null +++ b/qadevOOo/tests/basic/mod/mcnttype/MimeContentTypeFactory/mcnttype_MimeContentTypeFactory.xba @@ -0,0 +1,53 @@ +<?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="mcnttype_MimeContentTypeFactory" 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: +' mcnttype.MimeContentTypeFactory +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.datatransfer.MimeContentTypeFactory") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/mcnttype/MimeContentTypeFactory/script.xlb b/qadevOOo/tests/basic/mod/mcnttype/MimeContentTypeFactory/script.xlb new file mode 100644 index 000000000000..bdafdf64beb3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/mcnttype/MimeContentTypeFactory/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="mcnttype_MimeContentTypeFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="mcnttype_MimeContentTypeFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/mozab/MozabDriver/mozab_MozabDriver.xba b/qadevOOo/tests/basic/mod/mozab/MozabDriver/mozab_MozabDriver.xba new file mode 100644 index 000000000000..f15577a2b910 --- /dev/null +++ b/qadevOOo/tests/basic/mod/mozab/MozabDriver/mozab_MozabDriver.xba @@ -0,0 +1,67 @@ +<?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="mozab_MozabDriver" 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 sdbc.XDriver +Global URL as String +Global info As Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' mozab.MozabDriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbc.MozabDriver") + + URL = mozabUrl + + Dim inf(0) As new com.sun.star.beans.PropertyValue + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/mozab/MozabDriver/script.xlb b/qadevOOo/tests/basic/mod/mozab/MozabDriver/script.xlb new file mode 100644 index 000000000000..d69d6176afdd --- /dev/null +++ b/qadevOOo/tests/basic/mod/mozab/MozabDriver/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="mozab_MozabDriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="mozab_MozabDriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/namingservice.uno/NamingService/namingservice_uno_NamingService.xba b/qadevOOo/tests/basic/mod/namingservice.uno/NamingService/namingservice_uno_NamingService.xba new file mode 100644 index 000000000000..bcd63a1ae16d --- /dev/null +++ b/qadevOOo/tests/basic/mod/namingservice.uno/NamingService/namingservice_uno_NamingService.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="namingservice_uno_NamingService" 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: + +' Requiered for XNamingService + Global oObjectToRegister As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' namingservice.NamingService +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.uno.NamingService") + oObjectToRegister = createUNOService("com.sun.star.lang.ServiceManager") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/namingservice.uno/NamingService/script.xlb b/qadevOOo/tests/basic/mod/namingservice.uno/NamingService/script.xlb new file mode 100644 index 000000000000..58b5bd8cb372 --- /dev/null +++ b/qadevOOo/tests/basic/mod/namingservice.uno/NamingService/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="namingservice_uno_NamingService" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="namingservice_uno_NamingService"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/namingservice/NamingService/namingservice_NamingService.xba b/qadevOOo/tests/basic/mod/namingservice/NamingService/namingservice_NamingService.xba new file mode 100644 index 000000000000..9ff3065b86eb --- /dev/null +++ b/qadevOOo/tests/basic/mod/namingservice/NamingService/namingservice_NamingService.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="namingservice_NamingService" 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: + +' Requiered for XNamingService + Global oObjectToRegister As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' namingservice.NamingService +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.uno.NamingService") + oObjectToRegister = createUNOService("com.sun.star.lang.ServiceManager") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/namingservice/NamingService/script.xlb b/qadevOOo/tests/basic/mod/namingservice/NamingService/script.xlb new file mode 100644 index 000000000000..502c319672a2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/namingservice/NamingService/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="namingservice_NamingService" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="namingservice_NamingService"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/nestedreg.uno/NestedRegistry/nestedreg_uno_NestedRegistry.xba b/qadevOOo/tests/basic/mod/nestedreg.uno/NestedRegistry/nestedreg_uno_NestedRegistry.xba new file mode 100644 index 000000000000..8ad17d7dfe0c --- /dev/null +++ b/qadevOOo/tests/basic/mod/nestedreg.uno/NestedRegistry/nestedreg_uno_NestedRegistry.xba @@ -0,0 +1,94 @@ +<?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="nestedreg_uno_NestedRegistry" 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: + +' Requiered for com.sun.star.lang.XInitialization +Global aInitArgs As Variant + +Global oReg1 As Object +Global oReg2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' defreg.NestedRegistry +'************************************************************************* +On Error Goto ErrHndl + Dim cURL1 As String + Dim cURL2 As String + + oObj = createUnoService("com.sun.star.registry.NestedRegistry") + + oReg1 = createUnoService("com.sun.star.registry.SimpleRegistry") + oReg2 = createUnoService("com.sun.star.registry.SimpleRegistry") + cURL1 = utils.getTempFileURL("BAS_forNestedRegistry1.rdb") + cURL2 = utils.getTempFileURL("BAS_forNestedRegistry2.rdb") + + if FileExists(cURL1) then + kill(cURL1) + end if + + if FileExists(cURL2) then + kill(cURL2) + end if + + oReg1.open(cURL1, true, true) + oReg2.open(cURL2, false, true) + + Dim aArgs(1) As Object + aArgs(0) = oReg1 + aArgs(1) = oReg2 + + aInitArgs = aArgs() + + oObj.initialize(aInitArgs()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oReg1.close() + oReg2.close() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/nestedreg.uno/NestedRegistry/script.xlb b/qadevOOo/tests/basic/mod/nestedreg.uno/NestedRegistry/script.xlb new file mode 100644 index 000000000000..0364e36368b5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/nestedreg.uno/NestedRegistry/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="nestedreg_uno_NestedRegistry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="nestedreg_uno_NestedRegistry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/odbc/ODBCDriver/odbc_ODBCDriver.xba b/qadevOOo/tests/basic/mod/odbc/ODBCDriver/odbc_ODBCDriver.xba new file mode 100644 index 000000000000..0641b2e47246 --- /dev/null +++ b/qadevOOo/tests/basic/mod/odbc/ODBCDriver/odbc_ODBCDriver.xba @@ -0,0 +1,67 @@ +<?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="odbc_ODBCDriver" 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 sdbc.XDriver +Global URL as String +Global info As Variant + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' odbc.ODBCDriver +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sdbc.ODBCDriver") + + URL = odbcUrl + + Dim inf(0) As new com.sun.star.beans.PropertyValue + info = inf() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/odbc/ODBCDriver/script.xlb b/qadevOOo/tests/basic/mod/odbc/ODBCDriver/script.xlb new file mode 100644 index 000000000000..079fa0e2e137 --- /dev/null +++ b/qadevOOo/tests/basic/mod/odbc/ODBCDriver/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="odbc_ODBCDriver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="odbc_ODBCDriver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/proxyfac_ProxyFactory.xba b/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/proxyfac_ProxyFactory.xba new file mode 100644 index 000000000000..504d2f79ed59 --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/proxyfac_ProxyFactory.xba @@ -0,0 +1,53 @@ +<?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="proxyfac_ProxyFactory" 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: +' proxyfac.ProxyFactory +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.reflection.ProxyFactory") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/proxyfac_uno_ProxyFactory.xba b/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/proxyfac_uno_ProxyFactory.xba new file mode 100644 index 000000000000..c5b82d26730b --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/proxyfac_uno_ProxyFactory.xba @@ -0,0 +1,53 @@ +<?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="proxyfac_uno_ProxyFactory" 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: +' proxyfac.ProxyFactory +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.reflection.ProxyFactory") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/script.xlb b/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/script.xlb new file mode 100644 index 000000000000..9347b77b091a --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyfac.uno/ProxyFactory/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="proxyfac_uno_ProxyFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="proxyfac_uno_ProxyFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/proxyfac/ProxyFactory/proxyfac_ProxyFactory.xba b/qadevOOo/tests/basic/mod/proxyfac/ProxyFactory/proxyfac_ProxyFactory.xba new file mode 100644 index 000000000000..504d2f79ed59 --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyfac/ProxyFactory/proxyfac_ProxyFactory.xba @@ -0,0 +1,53 @@ +<?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="proxyfac_ProxyFactory" 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: +' proxyfac.ProxyFactory +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.reflection.ProxyFactory") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/proxyfac/ProxyFactory/script.xlb b/qadevOOo/tests/basic/mod/proxyfac/ProxyFactory/script.xlb new file mode 100644 index 000000000000..6409722182a9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyfac/ProxyFactory/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="proxyfac_ProxyFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="proxyfac_ProxyFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/proxyset/SOffice52ProxySettings/proxyset_SOffice52ProxySettings.xba b/qadevOOo/tests/basic/mod/proxyset/SOffice52ProxySettings/proxyset_SOffice52ProxySettings.xba new file mode 100644 index 000000000000..93c228c9e5e0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyset/SOffice52ProxySettings/proxyset_SOffice52ProxySettings.xba @@ -0,0 +1,53 @@ +<?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="proxyset_SOffice52ProxySettings" 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: +' proxyset.SOffice52ProxySettings +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.system.SOffice52ProxySettings") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/proxyset/SOffice52ProxySettings/script.xlb b/qadevOOo/tests/basic/mod/proxyset/SOffice52ProxySettings/script.xlb new file mode 100644 index 000000000000..dcea633df74f --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyset/SOffice52ProxySettings/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="proxyset_SOffice52ProxySettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="proxyset_SOffice52ProxySettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/proxyset/SystemProxySettings/proxyset_SystemProxySettings.xba b/qadevOOo/tests/basic/mod/proxyset/SystemProxySettings/proxyset_SystemProxySettings.xba new file mode 100644 index 000000000000..3a0c9c414bda --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyset/SystemProxySettings/proxyset_SystemProxySettings.xba @@ -0,0 +1,53 @@ +<?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="proxyset_SystemProxySettings" 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: +' proxyset.SystemProxySettings +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.system.SystemProxySettings") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/proxyset/SystemProxySettings/script.xlb b/qadevOOo/tests/basic/mod/proxyset/SystemProxySettings/script.xlb new file mode 100644 index 000000000000..1d816d0e69d0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/proxyset/SystemProxySettings/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="proxyset_SystemProxySettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="proxyset_SystemProxySettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/rdbtdp/RegistryTypeDescriptionProvider/rdbtdp_RegistryTypeDescriptionProvider.xba b/qadevOOo/tests/basic/mod/rdbtdp/RegistryTypeDescriptionProvider/rdbtdp_RegistryTypeDescriptionProvider.xba new file mode 100644 index 000000000000..046e71f73d02 --- /dev/null +++ b/qadevOOo/tests/basic/mod/rdbtdp/RegistryTypeDescriptionProvider/rdbtdp_RegistryTypeDescriptionProvider.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="rdbtdp_RegistryTypeDescriptionProvider" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' rdbtdp.RegistryTypeDescriptionProvider +'************************************************************************* +On Error Goto ErrHndl + Dim smgr As Object, context As Object, tdmgr As Object + Dim tdmgrEnum As Object + + oObj = createUNOService("com.sun.star.comp.stoc.ORegistryServiceManager") + + context = oObj.getPropertyValue("DefaultContext") + tdmgr = context.getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager") + + tdmgrEnum = tdmgr.createEnumeration() + + oObj = tdmgrEnum.nextElement() + + oComponentInstance = tdmgrEnum.nextElement() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/rdbtdp/RegistryTypeDescriptionProvider/script.xlb b/qadevOOo/tests/basic/mod/rdbtdp/RegistryTypeDescriptionProvider/script.xlb new file mode 100644 index 000000000000..f6b31b98c4f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/rdbtdp/RegistryTypeDescriptionProvider/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="rdbtdp_RegistryTypeDescriptionProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="rdbtdp_RegistryTypeDescriptionProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/regtypeprov.uno/RegistryTypeDescriptionProvider/regtypeprov_uno_RegistryTypeDescriptionProvider.xba b/qadevOOo/tests/basic/mod/regtypeprov.uno/RegistryTypeDescriptionProvider/regtypeprov_uno_RegistryTypeDescriptionProvider.xba new file mode 100644 index 000000000000..391e49f5d03c --- /dev/null +++ b/qadevOOo/tests/basic/mod/regtypeprov.uno/RegistryTypeDescriptionProvider/regtypeprov_uno_RegistryTypeDescriptionProvider.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="regtypeprov_uno_RegistryTypeDescriptionProvider" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' rdbtdp.RegistryTypeDescriptionProvider +'************************************************************************* +On Error Goto ErrHndl + Dim smgr As Object, context As Object, tdmgr As Object + Dim tdmgrEnum As Object + + oObj = createUNOService("com.sun.star.comp.stoc.ORegistryServiceManager") + + context = oObj.getPropertyValue("DefaultContext") + tdmgr = context.getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager") + + tdmgrEnum = tdmgr.createEnumeration() + + oObj = tdmgrEnum.nextElement() + + oComponentInstance = tdmgrEnum.nextElement() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/regtypeprov.uno/RegistryTypeDescriptionProvider/script.xlb b/qadevOOo/tests/basic/mod/regtypeprov.uno/RegistryTypeDescriptionProvider/script.xlb new file mode 100644 index 000000000000..00a836dff3e7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/regtypeprov.uno/RegistryTypeDescriptionProvider/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="regtypeprov_uno_RegistryTypeDescriptionProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="regtypeprov_uno_RegistryTypeDescriptionProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/remotebridge.uno/various/remotebridge_uno_various.xba b/qadevOOo/tests/basic/mod/remotebridge.uno/various/remotebridge_uno_various.xba new file mode 100644 index 000000000000..8533660ce26a --- /dev/null +++ b/qadevOOo/tests/basic/mod/remotebridge.uno/various/remotebridge_uno_various.xba @@ -0,0 +1,95 @@ +<?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="remotebridge_uno_various" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.lang.XInitialization: + Global aInitArgs(3) As Variant + Global aNoInit() + +' Required for com.sun.star.bridge.XBridge: + Global sBridgeName As String + Global sConnectionString As String + +Dim xConnection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' remotebridge.various +'************************************************************************* +On Error Goto ErrHndl + Dim protocol As String + Dim iPos1 As Integer + Dim iPos2 As Integer + + oObj = createUNOService("com.sun.star.bridge.Bridge") + oComponentInstance = createUNOService("com.sun.star.bridge.Bridge") + + sBridgeName = "remotebridge" + protocol = "urp" + xConnection = createUNOService("com.sun.star.connection.Connector") + + iPos1 = inStr(CNCSTR, "socket") + iPos2 = inStr(iPos1, CNCSTR, ";") + sConnectionString = mid(CNCSTR, iPos1, iPos2 - iPos1) + Out.Log("Creating connection with parameters: " + sConnectionString) + xConnection = xConnection.Connect(sConnectionString) + + aInitArgs(0) = sBridgeName + aInitArgs(1) = protocol + aInitArgs(2) = xConnection + aInitArgs(3) = "" + + oObj.initialize(aInitArgs()) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + Out.Log("Disposing object...") + utils.closeObject(oObj) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/remotebridge.uno/various/script.xlb b/qadevOOo/tests/basic/mod/remotebridge.uno/various/script.xlb new file mode 100644 index 000000000000..06f251ba787f --- /dev/null +++ b/qadevOOo/tests/basic/mod/remotebridge.uno/various/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="remotebridge_uno_various" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="remotebridge_uno_various"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/remotebridge/various/remotebridge_various.xba b/qadevOOo/tests/basic/mod/remotebridge/various/remotebridge_various.xba new file mode 100644 index 000000000000..97871221fc93 --- /dev/null +++ b/qadevOOo/tests/basic/mod/remotebridge/various/remotebridge_various.xba @@ -0,0 +1,98 @@ +<?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="remotebridge_various" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.lang.XInitialization: + Global aInitArgs(3) As Variant + Global aNoInit() + +' Required for com.sun.star.bridge.XBridge: + Global sBridgeName As String + Global sConnectionString As String + +Dim xConnection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' remotebridge.various +'************************************************************************* +On Error Goto ErrHndl + Dim protocol As String + Dim iPos1 As Integer + Dim iPos2 As Integer + + oObj = createUNOService("com.sun.star.bridge.Bridge") + oComponentInstance = createUNOService("com.sun.star.bridge.Bridge") + + sBridgeName = "remotebridge" + protocol = "urp" + xConnection = createUNOService("com.sun.star.connection.Connector") + + iPos1 = inStr(CNCSTR, "socket") + iPos2 = inStr(iPos1, CNCSTR, ";") + sConnectionString = mid(CNCSTR, iPos1, iPos2 - iPos1) + Out.Log("Creating connection with parameters: " + sConnectionString) + xConnection = xConnection.Connect(sConnectionString) + + aInitArgs(0) = sBridgeName + aInitArgs(1) = protocol + aInitArgs(2) = xConnection + aInitArgs(3) = "" + + oObj.initialize(aInitArgs()) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + Out.Log("Disposing object...") + if (NOT isNULL(xConnection)) then + xConnection.close() + end if + oObj.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/remotebridge/various/script.xlb b/qadevOOo/tests/basic/mod/remotebridge/various/script.xlb new file mode 100644 index 000000000000..bcea53bcdf0b --- /dev/null +++ b/qadevOOo/tests/basic/mod/remotebridge/various/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="remotebridge_various" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="remotebridge_various"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_HeaderFooter/sc_AccessibleEditableTextPara_HeaderFooter.xba b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_HeaderFooter/sc_AccessibleEditableTextPara_HeaderFooter.xba new file mode 100644 index 000000000000..e2cdce0cb2b5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_HeaderFooter/sc_AccessibleEditableTextPara_HeaderFooter.xba @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_AccessibleEditableTextPara_HeaderFooter" 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::XAccessibleEditableText#optional" + ' needs the following Global variables: +global hasChangeableAttrs as boolean + +' "com::sun::star::accessibility::XAccessibleSelection#optional" + ' needs the following Global variables: +' Global multiSelection As Boolean + +' "com::sun::star::accessibility::XAccessibleText" + ' needs the following Global variables: +global accText as String +Global readOnly as Boolean + +Global accButton as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.sc.AccessibleEditableTextPara_HeaderFooter +'************************************************************************* +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("scalc", cObjectName) + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + thRunner.initialize(Array("OpenToolkitDialog",".uno:EditHeaderAndFooter",oDoc)) + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) +' utils.at_printAccessibleTree(xRoot) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PARAGRAPH,"Paragraph 0") + accButton = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Cancel") + accText = "My AccessibleEditableTextPara_HeaderFooter text" + oObj.setText(accText) + readOnly = false + + hasChangeableAttrs = false + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim myText as String + myText = oObj.getText() + oObj.setText(myText + "dummy") + wait(1000) + oObj.setText(myText) + wait(1000) + accButton.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_HeaderFooter/script.xlb b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_HeaderFooter/script.xlb new file mode 100644 index 000000000000..3b36862130f2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_HeaderFooter/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="sc_AccessibleEditableTextPara_HeaderFooter" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="sc_AccessibleEditableTextPara_HeaderFooter"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_PreviewCell/sc_AccessibleEditableTextPara_PreviewCell.xba b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_PreviewCell/sc_AccessibleEditableTextPara_PreviewCell.xba new file mode 100644 index 000000000000..c844bc7a607d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_PreviewCell/sc_AccessibleEditableTextPara_PreviewCell.xba @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_AccessibleEditableTextPara_PreviewCell" 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" + ' needs the following Global variables: + +' "com::sun::star::accessibility::XAccessibleEditableText#optional" + ' needs the following Global variables: + ' global hasChangeableAttrs as boolean + +' "com::sun::star::accessibility::XAccessibleSelection#optional" + ' needs the following Global variables: + ' Global multiSelection As Boolean + +' "com::sun::star::accessibility::XAccessibleText" + ' needs the following Global variables: +Global accText as String +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.sc.AccessibleEditableTextPara_PreviewCell +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, xCell As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, oWin As Object + Dim noProps() + + accText = "ScAccessibleEditableTextPara_PreviewCell" + oDoc = utils.createDocument("scalc",cObjectName) + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) + xCell.setFormula(accText) + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + ' get the first cell + xRoot = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TABLE_CELL,"Cell A1") + ' the the Paragraph + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PARAGRAPH,"Paragraph 0") + utils.at_printAccessibleTree(xRoot) + readOnly = true + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + Exit Sub + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +Sub fireEvent() + Dim dispatcher as Object + dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") + + rem ---------------------------------------------------------------------- + dispatcher.executeDispatch(oDoc.CurrentController.Frame, ".uno:ZoomIn", "", 0, Array()) + wait(500) + rem ---------------------------------------------------------------------- + dispatcher.executeDispatch(oDoc.CurrentController.Frame, ".uno:ZoomOut", "", 0, Array()) +end Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_PreviewCell/script.xlb b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_PreviewCell/script.xlb new file mode 100644 index 000000000000..8c7e38f9c97c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/AccessibleEditableTextPara_PreviewCell/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="sc_AccessibleEditableTextPara_PreviewCell" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="sc_AccessibleEditableTextPara_PreviewCell"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCell/sc_ScAccessibleCell.xba b/qadevOOo/tests/basic/mod/sc/ScAccessibleCell/sc_ScAccessibleCell.xba new file mode 100644 index 000000000000..ea0312ef25e3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCell/sc_ScAccessibleCell.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScAccessibleCell" 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: +' sc.ScAccessibleCell +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object + Dim xRoot As Object, xCell As Object + + oDoc = utils.createDocument("scalc",cObjectName) + accText = "Testing object sc.ScAccessibleCell" + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(1,0) + xCell.setFormula(accText) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TABLE_CELL,"B1") + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCell/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessibleCell/script.xlb new file mode 100644 index 000000000000..bcaaedb7e755 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCell/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="sc_ScAccessibleCell" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessibleCell"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvCell/sc_ScAccessibleCsvCell.xba b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvCell/sc_ScAccessibleCsvCell.xba new file mode 100644 index 000000000000..200bd87b790a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvCell/sc_ScAccessibleCsvCell.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="sc_ScAccessibleCsvCell" 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: +' sc.ScAccessibleCsvCell +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object, oParent As Object + + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + thRunner.initialize(Array("OpenDialogFromFile","10test.csv")) + wait(3000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oParent = utils.at_getAccessibleObjectForRole(xRoot,_ + com.sun.star.accessibility.AccessibleRole.TABLE) + oObj = oParent.getAccessibleChild(3).getAccessibleContext() + Out.Log("Child: "+oObj.getAccessibleName()) + 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 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvCell/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvCell/script.xlb new file mode 100644 index 000000000000..a60430d23b5c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvCell/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="sc_ScAccessibleCsvCell" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessibleCsvCell"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvGrid/sc_ScAccessibleCsvGrid.xba b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvGrid/sc_ScAccessibleCsvGrid.xba new file mode 100644 index 000000000000..66dc29ca3dd2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvGrid/sc_ScAccessibleCsvGrid.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScAccessibleCsvGrid" 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 +Global accButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScAccessibleCsvGrid +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object + + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + wait(1000) + thRunner.initialize(Array("OpenDialogFromFile","10test.csv")) + wait(3000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TABLE) + Out.Log("Implementation name: "+oObj.getImplementationName()) + accButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Cancel") + multiSelection = false + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvGrid/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvGrid/script.xlb new file mode 100644 index 000000000000..c01906dc9cf7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvGrid/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="sc_ScAccessibleCsvGrid" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessibleCsvGrid"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvRuler/sc_ScAccessibleCsvRuler.xba b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvRuler/sc_ScAccessibleCsvRuler.xba new file mode 100644 index 000000000000..4e3ad1e21c18 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvRuler/sc_ScAccessibleCsvRuler.xba @@ -0,0 +1,87 @@ +<?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="sc_ScAccessibleCsvRuler" 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: +' sc.ScAccessibleCsvRuler +'************************************************************************* +On Error Goto ErrHndl + Dim oMSF As Object, oWin As Object + Dim thRunner As Object, xRoot As Object + Dim tk As Object, accRB As Object + + oMSF = getProcessServiceManager() + thRunner = oMSF.createInstance("basichelper.ThreadRunner") + tk = createUNOService("com.sun.star.awt.Toolkit") + thRunner.initialize(Array("OpenDialogFromFile","10test.csv")) + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + accButton = utils.at_getAccessibleObjectForRole(xRoot,_ + com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Cancel") + accRB = utils.at_getAccessibleObjectForRole(xRoot,_ + com.sun.star.accessibility.AccessibleRole.RADIO_BUTTON,"Fixed") + accRB.doAccessibleAction(0) + wait(1000) + oObj = utils.at_getAccessibleObjectForRole(xRoot,_ + com.sun.star.accessibility.AccessibleRole.TEXT,"Ruler") + Out.Log("Implementation name: "+oObj.getImplementationName()) + accText = oObj.getText() + Out.Log("Text: "+accText) + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(accButton) then + accButton.doAccessibleAction(0) + wait(1000) + End If +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvRuler/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvRuler/script.xlb new file mode 100644 index 000000000000..976e91250eb7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleCsvRuler/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="sc_ScAccessibleCsvRuler" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessibleCsvRuler"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleDocument/sc_ScAccessibleDocument.xba b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocument/sc_ScAccessibleDocument.xba new file mode 100644 index 000000000000..743c8ea54c77 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocument/sc_ScAccessibleDocument.xba @@ -0,0 +1,68 @@ +<?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="sc_ScAccessibleDocument" 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 +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScAccessibleDocument +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + + oDoc = utils.createDocument("scalc",cObjectName) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT) + multiSelection = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oWin.setFocus() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleDocument/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocument/script.xlb new file mode 100644 index 000000000000..2ac95235aea5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocument/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="sc_ScAccessibleDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessibleDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleDocumentPagePreview/sc_ScAccessibleDocumentPagePreview.xba b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocumentPagePreview/sc_ScAccessibleDocumentPagePreview.xba new file mode 100644 index 000000000000..782145294bfa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocumentPagePreview/sc_ScAccessibleDocumentPagePreview.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScAccessibleDocumentPagePreview" 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 win As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScAccessibleDocumentPagePreview +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, xCell As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, oWin As Object + Dim noProps() + + oDoc = utils.createDocument("scalc",cObjectName) + xCell = oDoc.getSheets().getByIndex(1).getCellByPosition(0,0) + xCell.setFormula("ScAccessibleDocumentPagePreview - Page 2") + xCell = oDoc.getSheets().getByIndex(2).getCellByPosition(0,0) + xCell.setFormula("ScAccessibleDocumentPagePreview - Page 3") + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) + xCell.setFormula("ScAccessibleDocumentPagePreview - Page 1") + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT) + win = oDoc.getCurrentController().getFrame().getComponentWindow() + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim oRect As New com.sun.star.awt.Rectangle + oRect = win.getPosSize() + win.setPosSize(oRect.X,oRect.Y,oRect.Height-1,oRect.Width-1,15) + win.setPosSize(oRect.X,oRect.Y,oRect.Height,oRect.Width,15) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleDocumentPagePreview/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocumentPagePreview/script.xlb new file mode 100644 index 000000000000..05863e0ea819 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleDocumentPagePreview/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="sc_ScAccessibleDocumentPagePreview" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessibleDocumentPagePreview"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeader/sc_ScAccessiblePageHeader.xba b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeader/sc_ScAccessiblePageHeader.xba new file mode 100644 index 000000000000..44b3b4c29039 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeader/sc_ScAccessiblePageHeader.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="sc_ScAccessiblePageHeader" 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 cLeft As Object +Global cRight As Object +Global cCenter As Object +Global oStyle As Object +Global RPHC2 As Object +Global textIndex As Integer + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScAccessiblePageHeader +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, xCell As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, oWin As Object + Dim noProps() + Dim RPHC As Variant + + oDoc = utils.createDocument("scalc",cObjectName) + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) + xCell.setFormula("ScAccessiblePageHeader") + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.HEADER) + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + Exit Sub + End If + oStyle = oDoc.getStyleFamilies().getByName("PageStyles").getByName("Default") + RPHC = oStyle.getPropertyValue("RightPageHeaderContent") + RPHC2 = RPHC + cLeft = RPHC2.getLeftText() + cRight = RPHC2.getRightText() + cCenter = RPHC2.getCenterText() + textIndex = 0 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + cLeft.setString("LEFT"+textIndex) + cRight.setString("RIGHT"+textIndex) + cCenter.setString("CENTER"+textIndex) + oStyle.setPropertyValue("RightPageHeaderContent",RPHC2) + textIndex = textIndex + 1 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeader/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeader/script.xlb new file mode 100644 index 000000000000..a89b24f86daa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeader/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="sc_ScAccessiblePageHeader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessiblePageHeader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeaderArea/sc_ScAccessiblePageHeaderArea.xba b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeaderArea/sc_ScAccessiblePageHeaderArea.xba new file mode 100644 index 000000000000..71479b48e379 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeaderArea/sc_ScAccessiblePageHeaderArea.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="sc_ScAccessiblePageHeaderArea" 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: +' sc.ScAccessiblePageHeaderArea +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xCell As Object, xController As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, oWin As Object + Dim noProps() + Dim stateSet As Object + + oDoc = utils.createDocument("scalc",cObjectName) + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) + xCell.setFormula("ScAccessiblePageHeaderArea") + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.HEADER).getAccessibleChild(0) + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + Exit Sub + End If + + stateSet = oObj.getAccessibleStateSet() + if (stateSet.contains(27)) then + Out.Log("Object is transient.") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeaderArea/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeaderArea/script.xlb new file mode 100644 index 000000000000..c71e58e7d86f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePageHeaderArea/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="sc_ScAccessiblePageHeaderArea" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessiblePageHeaderArea"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewCell/sc_ScAccessiblePreviewCell.xba b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewCell/sc_ScAccessiblePreviewCell.xba new file mode 100644 index 000000000000..751e01e71482 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewCell/sc_ScAccessiblePreviewCell.xba @@ -0,0 +1,85 @@ +<?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="sc_ScAccessiblePreviewCell" 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: +' sc.ScAccessiblePreviewCell +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, xCell As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, oWin As Object + Dim noProps() + + oDoc = utils.createDocument("scalc",cObjectName) + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) + xCell.setFormula("ScAccessiblePreviewCell") + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TABLE_CELL) + multiSelection = true + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + Exit Sub + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewCell/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewCell/script.xlb new file mode 100644 index 000000000000..334b9b6d9de2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewCell/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="sc_ScAccessiblePreviewCell" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessiblePreviewCell"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewHeaderCell/sc_ScAccessiblePreviewHeaderCell.xba b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewHeaderCell/sc_ScAccessiblePreviewHeaderCell.xba new file mode 100644 index 000000000000..1c7c54a23160 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewHeaderCell/sc_ScAccessiblePreviewHeaderCell.xba @@ -0,0 +1,87 @@ +<?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="sc_ScAccessiblePreviewHeaderCell" 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: +' sc.ScAccessiblePreviewHeaderCell +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, xCell As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, oWin As Object + Dim noProps() + Dim oStyle As Object + + oDoc = utils.createDocument("scalc",cObjectName) + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) + xCell.setFormula("ScAccessiblePreviewHeaderCell") + oStyle = oDoc.getStyleFamilies().getByName("PageStyles").getByName("Default") + oStyle.setPropertyValue("PrintHeaders",true) + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TABLE_CELL,"A") + Out.Log("Implementation name: "+oObj.getImplementationName()) + multiSelection = true + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + Exit Sub + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewHeaderCell/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewHeaderCell/script.xlb new file mode 100644 index 000000000000..daf4facec606 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewHeaderCell/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="sc_ScAccessiblePreviewHeaderCell" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessiblePreviewHeaderCell"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewTable/sc_ScAccessiblePreviewTable.xba b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewTable/sc_ScAccessiblePreviewTable.xba new file mode 100644 index 000000000000..79c406d08113 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewTable/sc_ScAccessiblePreviewTable.xba @@ -0,0 +1,85 @@ +<?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="sc_ScAccessiblePreviewTable" 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: +' sc.ScAccessiblePreviewTable +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, xCell As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, oWin As Object + Dim noProps() + + oDoc = utils.createDocument("scalc",cObjectName) + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) + xCell.setFormula("ScAccessiblePreviewTable") + + xController = oDoc.getCurrentController() + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, noProps()) + wait(500) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TABLE) + multiSelection = true + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + Exit Sub + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewTable/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewTable/script.xlb new file mode 100644 index 000000000000..15fe7ccbcc7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessiblePreviewTable/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="sc_ScAccessiblePreviewTable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessiblePreviewTable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleSpreadsheet/sc_ScAccessibleSpreadsheet.xba b/qadevOOo/tests/basic/mod/sc/ScAccessibleSpreadsheet/sc_ScAccessibleSpreadsheet.xba new file mode 100644 index 000000000000..26a4030d0eed --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleSpreadsheet/sc_ScAccessibleSpreadsheet.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="sc_ScAccessibleSpreadsheet" 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 + + +Global xCell As Object +Global evId As Integer +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScAccessibleSpreadsheet +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.createDocument("scalc",cObjectName) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TABLE) + xCell = oDoc.getSheets().getByIndex(0).getCellByPosition(2,2) + xCell.setFormula("ScAccessibleSpreadsheet") + evId = 1 + multiSelection = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oDoc.dispose() +End Sub + +Sub fireEvent() + Dim outStr As String + outStr = " "+evId+" event(s) fired" + xCell.setFormula(outStr) + evId = evId + 1 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAccessibleSpreadsheet/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAccessibleSpreadsheet/script.xlb new file mode 100644 index 000000000000..2ba52eec6917 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAccessibleSpreadsheet/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="sc_ScAccessibleSpreadsheet" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAccessibleSpreadsheet"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAnnotationObj/sc_ScAnnotationObj.xba b/qadevOOo/tests/basic/mod/sc/ScAnnotationObj/sc_ScAnnotationObj.xba new file mode 100644 index 000000000000..4429028264f1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAnnotationObj/sc_ScAnnotationObj.xba @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScAnnotationObj" 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: +' sc.ScAnnotationObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet, oCell As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(1,1) + oObj = oCell.Annotation + oObj.setString("sheet_XSheetAnnotation") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAnnotationObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAnnotationObj/script.xlb new file mode 100644 index 000000000000..74cb4fa7e3f9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAnnotationObj/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="sc_ScAnnotationObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAnnotationObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAnnotationsObj/sc_ScAnnotationsObj.xba b/qadevOOo/tests/basic/mod/sc/ScAnnotationsObj/sc_ScAnnotationsObj.xba new file mode 100644 index 000000000000..7543de57f267 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAnnotationsObj/sc_ScAnnotationsObj.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScAnnotationsObj" 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: +' sc.ScAnnotationsObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet as Object, oCell1 as Object, oCell2 as Object + Dim oAnno1 as Object, oAnno2 As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + Out.Log("Creating two annotations...") + + oCell1 = oSheet.getCellByPosition(3, 5) + oAnno1 = oCell1.Annotation + oAnno1.setString("ScAnnotationsObj Anno 1") + + oCell2 = oSheet.getCellByPosition(3, 6) + oAnno2 = oCell2.Annotation + oAnno2.setString("ScAnnotationsObj Anno 2") + + oObj = oSheet.Annotations + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAnnotationsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAnnotationsObj/script.xlb new file mode 100644 index 000000000000..3df96db95d8a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAnnotationsObj/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="sc_ScAnnotationsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAnnotationsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAreaLinkObj/sc_ScAreaLinkObj.xba b/qadevOOo/tests/basic/mod/sc/ScAreaLinkObj/sc_ScAreaLinkObj.xba new file mode 100644 index 000000000000..3bb8912f9770 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAreaLinkObj/sc_ScAreaLinkObj.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="sc_ScAreaLinkObj" 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: +' sc.ScAreaLinkObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oLinks As Variant + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + Dim aSourceArea as String + aSourceArea = utils.Path2URL(cTestDocsDir + "/" + "calcshapes.sxc") + oLinks = oDoc.AreaLinks + oLinks.InsertAtPosition(com.sun.star.table.CellAddress(1, 2, 3), aSourceArea, "a1:b2", "", "") + + oObj = oLinks.getByIndex(0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAreaLinkObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAreaLinkObj/script.xlb new file mode 100644 index 000000000000..26457c41950c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAreaLinkObj/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="sc_ScAreaLinkObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAreaLinkObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAreaLinksObj/sc_ScAreaLinksObj.xba b/qadevOOo/tests/basic/mod/sc/ScAreaLinksObj/sc_ScAreaLinksObj.xba new file mode 100644 index 000000000000..8265b08838bd --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAreaLinksObj/sc_ScAreaLinksObj.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="sc_ScAreaLinksObj" 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: +' sc.ScAreaLinksObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oLinks As Variant + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + Dim aSourceArea as String + aSourceArea = utils.Path2URL(cTestDocsDir + "/" + "calcshapes.sxc") + oLinks = oDoc.AreaLinks + oLinks.InsertAtPosition(com.sun.star.table.CellAddress(1, 2, 3), aSourceArea, "a1:b2", "", "") + + oObj = oLinks + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAreaLinksObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAreaLinksObj/script.xlb new file mode 100644 index 000000000000..99ec3f15080e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAreaLinksObj/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="sc_ScAreaLinksObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAreaLinksObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAutoFormatFieldObj/sc_ScAutoFormatFieldObj.xba b/qadevOOo/tests/basic/mod/sc/ScAutoFormatFieldObj/sc_ScAutoFormatFieldObj.xba new file mode 100644 index 000000000000..c22a84578d36 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAutoFormatFieldObj/sc_ScAutoFormatFieldObj.xba @@ -0,0 +1,64 @@ +<?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="sc_ScAutoFormatFieldObj" 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: +' sc.ScAutoFormatFieldObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oFormats, oFormat, oField As Variant + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oFormats = createUnoService("com.sun.star.sheet.TableAutoFormats") + oFormat = oFormats.getByIndex(0) + oField = oFormat.getByIndex(0) + + oObj = oField + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAutoFormatFieldObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAutoFormatFieldObj/script.xlb new file mode 100644 index 000000000000..a0824100b00d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAutoFormatFieldObj/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="sc_ScAutoFormatFieldObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAutoFormatFieldObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAutoFormatObj/sc_ScAutoFormatObj.xba b/qadevOOo/tests/basic/mod/sc/ScAutoFormatObj/sc_ScAutoFormatObj.xba new file mode 100644 index 000000000000..fa2f2ee42465 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAutoFormatObj/sc_ScAutoFormatObj.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="sc_ScAutoFormatObj" 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 + + +Global oFormats As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScAutoFormatObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oNewFormat As Object + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + oFormats = createUnoService("com.sun.star.sheet.TableAutoFormats") + + oNewFormat = oDoc.createInstance("com.sun.star.sheet.TableAutoFormat") + + if oFormats.hasByName(cObjectName) then + oFormats.removeByName(cObjectName) + end if + + oFormats.insertByName(cObjectName, oNewFormat) + + oObj = oNewFormat + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() +On Error Goto ErrHndl + oFormats.removeByName(cObjectName) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAutoFormatObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAutoFormatObj/script.xlb new file mode 100644 index 000000000000..0439c64222ed --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAutoFormatObj/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="sc_ScAutoFormatObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAutoFormatObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScAutoFormatsObj/sc_ScAutoFormatsObj.xba b/qadevOOo/tests/basic/mod/sc/ScAutoFormatsObj/sc_ScAutoFormatsObj.xba new file mode 100644 index 000000000000..aa2796fae9ae --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAutoFormatsObj/sc_ScAutoFormatsObj.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScAutoFormatsObj" 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 nGlobalLong As Long +Global oInstance As Object +Global oReplaceInstance as Object +Global cNameToReplace as String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScAutoFormatsObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oObj = createUNOService("com.sun.star.sheet.TableAutoFormats") + oInstance = oDoc.createInstance("com.sun.star.sheet.TableAutoFormat") + oReplaceInstance = oDoc.createInstance("com.sun.star.sheet.TableAutoFormat") + cNameToReplace = "XNameReplace Test" + If oObj.hasByName(cNameToReplace) Then oObj.removeByName(cNameToReplace) + oObj.insertByName(cNameToReplace, oDoc.createInstance("com.sun.star.sheet.TableAutoFormat")) + + If oObj.hasByName(cObjectName & "1") Then oObj.removeByName(cObjectName & "1") + oObj.insertByName(cObjectName & "1", oDoc.createInstance("com.sun.star.sheet.TableAutoFormat")) + If oObj.hasByName(cObjectName & "2") Then oObj.removeByName(cObjectName & "2") + oObj.insertByName(cObjectName & "2", oDoc.createInstance("com.sun.star.sheet.TableAutoFormat")) + nGlobalLong = oObj.count + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScAutoFormatsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScAutoFormatsObj/script.xlb new file mode 100644 index 000000000000..f402ede287dc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScAutoFormatsObj/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="sc_ScAutoFormatsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScAutoFormatsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellCursorObj/sc_ScCellCursorObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellCursorObj/sc_ScCellCursorObj.xba new file mode 100644 index 000000000000..6caf2e62956f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellCursorObj/sc_ScCellCursorObj.xba @@ -0,0 +1,145 @@ +<?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="sc_ScCellCursorObj" 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 nCellCursorCol As Long +Global nCellCursorRow As Long + +' Required for com.sun.star.chart.XChartData +Global oCellToChange As Object + +'com.sun.star.sheet.XCellSeries +Global aCellSeries(2) as Integer + +' com.sun.star.sheet.XCellRangeData +Global newData As Variant + +Global oSheet as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScCellCursorObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheetCursor as Object, oRange As Object + Dim n as Integer, m As Integer + + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets(0) + oCellToChange = oSheet.getCellByPosition(2, 3) + oRange = oSheet.getCellRangeByName("$A$1:$D$4") + oSheetCursor = oSheet.createCursorByRange(oRange) + + For m = 1 to 2 + For n = 10 to 15 + oSheet.getCellByPosition(m,n).setValue(n) + Next n + Next m + + 'XSheetCellCursor::colapseToCurrentRegion() : + nCellCursorRow = 12 + nCellCursorCol 2 + + aCellSeries(0) = 3 + aCellSeries(1) = 3 + + 'Required for XCellRangeData + newData = Array(_ + Array(2.5, 5.0, 2.5, 5.0),_ + Array(4.0, 9.0, 2.5, 5.0),_ + Array(2.5, 5.0, 2.5, 5.0),_ + Array(4.0, 9.0, 2.5, 5.0))_ + + oObj = oSheetCursor + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function modifyDescriptor(descr As Variant) As Variant +On Error Goto ErrHndl + Dim i As Integer, n as Integer + Dim oCell As Object + Dim vFields(0) as new com.sun.star.table.TableSortField + + for i = 0 to aCellSeries(0) - 1 + oCell = oSheet.getCellByPosition(0, i) + oCell.String = "" + (aCellSeries(0) - i) + oCell.setFormula(aCellSeries(0) - i) + next i + 'ShowNameValuePair(descr) + vFields(0).IsCaseSensitive = false + vFields(0).IsAscending = true + vFields(0).FieldType = com.sun.star.table.TableSortFieldType.ALPHANUMERIC + for i = 0 to ubound(descr) + if descr(i).Name = "IsSortColumns" then descr(i).Value = false + if descr(i).Name = "SortFields" then descr(i).Value = vFields() + next i + + modifyDescriptor() = descr +Exit Function +ErrHndl: + Out.Log("Exception in ScCellCursorObj.modifyDescriptor() :") + Test.Exception() +end Function + +Function checkSort() As Boolean +On Error Goto ErrHndl + Dim i As Integer, oCell As Object + Dim bOK As Boolean + + bOK = true + for i = 0 to aCellSeries(0) - 1 + oCell = oSheet.getCellByPosition(0,i) + bOK = bOK AND oCell.String = "" + (i + 1) + out.dbg(oCell.String + ":" + (i+1)) + next i + + checkSort() = bOK +Exit Function +ErrHndl: + Out.Log("Exception in ScCellCursorObj.checkSort() :") + Test.Exception() +end Function + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellCursorObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellCursorObj/script.xlb new file mode 100644 index 000000000000..b25b0c373308 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellCursorObj/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="sc_ScCellCursorObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellCursorObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFieldObj/sc_ScCellFieldObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellFieldObj/sc_ScCellFieldObj.xba new file mode 100644 index 000000000000..a47cbd050e70 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFieldObj/sc_ScCellFieldObj.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="sc_ScCellFieldObj" 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 oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScCellFieldObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet, oCell As Object + Dim oTextField, oTextField1 As Object + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + + oTextField = oDoc.createInstance("com.sun.star.text.TextField.URL") + + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(5, 5) + oCell.insertTextContent(oCell.createTextCursor, oTextField, true) + + oObj = oTextField + + 'again for XComponent + oTextField1 = oDoc.createInstance("com.sun.star.text.TextField.URL") + + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(4, 5) + oCell.insertTextContent(oCell.createTextCursor, oTextField1, true) + + oComponentInstance = oTextField1 + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextField.URL") + oXTextContentRange = oCell.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFieldObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellFieldObj/script.xlb new file mode 100644 index 000000000000..90360104790f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFieldObj/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="sc_ScCellFieldObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellFieldObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFieldsObj/sc_ScCellFieldsObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellFieldsObj/sc_ScCellFieldsObj.xba new file mode 100644 index 000000000000..eeaecf843968 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFieldsObj/sc_ScCellFieldsObj.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="sc_ScCellFieldsObj" 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 oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScCellFieldsObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet, oCell As Object + Dim oTextField, oTextField1 As Object + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + + oTextField = oDoc.createInstance("com.sun.star.text.TextField.URL") + + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(5, 5) + oCell.insertTextContent(oCell.createTextCursor, oTextField, true) + + oObj = oCell.getTextFields() + + 'again for XComponent + oTextField1 = oDoc.createInstance("com.sun.star.text.TextField.URL") + + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(4, 5) + oCell.insertTextContent(oCell.createTextCursor, oTextField1, true) + + oComponentInstance = oTextField1 + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextField.URL") + oXTextContentRange = oCell.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFieldsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellFieldsObj/script.xlb new file mode 100644 index 000000000000..8c436760aaed --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFieldsObj/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="sc_ScCellFieldsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellFieldsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFormatsEnumeration/sc_ScCellFormatsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScCellFormatsEnumeration/sc_ScCellFormatsEnumeration.xba new file mode 100644 index 000000000000..21f3e9389dd6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFormatsEnumeration/sc_ScCellFormatsEnumeration.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScCellFormatsEnumeration" 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: +' sc.ScCellFormatsEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet As Object + Dim oFormats As Variant + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oFormats = oSheet.getCellFormatRanges() + oObj = oFormats.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFormatsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellFormatsEnumeration/script.xlb new file mode 100644 index 000000000000..2db2e0039363 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFormatsEnumeration/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="sc_ScCellFormatsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellFormatsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFormatsObj/sc_ScCellFormatsObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellFormatsObj/sc_ScCellFormatsObj.xba new file mode 100644 index 000000000000..35847703fcd7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFormatsObj/sc_ScCellFormatsObj.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScCellFormatsObj" 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: +' sc.ScCellFormatsObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oObj = oSheet.CellFormatRanges + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellFormatsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellFormatsObj/script.xlb new file mode 100644 index 000000000000..41ea5b01e9fe --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellFormatsObj/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="sc_ScCellFormatsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellFormatsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellObj/sc_ScCellObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellObj/sc_ScCellObj.xba new file mode 100644 index 000000000000..157132bb0446 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellObj/sc_ScCellObj.xba @@ -0,0 +1,68 @@ +<?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="sc_ScCellObj" 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: + +' Requiered for com.sun.star.text.XText + Global oCollection As Object + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScCellObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet, oCell As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(0, 0) + oInstance = oDoc.createInstance("com.sun.star.text.TextField.URL") + oCollection = oCell.TextFields + + oObj = oCell +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellObj/script.xlb new file mode 100644 index 000000000000..e56fdf283756 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellObj/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="sc_ScCellObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellRangeObj/sc_ScCellRangeObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellRangeObj/sc_ScCellRangeObj.xba new file mode 100644 index 000000000000..8fc714766202 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellRangeObj/sc_ScCellRangeObj.xba @@ -0,0 +1,135 @@ +<?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="sc_ScCellRangeObj" 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.sheet.XCellSeries +Global aCellSeries(2) as Integer + + +'Required for com.sun.star.chart.XChartData +Global oCellToChange As Object + +' com.sun.star.sheet.XCellRangeData +Global newData As Variant + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScCellRangeObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet, oRange As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oCellToChange = oSheet.getCellByPosition(0, 0) + oRange = oSheet.getCellRangeByPosition(0, 0, 10, 10) + oObj = oRange + + aCellSeries(0) = 10 + aCellSeries(1) = 10 + + 'Required for XCellRangeData + newData = Array(_ + Array(2.5, 5.0, 2.5, 5.0, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0),_ + Array(4.0, 9.0, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 2.5, 5.0),_ + Array(2.5, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 5.0, 2.5, 5.0),_ + Array(4.0, 9.0, 2.5, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 5.0),_ + Array(2.5, 5.0, 2.5, 5.0, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0),_ + Array(4.0, 9.0, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 2.5, 5.0),_ + Array(2.5, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 5.0, 2.5, 5.0),_ + Array(4.0, 9.0, 2.5, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 5.0),_ + Array(2.5, 5.0, 2.5, 5.0, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0),_ + Array(4.0, 9.0, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 2.5, 5.0),_ + Array(2.5, 3.5, 8.7, 9.9, 0.3, 1.2, 3, 0, 5.0, 2.5, 5.0)) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function modifyDescriptor(descr As Variant) As Variant +On Error Goto ErrHndl + Dim i As Integer, n as Integer + Dim oCell As Object + Dim vFields(0) as new com.sun.star.table.TableSortField + + for i = 0 to aCellSeries(0) - 1 + oCell = oObj.getCellByPosition(0, i) + oCell.String = "" + (aCellSeries(0) - i) + oCell.setFormula(aCellSeries(0) - i) + next i + 'ShowNameValuePair(descr) + vFields(0).IsCaseSensitive = false + vFields(0).IsAscending = true + vFields(0).FieldType = com.sun.star.table.TableSortFieldType.ALPHANUMERIC + for i = 0 to ubound(descr) + if descr(i).Name = "IsSortColumns" then descr(i).Value = false + if descr(i).Name = "SortFields" then descr(i).Value = vFields() + next i + + modifyDescriptor() = descr +Exit Function +ErrHndl: + Out.Log("Exception in ScCellRangeObj.modifyDescriptor() :") + Test.Exception() +end Function + +Function checkSort() As Boolean +On Error Goto ErrHndl + Dim i As Integer, oCell As Object + Dim bOK As Boolean + + bOK = true + for i = 0 to aCellSeries(0) - 1 + oCell = oObj.getCellByPosition(0,i) + bOK = bOK AND oCell.String = "" + (i + 1) + out.dbg(oCell.String + ":" + (i+1)) + next i + + checkSort() = bOK +Exit Function +ErrHndl: + Out.Log("Exception in ScCellRangeObj.checkSort() :") + Test.Exception() +end Function + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellRangeObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellRangeObj/script.xlb new file mode 100644 index 000000000000..0a2322e4654a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellRangeObj/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="sc_ScCellRangeObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellRangeObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellRangesObj/sc_ScCellRangesObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellRangesObj/sc_ScCellRangesObj.xba new file mode 100644 index 000000000000..e86c2249b894 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellRangesObj/sc_ScCellRangesObj.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="sc_ScCellRangesObj" 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 oInstance As Object + +' Requiered for com.sun.star.container.XNameReplace +Global cNameToReplace As String 'name of instance to be replased +Global oReplaceInstance As Object 'instance, that will be inserted + 'instead old one + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScCellRangesObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc.createInstance("com.sun.star.sheet.SheetCellRanges") + oSheet = oDoc.Sheets(1) + + oInstance=oSheet.getCellRangeByName("A1:C5") + oObj.insertByName("CellRange1", oInstance) + oInstance=oSheet.getCellRangeByName("A7:D9") + oObj.insertByName("CellRange2", oInstance) + oInstance=oSheet.getCellRangeByName("E1:E42") + oObj.insertByName("CellRange3", oInstance) + oInstance=oSheet.getCellRangeByName("A10:B10") + oObj.insertByName("CellRange4", oInstance) + + oReplaceInstance = oSheet.getCellRangeByName("A6:H16") + cNameToReplace = "CellRange4" +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellRangesObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellRangesObj/script.xlb new file mode 100644 index 000000000000..5b6e3544a0fe --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellRangesObj/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="sc_ScCellRangesObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellRangesObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellSearchObj/sc_ScCellSearchObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellSearchObj/sc_ScCellSearchObj.xba new file mode 100644 index 000000000000..b15b06885abe --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellSearchObj/sc_ScCellSearchObj.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="sc_ScCellSearchObj" 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: +' sc.ScCellSearchObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oObj = oSheet.createSearchDescriptor() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellSearchObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellSearchObj/script.xlb new file mode 100644 index 000000000000..2fd3cefc1727 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellSearchObj/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="sc_ScCellSearchObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellSearchObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellTextCursor/sc_ScCellTextCursor.xba b/qadevOOo/tests/basic/mod/sc/ScCellTextCursor/sc_ScCellTextCursor.xba new file mode 100644 index 000000000000..03033ab1f90e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellTextCursor/sc_ScCellTextCursor.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScCellTextCursor" 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: + +' Requiered for com.sun.star.text.XParagraphCursor + Global oText As Object +' Requiered for com.sun.star.text.XTextCursor + Global oCursor As Object 'One more cursor + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScCellTextCursor +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + Dim oCell As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(1, 3) + + oCell.setString(cObjectName) + + oText = oCell + oObj = oCell.createTextCursor() + oCursor = oCell.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellTextCursor/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellTextCursor/script.xlb new file mode 100644 index 000000000000..e73ec8bfc586 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellTextCursor/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="sc_ScCellTextCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellTextCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellsEnumeration/sc_ScCellsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScCellsEnumeration/sc_ScCellsEnumeration.xba new file mode 100644 index 000000000000..77e59c564ec7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellsEnumeration/sc_ScCellsEnumeration.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScCellsEnumeration" 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: +' sc.ScCellsEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet, oCell1, oCell2, oCell3, oEnum, oVS As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + + oCell1 = oSheet.getCellByPosition(1, 1) + oCell1.Text.setString(cObjectName + "1") + oCell2 = oSheet.getCellByPosition(4, 2) + oCell2.Text.setString(cObjectName + "2") + oCell3 = oSheet.getCellByPosition(3, 6) + oCell3.setFormula("= 15 + 3 * 4") + + oVS = oSheet.queryVisibleCells + oEnum = oVS.Cells.createEnumeration + + oObj = oEnum + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellsEnumeration/script.xlb new file mode 100644 index 000000000000..377e64d5db85 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellsEnumeration/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="sc_ScCellsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellsObj/sc_ScCellsObj.xba b/qadevOOo/tests/basic/mod/sc/ScCellsObj/sc_ScCellsObj.xba new file mode 100644 index 000000000000..b7a596a13688 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellsObj/sc_ScCellsObj.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="sc_ScCellsObj" 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: +' sc.ScCellsObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oCell1, oCell2, oCell3, oSheet As Object + Dim oCellsRange, oCells As Variant + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + + ' Filling some cells with the text + oCell1 = oSheet.getCellByPosition(0, 0) + oCell1.setString("ScCellsObj, Cell 1") + oCell2 = oSheet.getCellByPosition(4, 2) + oCell2.setString("ScCellsObj, Cell 2") + oCell3 = oSheet.getCellByPosition(3, 3) + oCell3.setValue(-10) + + oCellsRange = oSheet.queryVisibleCells + oCells = oCellsRange.getCells + + oObj = oCells + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScCellsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScCellsObj/script.xlb new file mode 100644 index 000000000000..6a67f5248999 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScCellsObj/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="sc_ScCellsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScCellsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScChartObj/sc_ScChartObj.xba b/qadevOOo/tests/basic/mod/sc/ScChartObj/sc_ScChartObj.xba new file mode 100644 index 000000000000..ee68c904dd10 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScChartObj/sc_ScChartObj.xba @@ -0,0 +1,98 @@ +<?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="sc_ScChartObj" 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.container.XNamed +Global cNameToSet As String ' "fixed" if name is fixed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScChartObj +'************************************************************************* +On Error Goto ErrHndl + Dim oCharts As Variant + Dim oSheet As Object + Dim i,j As Integer + Dim tRect As New com.sun.star.awt.Rectangle + Dim tAddr As New com.sun.star.table.CellRangeAddress + Dim oRanges(0) As New com.sun.star.table.CellRangeAddress + + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + + ' Filling some cells with the text + for i = 1 to 6 + oSheet.getCellByPosition(0, i).setString("Row" & i) + oSheet.getCellByPosition(i, 0).setString("Col" & i) + next i + + for i = 1 to 6 + for j = 1 to 6 + oSheet.getCellByPosition(i, j).Value = (i + 1) * j + next j + next i + + tRect.X = 500 + tRect.Y = 500 + tRect.Width = 25000 + tRect.Height = 15000 + + tAddr.Sheet = 0 + tAddr.StartRow = 0 + tAddr.StartColumn = 0 + tAddr.EndRow = 6 + tAddr.EndColumn = 6 + + oCharts = oSheet.getCharts() + oRanges(0) = tAddr + oCharts.addNewByName("ScChartObj", tRect, oRanges(), true, true) + + oObj = oCharts.getByName("ScChartObj") + + cNameToSet = "fixed" +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScChartObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScChartObj/script.xlb new file mode 100644 index 000000000000..7662522d724b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScChartObj/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="sc_ScChartObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScChartObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScChartsObj/sc_ScChartsObj.xba b/qadevOOo/tests/basic/mod/sc/ScChartsObj/sc_ScChartsObj.xba new file mode 100644 index 000000000000..e942335c7744 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScChartsObj/sc_ScChartsObj.xba @@ -0,0 +1,95 @@ +<?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="sc_ScChartsObj" 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 cChartDataAddress As New com.sun.star.table.CellRangeAddress + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScChartsObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet As Object + Dim i,j As Integer + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + + ' Filling some cells with the text + for i = 1 to 6 + oSheet.getCellByPosition(0, i).setString("Row" & i) + oSheet.getCellByPosition(i, 0).setString("Col" & i) + next i + + for i = 1 to 6 + for j = 1 to 6 + oSheet.getCellByPosition(i, j).Value = (i + 1) * j + next j + next i + + Dim tAddr As New com.sun.star.table.CellRangeAddress + tAddr.Sheet = 0 + tAddr.StartRow = 0 + tAddr.StartColumn = 0 + tAddr.EndRow = 6 + tAddr.EndColumn = 6 + + Dim tRect As New com.sun.star.awt.Rectangle + tRect.X = 200 + tRect.Y = 200 + tRect.Width = 10000 + tRect.Height = 5000 + + cChartDataAddress = tAddr + oObj = oSheet.getCharts() + + Dim oRanges(0) As New com.sun.star.table.CellRangeAddress + oRanges(0) = tAddr + oObj.addNewByName(cObjectName, tRect, oRanges(), true, true) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScChartsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScChartsObj/script.xlb new file mode 100644 index 000000000000..8294000d7652 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScChartsObj/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="sc_ScChartsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScChartsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScConsolidationDescriptor/sc_ScConsolidationDescriptor.xba b/qadevOOo/tests/basic/mod/sc/ScConsolidationDescriptor/sc_ScConsolidationDescriptor.xba new file mode 100644 index 000000000000..1c32c98b3366 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScConsolidationDescriptor/sc_ScConsolidationDescriptor.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScConsolidationDescriptor" 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: +' sc.ScConsolidationDescriptor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oDsc As Object + Dim bCreateDefaultDsc As Boolean + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + bCreateDefaultDsc = true + oDsc = oDoc.createConsolidationDescriptor(bCreateDefaultDsc) + oObj = oDsc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScConsolidationDescriptor/script.xlb b/qadevOOo/tests/basic/mod/sc/ScConsolidationDescriptor/script.xlb new file mode 100644 index 000000000000..d2140cde3661 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScConsolidationDescriptor/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="sc_ScConsolidationDescriptor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScConsolidationDescriptor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDDELinkObj/sc_ScDDELinkObj.xba b/qadevOOo/tests/basic/mod/sc/ScDDELinkObj/sc_ScDDELinkObj.xba new file mode 100644 index 000000000000..b1f6a5752ef0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDDELinkObj/sc_ScDDELinkObj.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScDDELinkObj" 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: + +' Requiered for com.sun.star.container.XNamed +Global cNameToSet As String ' "fixed" if name is fixed +Global DDEItem As String +Global DDETopic As String +Global DDEApplication As String + +Global oTestDoc As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDDELinkObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + Dim oF As String + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + + oTestDoc = utils.loadTestDocument("ScDDELinksObj.sdc") + + DDEItem = "Sheet1.A1" + + ' This construction of 2-way convertion of testdocs location + ' should take place here, because there is unnecessary slash at the end of + ' cTestDocsDir. + DDETopic = utils.URL2Path(utils.Path2URL(cTestDocsDir & "ScDDELinksObj.sdc")) + + DDEApplication = "soffice" + + oF = "=DDE(""" + DDEApplication + """;""" + DDETopic + """;""" + DDEItem + """)" + + oSheet.getCellByPosition(1, 2).Formula = oF + oSheet.getCellByPosition(3, 4).Formula = oF + oSheet.getCellByPosition(5, 6).Formula = oF + + oObj = oDoc.getPropertyValue("DDELinks").getByIndex(0) + cNameToSet = "fixed" +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oTestDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDDELinkObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDDELinkObj/script.xlb new file mode 100644 index 000000000000..356f4be1ef64 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDDELinkObj/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="sc_ScDDELinkObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDDELinkObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDDELinksObj/sc_ScDDELinksObj.xba b/qadevOOo/tests/basic/mod/sc/ScDDELinksObj/sc_ScDDELinksObj.xba new file mode 100644 index 000000000000..aaab46523587 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDDELinksObj/sc_ScDDELinksObj.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="sc_ScDDELinksObj" 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 oTestDoc As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDDELinksObj +'************************************************************************* +On Error Goto ErrHndl + Dim testDoc, oF As String + Dim oSheet As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + + oTestDoc = utils.loadTestDocument("ScDDELinksObj.sdc") + + ' This construction of 2-way convertion of testdocs location + ' should take place here, because there is unnecessary slash at the end of + ' cTestDocsDir. + testDoc = utils.URL2Path(utils.Path2URL(cTestDocsDir & "ScDDELinksObj.sdc")) + + oF = "=DDE(""soffice"";""" & testDoc & """;""Sheet1.A1"")" + + oSheet.getCellByPosition(1, 2).Formula = oF + oSheet.getCellByPosition(3, 4).Formula = oF + oSheet.getCellByPosition(5, 6).Formula = oF + + oObj = oDoc.getPropertyValue("DDELinks") +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oTestDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDDELinksObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDDELinksObj/script.xlb new file mode 100644 index 000000000000..84df6ef711d2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDDELinksObj/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="sc_ScDDELinksObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDDELinksObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldObj/sc_ScDataPilotFieldObj.xba b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldObj/sc_ScDataPilotFieldObj.xba new file mode 100644 index 000000000000..efe3c591b144 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldObj/sc_ScDataPilotFieldObj.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="sc_ScDataPilotFieldObj" 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: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDataPilotFieldObj +'************************************************************************* +On Error Goto ErrHndl + Dim oFields As Variant + Dim oSheet As Object + Dim i,j As Integer + Dim oDataPilotTable, oDataPilotDescriptor As Object + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + Dim sCellAddress As New com.sun.star.table.CellAddress + + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + Out.Log("Filling a table...") + + for i = 1 to 5 + oSheet.getCellByPosition(0, i).String = "Row" & i + oSheet.getCellByPosition(i, 0).String = "Col" & i + next i + + for i = 1 to 5 + for j = 1 to 5 + oSheet.getCellByPosition(i, j).Value = 2.5 * j + i + next j + next i + + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 0 + sCellRangeAddress.StartRow = 0 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + sCellAddress.Sheet = 0 + sCellAddress.Column = 7 + sCellAddress.Row = 8 + + oDataPilotTable = oSheet.getDataPilotTables + oDataPilotDescriptor = oDataPilotTable.createDataPilotDescriptor() + oDataPilotDescriptor.setSourceRange(sCellRangeAddress) + oDataPilotTable.insertNewByName(cObjectName, sCellAddress, oDataPilotDescriptor) + + oFields = oDataPilotDescriptor.getDataPilotFields() + oObj = oFields.getByIndex(0) + + cNameToSet = cObjectName + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldObj/script.xlb new file mode 100644 index 000000000000..81603a818fd6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldObj/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="sc_ScDataPilotFieldObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDataPilotFieldObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldsObj/sc_ScDataPilotFieldsObj.xba b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldsObj/sc_ScDataPilotFieldsObj.xba new file mode 100644 index 000000000000..dff17eb90697 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldsObj/sc_ScDataPilotFieldsObj.xba @@ -0,0 +1,94 @@ +<?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="sc_ScDataPilotFieldsObj" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDataPilotFieldsObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim i as Integer,j As Integer + Dim oSheet as Object, oDataPilotDescriptor As Object + Dim oFields as Variant , oDataPilotTable As Variant + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + Dim sCellAddress As New com.sun.star.table.CellAddress + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + + for i = 1 to 5 + for j = 1 to 5 + oSheet.getCellByPosition(i, j).Value = 2.5 * j + i + next j + next i + + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 1 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + sCellAddress.Sheet = 0 + sCellAddress.Column = 7 + sCellAddress.Row = 8 + + oDataPilotTable = oSheet.getDataPilotTables + oDataPilotDescriptor = oDataPilotTable.createDataPilotDescriptor() + oDataPilotDescriptor.setSourceRange(sCellRangeAddress) + + oDataPilotTable.insertNewByName(cObjectName, sCellAddress, oDataPilotDescriptor) + + oFields = oDataPilotDescriptor.getDataPilotFields + oObj = oFields + nGlobalLong = oObj.Count + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldsObj/script.xlb new file mode 100644 index 000000000000..18831eae158a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotFieldsObj/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="sc_ScDataPilotFieldsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDataPilotFieldsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotTableObj/sc_ScDataPilotTableObj.xba b/qadevOOo/tests/basic/mod/sc/ScDataPilotTableObj/sc_ScDataPilotTableObj.xba new file mode 100644 index 000000000000..36e976850469 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotTableObj/sc_ScDataPilotTableObj.xba @@ -0,0 +1,122 @@ +<?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="sc_ScDataPilotTableObj" 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: + +' Requiered for com.sun.star.container.XNamed +Global cNameToSet As String ' "fixed" if name is fixed + +' Required for com.sun.star.sheet.XDataPilotTable +Global oOutputRange As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDataPilotTableObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + Dim i, j As Integer + Dim oDataPilotTables As Object + Dim oDataPilotDescriptor As Object + Dim oFilterDescriptor As Object + Dim oDataPilotField As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + + for i = 1 to 5 + oSheet.getCellByPosition(0, i).String = "Row" & i + oSheet.getCellByPosition(i, 0).String = "Col" & i + next i + + for i = 1 to 5 + for j = 1 to 5 + oSheet.getCellByPosition(i, j).Value = 2.5 * j + i + next j + next i + + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 0 + sCellRangeAddress.EndColumn = 1 + sCellRangeAddress.EndRow = 5 + + Dim sCellAddress As New com.sun.star.table.CellAddress + sCellAddress.Sheet = 0 + sCellAddress.Column = 7 + sCellAddress.Row = 8 + + Dim FilterFields(1) As New com.sun.star.sheet.TableFilterField + FilterFields(0).Connection = com.sun.star.sheet.FilterConnection.AND + FilterFields(0).Field = 1 + FilterFields(0).isNumeric = true + FilterFields(0).StringValue = "4" + FilterFields(0).Operator = com.sun.star.sheet.FilterOperator.GREATER + + FilterFields(1).Connection = com.sun.star.sheet.FilterConnection.AND + FilterFields(1).Field = 1 + FilterFields(1).isNumeric = true + FilterFields(1).StringValue = "12" + FilterFields(1).Operator = com.sun.star.sheet.FilterOperator.LESS_EQUAL + + oDataPilotTables = oSheet.getDataPilotTables + oDataPilotDescriptor = oDataPilotTables.createDataPilotDescriptor() + oDataPilotDescriptor.setSourceRange(sCellRangeAddress) + oFilterDescriptor = oDataPilotDescriptor.getFilterDescriptor() + oFilterDescriptor.setFilterFields(FilterFields()) + + oDataPilotField = oDataPilotDescriptor.getDataPilotFields().getByIndex(0) + oDataPilotField.Function = com.sun.star.sheet.GeneralFunction.SUM + oDataPilotField.Orientation = com.sun.star.sheet.DataPilotFieldOrientation.DATA + + oDataPilotTables.insertNewByName(cObjectName, sCellAddress, oDataPilotDescriptor) + + oObj = oDataPilotTables(0) + oOutputRange = sCellAddress + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotTableObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDataPilotTableObj/script.xlb new file mode 100644 index 000000000000..570b186ccb2e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotTableObj/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="sc_ScDataPilotTableObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDataPilotTableObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotTablesObj/sc_ScDataPilotTablesObj.xba b/qadevOOo/tests/basic/mod/sc/ScDataPilotTablesObj/sc_ScDataPilotTablesObj.xba new file mode 100644 index 000000000000..90e09058c76e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotTablesObj/sc_ScDataPilotTablesObj.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScDataPilotTablesObj" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDataPilotTablesObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim i as Integer,j As Integer + Dim oSheet as Object, oDataPilotDescriptor As Object + Dim oDataPilotTables As Variant + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + + for i = 1 to 5 + for j = 1 to 5 + oSheet.getCellByPosition(i, j).Value = 2.5 * j + i + next j + next i + + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 1 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + Dim sCellAddress As New com.sun.star.table.CellAddress + sCellAddress.Sheet = 0 + sCellAddress.Column = 7 + sCellAddress.Row = 8 + + oDataPilotTables = oSheet.getDataPilotTables + oDataPilotDescriptor = oDataPilotTables.createDataPilotDescriptor() + oDataPilotDescriptor.setSourceRange(sCellRangeAddress) + + oDataPilotTables.insertNewByName(cObjectName, sCellAddress, oDataPilotDescriptor) + + oObj = oDataPilotTables + nGlobalLong = oObj.Count + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDataPilotTablesObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDataPilotTablesObj/script.xlb new file mode 100644 index 000000000000..ebdc208f0e93 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDataPilotTablesObj/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="sc_ScDataPilotTablesObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDataPilotTablesObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDatabaseRangeObj/sc_ScDatabaseRangeObj.xba b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangeObj/sc_ScDatabaseRangeObj.xba new file mode 100644 index 000000000000..15fc4fcb3199 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangeObj/sc_ScDatabaseRangeObj.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="sc_ScDatabaseRangeObj" 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: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + +' Requiered for com.sun.star.sheet.XCellRangeReferrer + Global oReferredCells As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDatabaseRangeObj +'************************************************************************* +On Error Goto ErrHndl + Dim oRanges As Variant + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + + oDoc = utils.createDocument("scalc", cObjectName) + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 1 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + oRanges = oDoc.getPropertyValue("DatabaseRanges") + oRanges.addNewByName(cObjectName, sCellRangeAddress) + oReferredCells = sCellRangeAddress + + oObj = oRanges.getByIndex(0) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDatabaseRangeObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangeObj/script.xlb new file mode 100644 index 000000000000..30fa99cc37ce --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangeObj/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="sc_ScDatabaseRangeObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDatabaseRangeObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDatabaseRangesObj/sc_ScDatabaseRangesObj.xba b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangesObj/sc_ScDatabaseRangesObj.xba new file mode 100644 index 000000000000..2efa2d7ce4cd --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangesObj/sc_ScDatabaseRangesObj.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="sc_ScDatabaseRangesObj" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDatabaseRangesObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oRanges As Variant + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 1 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + oRanges = oDoc.getPropertyValue("DatabaseRanges") + oRanges.addNewByName(cObjectName, sCellRangeAddress) + + oObj = oRanges + nGlobalLong = oObj.Count + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDatabaseRangesObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangesObj/script.xlb new file mode 100644 index 000000000000..1b52e885e3a3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDatabaseRangesObj/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="sc_ScDatabaseRangesObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDatabaseRangesObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDrawPageObj/sc_ScDrawPageObj.xba b/qadevOOo/tests/basic/mod/sc/ScDrawPageObj/sc_ScDrawPageObj.xba new file mode 100644 index 000000000000..68f6506a77a0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDrawPageObj/sc_ScDrawPageObj.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="sc_ScDrawPageObj" 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 oXShapeInstance As Object + +Global oGrouperCollection As Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScDrawPageObj +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDP as Object + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + oGrouperCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + + oDP = oDoc.getDrawPages() + + oDP.insertNewByIndex(0) + oDP.insertNewByIndex(1) + + oObj = oDP.getByIndex(0) + addShape(oObj,1) + addShape(oObj,2) + addShape(oObj,3) + addShape(oObj,4) + + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oGrouperCollection.Add(oObj.getByIndex(2)) + oGrouperCollection.Add(oObj.getByIndex(3)) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function addShape(oPage as Object, no as Integer) As Object +On Error Goto ErrHndl + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oShape As Object + Dim servNames As Variant + + aPoint.x = 1000 * no + aPoint.y = 1000 * no + aSize.Width = 2000 + aSize.Height = 1000 + oShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oShape.Size = aSize + oShape.Position = aPoint + + oPage.add(oShape) + + addShapeToDrawDoc() = oShape +Exit Function +ErrHndl: + Test.Exception() +End Function + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDrawPageObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDrawPageObj/script.xlb new file mode 100644 index 000000000000..7966e9d2e0a8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDrawPageObj/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="sc_ScDrawPageObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDrawPageObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScDrawPagesObj/sc_ScDrawPagesObj.xba b/qadevOOo/tests/basic/mod/sc/ScDrawPagesObj/sc_ScDrawPagesObj.xba new file mode 100644 index 000000000000..ce3376145dbf --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDrawPagesObj/sc_ScDrawPagesObj.xba @@ -0,0 +1,55 @@ +<?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="sc_ScDrawPagesObj" 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: +' sc.ScDrawPagesObj +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc.DrawPages + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScDrawPagesObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScDrawPagesObj/script.xlb new file mode 100644 index 000000000000..e77bd26fa1fa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScDrawPagesObj/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="sc_ScDrawPagesObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScDrawPagesObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScFilterDescriptorBase/sc_ScFilterDescriptorBase.xba b/qadevOOo/tests/basic/mod/sc/ScFilterDescriptorBase/sc_ScFilterDescriptorBase.xba new file mode 100644 index 000000000000..fbe7d5a8ed68 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScFilterDescriptorBase/sc_ScFilterDescriptorBase.xba @@ -0,0 +1,64 @@ +<?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="sc_ScFilterDescriptorBase" 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: +' sc.ScFilterDescriptorBase +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + + ' Filling some cells with the text + oSheet.getCellByPosition(0, 0).Value = 10 + oSheet.getCellByPosition(4, 2).Value = 10.10 + oSheet.getCellByPosition(6, 5).Value = -10 + + oObj = oSheet.createFilterDescriptor(true) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScFilterDescriptorBase/script.xlb b/qadevOOo/tests/basic/mod/sc/ScFilterDescriptorBase/script.xlb new file mode 100644 index 000000000000..c733e1c0c8f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScFilterDescriptorBase/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="sc_ScFilterDescriptorBase" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScFilterDescriptorBase"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScFunctionListObj/sc_ScFunctionListObj.xba b/qadevOOo/tests/basic/mod/sc/ScFunctionListObj/sc_ScFunctionListObj.xba new file mode 100644 index 000000000000..e6b3e5935888 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScFunctionListObj/sc_ScFunctionListObj.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="sc_ScFunctionListObj" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScFunctionListObj +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sheet.FunctionDescriptions") + nGlobalLong = oObj.Count + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScFunctionListObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScFunctionListObj/script.xlb new file mode 100644 index 000000000000..0d49fb420ceb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScFunctionListObj/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="sc_ScFunctionListObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScFunctionListObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFieldObj/sc_ScHeaderFieldObj.xba b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldObj/sc_ScHeaderFieldObj.xba new file mode 100644 index 000000000000..ba5526524f46 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldObj/sc_ScHeaderFieldObj.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="sc_ScHeaderFieldObj" 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 oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScHeaderFieldObj +'************************************************************************* +On Error Goto ErrHndl + Dim StyleFamilies as Object, PageStyles as Object, DefaultStyle As Object + Dim RPHC as Object, tLeft as Object, TimeField as Object, oCur As Object + + + oDoc = utils.createDocument("scalc", cObjectName) + + StyleFamilies = oDoc.getStyleFamilies + PageStyles = StyleFamilies.getByName("PageStyles") + DefaultStyle = PageStyles.getByName("Default") + + RPHC = DefaultStyle.getPropertyValue("RightPageHeaderContent") + tLeft = RPHC.getLeftText + TimeField = oDoc.createInstance("com.sun.star.text.TextField.Time") + oComponentInstance = oDoc.createInstance("com.sun.star.text.TextField.Time") + oCur = tLeft.createTextCursor() + tLeft.insertTextContent(oCur, TimeField, false) + tLeft.insertTextContent(oCur, oComponentInstance, false) + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextField.Time") + oXTextContentRange = tLeft.createTextCursor() + + oObj = TimeField + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.dispose() + if NOT isNULL(oComponentInstance) then oComponentInstance.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFieldObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldObj/script.xlb new file mode 100644 index 000000000000..c8b68e52b61e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldObj/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="sc_ScHeaderFieldObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScHeaderFieldObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFieldsObj/sc_ScHeaderFieldsObj.xba b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldsObj/sc_ScHeaderFieldsObj.xba new file mode 100644 index 000000000000..9456e02e97de --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldsObj/sc_ScHeaderFieldsObj.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="sc_ScHeaderFieldsObj" 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: + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScHeaderFieldsObj +'************************************************************************* +On Error Goto ErrHndl + + Dim StyleFamilies as Object, PageStyles as Object, DefaultStyle As Object + Dim RPHC as Object, tLeft as Object, TimeField as Object, oCur As Object + + oDoc = utils.createDocument("scalc", cObjectName) + + StyleFamilies = oDoc.getStyleFamilies() + PageStyles = StyleFamilies.getByName("PageStyles") + DefaultStyle = PageStyles.getByName("Default") + + RPHC = DefaultStyle.getPropertyValue("RightPageHeaderContent") + tLeft = RPHC.getLeftText + TimeField = oDoc.createInstance("com.sun.star.text.TextField.Time") + oCur = tLeft.createTextCursor() + tLeft.insertTextContent(oCur, TimeField, false) + + oObj=tLeft.getTextFields() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFieldsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldsObj/script.xlb new file mode 100644 index 000000000000..ecddc21b631e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFieldsObj/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="sc_ScHeaderFieldsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScHeaderFieldsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFooterContentObj/sc_ScHeaderFooterContentObj.xba b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterContentObj/sc_ScHeaderFooterContentObj.xba new file mode 100644 index 000000000000..fc5aad8f1869 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterContentObj/sc_ScHeaderFooterContentObj.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="sc_ScHeaderFooterContentObj" 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: + +' Requiered for com.sun.star.sheet.XHeaderFooterContent + Global cLeftText As String + Global cCenterText As String + Global cRightText As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScHeaderFooterContentObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim PageStyles As Variant + Dim DefaultStyle, RPHC As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + PageStyles = oDoc.getStyleFamilies.getByName("PageStyles") + DefaultStyle = PageStyles.getByName("Default") + + cLeftText = "Left" + cCenterText = "Center" + cRightText = "Right" + + RPHC = DefaultStyle.getPropertyValue("RightPageHeaderContent") + RPHC.getLeftText.String = cLeftText + RPHC.getCenterText.String = cCenterText + RPHC.getRightText.String = cRightText + + DefaultStyle.setPropertyValue("RightPageHeaderContent", RPHC) + + oObj = RPHC + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFooterContentObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterContentObj/script.xlb new file mode 100644 index 000000000000..ddbc0e056fbf --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterContentObj/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="sc_ScHeaderFooterContentObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScHeaderFooterContentObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextCursor/sc_ScHeaderFooterTextCursor.xba b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextCursor/sc_ScHeaderFooterTextCursor.xba new file mode 100644 index 000000000000..6ba9ecda2e87 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextCursor/sc_ScHeaderFooterTextCursor.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="sc_ScHeaderFooterTextCursor" 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: + +' Requiered for com.sun.star.text.XParagraphCursor + Global oText As Object +' Requiered for com.sun.star.text.XTextCursor + Global oCursor As Object 'One more cursor + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScHeaderFooterTextCursor +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim PageStyles, DefaultStyle, RPHC As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + PageStyles = oDoc.getStyleFamilies.getByName("PageStyles") + DefaultStyle = PageStyles.getByName("Default") + + RPHC = DefaultStyle.getPropertyValue("RightPageHeaderContent") + RPHC.getCenterText.String = "Center" + DefaultStyle.setPropertyValue("RightPageHeaderContent", RPHC) + + oText = RPHC.getCenterText + + oObj = oText.createTextCursor() + oCursor = oText.createTextCursor() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextCursor/script.xlb b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextCursor/script.xlb new file mode 100644 index 000000000000..ab7f002c6b5c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextCursor/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="sc_ScHeaderFooterTextCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScHeaderFooterTextCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextObj/sc_ScHeaderFooterTextObj.xba b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextObj/sc_ScHeaderFooterTextObj.xba new file mode 100644 index 000000000000..fe0ec2fef131 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextObj/sc_ScHeaderFooterTextObj.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScHeaderFooterTextObj" 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 oInstance as Object +GLOBAL oCollection as Object + +'Required for com.sun.star.text.XTextRangeMover +Global oTextRangeToMove As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScHeaderFooterTextObj +'************************************************************************* +On Error Goto ErrHndl + Dim StyleFamilies As Variant + Dim PageStyles As Object + Dim DefaultStyle As Object + Dim RPHC As Object + + oDoc = utils.createDocument("scalc", cObjectName) + + StyleFamilies = oDoc.getStyleFamilies + PageStyles = StyleFamilies.getByName("PageStyles") + DefaultStyle = PageStyles.getByName("Default") + + RPHC = DefaultStyle.getPropertyValue("RightPageHeaderContent") + RPHC.getCenterText.String = "Center" + DefaultStyle.setPropertyValue("RightPageHeaderContent", RPHC) + + oObj = RPHC.getCenterText + oTextRangeToMove = oObj + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.Time") + oCollection = oObj.getTextFields() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextObj/script.xlb new file mode 100644 index 000000000000..969ecbe11891 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScHeaderFooterTextObj/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="sc_ScHeaderFooterTextObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScHeaderFooterTextObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAnnotationsEnumeration/sc_ScIndexEnumeration_CellAnnotationsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAnnotationsEnumeration/sc_ScIndexEnumeration_CellAnnotationsEnumeration.xba new file mode 100644 index 000000000000..3a40ff4d8755 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAnnotationsEnumeration/sc_ScIndexEnumeration_CellAnnotationsEnumeration.xba @@ -0,0 +1,85 @@ +<?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="sc_ScIndexEnumeration_CellAnnotationsEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_CellAnnotationsEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim oSheets as Object, oSheet as Object + Dim oAnnotations as Object + Dim oCell1 as Object, oCell2 as Object + Dim oAnno1 as Object, oAnno2 As Object + + oDoc = utils.createDocument("scalc", cObjectName) + + ' get a sheet + oSheets = oDoc.getSheets() + oSheet = oSheets.getByIndex(0) + + ' filling cells with values... + oSheet.getCellByPosition(5, 5).setValue(15) + oSheet.getCellByPosition(1, 4).setValue(10) + oSheet.getCellByPosition(2, 0).setValue(-5.15) + + Out.Log("Creating two annotations...") + + oCell1 = oSheet.getCellByPosition(3, 5) + oAnno1 = oCell1.Annotation + oAnno1.setString("ScAnnotationsObj Anno 1") + + oCell2 = oSheet.getCellByPosition(3, 6) + oAnno2 = oCell2.Annotation + oAnno2.setString("ScAnnotationsObj Anno 2") + + ' get annotations + oAnnotations = oSheet.getAnnotations() + + oObj = oAnnotations.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAnnotationsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAnnotationsEnumeration/script.xlb new file mode 100644 index 000000000000..88e9f70551e4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAnnotationsEnumeration/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="sc_ScIndexEnumeration_CellAnnotationsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_CellAnnotationsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAreaLinksEnumeration/sc_ScIndexEnumeration_CellAreaLinksEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAreaLinksEnumeration/sc_ScIndexEnumeration_CellAreaLinksEnumeration.xba new file mode 100644 index 000000000000..f16c3fd24433 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAreaLinksEnumeration/sc_ScIndexEnumeration_CellAreaLinksEnumeration.xba @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScIndexEnumeration_CellAreaLinksEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_CellAreaLinksEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim oLinks As Variant + + oDoc = utils.createDocument("scalc", cObjectName) + + oLinks = oDoc.AreaLinks + oLinks.InsertAtPosition(com.sun.star.table.CellAddress(1, 2, 3), "dummy_fname", "a1:b2", "", "") + + oObj = oLinks.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAreaLinksEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAreaLinksEnumeration/script.xlb new file mode 100644 index 000000000000..44b41c57f253 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_CellAreaLinksEnumeration/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="sc_ScIndexEnumeration_CellAreaLinksEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_CellAreaLinksEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DDELinksEnumeration/sc_ScIndexEnumeration_DDELinksEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DDELinksEnumeration/sc_ScIndexEnumeration_DDELinksEnumeration.xba new file mode 100644 index 000000000000..814dba0cebed --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DDELinksEnumeration/sc_ScIndexEnumeration_DDELinksEnumeration.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="sc_ScIndexEnumeration_DDELinksEnumeration" 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 oTestDoc As Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_DDELinksEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim testDoc, oF As String + Dim oSheet As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + + oTestDoc = utils.loadTestDocument("ScDDELinksObj.sdc") + + ' This construction of 2-way convertion of testdocs location + ' should take place here, because there is unnecessary slash at the end of + ' cTestDocsDir. + testDoc = utils.URL2Path(utils.Path2URL(cTestDocsDir & "ScDDELinksObj.sdc")) + + oF = "=DDE(""soffice"";""" & testDoc & """;""Sheet1.A1"")" + + oSheet.getCellByPosition(1, 2).Formula = oF + oSheet.getCellByPosition(3, 4).Formula = oF + oSheet.getCellByPosition(5, 6).Formula = oF + + oObj = oDoc.getPropertyValue("DDELinks").createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +' close ScDDELinksObj.sdc +Sub DisposeObj() + oTestDoc.dispose() +end sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DDELinksEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DDELinksEnumeration/script.xlb new file mode 100644 index 000000000000..88efe2065201 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DDELinksEnumeration/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="sc_ScIndexEnumeration_DDELinksEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_DDELinksEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotFieldsEnumeration/sc_ScIndexEnumeration_DataPilotFieldsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotFieldsEnumeration/sc_ScIndexEnumeration_DataPilotFieldsEnumeration.xba new file mode 100644 index 000000000000..27271eefc8bc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotFieldsEnumeration/sc_ScIndexEnumeration_DataPilotFieldsEnumeration.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="sc_ScIndexEnumeration_DataPilotFieldsEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_DataPilotFieldsEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim i as Integer,j As Integer + Dim oSheet as Object, oDataPilotDescriptor As Object + Dim oFields as Variant, oDataPilotTable As Variant + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + Dim sCellAddress As New com.sun.star.table.CellAddress + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + + for i = 1 to 5 + for j = 1 to 5 + oSheet.getCellByPosition(i, j).Value = 2.5 * j + i + next j + next i + + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 1 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + sCellAddress.Sheet = 0 + sCellAddress.Column = 7 + sCellAddress.Row = 8 + + oDataPilotTable = oSheet.getDataPilotTables + oDataPilotDescriptor = oDataPilotTable.createDataPilotDescriptor() + oDataPilotDescriptor.setSourceRange(sCellRangeAddress) + + oDataPilotTable.insertNewByName(cObjectName, sCellAddress, oDataPilotDescriptor) + + oFields = oDataPilotDescriptor.getDataPilotFields + oObj = oFields.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotFieldsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotFieldsEnumeration/script.xlb new file mode 100644 index 000000000000..e8d82d06db78 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotFieldsEnumeration/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="sc_ScIndexEnumeration_DataPilotFieldsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_DataPilotFieldsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotTablesEnumeration/sc_ScIndexEnumeration_DataPilotTablesEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotTablesEnumeration/sc_ScIndexEnumeration_DataPilotTablesEnumeration.xba new file mode 100644 index 000000000000..74078410d2b1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotTablesEnumeration/sc_ScIndexEnumeration_DataPilotTablesEnumeration.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="sc_ScIndexEnumeration_DataPilotTablesEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_DataPilotTablesEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim i as Integer,j As Integer + Dim oSheet as Object, oDataPilotDescriptor As Object + Dim oDataPilotTables As Variant + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets.getByIndex(0) + + for i = 1 to 5 + for j = 1 to 5 + oSheet.getCellByPosition(i, j).Value = 2.5 * j + i + next j + next i + + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 1 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + Dim sCellAddress As New com.sun.star.table.CellAddress + sCellAddress.Sheet = 0 + sCellAddress.Column = 7 + sCellAddress.Row = 8 + + oDataPilotTables = oSheet.getDataPilotTables + oDataPilotDescriptor = oDataPilotTables.createDataPilotDescriptor() + oDataPilotDescriptor.setSourceRange(sCellRangeAddress) + + oDataPilotTables.insertNewByName(cObjectName, sCellAddress, oDataPilotDescriptor) + + oObj = oDataPilotTables.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotTablesEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotTablesEnumeration/script.xlb new file mode 100644 index 000000000000..39577313ecb2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DataPilotTablesEnumeration/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="sc_ScIndexEnumeration_DataPilotTablesEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_DataPilotTablesEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DatabaseRangesEnumeration/sc_ScIndexEnumeration_DatabaseRangesEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DatabaseRangesEnumeration/sc_ScIndexEnumeration_DatabaseRangesEnumeration.xba new file mode 100644 index 000000000000..6e78dc566ce4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DatabaseRangesEnumeration/sc_ScIndexEnumeration_DatabaseRangesEnumeration.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="sc_ScIndexEnumeration_DatabaseRangesEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_DatabaseRangesEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim oRanges As Variant + Dim sCellRangeAddress As New com.sun.star.table.CellRangeAddress + + oDoc = utils.createDocument("scalc", cObjectName) + + sCellRangeAddress.Sheet = 0 + sCellRangeAddress.StartColumn = 1 + sCellRangeAddress.StartRow = 1 + sCellRangeAddress.EndColumn = 5 + sCellRangeAddress.EndRow = 5 + + oRanges = oDoc.getPropertyValue("DatabaseRanges") + oRanges.addNewByName(cObjectName, sCellRangeAddress) + + oObj = oRanges.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DatabaseRangesEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DatabaseRangesEnumeration/script.xlb new file mode 100644 index 000000000000..4fe8484dd7ff --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_DatabaseRangesEnumeration/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="sc_ScIndexEnumeration_DatabaseRangesEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_DatabaseRangesEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_FunctionDescriptionEnumeration/sc_ScIndexEnumeration_FunctionDescriptionEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_FunctionDescriptionEnumeration/sc_ScIndexEnumeration_FunctionDescriptionEnumeration.xba new file mode 100644 index 000000000000..e4db70d1e080 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_FunctionDescriptionEnumeration/sc_ScIndexEnumeration_FunctionDescriptionEnumeration.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="sc_ScIndexEnumeration_FunctionDescriptionEnumeration" 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: + + +Sub CreateObj() + Dim oFD as Object + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_FunctionDescriptionEnumeration +'************************************************************************* +On Error Goto ErrHndl + + oFD = createUnoService("com.sun.star.sheet.FunctionDescriptions") + + oObj = oFD.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_FunctionDescriptionEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_FunctionDescriptionEnumeration/script.xlb new file mode 100644 index 000000000000..a1ed8d05a5e1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_FunctionDescriptionEnumeration/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="sc_ScIndexEnumeration_FunctionDescriptionEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_FunctionDescriptionEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_LabelRangesEnumeration/sc_ScIndexEnumeration_LabelRangesEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_LabelRangesEnumeration/sc_ScIndexEnumeration_LabelRangesEnumeration.xba new file mode 100644 index 000000000000..fb7e96bb4819 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_LabelRangesEnumeration/sc_ScIndexEnumeration_LabelRangesEnumeration.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="sc_ScIndexEnumeration_LabelRangesEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_LabelRangesEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim RangeAddress1 As New com.sun.star.table.CellRangeAddress + Dim RangeAddress2 As New com.sun.star.table.CellRangeAddress + Dim oRanges As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oRanges = oDoc.getPropertyValue("ColumnLabelRanges") + RangeAddress1.Sheet = 0 + RangeAddress1.StartColumn = 1 + RangeAddress1.StartRow = 1 + RangeAddress1.EndColumn = 2 + RangeAddress1.EndRow = 2 + + RangeAddress2.Sheet = 0 + RangeAddress2.StartColumn = 5 + RangeAddress2.StartRow = 5 + RangeAddress2.EndColumn = 6 + RangeAddress2.EndRow = 7 + + oRanges.addNew(RangeAddress1, RangeAddress2) + + oObj = oRanges.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_LabelRangesEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_LabelRangesEnumeration/script.xlb new file mode 100644 index 000000000000..2606b80616ed --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_LabelRangesEnumeration/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="sc_ScIndexEnumeration_LabelRangesEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_LabelRangesEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_NamedRangesEnumeration/sc_ScIndexEnumeration_NamedRangesEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_NamedRangesEnumeration/sc_ScIndexEnumeration_NamedRangesEnumeration.xba new file mode 100644 index 000000000000..73ae78100bbd --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_NamedRangesEnumeration/sc_ScIndexEnumeration_NamedRangesEnumeration.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="sc_ScIndexEnumeration_NamedRangesEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_NamedRangesEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oNamedRanges As Object + Dim sBase As New com.sun.star.table.CellAddress + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oNamedRanges = oDoc.getPropertyValue("NamedRanges") + + sBase.sheet = 0 + sBase.Column = 0 + sBase.Row = 0 + + oNamedRanges.addNewByNAme(cObjectName, "A1:B3", sBase, 0) + + oObj = oNamedRanges.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_NamedRangesEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_NamedRangesEnumeration/script.xlb new file mode 100644 index 000000000000..ebbf4ec59a79 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_NamedRangesEnumeration/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="sc_ScIndexEnumeration_NamedRangesEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_NamedRangesEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_ScenariosEnumeration/sc_ScIndexEnumeration_ScenariosEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_ScenariosEnumeration/sc_ScIndexEnumeration_ScenariosEnumeration.xba new file mode 100644 index 000000000000..940d487f3f15 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_ScenariosEnumeration/sc_ScIndexEnumeration_ScenariosEnumeration.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScIndexEnumeration_ScenariosEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_ScenariosEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim aCRA(0) As New com.sun.star.table.CellRangeAddress + Dim oSheet As Object + Dim oScenarios as Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets(0) + oSheet.getCellByPosition(0, 1).Value = 1 + oSheet.getCellByPosition(3, 2).Value = 0 + oSheet.getCellByPosition(4, 5).Value = -1 + + oScenarios = oSheet.getScenarios() + + aCRA(0).Sheet = 0 + aCRA(0).StartColumn = 0 + aCRA(0).StartRow = 0 + aCRA(0).EndColumn = 5 + aCRA(0).EndRow = 5 + + oScenarios.addNewByName("Scenario1", aCRA(), "Comment1") + oScenarios.addNewByName("Scenario2", aCRA(), "Comment2") + + oObj = oScenarios.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_ScenariosEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_ScenariosEnumeration/script.xlb new file mode 100644 index 000000000000..365a98ba583d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_ScenariosEnumeration/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="sc_ScIndexEnumeration_ScenariosEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_ScenariosEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetCellRangesEnumeration/sc_ScIndexEnumeration_SheetCellRangesEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetCellRangesEnumeration/sc_ScIndexEnumeration_SheetCellRangesEnumeration.xba new file mode 100644 index 000000000000..16947440d0d1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetCellRangesEnumeration/sc_ScIndexEnumeration_SheetCellRangesEnumeration.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScIndexEnumeration_SheetCellRangesEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_SheetCellRangesEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + Dim oRanges as Object + Dim oInstance as Object + + oDoc = utils.createDocument("scalc", cObjectName) + oRanges = oDoc.createInstance("com.sun.star.sheet.SheetCellRanges") + oSheet = oDoc.Sheets(1) + + oInstance=oSheet.getCellRangeByName("A1:C5") + oRanges.insertByName("CellRange1", oInstance) + oInstance=oSheet.getCellRangeByName("A7:D9") + oRanges.insertByName("CellRange2", oInstance) + oInstance=oSheet.getCellRangeByName("E1:E42") + oRanges.insertByName("CellRange3", oInstance) + oInstance=oSheet.getCellRangeByName("A10:B10") + oRanges.insertByName("CellRange4", oInstance) + + oObj = oRanges.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetCellRangesEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetCellRangesEnumeration/script.xlb new file mode 100644 index 000000000000..450441480b9b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetCellRangesEnumeration/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="sc_ScIndexEnumeration_SheetCellRangesEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_SheetCellRangesEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetLinksEnumeration/sc_ScIndexEnumeration_SheetLinksEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetLinksEnumeration/sc_ScIndexEnumeration_SheetLinksEnumeration.xba new file mode 100644 index 000000000000..d20d11a36920 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetLinksEnumeration/sc_ScIndexEnumeration_SheetLinksEnumeration.xba @@ -0,0 +1,64 @@ +<?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="sc_ScIndexEnumeration_SheetLinksEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_SheetLinksEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim oSheet As Object + Dim sURL As String + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + sURL = cTestDocsDir & "ScDDELinksObj.sdc" + oSheet.link(sURL, "Sheet1", "", "", com.sun.star.sheet.SheetLinkMode.VALUE) + + oObj = oDoc.getPropertyValue("SheetLinks").createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetLinksEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetLinksEnumeration/script.xlb new file mode 100644 index 000000000000..6e60465caf1e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SheetLinksEnumeration/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="sc_ScIndexEnumeration_SheetLinksEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_SheetLinksEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetViewPanesEnumeration/sc_ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetViewPanesEnumeration/sc_ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xba new file mode 100644 index 000000000000..b0d989c08efa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetViewPanesEnumeration/sc_ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xba @@ -0,0 +1,64 @@ +<?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="sc_ScIndexEnumeration_SpreadsheetViewPanesEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_SpreadsheetViewPanesEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim oController As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oController = oDoc.getCurrentController() + oObj = oController.createEnumeration() + wait(1000) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if not isNULL(oDoc) then oDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetViewPanesEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetViewPanesEnumeration/script.xlb new file mode 100644 index 000000000000..23170d0672c2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetViewPanesEnumeration/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="sc_ScIndexEnumeration_SpreadsheetViewPanesEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_SpreadsheetViewPanesEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetsEnumeration/sc_ScIndexEnumeration_SpreadsheetsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetsEnumeration/sc_ScIndexEnumeration_SpreadsheetsEnumeration.xba new file mode 100644 index 000000000000..952020d42e35 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetsEnumeration/sc_ScIndexEnumeration_SpreadsheetsEnumeration.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="sc_ScIndexEnumeration_SpreadsheetsEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_SpreadsheetsEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim oSheets as Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheets = oDoc.getSheets() + oObj = oSheets.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetsEnumeration/script.xlb new file mode 100644 index 000000000000..bb473296b67a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SpreadsheetsEnumeration/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="sc_ScIndexEnumeration_SpreadsheetsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_SpreadsheetsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SubTotalFieldsEnumeration/sc_ScIndexEnumeration_SubTotalFieldsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SubTotalFieldsEnumeration/sc_ScIndexEnumeration_SubTotalFieldsEnumeration.xba new file mode 100644 index 000000000000..da63ca49dd89 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SubTotalFieldsEnumeration/sc_ScIndexEnumeration_SubTotalFieldsEnumeration.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScIndexEnumeration_SubTotalFieldsEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_SubTotalFieldsEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim SubTotalDsc As Object + Dim SubTotalCol(0) As New com.sun.star.sheet.SubTotalColumn + Dim oSTF as Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + SubTotalDsc = oDoc.Sheets(0).createSubTotalDescriptor(true) + SubTotalCol(0).Column = 5 + SubTotalCol(0).Function = com.sun.star.sheet.GeneralFunction.SUM + + SubTotalDsc.addNew(SubTotalCol(), 1) + oSTF = SubTotalDsc.getByIndex(0) + oObj = SubTotalDsc.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SubTotalFieldsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SubTotalFieldsEnumeration/script.xlb new file mode 100644 index 000000000000..b88d56a9577d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_SubTotalFieldsEnumeration/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="sc_ScIndexEnumeration_SubTotalFieldsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_SubTotalFieldsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableAutoFormatEnumeration/sc_ScIndexEnumeration_TableAutoFormatEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableAutoFormatEnumeration/sc_ScIndexEnumeration_TableAutoFormatEnumeration.xba new file mode 100644 index 000000000000..801e50642176 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableAutoFormatEnumeration/sc_ScIndexEnumeration_TableAutoFormatEnumeration.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="sc_ScIndexEnumeration_TableAutoFormatEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_TableAutoFormatEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim oTAF as Object + oDoc = utils.createDocument("scalc", cObjectName) + + oTAF = createUNOService("com.sun.star.sheet.TableAutoFormats") + oObj = oTAF.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableAutoFormatEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableAutoFormatEnumeration/script.xlb new file mode 100644 index 000000000000..1cf0d165928d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableAutoFormatEnumeration/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="sc_ScIndexEnumeration_TableAutoFormatEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_TableAutoFormatEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableChartsEnumeration/sc_ScIndexEnumeration_TableChartsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableChartsEnumeration/sc_ScIndexEnumeration_TableChartsEnumeration.xba new file mode 100644 index 000000000000..f6f8e38ed8c9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableChartsEnumeration/sc_ScIndexEnumeration_TableChartsEnumeration.xba @@ -0,0 +1,95 @@ +<?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="sc_ScIndexEnumeration_TableChartsEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_TableChartsEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet As Object + Dim i as Integer,j As Integer + Dim oCharts as Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + + ' Filling some cells with the text + for i = 1 to 6 + oSheet.getCellByPosition(0, i).setString("Row" & i) + oSheet.getCellByPosition(i, 0).setString("Col" & i) + next i + + for i = 1 to 6 + for j = 1 to 6 + oSheet.getCellByPosition(i, j).Value = (i + 1) * j + next j + next i + + Dim tAddr As New com.sun.star.table.CellRangeAddress + tAddr.Sheet = 0 + tAddr.StartRow = 0 + tAddr.StartColumn = 0 + tAddr.EndRow = 6 + tAddr.EndColumn = 6 + + Dim tRect As New com.sun.star.awt.Rectangle + tRect.X = 200 + tRect.Y = 200 + tRect.Width = 10000 + tRect.Height = 5000 + + oCharts = oSheet.getCharts() + + Dim oRanges(0) As New com.sun.star.table.CellRangeAddress + oRanges(0) = tAddr + oCharts.addNewByName(cObjectName, tRect, oRanges(), true, true) + + oObj = oCharts.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableChartsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableChartsEnumeration/script.xlb new file mode 100644 index 000000000000..735ea1c6f418 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableChartsEnumeration/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="sc_ScIndexEnumeration_TableChartsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_TableChartsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableColumnsEnumeration/sc_ScIndexEnumeration_TableColumnsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableColumnsEnumeration/sc_ScIndexEnumeration_TableColumnsEnumeration.xba new file mode 100644 index 000000000000..600102ff93f8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableColumnsEnumeration/sc_ScIndexEnumeration_TableColumnsEnumeration.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="sc_ScIndexEnumeration_TableColumnsEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_TableColumnsEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim oTable as Object + + oDoc = utils.createDocument("scalc", cObjectName) + oTable = oDoc.Sheets(0) + oObj = oTable.getColumns().createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableColumnsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableColumnsEnumeration/script.xlb new file mode 100644 index 000000000000..e41f00088804 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableColumnsEnumeration/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="sc_ScIndexEnumeration_TableColumnsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_TableColumnsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableConditionalEntryEnumeration/sc_ScIndexEnumeration_TableConditionalEntryEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableConditionalEntryEnumeration/sc_ScIndexEnumeration_TableConditionalEntryEnumeration.xba new file mode 100644 index 000000000000..43385cbc3c6a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableConditionalEntryEnumeration/sc_ScIndexEnumeration_TableConditionalEntryEnumeration.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="sc_ScIndexEnumeration_TableConditionalEntryEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_TableConditionalEntryEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oSheet, oConditionalFormat As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets(0) + oSheet.getCellByPosition(5, 5).Value = 15 + oSheet.getCellByPosition(1, 4).Value = 10 + oSheet.getCellByPosition(2, 0).Value = -5.15 + + oConditionalFormat = oSheet.getPropertyValue("ConditionalFormat") + + Dim oCellAddress As New com.sun.star.table.CellAddress + oCellAddress.Sheet = 0 + oCellAddress.Row = 1 + oCellAddress.Column = 5 + + Dim oProps(4) As New com.sun.star.beans.PropertyValue + oProps(0).Name = "StyleName" + oProps(0).Value = "Result2" + oProps(1).Name = "Formula1" + oProps(1).Value = "$Sheet1.$B$5" + oProps(2).Name = "Formula2" + oProps(2).Value = "" + oProps(3).Name = "Operator" + oProps(3).Value = com.sun.star.sheet.ConditionOperator.EQUAL + oProps(4).Name = "SourcePosition" + oProps(4).Value = oCellAddress + + oConditionalFormat.AddNew(oProps()) + + oCellAddress.Sheet = 0 + oCellAddress.Row = 1 + oCellAddress.Column = 5 + + oProps(0).Name = "StyleName" + oProps(0).Value = "Result2" + oProps(1).Name = "Formula1" + oProps(1).Value = "$Sheet1.$B$3" + oProps(2).Name = "Formula2" + oProps(2).Value = "" + oProps(3).Name = "Operator" + oProps(3).Value = com.sun.star.sheet.ConditionOperator.EQUAL + oProps(4).Name = "SourcePosition" + oProps(4).Value = oCellAddress + + oConditionalFormat.AddNew(oProps()) + + oObj = oConditionalFormat.createEnumeration() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableConditionalEntryEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableConditionalEntryEnumeration/script.xlb new file mode 100644 index 000000000000..ec398ca4e48e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableConditionalEntryEnumeration/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="sc_ScIndexEnumeration_TableConditionalEntryEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_TableConditionalEntryEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableRowsEnumeration/sc_ScIndexEnumeration_TableRowsEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableRowsEnumeration/sc_ScIndexEnumeration_TableRowsEnumeration.xba new file mode 100644 index 000000000000..f9d17fc3d403 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableRowsEnumeration/sc_ScIndexEnumeration_TableRowsEnumeration.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="sc_ScIndexEnumeration_TableRowsEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_TableRowsEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim oTable as Object + + oDoc = utils.createDocument("scalc", cObjectName) + oTable = oDoc.Sheets(0) + oObj = oTable.getRows().createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableRowsEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableRowsEnumeration/script.xlb new file mode 100644 index 000000000000..7e5d3684dc1a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TableRowsEnumeration/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="sc_ScIndexEnumeration_TableRowsEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_TableRowsEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TextFieldEnumeration/sc_ScIndexEnumeration_TextFieldEnumeration.xba b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TextFieldEnumeration/sc_ScIndexEnumeration_TextFieldEnumeration.xba new file mode 100644 index 000000000000..400f93009962 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TextFieldEnumeration/sc_ScIndexEnumeration_TextFieldEnumeration.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScIndexEnumeration_TextFieldEnumeration" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScIndexEnumeration_TextFieldEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim oSheet as Object, oCell As Object + Dim oTextField as Object, oTextField1 As Object + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + + oTextField = oDoc.createInstance("com.sun.star.text.TextField.URL") + + oSheet = oDoc.Sheets(0) + oCell = oSheet.getCellByPosition(5, 5) + oCell.insertTextContent(oCell.createTextCursor, oTextField, true) + + oObj = oCell.getTextFields().createEnumeration() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TextFieldEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TextFieldEnumeration/script.xlb new file mode 100644 index 000000000000..45af83a841cb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScIndexEnumeration_TextFieldEnumeration/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="sc_ScIndexEnumeration_TextFieldEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScIndexEnumeration_TextFieldEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScLabelRangeObj/sc_ScLabelRangeObj.xba b/qadevOOo/tests/basic/mod/sc/ScLabelRangeObj/sc_ScLabelRangeObj.xba new file mode 100644 index 000000000000..935bb0b40f99 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScLabelRangeObj/sc_ScLabelRangeObj.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="sc_ScLabelRangeObj" 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: +' sc.ScLabelRangeObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim RangeAddress1 As New com.sun.star.table.CellRangeAddress + Dim RangeAddress2 As New com.sun.star.table.CellRangeAddress + Dim oRanges As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oRanges = oDoc.getPropertyValue("ColumnLabelRanges") + RangeAddress1.Sheet = 0 + RangeAddress1.StartColumn = 1 + RangeAddress1.StartRow = 1 + RangeAddress1.EndColumn = 2 + RangeAddress1.EndRow = 2 + + RangeAddress2.Sheet = 0 + RangeAddress2.StartColumn = 5 + RangeAddress2.StartRow = 5 + RangeAddress2.EndColumn = 6 + RangeAddress2.EndRow = 7 + + oRanges.addNew(RangeAddress1, RangeAddress2) + + oObj = oRanges(0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScLabelRangeObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScLabelRangeObj/script.xlb new file mode 100644 index 000000000000..e7a39e61cfab --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScLabelRangeObj/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="sc_ScLabelRangeObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScLabelRangeObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScLabelRangesObj/sc_ScLabelRangesObj.xba b/qadevOOo/tests/basic/mod/sc/ScLabelRangesObj/sc_ScLabelRangesObj.xba new file mode 100644 index 000000000000..482c89c426ca --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScLabelRangesObj/sc_ScLabelRangesObj.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="sc_ScLabelRangesObj" 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: +' sc.ScLabelRangesObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim RangeAddress1 As New com.sun.star.table.CellRangeAddress + Dim RangeAddress2 As New com.sun.star.table.CellRangeAddress + Dim oRanges As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oRanges = oDoc.getPropertyValue("ColumnLabelRanges") + RangeAddress1.Sheet = 0 + RangeAddress1.StartColumn = 1 + RangeAddress1.StartRow = 1 + RangeAddress1.EndColumn = 2 + RangeAddress1.EndRow = 2 + + RangeAddress2.Sheet = 0 + RangeAddress2.StartColumn = 5 + RangeAddress2.StartRow = 5 + RangeAddress2.EndColumn = 6 + RangeAddress2.EndRow = 7 + + oRanges.addNew(RangeAddress1, RangeAddress2) + + oObj = oRanges + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScLabelRangesObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScLabelRangesObj/script.xlb new file mode 100644 index 000000000000..db8dd5aed90f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScLabelRangesObj/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="sc_ScLabelRangesObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScLabelRangesObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScModelObj/sc_ScModelObj.xba b/qadevOOo/tests/basic/mod/sc/ScModelObj/sc_ScModelObj.xba new file mode 100644 index 000000000000..fdc39142d5dc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScModelObj/sc_ScModelObj.xba @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScModelObj" 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 oXModelController as Object +Global oXModelSel as Object +Global oXModelToSel as Object +Global oComponentInstance As Object +Global oControllerDoc As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScModelObj +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("scalc", cObjectName) + oComponentInstance = utils.createDocument("scalc", cObjectName & "1") + oControllerDoc = utils.createDocument("scalc", cObjectName & "2") + + oObj = oDoc + + oXModelToSel = oDoc.Sheets(0).getCellByPosition(2,3) + oXModelController = oControllerDoc.getCurrentController() + oXModelSel = oDoc.getCurrentController() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNULL(oComponentInstance) then oComponentInstance.dispose() + if NOT isNULL(oControllerDoc) then oControllerDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScModelObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScModelObj/script.xlb new file mode 100644 index 000000000000..05c588dacb23 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScModelObj/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="sc_ScModelObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScModelObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScNamedRangeObj/sc_ScNamedRangeObj.xba b/qadevOOo/tests/basic/mod/sc/ScNamedRangeObj/sc_ScNamedRangeObj.xba new file mode 100644 index 000000000000..020ef20081e3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScNamedRangeObj/sc_ScNamedRangeObj.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="sc_ScNamedRangeObj" 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 oReferredCells As Variant + +' Required by com.sun.star.container.XNamed +Global cNameToSet As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScNamedRangeObj +'************************************************************************* +On Error Goto ErrHndl + Dim oNamedRanges As Variant + Dim sBase As New com.sun.star.table.CellAddress + + oDoc = utils.createDocument("scalc", cObjectName) + oNamedRanges = oDoc.getPropertyValue("NamedRanges") + + sBase.sheet = 0 + sBase.Column = 0 + sBase.Row = 0 + + oNamedRanges.addNewByName(cObjectName, "A1:B3", sBase, 0) + + Dim ReferredCells As New com.sun.star.table.CellRangeAddress + ReferredCells.Sheet = 0 + ReferredCells.StartRow = 0 + ReferredCells.StartColumn = 0 + ReferredCells.EndRow = 2 + ReferredCells.EndColumn = 1 + + oReferredCells = ReferredCells + + oObj = oNamedRanges.getByName(cObjectName) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScNamedRangeObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScNamedRangeObj/script.xlb new file mode 100644 index 000000000000..70955626df3a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScNamedRangeObj/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="sc_ScNamedRangeObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScNamedRangeObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScNamedRangesObj/sc_ScNamedRangesObj.xba b/qadevOOo/tests/basic/mod/sc/ScNamedRangesObj/sc_ScNamedRangesObj.xba new file mode 100644 index 000000000000..d9bf1c13229e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScNamedRangesObj/sc_ScNamedRangesObj.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScNamedRangesObj" 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: +' sc.ScNamedRangesObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oNamedRanges As Object + Dim sBase As New com.sun.star.table.CellAddress + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oNamedRanges = oDoc.getPropertyValue("NamedRanges") + + sBase.sheet = 0 + sBase.Column = 0 + sBase.Row = 0 + + oNamedRanges.addNewByNAme(cObjectName, "A1:B3", sBase, 0) + + oObj = oNamedRanges + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScNamedRangesObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScNamedRangesObj/script.xlb new file mode 100644 index 000000000000..7eaf3657e2be --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScNamedRangesObj/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="sc_ScNamedRangesObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScNamedRangesObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScPageObj/sc_ScPageObj.xba b/qadevOOo/tests/basic/mod/sc/ScPageObj/sc_ScPageObj.xba new file mode 100644 index 000000000000..b2863fe1d39f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScPageObj/sc_ScPageObj.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="sc_ScPageObj" 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::drawing::XShapes" needs the following Global variables: +Global oXShapeInstance As Object + +' "com::sun::star::drawing::XShapeGrouper" needs the following Global variables: +Global oGrouperCollection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScPageObj +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDP as Object + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + oGrouperCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + + oDP = oDoc.getDrawPages() + + oDP.insertNewByIndex(0) + oDP.insertNewByIndex(1) + + oObj = oDP.getByIndex(0) + addShape(oObj,1) + addShape(oObj,2) + addShape(oObj,3) + addShape(oObj,4) + + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oGrouperCollection.Add(oObj.getByIndex(2)) + oGrouperCollection.Add(oObj.getByIndex(3)) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function addShape(oPage as Object, no as Integer) As Object +On Error Goto ErrHndl + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oShape As Object + Dim servNames As Variant + + aPoint.x = 1000 * no + aPoint.y = 1000 * no + aSize.Width = 2000 + aSize.Height = 1000 + oShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oShape.Size = aSize + oShape.Position = aPoint + + oPage.add(oShape) + + addShapeToDrawDoc() = oShape +Exit Function +ErrHndl: + Test.Exception() +End Function + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScPageObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScPageObj/script.xlb new file mode 100644 index 000000000000..9a4815c1a3d9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScPageObj/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="sc_ScPageObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScPageObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScRecentFunctionsObj/sc_ScRecentFunctionsObj.xba b/qadevOOo/tests/basic/mod/sc/ScRecentFunctionsObj/sc_ScRecentFunctionsObj.xba new file mode 100644 index 000000000000..632997d122e7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScRecentFunctionsObj/sc_ScRecentFunctionsObj.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScRecentFunctionsObj" 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.sheet.XRecentFunctions +Global AllFunctions As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScRecentFunctionsObj +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.sheet.RecentFunctions") + AllFunctions = createUnoService("com.sun.star.sheet.FunctionDescriptions") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScRecentFunctionsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScRecentFunctionsObj/script.xlb new file mode 100644 index 000000000000..0c346580562d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScRecentFunctionsObj/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="sc_ScRecentFunctionsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScRecentFunctionsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScScenariosObj/sc_ScScenariosObj.xba b/qadevOOo/tests/basic/mod/sc/ScScenariosObj/sc_ScScenariosObj.xba new file mode 100644 index 000000000000..1397f01ce0e1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScScenariosObj/sc_ScScenariosObj.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="sc_ScScenariosObj" 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: +' sc.ScScenariosObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim aCRA(0) As New com.sun.star.table.CellRangeAddress + Dim oSheet As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets(0) + oSheet.getCellByPosition(0, 1).Value = 1 + oSheet.getCellByPosition(3, 2).Value = 0 + oSheet.getCellByPosition(4, 5).Value = -1 + + oObj = oSheet.getScenarios() + + aCRA(0).Sheet = 0 + aCRA(0).StartColumn = 0 + aCRA(0).StartRow = 0 + aCRA(0).EndColumn = 5 + aCRA(0).EndRow = 5 + + oObj.addNewByName("Scenario1", aCRA(), "Comment1") + oObj.addNewByName("Scenario2", aCRA(), "Comment2") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScScenariosObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScScenariosObj/script.xlb new file mode 100644 index 000000000000..3bd24d608918 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScScenariosObj/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="sc_ScScenariosObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScScenariosObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScSheetLinkObj/sc_ScSheetLinkObj.xba b/qadevOOo/tests/basic/mod/sc/ScSheetLinkObj/sc_ScSheetLinkObj.xba new file mode 100644 index 000000000000..7a7160f07d1f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSheetLinkObj/sc_ScSheetLinkObj.xba @@ -0,0 +1,68 @@ +<?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="sc_ScSheetLinkObj" 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 by com.sun.star.container.XNamed +Global cNameToSet As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScSheetLinkObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet, oLinks As Object + Dim sURL As String + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + sURL = cTestDocsDir & "ScSheetLinksObj.sdc" + oSheet.link(sURL, "Sheet1", "", "", com.sun.star.sheet.SheetLinkMode.VALUE) + oLinks = oDoc.getPropertyValue("SheetLinks") + + oObj = oLinks.getByIndex(0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScSheetLinkObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScSheetLinkObj/script.xlb new file mode 100644 index 000000000000..07b533e4b1b0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSheetLinkObj/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="sc_ScSheetLinkObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScSheetLinkObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScSheetLinksObj/sc_ScSheetLinksObj.xba b/qadevOOo/tests/basic/mod/sc/ScSheetLinksObj/sc_ScSheetLinksObj.xba new file mode 100644 index 000000000000..0a2cd6bf5ae1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSheetLinksObj/sc_ScSheetLinksObj.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScSheetLinksObj" 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: +' sc.ScSheetLinksObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + Dim sURL As String + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + sURL = cTestDocsDir & "ScDDELinksObj.sdc" + oSheet.link(sURL, "Sheet1", "", "", com.sun.star.sheet.SheetLinkMode.VALUE) + + oObj = oDoc.getPropertyValue("SheetLinks") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScSheetLinksObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScSheetLinksObj/script.xlb new file mode 100644 index 000000000000..62787f29736b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSheetLinksObj/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="sc_ScSheetLinksObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScSheetLinksObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettings/sc_ScSpreadsheetSettings.xba b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettings/sc_ScSpreadsheetSettings.xba new file mode 100644 index 000000000000..d55538b44064 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettings/sc_ScSpreadsheetSettings.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScSpreadsheetSettings" 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: +' sc.ScSpreadsheetSettings +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet, oSettings As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oSettings = createUnoService("com.sun.star.sheet.GlobalSheetSettings") + + oObj = oSettings + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettings/script.xlb b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettings/script.xlb new file mode 100644 index 000000000000..a1ffc4f1a456 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettings/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="sc_ScSpreadsheetSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScSpreadsheetSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettingsObj/sc_ScSpreadsheetSettingsObj.xba b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettingsObj/sc_ScSpreadsheetSettingsObj.xba new file mode 100644 index 000000000000..db445896a86e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettingsObj/sc_ScSpreadsheetSettingsObj.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="sc_ScSpreadsheetSettingsObj" 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: +' sc.ScSpreadsheetSettingsObj +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettingsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettingsObj/script.xlb new file mode 100644 index 000000000000..303297ae4c64 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSpreadsheetSettingsObj/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="sc_ScSpreadsheetSettingsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScSpreadsheetSettingsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScStyleFamiliesObj/sc_ScStyleFamiliesObj.xba b/qadevOOo/tests/basic/mod/sc/ScStyleFamiliesObj/sc_ScStyleFamiliesObj.xba new file mode 100644 index 000000000000..030c130e13a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScStyleFamiliesObj/sc_ScStyleFamiliesObj.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScStyleFamiliesObj" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScStyleFamiliesObj +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc.StyleFamilies + + ' nGlobalLong is 2 "CellStyles" and "PageStyles" + nGlobalLong = 2 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScStyleFamiliesObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScStyleFamiliesObj/script.xlb new file mode 100644 index 000000000000..5e7e3bee29ba --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScStyleFamiliesObj/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="sc_ScStyleFamiliesObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScStyleFamiliesObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScStyleFamilyObj/sc_ScStyleFamilyObj.xba b/qadevOOo/tests/basic/mod/sc/ScStyleFamilyObj/sc_ScStyleFamilyObj.xba new file mode 100644 index 000000000000..cfef8896328e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScStyleFamilyObj/sc_ScStyleFamilyObj.xba @@ -0,0 +1,84 @@ +<?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="sc_ScStyleFamilyObj" 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 nGlobalLong As Long +Global oInstance As Object +Global cNameToReplace As String +Global oReplaceInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScStyleFamilyObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc.StyleFamilies.getByName("PageStyles") + + ' creating differen formats + oInstance = oDoc.createInstance("com.sun.star.style.PageStyle") + oInstance.BackgroundColor = 65280 + oObj.insertByName(cObjectName & "_Green", oInstance) + + oInstance = oDoc.createInstance("com.sun.star.style.PageStyle") + oInstance.HeaderOn = false + oInstance.FooterOn = true + oObj.insertByName(cObjectName & "_FooterOn", oInstance) + + oReplaceInstance = oDoc.createInstance("com.sun.star.style.PageStyle") + oReplaceInstance.IsLandscape = true + cNameToReplace = cObjectName & "_FooterOn" + + oInstance = oDoc.createInstance("com.sun.star.style.PageStyle") + oInstance.HeaderOn = true + oInstance.FooterOn = false + + nGlobalLong = oObj.Count + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScStyleFamilyObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScStyleFamilyObj/script.xlb new file mode 100644 index 000000000000..72004d2ef4e1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScStyleFamilyObj/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="sc_ScStyleFamilyObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScStyleFamilyObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScStyleObj/sc_ScStyleObj.xba b/qadevOOo/tests/basic/mod/sc/ScStyleObj/sc_ScStyleObj.xba new file mode 100644 index 000000000000..383f68fadd08 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScStyleObj/sc_ScStyleObj.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="sc_ScStyleObj" 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: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + +' Requiered for com.sun.star.style.XStyle + Global oStandartStyle As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScStyleObj +'************************************************************************* +On Error Goto ErrHndl + Dim oStyleFamilies, aElementNames As Variant + Dim oCell, oStyleFamily, oNew As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oCell = oDoc.Sheets(0).getCellByPosition(0, 0) + oStyleFamilies = oDoc.StyleFamilies + aElementNames = oStyleFamilies.Elementnames + oNew = oDoc.createInstance("com.sun.star.style.CellStyle") + oStyleFamily = oStyleFamilies.getByIndex(0)' + oStyleFamily.insertByName("Dummy", oNew) + oObj = oStyleFamily.getByName("Dummy") + + oCell.setPropertyValue("CellStyle", "Dummy") + + cNameToSet = aElementNames(0) + oStandartStyle = oStyleFamily.getByIndex(0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScStyleObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScStyleObj/script.xlb new file mode 100644 index 000000000000..50fa02f3da2c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScStyleObj/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="sc_ScStyleObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScStyleObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScSubTotalDescriptorBase/sc_ScSubTotalDescriptorBase.xba b/qadevOOo/tests/basic/mod/sc/ScSubTotalDescriptorBase/sc_ScSubTotalDescriptorBase.xba new file mode 100644 index 000000000000..7c90e914f6f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSubTotalDescriptorBase/sc_ScSubTotalDescriptorBase.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScSubTotalDescriptorBase" 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: +' sc.ScSubTotalDescriptorBase +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim SubTotalDsc As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + SubTotalDsc = oDoc.Sheets(0).createSubTotalDescriptor(true) + oObj = SubTotalDsc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScSubTotalDescriptorBase/script.xlb b/qadevOOo/tests/basic/mod/sc/ScSubTotalDescriptorBase/script.xlb new file mode 100644 index 000000000000..c3a54021d887 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSubTotalDescriptorBase/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="sc_ScSubTotalDescriptorBase" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScSubTotalDescriptorBase"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScSubTotalFieldObj/sc_ScSubTotalFieldObj.xba b/qadevOOo/tests/basic/mod/sc/ScSubTotalFieldObj/sc_ScSubTotalFieldObj.xba new file mode 100644 index 000000000000..ed5d6056e17d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSubTotalFieldObj/sc_ScSubTotalFieldObj.xba @@ -0,0 +1,66 @@ +<?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="sc_ScSubTotalFieldObj" 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: +' sc.ScSubTotalFieldObj +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim SubTotalDsc As Object + Dim SubTotalCol(0) As New com.sun.star.sheet.SubTotalColumn + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + SubTotalDsc = oDoc.Sheets(0).createSubTotalDescriptor(true) + SubTotalCol(0).Column = 5 + SubTotalCol(0).Function = com.sun.star.sheet.GeneralFunction.SUM + + SubTotalDsc.addNew(SubTotalCol(), 1) + oObj = SubTotalDsc.getByIndex(0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScSubTotalFieldObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScSubTotalFieldObj/script.xlb new file mode 100644 index 000000000000..82bd8e5d8093 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScSubTotalFieldObj/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="sc_ScSubTotalFieldObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScSubTotalFieldObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTabViewObj/sc_ScTabViewObj.xba b/qadevOOo/tests/basic/mod/sc/ScTabViewObj/sc_ScTabViewObj.xba new file mode 100644 index 000000000000..b0922cc39321 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTabViewObj/sc_ScTabViewObj.xba @@ -0,0 +1,64 @@ +<?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="sc_ScTabViewObj" 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: + +' Requiered for com.sun.star.view.XSelectionSupplier + Global SelectableObj1 As Object + Global SelectableObj2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScTabViewObj +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc.currentController + SelectableObj1 = oDoc.Sheets(0).getCellRangeByPosition(1, 1, 4, 5) + SelectableObj2 = oDoc.Sheets(0).getCellRangeByPosition(2, 4, 6, 7) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTabViewObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTabViewObj/script.xlb new file mode 100644 index 000000000000..c5c89921ff64 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTabViewObj/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="sc_ScTabViewObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTabViewObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableColumnObj/sc_ScTableColumnObj.xba b/qadevOOo/tests/basic/mod/sc/ScTableColumnObj/sc_ScTableColumnObj.xba new file mode 100644 index 000000000000..c416d50df2d8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableColumnObj/sc_ScTableColumnObj.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScTableColumnObj" 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: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScTableColumnObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet, oColumn, oCellRange As Object + Dim oColumns As Variant + + oDoc = utils.createDocument("scalc", cObjectName) + oSheet = oDoc.Sheets(0) + oCellRange = oSheet.getCellRangeByPosition(0,0,10,10) + oColumns = oCellRange.getColumns + oColumn = oColumns.getByIndex(5) + + oObj = oColumn + cNameToSet = "fixed" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableColumnObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableColumnObj/script.xlb new file mode 100644 index 000000000000..eb8c487202f9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableColumnObj/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="sc_ScTableColumnObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableColumnObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableColumnsObj/sc_ScTableColumnsObj.xba b/qadevOOo/tests/basic/mod/sc/ScTableColumnsObj/sc_ScTableColumnsObj.xba new file mode 100644 index 000000000000..fbf62a1c43bb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableColumnsObj/sc_ScTableColumnsObj.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScTableColumnsObj" 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 XTableColumns + Global oTable As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScTableColumnsObj +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("scalc", cObjectName) + oTable = oDoc.Sheets(0) + oObj = oTable.getColumns() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableColumnsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableColumnsObj/script.xlb new file mode 100644 index 000000000000..9e80c2978193 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableColumnsObj/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="sc_ScTableColumnsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableColumnsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableConditionalEntry/sc_ScTableConditionalEntry.xba b/qadevOOo/tests/basic/mod/sc/ScTableConditionalEntry/sc_ScTableConditionalEntry.xba new file mode 100644 index 000000000000..e6956b4cb952 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableConditionalEntry/sc_ScTableConditionalEntry.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="sc_ScTableConditionalEntry" 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: +' sc.ScTableConditionalEntry +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oSheet, oConditionalFormat As Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets(0) + oSheet.getCellByPosition(5, 5).Value = 15 + oSheet.getCellByPosition(1, 4).Value = 10 + oSheet.getCellByPosition(2, 0).Value = -5.15 + + oConditionalFormat = oSheet.getPropertyValue("ConditionalFormat") + + Dim oCellAddress As New com.sun.star.table.CellAddress + oCellAddress.Sheet = 0 + oCellAddress.Row = 1 + oCellAddress.Column = 5 + + Dim oProps(4) As New com.sun.star.beans.PropertyValue + oProps(0).Name = "StyleName" + oProps(0).Value = "Result2" + oProps(1).Name = "Formula1" + oProps(1).Value = "$Sheet1.$B$5" + oProps(2).Name = "Formula2" + oProps(2).Value = "" + oProps(3).Name = "Operator" + oProps(3).Value = com.sun.star.sheet.ConditionOperator.EQUAL + oProps(4).Name = "SourcePosition" + oProps(4).Value = oCellAddress + + oConditionalFormat.AddNew(oProps()) + + oCellAddress.Sheet = 0 + oCellAddress.Row = 1 + oCellAddress.Column = 5 + + oProps(0).Name = "StyleName" + oProps(0).Value = "Result2" + oProps(1).Name = "Formula1" + oProps(1).Value = "$Sheet1.$B$3" + oProps(2).Name = "Formula2" + oProps(2).Value = "" + oProps(3).Name = "Operator" + oProps(3).Value = com.sun.star.sheet.ConditionOperator.EQUAL + oProps(4).Name = "SourcePosition" + oProps(4).Value = oCellAddress + + oConditionalFormat.AddNew(oProps()) + + oObj = oConditionalFormat.getByIndex(0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableConditionalEntry/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableConditionalEntry/script.xlb new file mode 100644 index 000000000000..4dcc8f67ca63 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableConditionalEntry/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="sc_ScTableConditionalEntry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableConditionalEntry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableConditionalFormat/sc_ScTableConditionalFormat.xba b/qadevOOo/tests/basic/mod/sc/ScTableConditionalFormat/sc_ScTableConditionalFormat.xba new file mode 100644 index 000000000000..cd19406e9f35 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableConditionalFormat/sc_ScTableConditionalFormat.xba @@ -0,0 +1,104 @@ +<?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="sc_ScTableConditionalFormat" 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: +' sc.ScTableConditionalFormat +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets(0) + oSheet.getCellByPosition(5, 5).Value = 15 + oSheet.getCellByPosition(1, 4).Value = 10 + oSheet.getCellByPosition(2, 0).Value = -5.15 + + oObj = oSheet.getPropertyValue("ConditionalFormat") + + Dim oCellAddress As New com.sun.star.table.CellAddress + oCellAddress.Sheet = 0 + oCellAddress.Row = 1 + oCellAddress.Column = 5 + + Dim oProps(4) As New com.sun.star.beans.PropertyValue + oProps(0).Name = "StyleName" + oProps(0).Value = "Result2" + oProps(1).Name = "Formula1" + oProps(1).Value = "$Sheet1.$B$5" + oProps(2).Name = "Formula2" + oProps(2).Value = "" + oProps(3).Name = "Operator" + oProps(3).Value = com.sun.star.sheet.ConditionOperator.EQUAL + oProps(4).Name = "SourcePosition" + oProps(4).Value = oCellAddress + + oObj.AddNew(oProps()) + + oCellAddress.Sheet = 0 + oCellAddress.Row = 1 + oCellAddress.Column = 5 + + oProps(0).Name = "StyleName" + oProps(0).Value = "Result2" + oProps(1).Name = "Formula1" + oProps(1).Value = "$Sheet1.$B$3" + oProps(2).Name = "Formula2" + oProps(2).Value = "" + oProps(3).Name = "Operator" + oProps(3).Value = com.sun.star.sheet.ConditionOperator.EQUAL + oProps(4).Name = "SourcePosition" + oProps(4).Value = oCellAddress + + oObj.AddNew(oProps()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub ReCreateObj() + if not isNULL(oDoc) then oDoc.dispose() + CreateObj() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableConditionalFormat/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableConditionalFormat/script.xlb new file mode 100644 index 000000000000..0b636a6bb49a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableConditionalFormat/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="sc_ScTableConditionalFormat" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableConditionalFormat"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableRowObj/sc_ScTableRowObj.xba b/qadevOOo/tests/basic/mod/sc/ScTableRowObj/sc_ScTableRowObj.xba new file mode 100644 index 000000000000..7ceabf00d669 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableRowObj/sc_ScTableRowObj.xba @@ -0,0 +1,64 @@ +<?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="sc_ScTableRowObj" 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: +' sc.ScTableRowObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + Dim oRows As Variant + Dim oRow As Object + + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets(0) + oRows = oSheet.getRows + oRow = oRows.getByIndex(5) + + oObj = oRow + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableRowObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableRowObj/script.xlb new file mode 100644 index 000000000000..0aa03bfc0922 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableRowObj/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="sc_ScTableRowObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableRowObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableRowsObj/sc_ScTableRowsObj.xba b/qadevOOo/tests/basic/mod/sc/ScTableRowsObj/sc_ScTableRowsObj.xba new file mode 100644 index 000000000000..f794bd93db06 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableRowsObj/sc_ScTableRowsObj.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScTableRowsObj" 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: + +' Requiered for XTableRows + Global oTable As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScTableRowsObj +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("scalc", cObjectName) + oTable = oDoc.Sheets(0) + oObj = oTable.getRows() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableRowsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableRowsObj/script.xlb new file mode 100644 index 000000000000..0c0d33a2d264 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableRowsObj/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="sc_ScTableRowsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableRowsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableSheetObj/sc_ScTableSheetObj.xba b/qadevOOo/tests/basic/mod/sc/ScTableSheetObj/sc_ScTableSheetObj.xba new file mode 100644 index 000000000000..86439b375d75 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableSheetObj/sc_ScTableSheetObj.xba @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScTableSheetObj" 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.sheet.Spreadsheet +Global sStyleName As String + +' Required for com.sun.star.chart.XChartData +Global oCellToChange As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScTableSheetObj +'************************************************************************* +On Error Goto ErrHndl + Dim oStyleFamilies As Variant + Dim oNewPageStyle As Object + Dim oStyleFamily As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc.sheets(0) + + sStyleName = "MyStyle" + ' Adding new page style for Spreadsheet service testing + oStyleFamilies = oDoc.StyleFamilies + oStyleFamily = oStyleFamilies.getByName("PageStyles") + oNewPageStyle = oDoc.createInstance("com.sun.star.style.PageStyle") + oStyleFamily.insertByName(sStyleName, oNewPageStyle) + + oCellToChange = oObj.getCellByPosition(2, 2) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +Function modifyDescriptor(descr As Variant) As Variant +On Error Goto ErrHndl + Dim i As Integer, n as Integer + Dim oCell As Object + Dim vFields(0) as new com.sun.star.table.TableSortField + + for i = 0 to 10 - 1 + oCell = oObj.getCellByPosition(0, i) + oCell.String = "" + (10 - i) + oCell.setFormula(10 - i) + next i + 'ShowNameValuePair(descr) + vFields(0).IsCaseSensitive = false + vFields(0).IsAscending = true + vFields(0).FieldType = com.sun.star.table.TableSortFieldType.ALPHANUMERIC + for i = 0 to ubound(descr) + if descr(i).Name = "IsSortColumns" then descr(i).Value = false + if descr(i).Name = "SortFields" then descr(i).Value = vFields() + next i + + modifyDescriptor() = descr +Exit Function +ErrHndl: + Out.Log("Exception in ScTableSheetObj.modifyDescriptor() :") + Test.Exception() +end Function + +Function checkSort() As Boolean +On Error Goto ErrHndl + Dim i As Integer, oCell As Object + Dim bOK As Boolean + + bOK = true + for i = 0 to 10 - 1 + oCell = oObj.getCellByPosition(0,i) + bOK = bOK AND oCell.String = "" + (i + 1) + out.dbg(oCell.String + ":" + (i+1)) + next i + + checkSort() = bOK +Exit Function +ErrHndl: + Out.Log("Exception in ScTableSheetObj.checkSort() :") + Test.Exception() +end Function + + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableSheetObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableSheetObj/script.xlb new file mode 100644 index 000000000000..5779c6344207 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableSheetObj/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="sc_ScTableSheetObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableSheetObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableSheetsObj/sc_ScTableSheetsObj.xba b/qadevOOo/tests/basic/mod/sc/ScTableSheetsObj/sc_ScTableSheetsObj.xba new file mode 100644 index 000000000000..d8d7db30c672 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableSheetsObj/sc_ScTableSheetsObj.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="sc_ScTableSheetsObj" 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: + +' Requiered for XSpreadsheets + Global nGlobalLong As Long 'the number of sheets + +' Requiered for XNameReplace + Global cNameToReplace As String 'name of instance to be replased + Global oReplaceInstance As Object 'instance, that will be inserted + 'instead old one + +' Requiered for XNameContainer + Global oInstance As Object 'instance to insert + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScTableSheetsObj +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("scalc", cObjectName) + oObj = oDoc.sheets + + nGlobalLong = oObj.count() + cNameToReplace = "Sheet1" + oReplaceInstance = oDoc.createInstance("com.sun.star.sheet.Spreadsheet") + oReplaceInstance.Name = "ReplaceInstance" + + oInstance = oDoc.createInstance("com.sun.star.sheet.Spreadsheet") + oInstance.Name = "InsertInstance" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableSheetsObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableSheetsObj/script.xlb new file mode 100644 index 000000000000..769981f22ad2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableSheetsObj/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="sc_ScTableSheetsObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableSheetsObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableValidationObj/sc_ScTableValidationObj.xba b/qadevOOo/tests/basic/mod/sc/ScTableValidationObj/sc_ScTableValidationObj.xba new file mode 100644 index 000000000000..3d021a91eb3e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableValidationObj/sc_ScTableValidationObj.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScTableValidationObj" 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: +' sc.ScTableValidationObj +'************************************************************************* +On Error Goto ErrHndl + Dim oSheet As Object + + oDoc = utils.createDocument("scalc", cObjectName) + + oSheet = oDoc.Sheets.getByIndex(0) + oObj = oSheet.getPropertyValue("Validation") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScTableValidationObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScTableValidationObj/script.xlb new file mode 100644 index 000000000000..475644b9a162 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScTableValidationObj/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="sc_ScTableValidationObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScTableValidationObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/ScViewPaneObj/sc_ScViewPaneObj.xba b/qadevOOo/tests/basic/mod/sc/ScViewPaneObj/sc_ScViewPaneObj.xba new file mode 100644 index 000000000000..303a1593d86f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScViewPaneObj/sc_ScViewPaneObj.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sc_ScViewPaneObj" 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.sheet.XCellRangeReferrer +Global oReferredCells As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.ScViewPaneObj +'************************************************************************* +On Error Goto ErrHndl + Dim oController As Object + + oDoc = utils.createDocument("scalc", cObjectName) + oController = oDoc.getCurrentController() + oObj = oController.getByIndex(0) + wait(1000) + + oReferredCells = oObj.getVisibleRange() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if not isNULL(oDoc) then oDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/ScViewPaneObj/script.xlb b/qadevOOo/tests/basic/mod/sc/ScViewPaneObj/script.xlb new file mode 100644 index 000000000000..c4b6ca9fb33b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/ScViewPaneObj/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="sc_ScViewPaneObj" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_ScViewPaneObj"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLContentExporter/sc_XMLContentExporter.xba b/qadevOOo/tests/basic/mod/sc/XMLContentExporter/sc_XMLContentExporter.xba new file mode 100644 index 000000000000..61a2c69b6478 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLContentExporter/sc_XMLContentExporter.xba @@ -0,0 +1,124 @@ +<?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="sc_XMLContentExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLContentExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 As Variant + Dim expString As String + Dim oSheets, oSheet, oCell As Object + + printXML = true + expString = "XMLContentExporter" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("scalc", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-content") + Tag2 = Array("office:body") + Tag3 = Array("office:script") + Tag4 = Array("table:table") + Tag5 = Array("table:table-column") + Tag6 = Array("table:table-row") + Tag7 = Array("table:table-cell") + Tag8 = Array("text:p") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag1), _ + Array("TagEnclosed", Tag4, Tag2), _ + Array("TagEnclosed", Tag5, Tag4), _ + Array("TagEnclosed", Tag6, Tag4), _ + Array("TagEnclosed", Tag7, Tag6), _ + Array("TagEnclosed", Tag8, Tag7), _ + Array("CharsEnclosed", Tag8, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Calc.XMLContentExporter", initArgs()) + + oSheets = oDoc.getSheets() + oSheet = oSheets.getByIndex(0) + oCell = oSheet.getCellByPosition(0, 0) + oCell.setFormula(expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "scalc: StarOffice XML (spreadsheet)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLContentExporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLContentExporter/script.xlb new file mode 100644 index 000000000000..64f440f3d14e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLContentExporter/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="sc_XMLContentExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLContentExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLContentImporter/sc_XMLContentImporter.xba b/qadevOOo/tests/basic/mod/sc/XMLContentImporter/sc_XMLContentImporter.xba new file mode 100644 index 000000000000..34b76255a9d1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLContentImporter/sc_XMLContentImporter.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="sc_XMLContentImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sValue As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLContentImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("scalc", cObjectName) + oObj = createUnoService("com.sun.star.comp.Calc.XMLContentImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sValue = "XMLContentImporter_test" + vXMLData = Array( _ + Array("start", "office:document-content", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table", _ + "office:class", "CDATA", "spreadsheet"), _ + Array("start", "office:body"), _ + Array("start", "table:table", _ + "table:name", "CDATA", sValue), _ + Array("end", "table:table"), _ + Array("end", "office:body"), _ + Array("end", "office:document-content")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim sheets As Object + out.log("checking of import...") + sheets = oDoc.getSheets() + res = sheets.hasByName(sValue) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLContentImporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLContentImporter/script.xlb new file mode 100644 index 000000000000..a4af6299ac20 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLContentImporter/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="sc_XMLContentImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLContentImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLExporter/sc_XMLExporter.xba b/qadevOOo/tests/basic/mod/sc/XMLExporter/sc_XMLExporter.xba new file mode 100644 index 000000000000..bd087a3b2b9e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLExporter/sc_XMLExporter.xba @@ -0,0 +1,122 @@ +<?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="sc_XMLExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8 As Variant + Dim expString As String + Dim oSheets As Object + Dim oSheet As Object + + printXML = true + expString = "NewNameOfSheet" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("scalc", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document") + Tag2 = Array("office:meta") + Tag3 = Array("office:settings") + Tag4 = Array("office:script") + Tag5 = Array("office:styles") + Tag6 = Array("office:body") + Tag7 = Array("table:table") + Tag8 = Array("table:table", "table:name", expString) + filter = Array( _ + Array("TagExists", Tag1, Tag8), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag1), _ + Array("TagEnclosed", Tag4, Tag1), _ + Array("TagEnclosed", Tag5, Tag1), _ + Array("TagEnclosed", Tag6, Tag1), _ + Array("TagEnclosed", Tag7, Tag6) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Calc.XMLExporter", initArgs()) + + oSheets = oDoc.getSheets() + oSheet = oSheets.getByIndex(0) + oSheet.setName(expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "scalc: StarOffice XML (spreadsheet)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLExporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLExporter/script.xlb new file mode 100644 index 000000000000..bbad099091c6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLExporter/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="sc_XMLExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLImporter/sc_XMLImporter.xba b/qadevOOo/tests/basic/mod/sc/XMLImporter/sc_XMLImporter.xba new file mode 100644 index 000000000000..3e2afecef2e2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLImporter/sc_XMLImporter.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="sc_XMLImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sValue As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("scalc", cObjectName) + oObj = createUnoService("com.sun.star.comp.Calc.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sValue = "XMLContentImporter_test" + vXMLData = Array( _ + Array("start", "office:document-content", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table", _ + "office:class", "CDATA", "spreadsheet"), _ + Array("start", "office:body"), _ + Array("start", "table:table", _ + "table:name", "CDATA", sValue), _ + Array("end", "table:table"), _ + Array("end", "office:body"), _ + Array("end", "office:document-content")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim sheets As Object + out.log("checking of import...") + sheets = oDoc.getSheets() + res = sheets.hasByName(sValue) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLImporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLImporter/script.xlb new file mode 100644 index 000000000000..0f1844030b73 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLImporter/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="sc_XMLImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLMetaExporter/sc_XMLMetaExporter.xba b/qadevOOo/tests/basic/mod/sc/XMLMetaExporter/sc_XMLMetaExporter.xba new file mode 100644 index 000000000000..0677211a3bdc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLMetaExporter/sc_XMLMetaExporter.xba @@ -0,0 +1,110 @@ +<?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="sc_XMLMetaExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLMetaExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3 As Variant + Dim expString As String + Dim oDocInfo As Object + + printXML = true + expString = "NewTitleOfCalcDoc" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("scalc", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-meta") + Tag2 = Array("office:meta") + Tag3 = Array("dc:title") + filter = Array( _ + Array("TagExists", Tag1, Tag2), _ + Array("CharsEnclosed", Tag3, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Calc.XMLMetaExporter", initArgs()) + + oDocInfo = oDoc.getDocumentInfo() + oDocInfo.setPropertyValue("Title", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "scalc: StarOffice XML (spreadsheet)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLMetaExporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLMetaExporter/script.xlb new file mode 100644 index 000000000000..a21f959a083b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLMetaExporter/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="sc_XMLMetaExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLMetaExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLMetaImporter/sc_XMLMetaImporter.xba b/qadevOOo/tests/basic/mod/sc/XMLMetaImporter/sc_XMLMetaImporter.xba new file mode 100644 index 000000000000..7bb319975478 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLMetaImporter/sc_XMLMetaImporter.xba @@ -0,0 +1,93 @@ +<?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="sc_XMLMetaImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sTitle As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLMetaImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("scalc", cObjectName) + oObj = createUnoService("com.sun.star.comp.Calc.XMLMetaImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sTitle = "XMLMetaImporter" + vXMLData = Array( _ + Array("start", "office:document-meta", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:meta", "CDATA", "http://openoffice.org/2000/meta", _ + "xmlns:dc", "CDATA", "http://purl.org/dc/elements/1.1/"), _ + Array("start", "office:meta"), _ + Array("start", "dc:title"), _ + Array("chars", sTitle), _ + Array("end", "dc:title"), _ + Array("end", "office:meta"), _ + Array("end", "office:document-meta")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim docInfo As Object + Dim title As String + out.log("checking of import...") + docInfo = oDoc.getDocumentInfo() + title = docInfo.getPropertyValue("Title") + res = title = sTitle + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLMetaImporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLMetaImporter/script.xlb new file mode 100644 index 000000000000..b206fbd0b7f2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLMetaImporter/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="sc_XMLMetaImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLMetaImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLSettingsExporter/sc_XMLSettingsExporter.xba b/qadevOOo/tests/basic/mod/sc/XMLSettingsExporter/sc_XMLSettingsExporter.xba new file mode 100644 index 000000000000..6134c2e9b535 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLSettingsExporter/sc_XMLSettingsExporter.xba @@ -0,0 +1,118 @@ +<?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="sc_XMLSettingsExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLSettingsExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3 As Variant + Dim oProp, oPropToSet As Boolean + Dim oController As Object + + printXML = true + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("scalc", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + oController = oDoc.getCurrentController() + oProp = oController.getPropertyValue("ShowGrid") + if (oProp = false) then + oPropToSet = true + else + oPropToSet = false + endif + + + Tag1 = Array("office:document-settings") + Tag2 = Array("office:settings") + Tag3 = Array("config:config-item", "config:name", "ShowGrid") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("CharsEnclosed", Tag3, LCase(oPropToSet)) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Calc.XMLSettingsExporter", initArgs()) + + oController.setPropertyValue("ShowGrid", oPropToSet) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "scalc: StarOffice XML (spreadsheet)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLSettingsExporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLSettingsExporter/script.xlb new file mode 100644 index 000000000000..78a3fcfeac0d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLSettingsExporter/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="sc_XMLSettingsExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLSettingsExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLSettingsImporter/sc_XMLSettingsImporter.xba b/qadevOOo/tests/basic/mod/sc/XMLSettingsImporter/sc_XMLSettingsImporter.xba new file mode 100644 index 000000000000..c29b15d20727 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLSettingsImporter/sc_XMLSettingsImporter.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="sc_XMLSettingsImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLSettingsImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("scalc", cObjectName) + oObj = createUnoService("com.sun.star.comp.Calc.XMLSettingsImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + vXMLData = Array( _ + Array("start", "office:document-settings", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:xlink", "CDATA", "http://www.w3.org/1999/xlink", _ + "xmlns:config", "CDATA", "http://openoffice.org/2001/config"), _ + Array("start", "office:settings"), _ + Array("start", "config:config-item-set", _ + "config:name", "CDATA", "view-settings"), _ + Array("start", "config:config-item-map-indexed", _ + "config:name", "CDATA", "Views"), _ + Array("start", "config:config-item-map-entry"), _ + Array("start", "config:config-item", _ + "config:name", "CDATA", "ShowGrid", _ + "config:type", "CDATA", "boolean"), _ + Array("chars", "false"), _ + Array("end", "config:config-item"), _ + Array("end", "config:config-item-map-entry"), _ + Array("end", "config:config-item-map-indexed"), _ + Array("end", "config:config-item-set"), _ + Array("end", "office:settings"), _ + Array("end", "office:document-settings")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim controller As Object + Dim isShowGrid As Boolean + out.log("checking of import...") + controller = oDoc.getCurrentController() + isShowGrid = controller.getPropertyValue("ShowGrid") + res = not isShowGrid + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLSettingsImporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLSettingsImporter/script.xlb new file mode 100644 index 000000000000..108809c8a8bf --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLSettingsImporter/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="sc_XMLSettingsImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLSettingsImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLStylesExporter/sc_XMLStylesExporter.xba b/qadevOOo/tests/basic/mod/sc/XMLStylesExporter/sc_XMLStylesExporter.xba new file mode 100644 index 000000000000..509c07e8abfa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLStylesExporter/sc_XMLStylesExporter.xba @@ -0,0 +1,110 @@ +<?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="sc_XMLStylesExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLStylesExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2 As Variant + Dim expString As String + Dim oStyleFamilies, oSFNames, oFamilyName, oFamily, oStyle As Object + + printXML = true + expString = "NewCellStyle" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("scalc", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-styles") + Tag2 = Array("style:style", "style:name", expString) + filter = Array(Array("TagExists", Tag1, Tag2)) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Calc.XMLStylesExporter", initArgs()) + + oStyleFamilies = oDoc.getStyleFamilies() + oSFNames = oStyleFamilies.getElementNames() + oFamilyName = oSFNames(0) + oFamily = oStyleFamilies.getByName(oFamilyName) + oStyle = oDoc.createInstance("com.sun.star.style.CellStyle") + oFamily.insertByName(expString, oStyle) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "scalc: StarOffice XML (spreadsheet)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLStylesExporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLStylesExporter/script.xlb new file mode 100644 index 000000000000..49e80bcb9391 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLStylesExporter/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="sc_XMLStylesExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLStylesExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sc/XMLStylesImporter/sc_XMLStylesImporter.xba b/qadevOOo/tests/basic/mod/sc/XMLStylesImporter/sc_XMLStylesImporter.xba new file mode 100644 index 000000000000..3d451d4054c0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLStylesImporter/sc_XMLStylesImporter.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="sc_XMLStylesImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sStyleName As String + +' Required for com.sun.star.document.XImporter + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sc.XMLStylesImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("scalc", cObjectName) + oObj = createUnoService("com.sun.star.comp.Calc.XMLStylesImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sStyleName = "XMLStylesImporter" + vXMLData = Array( _ + Array("start", "office:document-styles", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:style", "CDATA", "http://openoffice.org/2000/style", _ + "xmlns:fo", "CDATA", "http://www.w3.org/1999/XSL/Format", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table"), _ + Array("start", "office:styles"), _ + Array("start", "style:style", _ + "style:name", "CDATA", sStyleName, _ + "style:family", "CDATA", "table-cell", _ + "style:parent-style-name", "CDATA", "Default"), _ + Array("start", "style:properties", _ + "fo:width", "CDATA", "12cm", _ + "fo:background-color", "CDATA", "light-grey"), _ + Array("end", "style:properties"), _ + Array("end", "style:style"), _ + Array("end", "office:styles"), _ + Array("end", "office:document-styles")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oStyleFamilies, oFamily As Object + Dim vNames As Variant + out.log("checking of import...") + oStyleFamilies = oDoc.getStyleFamilies() + oFamily = oStyleFamilies.getByName("CellStyles") + res = oFamily.hasByName(sStyleName) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sc/XMLStylesImporter/script.xlb b/qadevOOo/tests/basic/mod/sc/XMLStylesImporter/script.xlb new file mode 100644 index 000000000000..3a39542a031b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sc/XMLStylesImporter/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="sc_XMLStylesImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sc_XMLStylesImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccArea/sch_AccArea.xba b/qadevOOo/tests/basic/mod/sch/AccArea/sch_AccArea.xba new file mode 100644 index 000000000000..8ba48afa97f1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccArea/sch_AccArea.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_AccArea" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccArea +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + Dim oChart as Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Area") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccArea/script.xlb b/qadevOOo/tests/basic/mod/sch/AccArea/script.xlb new file mode 100644 index 000000000000..02c7830060bb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccArea/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="sch_AccArea" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccArea"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccAxis/sch_AccAxis.xba b/qadevOOo/tests/basic/mod/sch/AccAxis/sch_AccAxis.xba new file mode 100644 index 000000000000..b80e9b9c7f25 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccAxis/sch_AccAxis.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_AccAxis" 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: + +Dim oListener1 As Object +Dim oListener2 As Object +Dim bL1called As Boolean +Dim bL2called As Boolean +Dim oDoc as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccAxis +'************************************************************************* + + + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "axis") + + Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module>
\ No newline at end of file diff --git a/qadevOOo/tests/basic/mod/sch/AccAxis/script.xlb b/qadevOOo/tests/basic/mod/sch/AccAxis/script.xlb new file mode 100644 index 000000000000..012b217481a8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccAxis/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="sch_AccAxis" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccAxis"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccDataPoint/sch_AccDataPoint.xba b/qadevOOo/tests/basic/mod/sch/AccDataPoint/sch_AccDataPoint.xba new file mode 100644 index 000000000000..af177ef65942 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccDataPoint/sch_AccDataPoint.xba @@ -0,0 +1,68 @@ +<?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="sch_AccDataPoint" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccDataPoint +'************************************************************************* +On Error Goto ErrHndl + + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "DataPoint") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccDataPoint/script.xlb b/qadevOOo/tests/basic/mod/sch/AccDataPoint/script.xlb new file mode 100644 index 000000000000..2402c2773442 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccDataPoint/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="sch_AccDataPoint" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccDataPoint"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccDataSeries/sch_AccDataSeries.xba b/qadevOOo/tests/basic/mod/sch/AccDataSeries/sch_AccDataSeries.xba new file mode 100644 index 000000000000..92aa828e6d9a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccDataSeries/sch_AccDataSeries.xba @@ -0,0 +1,67 @@ +<?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="sch_AccDataSeries" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccDataSeries +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Data") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccDataSeries/script.xlb b/qadevOOo/tests/basic/mod/sch/AccDataSeries/script.xlb new file mode 100644 index 000000000000..5fd9a49a7639 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccDataSeries/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="sch_AccDataSeries" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccDataSeries"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccDiagram/sch_AccDiagram.xba b/qadevOOo/tests/basic/mod/sch/AccDiagram/sch_AccDiagram.xba new file mode 100644 index 000000000000..8244d25a9e2e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccDiagram/sch_AccDiagram.xba @@ -0,0 +1,67 @@ +<?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="sch_AccDiagram" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccDiagram +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Diagram") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccDiagram/script.xlb b/qadevOOo/tests/basic/mod/sch/AccDiagram/script.xlb new file mode 100644 index 000000000000..3479707bb2ca --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccDiagram/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="sch_AccDiagram" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccDiagram"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccFloor/sch_AccFloor.xba b/qadevOOo/tests/basic/mod/sch/AccFloor/sch_AccFloor.xba new file mode 100644 index 000000000000..7aefe5a882d2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccFloor/sch_AccFloor.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="sch_AccFloor" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccFloor +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + Dim oDiagram as Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + Out.Log("Change Diagram to 3D...") + oDiagram = oDoc.getDiagram() + oDiagram.Dim3D = TRUE + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Floor") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccFloor/script.xlb b/qadevOOo/tests/basic/mod/sch/AccFloor/script.xlb new file mode 100644 index 000000000000..644d958fc792 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccFloor/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="sch_AccFloor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccFloor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccGrid/sch_AccGrid.xba b/qadevOOo/tests/basic/mod/sch/AccGrid/sch_AccGrid.xba new file mode 100644 index 000000000000..1bbc5d13fcd1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccGrid/sch_AccGrid.xba @@ -0,0 +1,67 @@ +<?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="sch_AccGrid" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccGrid +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Grid") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccGrid/script.xlb b/qadevOOo/tests/basic/mod/sch/AccGrid/script.xlb new file mode 100644 index 000000000000..a00c5cd9a74f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccGrid/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="sch_AccGrid" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccGrid"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccLegend/sch_AccLegend.xba b/qadevOOo/tests/basic/mod/sch/AccLegend/sch_AccLegend.xba new file mode 100644 index 000000000000..5bb91900a303 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccLegend/sch_AccLegend.xba @@ -0,0 +1,66 @@ +<?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="sch_AccLegend" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccLegend +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Legend") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccLegend/script.xlb b/qadevOOo/tests/basic/mod/sch/AccLegend/script.xlb new file mode 100644 index 000000000000..53bdb8a79574 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccLegend/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="sch_AccLegend" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccLegend"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccLegendEntry/sch_AccLegendEntry.xba b/qadevOOo/tests/basic/mod/sch/AccLegendEntry/sch_AccLegendEntry.xba new file mode 100644 index 000000000000..f5bc8834af80 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccLegendEntry/sch_AccLegendEntry.xba @@ -0,0 +1,67 @@ +<?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="sch_AccLegendEntry" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccLegendEntry +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "LegendEntry") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccLegendEntry/script.xlb b/qadevOOo/tests/basic/mod/sch/AccLegendEntry/script.xlb new file mode 100644 index 000000000000..6bb8fe3f891a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccLegendEntry/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="sch_AccLegendEntry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccLegendEntry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccStatisticsObject/sch_AccStatisticsObject.xba b/qadevOOo/tests/basic/mod/sch/AccStatisticsObject/sch_AccStatisticsObject.xba new file mode 100644 index 000000000000..c24631b604ad --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccStatisticsObject/sch_AccStatisticsObject.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_AccStatisticsObject" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccStatisticsObject +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + Dim oDiagram as Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + Out.Log("Display MeanValue") + oDiagram = oDoc.getDiagram() + oDiagram.MeanValue = TRUE + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"average") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccStatisticsObject/script.xlb b/qadevOOo/tests/basic/mod/sch/AccStatisticsObject/script.xlb new file mode 100644 index 000000000000..eeee1ade4019 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccStatisticsObject/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="sch_AccStatisticsObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccStatisticsObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccTitle/sch_AccTitle.xba b/qadevOOo/tests/basic/mod/sch/AccTitle/sch_AccTitle.xba new file mode 100644 index 000000000000..1615c9ed7bd3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccTitle/sch_AccTitle.xba @@ -0,0 +1,67 @@ +<?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="sch_AccTitle" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccTitle +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Title") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccTitle/script.xlb b/qadevOOo/tests/basic/mod/sch/AccTitle/script.xlb new file mode 100644 index 000000000000..cc042284ca9f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccTitle/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="sch_AccTitle" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccTitle"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccWall/sch_AccWall.xba b/qadevOOo/tests/basic/mod/sch/AccWall/sch_AccWall.xba new file mode 100644 index 000000000000..9db84ee9dbf5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccWall/sch_AccWall.xba @@ -0,0 +1,66 @@ +<?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="sch_AccWall" 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: + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccWall +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + Dim oWin As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE, "Wall") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccWall/script.xlb b/qadevOOo/tests/basic/mod/sch/AccWall/script.xlb new file mode 100644 index 000000000000..fad5fe8d21c0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccWall/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="sch_AccWall" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccWall"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/AccessibleDocumentView/sch_AccessibleDocumentView.xba b/qadevOOo/tests/basic/mod/sch/AccessibleDocumentView/sch_AccessibleDocumentView.xba new file mode 100644 index 000000000000..a0bed4161c98 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccessibleDocumentView/sch_AccessibleDocumentView.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_AccessibleDocumentView" 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: + +' fireEvent() +Global oWin As Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.AccessibleDocumentView +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT, _ + "AccessibleChartDocumentView") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim rect as new com.sun.star.awt.Rectangle + rect = oWin.getPosSize() + oWin.setPosSize(100,100,100,100,com.sun.star.awt.PosSize.POSSIZE) + oWin.setPosSize(rect.X,rect.Y,rect.Width,rect.Height,_ + com.sun.star.awt.PosSize.POSSIZE) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/AccessibleDocumentView/script.xlb b/qadevOOo/tests/basic/mod/sch/AccessibleDocumentView/script.xlb new file mode 100644 index 000000000000..b5ea1024c8a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/AccessibleDocumentView/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="sch_AccessibleDocumentView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_AccessibleDocumentView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartAxis/sch_ChXChartAxis.xba b/qadevOOo/tests/basic/mod/sch/ChXChartAxis/sch_ChXChartAxis.xba new file mode 100644 index 000000000000..a5388e82a420 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartAxis/sch_ChXChartAxis.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="sch_ChXChartAxis" 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: +' sch.ChXChartAxis +'************************************************************************* +On Error Goto ErrHndl + Dim mRangeAddress(0) As New com.sun.star.table.CellRangeAddress + Dim oChart As Variant + + oDoc = utils.createDocument("scalc", cObjectName) + oChart = utils.createChartObject(oDoc, cObjectName) + + oObj = oChart.Diagram.YAxis +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartAxis/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXChartAxis/script.xlb new file mode 100644 index 000000000000..03789abfa172 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartAxis/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="sch_ChXChartAxis" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXChartAxis"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartData/sch_ChXChartData.xba b/qadevOOo/tests/basic/mod/sch/ChXChartData/sch_ChXChartData.xba new file mode 100644 index 000000000000..78355716fd80 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartData/sch_ChXChartData.xba @@ -0,0 +1,68 @@ +<?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="sch_ChXChartData" 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: + +' Requiered for com.sun.star.chart.XChartData +Global oCellToChange As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChXChartData +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oChart as Object + Dim oDataArray as Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oChart = utils.createChartObject(oDoc, cObjectName) + oDataArray = oChart.getdata() + oObj = oDataArray + + oCellToChange = oDoc.Sheets(0).getCellByPosition(1, 1) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartData/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXChartData/script.xlb new file mode 100644 index 000000000000..f2e2e820e542 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartData/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="sch_ChXChartData" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXChartData"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartDataArray/sch_ChXChartDataArray.xba b/qadevOOo/tests/basic/mod/sch/ChXChartDataArray/sch_ChXChartDataArray.xba new file mode 100644 index 000000000000..1c71c1e32d8f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartDataArray/sch_ChXChartDataArray.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="sch_ChXChartDataArray" 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: + +' Requiered for com.sun.star.chart.XChartData + Global oCellToChange As Object + +' Requiered for XChartDataArray + Global nTableH As Integer + Global nTableW As Integer + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChXChartDataArray +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + oChart = utils.createChartObject(oDoc, cObjectName) + + Dim mRangeAddress(0) As New com.sun.star.table.CellRangeAddress + Dim aRect As New com.sun.star.awt.Rectangle + + nTableH = 5 + nTableW = 5 + + oObj = oChart.getdata() + oCellToChange = oDoc.Sheets(0).getCellByPosition(1, 1) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartDataArray/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXChartDataArray/script.xlb new file mode 100644 index 000000000000..bbed0513544f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartDataArray/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="sch_ChXChartDataArray" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXChartDataArray"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartDocument/sch_ChXChartDocument.xba b/qadevOOo/tests/basic/mod/sch/ChXChartDocument/sch_ChXChartDocument.xba new file mode 100644 index 000000000000..760da775c6e5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartDocument/sch_ChXChartDocument.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="sch_ChXChartDocument" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.frame.XModel + Global oXModelController As Object + Global oXModelSel As Object + Global oXModelToSel As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChXChartDocument +'************************************************************************* +On Error Goto ErrHndl + Dim aProp(0 to 0) As New com.sun.star.beans.PropertyValue + Dim oControllerDoc As Object + Dim oChart as Object + Dim oCompChart as Object + Dim oContChart as Object + Dim oContDoc as Object + + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + + oComponentInstance = utils.loadTestDocument("emptyChart.sds", cObjectName & "1") + + oControllerDoc = utils.loadTestDocument("emptyChart.sds", cObjectName & "2") + + oObj = oDoc + oXModelToSel = oDoc.getTitle() + oXModelController = oControllerDoc.getCurrentController() + oXModelSel = oDoc.getCurrentController() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNULL(oComponentInstance) then oComponentInstance.dispose() + + Dim oControllerDoc As Object + ' To successfully dispose oControllerDoc re-open it first. + oControllerDoc = utils.loadTestDocument("emptyChart.sds", cObjectName & "2") + oControllerDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartDocument/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXChartDocument/script.xlb new file mode 100644 index 000000000000..f3ece473ed8c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartDocument/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="sch_ChXChartDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXChartDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartView/sch_ChXChartView.xba b/qadevOOo/tests/basic/mod/sch/ChXChartView/sch_ChXChartView.xba new file mode 100644 index 000000000000..ea65387c5af0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartView/sch_ChXChartView.xba @@ -0,0 +1,64 @@ +<?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="sch_ChXChartView" 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: + +' Requiered for com.sun.star.view.XSelectionSupplier + Global SelectableObj1 As Object + Global SelectableObj2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChXChartView +'************************************************************************* +On Error Goto ErrHndl + Dim oChart as Object + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oObj = oDoc.getCurrentController() + + SelectableObj1 = oDoc.Legend + SelectableObj2 = oDoc.Title +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXChartView/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXChartView/script.xlb new file mode 100644 index 000000000000..2ef9ba454a24 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXChartView/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="sch_ChXChartView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXChartView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXDataPoint/sch_ChXDataPoint.xba b/qadevOOo/tests/basic/mod/sch/ChXDataPoint/sch_ChXDataPoint.xba new file mode 100644 index 000000000000..ffaa96356df1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXDataPoint/sch_ChXDataPoint.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_ChXDataPoint" 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: +' sch.ChXDataPoint +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oCharts As Variant, oChart As Variant + + bOK = true + + oDoc = utils.loadTestDocument("TransparencyCalcChart.sxc", cObjectName) + + oCharts = oDoc.Sheets(0).Charts + + Dim aNames(), i as integer + aNames = oCharts.getElementNames() + Out.Log("Chart names :") + for i = 0 to ubound(aNames()) + Out.Log("'" + aNames(i) + "'") + next i + + oChart = oCharts.getByName("TestTransparentChart").embeddedObject + + oObj = oChart.Diagram.getDataPointProperties(0, 0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXDataPoint/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXDataPoint/script.xlb new file mode 100644 index 000000000000..47800a7f456b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXDataPoint/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="sch_ChXDataPoint" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXDataPoint"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXDataRow/sch_ChXDataRow.xba b/qadevOOo/tests/basic/mod/sch/ChXDataRow/sch_ChXDataRow.xba new file mode 100644 index 000000000000..14fee9c685b5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXDataRow/sch_ChXDataRow.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_ChXDataRow" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChXDataRow +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oCharts As Variant, oChart As Variant + + bOK = true + + oDoc = utils.loadTestDocument("TransparencyCalcChart.sxc", cObjectName) + + oCharts = oDoc.Sheets(0).Charts + + Dim aNames(), i as integer + aNames = oCharts.getElementNames() + Out.Log("Chart names :") + for i = 0 to ubound(aNames()) + Out.Log("'" + aNames(i) + "'") + next i + + oChart = oCharts.getByName("TestTransparentChart").embeddedObject + +' --- create the object to test here + oObj = oChart.Diagram.getDataRowProperties(0) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXDataRow/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXDataRow/script.xlb new file mode 100644 index 000000000000..f8437a29636a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXDataRow/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="sch_ChXDataRow" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXDataRow"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChXDiagram/sch_ChXDiagram.xba b/qadevOOo/tests/basic/mod/sch/ChXDiagram/sch_ChXDiagram.xba new file mode 100644 index 000000000000..7bc63b5809eb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXDiagram/sch_ChXDiagram.xba @@ -0,0 +1,143 @@ +<?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="sch_ChXDiagram" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + +Dim nCol As Integer +Dim nRow As Integer + +' REQUIRED VARIABLES for interface/service tests: +Global oLineDiagram As Object +Global oStackDiagram As Object +Global oStockDiagram As Object +Global oBarDiagram As Object +Global nGlobalBarDiagram As Long + +' For drawing.XShapeDescriptor +Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChXDiagram +'************************************************************************* +On Error Goto ErrHndl + Dim oCharts As Object + Dim oChart As Object + Dim cType(4) As String + Dim mRangeAddress(0) As New com.sun.star.table.CellRangeAddress + Dim aRect As New com.sun.star.awt.Rectangle + Dim n As Integer + + oDoc = utils.createDocument("scalc", cObjectName) + + cType(0) = "StockDiagram" + cType(1) = "BarDiagram" + cType(2) = "XYDiagram" + cType(3) = "StackableDiagram" + cType(4) = "LineDiagram" + + nCol = 5 + nRow = 6 + FillCells() + + aRect.Width = 5000 + aRect.Height = 5000 + mRangeAddress(0).Sheet = 0 + mRangeAddress(0).StartColumn = 0 + mRangeAddress(0).StartRow = 0 + mRangeAddress(0).EndColumn = nCol + mRangeAddress(0).EndRow = nRow + + for n = 0 to 4 + aRect.X = 500 * n + aRect.Y = 3000 * n + oCharts = oDoc.Sheets(0).Charts + oCharts.addNewByName(cObjectName + cType(n) + n, aRect, mRangeAddress(), true, true) + oChart = oCharts.getByName(cObjectName + cType(n) + n).EmbeddedObject + oChart.Diagram = oChart.createInstance("com.sun.star.chart." + cType(n)) + next n + + oStockDiagram = oCharts.getByName(cObjectName + cType(0) + 0).EmbeddedObject.Diagram + oBarDiagram = oCharts.getByName(cObjectName + cType(1) + 1).EmbeddedObject.Diagram + oLineDiagram = oCharts.getByName(cObjectName + cType(2) + 2).EmbeddedObject.Diagram + oStackDiagram = oCharts.getByName(cObjectName + cType(3) + 3).EmbeddedObject.Diagram + oObj = oCharts.getByName(cObjectName + cType(4) + 4).EmbeddedObject.Diagram + + nGlobalBarDiagram = 4 + + ' For drawing.XShapeDescriptor + cShapeType = "com.sun.star.chart.Diagram" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub FillCells() + Dim oCell As Object + Dim oRange As Object + Dim n1 As Integer + Dim n2 As Integer + Dim oFormats As Variant + Dim nFormat As Integer + Dim nKey As Integer + Dim aLanguage As New com.sun.star.lang.Locale + + oRange = oDoc.Sheets(0).getCellRangeByPosition(0, 0, nCol, nRow) + + for n1 = 1 to nCol - 1 + For n2 = 1 To nRow - 1 + oRange.getCellByPosition(n1, n2).Value = n2 * (n1 + 1) + Next n2 + next n1 + + for n1 = 1 to nCol - 1 + oRange.getCellByPosition(n1, 0).String = "Col " + n1 + next n1 + for n2 = 1 to nRow - 1 + oRange.getCellByPosition(0, n2).String = "Row " + n2 + next n2 + + oFormats = oDoc.NumberFormats + nFormat = com.sun.star.util.NumberFormat.CURRENCY + nKey = oFormats.getStandardFormat(nFormat, aLanguage) + oRange.NumberFormat = nKey +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChXDiagram/script.xlb b/qadevOOo/tests/basic/mod/sch/ChXDiagram/script.xlb new file mode 100644 index 000000000000..ad6b03bad01c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChXDiagram/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="sch_ChXDiagram" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChXDiagram"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChartArea/sch_ChartArea.xba b/qadevOOo/tests/basic/mod/sch/ChartArea/sch_ChartArea.xba new file mode 100644 index 000000000000..6329b64ed4bb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartArea/sch_ChartArea.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_ChartArea" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + +Dim nCol As Integer +Dim nRow As Integer + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChartArea +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oCharts As Variant, oChart As Variant + + bOK = true + + oDoc = utils.loadTestDocument("TransparencyCalcChart.sxc", cObjectName) + + oCharts = oDoc.Sheets(0).Charts + + Dim aNames(), i as integer + aNames = oCharts.getElementNames() + Out.Log("Chart names :") + for i = 0 to ubound(aNames()) + Out.Log("'" + aNames(i) + "'") + next i + + oChart = oCharts.getByName("TestTransparentChart").embeddedObject + + oObj = oChart.Area() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChartArea/script.xlb b/qadevOOo/tests/basic/mod/sch/ChartArea/script.xlb new file mode 100644 index 000000000000..0265cd6bf756 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartArea/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="sch_ChartArea" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChartArea"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChartGrid/sch_ChartGrid.xba b/qadevOOo/tests/basic/mod/sch/ChartGrid/sch_ChartGrid.xba new file mode 100644 index 000000000000..890e396d093d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartGrid/sch_ChartGrid.xba @@ -0,0 +1,58 @@ +<?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="sch_ChartGrid" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChartGrid +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oChart as Object + + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + oChart = utils.createChartObject(oDoc, cObjectName) + + oObj = oChart.Diagram.XMainGrid + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChartGrid/script.xlb b/qadevOOo/tests/basic/mod/sch/ChartGrid/script.xlb new file mode 100644 index 000000000000..29630a9e330a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartGrid/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="sch_ChartGrid" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChartGrid"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChartLegend/sch_ChartLegend.xba b/qadevOOo/tests/basic/mod/sch/ChartLegend/sch_ChartLegend.xba new file mode 100644 index 000000000000..e947d4f53e23 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartLegend/sch_ChartLegend.xba @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sch_ChartLegend" 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 ' it will be disposed + +Global oComponentDoc As Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChartLegend +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oCharts As Object, oChart As Object + Dim oCompChart as Object + + bOK = true + oDoc = utils.loadTestDocument("TransparencyCalcChart.sxc", cObjectName) + oComponentDoc = utils.createDocument("scalc", cObjectName & "1") + + oCharts = oDoc.Sheets(0).Charts + + Dim aNames(), i as integer + aNames = oCharts.getElementNames() + Out.Log("Chart names :") + for i = 0 to ubound(aNames()) + Out.Log("'" + aNames(i) + "'") + next i + + oChart = oCharts.getByName("TestTransparentChart").embeddedObject + + oObj = oChart.Legend + oCompChart = utils.createChartObject(oComponentDoc, cObjectName & "1") + oComponentInstance = oCompChart.Legend +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNULL(oComponentDoc) then oComponentDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChartLegend/script.xlb b/qadevOOo/tests/basic/mod/sch/ChartLegend/script.xlb new file mode 100644 index 000000000000..812179674e54 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartLegend/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="sch_ChartLegend" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChartLegend"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChartLine/sch_ChartLine.xba b/qadevOOo/tests/basic/mod/sch/ChartLine/sch_ChartLine.xba new file mode 100644 index 000000000000..8ca4921a894c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartLine/sch_ChartLine.xba @@ -0,0 +1,58 @@ +<?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="sch_ChartLine" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChartLine +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oChart as Object + bOK = true + oDoc = utils.createDocument("scalc", cObjectName) + + oChart = utils.createChartObject(oDoc, cObjectName) + + oChart.Diagram = oChart.createInstance("com.sun.star.chart.LineDiagram") + oObj = oChart.Diagram.MinMaxLine + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChartLine/script.xlb b/qadevOOo/tests/basic/mod/sch/ChartLine/script.xlb new file mode 100644 index 000000000000..90051ab34bfd --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartLine/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="sch_ChartLine" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChartLine"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sch/ChartTitle/sch_ChartTitle.xba b/qadevOOo/tests/basic/mod/sch/ChartTitle/sch_ChartTitle.xba new file mode 100644 index 000000000000..4cc3135dc4a8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartTitle/sch_ChartTitle.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="sch_ChartTitle" 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 oComponentDoc As Object +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sch.ChartTitle +'************************************************************************* +On Error Goto ErrHndl + + Dim oChart As Object + Dim oCompChart as Object + + oDoc = utils.createDocument("scalc", cObjectName) + oChart = utils.createChartObject(oDoc, cObjectName) + oComponentDoc = utils.createDocument("scalc", cObjectName & "1") + oCompChart = utils.createChartObject(oComponentDoc, cObjectName) + + oChart.hasMainTitle = true + oObj = oChart.Title + oComponentInstance = oComponentDoc.Title +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub FillCells() + Dim oRange As Object + Dim n1 As Integer + Dim n2 As Integer + + oRange = oDoc.Sheets(0).getCellRangeByPosition(0, 0, nCol, nRow) + + for n1 = 1 to nCol - 1 + For n2 = 1 To nRow - 1 + oRange.getCellByPosition(n1, n2).Value = n2 * (n1 + 1) + Next n2 + next n1 + + for n1 = 1 to nCol - 1 + oRange.getCellByPosition(n1, 0).String = "Col " + n1 + next n1 + for n2 = 1 to nRow - 1 + oRange.getCellByPosition(0, n2).String = "Row " + n2 + next n2 +End Sub + +Sub DisposeObj() + if NOT isNULL(oComponentDoc) then oComponentDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sch/ChartTitle/script.xlb b/qadevOOo/tests/basic/mod/sch/ChartTitle/script.xlb new file mode 100644 index 000000000000..0958c2b7525a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sch/ChartTitle/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="sch_ChartTitle" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sch_ChartTitle"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/AccessibleDrawDocumentView/script.xlb b/qadevOOo/tests/basic/mod/sd/AccessibleDrawDocumentView/script.xlb new file mode 100644 index 000000000000..749d06a8e422 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/AccessibleDrawDocumentView/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="sd_AccessibleDrawDocumentView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_AccessibleDrawDocumentView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/AccessibleDrawDocumentView/sd_AccessibleDrawDocumentView.xba b/qadevOOo/tests/basic/mod/sd/AccessibleDrawDocumentView/sd_AccessibleDrawDocumentView.xba new file mode 100644 index 000000000000..8a1a5c077e68 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/AccessibleDrawDocumentView/sd_AccessibleDrawDocumentView.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="sd_AccessibleDrawDocumentView" 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 oDP1 As Object, oDP2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.AccessibleDrawDocumentView +'************************************************************************* +On Error Goto ErrHndl + Dim oDPs As Object + Dim oWin As Object, xRoot As Object, oShape As Object + Dim oSearchedContext As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + Out.Log("Getting drawpages...") + oDPs = oDoc.getDrawPages() + oDP1 = oDPs.insertNewByIndex(1) + oDP2 = oDPs.getByIndex(0) + Out.Log("Inserting a shape...") + oShape = toolkittools.addShapeToDrawDoc(oDP2,1000,2000,"Rectangle") + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oSearchedContext = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT) + oObj = oSearchedContext + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oDoc.getCurrentController().setCurrentPage(oDP2) + oDoc.getCurrentController().setCurrentPage(oDP1) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/AccessibleOutlineView/script.xlb b/qadevOOo/tests/basic/mod/sd/AccessibleOutlineView/script.xlb new file mode 100644 index 000000000000..5d66d87def30 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/AccessibleOutlineView/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="sd_AccessibleOutlineView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_AccessibleOutlineView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/AccessibleOutlineView/sd_AccessibleOutlineView.xba b/qadevOOo/tests/basic/mod/sd/AccessibleOutlineView/sd_AccessibleOutlineView.xba new file mode 100644 index 000000000000..d44233ef697f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/AccessibleOutlineView/sd_AccessibleOutlineView.xba @@ -0,0 +1,136 @@ +<?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="sd_AccessibleOutlineView" 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 oDPn As Variant +Global fireCount as Integer + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.AccessibleOutlineView +'************************************************************************* +On Error Goto ErrHndl + Dim aSlotID As String + Dim urls As Variant + Dim url as new com.sun.star.util.URL + Dim UrlTransformer As Object, xDispatcher As Object + Dim oCntr As Object, oWin As Object, xRoot As Object + Dim oSearchedContext As Object + + oDoc = utils.createImpressDocument(cObjectName) + oCntr = oDoc.getCurrentController() + + Out.log("Switching to outline view...") + switchOutlineView(oDoc) + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oSearchedContext = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT) + oObj = oSearchedContext + oDPn = oDoc.getDrawPages() + fireCount = 0 + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + + +' This method is used for XAccessibleEventBroadcaster interface +Sub fireEvent() + fireCount = fireCount + 1 + Out.log("fire event...") + Dim oDP as Object + oDP = oDPn.getByIndex(0) + addShape(oDP, fireCount * 500, fireCount * 500) + + + wait(500) +End Sub + +Sub AddShape(oPage as Object, nPosX as Integer, nPosY as Integer) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oRectangleShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oRectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oRectangleShape.Size = aSize + oRectangleShape.Position = aPoint + oRectangleShape.FillColor = RGB(255, 0, 0) + oPage.add(oRectangleShape) +End Sub + +Sub switchOutlineView(xDoc as Object) +On Error Goto ErrHndl + + Dim Contrl as Variant, disp as Variant, transf as Object + Dim URL as new com.sun.star.util.URL + Dim noProps() + Dim res as Boolean + + Contrl = xDoc.getCurrentController() + URL.Complete = "slot:27010" + transf = createUnoService("com.sun.star.util.URLTransformer") + res = transf.parseStrict(URL) + + out.log("URL parsed :" + res) + + disp = Contrl.queryDispatch(URL, "", 0) + + out.log("disp get.") + + disp.dispatch(URL, noProps()) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/AccessibleSlideView/script.xlb b/qadevOOo/tests/basic/mod/sd/AccessibleSlideView/script.xlb new file mode 100644 index 000000000000..ab6b9acb40d2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/AccessibleSlideView/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="sd_AccessibleSlideView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_AccessibleSlideView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/AccessibleSlideView/sd_AccessibleSlideView.xba b/qadevOOo/tests/basic/mod/sd/AccessibleSlideView/sd_AccessibleSlideView.xba new file mode 100644 index 000000000000..7e2686874f69 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/AccessibleSlideView/sd_AccessibleSlideView.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="sd_AccessibleSlideView" 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 oDP1 As Object +Global oDP2 As Object +Global oCntr As Object +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.AccessibleSlideView +'************************************************************************* +On Error Goto ErrHndl + Dim oDPs As Object + Dim oWin As Object, xRoot As Object + Dim oSearchedContext As Object + + oDoc = utils.createImpressDocument(cObjectName) + Out.Log("Getting drawpages...") + oDPs = oDoc.getDrawPages() + oDP1 = oDPs.insertNewByIndex(1) + oDP2 = oDPs.insertNewByIndex(2) + switchOutlineView(oDoc) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oSearchedContext = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT) + oObj = oSearchedContext + oCntr = oDoc.getCurrentController() + multiSelection = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub switchOutlineView(xDoc as Object) +On Error Goto ErrHndl + + Dim Contrl as Variant, disp as Variant, transf as Object + Dim URL as new com.sun.star.util.URL + Dim noProps() + Dim res as Boolean + + Contrl = xDoc.getCurrentController() + URL.Complete = "slot:27011" + transf = createUnoService("com.sun.star.util.URLTransformer") + res = transf.parseStrict(URL) + + out.log("URL parsed :" + res) + + disp = Contrl.queryDispatch(URL, "", 0) + + out.log("disp get.") + + disp.dispatch(URL, noProps()) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + + + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +' This method is used for XAccessibleEventBroadcaster interface +Sub fireEvent() + oCntr.setCurrentPage(oDP1) + oCntr.setCurrentPage(oDP2) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdDocLinkTargets/script.xlb b/qadevOOo/tests/basic/mod/sd/SdDocLinkTargets/script.xlb new file mode 100644 index 000000000000..766c8a8b244d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdDocLinkTargets/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="sd_SdDocLinkTargets" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdDocLinkTargets"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdDocLinkTargets/sd_SdDocLinkTargets.xba b/qadevOOo/tests/basic/mod/sd/SdDocLinkTargets/sd_SdDocLinkTargets.xba new file mode 100644 index 000000000000..bd597de6e243 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdDocLinkTargets/sd_SdDocLinkTargets.xba @@ -0,0 +1,54 @@ +<?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="sd_SdDocLinkTargets" 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: +' sd.SdDocLinkTargets +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = oDoc.Links +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdDrawPage/script.xlb b/qadevOOo/tests/basic/mod/sd/SdDrawPage/script.xlb new file mode 100644 index 000000000000..3caf8119a5c1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdDrawPage/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="sd_SdDrawPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdDrawPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdDrawPage/sd_SdDrawPage.xba b/qadevOOo/tests/basic/mod/sd/SdDrawPage/sd_SdDrawPage.xba new file mode 100644 index 000000000000..847e390bb839 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdDrawPage/sd_SdDrawPage.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="sd_SdDrawPage" 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 oXShapeInstance As Object +Global oGrouperCollection AS Object +Global oCombinerCollection As Object +Global oBinderCollection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdDrawPage +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + + oObj = oDoc.DrawPages.getByIndex(0) + oGrouperCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oCombinerCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oBinderCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + + addShape(oObj, 1000, 1000) + addShape(oObj, 5000, 5000) + addShape(oObj, 2000, 2000) + addShape(oObj, 3000, 3000) + addShape(oObj, 4000, 4000) + addShape(oObj, 5000, 5000) + addShape(oObj, 6000, 6000) + addShape(oObj, 7000, 7000) + + oGrouperCollection.Add(oObj.getByIndex(0)) + oGrouperCollection.Add(oObj.getByIndex(1)) + oCombinerCollection.Add(oObj.getByIndex(2)) + oCombinerCollection.Add(oObj.getByIndex(3)) + oBinderCollection.Add(oObj.getByIndex(4)) + oBinderCollection.Add(oObj.getByIndex(5)) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +sub AddShape(oPage as Object, nPosX as Integer, nPosY as Integer) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oRectangleShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oRectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oRectangleShape.Size = aSize + oRectangleShape.Position = aPoint + oRectangleShape.FillColor = RGB(255, 0, 0) + oPage.add(oRectangleShape) +End Sub + +Sub DisposeObj() + if hasUnoInterfaces(oDoc, "com.sun.star.lang.XComponent") then + oDoc.Dispose() + end if +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdDrawPagesAccess/script.xlb b/qadevOOo/tests/basic/mod/sd/SdDrawPagesAccess/script.xlb new file mode 100644 index 000000000000..3edb0cacc218 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdDrawPagesAccess/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="sd_SdDrawPagesAccess" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdDrawPagesAccess"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdDrawPagesAccess/sd_SdDrawPagesAccess.xba b/qadevOOo/tests/basic/mod/sd/SdDrawPagesAccess/sd_SdDrawPagesAccess.xba new file mode 100644 index 000000000000..fd9ed80e1d5b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdDrawPagesAccess/sd_SdDrawPagesAccess.xba @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sd_SdDrawPagesAccess" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdDrawPagesAccess +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + + oObj = oDoc.DrawPages + oObj.insertNewByIndex(oObj.count) + oObj.insertNewByIndex(oObj.count) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdGenericDrawPage/script.xlb b/qadevOOo/tests/basic/mod/sd/SdGenericDrawPage/script.xlb new file mode 100644 index 000000000000..3f1e419281e6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdGenericDrawPage/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="sd_SdGenericDrawPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdGenericDrawPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdGenericDrawPage/sd_SdGenericDrawPage.xba b/qadevOOo/tests/basic/mod/sd/SdGenericDrawPage/sd_SdGenericDrawPage.xba new file mode 100644 index 000000000000..49ef3a47be08 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdGenericDrawPage/sd_SdGenericDrawPage.xba @@ -0,0 +1,109 @@ +<?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="sd_SdGenericDrawPage" 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 oGrouperCollection AS Object +Global oCombinerCollection As Object +Global oBinderCollection As Object + +'Required for com.sun.star.drawing.XShapes +Global oXShapeInstance As Object 'to add/remove + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdGenericDrawPage +'************************************************************************* +On Error Goto ErrHndl + Dim oDrawPage As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + oDrawPage = oDoc.DrawPages(0) + oGrouperCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oCombinerCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oBinderCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + + oObj = oDrawPage + + addShape(oObj, 1000, 1000) + addShape(oObj, 5000, 5000) + addShape(oObj, 2000, 2000) + addShape(oObj, 3000, 3000) + addShape(oObj, 4000, 4000) + addShape(oObj, 5000, 5000) + addShape(oObj, 6000, 6000) + addShape(oObj, 7000, 7000) + + oGrouperCollection.Add(oObj.getByIndex(0)) + oGrouperCollection.Add(oObj.getByIndex(1)) + oCombinerCollection.Add(oObj.getByIndex(2)) + oCombinerCollection.Add(oObj.getByIndex(3)) + oBinderCollection.Add(oObj.getByIndex(4)) + oBinderCollection.Add(oObj.getByIndex(5)) + + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub AddShape(oPage as Object, nPosX as Integer, nPosY as Integer) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oRectangleShape As Object + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oRectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oRectangleShape.Size = aSize + oRectangleShape.Position = aPoint + oRectangleShape.FillColor = RGB(255,0,0) + oPage.add(oRectangleShape) +End Sub + +Sub DisposeObj() + if hasUnoInterfaces(oDoc, "com.sun.star.lang.XComponent") then + oDoc.dispose() + end if +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdLayer/script.xlb b/qadevOOo/tests/basic/mod/sd/SdLayer/script.xlb new file mode 100644 index 000000000000..809c1d5b1bd6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdLayer/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="sd_SdLayer" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdLayer"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdLayer/sd_SdLayer.xba b/qadevOOo/tests/basic/mod/sd/SdLayer/sd_SdLayer.xba new file mode 100644 index 000000000000..0bd8fb5b929d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdLayer/sd_SdLayer.xba @@ -0,0 +1,58 @@ +<?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="sd_SdLayer" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdLayer +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.LayerManager.getByIndex(0) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdLayerManager/script.xlb b/qadevOOo/tests/basic/mod/sd/SdLayerManager/script.xlb new file mode 100644 index 000000000000..5eb4e7cd2fa9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdLayerManager/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="sd_SdLayerManager" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdLayerManager"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdLayerManager/sd_SdLayerManager.xba b/qadevOOo/tests/basic/mod/sd/SdLayerManager/sd_SdLayerManager.xba new file mode 100644 index 000000000000..9df4a862b3aa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdLayerManager/sd_SdLayerManager.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="sd_SdLayerManager" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdLayerManager +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.LayerManager + nGlobalLong = oObj.Count + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdMasterPage/script.xlb b/qadevOOo/tests/basic/mod/sd/SdMasterPage/script.xlb new file mode 100644 index 000000000000..d0d4f390c1ad --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdMasterPage/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="sd_SdMasterPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdMasterPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdMasterPage/sd_SdMasterPage.xba b/qadevOOo/tests/basic/mod/sd/SdMasterPage/sd_SdMasterPage.xba new file mode 100644 index 000000000000..4d7506dacdf8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdMasterPage/sd_SdMasterPage.xba @@ -0,0 +1,110 @@ +<?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="sd_SdMasterPage" 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 oGrouperCollection AS Object +Global oCombinerCollection As Object +Global oBinderCollection As Object + +'Required for com.sun.star.drawing.XShapes +Global oXShapeInstance As Object 'to add/remove + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdMasterPage +'************************************************************************* +On Error Goto ErrHndl + Dim oMasterPages As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oGrouperCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oCombinerCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oBinderCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + + oMasterPages = oDoc.MasterPages + oObj = oMasterPages(0) + + addShape(oObj, 1000, 1000) + addShape(oObj, 5000, 5000) + addShape(oObj, 2000, 2000) + addShape(oObj, 3000, 3000) + addShape(oObj, 4000, 4000) + addShape(oObj, 5000, 5000) + addShape(oObj, 6000, 6000) + addShape(oObj, 7000, 7000) + + oGrouperCollection.Add(oObj.getByIndex(0)) + oGrouperCollection.Add(oObj.getByIndex(1)) + oCombinerCollection.Add(oObj.getByIndex(2)) + oCombinerCollection.Add(oObj.getByIndex(3)) + oBinderCollection.Add(oObj.getByIndex(4)) + oBinderCollection.Add(oObj.getByIndex(5)) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub AddShape(oPage as Object, nPosX as Integer, nPosY as Integer) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oRectangleShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oRectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oRectangleShape.Size = aSize + oRectangleShape.Position = aPoint + oRectangleShape.FillColor = RGB(255, 0, 0) + oPage.add(oRectangleShape) +End Sub + +Sub DisposeObj() + if hasUnoInterfaces(oDoc, "com.sun.star.lang.XComponent") then + oDoc.dispose() + end if +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdMasterPagesAccess/script.xlb b/qadevOOo/tests/basic/mod/sd/SdMasterPagesAccess/script.xlb new file mode 100644 index 000000000000..a709ee13a2c7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdMasterPagesAccess/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="sd_SdMasterPagesAccess" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdMasterPagesAccess"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdMasterPagesAccess/sd_SdMasterPagesAccess.xba b/qadevOOo/tests/basic/mod/sd/SdMasterPagesAccess/sd_SdMasterPagesAccess.xba new file mode 100644 index 000000000000..fc828ab1f6d9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdMasterPagesAccess/sd_SdMasterPagesAccess.xba @@ -0,0 +1,58 @@ +<?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="sd_SdMasterPagesAccess" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdMasterPagesAccess +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.MasterPages + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdPageLinkTargets/script.xlb b/qadevOOo/tests/basic/mod/sd/SdPageLinkTargets/script.xlb new file mode 100644 index 000000000000..6f0236efd0b8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdPageLinkTargets/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="sd_SdPageLinkTargets" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdPageLinkTargets"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdPageLinkTargets/sd_SdPageLinkTargets.xba b/qadevOOo/tests/basic/mod/sd/SdPageLinkTargets/sd_SdPageLinkTargets.xba new file mode 100644 index 000000000000..d55b34d3f0b9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdPageLinkTargets/sd_SdPageLinkTargets.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="sd_SdPageLinkTargets" 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: +' sd.SdPageLinkTargets +'************************************************************************* +On Error Goto ErrHndl + Dim oPage As Object + Dim oShape As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oPage = oDoc.DrawPages(0) + + oShape = addShape(oPage, 1000, 1000) + oShape.setPropertyValue("CLSID","12DCAE26-281F-416F-a234-c3086127382e") + + oObj = oPage.getLinks() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function AddShape(oPage as Object, nPosX as Integer, nPosY as Integer) as Object + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oShape = oDoc.createInstance("com.sun.star.drawing.OLE2Shape") + oShape.Size = aSize + oShape.Position = aPoint + + oPage.add(oShape) + AddShape = oShape +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdUnoDrawView/script.xlb b/qadevOOo/tests/basic/mod/sd/SdUnoDrawView/script.xlb new file mode 100644 index 000000000000..e9b771303803 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdUnoDrawView/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="sd_SdUnoDrawView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdUnoDrawView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdUnoDrawView/sd_SdUnoDrawView.xba b/qadevOOo/tests/basic/mod/sd/SdUnoDrawView/sd_SdUnoDrawView.xba new file mode 100644 index 000000000000..66fca1b31e45 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdUnoDrawView/sd_SdUnoDrawView.xba @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sd_SdUnoDrawView" 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 drawing.XDrawView +Global oPages As Object + +' Required for frame.XController +Global oFrameToAttach As Object +Global oModelToAttach As Object +Global bHasNoViewData As Boolean +Global oObjToSuspend As Object +Global bHasNoModel As Boolean + +' Required for lang.XComponent +Global oComponentInstance As Object + +' Required for frame.XDispatchProvider +Global dispatchUrl As String + +' Required for view.XSelectionSupplier +Global SelectableObj1 As Object +Global SelectableObj2 As Object + +Global oSecDoc As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdUnoDrawView +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.getCurrentController() + + oPages = oDoc.getDrawPages() + + oSecDoc = utils.createDocument("sdraw", "For frame.XController") + bHasNoViewData = false + bHasNoModel = false + oObjToSuspend = oObj + oFrameToAttach = StarDesktop.getCurrentFrame() + oModelToAttach = oSecDoc + + oComponentInstance = oObj + + dispatchUrl = "slot:27009" + + Dim page As Object + page = oPages.getByIndex(0) + AddShape(page, 100, 100) + AddShape(page, 12000, 100) + + SelectableObj1 = page.getByIndex(0) + SelectableObj2 = page.getByIndex(1) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oSecDoc.dispose() +End Sub + +sub AddShape(oPage as Object, nPosX as Integer, nPosY as Integer) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oRectangleShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oRectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oRectangleShape.Size = aSize + oRectangleShape.Position = aPoint + oRectangleShape.FillColor = RGB(255, 0, 0) + oPage.add(oRectangleShape) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdUnoOutlineView/script.xlb b/qadevOOo/tests/basic/mod/sd/SdUnoOutlineView/script.xlb new file mode 100644 index 000000000000..d7108b233a4e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdUnoOutlineView/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="sd_SdUnoOutlineView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdUnoOutlineView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdUnoOutlineView/sd_SdUnoOutlineView.xba b/qadevOOo/tests/basic/mod/sd/SdUnoOutlineView/sd_SdUnoOutlineView.xba new file mode 100644 index 000000000000..edea9b2a0dd5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdUnoOutlineView/sd_SdUnoOutlineView.xba @@ -0,0 +1,130 @@ +<?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="sd_SdUnoOutlineView" 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 frame.XController +Global oFrameToAttach As Object +Global oModelToAttach As Object +Global bHasNoViewData As Boolean +Global oObjToSuspend As Object +Global bHasNoModel As Boolean + +' Required for lang.XComponent +Global oComponentInstance As Object + +' Required for frame.XDispatchProvider +Global dispatchUrl As String + +' Required for awt.XWindow +Global oXWindow As Object +Global oCtrlShape as Object + + +Global oSecDoc As Object +Global oXComponentDoc as Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdUnoOutlineView +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + + bOK = true + + oDoc = utils.createImpressDocument(cObjectName) + oXComponentDoc = utils.createImpressDocument(cObjectName+ "XComponent") + + oObj = oDoc.getCurrentController() + oComponentInstance = oXComponentDoc.getCurrentController() + + Out.log("Change to Outline view") + Dim aSlotID As String + aSlotID = "slot:27010" + + Dim url as new com.sun.star.util.URL + url.Complete = aSlotID + + Dim UrlTransformer As Object + UrlTransformer = createUnoService("com.sun.star.util.URLTransformer") + UrlTransformer.parseStrict(url) + + Dim xDispatcher As Object + xDispatcher = oObj.queryDispatch( url,"",0) + if Not IsNULL(xDispatcher) then + xDispatcher.dispatch( url, DimArray() ) + wait(5000) + else + Out.log("queryDispatch FAILED... Object SdUnoOutlineView can't be created") + oObj = NULL_OBJECT + endif + + xDispatcher = oComponentInstance.queryDispatch( url,"",0) + if Not IsNULL(xDispatcher) then + xDispatcher.dispatch( url, DimArray() ) + wait(5000) + else + Out.log("queryDispatch FAILED... Object SdUnoOutlineView can't be created") + endif + + oSecDoc = utils.createImpressDocument("For frame.XController") + bHasNoViewData = false + bHasNoModel = false + oObjToSuspend = oObj + oFrameToAttach = StarDesktop.getCurrentFrame() + oModelToAttach = oSecDoc + + + dispatchUrl = "slot:27069" + + ' For awt.XWindow + oXWindow = utils.at_getCurrentWindow(oSecDoc) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oSecDoc) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdUnoPresView/script.xlb b/qadevOOo/tests/basic/mod/sd/SdUnoPresView/script.xlb new file mode 100644 index 000000000000..85375cd665b4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdUnoPresView/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="sd_SdUnoPresView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdUnoPresView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdUnoPresView/sd_SdUnoPresView.xba b/qadevOOo/tests/basic/mod/sd/SdUnoPresView/sd_SdUnoPresView.xba new file mode 100644 index 000000000000..305dc5da6571 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdUnoPresView/sd_SdUnoPresView.xba @@ -0,0 +1,137 @@ +<?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="sd_SdUnoPresView" 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 frame.XController +Global oFrameToAttach As Object +Global oModelToAttach As Object +Global bHasNoViewData As Boolean +Global oObjToSuspend As Object +Global bHasNoModel As Boolean + +' Required for lang.XComponent +Global oComponentInstance As Object + +' Required for frame.XDispatchProvider +Global dispatchUrl As String + +' Required for drawing.XDrawView +Global oPages As Variant + +' Required for awt.XWindow +Global oXWindow As Object +Global oCtrlShape as Object + +Global oSecDoc As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdUnoPresView +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oDP As Object, oDP1 As Object + Dim oDPs As Object + bOK = true + + oDoc = utils.createImpressDocument(cObjectName) + oSecDoc = utils.createImpressDocument(cObjectName+"1") + wait(500) + + oDPs = oDoc.getDrawPages() + oDP = oDPs.getByIndex(0) + oDPs.insertNewByIndex(0) + oDP1 = oDPs.getByIndex(1) + + addShape(oDP, 1000, 1000, "Rectangle") + addShape(oDP, 5000, 5000, "Ellipse") + + oObj = oDoc.getCurrentController() + + ' For XDrawPages + oPages = oDoc.getDrawPages() + + ' For XComponent + oComponentInstance = oObj + + ' For XDispatchProvider + dispatchUrl = "slot:27009" + + ' For frame.XController + oFrameToAttach = StarDesktop.getCurrentFrame() + oModelToAttach = oSecDoc + bHasNoViewData = false + bHasNoModel = false + oObjToSuspend = oObj + + ' For awt.XWindow + oXWindow = utils.at_getCurrentWindow(oSecDoc) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + oDoc.dispose() + oSecDoc.dispose() +End Sub + +Sub addShape(oPage as Object, nPosX as Integer, nPosY as Integer, oType As String) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oRectangleShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 2000 + aSize.Height = 1000 + oRectangleShape = oDoc.createInstance("com.sun.star.drawing."+oType+"Shape") + oRectangleShape.Size = aSize + oRectangleShape.Position = aPoint + oRectangleShape.FillColor = RGB(128, 255, 0) + oPage.add(oRectangleShape) +End Sub + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdXCustomPresentation/script.xlb b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentation/script.xlb new file mode 100644 index 000000000000..eff48affc0c0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentation/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="sd_SdXCustomPresentation" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdXCustomPresentation"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdXCustomPresentation/sd_SdXCustomPresentation.xba b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentation/sd_SdXCustomPresentation.xba new file mode 100644 index 000000000000..c02a4a34970d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentation/sd_SdXCustomPresentation.xba @@ -0,0 +1,84 @@ +<?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="sd_SdXCustomPresentation" 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.container.XIndexContainer +Global oInstance As Object 'for InsertByName + +' Required for XIndexReplace +Global oIdxReplaceInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdXCustomPresentation +'************************************************************************* +On Error Goto ErrHndl + Dim oPresentations As Object + Dim oPresentation As Object + Dim oDrawPages As Object + + oDoc = utils.createImpressDocument(cObjectName) + + oPresentations = oDoc.getCustomPresentations() + oDrawPages = oDoc.getDrawPages + oDrawPages.insertNewByIndex(oDrawPages.getCount()) + oDrawPages.insertNewByIndex(oDrawPages.getCount()) + oDrawPages.insertNewByIndex(oDrawPages.getCount()) + oDrawPages.insertNewByIndex(oDrawPages.getCount()) + + oPresentation = oPresentations.createInstance() + oPresentations.insertByName(cObjectName, oPresentation) + oIdxReplaceInstance = oDrawPages.getByIndex(3) + + oObj = oPresentations.getByName(oPresentations.elementNames(0)) + + oObj.insertByIndex(oObj.Count, oDrawPages.getByIndex(0)) + oObj.insertByIndex(oObj.Count, oDrawPages.getByIndex(1)) + oObj.insertByIndex(oObj.Count, oDrawPages.getByIndex(2)) + oInstance = oDrawPages.getByIndex(3) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdXCustomPresentationAccess/script.xlb b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentationAccess/script.xlb new file mode 100644 index 000000000000..92f8c79f7d0d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentationAccess/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="sd_SdXCustomPresentationAccess" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdXCustomPresentationAccess"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdXCustomPresentationAccess/sd_SdXCustomPresentationAccess.xba b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentationAccess/sd_SdXCustomPresentationAccess.xba new file mode 100644 index 000000000000..d626a83a2256 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXCustomPresentationAccess/sd_SdXCustomPresentationAccess.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="sd_SdXCustomPresentationAccess" 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.container.XNameContainer +Global oInstance As Object 'instance to insert + +'Required for com.sun.star.container.XNameReplace +Global oReplaceInstance As Object +Global cNameToReplace As String + +'For lang.XSingleServiceFactory +Global aMustSupportInterface As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdXCustomPresentationAccess +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createImpressDocument(cObjectName) + oObj = oDoc.getCustomPresentations() + + oInstance = oObj.createInstance() + oObj.insertByName("FirstPresentation", oInstance) + oInstance = oObj.createInstance() + oObj.insertByName("SecondPresentation", oInstance) + oInstance = oObj.createInstance() + + cNameToReplace = "SecondPresentation" + oReplaceInstance = oObj.createInstance() + + aMustSupportInterface = Array("com.sun.star.container.XIndexContainer") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdXImpressDocument/script.xlb b/qadevOOo/tests/basic/mod/sd/SdXImpressDocument/script.xlb new file mode 100644 index 000000000000..54c30454d5df --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXImpressDocument/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="sd_SdXImpressDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdXImpressDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdXImpressDocument/sd_SdXImpressDocument.xba b/qadevOOo/tests/basic/mod/sd/SdXImpressDocument/sd_SdXImpressDocument.xba new file mode 100644 index 000000000000..5b7aee65ec94 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXImpressDocument/sd_SdXImpressDocument.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="sd_SdXImpressDocument" 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: + +' Requiered for com.sun.star.lang.XMultiServiceFactory + Global cServiceName As String ' ex. "com.sun.star.drawing.RectangleShape" + Global bCreateInstanceWithoutArguments As Boolean + Global aArguments() As Variant + +' Requiered for com.sun.star.drawing.XDrawPageDuplicator + Global oCollection As Object ' = oDoc.DrawPages(0) + +' com.sun.star.frame.XModel + Global oXModelController as Object + Global oXModelSel as Object + Global oXModelToSel as Object + + + Global oComponentInstance As Object +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdXImpressDocument +'************************************************************************* +On Error Goto ErrHndl + Dim oControllerDoc as Object + Dim oRectangleShape as Object + Dim oPage as Object + + oDoc = utils.createImpressDocument(cObjectName) + oControllerDoc = utils.createImpressDocument(cObjectName + "XModel") + oComponentInstance = utils.createImpressDocument(cObjectName + "XComponent") + + oCollection = oDoc.DrawPages(0) + oObj = oDoc + + cServiceName = "com.sun.star.drawing.RectangleShape" + bCreateInstanceWithoutArguments = true + aArguments() = noargs() + + oRectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oPage = oDoc.getDrawPages().getByIndex(0) + oPage.add(oRectangleShape) + + oXModelToSel = oRectangleShape + oXModelController = oControllerDoc.getCurrentController() + oXModelSel = oDoc.getCurrentController() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNULL(oComponentInstance) then oComponentInstance.dispose() + + ' To successfully dispose oControllerDoc re-open it first. + Dim oControllerDoc As Object + oControllerDoc = utils.createDocument(cObjectName + "XModel") + oControllerDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdXPresentation/script.xlb b/qadevOOo/tests/basic/mod/sd/SdXPresentation/script.xlb new file mode 100644 index 000000000000..20b9fca530b8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXPresentation/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="sd_SdXPresentation" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdXPresentation"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdXPresentation/sd_SdXPresentation.xba b/qadevOOo/tests/basic/mod/sd/SdXPresentation/sd_SdXPresentation.xba new file mode 100644 index 000000000000..2ef0232aafe2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXPresentation/sd_SdXPresentation.xba @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sd_SdXPresentation" 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: +' sd.SdXPresentation +'************************************************************************* +On Error Goto ErrHndl + Dim oPres As Object + Dim oInst As Object + + oDoc = utils.createImpressDocument(cObjectName) + oPres = oDoc.getCustomPresentations() + oInst = oPres.createInstance() + oPres.insertByName("FirstPresentation", oInst) + oInst = oPres.createInstance() + oPres.insertByName("SecondPresentation", oInst) + + oObj = oDoc.getPresentation() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sd/SdXShape/script.xlb b/qadevOOo/tests/basic/mod/sd/SdXShape/script.xlb new file mode 100644 index 000000000000..55ca6e4df6fa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXShape/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="sd_SdXShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sd_SdXShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sd/SdXShape/sd_SdXShape.xba b/qadevOOo/tests/basic/mod/sd/SdXShape/sd_SdXShape.xba new file mode 100644 index 000000000000..0e719ec6a88a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sd/SdXShape/sd_SdXShape.xba @@ -0,0 +1,98 @@ +<?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="sd_SdXShape" 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.lang.XComponent +Global oComponentInstance as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sd.SdXShape +'************************************************************************* +On Error Goto ErrHndl + Dim oDrawPage As Object + Dim oDrawPages As Object + Dim oCollection As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + oDrawPages = oDoc.DrawPages + oDrawPage = oDrawPages.getByIndex(0) + addShape(oDrawPage, 1000, 1000) + addShape(oDrawPage, 5000, 5000) + oCollection = oDrawPage + oObj = oDrawPage.getByIndex(0) + oComponentInstance = oDrawPage.getByIndex(1) + + + Dim oLayerManager As Object + Dim nLayer As Integer + Dim oLayer As Object + + oLayerManager = oDoc.LayerManager + nLayer = oLayerManager.Count + oLayer = oLayerManager.insertNewByIndex(nLayer) + oLayer.Name = "Test" + oLayerManager.attachShapeToLayer(oObj, oLayer) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub AddShape(oPage as Object, nPosX as Integer, nPosY as Integer) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oRectangleShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oRectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oRectangleShape.Size = aSize + oRectangleShape.Position = aPoint + oRectangleShape.FillColor = RGB(255, 0, 0) + oPage.add(oRectangleShape) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/servicemgr.uno/OServiceManager/script.xlb b/qadevOOo/tests/basic/mod/servicemgr.uno/OServiceManager/script.xlb new file mode 100644 index 000000000000..b242aa37d010 --- /dev/null +++ b/qadevOOo/tests/basic/mod/servicemgr.uno/OServiceManager/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="servicemgr_uno_OServiceManager" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="servicemgr_uno_OServiceManager"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/servicemgr.uno/OServiceManager/servicemgr_uno_OServiceManager.xba b/qadevOOo/tests/basic/mod/servicemgr.uno/OServiceManager/servicemgr_uno_OServiceManager.xba new file mode 100644 index 000000000000..c9d796c6469f --- /dev/null +++ b/qadevOOo/tests/basic/mod/servicemgr.uno/OServiceManager/servicemgr_uno_OServiceManager.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="servicemgr_uno_OServiceManager" 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: + +' Requiered for com.sun.star.lang.XMultiServiceFactory + Global cServiceName As String ' ex. "com.sun.star.drawing.RectangleShape" + Global bCreateInstanceWithoutArguments As Boolean + Global aArguments() As Variant + +' Requiered for com.sun.star.lang.XMultiComponentFactory + Global aContext() As Variant + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' smgr.OServiceManager +'************************************************************************* +On Error Goto ErrHndl + Dim oPres As Object + + oDoc = utils.createImpressDocument(cObjectName) + oObj = createUnoService("com.sun.star.lang.ServiceManager") + + oPres = oDoc.getCustomPresentations() + oObj.insert(oPres) + cServiceName = "com.sun.star.presentation.CustomPresentationAccess" + bCreateInstanceWithoutArguments = true + aArguments() = noargs() + aContext() = noargs() + + oComponentInstance = createUnoService("com.sun.star.lang.ServiceManager") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sfx/DocumentTemplates/script.xlb b/qadevOOo/tests/basic/mod/sfx/DocumentTemplates/script.xlb new file mode 100644 index 000000000000..85e442c44ef6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/DocumentTemplates/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="sfx_DocumentTemplates" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sfx_DocumentTemplates"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sfx/DocumentTemplates/sfx_DocumentTemplates.xba b/qadevOOo/tests/basic/mod/sfx/DocumentTemplates/sfx_DocumentTemplates.xba new file mode 100644 index 000000000000..244a330bfee5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/DocumentTemplates/sfx_DocumentTemplates.xba @@ -0,0 +1,64 @@ +<?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="sfx_DocumentTemplates" 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: + +' variable for frame.XDocumentTemplates +Global oStore As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sfx.DocumentTemplates +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("swriter", cObjectName) + oObj = createUnoService("com.sun.star.frame.DocumentTemplates") + + ' setting variable for XDocumentTemplates + oStore = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sfx/FrameLoader/script.xlb b/qadevOOo/tests/basic/mod/sfx/FrameLoader/script.xlb new file mode 100644 index 000000000000..9f2b3fdd828a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/FrameLoader/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="sfx_FrameLoader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sfx_FrameLoader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sfx/FrameLoader/sfx_FrameLoader.xba b/qadevOOo/tests/basic/mod/sfx/FrameLoader/sfx_FrameLoader.xba new file mode 100644 index 000000000000..35fb72701b14 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/FrameLoader/sfx_FrameLoader.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sfx_FrameLoader" 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.frame.XSynchronousFrameLoader + Global oFrame As Object + Global sURL As String + +' For XFrameLoader +Global FrameLoaderURL As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sfx.FrameLoader +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("swriter", cObjectName) + + oObj = createUnoService("com.sun.star.frame.FrameLoader") + + oFrame = oDoc.getCurrentController().getFrame() + + sURL = utils.Path2URL(cTestDocsDir & "Iterator.sxw") + + FrameLoaderURL = "private:factory/swriter" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sfx/SfxMacroLoader/script.xlb b/qadevOOo/tests/basic/mod/sfx/SfxMacroLoader/script.xlb new file mode 100644 index 000000000000..bd2aedea255e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/SfxMacroLoader/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="sfx_SfxMacroLoader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sfx_SfxMacroLoader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sfx/SfxMacroLoader/sfx_SfxMacroLoader.xba b/qadevOOo/tests/basic/mod/sfx/SfxMacroLoader/sfx_SfxMacroLoader.xba new file mode 100644 index 000000000000..f52e40d0a2b8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/SfxMacroLoader/sfx_SfxMacroLoader.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sfx_SfxMacroLoader" 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: + +' For XFrameLoader +Global FrameLoaderURL As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sfx.SfxMacroLoader +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.comp.sfx2.SfxMacroLoader") + + FrameLoaderURL = "private:factory/swriter" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sfx/StandaloneDocumentInfo/script.xlb b/qadevOOo/tests/basic/mod/sfx/StandaloneDocumentInfo/script.xlb new file mode 100644 index 000000000000..12430abdaff5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/StandaloneDocumentInfo/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="sfx_StandaloneDocumentInfo" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sfx_StandaloneDocumentInfo"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sfx/StandaloneDocumentInfo/sfx_StandaloneDocumentInfo.xba b/qadevOOo/tests/basic/mod/sfx/StandaloneDocumentInfo/sfx_StandaloneDocumentInfo.xba new file mode 100644 index 000000000000..28b277e4432e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sfx/StandaloneDocumentInfo/sfx_StandaloneDocumentInfo.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="sfx_StandaloneDocumentInfo" 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: + +' variable for document.XStandaloneDocumentInfo +Global documentURL As String + +'variable for lang.XComponent +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sfx.StandaloneDocumentInfo +'************************************************************************* +On Error Goto ErrHndl + Dim srcDoc As String, destDoc As String + Dim facc As Object + + oObj = createUnoService("com.sun.star.document.StandaloneDocumentInfo") + + srcDoc = utils.Path2URL(cTestDocsDir) + "SfxStandaloneDocInfoObject.sdw" + destDoc = utils.getTempFileURL("SfxStandaloneDocInfoObject.sdw", true) + facc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + facc.copy(srcDoc, destDoc) + + oObj.loadFromURL(destDoc) + + 'setting variable for document.XStandaloneDocumentInfo + documentURL = destDoc + + oComponentInstance = oObj + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/shlibloader.uno/DLLComponentLoader/script.xlb b/qadevOOo/tests/basic/mod/shlibloader.uno/DLLComponentLoader/script.xlb new file mode 100644 index 000000000000..9aa0cb96a425 --- /dev/null +++ b/qadevOOo/tests/basic/mod/shlibloader.uno/DLLComponentLoader/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="shlibloader_uno_DLLComponentLoader" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="shlibloader_uno_DLLComponentLoader"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/shlibloader.uno/DLLComponentLoader/shlibloader_uno_DLLComponentLoader.xba b/qadevOOo/tests/basic/mod/shlibloader.uno/DLLComponentLoader/shlibloader_uno_DLLComponentLoader.xba new file mode 100644 index 000000000000..3ae0dbee8cdb --- /dev/null +++ b/qadevOOo/tests/basic/mod/shlibloader.uno/DLLComponentLoader/shlibloader_uno_DLLComponentLoader.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="shlibloader_uno_DLLComponentLoader" 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 cImpLoader As String +Global cImpURL As String +Global cImpName As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' cpld.DLLComponentLoader +'************************************************************************* + oObj = createUNOService("com.sun.star.loader.SharedLibrary") + + cImpLoader = "com.sun.star.loader.SharedLibrary" + cImpURL = Path2URL(cTestDocsDir + "XImpReg.dll") + cImpName = "com.sun.star.comp.stoc.JavaComponentLoader" +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/simplereg.uno/SimpleRegistry/script.xlb b/qadevOOo/tests/basic/mod/simplereg.uno/SimpleRegistry/script.xlb new file mode 100644 index 000000000000..c6693d1e331a --- /dev/null +++ b/qadevOOo/tests/basic/mod/simplereg.uno/SimpleRegistry/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="simplereg_uno_SimpleRegistry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="simplereg_uno_SimpleRegistry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/simplereg.uno/SimpleRegistry/simplereg_uno_SimpleRegistry.xba b/qadevOOo/tests/basic/mod/simplereg.uno/SimpleRegistry/simplereg_uno_SimpleRegistry.xba new file mode 100644 index 000000000000..18e36c1eca52 --- /dev/null +++ b/qadevOOo/tests/basic/mod/simplereg.uno/SimpleRegistry/simplereg_uno_SimpleRegistry.xba @@ -0,0 +1,53 @@ +<?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="simplereg_uno_SimpleRegistry" 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: +' simreg.SimpleRegistry +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.registry.SimpleRegistry") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/simreg/SimpleRegistry/script.xlb b/qadevOOo/tests/basic/mod/simreg/SimpleRegistry/script.xlb new file mode 100644 index 000000000000..1f58776db999 --- /dev/null +++ b/qadevOOo/tests/basic/mod/simreg/SimpleRegistry/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="simreg_SimpleRegistry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="simreg_SimpleRegistry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/simreg/SimpleRegistry/simreg_SimpleRegistry.xba b/qadevOOo/tests/basic/mod/simreg/SimpleRegistry/simreg_SimpleRegistry.xba new file mode 100644 index 000000000000..5772540867db --- /dev/null +++ b/qadevOOo/tests/basic/mod/simreg/SimpleRegistry/simreg_SimpleRegistry.xba @@ -0,0 +1,53 @@ +<?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="simreg_SimpleRegistry" 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: +' simreg.SimpleRegistry +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.registry.SimpleRegistry") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/SmEditAccessible/script.xlb b/qadevOOo/tests/basic/mod/sm/SmEditAccessible/script.xlb new file mode 100644 index 000000000000..a19ead0edc9b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/SmEditAccessible/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="sm_SmEditAccessible" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_SmEditAccessible"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/SmEditAccessible/sm_SmEditAccessible.xba b/qadevOOo/tests/basic/mod/sm/SmEditAccessible/sm_SmEditAccessible.xba new file mode 100644 index 000000000000..fef7c4783a37 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/SmEditAccessible/sm_SmEditAccessible.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="sm_SmEditAccessible" 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 XAccessibleText +Global accText As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.SmEditAccessible +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("smath", cObjectName) + + accText = "sum hat a" + oDoc.Formula = accText + + wait(2000) + + Dim oWin As Object + Dim xRoot As Object + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PANEL, "Commands") +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oDoc.Formula = "sum hat x" + wait(2000) + oDoc.Formula = accText + wait(2000) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/SmGraphicAccessible/script.xlb b/qadevOOo/tests/basic/mod/sm/SmGraphicAccessible/script.xlb new file mode 100644 index 000000000000..aff350c9c197 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/SmGraphicAccessible/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="sm_SmGraphicAccessible" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_SmGraphicAccessible"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/SmGraphicAccessible/sm_SmGraphicAccessible.xba b/qadevOOo/tests/basic/mod/sm/SmGraphicAccessible/sm_SmGraphicAccessible.xba new file mode 100644 index 000000000000..4990d276e4fd --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/SmGraphicAccessible/sm_SmGraphicAccessible.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="sm_SmGraphicAccessible" 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 XAccessibleText +Global accText As String +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.SmGraphicAccessible +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("smath", cObjectName) + + accText = "sum a cdot b" + oDoc.Formula = accText + + wait(2000) + + Dim oWin As Object + Dim xRoot As Object + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT, "Formula") + readOnly = false +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oDoc.Formula = "sum hat x" + wait(2000) + oDoc.Formula = accText + wait(2000) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/SmModel/script.xlb b/qadevOOo/tests/basic/mod/sm/SmModel/script.xlb new file mode 100644 index 000000000000..0ef9ff02ff5a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/SmModel/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="sm_SmModel" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_SmModel"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/SmModel/sm_SmModel.xba b/qadevOOo/tests/basic/mod/sm/SmModel/sm_SmModel.xba new file mode 100644 index 000000000000..0247417e56c1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/SmModel/sm_SmModel.xba @@ -0,0 +1,54 @@ +<?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="sm_SmModel" 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: +' sm.SmModel +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("smath", cObjectName) + oObj = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/XMLExporter/script.xlb b/qadevOOo/tests/basic/mod/sm/XMLExporter/script.xlb new file mode 100644 index 000000000000..aa91c6231059 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLExporter/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="sm_XMLExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_XMLExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/XMLExporter/sm_XMLExporter.xba b/qadevOOo/tests/basic/mod/sm/XMLExporter/sm_XMLExporter.xba new file mode 100644 index 000000000000..9b3f4a00eea4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLExporter/sm_XMLExporter.xba @@ -0,0 +1,109 @@ +<?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="sm_XMLExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.XMLExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3 As Variant + Dim expFormula As String + + printXML = true + expFormula = "a - b" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("smath", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("math:math") + Tag2 = Array("math:annotation") + Tag3 = Array("math:semantics") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag3), _ + Array("CharsEnclosed", Tag2, expFormula) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Math.XMLExporter", initArgs()) + + oDoc.setPropertyValue("Formula", expFormula) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "smath: StarOffice XML (Formula)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/XMLImporter/script.xlb b/qadevOOo/tests/basic/mod/sm/XMLImporter/script.xlb new file mode 100644 index 000000000000..a0d5abd5eff0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLImporter/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="sm_XMLImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_XMLImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/XMLImporter/sm_XMLImporter.xba b/qadevOOo/tests/basic/mod/sm/XMLImporter/sm_XMLImporter.xba new file mode 100644 index 000000000000..4f7e90db93a1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLImporter/sm_XMLImporter.xba @@ -0,0 +1,85 @@ +<?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="sm_XMLImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sFormula As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.XMLImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("smath", cObjectName) + oObj = createUnoService("com.sun.star.comp.Math.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sFormula = "a - b" + vXMLData = Array( _ + Array("start", "math:math", _ + "xmlns:math", "CDATA", "http://www.w3.org/1998/Math/MathML"), _ + Array("start", "math:semantics"), _ + Array("start", "math:annotation", _ + "math:encoding", "CDATA", "StarMath 5.0"), _ + Array("chars", sFormula), _ + Array("end", "math:annotation"), _ + Array("end", "math:semantics"), _ + Array("end", "math:math") ) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + out.log("checking of import...") + CheckImport() = (oDoc.getPropertyValue("Formula") = sFormula) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/XMLMetaExporter/script.xlb b/qadevOOo/tests/basic/mod/sm/XMLMetaExporter/script.xlb new file mode 100644 index 000000000000..cfc33f047031 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLMetaExporter/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="sm_XMLMetaExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_XMLMetaExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/XMLMetaExporter/sm_XMLMetaExporter.xba b/qadevOOo/tests/basic/mod/sm/XMLMetaExporter/sm_XMLMetaExporter.xba new file mode 100644 index 000000000000..503d50e37ff8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLMetaExporter/sm_XMLMetaExporter.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="sm_XMLMetaExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.XMLMetaExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2 As Variant + Dim expMetaName, expMetaValue As String + Dim oDocInfo As Object + + printXML = true + expMetaName = "XMLMetaExporterName" + expMetaValue = "XMLMetaExporterValue" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("smath", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-meta") + Tag2 = Array("meta:user-defined", "meta:name", expMetaName) + filter = Array( _ + Array("TagExists", Tag1), _ + Array("CharsEnclosed", Tag2, expMetaValue) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Math.XMLMetaExporter", initArgs()) + + oDocInfo = oDoc.getDocumentInfo() + oDocInfo.setUserFieldName(0, expMetaName) + oDocInfo.setUserFieldValue(0, expMetaValue) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "smath: StarOffice XML (Formula)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/XMLMetaImporter/script.xlb b/qadevOOo/tests/basic/mod/sm/XMLMetaImporter/script.xlb new file mode 100644 index 000000000000..7231ac372d02 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLMetaImporter/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="sm_XMLMetaImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_XMLMetaImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/XMLMetaImporter/sm_XMLMetaImporter.xba b/qadevOOo/tests/basic/mod/sm/XMLMetaImporter/sm_XMLMetaImporter.xba new file mode 100644 index 000000000000..12210bf62867 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLMetaImporter/sm_XMLMetaImporter.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="sm_XMLMetaImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sTitle, sName, sValue As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.XMLMetaImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("smath", cObjectName) + oObj = createUnoService("com.sun.star.comp.Math.XMLMetaImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sTitle = "XMLMetaImporter Title" + sName = "XMLMetaImporter" + sValue = "XMLMetaImporter_Value" + vXMLData = Array( _ + Array("start", "office:document-meta", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:meta", "CDATA", "http://openoffice.org/2000/meta", _ + "xmlns:xlink", "CDATA", "http://www.w3.org/1999/xlink", _ + "xmlns:dc", "CDATA", "http://purl.org/dc/elements/1.1/"), _ + Array("start", "office:meta"), _ + Array("start", "dc:title"), _ + Array("chars", sTitle), _ + Array("end", "dc:title"), _ + Array("start", "meta:user-defined", _ + "meta:name", "CDATA", sName), _ + Array("chars", sValue), _ + Array("end", "meta:user-defined"), _ + Array("end", "office:meta"), _ + Array("end", "office:document-meta")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + out.log("checking of import...") + Dim res As Boolean + Dim i As Integer + Dim docInfo As Object + Dim fieldValue, fieldName, title as String + docInfo = oDoc.getDocumentInfo() + res = false + For i = 0 to docInfo.getUserFieldCount() - 1 + fieldName = docInfo.getUserFieldName(i) + fieldValue = docInfo.getUserFieldValue(i) + out.log("Field name: " + fieldName + " Value: " + fieldValue) + If (fieldName = sName) and (fieldValue = sValue) then + res = true + EndIf + Next i + + title = docInfo.getPropertyValue("Title") + out.log("Title: " + title) + res = res and (title = sTitle) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/XMLSettingsExporter/script.xlb b/qadevOOo/tests/basic/mod/sm/XMLSettingsExporter/script.xlb new file mode 100644 index 000000000000..5fdd3687c0bb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLSettingsExporter/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="sm_XMLSettingsExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_XMLSettingsExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/XMLSettingsExporter/sm_XMLSettingsExporter.xba b/qadevOOo/tests/basic/mod/sm/XMLSettingsExporter/sm_XMLSettingsExporter.xba new file mode 100644 index 000000000000..7fa1af0005bd --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLSettingsExporter/sm_XMLSettingsExporter.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="sm_XMLSettingsExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.XMLSettingsExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2 As Variant + Dim expMargin As Integer + + printXML = true + expMargin = 67 + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("smath", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-settings") + Tag2 = Array("config:config-item", "config:name", "TopMargin") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("CharsEnclosed", Tag2, ""+expMargin) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Math.XMLSettingsExporter", initArgs()) + + oDoc.setPropertyValue("TopMargin", expMargin) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "smath: StarOffice XML (Formula)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sm/XMLSettingsImporter/script.xlb b/qadevOOo/tests/basic/mod/sm/XMLSettingsImporter/script.xlb new file mode 100644 index 000000000000..055b77c7819a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLSettingsImporter/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="sm_XMLSettingsImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sm_XMLSettingsImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sm/XMLSettingsImporter/sm_XMLSettingsImporter.xba b/qadevOOo/tests/basic/mod/sm/XMLSettingsImporter/sm_XMLSettingsImporter.xba new file mode 100644 index 000000000000..b6f047f02d83 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sm/XMLSettingsImporter/sm_XMLSettingsImporter.xba @@ -0,0 +1,98 @@ +<?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="sm_XMLSettingsImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sMargin As Integer + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sm.XMLSettingsImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("smath", cObjectName) + oObj = createUnoService("com.sun.star.comp.Math.XMLSettingsImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sMargin = "67" + vXMLData = Array( _ + Array("start", "office:document-settings", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:config", "CDATA", "http://openoffice.org/2001/config", _ + "xmlns:xlink", "CDATA", "http://www.w3.org/1999/xlink", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:settings"), _ + Array("start", "config:config-item-set", _ + "config:name", "CDATA", "configuration-settings"), _ + Array("start", "config:config-item", _ + "config:name", "CDATA", "TopMargin", _ + "config:type", "CDATA", "short"), _ + Array("chars", sMargin), _ + Array("end", "config:config-item"), _ + Array("end", "config:config-item-set"), _ + Array("end", "office:settings"), _ + Array("end", "office:document-settings")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + out.log("checking of import...") + Dim res As Boolean + Dim margin As String + margin = oDoc.getPropertyValue("TopMargin") + res = margin = sMargin + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/smgr/OServiceManager/script.xlb b/qadevOOo/tests/basic/mod/smgr/OServiceManager/script.xlb new file mode 100644 index 000000000000..2b1ca666431b --- /dev/null +++ b/qadevOOo/tests/basic/mod/smgr/OServiceManager/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="smgr_OServiceManager" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="smgr_OServiceManager"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/smgr/OServiceManager/smgr_OServiceManager.xba b/qadevOOo/tests/basic/mod/smgr/OServiceManager/smgr_OServiceManager.xba new file mode 100644 index 000000000000..ad027f869cb7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/smgr/OServiceManager/smgr_OServiceManager.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="smgr_OServiceManager" 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: + +' Requiered for com.sun.star.lang.XMultiServiceFactory + Global cServiceName As String ' ex. "com.sun.star.drawing.RectangleShape" + Global bCreateInstanceWithoutArguments As Boolean + Global aArguments() As Variant + +' Requiered for com.sun.star.lang.XMultiComponentFactory + Global aContext() As Variant + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' smgr.OServiceManager +'************************************************************************* +On Error Goto ErrHndl + Dim oPres As Object + + oDoc = utils.createImpressDocument(cObjectName) + oObj = createUnoService("com.sun.star.lang.ServiceManager") + + oPres = oDoc.getCustomPresentations() + oObj.insert(oPres) + cServiceName = "com.sun.star.presentation.CustomPresentationAccess" + bCreateInstanceWithoutArguments = true + aArguments() = noargs() + aContext() = noargs() + + oComponentInstance = createUnoService("com.sun.star.lang.ServiceManager") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/script.xlb b/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/script.xlb new file mode 100644 index 000000000000..4e1022aac7b8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/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="smplmail_SimpleSystemMail" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="smplmail_SimpleSystemMail"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/smplmail_SimpleSystemMail.xba b/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/smplmail_SimpleSystemMail.xba new file mode 100644 index 000000000000..9c7de18a21fd --- /dev/null +++ b/qadevOOo/tests/basic/mod/smplmail/SimpleSystemMail/smplmail_SimpleSystemMail.xba @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="smplmail_SimpleSystemMail" 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: +' smplmail.SimpleSystemMail +'************************************************************************* +On Error Goto ErrHndl + if (GetGuiType() = GUI_TYPE_WINDOWS) then + Out.Log("OS is Win : trying to create service ...") + oDoc = createUNOService("com.sun.star.system.SimpleSystemMail") + oObj = oDoc + else + Out.Log("OS is not Win : service is not available ...") + Out.Log("Creating Dummy object to avoid error in BasicBridge ...") + oObj = createUnoService("com.sun.star.io.Pipe") + Test.skipObjectCheck() + endif +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/srtrs/SortedDynamicResultSetFactory/script.xlb b/qadevOOo/tests/basic/mod/srtrs/SortedDynamicResultSetFactory/script.xlb new file mode 100644 index 000000000000..dcab36c3a4de --- /dev/null +++ b/qadevOOo/tests/basic/mod/srtrs/SortedDynamicResultSetFactory/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="srtrs_SortedDynamicResultSetFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="srtrs_SortedDynamicResultSetFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/srtrs/SortedDynamicResultSetFactory/srtrs_SortedDynamicResultSetFactory.xba b/qadevOOo/tests/basic/mod/srtrs/SortedDynamicResultSetFactory/srtrs_SortedDynamicResultSetFactory.xba new file mode 100644 index 000000000000..a3c5eff4937e --- /dev/null +++ b/qadevOOo/tests/basic/mod/srtrs/SortedDynamicResultSetFactory/srtrs_SortedDynamicResultSetFactory.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="srtrs_SortedDynamicResultSetFactory" 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: +' srtrs.SortedDynamicResultSetFactory +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUnoService("com.sun.star.ucb.SortedDynamicResultSetFactory") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/DataInputStream/script.xlb b/qadevOOo/tests/basic/mod/stm/DataInputStream/script.xlb new file mode 100644 index 000000000000..e139fe6fdc1c --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/DataInputStream/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="stm_DataInputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_DataInputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/DataInputStream/stm_DataInputStream.xba b/qadevOOo/tests/basic/mod/stm/DataInputStream/stm_DataInputStream.xba new file mode 100644 index 000000000000..541ee3f12d70 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/DataInputStream/stm_DataInputStream.xba @@ -0,0 +1,131 @@ +<?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="stm_DataInputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.DataInputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oOS As Object + + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicDataInputStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.DataInputStream") + + 'Creating a file... + oOS = oFileAcc.openFileWrite(cFileName) + oOS.closeOutput() + + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getOutStream() As Object +On Error goto ErrHndl + Dim oFO As Object + ResetStreams() + oInputStream.closeInput() + oOutputStream = createUnoService("com.sun.star.io.DataOutputStream") + oFileAcc.kill(cFileName) + oFO = oFileAcc.openFileWrite(cFileName) + oOutputStream.setOutputStream(oFO) + bOutputStream = true + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Function getInStream() As Object +On Error goto ErrHndl + ResetStreams() + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if + if bOutputStream then + oOutputStream.closeOutput() + bOutputStream = false + end if + + if NOT oFileAcc.exists(cFileName) then + Dim oFO As Object + oFO = oFileAcc.openFileWrite(cFileName) + oFO.closeOutput() + end if + + oInputStream = oFileAcc.openFileRead(cFileName) + bInputStream = true + oObj.setInputStream(oInputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeInput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/DataOutputStream/script.xlb b/qadevOOo/tests/basic/mod/stm/DataOutputStream/script.xlb new file mode 100644 index 000000000000..efe7b2965fe1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/DataOutputStream/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="stm_DataOutputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_DataOutputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/DataOutputStream/stm_DataOutputStream.xba b/qadevOOo/tests/basic/mod/stm/DataOutputStream/stm_DataOutputStream.xba new file mode 100644 index 000000000000..35344daf0705 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/DataOutputStream/stm_DataOutputStream.xba @@ -0,0 +1,115 @@ +<?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="stm_DataOutputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.DataOutputStream +'************************************************************************* +On Error Goto ErrHndl + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicDataOutputStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.DataOutputStream") + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error goto ErrHndl + Dim oFI As Object + ResetStreams() + oInputStream = createUnoService("com.sun.star.io.DataInputStream") + oFI = oFileAcc.openFileRead(cFileName) + oInputStream.setInputStream(oFI) + bInputStream = true + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error goto ErrHndl + ResetStreams() + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if + if bOutputStream then + oOutputStream.closeOutput() + bOutputStream = false + end if + oOutputStream = oFileAcc.openFileWrite(cFileName) + bOutputStream = true + oObj.setOutputStream(oOutputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeOutput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/MarkableInputStream/script.xlb b/qadevOOo/tests/basic/mod/stm/MarkableInputStream/script.xlb new file mode 100644 index 000000000000..111d34113e5e --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/MarkableInputStream/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="stm_MarkableInputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_MarkableInputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/MarkableInputStream/stm_MarkableInputStream.xba b/qadevOOo/tests/basic/mod/stm/MarkableInputStream/stm_MarkableInputStream.xba new file mode 100644 index 000000000000..2e4b93d772a8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/MarkableInputStream/stm_MarkableInputStream.xba @@ -0,0 +1,125 @@ +<?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="stm_MarkableInputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.MarkableInputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oOS As Object + + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicMarkableIOStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.MarkableInputStream") + 'Creating a file... + if oFileAcc.exists(cFileName) then oFileAcc.Kill(cFileName) + oOS = oFileAcc.openFileWrite(cFileName) + oOS.closeOutput() + + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error goto ErrHndl + ResetStreams() + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error goto ErrHndl + Dim oFO As Object + + ResetStreams() + oOutputStream = createUnoService("com.sun.star.io.MarkableOutputStream") + oInputStream.closeInput() + oFileAcc.Kill(cFileName) + oFO = oFileAcc.openFileWrite(cFileName) + oOutputStream.setOutputStream(oFO) + bOutputStream = true + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + if bOutputStream then + oOutputStream.closeOutput() + bOutputStream = false + end if + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if + oInputStream = oFileAcc.openFileRead(cFileName) + bInputStream = true + oObj.setInputStream(oInputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeInput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/MarkableOutputStream/script.xlb b/qadevOOo/tests/basic/mod/stm/MarkableOutputStream/script.xlb new file mode 100644 index 000000000000..98c1f2b8c4d3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/MarkableOutputStream/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="stm_MarkableOutputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_MarkableOutputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/MarkableOutputStream/stm_MarkableOutputStream.xba b/qadevOOo/tests/basic/mod/stm/MarkableOutputStream/stm_MarkableOutputStream.xba new file mode 100644 index 000000000000..b9e9835dcd43 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/MarkableOutputStream/stm_MarkableOutputStream.xba @@ -0,0 +1,127 @@ +<?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="stm_MarkableOutputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.MarkableOutputStream +'************************************************************************* +On Error Goto ErrHndl + + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicMarkableIOStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.MarkableOutputStream") + + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getOutStream() As Object +On Error Goto ErrHndl + CloseStreams() + oOutputStream = oFileAcc.openFileWrite(cFileName) + bOutputStream = true + oObj.setOutputStream(oOutputStream) + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Function getInStream() As Object +On Error Goto ErrHndl + Dim oFI As Object + + CloseStreams() + oInputStream = createUnoService("com.sun.star.io.MarkableInputStream") + oFI = oFileAcc.openFileRead(cFileName) + oInputStream.setInputStream(oFI) + bInputStream = true + getInStream() = oInputStream + +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + CloseStreams() + oFileAcc.Kill(cFileName) + oOutputStream = oFileAcc.openFileWrite(cFileName) + bOutputStream = true + oObj.setOutputStream(oOutputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub CloseStreams() + if bOutputStream then + oObj.closeOutput() + bOutputStream = false + end if + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeOutput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/ObjectInputStream/script.xlb b/qadevOOo/tests/basic/mod/stm/ObjectInputStream/script.xlb new file mode 100644 index 000000000000..27475e3cc3c0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/ObjectInputStream/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="stm_ObjectInputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_ObjectInputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/ObjectInputStream/stm_ObjectInputStream.xba b/qadevOOo/tests/basic/mod/stm/ObjectInputStream/stm_ObjectInputStream.xba new file mode 100644 index 000000000000..df0bbfd4e9b9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/ObjectInputStream/stm_ObjectInputStream.xba @@ -0,0 +1,109 @@ +<?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="stm_ObjectInputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global oMarkOut As Object, oMarkIn As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.ObjectInputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oPipe As Object + + oObj = createUnoService("com.sun.star.io.ObjectInputStream") + oMarkIn = createUnoService("com.sun.star.io.MarkableInputStream") + oPipe = createUnoService("com.sun.star.io.Pipe") + oMarkOut = createUnoService("com.sun.star.io.MarkableOutputStream") + oOutputStream = createUnoService("com.sun.star.io.ObjectOutputStream") + oObj.setInputStream(oMarkIn) + oMarkIn.setInputStream(oPipe) + oMarkOut.setOutputStream(oPipe) + oOutputStream.setOutputStream(oMarkOut) + oInputStream = oObj + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error Goto ErrHndl + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error Goto ErrHndl + Dim oNewPipe As Object + + oNewPipe = createUnoService("com.sun.star.io.Pipe") + oMarkIn.getInputStream().closeInput() + oMarkOut.getOutputStream().closeOutput() + oMarkIn.setInputStream(oNewPipe) + oMarkOut.setOutputStream(oNewPipe) + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl +Exit Sub +ErrHndl: + Out.Log("ResetStreams: exception: " + error) + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeInput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/ObjectOutputStream/script.xlb b/qadevOOo/tests/basic/mod/stm/ObjectOutputStream/script.xlb new file mode 100644 index 000000000000..2388085a07d5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/ObjectOutputStream/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="stm_ObjectOutputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_ObjectOutputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/ObjectOutputStream/stm_ObjectOutputStream.xba b/qadevOOo/tests/basic/mod/stm/ObjectOutputStream/stm_ObjectOutputStream.xba new file mode 100644 index 000000000000..2e041224c9ac --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/ObjectOutputStream/stm_ObjectOutputStream.xba @@ -0,0 +1,104 @@ +<?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="stm_ObjectOutputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global oMarkOut As Object, oMarkIn As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.ObjectOutputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oPipe As Object + + oObj = createUnoService("com.sun.star.io.ObjectOutputStream") + oMarkOut = createUnoService("com.sun.star.io.MarkableOutputStream") + oPipe = createUnoService("com.sun.star.io.Pipe") + oMarkIn = createUnoService("com.sun.star.io.MarkableInputStream") + oInputStream = createUnoService("com.sun.star.io.ObjectInputStream") + oObj.setOutputStream(oMarkOut) + oMarkOut.setOutputStream(oPipe) + oMarkIn.setInputStream(oPipe) + oInputStream.setInputStream(oMarkIn) + oOutputStream = oObj + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error Goto ErrHndl + Dim oFI As Object + + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error Goto ErrHndl + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeOutput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/Pipe/script.xlb b/qadevOOo/tests/basic/mod/stm/Pipe/script.xlb new file mode 100644 index 000000000000..f13f198a9dd0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/Pipe/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="stm_Pipe" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_Pipe"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/Pipe/stm_Pipe.xba b/qadevOOo/tests/basic/mod/stm/Pipe/stm_Pipe.xba new file mode 100644 index 000000000000..2aab9c88cc2a --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/Pipe/stm_Pipe.xba @@ -0,0 +1,81 @@ +<?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="stm_Pipe" 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: +' stm.Pipe +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.io.Pipe") +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error Goto ErrHndl + getInStream() = oObj +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error Goto ErrHndl + getOutStream() = oObj +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error Goto ErrHndl + oObj.closeInput() + oObj.closeOutput() + oObj = createUnoService("com.sun.star.io.Pipe") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/stm/Pump/script.xlb b/qadevOOo/tests/basic/mod/stm/Pump/script.xlb new file mode 100644 index 000000000000..848abf83b3ba --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/Pump/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="stm_Pump" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="stm_Pump"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/stm/Pump/stm_Pump.xba b/qadevOOo/tests/basic/mod/stm/Pump/stm_Pump.xba new file mode 100644 index 000000000000..46f1a9e77835 --- /dev/null +++ b/qadevOOo/tests/basic/mod/stm/Pump/stm_Pump.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="stm_Pump" 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 oPipe As Object +Global PumpOUTFileName As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.Pump +'************************************************************************* +On Error Goto ErrHndl + Dim oFileAcc As Object + Dim oDataInput As Object + Dim oDataOutput As Object + Dim oSFA As Object + Dim oOS As Object + + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + PumpOUTFileName = utils.getTempFileURL("PumpOUT.dat") + if (FileExists(PumpOUTFileName)) then + oFileAcc.Kill(PumpOUTFileName) + end if + + oObj = createUnoService("com.sun.star.io.Pump") + oPipe = createUnoService("com.sun.star.io.Pipe") + + oDataInput = createUnoService("com.sun.star.io.DataInputStream") + oDataInput.setInputStream(oPipe) + + oDataOutput = createUnoService("com.sun.star.io.DataOutputStream") + oSFA = createUnoService("com.sun.star.ucb.SimpleFileAccess") + oOS = oSFA.openFileWrite(PumpOUTFileName) + oDataOutput.setOutputStream(oOS) + + oObj.setInputStream(oDataInput) + oObj.setOutputStream(oDataOutput) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() +On Error goto ErrHndl + oObj.terminate() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub ResetStreams() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/DataInputStream/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/DataInputStream/script.xlb new file mode 100644 index 000000000000..41b969bb8788 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/DataInputStream/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="streams_uno_DataInputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_DataInputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/DataInputStream/streams_uno_DataInputStream.xba b/qadevOOo/tests/basic/mod/streams.uno/DataInputStream/streams_uno_DataInputStream.xba new file mode 100644 index 000000000000..bfa5f3ed20cd --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/DataInputStream/streams_uno_DataInputStream.xba @@ -0,0 +1,131 @@ +<?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="streams_uno_DataInputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.DataInputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oOS As Object + + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicDataInputStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.DataInputStream") + + 'Creating a file... + oOS = oFileAcc.openFileWrite(cFileName) + oOS.closeOutput() + + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getOutStream() As Object +On Error goto ErrHndl + Dim oFO As Object + ResetStreams() + oInputStream.closeInput() + oOutputStream = createUnoService("com.sun.star.io.DataOutputStream") + oFileAcc.kill(cFileName) + oFO = oFileAcc.openFileWrite(cFileName) + oOutputStream.setOutputStream(oFO) + bOutputStream = true + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Function getInStream() As Object +On Error goto ErrHndl + ResetStreams() + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if + if bOutputStream then + oOutputStream.closeOutput() + bOutputStream = false + end if + + if NOT oFileAcc.exists(cFileName) then + Dim oFO As Object + oFO = oFileAcc.openFileWrite(cFileName) + oFO.closeOutput() + end if + + oInputStream = oFileAcc.openFileRead(cFileName) + bInputStream = true + oObj.setInputStream(oInputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeInput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/DataOutputStream/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/DataOutputStream/script.xlb new file mode 100644 index 000000000000..f7ad5002b6ec --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/DataOutputStream/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="streams_uno_DataOutputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_DataOutputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/DataOutputStream/streams_uno_DataOutputStream.xba b/qadevOOo/tests/basic/mod/streams.uno/DataOutputStream/streams_uno_DataOutputStream.xba new file mode 100644 index 000000000000..fb0aa1208a50 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/DataOutputStream/streams_uno_DataOutputStream.xba @@ -0,0 +1,115 @@ +<?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="streams_uno_DataOutputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.DataOutputStream +'************************************************************************* +On Error Goto ErrHndl + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicDataOutputStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.DataOutputStream") + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error goto ErrHndl + Dim oFI As Object + ResetStreams() + oInputStream = createUnoService("com.sun.star.io.DataInputStream") + oFI = oFileAcc.openFileRead(cFileName) + oInputStream.setInputStream(oFI) + bInputStream = true + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error goto ErrHndl + ResetStreams() + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if + if bOutputStream then + oOutputStream.closeOutput() + bOutputStream = false + end if + oOutputStream = oFileAcc.openFileWrite(cFileName) + bOutputStream = true + oObj.setOutputStream(oOutputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeOutput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/MarkableInputStream/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/MarkableInputStream/script.xlb new file mode 100644 index 000000000000..4b4425f434ec --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/MarkableInputStream/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="streams_uno_MarkableInputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_MarkableInputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/MarkableInputStream/streams_uno_MarkableInputStream.xba b/qadevOOo/tests/basic/mod/streams.uno/MarkableInputStream/streams_uno_MarkableInputStream.xba new file mode 100644 index 000000000000..1422df8ecc59 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/MarkableInputStream/streams_uno_MarkableInputStream.xba @@ -0,0 +1,125 @@ +<?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="streams_uno_MarkableInputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.MarkableInputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oOS As Object + + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicMarkableIOStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.MarkableInputStream") + 'Creating a file... + if oFileAcc.exists(cFileName) then oFileAcc.Kill(cFileName) + oOS = oFileAcc.openFileWrite(cFileName) + oOS.closeOutput() + + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error goto ErrHndl + ResetStreams() + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error goto ErrHndl + Dim oFO As Object + + ResetStreams() + oOutputStream = createUnoService("com.sun.star.io.MarkableOutputStream") + oInputStream.closeInput() + oFileAcc.Kill(cFileName) + oFO = oFileAcc.openFileWrite(cFileName) + oOutputStream.setOutputStream(oFO) + bOutputStream = true + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + if bOutputStream then + oOutputStream.closeOutput() + bOutputStream = false + end if + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if + oInputStream = oFileAcc.openFileRead(cFileName) + bInputStream = true + oObj.setInputStream(oInputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeInput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/MarkableOutputStream/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/MarkableOutputStream/script.xlb new file mode 100644 index 000000000000..6663e7824216 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/MarkableOutputStream/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="streams_uno_MarkableOutputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_MarkableOutputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/MarkableOutputStream/streams_uno_MarkableOutputStream.xba b/qadevOOo/tests/basic/mod/streams.uno/MarkableOutputStream/streams_uno_MarkableOutputStream.xba new file mode 100644 index 000000000000..e22c3c08920d --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/MarkableOutputStream/streams_uno_MarkableOutputStream.xba @@ -0,0 +1,127 @@ +<?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="streams_uno_MarkableOutputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global bInputStream As Boolean +Global bOutputStream As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.MarkableOutputStream +'************************************************************************* +On Error Goto ErrHndl + + bInputStream = false + bOutputStream = false + cFileName = utils.getTempFileURL("BasicMarkableIOStream.dat") + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + + oObj = createUnoService("com.sun.star.io.MarkableOutputStream") + + ResetStreams() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getOutStream() As Object +On Error Goto ErrHndl + CloseStreams() + oOutputStream = oFileAcc.openFileWrite(cFileName) + bOutputStream = true + oObj.setOutputStream(oOutputStream) + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Function getInStream() As Object +On Error Goto ErrHndl + Dim oFI As Object + + CloseStreams() + oInputStream = createUnoService("com.sun.star.io.MarkableInputStream") + oFI = oFileAcc.openFileRead(cFileName) + oInputStream.setInputStream(oFI) + bInputStream = true + getInStream() = oInputStream + +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl + CloseStreams() + oFileAcc.Kill(cFileName) + oOutputStream = oFileAcc.openFileWrite(cFileName) + bOutputStream = true + oObj.setOutputStream(oOutputStream) +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub CloseStreams() + if bOutputStream then + oObj.closeOutput() + bOutputStream = false + end if + if bInputStream then + oInputStream.closeInput() + bInputStream = false + end if +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeOutput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/ObjectInputStream/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/ObjectInputStream/script.xlb new file mode 100644 index 000000000000..329eca656003 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/ObjectInputStream/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="streams_uno_ObjectInputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_ObjectInputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/ObjectInputStream/streams_uno_ObjectInputStream.xba b/qadevOOo/tests/basic/mod/streams.uno/ObjectInputStream/streams_uno_ObjectInputStream.xba new file mode 100644 index 000000000000..aff5365ea042 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/ObjectInputStream/streams_uno_ObjectInputStream.xba @@ -0,0 +1,109 @@ +<?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="streams_uno_ObjectInputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global oMarkOut As Object, oMarkIn As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.ObjectInputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oPipe As Object + + oObj = createUnoService("com.sun.star.io.ObjectInputStream") + oMarkIn = createUnoService("com.sun.star.io.MarkableInputStream") + oPipe = createUnoService("com.sun.star.io.Pipe") + oMarkOut = createUnoService("com.sun.star.io.MarkableOutputStream") + oOutputStream = createUnoService("com.sun.star.io.ObjectOutputStream") + oObj.setInputStream(oMarkIn) + oMarkIn.setInputStream(oPipe) + oMarkOut.setOutputStream(oPipe) + oOutputStream.setOutputStream(oMarkOut) + oInputStream = oObj + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error Goto ErrHndl + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error Goto ErrHndl + Dim oNewPipe As Object + + oNewPipe = createUnoService("com.sun.star.io.Pipe") + oMarkIn.getInputStream().closeInput() + oMarkOut.getOutputStream().closeOutput() + oMarkIn.setInputStream(oNewPipe) + oMarkOut.setOutputStream(oNewPipe) + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl +Exit Sub +ErrHndl: + Out.Log("ResetStreams: exception: " + error) + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeInput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/ObjectOutputStream/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/ObjectOutputStream/script.xlb new file mode 100644 index 000000000000..a27b2b8d59fe --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/ObjectOutputStream/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="streams_uno_ObjectOutputStream" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_ObjectOutputStream"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/ObjectOutputStream/streams_uno_ObjectOutputStream.xba b/qadevOOo/tests/basic/mod/streams.uno/ObjectOutputStream/streams_uno_ObjectOutputStream.xba new file mode 100644 index 000000000000..3028400557ec --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/ObjectOutputStream/streams_uno_ObjectOutputStream.xba @@ -0,0 +1,104 @@ +<?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="streams_uno_ObjectOutputStream" 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 cFileName As String +Global oFileAcc As Object +Global oInputStream As Object +Global oOutputStream As Object +Global oMarkOut As Object, oMarkIn As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.ObjectOutputStream +'************************************************************************* +On Error Goto ErrHndl + Dim oPipe As Object + + oObj = createUnoService("com.sun.star.io.ObjectOutputStream") + oMarkOut = createUnoService("com.sun.star.io.MarkableOutputStream") + oPipe = createUnoService("com.sun.star.io.Pipe") + oMarkIn = createUnoService("com.sun.star.io.MarkableInputStream") + oInputStream = createUnoService("com.sun.star.io.ObjectInputStream") + oObj.setOutputStream(oMarkOut) + oMarkOut.setOutputStream(oPipe) + oMarkIn.setInputStream(oPipe) + oInputStream.setInputStream(oMarkIn) + oOutputStream = oObj + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error Goto ErrHndl + Dim oFI As Object + + getInStream() = oInputStream +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error Goto ErrHndl + getOutStream() = oOutputStream +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error goto ErrHndl +Exit Sub +ErrHndl: + Test.Exception() + resume next +End Sub + +Sub DisposeObj() + if NOT isNULL(oObj) then oObj.closeOutput() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/Pipe/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/Pipe/script.xlb new file mode 100644 index 000000000000..566b7ce26a32 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/Pipe/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="streams_uno_Pipe" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_Pipe"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/Pipe/streams_uno_Pipe.xba b/qadevOOo/tests/basic/mod/streams.uno/Pipe/streams_uno_Pipe.xba new file mode 100644 index 000000000000..171cda1d2359 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/Pipe/streams_uno_Pipe.xba @@ -0,0 +1,81 @@ +<?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="streams_uno_Pipe" 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: +' stm.Pipe +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.io.Pipe") +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function getInStream() As Object +On Error Goto ErrHndl + getInStream() = oObj +Exit Function +ErrHndl: + Test.Exception() + getInStream() = NULL_OBJECT +End Function + +Function getOutStream() As Object +On Error Goto ErrHndl + getOutStream() = oObj +Exit Function +ErrHndl: + Test.Exception() + getOutStream() = NULL_OBJECT +End Function + +Sub ResetStreams() +On Error Goto ErrHndl + oObj.closeInput() + oObj.closeOutput() + oObj = createUnoService("com.sun.star.io.Pipe") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/streams.uno/Pump/script.xlb b/qadevOOo/tests/basic/mod/streams.uno/Pump/script.xlb new file mode 100644 index 000000000000..6517d34d93ef --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/Pump/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="streams_uno_Pump" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="streams_uno_Pump"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/streams.uno/Pump/streams_uno_Pump.xba b/qadevOOo/tests/basic/mod/streams.uno/Pump/streams_uno_Pump.xba new file mode 100644 index 000000000000..ba8397bcdcb4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/streams.uno/Pump/streams_uno_Pump.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="streams_uno_Pump" 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 oPipe As Object +Global PumpOUTFileName As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' stm.Pump +'************************************************************************* +On Error Goto ErrHndl + Dim oFileAcc As Object + Dim oDataInput As Object + Dim oDataOutput As Object + Dim oSFA As Object + Dim oOS As Object + + oFileAcc = createUnoService("com.sun.star.ucb.SimpleFileAccess") + PumpOUTFileName = utils.getTempFileURL("PumpOUT.dat") + if (FileExists(PumpOUTFileName)) then + oFileAcc.Kill(PumpOUTFileName) + end if + + oObj = createUnoService("com.sun.star.io.Pump") + oPipe = createUnoService("com.sun.star.io.Pipe") + + oDataInput = createUnoService("com.sun.star.io.DataInputStream") + oDataInput.setInputStream(oPipe) + + oDataOutput = createUnoService("com.sun.star.io.DataOutputStream") + oSFA = createUnoService("com.sun.star.ucb.SimpleFileAccess") + oOS = oSFA.openFileWrite(PumpOUTFileName) + oDataOutput.setOutputStream(oOS) + + oObj.setInputStream(oDataInput) + oObj.setOutputStream(oDataOutput) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() +On Error goto ErrHndl + oObj.terminate() +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub ResetStreams() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBox/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBox/script.xlb new file mode 100644 index 000000000000..8d44d126a214 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBox/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="svtools_AccessibleBrowseBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleBrowseBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBox/svtools_AccessibleBrowseBox.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBox/svtools_AccessibleBrowseBox.xba new file mode 100644 index 000000000000..61f454848be9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBox/svtools_AccessibleBrowseBox.xba @@ -0,0 +1,115 @@ +<?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="svtools_AccessibleBrowseBox" 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 controller As Object + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svtools.AccessibleBrowseBox +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".component:DB/DataSourceBrowser" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "_beamer", 12) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PANEL) + Out.log(oObj.getImplementationName) + + Dim frame1 As Object, frame2 As Object + frame1 = StarDesktop.getCurrentFrame() + frame2 = frame1.findFrame("_beamer", 4) + frame2.setName("DatasourceBrowser") + controller = frame2.getController() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Out.log("fireEvent() called") + + Dim dbContext As Object + dbContext = createUnoService("com.sun.star.sdb.DatabaseContext") + if (dbContext.hasByName("Bibliography")) then + dbContext.revokeObject("Bibliography") + endif + + Dim dbSource As Object + dbSource = createUnoService("com.sun.star.sdb.DataSource") + dbSource.URL = "sdbc:dbase:" + utils.Path2URL("file:///" + utils.getUserPath + "/database/biblio") + dbContext.registerObject("Bibliography", dbSource) + + Dim params(2) As new com.sun.star.beans.PropertyValue + params(0).Name = "DataSourceName" + params(0).Value = "Bibliography" + params(1).Name = "CommandType" + params(1).Value = com.sun.star.sdb.CommandType.TABLE + params(2).Name = "Command" + params(2).Value = "biblio" + + controller.initialize(params()) + wait(2000) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderBar/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderBar/script.xlb new file mode 100644 index 000000000000..cf9be87447ca --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderBar/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="svtools_AccessibleBrowseBoxHeaderBar" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleBrowseBoxHeaderBar"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderBar/svtools_AccessibleBrowseBoxHeaderBar.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderBar/svtools_AccessibleBrowseBoxHeaderBar.xba new file mode 100644 index 000000000000..77023c3fc39b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderBar/svtools_AccessibleBrowseBoxHeaderBar.xba @@ -0,0 +1,85 @@ +<?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="svtools_AccessibleBrowseBoxHeaderBar" 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: +' svtools.AccessibleBrowseBoxHeaderBar +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".component:DB/DataSourceBrowser" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "_beamer", 12) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TABLE) + Out.log(oObj.getImplementationName) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderCell/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderCell/script.xlb new file mode 100644 index 000000000000..9aaf5383f8bc --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderCell/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="svtools_AccessibleBrowseBoxHeaderCell" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleBrowseBoxHeaderCell"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderCell/svtools_AccessibleBrowseBoxHeaderCell.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderCell/svtools_AccessibleBrowseBoxHeaderCell.xba new file mode 100644 index 000000000000..666fad6474f7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxHeaderCell/svtools_AccessibleBrowseBoxHeaderCell.xba @@ -0,0 +1,98 @@ +<?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="svtools_AccessibleBrowseBoxHeaderCell" 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: +' svtools.AccessibleBrowseBoxHeaderCell +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".component:DB/DataSourceBrowser" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "_beamer", 12) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + Dim frame1 As Object, frame2 As Object + Dim controller As Object + frame1 = StarDesktop.getCurrentFrame() + frame2 = frame1.findFrame("_beamer", 4) + frame2.setName("DatasourceBrowser") + controller = frame2.getController() + + Dim params(2) As new com.sun.star.beans.PropertyValue + params(0).Name = "DataSourceName" + params(0).Value = "Bibliography" + params(1).Name = "CommandType" + params(1).Value = com.sun.star.sdb.CommandType.TABLE + params(2).Name = "Command" + params(2).Value = "biblio" + controller.initialize(params()) + wait(2000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.COLUMN_HEADER, "Identifier") + Out.log(oObj.getImplementationName) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTable/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTable/script.xlb new file mode 100644 index 000000000000..3a2e4b97b676 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTable/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="svtools_AccessibleBrowseBoxTable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleBrowseBoxTable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTable/svtools_AccessibleBrowseBoxTable.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTable/svtools_AccessibleBrowseBoxTable.xba new file mode 100644 index 000000000000..b7a726de892f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTable/svtools_AccessibleBrowseBoxTable.xba @@ -0,0 +1,81 @@ +<?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="svtools_AccessibleBrowseBoxTable" 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: +' svtools.AccessibleBrowseBoxTable +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".component:DB/DataSourceBrowser" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "_beamer", 12) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TABLE, "Table") + Out.log(oObj.getImplementationName) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTableCell/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTableCell/script.xlb new file mode 100644 index 000000000000..15e06f1da551 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTableCell/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="svtools_AccessibleBrowseBoxTableCell" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleBrowseBoxTableCell"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTableCell/svtools_AccessibleBrowseBoxTableCell.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTableCell/svtools_AccessibleBrowseBoxTableCell.xba new file mode 100644 index 000000000000..e6f8b5df1e9e --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleBrowseBoxTableCell/svtools_AccessibleBrowseBoxTableCell.xba @@ -0,0 +1,98 @@ +<?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="svtools_AccessibleBrowseBoxTableCell" 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: +' svtools.AccessibleBrowseBoxTableCell +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".component:DB/DataSourceBrowser" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "_beamer", 12) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + Dim frame1 As Object, frame2 As Object + Dim controller As Object + frame1 = StarDesktop.getCurrentFrame() + frame2 = frame1.findFrame("_beamer", 4) + frame2.setName("DatasourceBrowser") + controller = frame2.getController() + + Dim params(2) As new com.sun.star.beans.PropertyValue + params(0).Name = "DataSourceName" + params(0).Value = "Bibliography" + params(1).Name = "CommandType" + params(1).Value = com.sun.star.sdb.CommandType.TABLE + params(2).Name = "Command" + params(2).Value = "biblio" + controller.initialize(params()) + wait(2000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TABLE_CELL) + Out.log(oObj.getImplementationName) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrl/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrl/script.xlb new file mode 100644 index 000000000000..84bb1302f21b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrl/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="svtools_AccessibleIconChoiceCtrl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleIconChoiceCtrl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrl/svtools_AccessibleIconChoiceCtrl.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrl/svtools_AccessibleIconChoiceCtrl.xba new file mode 100644 index 000000000000..882d9bc2e6f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrl/svtools_AccessibleIconChoiceCtrl.xba @@ -0,0 +1,98 @@ +<?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="svtools_AccessibleIconChoiceCtrl" 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 closeButton As Object +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svtools.AccessibleIconChoiceCtrl +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim xController As Object, xDispatcher As Object + Dim tk As Object, urlTransformer As Object + Dim aUrl As new com.sun.star.util.URL + + oDoc = utils.createDocument("swriter", cObjectName) + tk = createUnoService("com.sun.star.awt.Toolkit") + wait(500) + + 'opening Hyperlink Dialog + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + aUrl.Complete = ".uno:HyperlinkDialog" + urlTransformer.parseStrict(aUrl) + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "", 0) + if NOT isNull(xDispatcher) then + xDispatcher.dispatch(aUrl, DimArray()) + wait(1000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + closeButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON, "Close") + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TREE) + Out.Log("Implementation Name: "+oObj.getImplementationName()) + multiSelection = false + else + Out.Log("Error! Cannot open Hyperlink dialog.") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNull(closeButton) then + closeButton.doAccessibleAction(0) + wait(1000) + End If + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + oObj.selectAccessibleChild(1) + oObj.selectAccessibleChild(0) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrlEntry/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrlEntry/script.xlb new file mode 100644 index 000000000000..6f46292399bd --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrlEntry/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="svtools_AccessibleIconChoiceCtrlEntry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleIconChoiceCtrlEntry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrlEntry/svtools_AccessibleIconChoiceCtrlEntry.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrlEntry/svtools_AccessibleIconChoiceCtrlEntry.xba new file mode 100644 index 000000000000..2833c8b1726f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleIconChoiceCtrlEntry/svtools_AccessibleIconChoiceCtrlEntry.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="svtools_AccessibleIconChoiceCtrlEntry" 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 closeButton As Object + +'Required for ifc.accessibility.XAccessibleText +Global accText As String +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svtools.AccessibleIconChoiceCtrlEntry +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".uno:HyperlinkDialog" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "", 0) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot,_ + com.sun.star.accessibility.AccessibleRole.LABEL, "Internet") + Out.log(oObj.getImplementationName) + + closeButton = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON, "Close") + accText = "Internet" + readOnly = true +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + closeButton.soAccessibleAction(0) + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPage/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPage/script.xlb new file mode 100644 index 000000000000..4a0245810089 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPage/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="svtools_AccessibleTabBarPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleTabBarPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPage/svtools_AccessibleTabBarPage.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPage/svtools_AccessibleTabBarPage.xba new file mode 100644 index 000000000000..31b998a5396d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPage/svtools_AccessibleTabBarPage.xba @@ -0,0 +1,66 @@ +<?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="svtools_AccessibleTabBarPage" 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: +' svtools.AccessibleTabBarPage +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PAGE_TAB) + + Out.log(oObj.getImplementationName) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPageList/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPageList/script.xlb new file mode 100644 index 000000000000..0a8715db28c7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPageList/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="svtools_AccessibleTabBarPageList" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleTabBarPageList"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPageList/svtools_AccessibleTabBarPageList.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPageList/svtools_AccessibleTabBarPageList.xba new file mode 100644 index 000000000000..add0261e7567 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTabBarPageList/svtools_AccessibleTabBarPageList.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="svtools_AccessibleTabBarPageList" 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 XAccessibleSelection +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svtools.AccessibleTabBarPageList +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PAGE_TAB_LIST) + Out.log(oObj.getImplementationName) + + multiSelection = false +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim oPage As Object + oPage = oDoc.getDrawPages().getByIndex(0) + oPage.Name = "New name" + oPage.Name = "Slide 1" +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBox/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBox/script.xlb new file mode 100644 index 000000000000..8e33c86bf389 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBox/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="svtools_AccessibleTreeListBox" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleTreeListBox"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBox/svtools_AccessibleTreeListBox.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBox/svtools_AccessibleTreeListBox.xba new file mode 100644 index 000000000000..28ae95af7f0a --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBox/svtools_AccessibleTreeListBox.xba @@ -0,0 +1,87 @@ +<?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="svtools_AccessibleTreeListBox" 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 XAccessibleSelection +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svtools.AccessibleTreeListBox +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".component:DB/DataSourceBrowser" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "_beamer", 12) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TREE) + Out.log(oObj.getImplementationName) + + multiSelection = false +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oObj.grabFocus() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBoxEntry/script.xlb b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBoxEntry/script.xlb new file mode 100644 index 000000000000..962db06a0175 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBoxEntry/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="svtools_AccessibleTreeListBoxEntry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svtools_AccessibleTreeListBoxEntry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBoxEntry/svtools_AccessibleTreeListBoxEntry.xba b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBoxEntry/svtools_AccessibleTreeListBoxEntry.xba new file mode 100644 index 000000000000..7f493975bbc2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svtools/AccessibleTreeListBoxEntry/svtools_AccessibleTreeListBoxEntry.xba @@ -0,0 +1,93 @@ +<?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="svtools_AccessibleTreeListBoxEntry" 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 XAccessibleSelection +Global multiSelection As Boolean + +' Required for XAccessibleText +Global accText As String +Global readOnly as Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svtools.AccessibleTreeListBoxEntry +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + 'opening DatasourceBrowser + Dim urlTransformer As Object + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + Dim aUrl As new com.sun.star.util.URL + aUrl.Complete = ".component:DB/DataSourceBrowser" + urlTransformer.parseStrict(aUrl) + Dim xDispatcher As Object + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl, "_beamer", 12) + Dim no_args() + xDispatcher.dispatch(aUrl, no_args) + wait(1000) + + oWin = createUnoService("com.sun.star.awt.Toolkit").getActiveTopWindow() + + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.LABEL , "Bibliography") + Out.log(oObj.getImplementationName) + + multiSelection = false + accText = "Bibliography" + readOnly = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/script.xlb new file mode 100644 index 000000000000..77d4ad179a8b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/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="svx_AccessibleControlShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleControlShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/svx_AccessibleControlShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/svx_AccessibleControlShape.xba new file mode 100644 index 000000000000..3c9d71237bb6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleControlShape/svx_AccessibleControlShape.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="svx_AccessibleControlShape" 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 oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleControlShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + Dim newSize As New com.sun.star.awt.Size + + oDoc = utils.createDocument("sdraw", cObjectName) + oShape = toolkittools.createControlShapeWithDefaultControl("CommandButton") + newSize = oShape.getSize() + newSize.Width = 2000 + newSize.Height = 1000 + oShape.setSize(newSize) + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"PushButton") + Out.Log("ImplementationName: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/script.xlb new file mode 100644 index 000000000000..75b3b77785b0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/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="svx_AccessibleEditableTextPara" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="svx_AccessibleEditableTextPara"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/svx_AccessibleEditableTextPara.xba b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/svx_AccessibleEditableTextPara.xba new file mode 100644 index 000000000000..3cc36dc5665b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleEditableTextPara/svx_AccessibleEditableTextPara.xba @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AccessibleEditableTextPara" 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::XAccessibleEditableText#optional" + ' needs the following object relation: + global hasChangeableAttrs as boolean + +' "com::sun::star::accessibility::XAccessibleSelection#optional" + ' needs the following object relation: +' Global multiSelection As Boolean + +' "com::sun::star::accessibility::XAccessibleText" + ' needs the following object relation: + Global accText as String + Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.AccessibleEditableTextPara +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + + oDoc.DrawPages(0).add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 7500 + oSize.Height = 5000 + oPos.X = 5000 + oPos.Y = 3500 + oShape.Size = oSize + oShape.Position = oPos + + Dim cursor As Object + cursor = oShape.createTextCursor() + + oShape.insertString(cursor, "Paragraph 1", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + Dim oWin as Object + Dim xRoot as Object + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PARAGRAPH,"Paragraph 0") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + accText = "My AccessibleEditableTextPara text" + oObj.setText(accText) + readOnly = false + hasChangeableAttrs = false + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim myText as String + myText = oObj.getText() + oObj.setText(myText + "dummy") + wait(1000) + oObj.setText(myText) + wait(1000) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/script.xlb new file mode 100644 index 000000000000..68aabd47df19 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/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="svx_AccessibleGraphicShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleGraphicShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/svx_AccessibleGraphicShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/svx_AccessibleGraphicShape.xba new file mode 100644 index 000000000000..ba3b7268d5b5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleGraphicShape/svx_AccessibleGraphicShape.xba @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="svx_AccessibleGraphicShape" 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 oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleGraphicShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oDP = oDoc.getDrawPages().getByIndex(0) + oShape = toolkittools.addShapeToDrawDoc(oDP,2000,1500,"GraphicObject") + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"GraphicObject") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/script.xlb new file mode 100644 index 000000000000..b5489ac01e47 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/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="svx_AccessibleOLEShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleOLEShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/svx_AccessibleOLEShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/svx_AccessibleOLEShape.xba new file mode 100644 index 000000000000..f30a5d9f977f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleOLEShape/svx_AccessibleOLEShape.xba @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="svx_AccessibleOLEShape" 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 oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleOLEShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oDP = oDoc.getDrawPages().getByIndex(0) + oShape = toolkittools.addShapeToDrawDoc(oDP,2000,1500,"OLE2") + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"OLEShape") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/script.xlb new file mode 100644 index 000000000000..bae91fa48bb8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/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="svx_AccessiblePageShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePageShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/svx_AccessiblePageShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/svx_AccessiblePageShape.xba new file mode 100644 index 000000000000..b657a5d9a43d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePageShape/svx_AccessiblePageShape.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="svx_AccessiblePageShape" 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 oPage As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePageShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oPage = oDoc.getDrawPages().getByIndex(0) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"PageShape") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oldHeight As Integer, newHeight As Integer + oldHeight = oPage.getPropertyValue("Height") + if oldHeight = 3000 then + newHeight = 5000 + else + newHeight = 3000 + end if + oPage.setPropertyValue("Height",newHeight) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/script.xlb new file mode 100644 index 000000000000..5c4ed50fcd54 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/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="svx_AccessiblePresentationGraphicShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePresentationGraphicShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/svx_AccessiblePresentationGraphicShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/svx_AccessiblePresentationGraphicShape.xba new file mode 100644 index 000000000000..a80bad77237b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationGraphicShape/svx_AccessiblePresentationGraphicShape.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="svx_AccessiblePresentationGraphicShape" 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 oShape As Object +Global accText As Object +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePresentationGraphicShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createImpressDocument(cObjectName) + oShape = oDoc.createInstance("com.sun.star.presentation.GraphicObjectShape") + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oShape.setPropertyValue("IsEmptyPresentationObject",false) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"ImpressGraphicObject0") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/script.xlb new file mode 100644 index 000000000000..28a82bbc9a42 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/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="svx_AccessiblePresentationOLEShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePresentationOLEShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/svx_AccessiblePresentationOLEShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/svx_AccessiblePresentationOLEShape.xba new file mode 100644 index 000000000000..dce2a97ed8e5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationOLEShape/svx_AccessiblePresentationOLEShape.xba @@ -0,0 +1,85 @@ +<?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="svx_AccessiblePresentationOLEShape" 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 oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePresentationOLEShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createImpressDocument(cObjectName) + oShape = oDoc.createInstance("com.sun.star.presentation.OLE2Shape") + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oShape.setPropertyValue("IsEmptyPresentationObject",false) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"ImpressOLE0") + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/script.xlb new file mode 100644 index 000000000000..0d8026ccc39b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/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="svx_AccessiblePresentationShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessiblePresentationShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/svx_AccessiblePresentationShape.xba b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/svx_AccessiblePresentationShape.xba new file mode 100644 index 000000000000..46c8789fb3b4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessiblePresentationShape/svx_AccessiblePresentationShape.xba @@ -0,0 +1,87 @@ +<?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="svx_AccessiblePresentationShape" 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 oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessiblePresentationShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean, oDP As Object + Dim oWin As Object, xRoot As Object + + oDoc = utils.createImpressDocument(cObjectName) + oShape = oDoc.createInstance("com.sun.star.presentation.HandoutShape") + oDP = oDoc.getDrawPages().getByIndex(0) + oDP.add(oShape) + oShape.setPropertyValue("IsEmptyPresentationObject",false) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"ImpressHandout0") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + Out.Log("Text: "+accText) + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleShape/script.xlb b/qadevOOo/tests/basic/mod/svx/AccessibleShape/script.xlb new file mode 100644 index 000000000000..a19b93caf59c --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleShape/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="svx_AccessibleShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_AccessibleShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/AccessibleShape/svx_AccessibleShape.xba b/qadevOOo/tests/basic/mod/svx/AccessibleShape/svx_AccessibleShape.xba new file mode 100644 index 000000000000..df23003fe75f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/AccessibleShape/svx_AccessibleShape.xba @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="svx_AccessibleShape" 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 oShape As Object +Global accText As String +Global hasChangeableAttrs As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.AccessibleShape +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oWin As Object, xRoot As Object, oDP As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + oDP = oDoc.getDrawPages().getByIndex(0) + oShape = toolkittools.addShapeToDrawDoc(oDP,2000,1500,"Rectangle") + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.SHAPE,"Rectangle") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + if hasUNOInterfaces(oObj,"com.sun.star.accessibility.XAccessibleText") then + accText = oObj.getText() + End If + hasChangeableAttrs = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + utils.closeObject(oDoc) +End Sub + +Sub fireEvent() + Dim oSize As New com.sun.star.awt.Size + oSize = oShape.getSize() + oSize.Width = oSize.Width + 100 + oShape.setSize(oSize) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/GraphicExporter/script.xlb b/qadevOOo/tests/basic/mod/svx/GraphicExporter/script.xlb new file mode 100644 index 000000000000..e71cdd2c295c --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/GraphicExporter/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="svx_GraphicExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_GraphicExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/GraphicExporter/svx_GraphicExporter.xba b/qadevOOo/tests/basic/mod/svx/GraphicExporter/svx_GraphicExporter.xba new file mode 100644 index 000000000000..d2ba0465ea4a --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/GraphicExporter/svx_GraphicExporter.xba @@ -0,0 +1,109 @@ +<?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="svx_GraphicExporter" 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: +' Requiered for com.sun.star.document.XFilter + Global oFilterDescriptor As Variant + Global pictureURL As String + +' Requiered for com.sun.star.document.XExporter + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.GraphicExporter +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = createUnoService("com.sun.star.drawing.GraphicExportFilter") + + Dim shape As Object + shape = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + out.log("create com.sun.star.drawing.GraphicObjectShape : is NULL? " + IsNULL(shape)) + + Dim shapeSize As new com.sun.star.awt.Size + Dim shapePos As new com.sun.star.awt.Point + shapeSize.Width = 5000 + shapeSize.Height = 5000 + out.log("set size of shape : " + shapeSize.Width + ", " + shapeSize.Height) + shape.setSize(shapeSize) + shapePos.x = 1500 + shapePos.y = 1000 + out.log("set position of shape : " + shapePos.x + ", " + shapePos.y) + shape.setPosition(shapePos) + out.log("adds created shape") + oDoc.getDrawPages.getByIndex(0).add(shape) + out.log("set GraphicURL to " + utils.Path2URL(cTestDocsDir & "space-metal.jpg") ) + shape.GraphicURL = utils.Path2URL(cTestDocsDir & "space-metal.jpg") + out.log("set shape as source document for created object") + oObj.setSourceDocument(shape) + oSrcDocument = shape + + Dim _Filter(2) As New com.sun.star.beans.PropertyValue + _Filter(0).Name = "FilterName" : _Filter(0).Value = "JPG" + Dim url as new com.sun.star.util.URL + url.Complete = utils.getTempFileURL("picture.jpg", True) + pictureURL = url.Complete + out.log("URL descriptor : " + pictureURL) + _Filter(1).Name = "URL" : _Filter(1).Value = url + _Filter(2).Name = "MediaType" : _Filter(1).Value = "image/jpeg" + oFilterDescriptor = _Filter() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function checkFilter() As Boolean + If IsNULL(soapi_test_hidewindows) Or soapi_test_hidewindows = True Then + out.log("all windows are hide") + checkFilter() = True + Else + Dim simpleFile As Object + simpleFile = createUnoService("com.sun.star.ucb.SimpleFileAccess") + out.log("creates com.sun.star.ucb.SimpleFileAccess : is NULL? " + IsNULL(SimpleFile)) + checkFilter() = simpleFile.exists(pictureURL) + out.log("check existing of " + pictureURL + ": " + checkFilter) + EndIf +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxDrawPage/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/script.xlb new file mode 100644 index 000000000000..92cbb03d1a70 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/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="svx_SvxDrawPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxDrawPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxDrawPage/svx_SvxDrawPage.xba b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/svx_SvxDrawPage.xba new file mode 100644 index 000000000000..93bf472a1f72 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxDrawPage/svx_SvxDrawPage.xba @@ -0,0 +1,125 @@ +<?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="svx_SvxDrawPage" 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: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + +' Requiered for com.sun.star.drawing.XShapeGrouper + Global oGrouperCollection As Object 'groupable objects +' Requiered for com.sun.star.drawing.XShapes + Global oXShapeInstance As Object 'to add/remove +' Requiered for com.sun.star.drawing.XShapeCombiner + Global oCombinerCollection As Object +' Requiered for com.sun.star.drawing.XShapeBinder + Global oBinderCollection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxDrawPage +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + aPoint.x = 100 + aPoint.y = 200 + aSize.Width = 3000 + aSize.Height = 4000 + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oXShapeInstance.Size = aSize + oXShapeInstance.Position = aPoint + oXShapeInstance.FillColor = RGB(255, 0, 0) + + oDrawPage = oDoc.DrawPages(0) + oObj = oDrawPage + + oGrouperCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oCombinerCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oBinderCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + + AddShape(oObj, 100, 200, "com.sun.star.drawing.LineShape") + AddShape(oObj, 200, 200, "com.sun.star.drawing.EllipseShape") + + oShape = oObj.getByIndex(0) + oGrouperCollection.Add(oShape) + oShape = oObj.getByIndex(1) + oGrouperCollection.Add(oShape) + + AddShape(oObj, 300, 200, "com.sun.star.drawing.LineShape") + AddShape(oObj, 400, 200, "com.sun.star.drawing.EllipseShape") + oShape = oObj.getByIndex(2) + oCombinerCollection.Add(oShape) + oShape = oObj.getByIndex(3) + oCombinerCollection.Add(oShape) + + AddShape(oObj, 500, 200, "com.sun.star.drawing.LineShape") + AddShape(oObj, 600, 200, "com.sun.star.drawing.EllipseShape") + oShape = oObj.getByIndex(4) + oBinderCollection.Add(oShape) + oShape = oObj.getByIndex(5) + oBinderCollection.Add(oShape) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +sub AddShape(oPage as Object, nPosX, nPosY as Integer, shapeService As String) + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oShape As Object + + aPoint.x = nPosX + aPoint.y = nPosY + aSize.Width = 10000 + aSize.Height = 10000 + oShape = oDoc.createInstance(shapeService) + oShape.Size = aSize + oShape.Position = aPoint + oShape.FillColor = RGB(255, 0, 0) + oPage.add(oShape) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/script.xlb new file mode 100644 index 000000000000..91ba4fe53e18 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/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="svx_SvxGraphCtrlAccessibleContext" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxGraphCtrlAccessibleContext"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/svx_SvxGraphCtrlAccessibleContext.xba b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/svx_SvxGraphCtrlAccessibleContext.xba new file mode 100644 index 000000000000..1eff0e117047 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphCtrlAccessibleContext/svx_SvxGraphCtrlAccessibleContext.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="svx_SvxGraphCtrlAccessibleContext" 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 xController As Object +Global oShape As Object +Global multiSelection As Boolean + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxGraphCtrlAccessibleContext +'************************************************************************* +On Error Goto ErrHndl + Dim oWin As Object, xRoot As Object + Dim oDP As Object, url As String + Dim newSize As New com.sun.star.awt.Size + Dim aUrl As new com.sun.star.util.URL + Dim xDispatcher As Object, urlTransformer As Object + Dim tk As Object + + 'creating document, toolkit and adding shape + oDoc = utils.createDocument("sdraw", cObjectName) + tk = createUnoService("com.sun.star.awt.Toolkit") + oShape = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + newSize = oShape.getSize() + newSize.Width = 5000 + newSize.Height = 5000 + oShape.setSize(newSize) + url = utils.Path2URL(cTestDocsDir + "space-metal.jpg") + Out.log("URL: "+url) + oShape.setPropertyValue("GraphicURL", url) + wait(500) + oDoc.getDrawPages().getByIndex(0).add(oShape) + wait(1000) + + 'opening ImageMapDialog + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + aUrl.Complete = "slot:10371" + urlTransformer.parseStrict(aUrl) + wait(500) + xController = oDoc.getCurrentController() + xDispatcher = xController.queryDispatch(aUrl,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(aUrl, DimArray()) + wait(2000) + oWin = tk.getActiveTopWindow() + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PANEL) + Out.Log("Implementation name: "+oObj.getImplementationName()) + multiSelection = true + else + Out.Log("QueryDispatch FAILED. Cannot open ImageMapDialog...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + xController.select(oShape) + wait(500) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/script.xlb new file mode 100644 index 000000000000..7a7140bbdc62 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/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="svx_SvxGraphicObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxGraphicObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/svx_SvxGraphicObject.xba b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/svx_SvxGraphicObject.xba new file mode 100644 index 000000000000..2eced4069f0d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxGraphicObject/svx_SvxGraphicObject.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="svx_SvxGraphicObject" 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.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxGraphicObject +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oShape As Object + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + cShapeType = "com.sun.star.drawing.GraphicObjectShape" + + oShape = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + + aPoint.x = 100 + aPoint.y = 100 + aSize.Width = 10000 + aSize.Height = 10000 + oShape.Size = aSize + oShape.Position = aPoint + + oDoc.DrawPages(0).add(oShape) + oShape.setString("Graphic Object") + oObj = oShape + + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape") + + aPoint.x = 100 + aPoint.y = 10200 + aSize.Width = 20000 + aSize.Height = 10000 + oComponentInstance.Size = aSize + oComponentInstance.Position = aPoint + oDoc.DrawPages(0).add(oComponentInstance) + oComponentInstance.setString("For com.sun.star.lang.XComponent") + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShape/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShape/script.xlb new file mode 100644 index 000000000000..7fb4aa928ddd --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShape/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="svx_SvxShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShape/svx_SvxShape.xba b/qadevOOo/tests/basic/mod/svx/SvxShape/svx_SvxShape.xba new file mode 100644 index 000000000000..c1d24e64033b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShape/svx_SvxShape.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="svx_SvxShape" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShape +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + Dim oDrawPage As Object + oDrawPage = oDoc.DrawPages(0) + + oObj = oDrawPage.getByIndex(0) + + cShapeType = "com.sun.star.drawing.RectangleShape" + + oComponentInstance = oDrawPage.getByIndex(1) + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/script.xlb new file mode 100644 index 000000000000..b86c75094fb8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/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="svx_SvxShapeCircle" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeCircle"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/svx_SvxShapeCircle.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/svx_SvxShapeCircle.xba new file mode 100644 index 000000000000..f70fded68818 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCircle/svx_SvxShapeCircle.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="svx_SvxShapeCircle" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeCircle +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDrawPage As Object, oShape As Object + + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + oDrawPage = oDoc.DrawPages(0) + + oShape = CreateShape(5000, 5000, 3000, 3000, "EllipseShape", oDoc) + oDrawPage.Add(oShape) + + oShape.setPropertyValue("CircleKind", com.sun.star.drawing.CircleKind.FULL) + + oObj = oShape + + cShapeType = "com.sun.star.drawing.EllipseShape" + + oComponentInstance = oDrawPage.getByIndex(1) + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CreateShape(x As Integer, y As Integer, width As Integer, height As Integer, kind As String, doc As Object) + Dim oShape As Object + Dim pos As new com.sun.star.awt.Point + Dim size As new com.sun.star.awt.Size + + oShape = doc.createInstance("com.sun.star.drawing." + kind) + pos.X = x + pos.Y = y + oShape.setPosition(pos) + size.Width = width + size.Height = height + oShape.setSize(size) + + CreateShape = oShape +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/script.xlb new file mode 100644 index 000000000000..d8b9b68aa10b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/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="svx_SvxShapeCollection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeCollection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/svx_SvxShapeCollection.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/svx_SvxShapeCollection.xba new file mode 100644 index 000000000000..735877f852aa --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeCollection/svx_SvxShapeCollection.xba @@ -0,0 +1,68 @@ +<?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="svx_SvxShapeCollection" 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: + +' Requiered for com.sun.star.drawing.XShapes + Global oXShapeInstance As Object 'to add/remove + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeCollection +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = createUnoService("com.sun.star.drawing.ShapeCollection") + + oInstance = oDoc.createInstance("com.sun.star.drawing.LineShape") + oObj.add(oInstance) + + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.EllipseShape") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/script.xlb new file mode 100644 index 000000000000..9543a130574d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/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="svx_SvxShapeConnector" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeConnector"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/svx_SvxShapeConnector.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/svx_SvxShapeConnector.xba new file mode 100644 index 000000000000..cdc3affad516 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeConnector/svx_SvxShapeConnector.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="svx_SvxShapeConnector" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeConnector +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.createInstance("com.sun.star.drawing.ConnectorShape") + oDoc.DrawPages(0).add(oObj) + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.ConnectorShape") + oDoc.DrawPages(0).add(oComponentInstance) + + cShapeType = "com.sun.star.drawing.ConnectorShape" + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeControl/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/script.xlb new file mode 100644 index 000000000000..5545f03095c2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/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="svx_SvxShapeControl" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeControl"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeControl/svx_SvxShapeControl.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/svx_SvxShapeControl.xba new file mode 100644 index 000000000000..ab0ed81abf79 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeControl/svx_SvxShapeControl.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="svx_SvxShapeControl" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XControlShape + Global oControlToSet As Object + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeControl +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oDrawPage As Object, oShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oDrawPage = oDoc.DrawPages(0) + + oControlToSet = oDoc.createInstance("com.sun.star.form.component.CheckBox") + + ' insert ControlShape + Dim aPoint As New com.sun.star.awt.Point + Dim aSize As New com.sun.star.awt.Size + Dim oControl, oCShape As Object + + aPoint.x = 3000 + aPoint.y = 4500 + aSize.Width = 15000 + aSize.Height = 1000 + oCShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") + oCShape.Size = aSize + oCShape.Position = aPoint + + oControl = oDoc.createInstance("com.sun.star.form.component.CommandButton") + oControl.DefaultControl = "com.sun.star.form.control.CommandButton" + + oCShape.setControl(oControl) + + oDrawPage.add(oCShape) + + oObj = oCShape + + cShapeType = "com.sun.star.drawing.ControlShape" + + aPoint.x = 3000 + aPoint.y = 10000 + aSize.Width = 15000 + aSize.Height = 1000 + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.LineShape") + oComponentInstance.Size = aSize + oComponentInstance.Position = aPoint + + oDrawPage.add(oComponentInstance) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/script.xlb new file mode 100644 index 000000000000..53eb8199670e --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/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="svx_SvxShapeDimensioning" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeDimensioning"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/svx_SvxShapeDimensioning.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/svx_SvxShapeDimensioning.xba new file mode 100644 index 000000000000..b60010cfde5e --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeDimensioning/svx_SvxShapeDimensioning.xba @@ -0,0 +1,98 @@ +<?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="svx_SvxShapeDimensioning" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeDimensioning +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oMShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oMShape = oDoc.createInstance("com.sun.star.drawing.MeasureShape") + oDoc.DrawPages(0).add(oMShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPosition As new com.sun.star.awt.Point + + oSize.Width = 3000 + oSize.Height = 3000 + oPosition.X = 4000 + oPosition.Y = 4000 + oMShape.Size = oSize + oMShape.Position = oPosition + + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.LineShape") + oDoc.DrawPages(0).Add(oComponentInstance) + + oSize.Width = 7500 + oSize.Height = 5000 + oPosition.X = 5000 + oPosition.Y = 3500 + oComponentInstance.Size = oSize + oComponentInstance.Position = oPosition + + oObj = oMShape + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + + cShapeType = "com.sun.star.drawing.MeasureShape" +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/script.xlb new file mode 100644 index 000000000000..55001aa96454 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/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="svx_SvxShapeGroup" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapeGroup"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/svx_SvxShapeGroup.xba b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/svx_SvxShapeGroup.xba new file mode 100644 index 000000000000..5f68214c0fda --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapeGroup/svx_SvxShapeGroup.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="svx_SvxShapeGroup" 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: + +' Requiered for com.sun.star.drawing.XShapes + Global oXShapeInstance As Object 'to add/remove + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapeGroup +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oInstance As Object, oDP As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oDP = oDoc.DrawPages(0) + oInstance = CreateShape(1000, 2000, 4000, 3000, "LineShape") + oDP.add(oInstance) + + oInstance = CreateShape(1000, 2000, 3000, 4000, "LineShape") + oDP.add(oInstance) + + oObj = oDP.group(oDP) + + oXShapeInstance = CreateShape(1000, 6000, 4000, 3000, "EllipseShape") + oDP.add(oXShapeInstance) + + oComponentInstance = CreateShape(10000, 5000, 6000, 4000, "RectangleShape") + oDP.add(oComponentInstance) + + cShapeType = "com.sun.star.drawing.GroupShape" +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CreateShape(x As Integer, y As Integer, width As Integer, height As Integer, kind As String) + Dim oShape As Object + Dim pos As new com.sun.star.awt.Point + Dim size As new com.sun.star.awt.Size + + oShape = oDoc.createInstance("com.sun.star.drawing." + kind) + pos.X = x + pos.Y = y + oShape.setPosition(pos) + size.Width = width + size.Height = height + oShape.setSize(size) + + CreateShape = oShape +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/script.xlb new file mode 100644 index 000000000000..eb6344ae8d7b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/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="svx_SvxShapePolyPolygon" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapePolyPolygon"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/svx_SvxShapePolyPolygon.xba b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/svx_SvxShapePolyPolygon.xba new file mode 100644 index 000000000000..bbe16dae426d --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygon/svx_SvxShapePolyPolygon.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="svx_SvxShapePolyPolygon" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapePolyPolygon +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + oObj = oDoc.createInstance("com.sun.star.drawing.PolyPolygonShape") + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.PolyPolygonShape") + oDoc.DrawPages(0).add(oObj) + oDoc.DrawPages(0).add(oComponentInstance) + + Dim oSize As new com.sun.star.awt.Size + Dim oPosition As new com.sun.star.awt.Point + + oSize.Width = 0 + oSize.Height = 0 + oPosition.X = 0 + oPosition.Y = 0 + + oObj.Size = oSize + oObj.Position = oPosition + + Dim ps1(3) As new com.sun.star.awt.Point + ps1(0).X = 5000 : ps1(0).Y = 5000 + ps1(1).X = 10000 : ps1(1).Y = 5000 + ps1(2).X = 10000 : ps1(2).Y = 10000 + ps1(3).X = 5000 : ps1(3).Y = 10000 + + Dim ps2(3) As new com.sun.star.awt.Point + ps2(0).X = 6500 : ps2(0).Y = 6500 + ps2(1).X = 8500 : ps2(1).Y = 6500 + ps2(2).X = 8500 : ps2(2).Y = 8500 + ps2(3).X = 6500 : ps2(3).Y = 8500 + + Dim psA(1) As Variant + psA(0) = ps1() + psA(1) = ps2() + + oObj.setPropertyValue("PolyPolygon", psA()) + + cShapeType = "com.sun.star.drawing.PolyPolygonShape" + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/script.xlb new file mode 100644 index 000000000000..10c60b564753 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/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="svx_SvxShapePolyPolygonBezier" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxShapePolyPolygonBezier"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/svx_SvxShapePolyPolygonBezier.xba b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/svx_SvxShapePolyPolygonBezier.xba new file mode 100644 index 000000000000..65cf58712755 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxShapePolyPolygonBezier/svx_SvxShapePolyPolygonBezier.xba @@ -0,0 +1,121 @@ +<?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="svx_SvxShapePolyPolygonBezier" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.drawing.XShapeDescriptor + Global cShapeType As String + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxShapePolyPolygonBezier +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.loadTestDocument("SvxShape.sxd") + + cShapeType = "com.sun.star.drawing.ClosedBezierShape" + + oObj = oDoc.createInstance("com.sun.star.drawing.ClosedBezierShape") + oDoc.DrawPages(0).add(oObj) + Dim oSize As new com.sun.star.awt.Size + Dim oPosition As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 5000 + oPosition.X = 4000 + oPosition.Y = 4000 + oObj.Size = oSize + oObj.Position = oPosition + + oComponentInstance = oDoc.createInstance("com.sun.star.drawing.ClosedBezierShape") + oDoc.DrawPages(0).add(oComponentInstance) + oSize.Width = 8000 + oSize.Height = 8000 + oPosition.X = 4000 + oPosition.Y = 4000 + oComponentInstance.Size = oSize + oComponentInstance.Position = oPosition + + Dim ps1(3) As new com.sun.star.awt.Point + Dim pf1(3) As Integer + with com.sun.star.drawing.PolygonFlags + + ps1(0).X = 5000 : ps1(0).Y = 5000 : pf1(0) = .NORMAL + ps1(1).X = 10000 : ps1(1).Y = 5000 : pf1(1) = .CONTROL + ps1(2).X = 10000 : ps1(2).Y = 10000 : pf1(2) = .CONTROL + ps1(3).X = 5000 : ps1(3).Y = 10000 : pf1(3) = .NORMAL + + Dim ps2(3) As new com.sun.star.awt.Point + Dim pf2(3) As Integer + ps2(0).X = 6500 : ps2(0).Y = 6500 : pf2(0) = .NORMAL + ps2(1).X = 8500 : ps2(1).Y = 6500 : pf2(1) = .CONTROL + ps2(2).X = 8500 : ps2(2).Y = 8500 : pf2(2) = .CONTROL + ps2(3).X = 6500 : ps2(3).Y = 8500 : pf2(3) = .NORMAL + end with + + Dim psA As Variant + psA = Array( ps1(), ps2() ) + + Dim oFlags As Variant + oFlags = Array( pf1(), pf2() ) + + Dim oCoords As New com.sun.star.drawing.PolyPolygonBezierCoords + oCoords.Coordinates = psA() + oCoords.Flags = oFlags() + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + + oObj.PolyPolygonBezier = oCoords +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/script.xlb new file mode 100644 index 000000000000..dbec5ae77863 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/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="svx_SvxUnoNumberingRules" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoNumberingRules"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/svx_SvxUnoNumberingRules.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/svx_SvxUnoNumberingRules.xba new file mode 100644 index 000000000000..9e810e199564 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoNumberingRules/svx_SvxUnoNumberingRules.xba @@ -0,0 +1,58 @@ +<?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="svx_SvxUnoNumberingRules" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoNumberingRules +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oObj = oDoc.CreateInstance("com.sun.star.text.NumberingRules") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoText/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoText/script.xlb new file mode 100644 index 000000000000..c9bf01991831 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoText/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="svx_SvxUnoText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoText/svx_SvxUnoText.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoText/svx_SvxUnoText.xba new file mode 100644 index 000000000000..1e83583fb8f8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoText/svx_SvxUnoText.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="svx_SvxUnoText" 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: + +' Requiered for com.sun.star.text.XText + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoText +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + Dim oShape As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + + oDoc.DrawPages(0).add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 7500 + oSize.Height = 5000 + oPos.X = 5000 + oPos.Y = 3500 + oShape.Size = oSize + oShape.Position = oPos + + Dim cursor As Object + cursor = oShape.createTextCursor() + + oShape.insertString(cursor, "Paragraph 1", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(cursor, "Paragraph 2", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(cursor, "Paragraph 3", false) + oShape.insertControlCharacter(cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.getText() + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/script.xlb new file mode 100644 index 000000000000..2e140811e9f8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/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="svx_SvxUnoTextContent" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextContent"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/svx_SvxUnoTextContent.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/svx_SvxUnoTextContent.xba new file mode 100644 index 000000000000..8ae855ffa829 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContent/svx_SvxUnoTextContent.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="svx_SvxUnoTextContent" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextContent +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oEnum As Object + Dim oCursor As Object + Dim oShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoTextContent", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoTextContent", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oEnum = oShape.createEnumeration() + + oObj = oEnum.nextElement() + oComponentInstance = oEnum.nextElement() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/script.xlb new file mode 100644 index 000000000000..c061425efd68 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/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="svx_SvxUnoTextContentEnum" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextContentEnum"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/svx_SvxUnoTextContentEnum.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/svx_SvxUnoTextContentEnum.xba new file mode 100644 index 000000000000..c867d49d09e1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextContentEnum/svx_SvxUnoTextContentEnum.xba @@ -0,0 +1,81 @@ +<?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="svx_SvxUnoTextContentEnum" 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: +' svx.SvxUnoTextContentEnum +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim oCursor As Object + Dim oShape As Object + + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoTextContentEnum", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoTextContentEnum", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.createEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/script.xlb new file mode 100644 index 000000000000..be5f5a3ea2d9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/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="svx_SvxUnoTextCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/svx_SvxUnoTextCursor.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/svx_SvxUnoTextCursor.xba new file mode 100644 index 000000000000..9c6dbdee9dc1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextCursor/svx_SvxUnoTextCursor.xba @@ -0,0 +1,85 @@ +<?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="svx_SvxUnoTextCursor" 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: + +' Requiered for com.sun.star.text.XParagraphCursor + Global oText As Object + +' Requiered for com.sun.star.text.XTextCursor + Global oCursor As Object 'One more cursor + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextCursor +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("scalc", cObjectName) + + Dim StyleFamilies As Object + StyleFamilies = oDoc.getStyleFamilies + + Dim PageStyles As Object + PageStyles = StyleFamilies.getByName("PageStyles") + + Dim DefaultStyle As Object + DefaultStyle = PageStyles.getByName("Default") + + Dim RPHC As Object + RPHC = DefaultStyle.getPropertyValue("RightPageHeaderContent") + RPHC.getCenterText.String = "Center" + DefaultStyle.setPropertyValue("RightPageHeaderContent", RPHC) + + oText = RPHC.getCenterText + oObj = oText.createTextCursor() + + oCursor = oText.createTextCursor() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/script.xlb new file mode 100644 index 000000000000..13e071929680 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/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="svx_SvxUnoTextField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/svx_SvxUnoTextField.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/svx_SvxUnoTextField.xba new file mode 100644 index 000000000000..cc6c9e57f8cb --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextField/svx_SvxUnoTextField.xba @@ -0,0 +1,94 @@ +<?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="svx_SvxUnoTextField" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' svx.SvxUnoTextField +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + Dim oCursor As Object + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + oShape.insertTextContent(oShape.createTextCursor(), oObj, false) + oComponentInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + oShape.insertTextContent(oShape.createTextCursor(), oComponentInstance, false) + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + oXTextContentRange = oShape.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/script.xlb new file mode 100644 index 000000000000..10f511650187 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/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="svx_SvxUnoTextRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/svx_SvxUnoTextRange.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/svx_SvxUnoTextRange.xba new file mode 100644 index 000000000000..ff1172f84c5f --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRange/svx_SvxUnoTextRange.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="svx_SvxUnoTextRange" 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: +' svx.SvxUnoTextRange +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + Dim oEnum As Object + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + Dim oCursor As Object + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.CreateEnumeration().nextElement() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/script.xlb b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/script.xlb new file mode 100644 index 000000000000..d4b54ce26e6b --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/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="svx_SvxUnoTextRangeEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="svx_SvxUnoTextRangeEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/svx_SvxUnoTextRangeEnumeration.xba b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/svx_SvxUnoTextRangeEnumeration.xba new file mode 100644 index 000000000000..9885dbde5056 --- /dev/null +++ b/qadevOOo/tests/basic/mod/svx/SvxUnoTextRangeEnumeration/svx_SvxUnoTextRangeEnumeration.xba @@ -0,0 +1,81 @@ +<?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="svx_SvxUnoTextRangeEnumeration" 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: +' svx.SvxUnoTextRangeEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + Dim oEnum As Object + + oDoc = utils.createDocument("sdraw", cObjectName) + + Dim oShape As Object + oShape = oDoc.createInstance("com.sun.star.drawing.TextShape") + oDoc.DrawPages(0).Add(oShape) + + Dim oSize As new com.sun.star.awt.Size + Dim oPos As new com.sun.star.awt.Point + oSize.Width = 5000 + oSize.Height = 3500 + oPos.X = 7500 + oPos.Y = 5000 + oShape.Size = oSize + oShape.Position = oPos + + Dim oCursor As Object + oCursor = oShape.createTextCursor() + oShape.insertString(oCursor, "String1 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oShape.insertString(oCursor, "String2 from SvxUnoText", false) + oShape.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + + oObj = oShape.CreateEnumeration() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentPageView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentPageView/script.xlb new file mode 100644 index 000000000000..2e29e2f9ec02 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentPageView/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="sw_SwAccessibleDocumentPageView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleDocumentPageView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentPageView/sw_SwAccessibleDocumentPageView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentPageView/sw_SwAccessibleDocumentPageView.xba new file mode 100644 index 000000000000..307ec2ae244e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentPageView/sw_SwAccessibleDocumentPageView.xba @@ -0,0 +1,110 @@ +<?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="sw_SwAccessibleDocumentPageView" 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 prevButton As Object +Global nextButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleDocumentPageView +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, oText As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object, cursor As Object + Dim i As Integer, oWin As Object + + oDoc = utils.createDocument("swriter",cObjectName) + oText = oDoc.getText() + cursor = oText.createTextCursor() + + 'inserting some lines + for i = 0 to 30 + oText.insertString(cursor, "Paragraph Number: " + i, false) + oText.insertString(cursor,_ + " The quick brown fox jumps over the lazy Dog: SwAccessibleDocumentPageView",_ + false) + oText.insertControlCharacter(cursor,_ + com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oText.insertString(cursor,_ + "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG: SwAccessibleDocumentPageView",_ + false) + oText.insertControlCharacter(cursor,_ + com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oText.insertControlCharacter(cursor,_ + com.sun.star.text.ControlCharacter.LINE_BREAK, false) + next i + + xController = oDoc.getCurrentController() + + 'switch to PreviewMode + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + wait(500) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, DimArray()) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT) + Out.Log("Implementation Name: "+oObj.getImplementationName()) + prevButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Previous Page") + nextButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Next Page") + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + End If +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + prevButton.doAccessibleAction(0) + wait(500) + nextButton.doAccessibleAction(0) + wait(500) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentView/script.xlb new file mode 100644 index 000000000000..04d5f4164cf9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentView/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="sw_SwAccessibleDocumentView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleDocumentView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentView/sw_SwAccessibleDocumentView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentView/sw_SwAccessibleDocumentView.xba new file mode 100644 index 000000000000..0125e5245153 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleDocumentView/sw_SwAccessibleDocumentView.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwAccessibleDocumentView" 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 oScrollBar As Object +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleDocumentView +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + + Dim xController As Object + xController = oDoc.getCurrentController() + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.DOCUMENT) + oScrollBar = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.SCROLL_BAR) + + multiSelection = false + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oScrollBar.setCurrentValue(oScrollBar.getMaximumValue()) + oScrollBar.setCurrentValue(oScrollBar.getMinimumValue()) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleEndnoteView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleEndnoteView/script.xlb new file mode 100644 index 000000000000..ca9a17cb761e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleEndnoteView/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="sw_SwAccessibleEndnoteView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleEndnoteView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleEndnoteView/sw_SwAccessibleEndnoteView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleEndnoteView/sw_SwAccessibleEndnoteView.xba new file mode 100644 index 000000000000..eae9937b4b6c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleEndnoteView/sw_SwAccessibleEndnoteView.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="sw_SwAccessibleEndnoteView" 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 oViewSettings As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleEndnoteView +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + + Dim oEndnote As Object + oEndnote = oDoc.createInstance("com.sun.star.text.Endnote") + + Dim oText As Object + oText = oDoc.getText() + + Dim oCursor As Object + oCursor = oText.createTextCursor() + + oText.insertTextContent(oCursor, oEndnote, false) + + Dim xController As Object + xController = oDoc.getCurrentController() + + oViewSettings = xController.getViewSettings() + oViewSettings.ZoomValue = 10 + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.END_NOTE) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oViewSettings.ZoomValue = 15 + oViewSettings.ZoomValue = 10 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleFooterView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleFooterView/script.xlb new file mode 100644 index 000000000000..cda1e969a618 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleFooterView/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="sw_SwAccessibleFooterView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleFooterView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleFooterView/sw_SwAccessibleFooterView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleFooterView/sw_SwAccessibleFooterView.xba new file mode 100644 index 000000000000..6764d2574ab7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleFooterView/sw_SwAccessibleFooterView.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwAccessibleFooterView" 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: +' sw.SwAccessibleFooterView +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + + Dim oStyleFamilies As Object + oStyleFamilies = oDoc.getStyleFamilies() + Dim oStyleFam As Object + oStyleFam = oStyleFamilies.getByName("PageStyles") + Dim oStyle As Object + oStyle = oStyleFam.getByName("Standard") + oStyle.FooterIsOn = true + + Dim xController As Object + xController = oDoc.getCurrentController() + + Dim oViewSettings As Object + oViewSettings = xController.getViewSettings() + oViewSettings.ZoomValue = 10 + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.FOOTER) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleFootnoteView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleFootnoteView/script.xlb new file mode 100644 index 000000000000..e484bbbc6985 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleFootnoteView/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="sw_SwAccessibleFootnoteView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleFootnoteView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleFootnoteView/sw_SwAccessibleFootnoteView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleFootnoteView/sw_SwAccessibleFootnoteView.xba new file mode 100644 index 000000000000..085a28a21625 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleFootnoteView/sw_SwAccessibleFootnoteView.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="sw_SwAccessibleFootnoteView" 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 oViewSettings As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleFootnoteView +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + + Dim oFootnote As Object + oFootnote = oDoc.createInstance("com.sun.star.text.Footnote") + + Dim oText As Object + oText = oDoc.getText() + + Dim oCursor As Object + oCursor = oText.createTextCursor() + + oText.insertTextContent(oCursor, oFootnote, false) + + Dim xController As Object + xController = oDoc.getCurrentController() + + oViewSettings = xController.getViewSettings() + oViewSettings.ZoomValue = 10 + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.FOOTNOTE) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oViewSettings.ZoomValue = 15 + oViewSettings.ZoomValue = 10 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleHeaderView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleHeaderView/script.xlb new file mode 100644 index 000000000000..f327ecc79c2d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleHeaderView/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="sw_SwAccessibleHeaderView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleHeaderView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleHeaderView/sw_SwAccessibleHeaderView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleHeaderView/sw_SwAccessibleHeaderView.xba new file mode 100644 index 000000000000..42deb88c92a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleHeaderView/sw_SwAccessibleHeaderView.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwAccessibleHeaderView" 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 oStyle As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleHeaderView +'************************************************************************* +On Error Goto ErrHndl + Dim oStyleFamilies As Object, oStyleFam As Object + Dim oWin As Object, xRoot As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oStyleFamilies = oDoc.getStyleFamilies() + oStyleFam = oStyleFamilies.getByName("PageStyles") + oStyle = oStyleFam.getByName("Standard") + oStyle.HeaderIsOn = true + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.HEADER) + + Out.Log("Implementation Name: "+oObj.getImplementationName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim oldValue As Integer + oldValue = oStyle.HeaderLeftMargin + oStyle.HeaderLeftMargin = oldValue + 1 + wait(500) + oStyle.HeaderLeftMargin = oldValue - 1 + wait(500) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessiblePageView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessiblePageView/script.xlb new file mode 100644 index 000000000000..2e841c7713e8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessiblePageView/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="sw_SwAccessiblePageView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessiblePageView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessiblePageView/sw_SwAccessiblePageView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessiblePageView/sw_SwAccessiblePageView.xba new file mode 100644 index 000000000000..bb1bf37a602b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessiblePageView/sw_SwAccessiblePageView.xba @@ -0,0 +1,114 @@ +<?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="sw_SwAccessiblePageView" 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 prevButton As Object +Global nextButton As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessiblePageView +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object, oWin As Object + Dim url As New com.sun.star.util.URL + Dim urlTransformer As Object + Dim oText As Object, cursor As Object + Dim i As Integer + + oDoc = utils.createDocument("swriter",cObjectName) + oText = oDoc.getText() + cursor = oText.createTextCursor() + + 'inserting some lines + for i = 0 to 30 + oText.insertString(cursor, "Paragraph Number: " + i, false) + oText.insertString(cursor,_ + " The quick brown fox jumps over the lazy Dog: SwAccessibleDocumentPageView",_ + false) + oText.insertControlCharacter(cursor,_ + com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oText.insertString(cursor,_ + "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG: SwAccessibleDocumentPageView",_ + false) + oText.insertControlCharacter(cursor,_ + com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + oText.insertControlCharacter(cursor,_ + com.sun.star.text.ControlCharacter.LINE_BREAK, false) + next i + wait(1000) + + xController = oDoc.getCurrentController() + + 'switch to PreviewMode + urlTransformer = createUNOService("com.sun.star.util.URLTransformer") + url.Complete = ".uno:PrintPreview" + urlTransformer.parseStrict(url) + wait(500) + xDispatcher = xController.queryDispatch(url,"",0) + if (NOT isNull(xDispatcher)) then + xDispatcher.dispatch(url, DimArray()) + wait(1000) + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + 'utils.at_printAccessibleTree(xRoot) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PANEL,"Page") + Out.Log("Implementation Name: "+oObj.getImplementationName()) + prevButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Previous Page") + nextButton = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.PUSH_BUTTON,"Next Page") + else + Out.Log("QueryDispatch FAILED. Cannot switch to Preview mode...") + End If + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + prevButton.doAccessibleAction(0) + wait(500) + nextButton.doAccessibleAction(0) + wait(500) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleParagraphView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleParagraphView/script.xlb new file mode 100644 index 000000000000..2e709bf8c02f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleParagraphView/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="sw_SwAccessibleParagraphView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleParagraphView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleParagraphView/sw_SwAccessibleParagraphView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleParagraphView/sw_SwAccessibleParagraphView.xba new file mode 100644 index 000000000000..84855feb6eb3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleParagraphView/sw_SwAccessibleParagraphView.xba @@ -0,0 +1,85 @@ +<?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="sw_SwAccessibleParagraphView" 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 oText As Object +Global hasChangeableAttrs As Boolean +Global multiSelection As Boolean +Global accText As String +Global readOnly as Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleParagraphView +'************************************************************************* +On Error Goto ErrHndl + Dim xRoot As Object, xDispatcher As Object + Dim xController As Object + + oDoc = utils.createDocument("swriter",cObjectName) + oText = oDoc.getText() + oText.setString("Text for testing of the interface XAccessibleText") + + xController = oDoc.getCurrentController() + + Dim oWin As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.PARAGRAPH) + hasChangeableAttrs = true + accText = oObj.getText() + multiSelection = true + readOnly = false + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + Dim old As String + old = oText.getString() + oText.setString("Just a line") + oText.setString(old) +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTableCellView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableCellView/script.xlb new file mode 100644 index 000000000000..e97f49aa442b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableCellView/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="sw_SwAccessibleTableCellView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleTableCellView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTableCellView/sw_SwAccessibleTableCellView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableCellView/sw_SwAccessibleTableCellView.xba new file mode 100644 index 000000000000..a5d82d7c6e60 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableCellView/sw_SwAccessibleTableCellView.xba @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwAccessibleTableCellView" 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: +' sw.SwAccessibleTableCellView +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object, oTable As Object + Dim oWin As Object, xRoot As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(3, 5) + oDoc.Text.insertTextContent(oCursor, oTable, false) + + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, com.sun.star.accessibility.AccessibleRole.TABLE_CELL) + Out.Log("Implementation Name: "+oObj.getImplementationName()) + multiSelection = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTableView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableView/script.xlb new file mode 100644 index 000000000000..545aca01dfd7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableView/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="sw_SwAccessibleTableView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleTableView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTableView/sw_SwAccessibleTableView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableView/sw_SwAccessibleTableView.xba new file mode 100644 index 000000000000..01ac488fbfc7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTableView/sw_SwAccessibleTableView.xba @@ -0,0 +1,84 @@ +<?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="sw_SwAccessibleTableView" 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 oViewSettings As Object +Global multiSelection As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleTableView +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + + Dim oCursor As Object + oCursor = oDoc.Text.createTextCursor() + + Dim oTable As Object + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(3, 5) + oDoc.Text.insertTextContent(oCursor, oTable, false) + + Dim xController As Object + xController = oDoc.getCurrentController() + + oViewSettings = xController.getViewSettings() + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TABLE) + multiSelection = true + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oViewSettings.ZoomValue = 15 + oViewSettings.ZoomValue = 100 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTextEmbeddedObject/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextEmbeddedObject/script.xlb new file mode 100644 index 000000000000..ecb50f762d30 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextEmbeddedObject/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="sw_SwAccessibleTextEmbeddedObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleTextEmbeddedObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTextEmbeddedObject/sw_SwAccessibleTextEmbeddedObject.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextEmbeddedObject/sw_SwAccessibleTextEmbeddedObject.xba new file mode 100644 index 000000000000..fe0ed7beca97 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextEmbeddedObject/sw_SwAccessibleTextEmbeddedObject.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="sw_SwAccessibleTextEmbeddedObject" 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 oViewSettings As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleTextEmbeddedObject +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("SwXTextEmbeddedObject.sxw") + + Dim xController As Object + xController = oDoc.getCurrentController() + + oViewSettings = xController.getViewSettings() + oViewSettings.ZoomValue = 10 + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.EMBEDDED_OBJECT) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oViewSettings.ZoomValue = 15 + oViewSettings.ZoomValue = 10 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTextFrameView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextFrameView/script.xlb new file mode 100644 index 000000000000..c671f5326134 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextFrameView/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="sw_SwAccessibleTextFrameView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleTextFrameView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTextFrameView/sw_SwAccessibleTextFrameView.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextFrameView/sw_SwAccessibleTextFrameView.xba new file mode 100644 index 000000000000..bf92474bb7b8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextFrameView/sw_SwAccessibleTextFrameView.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwAccessibleTextFrameView" 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 oViewSettings As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleTextFrameView +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + + Dim oCursor As Object + oCursor = oDoc.Text.createTextCursor() + + Dim oTextFrame As Object + oTextFrame = oDoc.createInstance("com.sun.star.text.TextFrame") + Dim sSize As Object + sSize = createUNOStruct("com.sun.star.awt.Size") + sSize.Height = 10000 + sSize.Width = 10000 + oTextFrame.Size = sSize + oTextFrame.SizeType = 1 + oTextFrame.Name = cObjectName + oTextFrame.HoriOrient = 0 + oTextFrame.VertOrient = 1 + + oDoc.Text.insertTextContent(oCursor, oTextFrame, false) + + Dim xController As Object + xController = oDoc.getCurrentController() + + oViewSettings = xController.getViewSettings() + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.TEXT_FRAME) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oViewSettings.ZoomValue = 15 + oViewSettings.ZoomValue = 10 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTextGraphicObject/script.xlb b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextGraphicObject/script.xlb new file mode 100644 index 000000000000..72a2af04a120 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextGraphicObject/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="sw_SwAccessibleTextGraphicObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwAccessibleTextGraphicObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwAccessibleTextGraphicObject/sw_SwAccessibleTextGraphicObject.xba b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextGraphicObject/sw_SwAccessibleTextGraphicObject.xba new file mode 100644 index 000000000000..bbf7e306aea8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwAccessibleTextGraphicObject/sw_SwAccessibleTextGraphicObject.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="sw_SwAccessibleTextGraphicObject" 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 oViewSettings As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwAccessibleTextGraphicObject +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + + Dim oGraphObj As Object + oGraphObj = oDoc.createInstance("com.sun.star.text.GraphicObject") + + Dim oText As Object + oText = oDoc.getText() + + Dim oCursor As Object + oCursor = oText.createTextCursor() + + oText.insertTextContent(oCursor, oGraphObj, true) + + Dim xController As Object + xController = oDoc.getCurrentController() + + oViewSettings = xController.getViewSettings() + oViewSettings.ZoomValue = 10 + + Dim oWin As Object + Dim xRoot As Object + oWin = utils.at_getCurrentWindow(oDoc) + xRoot = utils.at_getAccessibleObject(oWin) + oObj = utils.at_getAccessibleObjectForRole(xRoot, _ + com.sun.star.accessibility.AccessibleRole.GRAPHIC) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub fireEvent() + oViewSettings.ZoomValue = 15 + oViewSettings.ZoomValue = 10 +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXAutoTextContainer/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXAutoTextContainer/script.xlb new file mode 100644 index 000000000000..a4cb3b5fb28d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXAutoTextContainer/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="sw_SwXAutoTextContainer" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXAutoTextContainer"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXAutoTextContainer/sw_SwXAutoTextContainer.xba b/qadevOOo/tests/basic/mod/sw/SwXAutoTextContainer/sw_SwXAutoTextContainer.xba new file mode 100644 index 000000000000..cd73dac7da79 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXAutoTextContainer/sw_SwXAutoTextContainer.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="sw_SwXAutoTextContainer" 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.text.XAutoTextContainer +Global nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXAutoTextContainer +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService( "com.sun.star.text.AutoTextContainer" ) + nGlobalLong = oObj.Count +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXAutoTextEntry/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXAutoTextEntry/script.xlb new file mode 100644 index 000000000000..93c51d563ab9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXAutoTextEntry/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="sw_SwXAutoTextEntry" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXAutoTextEntry"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXAutoTextEntry/sw_SwXAutoTextEntry.xba b/qadevOOo/tests/basic/mod/sw/SwXAutoTextEntry/sw_SwXAutoTextEntry.xba new file mode 100644 index 000000000000..decbf7e131bf --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXAutoTextEntry/sw_SwXAutoTextEntry.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="sw_SwXAutoTextEntry" 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.text.XText +Global oCollection As Object +Global oInstance As Object +Global aAddons() + + +Sub beforeInsertTextContent() + +'************************************************************************* +' COMPONENT: +' sw.SwXAutoTextEntry +'************************************************************************* + oDoc.Text.setString("") + oObj.applyTo(oDoc.Text.createTextCursor()) +End Sub + +Sub afterInsertTextContent() + oDoc.Text.setString("") + oObj.applyTo(oDoc.Text.createTextCursor()) +End Sub + +Sub beforeRemoveTextContent() + oDoc.Text.setString("") + oObj.applyTo(oDoc.Text.createTextCursor()) +End Sub + +Sub afterRemoveTextContent() + oDoc.Text.setString("") + oObj.applyTo(oDoc.Text.createTextCursor()) +End Sub + +Global oGroup As Object + +Sub CreateObj() +On Error Goto ErrHndl + Dim oContainer As Object + Dim i As Integer + Dim oNames As Variant + + oDoc = utils.createDocument("swriter", cObjectName) + oContainer = createUNOService( "com.sun.star.text.AutoTextContainer" ) + Out.Log("Looking for not empty elements") + i = 0 + oGroup = oContainer.getByIndex(i) + while (oGroup.getCount < 1) + i = i + 1 + oGroup = oContainer.getByIndex(i) + wend + + oNames = oGroup.getElementNames() + + for i = 0 to ubound(oNames) + Out.Log("Element " + i + ": " + oNames(i)) + next i + + oObj = oGroup.getByIndex(0) + + oInstance = oDoc.createInstance("com.sun.star.text.TextTable") + oCollection = oDoc.getTextTables() + + oObj.ApplyTo(oDoc.Text.createTextCursor) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXAutoTextGroup/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXAutoTextGroup/script.xlb new file mode 100644 index 000000000000..f774d8c7c062 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXAutoTextGroup/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="sw_SwXAutoTextGroup" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXAutoTextGroup"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXAutoTextGroup/sw_SwXAutoTextGroup.xba b/qadevOOo/tests/basic/mod/sw/SwXAutoTextGroup/sw_SwXAutoTextGroup.xba new file mode 100644 index 000000000000..5cabc7055457 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXAutoTextGroup/sw_SwXAutoTextGroup.xba @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXAutoTextGroup" 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 nGlobalLong as Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXAutoTextGroup +'************************************************************************* +On Error Goto ErrHndl + Dim i As Integer + Dim oCursor As Object + Dim oCollection As Object + Dim aElementNames As Variant + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + oCollection = createUNOService("com.sun.star.text.AutoTextContainer") + + aElementNames() = oCollection.ElementNames + 'cGlobalString = aElementNames(uBound(aElementNames()) + + for i = lBound(aElementNames()) to uBound(aElementNames()) + oDoc.Text.insertString(oCursor, aElementNames(i), false ) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oCursor.gotoEnd(false) + next i + oDoc.Text.insertControlCharacter(oCursor, 0, false) + + nGlobalLong = 0 + i = 0 + 'create the object to test here + while nGlobalLong = 0 + oObj = oCollection.getByName(aElementNames(i)) + nGlobalLong = oObj.Count + i = i + 1 + wend + nGlobalLong = oObj.Count +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXBodyText/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXBodyText/script.xlb new file mode 100644 index 000000000000..efe9eac6f10f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXBodyText/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="sw_SwXBodyText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXBodyText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXBodyText/sw_SwXBodyText.xba b/qadevOOo/tests/basic/mod/sw/SwXBodyText/sw_SwXBodyText.xba new file mode 100644 index 000000000000..d0e548872322 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXBodyText/sw_SwXBodyText.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="sw_SwXBodyText" 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: + +'Required for com.sun.star.text.XText +Global oCollection As Object +Global oInstance As Object +Global aAddons() + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXBodyText +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oObj = oDoc.Text + + oInstance = oDoc.createInstance("com.sun.star.text.TextTable") + oInstance.initialize(5, 5) + + oCollection = oDoc.TextTables + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXBookmark/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXBookmark/script.xlb new file mode 100644 index 000000000000..e0293cfca595 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXBookmark/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="sw_SwXBookmark" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXBookmark"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXBookmark/sw_SwXBookmark.xba b/qadevOOo/tests/basic/mod/sw/SwXBookmark/sw_SwXBookmark.xba new file mode 100644 index 000000000000..596848ac8b15 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXBookmark/sw_SwXBookmark.xba @@ -0,0 +1,104 @@ +<?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="sw_SwXBookmark" 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 ' it will be disposed +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXBookmark +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + ' create a textcursor + oCursor = oDoc.Text.createTextCursor() + + ' check if objectcreation succeed and write to log + + + ' write some strings to document + for i = 1 to 10 + oCursor.gotoEnd(false) + + ' Hilfskruecke wegen Bug im Trim oder insertString + cTemp = Trim(Str((i)) & cText + oDoc.Text.insertString(oCursor, cTemp, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oCursor.gotoStart(false) + oCursor.gotoNextWord(false) + + ' create a Bookmark and insert it + for i = 1 to 3 + + oInstance = oDoc.createInstance("com.sun.star.text.Bookmark") + ' check if objectcreation succeed and write to log + + ' set name property just for fun + oInstance.Name = cObjectName & i + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oCursor.gotoNextWord(false) + + next i + + oXTextContent = oDoc.createInstance("com.sun.star.text.Bookmark") + oXTextContentRange = oDoc.Text.createTextCursor() + + ' create test object and initialize + oCollection = oDoc.Bookmarks + oObj = oCollection.getByIndex(0) + oComponentInstance = oCollection.getByIndex(1) + cGlobalString = oCollection.getByIndex(0).Name + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXBookmarks/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXBookmarks/script.xlb new file mode 100644 index 000000000000..1a1a36bf69fd --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXBookmarks/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="sw_SwXBookmarks" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXBookmarks"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXBookmarks/sw_SwXBookmarks.xba b/qadevOOo/tests/basic/mod/sw/SwXBookmarks/sw_SwXBookmarks.xba new file mode 100644 index 000000000000..daee028206c7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXBookmarks/sw_SwXBookmarks.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="sw_SwXBookmarks" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXBookmarks +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + nGlobalLong = 10 + + oDoc = utils.createDocument("swriter", cObjectName) + + + ' create a textcursor + oCursor = oDoc.Text.createTextCursor() + + ' check if objectcreation succeed + + ' write some strings to document + for i = 1 to nGlobalLong + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor,Str(i) & cText,false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + ' set Cursor to the second word + oCursor.gotoStart(false) + oCursor.gotoNextWord(false) + + for i = 1 to nGlobalLong + oInstance = oDoc.createInstance("com.sun.star.text.Bookmark") + ' check if objectcreation succeed and write to log + + + ' set name property + oInstance.Name = cObjectName & i + + oDoc.Text.insertTextContent(oCursor, oInstance, bOK) + cName = oInstance.Name + + oCursor.gotoNextWord(false) + + next i + + oObj = oDoc.Bookmarks + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXCell/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXCell/script.xlb new file mode 100644 index 000000000000..794972ce49e5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXCell/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="sw_SwXCell" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXCell"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXCell/sw_SwXCell.xba b/qadevOOo/tests/basic/mod/sw/SwXCell/sw_SwXCell.xba new file mode 100644 index 000000000000..b1fa8486a06e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXCell/sw_SwXCell.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="sw_SwXCell" 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 oCollection As Object +Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXCell +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + oCursor = oDoc.Text.createTextCursor() + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(5,5) + + oDoc.Text.insertTextContent(oCursor, oTable, false) + oCollection = oDoc.TextTables + + oTable.getCellByName("A2").Value = nGlobalLong + oTable.getCellByName("B2").Value = nGlobalLong * 2 + oObj = oTable.getCellByName("C2") + + ' create some textcontent for insertion + oInstance = oDoc.createInstance("com.sun.star.text.Bookmark") + oCollection = oDoc.Bookmarks + + oObj.setFormula("=sum <A2:B2>") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXCellRange/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXCellRange/script.xlb new file mode 100644 index 000000000000..5324c38394d0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXCellRange/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="sw_SwXCellRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXCellRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXCellRange/sw_SwXCellRange.xba b/qadevOOo/tests/basic/mod/sw/SwXCellRange/sw_SwXCellRange.xba new file mode 100644 index 000000000000..b3c5df256ade --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXCellRange/sw_SwXCellRange.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="sw_SwXCellRange" 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 sheet.XCellRangeData +Global newData As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXCellRange +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim oTable As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(5,5) + oDoc.Text.insertTextContent(oCursor, oTable, false) + + oObj = oTable.getCellRangeByPosition(0,0,3,4) + + 'Required for XCellRangeData + newData = Array(_ + Array(2.5, 5.0, 2.5, 5.0),_ + Array(4.0, 9.0, 2.5, 5.0),_ + Array(2.5, 5.0, 2.5, 5.0),_ + Array(2.5, 5.0, 2.5, 5.0),_ + Array(4.0, 9.0, 2.5, 5.0))_ + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXChapterNumbering/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXChapterNumbering/script.xlb new file mode 100644 index 000000000000..9863fa58f127 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXChapterNumbering/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="sw_SwXChapterNumbering" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXChapterNumbering"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXChapterNumbering/sw_SwXChapterNumbering.xba b/qadevOOo/tests/basic/mod/sw/SwXChapterNumbering/sw_SwXChapterNumbering.xba new file mode 100644 index 000000000000..43ee2717020f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXChapterNumbering/sw_SwXChapterNumbering.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="sw_SwXChapterNumbering" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXChapterNumbering +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + for i = 1 to 10 + oDoc.Text.insertString(oCursor, cObjectName+i, false) + oDoc.Text.insertControlCharacter(oCursor,0,false) + next i + + oObj = oDoc.ChapterNumberingRules + nGlobalLong = oObj.Count + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDocumentIndex/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndex/script.xlb new file mode 100644 index 000000000000..1e65a73a9742 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndex/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="sw_SwXDocumentIndex" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXDocumentIndex"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDocumentIndex/sw_SwXDocumentIndex.xba b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndex/sw_SwXDocumentIndex.xba new file mode 100644 index 000000000000..c207f6e6f3a7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndex/sw_SwXDocumentIndex.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="sw_SwXDocumentIndex" 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 oCollection As Object +Global oComponentInstance As Object ' it will be disposed +Global oXTextContent as Object +Global oXTextContentRange as Object + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXDocumentIndex +'************************************************************************* +On Error Goto ErrHndl + Dim i As Integer + Dim n As Integer + Dim oCursor As Object + Dim oSearch As Object + Dim oFound As Object + Dim oIndexEntry As Object + Dim oFoundPos As Object + Dim oIndex As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + ' write some strings to document + for i = 1 to 10 + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor, cObjectName, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + ' insert some IndexMakrs + oSearch = oDoc.createSearchDescriptor() + oSearch.SearchString = cObjectName + oFound = oDoc.findAll(oSearch) + + for n = 0 to oFound.Count - 5 + oFoundPos = oFound(n) + oIndexEntry = oDoc.createInstance("com.sun.star.text.DocumentIndexMark") + oDoc.text.insertTextContent(oFoundPos, oIndexEntry, true) + next n + + 'create an index + oIndex = oDoc.createInstance("com.sun.star.text.DocumentIndex") + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oObj = oIndex + + oXTextContent = oDoc.createInstance("com.sun.star.text.DocumentIndex") + oXTextContentRange = oDoc.Text.createTextCursor() + + oIndex = oDoc.createInstance("com.sun.star.text.ContentIndex") + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oIndex = oDoc.createInstance("com.sun.star.text.ContentIndex") + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oIndex = oDoc.createInstance("com.sun.star.text.ContentIndex") + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oComponentInstance = oIndex + + oCollection = oDoc.getDocumentIndexes() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexMark/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexMark/script.xlb new file mode 100644 index 000000000000..8e79e016f510 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexMark/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="sw_SwXDocumentIndexMark" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXDocumentIndexMark"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexMark/sw_SwXDocumentIndexMark.xba b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexMark/sw_SwXDocumentIndexMark.xba new file mode 100644 index 000000000000..515c9b61b05d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexMark/sw_SwXDocumentIndexMark.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="sw_SwXDocumentIndexMark" 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 oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXDocumentIndexMark +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + oIndex = oDoc.createInstance("com.sun.star.text.DocumentIndexMark") + oIndex.attach(oDoc.Text) + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oObj = oIndex + oIndex = oDoc.createInstance("com.sun.star.text.DocumentIndexMark") + oIndex.attach(oDoc.Text) + + oComponentInstance = oIndex + + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oIndex = oDoc.createInstance("com.sun.star.text.DocumentIndexMark") + oIndex.attach(oDoc.Text) + oDoc.Text.insertTextContent(oCursor, oIndex, false) + + oXTextContent = oDoc.createInstance("com.sun.star.text.DocumentIndexMark") + oXTextContentRange = oDoc.Text.createTextCursor() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexes/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexes/script.xlb new file mode 100644 index 000000000000..d7187cc8f6ca --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexes/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="sw_SwXDocumentIndexes" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXDocumentIndexes"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexes/sw_SwXDocumentIndexes.xba b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexes/sw_SwXDocumentIndexes.xba new file mode 100644 index 000000000000..7fb5286675b9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDocumentIndexes/sw_SwXDocumentIndexes.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="sw_SwXDocumentIndexes" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXDocumentIndexes +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + bOK = NOT isNull(oDoc) + + oCursor = oDoc.Text.createTextCursor() + + oIndex = oDoc.createInstance("com.sun.star.text.ContentIndex") + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oIndex = oDoc.createInstance("com.sun.star.text.ContentIndex") + oDoc.Text.insertTextContent(oCursor, oIndex, false) + oIndex = oDoc.createInstance("com.sun.star.text.ContentIndex") + oDoc.Text.insertTextContent(oCursor, oIndex, false) + + oObj = oDoc.getDocumentIndexes() + + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDrawPage/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXDrawPage/script.xlb new file mode 100644 index 000000000000..0f908a3b103b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDrawPage/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="sw_SwXDrawPage" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXDrawPage"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXDrawPage/sw_SwXDrawPage.xba b/qadevOOo/tests/basic/mod/sw/SwXDrawPage/sw_SwXDrawPage.xba new file mode 100644 index 000000000000..cb69d58f6093 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXDrawPage/sw_SwXDrawPage.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="sw_SwXDrawPage" 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: + +' Requiered for com.sun.star.container.XNamed +Global cNameToSet As String ' "fixed" if name is fixed + +' Requiered for com.sun.star.drawing.XShapeGrouper +Global oGrouperCollection As Object 'groupable objects + +' Requiered for com.sun.star.drawing.XShapes +Global oXShapeInstance As Object 'to add/remove + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXDrawPage +'************************************************************************* +On Error Goto ErrHndl + Dim oCollection As Object + Dim oInstance As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oObj = oDoc.getDrawPage() + + oCollection = createUNOService("com.sun.star.drawing.ShapeCollection") + oInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oObj.add(oInstance) + oCollection.add(oInstance) + oInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oObj.add(oInstance) + oCollection.add(oInstance) + oInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oObj.add(oInstance) + oInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + oObj.add(oInstance) + oXShapeInstance = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + + oGrouperCollection = oCollection + + cNameToSet = "ADrawPage" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXEndnoteProperties/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXEndnoteProperties/script.xlb new file mode 100644 index 000000000000..a831b798f246 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXEndnoteProperties/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="sw_SwXEndnoteProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXEndnoteProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXEndnoteProperties/sw_SwXEndnoteProperties.xba b/qadevOOo/tests/basic/mod/sw/SwXEndnoteProperties/sw_SwXEndnoteProperties.xba new file mode 100644 index 000000000000..4fc9577723a9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXEndnoteProperties/sw_SwXEndnoteProperties.xba @@ -0,0 +1,66 @@ +<?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="sw_SwXEndnoteProperties" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXEndnoteProperties +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + oCursor = oDoc.Text.createTextCursor() + + oNote = oDoc.createInstance("com.sun.star.text.Endnote") + + oDoc.Text.insertTextContent(oCursor, oNote, false) + + oObj = oDoc.getEndnoteSettings() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFieldEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXFieldEnumeration/script.xlb new file mode 100644 index 000000000000..b93edc648c90 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFieldEnumeration/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="sw_SwXFieldEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXFieldEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFieldEnumeration/sw_SwXFieldEnumeration.xba b/qadevOOo/tests/basic/mod/sw/SwXFieldEnumeration/sw_SwXFieldEnumeration.xba new file mode 100644 index 000000000000..e0fa327a836d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFieldEnumeration/sw_SwXFieldEnumeration.xba @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXFieldEnumeration" 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: +' sw.SwXFieldEnumeration +'************************************************************************* +On Error Goto ErrHndl + Dim FieldMaster As Object + Dim TextField As Object + Dim the_Text As Object + Dim the_Cursor As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + FieldMaster = oDoc.createInstance( "com.sun.star.text.FieldMaster.Database" ) + TextField = oDoc.createInstance( "com.sun.star.text.TextField.Database" ) + + FieldMaster.setPropertyValue("DataBaseName", "Bibliography") + FieldMaster.setPropertyValue("DataTableName", "biblio") + FieldMaster.setPropertyValue("DataColumnName", "Address") + the_Text = oDoc.getText() + the_Cursor = the_Text.createTextCursor() + + TextField.attachTextFieldMaster(FieldMaster) + the_Text.insertTextContent(the_Cursor, TextField, false) + + oObj = oDoc.getTextFields().createEnumeration() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFieldMaster/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXFieldMaster/script.xlb new file mode 100644 index 000000000000..717a73f4ed49 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFieldMaster/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="sw_SwXFieldMaster" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXFieldMaster"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFieldMaster/sw_SwXFieldMaster.xba b/qadevOOo/tests/basic/mod/sw/SwXFieldMaster/sw_SwXFieldMaster.xba new file mode 100644 index 000000000000..8c6f7dd17905 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFieldMaster/sw_SwXFieldMaster.xba @@ -0,0 +1,54 @@ +<?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="sw_SwXFieldMaster" 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: +' sw.SwXFieldMaster +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = oDoc.createInstance("com.sun.star.text.FieldMaster.Database") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnote/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXFootnote/script.xlb new file mode 100644 index 000000000000..26fde0605a73 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnote/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="sw_SwXFootnote" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXFootnote"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnote/sw_SwXFootnote.xba b/qadevOOo/tests/basic/mod/sw/SwXFootnote/sw_SwXFootnote.xba new file mode 100644 index 000000000000..4bff96ac2b59 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnote/sw_SwXFootnote.xba @@ -0,0 +1,85 @@ +<?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="sw_SwXFootnote" 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 oInstance as Object +Global oCollection as Object +Global oComponentInstance as Object +Global cGlobalString as String +Global nGlobalLong as Long +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXFootnote +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim i As Integer + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + for i = 1 to 5 + oInstance = oDoc.createInstance("com.sun.star.text.Footnote") + oInstance.Label = cObjectName & i + oDoc.Text.insertTextContent(oCursor, oInstance, false) + next i + + oInstance = oDoc.createInstance("com.sun.star.text.Bookmark") + oCollection = oDoc.getBookmarks() + oComponentInstance = oDoc.Footnotes(2) + cGlobalString = cObjectName + nGlobalLong = 2 + + oObj = oDoc.Footnotes(nGlobalLong-1) + + oXTextContent = oDoc.createInstance("com.sun.star.text.Footnote") + oXTextContentRange = oDoc.Text.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnoteProperties/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXFootnoteProperties/script.xlb new file mode 100644 index 000000000000..3df9abbc74f6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnoteProperties/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="sw_SwXFootnoteProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXFootnoteProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnoteProperties/sw_SwXFootnoteProperties.xba b/qadevOOo/tests/basic/mod/sw/SwXFootnoteProperties/sw_SwXFootnoteProperties.xba new file mode 100644 index 000000000000..d9e23b870ec0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnoteProperties/sw_SwXFootnoteProperties.xba @@ -0,0 +1,64 @@ +<?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="sw_SwXFootnoteProperties" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXFootnoteProperties +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + oCursor = oDoc.Text.createTextCursor() + oInst = oDoc.createInstance("com.sun.star.text.Footnote") + + oDoc.Text.insertTextContent(oCursor, oInst, false) + + oObj = oDoc.getFootnoteSettings() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnoteText/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXFootnoteText/script.xlb new file mode 100644 index 000000000000..070f117c0b0b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnoteText/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="sw_SwXFootnoteText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXFootnoteText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnoteText/sw_SwXFootnoteText.xba b/qadevOOo/tests/basic/mod/sw/SwXFootnoteText/sw_SwXFootnoteText.xba new file mode 100644 index 000000000000..5a7642df2d3a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnoteText/sw_SwXFootnoteText.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXFootnoteText" 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 nGlobalLong As Long +Global oInstance As Object +Global oCollection As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXFootnoteText +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + nGlobalLong = 10 + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + + for i = 1 to nGlobalLong + oFootNote = oDoc.createInstance("com.sun.star.text.Footnote") + oFootNote.Label = cObjectName & i + oDoc.Text.insertTextContent(oCursor, oFootNote, false) + next i + + oInstance = oDoc.createInstance("com.sun.star.text.Bookmark") + oCollection = oDoc.Bookmarks + + oObj = oFootNote.getText() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnotes/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXFootnotes/script.xlb new file mode 100644 index 000000000000..7e265118287e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnotes/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="sw_SwXFootnotes" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXFootnotes"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFootnotes/sw_SwXFootnotes.xba b/qadevOOo/tests/basic/mod/sw/SwXFootnotes/sw_SwXFootnotes.xba new file mode 100644 index 000000000000..18100dddb1a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFootnotes/sw_SwXFootnotes.xba @@ -0,0 +1,66 @@ +<?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="sw_SwXFootnotes" 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: +' sw.SwXFootnotes +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim oInstance As Object + Dim i As Integer + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + for i = 1 to 5 + oInstance = oDoc.createInstance("com.sun.star.text.Footnote") + oInstance.Label = cObjectName & i + oDoc.Text.insertTextContent(oCursor, oInstance, false) + next i + + oObj = oDoc.Footnotes +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFrames/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXFrames/script.xlb new file mode 100644 index 000000000000..3aed8ca84894 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFrames/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="sw_SwXFrames" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXFrames"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXFrames/sw_SwXFrames.xba b/qadevOOo/tests/basic/mod/sw/SwXFrames/sw_SwXFrames.xba new file mode 100644 index 000000000000..031cdf270816 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXFrames/sw_SwXFrames.xba @@ -0,0 +1,81 @@ +<?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="sw_SwXFrames" 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: + +' Requiered for XContainer + Global oElementToInsert As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXFrames +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + ' create some frames on doc + for i= 1 to 3 + oInstance = oDoc.createInstance("com.sun.star.text.TextFrame") + sSize = createUNOStruct("com.sun.star.awt.Size") + sSize.Height = 100 + sSize.Width = 100 + oInstance.Size = sSize + oInstance.SizeType = 1 + oInstance.Name = cObjectName & i + oInstance.HoriOrient = i + oInstance.VertOrient = i + oDoc.Text.insertTextContent(oCursor, oInstance, false) + next i + + + + oObj = oDoc.TextFrames + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXHeadFootText/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXHeadFootText/script.xlb new file mode 100644 index 000000000000..efc59272d689 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXHeadFootText/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="sw_SwXHeadFootText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXHeadFootText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXHeadFootText/sw_SwXHeadFootText.xba b/qadevOOo/tests/basic/mod/sw/SwXHeadFootText/sw_SwXHeadFootText.xba new file mode 100644 index 000000000000..30e6852188cc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXHeadFootText/sw_SwXHeadFootText.xba @@ -0,0 +1,87 @@ +<?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="sw_SwXHeadFootText" 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 nGlobalLong As Long +Global oCollection As Object +Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXHeadFootText +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + oPagestyle = oDoc.StyleFamilies.getByName("PageStyles").getByName("Standard") + oPageStyle.HeaderIsOn = true + + oObj = oPageStyle.HeaderText + oCursor = oObj.createTextCursor() + + nGlobalLong = 3 + + ' insert some Tables to Header + for i = 1 to nGlobalLong + ' initialize appropirate textcontent for insertion + oInstance = oDoc.createInstance("com.sun.star.text.TextTable") + oInstance.initialize(1, 2) + oCursor.gotoEnd(false) + oObj.insertTextContent(oCursor, oInstance, false) + next i + + ' create another table to insert via XText-module + oInstance = oDoc.createInstance("com.sun.star.text.TextTable") + oInstance.initialize(5, 5) + + ' initialize corresponding collection for verifying + oCollection = oDoc.TextTables + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXLineNumberingProperties/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXLineNumberingProperties/script.xlb new file mode 100644 index 000000000000..833b05eb14d8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXLineNumberingProperties/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="sw_SwXLineNumberingProperties" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXLineNumberingProperties"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXLineNumberingProperties/sw_SwXLineNumberingProperties.xba b/qadevOOo/tests/basic/mod/sw/SwXLineNumberingProperties/sw_SwXLineNumberingProperties.xba new file mode 100644 index 000000000000..33e20cc676b2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXLineNumberingProperties/sw_SwXLineNumberingProperties.xba @@ -0,0 +1,66 @@ +<?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="sw_SwXLineNumberingProperties" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXLineNumberingProperties +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oText = oDoc.getText() + oCursor = oText.createTextCursor() + + For i = 1 to 5 + oText.insertString(oCursor,_ + "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG", false) + oText.insertControlCharacter( oCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false ) + Next i + + oObj = oDoc.getLineNumberingProperties() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXMailMerge/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXMailMerge/script.xlb new file mode 100644 index 000000000000..7889f2929f95 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXMailMerge/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="sw_SwXMailMerge" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="sw_SwXMailMerge"/> + </library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXMailMerge/sw_SwXMailMerge.xba b/qadevOOo/tests/basic/mod/sw/SwXMailMerge/sw_SwXMailMerge.xba new file mode 100644 index 000000000000..dffb0d341a5d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXMailMerge/sw_SwXMailMerge.xba @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8"?> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXMailMerge" 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: + +' com.sun.star.task.XJob: +Global vXJobArgs(0 to 3) as Variant + +' com.sun.star.text.MailMerge +Global cMailMerge_DocumentURL as String + +Dim cDataSourceName as String +Dim cDataCommand as String +Dim oXResultSet as Variant + +' Be sure that all variables are dimensioned: +option explicit + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' com.sun.star.sw.SwXMailMerge +'************************************************************************* +On Error Goto ErrHndl + + Dim vXJobArg0(0 to 7) as new com.sun.star.beans.NamedValue + Dim vXJobArg1(0 to 6) as new com.sun.star.beans.NamedValue + Dim vXJobArg2(0 to 9) as new com.sun.star.beans.NamedValue + Dim vXJobArg3(0) as new com.sun.star.beans.NamedValue + Dim cTestDoc as String + Dim cOutputURL as String + Dim oXConnection as Variant + Dim myBookMarks as Variant + + oObj = createUnoService("com.sun.star.text.MailMerge") + + cTestDoc = utils.Path2URL(cTestDocsDir + "/" + "MailMerge.sxw") + cMailMerge_DocumentURL = cTestDoc + cOutputURL = ConvertToURL(utils.getUserPath()) + cDataSourceName = "Bibliography" + cDataCommand = "biblio" + oXResultSet = getXResultSet() + oXConnection = oXResultSet.ActiveConnection + + ' create arguments for XJob: + myBookMarks = getMyBookMarks() + + oObj.DataSourceName = cDataSourceName + oObj.Command = cDataCommand + oObj.CommandType = com.sun.star.sdb.CommandType.TABLE + oObj.OutputType = com.sun.star.text.MailMergeType.FILE + oObj.DocumentURL = cTestDoc + oObj.OutputURL = cOutputURL + oObj.FileNamePrefix = "Author" + oObj.FileNameFromColumn = TRUE + oObj.Selection = DimArray() + + ' use a simple DataBase with simple Table + vXJobArg0(0).Name = "DataSourceName" : vXJobArg0(0).Value = cDataSourceName + vXJobArg0(1).Name = "Command" : vXJobArg0(1).Value = cDataCommand + vXJobArg0(2).Name = "CommandType" : vXJobArg0(2).Value = com.sun.star.sdb.CommandType.TABLE + vXJobArg0(3).Name = "OutputType" : vXJobArg0(3).Value = com.sun.star.text.MailMergeType.FILE + vXJobArg0(4).Name = "DocumentURL" : vXJobArg0(4).Value = cTestDoc + vXJobArg0(5).Name = "OutputURL" : vXJobArg0(5).Value = cOutputURL + vXJobArg0(6).Name = "FileNamePrefix" : vXJobArg0(6).Value = "Identifier" + vXJobArg0(7).Name = "FileNameFromColumn" : vXJobArg0(7).Value = true + + ' use a simple DataBase with simple Table and write to printer + vXJobArg1(0).Name = "DataSourceName" : vXJobArg1(0).Value = cDataSourceName + vXJobArg1(1).Name = "Command" : vXJobArg1(1).Value = cDataCommand + vXJobArg1(2).Name = "CommandType" : vXJobArg1(2).Value = com.sun.star.sdb.CommandType.TABLE + vXJobArg1(3).Name = "OutputType" : vXJobArg1(3).Value = com.sun.star.text.MailMergeType.PRINTER + vXJobArg1(4).Name = "FileNamePrefix" : vXJobArg1(4).Value = "Author" + vXJobArg1(5).Name = "FileNameFromColumn" : vXJobArg1(5).Value = true + vXJobArg1(6).Name = "DocumentURL" : vXJobArg1(6).Value = cTestDoc + + ' use a XConnection + vXJobArg2(0).Name = "ActiveConnection" : vXJobArg2(0).Value = oXConnection + vXJobArg2(1).Name = "DataSourceName" : vXJobArg2(1).Value = cDataSourceName + vXJobArg2(2).Name = "Command" : vXJobArg2(2).Value = cDataCommand + vXJobArg2(3).Name = "CommandType" : vXJobArg2(3).Value = com.sun.star.sdb.CommandType.TABLE + vXJobArg2(4).Name = "OutputType" : vXJobArg2(4).Value = com.sun.star.text.MailMergeType.FILE + vXJobArg2(5).Name = "ResultSet" : vXJobArg2(5).Value = oXResultSet + vXJobArg2(6).Name = "OutputURL" : vXJobArg2(6).Value = cOutputURL + vXJobArg2(7).Name = "FileNamePrefix" : vXJobArg2(7).Value = "Identifier" + vXJobArg2(8).Name = "FileNameFromColumn" : vXJobArg2(8).Value = true + vXJobArg2(9).Name = "Selection" : vXJobArg2(9).Value = myBookMarks() + + vXJobArgs(0) = vXJobArg0() + vXJobArgs(1) = vXJobArg1() + vXJobArgs(2) = vXJobArg2() + vXJobArgs(3) = DimArray() + + out.log("com.sun.star.text.MailMerge created.") + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub XMailMergeEvent() + oObj.execute(vXJobArgs(2)) +end sub + +Function getXResultSet() as Variant + Dim oRowSet as Object + oRowSet = createUnoService("com.sun.star.sdb.RowSet") + oRowSet.DataSourceName = cDataSourceName + oRowSet.Command = cDataCommand + oRowSet.CommandType = com.sun.star.sdb.CommandType.TABLE + oRowSet.execute() + wait(200) +' oRowSet.getFirst() + getXResultSet() = oRowSet +end Function + +Function getMyBookMarks() as Variant + Dim BookMarks(1) as Variant + oXResultSet.first() + BookMarks(0) = oXResultSet.getBookmark() + oXResultSet.next() + BookMarks(1) = oXResultSet.getBookmark() + getMyBookMarks() = BookMarks() +end Function + +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXModule/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXModule/script.xlb new file mode 100644 index 000000000000..0a065a01386a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXModule/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="sw_SwXModule" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXModule"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXModule/sw_SwXModule.xba b/qadevOOo/tests/basic/mod/sw/SwXModule/sw_SwXModule.xba new file mode 100644 index 000000000000..11d08996a639 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXModule/sw_SwXModule.xba @@ -0,0 +1,50 @@ +<?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="sw_SwXModule" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXModule +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.text.GlobalSettings") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXNumberingRules/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXNumberingRules/script.xlb new file mode 100644 index 000000000000..047311ba12f1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXNumberingRules/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="sw_SwXNumberingRules" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXNumberingRules"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXNumberingRules/sw_SwXNumberingRules.xba b/qadevOOo/tests/basic/mod/sw/SwXNumberingRules/sw_SwXNumberingRules.xba new file mode 100644 index 000000000000..7ab97cba229d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXNumberingRules/sw_SwXNumberingRules.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="sw_SwXNumberingRules" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXNumberingRules +'************************************************************************* +On Error Goto ErrHndl + + Dim oText As Object + Dim oCursor As Object + Dim oStyleFamilies As Object + Dim oNumStyles As Object + Dim bOK As Boolean + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + + oText = oDoc.getText() + oCursor = oText.createTextCursor() + for i = 0 to 5 + oText.insertString(oCursor, "The quick brown fox jumps over the lazy Dog", false) + oText.insertControlCharacter(oCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + Next i + + oStyleFamilies = oDoc.getStyleFamilies() + oNumStyles = oStyleFamilies.getByName("NumberingStyles") + + oObj = oNumStyles.getByIndex(0).NumberingRules + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXParagraph/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXParagraph/script.xlb new file mode 100644 index 000000000000..0a85ca0129a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXParagraph/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="sw_SwXParagraph" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXParagraph"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXParagraph/sw_SwXParagraph.xba b/qadevOOo/tests/basic/mod/sw/SwXParagraph/sw_SwXParagraph.xba new file mode 100644 index 000000000000..9ba860b23737 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXParagraph/sw_SwXParagraph.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="sw_SwXParagraph" 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: + +' Required for com.sun.star.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + Global bXTextContentImpossible As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXParagraph +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim nWidth As Integer + Dim nHeight As Integer + Dim cText As String + Dim oCursor As Object + Dim i As Integer + Dim oInstance As Object + Dim oEnum As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + nWidth = 5000 + nHeight = 4000 + cText = ". Zeile : test of " & cObjectName + + oCursor = oDoc.Text.createTextCursor() + + ' write some strings to document + for i = 1 to 10 + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor,Trim(Str(i)) & cText,false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oCursor.gotoEnd(false) + oInstance = oDoc.createInstance("com.sun.star.text.TextFrame") + sSize = createUNOStruct("com.sun.star.awt.Size") + sSize.Height = nHeight + sSize.Width = nWidth + oInstance.Size = sSize + oInstance.SizeType = 1 + oInstance.AnchorType = 0 + oInstance.Name = cObjectName + oInstance.HoriOrient = 2 + oInstance.VertOrient = 2 + oDoc.Text.insertTextContent(oCursor, oInstance, false) + + oEnum = oDoc.Text.createEnumeration() + oObj = oEnum.nextElement() + oComponentInstance = oEnum.nextElement() + + bXTextContentImpossible = TRUE + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXParagraphEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXParagraphEnumeration/script.xlb new file mode 100644 index 000000000000..2e8a40a04a15 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXParagraphEnumeration/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="sw_SwXParagraphEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXParagraphEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXParagraphEnumeration/sw_SwXParagraphEnumeration.xba b/qadevOOo/tests/basic/mod/sw/SwXParagraphEnumeration/sw_SwXParagraphEnumeration.xba new file mode 100644 index 000000000000..4f9f4b4ae6d0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXParagraphEnumeration/sw_SwXParagraphEnumeration.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXParagraphEnumeration" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXParagraphEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + oDoc = utils.createDocument("swriter", cObjectName) + + nGlobalLong = 7 + + oCursor = oDoc.Text.createTextCursor() + + ' write some strings to document + for i = 1 to nGlobalLong + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor,Trim(Str(i)) & cText,false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oObj = oDoc.Text.createEnumeration() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXPrintSettings/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXPrintSettings/script.xlb new file mode 100644 index 000000000000..863c2eb1bc8c --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXPrintSettings/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="sw_SwXPrintSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXPrintSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXPrintSettings/sw_SwXPrintSettings.xba b/qadevOOo/tests/basic/mod/sw/SwXPrintSettings/sw_SwXPrintSettings.xba new file mode 100644 index 000000000000..8762350cb324 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXPrintSettings/sw_SwXPrintSettings.xba @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXPrintSettings" 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: +' sw.SwXPrintSettings +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oInst As Variant + + bOK = true + + oInst = createUnoService("com.sun.star.text.GlobalSettings") + oObj = oInst.getPrintSettings() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXPropertySet/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXPropertySet/script.xlb new file mode 100644 index 000000000000..568f0fccb1d7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXPropertySet/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="sw_SwXPropertySet" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXPropertySet"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXPropertySet/sw_SwXPropertySet.xba b/qadevOOo/tests/basic/mod/sw/SwXPropertySet/sw_SwXPropertySet.xba new file mode 100644 index 000000000000..d482db98cea9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXPropertySet/sw_SwXPropertySet.xba @@ -0,0 +1,51 @@ +<?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="sw_SwXPropertySet" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXPropertySet +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXPropertySetInfo/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXPropertySetInfo/script.xlb new file mode 100644 index 000000000000..d613c13e2ecf --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXPropertySetInfo/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="sw_SwXPropertySetInfo" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXPropertySetInfo"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXPropertySetInfo/sw_SwXPropertySetInfo.xba b/qadevOOo/tests/basic/mod/sw/SwXPropertySetInfo/sw_SwXPropertySetInfo.xba new file mode 100644 index 000000000000..2621c918a002 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXPropertySetInfo/sw_SwXPropertySetInfo.xba @@ -0,0 +1,51 @@ +<?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="sw_SwXPropertySetInfo" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXPropertySetInfo +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = oDoc.getPropertySetInfo() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXReferenceMark/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXReferenceMark/script.xlb new file mode 100644 index 000000000000..ad3eadd337b9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXReferenceMark/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="sw_SwXReferenceMark" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXReferenceMark"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXReferenceMark/sw_SwXReferenceMark.xba b/qadevOOo/tests/basic/mod/sw/SwXReferenceMark/sw_SwXReferenceMark.xba new file mode 100644 index 000000000000..2a48e55f78f2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXReferenceMark/sw_SwXReferenceMark.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="sw_SwXReferenceMark" 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 nGlobalLong As Long +Global oCollection As Object +Global oComponentInstance As Object ' it will be disposed +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXReferenceMark +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + oDoc = utils.createDocument("swriter", cObjectName) + + ' create the textcursor and verify initialization + oCursor = oDoc.Text.createTextCursor() + + nGlobalLong = 7 + + ' write some strings to document + for i = 1 to nGlobalLong + oCursor.gotoEnd(false) + ' helpvar cause of bug in trim or insertString + cTemp = Trim(Str((i)) & cText + oDoc.Text.insertString(oCursor, cTemp, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oCursor.gotoStart(false) + + for i = 1 to nGlobalLong + oObj = oDoc.createInstance("com.sun.star.text.ReferenceMark") + oObj.Name = cObjectName & i + oDoc.Text.insertTextContent(oCursor, oObj, false) + oCursor.gotoNextParagraph(false) + next i + + oCollection = oDoc.ReferenceMarks + oObj = oCollection.getByIndex(0) + oComponentInstance = oCollection.getByIndex(1) + + oXTextContent = oDoc.createInstance("com.sun.star.text.ReferenceMark") + oXTextContentRange = oDoc.Text.createTextCursor() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXReferenceMarks/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXReferenceMarks/script.xlb new file mode 100644 index 000000000000..87e12bcbf371 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXReferenceMarks/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="sw_SwXReferenceMarks" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXReferenceMarks"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXReferenceMarks/sw_SwXReferenceMarks.xba b/qadevOOo/tests/basic/mod/sw/SwXReferenceMarks/sw_SwXReferenceMarks.xba new file mode 100644 index 000000000000..33fc407703e0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXReferenceMarks/sw_SwXReferenceMarks.xba @@ -0,0 +1,85 @@ +<?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="sw_SwXReferenceMarks" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXReferenceMarks +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + nGlobalLong = 5 + + ' write some strings to document + for i = 1 to nGlobalLong + oCursor.gotoEnd(false) + ' Hilfskruecke wegen Bug im Trim oder insertString + cTemp = Trim(Str((i)) & cText + oDoc.Text.insertString(oCursor, cTemp, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oCursor.gotoStart(false) + + for i = 1 to nGlobalLong + oInstance = oDoc.createInstance("com.sun.star.text.ReferenceMark") + oInstance.Name = cObjectName & i + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oCursor.gotoNextParagraph(false) + next i + + + ' create the object to test here + oObj = oDoc.ReferenceMarks + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXShape/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXShape/script.xlb new file mode 100644 index 000000000000..b95a641374d7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXShape/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="sw_SwXShape" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXShape"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXShape/sw_SwXShape.xba b/qadevOOo/tests/basic/mod/sw/SwXShape/sw_SwXShape.xba new file mode 100644 index 000000000000..09a09c71efe5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXShape/sw_SwXShape.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="sw_SwXShape" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.drawing.XShapeDescriptor : + Global cShapeType As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXShape +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim n As Integer + Dim sSize as new com.sun.star.awt.Size + Dim sPoint as new com.sun.star.awt.Point + Dim oShape As Object, oDrawPage As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oDrawPage = oDoc.DrawPage + + For n = 1 to 3 + oShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape") + sSize.Height = 5000 + sSize.Width = 5000 + oShape.Size = sSize + sPoint.X = 5000 + sPoint.Y = n * 1000 + oShape.Position = sPoint + oDrawPage.Add(oShape) + Next + + oObj = oDrawPage.getByIndex(1) + + oObj.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE + oComponentInstance = oDrawPage.getByIndex(0) + + cShapeType = "com.sun.star.drawing.RectangleShape" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXStyle/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXStyle/script.xlb new file mode 100644 index 000000000000..96da6a7f5e67 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXStyle/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="sw_SwXStyle" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXStyle"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXStyle/sw_SwXStyle.xba b/qadevOOo/tests/basic/mod/sw/SwXStyle/sw_SwXStyle.xba new file mode 100644 index 000000000000..53aa0ece1116 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXStyle/sw_SwXStyle.xba @@ -0,0 +1,104 @@ +<?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="sw_SwXStyle" 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: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed +' Requiered for com.sun.star.style.XStyle +Global oStandartStyle As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXStyle +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + oStyleFamilies = oDoc.StyleFamilies + aElementNames() = oStyleFamilies.Elementnames + + oDoc.Text.insertString(oCursor, "Elements of StyleFamlilies are:", false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + + for i = lBound(aElementNames()) to uBound(aElementNames()) + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor, aElementNames(i), false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + + oObj = oStyleFamilies.getByIndex(0) + + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oCursor.gotoEnd(false) + + oDoc.Text.insertString(oCursor,"Elements of StyleFamlilie " & aElementNames(0) & " are:", false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + + aElementNames() = oObj.Elementnames + for i = lBound(aElementNames()) to uBound(aElementNames()) + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor, aElementNames(i), false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oNew = oDoc.createInstance("com.sun.star.style.CharacterStyle") + oStyleFamily = oStyleFamilies.getByIndex(0)' + oStyleFamily.insertByName("Dummy", oNew) + + oObj = oStyleFamily.getByName("Dummy") + + 'Use the style... + oCursor.setPropertyValue("CharStyleName", "Dummy") + + oStandartStyle = oStyleFamily.getByName(aElementNames(1)) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXStyleFamilies/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXStyleFamilies/script.xlb new file mode 100644 index 000000000000..59114cb7f7e6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXStyleFamilies/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="sw_SwXStyleFamilies" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXStyleFamilies"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXStyleFamilies/sw_SwXStyleFamilies.xba b/qadevOOo/tests/basic/mod/sw/SwXStyleFamilies/sw_SwXStyleFamilies.xba new file mode 100644 index 000000000000..47710c6df682 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXStyleFamilies/sw_SwXStyleFamilies.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="sw_SwXStyleFamilies" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXStyleFamilies +'************************************************************************* +On Error Goto ErrHndl + + oDoc = utils.createDocument("swriter", cObjectName) + oObj = oDoc.getStyleFamilies() + nGlobalLong = oObj.count + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXStyleFamily/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXStyleFamily/script.xlb new file mode 100644 index 000000000000..bd646d605dbf --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXStyleFamily/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="sw_SwXStyleFamily" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXStyleFamily"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXStyleFamily/sw_SwXStyleFamily.xba b/qadevOOo/tests/basic/mod/sw/SwXStyleFamily/sw_SwXStyleFamily.xba new file mode 100644 index 000000000000..8c8a79680f05 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXStyleFamily/sw_SwXStyleFamily.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="sw_SwXStyleFamily" 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: + +' Requiered for com.sun.star.container.XNameContainer + Global oInstance As Variant 'instance to insert + + +' Requiered for com.sun.star.container.XNameReplace + Global cNameToReplace As String 'name of instance to be replased + Global oReplaceInstance As Variant 'instance, that will be inserted + 'instead old one + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXStyleFamily +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + oInstance = oDoc.createInstance("com.sun.star.style.CharacterStyle") + + oReplaceInstance = oDoc.createInstance("com.sun.star.style.CharacterStyle") + + + oObj = oDoc.getStyleFamilies.getByIndex(0) + oObj.insertByName(cObjectName, oDoc.createInstance("com.sun.star.style.CharacterStyle")) + cNameToReplace = cObjectName + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTableCellText/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTableCellText/script.xlb new file mode 100644 index 000000000000..f869097aaf87 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTableCellText/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="sw_SwXTableCellText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTableCellText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTableCellText/sw_SwXTableCellText.xba b/qadevOOo/tests/basic/mod/sw/SwXTableCellText/sw_SwXTableCellText.xba new file mode 100644 index 000000000000..0410af6be6c9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTableCellText/sw_SwXTableCellText.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="sw_SwXTableCellText" 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: + +' Requiered for com.sun.star.text.XText + Global oCollection As Object + Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTableCellText +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim oTable As Object + Dim oCell As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(3, 5) + oDoc.Text.insertTextContent(oCursor, oTable, false) + + oCell = oTable.getCellByPosition(1, 1) + + oObj = oCell.Text + + oInstance = oDoc.createInstance("com.sun.star.text.TextField.DateTime") + oCollection = oDoc.TextFields +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTableColumns/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTableColumns/script.xlb new file mode 100644 index 000000000000..aa249610df79 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTableColumns/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="sw_SwXTableColumns" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTableColumns"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTableColumns/sw_SwXTableColumns.xba b/qadevOOo/tests/basic/mod/sw/SwXTableColumns/sw_SwXTableColumns.xba new file mode 100644 index 000000000000..d5d505a44130 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTableColumns/sw_SwXTableColumns.xba @@ -0,0 +1,84 @@ +<?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="sw_SwXTableColumns" 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: + +' Requiered for XTableColumns + Global oTable As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTableColumns +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim nRows As Long, nCols As Long + + bOK = true + + nRows = 5 + nCols = 5 + + oDoc = utils.createDocument("swriter", cObjectName) + + Out.Log("Create a table") + oCursor = oDoc.Text.createTextCursor() + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(nRows, nCols) + + oCursor.gotoEnd(false) + oDoc.Text.insertTextContent(oCursor, oTable, false) + oCursor.gotoEnd(false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oDoc.Text.insertString(oCursor, oTable.Columns.DBG_SupportedInterfaces, false) + oCursor.gotoEnd(false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oDoc.Text.insertString(oCursor, oTable.Columns.DBG_Methods, false) + oCursor.gotoEnd(false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oDoc.Text.insertString(oCursor, oTable.Columns.DBG_Properties, false) + + oObj = oTable.Columns + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTableRows/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTableRows/script.xlb new file mode 100644 index 000000000000..e53c2e4756a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTableRows/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="sw_SwXTableRows" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTableRows"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTableRows/sw_SwXTableRows.xba b/qadevOOo/tests/basic/mod/sw/SwXTableRows/sw_SwXTableRows.xba new file mode 100644 index 000000000000..8028ea126953 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTableRows/sw_SwXTableRows.xba @@ -0,0 +1,87 @@ +<?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="sw_SwXTableRows" 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: + +' Requiered for XTableRows + Global oTable As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTableRows +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + Dim nRows As Long, nCols As Long + + bOK = true + nRows = 5 + nCols = 5 + + oDoc = utils.createDocument("swriter", cObjectName) + + ' create a table first + oCursor = oDoc.Text.createTextCursor() + + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(nRows, nCols) + oCursor.gotoEnd(false) + + oDoc.Text.insertTextContent(oCursor, oTable, false) + oCursor.gotoEnd(false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + + oDoc.Text.insertString(oCursor, oTable.Rows.DBG_SupportedInterfaces, false) + oCursor.gotoEnd(false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oDoc.Text.insertString(oCursor, oTable.Rows.DBG_Methods, false) + oCursor.gotoEnd(false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oDoc.Text.insertString(oCursor, oTable.Rows.DBG_Properties, false) + + ' create test object + oObj = oTable.Rows + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextColumns/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextColumns/script.xlb new file mode 100644 index 000000000000..37058dec0fe6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextColumns/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="sw_SwXTextColumns" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextColumns"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextColumns/sw_SwXTextColumns.xba b/qadevOOo/tests/basic/mod/sw/SwXTextColumns/sw_SwXTextColumns.xba new file mode 100644 index 000000000000..999f5fa52850 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextColumns/sw_SwXTextColumns.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="sw_SwXTextColumns" 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.text.XTextColumns +Global oPageStyle As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextColumns +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + oPageStyle = oDoc.StyleFamilies.getByName("PageStyles").getByName("Standard") + oObj = oPageStyle.TextColumns + + oDoc.Text.insertString(oCursor, oObj.DBG_SupportedInterfaces, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oDoc.Text.insertString(oCursor, oObj.DBG_Properties, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + oDoc.Text.insertString(oCursor, oObj.DBG_Methods, false) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextCursor/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextCursor/script.xlb new file mode 100644 index 000000000000..aecd1d225eed --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextCursor/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="sw_SwXTextCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextCursor/sw_SwXTextCursor.xba b/qadevOOo/tests/basic/mod/sw/SwXTextCursor/sw_SwXTextCursor.xba new file mode 100644 index 000000000000..e5a8014ef5ea --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextCursor/sw_SwXTextCursor.xba @@ -0,0 +1,67 @@ +<?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="sw_SwXTextCursor" 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: + +' Requiered for com.sun.star.text.XParagraphCursor + Global oText As Object +' Requiered for com.sun.star.text.XTextCursor + Global oCursor As Object 'One more cursor + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextCursor +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oText = oDoc.Text + oObj = oText.createTextCursor() + oCursor = oText.createTextCursor() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextDefaults/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextDefaults/script.xlb new file mode 100644 index 000000000000..c4021b17323a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextDefaults/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="sw_SwXTextDefaults" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextDefaults"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextDefaults/sw_SwXTextDefaults.xba b/qadevOOo/tests/basic/mod/sw/SwXTextDefaults/sw_SwXTextDefaults.xba new file mode 100644 index 000000000000..ded6377d7e27 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextDefaults/sw_SwXTextDefaults.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="sw_SwXTextDefaults" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextDefaults +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + + ' create a textcursor + oCursor = oDoc.Text.createTextCursor() + + ' write some strings to document + for i = 1 to 10 + oCursor.gotoEnd(false) + + cTemp = Trim(Str((i)) & cText + oDoc.Text.insertString(oCursor, cTemp, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oCursor.gotoStart(false) + oCursor.gotoNextWord(false) + + oObj = oDoc.createInstance("com.sun.star.text.Defaults") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextDocument/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextDocument/script.xlb new file mode 100644 index 000000000000..e2a798dfd3d6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextDocument/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="sw_SwXTextDocument" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextDocument"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextDocument/sw_SwXTextDocument.xba b/qadevOOo/tests/basic/mod/sw/SwXTextDocument/sw_SwXTextDocument.xba new file mode 100644 index 000000000000..2a903e5bdfd2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextDocument/sw_SwXTextDocument.xba @@ -0,0 +1,98 @@ +<?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="sw_SwXTextDocument" 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.util.XSearchable: +' Required for com.sun.star.util.XReplaceable: +Global cStringToSearch As String ' should appears more than once +Global nSearchedEntriesAmount As Integer + +' Required for com.sun.star.lang.XComponent: +Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.frame.XModel: +Global oXModelController As Object +Global oXModelSel As Object +Global oXModelToSel As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextDocument +'************************************************************************* +On Error Goto ErrHndl + Dim oControllerDoc As Object + Dim oFrame As Object + Dim oCursor As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oControllerDoc = utils.createDocument("swriter", cObjectName + "1") + oComponentInstance = utils.createDocument("swriter", cObjectName + "2") + + oObj = oDoc + + oObj.Text.String = "This string comes from SwXTextDocument, and contains three 'co' entries. This 'Co' shouldn't be found!" + cStringToSearch = "co" + nSearchedEntriesAmount = 3 + + oFrame = oDoc.createInstance("com.sun.star.text.TextFrame") + oCursor = oDoc.Text.createTextCursor() + oDoc.Text.InsertTextContent(oCursor, oFrame, false) + + oXModelToSel = oFrame + oXModelController = oControllerDoc.getCurrentController() + oXModelSel = oDoc.getCurrentController() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub DisposeObj() + if NOT isNULL(oComponentInstance) then oComponentInstance.dispose() + + ' To successfully dispose oControllerDoc re-open it first. + Dim oControllerDoc As Object + oControllerDoc = utils.createDocument("swriter", cObjectName + "1") + oControllerDoc.dispose() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObject/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObject/script.xlb new file mode 100644 index 000000000000..e17f0e1cf940 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObject/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="sw_SwXTextEmbeddedObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextEmbeddedObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObject/sw_SwXTextEmbeddedObject.xba b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObject/sw_SwXTextEmbeddedObject.xba new file mode 100644 index 000000000000..d51f3cb3b8e8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObject/sw_SwXTextEmbeddedObject.xba @@ -0,0 +1,68 @@ +<?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="sw_SwXTextEmbeddedObject" 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.lang.XComponent: +Global oComponentInstance As Object ' it will be disposed + +Global bXTextContentImpossible As Boolean + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextEmbeddedObject +'************************************************************************* +On Error Goto ErrHndl + Dim oEmbededObjs As Variant + + oDoc = utils.loadTestDocument("SwXTextEmbeddedObject.sxw") + oEmbededObjs = oDoc.getEmbeddedObjects + oObj = oEmbededObjs(0) + oComponentInstance = oEmbededObjs(1) + + bXTextContentImpossible = True + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObjects/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObjects/script.xlb new file mode 100644 index 000000000000..39b944518e4b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObjects/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="sw_SwXTextEmbeddedObjects" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextEmbeddedObjects"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObjects/sw_SwXTextEmbeddedObjects.xba b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObjects/sw_SwXTextEmbeddedObjects.xba new file mode 100644 index 000000000000..ca4a60b7105b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextEmbeddedObjects/sw_SwXTextEmbeddedObjects.xba @@ -0,0 +1,54 @@ +<?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="sw_SwXTextEmbeddedObjects" 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: +' sw.SwXTextEmbeddedObjects +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("SwXTextEmbeddedObject.sdw") + oObj = oDoc.getEmbeddedObjects +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextField/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextField/script.xlb new file mode 100644 index 000000000000..b6e2a90b9e1f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextField/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="sw_SwXTextField" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextField"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextField/sw_SwXTextField.xba b/qadevOOo/tests/basic/mod/sw/SwXTextField/sw_SwXTextField.xba new file mode 100644 index 000000000000..bd6348d41c64 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextField/sw_SwXTextField.xba @@ -0,0 +1,93 @@ +<?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="sw_SwXTextField" 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: + +'Required for com.sun.star.lang.XComponent +Global oComponentInstance As Object + +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextField +'************************************************************************* +On Error Goto ErrHndl + Dim oFieldMaster As Object + Dim oFieldMaster2 As Object + Dim oFieldMaster3 As Object + Dim oCursor As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + oFieldMaster = oDoc.createInstance("com.sun.star.text.FieldMaster.Database") + oFieldMaster2 = oDoc.createInstance("com.sun.star.text.FieldMaster.Database") + oFieldMaster3 = oDoc.createInstance("com.sun.star.text.FieldMaster.Database") + oObj = oDoc.createInstance("com.sun.star.text.TextField.Database") + oComponentInstance = oDoc.createInstance("com.sun.star.text.TextField.Database") + + oFieldMaster.setPropertyValue("DataBaseName","Address Book File") + oFieldMaster.setPropertyValue("DataTableName","address") + oFieldMaster.setPropertyValue("DataColumnName","FIRSTNAME") + + oFieldMaster2.setPropertyValue("DataBaseName","Address Book File") + oFieldMaster2.setPropertyValue("DataTableName","address") + oFieldMaster2.setPropertyValue("DataColumnName","FIRSTNAME") + + oFieldMaster3.setPropertyValue("DataBaseName","Address Book File") + oFieldMaster3.setPropertyValue("DataTableName","address") + oFieldMaster3.setPropertyValue("DataColumnName","FIRSTNAME") + + oCursor = oDoc.Text.createTextCursor() + + oObj.attachTextFieldMaster(oFieldMaster) + oDoc.Text.insertTextContent(oCursor, oObj, false) + oComponentInstance.attachTextFieldMaster(oFieldMaster2) + oDoc.Text.insertTextContent(oCursor, oComponentInstance, false) + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextField.Database") + oXTextContent.attachTextFieldMaster(oFieldMaster3) + oXTextContentRange = oDoc.Text.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFieldMasters/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextFieldMasters/script.xlb new file mode 100644 index 000000000000..798b78fec579 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFieldMasters/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="sw_SwXTextFieldMasters" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextFieldMasters"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFieldMasters/sw_SwXTextFieldMasters.xba b/qadevOOo/tests/basic/mod/sw/SwXTextFieldMasters/sw_SwXTextFieldMasters.xba new file mode 100644 index 000000000000..bafab9031175 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFieldMasters/sw_SwXTextFieldMasters.xba @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXTextFieldMasters" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextFieldMasters +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + oDoc = utils.createDocument("swriter", cObjectName) + + + oFieldMaster = oDoc.createInstance("com.sun.star.text.FieldMaster.Database") + oDBF = oDoc.createInstance("com.sun.star.text.TextField.Database") + + oFieldMaster.setPropertyValue("DataBaseName","Address Book File") + oFieldMaster.setPropertyValue("DataTableName","address") + oFieldMaster.setPropertyValue("DataColumnName","FIRSTNAME") + + oCursor = oDoc.Text.createTextCursor() + + oDBF.attachTextFieldMaster(oFieldMaster) + oDoc.Text.insertTextContent(oCursor, oDBF, false) + + + oObj = oDoc.getTextFieldMasters() + nGlobalLong = uBound(oObj.getElementNames) + 1 + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFieldTypes/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextFieldTypes/script.xlb new file mode 100644 index 000000000000..a8419edf98ab --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFieldTypes/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="sw_SwXTextFieldTypes" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextFieldTypes"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFieldTypes/sw_SwXTextFieldTypes.xba b/qadevOOo/tests/basic/mod/sw/SwXTextFieldTypes/sw_SwXTextFieldTypes.xba new file mode 100644 index 000000000000..6c00c183e93d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFieldTypes/sw_SwXTextFieldTypes.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXTextFieldTypes" 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: +' sw.SwXTextFieldTypes +'************************************************************************* +On Error Goto ErrHndl + Dim oFieldMaster As Object + Dim oDBF As Object + Dim oCursor As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + oFieldMaster = oDoc.createInstance("com.sun.star.text.FieldMaster.Database") + oDBF = oDoc.createInstance("com.sun.star.text.TextField.Database") + + oFieldMaster.setPropertyValue("DataBaseName","Address Book File") + oFieldMaster.setPropertyValue("DataTableName","address") + oFieldMaster.setPropertyValue("DataColumnName","FIRSTNAME") + + oCursor = oDoc.Text.createTextCursor() + + oDBF.attachTextFieldMaster(oFieldMaster) + oDoc.Text.insertTextContent(oCursor, oDBF, false) + + oObj = oDoc.getTextFields() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFrame/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextFrame/script.xlb new file mode 100644 index 000000000000..f538f6e0b64e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFrame/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="sw_SwXTextFrame" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextFrame"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFrame/sw_SwXTextFrame.xba b/qadevOOo/tests/basic/mod/sw/SwXTextFrame/sw_SwXTextFrame.xba new file mode 100644 index 000000000000..cac50858b95f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFrame/sw_SwXTextFrame.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="sw_SwXTextFrame" 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 nGlobalLong As Long +Global oCollection As Object +Global oComponentInstance As Object + +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextFrame +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim nHeight As Integer + Dim nWidth As Integer + Dim i As Integer + Dim oCursor As Object + Dim sSize As Object + Dim aFrame As Object + Dim oBookmark As Object + + bOK = true + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + nHeight = 10000 + nWidth = 10000 + nGlobalLong = 2 + + for i = 1 to nGlobalLong + ' create some frames on doc + oObj = oDoc.createInstance("com.sun.star.text.TextFrame") + sSize = createUNOStruct("com.sun.star.awt.Size") + sSize.Height = nHeight + sSize.Width = nWidth + oObj.Size = sSize + oObj.SizeType = 1 + oObj.Name = cObjectName + i + oObj.HoriOrient = i + oObj.VertOrient = 1 + + ' AnchorTypes: 0 = paragraph, 1 = as char, 2 = page, 3 = frame/paragraph 4= at char + oObj.AnchorType = 2 + oDoc.Text.insertTextContent(oCursor, oObj, false) + If i = 1 Then + oComponentInstance = oObj + End If + next i + + ' the tested frame must be inside another frame to check the property AnchorType + ' (the value AT_FRAME can be set only in this case) + aFrame = oDoc.createInstance("com.sun.star.text.TextFrame") + oCursor = oObj.Text.createTextCursor() + oObj.Text.insertTextContent(oCursor, aFrame, false) + oObj = aFrame + + oCollection = oDoc.TextFrames + + oObj.String = "-Text" + + oCursor = oObj.createTextCursor() + oObj.insertString(oCursor, "SwXTextFrame", false) + + oBookmark = oDoc.createInstance("com.sun.star.text.Bookmark") + oCursor.gotoEnd(false) + oObj.insertTextContent(oCursor, oBookmark, false) + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextFrame") + oXTextContentRange = oDoc.Text.createTextCursor() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFrameText/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextFrameText/script.xlb new file mode 100644 index 000000000000..17160aa39ffc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFrameText/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="sw_SwXTextFrameText" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextFrameText"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextFrameText/sw_SwXTextFrameText.xba b/qadevOOo/tests/basic/mod/sw/SwXTextFrameText/sw_SwXTextFrameText.xba new file mode 100644 index 000000000000..85b80a35bb0b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextFrameText/sw_SwXTextFrameText.xba @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_SwXTextFrameText" 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 oCollection As Object +Global oInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextFrameText +'************************************************************************* +On Error Goto ErrHndl + Dim nHeight As Integer + Dim nWidth As Integer + Dim oCursor As Object + Dim sSize As Object + + nHeight = 4000 + nWidth = 15000 + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + oObj = oDoc.createInstance("com.sun.star.text.TextFrame") + sSize = createUNOStruct("com.sun.star.awt.Size") + sSize.Height = nHeight + sSize.Width = nWidth + oObj.Size = sSize + oObj.SizeType = 1 + oObj.Name = cObjectName + oObj.HoriOrient = 1 + oObj.VertOrient = 1 + + ' AnchorTypes: 0 = paragraph, 1 = as char, 2 = page, 3 = frame/paragraph 4= at char + oObj.AnchorType = 2 + oDoc.Text.insertTextContent(oCursor, oObj, false) + + oInstance = oDoc.createInstance("com.sun.star.text.Bookmark") + oCollection = oDoc.Bookmarks +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObject/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObject/script.xlb new file mode 100644 index 000000000000..d58584f7f521 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObject/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="sw_SwXTextGraphicObject" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextGraphicObject"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObject/sw_SwXTextGraphicObject.xba b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObject/sw_SwXTextGraphicObject.xba new file mode 100644 index 000000000000..80bc7514fa63 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObject/sw_SwXTextGraphicObject.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="sw_SwXTextGraphicObject" 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.lang.XComponent +Global oComponentInstance As Object + +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextGraphicObject +'************************************************************************* +On Error Goto ErrHndl + Dim oGrphObj As Object + Dim aFrame As Object + Dim sSize As new com.sun.star.awt.Size + + oDoc = utils.createDocument("swriter", cObjectName) + + oGrphObj = oDoc.createInstance("com.sun.star.text.GraphicObject") + aFrame = oDoc.createInstance("com.sun.star.text.TextFrame") + sSize.Height = 8000 + sSize.Width = 8000 + aFrame.Size = sSize + + oDoc.Text.insertTextContent(oDoc.Text.createTextCursor, aFrame, false) + aFrame.Text.insertTextContent(aFrame.Text.createTextCursor, oGrphObj, false) + + oGrphObj.setPropertyValue("GraphicURL", Path2URL(cTestDocsDir + "space-metal.jpg")) + oGrphObj.setPropertyValue("HoriOrientPosition", 5500) + oGrphObj.setPropertyValue("VertOrientPosition", 4200) + oGrphObj.setPropertyValue("Width", 4400) + oGrphObj.setPropertyValue("Height", 4000) + + oComponentInstance = oDoc.createInstance("com.sun.star.text.GraphicObject") + oDoc.Text.insertTextContent(oDoc.Text.createTextCursor, oComponentInstance, false) + + oObj = oGrphObj + + oXTextContent = oDoc.createInstance("com.sun.star.text.GraphicObject") + oXTextContentRange = oDoc.Text.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObjects/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObjects/script.xlb new file mode 100644 index 000000000000..39f788929114 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObjects/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="sw_SwXTextGraphicObjects" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextGraphicObjects"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObjects/sw_SwXTextGraphicObjects.xba b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObjects/sw_SwXTextGraphicObjects.xba new file mode 100644 index 000000000000..11ace85e0b12 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextGraphicObjects/sw_SwXTextGraphicObjects.xba @@ -0,0 +1,64 @@ +<?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="sw_SwXTextGraphicObjects" 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: +' sw.SwXTextGraphicObjects +'************************************************************************* +On Error Goto ErrHndl + Dim oGrphObj As Object + oDoc = utils.createDocument("swriter", cObjectName) + + oGrphObj = oDoc.createInstance("com.sun.star.text.GraphicObject") + oDoc.Text.insertTextContent(oDoc.Text.createTextCursor, oGrphObj, false) + oGrphObj.setPropertyValue("GraphicURL", Path2URL(cTestDocsDir & "space-metal.jpg")) + oGrphObj.setPropertyValue("HoriOrientPosition", 5500) + oGrphObj.setPropertyValue("VertOrientPosition", 4200) + oGrphObj.setPropertyValue("Width", 4400) + oGrphObj.setPropertyValue("Height", 4000) + + oObj = oDoc.getGraphicObjects() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextPortion/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextPortion/script.xlb new file mode 100644 index 000000000000..793298c77d64 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextPortion/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="sw_SwXTextPortion" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextPortion"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextPortion/sw_SwXTextPortion.xba b/qadevOOo/tests/basic/mod/sw/SwXTextPortion/sw_SwXTextPortion.xba new file mode 100644 index 000000000000..fc9afdc91ed7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextPortion/sw_SwXTextPortion.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="sw_SwXTextPortion" 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: +' sw.SwXTextPortion +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim oEnum As Object + Dim oPortionEnum As Object + Dim i As Integer + Dim j As Integer + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + ' write some strings to document + for j = 1 to 3 + for i = 1 to 3 + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor, "Paragraph " & j & "; Line " & i, false) + oDoc.Text.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.LINE_BREAK, false) + next i + oDoc.Text.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false) + next j + + oEnum = oDoc.Text.createEnumeration() + oPortionEnum = oEnum.nextElement().createEnumeration() + oObj = oPortionEnum.nextElement() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextPortionEnumeration/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextPortionEnumeration/script.xlb new file mode 100644 index 000000000000..591c408f617a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextPortionEnumeration/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="sw_SwXTextPortionEnumeration" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextPortionEnumeration"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextPortionEnumeration/sw_SwXTextPortionEnumeration.xba b/qadevOOo/tests/basic/mod/sw/SwXTextPortionEnumeration/sw_SwXTextPortionEnumeration.xba new file mode 100644 index 000000000000..b13b741d6c80 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextPortionEnumeration/sw_SwXTextPortionEnumeration.xba @@ -0,0 +1,67 @@ +<?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="sw_SwXTextPortionEnumeration" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextPortionEnumeration +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oText = oDoc.Text + oCursor = oText.createTextCursor() + for i = 1 to 10 + oText.insertString(oCursor, "Paragraph: " + i, false) + oText.insertControlCharacter(oCursor, LINE_BREAK, false) + oText.insertString(oCursor, "Line of paragraph: " + i, false) + oText.insertControlCharacter(oCursor, PARAGRAPH_BREAK, false) + next i + + oObj = oText.createEnumeration().nextElement().createEnumeration() + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextRange/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextRange/script.xlb new file mode 100644 index 000000000000..923ed071a980 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextRange/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="sw_SwXTextRange" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextRange"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextRange/sw_SwXTextRange.xba b/qadevOOo/tests/basic/mod/sw/SwXTextRange/sw_SwXTextRange.xba new file mode 100644 index 000000000000..35eda7bcd453 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextRange/sw_SwXTextRange.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="sw_SwXTextRange" 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: +' sw.SwXTextRange +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + oObj = oCursor.Start +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextRanges/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextRanges/script.xlb new file mode 100644 index 000000000000..5e9403560fd0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextRanges/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="sw_SwXTextRanges" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextRanges"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextRanges/sw_SwXTextRanges.xba b/qadevOOo/tests/basic/mod/sw/SwXTextRanges/sw_SwXTextRanges.xba new file mode 100644 index 000000000000..44b6b334240b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextRanges/sw_SwXTextRanges.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="sw_SwXTextRanges" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextRanges +'************************************************************************* +On Error Goto ErrHndl + Dim cText As String + Dim oCursor As Object + Dim i As Integer + Dim oSearch As Object + Dim oResult As Object + + oDoc = utils.createDocument("swriter", cObjectName) + cText = ". Zeile : Test aus " + cObjectName + oCursor = oDoc.Text.createTextCursor() + + nGlobalLong = 10 + + ' write some strings to document + for i = 1 to nGlobalLong + oCursor.gotoEnd(false) + oDoc.Text.insertString(oCursor, Trim(Str(i)) & cText, false) + oDoc.Text.insertControlCharacter(oCursor, 0, false) + next i + + oSearch = oDoc.createSearchDescriptor() + oSearch.searchString = cObjectName + oResult = oDoc.findAll(oSearch) + + oObj = oResult +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextSearch/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextSearch/script.xlb new file mode 100644 index 000000000000..894b946c4865 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextSearch/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="sw_SwXTextSearch" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextSearch"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextSearch/sw_SwXTextSearch.xba b/qadevOOo/tests/basic/mod/sw/SwXTextSearch/sw_SwXTextSearch.xba new file mode 100644 index 000000000000..0dd2e80519b1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextSearch/sw_SwXTextSearch.xba @@ -0,0 +1,58 @@ +<?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="sw_SwXTextSearch" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextSearch +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + oObj = oDoc.createSearchDescriptor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextSection/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextSection/script.xlb new file mode 100644 index 000000000000..6c89c97005a1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextSection/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="sw_SwXTextSection" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextSection"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextSection/sw_SwXTextSection.xba b/qadevOOo/tests/basic/mod/sw/SwXTextSection/sw_SwXTextSection.xba new file mode 100644 index 000000000000..1fc5c970e042 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextSection/sw_SwXTextSection.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="sw_SwXTextSection" 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: + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextSection +'************************************************************************* +On Error Goto ErrHndl + Dim bOK As Boolean + Dim oInstance As Object, oCursor As Object, oSectionText As Object + + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + oInstance = oDoc.createInstance("com.sun.star.text.TextSection") + oInstance.Name = cObjectName + "1" + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oComponentInstance = oInstance + + oInstance = oDoc.createInstance("com.sun.star.text.TextSection") + oInstance.Name = cObjectName + "2" + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oCursor = oDoc.Text.createTextCursorByRange(oInstance.Anchor) + oDoc.Text.insertString(oCursor, "TextSection 2", false) + oCursor.gotoPreviousWord(false) + + oInstance = oDoc.createInstance("com.sun.star.text.TextSection") + oInstance.Name = cObjectName + "3" + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oCursor = oDoc.Text.createTextCursorByRange(oInstance.Anchor) + oDoc.Text.insertString(oCursor, "TextSection 3", false) + oCursor.gotoPreviousWord(false) + + oObj = oInstance + + oInstance = oDoc.createInstance("com.sun.star.text.TextSection") + oInstance.Name = cObjectName + "4" + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oCursor = oDoc.Text.createTextCursorByRange(oInstance.Anchor) + oDoc.Text.insertString(oCursor, "TextSection 4", false) + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextSection") + oXTextContentRange = oDoc.Text.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextSections/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextSections/script.xlb new file mode 100644 index 000000000000..4dcd74399532 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextSections/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="sw_SwXTextSections" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextSections"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextSections/sw_SwXTextSections.xba b/qadevOOo/tests/basic/mod/sw/SwXTextSections/sw_SwXTextSections.xba new file mode 100644 index 000000000000..f02653aba248 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextSections/sw_SwXTextSections.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="sw_SwXTextSections" 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 nGlobalLong As Long + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextSections +'************************************************************************* +On Error Goto ErrHndl + + + Dim bOK As Boolean + bOK = true + ' --- create a document if needed + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + nGlobalLong = 4 + + for i = 1 to nGlobalLong + oInstance = oDoc.createInstance("com.sun.star.text.TextSection") + + oInstance.Name = cObjectName & i + ' insert Textsection + oDoc.Text.insertTextContent(oCursor, oInstance, false) + next i + + oObj = oDoc.TextSections + + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTable/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextTable/script.xlb new file mode 100644 index 000000000000..1418e6c0577a --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTable/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="sw_SwXTextTable" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextTable"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTable/sw_SwXTextTable.xba b/qadevOOo/tests/basic/mod/sw/SwXTextTable/sw_SwXTextTable.xba new file mode 100644 index 000000000000..71310fadb216 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTable/sw_SwXTextTable.xba @@ -0,0 +1,148 @@ +<?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="sw_SwXTextTable" 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: + +' Requiered for com.sun.star.lang.XComponent + Global oComponentInstance As Object ' it will be disposed + +' Requiered for com.sun.star.chart.XChartData + Global oCellToChange As Object + +' Requiered for com.sun.star.container.XNamed + Global cNameToSet As String ' "fixed" if name is fixed + +' Requiered for com.sun.star.chart.XChartDataArray +' Requiered for com.sun.star.text.XTextTable + Global nTableW As Integer + Global nTableH As Integer + +'Required for sheet.XCellRangeData +Global newData As Variant + +Global oXTextContent as Object +Global oXTextContentRange as Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextTable +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim i As Integer + Dim oInstance As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + nTableH = 5 + nTableW = 7 + + for i = 1 to 2 + oInstance = oDoc.createInstance("com.sun.star.text.TextTable") + oInstance.initialize(nTableH, nTableW) + oInstance.Name = "Table" + i + ' insert created Table + oDoc.Text.insertTextContent(oCursor, oInstance, false) + if (i = 1) then oComponentInstance = oInstance + next i + + oObj = oInstance + oCellToChange = oObj.getCellByPosition(3, 4) + cNameToSet = "NewTableName" + + 'Required for XCellRangeData + newData() = Array(_ + Array(2.5, 5.0, 2.5, 5.0, 3.0, 2.0, 1.0),_ + Array(4.0, 9.0, 2.5, 5.0, 4.0, 1.0, 2.0),_ + Array(2.5, 5.0, 2.5, 5.0, 3.0, 2.0, 1.0),_ + Array(2.5, 5.0, 2.5, 5.0, 7.0, 7.0, 8.0),_ + Array(4.0, 9.0, 2.5, 5.0, 4.0, 3.0, 2.0)) + + oXTextContent = oDoc.createInstance("com.sun.star.text.TextTable") + oXTextContentRange = oDoc.Text.createTextCursor() + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function modifyDescriptor(descr As Variant) As Variant +On Error Goto ErrHndl + Dim i As Integer, oCell As Object + + for i = 0 to nTableW - 1 + oCell = oObj.getCellByPosition(i, 0) + oCell.String = "" + (nTableW - i) + next i + + for i = 0 to ubound(descr) + if descr(i).Name = "SortAscending" then descr(i).Value = true + if descr(i).Name = "SortColumns" then descr(i).Value = true + next i + + modifyDescriptor() = descr +Exit Function +ErrHndl: + Out.Log("Exception in SwXTextTable.modifyDescriptor() :") + Test.Exception() +end Function + +Function checkSort() As Boolean +On Error Goto ErrHndl + Dim i As Integer, oCell As Object + Dim bOK As Boolean + + bOK = true + for i = 0 to nTableW - 1 + oCell = oObj.getCellByPosition(i, 0) + bOK = bOK AND oCell.String = "" + (i + 1) + next i + + checkSort() = bOK +Exit Function +ErrHndl: + Out.Log("Exception in SwXTextTable.checkSort() :") + Test.Exception() +end Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTableCursor/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextTableCursor/script.xlb new file mode 100644 index 000000000000..dc9e3530f926 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTableCursor/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="sw_SwXTextTableCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextTableCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTableCursor/sw_SwXTextTableCursor.xba b/qadevOOo/tests/basic/mod/sw/SwXTextTableCursor/sw_SwXTextTableCursor.xba new file mode 100644 index 000000000000..eaf73876b835 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTableCursor/sw_SwXTextTableCursor.xba @@ -0,0 +1,64 @@ +<?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="sw_SwXTextTableCursor" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextTableCursor +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + oTable = oDoc.createInstance("com.sun.star.text.TextTable") + oTable.initialize(5, 5) + oDoc.Text.insertTextContent(oCursor, oTable, false) + + oObj = oTable.createCursorByCellName("A1") + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTableRow/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextTableRow/script.xlb new file mode 100644 index 000000000000..01011c67f255 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTableRow/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="sw_SwXTextTableRow" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextTableRow"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTableRow/sw_SwXTextTableRow.xba b/qadevOOo/tests/basic/mod/sw/SwXTextTableRow/sw_SwXTextTableRow.xba new file mode 100644 index 000000000000..e11495a7495f --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTableRow/sw_SwXTextTableRow.xba @@ -0,0 +1,64 @@ +<?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="sw_SwXTextTableRow" 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: +' sw.SwXTextTableRow +'************************************************************************* +On Error Goto ErrHndl + Dim oCursor As Object + Dim oInstance As Object + + oDoc = utils.createDocument("swriter", cObjectName) + oCursor = oDoc.Text.createTextCursor() + + oInstance = oDoc.createInstance("com.sun.star.text.TextTable") + oInstance.initialize(5, 5) + oInstance.Name = "SwXTextTableRow" + + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oObj = oInstance.Rows.getByIndex(0) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTables/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextTables/script.xlb new file mode 100644 index 000000000000..1b9a3b2459a4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTables/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="sw_SwXTextTables" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextTables"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextTables/sw_SwXTextTables.xba b/qadevOOo/tests/basic/mod/sw/SwXTextTables/sw_SwXTextTables.xba new file mode 100644 index 000000000000..991fdc5b43e4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextTables/sw_SwXTextTables.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="sw_SwXTextTables" 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: +' sw.SwXTextTables +'************************************************************************* +On Error Goto ErrHndl + Dim nRows As Long + Dim nCols As Long + Dim oCursor As Object + Dim i As Integer + Dim oInstance As Object + + oDoc = utils.createDocument("swriter", cObjectName) + + nRows = 5 + nCols = 5 + + oCursor = oDoc.Text.createTextCursor() + + for i = 1 to 3 + oInstance = oDoc.createInstance("com.sun.star.text.TextTable") + + oInstance.initialize(nRows, nCols) + nRows = nRows + 1 + nCols = nCols + 1 + + oDoc.Text.insertTextContent(oCursor, oInstance, false) + oInstance.Name = "SwXTextTables" & i + next i + + oObj = oDoc.TextTables +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextView/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextView/script.xlb new file mode 100644 index 000000000000..0ced71e88a70 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextView/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="sw_SwXTextView" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextView"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextView/sw_SwXTextView.xba b/qadevOOo/tests/basic/mod/sw/SwXTextView/sw_SwXTextView.xba new file mode 100644 index 000000000000..d87ff9a535e0 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextView/sw_SwXTextView.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="sw_SwXTextView" 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: + +' Requiered for XControlAccess + Global oControlModel As Object + +' Requiered for com.sun.star.view.XSelectionSupplier + Global SelectableObj1 As Object + Global SelectableObj2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextView +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oCursor = oDoc.Text.createTextCursor() + + oCursor.gotoStart(false) + + oObj = oDoc.CurrentController + + oDoc.Text.String = "This is a string for " & cObjectName + + SelectableObj1 = oDoc.Text.CreateTextCursor() + SelectableObj1.goRight(5, true) + + SelectableObj2 = oDoc.Text.CreateTextCursor() + SelectableObj2.goRight(8, false) + SelectableObj2.goRight(10, true) + + + addControl(oCursor, 2000, 4000, cObjectName) + oControlModel = oDoc.Drawpage.Forms(0).getByName(cObjectName) + + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Sub addControl( oCursor as Object, nPointX as Integer, nPointY as Integer, sName as String ) + + Dim oDrawPage As Object + Dim oForm, oForms As Object + Dim oControl, oControlShape As Object + Dim aSz As Variant + Dim oText As Object + + oDrawPage = oDoc.DrawPage + oControlShape = oDoc.createInstance( "com.sun.star.drawing.ControlShape" ) + oControl = oDoc.createInstance( "com.sun.star.form.component.CommandButton" ) + oForm = oDoc.createInstance( "com.sun.star.form.component.Form" ) + oforms = oDrawPage.Forms + + if oForms.count = 0 then + oForms.InsertByIndex( 0, oForm ) + end if + + aSz = oControlShape.Size + aSz.Width = 2900 + aSz.Height = 1200 + oControlShape.Size = aSz + oControlShape.Control = oControl + + oControlShape.TextRange = oCursor.Start + apoint = ocontrolshape.position + apoint.x = nPointX + aPoint.y = nPointY + ocontrolshape.position = aPoint + oDrawPage.add( oControlShape ) + if sName <> "" then + oControl.Name = sName + end if + +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextViewCursor/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXTextViewCursor/script.xlb new file mode 100644 index 000000000000..a4c056732da2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextViewCursor/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="sw_SwXTextViewCursor" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXTextViewCursor"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXTextViewCursor/sw_SwXTextViewCursor.xba b/qadevOOo/tests/basic/mod/sw/SwXTextViewCursor/sw_SwXTextViewCursor.xba new file mode 100644 index 000000000000..31e1ead40574 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXTextViewCursor/sw_SwXTextViewCursor.xba @@ -0,0 +1,67 @@ +<?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="sw_SwXTextViewCursor" 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: + +' Requiered for com.sun.star.text.XParagraphCursor +Global oText As Object + +' Requiered for com.sun.star.text.XTextCursor +Global oCursor As Object 'One more cursor + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXTextViewCursor +'************************************************************************* +On Error Goto ErrHndl + Dim oController As Object + + oDoc = utils.loadTestDocument("XPageCursor.sdw") + oController = oDoc.getCurrentController() + oObj = oController.getViewCursor() + oCursor = oController.getViewCursor() + oText = oDoc.Text +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/SwXViewSettings/script.xlb b/qadevOOo/tests/basic/mod/sw/SwXViewSettings/script.xlb new file mode 100644 index 000000000000..9077adcd6e7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXViewSettings/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="sw_SwXViewSettings" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_SwXViewSettings"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/SwXViewSettings/sw_SwXViewSettings.xba b/qadevOOo/tests/basic/mod/sw/SwXViewSettings/sw_SwXViewSettings.xba new file mode 100644 index 000000000000..85837b39e2e9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/SwXViewSettings/sw_SwXViewSettings.xba @@ -0,0 +1,58 @@ +<?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="sw_SwXViewSettings" script:language="StarBasic"> + + +'************************************************************************* +' +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'************************************************************************* +'************************************************************************* + + + + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.SwXViewSettings +'************************************************************************* +On Error Goto ErrHndl + + Dim bOK As Boolean + bOK = true + + oDoc = utils.createDocument("swriter", cObjectName) + + oController = oDoc.getCurrentController + oObj = oController.getViewSettings + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLContentExporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLContentExporter/script.xlb new file mode 100644 index 000000000000..8bd9067903eb --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLContentExporter/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="sw_XMLContentExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLContentExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLContentExporter/sw_XMLContentExporter.xba b/qadevOOo/tests/basic/mod/sw/XMLContentExporter/sw_XMLContentExporter.xba new file mode 100644 index 000000000000..45d95fbb5146 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLContentExporter/sw_XMLContentExporter.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="sw_XMLContentExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + +' Required for com.sun.star.container.XNamed: +Global cNameToSet As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLContentExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3, Tag4 As Variant + Dim expString As String + Dim oText As Object + Dim oCursor As Object + + printXML = true + expString = "XMLContentExporter" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("swriter", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-content") + Tag2 = Array("office:body") + Tag3 = Array("office:script") + Tag4 = Array("text:p") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag1), _ + Array("CharsEnclosed", Tag4, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Writer.XMLContentExporter", initArgs()) + + oText = oDoc.getText() + oCursor = oText.createTextCursor() + oText.insertString(oCursor, expString, false) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "swriter: StarOffice XML (text)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + cNameToSet = "fixed" + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLContentImporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLContentImporter/script.xlb new file mode 100644 index 000000000000..4fa50c70ecf3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLContentImporter/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="sw_XMLContentImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLContentImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLContentImporter/sw_XMLContentImporter.xba b/qadevOOo/tests/basic/mod/sw/XMLContentImporter/sw_XMLContentImporter.xba new file mode 100644 index 000000000000..fe477d7238d4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLContentImporter/sw_XMLContentImporter.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="sw_XMLContentImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sText As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLContentImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = createUnoService("com.sun.star.comp.Writer.XMLContentImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sText = "XMLContentImporter test." + vXMLData = Array( _ + Array("start", "office:document-content", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text"), _ + Array("start", "office:body"), _ + Array("start", "text:p"), _ + Array("chars", sText), _ + Array("end", "text:p"), _ + Array("end", "office:body"), _ + Array("end", "office:document-content")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim content As String + out.log("checking of import...") + content = oDoc.getText().getString() + res = (sText = content) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLExporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLExporter/script.xlb new file mode 100644 index 000000000000..697892881dbe --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLExporter/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="sw_XMLExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLExporter/sw_XMLExporter.xba b/qadevOOo/tests/basic/mod/sw/XMLExporter/sw_XMLExporter.xba new file mode 100644 index 000000000000..9f0c3788f0a7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLExporter/sw_XMLExporter.xba @@ -0,0 +1,121 @@ +<?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="sw_XMLExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7 As Variant + Dim expString As String + Dim oText As Object + Dim oCursor As Object + + printXML = true + expString = "XMLExporter" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("swriter", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document") + Tag2 = Array("office:meta") + Tag3 = Array("office:settings") + Tag4 = Array("office:script") + Tag5 = Array("office:styles") + Tag6 = Array("office:body") + Tag7 = Array("text:p") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag1), _ + Array("TagEnclosed", Tag4, Tag1), _ + Array("TagEnclosed", Tag5, Tag1), _ + Array("TagEnclosed", Tag6, Tag1), _ + Array("CharsEnclosed", Tag7, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Writer.XMLExporter", initArgs()) + + oText = oDoc.getText() + oCursor = oText.createTextCursor() + oText.insertString(oCursor, expString, false) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "swriter: StarOffice XML (text)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLImporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLImporter/script.xlb new file mode 100644 index 000000000000..34a3f4ed435d --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLImporter/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="sw_XMLImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLImporter/sw_XMLImporter.xba b/qadevOOo/tests/basic/mod/sw/XMLImporter/sw_XMLImporter.xba new file mode 100644 index 000000000000..04626fea34b7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLImporter/sw_XMLImporter.xba @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="sw_XMLImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sText As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = createUnoService("com.sun.star.comp.Writer.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sText = "XMLImporter test." + vXMLData = Array( _ + Array("start", "office:document", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "office:class", "CDATA", "text", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text"), _ + Array("start", "office:body"), _ + Array("start", "text:p"), _ + Array("chars", sText), _ + Array("end", "text:p"), _ + Array("end", "office:body"), _ + Array("end", "office:document")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim content As String + out.log("checking of import...") + content = oDoc.getText().getString() + res = (sText = content) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLMetaExporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLMetaExporter/script.xlb new file mode 100644 index 000000000000..f53697434793 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLMetaExporter/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="sw_XMLMetaExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLMetaExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLMetaExporter/sw_XMLMetaExporter.xba b/qadevOOo/tests/basic/mod/sw/XMLMetaExporter/sw_XMLMetaExporter.xba new file mode 100644 index 000000000000..fa9a25de78dc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLMetaExporter/sw_XMLMetaExporter.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="sw_XMLMetaExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLMetaExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3 As Variant + Dim expString As String + Dim oDocInfo As Object + + printXML = true + expString = "NewTitleOfTextDocument" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("swriter", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-meta") + Tag2 = Array("office:meta") + Tag3 = Array("dc:title") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("CharsEnclosed", Tag3, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Writer.XMLMetaExporter", initArgs()) + + oDocInfo = oDoc.getDocumentInfo() + oDocInfo.setPropertyValue("Title", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "swriter: StarOffice XML (text)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLMetaImporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLMetaImporter/script.xlb new file mode 100644 index 000000000000..2059e3faabaa --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLMetaImporter/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="sw_XMLMetaImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLMetaImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLMetaImporter/sw_XMLMetaImporter.xba b/qadevOOo/tests/basic/mod/sw/XMLMetaImporter/sw_XMLMetaImporter.xba new file mode 100644 index 000000000000..784c0d809180 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLMetaImporter/sw_XMLMetaImporter.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="sw_XMLMetaImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sTitle As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLMetaImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = createUnoService("com.sun.star.comp.Writer.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sTitle = "XMLMetaImporter test" + vXMLData = Array( _ + Array("start", "office:document-meta" , _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:dc", "CDATA", "http://purl.org/dc/elements/1.1/"), _ + Array("start", "office:meta"), _ + Array("start", "dc:title"), _ + Array("chars", sTitle), _ + Array("end", "dc:title"), _ + Array("end", "office:meta"), _ + Array("end", "office:document-meta")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oDocInfo As Object + Dim title As String + out.log("checking of import...") + oDocInfo = oDoc.getDocumentInfo() + title = oDocInfo.getPropertyValue("Title") + res = (title = sTitle) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLSettingsExporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLSettingsExporter/script.xlb new file mode 100644 index 000000000000..57e50a9dbc8b --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLSettingsExporter/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="sw_XMLSettingsExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLSettingsExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLSettingsExporter/sw_XMLSettingsExporter.xba b/qadevOOo/tests/basic/mod/sw/XMLSettingsExporter/sw_XMLSettingsExporter.xba new file mode 100644 index 000000000000..0a014967bab1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLSettingsExporter/sw_XMLSettingsExporter.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="sw_XMLSettingsExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLSettingsExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3 As Variant + Dim zoomValue As Long + Dim oController As Object + Dim oViewSettings As Object + + printXML = true + zoomValue = 50 + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("swriter", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-settings") + Tag2 = Array("office:settings") + Tag3 = Array("config:config-item", "config:name", "ZoomFactor") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("CharsEnclosed", Tag3, ""+zoomValue) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Writer.XMLSettingsExporter", initArgs()) + + oController = oDoc.getCurrentController() + oViewSettings = oController.getViewSettings() + oViewSettings.setPropertyValue("ZoomValue", zoomValue) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "swriter: StarOffice XML (text)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLSettingsImporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLSettingsImporter/script.xlb new file mode 100644 index 000000000000..ad0336242426 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLSettingsImporter/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="sw_XMLSettingsImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLSettingsImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLSettingsImporter/sw_XMLSettingsImporter.xba b/qadevOOo/tests/basic/mod/sw/XMLSettingsImporter/sw_XMLSettingsImporter.xba new file mode 100644 index 000000000000..e1400be9e074 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLSettingsImporter/sw_XMLSettingsImporter.xba @@ -0,0 +1,110 @@ +<?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="sw_XMLSettingsImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sZoom As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLSettingsImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = createUnoService("com.sun.star.comp.Writer.XMLSettingsImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sZoom = "50" + vXMLData = Array( _ + Array("start", "office:document-settings", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:config", "CDATA", "http://openoffice.org/2001/config", _ + "xmlns:xlink", "CDATA", "http://www.w3.org/1999/xlink"), _ + Array("start", "office:settings"), _ + Array("start", "config:config-item-set", _ + "config:name", "CDATA", "view-settings"), _ + Array("start", "config:config-item-map-indexed", _ + "config:name", "CDATA", "Views"), _ + Array("start", "config:config-item-map-entry"), _ + Array("start", "config:config-item", _ + "config:name", "CDATA", "ZoomFactor", _ + "config:type", "CDATA", "short"), _ + Array("chars", sZoom), _ + Array("end", "config:config-item"), _ + Array("start", "config:config-item", _ + "config:name", "CDATA", "ZoomType", _ + "config:type", "CDATA", "short"), _ + Array("chars", "0"), _ + Array("end", "config:config-item"), _ + Array("end", "config:config-item-map-entry"), _ + Array("end", "config:config-item-map-indexed"), _ + Array("end", "config:config-item-set"), _ + Array("end", "office:settings"), _ + Array("end", "office:document-settings")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oController, oViewSettings As Object + Dim zoom As String + out.log("checking of import...") + oController = oDoc.getCurrentController() + oViewSettings = oController.getViewSettings() + zoom = oViewSettings.getPropertyValue("ZoomValue") + out.log("ZoomValue: " + zoom) + res = (zoom = sZoom) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLStylesExporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLStylesExporter/script.xlb new file mode 100644 index 000000000000..c23fb12e8b86 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLStylesExporter/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="sw_XMLStylesExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLStylesExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLStylesExporter/sw_XMLStylesExporter.xba b/qadevOOo/tests/basic/mod/sw/XMLStylesExporter/sw_XMLStylesExporter.xba new file mode 100644 index 000000000000..fd44f50117cc --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLStylesExporter/sw_XMLStylesExporter.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="sw_XMLStylesExporter" 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.lang.XInitialization: + Global aInitArgs() As Variant + +' Required for com.sun.star.document.XFilter: + Global oFilterDescriptor As Variant + +' Required for com.sun.star.document.XExporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLStylesExporter +'************************************************************************* +On Error Goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + Dim Tag1, Tag2 As Variant + Dim expString As String + Dim oFootnoteSettings As Object + + printXML = true + expString = "New Property" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("swriter", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-styles") + Tag2 = Array("text:footnotes-configuration", "style:num-prefix", expString) + filter = Array(Array("TagExists", Tag1, Tag2)) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Writer.XMLStylesExporter", initArgs()) + + oFootnoteSettings = oDoc.getFootnoteSettings() + oFootnoteSettings.setPropertyValue("Prefix", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "swriter: StarOffice XML (text)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc + +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sw/XMLStylesImporter/script.xlb b/qadevOOo/tests/basic/mod/sw/XMLStylesImporter/script.xlb new file mode 100644 index 000000000000..586bd5fcdd77 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLStylesImporter/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="sw_XMLStylesImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sw_XMLStylesImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sw/XMLStylesImporter/sw_XMLStylesImporter.xba b/qadevOOo/tests/basic/mod/sw/XMLStylesImporter/sw_XMLStylesImporter.xba new file mode 100644 index 000000000000..050b85faea26 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sw/XMLStylesImporter/sw_XMLStylesImporter.xba @@ -0,0 +1,93 @@ +<?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="sw_XMLStylesImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sPrefix As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sw.XMLStylesImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("swriter", cObjectName) + oObj = createUnoService("com.sun.star.comp.Writer.XMLStylesImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sPrefix = "Test prefix" + vXMLData = Array( _ + Array("start", "office:document-styles", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:style", "CDATA", "http://openoffice.org/2000/style", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text"), _ + Array("start", "office:styles"), _ + Array("start", "text:footnotes-configuration", _ + "style:num-prefix", "CDATA", sPrefix), _ + Array("end", "text:footnotes-configuration"), _ + Array("end", "office:styles"), _ + Array("end", "office:document-styles")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oSettings As Object + Dim prefix As String + out.log("checking of import...") + oSettings = oDoc.getFootnoteSettings() + prefix = oSettings.getPropertyValue("Prefix") + res = (prefix = sPrefix) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/sysdtrans/SystemClipboard/script.xlb b/qadevOOo/tests/basic/mod/sysdtrans/SystemClipboard/script.xlb new file mode 100644 index 000000000000..908a2a4acf68 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sysdtrans/SystemClipboard/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="sysdtrans_SystemClipboard" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="sysdtrans_SystemClipboard"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/sysdtrans/SystemClipboard/sysdtrans_SystemClipboard.xba b/qadevOOo/tests/basic/mod/sysdtrans/SystemClipboard/sysdtrans_SystemClipboard.xba new file mode 100644 index 000000000000..7b708b134eb1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/sysdtrans/SystemClipboard/sysdtrans_SystemClipboard.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="sysdtrans_SystemClipboard" 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 + +'************************************************************************* +'Currently the service basichelper.Transferable +'isnt work (no XTransferable methods could be found) + +'************************************************************************* + + + + + +' REQUIRED VARIABLES for interface/service tests: + +' Required for com.sun.star.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.datatransfer.clipboard.XClipboard +Global oOwner As Object +Global trans1 As Object +Global trans2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' sysdtrans.SystemClipboard +'************************************************************************* +On Error Goto ErrHndl + + oObj = createUNOService("com.sun.star.datatransfer.clipboard.SystemClipboard") + + oComponentInstance = createUNOService("com.sun.star.datatransfer.clipboard.SystemClipboard") + + trans1 = createUNOService("basichelper.Transferable") + Out.Log(trans1.dbg_supportedInterfaces()) + Out.Log(trans1.dbg_methods()) + + trans1.initialize(Array("XClipboard test 1")) + Out.Log("Supports: " + hasUnoInterfaces(trans1, "com.sun.star.datatransfer.XTransferable")) + Out.Log("Supports: " + hasUnoInterfaces(trans1, "com.sun.star.container.XNamed")) + Out.Log("Supports: " + hasUnoInterfaces(trans1, "com.sun.star.container.XContainer")) + Out.Log(trans1.getName()) + +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/syssh/SystemShellExecute/script.xlb b/qadevOOo/tests/basic/mod/syssh/SystemShellExecute/script.xlb new file mode 100644 index 000000000000..ef33f66ed822 --- /dev/null +++ b/qadevOOo/tests/basic/mod/syssh/SystemShellExecute/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="syssh_SystemShellExecute" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="syssh_SystemShellExecute"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/syssh/SystemShellExecute/syssh_SystemShellExecute.xba b/qadevOOo/tests/basic/mod/syssh/SystemShellExecute/syssh_SystemShellExecute.xba new file mode 100644 index 000000000000..93fbedd64679 --- /dev/null +++ b/qadevOOo/tests/basic/mod/syssh/SystemShellExecute/syssh_SystemShellExecute.xba @@ -0,0 +1,53 @@ +<?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="syssh_SystemShellExecute" 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: +' syssh.SystemShellExecute +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.system.SystemShellExecute") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/tcv/TypeConverter/script.xlb b/qadevOOo/tests/basic/mod/tcv/TypeConverter/script.xlb new file mode 100644 index 000000000000..8ea47fcff46c --- /dev/null +++ b/qadevOOo/tests/basic/mod/tcv/TypeConverter/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="tcv_TypeConverter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="tcv_TypeConverter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/tcv/TypeConverter/tcv_TypeConverter.xba b/qadevOOo/tests/basic/mod/tcv/TypeConverter/tcv_TypeConverter.xba new file mode 100644 index 000000000000..a49811e83e21 --- /dev/null +++ b/qadevOOo/tests/basic/mod/tcv/TypeConverter/tcv_TypeConverter.xba @@ -0,0 +1,53 @@ +<?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="tcv_TypeConverter" 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: +' tcv.TypeConverter +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.script.Converter") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/tdmgr/TypeDescriptionManager/script.xlb b/qadevOOo/tests/basic/mod/tdmgr/TypeDescriptionManager/script.xlb new file mode 100644 index 000000000000..6a13aa8c5148 --- /dev/null +++ b/qadevOOo/tests/basic/mod/tdmgr/TypeDescriptionManager/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="tdmgr_TypeDescriptionManager" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="tdmgr_TypeDescriptionManager"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/tdmgr/TypeDescriptionManager/tdmgr_TypeDescriptionManager.xba b/qadevOOo/tests/basic/mod/tdmgr/TypeDescriptionManager/tdmgr_TypeDescriptionManager.xba new file mode 100644 index 000000000000..e1c8ffde05f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/tdmgr/TypeDescriptionManager/tdmgr_TypeDescriptionManager.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="tdmgr_TypeDescriptionManager" 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 lang.XComponent +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' tdmgr.TypeDescriptionManager +'************************************************************************* +On Error Goto ErrHndl + oObj = CreateUnoService("com.sun.star.reflection.TypeDescriptionManager") + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/text/DefaultNumberingProvider/script.xlb b/qadevOOo/tests/basic/mod/text/DefaultNumberingProvider/script.xlb new file mode 100644 index 000000000000..b787bc81f815 --- /dev/null +++ b/qadevOOo/tests/basic/mod/text/DefaultNumberingProvider/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="text_DefaultNumberingProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="text_DefaultNumberingProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/text/DefaultNumberingProvider/text_DefaultNumberingProvider.xba b/qadevOOo/tests/basic/mod/text/DefaultNumberingProvider/text_DefaultNumberingProvider.xba new file mode 100644 index 000000000000..cc3e542dc3ba --- /dev/null +++ b/qadevOOo/tests/basic/mod/text/DefaultNumberingProvider/text_DefaultNumberingProvider.xba @@ -0,0 +1,53 @@ +<?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="text_DefaultNumberingProvider" 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: +' text.DefaultNumberingProvider +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.text.DefaultNumberingProvider") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> 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> diff --git a/qadevOOo/tests/basic/mod/typeconverter.uno/TypeConverter/script.xlb b/qadevOOo/tests/basic/mod/typeconverter.uno/TypeConverter/script.xlb new file mode 100644 index 000000000000..7b7cc3abe186 --- /dev/null +++ b/qadevOOo/tests/basic/mod/typeconverter.uno/TypeConverter/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="typeconverter_uno_TypeConverter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="typeconverter_uno_TypeConverter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/typeconverter.uno/TypeConverter/typeconverter_uno_TypeConverter.xba b/qadevOOo/tests/basic/mod/typeconverter.uno/TypeConverter/typeconverter_uno_TypeConverter.xba new file mode 100644 index 000000000000..bbb309a6647f --- /dev/null +++ b/qadevOOo/tests/basic/mod/typeconverter.uno/TypeConverter/typeconverter_uno_TypeConverter.xba @@ -0,0 +1,53 @@ +<?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="typeconverter_uno_TypeConverter" 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: +' tcv.TypeConverter +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService("com.sun.star.script.Converter") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/typemgr.uno/TypeDescriptionManager/script.xlb b/qadevOOo/tests/basic/mod/typemgr.uno/TypeDescriptionManager/script.xlb new file mode 100644 index 000000000000..ad83f2fd6592 --- /dev/null +++ b/qadevOOo/tests/basic/mod/typemgr.uno/TypeDescriptionManager/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="typemgr_uno_TypeDescriptionManager" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="typemgr_uno_TypeDescriptionManager"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/typemgr.uno/TypeDescriptionManager/typemgr_uno_TypeDescriptionManager.xba b/qadevOOo/tests/basic/mod/typemgr.uno/TypeDescriptionManager/typemgr_uno_TypeDescriptionManager.xba new file mode 100644 index 000000000000..e213fde2a5ae --- /dev/null +++ b/qadevOOo/tests/basic/mod/typemgr.uno/TypeDescriptionManager/typemgr_uno_TypeDescriptionManager.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="typemgr_uno_TypeDescriptionManager" 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 lang.XComponent +Global oComponentInstance As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' tdmgr.TypeDescriptionManager +'************************************************************************* +On Error Goto ErrHndl + oObj = CreateUnoService("com.sun.star.reflection.TypeDescriptionManager") + oComponentInstance = oObj +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucb/UcbContentProviderProxyFactory/script.xlb b/qadevOOo/tests/basic/mod/ucb/UcbContentProviderProxyFactory/script.xlb new file mode 100644 index 000000000000..f1bc606ae987 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UcbContentProviderProxyFactory/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="ucb_UcbContentProviderProxyFactory" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucb_UcbContentProviderProxyFactory"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucb/UcbContentProviderProxyFactory/ucb_UcbContentProviderProxyFactory.xba b/qadevOOo/tests/basic/mod/ucb/UcbContentProviderProxyFactory/ucb_UcbContentProviderProxyFactory.xba new file mode 100644 index 000000000000..1b8225a3b166 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UcbContentProviderProxyFactory/ucb_UcbContentProviderProxyFactory.xba @@ -0,0 +1,53 @@ +<?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="ucb_UcbContentProviderProxyFactory" 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: +' ucb.UcbContentProviderProxyFactory +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService( "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" ) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucb/UcbPropertiesManager/script.xlb b/qadevOOo/tests/basic/mod/ucb/UcbPropertiesManager/script.xlb new file mode 100644 index 000000000000..7c213d17307c --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UcbPropertiesManager/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="ucb_UcbPropertiesManager" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucb_UcbPropertiesManager"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucb/UcbPropertiesManager/ucb_UcbPropertiesManager.xba b/qadevOOo/tests/basic/mod/ucb/UcbPropertiesManager/ucb_UcbPropertiesManager.xba new file mode 100644 index 000000000000..ad6dfa7c33b4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UcbPropertiesManager/ucb_UcbPropertiesManager.xba @@ -0,0 +1,53 @@ +<?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="ucb_UcbPropertiesManager" 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: +' ucb.UcbPropertiesManager +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService( "com.sun.star.comp.ucb.UcbPropertiesManager" ) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucb/UcbStore/script.xlb b/qadevOOo/tests/basic/mod/ucb/UcbStore/script.xlb new file mode 100644 index 000000000000..cfc0410e18d6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UcbStore/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="ucb_UcbStore" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucb_UcbStore"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucb/UcbStore/ucb_UcbStore.xba b/qadevOOo/tests/basic/mod/ucb/UcbStore/ucb_UcbStore.xba new file mode 100644 index 000000000000..039874294172 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UcbStore/ucb_UcbStore.xba @@ -0,0 +1,53 @@ +<?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="ucb_UcbStore" 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: +' ucb.UcbStore +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService( "com.sun.star.comp.ucb.UcbStore" ) +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucb/UniversalContentBroker/script.xlb b/qadevOOo/tests/basic/mod/ucb/UniversalContentBroker/script.xlb new file mode 100644 index 000000000000..c2ee0fa7c320 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UniversalContentBroker/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="ucb_UniversalContentBroker" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucb_UniversalContentBroker"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucb/UniversalContentBroker/ucb_UniversalContentBroker.xba b/qadevOOo/tests/basic/mod/ucb/UniversalContentBroker/ucb_UniversalContentBroker.xba new file mode 100644 index 000000000000..ee40b7d3b4e3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucb/UniversalContentBroker/ucb_UniversalContentBroker.xba @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ucb_UniversalContentBroker" 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.ucb.XContentProvider: + Global ContentID1 As Object + Global ContentID2 As Object + +' Required for com.sun.star.ucb.XContentIdentifierFactory + Global sContentID As String + +' Required for com.sun.star.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.lang.XInitialization: + Global aInitArgs(1) As String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' ucb.UniversalContentBroker +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.comp.ucb.UniversalContentBroker") + + oComponentInstance = createUNOService("com.sun.star.comp.ucb.UniversalContentBroker") + + ContentID1 = oObj.createContentIdentifier("ftp://localhost/c/temp/") + ContentID2 = oObj.createContentIdentifier("vnd.sun.star.webdav://localhost/c/temp/") + sContentID = "http://localhost/c/temp/" + + ' If the instance is created with two arguments of type string, + ' these two strings are used to configure the newly instantiated broker; + + aInitArgs(0) = "Local" + aInitArgs(1) = "Office" +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucpdav/WebDAVContentProvider/script.xlb b/qadevOOo/tests/basic/mod/ucpdav/WebDAVContentProvider/script.xlb new file mode 100644 index 000000000000..bae6a4e2691b --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucpdav/WebDAVContentProvider/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="ucpdav_WebDAVContentProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucpdav_WebDAVContentProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucpdav/WebDAVContentProvider/ucpdav_WebDAVContentProvider.xba b/qadevOOo/tests/basic/mod/ucpdav/WebDAVContentProvider/ucpdav_WebDAVContentProvider.xba new file mode 100644 index 000000000000..c7b4b646d667 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucpdav/WebDAVContentProvider/ucpdav_WebDAVContentProvider.xba @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ucpdav_WebDAVContentProvider" 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.ucb.XContentProvider: + Global ContentID1 As Object + Global ContentID2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' ucpdav.WebDAVContentProvider +'************************************************************************* +On Error Goto ErrHndl + Dim oUCB As Object + + oObj = createUNOService("com.sun.star.ucb.WebDAVContentProvider") + oUCB = createUNOService("com.sun.star.comp.ucb.UniversalContentBroker") + ContentID1 = oUCB.createContentIdentifier("http://dav.anotherfoo.com/Documents/report.sdw") + ContentID2 = oUCB.createContentIdentifier("http://dav.foo.com/Documents/report.sdw") +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +' Revision 1.2 2002/02/01 12:17:44 cvsan +' CHG: ContentID changed. +' +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucpfile/FileProvider/script.xlb b/qadevOOo/tests/basic/mod/ucpfile/FileProvider/script.xlb new file mode 100644 index 000000000000..077235fda068 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucpfile/FileProvider/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="ucpfile_FileProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucpfile_FileProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucpfile/FileProvider/ucpfile_FileProvider.xba b/qadevOOo/tests/basic/mod/ucpfile/FileProvider/ucpfile_FileProvider.xba new file mode 100644 index 000000000000..f65662060ca8 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucpfile/FileProvider/ucpfile_FileProvider.xba @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ucpfile_FileProvider" 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 for com.sun.star.ucb.XContentProvider: + Global ContentID1 As Object + Global ContentID2 As Object + +' Required for com.sun.star.ucb.XContentIdentifierFactory: + Global sContentID As String + +' Required for com.sun.star.ucb.XFileIdentifierConverter: + Global cSystemPath as String + Global cBaseURL as String + Global cURLPath as String + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' ucpfile.FileProvider +'************************************************************************* +On Error Goto ErrHndl + oObj = createUnoService( "com.sun.star.comp.ucb.FileProvider" ) + + ContentID1 = oObj.createContentIdentifier(utils.Path2URL(cTestDocsDir)) + ContentID2 = oObj.createContentIdentifier("vnd.sun.star.webdav://localhost/c/temp/") + sContentID = "http://localhost/c/temp/" + + cBaseURL = utils.Path2URL(cTestDocsDir) + cSystemPath = utils.URL2Path(cBaseURL) + cURLPath = utils.Path2URL(cTestDocsDir + "crazy-blue.jpg") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucphier/HierarchyContentProvider/script.xlb b/qadevOOo/tests/basic/mod/ucphier/HierarchyContentProvider/script.xlb new file mode 100644 index 000000000000..6c41cf7ee3bc --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucphier/HierarchyContentProvider/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="ucphier_HierarchyContentProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucphier_HierarchyContentProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucphier/HierarchyContentProvider/ucphier_HierarchyContentProvider.xba b/qadevOOo/tests/basic/mod/ucphier/HierarchyContentProvider/ucphier_HierarchyContentProvider.xba new file mode 100644 index 000000000000..a25534238de7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucphier/HierarchyContentProvider/ucphier_HierarchyContentProvider.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="ucphier_HierarchyContentProvider" 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.ucb.XContentProvider: + Global ContentID1 As Object + Global ContentID2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' ucphier.HierarchyContentProvider +'************************************************************************* +On Error Goto ErrHndl + Dim oUCB As Object + + oObj = createUNOService("com.sun.star.ucb.HierarchyContentProvider") + oUCB = createUNOService("com.sun.star.comp.ucb.UniversalContentBroker") + ContentID1 = oUCB.createContentIdentifier("vnd.sun.star.hier://MyHierarchyDataSource/") + ContentID2 = oUCB.createContentIdentifier("vnd.sun.star.hier://Bookmarks/Sun%20Microssystems%20Home%20Page") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucphier/HierarchyDataSource/script.xlb b/qadevOOo/tests/basic/mod/ucphier/HierarchyDataSource/script.xlb new file mode 100644 index 000000000000..c37575c24006 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucphier/HierarchyDataSource/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="ucphier_HierarchyDataSource" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucphier_HierarchyDataSource"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucphier/HierarchyDataSource/ucphier_HierarchyDataSource.xba b/qadevOOo/tests/basic/mod/ucphier/HierarchyDataSource/ucphier_HierarchyDataSource.xba new file mode 100644 index 000000000000..f744c44d7c87 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucphier/HierarchyDataSource/ucphier_HierarchyDataSource.xba @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ucphier_HierarchyDataSource" 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.lang.XComponent: + Global oComponentInstance As Object ' it will be disposed + +' Required for com.sun.star.lang.XMultiServiceFactory: + Global cServiceName As String ' ex. "com.sun.star.drawing.RectangleShape" + Global bCreateInstanceWithoutArguments As Boolean + Global aArguments() As Variant + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' ucphier.HierarchyDataSource +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.ucb.DefaultHierarchyDataSource") + + oComponentInstance = createUNOService("com.sun.star.ucb.DefaultHierarchyDataSource") + + cServiceName = "com.sun.star.ucb.HierarchyDataReadWriteAccess" + bCreateInstanceWithoutArguments = true + Dim args(0) As New com.sun.star.beans.PropertyValue + args(0).Name = "nodepath" : args(0).Value = "" + aArguments() = args() +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/ucppkg/PackageContentProvider/script.xlb b/qadevOOo/tests/basic/mod/ucppkg/PackageContentProvider/script.xlb new file mode 100644 index 000000000000..8753e0986081 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucppkg/PackageContentProvider/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="ucppkg_PackageContentProvider" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="ucppkg_PackageContentProvider"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/ucppkg/PackageContentProvider/ucppkg_PackageContentProvider.xba b/qadevOOo/tests/basic/mod/ucppkg/PackageContentProvider/ucppkg_PackageContentProvider.xba new file mode 100644 index 000000000000..055925a14a12 --- /dev/null +++ b/qadevOOo/tests/basic/mod/ucppkg/PackageContentProvider/ucppkg_PackageContentProvider.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="ucppkg_PackageContentProvider" 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.ucb.XContentProvider: + Global ContentID1 As Object + Global ContentID2 As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' ucppkg.PackageContentProvider +'************************************************************************* +On Error Goto ErrHndl + Dim oUCB As Object + + oObj = createUNOService("com.sun.star.ucb.PackageContentProvider") + oUCB = createUNOService("com.sun.star.comp.ucb.UniversalContentBroker") + ContentID1 = oUCB.createContentIdentifier("vnd.sun.star.pkg://MyPackageSource") + ContentID2 = oUCB.createContentIdentifier("vnd.sun.star.pkg://localhost/") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/uui/UUIInteractionHandler/script.xlb b/qadevOOo/tests/basic/mod/uui/UUIInteractionHandler/script.xlb new file mode 100644 index 000000000000..3c7b78b8a1fa --- /dev/null +++ b/qadevOOo/tests/basic/mod/uui/UUIInteractionHandler/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="uui_UUIInteractionHandler" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="uui_UUIInteractionHandler"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/uui/UUIInteractionHandler/uui_UUIInteractionHandler.xba b/qadevOOo/tests/basic/mod/uui/UUIInteractionHandler/uui_UUIInteractionHandler.xba new file mode 100644 index 000000000000..85807a63ba45 --- /dev/null +++ b/qadevOOo/tests/basic/mod/uui/UUIInteractionHandler/uui_UUIInteractionHandler.xba @@ -0,0 +1,53 @@ +<?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="uui_UUIInteractionHandler" 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: +' uui.UUIInteractionHandler +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.uui.InteractionHandler") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/uuresolver.uno/UnoUrlResolver/script.xlb b/qadevOOo/tests/basic/mod/uuresolver.uno/UnoUrlResolver/script.xlb new file mode 100644 index 000000000000..6105d6f84d95 --- /dev/null +++ b/qadevOOo/tests/basic/mod/uuresolver.uno/UnoUrlResolver/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="uuresolver_uno_UnoUrlResolver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="uuresolver_uno_UnoUrlResolver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/uuresolver.uno/UnoUrlResolver/uuresolver_uno_UnoUrlResolver.xba b/qadevOOo/tests/basic/mod/uuresolver.uno/UnoUrlResolver/uuresolver_uno_UnoUrlResolver.xba new file mode 100644 index 000000000000..74beac615c75 --- /dev/null +++ b/qadevOOo/tests/basic/mod/uuresolver.uno/UnoUrlResolver/uuresolver_uno_UnoUrlResolver.xba @@ -0,0 +1,53 @@ +<?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="uuresolver_uno_UnoUrlResolver" 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: +' uuresolver.UnoUrlResolver +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.bridge.UnoUrlResolver") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/uuresolver/UnoUrlResolver/script.xlb b/qadevOOo/tests/basic/mod/uuresolver/UnoUrlResolver/script.xlb new file mode 100644 index 000000000000..ab7bd568b014 --- /dev/null +++ b/qadevOOo/tests/basic/mod/uuresolver/UnoUrlResolver/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="uuresolver_UnoUrlResolver" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="uuresolver_UnoUrlResolver"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/uuresolver/UnoUrlResolver/uuresolver_UnoUrlResolver.xba b/qadevOOo/tests/basic/mod/uuresolver/UnoUrlResolver/uuresolver_UnoUrlResolver.xba new file mode 100644 index 000000000000..7db41d3ee3d3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/uuresolver/UnoUrlResolver/uuresolver_UnoUrlResolver.xba @@ -0,0 +1,53 @@ +<?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="uuresolver_UnoUrlResolver" 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: +' uuresolver.UnoUrlResolver +'************************************************************************* +On Error Goto ErrHndl + oObj = createUNOService("com.sun.star.bridge.UnoUrlResolver") +Exit Sub +ErrHndl: + Test.Exception() +End Sub +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/script.xlb new file mode 100644 index 000000000000..ae6a259d82c9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/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="xmloff_Chart_XMLContentExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLContentExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/xmloff_Chart_XMLContentExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/xmloff_Chart_XMLContentExporter.xba new file mode 100644 index 000000000000..c8a21a08aa86 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/xmloff_Chart_XMLContentExporter.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="xmloff_Chart_XMLContentExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLContentExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oChartTitle As Variant + Dim filter As Variant + Dim Tag1, Tag2, Tag3 As Variant + Dim printXML As Boolean + Dim expString As String + + printXML = true + expString = "a - b" + expString = "NewTitleOfDiagram" + oMSF = getProcessServiceManager() + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-content") + Tag2 = Array("office:body") + Tag3 = Array("chart:title") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("CharsEnclosed", Tag3, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Chart.XMLContentExporter", initArgs()) + + oChartTitle = oDoc.getTitle() + oChartTitle.setPropertyValue("String", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "schart: StarOffice XML (Chart)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/script.xlb new file mode 100644 index 000000000000..0443584ec192 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/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="xmloff_Chart_XMLContentImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLContentImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/xmloff_Chart_XMLContentImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/xmloff_Chart_XMLContentImporter.xba new file mode 100644 index 000000000000..4a854600f820 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/xmloff_Chart_XMLContentImporter.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="xmloff_Chart_XMLContentImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sValue As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLContentImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oObj = createUnoService("com.sun.star.comp.Chart.XMLContentImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sValue = "XMLContentImporter_test" + vXMLData = Array( _ + Array("start", "office:document-content", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:chart", "CDATA", "http://openoffice.org/2000/chart", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table", _ + "xmlns:svg", "CDATA", "http://openoffice.org/2000/svg", _ + "office:class", "CDATA", "chart", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:body"), _ + Array("start", "chart:chart"), _ + Array("start", "chart:title"), _ + Array("start", "text:p"), _ + Array("chars", sValue), _ + Array("end", "text:p"), _ + Array("end", "chart:title"), _ + Array("end", "chart:chart"), _ + Array("end", "office:body"), _ + Array("end", "office:document-content")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oTitle As Object + Dim title As String + out.log("checking of import...") + oTitle = oDoc.getTitle() + title = oTitle.getPropertyValue("String") + res = (title = sValue) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/script.xlb new file mode 100644 index 000000000000..f45b86cbbf74 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/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="xmloff_Chart_XMLExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/xmloff_Chart_XMLExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/xmloff_Chart_XMLExporter.xba new file mode 100644 index 000000000000..d43b51b06c35 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/xmloff_Chart_XMLExporter.xba @@ -0,0 +1,112 @@ +<?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="xmloff_Chart_XMLExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim docInfo As Variant + Dim filter As Variant + Dim Tag1, Tag2, Tag3, Tag4 As Variant + Dim printXML As Boolean + Dim expString As String + + printXML = true + expString = "NewTitleOfChartDocument" + oMSF = getProcessServiceManager() + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document") + Tag2 = Array("office:meta") + Tag3 = Array("office:body") + Tag4 = Array("dc:title") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("CharsEnclosed", Tag4, expString), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag1) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Chart.XMLExporter", initArgs()) + + docInfo = oDoc.getDocumentInfo() + docInfo.setPropertyValue("Title", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "schart: StarOffice XML (Chart)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/script.xlb new file mode 100644 index 000000000000..a7cc190ecb02 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/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="xmloff_Chart_XMLImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/xmloff_Chart_XMLImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/xmloff_Chart_XMLImporter.xba new file mode 100644 index 000000000000..4df7ddd9642b --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/xmloff_Chart_XMLImporter.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="xmloff_Chart_XMLImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sValue As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oObj = createUnoService("com.sun.star.comp.Chart.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sValue = "XMLContentImporter_test" + vXMLData = Array( _ + Array("start", "office:document", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:chart", "CDATA", "http://openoffice.org/2000/chart", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table", _ + "xmlns:svg", "CDATA", "http://openoffice.org/2000/svg", _ + "office:class", "CDATA", "chart", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:body"), _ + Array("start", "chart:chart"), _ + Array("start", "chart:title"), _ + Array("start", "text:p"), _ + Array("chars", sValue), _ + Array("end", "text:p"), _ + Array("end", "chart:title"), _ + Array("end", "chart:chart"), _ + Array("end", "office:body"), _ + Array("end", "office:document-content")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oTitle As Object + Dim title As String + out.log("checking of import...") + oTitle = oDoc.getTitle() + title = oTitle.getPropertyValue("String") + res = (title = sValue) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/script.xlb new file mode 100644 index 000000000000..ba88f29b9a7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/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="xmloff_Chart_XMLStylesExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLStylesExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/xmloff_Chart_XMLStylesExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/xmloff_Chart_XMLStylesExporter.xba new file mode 100644 index 000000000000..b544f6aa2250 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/xmloff_Chart_XMLStylesExporter.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="xmloff_Chart_XMLStylesExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLStylesExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + + printXML = true + oMSF = getProcessServiceManager() + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + filter = Array( _ + Array("TagExists", Array("office:document-styles")) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Chart.XMLStylesExporter", initArgs()) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "schart: StarOffice XML (Chart)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub + +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/script.xlb new file mode 100644 index 000000000000..d2c3fe8f2d7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/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="xmloff_Chart_XMLStylesImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLStylesImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/xmloff_Chart_XMLStylesImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/xmloff_Chart_XMLStylesImporter.xba new file mode 100644 index 000000000000..92dbd9fba8fa --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/xmloff_Chart_XMLStylesImporter.xba @@ -0,0 +1,87 @@ +<?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="xmloff_Chart_XMLStylesImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLStylesImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oObj = createUnoService("com.sun.star.comp.Chart.XMLStylesImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + vXMLData = Array( _ + Array("start", "office:document-styles", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:chart", "CDATA", "http://openoffice.org/2000/chart", _ + "xmlns:style", "CDATA", "http://openoffice.org/2000/style", _ + "xmlns:svg", "CDATA", "http://openoffice.org/2000/svg", _ + "office:class", "CDATA", "chart", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:styles"), _ + Array("end", "office:styles"), _ + Array("end", "office:document-styles")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + out.log("checking of import...") + out.log("No ways to check styles import were not found.") + res = True + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentExporter/script.xlb new file mode 100644 index 000000000000..bf64ff5788c9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentExporter/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="xmloff_Draw_XMLContentExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLContentExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentExporter/xmloff_Draw_XMLContentExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentExporter/xmloff_Draw_XMLContentExporter.xba new file mode 100644 index 000000000000..268c2ea34ca7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentExporter/xmloff_Draw_XMLContentExporter.xba @@ -0,0 +1,115 @@ +<?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="xmloff_Draw_XMLContentExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLContentExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oDrawPages As Variant + Dim printXML As Boolean + Dim expString1 As String + Dim expString2 As String + Dim filter As Variant + Dim Tag1, Tag2, Tag3, Tag4, Tag5 As Variant + + printXML = true + expString1 = "NewSlide1" + expString2 = "NewSlide2" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("sdraw", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-content") + Tag2 = Array("office:body") + Tag3 = Array("draw:page","draw:name","NewSlide1") + Tag4 = Array("draw:page","draw:name","NewSlide2") + Tag5 = Array("draw:page") + filter = Array( _ + Array("TagExists", Tag1, Tag2, Tag3, Tag4), _ + Array("TagEnclosed", Tag5, Tag2) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Draw.XMLContentExporter", initArgs()) + + oDrawPages = oDoc.getDrawPages() + oDrawPages.insertNewByIndex(1) + oDrawPages.getByIndex(0).setName(expString1) + oDrawPages.getByIndex(1).setName(expString2) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "sdraw: StarOffice XML (Draw)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentImporter/script.xlb new file mode 100644 index 000000000000..87b4c637710b --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentImporter/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="xmloff_Draw_XMLContentImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLContentImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentImporter/xmloff_Draw_XMLContentImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentImporter/xmloff_Draw_XMLContentImporter.xba new file mode 100644 index 000000000000..beb1cb9e159d --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLContentImporter/xmloff_Draw_XMLContentImporter.xba @@ -0,0 +1,115 @@ +<?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="xmloff_Draw_XMLContentImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sName1, sName2 As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLContentImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = createUnoService("com.sun.star.comp.Draw.XMLContentImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sName1 = "NewSlide1" + sName2 = "NewSlide2" + vXMLData = Array( _ + Array("start", "office:document", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:draw", "CDATA", "http://openoffice.org/2000/drawing", _ + "office:class", "CDATA", "drawing", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:body"), _ + Array("start", "draw:page", _ + "draw:name", "CDATA", sName1, _ + "draw:master-page-name", "CDATA", "Default"), _ + Array("end", "draw:page"), _ + Array("start", "draw:page", _ + "draw:name", "CDATA", sName2, _ + "draw:master-page-name", "CDATA", "Default"), _ + Array("end","draw:page"), _ + Array("end", "draw:page"), _ + Array("end", "office:body"), _ + Array("end", "office:document")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim i As Integer + Dim res, res1, res2 As Boolean + Dim oPages, oPage As Object + Dim pageName As String + out.log("checking of import...") + res1 = False + res2 = False + oPages = oDoc.getDrawPages() + out.log("Draw pages:") + For i = 0 to ( oPages.getCount() - 1 ) + oPage = oPages.getByIndex(i) + pageName = oPage.getName() + out.log(pageName) + If pageName = sName1 then + res1 = True + EndIf + If pageName = sName2 then + res2 = True + EndIf + Next i + res = res1 and res2 + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLExporter/script.xlb new file mode 100644 index 000000000000..80ede1c7381b --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLExporter/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="xmloff_Draw_XMLExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLExporter/xmloff_Draw_XMLExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLExporter/xmloff_Draw_XMLExporter.xba new file mode 100644 index 000000000000..a05ce5775cc6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLExporter/xmloff_Draw_XMLExporter.xba @@ -0,0 +1,110 @@ +<?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="xmloff_Draw_XMLExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oDocInfo As Variant + Dim printXML As Boolean + Dim filter As Variant + Dim expString As String + Dim Tag1, Tag2, Tag3, Tag4, Tag5 As Variant + + printXML = true + expString = "NewTitleOfDrawDocument" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("sdraw", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document") + Tag2 = Array("office:meta") + Tag3 = Array("dc:title") + filter = Array( _ + Array("TagExists", Tag1, Tag2, Tag3), _ + Array("TagEnclosed", Tag3, Tag2), _ + Array("CharsEnclosed", Tag3, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Draw.XMLExporter", initArgs()) + + oDocInfo = oDoc.getDocumentInfo() + oDocInfo.setPropertyValue("Title", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "sdraw: StarOffice XML (Draw)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLImporter/script.xlb new file mode 100644 index 000000000000..32a461e579e6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLImporter/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="xmloff_Draw_XMLImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLImporter/xmloff_Draw_XMLImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLImporter/xmloff_Draw_XMLImporter.xba new file mode 100644 index 000000000000..c51248716507 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLImporter/xmloff_Draw_XMLImporter.xba @@ -0,0 +1,115 @@ +<?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="xmloff_Draw_XMLImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sName1, sName2 As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = createUnoService("com.sun.star.comp.Draw.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sName1 = "NewSlide1" + sName2 = "NewSlide2" + vXMLData = Array( _ + Array("start", "office:document", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:draw", "CDATA", "http://openoffice.org/2000/drawing", _ + "office:class", "CDATA", "drawing", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:body"), _ + Array("start", "draw:page", _ + "draw:name", "CDATA", sName1, _ + "draw:master-page-name", "CDATA", "Default"), _ + Array("end", "draw:page"), _ + Array("start", "draw:page", _ + "draw:name", "CDATA", sName2, _ + "draw:master-page-name", "CDATA", "Default"), _ + Array("end","draw:page"), _ + Array("end", "draw:page"), _ + Array("end", "office:body"), _ + Array("end", "office:document")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim i As Integer + Dim res, res1, res2 As Boolean + Dim oPages, oPage As Object + Dim pageName As String + out.log("checking of import...") + res1 = False + res2 = False + oPages = oDoc.getDrawPages() + out.log("Draw pages:") + For i = 0 to ( oPages.getCount() - 1 ) + oPage = oPages.getByIndex(i) + pageName = oPage.getName() + out.log(pageName) + If pageName = sName1 then + res1 = True + EndIf + If pageName = sName2 then + res2 = True + EndIf + Next i + res = res1 and res2 + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaExporter/script.xlb new file mode 100644 index 000000000000..96e8b72ced2c --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaExporter/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="xmloff_Draw_XMLMetaExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLMetaExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaExporter/xmloff_Draw_XMLMetaExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaExporter/xmloff_Draw_XMLMetaExporter.xba new file mode 100644 index 000000000000..5f753854404b --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaExporter/xmloff_Draw_XMLMetaExporter.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="xmloff_Draw_XMLMetaExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLMetaExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oDocInfo As Variant + Dim filter As Variant + Dim Tag1, Tag2, Tag3 As Variant + Dim printXML As Boolean + Dim expString As String + + printXML = true + expString = "NewTitleOfDrawDocument" + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("sdraw", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-meta") + Tag2 = Array("office:meta") + Tag3 = Array("dc:title") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag2), _ + Array("CharsEnclosed", Tag3, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Draw.XMLMetaExporter", initArgs()) + + oDocInfo = oDoc.getDocumentInfo() + oDocInfo.setPropertyValue("Title", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "sdraw: StarOffice XML (Draw)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaImporter/script.xlb new file mode 100644 index 000000000000..a6badc66cb20 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaImporter/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="xmloff_Draw_XMLMetaImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLMetaImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaImporter/xmloff_Draw_XMLMetaImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaImporter/xmloff_Draw_XMLMetaImporter.xba new file mode 100644 index 000000000000..01cd7d4e03bd --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLMetaImporter/xmloff_Draw_XMLMetaImporter.xba @@ -0,0 +1,94 @@ +<?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="xmloff_Draw_XMLMetaImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sTitle As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLMetaImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = createUnoService("com.sun.star.comp.Draw.XMLMetaImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sTitle = "XMLMetaImporter_Title" + vXMLData = Array( _ + Array("start", "office:document-meta", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:meta", "CDATA", "http://openoffice.org/2000/meta", _ + "xmlns:dc", "CDATA", "http://purl.org/dc/elements/1.1/"), _ + Array("start", "office:meta"), _ + Array("start", "dc:title"), _ + Array("chars", sTitle), _ + Array("end", "dc:title"), _ + Array("end", "office:meta"), _ + Array("end", "office:document-meta")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oDocInfo As Object + Dim title As String + out.log("checking of import...") + oDocInfo = oDoc.getDocumentInfo() + title = oDocInfo.getPropertyValue("Title") + out.log("Title: " + title) + res = (title = sTitle) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsExporter/script.xlb new file mode 100644 index 000000000000..8377839ac00c --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsExporter/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="xmloff_Draw_XMLSettingsExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLSettingsExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsExporter/xmloff_Draw_XMLSettingsExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsExporter/xmloff_Draw_XMLSettingsExporter.xba new file mode 100644 index 000000000000..d8ccb9fa0b4f --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsExporter/xmloff_Draw_XMLSettingsExporter.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="xmloff_Draw_XMLSettingsExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLSettingsExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oController As Object + Dim oProp, oPropToSet As Boolean + Dim filter As Variant + Dim Tag1, Tag2, Tag3, Tag4, Tag5 As Variant + Dim printXML As Boolean + + printXML = true + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("sdraw", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + oController = oDoc.getCurrentController() + oProp = oController.getPropertyValue("IsLayerMode") + if (oProp = false) then + oPropToSet = true + else + oPropToSet = false + endif + + Tag1 = Array("office:document-settings") + Tag2 = Array("office:settings") + Tag3 = Array("config:config-item-set") + Tag4 = Array("config:config-item-map-indexed") + Tag5 = Array("config:config-item", "config:name", "IsLayerMode") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag2), _ + Array("TagEnclosed", Tag4, Tag3), _ + Array("CharsEnclosed", Tag5, LCase(oPropToSet)) _ + ) + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Draw.XMLSettingsExporter", initArgs()) + + oController.setPropertyValue("IsLayerMode", oPropToSet) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "sdraw: StarOffice XML (Draw)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsImporter/script.xlb new file mode 100644 index 000000000000..86c163212d91 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsImporter/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="xmloff_Draw_XMLSettingsImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLSettingsImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsImporter/xmloff_Draw_XMLSettingsImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsImporter/xmloff_Draw_XMLSettingsImporter.xba new file mode 100644 index 000000000000..684ecd815318 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLSettingsImporter/xmloff_Draw_XMLSettingsImporter.xba @@ -0,0 +1,95 @@ +<?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="xmloff_Draw_XMLSettingsImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLSettingsImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = createUnoService("com.sun.star.comp.Draw.XMLSettingsImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + vXMLData = Array( _ + Array("start", "office:document-settings", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:config", "CDATA", "http://openoffice.org/2001/config"), _ + Array("start", "office:settings"), _ + Array("start", "config:config-item-set", _ + "config:name", "CDATA", "view-settings"), _ + Array("start", "config:config-item-map-indexed", _ + "config:name", "CDATA", "Views"), _ + Array("start", "config:config-item-map-entry"), _ + Array("start", "config:config-item", _ + "config:name", "CDATA", "IsLayerMode", _ + "config:type", "CDATA", "boolean"), _ + Array("chars", "true"), _ + Array("end", "config:config-item"), _ + Array("end", "config:config-item-map-entry"), _ + Array("end", "config:config-item-map-indexed"), _ + Array("end", "config:config-item-set"), _ + Array("end", "office:settings"), _ + Array("end", "office:document-settings")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oController As Object + oController = oDoc.getCurrentController() + res = oController.getPropertyValue("IsLayerMode") + out.log("Value after import: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesExporter/script.xlb new file mode 100644 index 000000000000..7e90b5d6abd4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesExporter/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="xmloff_Draw_XMLStylesExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLStylesExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesExporter/xmloff_Draw_XMLStylesExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesExporter/xmloff_Draw_XMLStylesExporter.xba new file mode 100644 index 000000000000..cf46fdafd941 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesExporter/xmloff_Draw_XMLStylesExporter.xba @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Draw_XMLStylesExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + +Dim counter As Integer + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLStylesExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0), oMSF, oStyleFamilies, oFamily, oStyle As Object + Dim oSFNames As Variant + Dim oFamilyName As String + Dim printXML As Boolean + Dim Tag1, Tag2, Tag3 As Variant + Dim expString As String + Dim filter As Variant + + printXML = true + expString = "NewStyle" + counter = counter +1 + oMSF = getProcessServiceManager() + oDoc = utils.createDocument("sdraw", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-styles") + Tag2 = Array("office:styles") + Tag3 = Array("style:style", "style:name", expString) + filter = Array( _ + Array("TagExists", Tag1, Tag2, Tag3), _ + Array("TagEnclosed", Tag3, Tag2) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Draw.XMLStylesExporter", initArgs()) + + oStyleFamilies = oDoc.getStyleFamilies() + oSFNames = oStyleFamilies.getElementNames() + oFamilyName = oSFNames(0) + oFamily = oStyleFamilies.getByName(oFamilyName) + oStyle = oDoc.createInstance("com.sun.star.style.Style") + oFamily.insertByName(expString, oStyle) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "sdraw: StarOffice XML (Draw)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesImporter/script.xlb new file mode 100644 index 000000000000..1f6b8de5ef0c --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesImporter/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="xmloff_Draw_XMLStylesImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Draw_XMLStylesImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesImporter/xmloff_Draw_XMLStylesImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesImporter/xmloff_Draw_XMLStylesImporter.xba new file mode 100644 index 000000000000..4d8793134d31 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Draw/XMLStylesImporter/xmloff_Draw_XMLStylesImporter.xba @@ -0,0 +1,93 @@ +<?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="xmloff_Draw_XMLStylesImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sStyleName, sFamilyName As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Draw.XMLStylesImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createDocument("sdraw", cObjectName) + oObj = createUnoService("com.sun.star.comp.Draw.XMLStylesImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sStyleName = "New style for test XMLStylesImporter" + sFamilyName = "graphics" + vXMLData = Array( _ + Array("start", "office:document-styles", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:style", "CDATA", "http://openoffice.org/2000/style"), _ + Array("start", "office:styles"), _ + Array("start", "style:style", _ + "style:name", "CDATA", sStyleName, _ + "style:family", "CDATA", sFamilyName), _ + Array("end", "style:style"), _ + Array("end", "office:styles"), _ + Array("end", "office:document")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oStyleFamilies, oFamily As Object + out.log("checking of import...") + oStyleFamilies = oDoc.getStyleFamilies() + oFamily = oStyleFamilies.getByName(sFamilyName) + res = oFamily.hasByName(sStyleName) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentExporter/script.xlb new file mode 100644 index 000000000000..21db72258f7f --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentExporter/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="xmloff_Impress_XMLContentExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLContentExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentExporter/xmloff_Impress_XMLContentExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentExporter/xmloff_Impress_XMLContentExporter.xba new file mode 100644 index 000000000000..ecae9c11962c --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentExporter/xmloff_Impress_XMLContentExporter.xba @@ -0,0 +1,112 @@ +<?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="xmloff_Impress_XMLContentExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLContentExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oDrawPages As Object + Dim oDrawPage As Object + Dim printXML As Boolean + Dim filter As Variant + Dim expString As String + Dim Tag1, Tag2, Tag3 As Variant + + printXML = true + expString = "NewNameOfDrawPage" + oMSF = getProcessServiceManager() + oDoc = utils.createImpressDocument(cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-content") + Tag2 = Array("office:body") + Tag3 = Array("draw:page", "draw:name", expString) + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag2) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Impress.XMLContentExporter", initArgs()) + + oDrawPages = oDoc.getDrawPages() + oDrawPage = oDrawPages.getByIndex(0) + oDrawPage.setName(expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "simpress: StarOffice XML (Impress)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentImporter/script.xlb new file mode 100644 index 000000000000..3e9ff2fc3259 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentImporter/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="xmloff_Impress_XMLContentImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLContentImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentImporter/xmloff_Impress_XMLContentImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentImporter/xmloff_Impress_XMLContentImporter.xba new file mode 100644 index 000000000000..4a2ed5d7f7b7 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLContentImporter/xmloff_Impress_XMLContentImporter.xba @@ -0,0 +1,128 @@ +<?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="xmloff_Impress_XMLContentImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sPageName As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLContentImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createImpressDocument(cObjectName) + oObj = createUnoService("com.sun.star.comp.Draw.XMLContentImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sPageName = "XMLImporterPage" + vXMLData = Array( _ + Array("start", "office:document", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:presentation", "CDATA", "http://openoffice.org/2000/presentation", _ + "xmlns:svg", "CDATA", "http://openoffice.org/2000/svg", _ + "xmlns:draw", "CDATA", "http://openoffice.org/2000/drawing", _ + "office:class", "CDATA", "presentation", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:body"), _ + Array("start", "draw:page", _ + "draw:name", "CDATA", sPageName, _ + "draw:master-page-name", "CDATA", "Default"), _ + Array("start", "presentation:notes"), _ + Array("start", "draw:page-thumbnail", _ + "draw:style-name", "CDATA", "gr1", _ + "draw:layer", "CDATA", "layout", _ + "svg:width", "CDATA", "12.768cm", _ + "svg:height", "CDATA", "9.576cm", _ + "svg:x", "CDATA", "4.411cm", _ + "svg:y", "CDATA", "2.794cm", _ + "presentation:class", "CDATA", "page", _ + "draw:page-number", "CDATA", "1"), _ + Array("end", "draw:page-thumbnail"), _ + Array("start", "draw:text-box", _ + "presentation:style-name", "CDATA", "Default-notes", _ + "draw:layer", "CDATA", "layout", _ + "svg:width", "CDATA", "15.021cm", _ + "svg:height", "CDATA", "10.63cm", _ + "svg:x", "CDATA", "3.292cm", _ + "svg:y", "CDATA", "13.299cm", _ + "presentation:class", "CDATA", "notes", _ + "presentation:placeholder", "CDATA", "true"), _ + Array("end", "draw:text-box"), _ + Array("end", "presentation:notes"), _ + Array("end", "draw:page"), _ + Array("end", "office:body"), _ + Array("end", "office:document")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim i As Integer + Dim res As Boolean + Dim oPages, oPage As Object + Dim pageName As String + res = False + out.log("checking of import...") + oPages = oDoc.getDrawPages() + out.log("Draw pages:") + For i = 0 to oPages.getCount() - 1 + oPage = oPages.getByIndex(i) + pageName = oPage.getName() + out.log(pageName) + If pageName = sPageName then + res = True + EndIf + Next i + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLExporter/script.xlb new file mode 100644 index 000000000000..c2bc67de1188 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLExporter/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="xmloff_Impress_XMLExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLExporter/xmloff_Impress_XMLExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLExporter/xmloff_Impress_XMLExporter.xba new file mode 100644 index 000000000000..7d7f74a9a5c5 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLExporter/xmloff_Impress_XMLExporter.xba @@ -0,0 +1,112 @@ +<?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="xmloff_Impress_XMLExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oDrawPages, oDrawPage As Object + Dim printXML As Boolean + Dim filter As Variant + Dim expString As String + Dim Tag1, Tag2, Tag3 As Variant + + printXML = true + expString = "NewNameOfDrawPageInserted" + oMSF = getProcessServiceManager() + oDoc = utils.createImpressDocument(cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document") + Tag2 = Array("office:body") + Tag3 = Array("draw:page", "draw:name", expString) + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag2) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Impress.XMLExporter", initArgs()) + + oDrawPages = oDoc.getDrawPages() + oDrawPages.insertNewByIndex(0) + oDrawPage = oDrawPages.getByIndex(0) + oDrawPage.setName(expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "simpress: StarOffice XML (Impress)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLImporter/script.xlb new file mode 100644 index 000000000000..156d8a1320c4 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLImporter/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="xmloff_Impress_XMLImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLImporter/xmloff_Impress_XMLImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLImporter/xmloff_Impress_XMLImporter.xba new file mode 100644 index 000000000000..f2b748ae0932 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLImporter/xmloff_Impress_XMLImporter.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="xmloff_Impress_XMLImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sName As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createImpressDocument(cObjectName) + oObj = createUnoService("com.sun.star.comp.Impress.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sName = "XMLImporter" + vXMLData = Array( _ + Array("start", "office:document", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:draw", "CDATA", "http://openoffice.org/2000/drawing"), _ + Array("start", "office:body"), _ + Array("start", "draw:page", _ + "draw:name", "CDATA", sName), _ + Array("end", "draw:page"), _ + Array("end", "office:body"), _ + Array("end", "office:document")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oPages As Object + out.log("checking of import...") + oPages = oDoc.getDrawPages() + res = oPages.hasByName(sName) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaExporter/script.xlb new file mode 100644 index 000000000000..626859cbd89f --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaExporter/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="xmloff_Impress_XMLMetaExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLMetaExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaExporter/xmloff_Impress_XMLMetaExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaExporter/xmloff_Impress_XMLMetaExporter.xba new file mode 100644 index 000000000000..35b08c5b9ae6 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaExporter/xmloff_Impress_XMLMetaExporter.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="xmloff_Impress_XMLMetaExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLMetaExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oDocInfo As Object + Dim printXML As Boolean + Dim expString As String + Dim Tag1, Tag2, Tag3 As Variant + Dim filter As Variant + + printXML = true + expString = "NewTitleOfDrawDocument" + oMSF = getProcessServiceManager() + oDoc = utils.createImpressDocument(cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-meta") + Tag2 = Array("office:meta") + Tag3 = Array("dc:title") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag2), _ + Array("CharsEnclosed", Tag3, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Impress.XMLMetaExporter", initArgs()) + + oDocInfo = oDoc.getDocumentInfo() + oDocInfo.setPropertyValue("Title", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "simpress: StarOffice XML (Impress)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaImporter/script.xlb new file mode 100644 index 000000000000..d14b4ba77dec --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaImporter/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="xmloff_Impress_XMLMetaImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLMetaImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaImporter/xmloff_Impress_XMLMetaImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaImporter/xmloff_Impress_XMLMetaImporter.xba new file mode 100644 index 000000000000..02cc5904d961 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLMetaImporter/xmloff_Impress_XMLMetaImporter.xba @@ -0,0 +1,93 @@ +<?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="xmloff_Impress_XMLMetaImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sTitle As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLMetaImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createImpressDocument(cObjectName) + oObj = createUnoService("com.sun.star.comp.Impress.XMLMetaImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sTitle = "XMLMetaImporter_Title" + vXMLData = Array( _ + Array("start", "office:document-meta", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:dc", "CDATA", "http://purl.org/dc/elements/1.1/"), _ + Array("start", "office:meta"), _ + Array("start", "dc:title"), _ + Array("chars", sTitle), _ + Array("end", "dc:title"), _ + Array("end", "office:meta"), _ + Array("end", "office:document-meta")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oDocInfo As Object + Dim title As String + out.log("checking of import...") + oDocInfo = oDoc.getDocumentInfo() + title = oDocInfo.getPropertyValue("Title") + out.log("Title: " + title) + res = (title = sTitle) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsExporter/script.xlb new file mode 100644 index 000000000000..68a37fac28ca --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsExporter/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="xmloff_Impress_XMLSettingsExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLSettingsExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsExporter/xmloff_Impress_XMLSettingsExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsExporter/xmloff_Impress_XMLSettingsExporter.xba new file mode 100644 index 000000000000..e379102d46f3 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsExporter/xmloff_Impress_XMLSettingsExporter.xba @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Impress_XMLSettingsExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLSettingsExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oController As Object + Dim oProp, oPropToSet As Boolean + Dim printXML As Boolean + Dim filter As Variant + Dim Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7 As Variant + + printXML = true + oMSF = getProcessServiceManager() + oDoc = utils.createImpressDocument(cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + oController = oDoc.getCurrentController() + oProp = oController.getPropertyValue("IsLayerMode") + if (oProp = false) then + oPropToSet = true + else + oPropToSet = false + endif + + Tag1 = Array("office:settings") + Tag2 = Array("office:document-settings") + Tag3 = Array("config:config-item-set") + Tag4 = Array("config:config-item-map-indexed") + Tag5 = Array("config:config-item-map-entry") + Tag6 = Array("config:config-item") + Tag7 = Array("config:config-item","config:name","IsLayerMode") + filter = Array( _ + Array("TagEnclosed", Tag1, Tag2), _ + Array("TagEnclosed", Tag3, Tag2), _ + Array("TagEnclosed", Tag4, Tag3), _ + Array("TagEnclosed", Tag5, Tag4), _ + Array("TagEnclosed", Tag6, Tag5), _ + Array("CharsEnclosed", Tag7, LCase(oPropToSet)) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Impress.XMLSettingsExporter", initArgs()) + + oController.setPropertyValue("IsLayerMode", oPropToSet) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "simpress: StarOffice XML (Impress)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsImporter/script.xlb new file mode 100644 index 000000000000..9e2d4d8544c2 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsImporter/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="xmloff_Impress_XMLSettingsImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLSettingsImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsImporter/xmloff_Impress_XMLSettingsImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsImporter/xmloff_Impress_XMLSettingsImporter.xba new file mode 100644 index 000000000000..63478a532853 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLSettingsImporter/xmloff_Impress_XMLSettingsImporter.xba @@ -0,0 +1,95 @@ +<?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="xmloff_Impress_XMLSettingsImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLSettingsImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createImpressDocument(cObjectName) + oObj = createUnoService("com.sun.star.comp.Impress.XMLSettingsImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + vXMLData = Array( _ + Array("start", "office:document-settings", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:xlink", "CDATA", "http://www.w3.org/1999/xlink", _ + "xmlns:presentation", "CDATA", "http://openoffice.org/2000/presentation", _ + "xmlns:config", "CDATA", "http://openoffice.org/2001/config", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:settings"), _ + Array("start", "config:config-item-map-indexed", _ + "config:name", "CDATA", "Views"), _ + Array("start", "config:config-item-map-entry"), _ + Array("start","config:config-item", _ + "config:name", "CDATA", "IsLayerMode"), _ + Array("chars", "true"), _ + Array("end", "config:config-item"), _ + Array("end", "config:config-item-map-entry"), _ + Array("end", "config:config-item-map-indexed"), _ + Array("end", "office:settings"), _ + Array("end", "office:document-settings")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oController As Object + out.log("checking of import...") + oController = oDoc.getCurrentController() + res = oController.getPropertyValue("IsLayerMode") + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesExporter/script.xlb new file mode 100644 index 000000000000..7125cbfe7aa1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesExporter/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="xmloff_Impress_XMLStylesExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLStylesExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesExporter/xmloff_Impress_XMLStylesExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesExporter/xmloff_Impress_XMLStylesExporter.xba new file mode 100644 index 000000000000..37c940dbc2cd --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesExporter/xmloff_Impress_XMLStylesExporter.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="xmloff_Impress_XMLStylesExporter" 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.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLStylesExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0), oMSF, oStyleFamilies, oFamily, oStyle As Object + Dim oSFNames As Variant + Dim oFamilyName As String + Dim printXML As Boolean + Dim filter As Variant + Dim expString As String + Dim Tag1, Tag2, Tag3 As Variant + + printXML = true + expString = "NewStyle" + oMSF = getProcessServiceManager() + oDoc = utils.createImpressDocument(cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-styles") + Tag2 = Array("office:styles") + Tag3 = Array("style:style", "style:name", expString) + filter = Array( _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag2) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Impress.XMLStylesExporter", initArgs()) + + oStyleFamilies = oDoc.getStyleFamilies() + oSFNames = oStyleFamilies.getElementNames() + oFamilyName = oSFNames(0) + oFamily = oStyleFamilies.getByName(oFamilyName) + oStyle = oDoc.createInstance("com.sun.star.style.Style") + oFamily.insertByName(expString, oStyle) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "simpress: StarOffice XML (Impress)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesImporter/script.xlb new file mode 100644 index 000000000000..ca13dec7f9c1 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesImporter/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="xmloff_Impress_XMLStylesImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Impress_XMLStylesImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesImporter/xmloff_Impress_XMLStylesImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesImporter/xmloff_Impress_XMLStylesImporter.xba new file mode 100644 index 000000000000..9b64c3997631 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Impress/XMLStylesImporter/xmloff_Impress_XMLStylesImporter.xba @@ -0,0 +1,95 @@ +<?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="xmloff_Impress_XMLStylesImporter" 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.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sStyleName As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Impress.XMLStylesImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.createImpressDocument(cObjectName) + oObj = createUnoService("com.sun.star.comp.Impress.XMLStylesImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sStyleName = "New style for test XMLStylesImporter" + vXMLData = Array( _ + Array("start", "office:document-styles", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:style", "CDATA", "http://openoffice.org/2000/style", _ + "xmlns:fo", "CDATA", "http://www.w3.org/1999/XSL/Format", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table"), _ + Array("start", "office:styles"), _ + Array("start", "style:style", _ + "style:name", "CDATA", sStyleName, _ + "style:family", "CDATA", "graphics", _ + "style:parent-style-name", "CDATA", "standard"), _ + Array("end", "style:style"), _ + Array("end", "office:styles"), _ + Array("end", "office:document-styles")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oStyleFamilies, oFamily As Object + out.log("checking of import...") + oStyleFamilies = oDoc.getStyleFamilies() + oFamily = oStyleFamilies.getByName("graphics") + res = oFamily.hasByName(sStyleName) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> |