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_formatpage1.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:28:23 $
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 the functionality of Page Formatting / Page Styles - 1
38 '************************************************************************
40 ' #1 tFormatPage_1 'Open format/page dialog
41 ' #1 tFormatPage_2 'Test Portrait in tabpage Page
42 ' #1 tFormatPage_3 'Test Landscape in tabpage Page
43 ' #1 tFormatPage_4 'Width and Height boxes must change after changing between Portrait and Landscape
44 ' #1 tFormatPage_5 'The sum of "Left margin" and "Right margin" must always stay below the Paper width.(Same for top/bottom and height)
45 ' #1 tFormatPage_6 'Test predefined formats
46 ' #1 tFormatPage_7 'Test user defined formats
47 ' #1 tFormatPage_8 'Check Listbox Text Direction when Asian language support is enabled
48 ' #1 tFormatPage_9 'Check Listbox Text Direction when CTL is enabled
49 ' #1 tFormatPage_10 'when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox
50 ' #1 TFormatPage_11 'Test Page layout - Right and left
51 ' #1 tFormatPage_12 'Test Page layout - Mirrored
52 ' #1 tFormatPage_13 'Test Page layout - Only right
53 ' #1 tFormatPage_14 'Test Page layout - Only left
54 ' #1 tFormatPage_15 'Insertfields / other / Document / Type/Page -> As page Style must be set
56 '\***********************************************************************
58 testcase tFormatPage_1
60 PrintLog "- Open format/page dialog"
61 '/// <b> Open format/page dialog </b> ///
65 '/// 1. via Mouse clicks in Menu: Format-Page
67 fFormatPageWriter("TabSeite")
72 '/// 2. via shortcuts in menu (manual test is needed)
74 '/// 3. via Context menu when Cursor is in the document
81 Active.SetPage TabSeite
91 '-------------------------------------------------------------------------------------------
93 testcase tFormatPage_2
95 Dim sTestString as String
96 Dim iRepectLength as Integer
97 Dim iFormat as Integer
99 sTestString = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQ"
101 iFormat = 2 'A4 paper
103 PrintLog "- Test Portrait in tabpage Page"
104 '/// <b> Test Portrait in tabpage Page </b> ///
108 '/// Input a long test string
109 Call wTypeKeys sTestString
111 '/// Format/Page , tabpage page , check 'Portrait'
112 fFormatPageWriter("TabSeite")
113 Papierformat.Select iFormat
119 '/// Check if Checkbox -- Portrait works fine
120 Call wTypeKeys "<Shift Home>"
123 if Len(GetClipboardText) < iRepectLength then Warnlog "Checkbox Portrait doesn't work fine!"
129 '-------------------------------------------------------------------------------------------
131 testcase tFormatPage_3
133 Dim iTextLength as integer
135 PrintLog "- Test Landscape in tabpage Page"
136 '/// Test Landscape in tabpage Page
140 Call wOptionsUndo( "Grundschriften" )
142 '/// Input a long test string
143 Call wTypeKeys "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQ"
144 Call wTypeKeys "<Mod1 Home>"
145 Call wTypeKeys "<Shift End>"
147 iTextLength = Len(GetClipBoardtext)
149 '/// Format/Page , tabpage page , check 'Landscape'
150 fFormatPageWriter("TabSeite")
151 Papierformat.Select 2 ' A4 Paper
157 '/// Check if Checkbox -- Landscape works fine
158 Call wTypeKeys "<Mod1 Home>"
159 Call wTypeKeys "<Shift End>"
162 if Len(GetClipboardText) <= iTextLength then Warnlog "Checkbox Landscape doesn't work fine!"
168 '-------------------------------------------------------------------------------------------
170 testcase tFormatPage_4
172 Dim iFormat as Integer
174 Dim sHeight as String
176 iFormat = 2 'A4 paper
178 PrintLog "- Width and Height boxes must change after changing between Portrait and Landscape"
179 '/// Width and Height boxes must change after changing between Portrait and Landscape
183 '/// Format/Page tabpage page ,
184 '/// + check 'Portrait' first and get width and height ,
185 '/// + then change from Portrait to Landscape
186 '/// + check if the change is effective
187 fFormatPageWriter("TabSeite")
188 Papierformat.Select iFormat
192 sWidth = Breite.GetText
193 sHeight = Hoehe.GetText
197 if Breite.GetText <> sHeight then Warnlog "Width isn't changed when changing from Portrait to Landscape !"
198 if Hoehe.GetText <> sWidth then Warnlog "Height isn't changed when changing from Portrait to Landscape !"
201 '/// Format/Page tabpage page ,
202 '/// + check 'Landscape' first and get width and height ,
203 '/// + then change from Landscape to Portrait
204 '/// + check if the change is effective
205 fFormatPageWriter("TabSeite")
206 Papierformat.Select iFormat
210 sWidth = Breite.GetText
211 sHeight = Hoehe.GetText
215 if Breite.GetText <> sHeight then Warnlog "Width isn't changed when changing from Landscape to Portrait !"
216 if Hoehe.GetText <> sWidth then Warnlog "Height isn't changed when changing from Landscape to Portrait !"
223 '-------------------------------------------------------------------------------------------
225 testcase tFormatPage_5
227 Dim iFormat as Integer
228 Dim sWidth as String , sHeight as String
229 Dim sLeft as String , sRight as String , sUp as String , sBottom as String ' set page size
230 Dim sLeft1 as String , sRight1 as String , sUp1 as String , sBottom1 as String ' get page size
232 iFormat = 2 'A4 paper
233 sWidth = "20" + gSeperator + "00" + gMeasurementUnit
234 sHeight = "25" + gSeperator + "00" + gMeasurementUnit
236 sLeft = "15" + gSeperator + "00" + gMeasurementUnit
237 sRight = "15" + gSeperator + "00" + gMeasurementUnit
238 sUp = "15" + gSeperator + "00" + gMeasurementUnit
239 sBottom = "15" + gSeperator + "00" + gMeasurementUnit
241 sLeft1 = "15" + gSeperator + "00" + gMeasurementUnit
242 sRight1 = "4" + gSeperator + "50" + gMeasurementUnit
243 sUp1 = "15" + gSeperator + "00" + gMeasurementUnit
244 sBottom1 = "9" + gSeperator + "50" + gMeasurementUnit
246 PrintLog "- The sum of 'Left margin' and 'Right margin' must always stay below the Paper width."
247 PrintLog " (Same for top/bottom and height)"
248 '/// The sum of "Left margin" and "Right margin" must always stay below the Paper width.
249 '/// (Same for top/bottom and height)
253 '/// Format/Page , tabpage Page , set width and height , close the dialog
254 fFormatPageWriter("TabSeite")
255 Papierformat.Select iFormat
259 Breite.SetText sWidth
261 Hoehe.SetText sHeight
265 '/// Format/Page , tabpage Page ,
266 '/// + Set the sum of "Left margin" and "Right margin" more than Width
267 fFormatPageWriter("TabSeite")
270 Rechts.SetText sRight
274 '/// Check if the setting is OK
275 fFormatPageWriter("TabSeite")
276 if Left$(Links.GetText,5) <> Left$(sLeft1,5) then Warnlog "The Margin(left) is wrong!"
277 if Left$(Rechts.GetText,4) <> Left$(sRight1,4) then Warnlog "The Margin(right) is wrong!"
280 '/// Format/Page , tabpage Page ,
281 '/// + Set the sum of "Up margin" and "Bottom margin" more than Heigth
282 fFormatPageWriter("TabSeite")
285 Unten.SetText sBottom
289 '/// Check if the setting is OK
290 fFormatPageWriter("TabSeite")
291 if Left$(Oben.GetText,5) <> Left$(sUp1,5) then Warnlog "The Margin(Up) is wrong!"
292 if Left$(Unten.GetText,4) <> Left$(sBottom1,4) then Warnlog "The Margin(Bottom) is wrong!"
299 '-------------------------------------------------------------------------------------------
301 testcase tFormatPage_6
303 Dim iPaperTray as Integer , iPageLayout as Integer
304 Dim iFormatLayout as Integer , iReferenceStyle as Integer
305 Dim sWidth as String, sHeight as String
306 Dim sLeft as String , sRight as String , sUp as String , sBottom as String
308 iPaperTray = 1 : iPageLayout = 2
309 iFormatLayout = 2 : iReferenceStyle = 5
311 sWidth = "20" + gSeperator + "00" + gMeasurementUnit
312 sHeight = "25" + gSeperator + "00" + gMeasurementUnit
313 sLeft = "2" + gSeperator + "00" + gMeasurementUnit
314 sRight = "2" + gSeperator + "00" + gMeasurementUnit
315 sUp = "2" + gSeperator + "00" + gMeasurementUnit
316 sBottom = "2" + gSeperator + "00" + gMeasurementUnit
318 PrintLog "- Test Pre-defined formats"
319 '/// Test Pre-defined formats
323 '/// Format/Page , tabpage page , do some configuration
324 fFormatPageWriter("TabSeite")
327 Breite.SetText sWidth
329 Hoehe.SetText sHeight
331 Schacht.Select iPaperTray
335 Rechts.SetText sRight
339 Unten.SetText sBottom
341 Seitenlayout.Select iPageLayout
343 Numerierung.Select iFormatLayout
347 AbsatzVorlage.Select iReferenceStyle
351 '/// Save the file , close the file and reload the file
352 Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\tFormatPage_6.odt", "writer8")
357 Call hFileOpen(gOfficepath + "user\work\tFormatPage_6.odt")
359 '/// Check if Pre-defined formats are correct
360 fFormatPageWriter("TabSeite")
361 if Hoch.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
362 if Left$(Breite.GetText,5) <> Left$(sWidth,5) then Warnlog "The width is wrong!"
363 if Left$(Hoehe.GetText,5) <> Left$(sHeight,5) then Warnlog "The height is wrong!"
364 if Schacht.GetSelIndex <> iPaperTray then Warnlog "The Paper tray is wrong!"
365 if Left$(Links.GetText,4) <> Left$(sLeft,4) then Warnlog "The Margin(left) is wrong!"
366 if Left$(Rechts.GetText,4) <> Left$(sRight,4) then Warnlog "The Margin(right) is wrong!"
367 if Left$(Oben.GetText,4) <> Left$(sUp,4) then Warnlog "The Margin(top) is wrong!"
368 if Left$(Unten.GetText,4) <> Left$(sBottom,4) then Warnlog "The Margin(bottom) is wrong!"
369 if Seitenlayout.GetSelIndex <> iPageLayout then Warnlog "The paper layout is wrong!"
370 if Numerierung.GetSelIndex <> iFormatLayout then Warnlog "The layout settings(format) is wrong!"
371 if Einschalten.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
372 if AbsatzVorlage.GetSelIndex <> iReferenceStyle then Warnlog "The reference style is wrong!"
379 '-------------------------------------------------------------------------------------------
381 testcase tFormatPage_7
383 Dim iPaperTray as Integer , iPageLayout as Integer
384 Dim iFormatLayout as Integer , iReferenceStyle as Integer
385 Dim sWidth as String , sHeight as String
386 Dim sLeft as String , sRight as String , sUp as String , sBottom as String
388 iPaperTray = 1 : iPageLayout = 2
389 iFormatLayout = 2 : iReferenceStyle = 5
391 sWidth = "20" + gSeperator + "00" + gMeasurementUnit
392 sHeight = "25" + gSeperator + "00" + gMeasurementUnit
393 sLeft = "2" + gSeperator + "00" + gMeasurementUnit
394 sRight = "2" + gSeperator + "00" + gMeasurementUnit
395 sUp = "2" + gSeperator + "00" + gMeasurementUnit
396 sBottom = "2" + gSeperator + "00" + gMeasurementUnit
398 PrintLog "- Test user defined formats"
399 '/// Test user defined formats
403 '/// Format/Page , tabpage page , do some configuration
404 fFormatPageWriter("TabSeite")
407 Breite.SetText sWidth
409 Hoehe.SetText sHeight
411 Schacht.Select iPaperTray
415 Rechts.SetText sRight
419 Unten.SetText sBottom
421 Seitenlayout.Select iPageLayout
423 Numerierung.Select iFormatLayout
427 AbsatzVorlage.Select iReferenceStyle
431 '/// Check if user defined formats are correct
432 fFormatPageWriter("TabSeite")
433 if Hoch.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
434 if Left$(Breite.GetText,5) <> Left$(sWidth,5) then Warnlog "The width is wrong!"
435 if left$(Hoehe.GetText,5) <> Left$(sHeight,5) then Warnlog "The height is wrong!"
436 if Schacht.GetSelIndex <> iPaperTray then Warnlog "The Paper tray is wrong!"
437 if Left$(Links.GetText,4) <> Left$(sLeft,4) then Warnlog "The Margin(left) is wrong!"
438 if Left$(Rechts.GetText,4) <> Left$(sRight,4) then Warnlog "The Margin(right) is wrong!"
439 if Left$(Oben.GetText,4) <> Left$(sUp,4) then Warnlog "The Margin(top) is wrong!"
440 if Left$(Unten.GetText,4) <> Left$(sBottom,4) then Warnlog "The Margin(bottom) is wrong!"
441 if Seitenlayout.GetSelIndex <> iPageLayout then Warnlog "The paper layout is wrong!"
442 if Numerierung.GetSelIndex <> iFormatLayout then Warnlog "The layout settings(format) is wrong!"
443 if Einschalten.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
444 if AbsatzVorlage.GetSelIndex <> iReferenceStyle then Warnlog "The reference style is wrong!"
450 '-------------------------------------------------------------------------------------------
452 testcase tFormatPage_8
453 Dim RecheckCTLSupport as string
454 Dim RecheckAsianSupport as string
455 RecheckCTLSupport = gCTLSup
456 RecheckAsianSupport = gAsianSup
458 Select Case iSystemSprache
460 printlog "No test with asian lovale, because checkbox 'Asian language support' is disabled by default!"
464 PrintLog "- Check Listbox Text Direction when Asian language support is enabled"
465 '/// Check Listbox Text Direction when Asian language support is enabled
470 Call ActiveDeactivateCTLSupport(FALSE)
471 '/// Enable Asian Support
472 Call ActiveDeactivateAsianSupport(TRUE)
473 '/// - the Listbox Text Direction should be visible when Asian language support is enabled
474 Call fFormatPageWriter("TabSeite")
475 if Not Textfluss.IsVisible then
476 Warnlog "Listbox 'Text Direction' isn't visible though asian support is enabled"
480 '/// Disable Asian Support
481 Call ActiveDeactivateAsianSupport(FALSE)
482 '/// - the Listbox Text Direction should be invisible when Asian language support is unabled
483 Call fFormatPageWriter("TabSeite")
484 if Textfluss.IsVisible then
485 Warnlog "Listbox 'Text Direction' is visible though asian support is disabled"
489 if RecheckCTLSupport = True then
490 Call ActiveDeactivateCTLSupport(TRUE)
492 Call ActiveDeactivateCTLSupport(FALSE)
494 if RecheckAsianSupport = True then
495 Call ActiveDeactivateAsianSupport(TRUE)
497 Call ActiveDeactivateAsianSupport(FALSE)
504 '-------------------------------------------------------------------------------------------
506 testcase tFormatPage_9
508 Dim RecheckCTLSupport as string
509 Dim RecheckAsianSupport as string
510 RecheckCTLSupport = gCTLSup
511 RecheckAsianSupport = gAsianSup
513 PrintLog "- Check Listbox Text Direction when CTL is enabled"
514 '/// Check Listbox Text Direction when CTL is enabled
519 Call ActiveDeactivateAsianSupport(FALSE)
520 Call ActiveDeactivateCTLSupport(TRUE)
521 '/// Check if 'Text direction' appears
522 Call fFormatPageWriter("TabSeite")
523 if Textfluss.IsVisible = False then
524 Warnlog "Right to Left (horizontal) should appear when CTL is checked!"
529 Call ActiveDeactivateCTLSupport(FALSE)
531 '/// Check if 'Text direction' appears
532 Call fFormatPageWriter("TabSeite")
533 if Textfluss.IsVisible = TRUE then
534 Warnlog "Left to Right (horizontal) appears though CTL is disabled"
538 if RecheckCTLSupport = True then
539 Call ActiveDeactivateCTLSupport(TRUE)
541 Call ActiveDeactivateCTLSupport(FALSE)
543 if RecheckAsianSupport = True then
544 Call ActiveDeactivateAsianSupport(TRUE)
546 Call ActiveDeactivateAsianSupport(FALSE)
552 '-------------------------------------------------------------------------------------------
554 testcase tFormatPage_10
556 Dim RecheckCTLSupport as string
557 Dim RecheckAsianSupport as string
558 RecheckCTLSupport = gCTLSup
559 RecheckAsianSupport = gAsianSup
561 PrintLog "- when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox"
562 '/// when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox
566 '/// Set Asian support enabled and Set CTL enabled
567 Call ActiveDeactivateAsianSupport(TRUE)
568 Call ActiveDeactivateCTLSupport(TRUE)
570 '/// Check if there are 3 entires in Text Direction listbox
571 fFormatPageWriter("TabSeite")
572 if Textfluss.GetItemCount <> 3 then
573 Warnlog "There should be 3 entries in Text direction listbox , but get " & Textfluss.GetItemCount
577 if RecheckCTLSupport = True then
578 Call ActiveDeactivateCTLSupport(TRUE)
580 Call ActiveDeactivateCTLSupport(FALSE)
582 if RecheckAsianSupport = True then
583 Call ActiveDeactivateAsianSupport(TRUE)
585 Call ActiveDeactivateAsianSupport(FALSE)
591 '-------------------------------------------------------------------------------------------
593 testcase tFormatPage_11
595 Dim sTestFile as String
596 Dim sMarginsLeft as String
597 Dim iPageLayout as Integer
599 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
600 sMarginsLeft = "10" + gSeperator + "00" + gMeasurementUnit
603 PrintLog "- Test Page layout - Right and left"
604 '/// Test Page layout - Right and left
608 '/// Open a test file ,
609 '/// + There are 2 pictures in 2 pages separately ,
610 '/// + and they are anchored as character
611 Call hFileOpen(sTestFile)
612 Call sMakeReadOnlyDocumentEditable
614 '/// FormatPage / tabpage Page , Set left margins to 10cm ,
615 '/// + and set page layout to "Right to left"
616 fFormatPageWriter("TabSeite")
617 Links.SetText sMarginsLeft
619 Seitenlayout.Select iPageLayout
623 '/// Set focus to first picture , format/anchor to Page
624 Call wTypeKeys ( "<Shift F4>" )
625 Call wTypeKeys "<Tab>"
630 '/// Check its position
631 fPositionAndSize("TabPositionAndSizeWriter")
632 if Left$(Horizontalby.Gettext,5) <> Left$(sMarginsLeft,5) then Warnlog "1-The position X isn't right , should be " &sMarginsLeft & " but get " & Horizontalby.Gettext
633 TabPositionAndSizeWriter.Cancel
635 '/// Set focus to second picture , format/anchor to Page
636 Call wTypeKeys "<Tab>"
641 '/// Check its position
642 fPositionAndSize("TabPositionAndSizeWriter")
643 if Left$(Horizontalby.Gettext,5) <> Left$(sMarginsLeft,5) then Warnlog "2-The position X isn't right , should be " &sMarginsLeft & " but get " & Horizontalby.Gettext
644 TabPositionAndSizeWriter.Cancel
650 '-------------------------------------------------------------------------------------------
652 testcase tFormatPage_12
654 Dim sTestFile as String
655 Dim sMarginsLeft as String
656 Dim sMarginsRight as String
657 Dim iPageLayout as Integer
659 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
660 sMarginsLeft = "10" + gSeperator + "00" + gMeasurementUnit
661 sMarginsRight = "4" + gSeperator + "00" + gMeasurementUnit
664 PrintLog "- Test Page layout - Mirrored"
665 '/// Test Page layout - Mirrored
669 '/// Open a test file ,
670 '/// + there are 2 pictures in 2 pages separately , and they are anchored as character
671 Call hFileOpen(sTestFile)
672 Call sMakeReadOnlyDocumentEditable
674 '/// FormatPage / tabpage Page , Set left margins to 10cm ,
675 '/// + and set page layout to "Mirrored"
676 fFormatPageWriter("TabSeite")
677 Links.SetText sMarginsLeft
679 Rechts.SetText sMarginsRight
681 Seitenlayout.Select iPageLayout
685 '/// Set focus to first picture , format/anchor to Page
686 Call wTypeKeys ( "<Shift F4>" )
687 Call wTypeKeys "<Tab>"
692 '/// Check its position
693 fPositionAndSize("TabPositionAndSizeWriter")
694 if Left$(Horizontalby.Gettext,5) <> Left$(sMarginsLeft,5) then Warnlog "1-The position X isn't right , should be " &sMarginsLeft & " but get " & Horizontalby.Gettext
695 TabPositionAndSizeWriter.Cancel
697 '/// Set focus to second picture , format/anchor to Page
698 Call wTypeKeys "<Tab>"
703 '/// Check its position
704 fPositionAndSize("TabPositionAndSizeWriter")
705 if Left$(Horizontalby.Gettext,4) <> Left$(sMarginsRight,4) then Warnlog "2-The position X isn't right , should be " &sMarginsRight & " but get " & Horizontalby.Gettext
706 TabPositionAndSizeWriter.Cancel
712 '-------------------------------------------------------------------------------------------
714 testcase tFormatPage_13
716 Dim sTestFile as String
719 Dim iPageLayout as Integer
721 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
726 PrintLog "- Test Page layout - Only right"
727 '/// Test Page layout - Only right
731 '/// Open a test file ,
732 '/// + there are 2 pictures in 2 pages separately
733 Call hFileOpen(sTestFile)
734 Call sMakeReadOnlyDocumentEditable
736 '/// FormatPage / tabpage Page , Set left margins to 10cm ,
737 '/// + and set page layout to "Only right"
738 fFormatPageWriter("TabSeite")
739 Seitenlayout.Select iPageLayout
743 '/// Set focus to first picture , Check if the picture is in first page
744 Call wTypeKeys ( "<Shift F4>" )
745 Call wTypeKeys "<Tab>"
748 if Not Navigator.Exists then ViewNavigator
749 Kontext "NavigatorWriter"
751 if Seitennummer.GetText <> sPage1 then Warnlog "1st pic isn't in page 1 !"
755 '/// Set focus to second picture , Check if the picture is in third page
756 Call wTypeKeys "<Tab>"
759 if Not Navigator.Exists then ViewNavigator
760 Kontext "NavigatorWriter"
762 if Seitennummer.GetText <> sPage2 then Warnlog "#i40333# 2nd pic isn't in page 3 !"
770 '-------------------------------------------------------------------------------------------
772 testcase tFormatPage_14
773 Dim sTestFile as String
776 Dim iPageLayout as Integer
778 sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
783 PrintLog "- Test Page layout - Only left"
784 '/// Test Page layout - Only left
788 '/// Open a test file ,
789 '/// + there are 2 pictures in 2 pages separately
790 Call hFileOpen(sTestFile)
791 Call sMakeReadOnlyDocumentEditable
793 '/// FormatPage / tabpage Page , Set left margins to 10cm ,
794 '/// + and set page layout to "Only left"
795 fFormatPageWriter("TabSeite")
796 Seitenlayout.Select iPageLayout
800 '/// Set focus to first picture , Check if the picture is in first page
801 Call wTypeKeys ( "<Shift F4>" )
802 Call wTypeKeys "<Tab>"
805 if Not Navigator.Exists then ViewNavigator
806 Kontext "NavigatorWriter"
808 if Seitennummer.GetText <> sPage1 then Warnlog "1st pic isn't in page 2 !"
812 '/// Set focus to second picture , Check if the picture is in third page
813 Call wTypeKeys "<Tab>"
816 if Not Navigator.Exists then ViewNavigator
817 Kontext "NavigatorWriter"
819 if Seitennummer.GetText <> sPage2 then Warnlog "#i40333# 2nd pic isn't in page 4 !"
823 printlog " Close active document "
824 Do Until GetDocumentCount = 0
829 '-------------------------------------------------------------------------------------------
831 testcase tFormatPage_15
833 Dim sFormat as String
836 case 01: sType = "Page"
837 sFormat = "As Page Style"
838 case 03: sType = "Página"
839 sFormat = "Como estilo de página"
840 case 31: sType = "Pagina"
841 sFormat = "Zoals paginaopmaakprofiel"
842 case 33 : sType = "Page"
843 sFormat = "D'après le style de page"
844 case 34 : sType = "Página"
845 sFormat = "Como estilo de página"
846 case 39 : sType = "Pagina"
847 sFormat = "Come modello di pagina"
848 case 46: sType = "Sida"
849 sFormat = "Som sidformatmall"
850 case 49: sType = "Seite"
851 sFormat = "Wie Seitenvorlage"
852 case 55 : sType = "Estatísticas"
853 sFormat = "Como Estilo de Página"
854 case 81 : sType = "ページ"
855 sFormat = "ページスタイル�?�設定"
856 case 82 : sType = "통계"
857 sFormat = "페�?�지 스타�?� 설정"
858 case 86 : sType = "页"
859 sFormat = "和页�?�样�?相�?�"
860 case 88 : sType = "�?"
861 sFormat = "和�?�?�樣�?相�?�"
862 case else : QAErrorLog "The test does not support the language " + iSprache
866 PrintLog "- Insertfields / other / Document / Type/Page -> As page Style must be set."
867 '/// Insertfield / other / Document / Type/Page -> As page Style must be set.
871 '/// InsertFields / other , tabpage document , select page ,
872 '/// + check if Page format is right
873 Call fInsertFieldsOther("TabDokumentFeldbefehle")
876 if Formatliste.GetSelText <> sFormat then
877 warnlog "the format setting should be " & sFormat & " but get " &Formatliste.GetSelText
879 TabDokumentFeldbefehle.Close