'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 : Replacements for routines in t_lists.inc adds some '* '\****************************************************************************** function hOpenHelp() as boolean printlog( "Open Help Browser" ) HelpContents kontext "StarOfficeHelp" if ( StarOfficeHelp.exists( 5 ) ) then hOpenHelp() = TRUE else warnlog( "Unable to open help browser" ) hOpenHelp() = FALSE endif end function '******************************************************************************* function hCloseHelp() as boolean printlog( "Close Help Browser" ) kontext "StarOfficeHelp" StarOfficeHelp.typeKeys( "" ) if ( StarOfficeHelp.notExists( 3 ) ) then hCloseHelp() = TRUE else warnlog( "Help browser could not be closed" ) hCloseHelp() = FALSE endif end function '****************************************************************************** function hSelectHelpTab( cTab as string ) as boolean '///

Select a tab on the help dialog by name

'///Input: '///
    '///+
  1. The tab to open (string)
  2. '///
      '///+
    • "content" for the contents tab
    • '///+
    • "index" for the index tab
    • '///+
    • "find" for the find tab
    • '///+
    • "bookmarks" for the bookmarks tab
    • '///
    '///
'///Returns: '///
    '///+
  1. Errorcondition (boolean)
  2. '///
      '///+
    • TRUE if the requested tabpage is open
    • '///+
    • FALSE if the requested tabpage did not open
    • '///
    '///
'///Description: '/// end function '******************************************************************************* function hUseBookmarksContextMenu( cAction as string ) as boolean '///

handle the bookmarks context menu in Help Browser

'///Input: '///
    '///+
  1. The context item to execute (string)
  2. '///
      '///+
    • "show"
    • '///+
    • "rename"
    • '///+
    • "delete"
    • '///
    '///
'///Returns: '///
    '///+
  1. Errorcondition (boolean)
  2. '///
      '///+
    • TRUE on success
    • '///+
    • FALSE on any other error
    • '///
    '///
'///Description: '/// end function '******************************************************************************* function hHelpGetAboutItemCount() as integer printlog( "Get the number of applications listed in the help listbox (should be 8)" ) const ABOUT_ITEMS = 8 dim itemcount as integer hOpenHelp() hSelectHelpTab( "index" ) Kontext "IndexPage" itemcount = HelpAbout.getItemCount() if ( itemcount <> ABOUT_ITEMS ) then warnlog( "Number of applications is incorrect" ) printlog( "Found...: " & itemcount ) printlog( "Expected: " & ABOUT_ITEMS endif hCloseHelp() hHelpGetAboutItemCount() = itemcount end function