'encoding UTF-8 Do not remove or change this line! '******************************************************************************* ' 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 ' ' for a copy of the LGPLv3 License. ' '/****************************************************************************** '* '* owner : joerg.skottke@oracle.com '* '* short description : helper functions for the wizards '* '\****************************************************************************** function hOpenWizardWithMenu( cType as string ) as integer const CFN = "hOpenWizardWithMenu::" '///

Open a wizard via menu

'///Starting point: Any plain document
'///Uses: framework/tools/input/menuentries.txt
'///Input: '///
    '///+
  1. Name of Wizard (string). Known Wizards are:
  2. '/// '///
'///Returns: '///
    '///+
  1. Errorcode (integer)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hFinishWizard( iMode as integer ) as boolean const CFN = "hFinishWizard::" '///

Finish or cancel a wizard

'///Starting point: Any known wizard must be open
'///If several wizards are open at the same time the outcome is undefined
'///Input: '///
    '///+
  1. Closing method (integer). Valid options are:
  2. '/// '///
'///Returns: '///
    '///+
  1. Errorcode (boolean)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hGetWizardParams( cType as string, cParam as string ) as integer const CFN = "hGetWizardParams::" '///

Retrieve the location of a wizard in the menu

'///Uses: framework/tools/input/menuentries.txt
'///Refer to inline documentation for further information
'///Input: '///
    '///+
  1. Name of Wizard (string). Valid options are:
  2. '/// '///+
  3. Menu Position (string). Valid options are:
  4. '/// '///
'///Returns: '///
    '///+
  1. Position of a menu entry (integer)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hWaitForWizard() as integer const CFN = "hWaitForWizard::" const MAXTRIES = 10 '///

Wait for any wizard to open

'///Uses: framework/tools/input/menuentries.txt
'///NOTE: Not all wizards are known to this function yet.
'///Input: '///
    '///+
  1. Nothing
  2. '///
'///Returns: '///
    '///+
  1. Unique ID of the open wizard
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hSetTemplateSavePath( cFile as string ) as integer '///

Set the template save-path

'///Starting point: Last page on FAX-, AGENDA- or LETTERWIZARD
'///Input: '///
    '///+
  1. Fully qualified path to target template name (string)
  2. '///
'///Returns: '///
    '///+
  1. Errorcode (integer)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hHandleSaveError() as integer const CFN = "hHandleSaveError::" '///

Handle errors while saving a template

'///Starting point: Save-As dialog from last page on FAX-, AGENDA- or LETTERWIZARD
'///Input: '///
    '///+
  1. Nothing
  2. '///
'///Returns: '///
    '///+
  1. Errorcode (integer)
  2. '/// '///
'///Description: '/// kontext "active" if ( active.exists( 2 ) ) then printlog( CFN & "Unexpected MsgBox: " & active.getText() ) try active.ok() hHandleSaveError() = 2 catch active.yes() hHandleSaveError() = 1 endcatch else hHandleSaveError() = 0 endif end function '******************************************************************************* function hClickNextButton() as boolean '///

Click the Next-Button on some wizards

'///Starting point: Last page on FAX-, AGENDA- or LETTERWIZARD
'///Refer to inline documentation for further information
'///Input: '///
    '///+
  1. Nothing
  2. '///
'///Returns: '///
    '///+
  1. Status (boolean)
  2. '/// '///
'///Description: '/// end function