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_221_.inc,v $
12 '* last change: $Author: fredrikh $ $Date: 2008-06-18 15:03:48 $
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 DrawToHTMLScrollingText
42 Call DrawToHTMLGroupedObject
44 Call DrawToHTMLFontwork
45 Call DrawToHTMLBullets
46 Call DrawToHTMLDimensionLines
47 Call DrawToHTMLConnectors
52 testcase DrawToHTMLScrollingText
55 printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
56 printlog " + Jump to beginning of document "
57 printlog " + Select Scrolling text "
58 printlog " + Copy selected text "
59 Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
60 Call sMakeReadOnlyDocumentEditable
61 Kontext "DocumentDraw"
62 printlog " Jump to beginning of document "
63 DocumentDraw.TypeKeys "<Tab>"
66 printlog " Open a new writerdocument "
70 EditPasteSpecialWriter
72 Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
73 Call hCloseDocument ' Close Source-File
74 Call hCloseDocument ' Close Target-File
78 printlog " Paste 'Scrolling Text' in all available clipboard formats "
79 Kontext "InhaltEinfuegen"
80 if InhaltEinfuegen.Exists then
81 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
82 printlog " + Write Clipboard format under pasted content "
83 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_scrolling_text.html", "HTML")
84 printlog " + Save document as ..\user\work\draw_to_html_scrolling_text.html"
87 printlog " + Close saved document "
89 Call hFileOpen (gOfficepath + "user\work\draw_to_html_scrolling_text.html",false)
90 printlog " + Reopen saved document "
93 printlog " + Close saved document "
95 Warnlog "Dialog 'Paste Special' is not up!"
99 printlog " Close active document "
100 Do Until GetDocumentCount = 0
105 ' ---------------------------------------------------------------------------------
107 testcase DrawToHTMLGroupedObject
109 gApplication = "DRAW"
110 printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
111 printlog " + Jump to beginning of document "
112 printlog " + Select Grouped Object "
113 printlog " + Copy selected Object "
114 Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
115 Call sMakeReadOnlyDocumentEditable
116 Kontext "DocumentDraw"
117 printlog " Jump to beginning of document "
118 DocumentDraw.TypeKeys "<Tab>",2
120 gApplication = "HTML"
121 printlog " Open a new writerdocument "
125 EditPasteSpecialWriter
127 Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
128 Call hCloseDocument ' Close Source-File
129 Call hCloseDocument ' Close Target-File
133 printlog " Paste 'Text' in all available clipboard formats "
134 Kontext "InhaltEinfuegen"
135 if InhaltEinfuegen.Exists then
136 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
137 printlog " + Write Clipboard format under pasted content "
138 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_grouped_object.html", "HTML")
139 printlog " + Save document as ..\user\work\draw_to_html_grouped_object.html"
142 printlog " + Close saved document "
144 Call hFileOpen (gOfficepath + "user\work\draw_to_html_grouped_object.html",false)
145 printlog " + Reopen saved document "
148 printlog " + Close saved document "
150 Warnlog "Dialog 'Paste Special' is not up!"
154 printlog " Close active document "
155 Do Until GetDocumentCount = 0
160 ' ---------------------------------------------------------------------------------
162 testcase DrawToHTML3D
164 gApplication = "DRAW"
165 printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
166 printlog " + Jump to beginning of document "
167 printlog " + Select cell <A5:C5> "
168 printlog " + Copy selected text "
169 Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
170 Call sMakeReadOnlyDocumentEditable
171 Kontext "DocumentDraw"
172 printlog " Jump to beginning of document "
173 DocumentDraw.TypeKeys "<Tab>",3
175 gApplication = "HTML"
176 printlog " Open a new writerdocument "
180 EditPasteSpecialWriter
182 Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
183 Call hCloseDocument ' Close Source-File
184 Call hCloseDocument ' Close Target-File
188 printlog " Paste 'Text' in all available clipboard formats "
189 Kontext "InhaltEinfuegen"
190 if InhaltEinfuegen.Exists then
191 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
192 printlog " + Write Clipboard format under pasted content "
193 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_3d.html", "HTML")
194 printlog " + Save document as ..\user\work\draw_to_html_3d.html"
197 printlog " + Close saved document "
199 Call hFileOpen (gOfficepath + "user\work\draw_to_html_3d.html",false)
200 printlog " + Reopen saved document "
203 printlog " + Close saved document "
205 Warnlog "Dialog 'Paste Special' is not up!"
209 printlog " Close active document "
210 Do Until GetDocumentCount = 0
215 ' ---------------------------------------------------------------------------------
217 testcase DrawToHTMLFontwork
219 gApplication = "DRAW"
220 printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
221 printlog " + Jump to beginning of document "
222 printlog " + Select Fontwork "
223 printlog " + Copy selected Fontwork "
224 Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
225 Call sMakeReadOnlyDocumentEditable
226 Kontext "DocumentDraw"
227 printlog " Jump to beginning of document "
228 DocumentDraw.TypeKeys "<Tab>",4
230 gApplication = "HTML"
231 printlog " Open a new writerdocument "
235 EditPasteSpecialWriter
237 Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
238 Call hCloseDocument ' Close Source-File
239 Call hCloseDocument ' Close Target-File
243 printlog " Paste 'Text' in all available clipboard formats "
244 Kontext "InhaltEinfuegen"
245 if InhaltEinfuegen.Exists then
246 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
247 printlog " + Write Clipboard format under pasted content "
248 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_fontwork.html", "HTML")
249 printlog " + Save document as ..\user\work\draw_to_html_fontwork.html"
252 printlog " + Close saved document "
254 Call hFileOpen (gOfficepath + "user\work\draw_to_html_fontwork.html",false)
255 printlog " + Reopen saved document "
258 printlog " + Close saved document "
260 Warnlog "Dialog 'Paste Special' is not up!"
264 printlog " Close active document "
265 Do Until GetDocumentCount = 0
270 ' ---------------------------------------------------------------------------------
272 testcase DrawToHTMLBullets
274 gApplication = "DRAW"
275 printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
276 printlog " + Jump to beginning of document "
277 printlog " + Select Bullets "
278 printlog " + Copy selected Bullets "
279 Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
280 Call sMakeReadOnlyDocumentEditable
281 Kontext "DocumentDraw"
282 printlog " Jump to beginning of document "
283 DocumentDraw.TypeKeys "<Tab>",5
285 gApplication = "HTML"
286 printlog " Open a new writerdocument "
290 EditPasteSpecialWriter
292 Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
293 Call hCloseDocument ' Close Source-File
294 Call hCloseDocument ' Close Target-File
298 printlog " Paste 'Text' in all available clipboard formats "
299 Kontext "InhaltEinfuegen"
300 if InhaltEinfuegen.Exists then
301 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
302 printlog " + Write Clipboard format under pasted content "
303 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_bullets.html", "HTML")
304 printlog " + Save document as ..\user\work\draw_to_html_bullets.html"
307 printlog " + Close saved document "
309 Call hFileOpen (gOfficepath + "user\work\draw_to_html_bullets.html",false)
310 printlog " + Reopen saved document "
313 printlog " + Close saved document "
315 Warnlog "Dialog 'Paste Special' is not up!"
319 printlog " Close active document "
320 Do Until GetDocumentCount = 0
325 ' ---------------------------------------------------------------------------------
327 testcase DrawToHTMLDimensionLines
329 gApplication = "DRAW"
330 printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
331 printlog " + Jump to beginning of document "
332 printlog " + Select Dimension Lines "
333 printlog " + Copy selected Dimension Lines "
334 Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
335 Call sMakeReadOnlyDocumentEditable
336 Kontext "DocumentDraw"
337 printlog " Jump to beginning of document "
338 DocumentDraw.TypeKeys "<PageDown>"
339 DocumentDraw.TypeKeys "<Tab>"
341 gApplication = "HTML"
342 printlog " Open a new writerdocument "
346 EditPasteSpecialWriter
348 Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
349 Call hCloseDocument ' Close Source-File
350 Call hCloseDocument ' Close Target-File
354 printlog " Paste 'Dimension Lines' in all available clipboard formats "
355 Kontext "InhaltEinfuegen"
356 if InhaltEinfuegen.Exists then
357 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
358 printlog " + Write Clipboard format under pasted content "
359 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_dim_lines.html", "HTML")
360 printlog " + Save document as ..\user\work\draw_to_html_dim_lines.html"
363 printlog " + Close saved document "
365 Call hFileOpen (gOfficepath + "user\work\draw_to_html_dim_lines.html",false)
366 printlog " + Reopen saved document "
369 printlog " + Close saved document "
371 Warnlog "Dialog 'Paste Special' is not up!"
375 printlog " Close active document "
376 Do Until GetDocumentCount = 0
381 ' ---------------------------------------------------------------------------------
383 testcase DrawToHTMLConnectors
385 gApplication = "DRAW"
386 printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
387 printlog " + Jump to beginning of document "
388 printlog " + Select Connectors "
389 printlog " + Copy selected Connectors "
390 Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
391 Call sMakeReadOnlyDocumentEditable
392 Kontext "DocumentDraw"
393 printlog " Jump to beginning of document "
394 DocumentDraw.TypeKeys "<PageDown>"
395 DocumentDraw.TypeKeys "<Tab>"
397 gApplication = "HTML"
398 printlog " Open a new writerdocument "
402 EditPasteSpecialWriter
404 Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
405 Call hCloseDocument ' Close Source-File
406 Call hCloseDocument ' Close Target-File
410 printlog " Paste 'Connectors' in all available clipboard formats "
411 Kontext "InhaltEinfuegen"
412 if InhaltEinfuegen.Exists then
413 Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
414 printlog " + Write Clipboard format under pasted content "
415 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_connectors.html", "HTML")
416 printlog " + Save document as ..\user\work\draw_to_html_connectors.html"
419 printlog " + Close saved document "
421 Call hFileOpen (gOfficepath + "user\work\draw_to_html_connectors.html",false)
422 printlog " + Reopen saved document "
425 printlog " + Close saved document "
427 Warnlog "Dialog 'Paste Special' is not up!"
431 printlog " Close active document "
432 Do Until GetDocumentCount = 0