'encoding UTF-8 Do not remove or change this line! '************************************************************************* '* '* OpenOffice.org - a multi-platform office productivity suite '* '* $RCSfile: c_updt.bas,v $ '* '* $Revision: 1.17 $ '* '* last change: $Author: jsi $ $Date: 2007/07/24 12:07:22 $ '* '* The Contents of this file are made available subject to '* the terms of GNU Lesser General Public License Version 2.1. '* '* '* GNU Lesser General Public License Version 2.1 '* ============================================= '* Copyright 2005 by Sun Microsystems, Inc. '* 901 San Antonio Road, Palo Alto, CA 94303, USA '* '* This library is free software; you can redistribute it and/or '* modify it under the terms of the GNU Lesser General Public '* License version 2.1, as published by the Free Software Foundation. '* '* This library 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 for more details. '* '* You should have received a copy of the GNU Lesser General Public '* License along with this library; if not, write to the Free Software '* Foundation, Inc., 59 Temple Place, Suite 330, Boston, '* MA 02111-1307 USA '* '/************************************************************************ '* '* owner : oliver.craemer@Sun.COM '* '* short description : short test for recent document '* '\************************************************************************ sub main dim sTestFile as string dim iEntries as integer dim sContentB3 as string dim sContentA1 as string sTestFile = convertpath(gTesttoolPath & "calc/update/input/c_001/fileRecentDocuments.ods") '/// Open Test File calc/update/input/c_001/fileRecentDocuments.oos call hDateiOeffnen(sTestFile) sleep(3) '/// Close the document again '/// Now a item in Recent Documents should exist call hCloseDocument sleep(2) '/// Reopen Document using the menu File / Recent Documents Kontext "DocumentCalc" DocumentCalc.UseMenu sleep(2) iEntries = hMenuItemGetCount if iEntries <> 0 then hMenuSelectNr(1) sleep(2) hMenuSelectNr(3) sleep(2) hMenuSelectNr(1) '/// Goto Cell B3 Kontext "DocumentCalc" call cGotoCell("B3") Kontext "DocumentCalc" '///Read cell content B3 sContentB3 = cZellinhalt("B3") sleep(2) if sContentB3 = "Check this out" then printlog "Loading most recent Document seems to work" else warnlog "Loading most recent Document seems to fail -> CHECK IT OUT!" endif else warnlog "The main menu wasn't opened!" endif '/// Close document call hCloseDocument end sub '------------------------------------------------------------------------- sub LoadIncludeFiles use "global\system\inc\master.inc" use "global\system\inc\gvariabl.inc" use "calc\tools\c_tool.inc" use "calc\tools\c_select_tools.inc" use "calc\tools\c_tool_1.inc" use "calc\update\inc\update_tools.inc" use "calc\update\inc\c_UpdateToolsDialog.inc" gApplication = "Calc" Call GetUseFiles end sub