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 names of labels
32 '\******************************************************************************
34 testcase tLabelTypes()
36 printlog( "Verify presence of labels and brands" )
38 ' If you want to use this test for other languages, remove the following
39 ' if() block and create the reference files by running this test once.
40 ' Follow the instructions emitted by hManagaComparisionList() from the log.
42 if ( gIsoLang <> "en-US" ) then
43 printlog( "No testing for non-en_US languages" )
48 const MAX_LABEL_COUNT = 1600
49 const RELATIVE_PATH = "framework\optional\input\extras_formats\"
51 dim iBrandCount as integer
52 dim iCurrentBrand as integer
53 dim cBrandName as string
54 dim iCurrentType as integer
55 dim cBrandType as string
57 dim al_UI_Labels( MAX_LABEL_COUNT ) as string : al_UI_Labels( 0 ) = "0"
61 dim sFile as string : sFile = "Labels_" & gISOLang & ".txt"
62 dim sFileIn as string : sFileIn = convertpath( gTesttoolPath & RELATIVE_PATH & sFile )
63 dim sFileOut as string : sFileOut = hGetWorkPath() & sFile
65 printlog( "Open labels dialog, retrieve all label names" )
69 Active.SetPage TabEtiketten
71 kontext "TabEtiketten"
73 iBrandCount = Marke.getItemCount()
75 for iCurrentBrand = 1 to iBrandCount
77 Marke.select( iCurrentBrand )
78 cBrandName = Marke.getSelText()
80 for iCurrentType = 1 to Typ.getItemCount()
82 Typ.select( iCurrentType )
83 cBrandType = cBrandName & ":" & Typ.getSelText()
84 ListAppend( al_UI_Labels() , cBrandType )
90 printlog( "Close labels dialog" )
93 printlog( "Compare to reference (or create new reference, if none found)" )
94 irc = hManageComparisionList( sFileIn, sFileOut, al_UI_Labels() )
95 hListResultEvaluation( irc , NO_DELTA )