diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-07-14 15:48:12 +0200 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-07-14 15:48:12 +0200 |
commit | 5e0b036b85f6268c8f676a12ebe06811880043fc (patch) | |
tree | b93e3e5b5a7a8a5f2e855b947eb200d9e081147a | |
parent | 32e32283f4a064f1a90e0c2269c9dc3feeb7bcce (diff) |
masterfix: #i10000# add api-adaptions from cws jl152ooo/OOO330_m1
-rw-r--r-- | smoketestoo_native/data/Global.xml | 2 | ||||
-rw-r--r-- | smoketestoo_native/data/Test_Ext.xml | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml index 12e8752eb..43d0a14e6 100644 --- a/smoketestoo_native/data/Global.xml +++ b/smoketestoo_native/data/Global.xml @@ -76,7 +76,7 @@ Global const cUnoDatabaseContext = cUnoPrefix + "sdb.DatabaseContext" Global const cUnoRowSet = cUnoPrefix + "sdb.RowSet" Global const cUnoSmoketestTestExtension = cUnoPrefix + "comp.smoketest.TestExtension" Global const cUnoSmoketestCommandEnvironment = cUnoPrefix + "deployment.test.SmoketestCommandEnvironment" -Global const cUnothePackageManagerFactory = cUnoPrefix + "deployment.thePackageManagerFactory" +Global const cExtensionManager = cUnoPrefix + "deployment.ExtensionManager" 'UserFieldNames Global const cUserFieldTestWriter = "Writer", cUserFieldTestCalc = "Calc", cUserFieldTestImpress = "Impress" diff --git a/smoketestoo_native/data/Test_Ext.xml b/smoketestoo_native/data/Test_Ext.xml index de7ad9183..9235b9600 100644 --- a/smoketestoo_native/data/Test_Ext.xml +++ b/smoketestoo_native/data/Test_Ext.xml @@ -53,15 +53,11 @@ sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension&q 'javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java and the code is in juh.jar cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment) - 'Create the component context and then get the singleton thePackageManagerFactory + 'Create the component context and then get the singleton ExtensionManager 'A singleton cannot be created with createUnoService ctx = getDefaultContext - factory = ctx.getValueByName("/singletons/" + cUnothePackageManagerFactory) + ext_mgr = ctx.getValueByName("/singletons/" + cExtensionManager) - 'Get the XPackageManager interface. By passing "user" we determine that the actions we perform on - 'XPackageManager only affect the user installation. To modify the share installation one would pass "share". - ext_mgr = factory.getPackageManager("user") - LogState (not IsNull (ext_mgr), "Extension "+ cMessageExtensionService, FileChannel) LogState (not IsNull (ext_mgr), "Extension "+ cMessageExtensionService, MainFileChannel) SetStatus (FilterType, cEXTService, not IsNull (ext_mgr)) @@ -74,7 +70,11 @@ sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension&q nCurrentAction = cEXTInstall 'Add the extension. We must provide a file URL here. - ext_mgr.addPackage(sExtensionURL + cExtensionFileName, "", obj_null, cmdEnv) + 'By passing "user" we determine that the actions we perform on + 'XExtensionManager only affect the user installation. To modify the share installation one would pass "share". + + Dim props() as Object + ext_mgr.addExtension(sExtensionURL + cExtensionFileName, props, "user", obj_null, cmdEnv) 'Check if the extension has been added by creating a service which is contained in the extension. oTestExtension = createUnoService(cUnoSmoketestTestExtension) @@ -91,7 +91,7 @@ sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension&q nCurrentAction = cEXTUninstall 'Remove the package - ext_mgr.removePackage("org.openoffice.legacy." + cExtensionFileName, cExtensionFileName, obj_null, cmdEnv) + ext_mgr.removeExtension("org.openoffice.legacy." + cExtensionFileName, cExtensionFileName, "user",obj_null, cmdEnv) 'Try to create the service which is contained in the now removed extension. oTestExtension = createUnoService(cUnoSmoketestTestExtension) |