summaryrefslogtreecommitdiff
path: root/testautomation/writer/required
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/writer/required')
-rw-r--r--testautomation/writer/required/includes/w_001_.inc1115
-rw-r--r--testautomation/writer/required/includes/w_001a_.inc474
-rw-r--r--testautomation/writer/required/includes/w_001b_.inc870
-rwxr-xr-xtestautomation/writer/required/includes/w_002_.inc1522
-rw-r--r--testautomation/writer/required/includes/w_003_.inc641
-rw-r--r--testautomation/writer/required/includes/w_004_.inc1804
-rw-r--r--testautomation/writer/required/includes/w_005_.inc1189
-rw-r--r--testautomation/writer/required/includes/w_005b_.inc1514
-rw-r--r--testautomation/writer/required/includes/w_006_.inc292
-rw-r--r--testautomation/writer/required/includes/w_007_.inc1318
-rw-r--r--testautomation/writer/required/includes/w_008_.inc61
-rw-r--r--testautomation/writer/required/includes/w_009_.inc96
-rw-r--r--testautomation/writer/required/includes/w_010_.inc1227
-rw-r--r--testautomation/writer/required/includes/w_010_1.inc878
-rwxr-xr-xtestautomation/writer/required/includes/w_011_.inc787
-rw-r--r--testautomation/writer/required/includes/w_020_.inc964
-rwxr-xr-xtestautomation/writer/required/input/bt.sxwbin0 -> 75639 bytes
-rwxr-xr-xtestautomation/writer/required/input/graphics/jolink.jpgbin0 -> 11686 bytes
-rwxr-xr-xtestautomation/writer/required/input/hangul.html32
-rwxr-xr-xtestautomation/writer/required/input/hangul.sxwbin0 -> 5861 bytes
-rwxr-xr-xtestautomation/writer/required/input/htmltest.sxgbin0 -> 5451 bytes
-rwxr-xr-xtestautomation/writer/required/input/htmltest.sxwbin0 -> 5557 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/001.odtbin0 -> 8932 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/003.odtbin0 -> 9361 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/007.odtbin0 -> 9814 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/031.odtbin0 -> 8303 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/033.odtbin0 -> 8607 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/034.odtbin0 -> 8044 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/036.odtbin0 -> 8345 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/039.odtbin0 -> 8739 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/045.odtbin0 -> 8717 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/046.odtbin0 -> 8952 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/048.odtbin0 -> 8249 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/049.odtbin0 -> 7970 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/055.odtbin0 -> 9422 bytes
-rwxr-xr-xtestautomation/writer/required/input/linguistik/sprache.odtbin0 -> 71268 bytes
-rwxr-xr-xtestautomation/writer/required/input/st1_1.sxwbin0 -> 132211 bytes
-rwxr-xr-xtestautomation/writer/required/w_updt.bas93
38 files changed, 14877 insertions, 0 deletions
diff --git a/testautomation/writer/required/includes/w_001_.inc b/testautomation/writer/required/includes/w_001_.inc
new file mode 100644
index 000000000000..24292afc4a2a
--- /dev/null
+++ b/testautomation/writer/required/includes/w_001_.inc
@@ -0,0 +1,1115 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Required-Testcases for the File-menu.
+'*
+'\***********************************************************************
+
+sub w_001_
+
+ printLog Chr(13) + "--------- File Menu (w_001_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tFileNewLabels
+ Call tFileNewBusinessCards
+ Call tFileOpen
+
+ Call tFileClose
+ Call tFileSave
+ Call tFileSaveAll
+ Call tFileSaveAs
+ Call tFileSaveAsExport
+ Call tFileSaveWithPassword
+ Call tFileReload
+ Call tFileVersions
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tFileNewLabels
+
+QAErrorLog "#i102218# - tFileNewLabels outcommented due to bug."
+goto endsub
+
+ Dim iSheetFormat as integer
+ Dim iBrandIndex as integer
+ Dim iType as integer
+ Dim sTypes as integer
+ Dim vTypes as integer
+
+ ' The brands have fixed names and should not change
+ dim cBrandList( 10 ) as string
+ cBrandList( 1 ) = "Avery A4"
+ cBrandList( 2 ) = "Avery A4/Asia"
+ cBrandList( 3 ) = "Avery Letter Size"
+ cBrandlist( 4 ) = "Avery Zweckform"
+ cBrandList( 5 ) = "Herlitz"
+ cBrandList( 6 ) = "Herma A4"
+ cBrandList( 7 ) = "Herma A5"
+ cBrandList( 8 ) = "Herma endlos"
+ cBrandList( 9 ) = "Leitz"
+ cBrandList( 10 ) = "Sigel"
+
+ PrintLog "Open Labels-dialog with File / New / Labels"
+ if ( hCreateLabels ) then
+
+ Call DialogTest( TabEtiketten )
+
+ PrintLog "Switch to Tabpage 'Labels'"
+ PrintLog "Check number of brands and types (see #i44801# for details)"
+
+ For iSheetFormat = 1 to 2
+
+ Select Case( iSheetFormat )
+ Case 1
+ Endlos.Check
+ printlog "Continous is checked"
+ Case 2
+ Bogen.Check
+ printlog "Sheet is checked"
+ end select
+
+ PrintLog "There should be 10 brands in list"
+ For iBrandIndex = 1 to Marke.GetItemCount
+
+ Marke.Select( cBrandList( iBrandIndex ) )
+ printlog "- Brand: " & Marke.GetSelText
+ sTypes = Typ.GetItemCount
+
+ Select Case iBrandIndex
+ Case 1:
+ PrintLog "Avery/A4 should have 295 types in list if 'Sheet' is checked"
+ PrintLog "Avery/A4 should have 1 type in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 295
+ Case 2:
+ PrintLog "Avery A4/Asia should have 88 types in list if 'Sheet' is checked"
+ PrintLog "Avery A4/Asia should have 1 type in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 88
+ Case 3:
+ PrintLog "Avery Lettersize should have 251 types in list if 'Sheet' is checked"
+ PrintLog "Avery Lettersize should have 45 types in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 45 else vTypes = 251
+ Case 4:
+ PrintLog "Avery Zweckform should have 333 types in list if 'Sheet' is checked"
+ PrintLog "Avery Zweckform should have 67 types in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 67 else vTypes = 333
+ Case 5:
+ PrintLog "Herlitz should have 26 types in list if 'Sheet' is checked"
+ PrintLog "Herlitz should have 6 types in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 6 else vTypes = 26
+ Case 6:
+ PrintLog "Herma A4 should have 492 types in list if 'Sheet' is checked"
+ PrintLog "Herma A4 should have 1 type in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 492
+ Case 7:
+ PrintLog "Herma A5 should have 18 types in list if 'Sheet' is checked"
+ PrintLog "Herma A5 should have 1 type in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 18
+ Case 8:
+ PrintLog "Herma endlos should have 1 type in list if 'Sheet' is checked"
+ PrintLog "Herma endlos should have 119 types in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 119 else vTypes = 1
+ Case 9:
+ PrintLog "Leitz should have 13 types in list if 'Sheet' is checked"
+ PrintLog "Leitz should have 1 type in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 13
+ Case 10:
+ PrintLog "Sigel should have 20 types in list if 'Sheet' is checked"
+ PrintLog "Sigel should have 1 type in list if 'Continous' is checked"
+ if ( iSheetFormat = 1 ) then vTypes = 1 else vTypes = 20
+ Case else:
+ Warnlog "- There are more than 10 brands in list"
+ end select
+ if sTypes <> vTypes then Warnlog "- Not " & sTypes & " types in list but " & vTypes
+
+ For iType = 1 to Typ.GetItemCount
+ Typ.Select iType
+ printlog "- Type: " & Typ.GetSelText
+ next iType
+ next iBrandIndex
+ next iSheetFormat
+
+ PrintLog "Switch to Tabpage 'Format'"
+ Kontext
+ active.SetPage TabFormatEtiketten
+ wait( 100 )
+
+ Kontext "TabFormatEtiketten"
+ Call DialogTest (TabFormatEtiketten)
+
+ PrintLog "Click 'Save'"
+ FormatSpeichern.Click
+
+ Kontext "SaveLabelFormat"
+ if ( SaveLabelFormat.exists( 1 ) ) then
+
+ Call DialogTest (SaveLabelFormat)
+
+ PrintLog "Close dialog 'Save Label Format'"
+ SaveLabelFormat.Cancel
+ else
+ warnlog( "Dialog <SaveLabelFormat> is not available" )
+ end if
+
+ Kontext "TabFormatEtiketten"
+
+ PrintLog "Switch to Tabpage 'Options'"
+ Kontext
+ active.SetPage TabDruckerEtiketten
+
+ Kontext "TabDruckerEtiketten"
+ if ( TabDruckerEtiketten.exists( 1 ) ) then
+ Call DialogTest (TabDruckerEtiketten)
+
+ if ( gPlatgroup = "w95" or gPlatgroup = "wnt" ) then
+ PrintLog "Click printer setup for Windows"
+ Einrichten.Click
+
+ PrintLog "Close printer-setup dialog"
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists( 2 ) then
+ DruckerEinrichten.Cancel
+ else
+ Warnlog "No Default Printer defined for the system, set one!"
+ end if
+ else
+ printlog( "No printer setup for UNIX like OS" )
+ end if
+
+ PrintLog "Check checkbox 'Synchronize contents'"
+ Kontext "TabDruckerEtiketten"
+ InhaltSynchronisieren.Check()
+
+ PrintLog "Click 'New document'"
+ NeuesDok.Click()
+
+ printlog( "JSK: Unknown messagebox handled silently before refactoring" )
+ Kontext "Active"
+ if ( Active.Exists( 1 ) ) then
+ warnlog( "Unexpected Messagebox: " & Active.getText()
+ try
+ printlog( "Click <ok>" )
+ Active.Ok
+ catch
+ Warnlog "Once Document has been opened, office asks to save it! BugID 89702"
+ Active.Cancel
+ endcatch
+ end if
+
+ PrintLog "Check if dialog 'Synchronize Labels' is up"
+ Kontext "EtikettenSynchronisieren"
+ if ( EtikettenSynchronisieren.Exists( 2 ) ) then
+ Call DialogTest ( EtikettenSynchronisieren )
+ Synchronisieren.Click
+ WaitSlot()
+ else
+ Warnlog " Dialog to synchronize labels not up!"
+ end if
+ else
+ warnlog( "Tabpage <TabDruckerEtiketten> is not available" )
+ end if
+ else
+ warnlog( "hCreateLabels() failed" )
+ end if
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileNewBusinessCards
+
+QAErrorLog "#i102218# - tFileNewBusinessCards outcommented due to bug."
+goto endsub
+
+ Dim iFormat as integer
+ Dim iBrand as integer
+ Dim iType as integer
+ Dim iWait as integer
+ Dim sTypes as integer
+ Dim vTypes as integer
+
+ ' The brands have fixed names and should not change
+ dim cBrandList( 10 ) as string
+ cBrandList( 1 ) = "Avery A4"
+ cBrandList( 2 ) = "Avery A4/Asia"
+ cBrandList( 3 ) = "Avery Letter Size"
+ cBrandlist( 4 ) = "Avery Zweckform"
+ cBrandList( 5 ) = "Herlitz"
+ cBrandList( 6 ) = "Herma A4"
+ cBrandList( 7 ) = "Herma A5"
+ cBrandList( 8 ) = "Herma endlos"
+ cBrandList( 9 ) = "Leitz"
+ cBrandList( 10 ) = "Sigel"
+
+
+ PrintLog "Open Business Cards dialog with File / New / Business Cards"
+ if ( hCreateBusinessCards ) then
+ PrintLog "Switch to Tabpage 'Medium'"
+ Kontext
+ Active.Setpage TabEtikettenMedium
+
+ Kontext "TabEtikettenMedium"
+ if ( TabEtikettenMedium.exists( 1 ) ) then
+ Call DialogTest (TabEtikettenMedium)
+
+ PrintLog "Check number of brands and types (see #i44801# for details)"
+ For iFormat = 1 to 2
+ Select Case iFormat
+ Case 1
+ Endlos.Check
+ printlog "Continous is checked"
+ Case 2
+ Bogen.Check
+ printlog "Sheet is checked"
+ end select
+
+ PrintLog "There should be 10 brands in list"
+ For iBrand = 1 to Marke.GetItemCount
+ Marke.Select( cBrandList( iBrand ) )
+ printlog "- Brand: " & Marke.GetSelText
+ sTypes = Typ.GetItemCount
+ Select Case iBrand
+ Case 1:
+ PrintLog "Avery/A4 should have 295 types in list if 'Sheet' is checked"
+ PrintLog "Avery/A4 should have 1 type in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 1 else vTypes = 295
+ Case 2:
+ PrintLog "Avery A4/Asia should have 88 types in list if 'Sheet' is checked"
+ PrintLog "Avery A4/Asia should have 1 type in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 1 else vTypes = 88
+ Case 3:
+ PrintLog "Avery Lettersize should have 251 types in list if 'Sheet' is checked"
+ PrintLog "Avery Lettersize should have 45 types in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 45 else vTypes = 251
+ Case 4:
+ PrintLog "Avery Zweckform should have 333 types in list if 'Sheet' is checked"
+ PrintLog "Avery Zweckform should have 67 types in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 67 else vTypes = 333
+ Case 5:
+ PrintLog "Herlitz should have 26 types in list if 'Sheet' is checked"
+ PrintLog "Herlitz should have 6 types in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 6 else vTypes = 26
+ Case 6:
+ PrintLog "Herma A4 should have 492 types in list if 'Sheet' is checked"
+ PrintLog "Herma A4 should have 1 type in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 1 else vTypes = 492
+ Case 7:
+ PrintLog "Herma A5 should have 18 types in list if 'Sheet' is checked"
+ PrintLog "Herma A5 should have 1 type in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 1 else vTypes = 18
+ Case 8:
+ PrintLog "Herma endlos should have 1 type in list if 'Sheet' is checked"
+ PrintLog "Herma endlos should have 119 types in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 119 else vTypes = 1
+ Case 9:
+ PrintLog "Leitz should have 13 types in list if 'Sheet' is checked"
+ PrintLog "Leitz should have 1 type in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 1 else vTypes = 13
+ Case 10:
+ PrintLog "Sigel should have 20 types in list if 'Sheet' is checked"
+ PrintLog "Sigel should have 1 type in list if 'Continous' is checked"
+ if ( iFormat = 1 ) then vTypes = 1 else vTypes = 20
+ Case else:
+ Warnlog "- There are more than 10 brands in list"
+ end select
+
+ if sTypes <> vTypes then Warnlog "- Not " & sTypes & " types in list but " & vTypes
+ For iType = 1 to Typ.GetItemCount
+ Typ.Select iType
+ printlog "- Type: " & Typ.GetSelText
+ next iType
+ next iBrand
+ next iFormat
+
+ PrintLog "Switch to Tabpage 'Business Cards'"
+ Kontext
+ Active.Setpage TabVisitenkarten
+ else
+ warnlog( "Dialog <TabEtiketteMedium> not available" )
+ end if
+
+ Kontext "Active"
+ if ( Active.GetRT = 304 ) then
+ Warnlog( "UNexpected messagebox: " & Active.GetText() )
+ Active.Ok
+ end if
+
+ Kontext "TabVisitenkarten"
+ for iWait = 1 to 100
+ if Inhalt.IsVisible then
+ Call DialogTest (TabVisitenkarten)
+ iWait = 101
+ else
+ wait( 100 )
+ end if
+ next iWait
+
+ PrintLog "Switch to Tabpage 'Private'"
+ Kontext
+ Active.Setpage TabPrivat
+
+ Kontext "TabPrivat"
+ Call DialogTest (TabPrivat)
+
+ PrintLog "Switch to Tabpage 'Business'"
+ Kontext
+ Active.Setpage TabGeschaeft
+
+ Kontext "TabGeschaeft"
+ Call DialogTest (TabGeschaeft)
+
+ Kontext
+ Active.Setpage TabFormatEtiketten
+
+ PrintLog "Switch to Tabpage 'Format'"
+ Kontext "TabFormatEtiketten"
+ Call DialogTest (TabFormatEtiketten)
+
+ PrintLog "Click pushbutton 'Save'"
+ FormatSpeichern.Click
+
+ PrintLog "Close upcoming dialog 'Save Label Format'"
+ Kontext "SaveLabelFormat"
+
+ Call DialogTest (SaveLabelFormat)
+ SaveLabelFormat.Cancel
+
+ Kontext "TabFormatEtiketten"
+ Kontext
+ Active.Setpage TabZusaetzeEtiketten
+
+ Kontext "TabZusaetzeEtiketten"
+ Call DialogTest (TabZusaetzeEtiketten)
+ Einrichten.Click
+
+ Kontext "DruckerEinrichten"
+ if ( DruckerEinrichten.Exists( 1 ) ) then
+ DruckerEinrichten.Cancel
+ else
+ Warnlog "No Default Printer configured for this system. Set one!"
+ end if
+
+ Kontext "TabZusaetzeEtiketten"
+ PrintLog "Switch to Tabpage 'Options'"
+ PrintLog "Check Checkbox 'Syncronize contents"
+ InhaltSynchronisieren.Check
+
+ PrintLog "Click 'new Document'"
+ NeuesDok.Click
+
+ Kontext "Active"
+ if ( Active.Exists( 2 ) ) then
+ try
+ Active.Ok
+ catch
+ Active.Cancel
+ Warnlog "Once Document has been opened, office asks to save it! BugID 89702"
+ endcatch
+ end if
+
+ PrintLog "Check i dialog 'Syncronize Labels' is up"
+ Kontext "EtikettenSynchronisieren"
+ if ( EtikettenSynchronisieren.Exists( 2 ) ) then
+ Call DialogTest ( EtikettenSynchronisieren )
+ Synchronisieren.Click
+ else
+ Warnlog "Dialog to synchronize Business Cards not up!"
+ end if
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+ else
+ warnlog( "Failed to create business cards" )
+ end if
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileOpen
+
+ printLog "- File / Open"
+
+ FileOpen
+
+ Kontext "OeffnenDlg"
+ if ( OeffnenDlg.exists( 2 ) ) then
+
+ Call DialogTest ( OeffnenDlg )
+
+ PrintLog "Click 'Up one level'"
+ UebergeordneterOrdner.Click
+
+ WaitSlot()
+
+ try
+ PrintLog "Click button 'Default directory'"
+ Standard.Click
+ WaitSlot()
+ catch
+ ExceptLog
+ endcatch
+
+ PrintLog "Click Button 'New folder'"
+ if ( NeuerOrdner.exists() ) then
+ if ( NeuerOrdner.isVisible() ) then
+ if ( NeuerOrdner.IsEnabled() ) then
+ NeuerOrdner.Click
+
+ Kontext "NeuerOrdner"
+ if ( NeuerOrdner.exists( 1 ) ) then
+ PrintLog "Enter a foldername in upcoming dialog"
+ OrdnerName.SetText( "TT_Test" )
+
+ PrintLog "Close dialog with 'Cancel'"
+ NeuerOrdner.Cancel
+ else
+ warnlog( "Dialog <NeuerOrdner> not available" )
+ end if
+ else
+ Warnlog( "New Folder button disabled" )
+ end if
+ else
+ Warnlog( "New Folder button not visible" )
+ end if
+ else
+ Warnlog( "New Folder button missing on dialog" )
+ end if
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ else
+ warnlog( "File Open dialog is not available" )
+ end if
+ PrintLog "Close File-Open-dialog with 'Cancel'"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileClose
+
+ PrintLog "- File/Close"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Insert a table"
+ Call hTabelleEinfuegen
+
+ PrintLog "File / Close"
+ hUseAsyncSlot( "FileClose" )
+
+ PrintLog( "Cancel saving the document" )
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ Active.Cancel
+ else
+ Warnlog( "No warning for modified document" )
+ end if
+
+ PrintLog "again File / Close"
+ hUseAsyncSlot( "FileClose" )
+
+ Printlog( "Confirm to save the document" )
+ Kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ Active.Yes()
+ else
+ warnlog( "No warning for modified document" )
+ end if
+
+ PrintLog "Click 'Cancel' in File-Save-Dialog"
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.Exists( 1 ) ) then
+ SpeichernDlg.Cancel
+ else
+ Kontext "Active"
+ if Active.Exists() then
+ Warnlog Active.Gettext()
+ Active.Ok()
+ else
+ Warnlog( "File Save dialog not displayed, messagebox came up instead" )
+ end if
+ end if
+
+ PrintLog "Choose File / Close again"
+ hUseAsyncSlot( "FileClose" )
+
+ PrintLog "On upcoming messagebox click 'No'"
+ Kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ Active.No
+ else
+ warnlog( "Expected messagebox missing" )
+ end if
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSave
+
+ PrintLog "- File/Save"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Insert a table"
+ Call hTabelleEinfuegen
+
+ PrintLog "Choose 'File / Save'"
+ FileSave
+
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 2 ) ) then
+
+ Call DialogTest ( SpeichernDlg )
+ PrintLog "In File-Dialog click 'Up one level'"
+ UebergeordneterOrdner.Click
+
+ WaitSlot()
+
+ try
+ PrintLog "Click 'Default directory'"
+ Standard.Click
+ WaitSlot()
+ catch
+ ExceptLog
+ endcatch
+
+ PrintLog "Click 'Create New Folder '"
+ if ( NeuerOrdner.exists() ) then
+ if ( NeuerOrdner.isVisible() ) then
+ if ( NeuerOrdner.IsEnabled() ) then
+ NeuerOrdner.Click
+
+ Kontext "NeuerOrdner"
+ if ( NeuerOrdner.exists( 1 ) ) then
+
+ PrintLog "Enter a foldername in upcoming dialog"
+ OrdnerName.SetText( "TT_Test" )
+
+ PrintLog "Close dialog with 'Cancel'"
+ NeuerOrdner.Cancel
+ else
+ warnlog( "Dialog <NeuerOrdner> not available" )
+ end if
+ else
+ Warnlog( "New Folder button disabled" )
+ end if
+ else
+ Warnlog( "New Folder button not visible" )
+ end if
+ else
+ Warnlog( "New Folder button missing on dialog" )
+ end if
+
+ Kontext "SpeichernDlg"
+ SpeichernDlg.cancel()
+ else
+ warnlog( "File Save dialog is not available" )
+ end if
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSaveAll
+
+ PrintLog "- File / Save All"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Insert a table in document"
+ Call hTabelleEinfuegen
+
+ PrintLog "Open a second document"
+ Call hNewDocument
+
+ PrintLog "Insert a table in second document"
+ Call hTabelleEinfuegen
+
+ PrintLog "Choose File / Save all"
+ FileSaveAll
+
+ PrintLog "Cancel 1. upcoming Filedialog"
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 2 ) ) then
+ SpeichernDlg.Cancel
+ else
+ warnlog( "First File Save dialog is not available" )
+ end if
+
+ PrintLog "Cancel 2. upcoming Filedialog"
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 2 ) ) then
+ SpeichernDlg.Cancel
+ else
+ warnlog( "Second File Save dialog is not available" )
+ end if
+
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 1 ) ) then
+ warnlog( "Third, unexpected File Save dialog open" )
+ SpeichernDlg.cancel()
+ end if
+
+ PrintLog "Close documents"
+ hFileCloseAll()
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSaveAs
+
+ PrintLog "- File / Save As"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Choose 'File / Save as'"
+ FileSaveAs
+
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 1 ) ) then
+
+ Call DialogTest ( SpeichernDlg )
+
+ PrintLog "Click button 'Up one level'"
+ UebergeordneterOrdner.Click()
+
+ WaitSlot()
+
+ PrintLog "Click button 'Default Directory'"
+ try
+ Standard.Click
+ catch
+ ExceptLog
+ endcatch
+
+ PrintLog "Click button 'Create Folder'"
+ if ( NeuerOrdner.exists() ) then
+ if ( NeuerOrdner.isVisible() ) then
+ if ( NeuerOrdner.IsEnabled() ) then
+ NeuerOrdner.Click
+
+ Kontext "NeuerOrdner"
+ if ( NeuerOrdner.exists( 1 ) ) then
+
+ Printlog( "Name the folder" )
+ OrdnerName.SetText( "TT_Test" )
+ PrintLog "Close dialog with 'Cancel'"
+ NeuerOrdner.Cancel
+ else
+ warnlog( "Dialog <NeuerOrdner> not available" )
+ end if
+ else
+ Warnlog( "New Folder button disabled" )
+ end if
+ else
+ Warnlog( "New Folder button not visible" )
+ end if
+ else
+ Warnlog( "New Folder button missing on dialog" )
+ end if
+
+ Kontext "SpeichernDlg"
+ SpeichernDlg.Cancel
+ else
+ warnlog( "File Save dialog is not available" )
+ end if
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSaveAsExport
+
+ QaErrorLog "#i93340# - Testcase outcommented due to bug with filter."
+ goto endsub
+
+ Dim xExport as string
+ Dim xExportFile as string
+ Dim CountDocu as integer
+ PrintLog "- File / Save As / Export with MS-filter"
+
+ Select Case gApplication
+ Case "WRITER"
+ xExport = Convertpath( gTesttoolpath + "writer\required\input\st1_1.sxw" )
+ Case else
+ goto endsub
+ end select
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Open document '..\writer\required\input\st1_1.sxw"
+ Call hFileOpen(xExport)
+
+ Call sMakeReadOnlyDocumentEditable
+
+ PrintLog "Select Save as .. and choose 'Microsoft Word 97/2000/XP' as export-filter"
+ xExportFile = gOfficepath + "user\work\ecksport.doc"
+ Call hFileSaveAsWithFilterKill (xExportFile, "MS Word 2003 XML")
+
+ if ( hFileCloseAll() > 1 ) then
+ QAErrorlog "More than 1 document had to be closed!"
+ end if
+
+ PrintLog "Close document"
+ Call hCloseDocument
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSaveWithPassword
+
+ Dim sFileName1 as string
+ dim sFileName2 as string
+ dim sFilePath as string
+
+ Printlog "- File / Save with Password"
+ Select Case gApplication
+ Case "WRITER"
+ sFileName1 = "password.odt"
+ sFileName2 = "password2.odt"
+ Case "MASTERDOCUMENT"
+ sFileName1 = "password.odm"
+ sFileName2 = "password2.odm"
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Enter some text into document"
+ Call wTypeKeys("This document will be saved with a password!")
+
+ sFilePath = ConvertPath ( gOfficePath + "user\work\" + sFileName1 )
+ hDeleteFile( sFilePath )
+
+ PrintLog "Choose File / Save as."
+ FileSaveAs
+
+ PrintLog "enter destination and check 'Password'"
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 2 ) ) then
+ if ( Passwort.exists() ) then
+ if ( Passwort.isEnabled() ) then
+ Passwort.Check()
+ else
+ warnlog( "FATAL: Password checkbox is not enabled" )
+ goto endsub
+ end if
+ else
+ warnlog( "FATAL: Password checkbox does not exist" )
+ goto endsub
+ end if
+
+ PrintLog "Save the document"
+ Dateiname.SetText( sFilePath )
+ Speichern.Click()
+
+ printlog( "JSK: Unknown messagebox handled silently before refactoring" )
+ Kontext "Active"
+ if ( Active.Exists (1) ) then
+ warnlog( "Unexpected messagebox: " & Active.getText() )
+ Active.Yes
+ end if
+
+ PrintLog "Password dialog has to come up"
+ Kontext "PasswordFileSave"
+ if ( PasswordFileSave.Exists( 1 ) ) then
+
+ PrintLog "Enter your password"
+ Password.SetText( "12345" )
+
+ PrintLog "Re-Enter a wrong passwort"
+ PasswordConfirm.Settext( "54321" )
+ PasswordFileSave.OK
+ else
+ Warnlog "- Password-Dialog not up !"
+ end if
+
+ Kontext "Active"
+ PrintLog "A messagebox has to come up, warns of wrong confirmation"
+ if ( Active.Exists( 1 ) )then
+ Active.OK
+ else
+ Warnlog "Able to save document with wrong password"
+ end if
+
+ Kontext "PasswordFileSave"
+ if ( PasswordFileSave.Exists() ) then
+ PrintLog "Enter new password, and re-enter the same password"
+ Password.SetText( "12345" )
+ PasswordConfirm.SetText( "12345" )
+ PasswordFileSave.OK
+ else
+ Warnlog "- Password-Dialog not up !"
+ end if
+ else
+ warnlog( "Dialog <SpeichernDlg> not available" )
+ end if
+
+
+ PrintLog "Close the document"
+ hUseAsyncSlot( "FileClose" )
+
+ PrintLog "Open previous saved document"
+ hFileOpen( sFilePath )
+
+ Kontext "PasswordFileOpen"
+ PrintLog "Enter a wrong password."
+ if ( PasswordFileOpen.Exists() ) then
+ PasswortName.SetText( "34567" )
+ PasswordFileOpen.OK()
+ else
+ Warnlog "- Password-Dialog not up or Document couldn't be loaded!"
+ end if
+
+ PrintLog "A messagebox has to come up, warns of wrong password"
+ Kontext "Active"
+ if ( Active.Exists(1) ) then
+ printlog( "Warning for incorrect password -> good" )
+ Active.OK()
+ else
+ Warnlog "Able to load document with wrong password"
+ end if
+
+ Kontext "PasswordFileOpen"
+ PrintLog "Cancel Password dialog (not loading the document"
+ if ( PasswordFileOpen.Exists( 1 ) ) then
+ PasswordFileOpen.Cancel()
+ end if
+
+ PrintLog "File / Open again your previous saved document"
+ hFileOpen( sFilePath )
+
+ PrintLog "Enter your password in password dialog"
+ Kontext "PasswordFileOpen"
+ if ( PasswordFileOpen.Exists() ) then
+ PasswortName.SetText( "12345" )
+ PasswordFileOpen.OK()
+ else
+ Warnlog "- Password-Dialog not up!"
+ end if
+
+ ' Rename document, the old one is now obsolete
+ sFilePath = ConvertPath ( gOfficePath + "user\work\" + sFileName2 )
+ hDeleteFile( sFilePath )
+
+
+ PrintLog "File / Save as ..."
+ hUseAsyncSlot( "FileSaveAs" )
+
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 2 ) ) then
+
+ printlog( "Verify that password setting is persistent" )
+ if ( Not Passwort.IsChecked ) then
+ if ( gPlatgroup = "unx" ) then
+ QAErrorlog "#i73968#Opening a password protected file looses focus after loading"
+ else
+ Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !"
+ Passwort.Check
+ end if
+ SpeichernDlg.Cancel
+ else
+ Dateiname.SetText( sFilePath )
+ Speichern.Click()
+
+ printlog( "JSK: Unknown messagebox handled silently before refactoring" )
+ Kontext "Active"
+ if ( Active.Exists( 2 ) ) then
+ printlog( "Messagebox: " & Active.getText() )
+ Active.Yes()
+ end if
+
+ PrintLog "Click on 'Save' in file open dialog"
+ Kontext "PasswordFileSave"
+ if ( PasswordFileSave.Exists( 1 ) ) then
+
+ Password.SetText( "54321" )
+ PasswordConfirm.SetText( "54321" )
+ PasswordFileSave.OK()
+
+ PrintLog( "The password dialog should come up" )
+ hUseAsyncSlot( "FileClose" )
+
+ PrintLog "File / Close and open your document again"
+ hFileOpen( sFilePath )
+
+ Kontext "PasswordFileOpen"
+ if ( PasswordFileOpen.exists() ) then
+ PasswortName.SetText "54321"
+ PasswordFileOpen.OK
+ else
+ warnlog( "Password dialog did not open" )
+ end if
+ else
+ Warnlog "Passworddialog is not coming up on saving document"
+ end if
+ end if
+ else
+ warnlog( "Dialog <SpeichernDlg> not available" )
+ end if
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+
+testcase tFileReload
+
+ Dim DokumentPfad$
+ Dim Datei$
+ Dim sFile$
+ Dim WriterFilterExtension(10) as string
+ Dim MasterDocFilterExtension(10) as string
+
+ WriterFilterExtension() = hGetFilternameExtension ( "writer8" )
+ MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" )
+
+ PrintLog "- File / Reload"
+ Select Case gApplication
+ Case "WRITER"
+ sFile$ = "reload." & WriterFilterExtension(0)
+ Case "MASTERDOCUMENT"
+ sFile$ = "reload." & MasterDocFilterExtension(0)
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Enter some text, save and close document"
+ Call wTypeKeys("File -> Reload!")
+ Call hFileSaveAsKill ( gOfficePath + "user\work\" + sFile$ )
+ FileClose
+ Kontext
+ if MessageBox.Exists (1) then
+ WarnLog "Messagebox after saving and closing : " + MessageBox.GetText
+ MessageBox.Yes
+ end if
+ Wait (500)
+
+ PrintLog "Open previous saved document"
+ Call hFileOpen ( gOfficePath + "user\work\" + sFile$ )
+ PrintLog "Insert a table in document"
+ Call hTabelleEinfuegen
+ PrintLog "File / Reload"
+ FileReload
+ WaitSlot(1000)
+ PrintLog "Quit messagebox with 'No'"
+ Kontext "Active"
+ Active.No
+ Wait (500)
+
+ PrintLog "File / Reload again and quit messagebox with yes"
+ FileReload
+
+ WaitSlot(2000)
+ Kontext "Active"
+ Active.Yes
+ Wait (500)
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileVersions
+ Dim sFile$
+ Dim WriterFilterExtension(10) as string
+ Dim MasterDocFilterExtension(10) as string
+
+ WriterFilterExtension() = hGetFilternameExtension ( "writer8" )
+ MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" )
+
+ PrintLog "- File / Versions"
+ Select Case gApplication
+ Case "WRITER"
+ sFile$ = "kann_weg." & WriterFilterExtension(0)
+ Case "MASTERDOCUMENT"
+ sFile$ = "kann_weg." & MasterDocFilterExtension(0)
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ PrintLog "Open new document"
+ Call hNewDocument
+ Call wTypeKeys ("File version")
+ PrintLog "enter some text in documet and save it"
+ Call hFileSaveAsKill(gOfficePath + "user\work\" + sFile$)
+ Sleep 1
+
+ try
+ PrintLog "Choose File / Versions"
+ FileVersions
+ catch
+ Warnlog "- File / Versions not accessible!"
+ goto endsub
+ endcatch
+
+ PrintLog "In Version-dialog click 'Save New Version'"
+ Kontext "Versionen"
+ Call DialogTest ( Versionen )
+ Speichern.Click
+ PrintLog "Cancel dialog 'Insert version comment'"
+ Kontext "VersionskommentarEingeben"
+ Call DialogTest ( VersionskommentarEingeben )
+ VersionskommentarEingeben.Cancel
+
+ PrintLog "Close dialog"
+ Kontext "Versionen"
+ Versionen.Close
+
+ PrintLog "Close documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+'-----------------------------------------------------------
+
diff --git a/testautomation/writer/required/includes/w_001a_.inc b/testautomation/writer/required/includes/w_001a_.inc
new file mode 100644
index 000000000000..ad4951e89a44
--- /dev/null
+++ b/testautomation/writer/required/includes/w_001a_.inc
@@ -0,0 +1,474 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description: Testcases for the Writer Required-test.
+'*
+'\***********************************************************************
+
+sub w_001a_
+
+ printLog Chr(13) + "--------- File Menu (w_001a_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tFileProperties
+
+ Call tFileTemplatesOrganize
+ Call tFileTemplatesAddressbookSource
+ Call tFileTemplatesSave
+ Call tFileTemplatesEdit
+
+ Call tFilePagePreview
+ Call tPrintCommon()
+ Call tPrintGeneral()
+ Call tPrintApplication()
+ Call tPrintLayout()
+ Call tPrintOptions()
+ Call tFilePrinterSetup
+
+ 'Writer Master Document
+ gApplication = "MASTERDOCUMENT"
+ Call tMasterDocFilePagePreview
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tFileProperties
+ PrintLog "- File / Properties"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " File / Properties"
+ FileProperties
+
+ WaitSlot(5000)
+ Kontext
+ try
+ active.SetPage TabDokument
+ catch
+ Warnlog "Dialog 'FileProperties' not up! (Bug#99828)"
+ goto endsub
+ endcatch
+
+ printlog " Switch to Tabpage 'General'"
+ Kontext "TabDokument"
+ Call DialogTest (TabDokument)
+
+ printlog " Switch to Tabpage 'Description'"
+ Kontext
+ active.SetPage TabDokumentinfo
+ Kontext "TabDokumentinfo"
+ Call DialogTest (TabDokumentinfo)
+
+
+ QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed."
+ ' printlog " Switch to Tabpage 'User defined'"
+ ' Kontext
+ ' active.SetPage TabBenutzer
+ ' Kontext "TabBenutzer"
+ ' Call DialogTest ( TabBenutzer )
+
+ ' Wait 500
+
+ ' Infofelder.Click
+ ' printlog " Click 'Infofields'"
+ ' Kontext "InfonamenBearbeiten"
+ ' printlog " Close upcoming dialog with 'Cancel'"
+ ' Call DialogTest (InfonamenBearbeiten)
+ ' InfonamenBearbeiten.Cancel
+
+ printlog " Switch to Tabpage 'Internet'"
+ Kontext
+ active.SetPage TabInternet
+ Kontext "TabInternet"
+ Call DialogTest (TabInternet)
+
+ printlog " Switch to Tabpage 'Statistics' and close dialog"
+ Kontext
+ active.SetPage TabStatistik
+ Kontext "TabStatistik"
+ Call DialogTest (TabStatistik)
+ TabStatistik.Close
+
+ Sleep 1
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesOrganize
+ Dim i as integer
+
+ PrintLog " Open new document."
+ Call hNewDocument
+ PrintLog " File / Templates / Organize"
+ FileTemplatesOrganize
+ Kontext "DVVerwalten"
+ For i = 1 to 50
+ if DVVerwalten.Exists then
+ i = 51
+ else
+ Sleep 5
+ end if
+ next i
+ if Not DVVerwalten.Exists then
+ Warnlog "Dialog 'Template Management' not up !"
+ Call hCloseDocument
+ goto endsub
+ end if
+ wait 500
+ PrintLog " Select first entry in left list of dialog 'Template Management' (should be 'My Templates')"
+ ListeLinks.Select 1
+ ListeLinks.TypeKeys "<Home>"
+ Sleep 1
+ Befehle.Click
+ wait 500
+ PrintLog " Select 'Commands -> Import Template'"
+ Call hMenuSelectNr(3)
+ Wait 500
+ PrintLog " Close Filedialog."
+ if gUseSysDlg = False then
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "FileOpen dialog not up!"
+ end if
+ end if
+
+ PrintLog " Select 'Commands -> Printer Settings"
+ Kontext "DVVerwalten"
+ Sleep 1
+ Befehle.Click
+ wait 500
+ Call hMenuSelectNr(4)
+
+ PrintLog " Cancel 'Printer-Setup' dialog"
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists then
+ DruckerEinrichten.Cancel
+ else
+ Warnlog "Printersettings dialog is not up!"
+ end if
+
+ PrintLog " Select first entry in right list"
+ Kontext "DVVerwalten"
+ ListeRechts.Select 1
+
+ PrintLog " Select pushbutton 'File..'"
+ if WelcheDatei.IsEnabled then
+ WelcheDatei.Click
+ if gUseSysDlg = False then
+ PrintLog " Cancel Filedialog"
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+ end if
+
+ PrintLog " Select pushbutton 'Address Book'"
+ Kontext "DVVerwalten"
+ AddressBook.Click
+ Kontext "AddressbookSource"
+ PrintLog " Cancel Dialog 'Address Book-Assignment'"
+ if AddressbookSource.Exists then
+ AddressbookSource.Cancel
+ else
+ Warnlog "the Dialog ' Address Book Source' wasnt up!"
+ end if
+
+ PrintLog " Close dialog"
+ Kontext "DVVerwalten"
+ DVVerwalten.Close
+
+ PrintLog " Close active document."
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesAddressbookSource
+
+ PrintLog " Open new document"
+ Call hNewDocument
+
+ PrintLog " File / Templates /Address Book Source..."
+ UseBindings
+ FileTemplatesAddressbookSource
+
+ WaitSlot(2000)
+ PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'"
+ Kontext "AddressbookSource"
+ if AddressbookSource.Exists then
+ Call DialogTest (AddressbookSource)
+ Administrate.Click
+ Sleep 2
+ PrintLog " Close 'Data Source Administration' with 'Cancel'"
+ Kontext "DatabaseProperties"
+ if Not DatabaseProperties.Exists then
+ Kontext "AddressSourceAutopilot"
+ if AddressSourceAutopilot.Exists then
+ AddressSourceAutopilot.Cancel
+ end if
+ Kontext "AddressbookSource"
+ AddressbookSource.Cancel
+ else
+ PrintLog " DatabaseProperties.SetPage TabConnection"
+ Kontext "TabConnection"
+ Call DialogTest ( TabConnection )
+ Kontext "DatabaseProperties"
+ DatabaseProperties.Close
+ Kontext "AddressbookSource"
+ PrintLog " Close dialog"
+ AddressbookSource.Cancel
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesSave
+ if gApplication = "MASTERDOCUMENT" then
+ qaErrorLog " tFileTemplatesSave has been disabled in Masterdocument."
+ goto endsub
+ end if
+ printlog "- File / Templates / Save"
+ Call hNewDocument
+ printlog " Open new document"
+ FileTemplatesSave
+ printlog " File / Templates / Save"
+
+ Kontext "DokumentVorlagen"
+ Call DialogTest ( DokumentVorlagen )
+ printlog " On 'Templates' dialog click 'Organizer'"
+
+ Verwalten.Click
+ Kontext "DVVerwalten"
+ DVVerwalten.Close
+ printlog " Close dialog 'Template Management'"
+
+ Kontext "DokumentVorlagen"
+ DokumentVorlagen.Cancel
+ printlog " Close 'Templates' dialog"
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesEdit
+ printlog "- File / Templates / Edit"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " File / Templates / Edit"
+ FileTemplatesEdit
+
+ if gUseSysDlg = False then
+ printlog " Cancel Filedialog"
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFilePagePreview
+ PrintLog "- File / Page Preview"
+ Dim gehtnicht as boolean
+ gehtnicht = FALSE
+ printlog " Open new document"
+ Select Case gApplication
+ Case "WRITER"
+ Call hNewDocument
+
+ Case "MASTERDOCUMENT"
+ Call hNewDocument
+
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ printlog " Enter some text in document"
+ Call wTypeKeys("Just a small change!")
+ printlog " File / Page Preview"
+ FilePageView
+ WaitSlot (1000)
+ Kontext "DocPageViewWriter"
+ if DocPageViewWriter.NotExists then
+ Warnlog "Page Preview is not coming up!"
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
+ end if
+ else
+ if gehtnicht=FALSE then
+ Kontext "PreviewObjectbar"
+ if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
+ printlog " Select 'Zoom 100%' in toolbar"
+ try
+ Massstab.Select 4
+ catch
+ Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
+ endcatch
+
+ printlog " Click 'Print Page Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ DruckenSeitenansicht.Click
+ Kontext "Active"
+ if Active.Exists then
+ QAErrorlog "No default printer!"
+ Active.ok
+ Sleep 1
+ Kontext "Printing"
+ if Printing.Exists then Printing.Cancel
+ else
+ printlog " Close 'Print' dialog with cancel"
+ Kontext "Printing"
+ Printing.Cancel
+ end if
+
+ printlog " Close Page Preview with button 'Close Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ SeitenansichtSchliessen.Click
+ else
+ Warnlog "Objectbar not addressable!"
+ end if
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFilePrinterSetup
+ PrintLog " Open new document"
+ Call hNewDocument
+
+ PrintLog " File / Printer Settings"
+ FilePrintersettings
+ Kontext "Active"
+ WaitSlot(1000)
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorLog "No Default Printer!"
+ Active.Ok
+ Sleep 2
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists then
+ Call DialogTest ( DruckerEinrichten )
+ DruckerEinrichten.Cancel
+ end if
+ end if
+ else
+ Kontext "DruckerEinrichten"
+ Call DialogTest ( DruckerEinrichten )
+ DruckerEinrichten.Cancel
+ PrintLog " Cancel 'Printer Setup' dialog"
+ end if
+ PrintLog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFilePagePreview
+ PrintLog "- File / Page Preview"
+ Dim gehtnicht as boolean
+ gehtnicht = FALSE
+ gApplication = "MASTERDOCUMENT"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Enter some text in document"
+ Call wTypeKeys("Just a small change!")
+ printlog " File / Page Preview"
+ FilePageView
+ WaitSlot (1000)
+ Kontext "DocPageViewWriter"
+ if DocPageViewWriter.NotExists then
+ Warnlog "Page Preview is not coming up!"
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
+ end if
+ else
+ if gehtnicht=FALSE then
+ Kontext "PreviewObjectbar"
+ if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
+ printlog " Select 'Zoom 100%' in toolbar"
+ try
+ Massstab.Select 4
+ catch
+ Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
+ endcatch
+
+ printlog " Click 'Print Page Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ DruckenSeitenansicht.Click
+ Kontext "Active"
+ if Active.Exists then
+ QAErrorlog "No default printer!"
+ Active.ok
+ Sleep 1
+ Kontext "Printing"
+ if Printing.Exists then Printing.Cancel
+ else
+ printlog " Close 'Print' dialog with cancel"
+ Kontext "Printing"
+ Printing.Cancel
+ end if
+
+ printlog " Close Page Preview with button 'Close Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ SeitenansichtSchliessen.Click
+ else
+ Warnlog "Objectbar not addressable!"
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
diff --git a/testautomation/writer/required/includes/w_001b_.inc b/testautomation/writer/required/includes/w_001b_.inc
new file mode 100644
index 000000000000..979ae00504b8
--- /dev/null
+++ b/testautomation/writer/required/includes/w_001b_.inc
@@ -0,0 +1,870 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Required-Testcases for the File-menu.
+'*
+'\***********************************************************************
+
+sub w_001b_
+
+ printLog Chr(13) + "--------- File Menu (w_001b_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tToolsXMLFilterSettings
+ Call tFileExportAsPDF
+ Call tExportAsPDFButton
+ Call tFileSendCreateMasterDocument
+ Call tFileSendCreateHTMLDocument
+ Call tFileSendOutlineToPresentation
+ Call tFileSendOutlineToClipboard
+ Call tFileSendCreateAutoabstract
+ Call tFileSendAutoabstractToPresentation
+
+ 'Writer Master Document
+ gApplication = "MASTERDOCUMENT"
+ Call tMasterDocFileSaveWithPassword
+ Call tMasterDocFileReload
+ Call tMasterDocFileVersions
+ Call tMasterDocFileSendCreateHTMLDocument
+ Call tMasterDocFileSendOutlineToPresentation
+ Call tMasterDocFileSendOutlineToClipboard
+ Call tMasterDocFileSendCreateAutoabstract
+ Call tMasterDocFileSendAutoabstractToPresentation
+ gApplication = "WRITER"
+
+end sub
+
+'-------------------------------------------------------------------------------
+
+testcase tFileSendCreateMasterDocument
+ PrintLog "- File / Send / Create Masterdocument"
+ if gApplication <> "WRITER" then
+ printlog "Not in : " + gApplication
+ goto endsub
+ endif
+
+ PrintLog "Open new document"
+ Call hNewDocument
+ Call wTypeKeys("File -> Send -> Create Master Document")
+ PrintLog "Choose File / Send /Create Master Document"
+ FileSendCreateMasterdocument
+ Kontext "SendMasterDocument"
+
+ PrintLog "Cancel File-Save-dialog"
+ SendMasterdocument.Cancel
+ Kontext "Active"
+ if Active.Exists then Active.OK
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSendCreateHTMLDocument
+ PrintLog "- File / Send / Create HTML-Dokument"
+ PrintLog "Open new document"
+ Select Case gApplication
+ Case "WRITER"
+ Call hNewDocument
+ Case "MASTERDOCUMENT"
+ Call hNewDocument
+ Case "HTML"
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end select
+ PrintLog "Choose File / Send / Create HTML-Document"
+ FileSendCreateHTMLDocument
+
+ PrintLog "Cancel Filedialog"
+ Kontext "SendHTMLDocument"
+ SendHTMLDocument.Cancel
+ Kontext "Active"
+ if Active.Exists then Active.OK
+
+ PrintLog "Close documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSendOutlineToPresentation
+ Dim sFile$
+ PrintLog "- File / Send / Outline to Presentation"
+ Select Case gApplication
+ Case "WRITER"
+ sFile$ = "htmltest.sxw"
+ Case "MASTERDOCUMENT"
+ sFile$ = "htmltest.sxg"
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+ PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ )
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ Sleep 1
+ Kontext "DocumentWriter"
+ PrintLog "File / Send / Outline to presentation"
+ try
+ FileSendOutlineToPresentation
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait(500)
+
+ Kontext "DocumentImpressOutlineView"
+ if DocumentImpressOutlineView.Exists then
+ DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
+ DocumentImpressOutlineView.TypeKeys "<Shift End>"
+ Wait(500)
+ try
+ EditCopy
+ if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
+ catch
+ QAErrorlog "Send outline to presentation doesn't work correct."
+ endcatch
+ else
+ WarnLog "Outlinemode comes not up!"
+ endif
+
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ PrintLog "Close documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSendOutlineToClipboard
+ Dim sFile$
+ PrintLog "- File / Send / Outline to Clipboard"
+ Select Case gApplication
+ Case "WRITER"
+ sFile$ = "htmltest.sxw"
+ Case "MASTERDOCUMENT"
+ sFile$ = "htmltest.sxg"
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ )
+ Sleep 1
+ PrintLog "File / Send / Outline to Clipboard"
+ try
+ FileSendOutlineToClipboard
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Sleep 1
+ PrintLog "Close active document"
+ Call hCloseDocument
+ WaitSlot(1000)
+ Call hNewDocument
+ PrintLog "Open new document"
+
+ WaitSlot(1000)
+
+ PrintLog "Paste outline in new document"
+ hUseAsyncSlot( "EditPaste" )
+ Call wTypeKeys("<Up>", 6)
+ Call wTypeKeys("<Home><Shift End>")
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
+ WaitSlot(1000)
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSendCreateAutoabstract
+ Dim sFile$
+ PrintLog "- File / Send / Create Autoabstract"
+ Select Case gApplication
+ Case "WRITER"
+ sFile$ = "htmltest.sxw"
+ Case "MASTERDOCUMENT"
+ sFile$ = "htmltest.sxg"
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ )
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ Sleep 1
+ Kontext "DocumentWriter"
+ PrintLog "File / Send / Create Autoabstract"
+ try
+ FileSendCreateAutoabstract
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ WaitSlot(2000)
+
+ PrintLog "Close upcoming dialog with 'Ok"
+ Kontext "AutoAbstractErzeugen"
+ AutoAbstractErzeugen.OK
+ Sleep 1
+ Call wTypeKeys("<Home><Up>", 10)
+ Call wTypeKeys("<Shift End>")
+ try
+ EditCopy
+ WaitSlot(1000)
+ if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
+ catch
+ QAErrorlog "Empty autoabstract created"
+ endcatch
+
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ Sleep 1
+
+ PrintLog "Close active documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileSendAutoabstractToPresentation
+ Dim sFile$
+ PrintLog "- File / Send / Autoabstract to Presentation"
+ Select Case gApplication
+ Case "WRITER"
+ sFile$ = "htmltest.sxw"
+ Case "MASTERDOCUMENT"
+ sFile$ = "htmltest.sxg"
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile$ )
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ Sleep 1
+ Kontext "DocumentWriter"
+ PrintLog "File / Send / Create Autoabstract To Presentation"
+ try
+ FileSendAutoabstractToPresentation
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Sleep 1
+ Kontext "AutoAbstractErzeugen"
+ PrintLog "Close upcoming dialog with 'Ok'"
+ AutoAbstractErzeugen.OK
+
+ Sleep 2
+ Kontext "DocumentImpressOutlineView"
+ if DocumentImpressOutlineView.Exists then
+ PrintLog "Point cursor to beginning of document"
+ DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
+ PrintLog "Mark text"
+ DocumentImpressOutlineView.TypeKeys "<Shift End>"
+ try
+ EditCopy
+ WaitSlot(1000)
+ if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
+ catch
+ QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!"
+ endcatch
+ else
+ Warnlog "- Outline in Impress not created!"
+ endif
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ Sleep 1
+ Call hCloseDocument
+ PrintLog "Close active document"
+
+ Call wDocSetContext
+ FileClose
+endcase
+'--------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tMasterDocFileSaveWithPassword
+ Dim DokumentPfad$
+ Dim Datei$
+ Dim sFile$
+ Dim sFile2$
+
+ Printlog "- File / Save with Password"
+ sFile$ = "password.odm"
+ sFile2$ = "password2.odm"
+
+ gApplication = "MASTERDOCUMENT"
+ PrintLog "Open new document"
+ Call hNewDocument
+ PrintLog "Enter some text into document"
+ Call wTypeKeys("This document will be saved with a password!")
+
+ if gUseSysDlg = True then goto endsub
+ Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile$ )
+ if Dir (Datei$) <> "" then kill Datei$
+
+ PrintLog "Choose File / Save as."
+ FileSaveAs
+ PrintLog "enter destination and check 'Password'"
+ Kontext "SpeichernDlg"
+ if Passwort.IsEnabled then
+ Passwort.Check
+ else
+ Warnlog "- Not able to save with Password -> Checkbox is disabled! Maybe default-filter wrong!?"
+ SpeichernDlg.Cancel
+ PrintLog "if Checkbox is disabled the test stops here!"
+ Call hCloseDocument
+ goto endsub
+ endif
+
+ Dateiname.SetText Datei$
+ PrintLog "Save your document"
+ Speichern.Click
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists (1) then Active.Yes
+
+ Sleep 1
+ PrintLog "Password dialog has to come up"
+ Kontext "PasswordFileSave"
+ if PasswordFileSave.Exists then
+ PrintLog "Enter your password"
+ Password.SetText "12345"
+ PrintLog "Re-Enter a wrong passwort"
+ PasswordConfirm.Settext "54321"
+ PasswordFileSave.OK
+ Sleep 2
+ else
+ Warnlog "- Password-Dialog not up !"
+ endif
+
+ Kontext "Active"
+ Sleep 1
+ PrintLog "A messagebox has to come up, warns of wrong confirmation"
+ if Active.Exists(1) then
+ Active.OK
+ else
+ Warnlog "Able to save document with wrong password"
+ endif
+
+ Kontext "PasswordFileSave"
+ if PasswordFileSave.Exists then
+ PrintLog "Enter new password, and re-enter the same password"
+ Password.SetText "12345"
+ PasswordConfirm.SetText "12345"
+ PasswordFileSave.OK
+ else
+ Warnlog "- Password-Dialog not up !"
+ endif
+
+ Sleep 1
+ PrintLog "Close the document"
+ FileClose
+ WaitSlot(2000)
+ PrintLog "Open previous saved document"
+ Call hFileOpen(Datei$)
+
+ Kontext "PasswordFileOpen"
+ PrintLog "Enter a wrong password."
+ if PasswordFileOpen.Exists then
+ PasswortName.SetText "34567"
+ PasswordFileOpen.OK
+ else
+ Warnlog "- Password-Dialog not up or Document couldn't be loaded!"
+ endif
+
+ PrintLog "A messagebox has to come up, warns of wrong password"
+ Kontext "Active"
+ Sleep 1
+ if Not Active.Exists(1) then
+ Warnlog "Able to load document with wrong password"
+ else
+ Active.OK
+ endif
+
+ Kontext "PasswordFileOpen"
+ PrintLog "Close password dialog"
+ if PasswordFileOpen.Exists then
+ PasswordFileOpen.Cancel
+ endif
+
+ Sleep 1
+ PrintLog "File / Open again your previous saved document"
+ Call hFileOpen(Datei$)
+ PrintLog "Enter your password in password dialog"
+ Kontext "PasswordFileOpen"
+ if PasswordFileOpen.Exists then
+ PasswortName.SetText "12345"
+ PasswordFileOpen.OK
+ else
+ Warnlog "- Password-Dialog not up!"
+ endif
+ Sleep 1
+
+ Datei$ = ConvertPath ( gOfficePath + "user\work\" + sFile2$ )
+ if Dir (Datei$) <> "" then kill Datei$
+ PrintLog "File / Save as ..."
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ if Not Passwort.IsChecked = True then
+ if gPlatgroup = "unx" then
+ QAErrorlog "#i73968#Opening a password protected file looses focus after loading"
+ else
+ Warnlog "#i36015#Checkbox 'Save with password' is not checked in file-dialog !"
+ endif
+ Passwort.Check
+ SpeichernDlg.Cancel
+ else
+ Dateiname.SetText Datei$
+ Speichern.Click
+ Kontext "Active"
+ if Active.Exists(2) then Active.Yes
+ PrintLog "Click on 'Save' in file open dialog"
+ Kontext "PasswordFileSave"
+ if Not PasswordFileSave.Exists(1) then
+ Warnlog "Passworddialog is not coming up on saving document"
+ else
+ Password.SetText "54321"
+ PasswordConfirm.SetText "54321"
+ PasswordFileSave.OK
+ PrintLog "The password dialog should come up"
+ Sleep 1
+ FileClose
+ PrintLog "File / Close and open your document again"
+ Call hFileOpen(Datei$)
+ Sleep 1
+ Kontext "PasswordFileOpen"
+ PrintLog "Now the passwort dialog should come up"
+ if Not PasswordFileOpen.Exists(2) then
+ Warnlog "Passworddialog is not coming up on reload"
+ else
+ PasswortName.SetText "54321"
+ PasswordFileOpen.OK
+ endif
+ endif
+ endif
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFileReload
+
+ Dim sDocumentPath as string
+ Dim sFile as string
+ Dim WriterFilterExtension(10) as string
+ Dim MasterDocFilterExtension(10) as string
+
+ WriterFilterExtension() = hGetFilternameExtension ( "writer8" )
+ MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" )
+
+ PrintLog "- File / Reload"
+ sFile = "reload." & MasterDocFilterExtension(0)
+ sDocumentPath = gOfficePath + "user\work\" + sFile
+
+ gApplication = "MASTERDOCUMENT"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Enter some text, save and close document"
+ Call wTypeKeys("File -> Reload!")
+ Call hFileSaveAsKill ( sDocumentPath )
+ hUseAsyncSlot( "FileClose" )
+
+ Kontext
+ if ( MessageBox.Exists( 1 ) ) then
+ WarnLog "Messagebox after saving and closing : " + MessageBox.GetText
+ MessageBox.Yes
+ endif
+
+ PrintLog "Open previous saved document"
+ Call hFileOpen ( sDocumentPath )
+
+ PrintLog "Insert a table in document"
+ Call hTabelleEinfuegen
+
+ PrintLog "File / Reload"
+ hUseAsyncSlot( "FileReload" )
+
+ PrintLog "Quit messagebox with 'No'"
+ Kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ Active.No
+ else
+ warnlog( "Messagebox missing" )
+ endif
+
+ PrintLog "File / Reload again and quit messagebox with yes"
+ hUseAsyncSlot( "FileReload" )
+
+ Kontext "Active"
+ if ( Active.exists( 2 ) ) then
+ Active.Yes
+ else
+ warnlog( "Messagebox missing" )
+ endif
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+ hDeleteFile( sDocumentPath )
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFileVersions
+
+ Dim sFile as string
+ Dim WriterFilterExtension(10) as string
+ Dim MasterDocFilterExtension(10) as string
+
+ WriterFilterExtension() = hGetFilternameExtension ( "writer8" )
+ MasterDocFilterExtension() = hGetFilternameExtension ( "writerglobal8" )
+
+ gApplication = "MASTERDOCUMENT"
+
+ PrintLog "- File / Versions"
+ sFile = "kann_weg." & MasterDocFilterExtension(0)
+
+ PrintLog "Open new document"
+ Call hNewDocument
+ Call wTypeKeys ("File version")
+
+ PrintLog "enter some text in documet and save it"
+ Call hFileSaveAsKill(gOfficePath + "user\work\" + sFile )
+
+ try
+ PrintLog "Choose File / Versions"
+ FileVersions
+ catch
+ Warnlog "- File / Versions not accessible!"
+ goto endsub
+ endcatch
+
+ Kontext "Versionen"
+ if ( Versionen.exists( 2 ) ) then
+
+ Call DialogTest ( Versionen )
+ Speichern.Click
+
+ PrintLog "In Version-dialog click 'Save New Version'"
+ Kontext "VersionskommentarEingeben"
+ if ( VersionskommentarEingeben.exists( 1 ) ) then
+ Call DialogTest ( VersionskommentarEingeben )
+
+ PrintLog "Cancel dialog 'Insert version comment'"
+ VersionskommentarEingeben.Cancel
+ else
+ warnlog( "Dialog <VersionskommentarEingeben> is not available" )
+ endif
+
+ Kontext "Versionen"
+ PrintLog "Close dialog"
+ Versionen.Close()
+ else
+ warnlog( "Dialog <Versionen> is not available" )
+ endif
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFileSendCreateHTMLDocument
+
+ PrintLog "- File / Send / Create HTML-Dokument"
+
+ gApplication = "MASTERDOCUMENT"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Choose File / Send / Create HTML-Document"
+ FileSendCreateHTMLDocument
+
+ PrintLog "Cancel Filedialog"
+ Kontext "SendHTMLDocument"
+ if ( SendHTMLDocument.exists( 2 ) ) then
+ SendHTMLDocument.Cancel
+
+ Kontext "Active"
+ if Active.Exists( 1 ) then
+ warnlog( "Unexpected messgebox" & Active.getText() )
+ Active.OK
+ endif
+ else
+ warnlog( "Dialog <SendHTMLDocument> is not available" )
+ endif
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFileSendOutlineToPresentation
+
+ PrintLog "- File / Send / Outline to Presentation"
+
+ Dim sFile as string : sFile = "htmltest.sxg"
+
+ gApplication = "MASTERDOCUMENT"
+
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile )
+
+ Kontext "Navigator"
+ if ( Navigator.Exists ) then
+ Navigator.Close
+ WaitSlot()
+ endif
+
+ Kontext "DocumentWriter"
+ PrintLog "File / Send / Outline to presentation"
+ try
+ FileSendOutlineToPresentation
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Presentation'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Kontext "DocumentImpressOutlineView"
+ if ( DocumentImpressOutlineView.Exists( 2 ) ) then
+ DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
+ DocumentImpressOutlineView.TypeKeys "<Shift End>"
+ hUseAsyncSlot( "EditCopy" )
+ if ( GetClipboardText <> "Seite 1." ) then
+ QAErrorlog "Wrong Outline in Impress Outlinemode"
+ endif
+ else
+ WarnLog "Outlinemode comes not up!"
+ endif
+
+ Kontext "Navigator"
+ if Navigator.Exists then
+ Navigator.Close
+ WaitSlot()
+ endif
+
+ PrintLog "Close documents"
+ hFileCloseAll()
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFileSendOutlineToClipboard
+
+ gApplication = "MASTERDOCUMENT"
+ Dim sFile as string : sFile = "htmltest.sxg"
+
+ PrintLog "- File / Send / Outline to Clipboard"
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile )
+
+ PrintLog "File / Send / Outline to Clipboard"
+ try
+ FileSendOutlineToClipboard
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Outline to Clipboard'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Paste outline in new document"
+ hUseAsyncSlot( "EditPaste" )
+ Call wTypeKeys("<Up>", 6)
+ Call wTypeKeys("<Home><Shift End>")
+ hUseAsyncSlot( "EditCopy" )
+ if ( GetClipboardText <> "Seite 1." ) then
+ QAErrorlog "Wrong Outline in Impress Outlinemode"
+ endif
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFileSendCreateAutoabstract
+
+ gApplication = "MASTERDOCUMENT"
+ Dim sFile as string : sFile = "htmltest.sxg"
+
+ PrintLog "- File / Send / Create Autoabstract"
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile )
+
+ Kontext "Navigator"
+ if ( Navigator.Exists ) then
+ Navigator.Close
+ WaitSlot()
+ endif
+
+ Kontext "DocumentWriter"
+ PrintLog "File / Send / Create Autoabstract"
+ try
+ FileSendCreateAutoabstract
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Create Autoabstract'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ PrintLog "Close upcoming dialog with 'Ok"
+ Kontext "AutoAbstractErzeugen"
+ if ( AutoAbstractErzeugen.exists( 2 ) ) then
+
+ AutoAbstractErzeugen.OK()
+
+ Call wTypeKeys("<Home><Up>", 10)
+ Call wTypeKeys("<Shift End>")
+
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Seite 1." then
+ QAErrorlog "Wrong Outline in Impress Outlinemode"
+ endif
+ else
+ warnlog( "Dialog <AutoAbstractErzeugen> is not available" )
+ endif
+
+ Kontext "Navigator"
+ if ( Navigator.Exists ) then
+ Navigator.Close()
+ WaitSlot()
+ endif
+
+ PrintLog "Close documents"
+ hFileCloseAll()
+ gApplication = "WRITER"
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFileSendAutoabstractToPresentation
+
+ gApplication = "MASTERDOCUMENT"
+ Dim sFile as string : sFile = "htmltest.sxg"
+
+ PrintLog "- File / Send / Autoabstract to Presentation"
+ PrintLog "Open file ( gTesttoolPath + writer\required\input\ + htmltest.sxw )"
+ Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile )
+
+ Kontext "Navigator"
+ if Navigator.Exists then
+ Navigator.Close
+ Waitslot()
+ endif
+
+ Kontext "DocumentWriter"
+ PrintLog "File / Send / Create Autoabstract To Presentation"
+ try
+ FileSendAutoabstractToPresentation
+ catch
+ Warnlog "#i38723#Unable to execute 'File -> Send -> Autoabstract to Presentation'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Kontext "AutoAbstractErzeugen"
+ if ( AutoAbstractErzeugen.exists( 1 ) ) then
+ PrintLog "Close upcoming dialog with 'Ok'"
+ AutoAbstractErzeugen.OK
+ else
+ warnlog( "Dialog <AutoAbstractErzeugen> is not available" )
+ endif
+
+ Kontext "DocumentImpressOutlineView"
+ if ( DocumentImpressOutlineView.Exists( 2 ) ) then
+
+ PrintLog "Point cursor to beginning of document"
+ DocumentImpressOutlineView.TypeKeys "<Mod1 Home>"
+
+ PrintLog "Mark text"
+ DocumentImpressOutlineView.TypeKeys "<Shift End>"
+ try
+ EditCopy
+ WaitSlot(1000)
+ if GetClipboardText <> "Seite 1." then QAErrorlog "Wrong Outline in Impress Outlinemode"
+ catch
+ QAErrorlog "Edit / copy disabled. Maybe data could not be pasted correctly!"
+ endcatch
+ else
+ Warnlog "- Outline in Impress not created!"
+ endif
+
+ Kontext "Navigator"
+ if Navigator.Exists then
+ Navigator.Close
+ WaitSlot()
+ endif
+
+ Call hCloseDocument
+ PrintLog "Close active document"
+
+ Call wDocSetContext
+ FileClose
+ gApplication = "WRITER"
+
+endcase
+'-------------------------------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_002_.inc b/testautomation/writer/required/includes/w_002_.inc
new file mode 100755
index 000000000000..73de7ba6edeb
--- /dev/null
+++ b/testautomation/writer/required/includes/w_002_.inc
@@ -0,0 +1,1522 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'* **
+'* owner : helge.delfs@sun.com **
+'* **
+'* short description : **
+'* **
+'\******************************************************************
+
+sub w_002_
+
+ printLog Chr(13) + "--------- Edit Menu ( w_002_.inc ) ----------"
+ gApplication = "WRITER"
+
+ Call tEditUndoRedo
+ Call tEditRepeat
+
+ Call tEditPaste
+ Call tEditPasteSpecial
+ Call tEditSelectionMode
+
+ Call tEditChanges
+ Call tEditCompareDocument
+ Call tEditFindAndReplace
+ Call tViewNavigator
+ Call tEditAutoText
+ Call tEditHyperlink
+
+ Call tEditFields
+ Call tEditFieldsInputList
+ Call tEditFootnote
+ Call tEditIndexEntry
+
+ Call tEditLinks
+ Call tEditPlugIn
+ Call tEditImageMap
+ Call tEditObjectEdit
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocEditFields
+ gApplication = "WRITER"
+
+ 'Writer Master Document
+ gApplication = "MASTERDOCUMENT"
+ Call tMasterDocEditNavigator
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tEditUndoRedo
+ PrintLog "- Edit/Undo - Redo"
+
+ PrintLog "Open new document"
+ hNewDocument()
+
+ PrintLog "Insert table"
+ Call hTabelleEinfuegen
+ PrintLog "Edit / Undo"
+ hUseAsyncSlot( "EditUndo" )
+
+ PrintLog "Undo / Redo"
+ hUseAsyncSlot( "EditRedo" )
+
+ PrintLog "Edit / Undo"
+ hUseAsyncSlot( "EditUndo" )
+
+ PrintLog "File / Close"
+ hUseAsyncSlot( "FileClose" )
+ Kontext
+ if ( Active.Exists ) then
+ if Active.GetRT = 304 then
+ WarnLog ( "Messagebox: '" & Active.Gettext & "' should not appear" )
+ Active.No
+ end if
+ end if
+endcase
+
+'----------------------------------------------------
+
+testcase tEditRepeat
+ PrintLog "- Edit/Repeat"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Insert table"
+ Call hTabelleEinfuegen
+
+ PrintLog "Move cursor out of table"
+ Call wTypeKeys("<Down><Down>")
+
+ PrintLog "Edit / Repeat"
+ hUseAsyncSlot( "EditRepeat" )
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------
+
+testcase tEditPaste
+ PrintLog "- Edit/Paste"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Insert some text in document"
+ Call wTypeKeys("What a beatiful day !")
+
+ PrintLog "Edit / Select All"
+ hUseAsyncSlot( "EditSelectAll" )
+
+ PrintLog "Edit / Cut"
+ hUseAsyncSlot( "EditCut" )
+
+ PrintLog "Edit / Paste"
+ hUseAsyncSlot( "EditPaste" )
+
+ PrintLog "Type <Shift Home >"
+ Call wTypeKeys("<Shift Home>")
+
+ PrintLog "Edit / Copy"
+ hUseAsyncSlot( "EditCopy" )
+
+ PrintLog "Enter 2 Line breaks"
+ Call wTypeKeys("<Return>", 2)
+
+ PrintLog "Edit / Paste"
+ hUseAsyncSlot( "EditPaste" )
+
+ PrintLog "Edit / Select All"
+ hUseAsyncSlot( "EditSelectAll" )
+
+ PrintLog "Edit / Cut"
+ hUseAsyncSlot( "EditCut" )
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------
+
+testcase tEditPasteSpecial
+ PrintLog "- Edit/Paste Special"
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ if gSamePC = TRUE then
+ PrintLog " - External Clipboard"
+ PrintLog "Enter some text in external clipboard"
+ SetClipboard "Text from external clipboard!"
+
+ PrintLog "Paste from external clipboard with Edit / Paste in Office"
+ hUseAsyncSlot( "EditPaste" )
+
+ Call wTypeKeys("<Mod1 A>")
+ Wait(200)
+ hUseAsyncSlot( "EditCopy" )
+
+ if GetClipboardText <> "Text from external clipboard!" then
+ Warnlog "External Clipboard not available!"
+ Warnlog "Is: " & GetClipboardText
+ end if
+ Call wTypeKeys("<End><Return>")
+ SetClipboard ""
+ SetClipboard "2nd Text from external clipboard!"
+ try
+ PrintLog "Edit / Paste / Special"
+ hUseAsyncSlot( "EditPasteSpecialWriter" )
+
+ Kontext "InhaltEinfuegen"
+ if ( InhaltEinfuegen.Exists( 2 ) ) then
+ try
+ Auswahl.Select 1
+ catch
+ Warnlog "Unable to select entry in format list !"
+ InhaltEinfuegen.Close
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ InhaltEinfuegen.OK
+ Wait(200)
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog "Maybe Bug#109331"
+ Warnlog Active.Gettext
+ try
+ Active.Ok
+ catch
+ Active.No
+ endcatch
+ end if
+ else
+ Call wTypeKeys("<Home><Shift End>")
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "2nd Text from external clipboard!" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText
+ end if
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ end if
+ catch
+ Exceptlog
+ endcatch
+ end if
+
+ PrintLog " - Internal Clipboard with StarOffice Writer-Text"
+ PrintLog "Enter some text in writer and copy it"
+ Call wTypeKeys("<Return>Text from internal clipboard<Shift Home>")
+ hUseAsyncSlot( "EditCopy" )
+ Call wTypeKeys("<End><Return>")
+ hUseAsyncSlot( "EditPasteSpecialWriter" )
+
+ PrintLog "Edit / Paste / Special"
+ Kontext "InhaltEinfuegen"
+ if ( InhaltEinfuegen.Exists( 2 ) ) then
+ DialogTest ( InhaltEinfuegen )
+ Auswahl.Select 1
+ InhaltEinfuegen.OK
+ Call wTypeKeys "<Home><Shift End>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Text from internal clipboard" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ end if
+
+ Call hCloseDocument
+ PrintLog "Close active document"
+
+endcase
+
+'----------------------------------------------------
+
+testcase tEditSelectionMode
+
+ PrintLog " - Edit - Selection Mode"
+ PrintLog " Open new writer document"
+ Call hNewDocument
+
+ PrintLog " Try to switch to / activate the Block-selectionmode."
+ if ( hUseAsyncSlot( "EditSelectionModeBlock" ) = -1 ) then
+ warnlog " Could not activate Blockmode via Edit-menu."
+ endif
+
+ PrintLog " Try to switch to / activate the Standard-selectionmode."
+ if ( hUseAsyncSlot( "EditSelectionModeStandard" ) = -1 ) then
+ warnlog " Could not activate Blockmode via Edit-menu."
+ endif
+
+ PrintLog " Close active document."
+ Call hCloseDocument
+
+endcase 'tEditSelectionMode
+
+'----------------------------------------------------
+
+testcase tEditChanges
+
+ PrintLog "- Edit/Changes"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Enter some text in document"
+ Call wTypeKeys("Hallo<Return><Return>")
+
+ PrintLog "Select Edit / Changes / Record"
+ hUseAsyncSlot( "EditChangesRecord" )
+
+ PrintLog "Enter some more text in document"
+ Call wTypeKeys("Aenderung 1<Return><Up><Up><End>")
+ Call wTypeKeys("<Backspace>", 4)
+
+ PrintLog "Select Edit / Changes / Record"
+ hUseAsyncSlot( "EditChangesRecord" )
+
+ PrintLog "Select Edit / Changes / Show"
+ hUseAsyncSlot( "EditChangesShow" )
+
+ PrintLog "Select Edit / Changes / Show"
+ hUseAsyncSlot( "EditChangesShow" )
+
+ PrintLog "Select Edit / Changes / Protect Trace"
+ hUseAsyncSlot( "EditChangesProtectTrace" )
+
+ PrintLog "Passwort-dialog has to come up, cancel it"
+ Kontext "Passwort"
+ if ( Passwort.Exists( 1 ) ) then
+ Passwort.Close
+ else
+ Warnlog "Password-dialog is not up!"
+ end if
+
+ PrintLog "Edit / Changes / Accept or Reject"
+ EditChangesAcceptOrReject
+
+ PrintLog "Dialog 'Accept or reject changes' has to come up"
+ Kontext "Redlining"
+ if Redlining.Exists then
+ PrintLog "Step through all Tabpages"
+ TabControl.SetPage TabListe
+ Call DialogTest ( Redlining )
+ TabControl.SetPage TabFilter
+ Call DialogTest ( Redlining )
+ Redlining.Close
+ PrintLog "Close dialog"
+ else
+ Warnlog "Dialog 'Redlining' not opened!"
+ end if
+
+ Call wTypeKeys("<Down><Right>")
+
+ PrintLog "Point cursor into a changed text in document"
+ PrintLog "Edit / Changes / Comment"
+ if ( hUseAsyncSlot( "EditChangesComment" ) = -1 ) then
+ Call wTypeKeys("<Up>")
+ if ( hUseAsyncSlot( "EditChangesComment" ) = -1 ) then
+ Warnlog "Unable to execute 'Edit / Changes / Comment!"
+ endif
+ endif
+
+ Kontext "Kommentar"
+ PrintLog "Dialog to comment a change has to come up"
+ if ( Kommentar.Exists( 5 ) ) then
+ Call DialogTest ( Kommentar )
+ Kommentar.Cancel
+ else
+ Warnlog "Dialog 'Comment' not opened!"
+ PrintLog "Close dialog 'Comment'"
+ end if
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+
+endcase
+
+'----------------------------------------------------
+
+testcase tEditCompareDocument
+ PrintLog "- Edit/Compare Document"
+ Select Case gApplication
+ Case "WRITER"
+ Call hNewDocument
+ PrintLog "Open new document"
+ EditCompareDocumentCalc
+ PrintLog "Edit / Compare document"
+ Case "MASTERDOCUMENT"
+ printlog "Comparing documents not in Masterdocument!"
+ goto endsub
+ Case "HTML"
+ printlog "Comparing documents not in WriterWeb!"
+ goto endsub
+ end select
+
+ if gUseSysDlg = False then
+ Kontext "OeffnenDlg"
+ Dateiname.SetText ConvertPath ( gTesttoolPath & "writer\required\input\bt.sxw" )
+ PrintLog "in File-Open-dialog load ..\writer\required\input\bt.sxw"
+ Oeffnen.Click
+ end if
+ Kontext "FilterAuswahl"
+ if Filterauswahl.Exists then Filterauswahl.OK
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+
+ Kontext "Redlining"
+ PrintLog "Dialog 'Accept and Reject changes' has to come up"
+ if Redlining.Exists then
+ TabControl.SetPage TabListe
+ wait 200
+ Kontext "Redlining"
+ TabControl.SetPage TabFilter
+ Kontext "Redlining"
+ Redlining.Close
+ PrintLog "Close dialog"
+ else
+ Warnlog "- Dialog 'Redlining' does not exist!"
+ end if
+
+ Call hCloseDocument
+ PrintLog "Close active document"
+endcase
+
+'----------------------------------------------------
+
+testcase tEditFindAndReplace
+ PrintLog "- Edit/Find & Replace"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+ EditSearchAndReplace
+ PrintLog "Edit / Find and Replace"
+ Kontext "FindAndReplace"
+ if Attributes.IsVisible = False then
+ More.Click
+ end if
+
+ Attributes.Click
+ PrintLog "in 'Find&Replace' dialog click 'Attributess'"
+ Kontext "Attribute"
+ Call DialogTest ( Attribute )
+ PrintLog "Cancel dialog 'Attributess'"
+ Attribute.Cancel
+
+ Kontext "FindAndReplace"
+ Call DialogTest ( FindAndReplace )
+ PrintLog "In Find&Replace dialog uncheck 'Match case'"
+ SimilaritySearch.UnCheck
+ PrintLog "Click 'Format'"
+ Formats.Click
+ PrintLog "In dialog 'Text format' step throug all tabpages"
+
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
+ Call DialogTest ( TabFont )
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ Call DialogTest ( TabFontEffects )
+
+ Kontext
+ active.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ Call DialogTest ( TabEinzuegeUndAbstaende )
+
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ Call DialogTest ( TabAusrichtungAbsatz )
+
+ Kontext
+ active.SetPage TabTextfluss
+ kontext "TabTextfluss"
+ Call DialogTest ( TabTextfluss )
+
+ Kontext
+ active.SetPage TabHintergrund
+ kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+ TabHintergrund.Cancel
+ PrintLog "Close 'Text Format' dialog with cancel"
+ Wait 300
+
+ Kontext "FindAndReplace"
+ PrintLog "In Find&Replace' select 'Similarity Search'"
+ SimilaritySearch.Check
+ PrintLog "The Searchbutton should be enabled, click it"
+ SimilaritySearchFor.Click
+ wait 300
+
+ Kontext "Aehnlichkeitssuche"
+ DialogTest ( Aehnlichkeitssuche )
+ Aehnlichkeitssuche.Cancel
+
+ wait 300
+ PrintLog "Close 'Similarity Search' button with cancel"
+ Kontext "FindAndReplace"
+ SimilaritySearch.Uncheck
+ More.Click
+ FindAndReplace.Close
+
+ Call hCloseDocument
+ PrintLog "Close active document"
+endcase
+
+'----------------------------------------------------
+
+testcase tViewNavigator
+ printlog "- Edit/Navigator"
+ Dim ToolboxOk as boolean
+
+ Call hNewDocument
+ PrintLog "Open new document"
+
+ if gApplication = "MASTERDOCUMENT" then
+ Kontext "NavigatorGlobalDoc"
+ if Not NavigatorGlobalDoc.Exists then ViewNavigator
+ Kontext "NavigatorGlobalDoc"
+ Call DialogTest ( NavigatorGlobalDoc )
+
+ printlog " - Umschalten"
+ GlobaldokumentToolbox.Click Umschalten
+ Sleep 5
+ kontext "NavigatorWriter"
+
+ try
+ Toolbox.TearOff Navigation
+ Kontext "NavigationsFenster"
+ NavigationsFenster.Close
+ catch
+ Warnlog "Unable to Tear off Navigation Toolbox!"
+ endcatch
+
+ Kontext "NavigatorWriter"
+ Umschalten.Click
+ Kontext "NavigatorGlobalDoc"
+ Sleep (1)
+
+ printlog " - Bearbeiten"
+ try
+ Bearbeiten.Click
+ catch
+ Sleep (2)
+ try
+ Bearbeiten.Click
+ catch
+ Warnlog " Either taking more than three seconds to switch Navigator-modes, or something has gone wrong."
+ endcatch
+ endcatch
+ wait (300)
+
+ Kontext "Navigator"
+ Navigator.Close
+ Call hCloseDocument
+ PrintLog "Close active document"
+ goto endsub
+ end if
+
+ Kontext "NavigatorWriter"
+ if Not NavigatorWriter.Exists then ViewNavigator
+ Kontext "NavigatorWriter"
+ PrintLog "Open Navigator"
+ Call DialogTest ( NavigatorWriter )
+
+ printlog " - Navigation"
+ ToolboxOK = True
+ try
+ PrintLog "Tear Off Toolbox from Navigator"
+ Toolbox.TearOff Navigation
+ catch
+ Warnlog "Unable to tear off Toolbox (#i32092)"
+ ToolboxOk = False
+ endcatch
+
+ if ToolboxOK = True then
+ Kontext "NavigationsFenster"
+ wait 200
+ try
+ PrintLog "Close Navigator Toolbox"
+ NavigationsFenster.Close
+ catch
+ endcatch
+ end if
+
+ Kontext "NavigatorWriter"
+ wait 200
+ PrintLog " - In Navigator window click 'Previous page'"
+ VorherigeSeite.Click
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.No
+ catch
+ Active.Ok
+ endcatch
+ end if
+ end if
+ wait 200
+
+ Kontext "NavigatorWriter"
+ PrintLog "- In Navigator window click 'Next page'"
+ NaechsteSeite.Click
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.No
+ catch
+ Active.Ok
+ endcatch
+ end if
+ end if
+ wait 300
+
+ printlog " - switch Selection box off and on"
+ Kontext "NavigatorWriter"
+ if Auswahlliste.Exists then Auswahlbox.Click
+ wait 200
+ Auswahlbox.Click
+ wait 200
+ if Auswahlliste.NotExists then
+ Warnlog "Navigator not maximized"
+ Auswahlbox.Click
+ end if
+
+ printlog " - Switch Content View on and off"
+ Inhaltsansicht.Click
+ wait 200
+ Inhaltsansicht.Click
+ wait 200
+
+ printlog " - Set Note"
+ Merker.Click
+ wait 200
+
+ printlog " - jump to header"
+ Kopfzeile.Click
+ wait 200
+
+ printlog " - jump to footer"
+ Fusszeile.Click
+ wait 200
+
+ printlog " - to Anchor <-> Text"
+ AnkerText.Click
+ wait 200
+
+ Kontext "Navigator"
+ try
+ PrintLog "Close Navigator"
+ Navigator.Close
+ catch
+ Errorlog
+ ViewNavigator
+ endcatch
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------
+
+testcase tEditAutotext
+ Dim j as integer
+ Dim i as integer
+ Dim CurrentEntryNr as integer
+ Dim unxAutotextCategorie as integer
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Edit / Autotext"
+ EditAutotext
+ Kontext "AutoText"
+ DialogTest ( AutoText )
+
+ Kontext "AutoText"
+ Printlog "If it exists: Delete DummyAutotext."
+ if wDeleteAutotext("DummyAutotext") = true then
+ qaerrorlog "DummyAutotext from previous testrun found, now deleted."
+ end if
+
+ PrintLog "Click Categories"
+ Kontext "Autotext"
+ Bereiche.Click
+ Sleep 1
+ Kontext "BereicheBearbeitenAutoText"
+ if BereicheBearbeitenAutoText.Exists then
+ DialogTest ( BereicheBearbeitenAutoText )
+ PrintLog "Create a new categorie"
+ Bereich.SetText "Hallo"
+ if Not Umbenennen.IsEnabled then
+ if gNetzInst = False then
+ Warnlog "- Not able to rename Categories, Button 'Rename' disabled!"
+ end if
+ end if
+
+ if Neu.IsEnabled then
+ Neu.Click
+ Wait (200)
+ if Loeschen.IsEnabled then
+ PrintLog "Delete created categorie"
+ Loeschen.Click
+ else
+ Warnlog "- Not able to delete new category. Button disabled!"
+ end if
+ else
+ if gNetzInst = False then
+ Warnlog "- Category cannot be created!"
+ end if
+ end if
+ BereicheBearbeitenAutoText.Cancel
+ else
+ Warnlog "- Dialog to edit Categories not up!"
+ end if
+ PrintLog "Close 'Edit Categories with 'Cancel'"
+
+ Kontext "AutoText"
+ PrintLog "In Autotext dialog click 'Path..'"
+ Pfade.Click
+ Kontext "PfadeAuswaehlen"
+ DialogTest ( PfadeAuswaehlen )
+ Kontext "PfadeAuswaehlen"
+ PrintLog "On 'Select Paths' dialog click 'add'"
+ Hinzufuegen.Click
+ wait 200
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists then
+ PrintLog "Cancel File-Open dialog"
+ OeffnenDlg.Cancel
+ else
+ Warnlog "Dialog ' Select Paths' not up!"
+ end if
+ wait 200
+ Kontext "PfadeAuswaehlen"
+ PrintLog "Cancel dialog 'Select Paths'"
+ PfadeAuswaehlen.Cancel
+
+ Wait (300)
+ Kontext "AutoText"
+ PrintLog "We have to create an autotext first"
+ PrintLog "to assure the 'Autotext'-Button enabled"
+ printlog "First close all categories"
+ Liste.TypeKeys "<Home>"
+ for i = 1 to Liste.GetItemCount
+ Liste.TypeKeys "-"
+ Liste.TypeKeys "<Down>"
+ next i
+
+ unxAutotextCategorie = 1
+ printlog "choose category and remember entry number"
+ Liste.TypeKeys "<Home>"
+ for i = 1 to Liste.GetItemCount
+ if Not Menue.IsEnabled then
+ Liste.TypeKeys "<Down>"
+ unxAutotextCategorie = unxAutotextCategorie + 1
+ end if
+ next i
+ Autotext.Close
+ Call wTypeKeys ( "Create a dummy autotext" )
+ Call wTypeKeys ( "<Shift Home>" )
+ EditAutotext
+ Kontext "AutoText"
+ WaitSlot(3000)
+ Liste.Select unxAutotextCategorie
+ NameText.Settext "DummyAutotext"
+ Kuerzel.Settext "dAt"
+ if Menue.IsEnabled(1) then
+ Menue.Click
+ wait 500
+ try
+ Call hMenuSelectNr ( 1 ) 'New
+ catch
+ ' This is a workaround as sometimes menu isn't opened for some reason
+ Menue.Click
+ wait 500
+ try
+ Call hMenuSelectNr ( 1 )
+ catch
+ Warnlog "Unable to create autotext"
+ Autotext.Close
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ endcatch
+ Autotext.Close
+ Call wTypeKeys "<Home>"
+ else
+ Warnlog "Unable to create autotext"
+ Autotext.Close
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "Select created autotext"
+ EditAutotext
+ WaitSlot (2000)
+ Kontext "Autotext"
+ Liste.Select unxAutotextCategorie
+ Liste.TypeKeys "+"
+ Liste.TypeKeys "<Down>"
+ wait (500)
+
+ if Menue.IsEnabled(1) then
+ Menue.Click
+ wait 300
+ try
+ PrintLog "Select Autotext / Rename"
+ Call hMenuSelectNr ( 2 ) 'Rename
+ wait 500
+ catch
+ ' This is a workaround as sometimes menu isn't opened for some reason
+ Menue.Click
+ wait 500
+ try
+ Call hMenuSelectNr ( 2 )
+ wait 300
+ catch
+ Warnlog "Unable to rename autotext"
+ Autotext.Close
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ endcatch
+ else
+ Warnlog "Unable to rename autotext"
+ Autotext.Close
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Kontext "TextbausteineUmbenennen"
+ if TextbausteineUmbenennen.Exists(5) then
+ Call DialogTest ( TextbausteineUmbenennen )
+ PrintLog "Cancel 'Rename Autotext'"
+ TextbausteineUmbenennen.Cancel
+ Wait (500)
+ else
+ Warnlog "Dialog 'Rename Autotext' not up!"
+ end if
+
+ Kontext "AutoText"
+ Menue.Click
+ wait (500)
+ try
+ PrintLog "Select Autotext / Macro"
+ Call hMenuSelectNr ( 5 )
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ ' Dialog needs some time to be opened
+ Kontext "MakroZuweisen"
+ if NOT MakroZuweisen.Exists(5) then
+ warnlog "AutoText-Macro - Assign Macro took longer than 5 seconds to load. Check why."
+ else
+ PrintLog "Cancel 'Macro' dialog"
+ MakroZuweisen.Cancel
+ end if
+ catch
+ Warnlog "Menu Autotext->'Macro' disabled !"
+ Call hMenuClose
+ endcatch
+
+ Kontext "AutoText"
+ Menue.Click
+ wait 500
+ try
+ PrintLog "Select Autotext / Edit"
+ Call hMenuSelectNr ( 4 )
+ Sleep 1
+ PrintLog "Enter some text in document and close it"
+ Call wTypeKeys("Hallo")
+ if GetDocumentCount = 1 then
+ Warnlog "The autotext has been edited in current document!"
+ else
+ hUseAsyncSlot( "FileClose" )
+ Kontext "Active"
+ PrintLog "A message that module has been changed should come up"
+ if Active.Exists then
+ Active.No
+ else
+ Warnlog "Though changing the text module the document could be closed without a query!"
+ end if
+ end if
+ catch
+ Warnlog "Menu Autotext->'Edit' disabled !"
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ try
+ Active.No
+ catch
+ Active.Ok
+ endcatch
+ end if
+ end if
+ endcatch
+
+ PrintLog "Close 'Autotext' dialog"
+ Kontext "Autotext"
+ if Autotext.Exists then Autotext.Close
+ if wDeleteAutotext("DummyAutotext") = false then
+ Warnlog "Unable to delete created autotext"
+ end if
+ Kontext "Autotext"
+ if Autotext.Exists then Autotext.Close
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------------------
+
+testcase tEditHyperlink
+ Printlog "- Edit / Hyperlink"
+ Call hNewDocument
+ PrintLog "Open new document"
+ InsertHyperlink
+ PrintLog "Insert / Hyperlink"
+ WaitSlot(5000)
+ Kontext "Hyperlink"
+
+ Call wEinfuegenHyperlink(1)
+ Kontext "TabHyperlinkInternet"
+ Internet.Check
+ ZielUrl.Settext "http://www.sonor.de"
+ PrintLog "Enter URL "
+ Kontext "Hyperlink"
+ PrintLog "Click 'Apply'"
+ Uebernehmen.Click
+ PrintLog "Close Hyperlink dialog"
+ Hyperlink.Close
+
+ Call wDocSetContext
+ try
+ PrintLog "Check if correct URL has been set to document"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipBoardtext = "" then
+ Warnlog "No Hyperlink or wrong hyperlink in document!" & GetClipBoardtext
+ end if
+ catch
+ Warnlog "No Hyperlink in document!"
+ goto endsub
+ endcatch
+
+ PrintLog "Set cursor into link"
+ Call wTypeKeys("<Left>")
+ try
+ PrintLog "Edit / Hyperlink has to be enabled"
+ EditHyperlink
+ Kontext "Hyperlink"
+ if Hyperlink.Exists then
+ Hyperlink.Close
+ else
+ Warnlog "- Hyperlinkdialog not up"
+ end if
+ catch
+ Warnlog "- Not able to edit Hyperlink!"
+ endcatch
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------------------
+
+testcase tEditFields
+ PrintLog "- Edit/Fields"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Select Insert / Fields Other"
+ InsertFieldsOther
+ Kontext
+ Active.Setpage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ Sleep 1
+ PrintLog "Insert Field 'Sender -> Company'"
+ Select Case gApplication
+ Case "HTML"
+ Select case iSprache
+ case 01 : Feldtyp.Select 5 'Sender
+ Auswahl.Select 1 'Company
+ case 03 : Feldtyp.Select 8
+ Auswahl.Select 1
+ case 07 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 31 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 33 : Feldtyp.Select 2
+ Auswahl.Select 1
+ case 34 : Feldtyp.Select 6
+ Auswahl.Select 1
+ case 36 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 39 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 45 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 46 : Feldtyp.Select 2
+ Auswahl.Select 1
+ case 48 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 49 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 51 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 52 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 55 : Feldtyp.Select 7
+ Auswahl.Select 1
+ case 81 : Feldtyp.Select 4
+ Auswahl.Select 1
+ case 82 : Feldtyp.Select 2
+ Auswahl.Select 1
+ case 84 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 86 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 88 : Feldtyp.Select 2
+ Auswahl.Select 1
+
+ case else : Warnlog "Missing language support!"
+ TabDokumentFeldbefehle.Cancel
+ PrintLog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end select
+ Case else
+ Select case iSprache
+ case 01 : Feldtyp.Select 6 'Sender
+ Auswahl.Select 1 'Company
+ case 03 : Feldtyp.Select 9
+ Auswahl.Select 1
+ case 07 : Feldtyp.Select 6
+ Auswahl.Select 1
+ case 31 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 33 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 34 : Feldtyp.Select 8
+ Auswahl.Select 1
+ case 36 : Feldtyp.Select 4
+ Auswahl.Select 1
+ case 39 : Feldtyp.Select 4
+ Auswahl.Select 1
+ case 45 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 46 : Feldtyp.Select 2
+ Auswahl.Select 1
+ case 48 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 49 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 51 : Feldtyp.Select 6
+ Auswahl.Select 1
+ case 52 : Feldtyp.Select 6
+ Auswahl.Select 1
+ case 55 : Feldtyp.Select 9
+ Auswahl.Select 1
+ case 81 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 82 : Feldtyp.Select 2
+ Auswahl.Select 2
+ case 84 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 86 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 88 : Feldtyp.Select 2
+ Auswahl.Select 1
+
+ case else : Warnlog "Missing language support!"
+ TabDokumentFeldbefehle.Cancel
+ PrintLog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end select
+ end select
+
+ Einfuegen.Click
+ Wait (400)
+ PrintLog "Close Fields dialog"
+ Schliessen.Click
+
+ PrintLog "Put cursor in front of field"
+ Call wTypeKeys("<Home>")
+
+ PrintLog "Edit / Fields"
+ EditFields
+ WaitSlot (2000)
+
+ Kontext "FeldbefehlBearbeitenDokument"
+ Call DialogTest ( FeldbefehlBearbeitenDokument )
+
+ PrintLog "In 'Edit Fields' dialog select 'Edit'"
+ if Bearbeiten.IsVisible and Bearbeiten.IsEnabled then
+ Bearbeiten.Click
+ Kontext "TabBenutzerdaten"
+ TabBenutzerdaten.Cancel
+ Kontext "FeldbefehlBearbeitenDokument"
+ else
+ Warnlog "Button 'Edit' in Dialog disabled!"
+ end if
+
+ PrintLog "Close dialog"
+ FeldbefehlBearbeitenDokument.Cancel
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------------------
+
+testcase tEditFieldsInputList
+ PrintLog "- Edit / Fields / Functions"
+ If gApplication = "HTML" then goto endsub
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Select Insert / Fields Other"
+ InsertFieldsOther
+ PrintLog "Goto Tabpage Functions and select 2nd entry (Input list)"
+ Kontext
+ Active.Setpage TabFunktionen
+ Kontext "TabFunktionen"
+ Sleep 1
+ Feldtyp.Select 2
+ if NewListEntry.IsVisible and NewListEntry.IsEnabled then
+ PrintLog "Add 1 entry to list"
+ if NewListEntry.IsEnabled then
+ NewListEntry.Settext "MyNewListEntry"
+ wait 200
+ if AddListEntry.IsEnabled= True then AddListEntry.Click
+ end if
+ PrintLog "Close Fields dialog"
+ if EntrysList.GetItemCount <> 1 then
+ Warnlog "Entry has not been added to list!"
+ Schliessen.Click
+ else
+ Einfuegen.Click
+ Wait 500
+ Schliessen.Click
+ Call wTypeKeys "<Home>"
+ try
+ Call wTypeKeys "<Mod1 Shift F9>"
+ wait 200
+ Kontext "EditInputList"
+ if EditInputList.Exists then
+ Call DialogTest ( EditInputList )
+ EditInputList.Cancel
+ else
+ Warnlog "Dialog 'Edit Input list' is not up!"
+ end if
+ catch
+ Warnlog "Unable to 'Edit / Fields'!"
+ endcatch
+ end if
+ else
+ Warnlog "'Input list' probably not found!"
+ end if
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------------------
+
+testcase tEditFootnote
+ PrintLog "- Edit/Footnote"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Insert / Footnote"
+ InsertFootnote
+ Kontext "FussnoteEinfuegen"
+ FussnoteEinfuegen.OK
+
+ Call wTypeKeys("<PageUp><Left>")
+
+ PrintLog "Edit / Footnote"
+ EditFootnote
+
+ Kontext "FussnoteBearbeiten"
+ Call DialogTest ( FussnoteBearbeiten )
+ PrintLog "Close 'Footnote' dialog"
+ FussnoteBearbeiten.Cancel
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------------------
+
+testcase tEditIndexEntry
+ qaErrorLog "#158646# - Insert Indexes Entry causes crash."
+ goto endsub
+
+ PrintLog "- Edit/Index Entry"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Write down something in document"
+ Call wTypeKeys("Ich werde ein Verzeichniseintrag")
+ Call wTypeKeys("<Left>")
+ InsertIndexesEntry
+ PrintLog "Insert / Indexes / Entry"
+ Kontext "VerzeichniseintragEinfuegen"
+ try
+ PrintLog "Close dialog"
+ EintragOk.Click
+ catch
+ Warnlog "Index entry couldn't be inserted!(Button disabled)"
+ endcatch
+ EinfuegenSchliessen.Click
+
+ Call wTypeKeys("<End><Left>")
+ try
+ PrintLog "Point cursor in Index entry"
+ EditIndexEntry
+ PrintLog "Edit / Index entry"
+ Kontext "VerzeichniseintragBearbeiten"
+ Call DialogTest (VerzeichniseintragBearbeiten)
+ BearbeitenSchliessen.Click
+ catch
+ Warnlog "Not able to edit index entry!"
+ endcatch
+
+ Call hCloseDocument
+ PrintLog "Close active document"
+endcase
+
+'----------------------------------------------------------------
+
+testcase tEditLinks
+ PrintLog "- Edit/Links"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ Call hNewDocument
+ Call hGrafikVerknuepftEinfuegen ( gTesttoolPath & "writer\required\input\graphics\jolink.jpg" )
+ Wait 200
+ try
+ EditLinksWriter
+ catch
+ Warnlog "Error on calling Edit / Links ! (disabled)"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Kontext "VerknuepfungenBearbeiten"
+ if VerknuepfungenBearbeiten.Exists then
+ Call DialogTest ( VerknuepfungenBearbeiten )
+ Wait 200
+ try
+ Aendern.Click
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+ catch
+ Warnlog "Error modifying the link!"
+ endcatch
+
+ Kontext "VerknuepfungenBearbeiten"
+ Wait 200
+ try
+ Aktualisieren.Click
+ catch
+ Warnlog "Error on updating the link!"
+ endcatch
+ Wait 200
+
+ try
+ Loesen.Click
+ Kontext "Active"
+ if Active.Exists then Active.No
+ catch
+ Warnlog "- Error on breaking the link!"
+ endcatch
+
+ Kontext "VerknuepfungenBearbeiten"
+ VerknuepfungenBearbeiten.Close
+ else
+ Warnlog "Dialog Edit / Links not opened!"
+ end if
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tEditPlugIn
+ PrintLog "- Edit/PlugIn"
+ PrintLog "Open new document"
+ Call hNewDocument
+ PrintLog "Edit / Plugin"
+ EditPlugIn
+ WaitSlot (2000)
+ PrintLog "Edit / Plugin"
+ EditPlugIn
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tEditImageMap
+ PrintLog "- Edit / ImageMap"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ if hGrafikEinfuegen ( gTesttoolPath & "writer\required\input\graphics\jolink.jpg" )=true then
+ Kontext "ImageMapEditor"
+ if ImageMapEditor.Exists then ImageMapEditor.Close
+ try
+ EditImageMap
+ Kontext "ImageMapEditor"
+ Call DialogTest (ImageMapEditor)
+ Sleep 1
+ ImageMapEditor.Close
+ catch
+ Warnlog "Edit/ImageMap disabled!"
+ endcatch
+ end if
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tEditObjectEdit
+ PrintLog "Edit / Object / Edit"
+
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ InsertObjectChart
+ Call gMouseClick (99,1)
+ Call gMouseClick (99,1)
+ Call gMouseClick (99,1)
+ wait 200
+ Call wTypeKeys("<SHIFT F4>")
+ try
+ EditObjectEdit
+ catch
+ warnlog "Edit/Object/Edit is disabled with chart added"
+ endcatch
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------------------
+
+testcase tHtmlDocEditFields
+ PrintLog "- Edit/Fields"
+
+ gApplication = "HTML"
+ PrintLog "Open new document"
+ Call hNewDocument
+
+ PrintLog "Select Insert / Fields Other"
+ InsertFieldsOther
+ Kontext
+ Active.Setpage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ Sleep 1
+ PrintLog "Insert Field 'Sender -> Company'"
+ Select case iSprache
+ case 01 : Feldtyp.Select 5 'Sender
+ Auswahl.Select 1 'Company
+ case 03 : Feldtyp.Select 8
+ Auswahl.Select 1
+ case 07 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 31 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 33 : Feldtyp.Select 2
+ Auswahl.Select 1
+ case 34 : Feldtyp.Select 6
+ Auswahl.Select 1
+ case 36 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 39 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 45 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 46 : Feldtyp.Select 2
+ Auswahl.Select 1
+ case 48 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 49 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 51 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 52 : Feldtyp.Select 5
+ Auswahl.Select 1
+ case 55 : Feldtyp.Select 7
+ Auswahl.Select 1
+ case 81 : Feldtyp.Select 4
+ Auswahl.Select 1
+ case 82 : Feldtyp.Select 2
+ Auswahl.Select 1
+ case 84 : Feldtyp.Select 3
+ Auswahl.Select 1
+ case 86 : Feldtyp.Select 1
+ Auswahl.Select 1
+ case 88 : Feldtyp.Select 2
+ Auswahl.Select 1
+
+ case else : Warnlog "Missing language support!"
+ TabDokumentFeldbefehle.Cancel
+ PrintLog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end select
+
+ Einfuegen.Click
+ Wait (400)
+ PrintLog "Close Fields dialog"
+ Schliessen.Click
+
+ PrintLog "Put cursor in front of field"
+ Call wTypeKeys("<Home>")
+
+ PrintLog "Edit / Fields"
+ EditFields
+ WaitSlot (2000)
+
+ Kontext "FeldbefehlBearbeitenDokument"
+ Call DialogTest ( FeldbefehlBearbeitenDokument )
+
+ PrintLog "In 'Edit Fields' dialog select 'Edit'"
+ if Bearbeiten.IsVisible and Bearbeiten.IsEnabled then
+ Bearbeiten.Click
+ Kontext "TabBenutzerdaten"
+ TabBenutzerdaten.Cancel
+ Kontext "FeldbefehlBearbeitenDokument"
+ else
+ Warnlog "Button 'Edit' in Dialog disabled!"
+ end if
+
+ PrintLog "Close dialog"
+ FeldbefehlBearbeitenDokument.Cancel
+ PrintLog "Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'----------------------------------------------------------------
+
+testcase tMasterDocEditNavigator
+ printlog "- View/Navigator"
+ Dim ToolboxOk as boolean
+
+ gApplication = "MASTERDOCUMENT"
+ Call hNewDocument
+ PrintLog "Open new document"
+
+ Kontext "NavigatorGlobalDoc"
+ if Not NavigatorGlobalDoc.Exists then ViewNavigator
+ Kontext "NavigatorGlobalDoc"
+ Call DialogTest ( NavigatorGlobalDoc )
+
+ printlog " - Umschalten"
+ GlobaldokumentToolbox.Click Umschalten
+ Sleep 5
+ kontext "NavigatorWriter"
+
+ try
+ Toolbox.TearOff Navigation
+ Kontext "NavigationsFenster"
+ NavigationsFenster.Close
+ catch
+ Warnlog "Unable to Tear off Navigation Toolbox!"
+ endcatch
+
+ Kontext "NavigatorWriter"
+ Umschalten.Click
+ Kontext "NavigatorGlobalDoc"
+ Sleep (1)
+
+ printlog " - Bearbeiten"
+ try
+ Bearbeiten.Click
+ catch
+ Sleep (2)
+ try
+ Bearbeiten.Click
+ catch
+ Warnlog " Either taking more than three seconds to switch Navigator-modes, or something has gone wrong."
+ endcatch
+ endcatch
+ wait (300)
+
+ Kontext "Navigator"
+ Navigator.Close
+
+ PrintLog "Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'---------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_003_.inc b/testautomation/writer/required/includes/w_003_.inc
new file mode 100644
index 000000000000..858cdd2ba6c5
--- /dev/null
+++ b/testautomation/writer/required/includes/w_003_.inc
@@ -0,0 +1,641 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Testscripts connected to the View-Menu.
+'*
+'\******************************************************************
+
+sub w_003_
+
+ printLog Chr(13) + "--------- View Menu (w_003_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tViewPrintLayout
+ Call tViewWebLayout
+ Call tViewHTMLSource
+
+ Call tViewToolbars
+
+ Call tViewStatusBar
+ Call tViewInputMethodStatus
+ Call tViewRuler
+
+ Call tViewTextBoundaries
+ Call tViewFieldShadings
+ Call tViewFields
+ Call tViewNonprintingCharacters
+ Call tViewHiddenParagraphs
+
+ Call tViewDataSources
+
+ Call tViewFullScreen
+ Call tViewZoom
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocViewZoom
+ Call tHtmlDocViewHTMLSource
+ gApplication = "WRITER"
+
+end sub
+
+'------------------------------------------------------
+
+testcase tViewZoom
+ printlog " open application"
+ Call hNewDocument
+ printlog " type something into the document"
+ hTypekeys "<RETURN>", 3
+ UseBindings
+ printlog " View -> Zoom"
+ ViewZoom
+ Kontext "Massstab"
+ if ( Massstab.exists( 1 ) ) then
+ DialogTest ( Massstab )
+ select case uCASE(gApplication)
+ case "HTML" :
+ printlog " check checkbox '100%'"
+ Vergroesserung100.check
+ printlog " check checkbox 'Variable'"
+ VergroesserungStufenlos.check
+ case else :
+ printlog " check checkbox 'Optimal'"
+ Optimal.check
+ printlog " check checkbox 'Fit height and width'"
+ GanzeSeite.check
+ printlog " check checkbox 'Fit Width'"
+ Seitenbreite.check
+ printlog " check checkbox '100%'"
+ Vergroesserung100.check
+ printlog " check checkbox 'Variable'"
+ VergroesserungStufenlos.check
+ printlog " click button MORE on 'Variable'"
+ Stufenlos.more
+ printlog " click button 'Automatic'"
+ Automatic.check
+ printlog " click button 'Single Page'"
+ Singlepage.check
+ printlog " click button 'Columns'"
+ Columns.check
+ printlog " click button MORE on 'Columns'"
+ Columnsfield.more
+ printlog " click button LESS on 'Columns'"
+ Columnsfield.less
+ printlog " Check checkbox 'Book mode'"
+ Bookmode.check
+ printlog " cancel dialog 'Zoom'"
+ end select
+ Massstab.Cancel
+ else
+ warnlog( "Dialog <Massstab> is not available" )
+ endif
+ printlog " close application"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewDataSources
+ PrintLog "- View / Data Sources"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Data Sources"
+ ViewCurrentDatabaseWriter
+
+ Kontext "DatabaseBeamer"
+ if ( DatabaseBeamer.Exists( 5 ) ) then
+ printlog " Close database beamer with : View Data Sources"
+ ViewCurrentDatabaseWriter
+
+ Kontext "DatabaseBeamer"
+ if ( DatabaseBeamer.Exists() ) then
+ Warnlog "Could not close Databasebeamer with same slot!"
+ ViewBeamer
+
+ Kontext "DatabaseBeamer"
+ if DatabaseBeamer.Exists then
+ Warnlog "Could not close Databasebeamer with Slot->View Beamer!"
+ endif
+ else
+ printlog( "Closed Database Beamer dialog" )
+ endif
+ else
+ Warnlog "Database Beamer has not been opened!"
+ endif
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewToolbars
+ PrintLog "- View / Toolbars"
+ Dim i as integer
+
+ printlog " Close all documents until only backing window is opened"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+
+ printlog " Open a new writer document"
+ Call hNewDocument
+
+ printlog "- Toolbar 'Align'"
+ printlog "- open"
+ Call hToolbarSelect("Align", true)
+ printlog "- close"
+ Call hToolbarSelect("Align", false)
+ printlog "- reset"
+ Call hToolbarSelect("Align", true, true)
+
+ printlog "- Toolbar 'Bullets And Numbering'"
+ printlog "- open"
+ Call hToolbarSelect("BulletsAndNumbering", true)
+ printlog "- close"
+ Call hToolbarSelect("BulletsAndNumbering", false)
+ printlog "- reset"
+ Call hToolbarSelect("BulletsAndNumbering", true, true)
+
+ printlog "- Toolbar 'Drawing'"
+ printlog "- open"
+ Call hToolbarSelect("Drawing", true)
+ printlog "- close"
+ Call hToolbarSelect("Drawing", false)
+ printlog "- reset"
+ Call hToolbarSelect("Drawing", true, true)
+
+ printlog "- Toolbar 'Drawing Object Properties'"
+ printlog "- open"
+ Call hToolbarSelect("DrawingObjectProperties", true)
+ printlog "- close"
+ Call hToolbarSelect("DrawingObjectProperties", false)
+ printlog "- reset"
+ Call hToolbarSelect("DrawingObjectProperties", true, true)
+
+ printlog "- Toolbar 'Form Controls'"
+ printlog "- open"
+ Call hToolbarSelect("FormControls", true)
+ printlog "- close"
+ Call hToolbarSelect("FormControls", false)
+ printlog "- reset"
+ Call hToolbarSelect("FormControls", true, true)
+
+ printlog "- Toolbar 'Form Design'"
+ printlog "- open"
+ Call hToolbarSelect("FormDesign", true)
+ printlog "- close"
+ Call hToolbarSelect("FormDesign", false)
+ printlog "- reset"
+ Call hToolbarSelect("FormDesign", true, true)
+
+ printlog "- Toolbar 'Form Navigation'"
+ printlog "- open"
+ Call hToolbarSelect("FormNavigation", true)
+ printlog "- close"
+ Call hToolbarSelect("FormNavigation", false)
+ printlog "- reset"
+ Call hToolbarSelect("FormNavigation", true, true)
+
+ ' The following toolbar is disabled because it will be found in all documents
+ ' therefore they can't be reactivated once deactivated
+ printlog "- Toolbar 'Formatting'"
+ printlog "- open"
+ Call hToolbarSelect("Formatting", true)
+ printlog "- close"
+ Call hToolbarSelect("Formatting", false)
+ printlog "- reset"
+ Call hToolbarSelect("Formatting", true, true)
+
+ printlog "- Toolbar 'Frame'"
+ printlog "- open"
+ Call hToolbarSelect("Frame", true)
+ printlog "- close"
+ Call hToolbarSelect("Frame", false)
+ printlog "- reset"
+ Call hToolbarSelect("Frame", true, true)
+
+ printlog "- Toolbar 'Insert'"
+ printlog "- open"
+ Call hToolbarSelect("Insert", true)
+ printlog "- close"
+ Call hToolbarSelect("Insert", false)
+ printlog "- reset"
+ Call hToolbarSelect("Insert", true, true)
+
+ printlog "- Toolbar 'Insert Object'"
+ printlog "- open"
+ Call hToolbarSelect("InsertObject", true)
+ printlog "- close"
+ Call hToolbarSelect("InsertObject", false)
+ printlog "- reset"
+ Call hToolbarSelect("InsertObject", true, true)
+
+ printlog "- Toolbar 'Media Playback'"
+ printlog "- open"
+ Call hToolbarSelect("MediaPlayback", true)
+ printlog "- close"
+ Call hToolbarSelect("MediaPlayback", false)
+ printlog "- reset"
+ Call hToolbarSelect("MediaPlayback", true, true)
+
+ printlog "- Toolbar 'OLE Object'"
+ printlog "- open"
+ Call hToolbarSelect("OLEObject", true)
+ printlog "- close"
+ Call hToolbarSelect("OLEObject", false)
+ printlog "- reset"
+ Call hToolbarSelect("OLEObject", true, true)
+
+ printlog "- Toolbar 'Page Preview'"
+ printlog "- open"
+ Call hToolbarSelect("PagePreview", true)
+ printlog "- close"
+ Call hToolbarSelect("PagePreview", false)
+ printlog "- reset"
+ Call hToolbarSelect("PagePreview", true, true)
+
+ printlog "- Toolbar 'Picture'"
+ printlog "- open"
+ Call hToolbarSelect("Picture", true)
+ printlog "- close"
+ Call hToolbarSelect("Picture", false)
+ printlog "- reset"
+ Call hToolbarSelect("Picture", true, true)
+
+ ' The following toolbar is disabled because it will be found in all documents
+ ' therefore they can't be reactivated once deactivated
+ printlog "- Toolbar 'Standard'"
+ printlog "- open"
+ Call hToolbarSelect("Standard", true)
+ printlog "- close"
+ Call hToolbarSelect("Standard", false)
+ printlog "- reset"
+ Call hToolbarSelect("Standard", true, true)
+
+ printlog "- Toolbar 'Standard (Viewing Mode)'"
+ printlog "- open"
+ Call hToolbarSelect("StandardViewingMode", true)
+ printlog "- close"
+ Call hToolbarSelect("StandardViewingMode", false)
+ printlog "- reset"
+ Call hToolbarSelect("StandardViewingMode", true, true)
+
+ printlog "- Toolbar 'Table'"
+ printlog "- open"
+ Call hToolbarSelect("Table", true)
+ printlog "- close"
+ Call hToolbarSelect("Table", false)
+ printlog "- reset"
+ Call hToolbarSelect("Table", true, true)
+
+ printlog "- Toolbar 'Text Object'"
+ printlog "- open"
+ Call hToolbarSelect("TextObject", true)
+ printlog "- close"
+ Call hToolbarSelect("TextObject", false)
+ printlog "- reset"
+ Call hToolbarSelect("TextObject", true, true)
+
+ printlog "- Toolbar 'Tools'"
+ printlog "- open"
+ Call hToolbarSelect("Tools", true)
+ printlog "- close"
+ Call hToolbarSelect("Tools", false)
+ printlog "- reset"
+ Call hToolbarSelect("Tools", true, true)
+
+ printlog "- Toolbar 'Hyperlink Bar'"
+ printlog "- open"
+ Call hToolbarSelect("HyperlinkBar", true)
+ printlog "- close"
+ Call hToolbarSelect("HyperlinkBar", false)
+ printlog "- reset"
+ Call hToolbarSelect("HyperlinkBar", true, true)
+
+ printlog "- Toolbar 'Formula'"
+ printlog "- open"
+ Call hToolbarSelect("MATH", true)
+ OL_SW_Rechenleiste.TypeKeys "<Enter>"
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewTextBoundaries
+ PrintLog "- View / Text Boundaries"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Text Boundaries"
+ ViewTextBoundaries
+ WaitSlot (2000)
+ printlog " View / Text Boundaries"
+ ViewTextBoundaries
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tViewFieldShadings
+ PrintLog "- View / Field Shadings"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Field Shadings"
+ ViewFieldShadings
+ WaitSlot (2000)
+ printlog " View / Field Shadings"
+ ViewFieldShadings
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tViewFields
+ PrintLog "- View / Fields"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Fields"
+ ViewFields
+ WaitSlot (2000)
+ printlog " View / Fields"
+ ViewFields
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tViewNonprintingCharacters
+ PrintLog "- View / Nonprinting Characters"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Nonprinting characters"
+ ViewNonprintingCharacters
+ WaitSlot (2000)
+ printlog " View / Nonprinting characters"
+ ViewNonprintingCharacters
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewHiddenParagraphs
+ printLog "- View / Hidden Paragraphs"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Hidden paragraphs "
+ ViewHiddenParagraphs
+ WaitSlot(2000)
+ printlog " View / Hidden paragraphs "
+ ViewHiddenParagraphs
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewWebLayout
+ PrintLog "- View / WebLayout"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Web Layout "
+ ViewOnlineLayout
+ WaitSlot (2000)
+ printlog " View / Online Layout "
+ ViewOnlineLayout
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewFullScreen
+ PrintLog "- View / Full Screen"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Full Screen "
+ ViewFullScreen
+ WaitSlot (2000)
+ printlog " View / Full Screen "
+ ViewFullScreen
+ WaitSlot (2000)
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewPrintLayout
+ PrintLog "- View / Print Layout"
+ printlog " ONLY HTML-Document"
+ printlog " Open new document"
+ Call hNewDocument
+ WaitSlot (2000)
+ printlog " View / Print Layout "
+ ViewPrintLayout
+ WaitSlot (2000)
+ printlog " View / Print Layout "
+ ViewPrintLayout
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewStatusBar
+ PrintLog "- View / Status Bar"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Statusbar "
+ ViewToolbarsStatusbar
+ WaitSlot (2000)
+ printlog " View / Print Layout "
+ ViewToolbarsStatusbar
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewRuler
+ PrintLog "- View / Ruler"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " View / Ruler "
+ ViewRuler
+ WaitSlot (2000)
+ printlog " View / Ruler "
+ ViewRuler
+ WaitSlot (2000)
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewInputMethodStatus
+ PrintLog "- View / Input Method Status (only Solaris)"
+ if ( Ucase(gPlatform) <> "SOLARIS" ) then
+ printlog( "No testing for IME status for OS <> Solaris" )
+ goto endsub
+ endif
+
+ PrintLog " Open new document"
+ Call hNewDocument
+ PrintLog " View / View / Input Method Status"
+ try
+ ViewInputMethodStatus
+ catch
+ Warnlog "Menuentry 'Input Method Status' is disabled!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ WaitSlot (2000)
+ PrintLog " View / View / Input Method Status"
+ ViewInputMethodStatus
+ PrintLog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tViewHTMLSource
+ PrintLog "- View / HTML Source (only in HTML-Document)"
+ if ( gApplication <> "HTML" ) then
+ goto endsub
+ endif
+
+ printlog "Open new document"
+ Call hNewDocument
+ printlog "View / HTML-Source"
+ AnsichtHTMLQuelltext
+
+ printlog "Save-As dialog has to come up"
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 1 ) ) then
+ Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html")
+ printlog "Save sourcecode"
+ Speichern.Click()
+ Kontext "Active"
+ If Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.Yes
+ catch
+ Warnlog Active.Gettext
+ Active.Ok
+ endcatch
+ end if
+ end if
+ else
+ warnlog( "Dialog <SpeichernDlg> is not available" )
+ endif
+
+ Kontext "DocumentHTMLSourceView"
+ DocumentHTMLSourceView.TypeKeys "Check for bug: #116402"
+ wait 500
+ printlog "View / HTML-Source"
+ AnsichtHTMLQuelltext
+ WaitSlot (1000)
+ printlog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocViewZoom
+ gApplication = "HTML"
+ printlog " open application"
+ Call hNewDocument
+ printlog " type something into the document"
+ hTypekeys "<RETURN>", 3
+
+ printlog " View -> Zoom"
+ ViewZoom
+ Kontext "Massstab"
+ if ( Massstab.exists( 1 ) ) then
+ DialogTest ( Massstab )
+ printlog " check checkbox '100%'"
+ Vergroesserung100.check
+ printlog " check checkbox 'Variable'"
+ VergroesserungStufenlos.check
+ Massstab.Cancel
+ else
+ warnlog( "Dialog <Massstab> is not available" )
+ endif
+ printlog " close application"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocViewHTMLSource
+ PrintLog "- View / HTML Source (only in HTML-Document)"
+ gApplication = "HTML"
+ printlog "Open new document"
+ Call hNewDocument
+ printlog "View / HTML-Source"
+ AnsichtHTMLQuelltext
+ WaitSlot (1000)
+ printlog "Save-As dialog has to come up"
+ printlog "Save sourcecode"
+ Kontext "SpeichernDlg"
+ Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html")
+ Speichern.Click
+ Kontext "Active"
+ If Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.Yes
+ catch
+ Warnlog Active.Gettext
+ Active.Ok
+ endcatch
+ end if
+ end if
+ wait 500
+ Kontext "DocumentHTMLSourceView"
+ DocumentHTMLSourceView.TypeKeys "Check for bug: #116402"
+ wait 500
+ printlog "View / HTML-Source"
+ AnsichtHTMLQuelltext
+ WaitSlot (1000)
+ printlog "Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_004_.inc b/testautomation/writer/required/includes/w_004_.inc
new file mode 100644
index 000000000000..3a4234bfb18a
--- /dev/null
+++ b/testautomation/writer/required/includes/w_004_.inc
@@ -0,0 +1,1804 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Testcases with connection to the Insert-menu.
+'*
+'\***********************************************************************
+
+sub w_004_
+
+ printLog Chr(13) + "--------- Insert Menu ( w_004_ ) ----------"
+ gApplication = "WRITER"
+
+ Call tInsertManualBreak
+ Call tInsertFields
+
+ Call tInsertFieldsOther
+ Call tInsertSpecialCharacter
+
+ Call tInsertSection
+ Call tInsertHyperlink
+
+ Call tInsertFootnote
+ Call tInsertCaption
+ Call tInsertBookmark
+ Call tInsertCrossReference
+ Call tInsertComment
+ Call tInsertScript
+ Call tInsertIndexesEntry
+ Call tInsertIndexesIndex
+ Call tInsertIndexesBibliographyEntry
+
+ Call tInsertEnvelope
+
+ Call tInsertFrame
+ Call tInsertTable
+ Call tInsertHorizontalLine
+ Call tInsertGraphicsFromFile
+ Call tInsertAllGraphicsFromFile
+
+ Call tInsertObjectOLEObject
+ Call tInsertObjectPlugIn
+ Call tInsertObjectSound
+ Call tInsertObjectVideo
+ Call tInsertObjectFormula
+ Call tInsertObjectChart
+ Call tInsertFile
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocInsertFields
+ Call tHtmlDocInsertFieldsOther
+ Call tHtmlDocInsertSection
+ Call tHtmlDocInsertFrame
+ Call tHtmlDocInsertGraphicsFromFile
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tInsertManualBreak
+ PrintLog "- Insert / Manual Break"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Manual break"
+ InsertManualBreak
+
+ printlog " Close 'Insert break' dialog with cancel"
+ Kontext "UmbruchEinfuegen"
+ Call DialogTest ( UmbruchEinfuegen )
+ UmbruchEinfuegen.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertFields
+ PrintLog "- Insert / Fields"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ try
+ printlog "Insert / Fields / Date"
+ InsertFieldsDate
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Date "
+ endcatch
+ printlog " Insert / Fields / Date"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Time"
+ InsertFieldsTime
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Time"
+ endcatch
+ printlog " Insert / Fields / Time"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Page Number"
+ InsertFieldsPageNumbers
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Page numbers"
+ endcatch
+ printlog " Insert / Fields / Page numbers"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Page Count"
+ InsertFieldsPageCount
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Page Count"
+ endcatch
+ printlog " Insert / Fields / Page count"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Title"
+ InsertFieldsTitle
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Title"
+ endcatch
+ printlog " Insert / Fields / Title"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Author"
+ InsertFieldsAuthor
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Author"
+ endcatch
+ printlog " Insert / Fields / Author"
+ if gApplication <> "HTML" then
+ try
+ printlog "Insert / Fields / Subject"
+ InsertFieldsSubject
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Subject"
+ endcatch
+ printlog " If document not HTML then 'Insert / Fields / Subject"
+ Call wTypeKeys (" <Return>")
+ printlog " Press key 'enter'"
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertFieldsOther
+ Dim i as integer
+ Dim j as integer
+ printlog "- Insert / Fields / Other"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Fields / Other"
+ InsertFieldsOther
+
+ Kontext
+ printlog " In dialog step through all tabpages"
+ Active.SetPage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ Call Dialogtest ( TabDokumentFeldbefehle )
+
+ Kontext
+ Active.SetPage TabDokumentinfoFeldbefehle
+ Kontext "TabDokumentinfoFeldbefehle"
+ Call Dialogtest ( TabDokumentinfoFeldbefehle )
+
+ Kontext
+ Active.SetPage TabVariablen
+ Kontext "TabVariablen"
+ Call Dialogtest ( TabVariablen )
+
+ if gApplication <> "HTML" then
+ Kontext
+ Active.SetPage TabReferenzen
+ Kontext "TabReferenzen"
+ Call Dialogtest ( TabReferenzen )
+
+ Kontext
+ Active.SetPage TabFunktionen
+ Kontext "TabFunktionen"
+ Call Dialogtest ( TabFunktionen )
+ for i=1 to Feldtyp.GetItemCount
+ Feldtyp.Select i
+ if MakroButton.IsEnabled then
+ MakroButton.Click
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+
+ Kontext "ScriptSelector"
+ if ( ScriptSelector.exists( 5 ) ) then
+ ScriptSelector.Close
+ else
+ warnlog( "Dialog <ScriptSelector> is not available" )
+ endif
+ Kontext "TabFunktionen"
+ i=100
+ end if
+ next i
+
+ Kontext
+ Active.SetPage TabDatenbank
+ Kontext "TabDatenbank"
+ Call Dialogtest ( TabDatenbank )
+
+ printlog " Close dialog"
+ TabDatenbank.Close
+ else
+ printlog " Close dialog"
+ TabVariablen.Close
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertSpecialCharacter
+ PrintLog "- Insert / Special Character"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Special Character"
+ InsertSpecialCharacterWriter
+
+ Kontext "Sonderzeichen"
+ Call DialogTest (Sonderzeichen)
+ Sonderzeichen.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertSection
+ PrintLog "- Insert / Section"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Section"
+ InsertSection
+ Kontext
+
+ printlog " In dialog step through all tabpages"
+ printlog "- Tabpage Section"
+ Active.Setpage TabBereiche
+ Kontext "TabBereiche"
+ Call DialogTest (TabBereiche)
+ Verknuepfung.Check
+ if gUseSysDlg = False then
+ Auswaehlen.Click
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+ Wait 500
+ Kontext
+ printlog "- Tabpage Columns"
+ Active.Setpage TabSpalten
+ Kontext "TabSpalten"
+ Call DialogTest (TabSpalten)
+
+ Kontext
+ printlog "- Tabpage Background"
+ Active.Setpage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest (TabHintergrund)
+
+ if gApplication <> "HTML" then
+ printlog "Tabpage Indents"
+ Kontext
+ Active.Setpage TabSectionIndent
+ Kontext "TabSectionIndent"
+ Call DialogTest (TabSectionIndent)
+
+ printlog "- Tabpage Footnotes/Endnotes"
+ Kontext
+ Active.Setpage TabFussEndnoten
+ Kontext "TabFussEndnoten"
+ Call DialogTest (TabFussEndnoten)
+ TabFussEndnoten.Cancel
+ else
+ TabHintergrund.Cancel
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertHyperlink
+ Dim i as integer
+ PrintLog "- Insert / Hyperlink"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog "- Internet"
+ printlog " Insert / Hyperlink"
+ InsertHyperlink
+ printlog " In 'Hyperlink' dialog step through all pages"
+ Call wEinfuegenHyperlink(1)
+ Call DialogTest ( TabHyperlinkInternet )
+
+ Kontext "Hyperlink"
+ printlog "- Mail & News"
+ Call wEinfuegenHyperlink(2)
+ wait 500
+ Call DialogTest ( TabHyperlinkMailUndNews )
+
+ Kontext "Hyperlink"
+ printlog "- Document"
+ Call wEinfuegenHyperlink(3)
+ wait 500
+ Call DialogTest ( TabHyperlinkDokument )
+
+ DateiOeffnen.Click
+
+ Kontext "OeffnenDlg"
+ if ( OeffnenDlg.exists( 1 ) ) then
+ OeffnenDlg.Cancel
+ else
+ warnlog( "Dialog <OeffnenDlg> is not available" )
+ endif
+
+ Kontext "Hyperlink"
+ printlog "- New Document"
+ Call wEinfuegenHyperlink(4)
+ wait 500
+ Call DialogTest ( TabHyperlinkNeuesDokument )
+
+ Pfad.Click
+ Sleep 1
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+
+ Kontext "TabHyperlinkNeuesDokument"
+ TabHyperlinkNeuesDokument.Cancel
+ printlog " Close 'Hyperlink' dialog"
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertFootnote
+ PrintLog "- Insert / Footnote"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Footnote"
+ InsertFootnote
+ Kontext "FussnoteEinfuegen"
+ Call DialogTest (FussnoteEinfuegen)
+ Durchsuchen.Click
+ printlog " In 'Insert / Footnote' dialog click on browse button"
+
+ printlog " Close 'Special Character' dialog"
+ Kontext "Sonderzeichen"
+ Sonderzeichen.Cancel
+
+ printlog " Close 'Insert Footnote' dialog"
+ Kontext "FussnoteEinfuegen"
+ FussnoteEinfuegen.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertCaption
+ PrintLog "- Insert / Caption"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert graphic '..\writer\required\input\graphics\jolink.jpg"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ try
+ printlog " Insert / Caption"
+ InsertCaption
+ Kontext "Beschriftung"
+ Call DialogTest ( Beschriftung )
+ Sleep 1
+ printlog " In 'Caption' dialog click 'Options'"
+ WeitereOptionen.Click
+ Kontext "NummernkreisOptionen"
+ Call DialogTest ( NummernkreisOptionen )
+ printlog " Close 'Number Range Options' dialog"
+ NummernkreisOptionen.Cancel
+ Sleep 1
+ Kontext "Beschriftung"
+ printlog " Close 'Caption' dialog"
+ Beschriftung.Cancel
+ Sleep 2
+ catch
+ Warnlog "Insert / Caption is disabled!"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertBookmark
+ PrintLog "- Insert / Bookmark"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Bookmark"
+ InsertBookmark
+ Kontext "TextmarkeEinfuegen"
+ Call DialogTest (TextmarkeEinfuegen)
+ wait 500
+ printlog " Close 'Insert Bookmark' dialog"
+ TextmarkeEinfuegen.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertComment
+ dim sNoteText as String
+ PrintLog "- Insert / Comment"
+
+ Call hNewDocument
+
+ printlog " Insert / Comment"
+ InsertNoteWriter
+ Kontext "DocumentWriter"
+ sNoteText = "Comment inserted by testtool !"
+ Call wTypeKeys (sNoteText)
+
+ Call wNavigatorAuswahl( 11, 1 )
+ Kontext "NavigatorWriter"
+ if Auswahlliste.Gettext <> sNoteText then
+ warnlog ("Comment was not inserted correctly (Focus problem?")
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertCrossReference
+ Dim i as integer
+ Dim j as integer
+ printlog "- Insert / Reference Field"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Cross reference"
+ InsertReferenceField
+
+ Kontext "TabReferenzen"
+ if NOT TabReferenzen.IsVisible then Warnlog "Reference Tabpage isn't default!"
+
+ printlog " Step through all tabpages"
+ Kontext
+ Active.SetPage TabFunktionen
+ Kontext "TabFunktionen"
+ for i=1 to Feldtyp.GetItemCount
+ Feldtyp.Select i
+ if MakroButton.IsEnabled then
+ MakroButton.Click
+ ' if no JRE is installed a messagebox appears
+ j = 0
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "ScriptSelector"
+ if ( ScriptSelector.exists( 3 ) ) then
+ ScriptSelector.Close
+ else
+ warnlog( "Dialog <ScriptSelector> is not available" )
+ endif
+ Kontext "TabFunktionen"
+ i=100
+ end if
+ next i
+
+ Kontext
+ Active.SetPage TabDokumentinfoFeldbefehle
+ Kontext "TabDokumentinfoFeldbefehle"
+
+ Kontext
+ Active.SetPage TabVariablen
+ Kontext "TabVariablen"
+
+ Kontext
+ Active.SetPage TabDatenbank
+ Kontext "TabDatenbank"
+
+ Kontext
+ Active.SetPage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+
+ printlog " Close dialog"
+ TabDokumentFeldbefehle.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertScript
+ PrintLog "- Insert / Script"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Script"
+ InsertScript
+ Kontext "ScriptEinfuegen"
+ Call DialogTest (ScriptEinfuegen)
+ wait 500
+ ScriptEinfuegen.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertIndexesEntry
+ qaErrorLog "#158646# - Insert Indexes Entry causes crash."
+ goto endsub
+
+ PrintLog "- Insert / Indexes / Entry"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Indexes and Tables / Entry"
+ InsertIndexesEntry
+ Kontext "VerzeichniseintragEinfuegen"
+ Call DialogTest (VerzeichniseintragEinfuegen)
+ printlog " Click 'Insert'"
+ EintragNeu.Click
+
+ Kontext "BenutzerverzeichnisDefinieren"
+ Call DialogTest (BenutzerverzeichnisDefinieren)
+ printlog " Close dialog 'Insert Index Entry'"
+ BenutzerverzeichnisDefinieren.Cancel
+ Kontext "VerzeichniseintragEinfuegen"
+ EinfuegenSchliessen.Click
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertIndexesIndex
+ Dim i as integer
+ Printlog "- Insert / Indexes / Index"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Indexes and Tables / Indexes and Tables"
+ InsertIndexes
+ WaitSlot (5000)
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+ Sleep 1
+ printlog " Step through all Tabpages"
+ Kontext
+ printlog "- TabPage Indexes"
+ Active.Setpage TabVerzeichnisseVerzeichnis
+ Kontext "TabVerzeichnisseVerzeichnis"
+ For i= 1 to VerzeichnisTyp.GetItemCount
+ Sleep 1
+ if i = 2 then printlog "Alphabetical index see bug #i33671 (ok in m54)"
+ VerzeichnisTyp.Select i
+ printlog "- " + VerzeichnisTyp.GetSelText
+ Call DialogTest (TabVerzeichnisseVerzeichnis)
+ printlog "- Entry's to " + VerzeichnisTyp.GetSelText
+
+ if i = 1 then
+ ErzeugenAusGliederung.Check
+ end if
+
+ if i = 2 then
+ if gUseSysDlg = False then
+ Konkordanzdatei.Check
+ Kontext "KonkordanzdateiOeffnen"
+ if KonkordanzdateiOeffnen.Exists then
+ KonkordanzdateiOeffnen.Cancel
+ Warnlog "Open-Dialog comes up at checking the checkbox!"
+ end if
+ Kontext "TabVerzeichnisseVerzeichnis"
+ if KonkordanzAuswahl.IsEnabled then
+ KonkordanzAuswahl.Click
+ wait 500
+ Call hMenuSelectNr ( 1 )
+ Kontext "KonkordanzdateiOeffnen"
+ if KonkordanzdateiOeffnen.Exists then
+ KonkordanzdateiOeffnen.Cancel
+ else
+ Warnlog "No Open-Dialog selecting Concordance-File->Open!"
+ end if
+ Sleep 1
+ Kontext "TabVerzeichnisseVerzeichnis"
+ KonkordanzAuswahl.Click
+ wait 500
+ Call hMenuSelectNr ( 2 )
+ Kontext "SpeichernDlg"
+ if SpeichernDlg.Exists then
+ SpeichernDlg.Cancel
+ else
+ Warnlog "No Open-Dialog selecting Concordance-File->New!"
+ end if
+ else
+ Warnlog "- Concordance-File couldn't be selected, though checkbox is checked!"
+ end if
+ Sleep 1
+ end if
+ end if
+
+ Kontext
+ Active.Setpage TabVerzeichnisseEintraege
+ Kontext "TabVerzeichnisseEintraege"
+ Call DialogTest (TabVerzeichnisseEintraege)
+ Kontext
+ Active.Setpage TabVerzeichnisseVerzeichnis
+ Kontext "TabVerzeichnisseVerzeichnis"
+ next i
+ Sleep 1
+
+ Kontext
+ printlog "- Tabpage Styles"
+ Active.Setpage TabVerzeichnisseVorlagen
+ Kontext "TabVerzeichnisseVorlagen"
+ Call DialogTest (TabVerzeichnisseVorlagen)
+ Sleep 1
+ printlog "- Tabpage Columns"
+ Kontext
+ Active.Setpage TabSpalten
+ Kontext "TabSpalten"
+ Call DialogTest (TabSpalten)
+ Sleep 1
+ printlog "- Tabpage Background"
+ Kontext
+ Active.Setpage TabHintergrund
+ Kontext "TabHintergrund"
+ TabHintergrund.Cancel
+ Sleep 1
+ printlog " Close active document"
+ Call hCloseDocument
+
+ Sleep 2
+ printlog " Open new document"
+ Call hNewDocument
+ Sleep 2
+
+ printlog " View Zoom"
+ ViewZoom
+
+ Kontext "Massstab"
+ printlog " Check if 100% Zoom is checked ( Had a bug changed after opening Index dialog )"
+ if Massstab.Exists then
+ if Not Vergroesserung100.IsChecked then
+ Warnlog "100% Zoom is not checked.Maybe Bug#95871! Set Zoom to 100%!"
+ Vergroesserung100.Check
+ Massstab.ok
+ else
+ Massstab.Cancel
+ printlog " Close 'Zoom' dialog"
+ end if
+ else
+ Warnlog "Dialog 'Zoom' does not exist!"
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertIndexesBibliographyEntry
+ Printlog "- Insert / Indexes / Bibliography Entry"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Indexes and Tables / Bibliography Entry "
+ hUseAsyncSlot( "InsertIndexesBibliographyEntry" )
+
+ Kontext "Active"
+ if ( Active.Exists() ) then
+ Do
+ try
+ if ( Active.GetRT = 304 ) then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ catch
+ exit do
+ endcatch
+ Loop
+ end if
+
+ Kontext "LiteratureintragEinfuegen"
+ if ( LiteratureintragEinfuegen.exists( 1 ) ) then
+ Call DialogTest ( LiteratureintragEinfuegen )
+
+ printlog " In dialog 'Insert Bibliography Entry' click 'Edit'"
+ EintragBearbeiten.Click
+
+ Kontext "LiteratureintragDefinieren"
+ if ( LiteratureintragDefinieren.exists( 1 ) ) then
+ Call DialogTest ( LiteratureintragDefinieren )
+ printlog " Close dialog 'Define Bibliography Entry'"
+ LiteratureintragDefinieren.Close
+ else
+ warnlog( "Dialog <LiteratureintragDefinieren> is not available" )
+ endif
+
+ Kontext "LiteratureintragEinfuegen"
+ printlog " Close dialog 'Insert Bibliography Entry'"
+ EintragSchliessen.Click
+ else
+ warnlog( "Dialog <LiteratureintragEinfuegen> is not available" )
+ endif
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertEnvelope
+ PrintLog "- Insert / Envelope"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Envelope"
+ InsertEnvelope
+
+ Kontext
+ active.SetPage TabEnvelope
+ Kontext "TabEnvelope"
+ Call DialogTest (TabEnvelope)
+
+ Kontext
+ active.SetPage TabFormatEnvelope
+ Kontext "TabFormatEnvelope"
+ Call DialogTest (TabFormatEnvelope)
+ printlog " Step through all tabpages and click all buttons"
+
+ printlog "- Edit Addressee"
+ Sleep 1
+ AddresseeEdit.Click
+ wait 500
+ Call hMenuSelectNr(1)
+ Kontext
+ Sleep 1
+ Active.Setpage TabFont
+ Kontext "TabFont"
+ TabFont.Cancel
+
+ Kontext "TabFormatEnvelope"
+ Sleep 1
+ SenderEdit.Click
+ wait 500
+ Call hMenuSelectNr(2)
+ Kontext
+ Sleep 1
+ Active.Setpage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ TabEinzuegeUndAbstaende.Cancel
+
+ Kontext "TabFormatEnvelope"
+ printlog "- Edit Sender"
+ Sleep 1
+ SenderEdit.Click
+ wait 500
+ Call hMenuSelectNr(1)
+ Kontext
+ Sleep 1
+ Active.Setpage TabFont
+ Kontext "TabFont"
+ TabFont.Cancel
+
+ Kontext "TabFormatEnvelope"
+ Sleep 1
+ SenderEdit.Click
+ wait 500
+ Call hMenuSelectNr(2)
+ Kontext
+ Sleep 1
+ Active.Setpage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ TabEinzuegeUndAbstaende.Cancel
+
+ Kontext
+ Sleep 2
+ active.SetPage TabDruckerBriefumschlag
+ Kontext "TabDruckerBriefumschlag"
+ Call DialogTest (TabDruckerBriefumschlag)
+ if gPlatgroup = "w95" then
+ Einrichten.Click
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists then
+ DruckerEinrichten.Cancel
+ else
+ Warnlog "No Default-Printer!"
+ end if
+ Kontext "TabDruckerBriefumschlag"
+ end if
+ printlog " Close dialog"
+ TabDruckerBriefumschlag.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertFrame
+ PrintLog "- Insert / Frame"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Frame"
+ InsertFrame
+ WaitSlot (2000)
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest (TabType)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest (TabZusaetze)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest (TabUmlauf)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest (TabUmrandung)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest (TabHintergrund, 1)
+ Sleep 1
+ try
+ Als.Select (2)
+ Call DialogTest (TabHintergrund, 2)
+ Sleep 1
+ catch
+ Warnlog "Maybe missing combobox! (#i29517)"
+ endcatch
+
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest (TabHyperlinkRahmen)
+ Durchsuchen.Click
+
+ if gUSeSysDlg = False then
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+
+ Kontext
+ active.SetPage TabSpalten
+ Kontext "TabSpalten"
+ Call DialogTest (TabSpalten)
+ printlog " Close dialog"
+ TabSpalten.Cancel
+ else
+ printlog " Close dialog"
+ TabHintergrund.Cancel
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertTable
+ PrintLog "- Insert / Table"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert / Table"
+ InsertTableWriter
+
+ Kontext "TabelleEinfuegenWriter"
+ Call DialogTest (TabelleEinfuegenWriter)
+ if Spalten.Gettext <> "2" then Warnlog "- Default for Size Columns isn't 2 , it is " + Spalten.Gettext
+ if Zeilen.Gettext <> "2" then Warnlog "- Default for Size Row isn't 2, it is " + Zeilen.Gettext
+ printlog " In 'insert Table' dialog click 'AutoFormat'"
+ Autoformat.Click
+ Kontext "AutoformatTabelle"
+
+ printlog " In 'AutoFormat' dialog click 'More'"
+ Zusaetze.Click
+ Call DialogTest ( AutoformatTabelle )
+
+ if Formatbox.GetItemCount > 2 then
+ Formatbox.Select(3)
+ Zusaetze.Open
+ Umbenennen.Click
+ Kontext "AutoformatHinzufuegenWriter"
+ Call DialogTest ( AutoformatHinzufuegenWriter )
+ TabellenName.SetText "Hallo"
+ AutoformatHinzufuegenWriter.Cancel
+ Kontext "AutoFormatTabelle"
+ else
+ Warnlog "Only " + Formatbox.GetItemCount + " Table formats to select ?"
+ end if
+ printlog " Close dialog 'More'"
+ Zusaetze.Close
+ printlog " Close dialog 'AutoFormat'"
+ AutoformatTabelle.Cancel
+
+ Kontext "TabelleEinfuegenWriter"
+ printlog " Close dialog ''"
+ TabelleEinfuegenWriter.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertHorizontalLine
+ PrintLog "- Insert / Horizontal Line"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Horizontal Line"
+ InsertHorizontalLine
+ Kontext "HorizontaleLinieEinfuegen"
+ Call DialogTest (HorizontaleLinieEinfuegen)
+ printlog " Close dialog 'Insert Horizontal Ruler'"
+ HorizontaleLinieEinfuegen.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertGraphicsFromFile
+ PrintLog "- Insert / Graphics / From File"
+ Dim j as integer
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Graphics from file"
+ InsertGraphicsFromFile
+
+ Kontext "GrafikEinfuegenDlg"
+ printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg"
+ Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ Oeffnen.Click
+
+ Kontext "Active"
+ if Active.Exists( 1 ) then
+ Warnlog Active.Gettext
+ Active.Ok
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+ Call hCloseDocument
+ goto endsub
+ else
+ printlog " select again 'Insert / Grahics from file'"
+ InsertGraphicsFromFile
+ WaitSlot (2000)
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ wait 500
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ wait 500
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ wait 500
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ wait 500
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest ( TabHyperlinkRahmen )
+
+ Kontext
+ active.SetPage TabGrafik
+ wait 500
+ Kontext "TabGrafik"
+ Call DialogTest ( TabGrafik )
+
+ Kontext
+ active.SetPage TabUmrandung
+ wait 500
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabMakro
+ ' if no JRE is installed a messagebox appears
+ j = 0
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists() then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ wait 500
+ Kontext "TabMakro"
+ Call DialogTest ( TabMakro )
+
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabZuschneiden
+ wait 500
+ Kontext "TabZuschneiden"
+ Call DialogTest ( TabZuschneiden )
+
+ Kontext
+ active.SetPage TabHintergrund
+ wait 500
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+ printlog " Close dialog"
+ TabHintergrund.Cancel
+ else
+ printlog " Close dialog"
+ TabMakro.Cancel
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertAllGraphicsFromFile
+ Dim i as integer
+ Dim quellpfad as string
+ Dim DieDatei as string
+ Dim Ziel( 5000 ) as String
+ printlog "Insert / Graphics / From File (all Formats)"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert all graphic formats from directory: global\input\graf_inp\"
+ quellpfad = ConvertPath(gtesttoolpath + "global\input\graf_inp\")
+
+ GetFileList(quellpfad, "*.*" , Ziel())
+ for i=1 to ListCount(Ziel())
+ if (gPlatform = "osx") AND (right(ziel(i),3) = "eps") then
+ qaerrorlog "#i100253# skipping eps"
+ i=i+1
+ endif
+ printlog "- Graphic: " + Right(Ziel(i),3) + "-Format"
+ Call hGrafikEinfuegen ( Ziel(i) )
+ Sleep 5
+ Call wTypeKeys("<Delete>")
+ Call gMouseDoubleClick (10,10)
+ Sleep 5
+ next i
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertObjectOLEObject
+ PrintLog "- Insert / Object / OLE-Objekt"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Object / OLE-Object"
+ InsertObjectOLEObject
+
+ Kontext "OLEObjektEinfuegen"
+ printlog " Check both radiobuttons 'Create now' and 'Create from file'"
+ NeuErstellen.Check
+ Call DialogTest (OLEObjektEinfuegen, 1)
+ AusDateiErstellen.Check
+ Call DialogTest (OLEObjektEinfuegen, 2)
+ OLEObjektEinfuegen.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertObjectPlugIn
+ PrintLog "- Insert / Object / Plug-In"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Close 'Plug in' dialog"
+ InsertObjectPlugIn
+
+ Kontext "PlugInEinfuegen"
+ if PlugInEinfuegen.Exists then
+ Call DialogTest (PlugInEinfuegen)
+ PlugInEinfuegen.Cancel
+ else
+ Warnlog "Dialog 'Plugin' is not up!"
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertObjectSound
+ Printlog "- Insert / Object / Sound"
+ printlog " Open new document"
+ Call hNewDocument
+
+ try
+ if gUseSysDlg = False then
+ InsertObjectSound
+ printlog " Insert / Object / Sound"
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "Dialog to insert Sound isn't up!"
+ end if
+ end if
+ catch
+ 'Warnlog "- Menu disabled or no Sound-PlugIn installed !?"
+ endcatch
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertObjectVideo
+ Printlog "- Insert / Object / Video"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ try
+ if gUseSysDlg = False then
+ InsertObjectVideo
+ printlog " Insert / Object / Video"
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "Dialog to insert Video isn't up!"
+ end if
+ end if
+ catch
+ 'Warnlog "- Menu disabled or no Video-PlugIn installed !?"
+ endcatch
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertObjectFormula
+ PrintLog "- Insert / Object / Formula"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Object / Formular"
+ InsertObjectFormula
+ WaitSlot (2000)
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+ Sleep 1
+
+ printlog " Click in 'Math' document"
+ Call gMouseClick(1,1)
+ sleep 1
+ printlog " 'Delete math-object in document"
+ Call wTypeKeys("<Delete>")
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertObjectChart
+ PrintLog "- Insert / Object / Chart"
+
+ printlog " Open new document"
+ Call hNewDocument
+ ' Chart-Wizard will be invoked if data ranges exist
+ ' Therefor a table will be inserted
+ printlog " Insert / Table"
+ InsertTableWriter
+ Kontext "TabelleEinfuegenWriter"
+ TabelleEinfuegenWriter.Ok
+
+ printlog " Insert / Object / Chart"
+ InsertObjectChart
+
+ Kontext "ChartWizard"
+ if ChartWizard.Exists then
+ printlog "- Chart-Wizard is up=>OK"
+ Call DialogTest ( ChartWizard )
+ printlog " Cancel Chart-Wizard"
+ ChartWizard.Cancel
+ else
+ warnlog "Chart-Wizard is not up though a table has been inserted"
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertFile
+ PrintLog "- Insert / File"
+
+ printlog " Open new document"
+ Call hNewDocument
+ InsertFileWriter
+ WaitSlot( 2000 )
+
+ printlog " Insert / File"
+ Kontext "OeffnenDlg"
+
+ printlog " Check 'File dialog'"
+ if OeffnenDlg.Exists( 2 ) then
+ Call DialogTest ( OeffnenDlg )
+ try
+ Standard.Click
+ catch
+ Exceptlog
+ endcatch
+
+ Kontext "Active"
+ if Active.Exists then
+ Warnlog Active.Gettext
+ Active.Ok
+ else
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocInsertFields
+ PrintLog "- Insert / Fields"
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ try
+ printlog "Insert / Fields / Date"
+ InsertFieldsDate
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Date "
+ endcatch
+ printlog " Insert / Fields / Date"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Time"
+ InsertFieldsTime
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Time"
+ endcatch
+ printlog " Insert / Fields / Time"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Page Number"
+ InsertFieldsPageNumbers
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Page numbers"
+ endcatch
+ printlog " Insert / Fields / Page numbers"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Page Count"
+ InsertFieldsPageCount
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Page Count"
+ endcatch
+ printlog " Insert / Fields / Page count"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Title"
+ InsertFieldsTitle
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Title"
+ endcatch
+ printlog " Insert / Fields / Title"
+ Call wTypeKeys (" <Return>")
+ try
+ printlog "Insert / Fields / Author"
+ InsertFieldsAuthor
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Author"
+ endcatch
+ printlog " Insert / Fields / Author"
+ if gApplication <> "HTML" then
+ try
+ printlog "Insert / Fields / Subject"
+ InsertFieldsSubject
+ catch
+ Warnlog "Unable to execute: Insert / Fields / Subject"
+ endcatch
+ printlog " If document not HTML then 'Insert / Fields / Subject"
+ Call wTypeKeys (" <Return>")
+ printlog " Press key 'enter'"
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocInsertFieldsOther
+ Dim i as integer
+ Dim j as integer
+ printlog "- Insert / Fields / Other"
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Fields / Other"
+ InsertFieldsOther
+
+ Kontext
+ printlog " In dialog step through all tabpages"
+ Active.SetPage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ Call Dialogtest ( TabDokumentFeldbefehle )
+
+ Kontext
+ Active.SetPage TabDokumentinfoFeldbefehle
+ Kontext "TabDokumentinfoFeldbefehle"
+ Call Dialogtest ( TabDokumentinfoFeldbefehle )
+
+ Kontext
+ Active.SetPage TabVariablen
+ Kontext "TabVariablen"
+ Call Dialogtest ( TabVariablen )
+
+ if gApplication <> "HTML" then
+ Kontext
+ Active.SetPage TabReferenzen
+ Kontext "TabReferenzen"
+ Call Dialogtest ( TabReferenzen )
+
+ Kontext
+ Active.SetPage TabFunktionen
+ Kontext "TabFunktionen"
+ Call Dialogtest ( TabFunktionen )
+ for i=1 to Feldtyp.GetItemCount
+ Feldtyp.Select i
+ if MakroButton.IsEnabled then
+ MakroButton.Click
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+
+ Kontext "ScriptSelector"
+ if ( ScriptSelector.exists( 3 ) ) then
+ ScriptSelector.Close
+ else
+ warnlog( "Dialog <ScriptSelector> is not available" )
+ endif
+ Kontext "TabFunktionen"
+ i=100
+ end if
+ next i
+
+ Kontext
+ Active.SetPage TabDatenbank
+ Kontext "TabDatenbank"
+ Call Dialogtest ( TabDatenbank )
+
+ printlog " Close dialog"
+ TabDatenbank.Close
+ else
+ printlog " Close dialog"
+ TabVariablen.Close
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocInsertSection
+ PrintLog "- Insert / Section"
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Section"
+ InsertSection
+ Kontext
+
+ printlog " In dialog step through all tabpages"
+ printlog "- Tabpage Section"
+ Active.Setpage TabBereiche
+ Kontext "TabBereiche"
+ Call DialogTest (TabBereiche)
+ Verknuepfung.Check
+
+ Auswaehlen.Click
+ Kontext "OeffnenDlg"
+ if ( OeffnenDlg.exists( 1 ) ) then
+ OeffnenDlg.Cancel
+ else
+ warnlog( "Dialog <OeffnenDlg> is not available" )
+ endif
+
+ Wait 500
+ Kontext
+ printlog "- Tabpage Columns"
+ Active.Setpage TabSpalten
+ Kontext "TabSpalten"
+ Call DialogTest (TabSpalten)
+
+ Kontext
+ printlog "- Tabpage Background"
+ Active.Setpage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest (TabHintergrund)
+
+ if gApplication <> "HTML" then
+ printlog "Tabpage Indents"
+ Kontext
+ Active.Setpage TabSectionIndent
+ Kontext "TabSectionIndent"
+ Call DialogTest (TabSectionIndent)
+
+ printlog "- Tabpage Footnotes/Endnotes"
+ Kontext
+ Active.Setpage TabFussEndnoten
+ Kontext "TabFussEndnoten"
+ Call DialogTest (TabFussEndnoten)
+ TabFussEndnoten.Cancel
+ else
+ TabHintergrund.Cancel
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocInsertFrame
+ PrintLog "- Insert / Frame"
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Frame"
+ InsertFrame
+ WaitSlot (2000)
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest (TabType)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest (TabZusaetze)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest (TabUmlauf)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest (TabUmrandung)
+ Sleep 1
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest (TabHintergrund, 1)
+ Sleep 1
+ try
+ Als.Select (2)
+ Call DialogTest (TabHintergrund, 2)
+ Sleep 1
+ catch
+ Warnlog "Maybe missing combobox! (#i29517)"
+ endcatch
+
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest (TabHyperlinkRahmen)
+ Durchsuchen.Click
+
+ if gUSeSysDlg = False then
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+
+ Kontext
+ active.SetPage TabSpalten
+ Kontext "TabSpalten"
+ Call DialogTest (TabSpalten)
+ printlog " Close dialog"
+ TabSpalten.Cancel
+ else
+ printlog " Close dialog"
+ TabHintergrund.Cancel
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocInsertGraphicsFromFile
+ PrintLog "- Insert / Graphics / From File"
+ Dim j as integer
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert / Graphics from file"
+ InsertGraphicsFromFile
+
+ Kontext "GrafikEinfuegenDlg"
+ printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg"
+ Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ Oeffnen.Click
+
+ Kontext "Active"
+ if Active.Exists( 1 ) then
+ Warnlog Active.Gettext
+ Active.Ok
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+ Call hCloseDocument
+ goto endsub
+ else
+ printlog " select again 'Insert / Grahics from file'"
+ InsertGraphicsFromFile
+ WaitSlot (2000)
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ wait 500
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ wait 500
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ wait 500
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ wait 500
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest ( TabHyperlinkRahmen )
+
+ Kontext
+ active.SetPage TabGrafik
+ wait 500
+ Kontext "TabGrafik"
+ Call DialogTest ( TabGrafik )
+
+ Kontext
+ active.SetPage TabUmrandung
+ wait 500
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabMakro
+ ' if no JRE is installed a messagebox appears
+ j = 0
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ wait 500
+ Kontext "TabMakro"
+ Call DialogTest ( TabMakro )
+
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabZuschneiden
+ wait 500
+ Kontext "TabZuschneiden"
+ Call DialogTest ( TabZuschneiden )
+
+ Kontext
+ active.SetPage TabHintergrund
+ wait 500
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+ printlog " Close dialog"
+ TabHintergrund.Cancel
+ else
+ printlog " Close dialog"
+ TabMakro.Cancel
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_005_.inc b/testautomation/writer/required/includes/w_005_.inc
new file mode 100644
index 000000000000..830ce39adc24
--- /dev/null
+++ b/testautomation/writer/required/includes/w_005_.inc
@@ -0,0 +1,1189 @@
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Testcases for the Format-Menu
+'*
+'\******************************************************************
+
+sub w_005_
+
+ printLog Chr(13) + "--------- Menu Format (w_005_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tFormatDefault
+
+ Call tFormatCharacter
+ Call tFormatParagraph
+ Call tFormatNumberingBullets
+ Call tFormatPage
+
+ Call tFormatChangeCase
+ Call tFormatRuby
+ Call tFormatColumn
+ Call tFormatSections
+
+ Call tFormatStylist
+ Call tFormatAutoformatWhileTyping
+
+ Call tFormatAnchor
+ Call tFormatAnchorArea
+ Call tFormatWrap
+ Call tFormatWrapArea
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocFormatParagraph
+ Call tHtmlDocFormatPage
+ Call tHtmlDocFormatStylist
+ gApplication = "WRITER"
+
+end sub
+
+'------------------------------------------------------
+
+testcase tFormatDefault
+ PrintLog "- Format / Default"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert dummy text"
+ Call wBlindtextEinfuegen
+ printlog " Edit / Select All"
+ EditSelectAll
+ printlog " Format / Default"
+ FormatDefaultWriter
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tFormatSections
+ printlog "- Format / Sections"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert / Section"
+ InsertSection
+ printlog " Step through all tabpages"
+ Kontext
+ Active.Setpage TabBereiche
+ Kontext "TabBereiche"
+ Bereichsliste.SetText "Mein Bereich"
+ TabBereiche.OK
+
+ hUseAsyncSlot( "FormatSections" )
+ Kontext "BereicheBearbeiten"
+ Call Dialogtest(BereicheBearbeiten)
+ Optionen.Click
+ sleep(2)
+ Kontext
+ Active.SetPage TabSpalten
+ Kontext "TabSpalten"
+ Call Dialogtest(TabSpalten)
+ Kontext
+ Active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest(TabHintergrund, 1)
+ Als.Select(2)
+ Call DialogTest (TabHintergrund,2)
+ Durchsuchen.Click
+ sleep(2)
+ Kontext
+ If Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.GetText
+ Active.Ok
+ end if
+ end If
+
+ Kontext "GrafikEinfuegenDlg"
+ if ( GrafikEinfuegenDlg.exists( 1 ) ) then
+ GrafikEinfuegenDlg.Cancel
+ WaitSlot ' NOOP
+ else
+ warnlog( "Dialog <GrafikEinfuegenDlg> is not available" )
+ endif
+
+ Kontext "TabHintergrund"
+ TabHintergrund.Cancel
+
+ Kontext "BereicheBearbeiten"
+ if ( BereicheBearbeiten.exists( 1 ) ) then
+ BereicheBearbeiten.Cancel
+ else
+ warnlog( "Dialog <BereicheBearbeiten> is not available" )
+ endif
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tFormatCharacter
+ PrintLog "- Format / Character"
+ Dim j as integer
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Format / Character"
+ FormatCharacter
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
+ Call DialogTest ( TabFont )
+
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ Call DialogTest ( TabFontEffects )
+
+ Kontext
+ Active.SetPage TabFontPosition
+ Kontext "TabFontPosition"
+ Call DialogTest ( TabFontPosition )
+
+ if gAsianSup = True then
+ try
+ Kontext
+ Active.SetPage TabAsianLayout
+ Kontext "TabAsianLayout"
+ Call DialogTest ( TabAsianLayout )
+ catch
+ Warnlog "Tabpage 'Asian Layout' is not visible! Activated in Options ?"
+ endcatch
+ end if
+
+ Kontext
+ active.SetPage TabHyperlinkZeichen
+ Kontext "TabHyperlinkZeichen"
+ Call DialogTest ( TabHyperlinkZeichen )
+
+ Durchsuchen.Click
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists( 1 ) then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "File-Open dialog is not up!"
+ end if
+
+ Kontext "TabHyperlinkZeichen"
+ Ereignisse.Click
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "MakroZuweisen"
+ Call DialogTest ( MakroZuweisen )
+ MakroZuweisen.Cancel
+ Kontext
+ active.SetPage TabHintergrund
+ kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+ printlog " Close dialog"
+ TabHintergrund.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------
+
+testcase tFormatChangeCase
+ printlog "- Format / Change Case"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert some text in document and select text"
+ Call wTypeKeys ("Hello World!")
+ Call wTypeKeys ("<Shift Home>")
+
+ printlog " Format / Case Characters / Upper"
+ hUseAsyncSlot( "FormatChangeCaseUpper" )
+
+ printlog " Format / Case Characters / Lower"
+ hUseAsyncSlot( "FormatChangeCaseLower" )
+
+ if ( gAsianSup ) then
+ try
+ FormatChangeCaseHalfWidth
+ printlog " Format / Case Characters / Half Width"
+ catch
+ Warnlog "Format / Change Case / Half Width does not work. Maybe no Asian support!"
+ endcatch
+ WaitSlot()
+
+ try
+ printlog " Format / Case Characters / Full Width"
+ FormatChangeCaseFullWidth
+ catch
+ Warnlog "Format / Change Case / Full Width does not work. Maybe no Asian support!"
+ endcatch
+ WaitSlot()
+
+ try
+ printlog " Format / Case Characters / Hiragana"
+ FormatChangeCaseHiragana
+ catch
+ Warnlog "Format / Change Case / Hiragana does not work. Maybe no Asian support!"
+ endcatch
+ WaitSlot()
+
+ try
+ printlog " Format / Case Characters / Katagana"
+ FormatChangeCaseKatagana
+ catch
+ Warnlog "Format / Change Case / Katagana does not work. Maybe no Asian support!"
+ endcatch
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------
+
+testcase tFormatRuby
+ printlog "- Format / Ruby"
+ if gAsianSup = True then
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ Call hNewDocument
+ printlog " Open new document"
+ Call wTypeKeys ("Hello World!")
+ Call wTypeKeys ("<Shift Home>")
+ printlog " Insert some text in document"
+
+ try
+ printlog " Format / Ruby"
+ FormatRuby
+ catch
+ Warnlog "Format / Ruby does not work. Maybe No Asian support!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Kontext "RubyDialog"
+ Call DialogTest ( RubyDialog )
+
+ printlog " Open Stylist"
+ CallStylist.Click
+
+ Kontext "Stylist"
+ if Stylist.Exists( 1 ) then
+ Stylist.close
+ else
+ Warnlog "Stylist has not been opened!"
+ end if
+
+ printlog " Close Stylist and Ruby dialog"
+ Kontext "RubyDialog"
+ DialogClose.Click
+
+ printlog " Close active document"
+ Call hCloseDocument
+ end if
+endcase
+
+'------------------------------------------------
+
+testcase tFormatParagraph
+ PrintLog "- Format / Paragraph"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Format / Paragraph"
+ FormatParagraph
+
+ Kontext
+ active.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ Call DialogTest ( TabEinzuegeUndAbstaende )
+ printlog " Step through all tabpages"
+
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ Call DialogTest ( TabAusrichtungAbsatz )
+
+ Kontext
+ active.SetPage TabNumerierungAbsatz
+ kontext "TabNumerierungAbsatz"
+ Call DialogTest ( TabNumerierungAbsatz )
+
+ Kontext
+ active.SetPage TabUmrandung
+ kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabTextfluss
+ kontext "TabTextfluss"
+ Call DialogTest ( TabTextfluss )
+
+ if ( gAsianSup ) then
+ try
+ Kontext
+ Active.SetPage TabAsianTypography
+ Kontext "TabAsianTypography"
+ Call DialogTest ( TabAsianTypography )
+ catch
+ Warnlog "Tabpage 'Asian Typography' is not visible! Activated in Options ?"
+ endcatch
+ end if
+
+ Kontext
+ active.SetPage TabTabulator
+ kontext "TabTabulator"
+ Call DialogTest ( TabTabulator )
+
+ Kontext
+ active.SetPage TabInitialen
+ kontext "TabInitialen"
+ Anzeigen.Check
+ Call DialogTest ( TabInitialen )
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund, 1 )
+ Als.Select 2
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund, 2 )
+ Durchsuchen.Click
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+
+ printlog " Close dialog"
+ kontext "TabHintergrund"
+ TabHintergrund.Close
+ else
+ printlog " Close dialog"
+ TabUmrandung.Close
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------
+
+testcase tFormatPage
+ PrintLog "- Format / Page"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Format / Page"
+ FormatPageWriter
+
+ Kontext
+ printlog " Step through all tabpages"
+ active.SetPage TabVerwalten
+ kontext "TabVerwalten"
+ Call DialogTest ( TabVerwalten )
+
+ Kontext
+ active.SetPage TabSeite
+ kontext "TabSeite"
+ Call DialogTest ( TabSeite )
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "Active"
+ If Active.GetRT = 304 then Active.Yes ' Messagebox abfangen-> Seitenr๏ฟฝnder au๏ฟฝerhalb des Bereichs
+
+ Kontext
+ active.SetPage TabHintergrund
+ kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund, 1 )
+ Als.Select 2
+ Call DialogTest ( TabHintergrund, 2 )
+ Durchsuchen.Click
+
+ Kontext "GrafikEinfuegenDlg"
+ if ( GrafikEinfuegenDlg.exists( 1 ) ) then
+ GrafikEinfuegenDlg.Cancel
+ else
+ warnlog( "Dialog <GrafikEinfuegenDlg> is not available" )
+ endif
+
+ Kontext
+ active.SetPage TabKopfzeile
+ kontext "TabKopfzeile"
+ Call DialogTest ( TabKopfzeile )
+ if gApplication <> "HTML" then
+ KopfzeileMitAbstand.Check
+ Zusaetze.Click
+
+ Kontext
+ active.SetPage TabUmrandung
+ kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+ Kontext
+ active.SetPage TabHintergrund
+ kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+ Als.Select 2
+ Call DialogTest ( TabHintergrund )
+ TabHintergrund.Close
+ end if
+ Kontext
+ active.SetPage TabFusszeile
+ kontext "TabFusszeile"
+ Call DialogTest ( TabFusszeile )
+ if gApplication <> "HTML" then
+ FusszeileMitAbstand.Check
+ Zusaetze.Click
+
+ Kontext
+ active.SetPage TabUmrandung
+ kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+ Kontext
+ active.SetPage TabHintergrund
+ kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund, 1 )
+ Als.Select 2
+ Call DialogTest ( TabHintergrund, 2 )
+ TabHintergrund.Close
+
+ Kontext
+ active.SetPage TabUmrandung
+ kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabSpalten
+ kontext "TabSpalten"
+ Call DialogTest ( TabSpalten )
+
+ if gAsianSup = True then
+ Kontext
+ active.Setpage TabGrid
+ Kontext "TabGrid"
+ Call DialogTest ( TabGrid )
+ end if
+
+ Kontext
+ active.SetPage TabFussnote
+ kontext "TabFussnote"
+ Call DialogTest ( TabFussnote )
+ printlog " Close dialog"
+ TabFussnote.Close
+ else
+ printlog " Close dialog"
+ TabFussZeile.Close
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------
+
+testcase tFormatNumberingBullets
+ dim referencecounter as integer
+ PrintLog "- Format / Numbering / Bullets"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Format / Numbering/Bullets"
+ FormatNumberingBullets
+ WaitSlot (5000)
+
+ printlog " Step through all tabpages"
+ Kontext
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ Call DialogTest ( TabBullet )
+
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Call DialogTest ( TabNumerierungsart )
+
+ Kontext
+ Active.SetPage TabNumerierung
+ Kontext "TabNumerierung"
+ Call DialogTest ( TabNumerierung )
+
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ Call DialogTest ( TabGrafiken )
+
+ Kontext
+ Active.SetPage TabPositionNumerierung
+ Kontext "TabPositionNumerierung"
+ Call DialogTest ( TabPositionNumerierung )
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ Call DialogTest ( TabOptionenNumerierung )
+ Numerierung.Select 9
+
+ try
+ Auswahl.Click
+ catch
+ QAErrorlog "Numbering option 'Linked graphics' is missing"
+ TabOptionenNumerierung.Cancel
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Sleep 2
+ Call hMenuSelectNr (1)
+ Sleep 2
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+
+ Kontext "TabOptionenNumerierung"
+
+ Sleep 1
+
+ try
+ Auswahl.Click
+ referencecounter = hMenuItemGetCount
+ wait (350)
+ do while (hMenuItemGetCount <> "2")
+ referencecounter = hMenuItemGetCount
+ wait (100)
+ loop
+ Call hMenuSelectNr(2)
+ referencecounter = hMenuItemGetCount
+ wait (100)
+ do while (hMenuItemGetCount <> referencecounter)
+ referencecounter = hMenuItemGetCount
+ wait (150)
+ loop
+ Call hMenuClose
+ catch
+ Exceptlog
+ Call hMenuClose
+ endcatch
+
+ printlog " Close dialog"
+ TabOptionenNumerierung.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tFormatStylist
+ PrintLog "- Format / Stylist"
+
+ if gPlatgroup = "unx" then
+ QAErrorlog "Doesn't run on unix"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+ Kontext "Gestalter"
+ If Not Gestalter.Exists then FormatStylist
+ printlog " Format / Stylist"
+ Kontext "Gestalter"
+ Call DialogTest ( Gestalter )
+ Zeichenvorlagen.Click
+ printlog " Click all Styles-buttons in Stylist"
+ if gApplication <> "HTML" then
+ WaitSlot()
+ Rahmenvorlagen.Click
+ WaitSlot()
+ Seitenvorlagen.Click
+ end if
+ WaitSlot()
+ Numerierungsvorlagen.Click
+ WaitSlot()
+ Absatzvorlagen.Click
+ WaitSlot()
+
+ TBGestalterRight.Click Giesskanne
+ WaitSlot()
+
+ AusSelektion.OpenMenu
+ Sleep 1
+ hMenuSelectNr(1)
+
+ Kontext "VorlageErzeugen"
+ if ( VorlageErzeugen.exists( 1 ) ) then
+ DialogTest ( VorlageErzeugen )
+ VorlageErzeugen.Cancel
+ else
+ warnlog( "Dialog <VorlageErzeugen> is not available" )
+ endif
+
+ Kontext "Gestalter"
+ AusSelektion.OpenMenu
+ Sleep 1
+ hMenuSelectNr(2)
+
+ AusSelektion.OpenMenu
+ Sleep 1
+ hMenuSelectNr(3)
+
+ Kontext "Neu"
+ if ( Neu.exists( 10 ) ) then
+ DialogTest ( Neu )
+ Neu.Cancel
+ else
+ warnlog( "Dialog <Neu> is not available" )
+ endif
+
+ printlog " Close Stylist"
+ Kontext "Gestalter"
+ Gestalter.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------
+
+testcase tFormatAutoformatWhileTyping
+ PrintLog "- Format / Autoformat / "
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Uncheck 'Format / Autoformat / While typing'"
+ FormatAutoformatWhileTyping
+ WaitSlot (2000)
+ printlog " Check 'Format / Autoformat / While typing'"
+ FormatAutoformatWhileTyping
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatColumn
+ PrintLog "- Format / Column"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ Wait 500
+ printlog " Format / column / Width"
+ FormatColumnWidthWriter
+ WaitSlot (500)
+ Kontext "SpaltenBreite"
+ Breite.SetText "2,5"
+ Call DialogTest ( SpaltenBreite )
+ printlog " Close dialog"
+ SpaltenBreite.OK
+ Wait 500
+ Call wDocSetContext
+ printlog " Enter some text in document"
+ Call wTypeKeys ("Dies ist ein langer Text, HALLO HALLO")
+ Wait 500
+ printlog " Format / Column / Optimal Width"
+ FormatColumnOptimalWidthWriter
+ WaitSlot (500)
+ printlog " Format / Row / Select"
+ TableSelectEntireRow
+ WaitSlot (500)
+ printlog " Format / Column / Space equally"
+ FormatColumnSpaceEqually
+ WaitSlot (500)
+ printlog " Format / Column / Select"
+ TableSelectColumn
+ WaitSlot (500)
+ printlog " Format / Cloumn / Delete"
+ TableDeleteColumns
+ WaitSlot (500)
+ Call wDocSetContext
+ printlog " Press 'up' twice to point cursor in the table"
+ Call wTypeKeys ("<Up>",2)
+ wait 500
+ printlog " Format / Column / Insert "
+ FormatColumnInsert
+ WaitSlot (500)
+ Kontext "EinfuegenSpalten"
+ Anzahl.SetText "3"
+ Call DialogTest ( EinfuegenSpalten )
+ printlog " Close dialog"
+ EinfuegenSpalten.OK
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAnchor
+
+ PrintLog "- Format / Anchor"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ try
+ FormatAnchorToPage
+ printlog " Format / Anchor / to page"
+ catch
+ Warnlog "'Page' couldn't be executed!"
+ endcatch
+
+ Sleep 1
+ try
+ FormatAnchorToParagraph
+ catch
+ printlog " Format / Anchor / to paragraph"
+ Warnlog "'to paragraph' couldn't be executed!"
+ endcatch
+
+ WaitSlot (1000)
+ try
+ FormatAnchorToCharacter
+ printlog " Format / Anchor / to character"
+ catch
+ Warnlog "'To Character' couldn't be executed!"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatAnchorAsCharacter
+ printlog " Format / Anchor / As Character"
+ catch
+ Warnlog "'as Character' couldn't be executed!"
+ endcatch
+ WaitSlot (1000)
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatWrap
+ PrintLog "- Format / Wrap"
+ if gApplication = "HTML" then
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ try
+ FormatWrapNoWrap
+ printlog " Format / Wrap / No wrap"
+ catch
+ Warnlog "Error on 'No Wrap'"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatWrapPageWrap
+ printlog " Format / Wrap / Page Wrap"
+ catch
+ Warnlog "Error on 'Page Wrap'"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatWrapOptimalPageWrap
+ printlog " Format / Wrap / optimal page wrap"
+ catch
+ Warnlog "Error on 'Optimal Page Wrap'"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatWrapThrough
+ printlog " Format / Wrap / Through"
+ catch
+ Warnlog "Error on 'Wrap Through'"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatWrapInBackground
+ printlog " Format / Wrap / In Background "
+ catch
+ Warnlog "Error on 'In Background'"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatWrapFirstParagraph
+ printlog " Format / Wrap / First paragraph"
+ catch
+ Warnlog "Error on 'First Paragraph'"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatWrapContour
+ printlog " Format / Wrap / Contour"
+ Warnlog "Error on 'Contour'"
+ catch
+ printlog "Contour Wrap disabled->OK"
+ endcatch
+ WaitSlot (1000)
+
+ try
+ FormatWrapEditContour
+ printlog " Format / Wrap / Edit Contour"
+ WaitSlot (5000)
+ Kontext "KonturEditor"
+ Dialogtest ( KonturEditor )
+ Sleep 2
+ KonturEditor.Close
+ printlog " Close contour editor"
+ Kontext
+ if Active.Exists (2) then Active.Yes
+ catch
+ Warnlog "#85505#Error on 'Edit Contur'"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAnchorArea
+
+ PrintLog "- Format / Anchor drawing objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog "crashed because of i32539 (fixed in m54)"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wRectangleToClipboard
+
+ hUseAsyncSlot( "EditPaste" )
+
+ try
+ printlog " Format / Anchor / To page"
+ FormatAnchorToPage
+ catch
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ FormatAnchorToPage
+ endcatch
+
+ WaitSlot (1000)
+ printlog " Format / Anchor / to paragraph"
+ FormatAnchorToParagraph
+ WaitSlot (1000)
+ printlog " Format / Anchor / As character"
+ FormatAnchorAsCharacter
+ WaitSlot (1000)
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatWrapArea
+ PrintLog "- Format / Wrap drawing objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog "crashed because of i32539 (fixed in m54)"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wRectangleToClipboard
+
+ hUseAsyncSlot( "EditPaste" )
+
+ try
+ printlog " Format / Wrap / No wrap"
+ FormatWrapNoWrap
+ catch
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ FormatWrapNoWrap
+ endcatch
+
+ WaitSlot (1000)
+ printlog " Format / Wrap / Contour"
+ try
+ FormatWrapContour ' should be disabled with 'No wrap'
+ Warnlog "Format / Wrap / Contour is disabled!"
+ catch
+ endcatch
+ WaitSlot (1000)
+ printlog " Format / Wrap / Page wrap"
+ try
+ FormatWrapPageWrap
+ catch
+ Warnlog "Format / Wrap / Page Wrap is disabled!"
+ endcatch
+ WaitSlot (1000)
+ printlog " Format / Wrap / Contour"
+ try
+ FormatWrapContour
+ catch
+ Warnlog "Format / Wrap / Contour is disabled!"
+ endcatch
+ WaitSlot (1000)
+ printlog " Format / Wrap / optimal page wrap"
+ try
+ FormatWrapOptimalPageWrap
+ catch
+ Warnlog "Format / Wrap / Optimal page wrap is disabled!"
+ endcatch
+ WaitSlot (1000)
+ printlog " Format / Wrap / Through"
+ try
+ FormatWrapThrough
+ catch
+ Warnlog "Format / Wrap /Through is disabled!"
+ endcatch
+ WaitSlot (1000)
+ printlog " Format / Wrap / In Background"
+ try
+ FormatWrapInBackground
+ catch
+ Warnlog "Format / Wrap / In Background is disabled!"
+ endcatch
+ WaitSlot (1000)
+ printlog " Format / Wrap / First paragraph"
+ try
+ FormatWrapFirstParagraph
+ catch
+ Warnlog "Format / Wrap / First paragraph is disabled!"
+ endcatch
+ sleep (2)
+ try
+ printlog " Format / Wrap / Edit"
+ FormatWrapEdit
+ catch
+ Warnlog "Drawing object in wrong format from the clipboard!"
+ endcatch
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+ printlog " Close upcoming dialog"
+ TabUmlauf.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocFormatParagraph
+ PrintLog "- Format / Paragraph"
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Format / Paragraph"
+ FormatParagraph
+
+ Kontext
+ active.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ Call DialogTest ( TabEinzuegeUndAbstaende )
+ printlog " Step through all tabpages"
+
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ Call DialogTest ( TabAusrichtungAbsatz )
+
+ Kontext
+ active.SetPage TabNumerierungAbsatz
+ kontext "TabNumerierungAbsatz"
+ Call DialogTest ( TabNumerierungAbsatz )
+
+ Kontext
+ active.SetPage TabUmrandung
+ kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+ printlog " Close dialog"
+ TabUmrandung.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'------------------------------------------------
+
+testcase tHtmlDocFormatPage
+ PrintLog "- Format / Page"
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Format / Page"
+ FormatPageWriter
+
+ Kontext
+ printlog " Step through all tabpages"
+ active.SetPage TabVerwalten
+ kontext "TabVerwalten"
+ Call DialogTest ( TabVerwalten )
+
+ Kontext
+ active.SetPage TabSeite
+ kontext "TabSeite"
+ Call DialogTest ( TabSeite )
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "Active"
+ If Active.GetRT = 304 then Active.Yes ' Messagebox abfangen-> Seitenr๏ฟฝnder au๏ฟฝerhalb des Bereichs
+
+ Kontext
+ active.SetPage TabHintergrund
+ kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund, 1 )
+ Als.Select 2
+ Call DialogTest ( TabHintergrund, 2 )
+ Durchsuchen.Click
+
+ Kontext "GrafikEinfuegenDlg"
+ if ( GrafikEinfuegenDlg.exists( 1 ) ) then
+ GrafikEinfuegenDlg.Cancel
+ else
+ warnlog( "Dialog <GrafikEinfuegenDlg> is not available" )
+ endif
+
+ Kontext
+ active.SetPage TabKopfzeile
+ kontext "TabKopfzeile"
+ Call DialogTest ( TabKopfzeile )
+ Kontext
+ active.SetPage TabFusszeile
+ kontext "TabFusszeile"
+ Call DialogTest ( TabFusszeile )
+ printlog " Close dialog"
+ TabFussZeile.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'--------------------------------------------------
+
+testcase tHtmlDocFormatStylist
+ PrintLog "- Format / Stylist"
+ gApplication = "HTML"
+ if gPlatgroup = "unx" then
+ QAErrorlog "Doesn't run on unix"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+ Kontext "Gestalter"
+ If Not Gestalter.Exists then FormatStylist
+ printlog " Format / Stylist"
+ Kontext "Gestalter"
+ Call DialogTest ( Gestalter )
+ Zeichenvorlagen.Click
+ printlog " Click all Styles-buttons in Stylist"
+ WaitSlot()
+
+ Numerierungsvorlagen.Click
+ WaitSlot()
+
+ Absatzvorlagen.Click
+ WaitSlot()
+
+ TBGestalterRight.Click Giesskanne
+ WaitSlot()
+
+ AusSelektion.OpenMenu
+ wait( 500 )
+ hMenuSelectNr( 1 )
+
+ Kontext "VorlageErzeugen"
+ if ( VorlageErzeugen.exists( 1 ) ) then
+ DialogTest ( VorlageErzeugen )
+ VorlageErzeugen.Cancel
+ else
+ warnlog( "Dialog <VorlageErzeugen> is not available" )
+ endif
+
+
+ Kontext "Gestalter"
+ if ( Gestalter.exists( 1 ) ) then
+ AusSelektion.OpenMenu
+ wait( 500 )
+ hMenuSelectNr(2)
+
+ AusSelektion.OpenMenu
+ wait( 500 )
+ hMenuSelectNr(3)
+
+ Kontext "Neu"
+ if ( Neu.exists( 10 ) ) then
+ DialogTest ( Neu )
+ Neu.Cancel
+ else
+ warnlog( "Dialog <Neu> is not available" )
+ endif
+
+ printlog " Close Stylist"
+ Kontext "Gestalter"
+ Gestalter.Close
+ else
+ warnlog( "Dialog <Gestalter> is not available" )
+ endif
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_005b_.inc b/testautomation/writer/required/includes/w_005b_.inc
new file mode 100644
index 000000000000..ad7c69346cf8
--- /dev/null
+++ b/testautomation/writer/required/includes/w_005b_.inc
@@ -0,0 +1,1514 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Testcases for the Format-Menu.
+'*
+'\***********************************************************************
+
+sub w_005b_
+
+ printLog Chr(13) + "--------- Menu Format / 2 (w_005b_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tFormatAlignment
+ Call tFormatAlignmentArea
+ Call tFormatAlignmentEdit
+ Call tFormatArrange
+ Call tFormatArrangeArea
+ Call tFormatFlip
+ Call tFormatGroup
+
+ ' Object submenu
+ Call tFormatPositionAndSize
+ Call tFormatPositionAndSizeLegend
+ Call tFormatLine
+ Call tFormatArea
+ Call tFormatText
+ Call tFormatFontwork
+
+ ' Frame
+ Call hExportUmstellung ( TRUE )
+ Call tFormatObject
+ Call tFormatArrangeObject
+ Call tFormatAlignmentObject
+ Call tFormatAnchorObject
+ Call tFormatWrapObject
+ Call hExportUmstellung ( FALSE )
+
+ 'Picture ( jolink.jpg )
+ Call tFormatGraphics
+
+ 'Editmode with Draw objects
+ Call tFormatStyleEdit
+ Call tFormatLineSpacing
+ Call tFormatParagraphEdit
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocFormatGraphics
+ Call tHtmlDocFormatAlignment
+ Call tHtmlDocFormatObject
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tFormatGraphics
+ PrintLog "- Format / Graphics"
+ Dim j as integer
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a graphic (..\writer\required\input\graphics\jolink.jpg)"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ printlog " Format / Graphic"
+ if ( hUseAsyncSlot( "FormatGraphics" ) = -1 ) then
+ Warnlog "- Format / Graphics disabled or hidden!"
+ goto endsub
+ end if
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest ( TabHyperlinkRahmen )
+
+ Kontext
+ active.SetPage TabGrafik
+ Kontext "TabGrafik"
+ Call DialogTest ( TabGrafik )
+
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabZuschneiden
+ Kontext "TabZuschneiden"
+ Call DialogTest ( TabZuschneiden )
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+ end if
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabMakro
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "TabMakro"
+ Call DialogTest ( TabMakro )
+
+ printlog " Close dialog"
+ TabMakro.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatArrange
+ PrintLog "- Format / Arrange"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ try
+ printlog " Format / Arrange / Bring to front"
+ FormatArrangeBringToFrontCalc
+ catch
+ Warnlog "'Bring to front' couldn't be executed!"
+ endcatch
+ WaitSlot()
+ try
+ FormatArrangeBringForward
+ printlog " Format / Arrange / Bring forward"
+ catch
+ Warnlog "'Bring forward' couldn't be executed!"
+ endcatch
+ WaitSlot()
+ try
+ FormatArrangeSetBackward
+ printlog " Format / Arrange / Set backward"
+ catch
+ Warnlog "'Send backward' couldn't be executed!"
+ endcatch
+ WaitSlot()
+ try
+ FormatArrangeSendToBack
+ printlog " Format / Arrange / Send to back"
+ catch
+ Warnlog "'Send to back' couldn't be executed!"
+ Sleep 1
+ endcatch
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAlignment
+
+ PrintLog "- Format / Alignment"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ if ( gApplication = "HTML" ) then
+ printlog " Format / Anchor / to Page"
+ hUseAsyncSlot( "FormatAnchorToPage" )
+ end if
+
+ try
+ printlog " Format / Alignment / Left"
+ FormatAlignmentLeft
+ WaitSlot()
+ catch
+ Warnlog "'Alignment left' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Right"
+ FormatAlignmentRight
+ WaitSlot()
+ catch
+ Warnlog "'Alignment right' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Top"
+ FormatAlignmentTop
+ WaitSlot()
+ catch
+ Warnlog "'Alignment top' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Center"
+ FormatAlignmentCenter
+ WaitSlot()
+ catch
+ Warnlog "'Alignment center' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Bottom"
+ FormatAlignmentBottom
+ WaitSlot()
+ catch
+ Warnlog "'Alignment bottom' couldn't be executed!"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatObject
+ PrintLog "- Format / Object"
+ Dim j as integer
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a frame"
+ Call wInsertFrame
+
+ printlog " Format / Frame"
+ FormatFrame
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest ( TabHyperlinkRahmen )
+
+ Kontext
+ active.SetPage TabMakro
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "TabMakro"
+ Call DialogTest ( TabMakro )
+ printlog " Close dialog"
+ TabMakro.Cancel
+ else
+ printlog " Close dialog"
+ TabHintergrund.Cancel
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatArrangeObject
+ PrintLog "- Format / Arrange Frame"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a frame"
+ Call wInsertFrame
+ printlog " Format / Arrange / Bring to front"
+ FormatArrangeBringToFrontCalc : WaitSlot()
+
+ printlog " Format / Arrange / Bring forward"
+ FormatArrangeBringForward : WaitSlot()
+
+ printlog " Format / Arrange / Set backward"
+ FormatArrangeSetBackward : WaitSlot()
+
+ printlog " Format / Arrange / Send to back "
+ FormatArrangeSendToBack : WaitSlot()
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAlignmentObject
+ PrintLog "- Format / Alignment Frame"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a frame"
+ Call wInsertFrame
+ printlog " Format / Alignment / Left"
+ FormatAlignmentLeft : WaitSlot()
+
+ printlog " Format / Alignment / Centered"
+ FormatAlignmentCentered : WaitSlot()
+
+ printlog " Format / Alignment / Right"
+ FormatAlignmentRight : WaitSlot()
+
+ printlog " Format / Alignment / Top"
+ FormatAlignmentTop : WaitSlot()
+
+ printlog " Format / Alignment / Center"
+ FormatAlignmentCenter : WaitSlot()
+
+ printlog " Format / Alignment / Bottom"
+ FormatAlignmentBottom : WaitSlot()
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAnchorObject
+
+ PrintLog "- Format / Anchor Frame"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a frame"
+ Call wInsertFrame
+ printlog " Format / Anchor / to page"
+ FormatAnchorToPage : WaitSlot()
+
+ printlog " Format / Anchor / to paragraph"
+ FormatAnchorToParagraph : WaitSlot()
+
+ printlog " Format / Anchor / to character"
+ FormatAnchorToCharacter : WaitSlot()
+
+ printlog " Format / Anchor / as character"
+ FormatAnchorAsCharacter : WaitSlot()
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatWrapObject
+
+ PrintLog "- Format / Wrap (Frame)"
+
+ if ( gApplication = "HTML" ) then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a frame"
+ Call wInsertFrame
+
+ printlog " Format / Wrap / no wrap"
+ FormatWrapNoWrap : WaitSlot()
+
+ printlog " Format / Wrap / page wrap"
+ FormatWrapPageWrap : WaitSlot()
+
+ printlog " Format / Wrap / optimal page wrap"
+ FormatWrapOptimalPageWrap : WaitSlot()
+
+ printlog " Format / Wrap / through"
+ FormatWrapThrough : WaitSlot()
+
+ printlog " Format / Wrap / in background"
+ FormatWrapInBackground : WaitSlot()
+
+ printlog " Format / Wrap / first paragraph"
+ FormatWrapFirstParagraph : WaitSlot()
+
+ if ( hUseAsyncSlot( "FormatWrapContour" ) = -1 ) then
+ printlog( "Format / Wrap / Contour disabled. Good." )
+ else
+ warnlog( "#i90964# Format / Wrap / Contour should not be enabled for frames" )
+ end if
+
+ printlog " Format / Wrap / Edit Contour"
+ if ( hUseAsyncSlot( "FormatWrapEditContour" ) = -1 ) then
+ printlog( "Format / Wrap / Edit Contour disabled. Good." )
+ else
+ Warnlog( "#i90964# Wrap / Edit Contour should not be enabled for frames" )
+
+ Kontext "KonturEditor"
+ if ( KonturEditor.exists( 2 ) ) then
+ KonturEditor.Close()
+ else
+ warnlog( "Slot <FormatWrapEditContour> is enabled but doesn't trigger the dialog" )
+ end if
+ end if
+
+ Kontext
+ if ( Active.Exists( 2 ) ) then
+ qaerrorlog( "JSK: Undocumented active handled silently - fix it" )
+ Active.Yes()
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatLine
+ PrintLog "- Format / Line in drawing object"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a rectangle"
+ Call wRectangleToClipboard
+
+ printlog " Edit / Paste"
+ hUseAsyncSlot( "EditPaste" )
+
+ printlog " Format / Line"
+ if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ if ( hUseAsyncSlot( "FormatLine" ) = -1 ) then
+ warnlog( "Failed to execute slot <FormatLine>" )
+ end if
+ end if
+
+ Kontext
+ printlog " Step through all tabpages"
+ wait 500
+ active.SetPage TabLinie
+
+ kontext "TabLinie"
+ Call DialogTest ( TabLinie )
+
+ Kontext
+ active.SetPage TabLinienstile
+
+ kontext "TabLinienstile"
+ Call DialogTest ( TabLinienstile )
+ try
+ Aendern.Click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+ catch
+ Warnlog "Modify is disabled!"
+ if Linienstil.GetItemCount = 0 then
+ Warnlog "List of 'Line styles is empty! (Bug#99882)"
+ end if
+ endcatch
+
+ Kontext
+ active.SetPage TabLinienenden
+
+ Kontext "Linienstil"
+ if Linienstil.Exists then
+ Warnlog "Messagebox appears changing to Tabpage 'Arrow Styles!"
+ Linienstil.Cancel
+ else
+ kontext "TabLinienenden"
+
+ Call DialogTest ( TabLinienenden )
+ Aendern.Click
+ Kontext
+ Active.OK
+ kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+ end if
+
+ kontext "TabLinienenden"
+ printlog " Close dialog"
+ TabLinienenden.cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatArea
+ Dim i as integer
+ PrintLog "- Format / Area in drawing object"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a rectangle"
+ Call wRectangleToClipboard
+
+ hUseAsyncSlot( "EditPaste" )
+
+ printlog " Format / Area"
+ if ( hUseAsyncSlot( "FormatArea" ) = -1 ) then
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ FormatArea
+ end if
+
+ Kontext
+ wait 500
+ printlog " Step through all tabpages"
+ active.SetPage TabArea
+ Kontext "TabArea"
+ For i = 1 to 5
+ FillOptions.Select i
+ Call DialogTest ( TabArea, i )
+ next i
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ Anzeigen.Check
+ Call DialogTest ( TabSchatten )
+
+ Kontext
+ active.SetPage TabTransparenz
+ kontext "TabTransparenz"
+ Call DialogTest ( TabTransparenz )
+
+ Kontext
+ active.SetPage TabFarben
+ kontext "TabFarben"
+ Sleep 1
+ Farbmodell.Select 2
+ Call DialogTest ( TabFarben )
+
+ Bearbeiten.Click
+
+ Kontext "FarbeDlg"
+ if ( FarbeDlg.exists( 1 ) ) then
+ Call DialogTest ( FarbeDlg )
+ FarbeDlg.cancel
+ WaitSlot()
+ else
+ warnlog( "Dialog <FarbeDlg> is not available" )
+ end if
+
+ Kontext
+ active.SetPage TabFarbverlaeufe
+ kontext "TabFarbverlaeufe"
+ Call DialogTest ( TabFarbverlaeufe )
+ Aendern.Click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ Kontext
+ active.SetPage TabSchraffuren
+ kontext "TabSchraffuren"
+ Call DialogTest ( TabSchraffuren)
+ try
+ Aendern.Click
+ catch
+ Warnlog "Button 'Modify' does not work!"
+ if Tabelle.GetItemcount = 0 then
+ Warnlog "Table of Hatching's is empty! (Bug#99882)"
+ end if
+ endcatch
+
+ Kontext "NameDlg"
+ if ( NameDlg.exists( 1 ) ) then
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+ else
+ warnlog( "Dialog <NameDlg> is not available" )
+ end if
+
+ Kontext
+ active.SetPage TabBitmap
+ kontext "TabBitmap"
+ Call DialogTest ( TabBitmap )
+
+ try
+ Aendern.Click
+ catch
+ WarnLog "#36902#Modify is disabled. Wrong default-list loaded"
+ endcatch
+
+ Kontext "NameDlg"
+ if ( NameDlg.exists( 1 ) ) then
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+ else
+ warnlog( "Dialog <NameDlg> is not available" )
+ end if
+
+ kontext "TabBitmap"
+ Import.Click
+ Kontext "GrafikEinfuegenDlg"
+ if ( GrafikEinfuegenDlg.exists( 1 ) ) then
+ Call DialogTest ( GrafikEinfuegenDlg )
+ GrafikEinfuegenDlg.Cancel
+ else
+ warnlog( "Dialog <GrafikEinfuegenDlg> is not available" )
+ end if
+
+ printlog " Close Tabdialog"
+ kontext "TabBitmap"
+ TabBitmap.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatText
+ PrintLog "- Format / Text in drawing object"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wRectangleToClipboard
+ EditPaste
+ Sleep (1)
+
+ try
+ printlog " Format / Text"
+ FormatTextWriter
+ catch
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ FormatTextWriter
+ endcatch
+
+ Kontext
+ printlog " Step through all tabpages"
+ wait 500
+ Active.SetPage TabText
+ Kontext "TabText"
+ DialogTest ( TabText )
+
+ Kontext
+ Active.SetPage TabLauftext
+ Kontext "TabLauftext"
+ DialogTest ( TabLauftext )
+
+ printlog " Close dialog"
+ TabLauftext.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatPositionAndSize
+ PrintLog "- Format / Position and Size in drawing object"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wRectangleToClipboard
+ hUseAsyncSlot( "EditPaste" )
+
+ printlog " Format Position and Size"
+ if ( hUseAsyncSlot( "ContextPositionAndSize" ) = -1 ) then
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ if ( hUseAsyncSlot( "ContextPositionAndSize" ) = -1 ) then
+ warnlog( "Failed to execute slot <ContextPositionAndSize>" )
+ end if
+ end if
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.setpage TabPositionAndSizeWriter
+ Kontext "TabPositionAndSizeWriter"
+ call Dialogtest ( TabPositionAndSizeWriter )
+
+ Kontext
+ active.setPage TabDrehung
+ Kontext "TabDrehung"
+ call Dialogtest ( TabDrehung )
+
+ Kontext
+ active.setpage TabSchraegstellen
+ Kontext "TabSchraegstellen"
+ call Dialogtest ( TabSchraegstellen )
+ printlog " Close dialog"
+ TabSchraegstellen.cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatFlip
+
+ PrintLog "- Format / Flip drawing objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wRectangleToClipboard
+ hUseAsyncSlot( "EditPaste" )
+
+ printlog " Format / Flip vertically"
+ if ( hUseAsyncSlot( "FormatFlipVertically" ) = -1 ) then
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ if ( hUseAsyncSlot( "FormatFlipVertically" ) = -1 ) then
+ warnlog( "Failed to execute slot <FormatFlipVertically>" )
+ end if
+ end if
+
+ WaitSlot (3000)
+
+ printlog " Format / Flip horizontally"
+ hUseAsyncSlot( "FormatFlipHorizontally" )
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatArrangeArea
+
+ PrintLog "- Format / Arrange drawing objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wRectangleToClipboard
+ hUseAsyncSlot( "EditPaste" )
+
+ printlog " Format / Arrange / Bring to front"
+ if ( hUseAsyncSlot( "FormatArrangeBringToFrontCalc" ) = -1 ) then
+
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ if ( hUseAsyncSlot( "FormatArrangeBringToFrontCalc" ) = -1 ) then
+ warnlog( "Failed to execute slot <FormatArrangeBringToFrontCalc>" )
+ end if
+ end if
+
+ WaitSlot()
+ printlog " Format / Arrange / Bring Forward"
+ FormatArrangeBringForward
+ WaitSlot()
+ printlog " Format / Arrange / Set backward"
+ FormatArrangeSetBackward
+ WaitSlot()
+ printlog " Format / Arrange / Send to back"
+ FormatArrangeSendToBack
+ WaitSlot()
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAlignmentArea
+
+ PrintLog "- Format / Alignment drawing objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 45, 30, 55, 45 )
+ sleep (1)
+ Call wObjektSelektieren ( 43, 25, 60, 50 )
+ Sleep 1
+ try
+ printlog " Format / Anchor / As Character"
+ FormatAnchorAsCharacter
+ WaitSlot()
+ catch
+ Warnlog "Anchor could not be set to character! No test!"
+ Call hCloseDocument
+ printlog " Close active document"
+ goto endsub
+ endcatch
+
+ try
+ printlog " Format / Object / Alignment left"
+ FormatObjectAlignmentLeft
+ WaitSlot()
+ catch
+ Warnlog "Format / Object / Alignment / Left could not be executed!"
+ endcatch
+
+ try
+ printlog " Format / Object / Alignment centered"
+ FormatObjectAlignmentCentered
+ WaitSlot()
+ catch
+ Warnlog "Format / Object / Alignment / Centered could not be executed!"
+ endcatch
+
+ try
+ printlog " Format / Object / Alignment right"
+ FormatObjectAlignmentRight
+ WaitSlot()
+ catch
+ Warnlog "Format / Object / Alignment / Right could not be executed!"
+ endcatch
+
+ try
+ printlog " Format / Object / Alignment Top"
+ FormatObjectAlignmentTop
+ WaitSlot()
+ catch
+ Warnlog "Format / Object / Alignment / Top could not be executed!"
+ endcatch
+
+ try
+ printlog " Format / Object / Alignment Center"
+ FormatObjectAlignmentCenter
+ WaitSlot()
+ catch
+ Warnlog "Format / Object / Alignment / Center could not be executed!"
+ endcatch
+
+ try
+ printlog " Format / Object / Alignment bottom"
+ FormatObjectAlignmentBottom
+ WaitSlot()
+ catch
+ Warnlog "Format / Object / Alignment / Bottom could not be executed!"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatGroup
+ Dim x%
+ Dim y%
+ Dim x1%
+ Dim y1%
+
+ PrintLog "- Format / Group drawing objects"
+
+ if ( gApplication = "HTML" ) then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert 2 rectangles and select both"
+ if gPlatGroup <> "unx" then
+ Call wZeichenobjektEinfuegen ( "Rechteck", 25, 25, 30, 30 )
+ Call wTypeKeys ( "<Escape>" )
+ Call wZeichenobjektEinfuegen ( "Rechteck", 35, 35, 45, 45 )
+ Call wTypeKeys ( "<Escape>" )
+ Call wObjektSelektieren ( 23, 23, 50, 50 )
+ x% = 25
+ y% = 25
+ x1% = 35
+ y1% = 45
+ else
+ Call wZeichenobjektEinfuegen ( "Rechteck", 50, 60, 30, 30 )
+ Call wTypeKeys ( "<Escape>" )
+ Call wZeichenobjektEinfuegen ( "Rechteck", 65, 80, 45, 45 )
+ Call wTypeKeys ( "<Escape>" )
+ Call wObjektSelektieren ( 23, 23, 70, 90 )
+ x% = 55
+ y% = 55
+ x1% = 55
+ y1% = 65
+ end if
+
+ printlog " Format / Group / Group"
+ if ( hUseAsyncSlot( "FormatGroupGroup" ) = -1 ) then
+ QAErrorlog "Unable to execute Format / Group / Group. Maybe objects not selected!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " Format / Group / Edit Group"
+ if ( hUseAsyncSlot( "FormatGroupEditGroupCalc" ) = -1 ) then
+ Warnlog "Unable to execute Format / Group / Group. Maybe objects not selected!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Call wTypeKeys ( "<Shift F4>" )
+
+ printlog " Format / Exit Group"
+ if ( hUseAsyncSlot( "FormatExitGroupDraw" ) = -1 ) then
+ Warnlog "Unable to execute Format / Group / Exit Group. Maybe objects not selected!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Call wTypeKeys ( "<Shift F4>" )
+
+ printlog " Format / Ungroup"
+ if ( hUseAsyncSlot( "FormatUngroupDraw" ) = -1 ) then
+ Warnlog "Unable to execute Format / Group / Ungroup. Maybe objects not selected!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatFontwork
+
+ PrintLog "- Format / Fontwork drawing objects"
+
+ if ( gApplication = "HTML" ) then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Paste a rectangle from draw via clipboard"
+ Call wRectangleToClipboard
+
+ hUseAsyncSlot( "EditPaste" )
+
+ printlog " Format / Font Work"
+ if ( hUseAsyncSlot( "FormatFontWork" ) = -1 ) then
+ Warnlog "Clipboard problem between applications!"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 40, 40, 50, 50 )
+ Call gMouseClick ( 45, 45 )
+ FormatFontwork
+ end if
+
+ Kontext "Fontwork"
+ if ( Fontwork.Exists( 1 ) ) then
+ call Dialogtest ( Fontwork )
+ printlog " Close Fontwork dialog"
+ FormatFontwork
+ else
+ Warnlog "Dialog 'Fontwork' does not exist!"
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatPositionAndSizeLegend
+
+ PrintLog "- Format / Position and Size in Legend"
+
+ if ( gApplication = "HTML" ) then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ Kontext "NavigatorWriter"
+ if NavigatorWriter.Exists then ViewNavigator
+
+ printlog " Insert a legend"
+ Call wZeichenobjektEinfuegen ( "Legende", 45, 35, 50, 50 )
+ Call wTypeKeys "<ESCAPE>"
+ Call wTypeKeys "<SHIFT F4>"
+
+ Call hUseAsyncSlot( "FormatPositionAndSize" )
+ kontext "active"
+ if ( active.exists( 1 ) ) then
+ printlog( "Dialog open. Good" )
+ else
+ Warnlog "Format / Position and Size does not work! Maybe object not selected!"
+ printlog " Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " In upcoming dialog step through all tabpages"
+ Kontext
+ active.setpage TabPositionAndSizeWriter
+
+ Kontext "TabPositionAndSizeWriter"
+ call Dialogtest ( TabPositionAndSizeWriter )
+
+ Kontext
+ active.setpage TabLegende
+
+ Kontext "TabLegende"
+ call Dialogtest ( TabLegende )
+
+ printlog " Close dialog"
+ TabLegende.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatStyleEdit
+
+ PrintLog "- Format / Style Text objects"
+
+ if ( gApplication = "HTML" ) then
+ printlog "Not in WriterWeb !"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ Kontext "DrawBar"
+ if Not DrawBar.Exists then
+ Call hToolbarSelect("Drawing", true)
+ end if
+
+ if Drawbar.Exists then
+ Textobjekt.Click
+ printlog " Insert a textobject from toolbar"
+ Sleep 2
+
+ Call gMouseMove(50, 20, 70, 40)
+ hUseAsyncSlot( "FormatStyleBold" )
+
+ printlog " Format / Style / Bold"
+ Call wTypeKeys ("a")
+ printlog " Format / Style / Italic"
+ FormatStyleItalic
+ WaitSlot()
+ printlog " Insert a letter in text object"
+ Call wTypeKeys ("a")
+ printlog " Format / Style / Underline"
+ FormatStyleUnderline
+ WaitSlot()
+
+ printlog " Insert a letter in text object"
+ Call wTypeKeys ("a")
+ printlog " Format /Style / Strike through"
+ UseBindings
+ FormatStyleStrikeThrough
+ WaitSlot()
+ printlog " Insert a letter in text object"
+ Call wTypeKeys ("b")
+ printlog " Format / Style / Shadow"
+ UseBindings
+ FormatStyleShadow
+ WaitSlot()
+ printlog " Insert a letter in text object"
+ Call wTypeKeys ("b")
+ printlog " Format / Style / Outline"
+ UseBindings
+ FormatStyleOutline
+ WaitSlot()
+ printlog " Insert a letter in text object"
+ Call wTypeKeys ("b")
+ printlog " Format / Style / Superscript"
+ FormatStyleSuperscript
+ WaitSlot()
+ printlog " Insert a letter in text object"
+ Call wTypeKeys ("a")
+ printlog " Format / Style / Subscript "
+ FormatStyleSubscript
+ WaitSlot()
+ printlog " Insert a letter in text object"
+ Call wTypeKeys ("a")
+ Kontext "Drawbar"
+ Drawbar.Close
+ else
+ Warnlog "#i33132#Toolbar 'Drawbar' is not opened!"
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAlignmentEdit
+ PrintLog "- Format / Alignment text objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "DrawBar"
+ if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
+
+ Textobjekt.Click
+ printlog " Insert a textbox via 'Draw functions' toolbar"
+
+ Call gMouseMove(50, 20, 70, 40)
+ printlog " Insert some text in document"
+
+ Call wTypeKeys ("Ein Wort")
+ printlog " Format / Alignment / Left"
+ hUseAsyncSlot( "FormatAlignmentLeftText" )
+ WaitSlot()
+ printlog " Format / Alignment / Right"
+ FormatAlignmentRightText
+ WaitSlot()
+ printlog " Format / Alignment / Centered"
+ FormatAlignmentCenteredText
+ WaitSlot()
+ printlog " Format Alignment / Justify"
+ FormatAlignmentJustifiedText
+ WaitSlot()
+
+ Kontext "Drawbar"
+ Drawbar.Close
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatLineSpacing
+ PrintLog "- Format / Line Spacing text objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "DrawBar"
+ if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
+
+ Textobjekt.Click
+ printlog " In a textbox via 'Draw Functions' toolbox"
+
+ Call gMouseMove(50, 20, 70, 40)
+ Sleep 1
+
+ printlog " Format / Spacing / Single line"
+ Call wTypeKeys ("Hallo<Return>Andere Zeile")
+
+ printlog " Format / Line Spacing / Single line"
+ FormatLineSpacingSingleLine
+ WaitSlot()
+
+ printlog " Format / Line Spacing / 1.5 line"
+ FormatLineSpacing15Lines
+ WaitSlot()
+
+ printlog " Format / Line spacing / Double"
+ FormatLineSpacingDouble
+ WaitSlot()
+
+ Kontext "Drawbar"
+ Drawbar.Close
+ printlog " Close active document"
+ Call hCloseDocument
+
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatParagraphEdit
+ PrintLog "- Format / Paragraph text objects"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "DrawBar"
+ if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
+
+ Textobjekt.Click
+ printlog " In a textbox via 'Draw Functions' toolbox"
+
+ Call gMouseMove(50, 20, 70, 40)
+
+ printlog " Format / Paragraph "
+ hUseAsyncSlot( "FormatParagraph" )
+ printlog " Step through all tabpages"
+ Kontext
+ Active.SetPage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ Call DialogTest ( TabEinzuegeUndAbstaende )
+
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ Call DialogTest ( TabAusrichtungAbsatz )
+
+ Kontext
+ Active.SetPage TabTabulator
+ Kontext "TabTabulator"
+ Call DialogTest ( TabTabulator )
+
+ TabTabulator.Cancel
+ Sleep 1
+ printlog " Close dialog"
+ Kontext "Drawbar"
+ Drawbar.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocFormatGraphics
+ PrintLog "- Format / Graphics"
+ Dim j as integer
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a graphic (..\writer\required\input\graphics\jolink.jpg)"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ if ( hUseAsyncSlot( "FormatGraphics" ) = -1 ) then
+ Warnlog "- Format / Graphics disabled or hidden!"
+ goto endsub
+ end if
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest ( TabHyperlinkRahmen )
+
+ Kontext
+ active.SetPage TabGrafik
+ Kontext "TabGrafik"
+ Call DialogTest ( TabGrafik )
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabMakro
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "TabMakro"
+ Call DialogTest ( TabMakro )
+
+ printlog " Close dialog"
+ TabMakro.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocFormatAlignment
+
+ gApplication = "HTML"
+ PrintLog "- Format / Alignment"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ wait 500
+ printlog " Format / Anchor / to Page"
+ FormatAnchorToPage
+
+ try
+ printlog " Format / Alignment / Left"
+ FormatAlignmentLeft
+ WaitSlot()
+ catch
+ Warnlog "'Alignment left' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Right"
+ FormatAlignmentRight
+ WaitSlot()
+ catch
+ Warnlog "'Alignment right' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Top"
+ FormatAlignmentTop
+ WaitSlot()
+ catch
+ Warnlog "'Alignment top' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Center"
+ FormatAlignmentCenter
+ WaitSlot()
+ catch
+ Warnlog "'Alignment center' couldn't be executed!"
+ endcatch
+
+ try
+ printlog " Format / Alignment / Bottom"
+ FormatAlignmentBottom
+ WaitSlot()
+ catch
+ Warnlog "'Alignment bottom' couldn't be executed!"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocFormatObject
+ PrintLog "- Format / Object"
+ Dim j as integer
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a frame"
+ Call wInsertFrame
+
+ printlog " Format / Frame"
+ FormatFrame
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+
+ printlog " Close dialog"
+ TabHintergrund.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_006_.inc b/testautomation/writer/required/includes/w_006_.inc
new file mode 100644
index 000000000000..626171707480
--- /dev/null
+++ b/testautomation/writer/required/includes/w_006_.inc
@@ -0,0 +1,292 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Call all functions in table menu
+'*
+'\***********************************************************************
+
+sub w_006_
+
+ printLog Chr(13) + "--------- Table Menu (w_006_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tFormatTable
+ Call tFormatSplitTables
+ Call tFormatJoinTables
+ Call tFormatNumberFormat
+ Call tTableCell
+ Call tTableRow
+ Call tFormatAutoformatTable
+
+end sub
+
+'---------------------------------------------------------------------------------------------------------
+
+testcase tFormatTable
+ PrintLog "- Format / Table"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+
+ printlog " Format / Table"
+ TableProperties
+
+ Kontext
+ printlog " In dialog step through all tabpages"
+ Active.SetPage TabTabelle
+ Kontext "TabTabelle"
+ Call DialogTest ( TabTabelle )
+
+ Kontext
+ Active.SetPage TabTextflussTabelle
+ Kontext "TabTextflussTabelle"
+ Call DialogTest ( TabTextflussTabelle )
+
+ Kontext
+ Active.SetPage TabSpaltenTabelle
+ Kontext "TabSpaltenTabelle"
+ Call DialogTest ( TabSpaltenTabelle )
+
+ Kontext
+ Active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ Active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+
+ printlog " Close dialog"
+ TabHintergrund.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+
+endcase
+
+'----------------------------------------------------------
+
+testcase tFormatSplitTables
+ PrintLog "- Format / Split Table"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ printlog " Select all"
+ Call wTypeKeys ("<Mod1 a>")
+ Sleep 1
+ printlog " Format / Split Table"
+ FormatSplitTable
+ Kontext "TabelleAuftrennen"
+ Call DialogTest ( TabelleAuftrennen )
+ printlog " Close dialog"
+ TabelleAuftrennen.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatJoinTables
+ PrintLog "- Format / Join Table"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ printlog " Point cursor under the table"
+ Call wTypeKeys ("<Down><Down>")
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ printlog " Point cursor under the table"
+ Call wTypeKeys ("<Down><Down>")
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ printlog " Point cursor in 3rd table"
+ Call wTypeKeys ("<Up><Up>")
+ printlog " Format / Merge Tables"
+ FormatMergeTables
+ Kontext "TabellenVerbinden"
+ Call DialogTest (TabellenVerbinden)
+ printlog " Close dialog"
+ TabellenVerbinden.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatNumberFormat
+ printLog "- Format / Number Format"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Format / Number Format"
+ Call hTabelleEinfuegen
+ FormatNumberFormat
+ Kontext "Zahlenformat"
+ Call DialogTest ( Zahlenformat )
+ printlog " Close dialog"
+ Zahlenformat.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tTableCell
+ PrintLog "- Format / Cell"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+
+ printlog " Table / Column / Select"
+ TableSelectColumn
+ printlog " Table / Merge Cells"
+ TableMergeCell
+ printlog " Table / Split Cells"
+ TableSplitCell
+
+ Kontext "ZellenTeilen"
+ Call DialogTest ( ZellenTeilen )
+ printlog " Close dialog 'Split Table'"
+ ZellenTeilen.OK
+ printlog " Table / Protect Cells"
+ TableCellProtect
+
+ Call wTypeKeys ("<Left>")
+ printlog " Open Contextmenu"
+ printlog " Select 'Cell->Unprotect"
+ Kontext "DocumentWriter"
+ Call wTypeKeys "<Shift F10>"
+ wait (500)
+ Call hMenuFindSelect (".uno:CellMenu", true, 9, false) 'Find "CellMenu" and call the slot.
+ wait (500)
+ try
+ Call hMenuFindSelect (20519, true, 1, false) 'Find "UnProtect" and call the slot.
+ catch
+ Warnlog "Unable to unprotect cell"
+ endcatch
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tTableRow
+ PrintLog "- Format / Row"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+
+ printlog " Format / Row / Height"
+ FormatRowHeight
+ Kontext "ZellenHoehe"
+ Hoehe.SetText "2,5"
+ Call DialogTest ( ZellenHoehe )
+ printlog " Close dialog"
+ ZellenHoehe.OK
+ printlog " Format / Column / Select"
+ TableSelectColumn
+ WaitSlot (500)
+ printlog " Format / Row / Space equally"
+ FormatRowSpaceEqually
+ WaitSlot (500)
+ printlog " Format / Row / Select"
+ TableSelectEntireRow
+ WaitSlot (500)
+ printlog " Format / Row / Optimal Height"
+ TableAutoFitSetOptimalRowHeight
+ WaitSlot (500)
+ printlog " Format / Row / Insert"
+ FormatRowInsert
+ Kontext "EinfuegenZeilen"
+ Anzahl.SetText "3"
+ Call DialogTest ( EinfuegenZeilen )
+ printlog " Close dialog"
+ EinfuegenZeilen.OK
+ printlog " Format / Row / Delete"
+ FormatRowDelete
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormatAutoformatTable
+ PrintLog "- Format / Autoformat - Table"
+
+ Call hNewDocument
+ printlog " Open new document"
+ Sleep 1
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+
+ printlog " Format / Autoformat"
+ FormatAutoformat
+ WaitSlot (2000)
+
+ Kontext "AutoformatTabelle"
+ printlog " In dialog click 'More..'"
+ Zusaetze.Click
+ Call DialogTest ( AutoformatTabelle )
+
+ printlog " Click 'Add'"
+ Einfuegen.Click
+ Kontext "AutoformatHinzufuegenWriter"
+ Call DialogTest ( AutoformatHinzufuegenWriter )
+ TabellenName.SetText "Hallo"
+ printlog " Enter a new table name"
+ AutoformatHinzufuegenWriter.OK
+
+ Kontext "AutoformatTabelle"
+ printlog " Click 'Rename'"
+ Umbenennen.Click
+ Kontext "AutoformatHinzufuegenWriter"
+ Call DialogTest ( AutoformatHinzufuegenWriter )
+ printlog " Enter an new table name"
+ TabellenName.SetText "Hallo1"
+ AutoformatHinzufuegenWriter.OK
+ Kontext "AutoformatTabelle"
+ printlog " Click 'Delete'"
+ Loeschen.Click
+ Kontext
+ Active.OK
+ printlog " Close dialog"
+ AutoformatTabelle.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc
new file mode 100644
index 000000000000..57c83706029f
--- /dev/null
+++ b/testautomation/writer/required/includes/w_007_.inc
@@ -0,0 +1,1318 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Testcases for the Tools-Menu
+'*
+'\***********************************************************************
+
+sub w_007_
+
+ printLog Chr(13) + "--------- Tools Menu (w_007_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tToolsSpellcheck
+ Call tToolsThesaurus
+ Call tToolsHyphenation
+ Call tToolsWordCount
+ Call tToolsAutocorrectAutoformat
+ Call tToolsOutlineNumbering
+ Call tToolsLineNumbering
+ Call tToolsFootnotes
+ Call tToolsGallery
+ Call tToolsMailMergeWizard
+ Call tToolsTextInTables
+ Call tToolsSort
+ Call tToolsCalculate
+ Call tToolsUpdate
+ Call tToolsOptionsTest
+ Call tToolsHangulHanjaConversion
+ Call tToolsChineseTranslation
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocToolsHangulHanjaConversion
+
+ 'Writer Master Document
+ gApplication = "MASTERDOCUMENT"
+ Call tMasterDocToolsHyphenation
+ gApplication = "WRITER"
+end sub
+
+' -------------------------------------------
+
+testcase tToolsSpellcheck
+ PrintLog "- Tools / Spellcheck"
+ Dim i as integer
+ Dim TheFile as string
+ Dim IsWriteable as boolean
+
+ ' As long as OOo has no modules for that, disabled
+ if ( gOOO ) then
+ printlog "No spellchecking in OOo"
+ goto endsub
+ end if
+
+ printlog " Open document where the formatting is set to the language we wish to test."
+ TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
+ if ( not hFileExists ( TheFile ) ) then
+ Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
+ goto endsub
+ end if
+ hFileOpen ( TheFile )
+ Call sMakeReadOnlyDocumentEditable
+
+ printlog " Insert some faulty text"
+ select case iSprache
+ case 01 : Call wTypeKeys ("This is a spellchecktestttttt<Home>")
+ case 33 : Call wTypeKeys ("Je Suiss la Penneeee<Home>")
+ case 34 : Call wTypeKeys ("Habla Espanollll<Home>")
+ case 39 : Call wTypeKeys ("Don Cara Mio, capitoliooo?<Home>")
+ case 49 : Call wTypeKeys ("Dies ist ein Rechtschreibtexxxxt<Home>")
+ case 46 : Call wTypeKeys ("Det hรคr รคr en rรคttstavningstexxxxt<Home>")
+ case 07 : Printlog "- No Spellcheck in Russian!"
+ goto endsub
+ case 48 : Printlog "- No Spellcheck in Polish!"
+ goto endsub
+ case 55 : Printlog "- No Spellcheck in Brazilian!"
+ goto endsub
+ case 81 : Printlog "- No Spellcheck in Japanese!"
+ goto endsub
+ case 82 : Printlog "- No Spellcheck in Korean!"
+ goto endsub
+ case 86 : Printlog "- No Spellcheck in Chinese (simplified)!"
+ goto endsub
+ case 88 : Printlog "- No Spellcheck in Chinese (traditional)!"
+ goto endsub
+ case 03, 30, 35, 36, 37, 42, 47, 51, 90
+ Printlog "- No Spellcheck available !"
+ goto endsub
+ case else
+ end select
+
+ printlog " Tools / Spellcheck / Check"
+ ToolsSpellcheckWriter
+ Kontext "Active"
+ if ( Active.Exists( 1 ) ) then
+ if Active.GetRT = 304 then
+ try
+ Active.Yes ' Start from beginning ?
+ if Active.exists then
+ if Active.GetRT = 304 then Active.Ok
+ Warnlog "Dialog 'Spellcheck' not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ catch
+ Active.Ok
+ Warnlog "Dialog 'Spellcheck' not up!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ end if
+ end if
+
+ printlog " Spellcheck dialog has to come up"
+ Kontext "Spellcheck"
+ DialogTest ( Spellcheck )
+
+ printlog " Click 'Options'"
+ SpellcheckOptions.Click
+ Wait 500
+
+ kontext "TabLinguistik"
+ DialogTest ( TabLinguistik )
+
+ printlog " Step through all options in list and if 'Edit' is enabled click 'Edit'"
+ for i = 1 to 12
+ kontext "TabLinguistik"
+ Optionen.TypeKeys "<Down>"
+ if OptionenBearbeiten.IsEnabled then
+ OptionenBearbeiten.Click
+ wait 500
+ Kontext "SilbentrennungOptionen"
+ DialogTest ( SilbentrennungOptionen )
+ SilbentrennungOptionen.Cancel
+ end if
+ next i
+
+ printlog " Click 'New' in Options dialog"
+ Neu.Click
+ wait 500
+
+ Kontext "BenutzerwoerterbuchAnlegen"
+ Call DialogTest ( BenutzerwoerterbuchAnlegen )
+ BenutzerwoerterbuchAnlegen.Close
+
+ printlog " Check if there s a writeable dictionary and select it"
+ Kontext "TabLinguistik"
+ for i = 1 to Benutzerwoerterbuch.GetItemCount
+ Benutzerwoerterbuch.Select i
+ if Bearbeiten.IsEnabled = true then
+ IsWriteable = true
+ exit for
+ end if
+ next i
+
+ if IsWriteable = true then
+ Bearbeiten.Click
+ printlog " Click 'Edit' in 'Options dialog'"
+
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ if BenutzerwoerterbuchBearbeiten.Exists(1) then
+ Call DialogTest ( BenutzerwoerterbuchBearbeiten )
+ BenutzerwoerterbuchBearbeiten.Close
+ else
+ Warnlog "Dialog 'Edit Dictionary' is not up!"
+ end if
+ else
+ Warnlog "All dictionarys are write protected!"
+ end if
+
+ printlog " Close 'Options' dialog"
+ Kontext "TabLinguistik"
+ TabLinguistik.Close
+ wait 500
+
+ Kontext "Spellcheck"
+ printlog " Close 'Spellcheck' dialog"
+ Spellcheck.Close
+ wait 500
+ PrintLog "Close active documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' -------------------------------------------
+
+testcase tToolsThesaurus
+ PrintLog "- Tools / Thesaurus"
+ Dim TheFile as string
+
+ ' As long as OOo has no modules for that, disabled
+ if gOOO = True then
+ printlog "No spellchecking in OOo"
+ goto endsub
+ end if
+
+ select case iSprache
+ case 07 : Printlog "- No Thesaurus in Russian!"
+ goto endsub
+ case 48 : Printlog "- No Thesaurus in Polish!"
+ goto endsub
+ case 55 : Printlog "- No Thesaurus in Brazilian!"
+ goto endsub
+ case 81 : Printlog "- No Thesaurus in Japanese!"
+ goto endsub
+ case 82 : Printlog "- No Thesaurus in Korean!"
+ goto endsub
+ case 86 : Printlog "- No Thesaurus in Chinese (simplified)!"
+ goto endsub
+ case 88 : Printlog "- No Thesaurus in Chinese (traditional)!"
+ goto endsub
+ case 03, 30, 35, 36, 37, 42, 47, 51, 90
+ Printlog "- No Thesaurus available !"
+ goto endsub
+ end select
+
+ printlog " Open document where the formatting is set to the language we wish to test."
+ TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
+ if ( not hFileExists ( TheFile ) ) then
+ Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
+ goto endsub
+ end if
+ call hFileOpen( TheFile )
+ Call sMakeReadOnlyDocumentEditable
+
+ printlog " Insert some faulty text"
+ select case iSprache
+ case 01 : Call wTypeKeys ("This is a spellchecktestttttt<Home>")
+ case 33 : Call wTypeKeys ("Je Suiss la Penneeee<Home>")
+ case 34 : Call wTypeKeys ("Habla Espanollll<Home>")
+ case 39 : Call wTypeKeys ("Don Cara Mio, capitoliooo?<Home>")
+ case 49 : Call wTypeKeys ("Dies ist ein Rechtschreibtexxxxt<Home>")
+ case 46 : Call wTypeKeys ("Det hรคr รคr en rรคttstavningstexxxxt<Home>")
+ case 07 : Printlog "- No Thesaurus in Russian!"
+ goto endsub
+ case 48 : Printlog "- No Thesaurus in Polish!"
+ goto endsub
+ case 55 : Printlog "- No Thesaurus in Brazilian!"
+ goto endsub
+ case 81 : Printlog "- No Thesaurus in Japanese!"
+ goto endsub
+ case 82 : Printlog "- No Thesaurus in Korean!"
+ goto endsub
+ case 86 : Printlog "- No Thesaurus in Chinese (simplified)!"
+ goto endsub
+ case 88 : Printlog "- No Thesaurus in Chinese (traditional)!"
+ goto endsub
+ case 03, 30, 35, 36, 37, 42, 47, 51, 90
+ Printlog "- No Thesaurus available !"
+ goto endsub
+ case else
+ end select
+
+ ToolsLanguageThesaurus
+ Kontext "Active"
+ if Active.Exists then
+ Active.Ok
+ Warnlog "Dialog 'Thesaurus' not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Kontext "Thesaurus"
+ DialogTest ( Thesaurus )
+ printlog " In 'Thesaurus' dialog click 'Language'"
+ Sprache.Click
+ Kontext "SpracheAuswaehlen"
+ DialogTest ( SpracheAuswaehlen )
+ printlog " Close 'Language' dialog"
+ SpracheAuswaehlen.Cancel
+ Kontext "Thesaurus"
+ printlog " Close 'Thesaurus' dialog"
+ Thesaurus.Cancel
+ PrintLog "Close active documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' -------------------------------------------
+
+testcase tToolsHyphenation
+ Dim DieDatei as string
+ Dim LingFile as string
+
+ PrintLog "- Tools / Hyphenation"
+ ' As long as OOo has no modules for that, disabled
+ if gOOO = True then
+ printlog "No hyphenation in OOo"
+ goto endsub
+ end if
+
+ if gBuild < 9239 then
+ QAErrorlog "Hyphenation dialog freezes office!"
+ goto endsub
+ end if
+
+ select case iSprache
+ case 1,01 : LingFile = "01-44-hyph.dat"
+ DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\001.odt" )
+ case 7,07 : DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\007.odt" )
+ case 3,03 : DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\003.odt" )
+ case 81 : Printlog "- No Hyphenation in Japanese!"
+ goto endsub
+ case 82 : Printlog "- No Hyphenation in Korean!"
+ goto endsub
+ case 86 : Printlog "- No Hyphenation in Chinese (simplified)!"
+ goto endsub
+ case 88 : Printlog "- No Hyphenation in Chinese (traditional)!"
+ goto endsub
+ case else : DieDatei = ConvertPath( gTesttoolpath + "writer\required\input\linguistik\0" + trim$(str$(iSprache)) + ".odt" )
+ LingFile = str$(iSprache) + "-hyph.dat"
+ end select
+
+ if ( not hFileExists( DieDatei ) ) then
+ Warnlog "No defined Errortext for language: " + isprache + "! Exit!"
+ goto endsub
+ end if
+
+ Select Case gApplication
+ Case "WRITER"
+ hFileOpen( DieDatei )
+
+ Case "MASTERDOCUMENT"
+ if wInsertDocumentinMasterDoc(DieDatei) = False then
+ Warnlog "Loading document did not work!"
+ goto endsub
+ else
+ Call hNewDocument
+ printlog " Open new document"
+ hUseAsyncSlot( "EditPaste" )
+ end if
+
+ Case "HTML"
+ printlog "- No Hyphenation in WriterWeb!"
+ goto endsub
+ end select
+
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Insert file 'writer\required\input\linguistik\0 + [OfficeLanguage] + '.odt'"
+ Sleep 1
+ Call wTypeKeys ("<Mod1 Home>")
+
+ hUseAsyncSlot( "ToolsLanguageHyphenate" )
+ printlog " Tools / Hyphenate"
+ Kontext "Active"
+ try
+ Active.Yes
+ catch
+ endcatch
+ if ( Active.Exists( 1 ) )then
+ if Active.GetRT = 304 then
+ Active.Ok
+ ' Force pagesize change to bringup Hyphenation-dialog
+ hUseAsyncSlot( "FormatPageWriter" )
+ Kontext
+ active.SetPage TabSeite
+ Kontext "TabSeite"
+ Breite.Settext "15"
+ TabSeite.Ok
+
+ hUseAsyncSlot( "ToolsLanguageHyphenate" )
+ end if
+ end if
+
+ Kontext "Silbentrennung"
+ printlog " Close upcoming 'Hyphenation' dialog"
+ if Silbentrennung.Exists then
+ Call DialogTest ( Silbentrennung )
+ Silbentrennung.Cancel
+ else
+ Warnlog "Dialog 'Hyphenation' not up!"
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Ok
+ catch
+ endcatch
+ end if
+ end if
+
+ PrintLog "Close active documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' -------------------------------------------
+
+testcase tToolsWordCount
+ Printlog "- Tools / Word Count"
+ printlog " New Text document"
+ Call hNewDocument
+ printlog " Tools / Word Count"
+ ToolsWordCount
+ printlog " If if dialog has been opened"
+ Kontext "WordCount"
+ if ( WordCount.Exists( 1 ) ) then
+ Call DialogTest ( WordCount )
+ printlog " Close dialog 'WordCount'"
+ WordCount.Close
+ else
+ Warnlog "Dialog 'WordCount' has not been opened!"
+ end if
+ printlog " Close Text document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsAutocorrectAutoformat
+ PrintLog "- Tools / Autocorrect / Autoformat"
+ Dim i as integer
+
+ Call hNewDocument
+ printlog " Open new document"
+ ToolsAutoCorrect
+ printlog " Tools / Autocorrect/Autoformat"
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ printlog " Step through all tabpages"
+ Kontext
+ active.SetPage TabErsetzung
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+ Kontext "TabErsetzung"
+ Call DialogTest ( TabErsetzung )
+
+ Kontext
+ active.SetPage TabAusnahmen
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+ Kontext "TabAusnahmen"
+ Call DialogTest ( TabAusnahmen )
+
+ Kontext
+ active.SetPage TabOptionenAutokorrektur
+ Kontext "TabOptionenAutokorrektur"
+ Call DialogTest ( TabOptionenAutokorrektur )
+ printlog " Step through all options in list"
+ printlog " Tabpage Options: With entry 10 button 'Edit' should be enabled"
+ Einstellungen.TypeKeys "<Down>",9
+ Wait 500
+ if Bearbeiten.IsEnabled then
+ Bearbeiten.Click
+ Kontext "Sonderzeichen"
+ DialogTest (Sonderzeichen)
+ Sonderzeichen.Cancel
+ else
+ Warnlog "- Button 'Edit' on Entry 10 disabled!"
+ end if
+
+ Kontext "TabOptionenAutokorrektur"
+ printlog " Tabpage Options: With entry 16 button 'Edit' should be enabled"
+ Einstellungen.TypeKeys "<Down>",6
+ Wait 500
+ if Bearbeiten.IsEnabled then
+ Bearbeiten.Click
+ Kontext "Sonderzeichen"
+ DialogTest (Sonderzeichen)
+ Sonderzeichen.Cancel
+ else
+ Warnlog "- Button 'Edit' on Entry 16 disabled!"
+ end if
+
+ Kontext "TabOptionenAutokorrektur"
+ printlog " Tabpage Options: With entry 17 button 'Edit' should be enabled"
+ Einstellungen.TypeKeys "<Down>",1
+ Wait 500
+ if Bearbeiten.IsEnabled then
+ Bearbeiten.Click
+ Kontext "Zusammenfassen"
+ DialogTest (Zusammenfassen)
+ Zusammenfassen.Cancel
+ Kontext "TabOptionenAutokorrektur"
+ else
+ Warnlog "- Button 'Edit' on Entry 17 disabled!"
+ end if
+
+ Kontext
+ active.SetPage TabLocalizedOptions
+ Kontext "TabLocalizedOptions"
+ SingleQuotesStart.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 1 )
+ Sonderzeichen.Cancel
+
+ Kontext "TabLocalizedOptions"
+ SingleQuotesEnd.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 2 )
+ Sonderzeichen.Cancel
+
+ Kontext "TabLocalizedOptions"
+ SingleQuotesDefault.Click
+
+ Kontext "TabLocalizedOptions"
+ DoubleQuotesStart.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 3 )
+ Sonderzeichen.Cancel
+
+ Kontext "TabLocalizedOptions"
+ DoubleQuotesEnd.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 4 )
+ Sonderzeichen.Cancel
+
+ Kontext "TabLocalizedOptions"
+ DoubleQuotesDefault.Click
+
+ Kontext
+ Active.Setpage TabWortergaenzung
+ Kontext "TabWortergaenzung"
+ Call DialogTest ( TabWortergaenzung )
+ printlog " Close Autocorrect dialogue"
+ TabWortergaenzung.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsOutlineNumbering
+ PrintLog "- Tools / Outline Numbering"
+
+ Call hNewDocument
+ printlog " Open new document"
+ ToolsOutlineNumbering
+ printlog " Tools / Outline Numbering"
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ Call DialogTest ( TabKapitelnumerierung )
+
+ Kontext
+ Active.SetPage TabPositionKapitelnumerierung
+ Call DialogTest ( TabPositionKapitelnumerierung )
+ printlog " Step through tabpages and close dialog"
+
+ TabPositionKapitelnumerierung.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsLineNumbering
+ PrintLog "- Tools / Line Numbering"
+
+ Call hNewDocument
+ printlog " Open new document"
+ ToolsLineNumbering
+ printlog " Tools / Line Numbering"
+ Kontext "TabZeilennumerierung"
+ printlog " Check checkbox 'Show numbering'"
+ Einschalten.Check
+ Call DialogTest ( TabZeilennumerierung )
+ printlog " Close dialog"
+ TabZeilennumerierung.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tToolsFootnotes
+ PrintLog "- Tools / Footnotes"
+
+ Call hNewDocument
+ printlog " Open new document"
+ ToolsFootnote
+ printlog " Tools / Footnotes"
+ Kontext
+ Active.Setpage TabFussnoten
+ Kontext "TabFussnoten"
+ DialogTest ( TabFussnoten )
+ printlog " Step through all tabpages"
+ Kontext
+ Active.SetPage TabEndnoten
+ Kontext "TabEndnoten"
+ DialogTest ( TabEndnoten )
+ printlog " Close dialog"
+ TabEndnoten.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsGallery
+ Dim i as integer
+
+ printlog "- Tools / Gallery"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "Gallery"
+ if Not Gallery.Exists then ToolsGallery
+ printlog " Tools / Gallery"
+ WaitSlot (3000)
+ Kontext "Gallery"
+ printlog " Gallery has to be opened"
+ if Not Gallery.Exists then
+ Warnlog "Gallery has not been opened! No test"
+ goto endsub
+ else
+ printlog " Step through all themes"
+ printlog "- Step through all Themes"
+ For i = 1 to Gallerys.GetItemCount
+ Gallerys.Select i
+ Wait 500
+ next i
+ printlog "- New theme"
+ end if
+
+ Kontext
+ ToolsGallery
+ printlog " Close gallery with Tools / Gallery"
+ Kontext "Gallery"
+ if Gallery.Exists then Warnlog "Gallery has not been closed!"
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsMailMergeWizard
+ Dim i as integer
+
+ PrintLog "- Tools / Mail Merge"
+ if gApplication = "HTML" then goto endsub
+
+ Call hNewDocument
+ printlog " Open new document"
+ ToolsMailMergeWizard
+
+ printlog " Tools / Mail Merge Wizard"
+ Kontext "MailMergeWizard"
+ if ( MailMergeWizard.Exists( 5 ) ) then
+ printlog( "Dialog <MailmergeWizard> is available" )
+ else
+ Warnlog( "FATAL: Dialog <MailmergeWizard> not available" )
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Call DialogTest ( MailMergeWizard )
+ Kontext "TabMailMergeSourceDocument"
+ Call DialogTest ( TabMailMergeSourceDocument )
+ Wait 500
+ printlog " Click document 'Browse' button"
+ BrowseDocument.Click
+
+ Kontext "OeffnenDlg"
+ if ( OeffnenDlg.Exists( 1 ) ) then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "Filedialog not up on document 'Browse' button"
+ end if
+
+ Kontext "TabMailMergeSourceDocument"
+ printlog " Click template 'Browse' button"
+ BrowseTemplate.Click
+
+ Kontext "Neu"
+ if ( Neu.exists( 1 ) ) then
+ Call DialogTest ( Neu )
+ Neu.Cancel
+ else
+ warnlog( "Dialog <Neu> is not available" )
+ end if
+
+ Kontext "TabMailMergeSourceDocument"
+ printlog " Check 'Use the current document' radio button"
+ UseTheCurrentDocument.Check
+
+ printlog " Click 'Next' button"
+ Kontext "MailMergeWizard"
+ NextButton.Click
+ Sleep 1
+ Kontext "TabMailMergeDocumentType"
+ Call DialogTest ( TabMailMergeDocumentType )
+ wait 500
+ printlog " Click 'Next' button"
+ Kontext "MailMergeWizard"
+ NextButton.Click
+ Sleep 1
+ Kontext "TabMailMergeAddressBlock"
+ Call DialogTest ( TabMailMergeAddressBlock )
+ wait 500
+ printlog " Click 'Select Address List'"
+ SelectAddressListButton.Click
+
+ Kontext "Active"
+ if ( Active.Exists( 1 ) ) then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ Kontext "SelectAddressList"
+ if ( SelectAddressList.exists( 2 ) ) then
+ Call DialogTest ( SelectAddressList )
+ else
+ Warnlog "Problems selecting addresses"
+ Kontext "MailMergeWizard"
+ MailMergeWizard.Cancel
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " In 'Select address list' dialog click 'Add'"
+ Add.Click
+
+ Kontext "OeffnenDlg"
+ if ( OeffnenDlg.Exists( 1 ) ) then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "Filedialog not up on template 'Browse' button"
+ end if
+
+ Kontext "SelectAddressList"
+ if ( SelectAddressList.exists( 1 ) ) then
+ printlog " In 'Select address list' dialog click 'Create'"
+ Create.Click
+ else
+ warnlog( "Dialog <SelectAddressList> is not available" )
+ end if
+
+ Kontext "NewAddressList"
+ if ( NewAddressList.exists( 1 ) ) then
+ Call DialogTest ( NewAddressList )
+ printlog " In 'New address' dialog click 'Find' button"
+ Find.Click
+ else
+ warnlog( "Dialog <NewAddressList> is not available" )
+ end if
+
+ Kontext "FindEntry"
+ if ( FindEntry.Exists( 1 ) ) then
+ Call DialogTest ( FindEntry )
+ FindEntry.Cancel
+ else
+ Warnlog "Dialog 'Find entry' not up"
+ end if
+
+ printlog " In 'New address' dialog click 'Customize' button"
+ Kontext "NewAddressList"
+ Customize.Click
+
+ Kontext "CustomizeAddressList"
+ if ( CustomizeAddressList.Exists( 1 ) ) then
+ Call DialogTest ( CustomizeAddressList )
+ printlog " In 'Customize Addresss List' dialog select first entry in list"
+ AddressListElements.Select 1
+ printlog " Click 'add' button"
+ Add.Click
+ Kontext "RenameElement"
+ Call DialogTest ( RenameElement )
+ printlog " Close 'Add Element' dialog"
+ RenameElement.Cancel
+ Kontext "CustomizeAddressList"
+ printlog " Click 'Rename' button"
+ Rename.Click
+ Kontext "RenameElement"
+ Call DialogTest ( RenameElement )
+ RenameElement.Cancel
+ wait 500
+ Kontext "CustomizeAddressList"
+ CustomizeAddressList.Cancel
+ else
+ Warnlog "Dialog 'Customize Address List' is not up"
+ end if
+
+ printlog " Close all open dialogs"
+
+ Kontext "NewAddressList"
+ if ( NewAddressList.exists( 1 ) ) then
+ NewAddressList.Cancel
+ else
+ warnlog( "Dialog <NewAddressList> is not available" )
+ end if
+
+ Kontext "SelectAddressList"
+ if ( SelectAddressList.exists( 1 ) ) then
+ SelectAddressList.Cancel
+ else
+ warnlog( "Dialog <SelectAddressList> is not available" )
+ end if
+
+ Kontext "MailMergeWizard"
+ if ( MailMergeWizard.exists( 1 ) ) then
+ MailMergeWizard.Cancel
+ else
+ warnlog( "Dialog <MailMergeWizard> is not available" )
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsTextInTables
+ PrintLog "- Tools / Text <-> Tables"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert some text and select it"
+ Call wTypeKeys ("Hallo dieser Text soll in eine Tabelle")
+ Call wTypeKeys ("<Shift Home>")
+ ToolsTextInTable
+ printlog " Tools / Text<->Table"
+ Kontext "TextInTabelleUmwandeln"
+ DialogTest ( TextInTabelleUmwandeln )
+ printlog " Close upcoming dialog"
+ TextInTabelleUmwandeln.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsSort
+ Dim i as integer
+ PrintLog "- Tools / Sort"
+
+ Call hNewDocument
+ printlog " Open new document"
+ For i = 1 to 5
+ Call wTypeKeys (i)
+ Call wTypeKeys ("<Return>")
+ next i
+ Call wTypeKeys ("<Mod1 A>")
+ ToolsSort
+ Kontext "Sortieren"
+ Call DialogTest ( Sortieren )
+ Sortieren.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tToolsCalculate
+ PrintLog "- Tools / Calculate"
+
+ Call hNewDocument
+ printlog " Open new document"
+ Call wTypeKeys( "2+4" )
+ printlog " Insert text: 2+4"
+ EditSelectAll
+ printlog " Edit / Select All"
+ ToolsCalculate
+ printlog " Tools / Calculate"
+ Call wTypeKeys ("<End> Das Ergebnis ist = ")
+ printlog " Paste result of calculation with Edit / Paste"
+ EditPaste
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+' -------------------------------------------
+
+testcase tToolsUpdate
+ PrintLog "- Tools / Update"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb !"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " - Update Indexes ( all, current )"
+ printlog " Add a text to document"
+ Call wTypeKeys ("Dieser Text ist zur Aktualisierung")
+ printlog " Insert / Indexes"
+ InsertIndexes
+
+ Kontext "Active"
+ if ( Active.Exists( 2 ) ) then
+ if active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ Kontext
+ Active.Setpage TabVerzeichnisseVerzeichnis
+
+ printlog " Close upcoming Index dialog"
+ Kontext "TabVerzeichnisseVerzeichnis"
+ TabVerzeichnisseVerzeichnis.OK
+
+ printlog " Tools / Update / All Indexes"
+ hUseAsyncSlot( "ToolsUpdateAllIndexes" )
+
+ printlog " Tools / Update / Current Index"
+ ToolsUpdateCurrentIndex
+
+ printlog " - Update Fields"
+ Call wTypeKeys ("<Up><Home><Tab>")
+
+ printlog " Insert / Fields / Author"
+ InsertFieldsAuthor
+
+ printlog " Insert / Fields / Time"
+ InsertFieldsTime
+
+ printlog " Tools / Update / Fields"
+ hUseAsyncSlot( "ToolsUpdateFields" )
+
+ printlog " - Update links"
+ printlog " Insert a graphic from file"
+ Call hGrafikVerknuepftEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ if ( hUseAsyncSlot( "ToolsUpdateLinks" ) = -1 ) then
+ Warnlog "Links can't be updated!"
+ end if
+
+ printlog " - Update / Reformat Pages with Tools / Page formatting"
+ ToolsPageFormatting
+
+ printlog " - update all with Tools / Update / Update All"
+ ToolsUpdateUpdateAll
+
+ printlog " Close all active documents"
+ hFileCloseAll()
+endcase
+
+' -------------------------------------------
+
+testcase tToolsHangulHanjaConversion
+ Dim bAsianLanguage as Boolean
+ Dim sTestFile as String
+
+ if ( gApplication = "MASTERDOCUMENT" ) then
+ goto endsub
+ end if
+
+ select case gApplication
+ case "HTML" : sTestFile = gTesttoolpath & "writer\required\input\hangul.html"
+ case "WRITER" : sTestFile = gTesttoolpath & "writer\required\input\hangul.sxw"
+ case default : goto endsub
+ end select
+
+ PrintLog "- Tools / HangulHanjaConversion"
+
+ printlog " Enable 'Asian Language support' ON"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
+
+ printlog " Open the test file"
+ hFileOpen (sTestFile)
+ Call sMakeReadOnlyDocumentEditable
+ Call wTypeKeys("<MOD1 Home>")
+
+ printlog " Tools / HangulHanjaConversion"
+ try
+ ToolsLanguageHangulHanjaConversion
+ catch
+ Warnlog "- Format / HangulHanjaConversion is disabled or hidden!"
+ bAsianLanguage = ActiveDeactivateAsianSupport(False)
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Kontext "HangulHanjaConversion"
+ if HangulHanjaConversion.Exists then
+ Call DialogTest ( HangulHanjaConversion )
+ else
+ Warnlog "- Format / HangulHanjaConversion doesn't work. Dialog is not up"
+ bAsianLanguage = ActiveDeactivateAsianSupport(False)
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " Click button 'Options'"
+ try
+ Options.Click
+ Kontext "HangulHanjaOptions"
+ Call DialogTest ( HangulHanjaOptions )
+ catch
+ Warnlog "- Something is wrong in the button 'Options' !"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ NewDictionary.Click
+ Kontext "HangulHanjaNewDictionary"
+ Call DialogTest ( HangulHanjaNewDictionary )
+ HangulHanjaNewDictionary.Close
+
+ Kontext "HangulHanjaOptions"
+ HangulHanjaOptions.Cancel
+
+ Kontext "HangulHanjaConversion"
+ printlog " Close HangulHanja dialog"
+ HangulHanjaConversion.Close
+
+ printlog " Set the 'Asian Language support' to default"
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
+
+ printlog " Close all active documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' -------------------------------------------
+
+testcase tToolsChineseTranslation
+
+ Dim bAsianLanguage as Boolean
+
+ PrintLog "- Tools / Language / Chinese Translation"
+
+ printlog " Open a new document"
+ Call hNewDocument
+
+ printlog " Enable 'Asian Language support' ON"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
+
+ printlog " Tools / Language / Chinese Translation"
+ try
+ ToolsLanguageChineseTranslation
+ catch
+ Warnlog "- Tools/language / Chinese Translation is disabled or hidden!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Kontext "ChineseTranslation"
+ if ChineseTranslation.Exists then
+ Call DialogTest ( ChineseTranslation )
+ else
+ Warnlog "#i41364#Tools-> Language -> Chinese Translation does not work!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " Press 'Edit Terms' button , a new dialog should appear"
+ try
+ EditTerms.Click
+ catch
+ Warnlog "- Something is wrong in the button 'Edit Terms' !"
+ Kontext "ChineseTranslation"
+ ChineseTranslation.Cancel
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Kontext "ChineseDictionary"
+ if ChineseDictionary.Exists then
+ Call DialogTest ( ChineseDictionary )
+ else
+ Warnlog "Button 'Edit Terms' does not bring up the dialog!"
+ Kontext "ChineseTranslation"
+ ChineseTranslation.Cancel
+ Call hCloseDocument
+ goto endsub
+ end if
+ ChineseDictionary.Cancel
+
+ Kontext "ChineseTranslation"
+ ChineseTranslation.Cancel
+
+ printlog " Set the 'Asian Language support' to default"
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+' -------------------------------------------
+
+testcase tHtmlDocToolsHangulHanjaConversion
+ Dim bAsianLanguage as Boolean
+ Dim sTestFile as String
+
+ gApplication = "HTML"
+ PrintLog "- Tools / HangulHanjaConversion"
+ sTestFile = Convertpath (gTesttoolpath + "writer\required\input\hangul.html")
+
+ printlog " Enable 'Asian Language support' ON"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
+
+ printlog " Open the test file"
+ hFileOpen (sTestFile)
+ Call sMakeReadOnlyDocumentEditable
+ Call wTypeKeys("<MOD1 Home>")
+
+ printlog " Tools / HangulHanjaConversion"
+ if ( hUseAsyncSlot( "ToolsLanguageHangulHanjaConversion" ) = -1 ) then
+ Warnlog "- Format / HangulHanjaConversion is disabled or hidden!"
+ bAsianLanguage = ActiveDeactivateAsianSupport(False)
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Kontext "HangulHanjaConversion"
+ if ( HangulHanjaConversion.Exists( 1 ) ) then
+ Call DialogTest ( HangulHanjaConversion )
+ else
+ Warnlog "- Format / HangulHanjaConversion doesn't work. Dialog is not up"
+ bAsianLanguage = ActiveDeactivateAsianSupport(False)
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " Click button 'Options'"
+ try
+ Options.Click
+ Kontext "HangulHanjaOptions"
+ Call DialogTest ( HangulHanjaOptions )
+ catch
+ Warnlog "- Something is wrong in the button 'Options' !"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ NewDictionary.Click
+ Kontext "HangulHanjaNewDictionary"
+ Call DialogTest ( HangulHanjaNewDictionary )
+ HangulHanjaNewDictionary.Close
+
+ Kontext "HangulHanjaOptions"
+ HangulHanjaOptions.Cancel
+
+ Kontext "HangulHanjaConversion"
+ printlog " Close HangulHanja dialog"
+ HangulHanjaConversion.Close
+
+ printlog " Set the 'Asian Language support' to default"
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
+
+ PrintLog "Close active documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ gApplication = "WRITER"
+endcase
+
+' -------------------------------------------
+
+testcase tMasterDocToolsHyphenation
+ Dim sTestFile as string
+ Dim LingFile as string
+
+ gApplication = "MASTERDOCUMENT"
+ PrintLog "- Tools / Hyphenation"
+
+ ' As long as OOo has no modules for that, disabled
+ if ( gOOO ) then
+ printlog "No hyphenation in OOo"
+ goto endsub
+ end if
+
+ select case iSprache
+ case 1,01
+ LingFile = "01-44-hyph.dat"
+ sTestFile = gTesttoolpath + "writer\required\input\linguistik\001.odt"
+ case 7,07
+ sTestFile = gTesttoolpath + "writer\required\input\linguistik\007.odt"
+ case 3,03
+ sTestFile = gTesttoolpath + "writer\required\input\linguistik\003.odt"
+ case 81
+ Printlog "- No Hyphenation in Japanese!"
+ goto endsub
+ case 82
+ Printlog "- No Hyphenation in Korean!"
+ goto endsub
+ case 86
+ Printlog "- No Hyphenation in Chinese (simplified)!"
+ goto endsub
+ case 88
+ Printlog "- No Hyphenation in Chinese (traditional)!"
+ goto endsub
+ case else
+ sTestFile = gTesttoolpath + "writer\required\input\linguistik\0" + trim$(str$(iSprache)) + ".odt"
+ LingFile = str$(iSprache) + "-hyph.dat"
+ end select
+
+ sTestFile = convertpath( sTestFile )
+ if ( not hFileExists( sTestFile ) )then
+ Warnlog "No defined Errortext for language: " + isprache + "! Exit!"
+ goto endsub
+ end if
+
+ if ( not wInsertDocumentinMasterDoc( sTestFile ) ) then
+ Warnlog "Loading document did not work!"
+ goto endsub
+ else
+ Call hNewDocument
+ printlog " Open new document"
+ hUseAsyncSlot( "EditPaste" )
+ end if
+
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Insert file 'writer\required\input\linguistik\0 + [OfficeLanguage] + '.odt'"
+ Sleep 1
+ Call wTypeKeys ("<Mod1 Home>")
+
+ printlog " Tools / Hyphenate"
+ hUseAsyncSlot( "ToolsLanguageHyphenate" )
+
+ ' This is probably a workaround to make the hyphenation dialog work in any case.
+
+ ' We really only know of three possible dialogs (in order of appearance):
+ ' 1: Continue checking at the beginning of the document (Yes/No)
+ ' 2: Hyphenation for language not installed (Ok)
+ ' 3: Hyphenation completed (Ok)
+
+ ' I have not changed the code, only beautified it a little but i feel the outcome of
+ ' this test is somewhat random.
+ Kontext "Active"
+ if ( Active.exists( 1 ) ) then
+
+ ' JSK: These messagboxes were originally handled silently.
+ ' So i have no idea which of those is expected and which is not...
+ printlog( "Messagebox: " & Active.getText() )
+ try
+ printlog( "Trying to close messageboy with <YES>" )
+ Active.Yes
+ catch
+ printlog( "<YES> failed... (Whatever that means)" )
+ endcatch
+
+ if ( Active.Exists() ) then
+ printlog( "Messagebx: " & Active.getText() )
+ if ( Active.GetRT() = 304 ) then
+ Active.Ok
+ ' Force pagesize change to bringup Hyphenation-dialog
+ hUseAsyncSlot( "FormatPageWriter" )
+
+ Kontext
+ active.SetPage TabSeite
+
+ Kontext "TabSeite"
+ Breite.Settext "15"
+ TabSeite.Ok
+ hUseAsyncSlot( "ToolsLanguageHyphenate" )
+ end if
+ end if
+ end if
+
+ Kontext "Silbentrennung"
+ printlog " Close upcoming 'Hyphenation' dialog"
+ if ( Silbentrennung.Exists( 2 ) ) then
+ Call DialogTest ( Silbentrennung )
+ Silbentrennung.Cancel
+ else
+ Warnlog "Dialog 'Hyphenation' not up!"
+ Kontext "Active"
+ if ( Active.Exists() ) then
+ try
+ Active.Ok
+ catch
+ endcatch
+ end if
+ end if
+
+ printlog " Close active documents"
+ hFileCloseAll()
+ gApplication = "WRITER"
+endcase
+
+' -------------------------------------------
diff --git a/testautomation/writer/required/includes/w_008_.inc b/testautomation/writer/required/includes/w_008_.inc
new file mode 100644
index 000000000000..f3b20e978a1d
--- /dev/null
+++ b/testautomation/writer/required/includes/w_008_.inc
@@ -0,0 +1,61 @@
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Diverse Testcases for the office.
+'*
+'\******************************************************************
+
+sub w_008_
+
+ printLog Chr(13) + "--------- Window Menu (w_008_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tWindowNewWindow
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tWindowNewWindow
+ PrintLog "- Window / New Window"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb !"
+ goto endsub
+ end if
+ Call hNewDocument
+ printlog " Open new document"
+ Call hTabelleEinfuegen
+ printlog " Insert Table"
+ WindowNewWindow
+ printlog " Window / New Window"
+ WaitSlot (2000)
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_009_.inc b/testautomation/writer/required/includes/w_009_.inc
new file mode 100644
index 000000000000..90c4cb5aad19
--- /dev/null
+++ b/testautomation/writer/required/includes/w_009_.inc
@@ -0,0 +1,96 @@
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'* **
+'* owner : helge.delfs@sun.com **
+'* **
+'* short description : Testcases for the Help-Menu
+'*
+'\******************************************************************
+
+sub w_009_
+
+ printLog Chr(13) + "--------- Menu Help (w_009_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tHelpTip
+ Call tHelpExtendedTips
+ Call tHelpAboutStarOffice
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tHelpTip
+ PrintLog "- Help / Tip"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Help / Tips"
+ HelpTips
+ WaitSlot (2000)
+ printlog " Help / Tips"
+ HelpTips
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHelpExtendedTips
+ PrintLog "- Help / Extended Tips"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Help / Extended Help"
+ HelpEntendedHelp
+ WaitSlot (2000)
+ printlog " Help / Extended Help"
+ HelpEntendedHelp
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHelpAboutStarOffice
+ PrintLog "- Help / About StarOffice"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Help / About"
+ HelpAboutStarOffice
+ Kontext "UeberStarWriter"
+ DialogTest ( UeberStarWriter )
+ printlog " In About dialog enter key <Strg+Alt+Del>"
+ UeberStarWriter.TypeKeys "<Mod1 S><Mod1 D><Mod1 T>"
+ Sleep 3
+ printlog " Close About dialog"
+ UeberStarWriter.OK
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_010_.inc b/testautomation/writer/required/includes/w_010_.inc
new file mode 100644
index 000000000000..29c802022bed
--- /dev/null
+++ b/testautomation/writer/required/includes/w_010_.inc
@@ -0,0 +1,1227 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Testcases for the Objectbars.
+'*
+'\******************************************************************
+
+sub w_010_
+
+ printLog Chr(13) + "--------- Objectbars (w_010_.inc) ----------"
+ gApplication = "WRITER"
+
+ ' ** Objectbar
+ Call tFormatting
+ Call tNumbering
+ Call tEnumerating
+ Call tIndentIncreaseDecrease
+
+ ' ** Objectbar Numbering / Aufzaehlung
+ Call tNumFormatting
+ Call tNumLevelUpDown
+ Call tNumSubpointsUpDown
+ Call tNumMoveUpMoveDown
+ Call tNumSubpointsMoveUpMoveDown
+ Call tNumUnnumberedEntry
+ Call tNumRestartNumbering
+ Call tNumNumberingOff
+ Call tNumNumberingEnumerating
+ Call tUpFormatting
+ Call tUpLevelUpDown
+ Call tUpSubpointsUpDown
+ Call tUpMoveUpMoveDown
+ Call tUpSubpointsMoveUpMoveDown
+ Call tUpUnnumberedEntry
+ Call tUpRestartNumbering
+ Call tUpNumberingOff
+ Call tUpNumberingEnumerating
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocFormatting
+ gApplication = "MASTERDOCUMENT"
+ Call tMasterDocFormatting
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tFormatting
+ printlog "- Objectbar ( normal ) : Formatting"
+ Call hNewDocument
+ printlog " Open new document"
+ Call wTypeKeys ("Formatting <Shift Home>")
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+
+ printlog " - Style"
+ try
+ Vorlage.Select 1
+ catch
+ Warnlog "Style could not be changed in TextObjectbar"
+ endcatch
+ printlog " Choose first 'style' in object bar"
+ Sleep 5
+ printlog " - Font"
+ printlog " Select 5th 'Font' in object bar"
+ try
+ Schriftart.Select 5
+ catch
+ Warnlog "Unable to select font in object bar"
+ endcatch
+ Schriftart.TypeKeys "<Return>"
+ Sleep 1
+ printlog " - Font Size"
+ printlog " Select 10th 'Font Size' in object bar"
+ try
+ Schriftgroesse.Select 10
+ Schriftgroesse.TypeKeys "<Return>"
+ catch
+ Warnlog "Uanble to change font size in toolbar"
+ endcatch
+ Sleep 1
+ printlog " - Bold"
+ printlog " Select 'Bold' in object bar"
+ Fett.Click
+ Sleep 1
+ printlog " - Italic"
+ printlog " Select 'Italic' in object bar"
+ Kursiv.Click
+ Sleep 1
+ printlog " - Underline"
+ printlog " Select 'Underline' in object bar"
+ Unterstrichen.Click
+ Sleep 1
+ printlog " - Align Left"
+ printlog " Select 'Align Left' in object bar"
+ Linksbuendig.Click
+ Sleep 1
+ printlog " - Align Right"
+ printlog " Select 'Align Right' in object bar"
+ Rechtsbuendig.Click
+ Sleep 1
+ printlog " - Centered"
+ printlog " Select 'Centered' in object bar"
+ Zentriert.Click
+ Sleep 1
+ if gApplication <> "HTML" then
+ printlog " - Justify"
+ printlog " Select 'Justify' in object bar (not in HTML)"
+ Blocksatz.Click
+ Sleep 1
+ end if
+ printlog " - Font color"
+ printlog " Select 'Font color' in object bar"
+ Schriftfarbe.Click
+ Sleep 1
+ printlog " - Highlighting"
+ printlog " Select 'Highlighting' in object bar"
+ Zeichenhintergrund.Click
+ Sleep 1
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumbering
+ printlog "- Objectbar ( normal ) : Insert Numbering"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Select 'Numbering' in object bar"
+ Numerierung.Click
+ Call wTypeKeys ("Numbering <Return>", 2)
+ printlog " Enter word 'Numbering' and '<Return>' two times"
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tEnumerating
+ printlog "- Objectbar ( normal ) : Insert Bullets"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " In object bar click 'Bullets'"
+ BulletsOnOff.Click
+ Call wTypeKeys ("Bullets <Return>", 2)
+ printlog " Enter word 'Bullets' and '<Return>' two times"
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tIndentIncreaseDecrease
+ dim i as Integer
+
+ printlog "- Objectbar ( normal ) : Increase Indent with numbering"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Click 'Numbering' in object bar"
+ Numerierung.Click
+ Sleep 1
+ try
+ EinzugErhoehen.Click
+ printlog " Select 'Increase Indent' in object bar (if not possible switch toolbar)"
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Sleep 1
+ for i=1 to 7
+ if EinzugErhoehen.IsEnabled then
+ printlog " Select 'Increase Indent' 7 times"
+ EinzugErhoehen.Click
+ else
+ if i = 1 then Warnlog "Increase Indent is disabled !"
+ end if
+ wait 500
+ next i
+
+ printlog "- Objectbar ( normal ) : Decrease Indent with numbering"
+ for i=1 to 8
+ printlog " Select 'Decrease Indent' 8 times"
+ if EinzugVermindern.IsEnabled then
+ EinzugVermindern.Click
+ else
+ if i = 1 then Warnlog "Decrease Indent is disabled !"
+ end if
+ wait 500
+ next i
+ printlog " Enter '<Return>' 2 times"
+ Call wTypeKeys ("<Return>", 2)
+ Sleep 1
+
+ printlog "- Objectbar ( normal ) : Increase Indent with Bullets"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Select 'Bullets' in object bar"
+ BulletsOnOff.Click
+ Sleep 1
+ for i=1 to 8
+ printlog " Select 'Increase Indent' 8 times"
+ if EinzugErhoehen.IsEnabled then
+ EinzugErhoehen.Click
+ else
+ if i = 1 then Warnlog "Increase Indent is disabled !"
+ end if
+ wait 500
+ next i
+
+ printlog "- Objectbar ( normal ) : Decrease Indent with Bullets"
+ for i=1 to 8
+ printlog " Select 'Decrease Indent' 8 times"
+ if EinzugVermindern.IsEnabled then
+ EinzugVermindern.Click
+ else
+ if i = 1 then Warnlog "Decrease Indent is disabled !"
+ end if
+ wait 500
+ next i
+
+ Call wTypeKeys ("<Return>", 2)
+ printlog " Enter '<Return>' 2 times"
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumFormatting
+ printlog "- Objectbar Numbering : Numbering => Style, Font and Size"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Select 'Numbering' in object bar"
+ Numerierung.Click
+ Sleep 1
+ Call wTypeKeys ("Objectbar Numbering : Numbering => Style, Font and Size <Shift Home>")
+ printlog " Enter some text in document and select it"
+ Kontext "TextObjectbar"
+ printlog " - Style"
+ printlog " Change 'Style' in object bar'"
+ try
+ Vorlage.Select 1
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Sleep 1
+ printlog " - Font"
+ printlog " Change 'Font Style' in object bar'"
+ try
+ Schriftart.Select 10
+ Schriftart.TypeKeys "<Return>"
+ catch
+ Warnlog "Unable to select 'Font Style' in object bar"
+ endcatch
+ Sleep 1
+ printlog " - Font Size"
+ printlog " Change 'Font Size' in object bar'"
+ try
+ Schriftgroesse.Select 10
+ Schriftgroesse.TypeKeys "<Return>"
+ catch
+ Warnlog "Unable to select 'Font Sitze' in object bar"
+ endcatch
+ Sleep 1
+ printlog " Enter '<Return>'"
+ Call wTypeKeys ("<Return>")
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumLevelUpDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : Numbering Level-Up and Down"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Select 'Numbering' in object bar"
+ Numerierung.Click
+ Sleep 1
+
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ printlog " - 11 times level down"
+ Kontext "NumObjectbar"
+ printlog " Select 11 times 'Level down' in object bar"
+ try
+ Hinunterstufen.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ sleep (2)
+ for i=1 to 9
+ if Hinunterstufen.IsEnabled = True then
+ Hinunterstufen.Click
+ else
+ if i = 1 then Warnlog "Level down is disabled!"
+ end if
+ sleep (2)
+ next i
+
+ printlog " - 11 times level up"
+ printlog " Select 11 times 'Level up' in object bar"
+ for i=1 to 11
+ if Hochstufen.IsEnabled then
+ Hochstufen.Click
+ else
+ if i = 1 then Warnlog "Level up is disabled! (#i28550)"
+ end if
+ sleep (2)
+ next i
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumSubpointsUpDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : Numbering with subpoints up and down"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ Numerierung.Click
+ printlog " Click 'Numbering' in Object bar"
+ Call wTypeKeys ("Numbering <Return><Tab>", 2)
+ Call wTypeKeys ("<Tab>Numbering<Up><Up><Up>")
+
+ Kontext "NumObjectbar"
+ if ( NumObjectbar.Exists( 1 ) ) then
+ ' all good
+ else
+ Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ endif
+
+ printlog " - 6 times subpoints down"
+ printlog " click 6 times subpoints down in object bar"
+ if HinunterstufenMitUnterpunkten.IsEnabled then
+ HinunterstufenMitUnterpunkten.Click
+ else
+ if i = 1 then Warnlog "Move up with subpoints is disabled! (#i28550)"
+ end if
+ Sleep (1)
+
+ for i=1 to 5
+ if HinunterstufenMitUnterpunkten.IsEnabled then
+ HinunterstufenMitUnterpunkten.Click
+ else
+ if i = 1 then Warnlog "Move down with subpoints is disabled!"
+ end if
+ Sleep (1)
+ next i
+
+ if HinunterstufenMitUnterpunkten.IsEnabled then
+ Warnlog "Move down with subpoints is enabled though on Level 10"
+ end if
+ Sleep (1)
+
+ printlog " - 6 times subpoints up"
+ printlog " click 6 times subpoints up in object bar"
+ for i=1 to 6
+ if HochstufenMitUnterpunkten.IsEnabled then
+ HochstufenMitUnterpunkten.Click
+ else
+ if i = 1 then Warnlog "Move up with subpoints is disabled!"
+ end if
+ Sleep (1)
+ next i
+
+ if HochstufenMitUnterpunkten.IsEnabled then
+ Warnlog "Move up with subpoints is enabled!"
+ end if
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumMoveUpMoveDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : Move Numbering up and down"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ Numerierung.Click
+ printlog " Click 'Numbering' in object bar"
+ Call wTypeKeys ("Numbering up <Return><Tab>", 3)
+ Call wTypeKeys ("<Tab>Hallo<Return>")
+ Call wTypeKeys ("<Shift Tab>", 5)
+ Call wTypeKeys ("Numbering down <Up><Up>")
+ Sleep 1
+
+ printlog " - 3 times move up"
+ printlog " click 3 times move up in object bar"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ Hochschieben.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Hochschieben.Click
+
+ printlog " - 4 times move down"
+ printlog " click 4 times move down in object bar"
+ for i=1 to 4
+ Hinunterschieben.Click
+ Sleep 1
+ next i
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumSubpointsMoveUpMoveDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : Move Numbering with subpoints up and down"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ Numerierung.Click
+ printlog " Click 'Numbering' in object bar"
+ Call wTypeKeys ("hallo <Return><Tab>", 3)
+ Call wTypeKeys ("<Tab>Hallo<Return>")
+ Call wTypeKeys ("<Shift Tab>", 5)
+ Call wTypeKeys ("Hallo <Up><Up>")
+ Sleep 1
+
+ printlog " - move up 3 times"
+ printlog " click 3 times move up in object bar"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ HochschiebenMitUnterpunkten.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ HochschiebenMitUnterpunkten.Click
+
+ printlog " - move down 3 times"
+ if Val(mid$(gMinor, 2, Len(gMinor))) >= 139 and Val(mid$(gMinor, 2, Len(gMinor))) <= 140 then
+ QAErrorlog "Loop when moving numbered list up and down with subpoints"
+ else
+ printlog " click 3 times move down in object bar"
+ for i=1 to 3
+ HinunterschiebenMitUnterpunkten.Click
+ Sleep 1
+ next i
+ end if
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumUnnumberedEntry
+ printlog "- Objectbar Numbering: Paragraph without Numbering"
+
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ Numerierung.Click
+ printlog " Click 'Numbering' in object bar"
+ Call wTypeKeys ("Paragraph without numbering")
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ printlog " Click 'Insert Unnumbered Entry'"
+ AbsatzOhne.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ endcatch
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumRestartNumbering
+ printlog "- Objectbar Numbering: Restart numbering"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Click 'Numbering' in object bar"
+ Numerierung.Click
+ Call wTypeKeys ("Restart numbering<Return>", 3)
+ printlog " Enter Text and hit <Return> 3 times"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ printlog " Click 'Restart Numbering' in object bar"
+ NeuStarten.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ endcatch
+
+ Call wTypeKeys ("Restart Numbering<Return>", 3)
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumNumberingOff
+ printlog "- Objectbar Numbering: Numbering off"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Click 'Numbering' in object bar"
+ Numerierung.Click
+ Call wTypeKeys ("Numbering Off<Return>", 3)
+ printlog " Enter Text and hit <Return> 3 times"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ printlog " Click 'Numbering off' in objectbar"
+ Ausschalten.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ endcatch
+
+ Call wTypeKeys ("Numbering Off<Return>", 3)
+ printlog " Enter Text and hit <Return> 3 times"
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tNumNumberingEnumerating
+ printlog "- Objectbar Numbering: Numbering within a Numbering"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Click 'Numbering' in object bar"
+ Numerierung.Click
+ Kontext
+ try
+ Active.Setpage TabBullet
+ Kontext "TabBullet"
+ Warnlog "For some unknown reason the Numbering/Bullets dialog has been opened!"
+ TabBullet.Cancel
+ catch
+ endcatch
+ Call wTypeKeys ("Numbering within a Numbering<Return>")
+ printlog " Enter text and hit <Return>"
+
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ if NumObjectBar.IsDocked then NumObjectbar.Undock
+ try
+ printlog " Click 'Edit Numbering' in object bar"
+ NumerierungAufzaehlung.Click
+ wait 500
+ catch
+ Kontext
+ try
+ Active.Setpage TabBullet
+ Kontext "TabBullet"
+ Warnlog "For some unknown reason the Numbering/Bullets dialog is already opened!"
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ endcatch
+
+ Kontext
+ printlog " Step through all tabpages in 'Numbering/Bullets' dialog"
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ Call DialogTest ( TabBullet )
+ Sleep 1
+
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Call DialogTest ( TabNumerierungsart )
+ Sleep 1
+
+ Kontext
+ Active.SetPage TabNumerierung
+ Kontext "TabNumerierung"
+ Call DialogTest ( TabNumerierung )
+ Sleep 1
+
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ Call DialogTest ( TabGrafiken )
+ Sleep 1
+
+ Kontext
+ Active.SetPage TabPositionNumerierung
+ Kontext "TabPositionNumerierung"
+ Call DialogTest ( TabPositionNumerierung )
+ Sleep 1
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ Call DialogTest ( TabOptionenNumerierung )
+ Sleep 1
+ printlog " Close 'Numbering/Bullets' dialog"
+ TabOptionenNumerierung.Cancel
+ wait 500
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpFormatting
+ printlog "- Objectbar Numbering : Bullets => Style, Font and -Size"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Click 'Bullets on/off' in object bar"
+ BulletsOnOff.Click
+ Sleep 1
+ printlog " Enter some text and select it"
+ Call wTypeKeys ("Bullets => Style, Font and -Size <Shift Home>")
+ Kontext "TextObjectbar"
+ printlog " - Style"
+ try
+ Vorlage.Select 1
+ catch
+ Warnlog "Unable to select style in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ printlog " Select 1st entry in 'Apply Style'"
+ Sleep 5
+ printlog " - Font"
+ printlog " Select 5th 'Font Name'"
+ try
+ Schriftart.Select 5
+ catch
+ Warnlog "Unable to select font in object bar"
+ endcatch
+ Schriftart.TypeKeys "<Return>"
+ Sleep 1
+ printlog " - Font Size"
+ printlog " Select 10th 'Font Size'"
+ Schriftgroesse.Select 10
+ Schriftgroesse.TypeKeys "<Return>"
+ Sleep 1
+ printlog " Hit <Return> in document"
+ Call wTypeKeys ("<Return>")
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpLevelUpDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : Bullets level up and down"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Click 'Bullets on/off' in object bar"
+ BulletsOnOff.Click
+ Sleep 1
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+
+ printlog " - 11 times level down"
+ try
+ Hinunterstufen.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ sleep (2)
+ for i=1 to 9
+ printlog " Click 'Down One Level' in object bar 11 times"
+ if Hinunterstufen.IsEnabled then
+ Hinunterstufen.Click
+ else
+ if i = 1 then Warnlog "Level down is disabled !"
+ end if
+ sleep (2)
+ next i
+
+ printlog " - 11 times level up"
+ printlog " Click 'Up One Level' in object bar 11 times"
+ for i=1 to 11
+ if Hochstufen.IsEnabled then
+ Hochstufen.Click
+ else
+ if i = 1 then Warnlog "Level up is disabled ! (#i28550)"
+ end if
+ sleep (2)
+ next i
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpSubpointsUpDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : Bullets with Subpoints up and down"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ printlog " Click 'Bullets on/off' in object bar"
+ BulletsOnOff.Click
+ printlog " Enter some text, hit 'Return' and 'Tab' 2 times"
+ Call wTypeKeys ("Bullets with Subpoints <Return><Tab>", 2)
+ printlog " Hit 'Tab', enter some text, and hit 'Cursor Up' 3 times"
+ Call wTypeKeys ("<Tab>up and down<Up><Up><Up>")
+ Sleep 1
+
+ printlog " - down 6 times"
+ printlog " Click 'Move Down with Subpoints' 11 times "
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ HinunterstufenMitUnterpunkten.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Sleep 1
+
+ for i=1 to 5
+ if HinunterstufenMitUnterpunkten.IsEnabled then
+ HinunterstufenMitUnterpunkten.Click
+ else
+ if i = 1 then Warnlog "Move with Subpoints down is disabled!"
+ end if
+ Sleep 1
+ next i
+ if HinunterstufenMitUnterpunkten.IsEnabled then
+ Warnlog "Move with Subpoints down is enabled though on level 10!"
+ end if
+
+ printlog " - up 6 times"
+ for i=1 to 6
+ printlog " Click 'Move Up with Subpoints' 11 times "
+ if HochstufenMitUnterpunkten.IsEnabled then
+ HochstufenMitUnterpunkten.Click
+ else
+ if i = 1 then Warnlog "Move with Subpoints up is disabled! (#i28550)"
+ end if
+ Sleep 1
+ next i
+ if HochstufenMitUnterpunkten.IsEnabled then
+ Warnlog "Move with Subpoints up is enabled though on level 1!"
+ end if
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpMoveUpMoveDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : move bullets up and down"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ BulletsOnOff.Click
+ printlog " Click 'Bullets on/off' in object bar"
+ Call wTypeKeys ("move bullets <Return><Tab>", 3)
+ printlog " enter some text hit <Return> and <Tab> 3 Times"
+ Call wTypeKeys ("<Tab>up<Return>")
+ printlog " Enter one word"
+ Call wTypeKeys ("<Shift Tab>", 5)
+ printlog " Hit <Tab> 5 Times"
+ Call wTypeKeys ("and down <Up><Up>")
+ printlog " enter text and hit <Cursor Up> 2 times"
+ Sleep 1
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ printlog " - 3 times up"
+ try
+ Hochschieben.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ for i=1 to 2
+ printlog " Click 'Move Up' in object bar 3 times"
+ Hochschieben.Click
+ Sleep 1
+ next i
+
+ printlog " - 4 times down"
+ for i=1 to 4
+ printlog " Click 'Move Down' in object bar 4 times"
+ Hochschieben.Click
+ Sleep 1
+ next i
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpSubpointsMoveUpMoveDown
+ dim i as Integer
+
+ printlog "- Objectbar Numbering : Move up and down bullets with subpoints"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ BulletsOnOff.Click
+ printlog " Click 'Bullets on/off' in object bar"
+ Call wTypeKeys ("move bullets <Return><Tab>", 3)
+ printlog " enter some text hit <Return> and <Tab> 3 Times"
+ Call wTypeKeys ("<Tab>up and down<Return>")
+ printlog " Enter one word"
+ Call wTypeKeys ("<Shift Tab>", 5)
+ printlog " Hit <Tab> 5 Times"
+ Call wTypeKeys ("with subpoints <Up><Up>")
+ printlog " enter text and hit <Cursor Up> 2 times"
+ Sleep 1
+ printlog " - move up 3 times"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ HochschiebenMitUnterpunkten.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ printlog " Click 'Move Up with subpoints' 3 times"
+ HochschiebenMitUnterpunkten.Click
+
+ if Val(mid$(gMinor, 2, Len(gMinor))) >= 139 and Val(mid$(gMinor, 2, Len(gMinor))) <= 140 then
+ QAErrorlog "Loop when moving numbered list up and down with subpoints"
+ else
+ printlog " - move down 3 times"
+ for i=1 to 3
+ printlog " Click 'Move Down with subpoints' 3 times"
+ HinunterschiebenMitUnterpunkten.Click
+ Sleep 1
+ next i
+ end if
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpUnnumberedEntry
+ printlog "- Objectbar Numbering: Paragraph without Bullets"
+
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ BulletsOnOff.Click
+ printlog " Click 'Bullets on/off' in object bar"
+ Call wTypeKeys ("Paragraph without Bullets")
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+
+ try
+ printlog " Click 'Insert Unnumbered Entry' in object bar"
+ AbsatzOhne.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ endcatch
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpRestartNumbering
+ printlog "- Objectbar Numbering: restart Numbering"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ BulletsOnOff.Click
+ printlog " Click 'Bullets on/off' in object bar"
+ Call wTypeKeys ("restart Numbering<Return>", 3)
+ printlog " enter Text and hit <Return> 3 Times"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ printlog " Click 'Restart Numbering' in object bar"
+ NeuStarten.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ endcatch
+
+ Call wTypeKeys ("restart Numbering<Return>", 3)
+ printlog " enter Text and hit <Return> 3 Times"
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpNumberingOff
+ printlog "- Objectbar Numbering: Numbering off"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ BulletsOnOff.Click
+ printlog " Click 'Bullets on/off' in object bar"
+ Call wTypeKeys ("Numbering off<Return>", 3)
+ printlog " enter Text and hit <Return> 3 Times"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ printlog " Click 'Numbering off' in object bar"
+ Ausschalten.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ endcatch
+
+ Call wTypeKeys ("Numbering off<Return>", 3)
+ printlog " enter Text and hit <Return> 3 Times"
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tUpNumberingEnumerating
+ printlog "- Objectbar Numbering: Numbering and Bullets within numbering"
+ Call hNewDocument
+ printlog " Open new document"
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+ BulletsOnOff.Click
+ printlog " Click 'Numbering on/off' in object bar"
+ Call wTypeKeys ("Numbering and Bullets within numbering<Return>")
+ printlog " enter Text and hit <Return>"
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
+ try
+ printlog " Click ' Edit Numbering' in object bar"
+ NumerierungAufzaehlung.Click
+ catch
+ Warnlog "Unable to select function in Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Sleep 1
+ printlog " In 'Numbering/Bullets' dialog step through all tabpages"
+ Kontext
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ Call DialogTest ( TabBullet )
+
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Call DialogTest ( TabNumerierungsart )
+
+ Kontext
+ Active.SetPage TabNumerierung
+ Kontext "TabNumerierung"
+ Call DialogTest ( TabNumerierung )
+
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ Call DialogTest ( TabGrafiken )
+
+ Kontext
+ Active.SetPage TabPositionNumerierung
+ Kontext "TabPositionNumerierung"
+ Call DialogTest ( TabPositionNumerierung )
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ Call DialogTest ( TabOptionenNumerierung )
+
+ printlog " Close 'Numbering/Bullets' dialog"
+ TabOptionenNumerierung.Cancel
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocFormatting
+ printlog "- Objectbar ( normal ) : Formatting"
+ gApplication = "HTML"
+
+ printlog " Open new document"
+ Call hNewDocument
+ Call wTypeKeys ("Formatting <Shift Home>")
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+
+ printlog " - Style"
+ try
+ Vorlage.Select 1
+ catch
+ Warnlog "Style could not be changed in TextObjectbar"
+ endcatch
+ printlog " Choose first 'style' in object bar"
+ Sleep 5
+ printlog " - Font"
+ printlog " Select 5th 'Font' in object bar"
+ try
+ Schriftart.Select 5
+ catch
+ Warnlog "Unable to select font in object bar"
+ endcatch
+ Schriftart.TypeKeys "<Return>"
+ Sleep 1
+ printlog " - Font Size"
+ printlog " Select 10th 'Font Size' in object bar"
+ try
+ Schriftgroesse.Select 10
+ Schriftgroesse.TypeKeys "<Return>"
+ catch
+ Warnlog "Uanble to change font size in toolbar"
+ endcatch
+ Sleep 1
+ printlog " - Bold"
+ printlog " Select 'Bold' in object bar"
+ Fett.Click
+ Sleep 1
+ printlog " - Italic"
+ printlog " Select 'Italic' in object bar"
+ Kursiv.Click
+ Sleep 1
+ printlog " - Underline"
+ printlog " Select 'Underline' in object bar"
+ Unterstrichen.Click
+ Sleep 1
+ printlog " - Align Left"
+ printlog " Select 'Align Left' in object bar"
+ Linksbuendig.Click
+ Sleep 1
+ printlog " - Align Right"
+ printlog " Select 'Align Right' in object bar"
+ Rechtsbuendig.Click
+ Sleep 1
+ printlog " - Centered"
+ printlog " Select 'Centered' in object bar"
+ Zentriert.Click
+ Sleep 1
+ printlog " - Font color"
+ printlog " Select 'Font color' in object bar"
+ Schriftfarbe.Click
+ Sleep 1
+ printlog " - Highlighting"
+ printlog " Select 'Highlighting' in object bar"
+ Zeichenhintergrund.Click
+ Sleep 1
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFormatting
+ printlog "- Objectbar ( normal ) : Formatting"
+ gApplication = "MASTERDOCUMENT"
+
+ printlog " Open new document"
+ Call hNewDocument
+ Call wTypeKeys ("Formatting <Shift Home>")
+ Kontext "TextObjectbar"
+ if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
+
+ printlog " - Style"
+ try
+ Vorlage.Select 1
+ catch
+ Warnlog "Style could not be changed in TextObjectbar"
+ endcatch
+ printlog " Choose first 'style' in object bar"
+ Sleep 5
+ printlog " - Font"
+ printlog " Select 5th 'Font' in object bar"
+ try
+ Schriftart.Select 5
+ catch
+ Warnlog "Unable to select font in object bar"
+ endcatch
+ Schriftart.TypeKeys "<Return>"
+ Sleep 1
+ printlog " - Font Size"
+ printlog " Select 10th 'Font Size' in object bar"
+ try
+ Schriftgroesse.Select 10
+ Schriftgroesse.TypeKeys "<Return>"
+ catch
+ Warnlog "Uanble to change font size in toolbar"
+ endcatch
+ Sleep 1
+ printlog " - Bold"
+ printlog " Select 'Bold' in object bar"
+ Fett.Click
+ Sleep 1
+ printlog " - Italic"
+ printlog " Select 'Italic' in object bar"
+ Kursiv.Click
+ Sleep 1
+ printlog " - Underline"
+ printlog " Select 'Underline' in object bar"
+ Unterstrichen.Click
+ Sleep 1
+ printlog " - Align Left"
+ printlog " Select 'Align Left' in object bar"
+ Linksbuendig.Click
+ Sleep 1
+ printlog " - Align Right"
+ printlog " Select 'Align Right' in object bar"
+ Rechtsbuendig.Click
+ Sleep 1
+ printlog " - Centered"
+ printlog " Select 'Centered' in object bar"
+ Zentriert.Click
+ Sleep 1
+ printlog " - Justify"
+ printlog " Select 'Justify' in object bar (not in HTML)"
+ Blocksatz.Click
+ Sleep 1
+ printlog " - Font color"
+ printlog " Select 'Font color' in object bar"
+ Schriftfarbe.Click
+ Sleep 1
+ printlog " - Highlighting"
+ printlog " Select 'Highlighting' in object bar"
+ Zeichenhintergrund.Click
+ Sleep 1
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_010_1.inc b/testautomation/writer/required/includes/w_010_1.inc
new file mode 100644
index 000000000000..b0cf33b43892
--- /dev/null
+++ b/testautomation/writer/required/includes/w_010_1.inc
@@ -0,0 +1,878 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Testcases for the Objectbars.
+'*
+'\******************************************************************
+
+sub w_010_1
+
+ printLog Chr(13) + "--------- Objectbars . Part two. (w_010_1.inc) ----------"
+ gApplication = "WRITER"
+
+ ' ** Objectbar Table
+ Call tInsertFormula
+ Call tMergeCells
+ Call tSplitCells
+ Call tOptimize
+ Call tInsertCellRow
+ Call tDeleteRow
+ Call tDeleteColumn
+
+ ' ** Graphics ( same as OLE-Objects and Frames )
+ Call tGraphicWrap
+ Call tGraphicAlign
+ Call tGraphicFlip
+ Call tGraphicArrange
+ Call tGraphicBorders
+ Call tGraphicProperties
+ Call tGraphicAnchor
+
+ ' ** Formula Bar
+ Call tFormulaCancel
+ Call tFormulaApply
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDocGraphicWrap
+ Call tHtmlDocGraphicAlign
+ Call tHtmlDocGraphicProperties
+ gApplication = "WRITER"
+
+end sub
+'-----------------------------------------------------------
+
+testcase tInsertFormula
+ printlog "- Table-Objectbar: Formula border in Writer"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ printlog " Click 'Sum' in object bar"
+ Call hToolbarSelect ( "Table", true )
+ if TableObjectbar.IsVisible = true then
+ try
+ FormelEingeben.Click
+ catch
+ Warnlog "Unable to access 'Formula'-Button on toolbar!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ else
+ Warnlog "TableObjectbar is not visible!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Sleep 1
+ Kontext "OL_SW_Rechenleiste"
+ if OL_SW_Rechenleiste.NotExists then
+ warnlog "Formula border doesn't come up"
+ else
+ printlog " Click 'Cancel' in object bar"
+ Verwerfen.Click
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMergeCells
+ printlog "- Table-Objectbar: Merge Cells"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ printlog " Hit <Shift Right> 2 times"
+ Call wTypeKeys ("<Shift Right>", 2)
+ Sleep 2
+ printlog " Click 'Merge cells' in object bar"
+ Call hToolbarSelect ( "Table", true )
+ if TableObjectbar.IsVisible = true then
+ ZellenVerbinden.Click
+ else
+ Warnlog "TableObjectbar is not visible!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tSplitCells
+ printlog "- Table-Objectbar: Split Cells"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ Call hToolbarSelect ( "Table", true )
+ printlog " Click 'Split Cells' in object bar"
+ if TableObjectbar.IsVisible = true then
+ ZelleTeilen.Click
+ else
+ Warnlog "TableObjectbar is not visible!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Cancel upcoming dialog"
+ Kontext "ZellenTeilen"
+ ZellenTeilen.Cancel
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tOptimize
+ printlog "- Table-Objectbar: Optimize Table"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert a table and select all in document"
+ Call hTabelleEinfuegen
+ Call wTypeKeys ("<Mod1 A>")
+ Call hToolbarSelect ( "Table", true )
+ wait 500
+ printlog " Tear Off toolbar 'Optimize'"
+ Kontext "TableObjectBar"
+ try
+ Optimieren.TearOff
+ catch
+ Warnlog "Unable to Tear Off Toolbox 'Optimize'"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Call wTypeKeys ("<Mod1 a>")
+ Sleep 1
+
+ Kontext "OptimizeTablebar"
+ printlog " Click 'Space Columns Equally'"
+ SpaltenGleichmaessig.Click
+ printlog " Click 'Space Rows Equally'"
+ ZeilenGleichmaessig.Click
+ Sleep 2
+ printlog " Click 'Optimal Row Height'"
+ OptimaleZeilenhoehe.Click
+
+ Call wTypeKeys ("Optimize Table")
+ printlog " Enter some text"
+ Sleep 1
+ Kontext "OptimizeTablebar"
+ printlog " Click 'Optimal Column Width'"
+ OptimaleSpaltenbreite.Click
+ Sleep 1
+ printlog " Close toolbar 'Optimize'"
+ OptimizeTablebar.Close
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tInsertCellRow
+ printlog "- Table-Objectbar: Insert Cell"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert Table"
+ Call hTabelleEinfuegen
+ Call hToolbarSelect ( "Table", true )
+ if TableObjectbar.IsVisible = true then
+ ZeileEinfuegen.Click
+ else
+ Warnlog "TableObjectbar is not visible!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog " Click 'Insert Column' in object bar"
+ Sleep 1
+ printlog "- Table-Objectbar: Insert Row"
+ printlog " Click 'Insert Row' in object bar"
+ SpalteEinfuegen.Click
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tDeleteRow
+ printlog "- Table-Objectbar: Delete Row"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ Call hToolbarSelect ( "Table", true )
+ printlog " Click 'Delete Row'"
+ if TableObjectbar.IsVisible = true then
+ ZeileLoeschen.Click
+ else
+ Warnlog "TableObjectbar is not visible!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Sleep 1
+ printlog " Click 'Delete Row'"
+ ZeileLoeschen.Click
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tDeleteColumn
+ dim i as Integer
+ printlog "- Table-Objectbar: Delete Column"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert a table"
+ Call hTabelleEinfuegen
+ printlog " Click 'Delete Column' 2 times"
+ for i=1 to 2
+ Call hToolbarSelect ( "Table", true )
+ if TableObjectbar.IsVisible = true then
+ SpalteLoeschen.Click
+ else
+ Warnlog "TableObjectbar is not visible!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ Sleep 1
+ next i
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tGraphicWrap
+ printlog "- Grafik-(Rahmen)-Objectbar: Wrap"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ Call hToolbarSelect("Frame", true)
+ try
+ printlog " Check 'Wrap Off' in object bar"
+ NoWrap.Click
+ Sleep 1
+ catch
+ Warnlog "'Wrap Off' in Objectbar couldn't be checked"
+ endcatch
+
+ if gApplication <> "HTML" then
+ try
+ printlog " Check 'Wrap through' in object bar"
+ Durchlauf.Click
+ Sleep 1
+ catch
+ Warnlog "'Wrap through' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Check 'Wrap On' in object bar"
+ Wrap.Click
+ Sleep 1
+ catch
+ Warnlog "'Wrap on' in Objectbar couldn't be checked"
+ endcatch
+ else
+ Call hToolbarSelect("Picture", true)
+ try
+ printlog " Check 'Wrap Left' in object bar"
+ WrapLeft.Click
+ Sleep 1
+ catch
+ Warnlog "'Wrap Left' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Check 'Wrap Right' in object bar"
+ WrapRight.Click
+ Sleep 1
+ catch
+ Warnlog "'Wrap Right' in Objectbar couldn't be checked"
+ endcatch
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tGraphicAlign
+ printlog "- Graphic-(Frame)-Objectbar: Align"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ Call hToolbarSelect("Frame", true)
+ try
+ printlog " Click 'Left' in object bar"
+ Links.Click
+ Sleep 1
+ catch
+ Warnlog "'Left' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Click 'Right' in object bar"
+ Rechts.Click
+ Sleep 1
+ catch
+ Warnlog "'Right' in Objectbar couldn't be checked"
+ endcatch
+
+ ' Only Left and Right in WriterWeb
+ if gApplication = "HTML" then
+ printlog " Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ try
+ printlog " Click 'Centered' in object bar (Not WriterWeb)"
+ Zentriert.Click
+ Sleep 1
+ catch
+ Warnlog "'Centered' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Click 'Center' in object bar (Not WriterWeb)"
+ Mitte.Click
+ Sleep 1
+ catch
+ Warnlog "'Center' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Click 'Top' in object bar (Not WriterWeb)"
+ Oben.Click
+ Sleep 1
+ catch
+ Warnlog "'Top' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Click 'Bottom' in object bar (Not WriterWeb)"
+ Unten.Click
+ Sleep 1
+ catch
+ Warnlog "'Bottom' auf Objectbar couldn't be checked"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tGraphicFlip
+ printlog "- Graphic-(Frame)-Objectbar: Flip"
+ if gApplication = "HTML" then
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ Call hToolbarSelect("Picture", true)
+ try
+ printlog " Click 'Flip Horizontal' in object bar"
+ HorizontalSpiegeln.Click
+ Sleep 1
+ catch
+ Warnlog "'Flip Horizontal' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Click 'Flip Vertical' in object bar"
+ VertikalSpiegeln.Click
+ Sleep 1
+ catch
+ Warnlog "'Flip vertical' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Click 'Flip Horizontal' in object bar"
+ HorizontalSpiegeln.Click
+ Sleep 1
+ printlog " Click 'Flip Vertical' in object bar"
+ VertikalSpiegeln.Click
+ Sleep 1
+ catch
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tGraphicArrange
+ printlog "- Graphic-(Frame)-Objectbar: Arrange"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ Call hToolbarSelect("Frame", true)
+ try
+ printlog " Click 'Send to back' in object bar"
+ GanzNachHinten.Click
+ Sleep 1
+ catch
+ Warnlog "'Send to back' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Click 'Bring to front' in object bar"
+ GanzNachVorn.Click
+ Sleep 1
+ catch
+ Warnlog "'Bring to front' in Objectbar couldn't be checked"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tGraphicBorders
+ printlog "- Graphic-(Frame)-Objectbar: Border"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ Call hToolbarSelect("Frame", true)
+ try
+ printlog " Tear off Toolbox Border"
+ Umrandung.TearOff
+ Sleep 1
+ Kontext "TB_Umrandung"
+ TB_Umrandung.Move ( 20, 20 )
+ printlog " Close toolbox"
+ TB_Umrandung.Close
+ Sleep 1
+ catch
+ Warnlog "Error in Toolbox Border"
+ endcatch
+
+ try
+ Kontext "FrameObjectbar"
+ printlog " Tear off toolbox 'Borderstyle'"
+ Linienstil.TearOff
+ Sleep 1
+ Kontext "TB_Umrandungsstil"
+ TB_Umrandungsstil.Move ( 20, 20 )
+ printlog " Close toolbox"
+ TB_Umrandungsstil.Close
+ Sleep 1
+ catch
+ Warnlog "Error in Toolbox Borderstyle"
+ endcatch
+
+ try
+ Kontext "FrameObjectbar"
+ printlog " Tear off Toolbox 'Color'"
+ LinienFarbe.TearOff
+ Sleep 1
+ Kontext "TB_Farbe"
+ TB_Farbe.Move ( 20, 20 )
+ TB_Farbe.Close
+ printlog " Close toolbox"
+ Sleep 1
+ catch
+ warnlog "Error in Toolbox Colour"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tGraphicProperties
+ printlog "- Graphic-(Frame)-Objectbar: Properties"
+ Dim j as integer
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ Call hToolbarSelect("Picture", true)
+ try
+ printlog " Click 'Graphic Properties' in object bar"
+ InsertGraphic.Click
+ catch
+ Warnlog "Error in Objectproperties in Objectbar"
+ printlog " Close active document"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ printlog " In 'Graphic' dialog step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest ( TabHyperlinkRahmen )
+
+ Kontext
+ active.SetPage TabGrafik
+ Kontext "TabGrafik"
+ Call DialogTest ( TabGrafik )
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabMakro
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "TabMakro"
+ Call DialogTest ( TabMakro )
+
+ printlog " Close 'Graphic' dialog"
+ if gApplication <> "HTML" then
+ Kontext
+ active.SetPage TabHintergrund
+ Kontext "TabHintergrund"
+ Call DialogTest ( TabHintergrund )
+
+ Kontext
+ active.SetPage TabZuschneiden
+ Kontext "TabZuschneiden"
+ Call DialogTest ( TabZuschneiden )
+ TabZuschneiden.Cancel
+ else
+ TabMakro.Cancel
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tGraphicAnchor
+
+ printlog "- Graphic-(Frame)-Objectbar: Anchor"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ Call hToolbarSelect("Frame", true)
+ Sleep 2
+ printlog " Select Anchor 'to page'"
+ try
+ VerankerungWechseln.Click
+ printlog " Click 'Change Anchor' in object bar"
+ catch
+ Warnlog "Error on anchoring objects"
+ Call hCloseDocument
+ printlog " Close active document"
+ goto endsub
+ endcatch
+ Sleep 1
+ MenuSelect ( MenuGetItemID (1) )
+ Sleep 1
+ printlog " Select Anchor 'Paragraph'"
+ Kontext "FrameObjectbar"
+ VerankerungWechseln.Click
+ MenuSelect ( MenuGetItemID (2) )
+ Sleep 1
+ printlog " Select Anchor 'To Character'"
+ Kontext "FrameObjectbar"
+ VerankerungWechseln.Click
+ MenuSelect ( MenuGetItemID (3) )
+ Sleep 1
+ printlog " Select Anchor 'As Character'"
+ Kontext "FrameObjectbar"
+ VerankerungWechseln.Click
+ MenuSelect ( MenuGetItemID (4) )
+ Sleep 1
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormulaCancel
+ printlog "- Formula Writer: Cancel"
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Press <F2>"
+ Call wTypeKeys ("<F2>")
+
+ printlog " enter a formula"
+ Kontext "OL_SW_Rechenleiste"
+ Eingabefeld.TypeKeys "=summe(a+b)"
+ printlog " Click 'Cancel' in formula bar"
+ Verwerfen.Click
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFormulaApply
+ printlog "- Formula Writer: Apply"
+ Call hNewDocument
+ printlog " Open new document"
+ Call hTabelleEinfuegen
+ printlog " Insert a table"
+ Call wTypeKeys ("12<Right>13<Down>")
+ printlog " Write in document 12<Cursor Right>13<Cursor Down>"
+ Call hToolbarSelect ( "Table", true )
+ printlog " Click 'Sum' in object bar"
+ if TableObjectbar.IsVisible = true then
+ FormelEingeben.Click
+ else
+ Warnlog "TableObjectbar is not visible!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Kontext "OL_SW_Rechenleiste"
+ Eingabefeld.TypeKeys "(" + Chr(60)+ "A1:B1"
+ Eingabefeld.TypeKeys Chr(62) + ")"
+ printlog " Enter as formula (A1:B1) and click 'Apply'"
+ Uebernehmen.Click
+ Sleep 2
+ printlog " Check result of formula"
+ Call wTypeKeys ("<Mod1 A>")
+ EditCopy
+ if GetClipboardText <> "25" then
+ warnlog "Not possible to calculate in tables anymore. Result isn't 25, is: " + GetClipboardText
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocGraphicWrap
+ printlog "- Grafik-(Rahmen)-Objectbar: Wrap"
+ gApplication = "HTML"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hToolbarSelect("Frame", true)
+ try
+ printlog " Check 'Wrap Off' in object bar"
+ NoWrap.Click
+ Sleep 1
+ catch
+ Warnlog "'Wrap Off' in Objectbar couldn't be checked"
+ endcatch
+
+ Call hToolbarSelect("Picture", true)
+ try
+ WrapLeft.Click
+ printlog " Check 'Wrap Left' in object bar"
+ Sleep 1
+ catch
+ Warnlog "'Wrap Left' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ printlog " Check 'Wrap Right' in object bar"
+ WrapRight.Click
+ Sleep 1
+ catch
+ Warnlog "'Wrap Right' in Objectbar couldn't be checked"
+ endcatch
+
+ Call hCloseDocument
+ printlog " Close active document"
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocGraphicAlign
+ printlog "- Graphic-(Frame)-Objectbar: Align"
+ gApplication = "HTML"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ Call hToolbarSelect("Frame", true)
+ try
+ Links.Click
+ printlog " Click 'Left' in object bar"
+ Sleep 1
+ catch
+ Warnlog "'Left' in Objectbar couldn't be checked"
+ endcatch
+
+ try
+ Rechts.Click
+ printlog " Click 'Right' in object bar"
+ Sleep 1
+ catch
+ Warnlog "'Right' in Objectbar couldn't be checked"
+ endcatch
+
+ ' Only Left and Right in WriterWeb
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDocGraphicProperties
+ printlog "- Graphic-(Frame)-Objectbar: Properties"
+ Dim j as integer
+
+ gApplication = "HTML"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Insert graphic 'writer/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+ Call hToolbarSelect("Picture", true)
+ try
+ printlog " Click 'Graphic Properties' in object bar"
+ InsertGraphic.Click
+ catch
+ Warnlog "Error in Objectproperties in Objectbar"
+ printlog " Close active document"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ printlog " In 'Graphic' dialog step through all tabpages"
+ Kontext
+ active.SetPage TabType
+ Kontext "TabType"
+ Call DialogTest ( TabType )
+
+ Kontext
+ active.SetPage TabZusaetze
+ Kontext "TabZusaetze"
+ Call DialogTest ( TabZusaetze )
+
+ Kontext
+ active.SetPage TabUmlauf
+ Kontext "TabUmlauf"
+ Call DialogTest ( TabUmlauf )
+
+ Kontext
+ active.SetPage TabHyperlinkRahmen
+ Kontext "TabHyperlinkRahmen"
+ Call DialogTest ( TabHyperlinkRahmen )
+
+ Kontext
+ active.SetPage TabGrafik
+ Kontext "TabGrafik"
+ Call DialogTest ( TabGrafik )
+
+ Kontext
+ active.SetPage TabUmrandung
+ Kontext "TabUmrandung"
+ Call DialogTest ( TabUmrandung )
+
+ Kontext
+ active.SetPage TabMakro
+ ' if no JRE is installed a messagebox appears
+ Do
+ j = j + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if j = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "TabMakro"
+ Call DialogTest ( TabMakro )
+ printlog " Close dialog"
+ TabMakro.Cancel
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/includes/w_011_.inc b/testautomation/writer/required/includes/w_011_.inc
new file mode 100755
index 000000000000..61a20821349f
--- /dev/null
+++ b/testautomation/writer/required/includes/w_011_.inc
@@ -0,0 +1,787 @@
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description: Testcases for the Toolbar.
+'*
+'\******************************************************************
+
+sub w_011_
+
+ printLog Chr(13) + "--------- Toolbar ( w_011_.inc ) ----------"
+ gApplication = "WRITER"
+ 'Objektleiste Grafik
+ Call tGraphicFilters
+
+ 'Objektleiste Zeichenobjekt
+ Call tZOEditPoints
+ Call tZOLine
+ Call tZOArea
+ Call tZORest
+ Call tZOText
+ Call tZOVerticalText
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tGraphicFilters
+ printlog "- Objectbar Graphic (Filters)"
+ if gApplication = "HTML" then
+ printlog "This test applies not to HTML-Document"
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog "Open new document"
+ Call hNewDocument
+ printlog "Insert graphic '/writer/required/input/grafik/jolink.jpg'"
+ Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" )
+
+ printlog "- Select all Filters"
+ Kontext "GraphicObjectbar"
+ printlog "In graphic toolbox taer off 'Filter' Toolbox"
+ if Not GraphicObjectbar.Exists then hToolbarSelect ( "Picture", true )
+ try
+ Filter.TearOff
+ catch
+ Warnlog "Unable to tear off 'Filter'-Toolbar"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ Kontext "GraphicFilterBar"
+ try
+ GraphicFilterBar.Move ( 20, 20 )
+ catch
+ Warnlog "Unable to move toolbar"
+ endcatch
+
+ printlog "- Invert"
+ printlog "Select 'Invert'"
+ if Invert.IsEnabled then
+ Invert.Click
+ else
+ Warnlog "- 'Invert' is disabled !"
+ end if
+
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "Click 'Smooth'"
+ printlog "- Smooth"
+ if Smooth.IsEnabled then
+ Smooth.Click
+ else
+ Warnlog "- 'Smooth' is disabled!"
+ end if
+
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Sharpen"
+ printlog "Click 'Sharpen'"
+ if Sharpen.IsEnabled then
+ Sharpen.Click
+ else
+ Warnlog "- 'Sharpen' is disabled!"
+ end if
+
+ UseBindings
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Remove Noise"
+ printlog "Click 'Remove Noise'"
+ if Remove.IsEnabled then
+ Remove.Click
+ else
+ Warnlog "- 'Remove Noise' is disabled!"
+ end if
+ sleep (1)
+
+ if ( CheckForFilters=False ) then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Solarization"
+ printlog "Click 'Solarization'"
+ if Solarization.IsEnabled then
+ Solarization.Click
+ Kontext "Solarization"
+ printlog "Cancel upcoming 'Solarization' dialog"
+ if Solarization.Exists then
+ Call Dialogtest( Solarization )
+ Solarization.Cancel
+ else
+ Warnlog "- Dialog 'Solarisation' has not been opened! Try a second time!"
+ Kontext "GraphicFilterBar"
+ if Solarization.IsEnabled then
+ Solarization.Click
+ Kontext "Solarization"
+ if Solarization.Exists then
+ Call Dialogtest( Solarization )
+ Solarization.Cancel
+ else
+ Warnlog "- Dialog 'Solarisation' has not been opened!"
+ end if
+ end if
+ end if
+ else
+ Warnlog "- 'Solarization' is disabled!"
+ end if
+
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Aging"
+ printlog "Click 'Aging'"
+ if Aging.IsEnabled then
+ Aging.Click
+ printlog "Cancel upcoming 'Aging' dialog"
+ Kontext "Aging"
+ if Aging.Exists then
+ Call Dialogtest( Aging )
+ Aging.Cancel
+ else
+ Warnlog "- Dialog 'Aging' has not been opened! Try a second time!"
+ Kontext "GraphicFilterBar"
+ if Aging.IsEnabled then
+ Aging.Click
+ Kontext "Aging"
+ if Aging.Exists then
+ Call Dialogtest( Aging )
+ Aging.Cancel
+ else
+ Warnlog "- Dialog 'Aging' has not been opened!"
+ end if
+ end if
+ end if
+ else
+ Warnlog "- 'Aging' is disabled!"
+ end if
+
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Posterize"
+ printlog "Click 'Posterize'"
+ if Posterize.IsEnabled then
+ Posterize.Click
+ printlog "Cancel upcoming 'Posterize' dialog"
+ Kontext "Posterize"
+ if Posterize.Exists then
+ Call Dialogtest( Posterize )
+ Posterize.Cancel
+ else
+ Warnlog "- Dialog 'Posterize' has not been opened! Try a second time!"
+ Kontext "GraphicFilterBar"
+ if Posterize.IsEnabled then
+ Posterize.Click
+ Kontext "Posterize"
+ if Posterize.Exists then
+ Call Dialogtest( Posterize )
+ Posterize.Cancel
+ else
+ Warnlog "- Dialog 'Posterize' has not been opened!"
+ end if
+ end if
+ end if
+ else
+ Warnlog "- 'Posterize' is disabled!"
+ end if
+
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "Click 'Pop Art'"
+ printlog "- Pop Art"
+ if Art.IsEnabled then
+ Art.Click
+ else
+ Warnlog "- 'Pop Art' is disabled!"
+ end if
+
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Charcoal Sketch"
+ printlog "Click 'Charcoal Sketch'"
+ if CharcoalSketch.IsEnabled then
+ CharcoalSketch.Click
+ else
+ Warnlog "- 'Charcoal Sketch' is disabled!"
+ end if
+
+ if CheckForFilters=False then
+ printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Relief"
+ printlog "Click 'Relief'"
+ if Relief.IsEnabled then
+ Relief.Click
+ Kontext "Relief"
+ if Relief.Exists then
+ Call Dialogtest( Relief )
+ Relief.Cancel
+ else
+ printlog "Cancel upcoming 'relief' dialog"
+ Warnlog "- Dialog 'Relief' has not been opened! Try a second time!"
+ Kontext "GraphicFilterBar"
+ if Relief.IsEnabled then
+ Relief.Click
+ Kontext "Relief"
+ if Relief.Exists then
+ Call Dialogtest( Relief )
+ Relief.Cancel
+ else
+ Warnlog "- Dialog 'Relief' has not been opened!"
+ end if
+ end if
+ end if
+ else
+ Warnlog "- 'Relief' is disabled!"
+ end if
+
+ if CheckForFilters=False then
+ Printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog "- Mosaic"
+ Printlog "Clock 'Mosaic'"
+ if Mosaic.IsEnabled then
+ Mosaic.Click
+ Kontext "Mosaic"
+ Printlog "Cancel upcoming 'Mosaic' dialog"
+ if Mosaic.Exists then
+ Call Dialogtest( Mosaic )
+ Mosaic.Cancel
+ else
+ Warnlog "- Dialog 'Mosaic' has not been opened!"
+ end if
+ else
+ Warnlog "- 'Mosaic' is disabled!"
+ end if
+
+ Printlog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tZOEditPoints
+ printlog "- Draw Functions-Objectbar: Edit Points"
+ if gApplication = "HTML" then
+ Printlog "This test does not apply to HTML documents"
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ Printlog "Open new document"
+ Call hNewDocument
+ Printlog "Insert a drawing object (rectangle)"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
+ Printlog "Select drawing object with shortcut 'Shift F4'"
+ Call wTypeKeys ( "<Shift F4>" )
+
+ Kontext "Drawbar"
+ if Not Drawbar.Exists then Call hToolbarSelect("Drawing", true)
+
+ Sleep 1
+ Printlog "In Toolbox click 'Edit Points'"
+ try
+ Points.Click
+ catch
+ Warnlog "#i56594#Shortcut selecting objects doesn't work"
+ Printlog "Close active document"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Sleep 1
+ Printlog "Click 'Edit Points' in toolbox again"
+ Points.Click
+ Printlog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tZOLine
+ printlog "- Draw Functions-Objectbar: all within Line"
+ if gApplication = "HTML" then
+ Printlog "This test does not apply to HTML documents"
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+ printlog "Open new document"
+ Call hNewDocument
+
+ printlog "Insert a drawing object ( rectangle )"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
+ Call gMouseClick ( 25, 25 )
+ printlog "Select drawing object with shortcut 'Shift F4'"
+ Call wTypeKeys ( "<Shift F4>" )
+
+ Kontext "DrawingObjectbar"
+ if Not DrawingObjectbar.Exists then hToolbarSelect("GRAPHIC", true)
+
+ printlog " - Line-Tabdialog"
+ wait 500
+ try
+ Linie.Click
+ printlog "In Toolbox click 'Line'"
+ catch
+ Warnlog "#i56594#Shortcut selecting objects doesn't work"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Kontext
+ printlog "Step through all tabpages in upcoming dialog"
+ wait 500
+ Active.SetPage TabLinie
+ Kontext "TabLinie"
+ TabLinie.OK
+ Kontext "DrawingObjectbar"
+ if Not DrawingObjectbar.Exists then hToolbarSelect("GRAPHIC", true)
+
+ printlog " - Arrow Styles"
+ Linienendenstil.TearOff
+ Kontext "Linienenden"
+ Call Dialogtest(Linienenden)
+ printlog "Close dialog"
+ Linienenden.Close
+
+ Sleep 1
+ printlog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tZOArea
+ printlog "- Draw Functions-Objectbar: all within rectangle"
+ if gApplication = "HTML" then
+ printlog "This test applies not to HTML document"
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog "Open new document"
+ Call hNewDocument
+ printlog "Insert a draw object ( rectangle )"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
+ ' Set focus to document
+ Call gMouseMove2 ( 50, 25 )
+ Call gMouseClick ( 50, 25 )
+ printlog "Select drawing object with shortcut 'Shift F4'"
+ Call wTypeKeys ( "<Shift F4>" )
+
+ Kontext "DrawingObjectbar"
+ if Not DrawingObjectbar.Exists then hToolbarSelect("GRAPHIC", true)
+ printlog " - Rectangle-Tabdialog"
+ wait 500
+ try
+ printlog "In toolbox click 'Area'"
+ Flaeche.Click
+ catch
+ Warnlog "#i56594#Shortcut selecting objects doesn't work"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ printlog "Close upcoming dialog"
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ TabArea.OK
+
+ printlog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tZORest
+
+ printlog "- Draw Functions-Objectbar: Rest"
+ if gApplication = "HTML" then
+ printlog "This test does not apply to HTML documents"
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog "Open new document"
+ Call hNewDocument
+ printlog "Insert a draw object ( rectangle )"
+ Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
+ ' Set focus to document
+ Call gMouseMove2 ( 50, 25 )
+ Call gMouseClick ( 50, 25 )
+ printlog "Select drawing object with shortcut 'Shift F4'"
+ Call wTypeKeys ( "<Shift F4>" )
+
+ printlog " - Object rotation mode"
+ Sleep 2
+ try
+ printlog "Intoolbox click 'Object rotation mode'"
+ Kontext "DrawingObjectbar"
+ Drehen.Click
+ wait 500
+ catch
+ Warnlog "Shortcut selecting objects doesn't work"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ printlog " - Change Anchor"
+ printlog "Click 'Change Anchor' in Toolbox and select 1st entry in anchor list"
+ VerankerungWechseln.Click
+ Sleep 1
+ Call hMenuSelectNr (1)
+ wait 500
+
+ VerankerungWechseln.Click
+ printlog "Click 'Change Anchor' in Toolbox and select 2nd entry in anchor list"
+ Sleep 1
+ Call hMenuSelectNr (2)
+ wait 500
+
+ VerankerungWechseln.Click
+ Sleep 1
+ printlog "Click 'Change Anchor' in Toolbox and select 3rd entry in anchor list"
+ Call hMenuSelectNr (3)
+ wait 500
+
+ printlog " - To Background"
+ printlog "Click 'To Background' in toolbox"
+ InDenHintergrund.Click
+ Sleep 2
+ printlog " - To Foreground"
+ printlog "Click 'To Foreground' in toolbox"
+ InDenVordergrund.Click
+
+ printlog " - Send to back"
+ printlog "Click 'Send To back' in toolbox"
+ GanzNachHinten.Click
+
+ printlog " - Bring to Front"
+ printlog "Click 'To Background' in toolbox"
+ GanzNachVorn.Click
+
+ printlog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tZOText
+ printlog "- Draw Functions-Objectbar: Text"
+ if gApplication = "HTML" then
+ printlog "This test does not apply to HTML documents"
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog "Open new document"
+ Call hNewDocument
+
+ Call wZeichenobjektEinfuegen ( "Text", 30, 30, 50, 60 )
+ printlog "Insert draw object ( Text )"
+ printlog "Insert some text to textbox"
+ Call wTypeKeys ("Draw Functions-Objectbar: Text")
+ printlog "Select the text in textbox with <Strg A>"
+ Call wTypeKeys ("<Mod1 A>", 3)
+ Sleep 4
+
+ Kontext "DrawTextObjectBar"
+ if DrawTextObjectBar.Exists = false then
+ Call hToolbarSelect("TextObject", true)
+ end if
+
+ printlog " - Font Size"
+ printlog "For font size select 9th entry"
+ try
+ Schriftgroesse.Select 9
+ Schriftgroesse.TypeKeys "<Return>"
+ catch
+ Warnlog "Unable to change font size"
+ endcatch
+ Wait 500
+
+ printlog " - Font"
+ printlog "In object bar select 6th entry in combobox 'Font'"
+ try
+ Schriftart.Select 6
+ catch
+ Warnlog "Unable to select font in object bar"
+ endcatch
+ Schriftart.TypeKeys "<Return>"
+ Wait 500
+
+ printlog " - Bold"
+ printlog "Click 'Bold' in object bar"
+ Fett.Click
+ Wait 500
+
+ printlog " - Italic"
+ printlog "Click 'Italic' in object bar"
+ Kursiv.Click
+ Wait 500
+
+ printlog " - Underline"
+ printlog "Click 'Underline' in object bar"
+ Unterstrichen.Click
+ Wait 500
+
+ printlog " - Align Left"
+ printlog "Click Align left in object bar"
+ Linksbuendig.Click
+ Wait 500
+
+ printlog " - Align Right"
+ printlog "Click 'Align right' in object bar"
+ Rechtsbuendig.Click
+ Wait 500
+
+ printlog " - Centered"
+ printlog "Click 'Centered' in object bar"
+ Zentriert.Click
+ Wait 500
+
+ printlog " - Justify"
+ printlog "Click 'Justify' in object bar"
+ Blocksatz.Click
+ Wait 500
+
+ printlog " - Superscript"
+ printlog "Click 'Superscript' in object bar"
+ try
+ Hochgestellt.Click
+ Wait 500
+ catch
+ Warnlog "- Superscript is probably faded out!"
+ endcatch
+
+ printlog " - Subscript"
+ try
+ printlog "Click 'Subscript' in object bar"
+ Tiefgestellt.Click
+ Wait 500
+ catch
+ Warnlog "- Subscript is probably faded out!"
+ endcatch
+
+ printlog " - Font attributes"
+ try
+ printlog "Click 'Font attributes' in object bar"
+ Zeichenformat.Click
+ wait 500
+ printlog "Close upcoming dialog"
+ Kontext
+ Active.Setpage TabFont
+ Kontext "TabFont"
+ TabFont.OK
+ Sleep 2
+ Kontext "TextObjectbar"
+ catch
+ Warnlog "- Font attributes is probably faded out!"
+ endcatch
+
+ printlog " - Format:Paragraph"
+ Sleep 3
+ try
+ printlog "Click Format:Paragraph in object bar"
+ Absatzformat.Click
+ wait 500
+ printlog "Close upcoming dialog"
+ Kontext
+ Active.Setpage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ TabEinzuegeUndAbstaende.OK
+ Sleep 2
+ catch
+ Warnlog "- Format:Paragraph is probably faded out!"
+ endcatch
+
+ printlog "Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tZOVerticalText
+ printlog "- Draw Functions-Objectbar: Vertical Text"
+ if gAsianSup = False then goto endsub
+ if gApplication = "HTML" then
+ printlog "This test applies not to HTML document and only if Asian Support is enabled"
+ Printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog "Open new document"
+ Call hNewDocument
+
+ printlog "Insert Draw object ( 'vertical Text' )"
+ Call wZeichenobjektEinfuegen ( "VText", 30, 30, 50, 60 )
+ printlog "Insert some text in textbox and select it"
+ Call wTypeKeys ("Checking vertical text")
+ Call wTypeKeys ("<Shift Home>")
+ Sleep 4
+
+ printlog "In object bar select 6th entry in combobox 'Font'"
+ Call hToolbarSelect ( "Textobject", true )
+ printlog " - Font"
+ Schriftart.Select 6
+ Schriftart.TypeKeys "<Return>"
+ Wait 500
+
+ printlog " - Font Size"
+ printlog "For font size select 9th entry"
+ Schriftgroesse.Select 9
+ Schriftgroesse.TypeKeys "<Return>"
+ Wait 500
+
+ printlog " - Bold"
+ printlog "Click 'Bold' in object bar"
+ Fett.Click
+ Wait 500
+
+ printlog " - Italic"
+ printlog "Click 'Italic' in object bar"
+ Kursiv.Click
+ Wait 500
+
+ printlog " - Underline"
+ printlog "Click 'Underline' in object bar"
+ Unterstrichen.Click
+ Wait 500
+
+ printlog " - Align Left"
+ printlog "Click 'Align left' in object bar"
+ Linksbuendig.Click
+ Wait 500
+
+ printlog " - Align Right"
+ printlog "Click 'Align Right' in object bar"
+ Rechtsbuendig.Click
+ Wait 500
+
+ printlog " - Centered"
+ printlog "Click 'Centered' in object bar"
+ Zentriert.Click
+ Wait 500
+
+ printlog " - Justify"
+ printlog "Click 'Justify' in object bar"
+ Blocksatz.Click
+ Wait 500
+
+ printlog " - Superscript"
+ try
+ printlog "Click 'Superscript' in object bar"
+ Hochgestellt.Click
+ Wait 500
+ catch
+ Warnlog "- Superscript is probably faded out!"
+ endcatch
+
+ printlog " - Subscript"
+ try
+ printlog "Click 'Subscript' in object bar"
+ Tiefgestellt.Click
+ Wait 500
+ catch
+ Warnlog "- Subscript is probably faded out!"
+ endcatch
+
+ printlog " - Font attributes"
+ try
+ printlog "Click 'Font attributes' in object bar"
+ Zeichenformat.Click
+ wait 500
+ Kontext
+ Active.Setpage TabFont
+ Kontext "TabFont"
+ TabFont.OK
+ Sleep 2
+ Kontext "TextObjectbar"
+ catch
+ Warnlog "- Font attributes is probably faded out!"
+ endcatch
+
+ printlog " - Format:Paragraph"
+ Sleep 3
+
+ try
+ printlog "Click 'Textdirection:Left To Right' in Objectbar"
+ TextdirectionLeftToRight.Click
+ wait 500
+ catch
+ Warnlog "Textdirection Left To Right probably faded out!"
+ endcatch
+
+ try
+ printlog "Click 'Textdirection:Top to Bottom' in Objectbar"
+ TextdirectionTopToBottom.Click
+ wait 500
+ catch
+ Warnlog "Textdirection Top to Bottom probably faded out!"
+ endcatch
+
+ try
+ printlog "Click 'Format: Paragraph' in object bar."
+ Absatzformat.Click
+ wait 500
+ printlog "Close upcoming dialog"
+ Kontext
+ Active.Setpage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ TabEinzuegeUndAbstaende.OK
+ Sleep 2
+ catch
+ Warnlog "- Format:Paragraph is probably faded out!"
+ endcatch
+
+ printlog "Close active document"
+ Call hCloseDocument
+endcase
diff --git a/testautomation/writer/required/includes/w_020_.inc b/testautomation/writer/required/includes/w_020_.inc
new file mode 100644
index 000000000000..f927d24952f7
--- /dev/null
+++ b/testautomation/writer/required/includes/w_020_.inc
@@ -0,0 +1,964 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description: Testcases for Toolbars.
+'*
+'\******************************************************************
+
+sub w_020_
+
+ printLog Chr(13) + "--------- Toolbars (w_020_.inc) ----------"
+
+ 'Toolbar
+ Call t_TB_Insert
+ Call t_TB_InsertFields
+ Call t_TB_ShowDrawFunctions
+ Call t_TB_Form
+ Call t_TB_EditAutotext
+ Call t_TB_Graphics
+ Call t_TB_DirektCursor
+ Call t_TB_Find
+ Call t_TB_Rest
+
+ 'Writer Web
+ gApplication = "HTML"
+ Call tHtmlDoc_TB_Insert
+ Call tHtmlDoc_TB_InsertFields
+ Call tHtmlDoc_TB_Form
+ Call tHtmlDoc_TB_Rest
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase t_TB_Insert
+ qaErrorLog "#158646# - Inserting Indexes causes crash."
+ goto endsub
+
+ printlog "- Toolbox ( normal ) : All within Insert"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog "- TearOff Insert-Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+
+ if gApplication <> "HTML" then
+ Kontext "Insertbar"
+ printlog " - Frame"
+ printlog " Click 'Frame' and Insert a Frame"
+ Rahmen.Click
+ Call gMouseMove(40, 40, 60, 60)
+ Call wTypeKeys ("<Delete>")
+ printlog " Hit 'Delete' to remove the frame"
+ end if
+
+ printlog " - Graphic"
+ Kontext "Insertbar"
+ if ( Insertbar.Exists ) then
+ ' all good
+ else
+ Call hToolbarSelect("Insert", true)
+ endif
+ wait 500
+
+ printlog " Click 'Insert Graphics' in Toolbox"
+ if Grafik.IsEnabled then
+ Grafik.Click
+ Kontext "GrafikEinfuegenDlg"
+ if GrafikEinfuegenDlg.Exists then
+ printlog " Select graphic from file '..\writer\required\input\graphics\jolink.jpg'"
+ Dateiname.SetText ( ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) )
+ Oeffnen.Click
+ else
+ Warnlog "Dialog 'Insert Graphic' not up!"
+ end if
+
+ Kontext "Active"
+ if Active.Exists( 1 ) then
+ Warnlog Active.Gettext
+ Active.Ok
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+ end if
+ printlog " Hit 'Delete' to remove graphic"
+ Call wTypeKeys ("<Delete>")
+ else
+ Warnlog "Button 'Graphic' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Table"
+ printlog " Click 'Insert Table' in Toolbox"
+ Kontext "Insertbar"
+ if ( Insertbar.Exists() ) then
+ ' No action required
+ else
+ Call hToolbarSelect("Insert", true)
+ endif
+
+ if Tabelle.IsEnabled then
+ Tabelle.Click
+ Kontext "TabelleEinfuegenWriter"
+ TabelleEinfuegenWriter.OK
+ printlog " Move cursor under table"
+ Call wTypeKeys ("<Down>",2)
+ else
+ Warnlog "Button 'Table' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Document"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+
+ if gApplication <> "HTML" then
+ printlog " - Footnote"
+ printlog " Click 'Insert Footnote Directly' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Fussnote.IsEnabled then
+ Fussnote.Click
+ Call wTypeKeys ("<PageUp>")
+ else
+ Warnlog "Button 'Footnote' on Insertbar is not enabled!"
+ end if
+
+ Sleep 2
+ printlog " - Endnote"
+ printlog " Click 'Insert Endnote Directly' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Endnote.IsEnabled then
+ Endnote.Click
+ Call wTypeKeys ("<PageUp>")
+ else
+ Warnlog "Button 'Endnote' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Index Marker"
+ Call wTypeKeys ("Index Marker <Shift Home>")
+ printlog " Click 'Insert Index Marker' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Verzeichnis.IsEnabled then
+ Verzeichnis.Click
+ printlog " Close upcoming 'Insert Index Entry' dialog"
+ Kontext "VerzeichniseintragEinfuegen"
+ VerzeichniseintragEinfuegen.Close
+ else
+ Warnlog "Button 'Index Marker' on Insertbar is not enabled!"
+ end if
+ end if
+
+ printlog " - Special Character"
+ printlog " Click 'Insert Special Character' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Sonderzeichen.IsEnabled then
+ Sonderzeichen.Click
+ printlog " Cancel upcoming 'Special Character' dialog"
+ Kontext "Sonderzeichen"
+ Sonderzeichen.Cancel
+ else
+ Warnlog "Button 'Special Character' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Insert Section"
+ printlog " Click 'Insert Section' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if BereichEinfuegen.IsEnabled then
+ BereichEinfuegen.Click
+ printlog " Close upcoming 'Section' dialog"
+ Kontext
+ Active.Setpage TabBereiche
+ Kontext "TabBereiche"
+ TabBereiche.Ok
+ else
+ Warnlog "Button 'Insert Section' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Bookmark"
+ printlog " Click 'Insert Bookmark' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Textmarke.IsEnabled then
+ Textmarke.Click
+ printlog " Enter a bookmark name and close dialog"
+ Kontext "TextmarkeEinfuegen"
+ Textmarken.SetText "Bookmark"
+ TextmarkeEinfuegen.OK
+ else
+ Warnlog "Button 'Bookmark' on Insertbar is not enabled!"
+ end if
+
+ 'Only with closing the toolbox the dialog is accessible for TT
+ printlog " Close toolbar"
+ Kontext "Insertbar"
+ if Insertbar.Exists then Insertbar.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_InsertFields
+ Dim Ende as Integer
+ Dim i as Integer
+ printlog "- Toolbox ( normal ) : Fields"
+
+ if gPlatgroup = "unx" then
+ QAErrorlog "Doesn't run on unix"
+ goto endsub
+ end if
+ printlog " Open new document"
+ Call hNewDocument
+ printlog "- TearOff Insert Toolbox"
+ printlog " Tear off toolbar and open insert toolbar"
+ printlog " Click 'Insert Fields' in insertbar"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ Sleep 1
+ Feldbefehle.OpenMenu
+ wait 500
+ if gApplication = "HTML" then
+ Call hMenuSelectNr(6)
+ else
+ Call hMenuSelectNr(8)
+ end if
+ Kontext
+ try
+ Active.SetPage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ printlog " Cancel upcoming 'Fields' dialog"
+ TabDokumentFeldbefehle.Cancel
+ catch
+ QAErrorlog "Dialog for Fields is not up !"
+ endcatch
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_ShowDrawFunctions
+ printlog "- Toolbox ( normal ) : Draw Functions"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ ViewZoom
+ Kontext "Massstab"
+ Optimal.Check
+ Massstab.OK
+
+ printlog " Open 'Draw functions' toolbar"
+ Kontext "DrawBar"
+ if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
+ Sleep 5
+
+ printlog " - Draw Line"
+ Kontext "Drawbar"
+ printlog " Draw a Line"
+ try
+ Linie.Click
+ Call gMouseMove(20, 20, 30, 30)
+ Call wTypeKeys ("<Escape>")
+ catch
+ Warnlog " Line could not be created !"
+ endcatch
+
+ printlog " - Draw Rectangle"
+ Kontext "Drawbar"
+ printlog " Draw a Rectangle"
+ Rechteck.Click
+ Call gMouseMove(31, 20, 40, 40)
+ Call wTypeKeys ("<Escape>")
+
+ printlog " - Draw Ellipse"
+ Kontext "Drawbar"
+ printlog " Draw an Ellipse"
+ Ellipse.Click
+ Call gMouseMove(31, 30, 60, 50)
+ Call wTypeKeys ("<Escape>")
+
+ printlog " - Draw Freeform"
+ Kontext "Drawbar"
+ Freihand.Click
+ printlog " Draw a Freeform"
+ Call gMouseMove ( 23, 20, 35, 31 )
+ Call gMouseMove ( 35, 31, 40, 90 )
+ Call gMouseMove ( 41, 91, 55 , 70 )
+ Call gMouseClick( 55, 70 )
+ Call wTypeKeys ("<Escape>")
+
+ printlog " - Draw Textobject"
+ Kontext "Drawbar"
+ printlog " Draw a Textobject"
+ Textobjekt.Click
+ Call gMouseMove ( 17, 17, 28, 25 )
+ Call wTypeKeys ("Textobject")
+ Call gMouseClick ( 50, 99 )
+ Call wTypeKeys ("<Escape>")
+
+ printlog " - Draw Callouts"
+ Kontext "Drawbar"
+ printlog " Draw a Callout"
+ Legende.Click
+ Call gMouseMove (15, 20, 50, 60)
+ Call gMouseClick( 50, 60 )
+ Call wTypeKeys ("<Escape>")
+
+ printlog " Close toolbar 'Draw Functions'"
+ Kontext "Drawbar"
+ Drawbar.Close
+ ViewZoom
+ Kontext "Massstab"
+ Vergroesserung100.Check
+ Massstab.OK
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_Form
+ printlog "- Toolbox ( normal ) : Formular"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ Kontext "FormControls"
+ if ( FormControls.Exists( 1 ) ) then
+ 'do nothing
+ else
+ Call hToolbarSelect("Controls", true)
+ endif
+
+ try
+ printlog " Tear off 'Form' Toolbox"
+ Kontext "FormControls"
+ if Not FormControls.Exists then
+ Warnlog "Toolbar 'FormControls' is not opened!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ wait 500
+ Pushbutton.Click
+ printlog " Insert a pushbutton from toolbox"
+ Call hMalZeichnenMitSelektion ( 35, 20, 30, 25 )
+ Sleep 2
+ Kontext "FormControls"
+ if NOT ControlProperties.IsEnabled then
+ if gPlatform = "osx" then
+ warnlog "#i82427#-Mac OS X (Aqua): Drawing function does not draw anything"
+ else
+ warnlog "Control properties button disabled!"
+ end if
+ else
+ ControlProperties.Click
+ sleep(2)
+ end if
+ printlog "+ Open Control Properties"
+ printlog " - Control Properties"
+ Call sMenufunktionen("-Pushbutton-")
+
+ Kontext "FormControls"
+ wait 500
+ Radiobutton.Click
+ printlog " Insert a Radiobutton from toolbox"
+ Call hMalZeichnenMitSelektion ( 32, 20, 42, 25 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Radiobutton-")
+
+ Kontext "FormControls"
+ wait 500
+ Checkbox.Click
+ printlog " Insert a Checkbox from toolbox"
+ Call hMalZeichnenMitSelektion ( 45, 20, 55, 25 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Checkbox-")
+
+ Kontext "FormControls"
+ if gApplication <> "HTML" then
+ wait 500
+ Label.Click
+ printlog " Insert a textbox from toolbox"
+ Call hMalZeichnenMitSelektion ( 57, 20, 68, 25 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Textbox-")
+ end if
+
+ Sleep 3
+ Kontext "FormControls"
+ printlog " Insert an Edit Field from toolbox"
+ Edit.Click
+ Wait 500
+ Call hMalZeichnenMitSelektion ( 32, 30, 42, 35 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Edit-")
+
+ Kontext "FormControls"
+ Listbox.Click
+ Wait 500
+ printlog " Insert a listbox"
+ Call hMalZeichnenMitSelektion ( 45, 30, 55, 35 )
+ printlog "+ Step through pages of upcoming Autopilot"
+ Call sAutopilot_ListboxCombobox("Listbox")
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Listbox-")
+
+ Kontext "FormControls"
+ if ( gApplication <> "HTML" ) then
+ Combobox.Click
+ printlog " Insert a Combobox from toolbox"
+ Wait 500
+ Call hMalZeichnenMitSelektion ( 57, 30, 68, 35 )
+ printlog "+ Step through pages of upcoming Autopilot"
+ Call sAutopilot_ListboxCombobox("Combo")
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Combobox-")
+ end if
+
+ printlog " Insert a Formatted Field from toolbox"
+ Kontext "FormControls"
+ if ( gApplication <> "HTML" ) then
+ FormattedField.Click
+ Wait 500
+ Call hMalZeichnenMitSelektion ( 45, 50, 55, 55 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Formatted Field-")
+ end if
+ Sleep 3
+ Call gMouseClick ( 40, 80 )
+ Kontext "FormControls"
+ printlog " Click 'Design Mode' in Toolbox"
+ wait 500
+ SwitchControlDesignMode.Click
+ Sleep 1
+ printlog " Click 'Design Mode' in Toolbox"
+ SwitchControlDesignMode.Click
+ printlog " - Design mode"
+ Kontext "FormControls"
+ FormControls.Close
+ catch
+ Exceptlog
+ endcatch
+
+ Call hCloseDocument
+ printlog " Close active document"
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_EditAutotext
+ printlog "- Toolbox ( normal ) : Autotext"
+
+ printlog " Open new document"
+ Call hNewDocument
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ Sleep 2
+ Autotext.Click
+ printlog " Click 'Autotext' in Toolbar"
+
+ Kontext "Active"
+ if ( Active.Exists( 1 ) ) then
+ Active.Gettext
+ Active.Ok
+ end if
+
+ Kontext "Autotext"
+ if ( Autotext.exists( 4 ) ) then
+ printlog " Close upcoming 'Autotext' dialog"
+ Autotext.Close
+ else
+ warnlog( "Dialog <Autotext> is not available" )
+ endif
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_Find
+ printlog "- Toolbox ( normal ) : Find & Replace"
+ printlog " Open new document"
+ Call hNewDocument
+ Kontext "Standardbar"
+ if Not Standardbar.Exists then Call hToolbarSelect("Standard", true)
+ printlog " Click 'Find' in Toolbar"
+ FindAndReplace.Click
+ Kontext "FindAndReplace"
+ printlog " Close 'Find&Replace' dialog"
+ FindAndReplace.Close
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_Graphics
+ printlog "- Toolbox ( normal ) : Graphic"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Insert graphic from file ..\writer\required\input\graphics\jolink.jpg"
+ Call hGrafikEinfuegen ( gTesttoolpath + "writer\required\input\graphics\jolink.jpg" )
+
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Graphic' in Toolbar"
+ GrafikenAusEin.Click
+ catch
+ Warnlog "Error on switching Graphic off!"
+ endcatch
+ Sleep 2
+ try
+ printlog " Click 'Graphic' in Toolbar"
+ GrafikenAusEin.Click
+ catch
+ Warnlog "Error on switching Graphic on!"
+ endcatch
+ Sleep 2
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_DirektCursor
+ printlog "- Toolbox ( normal ) : Direct Cursor"
+ if gApplication = "HTML" then
+ printlog "Not in WriterWeb!"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " Click 'Direct Cursor' in Toolbar"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ Direktcursor.Click
+ Sleep 1
+ printlog " Point cursor somewhere in document"
+ Call gMouseDoubleClick(50, 70)
+ printlog " Insert some words in document"
+ Call wTypeKeys ("Direct Cursor On")
+
+ printlog " Click 'Direct Cursor' in Toolbar"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ Direktcursor.Click
+ printlog " Insert some text in document"
+ Call gMouseDoubleClick (80, 20)
+ Call wTypeKeys ("Direct Cursor Off")
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase t_TB_Rest
+ printlog "- Toolbox ( normal ) : Rest"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " - Hyperlink"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Hyperlink' in Toolbar"
+ Hyperlink.Click
+ Sleep 2
+ printlog " Click 'Hyperlink' in Toolbar"
+ Hyperlink.Click
+ Warnlog "Button 'Hyperlink' should have been removed!"
+ catch
+ endcatch
+
+ printlog " - OnlineLayout"
+ if gApplication <> "HTML" then
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Online Layout' in Toolbar"
+ OnlineLayout.Click
+ Sleep 2
+ printlog " Click 'Online Layout' in Toolbar"
+ OnlineLayout.Click
+ catch
+ Warnlog "Button 'OnlineLayout' is missing or disabled!"
+ endcatch
+ end if
+
+ printlog " - Nonprinting Characters"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Nonprinting Characters' in Toolbar"
+ SteuerzeichenEinAus.Click
+ Sleep 2
+ printlog " Click 'Nonprinting Characters' in Toolbar"
+ SteuerzeichenEinAus.Click
+ catch
+ Warnlog "Button 'Nonprinting Characters' is missing or disabled!"
+ endcatch
+
+ printlog " - Graphics on/off"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Graphics' in Toolbar "
+ GrafikenAusEin.Click
+ Sleep 2
+ printlog " Click 'Graphics' in Toolbar "
+ GrafikenAusEin.Click
+ catch
+ Warnlog "Button 'Graphics' is missing or disabled!"
+ endcatch
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDoc_TB_Insert
+ qaErrorLog "#158646# - Inserting Indexes causes crash."
+ goto endsub
+
+ printlog "- Toolbox ( normal ) : All within Insert"
+ gApplication = "HTML"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog "- TearOff Insert-Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+
+ printlog " - Graphic"
+ printlog " Click 'Insert Graphics' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ wait 500
+
+ if Grafik.IsEnabled then
+ Grafik.Click
+ Kontext "GrafikEinfuegenDlg"
+ if ( GrafikEinfuegenDlg.Exists( 1 ) ) then
+ printlog " Select graphic from file '..\writer\required\input\graphics\jolink.jpg'"
+ Dateiname.SetText ( ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) )
+ Oeffnen.Click
+ else
+ Warnlog "Dialog 'Insert Graphic' not up!"
+ end if
+
+ Kontext "Active"
+ if ( Active.Exists( 1 ) ) then
+ Warnlog Active.Gettext
+ Active.Ok
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+ end if
+ printlog " Hit 'Delete' to remove graphic"
+ Call wTypeKeys ("<Delete>")
+ else
+ Warnlog "Button 'Graphic' on Insertbar is not enabled!"
+ end if
+
+ Sleep 2
+ printlog " - Table"
+ printlog " Click 'Insert Table' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Tabelle.IsEnabled then
+ Tabelle.Click
+ Kontext "TabelleEinfuegenWriter"
+ TabelleEinfuegenWriter.OK
+ printlog " Move cursor under table"
+ Call wTypeKeys ("<Down>",2)
+ else
+ Warnlog "Button 'Table' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Document"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+
+ printlog " - Special Character"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Sonderzeichen.IsEnabled then
+ Sonderzeichen.Click
+ Kontext "Sonderzeichen"
+ printlog " Click 'Insert Special Character' in Toolbox"
+ Sonderzeichen.Cancel
+ printlog " Cancel upcoming 'Special Character' dialog"
+ else
+ Warnlog "Button 'Special Character' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Insert Section"
+ printlog " Click 'Insert Section' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if BereichEinfuegen.IsEnabled then
+ BereichEinfuegen.Click
+ printlog " Close upcoming 'Section' dialog"
+ Kontext
+ Active.Setpage TabBereiche
+ Kontext "TabBereiche"
+ TabBereiche.Ok
+ else
+ Warnlog "Button 'Insert Section' on Insertbar is not enabled!"
+ end if
+
+ printlog " - Bookmark"
+ printlog " Click 'Insert Bookmark' in Toolbox"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ if Textmarke.IsEnabled then
+ Textmarke.Click
+ printlog " Enter a bookmark name and close dialog"
+ Kontext "TextmarkeEinfuegen"
+ Textmarken.SetText "Bookmark"
+ TextmarkeEinfuegen.OK
+ else
+ Warnlog "Button 'Bookmark' on Insertbar is not enabled!"
+ end if
+
+ 'Only with closing the toolbox the dialog is accessible for TT
+ printlog " Close toolbar"
+ Kontext "Insertbar"
+ if Insertbar.Exists then Insertbar.Close
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDoc_TB_InsertFields
+ Dim Ende as Integer
+ Dim i as Integer
+ printlog "- Toolbox ( normal ) : Fields"
+ gApplication = "HTML"
+
+ if gPlatgroup = "unx" then
+ QAErrorlog "Doesn't run on unix"
+ goto endsub
+ end if
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog "- TearOff Insert Toolbox"
+ printlog " Tear off toolbar and open insert toolbar"
+ Kontext "Insertbar"
+ if Not Insertbar.Exists then Call hToolbarSelect("Insert", true)
+ printlog " Click 'Insert Fields' in insertbar"
+ Sleep 1
+ Feldbefehle.OpenMenu
+ wait 500
+ Call hMenuSelectNr(6)
+ Kontext
+ try
+ Active.SetPage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ printlog " Cancel upcoming 'Fields' dialog"
+ TabDokumentFeldbefehle.Cancel
+ catch
+ QAErrorlog "Dialog for Fields is not up !"
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+testcase tHtmlDoc_TB_Form
+ printlog "- Toolbox ( normal ) : Formular"
+ gApplication = "HTML"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ Kontext "FormControls"
+ if ( FormControls.Exists( 1 ) ) then
+ ' do nothing
+ else
+ Call hToolbarSelect("Controls", true)
+ end if
+
+ try
+ printlog " Tear off 'Form' Toolbox"
+ Kontext "FormControls"
+ if Not FormControls.Exists then
+ Warnlog "Toolbar 'FormControls' is not opened!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ wait 500
+ Pushbutton.Click
+ printlog " Insert a pushbutton from toolbox"
+ Call hMalZeichnenMitSelektion ( 35, 20, 30, 25 )
+ Sleep 2
+ Kontext "FormControls"
+ if NOT ControlProperties.IsEnabled then
+ if gPlatform = "osx" then
+ warnlog "#i82427#-Mac OS X (Aqua): Drawing function does not draw anything"
+ else
+ warnlog "Control properties button disabled!"
+ end if
+ else
+ ControlProperties.Click
+ sleep(2)
+ end if
+ printlog "+ Open Control Properties"
+ printlog " - Control Properties"
+ Call sMenufunktionen("-Pushbutton-")
+
+ Kontext "FormControls"
+ wait 500
+ Radiobutton.Click
+ printlog " Insert a Radiobutton from toolbox"
+ Call hMalZeichnenMitSelektion ( 32, 20, 42, 25 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Radiobutton-")
+
+ Kontext "FormControls"
+ wait 500
+ Checkbox.Click
+ printlog " Insert a Checkbox from toolbox"
+ Call hMalZeichnenMitSelektion ( 45, 20, 55, 25 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Checkbox-")
+
+ Kontext "FormControls"
+ printlog " Insert an Edit Field from toolbox"
+ Edit.Click
+ Wait 500
+ Call hMalZeichnenMitSelektion ( 32, 30, 42, 35 )
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Edit-")
+
+ Kontext "FormControls"
+ Listbox.Click
+ Wait 500
+ printlog " Insert a listbox"
+ Call hMalZeichnenMitSelektion ( 45, 30, 55, 35 )
+ printlog "+ Step through pages of upcoming Autopilot"
+ Call sAutopilot_ListboxCombobox("Listbox")
+ printlog "+ Open Control Properties"
+ Call sMenufunktionen("-Listbox-")
+
+ printlog " Insert a Formatted Field from toolbox"
+ Kontext "FormControls"
+ Sleep 1
+ Call gMouseClick ( 40, 80 )
+ Kontext "FormControls"
+ printlog " Click 'Design Mode' in Toolbox"
+ wait 500
+ SwitchControlDesignMode.Click
+ Sleep 1
+ printlog " Click 'Design Mode' in Toolbox"
+ SwitchControlDesignMode.Click
+ printlog " - Design mode"
+ Kontext "FormControls"
+ FormControls.Close
+ catch
+ Exceptlog
+ endcatch
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tHtmlDoc_TB_Rest
+ printlog "- Toolbox ( normal ) : Rest"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " - Hyperlink"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Hyperlink' in Toolbar"
+ Hyperlink.Click
+ Sleep 2
+ printlog " Click 'Hyperlink' in Toolbar"
+ Hyperlink.Click
+ Warnlog "Button 'Hyperlink' should have been removed!"
+ catch
+ endcatch
+
+ printlog " - OnlineLayout"
+ printlog " - Nonprinting Characters"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Nonprinting Characters' in Toolbar"
+ SteuerzeichenEinAus.Click
+ Sleep 2
+ printlog " Click 'Nonprinting Characters' in Toolbar"
+ SteuerzeichenEinAus.Click
+ catch
+ Warnlog "Button 'Nonprinting Characters' is missing or disabled!"
+ endcatch
+
+ printlog " - Graphics on/off"
+ Kontext "Toolbar"
+ if Not Toolbar.Exists then Call hToolbarSelect("Tools", true)
+ try
+ printlog " Click 'Graphics' in Toolbar "
+ GrafikenAusEin.Click
+ Sleep 2
+ printlog " Click 'Graphics' in Toolbar "
+ GrafikenAusEin.Click
+ catch
+ Warnlog "Button 'Graphics' is missing or disabled!"
+ endcatch
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
diff --git a/testautomation/writer/required/input/bt.sxw b/testautomation/writer/required/input/bt.sxw
new file mode 100755
index 000000000000..a67d115ae63c
--- /dev/null
+++ b/testautomation/writer/required/input/bt.sxw
Binary files differ
diff --git a/testautomation/writer/required/input/graphics/jolink.jpg b/testautomation/writer/required/input/graphics/jolink.jpg
new file mode 100755
index 000000000000..6200757dd797
--- /dev/null
+++ b/testautomation/writer/required/input/graphics/jolink.jpg
Binary files differ
diff --git a/testautomation/writer/required/input/hangul.html b/testautomation/writer/required/input/hangul.html
new file mode 100755
index 000000000000..ed94de74fd50
--- /dev/null
+++ b/testautomation/writer/required/input/hangul.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=gb2312">
+ <TITLE></TITLE>
+ <META NAME="GENERATOR" CONTENT="StarOffice 8 Beta (Win32)">
+ <META NAME="CREATED" CONTENT="20041214;16325382">
+ <META NAME="CHANGED" CONTENT="20041214;16344789">
+</HEAD>
+<BODY LANG="en-US" DIR="LTR">
+<DL>
+ <DT><A HREF="http://nuclina.hoseo.ac.kr/ps/test-ks.html">http://nuclina.hoseo.ac.kr/ps/test-ks.html</A></DL>
+<H1>
+<SPAN LANG="ko-KR">&#50640;&#49436; &#54620;&#51088; &#50752; &#44592;&#54840;&#47484;
+&#51077;&#47141;&#54624;&#46412;</SPAN></H1>
+<DL>
+ <DT><SPAN LANG="ko-KR">&#54620;&#51088;&#51077;&#47141;&#51008; &#54644;&#45817;&#54616;&#45716;
+ &#54620;&#44544; &#54620;&#44544;&#51088;&#47484; &#51077;&#47141;&#54616;&#44256;
+ </SPAN>ctrl + F9 <SPAN LANG="ko-KR">&#47484; &#45580;&#47084; &#54644;&#45817;&#54616;&#45716;
+ &#54620;&#51088;&#51032; &#48264;&#54840;&#47484; &#49440;&#53469;&#54620;&#45796;</SPAN>.
+
+</DL>
+<P><SPAN LANG="ko-KR">&#44592;&#54840;&#51032; &#51077; &#47141;&#51008;&#54620;&#44544;
+&#52488;&#49457; &#54620;&#44544;&#51088;&#47484; &#51077;&#47141;&#54616;&#44256;
+</SPAN>ctrl + F9 <SPAN LANG="ko-KR">&#47484; &#45580;&#47084; &#54644;&#45817;&#54616;&#45716;
+&#44592;&#54840;&#51032; &#48264;&#54840;&#47484; &#49440;&#53469;&#54620;&#45796;</SPAN>.
+</P>
+<P><SPAN LANG="ko-KR">&#12593; &#44284; &#12596; &#51032; &#44221;&#50864;&#44032;
+&#45796;&#47476;&#45796;</SPAN>.</P>
+<P><SPAN LANG="ko-KR">บบืึ</SPAN></P>
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/testautomation/writer/required/input/hangul.sxw b/testautomation/writer/required/input/hangul.sxw
new file mode 100755
index 000000000000..a825084bf25c
--- /dev/null
+++ b/testautomation/writer/required/input/hangul.sxw
Binary files differ
diff --git a/testautomation/writer/required/input/htmltest.sxg b/testautomation/writer/required/input/htmltest.sxg
new file mode 100755
index 000000000000..75758bb88c5c
--- /dev/null
+++ b/testautomation/writer/required/input/htmltest.sxg
Binary files differ
diff --git a/testautomation/writer/required/input/htmltest.sxw b/testautomation/writer/required/input/htmltest.sxw
new file mode 100755
index 000000000000..835069a95783
--- /dev/null
+++ b/testautomation/writer/required/input/htmltest.sxw
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/001.odt b/testautomation/writer/required/input/linguistik/001.odt
new file mode 100755
index 000000000000..052964e27383
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/001.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/003.odt b/testautomation/writer/required/input/linguistik/003.odt
new file mode 100755
index 000000000000..63ba1b6b2318
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/003.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/007.odt b/testautomation/writer/required/input/linguistik/007.odt
new file mode 100755
index 000000000000..44531c1f89d1
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/007.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/031.odt b/testautomation/writer/required/input/linguistik/031.odt
new file mode 100755
index 000000000000..e6090b1ee7c5
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/031.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/033.odt b/testautomation/writer/required/input/linguistik/033.odt
new file mode 100755
index 000000000000..e6f821b7e084
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/033.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/034.odt b/testautomation/writer/required/input/linguistik/034.odt
new file mode 100755
index 000000000000..6f15867d703e
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/034.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/036.odt b/testautomation/writer/required/input/linguistik/036.odt
new file mode 100755
index 000000000000..78182150294e
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/036.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/039.odt b/testautomation/writer/required/input/linguistik/039.odt
new file mode 100755
index 000000000000..90288d93236a
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/039.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/045.odt b/testautomation/writer/required/input/linguistik/045.odt
new file mode 100755
index 000000000000..fd2fdc2f8d87
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/045.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/046.odt b/testautomation/writer/required/input/linguistik/046.odt
new file mode 100755
index 000000000000..021c60ad86b3
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/046.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/048.odt b/testautomation/writer/required/input/linguistik/048.odt
new file mode 100755
index 000000000000..c2c259f2f635
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/048.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/049.odt b/testautomation/writer/required/input/linguistik/049.odt
new file mode 100755
index 000000000000..95de87ebb282
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/049.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/055.odt b/testautomation/writer/required/input/linguistik/055.odt
new file mode 100755
index 000000000000..56560cccce52
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/055.odt
Binary files differ
diff --git a/testautomation/writer/required/input/linguistik/sprache.odt b/testautomation/writer/required/input/linguistik/sprache.odt
new file mode 100755
index 000000000000..d3d43ae0f16b
--- /dev/null
+++ b/testautomation/writer/required/input/linguistik/sprache.odt
Binary files differ
diff --git a/testautomation/writer/required/input/st1_1.sxw b/testautomation/writer/required/input/st1_1.sxw
new file mode 100755
index 000000000000..0b7825936dcf
--- /dev/null
+++ b/testautomation/writer/required/input/st1_1.sxw
Binary files differ
diff --git a/testautomation/writer/required/w_updt.bas b/testautomation/writer/required/w_updt.bas
new file mode 100755
index 000000000000..498826f83e8d
--- /dev/null
+++ b/testautomation/writer/required/w_updt.bas
@@ -0,0 +1,93 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Ressource-Test Writer Document
+'*
+'\******************************************************************
+
+sub main
+ use "writer\tools\includes\w_tools.inc" ' global subroutines for Writer-application
+ use "writer\tools\includes\w_tool1.inc" ' global subroutines for Writer-application
+ use "writer\tools\includes\w_tool2.inc" ' global subroutines for Writer-application
+
+ use "writer\required\includes\w_001_.inc"
+ use "writer\required\includes\w_001a_.inc"
+ use "writer\required\includes\w_001b_.inc"
+ use "writer\required\includes\w_002_.inc"
+ use "writer\required\includes\w_003_.inc"
+ use "writer\required\includes\w_004_.inc"
+ use "writer\required\includes\w_005_.inc"
+ use "writer\required\includes\w_005b_.inc"
+ use "writer\required\includes\w_006_.inc"
+ use "writer\required\includes\w_007_.inc"
+ use "writer\required\includes\w_008_.inc"
+ use "writer\required\includes\w_009_.inc"
+ use "writer\required\includes\w_010_.inc"
+ use "writer\required\includes\w_010_1.inc"
+ use "writer\required\includes\w_011_.inc"
+ use "writer\required\includes\w_020_.inc"
+
+ Printlog "******* Ressource-Test Writer Document *******"
+
+ Call wChangeDefaultView()
+
+ Call hStatusIn ( "writer", "w_updt.bas" )
+ Call w_001_ ' Menu File
+ Call w_001a_ ' Menu File
+ Call w_001b_ ' Menu File
+ Call w_002_ ' Menu Edit
+ Call w_003_ ' Menu View
+ Call w_004_ ' Menu Insert
+ Call w_005_ ' Menu Format
+ Call w_005b_ ' Menu Format (2)
+ Call w_006_ ' Menu Table
+ Call w_007_ ' Menu Tools
+ Call w_008_ ' Menu Window
+ Call w_009_ ' Menu Help
+ Call w_010_ ' Objectbar
+ Call w_010_1 ' Objectbar. Part 2
+ Call w_011_ ' Rest of Objectbar
+ Call w_020_ ' Toolbar
+ Call hStatusOut
+
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\required\includes\g_001.inc"
+ use "global\required\includes\g_option.inc" ' global subroutines for Tools / Options
+ use "global\required\includes\g_printing.inc"
+ use "global\tools\includes\optional\t_xml_filter1.inc" ' global routines for XML-functionality
+ use "global\tools\includes\optional\t_docfuncs.inc"
+ use "global\tools\includes\optional\t_control_objects.inc"
+
+ gApplication = "WRITER"
+ GetUseFiles ()
+end sub