diff options
71 files changed, 550 insertions, 4685 deletions
diff --git a/qadevOOo/objdsc/configmgr/com.sun.star.comp.configuration.ConfigurationProvider.csv b/qadevOOo/objdsc/configmgr/com.sun.star.comp.configuration.ConfigurationProvider.csv new file mode 100644 index 000000000000..4a56a474016c --- /dev/null +++ b/qadevOOo/objdsc/configmgr/com.sun.star.comp.configuration.ConfigurationProvider.csv @@ -0,0 +1,45 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +# In addition to the interfaces of css.configuration.ConfigurationProvider also +# test the additional, optional (but implemented) interfaces of +# css.configuration.DefaultProvider: + +"ConfigurationProvider";"com::sun::star::lang::XComponent";"addEventListener()" +"ConfigurationProvider";"com::sun::star::lang::XComponent";"dispose()" +"ConfigurationProvider";"com::sun::star::lang::XComponent";"removeEventListener()" +"ConfigurationProvider";"com::sun::star::lang::XLocalizable";"getLocale()" +"ConfigurationProvider";"com::sun::star::lang::XLocalizable";"setLocale()" +"ConfigurationProvider";"com::sun::star::lang::XMultiServiceFactory";"createInstance()" +"ConfigurationProvider";"com::sun::star::lang::XMultiServiceFactory";"createInstanceWithArguments()" +"ConfigurationProvider";"com::sun::star::lang::XMultiServiceFactory";"getAvailableServiceNames()" +"ConfigurationProvider";"com::sun::star::util::XFlushable";"addFlushListener()" +"ConfigurationProvider";"com::sun::star::util::XFlushable";"flush()" +"ConfigurationProvider";"com::sun::star::util::XFlushable";"removeFlushListener()" +"ConfigurationProvider";"com::sun::star::util::XRefreshable";"addRefreshListener()" +"ConfigurationProvider";"com::sun::star::util::XRefreshable";"refresh()" +"ConfigurationProvider";"com::sun::star::util::XRefreshable";"removeRefreshListener()" diff --git a/qadevOOo/objdsc/configmgr/com.sun.star.comp.configuration.DefaultProvider.csv b/qadevOOo/objdsc/configmgr/com.sun.star.comp.configuration.DefaultProvider.csv new file mode 100644 index 000000000000..fb668750f670 --- /dev/null +++ b/qadevOOo/objdsc/configmgr/com.sun.star.comp.configuration.DefaultProvider.csv @@ -0,0 +1,33 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +# Only test non-modifying functionality of css.configuration.DefaultProvider: + +"DefaultProvider";"com::sun::star::lang::XLocalizable";"getLocale()" +"DefaultProvider";"com::sun::star::lang::XMultiServiceFactory";"createInstance()" +"DefaultProvider";"com::sun::star::lang::XMultiServiceFactory";"createInstanceWithArguments()" +"DefaultProvider";"com::sun::star::lang::XMultiServiceFactory";"getAvailableServiceNames()" diff --git a/qadevOOo/tests/basic/ifc/configuration/XTemplateContainer/configuration_XTemplateContainer.xba b/qadevOOo/tests/basic/ifc/configuration/XTemplateContainer/configuration_XTemplateContainer.xba deleted file mode 100644 index 53ff24bf2a88..000000000000 --- a/qadevOOo/tests/basic/ifc/configuration/XTemplateContainer/configuration_XTemplateContainer.xba +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="XTemplateContainer" script:language="StarBasic"> - -'************************************************************************* -' -' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -' -' Copyright 2000, 2010 Oracle and/or its affiliates. -' -' OpenOffice.org - a multi-platform office productivity suite -' -' This file is part of OpenOffice.org. -' -' OpenOffice.org is free software: you can redistribute it and/or modify -' it under the terms of the GNU Lesser General Public License version 3 -' only, as published by the Free Software Foundation. -' -' OpenOffice.org is distributed in the hope that it will be useful, -' but WITHOUT ANY WARRANTY; without even the implied warranty of -' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -' GNU Lesser General Public License version 3 for more details -' (a copy is included in the LICENSE file that accompanied this code). -' -' You should have received a copy of the GNU Lesser General Public License -' version 3 along with OpenOffice.org. If not, see -' <http://www.openoffice.org/license.html> -' for a copy of the LGPLv3 License. -' -'************************************************************************* -'************************************************************************* - -' Be sure that all variables are dimensioned: -option explicit - -Sub RunTest() - -'************************************************************************* -' INTERFACE: -' com.sun.star.configuration.XTemplateContainer -'************************************************************************* -On Error Goto ErrHndl - Dim bOK As Boolean - - Test.StartMethod("getElementTemplateName()") - bOK = TRUE - Dim cResult as String - cResult = oObj.getElementTemplateName() - bOK = bOK AND (Len(cResult) > 0) - - Test.MethodTested("getElementTemplateName()", bOK) - -Exit Sub -ErrHndl: - Test.Exception() - bOK = false - resume next -End Sub -</script:module> diff --git a/qadevOOo/tests/basic/ifc/configuration/XTemplateContainer/script.xlb b/qadevOOo/tests/basic/ifc/configuration/XTemplateContainer/script.xlb deleted file mode 100644 index e430e80ad9e8..000000000000 --- a/qadevOOo/tests/basic/ifc/configuration/XTemplateContainer/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="configuration_XTemplateContainer" library:readonly="false" library:passwordprotected="false"> - <library:element library:name="configuration_XTemplateContainer"/> - </library:library> 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 f0fb28a88941..000000000000 --- a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerTreeSetUpdateAccess/cfgmgr2_OInnerTreeSetUpdateAccess.xba +++ /dev/null @@ -1,127 +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 2000, 2010 Oracle and/or its affiliates. -' -' OpenOffice.org - a multi-platform office productivity suite -' -' This file is part of OpenOffice.org. -' -' OpenOffice.org is free software: you can redistribute it and/or modify -' it under the terms of the GNU Lesser General Public License version 3 -' only, as published by the Free Software Foundation. -' -' OpenOffice.org is distributed in the hope that it will be useful, -' but WITHOUT ANY WARRANTY; without even the implied warranty of -' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -' GNU Lesser General Public License version 3 for more details -' (a copy is included in the LICENSE file that accompanied this code). -' -' You should have received a copy of the GNU Lesser General Public License -' version 3 along with OpenOffice.org. If not, see -' <http://www.openoffice.org/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 702a832bdf71..000000000000 --- a/qadevOOo/tests/basic/mod/cfgmgr2/OInnerValueSetUpdateAccess/cfgmgr2_OInnerValueSetUpdateAccess.xba +++ /dev/null @@ -1,150 +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 2000, 2010 Oracle and/or its affiliates. -' -' OpenOffice.org - a multi-platform office productivity suite -' -' This file is part of OpenOffice.org. -' -' OpenOffice.org is free software: you can redistribute it and/or modify -' it under the terms of the GNU Lesser General Public License version 3 -' only, as published by the Free Software Foundation. -' -' OpenOffice.org is distributed in the hope that it will be useful, -' but WITHOUT ANY WARRANTY; without even the implied warranty of -' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -' GNU Lesser General Public License version 3 for more details -' (a copy is included in the LICENSE file that accompanied this code). -' -' You should have received a copy of the GNU Lesser General Public License -' version 3 along with OpenOffice.org. If not, see -' <http://www.openoffice.org/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> diff --git a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java index 3ca8794b87f4..bf05553bcb6d 100644 --- a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java +++ b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java @@ -423,8 +423,6 @@ public class CheckModuleAPI extends ComplexTestCase * fwk -> framework * fwl -> framework * sch -> chart2 - * sysmgr1 -> configmgr - * cfgmgr2 -> configmgr * lnn -> lingu * lng -> linguistic * sfx -> sfx2 @@ -438,8 +436,6 @@ public class CheckModuleAPI extends ComplexTestCase aModuleHashMap.put("fwk", "framework"); aModuleHashMap.put("fwl", "framework"); aModuleHashMap.put("sch", "chart2"); - aModuleHashMap.put("sysmgr1", "configmgr"); - aModuleHashMap.put("cfgmag2", "configmgr"); aModuleHashMap.put("lnn", "lingu"); aModuleHashMap.put("lng", "linguistic"); aModuleHashMap.put("sfx", "sfx2"); diff --git a/qadevOOo/tests/java/ifc/lang/_XComponent.java b/qadevOOo/tests/java/ifc/lang/_XComponent.java index 8e0ccdcc5ffd..e7493e377141 100644 --- a/qadevOOo/tests/java/ifc/lang/_XComponent.java +++ b/qadevOOo/tests/java/ifc/lang/_XComponent.java @@ -82,7 +82,9 @@ public class _XComponent extends MultiMethodTest { XEventListener listener2 = new MyEventListener2(); /** - * For the cfgmgr2.OSetElement tests: dispose the owner element. + * For the (no longer existing) cfgmgr2.OSetElement tests: dispose the owner + * element. TODO: Is this needed for anything else, too, or should it be + * removed? */ protected void before() { // do not dispose this component, but parent instead diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/AdministrationProvider.java b/qadevOOo/tests/java/mod/_cfgmgr2/AdministrationProvider.java deleted file mode 100644 index 386b8b3b4562..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/AdministrationProvider.java +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._cfgmgr2; - -import java.io.PrintWriter; -import java.util.Vector; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; - - -public class AdministrationProvider extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. - * - * For this an instance of com.sun.star.comp.configuration.AdministrationProvider - * is created at the MultiServiceFactory of the Office - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.AdministrationProvider"); - } catch (com.sun.star.uno.Exception e) { - } - - util.dbg.printInterfaces(oObj); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Setup"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - Vector args = new Vector(); - - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("XMSF.Args", - args.toArray(new Object[args.size()][])); - tEnv.addObjRelation("needArgs", "AdministrationProvider"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/BootstrapContext.java b/qadevOOo/tests/java/mod/_cfgmgr2/BootstrapContext.java deleted file mode 100644 index a0e79bd27127..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/BootstrapContext.java +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; - -public class BootstrapContext extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.bootstrap.BootstrapContext"); - } catch (com.sun.star.uno.Exception e) { - } - - System.out.println("Implementation name: "+ util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/ConfigurationProvider.java b/qadevOOo/tests/java/mod/_cfgmgr2/ConfigurationProvider.java deleted file mode 100644 index 15c05a4317af..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/ConfigurationProvider.java +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._cfgmgr2; - -import java.io.PrintWriter; -import java.util.Vector; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; - - -public class ConfigurationProvider extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. - * - * For this an instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - } catch (com.sun.star.uno.Exception e) { - } - - util.dbg.printInterfaces(oObj); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Setup"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - Vector args = new Vector(); - - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("XMSF.Args", - args.toArray(new Object[args.size()][])); - tEnv.addObjRelation("needArgs", "ConfigurationProvider"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/ConfigurationProviderWrapper.java b/qadevOOo/tests/java/mod/_cfgmgr2/ConfigurationProviderWrapper.java deleted file mode 100644 index 006b719d787e..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/ConfigurationProviderWrapper.java +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -package mod._cfgmgr2; - -import java.io.PrintWriter; -import java.util.Vector; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; - -public class ConfigurationProviderWrapper extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - - XInterface oObj = null; - - try { - PropertyValue[] cArgs = new PropertyValue[2]; - cArgs[0] = new PropertyValue(); - cArgs[0].Name = "Locale"; - cArgs[0].Value = "DE"; - cArgs[1] = new PropertyValue(); - cArgs[1].Name = "EnableAsync"; - cArgs[1].Value = new Boolean(true); - - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstanceWithArguments("com.sun.star.comp.configuration.ConfigurationProvider",cArgs); - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Setup"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - Vector args = new Vector(); - - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - args.add(0, nodeArgs); - - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("XMSF.Args", - args.toArray(new Object[args.size()][])); - tEnv.addObjRelation("needArgs", "ConfigurationProvider"); - - return tEnv; - - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/CopyImporter.java b/qadevOOo/tests/java/mod/_cfgmgr2/CopyImporter.java deleted file mode 100644 index 173d6579e0ad..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/CopyImporter.java +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; - -public class CopyImporter extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.backend.CopyImporter"); - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LayerParser.java b/qadevOOo/tests/java/mod/_cfgmgr2/LayerParser.java deleted file mode 100644 index 984df1094207..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LayerParser.java +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._cfgmgr2; - -import com.sun.star.io.XActiveDataSink; -import com.sun.star.io.XInputStream; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -/** - * - * @author sw93809 - */ -public class LayerParser extends TestCase { - - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - XInterface oObj = null; - Object Pipe = null; - XSimpleFileAccess simpleAccess = null; - XInputStream xStream = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.backend.xml.LayerParser"); - Object fileacc = ((XMultiServiceFactory)tParam.getMSF()).createInstance("com.sun.star.comp.ucb.SimpleFileAccess"); - simpleAccess = (XSimpleFileAccess) - UnoRuntime.queryInterface(XSimpleFileAccess.class,fileacc); - String filename = util.utils.getOfficeURL((XMultiServiceFactory)tParam.getMSF())+"/../share/registry/data/org/openoffice/Setup.xcu"; - log.println("Going to parse: "+filename); - xStream = simpleAccess.openFileRead(filename); - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - XActiveDataSink xSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oObj); - xSink.setInputStream(xStream); - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("InputStream", xStream); - - return tEnv; - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LayerUpdateMerger.java b/qadevOOo/tests/java/mod/_cfgmgr2/LayerUpdateMerger.java deleted file mode 100644 index e9b035fa3c21..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LayerUpdateMerger.java +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import com.sun.star.configuration.backend.XLayer; -import com.sun.star.configuration.backend.XLayerHandler; -import com.sun.star.lang.XInitialization; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.XLayerHandlerImpl; -import util.XLayerImpl; - -public class LayerUpdateMerger extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - XLayerHandler xLayerHandler = null; - XLayer xLayer = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstance( - "com.sun.star.comp.configuration.backend.LayerUpdateMerger"); - - XInitialization xInit = (XInitialization) UnoRuntime.queryInterface( - XInitialization.class, oObj); - xLayerHandler = new XLayerHandlerImpl(); - xLayer = new XLayerImpl(); - - xInit.initialize(new Object[] { xLayerHandler,xLayer }); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("Implementation name: " + util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("LayerHandler", xLayerHandler); - tEnv.addObjRelation("Layer", xLayer); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LayerWriter.java b/qadevOOo/tests/java/mod/_cfgmgr2/LayerWriter.java deleted file mode 100644 index 7a2714c86042..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LayerWriter.java +++ /dev/null @@ -1,108 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import com.sun.star.io.XActiveDataSource; -import com.sun.star.io.XOutputStream; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - - -public class LayerWriter extends TestCase { - public XOutputStream xStream = null; - - /** - * Just clears flag which indicates that port is free now. - */ - public synchronized void disposeTestEnvironment(TestEnvironment tEnv, - TestParameters tParam) { - - - try { - xStream.closeOutput(); - } catch (com.sun.star.io.NotConnectedException e) { - } catch (com.sun.star.io.BufferSizeExceededException e) { - } catch (com.sun.star.io.IOException e) { - } - } - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - XSimpleFileAccess simpleAccess = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstance( - "com.sun.star.comp.configuration.backend.xml.LayerWriter"); - - Object fileacc = ((XMultiServiceFactory) tParam.getMSF()).createInstance( - "com.sun.star.comp.ucb.SimpleFileAccess"); - simpleAccess = (XSimpleFileAccess) UnoRuntime.queryInterface( - XSimpleFileAccess.class, fileacc); - - String filename = util.utils.getOfficeTemp( - (XMultiServiceFactory) tParam.getMSF()) + - "LayerWriter.xcu"; - log.println("Going to parse: " + filename); - - xStream = simpleAccess.openFileWrite(filename); - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: " + util.utils.getImplName(oObj)); - - XActiveDataSource xSource = (XActiveDataSource) UnoRuntime.queryInterface( - XActiveDataSource.class, oObj); - xSource.setOutputStream(xStream); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("OutputStream", xStream); - - return tEnv; - } -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LocalDataImporter.java b/qadevOOo/tests/java/mod/_cfgmgr2/LocalDataImporter.java deleted file mode 100644 index 25e3b2020482..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LocalDataImporter.java +++ /dev/null @@ -1,79 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import com.sun.star.beans.NamedValue; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - - -public class LocalDataImporter extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstance( - "com.sun.star.comp.configuration.backend.LocalDataImporter"); - } catch (com.sun.star.uno.Exception e) { - } - - String filename = util.utils.getOfficeURL( - (XMultiServiceFactory) tParam.getMSF()) + - "/../share/registry/data/org/openoffice/Setup.xcs"; - - Object[] vXJobArgs = new Object[1]; - NamedValue[] vXJobArg0 = new NamedValue[1]; - vXJobArg0[0] = new NamedValue("LayerDataUrl", filename); - vXJobArgs[0] = vXJobArg0; - - log.println("Implementation name: " + util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - tEnv.addObjRelation("XJobArgs", vXJobArgs); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LocalHierarchyBrowser.java b/qadevOOo/tests/java/mod/_cfgmgr2/LocalHierarchyBrowser.java deleted file mode 100644 index e1428d460016..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LocalHierarchyBrowser.java +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._cfgmgr2; - -import com.sun.star.beans.NamedValue; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class LocalHierarchyBrowser extends TestCase { - - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstance( - "com.sun.star.comp.configuration.backend.LocalHierarchyBrowser"); - } catch (com.sun.star.uno.Exception e) { - } - - String filename = util.utils.getOfficeURL( - (XMultiServiceFactory) tParam.getMSF()) + - "/../share/registry/data/org/openoffice"; - - String filename2 = util.utils.getOfficeURL( - (XMultiServiceFactory) tParam.getMSF()) + - "/../share/registry/schema/org/openoffice/"; - - Object[] vXJobArgs = new Object[2]; - NamedValue[] vXJobArg0 = new NamedValue[1]; - vXJobArg0[0] = new NamedValue("LayerDataUrl", filename); - NamedValue[] vXJobArg1 = new NamedValue[1]; - vXJobArg1[0] = new NamedValue("SchemaDataUrl", filename2); - vXJobArgs[0] = vXJobArg0; - vXJobArgs[1] = vXJobArg1; - - - log.println("Implementation name: " + util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - tEnv.addObjRelation("XJobArgs", vXJobArgs); - - return tEnv; - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LocalSchemaSupplier.java b/qadevOOo/tests/java/mod/_cfgmgr2/LocalSchemaSupplier.java deleted file mode 100644 index df8e51095f99..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LocalSchemaSupplier.java +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._cfgmgr2; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class LocalSchemaSupplier extends TestCase { - - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - XInterface oObj = null; - - try { - Object[] args = new Object[1]; - args[0] = ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.configuration.bootstrap.BootstrapContext"); - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstanceWithArguments("com.sun.star.comp.configuration.backend.LocalSchemaSupplier",args); - - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LocalSingleBackend.java b/qadevOOo/tests/java/mod/_cfgmgr2/LocalSingleBackend.java deleted file mode 100644 index 3f8b88551146..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LocalSingleBackend.java +++ /dev/null @@ -1,61 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -package mod._cfgmgr2; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class LocalSingleBackend extends TestCase { - - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - XInterface oObj = null; - - try { - Object[] args = new Object[1]; - args[0] = ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.configuration.bootstrap.BootstrapContext"); - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstanceWithArguments("com.sun.star.comp.configuration.backend.LocalSingleBackend",args); - - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - } - - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/LocalSingleStratum.java b/qadevOOo/tests/java/mod/_cfgmgr2/LocalSingleStratum.java deleted file mode 100644 index 39aad3cac3a2..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/LocalSingleStratum.java +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XStringSubstitution; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - - -public class LocalSingleStratum extends TestCase { - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - String AdminURL = ""; - - try { - Object[] args = new Object[1]; - XStringSubstitution sts = createStringSubstitution( - (XMultiServiceFactory) tParam.getMSF()); - String userURL = sts.getSubstituteVariableValue("$(user)"); - args[0] = userURL + "/registry"; - AdminURL = sts.getSubstituteVariableValue("$(inst)") + - "/share/registry"; - log.println("Using: " + args[0]); - oObj = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstanceWithArguments( - "com.sun.star.comp.configuration.backend.LocalSingleStratum", - args); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("Implementation name: " + util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("NoAdmin", AdminURL); - - return tEnv; - } - - public static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF) { - Object xPathSubst = null; - - try { - xPathSubst = xMSF.createInstance( - "com.sun.star.util.PathSubstitution"); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - if (xPathSubst != null) { - return (XStringSubstitution) UnoRuntime.queryInterface( - XStringSubstitution.class, xPathSubst); - } else { - return null; - } - } -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/MergeImporter.java b/qadevOOo/tests/java/mod/_cfgmgr2/MergeImporter.java deleted file mode 100644 index 0a69f6e34e82..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/MergeImporter.java +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._cfgmgr2; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class MergeImporter extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstance( - "com.sun.star.comp.configuration.backend.MergeImporter"); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("Implementation name: " + util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/MultiStratumBackend.java b/qadevOOo/tests/java/mod/_cfgmgr2/MultiStratumBackend.java deleted file mode 100644 index 737a08145974..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/MultiStratumBackend.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * MultiStratumBackend.java - * - * Created on 24. March 2004, 13:48 - */ - -package mod._cfgmgr2; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XStringSubstitution; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class MultiStratumBackend extends TestCase { - - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - XInterface oObj = null; - - Object[] args = new Object[1]; - String AdminURL = ""; - - try { - XStringSubstitution sts = createStringSubstitution( - (XMultiServiceFactory) tParam.getMSF()); - AdminURL = sts.getSubstituteVariableValue("$(inst)") + - "/share/registry"; - args[0] = ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.configuration.bootstrap.BootstrapContext"); - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstanceWithArguments("com.sun.star.comp.configuration.backend.MultiStratumBackend",args); - - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - //objRelation for XInitialization - tEnv.addObjRelation("XInitialization.args", args); - - //objRelation for XBackendEntities - tEnv.addObjRelation("NoAdmin", AdminURL); - tEnv.addObjRelation("MSB", Boolean.TRUE); - - return tEnv; - } - - public static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF) { - Object xPathSubst = null; - - try { - xPathSubst = xMSF.createInstance( - "com.sun.star.util.PathSubstitution"); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - if (xPathSubst != null) { - return (XStringSubstitution) UnoRuntime.queryInterface( - XStringSubstitution.class, xPathSubst); - } else { - return null; - } - } -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OConfigurationRegistry.java b/qadevOOo/tests/java/mod/_cfgmgr2/OConfigurationRegistry.java deleted file mode 100644 index 7bc0e87daab8..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OConfigurationRegistry.java +++ /dev/null @@ -1,79 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; - - -public class OConfigurationRegistry extends TestCase { - protected static int uniq = 0; - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. - * - * For this an instance of com.sun.star.configuration.ConfigurationRegistry - * is created at the MultiServiceFactory of the Office - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.configuration.ConfigurationRegistry"); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - System.out.println("IName: " + util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("XSimpleRegistry.open", "org.openoffice.Setup") ; - tEnv.addObjRelation("XSimpleRegistry.merge", "org.openoffice.Inet") ; - tEnv.addObjRelation("XSimpleRegistry.destroy", "org.openoffice.Setup") ; - - tEnv.addObjRelation("configuration", new Boolean(true)); - - return tEnv; - } - -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerGroupInfoAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OInnerGroupInfoAccess.java deleted file mode 100644 index 4dd5fa567be3..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerGroupInfoAccess.java +++ /dev/null @@ -1,142 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - - -public class OInnerGroupInfoAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Common"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - XNameReplace updateAccess = null; - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - nodeArgs)); - oObj = (XInterface) names.getByName(names.getElementNames()[0]); - - names = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - oObj); - - String[] theNames = names.getElementNames(); - - log.println("Contains " + theNames.length + " elements"); - - // create a changeable view on the element for XContainer interface - names = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", nodeArgs)); - updateAccess = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, - names.getByName(names.getElementNames()[0])); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - String[] pNames = new String[] { - "AutoDetectSystemHC", "HelpTipSeconds", "IsAllowAnimatedGraphics", - "IsAllowAnimatedText", "IsAutomaticFontColor", "IsForPagePreviews", - "IsHelpTipsDisappear", "IsSelectionInReadonly", "IsSystemFont" - }; - - String[] pTypes = new String[] { - "Boolean", "Short", "Boolean", "Boolean", "Boolean", "Boolean", - "Boolean", "Boolean", "Boolean" - }; - - tEnv.addObjRelation("PropertyNames", pNames); - tEnv.addObjRelation("PropertyTypes", pTypes); - - tEnv.addObjRelation("XContainer.Container", updateAccess); - // create an unlikely value for "HelpTipSeconds" - tEnv.addObjRelation("XContainer.NewValue", new Short((short)300000)); - tEnv.addObjRelation("XContainer.ElementName", pNames[1]); - - tEnv.addObjRelation("ElementName", "AutoDetectSystemHC"); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - tEnv.addObjRelation("allReadOnly", - "all Properties of OInnerGroupInfoAccess are read Only"); - - tEnv.addObjRelation("expectedName", "IsSelectionInReadonly"); - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("NoSetName", "OInnerGroupInfoAccess"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerGroupUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OInnerGroupUpdateAccess.java deleted file mode 100644 index f93dade2ba45..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerGroupUpdateAccess.java +++ /dev/null @@ -1,134 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - - -public class OInnerGroupUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Common"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - oObj = (XInterface) names.getByName(names.getElementNames()[0]); - - names = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - oObj); - - String[] theNames = names.getElementNames(); - - log.println("Contains " + theNames.length + " elements"); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - String[] pNames = new String[] { - "AutoDetectSystemHC", "HelpTipSeconds", "IsAllowAnimatedGraphics", - "IsAllowAnimatedText", "IsAutomaticFontColor", "IsForPagePreviews", - "IsHelpTipsDisappear", "IsSelectionInReadonly", "IsSystemFont" - }; - - String[] pTypes = new String[] { - "Boolean", "Short", "Boolean", "Boolean", "Boolean", "Boolean", - "Boolean", "Boolean", "Boolean" - }; - - tEnv.addObjRelation("PropertyNames", pNames); - tEnv.addObjRelation("PropertyTypes", pTypes); - - tEnv.addObjRelation("ElementName", "AutoDetectSystemHC"); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - tEnv.addObjRelation("expectedName", "IsSelectionInReadonly"); - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - - Short val = new Short((short)3); - tEnv.addObjRelation("INSTANCE1", val); - tEnv.addObjRelation("NAMEREPLACE", pNames[1]); - tEnv.addObjRelation("XContainer.NewValue", val); - tEnv.addObjRelation("XContainer.ElementName", pNames[1]); - tEnv.addObjRelation("XContainer.Container", (XNameReplace) - UnoRuntime.queryInterface(XNameReplace.class, oObj)); - tEnv.addObjRelation("NoSetName", "OInnerGroupInfoAccess"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerSetInfoAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OInnerSetInfoAccess.java deleted file mode 100644 index 5053e9fbdfc1..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerSetInfoAccess.java +++ /dev/null @@ -1,130 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XHierarchicalNameAccess; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - - -public class OInnerSetInfoAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - Object instance = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Jobs"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - XNameReplace updateAccess = null; - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - XHierarchicalNameAccess names = (XHierarchicalNameAccess) UnoRuntime.queryInterface( - XHierarchicalNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - nodeArgs)); - oObj = (XInterface) names.getByHierarchicalName("Jobs"); - - // create a changeable view on the element for XContainer interface - XNameAccess access = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", nodeArgs)); - updateAccess = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, access.getByName("Jobs")); - - XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, - updateAccess); - instance = jobsFac.createInstance(); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, oObj); - - String[] pNames = names.getElementNames(); - - tEnv.addObjRelation("ElementName", pNames[0]); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - tEnv.addObjRelation("XContainer.Container", updateAccess) ; - tEnv.addObjRelation("XContainer.NewValue", instance); - tEnv.addObjRelation("XContainer.ElementName", pNames[0]); - - tEnv.addObjRelation("expectedName", pNames[0]); - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("NoSetName", "OInnerTreeSetInfoAccess"); - tEnv.addObjRelation("TemplateName", "org.openoffice.Office.Jobs/Job"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerTreeSetUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OInnerTreeSetUpdateAccess.java deleted file mode 100644 index 67beffbb4bbf..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerTreeSetUpdateAccess.java +++ /dev/null @@ -1,126 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XHierarchicalNameAccess; -import com.sun.star.container.XNameAccess; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - - -public class OInnerTreeSetUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - Object instance = null; - Object instance1 = null; - Object instance2 = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Jobs"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - XHierarchicalNameAccess names = (XHierarchicalNameAccess) UnoRuntime.queryInterface( - XHierarchicalNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - oObj = (XInterface) names.getByHierarchicalName("Jobs"); - - XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, - oObj); - instance = jobsFac.createInstance(); - instance1 = jobsFac.createInstance(); - instance2 = jobsFac.createInstance(); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, oObj); - - String[] pNames = names.getElementNames(); - - tEnv.addObjRelation("ElementName", pNames[0]); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - tEnv.addObjRelation("expectedName", pNames[0]); - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("INSTANCE", instance); - tEnv.addObjRelation("INSTANCE1", instance1); - tEnv.addObjRelation("INSTANCE2", instance1); - tEnv.addObjRelation("NAMEREPLACE", pNames[0]); - tEnv.addObjRelation("NoSetName", "OInnerTreeSetInfoAccess"); - tEnv.addObjRelation("TemplateName", "org.openoffice.Office.Jobs/Job"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerValueSetUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OInnerValueSetUpdateAccess.java deleted file mode 100644 index 229869a0753e..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OInnerValueSetUpdateAccess.java +++ /dev/null @@ -1,216 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameContainer; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; - - -public class OInnerValueSetUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - - log.println("creating the Environment"); - - // create some entries for testing, use the ORootElementValueSetUpdateAccess - // service for this: see cfgmgr2.ORootElementValueSetUpdateAccess - createSomeEntries((XMultiServiceFactory)tParam.getMSF()); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "/org.openoffice.Office.Common"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - - oObj = (XInterface) names.getByName("ExternalApps"); - - names = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - oObj); - - String[] theNames = names.getElementNames(); - - log.println("Contains " + theNames.length + " elements"); - -// for (int k = 0; k < theNames.length; k++) { -// System.out.println("child " + theNames[k]); -// } - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - String[] pNames = new String[] { - "file", "ftp", "http", "https", "mailto" - }; - - String[] pTypes = new String[] { - "String", "String", "String", "String", "String" - }; - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - String overwriteString = "NewOne"; - tEnv.addObjRelation("INSTANCE1", overwriteString); - tEnv.addObjRelation("NAMEREPLACE", pNames[1]); - // for XContainer - tEnv.addObjRelation("INSTANCE", overwriteString); - - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("ElementName", "file"); - tEnv.addObjRelation("NoSetName", "OInnerValueSetInfoAccess"); - tEnv.addObjRelation("TemplateName", "cfg:value/cfg:any"); - tEnv.addObjRelation("expectedName", "file"); - - return tEnv; - } - - /** - * Create entries in the ExternalApps layer, so there is something to test - * @param oObj The test object: used to create some entries. - */ - private void createSomeEntries(XMultiServiceFactory xMSF) { - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Common/ExternalApps"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - Object oObj = null; - try { - XInterface Provider = (XInterface) xMSF.createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - oObj = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - XNameContainer xCont = (XNameContainer)UnoRuntime.queryInterface(XNameContainer.class, oObj); - insertOrUpdate(xCont, "file", "just"); - insertOrUpdate(xCont, "ftp", "some"); - insertOrUpdate(xCont, "dummy", "arbitrary"); - insertOrUpdate(xCont, "http", "value"); - // write the changes into the user layer. - XChangesBatch xBatch = (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, oObj); - try { - xBatch.commitChanges(); - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - } - - /** - * Insert a value in a name container or else update it - * @param xCont The name conationer to insert or update. - * @param name The name of the value. - * @param value The value itself. - */ - private void insertOrUpdate(XNameContainer xCont, String name, String value) { - boolean update = false; - try { - xCont.insertByName(name, value); - System.out.println("##### No Exception!"); - } - catch(com.sun.star.lang.IllegalArgumentException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.container.ElementExistException e) { - update = true; - } - try { - if (update) - xCont.replaceByName(name, value); - } - catch(com.sun.star.lang.IllegalArgumentException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.container.NoSuchElementException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementGroupInfoAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementGroupInfoAccess.java deleted file mode 100644 index dcc6d48226e8..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementGroupInfoAccess.java +++ /dev/null @@ -1,176 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.beans.XPropertySet; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; - - -public class ORootElementGroupInfoAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Common"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - XInterface changeView = null; - XInterface alternateObject = null; - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - oObj = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - nodeArgs)); - // create a view on a different object that can change something, so listeners can be triggered. - // this is done for XContainer test - nodepath.Value = "org.openoffice.Office.Common/Internal"; - changeView = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - alternateObject = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - nodeArgs)); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XPropertySet prop = (XPropertySet) UnoRuntime.queryInterface( - XPropertySet.class, oObj); - util.dbg.printPropertiesNames(prop); - - String[] pNames = new String[] { - "Accessibility", "AddXMLToStorage", "AsianLayout", "AutoCorrect", - "Cache", "DateFormat", "ExternalApps", "ExternalMailer", "Filter", - "Font", "Gallery", "Help", "History", "I18N", "Image", "Internal", - "InternalMSExport", "Java", "Load", "Menus", "Misc", - "OfficeObjects", "Passwords", "Path", "Print", "Save", - "SearchOptions", "Security", "Setup", "Startup", "Undo", - "Vectorize", "View", "WorkingSet", "_3D_Engine" - }; - - String[] pTypes = new String[36]; - - for (int k = 0; k < pTypes.length; k++) { - pTypes[k] = "XInterface"; - } - - tEnv.addObjRelation("PropertyNames", pNames); - tEnv.addObjRelation("PropertyTypes", pTypes); - - tEnv.addObjRelation("ElementName", "Accessibility"); - - tEnv.addObjRelation("XLocalizable.ReadOnly", "Locale of ORootElementGroupInfoAccess is read Only"); - tEnv.addObjRelation("allReadOnly", - "all Properties of ORootElementGroupInfoAccess are read Only"); - - tEnv.addObjRelation("XContainer.NewValue", "SenselessString"); - tEnv.addObjRelation("XContainer.ElementName", "CurrentTempURL"); - tEnv.addObjRelation("XContainer.Container", changeView); - tEnv.addObjRelation("XContainer.AlternateObject", alternateObject); - - tEnv.addObjRelation("XChangesNotifier.ChangesBatch", (XChangesBatch)UnoRuntime.queryInterface( - XChangesBatch.class, changeView)); - - // set a new temp directory: use java.io.tmpdir as substitute, for XChangesNotifier test - // get a XPropertySet from the sub element - XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, changeView); - String newTempURL = util.utils.getFullURL(util.utils.getUsersTempDir()); - String curTempURL = ""; - try { - curTempURL = (String)xProp.getPropertyValue("CurrentTempURL"); - } - catch(Exception e) { - log.println("Cannot get property for XChangesNotifier test: this test is bound to fail."); - e.printStackTrace((PrintWriter)log); - } - // fallback 1: get user home - if (newTempURL.equalsIgnoreCase(curTempURL)) { - newTempURL = util.utils.getFullURL(System.getProperty("user.home")); - // fallback 2: get user dir - if (newTempURL.equalsIgnoreCase(curTempURL)) { - newTempURL = util.utils.getFullURL(System.getProperty("user.dir")); - } - } - tEnv.addObjRelation("XChangesNotifier.ChangeElement", newTempURL); - tEnv.addObjRelation("XChangesNotifier.OriginalElement", curTempURL); - tEnv.addObjRelation("XChangesNotifier.PropertyName", "CurrentTempURL"); - tEnv.addObjRelation("XChangesNotifier.PropertySet", xProp); - - tEnv.addObjRelation("expectedName", "OfficeObjects"); - tEnv.addObjRelation("HierachicalName", "/org.openoffice"); - - tEnv.addObjRelation("NoSetName", "ORootElementGroupInfoAccess"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementGroupUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementGroupUpdateAccess.java deleted file mode 100644 index dc04b7a29e11..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementGroupUpdateAccess.java +++ /dev/null @@ -1,180 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.beans.XPropertySet; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; - - -public class ORootElementGroupUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Common/Internal"; - - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - oObj = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - -/* helper.ConfigurationRead read = new helper.ConfigurationRead(pMSF, "org.openoffice.Office.Common"); - String[] subs = read.getRootNodeNames(); - for (int i=0; i<subs.length; i++) - System.out.println("Rootnodes " + subs[i]); - subs = read.getSubNodeNames("Internal"); - for (int i=0; i<subs.length; i++) - System.out.println("Rootnodes " + subs[i]); - Object subNode = read.getByHierarchicalName("Internal/RecoveryList"); - util.dbg.getSuppServices(subNode); */ - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XPropertySet prop = (XPropertySet) UnoRuntime.queryInterface( - XPropertySet.class, oObj); - - Object instance = null; - - String[] pNames = new String[] { - "CurrentTempURL", - "DevelopmentChart", - "SendCrashMail", - "Slot", - "UseMailUI"//, "RecoveryList" - }; - - String[] pTypes = new String[]{ - "String", - "Boolean", - "Boolean", - "Boolean", - "Boolean" - }; - - tEnv.addObjRelation("PropertyNames", pNames); - tEnv.addObjRelation("PropertyTypes", pTypes); - - // for XHierarchicalNameAccess - tEnv.addObjRelation("ElementName", "Slot"); - - tEnv.addObjRelation("XLocalizable.ReadOnly", "Localization is final and can't be changed"); - - tEnv.addObjRelation("XChangesNotifier.ChangesBatch", (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, oObj)); - - // set a new temp directory: use java.io.tmpdir as substitute - String newTempURL = util.utils.getFullURL(util.utils.getUsersTempDir()); - String curTempURL = ""; - try { - curTempURL = (String)prop.getPropertyValue("CurrentTempURL"); - } - catch(Exception e) { - log.println("Cannot get property for XChangesBatch test: this test is bound to fail."); - e.printStackTrace((PrintWriter)log); - } - // fallback 1: get user home - if (newTempURL.equalsIgnoreCase(curTempURL)) { - newTempURL = util.utils.getFullURL(System.getProperty("user.home")); - // fallback 2: get user dir - if (newTempURL.equalsIgnoreCase(curTempURL)) { - newTempURL = util.utils.getFullURL(System.getProperty("user.dir")); - } - } - - tEnv.addObjRelation("XChangesBatch.ChangeElement", newTempURL); - tEnv.addObjRelation("XChangesBatch.OriginalElement", curTempURL); - tEnv.addObjRelation("XChangesBatch.PropertyName", "CurrentTempURL"); - tEnv.addObjRelation("XChangesBatch.PropertySet", prop); - tEnv.addObjRelation("XChangesNotifier.ChangeElement", newTempURL); - tEnv.addObjRelation("XChangesNotifier.OriginalElement", curTempURL); - tEnv.addObjRelation("XChangesNotifier.PropertyName", "CurrentTempURL"); - tEnv.addObjRelation("XChangesNotifier.PropertySet", prop); - - tEnv.addObjRelation("expectedName", "RecoveryList"); - tEnv.addObjRelation("HierachicalName", "/org.openoffice"); - - String overwriteString = new String("ThisIsSenselessForSure"); - tEnv.addObjRelation("INSTANCE1", overwriteString); - tEnv.addObjRelation("NAMEREPLACE", pNames[0]); - - tEnv.addObjRelation("XContainer.NewValue", overwriteString); - tEnv.addObjRelation("XContainer.ElementName", pNames[0]); - tEnv.addObjRelation("XContainer.Container", (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, oObj)); - - tEnv.addObjRelation("NoSetName", "ORootElementGroupInfoAccess"); - - return tEnv; - } -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementSetInfoAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementSetInfoAccess.java deleted file mode 100644 index 6126e2d156c5..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementSetInfoAccess.java +++ /dev/null @@ -1,127 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; - - -public class ORootElementSetInfoAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Jobs/Jobs"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - XInterface changeView = null; - Object instance = null; - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - oObj = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - nodeArgs)); - changeView = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, - changeView); - instance = jobsFac.createInstance(); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - log.println("ChangeView: " + utils.getImplName(changeView)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XNameReplace container = (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, changeView); - tEnv.addObjRelation("XContainer.NewValue", instance); - tEnv.addObjRelation("XContainer.ElementName", "RegistrationRequest"); - tEnv.addObjRelation("XContainer.Container", container); - - tEnv.addObjRelation("XChangesNotifier.ChangesBatch", (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, changeView)); - tEnv.addObjRelation("XChangesNotifier.ChangeElement", instance); - tEnv.addObjRelation("XChangesNotifier.PropertyName", "RegistrationRequest"); - tEnv.addObjRelation("XChangesNotifier.NameReplace", container); - - tEnv.addObjRelation("XLocalizable.ReadOnly", "Locale of ORootElementSetInfoAccess is read Only"); - tEnv.addObjRelation("allReadOnly", - "all Properties of ORootElementSetInfoAccess are read Only"); - tEnv.addObjRelation("NoSetName", "ORootElementSetInfoAccess"); - tEnv.addObjRelation("TemplateName", "org.openoffice.Office.Jobs/Job"); - tEnv.addObjRelation("HierachicalName", "/org.openoffice"); - tEnv.addObjRelation("ElementName", "RegistrationRequest"); - tEnv.addObjRelation("expectedName", "RegistrationRequest"); - - return tEnv; - } -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementTreeSetUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementTreeSetUpdateAccess.java deleted file mode 100644 index 31d451c97bd9..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementTreeSetUpdateAccess.java +++ /dev/null @@ -1,128 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; - - -public class ORootElementTreeSetUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - Object instance = null; - Object instance1 = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Jobs/Jobs"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - oObj = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - - XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, - oObj); - instance = jobsFac.createInstance(); - instance1 = jobsFac.createInstance(); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("NAMEREPLACE","RegistrationRequest"); - tEnv.addObjRelation("INSTANCE", instance); - tEnv.addObjRelation("INSTANCE1", instance1); - tEnv.addObjRelation("INSTANCE2", instance1); - - tEnv.addObjRelation("XChangesBatch.ChangeElement", instance); - tEnv.addObjRelation("XChangesBatch.PropertyName", "RegistrationRequest"); - tEnv.addObjRelation("XChangesBatch.NameReplace", (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, oObj)); - - tEnv.addObjRelation("XChangesNotifier.ChangeElement", instance); - tEnv.addObjRelation("XChangesNotifier.PropertyName", "RegistrationRequest"); - tEnv.addObjRelation("XChangesNotifier.NameReplace", (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, oObj)); - tEnv.addObjRelation("XChangesNotifier.ChangesBatch", (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, oObj)); - - tEnv.addObjRelation("XLocalizable.ReadOnly", "Locale of ORootElementTreeSetUpdateAccess is read Only"); - tEnv.addObjRelation("NoSetName", "ORootElementTreeSetUpdateAccess"); - - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("ElementName","RegistrationRequest"); - tEnv.addObjRelation("TemplateName", "org.openoffice.Office.Jobs/Job"); - - tEnv.addObjRelation("expectedName","RegistrationRequest"); - return tEnv; - } - -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementValueSetUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementValueSetUpdateAccess.java deleted file mode 100644 index 48bfa8f489c0..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/ORootElementValueSetUpdateAccess.java +++ /dev/null @@ -1,193 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameContainer; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; - -/** - * Check the ORootElementValueSetUpdateAccess service. - * For this, the ExternalApss layer is used. Since this layer is empty (since - * cws cfgapi), some own values are created and written to the current user - * layer. The tests are then executed on these values. - */ -public class ORootElementValueSetUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - Object instance = null; - Object instance1 = null; - Object instance2 = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Common/ExternalApps"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - oObj = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - String[] pNames = new String[] { - "file", "ftp", "dummy", "http" - }; - - String[] pTypes = new String[] { - "String", "String", "String", "String" - }; - - createSomeEntries(oObj); - - tEnv.addObjRelation("INSTANCE1", "NewOne1"); - tEnv.addObjRelation("NAMEREPLACE", pNames[0]); - - // for XContainer - tEnv.addObjRelation("INSTANCE", "NewOne2"); - - tEnv.addObjRelation("XChangesBatch.PropertyName", pNames[0]); - tEnv.addObjRelation("XChangesBatch.ChangeElement", "NewOne3"); - tEnv.addObjRelation("XChangesBatch.NameReplace", (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, oObj)); - - tEnv.addObjRelation("XChangesNotifier.PropertyName", pNames[0]); - tEnv.addObjRelation("XChangesNotifier.ChangeElement", "NewOne4"); - tEnv.addObjRelation("XChangesNotifier.ChangesBatch" , (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, oObj)); - tEnv.addObjRelation("XChangesNotifier.NameReplace", (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, oObj)); - - tEnv.addObjRelation("XLocalizable.ReadOnly", "Locale of ORootElementValueSetUpdateAccess is read Only"); - tEnv.addObjRelation("NoSetName", "ORootElementValueSetUpdateAccess"); - - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("ElementName","http"); - tEnv.addObjRelation("TemplateName", "cfg:value/cfg:any"); - - tEnv.addObjRelation("expectedName","http"); - return tEnv; - } - - /** - * Create entries in the ExternalApps layer, so there is something to test - * @param oObj The test object: used to create some entries. - */ - private void createSomeEntries(XInterface oObj) { - XNameContainer xCont = (XNameContainer)UnoRuntime.queryInterface(XNameContainer.class, oObj); - insertOrUpdate(xCont, "file", "just"); - insertOrUpdate(xCont, "ftp", "some"); - insertOrUpdate(xCont, "dummy", "arbitrary"); - insertOrUpdate(xCont, "http", "value"); - // write the changes into the user layer. - XChangesBatch xBatch = (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, oObj); - try { - xBatch.commitChanges(); - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - } - - /** - * Insert a value in a name container or else update it - * @param xCont The name conationer to insert or update. - * @param name The name of the value. - * @param value The value itself. - */ - private void insertOrUpdate(XNameContainer xCont, String name, String value) { - boolean update = false; - try { - xCont.insertByName(name, value); - } - catch(com.sun.star.lang.IllegalArgumentException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.container.ElementExistException e) { - update = true; - } - try { - if (update) - xCont.replaceByName(name, value); - } - catch(com.sun.star.lang.IllegalArgumentException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.container.NoSuchElementException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementGroupInfoAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementGroupInfoAccess.java deleted file mode 100644 index ad31d2228968..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementGroupInfoAccess.java +++ /dev/null @@ -1,234 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameContainer; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XChangesBatch; - - -public class OSetElementGroupInfoAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Common/Menus"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - XNameAccess xHierachNameAccess = null; - XNameReplace xChangeView = null; - XComponent xDisposeComponent = null; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - - xHierachNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", nodeArgs)); - - XInterface oInnerSetInfoAccess = (XInterface) xHierachNameAccess.getByName("New"); - - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - oInnerSetInfoAccess); - - String[] theNames = names.getElementNames(); - - log.println("Contains " + theNames.length + " elements"); - - xDisposeComponent = (XComponent) - UnoRuntime.queryInterface(XComponent.class, xHierachNameAccess); - - String[] elnames = names.getElementNames(); - - log.println("use node 'm0'"); - oObj = (XInterface) names.getByName("m0"); - - - - log.println("create ConfigurationUpdateAccess to modify the object..."); - - xHierachNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - - oInnerSetInfoAccess = (XInterface) xHierachNameAccess.getByName("New"); - - names = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, - oInnerSetInfoAccess); - - log.println("use node 'm0'"); - - XInterface xInt = (XInterface) names.getByName("m0"); - xChangeView = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, - xInt); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - String[] pNames = new String[] { "ImageIdentifier", "Title", "URL", "TargetName" }; - - String[] pTypes = new String[] { "String", "String", "String", "String" }; - - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("ElementName", "Title"); - tEnv.addObjRelation("NoSetName", "OInnerValueSetInfoAccess"); - tEnv.addObjRelation("TemplateName", "cfg:value/cfg:any"); - tEnv.addObjRelation("expectedName", "ImageIdentifier"); - - tEnv.addObjRelation("XContainer.NewValue", "aValue"); - tEnv.addObjRelation("XContainer.ElementName", "TargetName"); - tEnv.addObjRelation("XContainer.Container", xChangeView); - - // dispose the owner of the test object - tEnv.addObjRelation("XComponent.DisposeThis", xDisposeComponent); - - tEnv.addObjRelation("PropertyNames", pNames); - tEnv.addObjRelation("PropertyTypes", pTypes); - tEnv.addObjRelation("allReadOnly", - "all Properties of OSetElementGroupInfoAccess are read Only"); - - tEnv.addObjRelation("TemplateInstance", "org.openoffice.Office.Common/MenuType"); - - return tEnv; - } - /** - * Create entries in the ExternalApps layer, so there is something to test - * @param oObj The test object: used to create some entries. - */ - private void createSomeEntries(XInterface xObj) { - XNameContainer xCont = (XNameContainer)UnoRuntime.queryInterface(XNameContainer.class, xObj); - insertOrUpdate(xCont, "file", xObj); -// insertOrUpdate(xCont, "ftp", "some"); -// insertOrUpdate(xCont, "dummy", "arbitrary"); -// insertOrUpdate(xCont, "http", "value"); - // write the changes into the user layer. - XChangesBatch xBatch = (XChangesBatch)UnoRuntime.queryInterface(XChangesBatch.class, xObj); - try { - xBatch.commitChanges(); - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - } - - /** - * Insert a value in a name container or else update it - * @param xCont The name conationer to insert or update. - * @param name The name of the value. - * @param value The value itself. - */ - private void insertOrUpdate(XNameContainer xCont, String name, XInterface value) { - boolean update = false; - XSingleServiceFactory xFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, - value); - - try { - xCont.insertByName(name, xFac.createInstance()); - } - catch(com.sun.star.lang.IllegalArgumentException e) { - log.println("ERROR: " + e.toString()); - // ignore: bug will be found with the interface test - } - catch(com.sun.star.lang.WrappedTargetException e) { - log.println("ERROR: " + e.toString()); - // ignore: bug will be found with the interface test - } - catch(com.sun.star.container.ElementExistException e) { - update = true; - } - catch(com.sun.star.uno.Exception e) { - log.println("could not create Instance: " + e.toString()); - } - - try { - if (update) - xCont.replaceByName(name, xFac.createInstance()); - } - catch(com.sun.star.lang.IllegalArgumentException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.container.NoSuchElementException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.lang.WrappedTargetException e) { - // ignore: bug will be found with the interface test - } - catch(com.sun.star.uno.Exception e) { - log.println("could not create Instance: " + e.toString()); - } - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementGroupUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementGroupUpdateAccess.java deleted file mode 100644 index 45132f890185..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementGroupUpdateAccess.java +++ /dev/null @@ -1,132 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XHierarchicalNameAccess; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - - -public class OSetElementGroupUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Jobs"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - XHierarchicalNameAccess names = (XHierarchicalNameAccess) UnoRuntime.queryInterface( - XHierarchicalNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - - XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, - names.getByHierarchicalName("Jobs")); - oObj = (XInterface) jobsFac.createInstance(); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, oObj); - - String[] pNames = names.getElementNames(); - String[] pTypes = new String[pNames.length]; - - for (int k=0;k<pNames.length;k++) { - pTypes[k] = "boolean"; - } - - - tEnv.addObjRelation("ElementName", pNames[0]); - - tEnv.addObjRelation("PropertyNames", pNames); - tEnv.addObjRelation("PropertyTypes", pTypes); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - tEnv.addObjRelation("expectedName", pNames[0]); - tEnv.addObjRelation("INSTANCE1", "newValue"); - tEnv.addObjRelation("HierachicalName", "//Job"); - tEnv.addObjRelation("NoSetName", "OSetElementGroupUpdateAccess"); - - tEnv.addObjRelation("XContainer.NewValue", "aValue"); - tEnv.addObjRelation("XContainer.ElementName", pNames[0]); - tEnv.addObjRelation("XContainer.Container", (XNameReplace) - UnoRuntime.queryInterface(XNameReplace.class, oObj)); - - tEnv.addObjRelation("TemplateInstance", (String)nodepath.Value + "/Job"); - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementSetInfoAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementSetInfoAccess.java deleted file mode 100644 index 255698e14cd8..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementSetInfoAccess.java +++ /dev/null @@ -1,145 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XHierarchicalNameAccess; -import com.sun.star.container.XNameAccess; -import com.sun.star.container.XNameContainer; -import com.sun.star.container.XNameReplace; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - - -public class OSetElementSetInfoAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - Object instance = null; - Object instance1 = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Labels/Manufacturer"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - String hierarchicalElementName = "Labels['Avery A4']"; - String elementName = "Avery A4"; - - XNameReplace xChangeView = null; - XNameContainer xContainer = null; - XHierarchicalNameAccess xHierachNameAccess = null; - try { - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - xHierachNameAccess = (XHierarchicalNameAccess) UnoRuntime.queryInterface( - XHierarchicalNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - nodeArgs)); - - oObj = (XInterface) xHierachNameAccess.getByHierarchicalName(hierarchicalElementName); - - // craete a changeable view. - XHierarchicalNameAccess changeableNames = (XHierarchicalNameAccess) UnoRuntime.queryInterface(XHierarchicalNameAccess.class, - pMSF.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", nodeArgs)); - - XInterface xInt = (XInterface) changeableNames.getByHierarchicalName(hierarchicalElementName); - xChangeView = (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, xInt); - XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, xChangeView); - instance1 = jobsFac.createInstance(); - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, oObj); - - String[] pNames = xNameAccess.getElementNames(); - - tEnv.addObjRelation("ElementName", pNames[0]); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - tEnv.addObjRelation("XContainer.NewValue", instance1); - tEnv.addObjRelation("XContainer.ElementName", "L0"); - tEnv.addObjRelation("XContainer.Container", xChangeView); - - // dispose the owner of the test object - tEnv.addObjRelation("XComponent.DisposeThis", (XComponent) - UnoRuntime.queryInterface(XComponent.class, xHierachNameAccess)); - - tEnv.addObjRelation("expectedName", pNames[0]); - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("NAMEREPLACE", pNames[0]); - tEnv.addObjRelation("NoSetName", "OInnerTreeSetInfoAccess"); - tEnv.addObjRelation("TemplateName", "org.openoffice.Office.Labels/LabelType"); - tEnv.addObjRelation("TemplateInstance", "org.openoffice.Office.Labels/Labels"); - - return tEnv; - } -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementTreeSetUpdateAccess.java b/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementTreeSetUpdateAccess.java deleted file mode 100644 index de39c8d9868d..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/OSetElementTreeSetUpdateAccess.java +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package mod._cfgmgr2; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.utils; - -import com.sun.star.beans.PropertyState; -import com.sun.star.beans.PropertyValue; -import com.sun.star.container.XHierarchicalNameAccess; -import com.sun.star.container.XNameAccess; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - - -public class OSetElementTreeSetUpdateAccess extends TestCase { - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. <br> - * - * An instance of com.sun.star.comp.configuration.ConfigurationProvider - * is created at the MultiServiceFactory of the Office<br> - * At this an instance of com.sun.star.configuration.ConfigurationAccess is created - * and from the resulting XNameAccess the first element is taken. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, - PrintWriter log) { - XInterface oObj = null; - Object instance = null; - Object instance1 = null; - Object instance2 = null; - log.println("creating the Environment"); - - PropertyValue[] nodeArgs = new PropertyValue[1]; - PropertyValue nodepath = new PropertyValue(); - nodepath.Name = "nodepath"; - nodepath.Value = "org.openoffice.Office.Labels/Manufacturer"; - nodepath.Handle = -1; - nodepath.State = PropertyState.DEFAULT_VALUE; - nodeArgs[0] = nodepath; - - XHierarchicalNameAccess xHierachNameAccess = null; - try { - - XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.ConfigurationProvider"); - XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, - Provider); - xHierachNameAccess = (XHierarchicalNameAccess) UnoRuntime.queryInterface( - XHierarchicalNameAccess.class, - pMSF.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - nodeArgs)); - - oObj = (XInterface) xHierachNameAccess.getByHierarchicalName("Labels['Avery A4']"); - - XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( - XSingleServiceFactory.class, - oObj); - instance = jobsFac.createInstance(); - instance1 = jobsFac.createInstance(); - instance2 = jobsFac.createInstance(); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("ImplementationName: " + utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - XNameAccess names = (XNameAccess) UnoRuntime.queryInterface( - XNameAccess.class, oObj); - - String[] pNames = names.getElementNames(); - - tEnv.addObjRelation("ElementName", pNames[0]); - - tEnv.addObjRelation("cannotSwitchParent", - "configmgr: BasicElement::setParent: cannot move Entry"); - - // dispose the owner of the test object - tEnv.addObjRelation("XComponent.DisposeThis", (XComponent) - UnoRuntime.queryInterface(XComponent.class, xHierachNameAccess)); - - tEnv.addObjRelation("expectedName", pNames[0]); - tEnv.addObjRelation("HierachicalName", "/org.openoffice.Office"); - tEnv.addObjRelation("INSTANCE", instance); - tEnv.addObjRelation("INSTANCE1", instance1); - tEnv.addObjRelation("INSTANCE2", instance1); - tEnv.addObjRelation("NAMEREPLACE", pNames[0]); - tEnv.addObjRelation("NoSetName", "OSetElementTreeSetUpdateAccess"); - tEnv.addObjRelation("TemplateName", "org.openoffice.Office.Labels/LabelType"); - tEnv.addObjRelation("TemplateInstance", "org.openoffice.Office.Labels/Labels"); - - return tEnv; - } -}
\ No newline at end of file diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/SchemaParser.java b/qadevOOo/tests/java/mod/_cfgmgr2/SchemaParser.java deleted file mode 100644 index 73315eabebd0..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/SchemaParser.java +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -package mod._cfgmgr2; - -import com.sun.star.io.XActiveDataSink; -import com.sun.star.io.XInputStream; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class SchemaParser extends TestCase { - - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - - XInterface oObj = null; - XSimpleFileAccess simpleAccess = null; - XInputStream xStream = null; - String filename = null; - - try { - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.backend.xml.SchemaParser"); - Object fileacc = ((XMultiServiceFactory)tParam.getMSF()).createInstance("com.sun.star.comp.ucb.SimpleFileAccess"); - simpleAccess = (XSimpleFileAccess) - UnoRuntime.queryInterface(XSimpleFileAccess.class,fileacc); - filename = util.utils.getOfficeURL((XMultiServiceFactory)tParam.getMSF())+"/../share/registry/schema/org/openoffice/Setup.xcs"; - - log.println("Going to parse: "+filename); - xStream = simpleAccess.openFileRead(filename); - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - XActiveDataSink xSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oObj); - xSink.setInputStream(xStream); - TestEnvironment tEnv = new TestEnvironment(oObj); - - tEnv.addObjRelation("InputStream", xStream); - tEnv.addObjRelation("ParsedFileName", filename); - return tEnv; - } - -} diff --git a/qadevOOo/tests/java/mod/_cfgmgr2/SingleBackendAdapter.java b/qadevOOo/tests/java/mod/_cfgmgr2/SingleBackendAdapter.java deleted file mode 100644 index 7e0d757b6b94..000000000000 --- a/qadevOOo/tests/java/mod/_cfgmgr2/SingleBackendAdapter.java +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._cfgmgr2; - -import com.sun.star.lang.XInitialization; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class SingleBackendAdapter extends TestCase { - - /** Called to create an instance of <code>TestEnvironment</code> with an - * object to test and related objects. Subclasses should implement this - * method to provide the implementation and related objects. The method is - * called from <code>getTestEnvironment()</code>. - * - * @param tParam test parameters - * @param log writer to log information while testing - * - * @see TestEnvironment - * @see #getTestEnvironment() - * - */ - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - XInterface oObj = null; - XInterface backend = null; - - try { - Object[] args = new Object[1]; - args[0] = ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.configuration.bootstrap.BootstrapContext"); - backend = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstanceWithArguments("com.sun.star.comp.configuration.backend.LocalSingleBackend",args); - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.backend.SingleBackendAdapter"); - XInitialization xInit = (XInitialization) UnoRuntime.queryInterface( - XInitialization.class, oObj); - - xInit.initialize(new Object[] { backend }); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - return tEnv; - } - -} diff --git a/qadevOOo/tests/java/mod/_configmgr/ConfigurationProvider.java b/qadevOOo/tests/java/mod/_configmgr/ConfigurationProvider.java new file mode 100644 index 000000000000..6626ceaa3a9b --- /dev/null +++ b/qadevOOo/tests/java/mod/_configmgr/ConfigurationProvider.java @@ -0,0 +1,57 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +package mod._configmgr; + +import com.sun.star.beans.NamedValue; +import com.sun.star.uno.XComponentContext; +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; +import java.io.PrintWriter; + +public final class ConfigurationProvider extends TestCase { + public ConfigurationProvider() {} + + protected TestEnvironment createTestEnvironment( + TestParameters tParam, PrintWriter log) + { + // Create a non-default ConfigurationProvider instance, so that testing + // its XComponent.dispose does not accidentally dispose the + // DefaultProvider: + XComponentContext ctxt = tParam.getComponentContext(); + try { + return ProviderTestEnvironment.create( + ctxt.getServiceManager().createInstanceWithArgumentsAndContext( + "com.sun.star.configuration.ConfigurationProvider", + new Object[] { new NamedValue("Locale", "*") }, + ctxt)); + } catch (com.sun.star.uno.Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/qadevOOo/tests/java/mod/_configmgr/DefaultProvider.java b/qadevOOo/tests/java/mod/_configmgr/DefaultProvider.java new file mode 100644 index 000000000000..f8a023ea2f12 --- /dev/null +++ b/qadevOOo/tests/java/mod/_configmgr/DefaultProvider.java @@ -0,0 +1,54 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +package mod._configmgr; + +import com.sun.star.uno.AnyConverter; +import com.sun.star.uno.XInterface; +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; +import java.io.PrintWriter; + +public final class DefaultProvider extends TestCase { + public DefaultProvider() {} + + protected TestEnvironment createTestEnvironment( + TestParameters tParam, PrintWriter log) + { + try { + return ProviderTestEnvironment.create( + AnyConverter.toObject( + XInterface.class, + tParam.getComponentContext().getValueByName( + "/singletons/" + + "com.sun.star.configuration.theDefaultProvider"))); + } catch (com.sun.star.lang.IllegalArgumentException e) { + throw new RuntimeException(e); + } + } +} diff --git a/qadevOOo/tests/java/mod/_configmgr/ProviderTestEnvironment.java b/qadevOOo/tests/java/mod/_configmgr/ProviderTestEnvironment.java new file mode 100644 index 000000000000..ebd487305f3b --- /dev/null +++ b/qadevOOo/tests/java/mod/_configmgr/ProviderTestEnvironment.java @@ -0,0 +1,51 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +package mod._configmgr; + +import com.sun.star.beans.NamedValue; +import com.sun.star.uno.XInterface; +import lib.TestEnvironment; + +final class ProviderTestEnvironment { + private ProviderTestEnvironment() {} + + public static TestEnvironment create(Object provider) { + TestEnvironment env = new TestEnvironment((XInterface) provider); + env.addObjRelation( + "XMSF.serviceNamesWithArgs", + new String[] { + "com.sun.star.configuration.ConfigurationAccess", + "com.sun.star.configuration.ConfigurationUpdateAccess" }); + Object[] args = new Object[] { + new NamedValue("nodepath", "/org.openoffice.Setup") }; + env.addObjRelation("XMSF.Args", new Object[][] { args, args }); + env.addObjRelation( + "needArgs", "com.sun.star.configuration.ConfigurationProvider"); + return env; + } +} diff --git a/qadevOOo/tests/java/mod/_sysmgr1/SystemIntegration.java b/qadevOOo/tests/java/mod/_sysmgr1/SystemIntegration.java deleted file mode 100644 index cfec26dd61f1..000000000000 --- a/qadevOOo/tests/java/mod/_sysmgr1/SystemIntegration.java +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package mod._sysmgr1; - -import com.sun.star.lang.XInitialization; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class SystemIntegration extends TestCase { - - protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { - XInterface oObj = null; - Object[] args = new Object[0]; - - try { - - oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF()) - .createInstance("com.sun.star.comp.configuration.backend.SystemIntegration"); - XInitialization xInit = (XInitialization) UnoRuntime.queryInterface(XInitialization.class,oObj); - xInit.initialize(args); - - } catch (com.sun.star.uno.Exception e) { - } - - log.println("Implementation name: "+ util.utils.getImplName(oObj)); - - TestEnvironment tEnv = new TestEnvironment(oObj); - - //objRelation for XBackend - tEnv.addObjRelation("noUpdate", "SystemIntegrationManager: No Update Operation allowed, Read Only access -- OK"); - - return tEnv; - } - -} diff --git a/smoketestoo_native/config.pl b/smoketestoo_native/config.pl index 79e498792896..988d1176ed42 100755 --- a/smoketestoo_native/config.pl +++ b/smoketestoo_native/config.pl @@ -1,6 +1,3 @@ -: -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,139 +26,58 @@ eval 'exec perl -wS $0 ${1+"$@"}' #************************************************************************* use File::Path; -use File::Copy; -### globals ### +$branddir = $ARGV[0]; +$userinstalldir = $ARGV[1]; +$buildid = $ARGV[2]; -$is_debug = 0; - -$gui = $ENV{GUI}; -$cygwin = "cygwin"; - -if ($^O =~ /cygwin/) { - $gui = $cygwin; -} - -if (($gui eq "UNX") or ($gui eq $cygwin)) { - $pathslash = "/"; -} -else -{ - $pathslash = "\\"; -} - -#### Hardly coded path for -# \share\registry\data\org\openoffice\Office\Jobs.xcu - -$jobs_XML_Path = "share" . $pathslash . "registry" . $pathslash . "data" . $pathslash . "org" . $pathslash . "openoffice" . $pathslash . "Office" . $pathslash . "Jobs.xcu"; - -# \user\registry\data\org\openoffice\ - -$User_Path = "user" . $pathslash . "registry" . $pathslash . "data" . $pathslash . "org" . $pathslash . "openoffice" . $pathslash; - -# \user\registry\data\org\openoffice\Office\ - -$User_Office_Path = $User_Path . "Office" . $pathslash; - -# \user\registry\data\org\openoffice\Office\OOoImprovement - -$OOoImprovement_Path = $User_Office_Path . "OOoImprovement" . $pathslash; - -$common_XML = "Common.xcu"; -$setup_XML = "Setup.xcu"; -$oooimprovement_XML = "Settings.xcu"; - -# $(INPATH)\misc\Common.xcu -$inpath_Common_XCU = $ENV{INPATH} . $pathslash . "misc" . $pathslash . $common_XML; - -### main ### - -$idStr = ' $Revision: 1.5 $ '; -$idStr =~ /Revision:\s+(\S+)\s+\$/ - ? ($cpflat2minor_rev = $1) : ($cpflat2minor_rev = "-"); - -if ( ($#ARGV >= 3) ) { - $ARGV[0] =~ s/\"//g; - $ARGV[1] =~ s/\"//g; - $ARGV[2] =~ s/\"//g; - $ARGV[3] =~ s/\"//g; - chop($ARGV[0]); - chop($ARGV[1]); - chop($ARGV[2]); - chop($ARGV[3]); -} - -if ( ! ( ($#ARGV >= 4) && $ARGV[0] && $ARGV[1] && $ARGV[2] && $ARGV[3] && (-d $ARGV[3]) && $ARGV[4] ) ) { - print "Usage: config <basispath> <brandpath> <userinstallpath> <datapath> <buildid>\n" ; - exit(1); -} - -$basisdir = $ARGV[0]; -$branddir = $ARGV[1]; -$userinstalldir = $ARGV[2]; -$datapath = $ARGV[3]; -$buildid = $ARGV[4]; - -$fullquickstart_path = $branddir . "program" . $pathslash . "quickstart.exe"; - -print "patching config ... \n"; -if (!-d "$userinstalldir$User_Office_Path") { - mkpath("$userinstalldir$User_Office_Path", 0, 0777); -} -if (!-d "$userinstalldir$OOoImprovement_Path") { - mkpath("$userinstalldir$OOoImprovement_Path", 0, 0777); -} - -# copy Common.xcu -print "Patching Common.xcu\n" if $is_debug; -PatchCommonXcu($buildid); -print "cp $inpath_Common_XCU $userinstalldir$User_Office_Path$common_XML\n" if $is_debug; -copy ("$inpath_Common_XCU", "$userinstalldir$User_Office_Path$common_XML"); - -# copy OOoImprovement/Settings.xcu - -print "cp $datapath$oooimprovement_XML $userinstalldir$OOoImprovement_Path$oooimprovement_XML\n" if $is_debug; -copy ("$datapath$oooimprovement_XML", "$userinstalldir$OOoImprovement_Path$oooimprovement_XML"); - -# copy Setup.xcu - -print "cp $datapath$setup_XML $userinstalldir$User_Path$setup_XML\n" if $is_debug; -copy ("$datapath$setup_XML", "$userinstalldir$User_Path$setup_XML"); - - -# quickstarter loeschen -if ($gui ne "UNX") { - print "kill $fullquickstart_path \n"; - unlink( $fullquickstart_path ) or die "cannot unlink $fullquickstart_path"; +if ($ENV{GUI} ne "UNX") { + $quickstart = $branddir . "program/quickstart.exe"; + print "kill $quickstart\n"; + unlink $quickstart or die "cannot unlink $fullquickstart_path"; } -#delete joblist -$fullsource_path = $basisdir . $jobs_XML_Path; -unlink ($fullsource_path); - -exit(0); - -############################################################################ -sub PatchCommonXcu #17.04.2009 10:37 -############################################################################ - { - my $buildid = shift; - open(INFILE, "< $datapath$common_XML") || die "Can't open $datapath$common_XML (read)\n"; - open(OUTFILE, "> $inpath_Common_XCU") || die "Can't open $inpath_Common_XCU (write)\n"; - my $patch_next_line = 0; - my $value = "<value>Patch" . $buildid . "</value>\n"; - while ( $line = <INFILE> ) { - if ( $patch_next_line ) { - print OUTFILE " $value"; - $patch_next_line = 0; - } else - { - print OUTFILE $line; - } - if ( $line =~ /ReminderDate/ ) { - $patch_next_line = 1; - } - } - close(INFILE); - close(OUTFILE); -} ##PatchCommonXcu +$regpath = $userinstalldir . "user"; +$regfile = $regpath . "/registrymodifications.xcu"; +print "create $regfile\n"; +mkpath($regpath, 0, 0777); +open (OUT, "> $regfile") or die "cannot open $regfile for writing"; +print OUT << "EOF"; +<oor:items xmlns:oor='http://openoffice.org/2001/registry'> + <item oor:path='/org.openoffice.Office.Common/Help/Registration'> + <prop oor:name='ReminderDate'> + <value>Patch$buildid</value> + </prop> + </item> + <item oor:path='/org.openoffice.Office.Common/Misc'> + <prop oor:name='FirstRun'> + <value>false</value> + </prop> + </item> + <item oor:path='/org.openoffice.Office.Common/Security/Scripting'> + <prop oor:name='MacroSecurityLevel'> + <value>0</value> + </prop> + <prop oor:name='OfficeBasic'> + <value>2</value> + </prop> + </item> + <item oor:path='/org.openoffice.Office.OOoImprovement.Settings/Participation'> + <prop oor:name='InvitationAccepted'> + <value>false</value> + </prop> + <prop oor:name='ShowedInvitation'> + <value>true</value> + </prop> + </item> + <item oor:path='/org.openoffice.Setup/Office'> + <prop oor:name='FirstStartWizardCompleted'> + <value>true</value> + </prop> + <prop oor:name='LicenseAcceptDate'> + <value>2100-01-01T00:00:00</value> + </prop> + </item> +</oor:items> +EOF +close OUT; diff --git a/smoketestoo_native/data/Common.xcu b/smoketestoo_native/data/Common.xcu deleted file mode 100644 index 8cb90a69b7b6..000000000000 --- a/smoketestoo_native/data/Common.xcu +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.Office" oor:name="Common"> - <node oor:name="Misc"> - <prop oor:name="FirstRun" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="Security"> - <node oor:name="Scripting"> - <prop oor:name="OfficeBasic" oor:type="xs:int"> - <value>2</value> - </prop> - <prop oor:name="MacroSecurityLevel" oor:type="xs:int"> - <value>0</value> - </prop> - </node> - </node> - <node oor:name="Help"> - <node oor:name="Registration"> - <prop oor:name="ReminderDate"> - <value/> - </prop> - </node> - </node> -</oor:component-data> diff --git a/smoketestoo_native/data/Settings.xcu b/smoketestoo_native/data/Settings.xcu deleted file mode 100644 index 425e789dabc1..000000000000 --- a/smoketestoo_native/data/Settings.xcu +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Settings" oor:package="org.openoffice.Office.OOoImprovement"> - <node oor:name="Participation"> - <prop oor:name="ShowedInvitation" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="InvitationAccepted" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> -</oor:component-data> diff --git a/smoketestoo_native/data/Setup.xcu b/smoketestoo_native/data/Setup.xcu deleted file mode 100644 index cbcd2ef8f1ca..000000000000 --- a/smoketestoo_native/data/Setup.xcu +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Setup" oor:package="org.openoffice"> - <node oor:name="Office"> - <prop oor:name="LicenseAcceptDate" oor:type="xs:string"> - <value>2100-01-01T00:00:00</value> - </prop> - <prop oor:name="FirstStartWizardCompleted" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> -</oor:component-data> diff --git a/smoketestoo_native/smoketest.pl b/smoketestoo_native/smoketest.pl index a48b337b3779..f5ef32f31bcb 100755 --- a/smoketestoo_native/smoketest.pl +++ b/smoketestoo_native/smoketest.pl @@ -486,7 +486,7 @@ sub doTest { # patch config (error 3) - $Command = "$PERL config.pl \"$basisdir \" \"$branddir \" \"$userinstallpath \" \"$DATA \" \"$buildid\""; + $Command = "$PERL config.pl \"$branddir\" \"$userinstallpath\" \"$buildid\""; execute_Command ($Command, $error_patchConfig, $show_Message, $command_normal ); # copy basicscripts (error 9) diff --git a/testautomation/chart2/required/ch2_updt_calc.bas b/testautomation/chart2/required/ch2_updt_calc.bas index 261424c87cd9..0f9bff4b0103 100755..100644 --- a/testautomation/chart2/required/ch2_updt_calc.bas +++ b/testautomation/chart2/required/ch2_updt_calc.bas @@ -146,6 +146,7 @@ sub LoadIncludeFiles use "global\system\includes\master.inc" use "global\system\includes\gvariabl.inc" use "global\tools\includes\optional\t_set_standard_controls.inc" + use "global\tools\includes\optional\t_ole.inc" Call GetUseFiles gApplication = "CALC" end sub diff --git a/testautomation/chart2/tools/ch_tools_common.inc b/testautomation/chart2/tools/ch_tools_common.inc index 67f67d3e3f23..311e8c354f74 100644 --- a/testautomation/chart2/tools/ch_tools_common.inc +++ b/testautomation/chart2/tools/ch_tools_common.inc @@ -42,6 +42,8 @@ sub fInsertOLE as BOOLEAN 'Insert Chart OLE in Document + 'Get localised OLE names + call GetOleDefaultNames() fInsertOLE = FALSE '/// Insert / Object / OLE InsertObjectOLEObject @@ -51,9 +53,8 @@ sub fInsertOLE as BOOLEAN if Objekttyp.getItemcount < 1 then warnlog "There are no OLE-Objects in the listbox" endif - '/// Select 3rd entry in listbox (which should be the chart) - Objekttyp.TypeKeys "<HOME>" - Objekttyp.TypeKeys "<Down>", 2 + '/// Select chart in listbox + Objekttyp.Select gOLEChart '/// Quit dialog using OK OLEObjektEinfuegen.OK sleep(2) diff --git a/testautomation/framework/optional/includes/basic_delete_modules.inc b/testautomation/framework/optional/includes/basic_delete_modules.inc index b5c1f12a101d..3fe642ea8ec6 100644 --- a/testautomation/framework/optional/includes/basic_delete_modules.inc +++ b/testautomation/framework/optional/includes/basic_delete_modules.inc @@ -37,20 +37,20 @@ testcase tDeleteModulesAtRunningBasic dim brc as boolean const MAX_WAIT = 3000 - + dim iMenuItemCount as integer printlog( "Open a new writer-doc" ) gApplication = "WRITER" - Call hNewDocument() - printlog( "Create a new module " ) + printlog( "Open the BASIC Organizer" ) brc = hOpenBasicOrganizerFromDoc() if ( not brc ) then warnlog( "Unable to open BASIC organizer for the document" ) goto endsub endif - + + printlog( "Create a new module for the current document" ) brc = hCreateModuleForDoc() if ( not brc ) then warnlog( "Unable to create a basic module for the document" ) @@ -76,15 +76,14 @@ testcase tDeleteModulesAtRunningBasic Tabbar.OpenContextMenu() try - if ( hMenuItemGetCount() = 5 ) then - warnlog( "#i101972# - Disabled entries are shown in context menu on tab bar" ) - end if - - - if ( hMenuItemGetCount() = 3 ) then - warnlog( "Delete is active in context menu for a running macro => BUG!" ) - end if - + iMenuItemCount = hMenuItemGetCount() + + select case ( iMenuItemCount ) + case 2 : printlog( "Correct number of items in menu: " & iMenuItemCount ) + case 3 : warnlog ( "Delete is active in context menu for a running macro => BUG!" ) + case 5 : warnlog ( "#i101972# - Disabled entries are shown in context menu on tab bar" ) + default : warnlog ( "Incorrect itemcount in context menu: " & iMenuItemCount ) + end select catch warnlog( "Unable to retrieve the number of menuitems" ) endcatch @@ -98,8 +97,7 @@ testcase tDeleteModulesAtRunningBasic warnlog( "Slot not finished, timeout reached" ) endif - Call hCloseDocument() - Call hCloseDocument() + Call hFileCloseAll() endcase diff --git a/testautomation/framework/optional/includes/basic_documents.inc b/testautomation/framework/optional/includes/basic_documents.inc index 47173efb8ef5..d5d12b1aa12f 100644 --- a/testautomation/framework/optional/includes/basic_documents.inc +++ b/testautomation/framework/optional/includes/basic_documents.inc @@ -35,12 +35,8 @@ private const IDOCS = 5 testcase tBasicDocuments - qaerrorlog( "#i90435# Untitled documents unnumbered in BASIC organizer" ) - goto endsub - const CFN = "tBasicDocuments::" - dim brc as boolean dim sFileWriter as string dim sFileCalc as string @@ -55,61 +51,66 @@ testcase tBasicDocuments ' in the Macro Organizer const DOC_NAME = "basic" - printlog( "" ) + printlog( "Set macro security level to medium" ) iSecLevel = hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_MEDIUM ) - + + printlog( "Open one single unchanged Writer document" ) hInitSingleDoc() kontext "DocumentWriter" DocumentWriter.typeKeys( "tBasicDocuments - initial document - discard after test" ) gApplication = "WRITER" - printlog( "" ) + printlog( "Create a Writer workfilename (build path and filename)" ) brc = hCreateBasicWorkFiles() sFileWriter = hGetBasicWorkFile( "current" ) gApplication = "CALC" - printlog( "" ) + printlog( "Create a Calc workfilename (build path and filename)" ) brc = hCreateBasicWorkFiles() sFileCalc = hGetBasicWorkFile( "current" ) - printlog( "" ) + printlog( "Open the writer file" ) brc = hFileOpen( sFileWriter ) brc = hAllowMacroExecution() if ( not brc ) then warnlog( "Missing Macro execution dialog. Please check the file/security settings" ) endif + + printlog( "Open the Calc file" ) brc = hFileOpen( sFileCalc ) brc = hAllowMacroExecution() if ( not brc ) then warnlog( "Missing Macro execution dialog. Please check the file/security settings" ) endif - printlog( "" ) + printlog( "Open the BASIC organizer" ) brc = hOpenBasicOrganizerFromDoc() + printlog( "Retreive the names of all nodes from the treelist" ) hGetVisibleNodeNames( MakroAus , cNodeListA() ) - printlog( "" ) + printlog( "Verify that both documents are listed - one Writer, one Calc with identical names" ) iHitCount = hCountMatchesInList( cNodeListA() , DOC_NAME ) if ( iHitCount <> 2 ) then warnlog( "There should be two documents with the name " & DOC_NAME & "listed." ) endif - + + printlog( "Click Manage..." ) verwalten.click() - printlog( "" ) + printlog( "Get the nodes list from the object organizer tabs - first tab" ) brc = hSelectBasicObjectOrganizerTab( 1 ) ListAllDelete( cNodeListB() ) hGetVisibleNodeNames( ModulListe , cNodeListB() ) - printlog( "" ) + printlog( "Verify that both documents are listed on both relevant tabpages" ) iHitCount = hCountMatchesInList( cNodeListA() , DOC_NAME ) if ( iHitCount <> 2 ) then warnlog( "There should be two documents with the name " & DOC_NAME & "listed." ) endif - printlog( "" ) + printlog( "Switch to second tab" ) brc = hSelectBasicObjectOrganizerTab( 2 ) ListAllDelete( cNodeListB() ) hGetVisibleNodeNames( ModuleList , cNodeListB() ) @@ -118,34 +119,33 @@ testcase tBasicDocuments hListPrint( cNodeListB() , "List of objects found in treelist" ) endif - printlog( "" ) + printlog( "Verify" ) iHitCount = hCountMatchesInList( cNodeListB() , DOC_NAME ) if ( iHitCount <> 2 ) then warnlog( "There should be two documents with the name " & DOC_NAME & "listed." ) endif - printlog( "" ) + printlog( "Third tab (should not list the document" ) brc = hSelectBasicObjectOrganizerTab( 3 ) brc = hTestLibraryListBox( cNodeListA() ) - printlog( "" ) printlog( CFN & "Closing dialogs..." ) TabBibliotheken.cancel() - + + printlog( "Cleanup: Close macro organizer" ) Kontext "Makro" Makro.cancel() - brc = hDestroyDocument() - brc = hDestroyDocument() - + printlog( "Cleanup: Close all files" ) + hFileCloseAll() + + printlog( "Cleanup: Remove workfiles" ) brc = hDeleteFile( sFileWriter ) brc = hDeleteFile( sFileCalc ) - + + printlog( "Rest macro security level" ) hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT ) - hDestroyDocument() - - endcase '******************************************************************************* @@ -154,15 +154,11 @@ function hTestLibraryListBox( cNodeList() ) as boolean const CFN = "hTestLibraryListBox::" - - dim iEntry as integer dim cEntry as string - dim brc as boolean + dim brc as boolean : brc = true dim irc as integer - brc = true - if ( bibliothek.getItemCount() <> IDOCS ) then warnlog( CFN & "Incorrect number of items in listbox" ) printlog( CFN & "Expected: " & bibliothek.getItemCount() ) @@ -186,5 +182,4 @@ function hTestLibraryListBox( cNodeList() ) as boolean next iEntry - end function diff --git a/testautomation/framework/optional/includes/f_usage_tracking.inc b/testautomation/framework/optional/includes/f_usage_tracking.inc index 5abdade49ccf..7ea54855eb5d 100644 --- a/testautomation/framework/optional/includes/f_usage_tracking.inc +++ b/testautomation/framework/optional/includes/f_usage_tracking.inc @@ -31,22 +31,19 @@ '* '\****************************************************************************** -' Concept -' The usage tracking functionality is disabled during test init. -' Configuration is done in Tools/Options. There a tabpage must exist that -' offers the functionality to enable/disable tracking and to show what has -' logged. - private const LOGFILE = "user\temp\Feedback\Current.csv" '******************************************************************************* testcase tUsageTracking1 - printlog( "Test case 1: Presence of the Usage Tracking featureset (API)" ) + printlog( "Test case 1: Presence of the Usage Tracking featureset" ) + + ' Broken in CWS sb111' + ' Currently missing: Check for Office brand, StarOffice should always have OOoImp enabled' if ( not gOOoImprovementIsEnabled ) then - warnlog( "Could not access API for usage tracking program" ) + warnlog( "Usage tracking program is not enabled for this build" ) endif endcase @@ -87,14 +84,20 @@ testcase tUsageTracking3 if ( TabOOoImprovement.exists( 1 ) ) then if ( not ParticipateNo.isChecked() ) then - qaerrorlog( "#i98736# - UI should reflect current status for usage tracking: No" ) + warnlog( "#i98736# - UI should reflect current status for usage tracking: No" ) endif if ( ShowData.isEnabled() ) then - qaerrorlog( "#i97340# - Show data button should not be enabled if nothing is logged" ) + warnlog( "#i97340# - Show data button should not be enabled if nothing is logged" ) ShowData.click() + kontext "FilterAuswahl" + if ( FilterAuswahl.exists( 2 ) ) then + warnlog( "Filter Selection dialog is not expected at this point, ") + FilterAuswahl.cancel() + endif + kontext "Active" if ( Active.exists( 2 ) ) then qaerrorlog( "Messagebox not required as control should not be enabled (see #i97340#)" ) @@ -118,7 +121,7 @@ testcase tUsageTracking3 else warnlog( "OOo Improvement Tabpage (Tools/Options) is missing" ) endif - + kontext "OptionenDlg" OptionenDlg.cancel() diff --git a/testautomation/framework/optional/includes/help_bookmarks.inc b/testautomation/framework/optional/includes/help_bookmarks.inc index bfa2384c8eca..c4aebad1af9d 100644 --- a/testautomation/framework/optional/includes/help_bookmarks.inc +++ b/testautomation/framework/optional/includes/help_bookmarks.inc @@ -155,23 +155,27 @@ testcase tHelpBookmarks printlog( "Verify that the renamed bookmark still exists") Kontext "BookmarksPage" - Bookmarks.select( 1 ) - cStringBookmark = Bookmarks.getSelText() - if ( cStringBookmark = MYBOOKMARK ) then - printlog( "The bookmark has the correct name") - else - warnlog( "Incorrect name displayed in bookmarks list") - endif - - printlog( "Delete the Bookmark (using context menu)") - hUseBookmarksContextMenu( "delete") - - printlog( "verify that the bookmark has been deleted (none left)") - kontext "Bookmarks" - if ( bookmarks.getItemCount = 0 ) then - printlog( "Bookmark has been deleted") + if ( Bookmarks.getItemCount() > 0 ) then + Bookmarks.select( 1 ) + cStringBookmark = Bookmarks.getSelText() + if ( cStringBookmark = MYBOOKMARK ) then + printlog( "The bookmark has the correct name") + else + warnlog( "Incorrect name displayed in bookmarks list") + endif + + printlog( "Delete the Bookmark (using context menu)") + hUseBookmarksContextMenu( "delete") + + printlog( "verify that the bookmark has been deleted (none left)") + kontext "Bookmarks" + if ( bookmarks.getItemCount = 0 ) then + printlog( "Bookmark has been deleted") + else + warnlog( "There are bookmarks left over, please check") + endif else - warnlog( "There are bookmarks left over, please check") + warnlog( "Bookmarks are lost on program restart") endif printlog( "Close the help") diff --git a/testautomation/framework/optional/includes/ole_1.inc b/testautomation/framework/optional/includes/ole_1.inc index 3e5d7af304a1..a90d517620a1 100644 --- a/testautomation/framework/optional/includes/ole_1.inc +++ b/testautomation/framework/optional/includes/ole_1.inc @@ -41,13 +41,13 @@ testcase tOLEWriter Call hNewDocument PrintLog "- Writer : Chart without table" - InsertObjectChart - sleep(4) + hUseAsyncSlot( "InsertObjectChart" ) + Kontext "DocumentChart" - if DocumentChart.Exists(5) then + if ( DocumentChart.Exists( 5 ) ) then FormatChartType Kontext "ChartType" - if ChartType.Exists(5) then + if ( ChartType.Exists( 5 ) ) then ChartType.Cancel else warnlog "Chart Type dialog did bot occour." @@ -56,18 +56,22 @@ testcase tOLEWriter DocumentChart.TypeKeys "<ESCAPE>" Kontext "DocumentWriter" DocumentWriter.TypeKeys "<DELETE>" - sleep(1) else warnlog "Chart has not been inserted." end if - sleep(4) + PrintLog "- Writer : Chart out of a table only with numbers" - InsertTableWriter + hUseAsyncSlot( "InsertTableWriter" ) Kontext "TabelleEinfuegenWriter" - Spalten.SetText "3" - Zeilen.SetText "10" - TabelleEinfuegenWriter.OK + if ( TabelleEinfuegenWriter.exists( 1 ) ) then + Spalten.SetText "3" + Zeilen.SetText "10" + TabelleEinfuegenWriter.OK + TabelleEinfuegenWriter.notExists( 2 ) + else + warnlog( "Dialog <TabelleEinfuegenWriter> did not open" ) + endif Kontext "DocumentWriter" for i%=1 to 10 @@ -80,7 +84,7 @@ testcase tOLEWriter DocumentWriter.TypeKeys "<Left>", 3 next i% - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) hStepThroughChartWizard() Kontext "DocumentChart" @@ -90,16 +94,19 @@ testcase tOLEWriter Sleep 1 DocumentWriter.TypeKeys "<Down>", 20 DocumentWriter.TypeKeys "<Return>", 2 - Sleep 1 - PrintLog "- Writer : Chart out of a table only with chars" - InsertTableWriter + hUseAsyncSlot( "InsertTableWriter" ) Kontext "TabelleEinfuegenWriter" - Spalten.SetText "3" - Zeilen.SetText "10" - TabelleEinfuegenWriter.OK + if ( TabelleEinfuegenWriter.exists( 1 ) ) then + Spalten.SetText "3" + Zeilen.SetText "10" + TabelleEinfuegenWriter.OK + TabelleEinfuegenWriter.notExists( 2 ) + else + warnlog( "Dialog <TabelleEinfuegenWriter> did not open" ) + endif Kontext "DocumentWriter" for i%=1 to 10 @@ -112,8 +119,7 @@ testcase tOLEWriter DocumentWriter.TypeKeys "<Left>", 3 next i% - InsertObjectChart - + hUseAsyncSlot( "InsertObjectChart" ) hStepThroughChartWizard() Kontext "DocumentChart" @@ -123,30 +129,32 @@ testcase tOLEWriter Sleep 1 DocumentWriter.TypeKeys "<Down>", 20 DocumentWriter.TypeKeys "<Return>", 2 - Sleep 1 PrintLog "- Writer : Math" - InsertObjectFormulaWriter + hUseAsyncSlot( "InsertObjectFormulaWriter" ) gMouseClick ( 1, 1) Kontext "DocumentWriter" DocumentWriter.TypeKeys "<Delete>" - Sleep 1 PrintLog "- Writer : floating frame" + hUseAsyncSlot( "InsertFloatingFrame" ) - 'warnlog( "#148094# - Crash when deselecting floating frame in Writer" ) - - InsertFloatingFrame - + printlog( "Properties dialog for floating frame should open" ) Kontext "TabEigenschaften" - FrameName.SetText "Hallo" - Inhalt.SetText ConvertPath ( gTesttoolPath+"global\input\graf_inp\borabora.jpg" ) - - TabEigenschaften.OK - Sleep 2 + if ( TabEigenschaften.exists( 1 ) and TabEigenschaften.isVisible() ) then + + printlog( "Name the floating frame, close the dialog" ) + FrameName.SetText "Hallo" + Inhalt.SetText ConvertPath ( gTesttoolPath+"global\input\graf_inp\borabora.jpg" ) + + TabEigenschaften.OK + TabEigenSchaften.notExists( 2 ) + + endif + printlog( "Close the writer document" ) Kontext "DocumentWriter" DocumentWriter.TypeKeys "<Delete>" Sleep 1 @@ -327,7 +335,7 @@ testcase tOLEDraw MenuSelect(0) try - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) Sleep ( 2 ) Kontext "DocumentChart" @@ -407,7 +415,7 @@ testcase tOLEImpress PrintLog "- Impress : Chart" try - InsertObjectChart + hUseAsyncSlot( "InsertObjectChart" ) sleep 2 gMouseClick ( 1 , 1 ) diff --git a/testautomation/framework/optional/includes/security_recommend_password.inc b/testautomation/framework/optional/includes/security_recommend_password.inc index 33811d35a7b7..eaceab3691b9 100644 --- a/testautomation/framework/optional/includes/security_recommend_password.inc +++ b/testautomation/framework/optional/includes/security_recommend_password.inc @@ -81,7 +81,6 @@ testcase tRecommendPassword( filetypeID as string ) if ( rc = 0 ) then if AutomatischeDateinamenserweiterung.Exists then - QAErrorLog "OBSOLETE: Check-box Automatic file extension in file dialog will be removed soon!" AutomatischeDateinamenserweiterung.Uncheck endif diff --git a/testautomation/framework/required/includes/basic_macroassignment.inc b/testautomation/framework/required/includes/basic_macroassignment.inc index 3d0d09fee347..2db0c680967c 100644 --- a/testautomation/framework/required/includes/basic_macroassignment.inc +++ b/testautomation/framework/required/includes/basic_macroassignment.inc @@ -100,20 +100,28 @@ testcase tUpdtMacroAssignment Kontext "AssignMacro" printlog( "Current Dialog: Assign Macro" ) - call dialogtest( AssignMacro ) - printlog( "Click the Assign-Button on the Macro-Assignment-Dialog" ) - AssignButton.click() - - Kontext "ScriptSelector" - printlog( "Current Dialog: ScriptSelector" ) - call dialogtest( ScriptSelector ) - printlog( "Cancel the scriptselector" ) - ScriptSelector.cancel() - - Kontext "AssignMacro" - printlog( "Current Dialog: Assign Macro" ) - printlog( "Cancel the Script-Assignement-Dialog" ) - AssignMacro.cancel() + if ( AssignMacro.exists( 1 ) ) then + call dialogtest( AssignMacro ) + printlog( "Click the Assign-Button on the Macro-Assignment-Dialog" ) + AssignButton.click() + + Kontext "ScriptSelector" + printlog( "Current Dialog: ScriptSelector" ) + if ( ScriptSelector.exists( 1 ) ) then + call dialogtest( ScriptSelector ) + printlog( "Cancel the scriptselector" ) + ScriptSelector.cancel() + else + warnlog( "Failed to open/access <ScriptSelector>" ) + endif + + Kontext "AssignMacro" + printlog( "Current Dialog: Assign Macro" ) + printlog( "Cancel the Script-Assignement-Dialog" ) + AssignMacro.cancel() + else + warnlog( "Failed to open/access <AssignMacro> dialog" ) + endif endif diff --git a/testautomation/framework/tools/includes/help_tools.inc b/testautomation/framework/tools/includes/help_tools.inc index 613aadc17393..ed55c319fd40 100644 --- a/testautomation/framework/tools/includes/help_tools.inc +++ b/testautomation/framework/tools/includes/help_tools.inc @@ -50,51 +50,25 @@ function hOpenHelp() as boolean '///<u>Description</u>: '///<ul> + const CFN = "hOpenHelp::" - dim iTry as integer - dim brc as boolean - brc = false - - printlog( CFN & "Enter" ) + HelpContents - '///+<li>Open the help Browser using the slot</li> - try - HelpContents - catch - printlog( CFN & "Failed to open help, slot failed" ) - hOpenHelp() = false - exit function - endcatch - - '///+<li>Verify that the help is indeed open (max 10 sec.)</li> - Kontext "StarOfficeHelp" - for iTry = 1 to 10 - - if ( StarOfficeHelp.exists() ) then - brc = true - exit for - endif - - sleep( 1 ) - - next iTry - - '///+<li>Print a status to the log, return TRUE or FALSE</li> - if ( brc ) then - printlog( CFN & "Exit: Help is open" ) + if ( WaitSlot( 3000 ) <> WSFinished ) then + printlog( CFN & "Failed to open help" ) + hOpenHelp() = FALSE else - printlog( CFN & "Exit: Help is not open" ) - kontext "Active" - if ( Active.exists( 2 ) ) then - printlog( "Msgbox: " & Active.getText() - Active.ok() + kontext "StarOfficeHelp" + if ( StarOfficeHelp.exists() ) then + printlog( CFN & "Help was opened" ) + hOpenHelp() = TRUE + else + printlog( CFN & "Help was not opened" ) + hOpenHelp() = FALSE endif endif - - '///</ul> - hOpenHelp() = brc - + end function '******************************************************************************* @@ -116,38 +90,26 @@ function hCloseHelp() as boolean '///</ul> '///</ol> - '///<u>Description</u>: - '///<ul> const CFN = "hCloseHelp::" - dim brc as boolean - - printlog( CFN & "Enter" ) - - '///+<li>Verify that the Help Browser is Open</li> - kontext "StarOfficeHelp" - if ( not StarOfficeHelp.exists() ) then - printlog( CFN & "Help is not open" ) - hCloseHelp() = false - exit function - endif - - '///+<li>Close the Help Browser by typing CTRL+F4</li> - StarOfficeHelp.typeKeys( "<MOD1 F4>" ) - '///+<li>Verify that the Help Browser is not open (anymore)</li> kontext "StarOfficeHelp" if ( StarOfficeHelp.exists() ) then - printlog( CFN & "Exit: Help is still open" ) - brc = false + + hUseAsyncSlot( "FileClose") + StarOfficeHelp.notExists( 3 ) + + if ( StarOfficeHelp.Exists() ) then + printlog( CFN & "Help was not closed") + hCloseHelp() = FALSE + else + printlog( CFN & "Help was closed") + hCloseHelp() = TRUE + endif else - printlog( CFN & "Exit: Help has been closed" ) - brc = true + printlog( CFN & "Help is not open, no action taken") + hCloseHelp() = TRUE endif - '///+<li>Return TRUE or FALSE</li> - '///</ul> - hCloseHelp() = brc - end function '****************************************************************************** diff --git a/testautomation/framework/tools/includes/pbrowser_tools.inc b/testautomation/framework/tools/includes/pbrowser_tools.inc index 47eb5e933985..fefc739e48ea 100644 --- a/testautomation/framework/tools/includes/pbrowser_tools.inc +++ b/testautomation/framework/tools/includes/pbrowser_tools.inc @@ -61,36 +61,38 @@ function hOpenPropertyBrowser() as boolean '///<ul> const CFN = "hOpenPropertyBrowser::" + dim irc as integer '///+<li>Open the property browser (call slot)</li> - try - ContextProperties - - '///+<li>Verify that the property browser is open</li> - kontext "ControlPropertiesTabControl" - if ( ControlPropertiesTabControl.exists( 2 ) ) then - - '///+<li>Activate General-tabpage</li> - ControlPropertiesTabControl.setPage( TabGeneralControl ) - - '///+<li>Verify that the General-tabpage is visible</li> - kontext "TabGeneralControl" - if ( TabGeneralControl.isVisible() ) then - printlog( CFN & "ok" ) - hOpenPropertyBrowser() = true - else - printlog( CFN & "General-tab is not visible." ) - hOpenPropertyBrowser() = false - endif - else - printlog( CFN & "Could not open property browser" ) - hOpenPropertyBrowser() = false - endif - catch + irc = hUseAsyncSlot( "ContextProperties" ) + + ' Check that the slot did indeed get executed. If not: Warn and exit + if ( irc = -1 ) then + warnlog( CFN & "hUseAsyncSlot timed out for <ContextProperties>" ) hOpenPropertyBrowser() = false - printlog( CFN & "Slot <ContextProperties> not available" ) - endcatch + exit function + endif + '///+<li>Verify that the property browser is open</li> + kontext "ControlPropertiesTabControl" + if ( ControlPropertiesTabControl.exists( 2 ) ) then + + '///+<li>Activate General-tabpage</li> + ControlPropertiesTabControl.setPage( TabGeneralControl ) + + '///+<li>Verify that the General-tabpage is visible</li> + kontext "TabGeneralControl" + if ( TabGeneralControl.isVisible() ) then + printlog( CFN & "ok" ) + hOpenPropertyBrowser() = true + else + printlog( CFN & "General-tab is not visible." ) + hOpenPropertyBrowser() = false + endif + else + printlog( CFN & "Could not open property browser" ) + hOpenPropertyBrowser() = false + endif '///</ul> end function diff --git a/testautomation/global/system/includes/iniinfo.inc b/testautomation/global/system/includes/iniinfo.inc index 24a0812a8ea0..a5ef11521e5f 100644 --- a/testautomation/global/system/includes/iniinfo.inc +++ b/testautomation/global/system/includes/iniinfo.inc @@ -298,50 +298,11 @@ end function sub GetLanguageInformation '/// Extracts the language information from <i>Setup.xcu</i>. '/// <u>note</u>: It uses the <b>fgetL10Nvalue</b>. - Dim i as integer - Dim iTimeOut as integer Dim sLanOutIni as string - Dim SetupXML as String - Dim ChildsOfSetupNodes as integer - Dim ArtOfInst as string - Dim SetupXMLNet as string - Dim SetupXMLDefault as string - dim SetupXcuPath as string - - SetupXcuPath = ConvertPath("share\registry\data\org\openoffice\Setup.xcu") - SetupXML = gOfficePath & ConvertPath("user\registry\data\org\openoffice\Setup.xcu") - - if gNetzInst = TRUE then - SetupXMLNet = gNetzOfficePath & SetupXcuPath - ArtOfInst = "NET- / Workstation Inst." - else - SetupXMLDefault = gOfficePath & SetupXcuPath - ArtOfInst = "FAT Inst." - end if - - ' Issue #i97875 (JSK) experimental delay - ' If we're too fast we might encounter that the Setup.xcu is not created yet. - ' So we retry a couple of times - while( not FileExists( SetupXML ) ) - iTimeOut = iTimeOut + 1 - if ( iTimeOut = 10 ) then - warnlog "GetLanguageInformation(" & ArtOfInst & "): " & SetupXML & " not found => can't get the correct Office-Language! Default (01) will be used." - iSprache = 01 - Exit sub - endif - wait( 100 ) - wend ' function 'fgetL10Nvalue' is also in this library - sLanOutIni = fgetL10Nvalue(SetupXML) + sLanOutIni = fgetL10Nvalue() ' BugID 98315 -> looking in networkpath for the language until bug will be fixed. - if sLanOutIni = "" and gNetzInst = TRUE then - sLanOutIni = fgetL10Nvalue(SetupXMLNet) - end if - ' It is an English FAT version 645m9s2 or higher. - if sLanOutIni = "" and gNetzInst = FALSE then - sLanOutIni = fgetL10Nvalue(SetupXMLDefault) - end if if sLanOutIni = "" then warnlog "=> default is now 01 = en_US" @@ -693,54 +654,15 @@ end function '------------------------------------------------------------------------- -function fgetL10Nvalue ( setupxcu as string) as string -'/// Gets the value of the child from -'///+ <ul><li>node: oor:name="L10N"<ul><li>node: oor:name = "ooLocale"</li><ul><li>element: value</li></ul></ul></li></ul> -'///+ in a file (normaly <b>Setup.xcu</b> in network path or installation path). -'/// <u>Note</u>: The structure is hard coded and specified. A change must be announced by feature mail! -'/// <u><i>Description</i></u>: - Dim i as integer - Dim ChildsOfSetupNodes as integer - - fgetL10Nvalue = "" - -'///<ul><li>Open the file given as parameter.</li> - SAXReadFile(setupxcu) -'///+<li>Go to the DOM (Document Object Model) root.</li> - SAXSeekElement("/") -'///+<li>Go <b>into</b> the first <b>node</b> of the tree.</li> - SAXSeekElement(1) -'///+<li>Get the <b>count of children</b> (nodes/elements) in that node.</li> - ChildsOfSetupNodes = SAXGetChildCount - for i = 1 to ChildsOfSetupNodes -'///+<li>Run in a for next loop of going <b>into</b> the next node and existing it until ...</li> - SAXSeekElement(i) -'///+<li>...the <i>oor:name</i> attribute value is identical to "L10N"</li> - if SaxGetAttributeValue("oor:name") = "L10N" then -'///+<li>Go <b>into</b> the next node ("prop")</li> - SAXSeekElement("prop") -'///+<li>If the attribute value of "oor:name" is identical to "ooLocale"...</li> - if SAXgetAttributeValue("oor:name") = "ooLocale" then -'///+<li>go <b>into</b> that node and also into the next one, named "value".</li> - SAXSeekElement("value") -'///+<li>Go <b>into</b> the next node - a <i>node type</i> <b>character</b>...</li> - SAXSeekElement(1) - if SAXGetNodeType = NodeTypeCharacter then -'///+<li>...and get the characters out in the string which will be returned from this function.</li> - fgetL10Nvalue = SAXGetChars -'///+<li><i>Release()</i> the DOM.</li> - SAXRelease() -'///+<li>Exit the function.</li></ul> - Exit function - end if - else - SAXRelease() -'/// If the result is empty exit the function without warning.</ul> - Exit function - end if - end if - SAXSeekElement(0) - next i +function fgetL10Nvalue() as string + dim args(0) as new com.sun.star.beans.NamedValue + args(0).Name = "nodepath" + args(0).Value = "/org.openoffice.Setup/L10N" + fgetL10Nvalue = hGetUNOService()._ + createInstance("com.sun.star.configuration.DefaultProvider")._ + createInstanceWithArguments(_ + "com.sun.star.configuration.ConfigurationAccess", args())._ + getByName("ooLocale") end function '------------------------------------------------------------------------- diff --git a/testautomation/global/system/includes/master.inc b/testautomation/global/system/includes/master.inc index bd750c4a4d21..6f8acdf04853 100644 --- a/testautomation/global/system/includes/master.inc +++ b/testautomation/global/system/includes/master.inc @@ -923,7 +923,7 @@ sub mMakeGeneralOptionsAPI endcatch '///+ OOo Improvement - only if BUILD_SPECIAL is set we have this file created. - sTempPath = gOfficeBasisPath & "share/registry/modules/org/openoffice/Office/Jobs/Jobs-oooimprovement.xcu" + sTempPath = gOfficeBasisPath & "share/registry/oooimprovement.xcd" sTempPath = ConvertPath( sTempPath ) if ( FileExists( sTempPath ) ) then diff --git a/testautomation/global/tools/includes/optional/t_filetools.inc b/testautomation/global/tools/includes/optional/t_filetools.inc index c113c6f2e353..76cbb35b153c 100644 --- a/testautomation/global/tools/includes/optional/t_filetools.inc +++ b/testautomation/global/tools/includes/optional/t_filetools.inc @@ -143,17 +143,17 @@ function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean kontext "Active" if ( Active.exists( 1 ) ) then if ( Active.getButtonCount() = 2 ) then - printlog( CFN & "Probably the dreaded <File corrupted warning>" ) + printlog( CFN & "<Update links dialog> or <File corruption warning>" ) active.yes() hFileWait( FALSE ) kontext "Active" if ( Active.exists( 2 ) ) then + qaerrorlog( "#105670# - File corruption warning, the template is broken" ) qaerrorlog( CFN & "Trying to recover." ) Active.ok() hHandleActivesOnLoad() = FALSE exit function endif - qaerrorlog( "#105670# - File corruption warning, the template is broken" ) endif endif diff --git a/testautomation/global/tools/includes/required/t_doc1.inc b/testautomation/global/tools/includes/required/t_doc1.inc index d8af032955cd..ed74336dfc72 100644 --- a/testautomation/global/tools/includes/required/t_doc1.inc +++ b/testautomation/global/tools/includes/required/t_doc1.inc @@ -224,33 +224,12 @@ end function ' '------------------------------------------------------------------------------- ' -sub hCloseDocument ( optional bANewDoc ) - '/// hCloseDocument : close a document without saving ///' - '///+ all documents will be closed without saving ///' - Dim sFehler$ +function hCloseDocument() - if IsMissing ( bANewDoc ) <> TRUE then - if bANewDoc = TRUE then - gNoNewDoc = FALSE - else - gNoNewDoc = TRUE - end if - end if + '/// Trigger FileClose slot' + hUseAsyncSlot( "FileClose") - ' if no new document was created, it isn't closed - if gNoNewDoc = TRUE then - exit sub - end if - - Sleep 3 - try - FileClose - catch - Exceptlog - exit sub - endcatch - - Sleep 1 + '/// Accept to lose changes' Kontext "Active" if Active.Exists(2) then try @@ -259,8 +238,11 @@ sub hCloseDocument ( optional bANewDoc ) Active.Click ( 202 ) endcatch end if - Sleep (2) -end sub + + '/// Wait for FileClose to complete' + WaitSlot( 2000 ) + +end function ' '------------------------------------------------------------------------------- ' diff --git a/testautomation/global/tools/includes/required/t_doc2.inc b/testautomation/global/tools/includes/required/t_doc2.inc index 1c4b2305b1fe..fc5efb302231 100644 --- a/testautomation/global/tools/includes/required/t_doc2.inc +++ b/testautomation/global/tools/includes/required/t_doc2.inc @@ -126,6 +126,24 @@ function sMakeReadOnlyDocumentEditable() as boolean if ( VERBOSE ) then printlog( CFN & "Making document editable (create a copy) if it is readonly" ) + ' We still run into synchronization problems with the "Make document editable" feature + ' because we do not know when this button becomes available and ready for use: The + ' document has to be loaded, then we have to wait for the toolbar to get populated. + ' One thing appears to work though: Try to execute the slot using hUseAsyncSlot. + ' This is a little bit tricky because the state of the document is altered but if + ' the slot has been executed once we know for sure that the button on the toolbar is + ' available and can check its state and - if need be - chenge the document state back. + + ' ========== Workaround begin ========== + hUseAsyncSlot( "EditDoc" ) + kontext "Active" + if ( Active.exists() ) then + if ( VERBOSE ) then printlog( "Handling create copy message" ) + Active.yes() + wait( 1000 ) + endif + ' ========== Workaround end ========== + Kontext "Standardbar" if ( Bearbeiten.IsEnabled() ) then diff --git a/testautomation/global/tools/includes/required/t_tools1.inc b/testautomation/global/tools/includes/required/t_tools1.inc index 21f268b027a7..a908af39e5af 100644 --- a/testautomation/global/tools/includes/required/t_tools1.inc +++ b/testautomation/global/tools/includes/required/t_tools1.inc @@ -1006,9 +1006,6 @@ sub sResetTheOffice as boolean Dim sDefaultLocaleCJK as string Dim sDefaultLocaleCTL as string Dim sfgetL10Nvalue as string - Dim SetupXML as String - Dim SetupXMLNet as string - Dim SetupXMLDefault as string Dim sLanOutIni as string sString = "qa:qatesttool:calc:options:inc:coption1.inc:: " @@ -1017,25 +1014,11 @@ sub sResetTheOffice as boolean ' only run on UNIX platforms; there is a problem with the quickstarter on win32 if ("unx" = gPlatgroup) then try - SetupXML = gOfficePath & ConvertPath("user\registry\data\org\openoffice\Setup.xcu") - ' function 'fgetL10Nvalue' is also in this library - sLanOutIni = fgetL10Nvalue(SetupXML) + sLanOutIni = fgetL10Nvalue() catch - try - ' BugID 98315 -> looking in networkpath for the language until bug will be fixed. - SetupXMLNet = gNetzOfficePath & ConvertPath("share\registry\data\org\openoffice\Setup.xcu") - sLanOutIni = fgetL10Nvalue(SetupXMLNet) - catch - try - ' It is an English FAT version 645m9s2 or higher. - SetupXMLDefault = gOfficePath & ConvertPath("share\registry\data\org\openoffice\Setup.xcu") - sLanOutIni = fgetL10Nvalue(SetupXMLDefault) - catch - warnlog sString & SetupXML & " not found => can't get the correct Office-Language!." - sResetTheOffice = FALSE - Exit sub - endcatch - endcatch + warnlog sString & "can't get the correct Office-Language!." + sResetTheOffice = FALSE + Exit sub endcatch uno=hGetUnoService() @@ -1273,6 +1256,10 @@ function hUseAsyncSlot( cSlot as string ) as integer case "formatpagewriter" : FormatPageWriter case "insertindexesbibliographyentry" : InsertIndexesBibliographyEntry + case "insertobjectchart" : InsertObjectChart + case "inserttablewriter" : InsertTableWriter + case "insertobjectformulawriter" : InsertObjectFormulaWriter + case "insertfloatingframe" : InsertFloatingFrame case "contextpositionandsize" : ContextPositionAndSize @@ -1282,6 +1269,9 @@ function hUseAsyncSlot( cSlot as string ) as integer case "toolsupdatelinks" : ToolsUpdateLinks case "toolslanguagehangulhanjaconversion" : ToolsLanguageHangulHanjaConversion + ' This is the property browser in the BASIC IDE + case "contextproperties" : ContextProperties + case else : warnlog( "Unknown slot called: " & cSlot ) end select diff --git a/testautomation/global/tools/includes/required/t_tools2.inc b/testautomation/global/tools/includes/required/t_tools2.inc index 8ea2ed6315ee..2301c2e5648f 100644 --- a/testautomation/global/tools/includes/required/t_tools2.inc +++ b/testautomation/global/tools/includes/required/t_tools2.inc @@ -31,52 +31,6 @@ '* '\************************************************************************************* -sub GetOLEDefaultNames - - '/// Reads the names of all OLE objects from a reference file. -'///+ The OLE name-files are language dependent and should be created -'///+ using the the <i>getnames.bas</i> script running on Windows -'///+ The files are (per this revision) written and read utf-8 encoded. -'///+ The OLE names are stored in global variables. - - const CFN = "t_tools2::GetOLEDefaultNames():" - - dim sPath as string - sPath = gTesttoolPath & "global\input\olenames\" & gProductName - - dim sFile as String ' the file that contains the OLE names - sFile = convertpath( sPath & "\ole_" & iSprache & ".txt" ) - - dim sFilterList(20) as String ' the list that temporarily holds the OLE names - sFilterlist( 0 ) = "0" - - printlog( CFN & "Using OLE names from: " & sFile ) - - ' Find the reference file. Warn if not found and exit - if ( Dir ( sFile ) = "" ) then - - Warnlog( CFN & " The file for default-filter-names is missing." - PrintLog( "Please create the list with ..\global\tools\getnames.bas::GetFilterNames!" ) - exit sub - - end if - - ' Read the file data into an array (sFilterList), utf-8 encoded - call ListRead ( sFilterList(), sFile, "utf8" ) - - ' Evaluate the array and assign the data to global variables. - gOLEWriter = hGetValueForKeyAsString( sFilterList() , "WRITER" ) - gOLECalc = hGetValueForKeyAsString( sFilterList() , "CALC" ) - gOLEImpress = hGetValueForKeyAsString( sFilterList() , "IMPRESS" ) - gOLEDraw = hGetValueForKeyAsString( sFilterList() , "DRAW" ) - gOLEMath = hGetValueForKeyAsString( sFilterList() , "MATH" ) - gOLEChart = hGetValueForKeyAsString( sFilterList() , "CHART" ) - gOLEOthers = hGetValueForKeyAsString( sFilterList() , "OTHER" ) - -end sub - -'------------------------------------------------------------------------- - function hSetLocaleStrings (fLocale as String, TBOstringLocale() as String ) as Boolean 'TODO: JSI, make real description from it! ' creator: TBO @ 25.10.2001 diff --git a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc index 393dd7f68fff..186fe00ae9e4 100644 --- a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc +++ b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc @@ -57,7 +57,7 @@ testcase tIBIS111099 if SwitchControlDesignMode.getState(2) = 0 then printlog "OK, design mode is disabled" else - warnlog "Document is opened in design mode -> #111099#" + warnlog "#i108315# Document is opened in design mode -> #111099#" end if else printlog "Form controls toolbar was not enabled." @@ -84,23 +84,20 @@ testcase tIBIS111158 sleep(2) Kontext "FormControls" try - if SwitchControlDesignMode.IsEnabled then + if SwitchControlDesignMode.GetState(2) = 0 then '/// Click on 'Design Mode on/off' button on 'Form Controls'-toolbar SwitchControlDesignMode.click sleep(2) - '/// Click on 'Form Design' button on 'Form Controls'-toolbar - FormDesignTools.Click - sleep(2) - else - printlog "Form controls toolbar was not enabled." end if catch - QAErrorlog "Document is opened in design mode -> #111099#" - QAErrorlog "No need to test if that one isn't fixed -> aborted" + warnlog "Form controls toolbar was not enabled, maybe the doc is writeprotected." + Call hToolbarSelect("CONTROLS", false) call hCloseDocument goto endsub endcatch - + '/// Click on 'Form Design' button on 'Form Controls'-toolbar + FormDesignTools.Click + sleep(2) Kontext "FormDesignTools" if FormDesignTools.Exists(2) then If ShowFmExplorer.IsEnabled then diff --git a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc index 4c1f18bf6cfe..5bf718203a47 100644 --- a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc @@ -500,7 +500,7 @@ testcase tFileSaveAsDBF Kontext if Active.exists(2) then printlog " " - warnlog "The following warning exists. This could be #i87325:" + warnlog "#i87325# - Unexpected messagebox" Printlog Active.GetText Printlog " " Active.OK |