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: c_upd_editmenu2.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 08:06:06 $
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 : oliver.craemer@sun.com
36 '* short description : Resource Test - Edit Menu Part II
38 '************************************************************************
41 ' #1 tEditDeleteContent
44 ' #1 tEditDeleteManualBreak
50 '\***********************************************************************
54 Printlog Chr(13) + "--------- EDIT Menu Part II (c_upd_editmenu2.inc) ---------"
57 call tEditDeleteContent
60 call tEditDeleteManualBreak
68 '-----------------------------------------------------------
71 '///<u><b>Edit - Fill</b></u>
73 '/// Open new Spreadsheet document
74 printlog " Open new Spreadsheet document"
76 '/// Enter '1' in cell C5
77 printlog " Enter '1' in cell C5"
78 Kontext "DocumentCalc"
79 call fCalcSelectCell ("C5")
80 DocumentCalc.typekeys "1<Return>"
81 '/// Select cells C5:C10
82 printlog " Select cells C5:C10"
83 call fCalcSelectCell ("C5:C10")
84 '/// Fill selected area via 'Edit - Fill – Down'
85 printlog " Fill selected area via 'Edit - Fill – Down'"
87 '/// Select cells C1:C5
88 printlog " Select cells C1:C5"
89 call fCalcSelectCell ("C1:C5")
90 '/// Fill selected area via 'Edit – Fill – Up'
91 printlog " Fill selected area via 'Edit – Fill – Up'"
93 '/// Select cells A5:C5
94 printlog " Select cells A5:C5"
95 call fCalcSelectCell ("A5:C5")
96 '/// Fill selected area via 'Edit – Fill – Left'
97 printlog " Fill selected area via 'Edit – Fill – Left'"
99 '/// Select cells C5:F5
100 printlog " Select cells C5:F5"
101 call fCalcSelectCell ("C5:F5")
102 '/// Fill selected area via 'Edit – Fill – Right'
103 printlog " Fill selected area via 'Edit – Fill – Right'"
105 '/// Select cell A1:F10
106 printlog " Select cell A1:F10"
107 call fCalcSelectCell ("A1:F10")
108 '/// Open fill-series-dialog via 'Edit – Fill – Series'
109 printlog " Open fill-series-dialog via 'Edit – Fill – Series'"
111 Kontext "ReiheFuellen"
112 DialogTest ( ReiheFuellen )
113 '/// Check Direction 'Right'
114 printlog " Check Direction 'Right'"
116 '/// Check Direction 'Up'
117 printlog " Check Direction 'Up'"
119 '/// Check Direction 'Left'
120 printlog " Check Direction 'Left'"
122 '/// Check Direction 'Down'
123 printlog " Check Direction 'Down'"
125 '/// Check Series Type 'Linear'
126 printlog " Check Series Type 'Linear'"
128 '/// Check Series Type 'Growth'
129 printlog " Check Series Type 'Growth'"
131 '/// Check Series Type 'AutoFill'
132 printlog " Check Series Type 'AutoFill'"
134 '/// Check Series Type 'Date'
135 printlog " Check Series Type 'Date'"
137 '/// Check Time Unit 'Day'
138 printlog " Check Time Unit 'Day'"
140 '/// Check Time Unit 'Weekday'
141 printlog " Check Time Unit 'Weekday'"
143 '/// Check Time Unit 'Month'
144 printlog " Check Time Unit 'Month'"
146 '/// Check Time Unit 'Year'
147 printlog " Check Time Unit 'Year'"
149 '/// Verify that 'Start Value' is disabled
150 printlog " Verify that 'Start Value' is disabled"
151 if StartWert.IsEnabled then warnlog "StartValue is enabled but should be disabled"
152 '/// Enter End value '10'
153 printlog " Enter End value '10'"
155 '/// Enter Increment '2'
156 printlog " Enter Increment '2'"
158 '/// Close dialog via 'Cancel'
159 printlog " Close dialog via 'Cancel'"
161 '/// Select all sheets by context menu on sheettab
162 printlog " Select all sheets by context menu on sheettab"
163 AlleTabellenAuswaehlen
164 '/// Open 'Fill Sheets' dialog by 'Edit - Fill - Sheets'
165 printlog " Open 'Fill Sheets' dialog by 'Edit - Fill - Sheets'"
167 Kontext "TabellenFuellen"
168 Dialogtest ( TabellenFuellen )
169 '/// Uncheck 'Paste all'
170 printlog " Uncheck 'Paste all'"
171 AuswahlAllesEinfuegen.UnCheck
173 printlog " Check 'Text'"
174 AuswahlZeichenketten.Check
176 printlog " Check 'Numbers'"
178 '/// Check 'Date & Time'
179 printlog " Check 'Date & Time'"
180 AuswahlDatumZeit.Check
181 '/// Check 'Formulas'
182 printlog " Check 'Formulas'"
185 printlog " Check 'Notes'"
188 printlog " Check 'Formats'"
190 '/// Check 'Skip empty cells'
191 printlog " Check 'Skip empty cells'"
192 LeerzeilenUeberspringen.Check
193 '/// Verify that 'Transpose' is disabled
194 printlog " Verify that 'Transpose' is disabled"
195 if Transponieren.IsEnabled then warnlog "Transpose is enabled but should be disabled"
197 printlog " Check 'Link'"
200 printlog " Check 'None'"
201 RechenopperationenKeine.Check
203 printlog " Check 'Add'"
204 RechenopperationenAddieren.Check
205 '/// Check 'Subtract'
206 printlog " Check 'Subtract'"
207 RechenopperationenSubtrahieren.Check
208 '/// Check 'Multiply'
209 printlog " Check 'Multiply'"
210 RechenopperationenMultiplizieren.Check
212 printlog " Check 'Divide'"
213 RechenopperationenDividieren.Check
214 '/// Verify that 'Dont shift' is disabled
215 printlog " Verify that 'Dont shift' is disabled"
216 if NichtVerschieben.IsEnabled then warnlog "Transpose is enabled but should be disabled"
217 '/// Verify that 'Down' is disabled
218 printlog " Verify that 'Down' is disabled"
219 if NachUnten.IsEnabled then warnlog "Transpose is enabled but should be disabled"
220 '/// Verify that 'Right' is disabled
221 printlog " Verify that 'Right' is disabled"
222 if NachRechts.IsEnabled then warnlog "Transpose is enabled but should be disabled"
223 '/// Close 'Fill Sheets' dialog with 'Cancel'
224 printlog " Close 'Fill Sheets' dialog with 'Cancel'"
225 TabellenFuellen.Cancel
227 printlog " Close document"
232 '-----------------------------------------------------------
234 testcase tEditDeleteContent
235 '///<u><b>Edit - Delete Content</b></u>
237 '/// Open new Spreadsheet document
238 printlog " Open new Spreadsheet document"
240 '/// Open 'Delete Content' dialog via 'Edit – Delete content'
241 printlog " Open 'Delete Content' dialog via 'Edit – Delete content'"
243 Kontext "InhalteLoeschen"
244 DialogTest ( InhalteLoeschen )
245 '/// Check 'Delete All'
246 printlog " Check 'Delete All'"
248 '/// Check that all other controls are now disabled
249 printlog " Check that all other controls are now disabled"
250 if Zeichenketten.IsEnabled then warnlog "Option is enabled but should be disabled"
251 '/// Uncheck 'Delete All'
252 printlog " Uncheck 'Delete All'"
255 printlog " Check 'Text'"
258 printlog " Check 'Numbers'"
260 '/// Check 'Date & Time'
261 printlog " Check 'Date & Time'"
263 '/// Check 'Formulas'
264 printlog " Check 'Formulas'"
267 printlog " Check 'Notes'"
270 printlog " Check 'Formats'"
273 printlog " Check 'Objects'"
275 '/// Close dialog via 'Cancel'
276 printlog " Close dialog via 'Cancel'"
277 InhalteLoeschen.Cancel
279 printlog " Close document"
284 '-----------------------------------------------------------
286 testcase tEditDeleteCells
287 '///<u><b>Edit - Delete Cells</b></u>
289 '/// Open new Spreadsheet document
290 printlog " Open new Spreadsheet document"
292 '/// Open 'Delete Cells' dialog via 'Edit – Delete Cells'
293 printlog " Open 'Delete Cells' dialog via 'Edit – Delete Cells'"
295 Kontext "ZellenLoeschen"
296 DialogTest ( ZellenLoeschen )
297 '/// Check 'Shift cells up'
298 printlog " Check 'Shift cells up'"
300 '/// Check 'Shift cells left'
301 printlog " Check 'Shift cells left'"
302 Zellennachlinks.Check
303 '/// Check 'Delete entire row'
304 printlog " Check 'Delete entire row'"
306 '/// Check 'Delete entire column'
307 printlog " Check 'Delete entire column'"
309 '/// Close dialog via 'Cancel'
310 printlog " Close dialog via 'Cancel'"
311 ZellenLoeschen.Cancel
313 printlog " Close document"
318 '-----------------------------------------------------------
321 '///<u><b>Edit - Sheet</b></u>
323 '/// Open new Spreadsheet document
324 printlog " Open new Spreadsheet document"
326 '/// Open 'Edit – Sheet – Move/Copy Sheet' dialog
327 printlog " Open 'Edit – Sheet – Move/Copy Sheet' dialog"
329 Kontext "TabelleVerschiebenKopieren"
330 DialogTest ( TabelleVerschiebenKopieren )
331 '/// Check that there are more than one entry in listbox 'To document'
332 printlog " Check that there are more than one entry in listbox 'To document'"
333 if InsDokument.GetItemCount < 1 then warnlog "The listbox is empty"
334 '/// Check that there are four entries in 'Insert before'
335 printlog " Check that there are four entries in 'Insert before'"
336 if EinfuegenVor.GetItemCount < 1 then warnlog "The listbox is empty"
338 printlog " Check 'Copy'"
340 '/// Close dialog via 'Cancel'
341 printlog " Close dialog via 'Cancel'"
342 TabelleVerschiebenKopieren.Cancel
343 '/// Open 'Edit – Sheet – Select' dialog
344 printlog " Open 'Edit – Sheet – Select' dialog"
346 Kontext "SelectSheets"
347 DialogTest ( SelectSheets )
348 '/// Check that there are three entries in listbox
349 printlog " Check that there are three entries in listbox"
350 if not SheetSelectionBox.GetItemCount = 3 then warnlog "The amount of sheets is wrong, should be 3 but is" & SheetSelectionBox.GetItemCount
351 '/// Close dialog via 'Cancel'
352 printlog " Close dialog via 'Cancel'"
354 '/// Choose 'Edit – Sheet – Delete'
355 printlog " Choose 'Edit – Sheet – Delete'"
357 '/// Now a messagebox appears. Close messagebox with 'No'
358 printlog " Now a messagebox appears. Close messagebox with 'No'"
360 if active.exists then
361 DialogTest ( Active )
364 warnlog "Edit::Sheet::Delete - no removal warning appeared!"
367 printlog " Close document"
372 '-----------------------------------------------------------
374 testcase tEditDeleteManualBreak
375 '///<u><b>Edit - Delete - Manual Break</b></u>
377 '/// Open new Spreadsheet document
378 printlog " Open new Spreadsheet document"
381 printlog " Select cell H10"
382 call fCalcSelectRange ("H10")
383 '/// Insert a manual rowbreak via 'Insert – Manual Break – Row Break'
384 printlog " Insert a manual rowbreak via 'Insert – Manual Break – Row Break'"
385 InsertManuelBreakRowBreak
386 '/// Insert a manual columnbreak via 'Insert – Manual Break – Column Break'
387 printlog " Insert a manual columnbreak via 'Insert – Manual Break – Column Break'"
388 InsertManuelBreakColumnBreak
389 '/// Delete manual rowbreak via 'Edit – Delete Manual Break – Row Break'
390 printlog " Delete manual rowbreak via 'Edit – Delete Manual Break – Row Break'"
391 EditRemoveManualBreakRowBreak
392 '/// Delete manual columnbreak via 'Edit – Delete Manual Break – Column Break'
393 printlog " Delete manual columnbreak via 'Edit – Delete Manual Break – Column Break'"
394 EditRemoveManualBreakColumnBreak
396 printlog " Close document"
401 '-----------------------------------------------------------
404 '///<u><b>Edit - Links</b></u>
406 '/// Open new Spreadsheet document
407 printlog " Open new Spreadsheet document"
409 '/// Open Insert graphic dialog via 'Insert – Picture – From File'
410 printlog " Open Insert graphic dialog via 'Insert – Picture – From File'"
411 InsertGraphicsFromFile
412 '/// Set filename ' global/input/graf_inp/borabora.jpg'
413 printlog " Set filename ' global/input/graf_inp/borabora.jpg'"
414 Kontext "GrafikEinfuegenDlg"
415 Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\borabora.jpg" )
417 printlog " Check 'Link'"
419 '/// Close dialog with 'OK'
420 printlog " Close dialog with 'OK'"
422 '/// Open 'Edit – Links' dialog
423 printlog " Open 'Edit – Links' dialog"
424 Kontext "DocumentCalc"
426 Kontext "VerknuepfungenBearbeiten"
427 VerknuepfungenBearbeiten.Exists (2)
428 Call DialogTest ( VerknuepfungenBearbeiten )
429 '/// Click on 'Update' – button
430 printlog " Click on 'Update' – button"
432 '/// Click on 'Modify...' - button
433 printlog " Click on 'Modify...' - button"
435 '/// Close 'Link graphics' – dialog with 'Cancel'
436 printlog " Close 'Link graphics' – dialog with 'Cancel'"
437 Kontext "GrafikEinfuegenDLG"
438 Call Dialogtest ( GrafikEinfuegenDLG )
439 GrafikEinfuegenDLG.Cancel
440 '/// Click on 'Break Link' – button
441 printlog " Click on 'Break Link' – button"
442 Kontext "VerknuepfungenBearbeiten"
444 '/// Close messagebox with 'Yes'
445 printlog " Close messagebox with 'Yes'"
447 If Active.Exists then
450 Warnlog "No request by deleting the link"
452 Kontext "VerknuepfungenBearbeiten"
453 '/// Close 'Edit Links' – dialog
454 printlog " Close 'Edit Links' – dialog"
455 VerknuepfungenBearbeiten.Close
457 printlog " Close document"
459 '/// Load testfile ' spreadsheet/required/input/linkclient.ods ' and allow update
460 printlog " Load testfile ' spreadsheet/required/input/linkclient.ods ' and allow update"
461 Call hFileOpen ( ConvertPath ( gTesttoolPath + "spreadsheet\required\input\linkclient.ods"))
462 printlog " Confirm Update Links dialog with YES"
464 If Active.Exists then
467 warnlog "No dialog for updating links exists"
469 '/// Open 'Edit – Links' dialog
470 printlog " Open 'Edit – Links' dialog"
472 Kontext "VerknuepfungenBearbeiten"
473 '/// Click on 'Update' – button
474 printlog " Click on 'Update' – button"
476 '/// Click on 'Modify...' - button to open 'Modify Link' dialog
477 printlog " Click on 'Modify...' - button to open 'Modify Link' dialog"
480 Call Dialogtest ( ModifyLink )
481 '/// Verify that the 'Application' editfield is available
482 printlog " Verify that the 'Application' editfield is available"
483 ModifyDDEApplication.GetText
484 '/// Verify that the 'File' editfield is available
485 printlog " Verify that the 'File' editfield is available"
486 ModifyDDEFile.GetText
487 '/// Verify that the 'Category' editfield is available
488 printlog " Verify that the 'Category' editfield is available"
489 ModifyDDECategory.GetText
490 '/// Close 'Modify Link' – dialog with 'Cancel'
491 printlog " Close 'Modify Link' – dialog with 'Cancel'"
493 Kontext "VerknuepfungenBearbeiten"
494 '/// Check that updateradiobuttons are enabled
495 printlog " Check that updateradiobuttons are enabled"
496 if not Automatisch.IsEnabled then
497 warnlog "Updateradiobutton is disabled but should be enabled"
499 '/// Click on 'Break Link' – button
500 printlog " Click on 'Break Link' – button"
502 '/// Accept messagebox with 'Yes'
503 printlog " Accept messagebox with 'Yes'"
505 If Active.Exists then
508 Kontext "VerknuepfungenBearbeiten"
509 '/// Check that updateradiobuttons are disabled
510 printlog " Check that updateradiobuttons are disabled"
511 if Manuell.IsEnabled then
512 warnlog "Updateradiobutton is enabled but should be disabled"
514 '/// Close 'Edit Links' – dialog
515 printlog " Close 'Edit Links' – dialog"
516 VerknuepfungenBearbeiten.Close
518 printlog " Close document"
523 '-----------------------------------------------------------
526 '///<u><b>Edit - PlugIn</b></u>
528 '/// Open new Spreadsheet document
529 printlog " Open new Spreadsheet document"
532 printlog " Edit – PlugIn"
535 printlog " Edit – PlugIn"
538 printlog " Close document"
543 '-----------------------------------------------------------
545 testcase tEditImageMap
546 '///<u><b>Edit - ImageMap</b></u>
548 '/// Open new Spreadsheet document
549 printlog " Open new Spreadsheet document"
551 '/// Open Insert graphic dialog via 'Insert – Picture – From File'
552 printlog " Open Insert graphic dialog via 'Insert – Picture – From File'"
553 InsertGraphicsFromFile
554 '/// Set filename ' global/input/graf_inp/borabora.jpg'
555 printlog " Set filename ' global/input/graf_inp/borabora.jpg'"
556 Kontext "GrafikEinfuegenDlg"
557 Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\borabora.jpg" )
558 '/// Close dialog with 'OK'
559 printlog " Close dialog with 'OK'"
561 '/// Open ImageMap – dialog via 'Edit – ImageMap'
562 printlog " Open ImageMap – dialog via 'Edit – ImageMap'"
564 Kontext "ImageMapEditor"
565 Call Dialogtest ( ImageMapEditor )
566 '/// Click on Open button
567 printlog " Click on Open button"
569 Kontext "GeneralFileDialog"
570 '/// Close 'Open'-dialog with Cancel
571 printlog " Close 'Open'-dialog with Cancel"
572 GeneralFileDialog.Cancel
573 Kontext "ImageMapEditor"
574 '/// Click on 'Save'-button
575 printlog " Click on 'Save'-button"
577 Kontext "SpeichernDlg"
578 '/// Close 'Save'-dialog with Cancel
579 printlog " Close 'Save'-dialog with Cancel"
581 Kontext "ImageMapEditor"
582 '/// Click on 'Rectangle'button and draw a rectangle by mouse
583 printlog " Click on 'Ellipse'button and draw an ellipse by mouse"
585 Dokument.MouseDown 50,50
586 Dokument.MouseMove 50,50,10,10
587 Dokument.MouseUp 10,10
588 '/// Click on 'Active'-button
589 printlog " Click on 'Active'-button"
591 '/// Click on 'Macro...'-button
592 printlog " Click on 'Macro...'-button"
593 warnlog "Due to #i102720# this functionality is outcommented"
595 ' Kontext "MakroZuweisen"
596 ' Call DialogTest ( MakroZuweisen )
597 ' '/// Close 'Assign Macro'-dialog with Cancel
598 ' printlog " Close 'Assign Macro'-dialog with Cancel"
599 ' MakroZuweisen.Cancel
600 ' Kontext "ImageMapEditor"
601 '/// Click on 'Properties'-button
602 printlog " Click on 'Properties'-button"
604 Kontext "ImageMapHyperlink"
605 Call DialogTest ( ImageMapHyperlink )
606 '/// Verify that the 'URL' editfield is available
607 printlog " Verify that the 'URL' editfield is available"
609 '/// Verify that the 'Alternativetext' editfield is available
610 printlog " Verify that the 'Alternativetext' editfield is available"
611 Alternativetext.GetText
612 '/// Verify that the 'Frame' listbox has items
613 printlog " Verify that the 'Frame' listbox has items"
615 '/// Verify that the 'Description' editfield is available
616 printlog " Verify that the 'Description' editfield is available"
618 '/// Close 'Properties'-dialog with 'Cancel'
619 printlog " Close 'Properties'-dialog with 'Cancel"
620 ImageMapHyperlink.Cancel
621 Kontext "ImageMapEditor"
622 '/// Click on 'UNDO'-button
623 printlog " Click on 'UNDO'-button"
625 '/// Close ImageMap with windowcloser
626 printlog " Close ImageMap with windowcloser"
628 '/// Click on 'No'-button on savemessagebox
629 printlog " Click on 'No'-button on savemessagebox"
631 if active.exists then
635 printlog " Close document"
640 '-----------------------------------------------------------
642 testcase tEditObjectEdit
643 '///<u><b>Edit - Object - Edit</b></u>
645 '/// Load testdocument 'spreadsheet/required/input/tEditObject.ods'
646 printlog " Load testdocument 'spreadsheet/required/input/tEditObject.ods'"
647 Call hFileOpen ( ConvertPath ( gTesttoolPath + "spreadsheet\required\input\tEditObject.ods"))
648 '/// If the file is not editable, click the edit button on standardbar
649 printlog "If the file is not editable, click the edit button on standardbar"
650 sMakeReadOnlyDocumentEditable()
651 '/// Select OLE-object
652 printlog " Select OLE-object"
654 '/// Activate OLE-object by Edit – Object – Edit
655 printlog " Activate OLE-object by Edit – Object – Edit"
657 '/// Deactivate OLE-object
658 printlog " Deactivate OLE-object"
659 Kontext "DocumentCalc"
660 DocumentCalc.TypeKeys "<ESCAPE>" , 2
661 '/// Select OLE-object
662 printlog " Select OLE-object"
664 '/// Open 'Save As' – dialog by Edit – Object – Save As
665 printlog " Open 'Save As' – dialog by Edit – Object – Save As"
666 EditObjectSaveCopyAsCalc
667 Kontext "SpeichernDlg"
668 '/// Close dialog with Cancel
669 printlog " Close dialog with Cancel"
672 printlog " Close document"