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 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: ch2_lvl1_wizard2.inc,v $
13 '* last change: $Author: obo $ $Date: 2008-07-22 10:36:56 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : oliver.craemer@sun.com
36 '* short description : New chart types
38 '************************************************************************
40 ' #1 tCreateNewFilledNetChart ' Create a new filled netchart and check the preserved values
42 '\************************************************************************
44 testcase tCreateNewFilledNetChart
45 Dim sInputFile as STRING
46 Dim sOutputFile as STRING
47 Dim sControlString as STRING
48 Dim iChartVariant as integer
49 Dim iChartVariantText as string
52 sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" )
53 sOutputFile = convertpath ( gOfficePath & "user/work/tCreateNewFilledChart.ods" )
56 printlog "Load test document TesttoolPath/chart2/optional/input/randomData.ods"
57 call hFileOpen(sInputFile)
59 printlog "Save document as OfficePath/user/work/tCreateNewFilledNetChart.ods"
60 if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then
61 warnlog "Saving test document localy failed -> Aborting"
65 printlog "Insert / Chart"
69 if NOT ChartType.Exists(5) then
70 warnlog "Chart Wizard was not visible. EXITING!"
73 printlog "Chart Wizard visible."
75 printlog "Choose the Chart type net (should be the eights in the top-down list)"
76 if fSetChartType( "net" ) > 0 then
77 warnlog "Something went wrong setting chart type to BAR."
79 printlog "Select 4th chart variant from left (filled)"
80 if fSetChartTypeVariant( 4 ) > 0 then
81 warnlog "Something went wrong setting chart type VARIANT."
83 printlog "Create Chart by clicking Finish-button"
87 printlog "File / Save"
89 Kontext "DocumentCalc"
90 printlog "Press twice <ESCAPE>-key"
91 DocumentCalc.TypeKeys "<Escape>" , 2
92 printlog "File / Close document"
95 printlog "Open saved file again"
96 call hFileOpen(sOutputFile)
98 printlog "Open the Navigator (F5)"
99 printlog "Select the first OLE object in the Navigator"
101 printlog "Edit / Object / Edit to enter Inplace Mode"
103 printlog "Format / Chart Type"
106 if ChartType.Exists(2) then
107 printlog "Check if chart type is NET CHART"
108 if ChooseType.GetSelIndex <> 8 then
109 warnlog "Selected chart type wasn't preserved after save and reload."
111 printlog "Check if chart variant is Filled Net CHART (4th variant in non-CTL versions from the left)"
112 if Variant.GetSelIndex <> 4 then
113 warnlog "Selected chart type variant wasn't preserved after save and reload."
115 printlog "Leave Chart Type dialog with Cancel"
117 if ChartType.Exists(2) then
120 warnlog "ChartType dialog was not visible!?"
123 warnlog "Chart Type dialog was not up!"
125 printlog "Press ESCAPE button (deselecting the OLE object)"
126 Kontext "DocumentCalc"
127 DocumentCalc.TypeKeys "<Escape>"
128 printlog "Close document"