extension_manager_tools.inc

Created: Thu Jul 26 11:23:08 2007


extension_manager_tools.inc:
function hExtensionAddGUI( sPathToExtension as string, bExtensionHasLicense as boolean ) as integer

Add an extension via Extension Manager

This function adds an extension to the office using the Extension Manager GUI (formerly known as Package Manager).
It notifies about unexpected messageboxes, progressbars, missing depency warnings as well as license agreements. The function will exit on any error, print a message and return an errorcode.
The errorcode must be evaluated, some errors are fatal. Cleanup must be done outside of this function.
All new extensions are installed below My Packages (to the userlayer).
Starting point is any document or the backing window, the function will return to the starting document if possible


Input value(s):
  1. Path to extension (string)
  2. Expect a license text (boolean)
Return Value:
  1. Errorcode (Integer)
Description:

extension_manager_tools.inc:
function hExtensionRemoveGUI( cExtensionName as string ) as integer

Remove an extension via Extension Manager

This function removes a package/an extension by name.
It will notify about errorconditions such as non existing packages, errors during removal etc.
Some errors are considered fatal, others are recovered. If the error is non-fatal, the function returns to the document it started from
The function will do printlogs but no warnings so you must evaluate the returncode and you must clean up manually
Starting point is any document or backing window, the function will return to the starting point if possible


Input value(s):
  1. UI Name of the extension (string)
Return Value:
  1. Errorcode (integer)
Description:

extension_manager_tools.inc:
function sExtensionCLI(sCommand as string, sExtensionName as string, optional sExtensionPath as string) as string

Add/remove an extension with the command line tool 'unopkg'///' INPUT: sCommand: string of command from "add remove list reinstall" ///' INPUT: sExtensionName: name of the extension ///' INPUT: optional sExtensionPath: path to the extension ///' RETURN: currently nothing ///'

extension_manager_tools.inc:
function hExtensionGetItemList( cItemList() as string ) as integer

Get the list of all items in the extensions list

The array contains the list of all items in the extension manager GUI, including all components of the extensions. Consider this when defining the size of the array to be passed to this function as problems here are hard to debug.
Starting point is any document, the function will return to the calling document on completion


Input:
  1. Array for the list items (string)
Return Value:
  1. Number of items (integer)
Description:

extension_manager_tools.inc:
function hSelectExtensionID( iPos as integer ) as string

Select an item by index in the list of available extensions

This function needs the Extension Manager to be open. It will only select extensions but not their components.

Input:
  1. Absolute position of the extension to be selected (Integer)
Return Value:
  1. Name of the selected extension (String)
  2. Empty string on error (index out of range)
Description:

extension_manager_tools.inc:
function hSelectExtensionName( cName as string ) as integer

Select an item by name in the list of available extensions

This function needs the Extension Manager to be open. It will only select extensions but not their components.

Input:
  1. Name of the extension (String)
Return Value:
  1. Absolute position of the selected extension (Integer)
Description:

extension_manager_tools.inc:
function hSelectOptionsItem( cName as string, iIndex as integer ) as integer

Select an item in Tools/Options and verify

You need to open the Tools/Options dialog before using this function, it will not close the dialog either. No warnlogs are printed so evaluation of the return value is mandatory

Parameter(s):
  1. Name of the extension node (string)
  2. Position of the node (absolute) (integer)
Returns:
  1. Errorcondition (integer)
Description:

extension_manager_tools.inc:
function hIsExtensionAlreadyInstalled( cName as string ) as boolean

Check if an extension is already installed

The function opents the Extension Manager, finds (or not) the extension and returns an appropriate return value. The Extension Manager is closed again at the end.

Input:
  1. Name of the extension (String)
Return Value:
  1. is the extension allredy installed (boolean)
Description:

extension_manager_tools.inc:
function hDisableUserExtensionGUI( extension_name as string ) as integer

Disable a userspace extension by name via GUI

This function tries to disable an Extension specified by name. There are several reasons why this might fail so it is required to evaluate the returnvalue as the function will not print any warnings. If the function fails this is most likely caused by a) the extension already being disabled or b) the extension belonging to the shared layer.
The Extension Manager needs to be open when function is called.


Parameter(s):
  1. Name of the extension to be disabled (string)
Returns:
  1. Errorcondition (integer)
Description:

extension_manager_tools.inc:
function hExpandExtensionTreeGUI() as integer

Expand the top nodes in the extension tree

This function expands the two default nodes in the Extension manager "OpenOffice.org Extensions" and "My Extensions" so all installed extensions but not their components are visible.
The Extension Manager has to be open when calling this function.


Parameter(s):
  1. No input parameters
Returns:
  1. Number of extensions listed after the top nodes have been expanded
Description: