1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 ' Copyright 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : gregor.hartmann@oracle.com
30 '* short description : Test the autoformat-feature for tables
32 '\******************************************************************************
34 testcase tAutoformatTable( iApp as integer )
36 if ( gIsoLang <> "en-US" ) then
37 printlog( "No testing for non-en_US languages" )
42 dim al_UI_formats( 1000 ) as string : al_UI_formats( 0 ) = "0"
44 dim iFormatCount as integer
45 dim iCurrentFormat as integer
46 dim cCurrentFormat as string
50 dim sFileOut as string
53 sFileIn = gTesttoolPath & "framework\optional\input\extras_formats\"
55 dim oControl as object
59 case 1 : sFile = "Tables_writer_" & gISOLang & ".txt"
60 case 2 : sFile = "Tables_calc_" & gISOLang & ".txt"
63 sFileIn = convertpath( sFileIn & sFile )
64 sFileOut = hGetWorkPath() & sFile
69 case 1 : kontext "DocumentWriter"
71 case 2 : kontext "DocumentCalc"
72 DocumentCalc.TypeKeys( "<Shift Right>", 5 )
73 DocumentCalc.TypeKeys( "<Shift Down>", 3 )
79 case 1 : kontext "AutoformatTabelle"
80 if ( AutoformatTabelle.exists( 2 ) ) then
83 warnlog( "Unable to access Table Autoformat dialog (Writer)" )
87 case 2 : kontext "AutoformatCalc"
88 if ( AutoformatCalc.exists( 2 ) ) then
89 oControl = FormatListe
91 warnlog( "Unable to access Table Autoformat dialog (Calc)" )
96 iFormatCount = oControl.getItemCount()
98 for iCurrentFormat = 1 to iFormatCount
100 oControl.select( iCurrentFormat )
102 cCurrentFormat = oControl.getSelText()
103 ListAppend( al_UI_formats() , cCurrentFormat )
108 case 1 : AutoformatTabelle.ok()
109 case 2 : AutoformatCalc.ok()
114 irc = hManageComparisionList( sFileIn, sFileOut, al_UI_formats() )
115 hListResultEvaluation( irc , 0 )