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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : helge.delfs@oracle.com
30 '* short description : Testcases for the Format-Menu.
32 '\***********************************************************************
36 printLog Chr(13) + "--------- Menu Format / 2 (w_005b_.inc) ----------"
37 gApplication = "WRITER"
40 Call tFormatAlignmentArea
41 Call tFormatAlignmentEdit
43 Call tFormatArrangeArea
48 Call tFormatPositionAndSize
49 Call tFormatPositionAndSizeLegend
56 Call hExportUmstellung ( TRUE )
58 Call tFormatArrangeObject
59 Call tFormatAlignmentObject
60 Call tFormatAnchorObject
61 Call tFormatWrapObject
62 Call hExportUmstellung ( FALSE )
64 'Picture ( jolink.jpg )
67 'Editmode with Draw objects
69 Call tFormatLineSpacing
70 Call tFormatParagraphEdit
74 Call tHtmlDocFormatGraphics
75 Call tHtmlDocFormatAlignment
76 Call tHtmlDocFormatObject
77 gApplication = "WRITER"
81 '-----------------------------------------------------------
83 testcase tFormatGraphics
84 PrintLog "- Format / Graphics"
87 printlog " Open new document"
90 printlog " Insert a graphic (..\writer\required\input\graphics\jolink.jpg)"
91 Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
93 printlog " Format / Graphic"
94 if ( hUseAsyncSlot( "FormatGraphics" ) = -1 ) then
95 Warnlog "- Format / Graphics disabled or hidden!"
99 printlog " Step through all tabpages"
101 active.SetPage TabType
103 Call DialogTest ( TabType )
106 active.SetPage TabZusaetze
107 Kontext "TabZusaetze"
108 Call DialogTest ( TabZusaetze )
111 active.SetPage TabUmlauf
113 Call DialogTest ( TabUmlauf )
116 active.SetPage TabHyperlinkRahmen
117 Kontext "TabHyperlinkRahmen"
118 Call DialogTest ( TabHyperlinkRahmen )
121 active.SetPage TabGrafik
123 Call DialogTest ( TabGrafik )
125 if gApplication <> "HTML" then
127 active.SetPage TabZuschneiden
128 Kontext "TabZuschneiden"
129 Call DialogTest ( TabZuschneiden )
132 active.SetPage TabHintergrund
133 Kontext "TabHintergrund"
134 Call DialogTest ( TabHintergrund )
138 active.SetPage TabUmrandung
139 Kontext "TabUmrandung"
140 Call DialogTest ( TabUmrandung )
143 active.SetPage TabMakro
144 ' if no JRE is installed a messagebox appears
148 if Active.Exists then
149 if Active.GetRT = 304 then
150 if j = 1 then Warnlog Active.Gettext
160 Call DialogTest ( TabMakro )
162 printlog " Close dialog"
165 printlog " Close active document"
169 '-----------------------------------------------------------
171 testcase tFormatArrange
172 PrintLog "- Format / Arrange"
174 printlog " Open new document"
177 printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
178 Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
181 printlog " Format / Arrange / Bring to front"
182 FormatArrangeBringToFrontCalc
184 Warnlog "'Bring to front' couldn't be executed!"
188 FormatArrangeBringForward
189 printlog " Format / Arrange / Bring forward"
191 Warnlog "'Bring forward' couldn't be executed!"
195 FormatArrangeSetBackward
196 printlog " Format / Arrange / Set backward"
198 Warnlog "'Send backward' couldn't be executed!"
202 FormatArrangeSendToBack
203 printlog " Format / Arrange / Send to back"
205 Warnlog "'Send to back' couldn't be executed!"
208 printlog " Close active document"
212 '-----------------------------------------------------------
214 testcase tFormatAlignment
216 PrintLog "- Format / Alignment"
218 printlog " Open new document"
220 printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
221 Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
223 if ( gApplication = "HTML" ) then
224 printlog " Format / Anchor / to Page"
225 hUseAsyncSlot( "FormatAnchorToPage" )
229 printlog " Format / Alignment / Left"
233 Warnlog "'Alignment left' couldn't be executed!"
237 printlog " Format / Alignment / Right"
241 Warnlog "'Alignment right' couldn't be executed!"
245 printlog " Format / Alignment / Top"
249 Warnlog "'Alignment top' couldn't be executed!"
253 printlog " Format / Alignment / Center"
254 FormatAlignmentCenter
257 Warnlog "'Alignment center' couldn't be executed!"
261 printlog " Format / Alignment / Bottom"
262 FormatAlignmentBottom
265 Warnlog "'Alignment bottom' couldn't be executed!"
268 printlog " Close active document"
272 '-----------------------------------------------------------
274 testcase tFormatObject
275 PrintLog "- Format / Object"
278 printlog " Open new document"
281 printlog " Insert a frame"
284 printlog " Format / Frame"
287 printlog " Step through all tabpages"
289 active.SetPage TabType
291 Call DialogTest ( TabType )
294 active.SetPage TabZusaetze
295 Kontext "TabZusaetze"
296 Call DialogTest ( TabZusaetze )
299 active.SetPage TabUmlauf
301 Call DialogTest ( TabUmlauf )
304 active.SetPage TabUmrandung
305 Kontext "TabUmrandung"
306 Call DialogTest ( TabUmrandung )
309 active.SetPage TabHintergrund
310 Kontext "TabHintergrund"
311 Call DialogTest ( TabHintergrund )
313 if gApplication <> "HTML" then
315 active.SetPage TabHyperlinkRahmen
316 Kontext "TabHyperlinkRahmen"
317 Call DialogTest ( TabHyperlinkRahmen )
320 active.SetPage TabMakro
321 ' if no JRE is installed a messagebox appears
325 if Active.Exists then
326 if Active.GetRT = 304 then
327 if j = 1 then Warnlog Active.Gettext
337 Call DialogTest ( TabMakro )
338 printlog " Close dialog"
341 printlog " Close dialog"
342 TabHintergrund.Cancel
345 printlog " Close active document"
349 '-----------------------------------------------------------
351 testcase tFormatArrangeObject
352 PrintLog "- Format / Arrange Frame"
354 printlog " Open new document"
356 printlog " Insert a frame"
358 printlog " Format / Arrange / Bring to front"
359 FormatArrangeBringToFrontCalc : WaitSlot()
361 printlog " Format / Arrange / Bring forward"
362 FormatArrangeBringForward : WaitSlot()
364 printlog " Format / Arrange / Set backward"
365 FormatArrangeSetBackward : WaitSlot()
367 printlog " Format / Arrange / Send to back "
368 FormatArrangeSendToBack : WaitSlot()
370 printlog " Close active document"
374 '-----------------------------------------------------------
376 testcase tFormatAlignmentObject
377 PrintLog "- Format / Alignment Frame"
378 if gApplication = "HTML" then
379 printlog "Not in WriterWeb!"
382 printlog " Open new document"
384 printlog " Insert a frame"
386 printlog " Format / Alignment / Left"
387 FormatAlignmentLeft : WaitSlot()
389 printlog " Format / Alignment / Centered"
390 FormatAlignmentCentered : WaitSlot()
392 printlog " Format / Alignment / Right"
393 FormatAlignmentRight : WaitSlot()
395 printlog " Format / Alignment / Top"
396 FormatAlignmentTop : WaitSlot()
398 printlog " Format / Alignment / Center"
399 FormatAlignmentCenter : WaitSlot()
401 printlog " Format / Alignment / Bottom"
402 FormatAlignmentBottom : WaitSlot()
404 printlog " Close active document"
408 '-----------------------------------------------------------
410 testcase tFormatAnchorObject
412 PrintLog "- Format / Anchor Frame"
414 printlog " Open new document"
416 printlog " Insert a frame"
418 printlog " Format / Anchor / to page"
419 FormatAnchorToPage : WaitSlot()
421 printlog " Format / Anchor / to paragraph"
422 FormatAnchorToParagraph : WaitSlot()
424 printlog " Format / Anchor / to character"
425 FormatAnchorToCharacter : WaitSlot()
427 printlog " Format / Anchor / as character"
428 FormatAnchorAsCharacter : WaitSlot()
430 printlog " Close active document"
434 '-----------------------------------------------------------
436 testcase tFormatWrapObject
438 PrintLog "- Format / Wrap (Frame)"
440 if ( gApplication = "HTML" ) then
441 printlog "Not in WriterWeb!"
445 printlog " Open new document"
448 printlog " Insert a frame"
451 printlog " Format / Wrap / no wrap"
452 FormatWrapNoWrap : WaitSlot()
454 printlog " Format / Wrap / page wrap"
455 FormatWrapPageWrap : WaitSlot()
457 printlog " Format / Wrap / optimal page wrap"
458 FormatWrapOptimalPageWrap : WaitSlot()
460 printlog " Format / Wrap / through"
461 FormatWrapThrough : WaitSlot()
463 printlog " Format / Wrap / in background"
464 FormatWrapInBackground : WaitSlot()
466 printlog " Format / Wrap / first paragraph"
467 FormatWrapFirstParagraph : WaitSlot()
469 if ( hUseAsyncSlot( "FormatWrapContour" ) = -1 ) then
470 printlog( "Format / Wrap / Contour disabled. Good." )
472 warnlog( "Format / Wrap / Contour should not be enabled for frames" )
475 printlog " Format / Wrap / Edit Contour"
476 if ( hUseAsyncSlot( "FormatWrapEditContour" ) = -1 ) then
477 printlog( "Format / Wrap / Edit Contour disabled. Good." )
479 Warnlog( "Wrap / Edit Contour should not be enabled for frames" )
481 Kontext "KonturEditor"
482 if ( KonturEditor.exists( 2 ) ) then
485 warnlog( "Slot <FormatWrapEditContour> is enabled but doesn't trigger the dialog" )
490 if ( Active.Exists( 2 ) ) then
491 qaerrorlog( "JSK: Undocumented active handled silently - fix it" )
495 printlog " Close active document"
500 '-----------------------------------------------------------
503 PrintLog "- Format / Line in drawing object"
504 if gApplication = "HTML" then
505 printlog "Not in WriterWeb!"
509 printlog " Open new document"
511 printlog " Insert a rectangle"
512 Call wRectangleToClipboard
514 printlog " Edit / Paste"
515 hUseAsyncSlot( "EditPaste" )
517 printlog " Format / Line"
518 if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then
519 Warnlog "Clipboard problem between applications!"
520 Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
521 Call gMouseClick ( 45, 45 )
522 if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then
523 warnlog( "Failed to execute slot <FormatLine>" )
528 printlog " Step through all tabpages"
530 active.SetPage TabLinie
533 Call DialogTest ( TabLinie )
536 active.SetPage TabLinienstile
538 kontext "TabLinienstile"
539 Call DialogTest ( TabLinienstile )
543 Call DialogTest ( NameDlg )
546 Warnlog "Modify is disabled!"
547 if Linienstil.GetItemCount = 0 then
548 Warnlog "List of 'Line styles is empty! (Bug#99882)"
553 active.SetPage TabLinienenden
556 if Linienstil.Exists then
557 Warnlog "Messagebox appears changing to Tabpage 'Arrow Styles!"
560 kontext "TabLinienenden"
562 Call DialogTest ( TabLinienenden )
567 Call DialogTest ( NameDlg )
571 kontext "TabLinienenden"
572 printlog " Close dialog"
573 TabLinienenden.cancel
574 printlog " Close active document"
578 '-----------------------------------------------------------
582 PrintLog "- Format / Area in drawing object"
583 if gApplication = "HTML" then
584 printlog "Not in WriterWeb!"
588 printlog " Open new document"
590 printlog " Insert a rectangle"
591 Call wRectangleToClipboard
593 hUseAsyncSlot( "EditPaste" )
595 printlog " Format / Area"
596 if ( hUseAsyncSlot( "FormatArea" ) = -1 ) then
597 Warnlog "Clipboard problem between applications!"
598 Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
599 Call gMouseClick ( 45, 45 )
605 printlog " Step through all tabpages"
606 active.SetPage TabArea
610 Call DialogTest ( TabArea, i )
613 active.SetPage TabSchatten
614 kontext "TabSchatten"
616 Call DialogTest ( TabSchatten )
619 active.SetPage TabTransparenz
620 kontext "TabTransparenz"
621 Call DialogTest ( TabTransparenz )
624 active.SetPage TabFarben
628 Call DialogTest ( TabFarben )
633 if ( FarbeDlg.exists( 1 ) ) then
634 Call DialogTest ( FarbeDlg )
638 warnlog( "Dialog <FarbeDlg> is not available" )
642 active.SetPage TabFarbverlaeufe
643 kontext "TabFarbverlaeufe"
644 Call DialogTest ( TabFarbverlaeufe )
647 Call DialogTest ( NameDlg )
651 active.SetPage TabSchraffuren
652 kontext "TabSchraffuren"
653 Call DialogTest ( TabSchraffuren)
657 Warnlog "Button 'Modify' does not work!"
658 if Tabelle.GetItemcount = 0 then
659 Warnlog "Table of Hatching's is empty! (Bug#99882)"
664 if ( NameDlg.exists( 1 ) ) then
665 Call DialogTest ( NameDlg )
668 warnlog( "Dialog <NameDlg> is not available" )
672 active.SetPage TabBitmap
674 Call DialogTest ( TabBitmap )
679 WarnLog "#36902#Modify is disabled. Wrong default-list loaded"
683 if ( NameDlg.exists( 1 ) ) then
684 Call DialogTest ( NameDlg )
687 warnlog( "Dialog <NameDlg> is not available" )
692 Kontext "GrafikEinfuegenDlg"
693 if ( GrafikEinfuegenDlg.exists( 1 ) ) then
694 Call DialogTest ( GrafikEinfuegenDlg )
695 GrafikEinfuegenDlg.Cancel
697 warnlog( "Dialog <GrafikEinfuegenDlg> is not available" )
700 printlog " Close Tabdialog"
703 printlog " Close active document"
707 '-----------------------------------------------------------
710 PrintLog "- Format / Text in drawing object"
711 if gApplication = "HTML" then
712 printlog "Not in WriterWeb!"
716 printlog " Open new document"
718 printlog " Paste a rectangle from draw via clipboard"
719 Call wRectangleToClipboard
724 printlog " Format / Text"
727 Warnlog "Clipboard problem between applications!"
728 Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
729 Call gMouseClick ( 45, 45 )
734 printlog " Step through all tabpages"
736 Active.SetPage TabText
738 DialogTest ( TabText )
741 Active.SetPage TabLauftext
742 Kontext "TabLauftext"
743 DialogTest ( TabLauftext )
745 printlog " Close dialog"
747 printlog " Close active document"
751 '-----------------------------------------------------------
753 testcase tFormatPositionAndSize
754 PrintLog "- Format / Position and Size in drawing object"
755 if gApplication = "HTML" then
756 printlog "Not in WriterWeb!"
760 printlog " Open new document"
762 printlog " Paste a rectangle from draw via clipboard"
763 Call wRectangleToClipboard
764 hUseAsyncSlot( "EditPaste" )
766 printlog " Format Position and Size"
767 if ( hUseAsyncSlot( "ContextPositionAndSize" ) = -1 ) then
768 Warnlog "Clipboard problem between applications!"
769 Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
770 Call gMouseClick ( 45, 45 )
771 if ( hUseAsyncSlot( "ContextPositionAndSize" ) = -1 ) then
772 warnlog( "Failed to execute slot <ContextPositionAndSize>" )
776 printlog " Step through all tabpages"
778 active.setpage TabPositionAndSizeWriter
779 Kontext "TabPositionAndSizeWriter"
780 call Dialogtest ( TabPositionAndSizeWriter )
783 active.setPage TabDrehung
785 call Dialogtest ( TabDrehung )
788 active.setpage TabSchraegstellen
789 Kontext "TabSchraegstellen"
790 call Dialogtest ( TabSchraegstellen )
791 printlog " Close dialog"
792 TabSchraegstellen.cancel
794 printlog " Close active document"
798 '-----------------------------------------------------------
802 PrintLog "- Format / Flip drawing objects"
803 if gApplication = "HTML" then
804 printlog "Not in WriterWeb!"
808 printlog " Open new document"
811 printlog " Paste a rectangle from draw via clipboard"
812 Call wRectangleToClipboard
813 hUseAsyncSlot( "EditPaste" )
815 printlog " Format / Flip vertically"
816 if ( hUseAsyncSlot( "FormatFlipVertically" ) = -1 ) then
817 Warnlog "Clipboard problem between applications!"
818 Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
819 Call gMouseClick ( 45, 45 )
820 if ( hUseAsyncSlot( "FormatFlipVertically" ) = -1 ) then
821 warnlog( "Failed to execute slot <FormatFlipVertically>" )
827 printlog " Format / Flip horizontally"
828 hUseAsyncSlot( "FormatFlipHorizontally" )
829 printlog " Close active document"
833 '-----------------------------------------------------------
835 testcase tFormatArrangeArea
837 PrintLog "- Format / Arrange drawing objects"
838 if gApplication = "HTML" then
839 printlog "Not in WriterWeb!"
843 printlog " Open new document"
846 printlog " Paste a rectangle from draw via clipboard"
847 Call wRectangleToClipboard
848 hUseAsyncSlot( "EditPaste" )
850 printlog " Format / Arrange / Bring to front"
851 if ( hUseAsyncSlot( "FormatArrangeBringToFrontCalc" ) = -1 ) then
853 Warnlog "Clipboard problem between applications!"
854 Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
855 Call gMouseClick ( 45, 45 )
856 if ( hUseAsyncSlot( "FormatArrangeBringToFrontCalc" ) = -1 ) then
857 warnlog( "Failed to execute slot <FormatArrangeBringToFrontCalc>" )
862 printlog " Format / Arrange / Bring Forward"
863 FormatArrangeBringForward
865 printlog " Format / Arrange / Set backward"
866 FormatArrangeSetBackward
868 printlog " Format / Arrange / Send to back"
869 FormatArrangeSendToBack
872 printlog " Close active document"
876 '-----------------------------------------------------------
878 testcase tFormatAlignmentArea
880 PrintLog "- Format / Alignment drawing objects"
881 if gApplication = "HTML" then
882 printlog "Not in WriterWeb!"
885 printlog " Open new document"
888 printlog " Paste a rectangle from draw via clipboard"
889 Call wZeichenobjektEinfuegen ( "Rechteck", 45, 30, 55, 45 )
891 Call wObjektSelektieren ( 43, 25, 60, 50 )
894 printlog " Format / Anchor / As Character"
895 FormatAnchorAsCharacter
898 Warnlog "Anchor could not be set to character! No test!"
900 printlog " Close active document"
905 printlog " Format / Object / Alignment left"
906 FormatObjectAlignmentLeft
909 Warnlog "Format / Object / Alignment / Left could not be executed!"
913 printlog " Format / Object / Alignment centered"
914 FormatObjectAlignmentCentered
917 Warnlog "Format / Object / Alignment / Centered could not be executed!"
921 printlog " Format / Object / Alignment right"
922 FormatObjectAlignmentRight
925 Warnlog "Format / Object / Alignment / Right could not be executed!"
929 printlog " Format / Object / Alignment Top"
930 FormatObjectAlignmentTop
933 Warnlog "Format / Object / Alignment / Top could not be executed!"
937 printlog " Format / Object / Alignment Center"
938 FormatObjectAlignmentCenter
941 Warnlog "Format / Object / Alignment / Center could not be executed!"
945 printlog " Format / Object / Alignment bottom"
946 FormatObjectAlignmentBottom
949 Warnlog "Format / Object / Alignment / Bottom could not be executed!"
952 printlog " Close active document"
956 '-----------------------------------------------------------
958 testcase tFormatGroup
964 PrintLog "- Format / Group drawing objects"
966 if ( gApplication = "HTML" ) then
967 printlog "Not in WriterWeb!"
971 printlog " Open new document"
974 printlog " Insert 2 rectangles and select both"
975 if gPlatGroup <> "unx" then
976 Call wZeichenobjektEinfuegen ( "Rechteck", 25, 25, 30, 30 )
977 Call wTypeKeys ( "<Escape>" )
978 Call wZeichenobjektEinfuegen ( "Rechteck", 35, 35, 45, 45 )
979 Call wTypeKeys ( "<Escape>" )
980 Call wObjektSelektieren ( 23, 23, 50, 50 )
986 Call wZeichenobjektEinfuegen ( "Rechteck", 50, 60, 30, 30 )
987 Call wTypeKeys ( "<Escape>" )
988 Call wZeichenobjektEinfuegen ( "Rechteck", 65, 80, 45, 45 )
989 Call wTypeKeys ( "<Escape>" )
990 Call wObjektSelektieren ( 23, 23, 70, 90 )
997 printlog " Format / Group / Group"
998 if ( hUseAsyncSlot( "FormatGroupGroup" ) = -1 ) then
999 QAErrorlog "Unable to execute Format / Group / Group. Maybe objects not selected!"
1004 printlog " Format / Group / Edit Group"
1005 if ( hUseAsyncSlot( "FormatGroupEditGroupCalc" ) = -1 ) then
1006 Warnlog "Unable to execute Format / Group / Group. Maybe objects not selected!"
1011 Call wTypeKeys ( "<Shift F4>" )
1013 printlog " Format / Exit Group"
1014 if ( hUseAsyncSlot( "FormatExitGroupDraw" ) = -1 ) then
1015 Warnlog "Unable to execute Format / Group / Exit Group. Maybe objects not selected!"
1020 Call wTypeKeys ( "<Shift F4>" )
1022 printlog " Format / Ungroup"
1023 if ( hUseAsyncSlot( "FormatUngroupDraw" ) = -1 ) then
1024 Warnlog "Unable to execute Format / Group / Ungroup. Maybe objects not selected!"
1029 printlog " Close active document"
1033 '-----------------------------------------------------------
1035 testcase tFormatFontwork
1037 PrintLog "- Format / Fontwork drawing objects"
1039 if ( gApplication = "HTML" ) then
1040 printlog "Not in WriterWeb!"
1044 printlog " Open new document"
1046 printlog " Paste a rectangle from draw via clipboard"
1047 Call wRectangleToClipboard
1049 hUseAsyncSlot( "EditPaste" )
1051 printlog " Format / Font Work"
1052 if ( hUseAsyncSlot( "FormatFontWork" ) = -1 ) then
1053 Warnlog "Clipboard problem between applications!"
1054 Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
1055 Call gMouseClick ( 45, 45 )
1060 if ( Fontwork.Exists( 1 ) ) then
1061 call Dialogtest ( Fontwork )
1062 printlog " Close Fontwork dialog"
1065 Warnlog "Dialog 'Fontwork' does not exist!"
1068 printlog " Close active document"
1072 '-----------------------------------------------------------
1074 testcase tFormatPositionAndSizeLegend
1076 PrintLog "- Format / Position and Size in Legend"
1078 if ( gApplication = "HTML" ) then
1079 printlog "Not in WriterWeb!"
1083 printlog " Open new document"
1085 Kontext "NavigatorWriter"
1086 if NavigatorWriter.Exists then ViewNavigator
1088 printlog " Insert a legend"
1089 Call wZeichenobjektEinfuegen ( "Legende", 45, 35, 50, 50 )
1090 Call wTypeKeys "<ESCAPE>"
1091 Call wTypeKeys "<SHIFT F4>"
1093 Call hUseAsyncSlot( "FormatPositionAndSize" )
1095 if ( active.exists( 1 ) ) then
1096 printlog( "Dialog open. Good" )
1098 Warnlog "Format / Position and Size does not work! Maybe object not selected!"
1099 printlog " Close active document"
1104 printlog " In upcoming dialog step through all tabpages"
1106 active.setpage TabPositionAndSizeWriter
1108 Kontext "TabPositionAndSizeWriter"
1109 call Dialogtest ( TabPositionAndSizeWriter )
1112 active.setpage TabLegende
1114 Kontext "TabLegende"
1115 call Dialogtest ( TabLegende )
1117 printlog " Close dialog"
1120 printlog " Close active document"
1124 '-----------------------------------------------------------
1126 testcase tFormatStyleEdit
1128 PrintLog "- Format / Style Text objects"
1130 if ( gApplication = "HTML" ) then
1131 printlog "Not in WriterWeb !"
1135 printlog " Open new document"
1139 if Not DrawBar.Exists then
1140 Call hToolbarSelect("Drawing", true)
1143 if Drawbar.Exists then
1145 printlog " Insert a textobject from toolbar"
1148 Call gMouseMove(50, 20, 70, 40)
1149 hUseAsyncSlot( "FormatStyleBold" )
1151 printlog " Format / Style / Bold"
1152 Call wTypeKeys ("a")
1153 printlog " Format / Style / Italic"
1156 printlog " Insert a letter in text object"
1157 Call wTypeKeys ("a")
1158 printlog " Format / Style / Underline"
1159 FormatStyleUnderline
1162 printlog " Insert a letter in text object"
1163 Call wTypeKeys ("a")
1164 printlog " Format /Style / Strike through"
1166 FormatStyleStrikeThrough
1168 printlog " Insert a letter in text object"
1169 Call wTypeKeys ("b")
1170 printlog " Format / Style / Shadow"
1174 printlog " Insert a letter in text object"
1175 Call wTypeKeys ("b")
1176 printlog " Format / Style / Outline"
1180 printlog " Insert a letter in text object"
1181 Call wTypeKeys ("b")
1182 printlog " Format / Style / Superscript"
1183 FormatStyleSuperscript
1185 printlog " Insert a letter in text object"
1186 Call wTypeKeys ("a")
1187 printlog " Format / Style / Subscript "
1188 FormatStyleSubscript
1190 printlog " Insert a letter in text object"
1191 Call wTypeKeys ("a")
1195 Warnlog "#i33132#Toolbar 'Drawbar' is not opened!"
1197 printlog " Close active document"
1201 '-----------------------------------------------------------
1203 testcase tFormatAlignmentEdit
1204 PrintLog "- Format / Alignment text objects"
1205 if gApplication = "HTML" then
1206 printlog "Not in WriterWeb!"
1210 printlog " Open new document"
1212 if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
1215 printlog " Insert a textbox via 'Draw functions' toolbar"
1217 Call gMouseMove(50, 20, 70, 40)
1218 printlog " Insert some text in document"
1220 Call wTypeKeys ("Ein Wort")
1221 printlog " Format / Alignment / Left"
1222 hUseAsyncSlot( "FormatAlignmentLeftText" )
1224 printlog " Format / Alignment / Right"
1225 FormatAlignmentRightText
1227 printlog " Format / Alignment / Centered"
1228 FormatAlignmentCenteredText
1230 printlog " Format Alignment / Justify"
1231 FormatAlignmentJustifiedText
1236 printlog " Close active document"
1240 '-----------------------------------------------------------
1242 testcase tFormatLineSpacing
1243 PrintLog "- Format / Line Spacing text objects"
1244 if gApplication = "HTML" then
1245 printlog "Not in WriterWeb!"
1249 printlog " Open new document"
1251 if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
1254 printlog " In a textbox via 'Draw Functions' toolbox"
1256 Call gMouseMove(50, 20, 70, 40)
1259 printlog " Format / Spacing / Single line"
1260 Call wTypeKeys ("Hallo<Return>Andere Zeile")
1262 printlog " Format / Line Spacing / Single line"
1263 FormatLineSpacingSingleLine
1266 printlog " Format / Line Spacing / 1.5 line"
1267 FormatLineSpacing15Lines
1270 printlog " Format / Line spacing / Double"
1271 FormatLineSpacingDouble
1276 printlog " Close active document"
1281 '-----------------------------------------------------------
1283 testcase tFormatParagraphEdit
1284 PrintLog "- Format / Paragraph text objects"
1285 if gApplication = "HTML" then
1286 printlog "Not in WriterWeb!"
1290 printlog " Open new document"
1292 if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
1295 printlog " In a textbox via 'Draw Functions' toolbox"
1297 Call gMouseMove(50, 20, 70, 40)
1299 printlog " Format / Paragraph "
1300 hUseAsyncSlot( "FormatParagraph" )
1301 printlog " Step through all tabpages"
1303 Active.SetPage TabEinzuegeUndAbstaende
1304 Kontext "TabEinzuegeUndAbstaende"
1305 Call DialogTest ( TabEinzuegeUndAbstaende )
1308 Active.SetPage TabAusrichtungAbsatz
1309 Kontext "TabAusrichtungAbsatz"
1310 Call DialogTest ( TabAusrichtungAbsatz )
1313 Active.SetPage TabTabulator
1314 Kontext "TabTabulator"
1315 Call DialogTest ( TabTabulator )
1319 printlog " Close dialog"
1323 printlog " Close active document"
1327 '-----------------------------------------------------------
1329 testcase tHtmlDocFormatGraphics
1330 PrintLog "- Format / Graphics"
1333 gApplication = "HTML"
1334 printlog " Open new document"
1337 printlog " Insert a graphic (..\writer\required\input\graphics\jolink.jpg)"
1338 Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
1340 if ( hUseAsyncSlot( "FormatGraphics" ) = -1 ) then
1341 Warnlog "- Format / Graphics disabled or hidden!"
1345 printlog " Step through all tabpages"
1347 active.SetPage TabType
1349 Call DialogTest ( TabType )
1352 active.SetPage TabZusaetze
1353 Kontext "TabZusaetze"
1354 Call DialogTest ( TabZusaetze )
1357 active.SetPage TabUmlauf
1359 Call DialogTest ( TabUmlauf )
1362 active.SetPage TabHyperlinkRahmen
1363 Kontext "TabHyperlinkRahmen"
1364 Call DialogTest ( TabHyperlinkRahmen )
1367 active.SetPage TabGrafik
1369 Call DialogTest ( TabGrafik )
1372 active.SetPage TabUmrandung
1373 Kontext "TabUmrandung"
1374 Call DialogTest ( TabUmrandung )
1377 active.SetPage TabMakro
1378 ' if no JRE is installed a messagebox appears
1382 if Active.Exists then
1383 if Active.GetRT = 304 then
1384 if j = 1 then Warnlog Active.Gettext
1394 Call DialogTest ( TabMakro )
1396 printlog " Close dialog"
1399 printlog " Close active document"
1401 gApplication = "WRITER"
1404 '-----------------------------------------------------------
1406 testcase tHtmlDocFormatAlignment
1408 gApplication = "HTML"
1409 PrintLog "- Format / Alignment"
1411 printlog " Open new document"
1413 printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
1414 Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
1416 printlog " Format / Anchor / to Page"
1420 printlog " Format / Alignment / Left"
1424 Warnlog "'Alignment left' couldn't be executed!"
1428 printlog " Format / Alignment / Right"
1429 FormatAlignmentRight
1432 Warnlog "'Alignment right' couldn't be executed!"
1436 printlog " Format / Alignment / Top"
1440 Warnlog "'Alignment top' couldn't be executed!"
1444 printlog " Format / Alignment / Center"
1445 FormatAlignmentCenter
1448 Warnlog "'Alignment center' couldn't be executed!"
1452 printlog " Format / Alignment / Bottom"
1453 FormatAlignmentBottom
1456 Warnlog "'Alignment bottom' couldn't be executed!"
1459 printlog " Close active document"
1461 gApplication = "WRITER"
1464 '-----------------------------------------------------------
1466 testcase tHtmlDocFormatObject
1467 PrintLog "- Format / Object"
1470 gApplication = "HTML"
1471 printlog " Open new document"
1474 printlog " Insert a frame"
1477 printlog " Format / Frame"
1480 printlog " Step through all tabpages"
1482 active.SetPage TabType
1484 Call DialogTest ( TabType )
1487 active.SetPage TabZusaetze
1488 Kontext "TabZusaetze"
1489 Call DialogTest ( TabZusaetze )
1492 active.SetPage TabUmlauf
1494 Call DialogTest ( TabUmlauf )
1497 active.SetPage TabUmrandung
1498 Kontext "TabUmrandung"
1499 Call DialogTest ( TabUmrandung )
1502 active.SetPage TabHintergrund
1503 Kontext "TabHintergrund"
1504 Call DialogTest ( TabHintergrund )
1506 printlog " Close dialog"
1507 TabHintergrund.Cancel
1509 printlog " Close active document"
1511 gApplication = "WRITER"
1514 '-----------------------------------------------------------