1 '**************************************************************************
2 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* Copyright 2008 by Sun Microsystems, Inc.
6 '* OpenOffice.org - a multi-platform office productivity suite
8 '* $RCSfile: w_210_.inc,v $
12 '* last change: $Author: fredrikh $ $Date: 2008-06-18 15:03:47 $
14 '* This file is part of OpenOffice.org.
16 '* OpenOffice.org is free software: you can redistribute it and/or modify
17 '* it under the terms of the GNU Lesser General Public License version 3
18 '* only, as published by the Free Software Foundation.
20 '* OpenOffice.org is distributed in the hope that it will be useful,
21 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
22 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 '* GNU Lesser General Public License version 3 for more details
24 '* (a copy is included in the LICENSE file that accompanied this code).
26 '* You should have received a copy of the GNU Lesser General Public License
27 '* version 3 along with OpenOffice.org. If not, see
28 '* <http://www.openoffice.org/license.html>
29 '* for a copy of the LGPLv3 License.
31 '/************************************************************************
33 '* owner : helge.delfs@sun.com
35 '* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
37 '\***********************************************************************
41 Call WriterToWriterText
42 Call WriterToWriterField
43 Call WriterToWriterTable
44 Call WriterToWriterFrame
45 Call WriterToWriterDrawingObject
46 Call WriterToWriterGraphicLinked
47 Call WriterToWriterGraphicEmbedded
48 Call WriterToWriterOLEObject
49 Call WriterToWriterControl
53 ' ---------------------------------------------------------------------------------
55 testcase WriterToWriterText
56 gApplication = "WRITER"
57 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
58 printlog " + Jump to beginning of document "
59 printlog " + Select first paragraph "
60 printlog " + Copy selected text "
61 if wSetClipboardtestDefaults("text") = True then
62 printlog " + Open new document "
64 printlog " + Edit / Paste Special "
65 EditPasteSpecialWriter
67 printlog " Paste 'Text' in all available clipboard formats "
68 Kontext "InhaltEinfuegen"
69 if InhaltEinfuegen.Exists then
70 printlog " + Write Clipboard format under pasted content "
71 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
72 printlog " + Save document as ..\user\work\writer_to_writer_text.odt"
73 Call hFileSaveAsWithFilterKill( gOfficepath + "user\work\writer_to_writer_text.odt" , "writer8" )
75 printlog " + Close saved document "
77 printlog " + Reopen saved document "
78 if hFileOpen (gOfficepath + "user\work\writer_to_writer_text.odt",true) = false then
84 Warnlog "Unable to remove checkbox: " + Active.Gettext
89 printlog " + Close saved document "
92 Warnlog "Dialog 'Paste Special' is not up!"
97 Warnlog "Writer To Writer -> 'Text' failed !"
99 printlog " Close active document "
100 Do Until GetDocumentCount = 0
105 ' ----------------------------------------------------------------------------------------------
107 testcase WriterToWriterField
108 gApplication = "WRITER"
109 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
110 printlog " + Jump to beginning of document "
111 printlog " + Select paragraph with 'Date Field' "
112 printlog " + Copy selected text "
113 printlog " + Open new document "
114 if wSetClipboardtestDefaults("field") = True then
116 printlog " + Edit / Paste Special "
117 EditPasteSpecialWriter
119 printlog " Paste 'Field' in all available clipboard formats "
120 Kontext "InhaltEinfuegen"
121 if InhaltEinfuegen.Exists then
122 printlog " + Write Clipboard format under pasted content "
123 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
124 printlog " + Save document as ..\user\work\writer_to_writer_field.odt"
125 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_field.odt", "writer8")
127 printlog " + Close saved document "
129 printlog " + Reopen saved document "
130 if hFileOpen (gOfficepath + "user\work\writer_to_writer_field.odt",true) = false then
132 if Active.Exists then
136 Warnlog "Unable to remove checkbox: " + Active.Gettext
141 printlog " + Close saved document "
144 Warnlog "Dialog 'Paste Special' is not up!"
149 Warnlog "Writer To Writer -> 'Field' failed !"
151 printlog " Close active document "
152 Do Until GetDocumentCount = 0
157 ' ----------------------------------------------------------------------------------------------
159 testcase WriterToWriterTable
160 gApplication = "WRITER"
161 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
162 printlog " + Jump to beginning of document "
163 printlog " + Select 'Table' "
164 printlog " + Copy selected table "
165 printlog " + Open new document "
166 if wSetClipboardtestDefaults("table") = True then
168 printlog " + Edit / Paste Special "
169 EditPasteSpecialWriter
171 printlog " Paste 'Table' in all available clipboard formats "
172 Kontext "InhaltEinfuegen"
173 if InhaltEinfuegen.Exists then
174 printlog " + Write Clipboard format under pasted content "
175 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
176 printlog " + Save document as ..\user\work\writer_to_writer_table.odt"
177 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_table.odt", "writer8")
179 printlog " + Close saved document "
181 printlog " + Reopen saved document "
182 if hFileOpen (gOfficepath + "user\work\writer_to_writer_table.odt",true) = false then
184 if Active.Exists then
188 Warnlog "Unable to remove checkbox: " + Active.Gettext
193 printlog " + Close saved document "
196 Warnlog "Dialog 'Paste Special' is not up!"
201 Warnlog "Writer To Writer -> 'Table' failed !"
203 printlog " Close active document "
204 Do Until GetDocumentCount = 0
209 ' ----------------------------------------------------------------------------------------------
211 testcase WriterToWriterFrame
212 gApplication = "WRITER"
213 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
214 printlog " + Jump to beginning of document "
215 printlog " + Select 'Frame' "
216 printlog " + Copy selected frame "
217 printlog " + Open new document "
218 if wSetClipboardtestDefaults("frame") = True then
220 printlog " + Edit / Paste Special "
221 EditPasteSpecialWriter
223 printlog " Paste 'Table' in all available clipboard formats "
224 Kontext "InhaltEinfuegen"
225 if InhaltEinfuegen.Exists then
226 printlog " + Write Clipboard format under pasted content "
227 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
228 printlog " + Save document as ..\user\work\writer_to_writer_frame.odt"
229 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_frame.odt", "writer8")
231 printlog " + Close saved document "
233 printlog " + Reopen saved document "
234 Call hFileOpen (gOfficepath + "user\work\writer_to_writer_frame.odt",false)
235 printlog " + Close saved document "
238 Warnlog "Dialog 'Paste Special' is not up!"
243 Warnlog "Writer To Writer -> 'Frame' failed !"
245 printlog " Close active document "
246 Do Until GetDocumentCount = 0
251 ' ----------------------------------------------------------------------------------------------
253 testcase WriterToWriterDrawingObject
254 gApplication = "WRITER"
255 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
256 printlog " + Jump to beginning of document "
257 printlog " + Select 'Drawing Object' "
258 printlog " + Copy selected Drawing Object "
259 printlog " + Open new document "
260 if wSetClipboardtestDefaults("DRAW") = True then
262 printlog " + Edit / Paste Special "
263 EditPasteSpecialWriter
265 printlog " Paste 'Table' in all available clipboard formats "
266 Kontext "InhaltEinfuegen"
267 if InhaltEinfuegen.Exists then
268 printlog " + Write Clipboard format under pasted content "
269 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
270 printlog " + Save document as ..\user\work\writer_to_writer_draw.odt"
271 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_draw.odt", "writer8")
273 printlog " + Close saved document "
275 printlog " + Reopen saved document "
276 Call hFileOpen (gOfficepath + "user\work\writer_to_writer_draw.odt",false)
277 printlog " + Close saved document "
280 Warnlog "Dialog 'Paste Special' is not up!"
285 Warnlog "Writer To Writer -> 'Drawing Object' failed !"
287 printlog " Close active document "
288 Do Until GetDocumentCount = 0
293 ' ----------------------------------------------------------------------------------------------
295 testcase WriterToWriterGraphicLinked
296 gApplication = "WRITER"
297 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
298 printlog " + Jump to beginning of document "
299 printlog " + Select 'Linked Graphic' "
300 printlog " + Copy selected Linked Graphic "
301 printlog " + Open new document "
302 if wSetClipboardtestDefaults("graphicL") = True then
304 printlog " + Edit / Paste Special "
305 EditPasteSpecialWriter
307 printlog " Paste 'Linked Graphic' in all available clipboard formats "
308 Kontext "InhaltEinfuegen"
309 if InhaltEinfuegen.Exists then
310 printlog " + Write Clipboard format under pasted content "
311 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
312 printlog " + Save document as ..\user\work\writer_to_writer_graphic1.odt"
313 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_graphic1.odt", "writer8")
315 printlog " + Close saved document "
317 printlog " + Reopen saved document "
318 Call hFileOpen (gOfficepath + "user\work\writer_to_writer_graphic1.odt",false)
319 printlog " + Close saved document "
322 Warnlog "Dialog 'Paste Special' is not up!"
327 Warnlog "Writer To Writer -> 'Linked Graphic' failed !"
329 printlog " Close active document "
330 Do Until GetDocumentCount = 0
335 ' ----------------------------------------------------------------------------------------------
337 testcase WriterToWriterGraphicEmbedded
338 gApplication = "WRITER"
339 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
340 printlog " + Jump to beginning of document "
341 printlog " + Select 'Embedded Graphic' "
342 printlog " + Copy selected Embedded Graphic "
343 printlog " + Open new document "
344 if wSetClipboardtestDefaults("graphicE") = True then
346 printlog " + Edit / Paste Special "
347 EditPasteSpecialWriter
349 printlog " Paste 'Embedded Graphic' in all available clipboard formats "
350 Kontext "InhaltEinfuegen"
351 if InhaltEinfuegen.Exists then
352 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
353 printlog " + Write Clipboard format under pasted content "
354 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_graphic2.odt", "writer8")
355 printlog " + Save document as ..\user\work\writer_to_writer_graphic2.odt"
357 printlog " + Close saved document "
359 printlog " + Reopen saved document "
360 Call hFileOpen (gOfficepath + "user\work\writer_to_writer_graphic2.odt",false)
361 printlog " + Close saved document "
364 Warnlog "Dialog 'Paste Special' is not up!"
369 Warnlog "Writer To Writer -> 'Embedded Graphic' failed !"
371 printlog " Close active document "
372 Do Until GetDocumentCount = 0
377 ' ----------------------------------------------------------------------------------------------
379 testcase WriterToWriterOLEObject
380 gApplication = "WRITER"
381 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
382 printlog " + Jump to beginning of document "
383 printlog " + Select 'OLE Object' "
384 printlog " + Copy selected OLE Object "
385 printlog " + Open new document "
386 if wSetClipboardtestDefaults("ole") = True then
388 printlog " + Edit / Paste Special "
389 EditPasteSpecialWriter
391 printlog " Paste 'OLE object' in all available clipboard formats "
392 Kontext "InhaltEinfuegen"
393 if InhaltEinfuegen.Exists then
394 printlog " + Write Clipboard format under pasted content "
395 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
396 printlog " + Save document as ..\user\work\writer_to_writer_ole.odt"
397 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_ole.odt", "writer8")
399 printlog " + Close saved document "
401 printlog " + Reopen saved document "
402 Call hFileOpen (gOfficepath + "user\work\writer_to_writer_ole.odt",false)
403 printlog " + Close saved document "
406 Warnlog "Dialog 'Paste Special' is not up!"
411 Warnlog "Writer To Writer -> 'OLE object' failed !"
413 printlog " Close active document "
414 Do Until GetDocumentCount = 0
419 ' ----------------------------------------------------------------------------------------------
421 testcase WriterToWriterControl
422 gApplication = "WRITER"
423 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
424 printlog " + Jump to beginning of document "
425 printlog " + Select 'Control' "
426 printlog " + Copy selected Control "
427 printlog " + Open new document "
428 if wSetClipboardtestDefaults("control") = True then
430 printlog " + Edit / Paste Special "
431 EditPasteSpecialWriter
433 printlog " Paste 'Control' in all available clipboard formats "
434 Kontext "InhaltEinfuegen"
435 if InhaltEinfuegen.Exists then
436 printlog " + Write Clipboard format under pasted content "
437 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
438 printlog " + Save document as ..\user\work\writer_to_writer_control.odt"
439 Call hFileSaveAsWithFilterKill(gOfficepath & "user\work\writer_to_writer_control.odt", "writer8")
441 printlog " + Close saved document "
443 printlog " + Reopen saved document "
444 Call hFileOpen (gOfficepath + "user\work\writer_to_writer_control.odt",false)
445 printlog " + Close saved document "
448 Warnlog "Dialog 'Paste Special' is not up!"
453 Warnlog "Writer To Writer -> 'Control' failed !"
455 printlog " Close active document "
456 Do Until GetDocumentCount = 0
461 ' ----------------------------------------------------------------------------------------------