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: w_textframes4.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:38:00 $
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 : helge.delfs@sun.com
36 '* short description : Test of textframe - 4
38 '\***********************************************************************
41 Call tTextframes_49 ''Follow text flow' should be OFF by default
42 Call tTextframes_50 ''Follow text flow' should be ON if document is older than StarOffice 8
43 Call tTextframes_51 ''Follow text flow' should be OFF when wrapping mode is 'in front of text'
44 Call tTextframes_52 ''Follow text flow' should be OFF when wrapping mode is 'behind text'
45 Call tTextframes_53 ''Follow text flow' should be OFF when wrapping mode is 'tight'
46 Call tTextframes_54 ''Follow text flow' should be ON when wrapping mode is 'square'
47 Call tTextframes_55 'Exceeding layout environment at the bottom - 'Follow text flow'(ON , page area)
48 Call tTextframes_56 'Exceeding layout environment at the bottom - 'Follow text flow'(OFF, page area)
49 Call tTextframes_57 'Exceeding layout environment at the bottom - 'Follow text flow'(ON , header)
50 Call tTextframes_58 'Exceeding layout environment at the bottom - 'Follow text flow'(OFF, header)
51 Call tTextframes_59 'Exceeding layout environment at the bottom - 'Follow text flow'(ON , table)
52 Call tTextframes_60 'Exceeding layout environment at the bottom - 'Follow text flow'(OFF, table)
53 Call tTextframes_61 'Exceeding layout environment at the top - 'Follow text flow'(ON , footer)
54 Call tTextframes_62 'Exceeding layout environment at the top - 'Follow text flow'(OFF, footer)
55 Call tTextframes_63 'Exceeding layout environment at the left - 'Follow text flow'(ON , table)
56 Call tTextframes_64 'Exceeding layout environment at the left - 'Follow text flow'(OFF, table)
57 Call tTextframes_65 'Exceeding layout environment at the left - 'Follow text flow'(ON , Frame)
58 Call tTextframes_66 'Exceeding layout environment at the left - 'Follow text flow'(OFF, Frame)
59 Call tTextframes_67 'Exceeding layout environment at the right - 'Follow text flow'(ON , table)
60 Call tTextframes_68 'Exceeding layout environment at the right - 'Follow text flow'(OFF, table)
61 Call tTextframes_69 'Exceeding layout environment at the right - 'Follow text flow'(ON , Frame)
62 Call tTextframes_70 'Exceeding layout environment at the right - 'Follow text flow'(OFF, Frame)
65 '---------------------------------------------------
67 testcase tTextframes_49
69 printlog "- 'Follow text flow' should be OFF by default"
70 '/// 'Follow text flow' should be OFF by default
77 '/// Format/Frame / Type ,
78 '/// + Check box 'Follow text flow' should be OFF
79 Call fFormatFrame("TabType")
80 if FollowTextflow.IsChecked then
81 Warnlog "'Follow text flow' should be turned off!"
89 '-----------------------------------------------------------------
91 testcase tTextframes_50
93 Dim sTestFile as String
95 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frame.sxw")
97 printlog "- 'Follow text flow' should be ON if document is older than StarOffice 8"
98 '/// Follow text flow' should be ON if document is older than StarOffice 8
102 '/// Open a test file , which includes a frame and
103 '/// + it is StarOffice 7 format
104 Call hFileOpen(sTestFile,false)
105 Call sMakeReadOnlyDocumentEditable
107 '/// Set focus to frame
108 Call wTypeKeys ( "<Shift F4>" )
111 '/// Format/Frame / Type ,
112 '/// + Check box 'Follow text flow' should be ON
113 Call fFormatFrame("TabType")
114 if NOT FollowTextflow.IsChecked then
115 Warnlog "'Follow text flow' should be turned on!"
119 printlog " Close active document "
120 Do Until GetDocumentCount = 0
126 '-----------------------------------------------------------------
128 testcase tTextframes_51
130 Dim sTestFile as String
132 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\inFrontText.doc")
134 printlog "- 'Follow text flow' should be OFF when wrapping mode is 'in front of text'"
135 '/// 'Follow text flow' should be OFF when wrapping mode is 'in front of text'
139 '/// Open a test file , which is a Word file and includes
140 '/// + a frame that is in 'in front of text' mode
141 Call hFileOpen(sTestFile,false)
142 Call sMakeReadOnlyDocumentEditable
144 '/// Set focus to frame
145 Call wTypeKeys ( "<Shift F4>" )
148 '/// Format/Frame / Type ,
149 '/// + Check box 'Follow text flow' should be OFF
150 Call fFormatFrame("TabType")
151 if FollowTextflow.IsChecked then
152 Warnlog "'Follow text flow' should be turned off!"
156 printlog " Close active document "
157 Do Until GetDocumentCount = 0
163 '-----------------------------------------------------------------
165 testcase tTextframes_52
167 Dim sTestFile as String
169 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\behindText.doc")
171 printlog "- 'Follow text flow' should be OFF when wrapping mode is 'behind text'"
172 '/// 'Follow text flow' should be OFF when wrapping mode is 'behind text'
176 '/// Open a test file , which is a Word file and includes
177 '/// + a frame that is in 'behind text' mode
178 Call hFileOpen(sTestFile,false)
179 Call sMakeReadOnlyDocumentEditable
181 '/// Set focus to the frame
182 Call wTypeKeys ( "<Shift F4>" )
185 '/// Format/Frame / Type ,
186 '/// + Check box 'Follow text flow' should be OFF
187 Call fFormatFrame("TabType")
188 if FollowTextflow.IsChecked then
189 Warnlog "'Follow text flow' should be turned off!"
193 printlog " Close active document "
194 Do Until GetDocumentCount = 0
200 '-----------------------------------------------------------------
202 testcase tTextframes_53
204 Dim sTestFile as String
206 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\tight.doc")
208 printlog "- 'Follow text flow' should be OFF when wrapping mode is 'tight'"
209 '/// 'Follow text flow' should be OFF when wrapping mode is 'tight'
213 '/// Open a test file , which is a Word file and includes
214 '/// + a frame that is in 'tight' mode
215 Call hFileOpen(sTestFile,false)
216 Call sMakeReadOnlyDocumentEditable
218 '/// Set focus to the frame
219 Call wTypeKeys ( "<Shift F4>" )
222 '/// Format/Frame / Type ,
223 '/// + Check box 'Follow text flow' should be OFF
224 Call fFormatFrame("TabType")
225 if FollowTextflow.IsChecked then
226 Warnlog "'Follow text flow' should be turned off!"
230 printlog " Close active document "
231 Do Until GetDocumentCount = 0
237 '-----------------------------------------------------------------
239 testcase tTextframes_54
241 Dim sTestFile as String
243 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\square.doc")
245 printlog "- 'Follow text flow' should be OFF when wrapping mode is 'square'"
246 '/// 'Follow text flow' should be OFF when wrapping mode is 'square'
250 '/// Open a test file , which is a Word file and includes
251 '/// + a frame that is in 'square' mode
252 Call hFileOpen(sTestFile,false)
253 Call sMakeReadOnlyDocumentEditable
255 '/// Set focus to the frame
256 Call wTypeKeys ( "<Shift F4>" )
259 '/// Format/Frame / Type ,
260 '/// + Check box 'Follow text flow' should be OFF
261 Call fFormatFrame("TabType")
262 if FollowTextflow.IsChecked then
263 Warnlog "'Follow text flow' should be turned off!"
267 printlog " Close active document "
268 Do Until GetDocumentCount = 0
274 '-----------------------------------------------------------------
276 testcase tTextframes_55
278 Dim iVertical as Integer
279 Dim sVerticalBy as String
281 iVertical = 4 'From top
284 printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(ON , page area)"
285 '/// Exceeding layout environment at the bottom - 'Follow text flow'(ON , page area)
289 '/// Insert/Frame / Type ,
290 '/// + Select 'from top' in Vertical ,
291 '/// + Set 50cm in vertical by area
292 '/// + Check 'Follow text flow'
295 Active.Setpage TabType
297 Vertical.Select iVertical
299 VerticalBy.SetText sVerticalBy
304 '/// Check if the frame is in 2nd page
307 Kontext "NavigatorWriter"
309 if Seitennummer.GetText <> "2" then
310 Warnlog "The test frame isn't in the second page!"
319 '-----------------------------------------------------------------
321 testcase tTextframes_56
323 Dim iVertical as Integer
324 Dim sVerticalBy as String
326 iVertical = 4 'From top
329 printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(OFF , page area)"
330 '/// Exceeding layout environment at the bottom - 'Follow text flow'(OFF , page area)
334 '/// Insert/Frame / Type ,
335 '/// + Select 'from top' in Vertical ,
336 '/// + Set 50cm in vertical by area
337 '/// + UnCheck 'Follow text flow'
340 Active.Setpage TabType
342 Vertical.Select iVertical
344 VerticalBy.SetText sVerticalBy
346 FollowTextflow.UnCheck
349 '/// Check if the frame is in 1st page
352 Kontext "NavigatorWriter"
354 if Seitennummer.GetText <> "1" then
355 Warnlog "The test frame isn't in the first page!"
364 '-----------------------------------------------------------------
366 testcase tTextframes_57
368 Dim sTestFile as String
369 Dim iVertical as Integer
370 Dim sVerticalBy as String
371 Dim sPositionY1 as String
372 Dim sPositionY2 as String
374 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInHeader.sxw")
375 iVertical = 4 'From top
378 printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(ON , header)"
379 '/// Exceeding layout environment at the bottom - 'Follow text flow'(ON , header)
383 '/// Open a test file , which includes a frame in header and
384 '/// + a picture which is anchored to frame
385 Call hFileOpen(sTestFile,false)
386 Call sMakeReadOnlyDocumentEditable
388 'Set focus to the picture
389 Call wTypeKeys ( "<Shift F4>" )
391 Call wTypeKeys "<Tab>"
394 'Get the pic Y position
398 Call fPositionAndSize("TabPositionAndSizeWriter")
399 sPositionY1 = Verticalby.Gettext
400 TabPositionAndSizeWriter.Cancel
405 '/// Set focus to the frame
406 Call wTypeKeys "<Tab>"
409 '/// Format/Frame / Type ,
410 '/// + Check box 'Follow text flow'
411 '/// + set a much bigger values in from top
412 Call fFormatFrame("TabType")
414 Vertical.Select iVertical
416 VerticalBy.SetText sVerticalBy
420 'Set focus to picture
421 Call wTypeKeys "<Tab>"
424 'Get the pic Y position
427 Call fPositionAndSize("TabPositionAndSizeWriter")
428 sPositionY2 = Verticalby.Gettext
429 TabPositionAndSizeWriter.Cancel
431 '/// Check if frame is still in the header
432 if fCalculateTolerance( sPositionY1, sPositionY2) > 0.3 then
433 Warnlog "Something is wrong ! Perhaps the frame isn't in the header!"
436 printlog " Close active document "
437 Do Until GetDocumentCount = 0
443 '-----------------------------------------------------------------
445 testcase tTextframes_58
447 Dim sTestFile as String
448 Dim iVertical as Integer
449 Dim sVerticalBy as String
450 Dim sPositionY1 as String
451 Dim sPositionY2 as String
453 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInHeader.sxw")
454 iVertical = 4 'From top
457 printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(OFF , header)"
458 '/// Exceeding layout environment at the bottom - 'Follow text flow'(OFF , header)
462 '/// Open a test file , which includes a frame in header and
463 '/// + a picture which is anchored to frame
464 Call hFileOpen(sTestFile,false)
465 Call sMakeReadOnlyDocumentEditable
467 'Set focus to the picture
468 Call wTypeKeys ( "<Shift F4>" )
470 Call wTypeKeys "<Tab>"
473 'Get the pic Y position
476 Call fPositionAndSize("TabPositionAndSizeWriter")
477 sPositionY1 = Verticalby.Gettext
478 TabPositionAndSizeWriter.Cancel
483 '/// Set focus to the frame
484 Call wTypeKeys "<Tab>"
487 '/// Format/Frame / Type ,
488 '/// + UnCheck box 'Follow text flow'
489 '/// + set a much bigger values in from top
490 Call fFormatFrame("TabType")
491 FollowTextflow.UnCheck
492 Vertical.Select iVertical
494 VerticalBy.SetText sVerticalBy
498 'Set focus to picture
499 Call wTypeKeys "<Tab>"
502 'Get the pic Y position
505 Call fPositionAndSize("TabPositionAndSizeWriter")
506 sPositionY2 = Verticalby.Gettext
507 TabPositionAndSizeWriter.Cancel
509 '/// Check if frame is still in the header
510 if fCalculateTolerance( sPositionY1, sPositionY2 ) < 18 then
511 Warnlog "Something is wrong ! Perhaps the frame is still in the header!"
514 printlog " Close active document "
515 Do Until GetDocumentCount = 0
521 '-----------------------------------------------------------------
523 testcase tTextframes_59
525 Dim sTestFile as String
526 Dim sPositionY1 as String
527 Dim sPositionY2 as String
529 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
531 printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(ON , table)"
532 '/// Exceeding layout environment at the bottom - 'Follow text flow'(ON , table)
536 '/// Open a test file , which includes a frame in table and
537 '/// + a picture which is anchored to frame
538 Call hFileOpen(sTestFile,false)
539 Call sMakeReadOnlyDocumentEditable
541 'Set focus to the picture
542 Call wTypeKeys ( "<Shift F4>" )
544 Call wTypeKeys ( "<Tab>" )
549 'Get the pic Y position
551 Call fFormatGraphic("TabType")
552 sPositionY1 = Verticalby.Gettext
555 '/// Set focus to the frame
556 Call wTypeKeys "<Tab>"
559 '/// Format/Frame / Type ,
560 '/// + Check box 'Follow text flow'
561 '/// + set a much bigger values in from top
562 Call fFormatFrame("TabType")
566 VerticalBy.SetText "50"
570 'Set focus to picture
571 Call wTypeKeys "<Tab>"
574 'Get the pic Y position
576 Call fFormatGraphic("TabType")
577 sPositionY2 = Verticalby.Gettext
580 '/// Check if frame is still in the table
581 if fCalculateTolerance( sPositionY1, sPositionY2) > 0.3 then
582 Warnlog "Something is wrong ! Perhaps the frame isn't in the table!"
586 Call wTypeKeys "<Tab>"
589 'if the frame is in the table, the focus should be in the table
590 Call wTypeKeys "<ESCape>"
594 Call fFormatTable("TabTabelle")
597 Warnlog "The frame isn't in the table!"
600 printlog " Close active document "
601 Do Until GetDocumentCount = 0
607 '-----------------------------------------------------------------
609 testcase tTextframes_60
611 Dim sTestFile as String
612 Dim sPositionY1 as String
613 Dim sPositionY2 as String
615 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
617 printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(OFF , table)"
618 '/// Exceeding layout environment at the bottom - 'Follow text flow'(OFF , table)
622 '/// Open a test file , which includes a frame in table and
623 '/// + a picture which is anchored to frame
624 Call hFileOpen(sTestFile,false)
625 Call sMakeReadOnlyDocumentEditable
627 'Set focus to the frame
628 Call wTypeKeys ( "<Shift F4>" )
631 printlog "Move the frame into the document-area."
632 Call wTypeKeys "<RIGHT>",10
633 Call wTypeKeys "<DOWN>",7
635 'Set focus to the picture
636 Call wTypeKeys ( "<Tab>" )
638 'Get the pic Y position
640 Call fFormatGraphic("TabType")
641 sPositionY1 = Verticalby.Gettext
647 '/// Set focus to the frame
648 Call wTypeKeys "<Tab>"
651 '/// Format/Frame / Type ,
652 '/// + UnCheck box 'Follow text flow'
653 '/// + set a much bigger values in from top
654 Call fFormatFrame("TabType")
655 FollowTextflow.UnCheck
662 'Set focus to picture
663 Call wTypeKeys "<Tab>"
666 'Get the pic Y position
668 Call fFormatGraphic("TabType")
669 sPositionY2 = Verticalby.Gettext
672 '/// Check if frame is still in the table
673 if fCalculateTolerance( sPositionY1, sPositionY2) <> 0 then
674 Warnlog "Something is wrong ! Perhaps the frame is still in the table!"
678 Call wTypeKeys "<Tab>"
681 'if the frame is in the table, the focus should be in the table
682 Call wTypeKeys "<ESCape>"
686 Call fFormatTable("TabTabelle")
688 Warnlog "The frame should be in the table!"
692 printlog " Close active document "
693 Do Until GetDocumentCount = 0
699 '-----------------------------------------------------------------
701 testcase tTextframes_61
703 Dim sTestFile as String
704 Dim iVertical as Integer
705 Dim sVerticalBy as String
706 Dim sPositionY1 as String
707 Dim sPositionY2 as String
709 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFooter.sxw")
710 iVertical = 4 'From top
713 printlog "- Exceeding layout environment at the top - 'Follow text flow'(ON , footer)"
714 '/// Exceeding layout environment at the top - 'Follow text flow'(ON , footer)
718 '/// Open a test file , which includes a frame in footer and
719 '/// + a picture which is anchored to frame
720 Call hFileOpen(sTestFile,false)
721 Call sMakeReadOnlyDocumentEditable
723 'Set focus to the picture
724 Call wTypeKeys ( "<Shift F4>" )
726 Call wTypeKeys "<Tab>"
729 'Get the pic Y position
732 Call fPositionAndSize("TabPositionAndSizeWriter")
733 sPositionY1 = Verticalby.Gettext
734 TabPositionAndSizeWriter.Cancel
739 '/// Set focus to the frame
740 Call wTypeKeys "<Tab>"
743 '/// Format/Frame / Type ,
744 '/// + Check box 'Follow text flow'
745 '/// + set a much bigger values in from top
746 Call fFormatFrame("TabType")
748 Vertical.Select iVertical
750 VerticalBy.SetText sVerticalBy
754 'Set focus to picture
755 Call wTypeKeys "<Tab>"
758 'Get the pic Y position
761 Call fPositionAndSize("TabPositionAndSizeWriter")
762 sPositionY2 = Verticalby.Gettext
763 TabPositionAndSizeWriter.Cancel
765 '/// Check if frame is still in the header
766 if fCalculateTolerance( sPositionY1, sPositionY2) > 0.8 then
767 Warnlog "Something is wrong ! Perhaps the frame isn't in the footer!"
770 printlog " Close active document "
771 Do Until GetDocumentCount = 0
777 '-----------------------------------------------------------------
779 testcase tTextframes_62
781 Dim sTestFile as String
782 Dim iVertical as Integer
783 Dim sVerticalBy as String
784 Dim sPositionY1 as String
785 Dim sPositionY2 as String
787 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFooter.sxw")
788 iVertical = 4 'From top
791 printlog "- Exceeding layout environment at the top - 'Follow text flow'(OFF , footer)"
792 '/// Exceeding layout environment at the top - 'Follow text flow'(OFF , footer)
796 '/// Open a test file , which includes a frame in footer and
797 '/// + a picture which is anchored to frame
798 Call hFileOpen(sTestFile,false)
799 Call sMakeReadOnlyDocumentEditable
801 'Set focus to the picture
802 Call wTypeKeys ( "<Shift F4>" )
804 Call wTypeKeys "<Tab>"
807 'Get the pic Y position
810 Call fPositionAndSize("TabPositionAndSizeWriter")
811 sPositionY1 = Verticalby.Gettext
812 TabPositionAndSizeWriter.Cancel
817 '/// Set focus to the frame
818 Call wTypeKeys "<Tab>"
821 '/// Format/Frame / Type ,
822 '/// + UnCheck box 'Follow text flow'
823 '/// + set a much bigger values in from top
824 Call fFormatFrame("TabType")
825 FollowTextflow.UnCheck
826 Vertical.Select iVertical
828 VerticalBy.SetText sVerticalBy
832 'Set focus to picture
833 Call wTypeKeys "<Tab>"
836 'Get the pic Y position
839 Call fPositionAndSize("TabPositionAndSizeWriter")
840 sPositionY2 = Verticalby.Gettext
841 TabPositionAndSizeWriter.Cancel
843 '/// Check if frame is still in the header
844 if fCalculateTolerance( sPositionY1, sPositionY2 ) < 18 then
845 Warnlog "Something is wrong ! Perhaps the frame is still in the footer!"
848 printlog " Close active document "
849 Do Until GetDocumentCount = 0
855 '-----------------------------------------------------------------
857 testcase tTextframes_63
859 Dim sTestFile as String
860 Dim iHorizontal as Integer
861 Dim sHorizontalBy as String
862 Dim sPositionX1 as String
863 Dim sPositionX2 as String
865 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
866 iHorizontal = 4 'From Left
867 sHorizontalBy = "-50"
869 printlog "- Exceeding layout environment at the left - 'Follow text flow'(ON , table)"
870 '/// Exceeding layout environment at the left - 'Follow text flow'(ON , table)
874 '/// Open a test file , which includes a frame in table and
875 '/// + a picture which is anchored to frame
876 Call hFileOpen(sTestFile,false)
877 Call sMakeReadOnlyDocumentEditable
879 'Set focus to the picture
880 Call wTypeKeys ( "<Shift F4>" )
882 Call wTypeKeys ( "<Tab>" )
884 'Get the pic X position
886 Call fFormatGraphic("TabType")
887 sPositionX1 = Horizontalby.Gettext
893 '/// Set focus to the frame
894 Call wTypeKeys "<Tab>"
897 '/// Format/Frame / Type ,
898 '/// + Check box 'Follow text flow'
899 '/// + set a much bigger values in from left
900 Call fFormatFrame("TabType")
902 Horizontal.Select iHorizontal
904 HorizontalBy.SetText sHorizontalBy
908 'Set focus to picture
909 Call wTypeKeys "<Tab>"
912 'Get the pic X position
914 Call fFormatGraphic("TabType")
915 sPositionX2 = Horizontalby.Gettext
918 '/// Check if frame is still in the table
919 if fCalculateTolerance( sPositionX1, sPositionX2) > 0.3 then
920 Warnlog "Something is wrong ! Perhaps the frame isn't in the table!"
924 Call wTypeKeys "<Tab>"
927 'if the frame is in the table, the focus should be in the table
928 Call wTypeKeys "<ESCape>"
932 Call fFormatTable("TabTabelle")
935 Warnlog "The frame isn't in the table!"
938 printlog " Close active document "
939 Do Until GetDocumentCount = 0
945 '-----------------------------------------------------------------
947 testcase tTextframes_64
949 Dim sTestFile as String
950 Dim iHorizontal as Integer
951 Dim sHorizontalBy as String
952 Dim sPositionX1 as String
953 Dim sPositionX2 as String
955 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
956 iHorizontal = 4 'From Left
957 sHorizontalBy = "-50"
959 printlog "- Exceeding layout environment at the left - 'Follow text flow'(OFF , table)"
960 '/// Exceeding layout environment at the left - 'Follow text flow'(OFF , table)
964 '/// Open a test file , which includes a frame in table and
965 '/// + a picture which is anchored to frame
966 Call hFileOpen(sTestFile,false)
967 Call sMakeReadOnlyDocumentEditable
969 'Set focus to the picture
970 Call wTypeKeys ( "<Shift F4>" )
972 Call wTypeKeys ( "<Tab>" )
974 'Get the pic Y position
976 Call fFormatGraphic("TabType")
977 sPositionX1 = Horizontalby.Gettext
983 '/// Set focus to the frame
984 Call wTypeKeys "<Tab>"
987 '/// Format/Frame / Type ,
988 '/// + UnCheck box 'Follow text flow'
989 '/// + set a much bigger values in from left
990 Call fFormatFrame("TabType")
991 FollowTextflow.UnCheck
992 Horizontal.Select iHorizontal
994 HorizontalBy.SetText sHorizontalBy
998 'Set focus to picture
999 Call wTypeKeys "<Tab>"
1002 'Get the pic X position
1004 Call fFormatGraphic("TabType")
1005 sPositionX2 = Horizontalby.Gettext
1008 '/// Check if frame is still in the table
1009 if fCalculateTolerance( sPositionX1, sPositionX2) <> 0 then
1010 Warnlog "Something is wrong ! Perhaps the frame is still in the table!"
1014 Call wTypeKeys "<Tab>"
1017 'if the frame is in the table, the focus should be in the table
1018 Call wTypeKeys "<ESCape>"
1022 Call fFormatTable("TabTabelle")
1024 Warnlog "The frame shouldn't in the table!"
1028 printlog " Close active document "
1029 Do Until GetDocumentCount = 0
1035 '-----------------------------------------------------------------
1037 testcase tTextframes_65
1039 Dim sTestFile as String
1040 Dim iHorizontal as Integer
1041 Dim sHorizontalBy as String
1042 Dim sPositionX1 as String
1043 Dim sPositionX2 as String
1045 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
1046 iHorizontal = 4 'From Left
1047 sHorizontalBy = "-50"
1049 printlog "- Exceeding layout environment at the left - 'Follow text flow'(ON , Frame)"
1050 '/// Exceeding layout environment at the left - 'Follow text flow'(ON , Frame)
1054 '/// Open a test file , which includes 2 frames ,
1055 '/// Frame A is anchored Frame B
1056 '/// + a picture which is anchored to Frame A
1057 Call hFileOpen(sTestFile,false)
1058 Call sMakeReadOnlyDocumentEditable
1060 'Set focus to the picture
1061 Call wTypeKeys ( "<Shift F4>" )
1063 Call wTypeKeys "<Tab>"
1066 'Get the pic X position
1069 Call fPositionAndSize("TabPositionAndSizeWriter")
1070 sPositionX1 = Horizontalby.Gettext
1071 TabPositionAndSizeWriter.Cancel
1076 '/// Set focus to the frame
1077 Call wTypeKeys "<Tab>" , 2
1080 '/// Format/Frame / Type ,
1081 '/// + Check box 'Follow text flow'
1082 '/// + set a much bigger values in from left
1083 Call fFormatFrame("TabType")
1084 FollowTextflow.Check
1085 Horizontal.Select iHorizontal
1087 HorizontalBy.SetText sHorizontalBy
1091 'Set focus to picture
1092 Call wTypeKeys "<Tab>"
1095 'Get the pic X position
1098 Call fPositionAndSize("TabPositionAndSizeWriter")
1099 sPositionX2 = Horizontalby.Gettext
1100 TabPositionAndSizeWriter.Cancel
1102 '/// Check if frame is still in the frame
1103 if fCalculateTolerance( sPositionX1, sPositionX2) > 0.5 then
1104 Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
1107 printlog " Close active document "
1108 Do Until GetDocumentCount = 0
1114 '-----------------------------------------------------------------
1116 testcase tTextframes_66
1118 Dim sTestFile as String
1119 Dim iHorizontal as Integer
1120 Dim sHorizontalBy as String
1121 Dim sPositionX1 as String
1122 Dim sPositionX2 as String
1124 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
1125 iHorizontal = 4 'From Left
1126 sHorizontalBy = "-50"
1128 printlog "- Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)"
1129 '/// Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)
1133 '/// Open a test file , which includes 2 frames ,
1134 '/// Frame A is anchored Frame B
1135 '/// + a picture which is anchored to Frame A
1136 Call hFileOpen(sTestFile,false)
1137 Call sMakeReadOnlyDocumentEditable
1139 'Set focus to the picture
1140 Call wTypeKeys ( "<Shift F4>" )
1142 Call wTypeKeys "<Tab>"
1145 'Get the pic X position
1148 Call fPositionAndSize("TabPositionAndSizeWriter")
1149 sPositionX1 = Horizontalby.Gettext
1150 TabPositionAndSizeWriter.Cancel
1155 '/// Set focus to the frame
1156 Call wTypeKeys "<Tab>" , 2
1159 '/// Format/Frame / Type ,
1160 '/// + UnCheck box 'Follow text flow'
1161 '/// + set a much bigger values in from left
1162 Call fFormatFrame("TabType")
1163 FollowTextflow.UnCheck
1164 Horizontal.Select iHorizontal
1166 HorizontalBy.SetText sHorizontalBy
1170 'Set focus to picture
1171 Call wTypeKeys "<Tab>"
1174 'Get the pic X position
1177 Call fPositionAndSize("TabPositionAndSizeWriter")
1178 sPositionX2 = Horizontalby.Gettext
1179 TabPositionAndSizeWriter.Cancel
1181 '/// Check if frame is still in the frame
1182 if fCalculateTolerance( sPositionX1, sPositionX2) > 0.5 then
1183 Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
1186 printlog " Close active document "
1187 Do Until GetDocumentCount = 0
1193 '-----------------------------------------------------------------
1195 testcase tTextframes_67
1197 Dim sTestFile as String
1198 Dim iHorizontal as Integer
1199 Dim sHorizontalBy as String
1200 Dim sPositionX1 as String
1201 Dim sPositionX2 as String
1203 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
1204 iHorizontal = 4 'From Left
1205 sHorizontalBy = "50"
1207 printlog "- Exceeding layout environment at the right - 'Follow text flow'(ON , table)"
1208 '/// Exceeding layout environment at the right - 'Follow text flow'(ON , table)
1212 '/// Open a test file , which includes a frame in table and
1213 '/// + a picture which is anchored to frame
1214 Call hFileOpen(sTestFile,false)
1215 Call sMakeReadOnlyDocumentEditable
1217 'Set focus to the picture
1218 Call wTypeKeys ( "<Shift F4>" )
1220 Call wTypeKeys ( "<Tab>" )
1222 'Get the pic X position
1224 Call fFormatGraphic("TabType")
1225 sPositionX1 = Horizontalby.Gettext
1231 '/// Set focus to the frame
1232 Call wTypeKeys "<Tab>"
1235 '/// Format/Frame / Type ,
1236 '/// + Check box 'Follow text flow'
1237 '/// + set a much bigger values in from left
1238 Call fFormatFrame("TabType")
1239 FollowTextflow.Check
1240 Horizontal.Select iHorizontal
1242 HorizontalBy.SetText sHorizontalBy
1246 'Set focus to picture
1247 Call wTypeKeys "<Tab>"
1250 'Get the pic X position
1252 Call fFormatGraphic("TabType")
1253 sPositionX2 = Horizontalby.Gettext
1256 '/// Check if frame is still in the table
1257 if fCalculateTolerance( sPositionX1, sPositionX2) > 1 then
1258 Warnlog "Something is wrong ! Perhaps the frame isn't in the table!"
1262 Call wTypeKeys "<Tab>"
1265 'if the frame is in the table, the focus should be in the table
1266 Call wTypeKeys "<ESCape>"
1270 Call fFormatTable("TabTabelle")
1273 Warnlog "The frame isn't in the table!"
1276 printlog " Close active document "
1277 Do Until GetDocumentCount = 0
1283 '-----------------------------------------------------------------
1285 testcase tTextframes_68
1287 Dim sTestFile as String
1288 Dim iHorizontal as Integer
1289 Dim sHorizontalBy as String
1290 Dim sPositionX1 as String
1291 Dim sPositionX2 as String
1293 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
1294 iHorizontal = 4 'From Left
1295 sHorizontalBy = "50"
1297 printlog "- Exceeding layout environment at the right - 'Follow text flow'(OFF , table)"
1298 '/// Exceeding layout environment at the right - 'Follow text flow'(OFF , table)
1302 '/// Open a test file , which includes a frame in table and
1303 '/// + a picture which is anchored to frame
1304 Call hFileOpen(sTestFile,false)
1305 Call sMakeReadOnlyDocumentEditable
1307 'Set focus to the picture
1308 Call wTypeKeys ( "<Shift F4>" )
1310 Call wTypeKeys ( "<Tab>" )
1312 'Get the pic Y position
1314 Call fFormatGraphic("TabType")
1315 sPositionX1 = Horizontalby.Gettext
1321 '/// Set focus to the frame
1322 Call wTypeKeys "<Tab>"
1325 '/// Format/Frame / Type ,
1326 '/// + UnCheck box 'Follow text flow'
1327 '/// + set a much bigger values in from left
1328 Call fFormatFrame("TabType")
1329 FollowTextflow.UnCheck
1330 Horizontal.Select iHorizontal
1332 HorizontalBy.SetText sHorizontalBy
1336 'Set focus to picture
1337 Call wTypeKeys "<Tab>"
1340 'Get the pic X position
1342 Call fFormatGraphic("TabType")
1343 sPositionX2 = Horizontalby.Gettext
1346 '/// Check if frame is still in the table
1347 if fCalculateTolerance( sPositionX1, sPositionX2) <> 0 then
1348 Warnlog "Something is wrong ! Perhaps the frame is still in the table!"
1352 Call wTypeKeys "<Tab>"
1355 'if the frame is in the table, the focus should be in the table
1356 Call wTypeKeys "<ESCape>"
1360 Call fFormatTable("TabTabelle")
1362 Warnlog "The frame shouldn't in the table!"
1366 printlog " Close active document "
1367 Do Until GetDocumentCount = 0
1373 '-----------------------------------------------------------------
1375 testcase tTextframes_69
1377 Dim sTestFile as String
1378 Dim iHorizontal as Integer
1379 Dim sHorizontalBy as String
1380 Dim sPositionX1 as String
1381 Dim sPositionX2 as String
1383 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
1384 iHorizontal = 4 'From Left
1385 sHorizontalBy = "50"
1387 printlog "- Exceeding layout environment at the right - 'Follow text flow'(ON , Frame)"
1388 '/// Exceeding layout environment at the right - 'Follow text flow'(ON , Frame)
1392 '/// Open a test file , which includes 2 frames ,
1393 '/// Frame A is anchored Frame B
1394 '/// + a picture which is anchored to Frame A
1395 Call hFileOpen(sTestFile,false)
1396 Call sMakeReadOnlyDocumentEditable
1398 'Set focus to the picture
1399 Call wTypeKeys ( "<Shift F4>" )
1401 Call wTypeKeys "<Tab>"
1404 'Get the pic X position
1407 Call fPositionAndSize("TabPositionAndSizeWriter")
1408 sPositionX1 = Horizontalby.Gettext
1409 TabPositionAndSizeWriter.Cancel
1414 '/// Set focus to the frame
1415 Call wTypeKeys "<Tab>" , 2
1418 '/// Format/Frame / Type ,
1419 '/// + Check box 'Follow text flow'
1420 '/// + set a much bigger values in from left
1421 Call fFormatFrame("TabType")
1422 FollowTextflow.Check
1423 Horizontal.Select iHorizontal
1425 HorizontalBy.SetText sHorizontalBy
1429 'Set focus to picture
1430 Call wTypeKeys "<Tab>"
1433 'Get the pic X position
1436 Call fPositionAndSize("TabPositionAndSizeWriter")
1437 sPositionX2 = Horizontalby.Gettext
1438 TabPositionAndSizeWriter.Cancel
1440 '/// Check if frame is still in the frame
1441 if fCalculateTolerance( sPositionX1, sPositionX2) > 0.5 then
1442 Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
1445 printlog " Close active document "
1446 Do Until GetDocumentCount = 0
1452 '-----------------------------------------------------------------
1454 testcase tTextframes_70
1456 Dim sTestFile as String
1457 Dim iHorizontal as Integer
1458 Dim sHorizontalBy as String
1459 Dim sPositionX1 as String
1460 Dim sPositionX2 as String
1462 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
1463 iHorizontal = 4 'From Left
1464 sHorizontalBy = "50"
1466 printlog "- Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)"
1467 '/// Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)
1471 '/// Open a test file , which includes 2 frames ,
1472 '/// Frame A is anchored Frame B
1473 '/// + a picture which is anchored to Frame A
1474 Call hFileOpen(sTestFile,false)
1475 Call sMakeReadOnlyDocumentEditable
1477 'Set focus to the picture
1478 Call wTypeKeys ( "<Shift F4>" )
1480 Call wTypeKeys "<Tab>"
1483 'Get the pic X position
1486 Call fPositionAndSize("TabPositionAndSizeWriter")
1487 sPositionX1 = Horizontalby.Gettext
1488 TabPositionAndSizeWriter.Cancel
1493 '/// Set focus to the frame
1494 Call wTypeKeys "<Tab>" , 2
1497 '/// Format/Frame / Type ,
1498 '/// + UnCheck box 'Follow text flow'
1499 '/// + set a much bigger values in from left
1500 Call fFormatFrame("TabType")
1501 FollowTextflow.UnCheck
1502 Horizontal.Select iHorizontal
1504 HorizontalBy.SetText sHorizontalBy
1508 'Set focus to picture
1509 Call wTypeKeys "<Tab>"
1512 'Get the pic X position
1515 Call fPositionAndSize("TabPositionAndSizeWriter")
1516 sPositionX2 = Horizontalby.Gettext
1517 TabPositionAndSizeWriter.Cancel
1519 '/// Check if frame is still in the table
1520 if fCalculateTolerance( sPositionX1, sPositionX2) < 3 then
1521 Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
1524 printlog " Close active document "
1525 Do Until GetDocumentCount = 0
1531 '-----------------------------------------------------------------