'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@sun.com '* '* short description : Tools for working with the property browser for formcontrols '* '\****************************************************************************** private const DEBUG_ENABLE = false function hOpenPropertyBrowser() as boolean '///

Function to open the properties of a selected control

'///The function verifies that the property browser is really open and '///+ ensures that we are on the General tabpage

'///Input: '///
    '///+
  1. Nothing
  2. '///
'///Returns: '///
    '///+
  1. Errorcondition (boolean)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hClosePropertyBrowser() as boolean '///

A function that closes the Property-Browser

'///The property browser is closed by executing the slot (the slot '///+ toggles the dialog).

'///Input: '///
    '///+
  1. Nothing
  2. '///
'///Returns: '///
    '///+
  1. Errorcondition (boolean)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hPBSetControlName( cControl as string ) as boolean '///

Name a control, with limited errorhandling

'///This function was introduced due to a problem with the property- '///browser not being open fast enough or just refusing to accept input

'///Input: '///
    '///+
  1. Text to be inserted in the control "NameText" (string)
  2. '///
'///Returns: '///
    '///+
  1. Errorcondition
  2. '/// '///
const CFN = "hPBSetControlName::" '///Description: '/// end function '******************************************************************************* function hPBGetControlName( cControl as string ) as boolean '///

Verify that the expected control is open

'///Use hPBSetControlName( string ) to set the name and when you reopen it '///+ verify that you got the right control wit this function

'///Input: '///
    '///+
  1. Name of the control (string)
  2. '///
'///Returns: '///
    '///+
  1. Errorcondition (boolean)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hCheckPropertyPresence ( cSetting as string , iPos as integer ) as boolean '///

Function to determine whether a property is available for a control or not

'///This function takes a string (provided by controlcfg.dat) and looks for an 'x' at. '///+ a given position. If it is found it returns TRUE, FALSE if it is a '-'
'///+Note that this function is a terrible workaround for a missing feature: In the current '///+ version of the Testtool we cannot ask which controls are present on a dialog. So this '///+ has to be kept in a list of some sort. This is especially bad for a property browser '///+ test as we need to maintain such a list for 21 controls and a total of 76 (IIRC) '///+ possible properties whereof only a small number (eight, i think) are common for all '///+ controls. The test is barely maintainable, issues have been written but there is '///+ no solution so far.


'///Input: '///
    '///+
  1. Configuration string (string)
  2. '/// '///+
  3. Position of the control (integer)
  4. '/// '///
'///Returns: '///
    '///+
  1. Status (boolean)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hSetPBTabPage( iPage as integer ) as boolean '///

A small helper to switch between tabpages in the property-browser

'///Input: '///
    '///+
  1. Page-ID (integer)
  2. '/// '///
'///Returns: '///
    '///+
  1. Errorcondition (boolean)
  2. '/// '///
'///Description: '/// end function '******************************************************************************* function hSetLabelName( sLabelName as string ) as boolean '///

Name a control, with limited errorhandling

'///This function was introduced due to a problem with the property- '///browser not being open fast enough or just refusing to accept input

'///Input: '///
    '///+
  1. Text to be inserted in the control "NameText" (string)
  2. '///
'///Returns: '///
    '///+
  1. Errorcondition
  2. '/// '///
'///Description: '/// end function