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_format_character1.inc,v $
12 '* last change: $Author: vg $ $Date: 2008-08-18 12:28:11 $
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 : Standard character formatting. Setting Styles.
37 '\***********************************************************************
39 testcase tFormatCharacter1
40 printlog "- Check if 'Pair Kerning' is enabled by default!"
41 '/// Format / Character / Tab Position ///
43 '/// Open new document
45 '/// Format / Character => Select Tabpage 'Position'
47 Active.Setpage TabFontPosition
48 Kontext "TabFontPosition"
49 '/// 'Pair Kerning' should be checked by default
50 if Not PairKerning.IsChecked then
51 warnlog "Pair Kerning should be checked by default !"
53 TabFontPosition.Cancel
54 '/// Close dialog and open Stylist
56 if Not Stylist.Exists then FormatStylist
57 '/// Open context menu on selected style and choose 'Edit'
58 Vorlagenliste.OpenContextMenu
60 '/// Select Tabpage 'Position'
62 Active.Setpage TabFontPosition
63 Kontext "TabFontPosition"
64 '/// 'Pair Kerning' should be checked by default
65 if Not PairKerning.IsChecked then
66 warnlog "Pair Kerning should be checked by default !"
68 TabFontPosition.Cancel
76 '------------------------------------------------------------------------------------------------------------------------------
78 testcase tFormatCharacter2
79 '/// Format / Default ///
82 Printlog " - adjust Font- and Paragraph-Format"
83 '/// Insert a word and select it ///
84 Call wTypeKeys "Format<Shift Mod1 Left>"
85 '/// Select Format / Character and adjust Font- and Paragraph-Formats ///
89 active.SetPage TabFontEffects
90 kontext "TabFontEffects"
94 StrikeThrough.Select 2
98 active.SetPage TabEinzuegeUndAbstaende
99 kontext "TabEinzuegeUndAbstaende"
101 '/// Close dialog ///
102 TabEinzuegeUndAbstaende.OK
105 Printlog " - Format / Default"
109 Printlog " - check Font- and Paragraph-Formats"
111 '/// Check if Font- and Paragraph-Formats have benn set to default ///
114 active.SetPage TabFontEffects
115 kontext "TabFontEffects"
116 if Outline.IsChecked then Warnlog "Outline is checked"
117 if Shadow.IsChecked then Warnlog "Shadow is checked"
118 if Underline.GetSelIndex = 2 then Warnlog "Wrong entry in 'Underline' is selected"
119 if StrikeThrough.GetSelIndex = 2 then Warnlog "Wrong entry in 'StrikeThrough' is selected"
124 active.SetPage TabEinzuegeUndAbstaende
125 kontext "TabEinzuegeUndAbstaende"
126 if Automatisch.IsChecked then Warnlog "Automatic is checked"
127 TabEinzuegeUndAbstaende.OK
129 '/// Close document ///
133 '------------------------------------------------------------------------------------------------------------------------------
135 testcase tFormatCharacter3
136 Dim Vergleich1 as integer
137 Dim Vergleich2 as string
138 Dim Vergleich3 as string
139 Dim Vergleich4 as string
141 '/// Format / Character ///
142 PrintLog "- Format / Character"
144 '/// New document ///
146 printlog " - adjust character"
147 '/// Select Format / Character ///
151 '/// On Tabpage 'Font' adjust settings ///
152 active.SetPage TabFont
156 Vergleich2 = FontWest.GetSelText
157 Vergleich1 = StyleWest.GetItemCount
158 StyleWest.Select Vergleich1
159 Vergleich3 = StyleWest.GetSelText
163 Vergleich2 = Font.GetSelText
164 Vergleich1 = Style.GetItemCount
165 Style.Select Vergleich1
166 Vergleich3 = Style.GetSelText
171 '/// On Tabpage 'Font Effects' adjust settings ///
172 active.SetPage TabFontEffects
173 kontext "TabFontEffects"
176 Active.Setpage TabFontPosition
177 '/// On Tabpage 'Font Position ' adjust settings ///
178 Kontext "TabFontPosition"
181 Vergleich4 = SpacingBy.GetText
182 if Right ( Vergleich4, 2 ) <> "pt" then Warnlog "Wrong Unit at Spacing by"
184 '/// On Tabpage 'Hyperlink' adjust settings ///
185 active.SetPage TabHyperlinkZeichen
186 kontext "TabHyperlinkZeichen"
187 URLName.SetText "www.mikeportnoy.com"
188 NameText.SetText "A hyperlink with testtool"
196 UnbesuchterLink.Select vLink
198 active.SetPage TabHintergrund
199 kontext "TabHintergrund"
201 Hintergrundfarbe.Typekeys "<Down><Left>", 4
203 '/// Close dialog and reopen with Format / Character ///
205 Call wTypeKeys "This is formatted text <Home><Right>"
207 printlog " - check character"
209 '/// Check settings made ///
210 Call wTypeKeys "<Home><Right>"
213 active.SetPage TabFont
216 if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
217 if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ StyleWest.GetSelText
218 if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
220 if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
221 if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ Style.GetSelText
222 if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
225 active.SetPage TabFontEffects
226 kontext "TabFontEffects"
227 if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
229 Active.Setpage TabFontPosition
230 Kontext "TabFontPosition"
231 if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing activated, is not the 2. but " + Spacing.GetSelText
232 if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong Value selected. Not: " + Vergleich4 +" but " + SpacingBy.GetText
235 active.SetPage TabHyperlinkZeichen
236 kontext "TabHyperlinkZeichen"
237 if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#Wrong URL : " + URLName.GetText
238 SetClipboard UrlName.Gettext
239 if NameText.GetText <> "A hyperlink with testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
240 if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
241 if UnbesuchterLink.GetSelIndex <> vLink then Warnlog "Wrong Style for unused Link :" + UnbesuchterLink.GetSelIndex
242 TabHyperlinkZeichen.OK
244 if gApplication = "WRITER" then
245 Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odt", "writer8")
247 Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odm", "writer8") 'gMasterDocFilter
249 '/// Save document as '../user/work/format1.sxw' and close it ///
251 if getclipboardtext="http://www.mikeportnoy.com/" then
252 printlog " - activate Link"
256 printlog " - check saved character format"
260 if gApplication = "WRITER" then
261 Call hFileOpen ( gOfficePath + "user\work\format1.odt" )
263 Call hFileOpen ( gOfficePath + "user\work\format1.odm" )
265 Call wTypeKeys "<Home><Right>"
267 '/// Reopen previous saved documentand check settings made under Format / Character ///
272 active.SetPage TabFont
275 if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
276 if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ StyleWest.GetSelText
277 if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
279 if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
280 if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ Style.GetSelText
281 if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
284 active.SetPage TabFontEffects
285 kontext "TabFontEffects"
286 if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
288 Active.Setpage TabFontPosition
289 Kontext "TabFontPosition"
290 if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing selected. Not 2. but " + Spacing.GetSelText
291 if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong value selectzed. Not " + Vergleich4 +" but " + SpacingBy.GetText
293 active.SetPage TabHyperlinkZeichen
294 kontext "TabHyperlinkZeichen"
295 if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#Wrong URL : " + URLName.GetText
296 if NameText.GetText <> "A hyperlink with testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
297 if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
298 TabHyperlinkZeichen.OK
299 '/// Close document ///
303 '------------------------------------------------------------------------------------------------------------------------------
305 testcase tFormatHyperlink
306 ' /// This testcase has been written due to bug #109488
307 '/// Open a new writerdocument
309 '/// Enter a URL (www.sun.com) in document
310 Call wTypeKeys "Autocorrect my URL www.sun.com"
311 '/// Enter a space after URL
313 '/// URL should have been autocompleted to http://www.sun.com
314 Call wTypeKeys "<Left>",7
317 Active.Setpage TabHyperlinkZeichen
318 Kontext "TabHyperlinkZeichen"
319 if URLName.GetText <> "http://www.sun.com/" then
320 Warnlog "Autocorrection for hyperlink does not work!"
322 printlog "Hyperlink has been auto-corrected"
324 TabHyperlinkZeichen.Cancel
326 '/// Change URL to www.sauna.com
328 Call wTypeKeys "<Left>" ,2
331 '/// Check whether URL has been changed
334 Active.Setpage TabHyperlinkZeichen
335 Kontext "TabHyperlinkZeichen"
336 if URLName.GetText <> "http://www.sun.com/" then
337 Warnlog "Autocorrection for hyperlink should not have been affected to URL!"
339 printlog "Hyperlink has not been auto-corrected"
341 TabHyperlinkZeichen.Cancel
346 '------------------------------------------------------------------------------------------------------------------------------
348 testcase tFormatStyles1
349 Dim iMenuEntry as integer
351 if hIsExtensionAlreadyInstalled("SunSearchToolbar.oxt") = true then
356 '/// All format styles in context-menu ///
357 '/// Open a new document ///
359 printlog "- Style 'Bold' "
360 '/// Write 'Style Bold' - execute Context menu 'Style Bold'
361 Call wTypeKeys "Style Bold"
362 Call wTypeKeys "<Shift Home>"
363 Kontext "DocumentWriter"
364 DocumentWriter.OpenContextMenu
365 Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
366 Call hMenuFindSelect (".uno:Bold", true, 1, false) 'Find 'Bold' and call the slot.
367 '/// Check if changes to style have been made ///
368 Kontext "TextObjectbar"
369 if Fett.Getstate(2) = 0 then
370 Warnlog "Style 'Bold' with context menu has not been set!"
373 Call wTypeKeys "<End><Mod1 Shift X>"
375 Call wTypeKeys "<Return>"
377 printlog "- Style 'Italic' "
378 '/// Write 'Style Italic' - execute Context menu 'Style Italic'
379 Call wTypeKeys "Style Italic"
380 Call wTypeKeys "<Shift Home>"
381 Kontext "DocumentWriter"
382 DocumentWriter.OpenContextMenu
383 Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
384 Call hMenuFindSelect (".uno:Italic", true, 2, false) 'Find 'Italic' and call the slot.
385 ' /// Check if changes to style have been made ///
386 Kontext "TextObjectbar"
387 if Kursiv.Getstate(2) = 0 then
388 Warnlog "#58722#Style 'Italic' with context menu has not been set!"
391 Call wTypeKeys "<End><Right>"
392 Call wTypeKeys "<Return>"
394 printlog "- Style 'Underline' "
395 '/// Write 'Style Underline' - execute Context menu 'Style Underline'
396 Call wTypeKeys "Style Underline"
397 Call wTypeKeys "<Shift Home>"
398 Kontext "DocumentWriter"
399 DocumentWriter.OpenContextMenu
400 Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
401 Call hMenuFindSelect (".uno:Underline", true, 4, false) 'Find 'Underline' and call the slot.
402 ' /// Check if changes to style have been made ///
405 Active.Setpage TabFontEffects
406 Kontext "TabFontEffects"
407 if Underline.GetSelIndex <> 2 then Warnlog "Style 'Underline' with context menu has not been set!"
408 TabFontEffects.Cancel
409 Call wTypeKeys "<End><Right>"
410 Call wTypeKeys "<Return>"
412 printlog "- Style 'Overline' "
413 '/// Write 'Style Overline' - execute Context menu 'Style Strikethrough'
414 Call wTypeKeys "Style Overline"
415 Call wTypeKeys "<Shift Home>"
416 Kontext "DocumentWriter"
417 DocumentWriter.OpenContextMenu
418 Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
419 Call hMenuFindSelect (".uno:Overline", true, 3, false) 'Find 'Overline' and call the slot.
420 ' /// Check if changes to style have been made ///
423 Active.Setpage TabFontEffects
424 Kontext "TabFontEffects"
425 if Overline.GetSelIndex <> 2 then Warnlog "Style 'Overline' with context menu has not been set!"
426 TabFontEffects.Cancel
427 Call wTypeKeys "<End><Right>"
428 Call wTypeKeys "<Return>"
430 printlog "- Style 'StrikeThrough' "
431 '/// Write 'Style Strikethrough' - execute Context menu 'Style Strikethrough'
432 Call wTypeKeys "Style Strikethrough"
433 Call wTypeKeys "<Shift Home>"
434 Kontext "DocumentWriter"
435 DocumentWriter.OpenContextMenu
436 Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
437 Call hMenuFindSelect (".uno:Strikeout", true, 5, false) 'Find 'Strikethrough' and call the slot.
438 ' /// Check if changes to style have been made ///
441 Active.Setpage TabFontEffects
442 Kontext "TabFontEffects"
443 if StrikeThrough.GetSelIndex <> 2 then Warnlog "Style 'StrikeThrough' with context menu has not been set!"
444 TabFontEffects.Cancel
445 Call wTypeKeys "<End>"
446 Call wTypeKeys "<Right><Return>"
448 printlog "- Style 'Shadow' "
449 '/// Write 'Style Shadow' - execute Context menu 'Style Shadow'
450 Call wTypeKeys "Style Shadow"
451 Call wTypeKeys "<Shift Home>"
452 Kontext "DocumentWriter"
453 DocumentWriter.OpenContextMenu
454 Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
455 Call hMenuFindSelect (".uno:Shadowed", true, 6, false) 'Find 'Shadowed' and call the slot.
456 ' /// Check if changes to style have been made ///
459 Active.Setpage TabFontEffects
460 Kontext "TabFontEffects"
461 if Shadow.IsChecked = False then Warnlog "Style 'Shadow' with context menu has not been set!"
462 TabFontEffects.Cancel
463 Call wTypeKeys "<End><Right>"
464 Call wTypeKeys "<Return>"
466 printlog "- Style 'Outline' "
467 '/// Write 'Style Outline' - execute Context menu 'Style Outline'
468 Call wTypeKeys "Style Outline"
469 Call wTypeKeys "<Shift Home>"
470 Kontext "DocumentWriter"
471 DocumentWriter.OpenContextMenu
472 Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
473 Call hMenuFindSelect (".uno:OutlineFont", true, 7, false) 'Find 'Outline' and call the slot.
474 ' /// Check if changes to style have been made ///
477 Active.Setpage TabFontEffects
478 Kontext "TabFontEffects"
479 if Outline.IsChecked = false then Warnlog "Style 'Outline' with context menu has not been set!"
480 TabFontEffects.Cancel
482 printlog "Close Document."
486 '---------------------------------------------------------------------------------------------------------------------
488 testcase tFormatCharacter
489 Dim Vergleich1%, Vergleich2$, Vergleich3$, Vergleich4$
491 '/// Format / Character ///
492 PrintLog "- Format / Character"
494 '/// New document ///
496 printlog " - adjust character"
497 '/// Select Format / Character ///
501 '/// On Tabpage 'Font' adjust settings ///
502 active.SetPage TabFont
506 Vergleich2$ = FontWest.GetSelText
507 Vergleich1% = StyleWest.GetItemCount
508 StyleWest.Select Vergleich1%
509 Vergleich3$ = StyleWest.GetSelText
513 Vergleich2$ = Font.GetSelText
514 Vergleich1% = Style.GetItemCount
515 Style.Select Vergleich1%
516 Vergleich3$ = Style.GetSelText
521 '/// On Tabpage 'Font Effects' adjust settings ///
522 active.SetPage TabFontEffects
523 kontext "TabFontEffects"
526 Active.Setpage TabFontPosition
527 '/// On Tabpage 'Font Position ' adjust settings ///
528 Kontext "TabFontPosition"
531 Vergleich4$ = SpacingBy.GetText
532 if Right ( Vergleich4$, 2 ) <> "pt" then Warnlog "Wrong Unit at Spacing by"
534 '/// On Tabpage 'Hyperlink' adjust settings ///
535 active.SetPage TabHyperlinkZeichen
536 kontext "TabHyperlinkZeichen"
537 URLName.SetText "www.mikeportnoy.com"
538 NameText.SetText "Ein Link mit dem Testtool"
541 UnbesuchterLink.Select 6
543 active.SetPage TabHintergrund
544 kontext "TabHintergrund"
546 Hintergrundfarbe.Typekeys "<Down><Left>", 4
548 '/// Close dialog and reopen with Format / Character ///
550 Call wTypeKeys "Dies ist ein formatierter Text <Home><Right>"
552 printlog " - check character"
554 '/// Check settings made ///
555 Call wTypeKeys "<Home><Right>"
558 active.SetPage TabFont
561 if FontWest.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ FontWest.GetSelText
562 if StyleWest.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ StyleWest.GetSelText
563 if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
565 if Font.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ Font.GetSelText
566 if Style.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ Style.GetSelText
567 if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
570 active.SetPage TabFontEffects
571 kontext "TabFontEffects"
572 if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
574 Active.Setpage TabFontPosition
575 Kontext "TabFontPosition"
576 if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing activated, is not the 2. but " + Spacing.GetSelText
577 if SpacingBy.GetText <> Vergleich4$ then Warnlog "Wrong Value selected. Not: " + Vergleich4$ +" but " + SpacingBy.GetText
580 active.SetPage TabHyperlinkZeichen
581 kontext "TabHyperlinkZeichen"
582 if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "Wrong URL : " + URLName.GetText + " (#BugID:90982)"
583 SetClipboard UrlName.Gettext
584 if NameText.GetText <> "Ein Link mit dem Testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
585 if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
586 if UnbesuchterLink.GetSelIndex <> 6 then Warnlog "Wrong Style for unused Link :" + UnbesuchterLink.GetSelIndex
587 TabHyperlinkZeichen.OK
589 if gApplication = "WRITER" then
590 Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odt", "writer8" )
592 Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odm", "writer8" ) 'gMasterDocFilter
594 '/// Save document as '../user/work/format1.sxw' and close it ///
596 if getclipboardtext="http://www.mikeportnoy.com/" then
597 printlog " - activate Link"
601 printlog " - check saved character format"
605 if gApplication = "WRITER" then
606 Call hFileOpen ( gOfficePath + "user\work\format1.odt" )
608 Call hFileOpen ( gOfficePath + "user\work\format1.odm" )
610 Call wTypeKeys "<Home><Right>"
612 '/// Reopen previous saved documentand check settings made under Format / Character ///
618 active.SetPage TabFont
621 if FontWest.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ FontWest.GetSelText
622 if StyleWest.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ StyleWest.GetSelText
623 if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
625 if Font.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ Font.GetSelText
626 if Style.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ Style.GetSelText
627 if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
630 active.SetPage TabFontEffects
631 kontext "TabFontEffects"
632 if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
634 Active.Setpage TabFontPosition
635 Kontext "TabFontPosition"
636 if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing selected. Not 2. but " + Spacing.GetSelText
637 if SpacingBy.GetText <> Vergleich4$ then Warnlog "Wrong value selectzed. Not " + Vergleich4$ +" but " + SpacingBy.GetText
639 active.SetPage TabHyperlinkZeichen
640 kontext "TabHyperlinkZeichen"
641 if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "Wrong URL : " + URLName.GetText
642 if NameText.GetText <> "Ein Link mit dem Testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
643 if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
644 TabHyperlinkZeichen.OK
645 '/// Close document ///
649 '------------------------------------------------------------------------------------------------------------------------------
651 testcase tFormatCharacterOverline1
652 Dim iCounter as integer
653 Dim CompareValue1 as string
654 Dim CompareValue2 as string
655 Dim CompareValue3 as string
656 Dim CompareValue4 as string
658 Printlog " New Writer document."
660 Printlog " Format Character."
662 Printlog " Tab 'Font Effects'."
664 active.SetPage TabFontEffects
665 Kontext "TabFontEffects"
666 Printlog " Select Overline Listbox."
667 Printlog " Default (first) entry is 'Without'."
670 Printlog " Select Colour Listbox."
671 Printlog " Verify that Colour List box is DISABLED."
673 OverlineColor.Select (1)
674 warnlog "Color-listbox was falsely enabled."
676 printlog "Color-listbox is correctly disabled by default."
679 Printlog " Select Overline Listbox again."
680 Printlog " Select second entry 'Single'."
683 Printlog " Step down all 14 entries (Last: 'Double Wave' in English UI)."
684 for iCounter = 2 to Overline.GetItemCount
685 Overline.Select (iCounter)
689 Printlog " Select Color Listbox."
690 Printlog " Verify that Color List box is ENABLED."
692 OverlineColor.Select (OverlineColor.GetItemCount)
693 printlog "Color-listbox is correctly enabled."
695 warnlog "Color-listbox was falsely disabled."
698 'CompareValue2 = OverlineColor.GetSelIndex
700 Printlog " Close dialog."
702 Printlog " Close document."
706 '------------------------------------------------------------------------------------------------------------------------------
708 testcase tFormatCharacterOverline2
709 Dim CompareValue1 as string
710 Dim CompareValue2 as string
711 Dim CompareValue3 as string
712 Dim CompareValue4 as string
713 Dim SaveFilePathAndName as String
715 SaveFilePathAndName = gOfficePath + "user\work\OverlineTest2.odt"
717 Printlog " New Writer document."
719 Printlog " Type 'Overline Single Red' (without quotes)."
720 Call wTypeKeys "Overline Single Red"
721 Printlog " Select entire string."
722 Call wTypeKeys "<HOME>"
723 Call wTypeKeys "<SHIFT END>"
724 Printlog " Format Character."
726 Printlog " Tab 'Font Effects'."
728 active.SetPage TabFontEffects
729 Kontext "TabFontEffects"
730 Printlog " Select Overline Listbox."
731 Printlog " Select second entry 'Single'."
734 Printlog " Select Color Listbox."
735 Printlog " In Color List box, select Color 'Red', OK."
736 OverlineColor.Select (6)
738 CompareValue1 = Overline.GetSelIndex
739 CompareValue2 = OverlineColor.GetSelIndex
741 Printlog " Close dialog."
744 Printlog " Save document."
745 Call hFileSaveAsKill ( SaveFilePathAndName )
746 Printlog " Reload document."
748 Printlog " Select entire string."
749 Call wTypeKeys "<HOME><SHIFT END>"
750 Printlog " Format Character."
752 Printlog " Tab 'Font Effects'."
754 active.SetPage TabFontEffects
755 Kontext "TabFontEffects"
756 Printlog " Verify that 'Overline Single' and Overline Colour 'Red' is set."
758 If Overline.GetSelIndex <> CompareValue1 then warnlog "The Overline-Value wasn't saved after closing the options-dialogue."
759 If OverlineColor.GetSelIndex <> CompareValue2 then warnlog "The Color-Value wasn't saved after closing the options-dialogue."
761 Printlog " Close dialog."
763 Printlog " Close document."
767 '------------------------------------------------------------------------------------------------------------------------------