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_212_.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 wDisableImpressAutopilot
42 Call WriterToImpressText
43 Call WriterToImpressField
44 Call WriterToImpressTable
45 Call WriterToImpressFrame
46 Call WriterToImpressDrawingObject
47 Call WriterToImpressGraphicLinked
48 Call WriterToImpressGraphicEmbedded
49 Call WriterToImpressOLEObject
50 Call WriterToImpressControl
54 ' ---------------------------------------------------------------------------------
56 testcase WriterToImpressText
57 gApplication = "WRITER"
58 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
59 printlog " Jump to beginning of document "
60 printlog " Select first paragraph "
61 printlog " Copy selected text "
62 if wSetClipboardtestDefaults("text") = True then
63 gApplication = "IMPRESS"
64 printlog " Open new document "
66 printlog " Edit / Paste Special "
71 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
78 printlog " Paste 'Text' in all available clipboard formats "
79 Kontext "InhaltEinfuegen"
80 if InhaltEinfuegen.Exists then
81 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
82 printlog " Write Clipboard format under pasted content "
83 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_text.odp", "impress8")
84 printlog " Save document as ..\user\work\writer_to_impress_text.odp"
87 printlog " Close saved document "
89 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_text.odp",false)
90 printlog " Reopen saved document "
93 printlog " Close saved document "
95 Warnlog "Dialog 'Paste Special' is not up!"
100 Warnlog "Writer To Impress -> 'Text' failed !"
102 printlog " Close active document "
103 Do Until GetDocumentCount = 0
108 ' ----------------------------------------------------------------------------------------------
110 testcase WriterToImpressField
111 gApplication = "WRITER"
112 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
113 printlog " Jump to beginning of document "
114 printlog " Select paragraph with 'Date Field' "
115 printlog " Copy selected text "
116 if wSetClipboardtestDefaults("field") = True then
117 gApplication = "IMPRESS"
118 printlog " Open new document "
120 printlog " Edit / Paste Special "
125 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
132 printlog " Paste 'Field' in all available clipboard formats "
133 Kontext "InhaltEinfuegen"
134 if InhaltEinfuegen.Exists then
135 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
136 printlog " Write Clipboard format under pasted content "
137 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_field.odp", "impress8")
138 printlog " Save document as ..\user\work\writer_to_impress_field.odp"
141 printlog " Close saved document "
143 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_field.odp",false)
144 printlog " Reopen saved document "
147 printlog " Close saved document "
149 Warnlog "Dialog 'Paste Special' is not up!"
154 Warnlog "Writer To Impress -> 'Field' failed !"
156 printlog " Close active document "
157 Do Until GetDocumentCount = 0
162 ' ----------------------------------------------------------------------------------------------
164 testcase WriterToImpressTable
165 gApplication = "WRITER"
166 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
167 printlog " Jump to beginning of document "
168 printlog " Select 'Table' "
169 printlog " Copy selected table "
170 if wSetClipboardtestDefaults("table") = True then
171 gApplication = "IMPRESS"
172 printlog " Open new document "
174 printlog " Edit / Paste Special "
179 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
186 printlog " Paste 'Table' in all available clipboard formats "
187 Kontext "InhaltEinfuegen"
188 if InhaltEinfuegen.Exists then
189 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
190 printlog " Write Clipboard format under pasted content "
191 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_table.odp", "impress8")
192 printlog " Save document as ..\user\work\writer_to_impress_table.odp"
195 printlog " Close saved document "
197 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_table.odp",false)
198 printlog " Reopen saved document "
201 printlog " Close saved document "
203 Warnlog "Dialog 'Paste Special' is not up!"
208 Warnlog "Writer To Impress -> 'Table' failed !"
210 printlog " Close active document "
211 Do Until GetDocumentCount = 0
216 ' ----------------------------------------------------------------------------------------------
218 testcase WriterToImpressFrame
219 gApplication = "WRITER"
220 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
221 printlog " Jump to beginning of document "
222 printlog " Select 'Frame' "
223 printlog " Copy selected frame "
224 if wSetClipboardtestDefaults("frame") = True then
225 gApplication = "IMPRESS"
226 printlog " Open new document "
228 printlog " Edit / Paste Special "
233 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
240 printlog " Paste 'Table' in all available clipboard formats "
241 Kontext "InhaltEinfuegen"
242 if InhaltEinfuegen.Exists then
243 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
244 printlog " Write Clipboard format under pasted content "
245 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_frame.odp", "impress8")
246 printlog " Save document as ..\user\work\writer_to_impress_frame.odp"
249 printlog " Close saved document "
251 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_frame.odp",false)
252 printlog " Reopen saved document "
255 printlog " Close saved document "
257 Warnlog "Dialog 'Paste Special' is not up!"
262 Warnlog "Writer To Impress -> 'Frame' failed !"
264 printlog " Close active document "
265 Do Until GetDocumentCount = 0
270 ' ----------------------------------------------------------------------------------------------
272 testcase WriterToImpressDrawingObject
273 gApplication = "WRITER"
274 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
275 printlog " Jump to beginning of document "
276 printlog " Select 'Drawing Object' "
277 printlog " Copy selected Drawing Object "
278 if wSetClipboardtestDefaults("DRAW") = True then
279 gApplication = "IMPRESS"
280 printlog " Open new document "
282 printlog " Edit / Paste Special "
287 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
294 printlog " Paste 'Table' in all available clipboard formats "
295 Kontext "InhaltEinfuegen"
296 if InhaltEinfuegen.Exists then
297 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
298 printlog " Write Clipboard format under pasted content "
299 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_draw.odp", "impress8")
300 printlog " Save document as ..\user\work\writer_to_impress_draw.odp"
303 printlog " Close saved document "
305 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_draw.odp",false)
306 printlog " Reopen saved document "
309 printlog " Close saved document "
311 Warnlog "Dialog 'Paste Special' is not up!"
316 Warnlog "Writer To Impress -> 'Drawing Object' failed !"
318 printlog " Close active document "
319 Do Until GetDocumentCount = 0
324 ' ----------------------------------------------------------------------------------------------
326 testcase WriterToImpressGraphicLinked
327 gApplication = "WRITER"
328 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
329 printlog " Jump to beginning of document "
330 printlog " Select 'Linked Graphic' "
331 printlog " Copy selected Linked Graphic "
332 if wSetClipboardtestDefaults("graphicL") = True then
333 gApplication = "IMPRESS"
334 printlog " Open new document "
336 printlog " Edit / Paste Special "
341 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
348 printlog " Paste 'Linked Graphic' in all available clipboard formats "
349 Kontext "InhaltEinfuegen"
350 if InhaltEinfuegen.Exists then
351 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
352 printlog " Write Clipboard format under pasted content "
353 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_graphic1.odp", "impress8")
354 printlog " Save document as ..\user\work\writer_to_impress_graphic1.odp"
357 printlog " Close saved document "
359 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_graphic1.odp",false)
360 printlog " Reopen saved document "
363 printlog " Close saved document "
365 Warnlog "Dialog 'Paste Special' is not up!"
370 Warnlog "Writer To Impress -> 'Linked Graphic' failed !"
372 printlog " Close active document "
373 Do Until GetDocumentCount = 0
378 ' ----------------------------------------------------------------------------------------------
380 testcase WriterToImpressGraphicEmbedded
381 gApplication = "WRITER"
382 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
383 printlog " Jump to beginning of document "
384 printlog " Select 'Embedded Graphic' "
385 printlog " Copy selected Embedded Graphic "
386 if wSetClipboardtestDefaults("graphicE") = True then
387 gApplication = "IMPRESS"
388 printlog " Open new document "
390 printlog " Edit / Paste Special "
395 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
402 printlog " Paste 'Embedded Graphic' in all available clipboard formats "
403 Kontext "InhaltEinfuegen"
404 if InhaltEinfuegen.Exists then
405 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
406 printlog " Write Clipboard format under pasted content "
407 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_graphic2.odp", "impress8")
408 printlog " Save document as ..\user\work\writer_to_impress_graphic2.odp"
411 printlog " Close saved document "
413 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_graphic2.odp",false)
414 printlog " Reopen saved document "
417 printlog " Close saved document "
419 Warnlog "Dialog 'Paste Special' is not up!"
424 Warnlog "Writer To Impress -> 'Embedded Graphic' failed !"
426 printlog " Close active document "
427 Do Until GetDocumentCount = 0
432 ' ----------------------------------------------------------------------------------------------
434 testcase WriterToImpressOLEObject
435 gApplication = "WRITER"
436 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
437 printlog " Jump to beginning of document "
438 printlog " Select 'OLE Object' "
439 printlog " Copy selected OLE Object "
440 if wSetClipboardtestDefaults("ole") = True then
441 gApplication = "IMPRESS"
442 printlog " Open new document "
444 printlog " Edit / Paste Special "
449 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
456 printlog " Paste 'OLE object' in all available clipboard formats "
457 Kontext "InhaltEinfuegen"
458 if InhaltEinfuegen.Exists then
459 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
460 printlog " Write Clipboard format under pasted content "
461 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_ole.odp", "impress8")
462 printlog " Save document as ..\user\work\writer_to_impress_ole.odp"
465 printlog " Close saved document "
467 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_ole.odp",false)
468 printlog " Reopen saved document "
471 printlog " Close saved document "
473 Warnlog "Dialog 'Paste Special' is not up!"
478 Warnlog "Writer To Impress -> 'OLE object' failed !"
480 printlog " Close active document "
481 Do Until GetDocumentCount = 0
486 ' ----------------------------------------------------------------------------------------------
488 testcase WriterToImpressControl
489 gApplication = "WRITER"
490 printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
491 printlog " Jump to beginning of document "
492 printlog " Select 'Control' "
493 printlog " Copy selected Control "
494 if wSetClipboardtestDefaults("control") = True then
495 gApplication = "IMPRESS"
496 printlog " Open new document "
498 printlog " Edit / Paste Special "
503 Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
510 printlog " Paste 'Control' in all available clipboard formats "
511 Kontext "InhaltEinfuegen"
512 if InhaltEinfuegen.Exists then
513 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
514 printlog " Write Clipboard format under pasted content "
515 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_control.odp", "impress8")
516 printlog " Save document as ..\user\work\writer_to_impress_control.odp"
519 printlog " Close saved document "
521 Call hFileOpen (gOfficepath + "user\work\writer_to_impress_control.odp",false)
522 printlog " Reopen saved document "
525 printlog " Close saved document "
527 Warnlog "Dialog 'Paste Special' is not up!"
532 Warnlog "Writer To Impress -> 'Control' failed !"
534 printlog " Close active document "
535 Do Until GetDocumentCount = 0