summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/basic/mod
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-09-10 11:35:38 +0200
committersb <sb@openoffice.org>2009-09-10 11:35:38 +0200
commitc5f6b62c6560b0aaac70efc448ab7ab2c4c9cf1a (patch)
tree06f52208114b88f10eea7d81171caa41e9c14e14 /qadevOOo/tests/basic/mod
parent0f4466a299b50c9deefbfad301dc1ae7c4b97f48 (diff)
#101955# configmgr2 unoapi tests
Diffstat (limited to 'qadevOOo/tests/basic/mod')
-rw-r--r--qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/cfgmgr2_OInnerTreeSetUpdateAccess.xba131
-rw-r--r--qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/script.xlb5
-rw-r--r--qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/cfgmgr2_OInnerValueSetUpdateAccess.xba154
-rw-r--r--qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/script.xlb5
4 files changed, 0 insertions, 295 deletions
diff --git a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/cfgmgr2_OInnerTreeSetUpdateAccess.xba b/qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/cfgmgr2_OInnerTreeSetUpdateAccess.xba
deleted file mode 100644
index aeae3b88bf92..000000000000
--- a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/cfgmgr2_OInnerTreeSetUpdateAccess.xba
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="OInnerTreeSetUpdateAccess" script:language="StarBasic">
-
-'*************************************************************************
-'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2008 by Sun Microsystems, Inc.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' $RCSfile: cfgmgr2_OInnerTreeSetUpdateAccess.xba,v $
-'
-' $Revision: 1.4 $
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/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::container::XNameReplace"
- ' needs the following Global variables:
- Global cNameToReplace As String 'name of instance to be replased
- Global oReplaceInstance As Object 'instance, that will be inserted
-
-' "com::sun::star::container::XNameContainer"
- ' needs the following Global variables:
- Global oInstance As Object 'instance to insert
-
-' "com::sun::star::lang::XComponent#optional"
- ' needs the following Global variables:
- Global oComponentInstance As Object ' it will be disposed
-
-' "com::sun::star::lang::XMultiServiceFactory#optional"
- ' needs the following Global variables:
-' - Global cServiceName As String ie. "com.sun.star.drawing.RectangleShape"
-' - Global bCreateInstanceWithoutArguments As Boolean
-' - Global aArguments() As Variant
-
-' "com::sun::star::container::XContainer#optional"
- ' needs the following Global variables:
- Global oElementToInsert As Object
- Global oContainer As Object 'in case if the component tested does
-
-' "com::sun::star::container::XNamed"
- ' needs the following Global variables:
- Global cNameToSet As String
- '"fixed" if name is fixed
-
-' "com::sun::star::lang::XSingleServiceFactory#optional"
- ' needs the following Global variables:
- Global aArguments As Variant '[optional]
- Global aMustSupportInterface As Variant '[optional]
-
-
-Sub CreateObj()
-
-'*************************************************************************
-' COMPONENT:
-' OInnerTreeSetUpdateAccess
-'*************************************************************************
-On Error Goto ErrHndl
-
- Dim nodeArgs(1) as new com.sun.star.beans.PropertyValue
- Dim nodepath as new com.sun.star.beans.PropertyValue
- nodepath.Name = "nodepath"
- nodepath.Value = "org.openoffice.Office.Jobs"
- nodepath.Handle = -1
- nodepath.State = com.sun.star.beans.PropertyState.DEFAULT_VALUE
- nodeArgs(0) = nodepath
-
- Dim oProvider as Object
- oProvider = createUnoservice(_
- "com.sun.star.comp.configuration.ConfigurationProvider"
- Dim oObjectNames as Object
- Dim oComponentNames as Object
- oObjectNames = oProvider.createInstanceWithArguments(_
- "com.sun.star.configuration.ConfigurationUpdateAccess",_
- nodeArgs())
- oComponentNames = oProvider.createInstanceWithArguments(_
- "com.sun.star.configuration.ConfigurationUpdateAccess",_
- nodeArgs())
-
-
- oComponentInstance = oComponentNames.getByHierarchicalName("Jobs")
- oObj = oObjectNames.getByHierarchicalName("Jobs")
-
- Dim cNames() as String
- cNames = oObj.getElementNames()
-
- cNameToReplace = cNames(0) 'name of instance to be replased
- oReplaceInstance = oObj.createInstance()'instance, that will be inserted
- oInstance = oObj.createInstance()
- cNameToSet = "fixed"
- oElementToInsert = oObj.createInstance()
- oContainer = oObj
- oObjRelation(0).Name = "cannotSwitchParent"
- oObjRelation(0).Value = "configmgr: BasicElement::setParent: cannot move Entry"
- oObjRelation(1).Name = "ElementName"
- oObjRelation(1).Value = cNames(0)
- oObjRelation(2).Name = "HierarchicalName"
- oObjRelation(2).Value = "/org.openoffice.Office"
- oObjRelation(3).Name = "expectedName"
- oObjRelation(3).Value = cNames(0)
-
-Exit Sub
-ErrHndl:
- Test.Exception()
-End Sub
-</script:module>
diff --git a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/script.xlb b/qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/script.xlb
deleted file mode 100644
index 1b35dd20c108..000000000000
--- a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/script.xlb
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
- <library:library xmlns:library="http://openoffice.org/2000/library" library:name="cfgmgr2_OInnerTreeSetUpdateAccess" library:readonly="false" library:passwordprotected="false">
- <library:element library:name="cfgmgr2_OInnerTreeSetUpdateAccess"/>
- </library:library>
diff --git a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/cfgmgr2_OInnerValueSetUpdateAccess.xba b/qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/cfgmgr2_OInnerValueSetUpdateAccess.xba
deleted file mode 100644
index 27ec00a3f8f0..000000000000
--- a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/cfgmgr2_OInnerValueSetUpdateAccess.xba
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="OInnerValueSetUpdateAccess" script:language="StarBasic">
-
-'*************************************************************************
-'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2008 by Sun Microsystems, Inc.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' $RCSfile: cfgmgr2_OInnerValueSetUpdateAccess.xba,v $
-'
-' $Revision: 1.4 $
-'
-' This file is part of OpenOffice.org.
-'
-' OpenOffice.org is free software: you can redistribute it and/or modify
-' it under the terms of the GNU Lesser General Public License version 3
-' only, as published by the Free Software Foundation.
-'
-' OpenOffice.org is distributed in the hope that it will be useful,
-' but WITHOUT ANY WARRANTY; without even the implied warranty of
-' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-' GNU Lesser General Public License version 3 for more details
-' (a copy is included in the LICENSE file that accompanied this code).
-'
-' You should have received a copy of the GNU Lesser General Public License
-' version 3 along with OpenOffice.org. If not, see
-' <http://www.openoffice.org/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::container::XNameReplace"
- ' needs the following object relation:
- Global cNameToReplace As String 'name of instance to be replased
- Global oReplaceInstance As Variant 'instance, that will be inserted
-
-' "com::sun::star::container::XNameContainer"
- ' needs the following object relation:
- Global oInstance As Variant 'instance to insert
-
-' "com::sun::star::lang::XComponent#optional"
- ' needs the following object relation:
- Global oComponentInstance As Variant 'it will be disposed
-
-' "com::sun::star::container::XHierarchicalNameAccess"
- ' needs the following object relation:
-' ObjectRelation: oObjRelation(0).Name = "ElementName"
-' ObjectRelation: oObjRelation(0).Value = "MyAccessibleElementName"
-
-' "com::sun::star::lang::XMultiServiceFactory#optional"
- ' needs the following object relation:
-' - Global cServiceName As String ie. "com.sun.star.drawing.RectangleShape"
-' - Global bCreateInstanceWithoutArguments As Boolean
-' - Global aArguments() As Variant
-
-' "com::sun::star::beans::XExactName"
- ' needs the following object relation:
-' ObjectRelation: oObjRelation(0).Name = "expectedName"
-' ObjectRelation: oObjRelation(0).Value = "MyExpectedName"
-
-' "com::sun::star::container::XContainer#optional"
- ' needs the following object relation:
- Global oElementToInsert As Variant
- Global oContainer As Variant ' in case if the component tested does
-
-' "com::sun::star::container::XNamed"
- ' needs the following object relation:
- Global cNameToSet As String '"fixed" if name is fixed
-
-' "com::sun::star::lang::XSingleServiceFactory#optional"
- ' needs the following object relation:
-' - Global aArguments As Variant [optional]
-' Global aMustSupportInterface As Variant [optional]
-
-' "com::sun::star::container::XChild#optional"
- ' needs the following object relation:
-' ObjectRelation: oObjRelation(0).Name = "cannotSwitchParent"
-' ObjectRelation: oObjRelation(0).Value = "configmgr: BasicElement::setParent: cannot move Entry"
-
-' "com::sun::star::container::XHierarchicalName"
- ' needs the following object relation:
-' ObjectRelation: oObjRelation(0).Name = "ElementName"
-' ObjectRelation: oObjRelation(0).Value = "MyAccessibleElementName"
-' ObjectRelation: oObjRelation(1).Name = "HierarchicalName"
-' ObjectRelation: oObjRelation(1).Value = "MyHierachicalName"
-
-
-Sub CreateObj()
-
-'*************************************************************************
-' COMPONENT:
-' com.sun.star.OInnerValueSetUpdateAccess
-'*************************************************************************
-On Error Goto ErrHndl
-
- Dim nodeArgs(1) as new com.sun.star.beans.PropertyValue
- Dim nodepath as new com.sun.star.beans.PropertyValue
- nodepath.Name = "nodepath"
- nodepath.Value = "org.openoffice.Office.Common"
- nodepath.Handle = -1
- nodepath.State = com.sun.star.beans.PropertyState.DEFAULT_VALUE
-
- oObj = oDoc
- nodeArgs(0) = nodepath
-
- Dim oProvider as Object
- oProvider = createUnoservice(_
- "com.sun.star.comp.configuration.ConfigurationProvider"
- Dim oObjectNames as Object
- Dim oComponentNames as Object
- oObjectNames = oProvider.createInstanceWithArguments(_
- "com.sun.star.configuration.ConfigurationUpdateAccess",_
- nodeArgs())
- oComponentNames = oProvider.createInstanceWithArguments(_
- "com.sun.star.configuration.ConfigurationUpdateAccess",_
- nodeArgs())
-
-
- oComponentInstance = oComponentNames.getByName("ExternalApps")
- oObj = oObjectNames.getByName("ExternalApps")
-
-
- 'Dim cNames() as String
- 'cNames = oObj.getElementNames()
-
- cNameToReplace = "file" 'name of instance to be replased
- oReplaceInstance = "NewOne"' oObj.createInstance()'instance, that will be inserted
- oInstance = "AnotherOne"
- cNameToSet = "fixed"
- oElementToInsert = "JustAnotherOne"
- oObjRelation(0).Name = "ElementName"
- oObjRelation(0).Value = "file"
- oObjRelation(1).Name = "HierarchicalName"
- oObjRelation(1).Value = "/org.openoffice.Office"
- oObjRelation(2).Name = "expectedName"
- oObjRelation(2).Value = "file"
- oObjRelation(3).Name = "cannotSwitchParent"
- oObjRelation(3).Value = "configmgr: BasicElement::setParent: cannot move Entry"
-
-Exit Sub
-ErrHndl:
- Test.Exception()
-End Sub
-</script:module>
diff --git a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/script.xlb b/qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/script.xlb
deleted file mode 100644
index 1c1ea9721f42..000000000000
--- a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/script.xlb
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
- <library:library xmlns:library="http://openoffice.org/2000/library" library:name="cfgmgr2_OInnerValueSetUpdateAccess" library:readonly="false" library:passwordprotected="false">
- <library:element library:name="cfgmgr2_OInnerValueSetUpdateAccess"/>
- </library:library>