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: g_edit.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:40 $
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 : wolfram.garten@sun.com
36 '* short description :
38 '**************************************************************************************
43 ' #1 tdEditDeleteLayer
45 '\*************************************************************************************
47 ' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1)
48 ' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1)
49 ' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
51 testcase tEditDuplicate
55 Call hNewDocument '/// New Impress document ///'
56 Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
57 EditSelectAll '/// Select rectangle ///'
58 EditDuplicate '/// Edit-duplicate ///'
60 Ueber_Text_1 = AnzahlAnKopien.GetText
61 AnzahlAnKopien.SetText "50" '/// Set number of copies to 50 ///'
62 Duplizieren.Cancel '/// Cancel Edit Duplicate ///'
65 EditDuplicate '/// Edit Duplicate ///'
68 AnzahlAnKopien.SetText "30" '/// Number of copies = 30 ///'
70 Select Case Zaehler '/// Setting values for axis and angles ///'
71 Case 1: XAchse.SetText "0,0"
75 Drehwinkel.SetText "3"
76 Anfang.Select Int((Anfang.GetItemCount * Rnd)+1)
77 Case 2,6: XAchse.SetText "0,6"
81 Drehwinkel.SetText "353"
82 Case 3,7: XAchse.SetText "0,0"
86 Drehwinkel.SetText "11"
87 Case 4,8: XAchse.SetText "-0,6"
90 Breite.SetText "-0,08"
91 Drehwinkel.SetText "347"
92 Case 5: XAchse.SetText "0,1"
95 Breite.SetText "-0,05"
96 Drehwinkel.SetText "355"
98 Ende.Select Int((Ende.GetItemCount * Rnd)+1)
99 Duplizieren.OK '/// Execute Duplicate ///'
103 Call hCloseDocument '/// Close document ///'
105 endcase 'tEditDuplicate
106 '---------------------------------------------------------
111 InsertFieldsDateFix '/// Insert Date-Fix ///'
112 EditSelectAll '/// Select inserted field ///'
114 hTypeKeys "<F2>" '/// Go into edit mode (F2) ///'
116 EditSelectAll '/// Select the date///'
118 EditfieldsDraw '/// Edit -fields///'
119 Kontext "FeldbefehlBearbeitenDraw"
121 FeldtypFix.Check '/// check field type fix ///'
122 If FeldtypFix.Ischecked then
123 Printlog "OK FieldtypeFix checkable"
125 warnlog "FieldtypeFix not checkable"
127 FeldtypVariabel.Check '/// check field type variabel///'
129 If FeldtypVariabel.Ischecked then
130 Printlog "OK FieldtypeVariabel enabled"
132 warnlog "FieldtypeVariabel not enabled"
134 ' For Zaehler = 1 to FeldtypFormat.GetItemCount
135 ' FeldTypFormat.Select Zaehler
136 ' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText
138 FeldbefehlBearbeitenDraw.OK '/// close edit fields dialog ///'
140 Call hCloseDocument '/// close document ///'
144 '--------------------------------------------------------
145 testcase tEditDeleteSlide
147 dim Ueber_Text_1 as string
148 dim Ueber_Text_2 as string
149 dim Ueber_Text_3 as string
150 Call hNewDocument '/// New impress document ///'
152 Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
154 ContextPositionAndSize '/// open Position and Size dialog ///'
156 Messagebox.SetPage TabPositionAndSize
157 kontext "TabPositionAndSize"
158 Ueber_Text_1 = PositionX.GetText '/// get position values for rectangle ///'
159 TabPositionAndSize.OK
160 InsertSlide '/// insert slide ///'
162 hTypekeys "<Pagedown>"
164 Call hRechteckErstellen ( 40, 40, 60, 60 ) '/// create rectangle ///'
166 EditDeleteSlide '/// Delete slide ///'
168 Ueber_Text_2 = "OK Page was closed"
169 Ueber_Text_3 = "Page was not closed"
170 call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) '/// compare position of rectange ///'
172 Call hCloseDocument '/// close document ///'
174 endcase 'tEditDeleteSlide
175 '--------------------------------------------------------
178 Call hNewDocument '/// New document ///'
179 InsertGraphicsFromFile '/// insert graphic (sample.bmp) ///'
180 Kontext "GrafikEinfuegenDlg"
181 Link.Check '/// check link ///'
182 Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
185 EditLinksDraw '/// edit links ///'
186 Kontext "VerknuepfungenBearbeiten"
187 Aktualisieren.Click '/// refresh ///'
189 'Aendern 'kann man noch den Dialog aufrufen...
194 VerknuepfungenBearbeiten.Close '/// close dialog ///'
197 EditLinksDraw '/// check if last changes remain in the dialog ///'
198 Kontext "VerknuepfungenBearbeiten"
203 VerknuepfungenBearbeiten.Close
204 warnlog "Break link does not work"
206 printlog "OK Link broken"
208 Call hCloseDocument '/// close document ///'
211 '---------------------------------------------------------
212 testcase tdEditDeleteLayer
214 dim Ueber_Text_1 as string
215 dim Ueber_Text_2 as string
216 dim Ueber_Text_3 as string
217 Call hNewDocument '/// new document ///'
219 Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
221 '/// View->Layer ///'
223 ContextPositionAndSize '/// get position values for rectangle ///'
225 active.SetPage TabPositionAndSize
226 kontext "TabPositionAndSize"
227 Ueber_Text_1 = PositionX.GetText
228 TabPositionAndSize.OK
229 InsertLayer '/// insert layer ///'
230 Kontext "EbeneEinfuegenDlg"
232 Call hRechteckErstellen ( 10, 40, 90, 60 ) '/// create rectangle on created layer ///'
234 EditDeleteLayer '/// delete layer ///'
239 Ueber_Text_2 = "OK Layer was deleted" '/// compare position of selected rectangle with position of created rectangle in deteted layer ///'
240 Ueber_Text_3 = "Layer was not deleted"
241 Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
243 Call hCloseDocument '/// close document ///'
245 endcase 'tdEditDeleteLayer
246 '--------------------------------------------------------
247 testcase tEditObjectEdit
249 Dim Schrieb as string
253 warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
257 sleep 1 '/// new document ///'
258 InsertObjectOLEObject '/// insert writer ole object ///'
259 Kontext "OLEObjektEinfuegen"
261 if ObjektTyp.GetItemCount = 0 Then
262 Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?"
264 OleObjektEinfuegen.Cancel
268 ObjektTyp.Select Schrieb
270 OLEObjektEinfuegen.OK
271 sleep 3 ' Changed from Sleep 1 to Sleep 3
272 gMouseMove 10,10,90,90
277 EditObjectEdit 'keine ID '/// try edit-objects ///'
280 Warnlog "- The EditObjectEdit did not work"
287 Call hCloseDocument '/// close document ///'
289 endcase 'tEditObjectEdit