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_textframes2.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:37:37 $
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 - 2
38 '\***********************************************************************
42 Call tTextframes_17 'Test protect contents - text insertion in frame must be suppressed
43 Call tTextframes_18 'Test protect position - moving frame with mouse/keyboard suppressed
44 Call tTextframes_19 'Test if frame can move when protect content is checked
45 Call tTextframes_20 'Test frame without wrap
46 Call tTextframes_21 'Test frame with wrap ( through)
47 Call tTextframes_22 'Test wrap - before/after - 1
48 Call tTextframes_23 'Test wrap - before/after - 2
49 Call tTextframes_24 'Set more than 1 columns for the frame
50 Call tTextframes_25 'Test columns' width
51 Call tTextframes_26 'Test columns' spacing
52 Call tTextframes_27 'Test columns' seperator line
53 Call tTextframes_28 'Test overlap with different wrapping types
54 Call tTextframes_29 'Test 'synchronize' distances for border (Check Synchronize)
55 Call tTextframes_30 'Test 'synchronize' distances for border (UnCheck Synchronize)
56 Call tTextframes_31 'Frame should be non-editable in read-only documents
57 Call tTextframes_32 'Test input text into frame in read-only document when checking "Editable in read-only document"
61 '---------------------------------------------------
63 testcase tTextframes_17
69 printlog "- Test protect contents - text insertion in frame must be suppressed"
74 Call fInsertFrame(30,30 , 60,60)
76 '/// Format / Frame / Options , check contents
77 Call fFormatFrame("TabZusaetze")
81 Call wTypeKeys "<ESCAPE>"
84 Call gMouseClick(40,40)
87 '/// check if contents can be inserted into frame
88 Call wTypeKeys sTestText
94 Warnlog "The contents should not be inserted into frame!"
101 '---------------------------------------------------
103 testcase tTextframes_18
105 Dim sTestText as String
109 printlog "- Test protect position - moving frame with mouse/keyboard suppressed"
114 Call fInsertFrame(30,30 , 70,70)
116 '/// Format / Frame / Options , check contents
117 Call fFormatFrame("TabZusaetze")
118 InhaltSchuetzen.Check
119 PositionSchuetzen.Check
122 '/// Move the frame to right (Right key 4 times)
123 Call wTypeKeys "<Right>" , 4
125 Call wTypeKeys "<ESCAPE>"
128 Call gMouseClick(40,40)
131 '/// check if the frame is moved
132 Call wTypeKeys sTestText
135 if Active.Exists then
138 Warnlog "The contents should NOT be inserted into the frame!"
141 Call wTypeKeys "<Shift Left>"
145 if GetClipboardText = sTestText then Warnlog "Something wrong in the test !"
153 '---------------------------------------------------
155 testcase tTextframes_19
161 printlog "- Test if frame can move when protect content is checked"
166 Call fInsertFrame(30,30 , 70,70)
168 '/// Format / Frame / Options , check contents
169 Call fFormatFrame("TabZusaetze")
170 InhaltSchuetzen.Check
173 '/// Move the frame to right (Right key 4 times)
174 Call wTypeKeys "<Right>" , 4
176 Call wTypeKeys "<ESCAPE>"
179 Call gMouseClick(15,15)
182 '/// check if the frame is moved
183 Call wTypeKeys sTestText
186 if Active.Exists then
187 Warnlog "#i40348# The frame should move by keyboard!"
191 Call wTypeKeys "<Shift Left>"
195 if GetClipboardText <> sTestText then Warnlog "Something wrong in the test . Clipboard:" +GetClipboardText
204 '---------------------------------------------------
206 testcase tTextframes_20
208 Dim sTestFile as String
209 Dim sTestText as String
211 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\wrap.sxw")
214 printlog "- Test frame without wrap"
216 '/// Open a test file
217 '/// + This test file is designed for without wrap test
218 '/// + There are 1 page in the file.
219 '/// + The frame is ocupied in the whole 1st page and wraped as Through
220 '/// + Some text are behind the frame
221 Call hFileOpen(sTestFile,false)
222 Call sMakeReadOnlyDocumentEditable
224 '/// Set focus to frame
225 Call wTypeKeys ( "<Shift F4>" )
228 '/// Format / Frame / Wrap , check None in setting area
229 Call fFormatFrame("TabUmlauf")
234 '/// Check if frame is in 1st page
237 Kontext "NavigatorWriter"
239 if Seitennummer.GetText <> "1" then
240 Warnlog "The test frame isn't in the first page!"
244 '/// Check if test text are in 2nd page
245 Call wTypeKeys "<ESCAPE>"
246 Call wTypeKeys "<Home><Shift End>"
251 if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
253 Warnlog "EditCopy can't be executed !"
258 Kontext "NavigatorWriter"
260 if Seitennummer.GetText <> "2" then
261 Warnlog "The test text isn't in the second page!"
266 printlog " Close active document "
267 Do Until GetDocumentCount = 0
273 '-----------------------------------------------------------------
275 testcase tTextframes_21
277 Dim sTestFile as String
278 Dim sTestText as String
280 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\through.sxw")
283 printlog "- Test frame with wrap "
285 '/// Open a test file
286 '/// + This test file is designed for with through wrap test
287 '/// + There are 2 page in the file.
288 '/// + The frame is ocupied in the whole 1st page and wraped as None
289 '/// + Some text are in the 2nd page
291 Call hFileOpen(sTestFile,false)
292 Call sMakeReadOnlyDocumentEditable
294 '/// Set focus to frame
295 Call wTypeKeys ( "<Shift F4>" )
298 '/// Format / Frame / Wrap , check through in setting area
299 Call fFormatFrame("TabUmlauf")
304 '/// Check if frame are in 1st page
307 Kontext "NavigatorWriter"
309 if Seitennummer.GetText <> "1" then
310 Warnlog "The test frame isn't in the first page!"
314 '/// Check if test text are in 1st page
315 Call wTypeKeys "<ESCAPE>"
316 Call wTypeKeys "<Home><Shift End>"
321 if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
323 Warnlog "EditCopy can't be executed !"
328 Kontext "NavigatorWriter"
330 if Seitennummer.GetText <> "1" then
331 Warnlog "The test text isn't in the first page!"
336 printlog " Close active document "
337 Do Until GetDocumentCount = 0
343 '-----------------------------------------------------------------
345 testcase tTextframes_22
347 Dim sTestFile as String
348 Dim sTestText as String
350 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\before.sxw")
353 printlog "- Test wrap - before/after - 1"
355 '/// Open a test file
356 '/// + This test file is designed for with before/after wrap test
357 '/// + There are 2 page in the file.
358 '/// + The frame is ocupied in the whole 1st page and wraped as None
359 '/// + there are some space in the left of the frame.
360 '/// + Some text are in the 2nd page
362 Call hFileOpen(sTestFile,false)
363 Call sMakeReadOnlyDocumentEditable
365 printlog "- Test wrap - before"
367 '/// Set focus to frame
368 Call wTypeKeys ( "<Shift F4>" )
371 '/// Format / Frame / Wrap , check before in setting area
372 Call fFormatFrame("TabUmlauf")
377 '/// Check if frame are in 1st page
380 Kontext "NavigatorWriter"
382 if Seitennummer.GetText <> "1" then
383 Warnlog "The test frame isn't in the first page!"
387 '/// Check if test text are in 1st page
388 Call wTypeKeys "<ESCAPE>"
390 Call wTypeKeys "<Home><Shift End>"
395 if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
397 Warnlog "EditCopy can't be executed !"
402 Kontext "NavigatorWriter"
404 if Seitennummer.GetText <> "1" then
405 Warnlog "The test text isn't in the first page!"
410 printlog "- Test wrap - after"
413 Call wTypeKeys ( "<Shift F4>" )
416 '/// Format / Frame / Wrap , check after in setting area
417 Call fFormatFrame("TabUmlauf")
422 '/// Check if frame are in 1st page
425 Kontext "NavigatorWriter"
427 if Seitennummer.GetText <> "1" then
428 Warnlog "The test frame isn't in the first page!"
432 '/// Check if test text are in 2nd page
433 Call wTypeKeys "<ESCAPE>"
435 Call wTypeKeys "<Home><Shift End>"
440 if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
442 Warnlog "EditCopy can't be executed !"
447 Kontext "NavigatorWriter"
449 if Seitennummer.GetText <> "2" then
450 Warnlog "The test text isn't in the first page!"
455 printlog " Close active document "
456 Do Until GetDocumentCount = 0
462 '-----------------------------------------------------------------
464 testcase tTextframes_23
466 Dim sTestFile as String
467 Dim sTestText as String
469 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\after.sxw")
472 printlog "- Test wrap - before/after - 2"
474 '/// Open a test file
475 '/// + This test file is designed for with before/after wrap test
476 '/// + There are 2 page in the file.
477 '/// + The frame is ocupied in the whole 1st page and wraped as None
478 '/// + there are some space in the right of the frame.
479 '/// + Some text are in the 2nd page
481 Call hFileOpen(sTestFile,false)
482 Call sMakeReadOnlyDocumentEditable
484 printlog "- Test wrap - before"
486 '/// Set focus to frame
487 Call wTypeKeys ( "<Shift F4>" )
490 '/// Format / Frame / Wrap , check before in setting area
491 Call fFormatFrame("TabUmlauf")
496 '/// Check if frame are in 1st page
499 Kontext "NavigatorWriter"
501 if Seitennummer.GetText <> "1" then
502 Warnlog "The test frame isn't in the first page!"
506 '/// Check if test text are in 1st page
507 Call wTypeKeys "<ESCAPE>"
509 Call wTypeKeys "<Home><Shift End>"
514 if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
516 Warnlog "EditCopy can't be executed !"
521 Kontext "NavigatorWriter"
523 if Seitennummer.GetText <> "2" then
524 Warnlog "The test text isn't in the first page!"
529 printlog "- Test wrap - after"
531 '/// Set focus to frame
532 Call wTypeKeys ( "<Shift F4>" )
535 '/// Format / Frame / Wrap , check after in setting area
536 Call fFormatFrame("TabUmlauf")
541 '/// Check if frame are in 1st page
544 Kontext "NavigatorWriter"
546 if Seitennummer.GetText <> "1" then
547 Warnlog "The test frame isn't in the first page!"
551 '/// Check if test text are in 2nd page
552 Call wTypeKeys "<ESCAPE>"
554 Call wTypeKeys "<Home><Shift End>"
559 if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
561 Warnlog "EditCopy can't be executed !"
566 Kontext "NavigatorWriter"
568 if Seitennummer.GetText <> "1" then
569 Warnlog "The test text isn't in the first page!"
574 printlog " Close active document "
575 Do Until GetDocumentCount = 0
581 '-----------------------------------------------------------------
583 testcase tTextframes_24
585 Dim sColumn as String
589 printlog "- Set more than 1 columns for the frame"
596 '/// Format / Frame / columns , set columns to 3 , close the dialogue
597 Call fFormatFrame("TabSpalten")
598 Anzahl.SetText sColumn
602 '/// Check if the column is set correctly
603 Call fFormatFrame("TabSpalten")
604 if Anzahl.GetText <> sColumn then Warnlog "the column isn't set correctly ! The column you get is:Anzahl.GetText"
611 '-----------------------------------------------------------------
613 testcase tTextframes_25
616 Dim sSpacingToContent as String
617 Dim sColumn as String
618 Dim sWidthColumn1 as String
619 Dim sWidthColumn2 as String
620 Dim sWidthColumn3 as String
622 sWidth = "6"+ gSeperator + "00" + gMeasurementUnit
623 sSpacingToContent = "0"+ gSeperator + "00"
627 sWidthColumn1 = "1"+ gSeperator + "00" + gMeasurementUnit
628 sWidthColumn2 = "2"+ gSeperator + "00" + gMeasurementUnit
629 sWidthColumn3 = "3"+ gSeperator + "00" + gMeasurementUnit
631 printlog "- Test columns' width"
639 Call fFormatFrame("TabType")
644 'Set frame's Spacing to Content
645 Call fFormatFrame("TabUmrandung")
646 Synchronisieren.Check
648 TabUmrandung.TypeKeys "<SHIFT TAB>"
649 Links.SetText sSpacingToContent
650 Rechts.SetText sSpacingToContent
651 Oben.SetText sSpacingToContent
652 Unten.SetText sSpacingToContent
654 TabUmrandung.TypeKeys "<SHIFT TAB>"
657 '/// Format / Frame / columns , set columns to 3
658 Call fFormatFrame("TabSpalten")
659 Anzahl.SetText sColumn
663 '/// + Set 3 columns to different width
664 Call fFormatFrame("TabSpalten")
667 TabSpalten.TypeKeys "<SHIFT TAB>"
668 Spaltenbreite1.SetText sWidthColumn1
670 TabSpalten.TypeKeys "<SHIFT TAB>"
671 Spaltenbreite2.SetText sWidthColumn2
673 TabSpalten.TypeKeys "<SHIFT TAB>"
674 Spaltenbreite3.SetText sWidthColumn3
676 TabSpalten.TypeKeys "<SHIFT TAB>"
679 '/// Check if the columns' width is set correctly
680 Call fFormatFrame("TabSpalten")
681 if Spaltenbreite1.GetText <> sWidthColumn1 then Warnlog "the column1's width isn't set correctly !"
682 if Spaltenbreite2.GetText <> sWidthColumn2 then Warnlog "the column2's width isn't set correctly !"
683 if Spaltenbreite3.GetText <> sWidthColumn3 then Warnlog "the column3's width isn't set correctly !"
690 '-----------------------------------------------------------------
692 testcase tTextframes_26
695 Dim sSpacingToContent as String
696 Dim sColumn as String
697 Dim sWidthColumn1 as String
698 Dim sWidthColumn2 as String
699 Dim sWidthColumn3 as String
700 Dim sSpacing1 as String
701 Dim sSpacing2 as String
702 Dim sNewWidthColumn1 as String
703 Dim sNewWidthColumn2 as String
704 Dim sNewWidthColumn3 as String
705 Dim sNewWidthColumn4 as String
707 sWidth = "6"+ gSeperator + "00" + gMeasurementUnit
708 sSpacingToContent = "0"+ gSeperator + "00"
712 sWidthColumn1 = "1"+ gSeperator + "00" + gMeasurementUnit
713 sWidthColumn2 = "2"+ gSeperator + "00" + gMeasurementUnit
714 sWidthColumn3 = "3"+ gSeperator + "00" + gMeasurementUnit
716 sSpacing1 = "0"+ gSeperator + "10" + gMeasurementUnit
717 sSpacing2 = "0"+ gSeperator + "20" + gMeasurementUnit
719 sNewWidthColumn1 = "1"+ gSeperator + "00" + gMeasurementUnit
720 sNewWidthColumn2 = "1"+ gSeperator + "90" + gMeasurementUnit
721 sNewWidthColumn3 = "2"+ gSeperator + "80" + gMeasurementUnit
722 sNewWidthColumn4 = "2"+ gSeperator + "81" + gMeasurementUnit
724 printlog "- Test columns' spacing"
732 Call fFormatFrame("TabType")
735 TabType.TypeKeys "<SHIFT TAB>"
738 'Set frame's Spacing to Content
739 Call fFormatFrame("TabUmrandung")
740 Synchronisieren.Check
742 Links.SetText sSpacingToContent
743 Rechts.SetText sSpacingToContent
744 Oben.SetText sSpacingToContent
745 Unten.SetText sSpacingToContent
747 TabUmrandung.TypeKeys "<SHIFT TAB>"
750 '/// Format / Frame / columns , set columns to 3
751 Call fFormatFrame("TabSpalten")
752 Anzahl.SetText sColumn
756 '/// + Set 3 columns to different width
757 Call fFormatFrame("TabSpalten")
760 TabSpalten.TypeKeys "<SHIFT TAB>"
761 Spaltenbreite1.SetText sWidthColumn1
763 TabSpalten.TypeKeys "<SHIFT TAB>"
764 Spaltenbreite2.SetText sWidthColumn2
766 TabSpalten.TypeKeys "<SHIFT TAB>"
767 Spaltenbreite3.SetText sWidthColumn3
769 TabSpalten.TypeKeys "<SHIFT TAB>"
772 '/// + Set Spacing1 and Spacing2
773 Call fFormatFrame("TabSpalten")
774 Abstand12.SetText sSpacing1
776 Abstand23.SetText sSpacing2
783 '/// Check if the columns' width is set correctly
784 Call fFormatFrame("TabSpalten")
785 if Spaltenbreite1.GetText <> sNewWidthColumn1 then Warnlog "the column1's width isn't set correctly !"
786 if Spaltenbreite2.GetText <> sNewWidthColumn2 then Warnlog "the column2's width isn't set correctly !"
787 if (Spaltenbreite3.GetText <> sNewWidthColumn3) then
788 if (Spaltenbreite3.GetText <> sNewWidthColumn4) then
789 Warnlog "the column3's width isn't set correctly ! (not" & Spaltenbreite3.GetText & " but " & sNewWidthColumn3 & ")"
792 if Abstand12.GetText <> sSpacing1 then Warnlog "the 1st spacing isn't set correctly !"
793 if Abstand23.GetText <> sSpacing2 then Warnlog "the 2nd spacing isn't set correctly !"
800 '-----------------------------------------------------------------
802 testcase tTextframes_27
805 Dim iPosition as Integer
806 Dim sHeight as String
812 printlog "- Test columns' seperator line"
819 '/// Format / Frame / columns , set columns to 4
820 '/// + default : column is 1 , Line and Height and Position isn't enabled
821 Call fFormatFrame("TabSpalten")
822 if Anzahl.GetText <> "1" then Warnlog "the default column number is 1 , but get " +Anzahl.GetText
826 Warnlog "Line : should be inactived !"
827 Hoehe.SetText sHeight
828 Warnlog "Height : should be inactived !"
829 Position.Select iPosition
830 Warnlog "Position : should be inactived !"
838 '/// Check if the columns' width is set correctly
839 Call fFormatFrame("TabSpalten")
842 Hoehe.SetText sHeight
844 Position.Select iPosition
848 Call fFormatFrame("TabSpalten")
849 if Art.GetSelIndex <> iLine then Warnlog "Line isn't correct!"
851 if Hoehe.GetText <> sHeight then Warnlog "Height isn't correct!"
853 if Position.GetSelIndex <> iPosition then Warnlog "Position isn't correct!"
861 '-----------------------------------------------------------------
863 testcase tTextframes_28
865 Dim sFrameName1 as String
866 Dim sFrameName2 as String
868 sFrameName1 = "Test1"
869 sFrameName2 = "Test2"
871 printlog "- Test overlap with different wrapping types"
875 printlog "Insert a frame"
876 Call fInsertFrame(30, 30, 60, 60)
878 printlog "Naming the frame"
879 Call fFormatFrame("TabZusaetze")
880 ObjektName.SetText sFrameName1
883 printlog "Set the frame's wrap"
884 Call fFormatFrame("TabUmlauf")
889 Call wTypeKeys "<ESCAPE>"
892 printlog "Insert another frame"
893 Call fInsertFrame(50, 50, 80, 80)
895 printlog "Naming the frame"
896 Call fFormatFrame("TabZusaetze")
897 ObjektName.SetText sFrameName2
900 printlog "Set the frame's wrap"
901 Call fFormatFrame("TabUmlauf")
907 Call wTypeKeys "<ESCAPE>"
910 printlog "Set focus to second frame"
911 Call gMouseClick(60,60) ' Click into frame
913 Call wTypeKeys "<ESCAPE>" ' Selects frame holding the cursor
916 printlog "Check second frame's name"
917 Call fFormatFrame("TabZusaetze")
918 if ObjektName.GetText <> sFrameName2 then Warnlog "The 2nd frame's name is wrong ! Get " +ObjektName.GetText
921 printlog "Check second frame's wrap status"
922 Call fFormatFrame("TabUmlauf")
923 if Durchlauf.IsChecked <> TRUE then Warnlog "The 2nd frame's wrap status is wrong ! "
926 printlog "Set focus to first frame"
927 Call wTypeKeys "<TAB>"
930 printlog "Check first frame's name"
931 Call fFormatFrame("TabZusaetze")
932 if ObjektName.GetText <> sFrameName1 then Warnlog "The 1st frame's name is wrong ! Get " +ObjektName.GetText
935 printlog "Check first frame's wrap status"
936 Call fFormatFrame("TabUmlauf")
937 if Kein.IsChecked <> TRUE then Warnlog "The 1st frame's wrap status is wrong ! "
944 '-----------------------------------------------------------------
946 testcase tTextframes_29
949 Dim sRight1 as String
951 Dim sBottom1 as String
953 sLeft1 = "0"+ gSeperator + "1"
954 sRight1 = "0"+ gSeperator + "2"
955 sTop1 = "0"+ gSeperator + "3"
956 sBottom1 = "0"+ gSeperator + "4"
958 printlog "- Test 'synchronize' distances for border (Check Synchronize)"
965 '/// Format / Frame / Borders , check Synchronize ,
966 '/// + then set spacing to contents
967 '/// + to differect number (left, right, top, bottom)
968 Call fFormatFrame("TabUmrandung")
969 Synchronisieren.Check
973 TabUmrandung.TypeKeys "<SHIFT TAB>"
974 Rechts.SetText sRight1
976 TabUmrandung.TypeKeys "<SHIFT TAB>"
979 TabUmrandung.TypeKeys "<SHIFT TAB>"
980 Unten.SetText sBottom1
982 TabUmrandung.TypeKeys "<SHIFT TAB>"
985 '/// Check if the spacing to contents is right
986 Call fFormatFrame("TabUmrandung")
987 if Synchronisieren.IsChecked <> TRUE then Warnlog "checkbox synchronize should be checked!"
988 if Instr(Links.Gettext, sBottom1) = false then Warnlog "spacing to contents (left) isn't right!"
989 if Instr(Rechts.GetText, sBottom1) = false then Warnlog "spacing to contents (right) isn't right!"
990 if Instr(Oben.GetText, sBottom1) = false then Warnlog "spacing to contents (top) isn't right!"
991 if Instr(Unten.GetText, sBottom1) = false then Warnlog "spacing to contents (bottom) isn't right!"
998 '-----------------------------------------------------------------
1000 testcase tTextframes_30
1002 Dim sLeft1 as String
1003 Dim sRight1 as String
1005 Dim sBottom1 as String
1007 sLeft1 = "0"+ gSeperator + "1"
1008 sRight1 = "0"+ gSeperator + "2"
1009 sTop1 = "0"+ gSeperator + "3"
1010 sBottom1 = "0"+ gSeperator + "4"
1012 printlog "- Test 'synchronize' distances for border (UnCheck Synchronize)"
1019 '/// Format / Frame / Borders , Uncheck Synchronize ,
1020 '/// + then set spacing to contents
1021 '/// + to differect number (left, right, top, bottom)
1022 Call fFormatFrame("TabUmrandung")
1023 Synchronisieren.UnCheck
1025 Links.SetText sLeft1
1027 TabUmrandung.TypeKeys "<SHIFT TAB>"
1028 TabUmrandung.TypeKeys "<SHIFT TAB>"
1029 Rechts.SetText sRight1
1031 TabUmrandung.TypeKeys "<SHIFT TAB>"
1034 TabUmrandung.TypeKeys "<SHIFT TAB>"
1035 Unten.SetText sBottom1
1037 TabUmrandung.TypeKeys "<SHIFT TAB>"
1040 '/// Check if the spacing to contents is right
1041 Call fFormatFrame("TabUmrandung")
1042 if Synchronisieren.IsChecked = TRUE then Warnlog "checkbox synchronize should be checked!"
1043 if Instr(Links.Gettext, sLeft1) = false then Warnlog "spacing to contents (left) isn't right!" '<> sLeft1
1044 if Instr(Rechts.GetText, sRight1) = false then Warnlog "spacing to contents (right) isn't right!"
1045 if Instr(Oben.GetText, sTop1) = false then Warnlog "spacing to contents (top) isn't right!"
1046 if Instr(Unten.GetText, sBottom1) = false then Warnlog "spacing to contents (bottom) isn't right!"
1053 '-----------------------------------------------------------------
1055 testcase tTextframes_31
1057 Dim sTestFile as String
1059 sTestFile = ConvertPath (gOfficePath + "user\work\testFileReadOnly.odt" )
1061 if Dir(sTestFile) <> "" then
1062 setattr sTestFile , 0
1067 printlog "- Frame should be non-editable in read-only documents"
1074 '/// Save the file and set the file's property to Read-only
1075 Call hFileSaveAs (sTestFile ,true)
1080 setattr sTestFile , 1
1083 '/// Check if the frame is non-editable
1084 Call hFileOpen(sTestFile,false)
1086 Call wTypeKeys ( "<Shift F4>" )
1091 Active.SetPage TabType
1094 Warnlog "The frame should be non-editable!"
1102 '-----------------------------------------------------------------
1104 testcase tTextframes_32
1106 Dim sTestFile as String
1110 sTestFile = ConvertPath (gOfficePath + "user\work\testFileReadOnly.odt" )
1112 if Dir(sTestFile) <> "" then
1113 setattr sTestFile , 0
1118 printlog "- Test input text into frame in read-only document when checking 'Editable in read-only document'"
1123 Call fInsertFrame(30,30 , 70,70)
1125 '/// Format / Frame / Options , check "Editable in read-only document"
1126 Call fFormatFrame("TabZusaetze")
1130 Call wTypeKeys "<ESCAPE>"
1132 '/// Save the file and set the file's property to Read-only
1133 Call hFileSaveAs (sTestFile ,true)
1137 setattr sTestFile , 1
1140 '/// Check if the text can be inputed into frame
1141 Call hFileOpen(sTestFile,false)
1143 Call wTypeKeys "<SHIFT F4><RETURN>"
1147 Call wTypeKeys sText
1150 Warnlog "Can't input text into frame !"
1153 Call wTypeKeys "<Shift Home>"
1159 if GetClipboardText <> sText then Warnlog "The inputed text isn't right!"
1165 ' ------------------------------------------------------------------------------