1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
'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
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/************************************************************************
'*
'* Owner : wolfram.garten@oracle.com
'*
'* short description :
'*
'**************************************************************************************
' #1 tEditDuplicate
' #1 tEditFields
' #1 tEditDeleteSlide
' #1 tEditLinks
' #1 tdEditDeleteLayer
' #1 tEditObjectEdit
'\*************************************************************************************
' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1)
' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1)
' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
testcase tEditDuplicate
dim Ueber_Text_1
dim Zaehler
Call hNewDocument '/// New Impress document ///'
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
EditSelectAll '/// Select rectangle ///'
EditDuplicate '/// Edit-duplicate ///'
Kontext "Duplizieren"
Ueber_Text_1 = AnzahlAnKopien.GetText
AnzahlAnKopien.SetText "50" '/// Set number of copies to 50 ///'
Duplizieren.Cancel '/// Cancel Edit Duplicate ///'
sleep 1
For Zaehler = 1 to 8
EditDuplicate '/// Edit Duplicate ///'
sleep 1
Kontext "Duplizieren"
AnzahlAnKopien.SetText "30" '/// Number of copies = 30 ///'
Select Case Zaehler '/// Setting values for axis and angles ///'
Case 1: XAchse.SetText "0,0"
YAchse.SetText "0,45"
Hoehe.SetText "-0,1"
Breite.SetText "-0,1"
Drehwinkel.SetText "3"
Anfang.Select Int((Anfang.GetItemCount * Rnd)+1)
Case 2,6: XAchse.SetText "0,6"
YAchse.SetText "0,0"
Hoehe.SetText "0,15"
Breite.SetText "0,01"
Drehwinkel.SetText "353"
Case 3,7: XAchse.SetText "0,0"
YAchse.SetText "-0,4"
Hoehe.SetText "-0,1"
Breite.SetText "0,06"
Drehwinkel.SetText "11"
Case 4,8: XAchse.SetText "-0,6"
YAchse.SetText "0,0"
Hoehe.SetText "0,05"
Breite.SetText "-0,08"
Drehwinkel.SetText "347"
Case 5: XAchse.SetText "0,1"
YAchse.SetText "0,48"
Hoehe.SetText "-0,05"
Breite.SetText "-0,05"
Drehwinkel.SetText "355"
End Select
Ende.Select Int((Ende.GetItemCount * Rnd)+1)
Duplizieren.OK '/// Execute Duplicate ///'
sleep 1
Next Zaehler
sleep 2
Call hCloseDocument '/// Close document ///'
endcase 'tEditDuplicate
'---------------------------------------------------------
testcase tEditFields
Call hNewDocument
Call sSelectEmptyLayout
sleep 3
printlog "insert date-fix"
InsertFieldsDateFix
printlog "select inserted field"
EditSelectAll
sleep 1
printlog "go into edit mode"
hTypeKeys "<F2>"
sleep 2
printlog "select date"
EditSelectAll
sleep 2
printlog "edit fields"
EditfieldsDraw
Kontext "FeldbefehlBearbeitenDraw"
sleep 2
printlog "check field type fix"
FeldtypFix.Check
If FeldtypFix.Ischecked then
Printlog "OK FieldtypeFix checkable"
else
warnlog "FieldtypeFix not checkable"
end if
printlog "check field type variable 1"
FeldtypVariabel.Check
sleep 1
If FeldtypVariabel.Ischecked then
Printlog "OK FieldtypeVariabel enabled"
else
warnlog "FieldtypeVariabel not enabled"
end if
' For Zaehler = 1 to FeldtypFormat.GetItemCount
' FeldTypFormat.Select Zaehler
' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText
' Next Zaehler
printlog "close edit fields dialog"
FeldbefehlBearbeitenDraw.OK
sleep 2
printlog "Close Document"
Call hCloseDocument
sleep 2
endcase 'tEditFields
'--------------------------------------------------------
testcase tEditDeleteSlide
dim Ueber_Text_1 as string
dim Ueber_Text_2 as string
dim Ueber_Text_3 as string
Call hNewDocument '/// New impress document ///'
sleep 3
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
sleep 1
ContextPositionAndSize '/// open Position and Size dialog ///'
kontext
Messagebox.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
Ueber_Text_1 = PositionX.GetText '/// get position values for rectangle ///'
TabPositionAndSize.OK
InsertSlide '/// insert slide ///'
sleep 2
hTypekeys "<Pagedown>"
sleep 2
Call hRechteckErstellen ( 40, 40, 60, 60 ) '/// create rectangle ///'
sleep 1
EditDeleteSlide '/// Delete slide ///'
sleep 1
Ueber_Text_2 = "OK Page was closed"
Ueber_Text_3 = "Page was not closed"
call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) '/// compare position of rectange ///'
sleep 1
Call hCloseDocument '/// close document ///'
endcase 'tEditDeleteSlide
'--------------------------------------------------------
testcase tEditLinks
Call hNewDocument '/// New document ///'
InsertGraphicsFromFile '/// insert graphic (sample.bmp) ///'
Kontext "GrafikEinfuegenDlg"
Link.Check '/// check link ///'
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
Oeffnen.Click
sleep 3
EditLinksDraw '/// edit links ///'
Kontext "VerknuepfungenBearbeiten"
Aktualisieren.Click '/// refresh ///'
sleep 1
'Aendern 'kann man noch den Dialog aufrufen...
Loesen.Click
sleep 1
Kontext
Messagebox.Yes
VerknuepfungenBearbeiten.Close '/// close dialog ///'
sleep 1
try
EditLinksDraw '/// check if last changes remain in the dialog ///'
Kontext "VerknuepfungenBearbeiten"
Loesen.Click
sleep 1
Kontext
Messagebox.Yes
VerknuepfungenBearbeiten.Close
warnlog "Break link does not work"
catch
printlog "OK Link broken"
endcatch
Call hCloseDocument '/// close document ///'
endcase 'tEditLinks
'---------------------------------------------------------
testcase tdEditDeleteLayer
dim Ueber_Text_1 as string
dim Ueber_Text_2 as string
dim Ueber_Text_3 as string
Call hNewDocument '/// new document ///'
sleep 2
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
sleep 1
'/// View->Layer ///'
ViewLayer
ContextPositionAndSize '/// get position values for rectangle ///'
kontext
active.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
Ueber_Text_1 = PositionX.GetText
TabPositionAndSize.OK
InsertLayer '/// insert layer ///'
Kontext "EbeneEinfuegenDlg"
EbeneEinfuegenDlg.OK
Call hRechteckErstellen ( 10, 40, 90, 60 ) '/// create rectangle on created layer ///'
sleep 1
EditDeleteLayer '/// delete layer ///'
sleep 1
Kontext
Active.Yes
sleep 1
Ueber_Text_2 = "OK Layer was deleted" '/// compare position of selected rectangle with position of created rectangle in deteted layer ///'
Ueber_Text_3 = "Layer was not deleted"
Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
sleep 1
Call hCloseDocument '/// close document ///'
endcase 'tdEditDeleteLayer
'--------------------------------------------------------
testcase tEditObjectEdit
Dim Schrieb as string
Schrieb = gOLEWriter
if Schrieb = "" then
warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
else
Call hNewDocument
call sSelectEmptyLayout
sleep 1 '/// new document ///'
InsertObjectOLEObject '/// insert writer ole object ///'
Kontext "OLEObjektEinfuegen"
sleep 3
if ObjektTyp.GetItemCount = 0 Then
Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?"
sleep 1
OleObjektEinfuegen.Cancel
sleep 1
else
ObjektTyp.Select Schrieb
sleep 1
OLEObjektEinfuegen.OK
sleep 3 ' Changed from Sleep 1 to Sleep 3
gMouseMove 10,10,90,90
sleep 1
EditSelectAll
try
EditObjectEdit 'keine ID '/// try edit-objects ///'
sleep 2
catch
Warnlog "- The EditObjectEdit did not work"
endcatch
gMouseClick 90,90
end if
sleep 1
Call hCloseDocument '/// close document ///'
endif
endcase 'tEditObjectEdit
|