Commits

Anonymous committed a61542f

masterfix: #i10000# add api-adaptions from cws jl152

  • Participants
  • Parent commits b539b9e
  • Tags OOO330_m1

Comments (0)

Files changed (2)

smoketestoo_native/data/Global.xml

 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"

smoketestoo_native/data/Test_Ext.xml

 	'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))
 	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)
 	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)