summaryrefslogtreecommitdiff
path: root/testautomation/writer/optional/includes
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/writer/optional/includes')
-rw-r--r--testautomation/writer/optional/includes/CJKCTLDependency/CJKCTLDependency1.inc980
-rw-r--r--testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc296
-rw-r--r--testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc1446
-rw-r--r--testautomation/writer/optional/includes/autocorrection/w_autocorrect2.inc474
-rw-r--r--testautomation/writer/optional/includes/autotext/w_autotext.inc658
-rw-r--r--testautomation/writer/optional/includes/calculate/w_calculate.inc463
-rw-r--r--testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc409
-rw-r--r--testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate2.inc454
-rw-r--r--testautomation/writer/optional/includes/clipboard/clipbrd_func.inc442
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_210_.inc455
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_211_.inc540
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_212_.inc532
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_213_.inc533
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_214_.inc524
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_215_.inc448
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_216_.inc440
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_217_.inc393
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_218_.inc402
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_219_.inc397
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_220_.inc392
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_221_.inc430
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_222_.inc432
-rw-r--r--testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc433
-rw-r--r--testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc1027
-rw-r--r--testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc715
-rw-r--r--testautomation/writer/optional/includes/dropdownLB/w_dropdownLB1.inc1093
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields1.inc394
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields2.inc1035
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields3.inc993
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields4.inc967
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields5.inc839
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields6.inc830
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields7.inc400
-rw-r--r--testautomation/writer/optional/includes/filter/w_filter.inc608
-rw-r--r--testautomation/writer/optional/includes/fontwork/w_fontwork1.inc400
-rw-r--r--testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc750
-rw-r--r--testautomation/writer/optional/includes/formatpage/w_formatpage1.inc878
-rw-r--r--testautomation/writer/optional/includes/formatpage/w_formatpage2.inc986
-rw-r--r--testautomation/writer/optional/includes/formatpage/w_formatpage3.inc1372
-rw-r--r--testautomation/writer/optional/includes/formatpage/w_formatpage4.inc788
-rw-r--r--testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc1263
-rw-r--r--testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc1412
-rw-r--r--testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc1199
-rw-r--r--testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion1.inc698
-rw-r--r--testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion2.inc1618
-rw-r--r--testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion3.inc1022
-rw-r--r--testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc380
-rw-r--r--testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc958
-rw-r--r--testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc985
-rw-r--r--testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc1041
-rw-r--r--testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc831
-rw-r--r--testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc755
-rw-r--r--testautomation/writer/optional/includes/loadsave/w_loadsave.inc447
-rw-r--r--testautomation/writer/optional/includes/navigator/w_navigator.inc807
-rw-r--r--testautomation/writer/optional/includes/number/w_205_.inc731
-rw-r--r--testautomation/writer/optional/includes/number/w_205a_.inc875
-rw-r--r--testautomation/writer/optional/includes/number/w_206_.inc726
-rw-r--r--testautomation/writer/optional/includes/number/w_207_.inc178
-rw-r--r--testautomation/writer/optional/includes/option/wh_o_1.inc642
-rw-r--r--testautomation/writer/optional/includes/option/wh_o_2.inc485
-rw-r--r--testautomation/writer/optional/includes/option/wh_o_3.inc389
-rw-r--r--testautomation/writer/optional/includes/option/wr_o_1.inc937
-rw-r--r--testautomation/writer/optional/includes/option/wr_o_2.inc990
-rw-r--r--testautomation/writer/optional/includes/option/wr_o_3.inc1403
-rw-r--r--testautomation/writer/optional/includes/option/wr_o_4.inc988
-rw-r--r--testautomation/writer/optional/includes/option/wr_o_5.inc200
-rw-r--r--testautomation/writer/optional/includes/option/wr_o_a.inc663
-rw-r--r--testautomation/writer/optional/includes/redlining/w_redlining1.inc1233
-rw-r--r--testautomation/writer/optional/includes/redlining/w_redlining2.inc1267
-rw-r--r--testautomation/writer/optional/includes/regexp/regular.inc974
-rw-r--r--testautomation/writer/optional/includes/regexp/search.inc1697
-rw-r--r--testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc515
-rw-r--r--testautomation/writer/optional/includes/section/w_section_1.inc620
-rw-r--r--testautomation/writer/optional/includes/section/w_section_2.inc1055
-rw-r--r--testautomation/writer/optional/includes/section/w_section_3.inc1761
-rw-r--r--testautomation/writer/optional/includes/section/w_section_4.inc1509
-rw-r--r--testautomation/writer/optional/includes/section/w_section_tools.inc186
-rw-r--r--testautomation/writer/optional/includes/shortcut/w_shortcuts.inc859
-rw-r--r--testautomation/writer/optional/includes/sorting/w_sorting1.inc646
-rw-r--r--testautomation/writer/optional/includes/sorting/w_sorting2.inc345
-rw-r--r--testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc1477
-rw-r--r--testautomation/writer/optional/includes/spellcheck/w_spellcheck1.inc160
-rw-r--r--testautomation/writer/optional/includes/stylist/w_stylist.inc1024
-rw-r--r--testautomation/writer/optional/includes/table/w_204_.inc1157
-rw-r--r--testautomation/writer/optional/includes/table/w_204a_.inc1163
-rw-r--r--testautomation/writer/optional/includes/table/w_204b_.inc100
-rw-r--r--testautomation/writer/optional/includes/textframes/w_textframes1.inc1458
-rw-r--r--testautomation/writer/optional/includes/textframes/w_textframes2.inc1159
-rw-r--r--testautomation/writer/optional/includes/textframes/w_textframes3.inc1070
-rw-r--r--testautomation/writer/optional/includes/textframes/w_textframes4.inc1523
-rw-r--r--testautomation/writer/optional/includes/textframes/w_textframes5.inc739
-rwxr-xr-xtestautomation/writer/optional/includes/tools/tools1.inc347
-rwxr-xr-xtestautomation/writer/optional/includes/tools/tools2.inc412
-rwxr-xr-xtestautomation/writer/optional/includes/undo/w_undo1.inc352
-rw-r--r--testautomation/writer/optional/includes/undo/w_undo_history_1.inc204
-rwxr-xr-xtestautomation/writer/optional/includes/undo/w_undo_history_2.inc528
-rwxr-xr-xtestautomation/writer/optional/includes/undo/w_undo_history_3.inc687
-rwxr-xr-xtestautomation/writer/optional/includes/undo/w_undo_history_4.inc495
98 files changed, 0 insertions, 75393 deletions
diff --git a/testautomation/writer/optional/includes/CJKCTLDependency/CJKCTLDependency1.inc b/testautomation/writer/optional/includes/CJKCTLDependency/CJKCTLDependency1.inc
deleted file mode 100644
index 90e1c423a51f..000000000000
--- a/testautomation/writer/optional/includes/CJKCTLDependency/CJKCTLDependency1.inc
+++ /dev/null
@@ -1,980 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test CJK and CTL support dependency
-'*
-'************************************************************************
-'*
-' #1 tCJKDependency_1 'Test Tabpage 'Text Grid'
-' #1 tCJKDependency_2 'Test Tabpage 'Asian Typography'
-' #1 tCJKDependency_3 'Test CheckBox 'Snap to text grid (if active)'
-' #1 tCJKDependency_4 'Test listbox 'Text direction' in page
-' #1 tCJKDependency_5 'Test listbox 'Text direction' in Frame
-' #1 tCTLDependency_1 'Test listbox 'Text direction' -- insert/section
-' #1 tCTLDependency_2 'Test listbox 'Text direction' -- format/section
-' #1 tCTLDependency_3 'Test listbox 'Text direction' -- table
-' #1 tCTLDependency_4 'Test 'left to right' and 'right to left' button(Writer)
-' #1 tCTLDependency_5 'Test 'left to right' and 'right to left' button - HTML(HTML 3.2)
-' #1 tCTLDependency_6 'Test 'left to right' and 'right to left' button - HTML(Microsoft Internet Bxplorer)
-' #1 tCTLDependency_7 'Test 'left to right' and 'right to left' button - HTML(Netscape Navigator)
-' #1 tCTLDependency_8 'Test 'left to right' and 'right to left' button - HTML(StarOffice Writer)
-' #1 tCTLKashidaCheck 'Check for additional numerals if CTL support is enabled
-'*
-'\***********************************************************************
-
-testcase tCJKDependency_1
-
- Dim bAsianLanguage as Boolean
-
- PrintLog "- Tabpage 'Text Grid"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Set 'Asian Language support' ON"
- bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
-
- printlog " Format/Page , the tabpage 'Text Grid' should exist"
- FormatPageWriter
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- warnlog "Should get Tabpage: Grid Text"
- endcatch
-
- 'if system language is Asian language, the checkbox
- ''Asian Language support' is checked by default and
- 'can't do any operation for it
- if iSystemSprache = 81 Or iSystemSprache = 82 Or iSystemSprache = 86 or iSystemSprache = 88 then
- Goto NoTest
- end if
-
- printlog " Set 'Asian Language support' Off"
- ActiveDeactivateAsianSupport(FALSE)
-
- printlog " Format/Page , the tabpage 'Text Grid' shouldn't exist"
- FormatPageWriter
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- warnlog "Shouldn't get Tabpage: Grid Text"
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- endcatch
-
- printlog " Set the 'Asian Language support' to default"
- if bAsianLanguage = FALSE then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
-NoTest:
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCJKDependency_2
-
- Dim bAsianLanguage as Boolean
-
- PrintLog "- Tabpage'Asian Typography'"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Set 'Asian Language support' ON"
- bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
-
- printlog " Format/Paragraph , the tabpage 'Asian Typography' should exist"
- FormatParagraph
- try
- Kontext
- Active.SetPage TabAsianTypography
- Kontext "TabAsianTypography"
- TabAsianTypography.Cancel
- catch
- Kontext
- Active.SetPage TabTextfluss
- Kontext "TabTextfluss"
- TabTextfluss.Cancel
- warnlog "Should get Tabpage: Asian Typography"
- endcatch
-
- 'if system language is Asian language, the checkbox
- ''Asian Language support' is checked by default and
- 'can't do any operation for it
- if iSystemSprache = 81 Or iSystemSprache = 82 Or iSystemSprache = 86 or iSystemSprache = 88 then
- Goto NoTest
- end if
-
- printlog " Set 'Asian Language support' Off"
- ActiveDeactivateAsianSupport(FALSE)
-
- printlog " Format/Page , the tabpage 'Asian Typography' shouldn't exist"
- FormatParagraph
- try
- Kontext
- Active.SetPage TabAsianTypography
- Kontext "TabAsianTypography"
- TabAsianTypography.Cancel
- warnlog "Shouldn't get Tabpage: Asian Typography"
- catch
- Kontext
- Active.SetPage TabTextfluss
- Kontext "TabTextfluss"
- TabTextfluss.Cancel
- endcatch
-
- printlog " Set the 'Asian Language support' to default"
- if bAsianLanguage = FALSE then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
-NoTest:
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCJKDependency_3
-
- Dim bAsianLanguage as Boolean
-
- PrintLog "- CheckBox 'Snap to text grid (if active)'"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Set 'Asian Language support' ON"
- bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
-
- printlog " Format/Paragraph / Alignment ,"
- printlog " the CheckBox 'Snap to text grid (if active)' should exist"
- Call fFormatParagraph("TabAusrichtungAbsatz")
- try
- TextrasterFangen.UnCheck
- catch
- warnlog "Should get checkbox 'Snap to text grid (if active)'"
- endcatch
- TabAusrichtungAbsatz.Cancel
-
- 'if system language is Asian language, the checkbox
- ''Asian Language support' is checked by default and
- 'can't do any operation for it
- if iSystemSprache = 81 Or iSystemSprache = 82 Or iSystemSprache = 86 or iSystemSprache = 88 then
- Goto NoTest
- end if
-
- printlog " Set 'Asian Language support' Off"
- ActiveDeactivateAsianSupport(FALSE)
-
- printlog " Format/Paragraph / Alignment ,"
- printlog " the CheckBox 'Snap to text grid (if active)' shouldn't exist"
- Call fFormatParagraph("TabAusrichtungAbsatz")
- try
- TextrasterFangen.UnCheck
- warnlog "Shouldn't get checkbox 'Snap to text grid (if active)'"
- catch
- endcatch
- TabAusrichtungAbsatz.Cancel
-
- printlog " Set the 'Asian Language support' to default"
- if bAsianLanguage = FALSE then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
-NoTest:
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCJKDependency_4
-
- Dim bAsianLanguage as Boolean
- Dim bCTLLanguage as Boolean
- 'if system language is Asian language, the checkbox
- ''Asian Language support' is checked by default and
- 'can't do any operation for it
- if iSystemSprache = 81 Or iSystemSprache = 82 Or iSystemSprache = 86 or iSystemSprache = 88 then
- goto endsub
- end if
-
- PrintLog "- listbox 'Text direction' - Page"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Set 'CTL language support' OFF"
- bCTLLanguage = ActiveDeactivateCTLSupport(FALSE)
-
- printlog " Set 'Asian Language support' ON"
- bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
-
- printlog " Format/Page / Page, the listbox 'Text direction' should exist"
- Call fFormatPageWriter("TabSeite")
- if Textfluss.IsVisible = TRUE then
- Textfluss.Select 2
- else
- warnlog "Should get listbox 'Text direction'"
- end if
- TabSeite.Cancel
-
- printlog " Set 'Asian Language support' Off"
- ActiveDeactivateAsianSupport(FALSE)
- printlog " Format/Page / Page, the listbox 'Text direction' shouldn't exist"
- Call fFormatPageWriter("TabSeite")
- if Textfluss.IsVisible = TRUE then
- warnlog "Shouldn't get listbox 'Text direction'"
- end if
- TabSeite.Cancel
-
- printlog " Set the 'Asian Language support' to default"
- if bAsianLanguage = FALSE then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCJKDependency_5
-
- Dim bAsianLanguage as Boolean
- Dim bCTLLanguage as Boolean
-
- PrintLog "- listbox 'Text direction' - Frame"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Set 'CTL language support' OFF"
- bCTLLanguage = ActiveDeactivateCTLSupport(FALSE)
-
- printlog " Set 'Asian Language support' ON"
- bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
-
- printlog " Insert a frame"
- Call wInsertFrame
-
- printlog " Format/Frame / Options, the listbox 'Text direction' should exist"
- Call fFormatFrame("TabZusaetze")
- if Not TextDirection.IsVisible then
- warnlog "Should get listbox 'Text direction'"
- end if
- TabZusaetze.Cancel
-
- 'if system language is Asian language, the checkbox
- ''Asian Language support' is checked by default and
- 'can't do any operation for it
- if iSystemSprache = 81 Or iSystemSprache = 82 Or iSystemSprache = 86 or iSystemSprache = 88 then
- Goto NoTest
- end if
-
- printlog " Set 'Asian Language support' Off"
- ActiveDeactivateAsianSupport(FALSE)
-
- printlog " Format/Frame / Options, the listbox 'Text direction' shouldn't exist"
- Call fFormatFrame("TabZusaetze")
- if TextDirection.IsVisible = TRUE then
- QAErrorLog "#135837# Shouldn't get listbox 'Text direction'."
- end if
- TabZusaetze.Cancel
-
- printlog " Set the 'Asian Language support' to default"
- if bAsianLanguage = FALSE then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
-NoTest:
- printlog " Set the 'CTL language support' to default"
- if bCTLLanguage = TRUE then
- Call ActiveDeactivateAsianSupport(TRUE)
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_1
-
- Dim bCTLLanguage as Boolean
-
- PrintLog "- listbox 'Text direction' -- insert/section"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Set 'CTL Language support' ON"
- bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Insert/Section/Columns,"
- printlog " the listbox 'Text direction' should exist"
- Call fInsertSection("TabSpalten")
- if Not TextDirection.IsVisible then
- Warnlog "Should get listbox 'Text direction'"
- end if
- TabSpalten.Cancel
-
- printlog " Set 'CTL Language support' Off"
- Call ActiveDeactivateCTLSupport(FALSE)
-
- printlog " Insert/Section/Columns,"
- printlog " the listbox 'Text direction' shouldn't exist"
- Call fInsertSection("TabSpalten")
- if TextDirection.IsVisible then
- Warnlog "Shouldn't get listbox 'Text direction'"
- end if
- TabSpalten.Cancel
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = TRUE then
- Call ActiveDeactivateCTLSupport(TRUE)
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_2
-
- Dim bCTLLanguage as Boolean
-
- PrintLog "- listbox 'Text direction' -- format/section"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Insert a section"
- Call fInsertSection("TabBereiche")
- TabBereiche.OK
-
- printlog " Set 'CTL Language support' ON"
- bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Format/Section , then click option button,"
- printlog " the listbox 'Text direction' should exist"
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
- Sleep 1
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- if Not TextDirection.IsVisible then
- Warnlog "Should get listbox 'Text direction'"
- end if
- TabSpalten.Cancel
- Sleep 1
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- printlog " Set 'CTL Language support' Off"
- Call ActiveDeactivateCTLSupport(FALSE)
-
- printlog " Format/Section , then click option button,"
- printlog " the listbox 'Text direction' shouldn't exist"
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- if TextDirection.IsVisible then
- Warnlog "Shouldn't get listbox 'Text direction'"
- end if
- TabSpalten.Cancel
- Sleep 1
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = TRUE then
- Call ActiveDeactivateCTLSupport(TRUE)
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_3
-
- Dim bCTLLanguage as Boolean
- PrintLog "- listbox 'Text direction' -- Table"
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Insert a table"
- Call hTabelleEinfuegen
-
- printlog " Set 'CTL Language support' ON"
- bCTLLanguage = ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Format/Table / Table ,"
- printlog " the listbox 'Text direction' should exist"
- Call fFormatTable("TabTabelle")
- if Not TextDirection.IsVisible then
- Warnlog "Should get listbox 'Text direction'"
- end if
- TabTabelle.Cancel
-
- printlog " Set 'CTL Language support' Off"
- Call ActiveDeactivateCTLSupport(FALSE)
-
- printlog " Format/Table / Table ,"
- printlog " the listbox 'Text direction' shouldn't exist"
- Call fFormatTable("TabTabelle")
- if TextDirection.IsVisible then
- Warnlog "Shouldn't get listbox 'Text direction'"
- end if
- TabTabelle.Cancel
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = TRUE then
- Call ActiveDeactivateCTLSupport(TRUE)
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_4
-
- Dim bCTLLanguage as Boolean
- Dim bLToR as Boolean
- Dim bRToL as Boolean
-
- PrintLog "- 'left to right' and 'right to left' button "
-
- printlog " Open a new document"
- Call hNewDocument
-
- bLToR = fActiveObjectInToolbar("Text Object" , "Left-To-Right" , TRUE)
- bRToL = fActiveObjectInToolbar("Text Object" , "Right-To-Left" , TRUE)
-
- printlog " Set 'CTL Language support' Off"
- bCTLLanguage = ActiveDeactivateCTLSupport(FALSE)
- Sleep 2
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Shouldn't be"
- Kontext "TextObjectbar"
- try
- LeftToRight.Click
- warnlog "Left To Right button shouldn't be clicked!"
- catch
- endcatch
- try
- RightToLeft.Click
- warnlog "Right To Left button shouldn't be clicked!"
- catch
- endcatch
-
- printlog " Set 'CTL Language support' ON"
- ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Should be"
- Kontext "TextObjectbar"
- Sleep 2
- try
- LeftToRight.Click
- Sleep 2
- catch
- warnlog "#i38788# Left To Right button can't be clicked!"
- endcatch
- try
- RightToLeft.Click
- Sleep 2
- catch
- warnlog "#i38788# Right To Left button can't be clicked!"
- endcatch
-
- 'Set R to L and L to R button disappear
- if bLToR = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Left-To-Right" , FALSE)
- end if
- if bRToL = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Right-To-Left" , FALSE)
- end if
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = FALSE then
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_5
-
- Dim bCTLLanguage as Boolean
- Dim bLToR as Boolean
- Dim bRToL as Boolean
- Dim iHtmlExportMode as Integer
- Dim iCurrentHtmlExportMode as Integer
-
- iHtmlExportMode = 1
-
- PrintLog "- 'left to right' and 'right to left' button - HTML (HTML 3.2)"
-
- printlog " Open a new document"
- Call hNewDocument
-
- bLToR = fActiveObjectInToolbar("Text Object" , "Left-To-Right" , TRUE)
- bRToL = fActiveObjectInToolbar("Text Object" , "Right-To-Left" , TRUE)
-
- printlog " Set Export mode to HTML 3.2"
- printlog " Tools/load&save/HTML compatibility/Exprt"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- iCurrentHtmlExportMode = Export.GetSelIndex
- Sleep 1
- Export.Select iHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- PrintLog "Set 'CTL Language support' Off"
- bCTLLanguage = ActiveDeactivateCTLSupport(FALSE)
- Sleep 2
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Shouldn't be"
- Kontext "TextObjectbar"
- try
- LeftToRight.Click
- warnlog "Left To Right button shouldn't be clicked!"
- catch
- endcatch
- try
- RightToLeft.Click
- warnlog "Right To Left button shouldn't be clicked!"
- catch
- endcatch
-
- PrintLog "Set 'CTL Language support' ON"
- ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Should NOT be"
- Kontext "TextObjectbar"
- Sleep 2
- try
- LeftToRight.Click
- QAErrorLog "#115836# Left To Right button shouldn't be clicked!"
- Sleep 2
- catch
- endcatch
- try
- RightToLeft.Click
- QAErrorLog "#115836# Right To Left button shouldn't be clicked!"
- Sleep 2
- catch
- endcatch
-
- 'Set R to L and L to R button disappear
- if bLToR = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Left-To-Right" , FALSE)
- end if
- if bRToL = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Right-To-Left" , FALSE)
- end if
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = FALSE then
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
-
- printlog " Set Export mode to default"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- Export.Select iCurrentHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_6
-
- Dim bCTLLanguage as Boolean
- Dim bLToR as Boolean
- Dim bRToL as Boolean
- Dim iHtmlExportMode as Integer
- Dim iCurrentHtmlExportMode as Integer
-
- iHtmlExportMode = 2
-
- PrintLog "- 'left to right' and 'right to left' button - HTML(Microsoft Internet Bxplorer)"
-
- printlog " Open a new document"
- Call hNewDocument
-
- bLToR = fActiveObjectInToolbar("Text Object" , "Left-To-Right" , TRUE)
- bRToL = fActiveObjectInToolbar("Text Object" , "Right-To-Left" , TRUE)
-
- printlog " Set Export mode to Microsoft Internet Bxplorer"
- printlog " Tools/load&save/HTML compatibility/Exprt"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- iCurrentHtmlExportMode = Export.GetSelIndex
- Export.Select iHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " Set 'CTL Language support' Off"
- bCTLLanguage = ActiveDeactivateCTLSupport(FALSE)
- Sleep 2
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Shouldn't be"
- Kontext "TextObjectbar"
- try
- LeftToRight.Click
- warnlog "Left To Right button shouldn't be clicked!"
- catch
- endcatch
- try
- RightToLeft.Click
- warnlog "Right To Left button shouldn't be clicked!"
- catch
- endcatch
-
- printlog " Set 'CTL Language support' ON"
- ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Should be"
- Kontext "TextObjectbar"
- Sleep 2
- try
- LeftToRight.Click
- Sleep 2
- catch
- warnlog "#i38788# Left To Right button can't be clicked!"
- endcatch
- try
- RightToLeft.Click
- Sleep 2
- catch
- warnlog "#i38788# Right To Left button can't be clicked!"
- endcatch
-
- 'Set R to L and L to R button disappear
- if bLToR = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Left-To-Right" , FALSE)
- end if
- if bRToL = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Right-To-Left" , FALSE)
- end if
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = FALSE then
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
-
- printlog " Set Export mode to default"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- Export.Select iCurrentHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_7
-
- Dim bCTLLanguage as Boolean
- Dim bLToR as Boolean
- Dim bRToL as Boolean
- Dim iHtmlExportMode as Integer
- Dim iCurrentHtmlExportMode as Integer
-
- iHtmlExportMode = 3
-
- PrintLog "- 'left to right' and 'right to left' button - HTML(Netscape Navigator)"
-
- printlog " Open a new document"
- Call hNewDocument
-
- bLToR = fActiveObjectInToolbar("Text Object" , "Left-To-Right" , TRUE)
- bRToL = fActiveObjectInToolbar("Text Object" , "Right-To-Left" , TRUE)
-
- printlog " Set Export mode to Netscape Navigator"
- printlog " Tools/load&save/HTML compatibility/Exprt"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- iCurrentHtmlExportMode = Export.GetSelIndex
- Export.Select iHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " Set 'CTL Language support' Off"
- bCTLLanguage = ActiveDeactivateCTLSupport(FALSE)
- Sleep 2
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Shouldn't be"
- Kontext "TextObjectbar"
- try
- LeftToRight.Click
- warnlog "Left To Right button shouldn't be clicked!"
- catch
- endcatch
- try
- RightToLeft.Click
- warnlog "Right To Left button shouldn't be clicked!"
- catch
- endcatch
-
- printlog " Set 'CTL Language support' ON"
- ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Should be"
- Kontext "TextObjectbar"
- Sleep 2
- try
- LeftToRight.Click
- Sleep 2
- catch
- warnlog "#i38788# Left To Right button can't be clicked!"
- endcatch
- try
- RightToLeft.Click
- Sleep 2
- catch
- warnlog "#i38788# Right To Left button can't be clicked!"
- endcatch
-
- 'Set R to L and L to R button disappear
- if bLToR = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Left-To-Right" , FALSE)
- end if
- if bRToL = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Right-To-Left" , FALSE)
- end if
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = FALSE then
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
-
- printlog " Set Export mode to default"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- Export.Select iCurrentHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tCTLDependency_8
-
- Dim bCTLLanguage as Boolean
- Dim bLToR as Boolean
- Dim bRToL as Boolean
- Dim iHtmlExportMode as Integer
- Dim iCurrentHtmlExportMode as Integer
-
- iHtmlExportMode = 4
-
- PrintLog "- 'left to right' and 'right to left' button - HTML(StarOffice Writer)"
-
- printlog " Open a new document"
- Call hNewDocument
-
- bLToR = fActiveObjectInToolbar("Text Object" , "Left-To-Right" , TRUE)
- bRToL = fActiveObjectInToolbar("Text Object" , "Right-To-Left" , TRUE)
-
- printlog " Set Export mode to StarOffice Writer"
- printlog " Tools/load&save/HTML compatibility/Exprt"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- iCurrentHtmlExportMode = Export.GetSelIndex
- Export.Select iHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " Set 'CTL Language support' Off"
- bCTLLanguage = ActiveDeactivateCTLSupport(FALSE)
- Sleep 2
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Shouldn't be"
- Kontext "TextObjectbar"
- try
- LeftToRight.Click
- warnlog "Left To Right button shouldn't be clicked!"
- catch
- endcatch
- try
- RightToLeft.Click
- warnlog "Right To Left button shouldn't be clicked!"
- catch
- endcatch
-
- printlog " Set 'CTL Language support' ON"
- ActiveDeactivateCTLSupport(TRUE)
-
- printlog " Check if 'left to right' button and 'right to left' button"
- printlog " can be clicked in text tool bar -- Should be"
- Kontext "TextObjectbar"
- Sleep 2
- try
- LeftToRight.Click
- Sleep 2
- catch
- warnlog "#i38788# Left To Right button can't be clicked!"
- endcatch
- try
- RightToLeft.Click
- Sleep 2
- catch
- warnlog "#i38788# Right To Left button can't be clicked!"
- endcatch
-
- 'Set R to L and L to R button disappear
- if bLToR = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Left-To-Right" , FALSE)
- end if
- if bRToL = FALSE then
- Call fActiveObjectInToolbar("Text Object" , "Right-To-Left" , FALSE)
- end if
-
- printlog " Set the 'CTL Language support' to default"
- if bCTLLanguage = FALSE then
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
-
- printlog " Set Export mode to default"
- ToolsOptions
- Call hToolsOptions ( "LoadSave", "HTMLCompatibility" )
- Export.Select iCurrentHtmlExportMode
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------------------------------------------------
-
-testcase tCTLKashidaCheck
-
- Dim bCTLLanguage as Boolean
- Dim bAsianLanguage as boolean
- Dim iListCounter as Integer
-
- printlog " Open a new document"
- Call hNewDocument
-
- printlog " Set 'Asian support' to ON"
- bAsianLanguage = ActiveDeactivateAsianSupport(True)
- printlog " Set 'CTL Language support' to ON"
- bCTLLanguage = ActiveDeactivateCTLSupport(True)
- Sleep 2
-
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","ComplexTextLayout")
- Kontext "TabComplexTextLayout"
-
- iListCounter = Numerals.GetItemCount
-
- if iListCounter <> 4 then
- Warnlog "There are not 4 items in list 'Numerlas' but " + iListCounter
- endif
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- if bAsianLanguage = FALSE then
- printlog " Set the 'Asian Language support' to default"
- Call ActiveDeactivateAsianSupport(bAsianLanguage)
- end if
-
- if bCTLLanguage = FALSE then
- printlog " Set the 'CTL Language support' to default"
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------------------------------------------------
-
-
diff --git a/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc b/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc
deleted file mode 100644
index a80e5b0e925b..000000000000
--- a/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc
+++ /dev/null
@@ -1,296 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test Alternative Text for objects in writer
-'*
-'\************************************************************************
-
-sub w_alternative_text
-
- Call tPictureAlternativeText
- Call tFrameAlternativeText
- Call tOLEAlternativeText
-
-end sub
-
-'-------------------------------------------------------------------------
-
-testcase tPictureAlternativeText
-
- printlog "- New writer document"
- Call hNewDocument
-
- printlog "- Insert a picture"
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext ConvertPath(gTesttoolpath + "writer\optional\input\alternative_text\jolink.jpg")
- Sleep 1
- Oeffnen.Click
- Sleep 2
-
- printlog "- Context menu on the picture, choose 'Description'"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems picture is not selected => Description Object could not be opened"
- endcatch
-
- printlog "- Type 'TitleText' in the Title field"
- Kontext "DescriptionObject"
- DescriptionTitle.Settext "TitleText"
-
- printlog "- Type 'This Is A Description'"
- DescriptionText.Settext "This Is A Description"
-
- printlog "- Close the dialog"
- DescriptionObject.Ok
-
- printlog "- Context menu on the picture, choose 'Description'"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems picture is not selected => Description Object could not be opened"
- endcatch
-
- printlog "Check that the Title and Description fields have been saved correctly"
- Kontext "DescriptionObject"
- if DescriptionTitle.Gettext <> "TitleText" then
- Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext
- endif
- if DescriptionText.Gettext <> "This Is A Description" then
- warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext
- endif
- DescriptionObject.Cancel
-
- printlog "- Format - Picture"
- FormatGraphics
-
- printlog "The 'Alternative' field must be filled with the content of the Title field (='TitleText')"
- Kontext
- Active.Setpage TabZusaetze
- Kontext "TabZusaetze"
- if Alternativtext.Gettext <> "TitleText" then
- Warnlog "Alternatice text in pictures options is not set"
- endif
- TabZusaetze.Cancel
-
- printlog "- Save the document"
- Call hFileSaveAsKill ( gOfficePath + "user\work\tPictureAlternativeText.odt" )
- Call hCloseDocument
-
- printlog "- Reload"
- hFileOpen( gOfficePath + "user\work\tPictureAlternativeText.odt" )
- ' select graphic
- Call wTypeKeys ("<SHIFT F4>")
-
- printlog "Check that the Title and Description fields have been saved correctly"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems picture is not selected => Description Object could not be opened"
- endcatch
-
- Kontext "DescriptionObject"
- if DescriptionTitle.Gettext <> "TitleText" then
- Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext
- endif
- if DescriptionText.Gettext <> "This Is A Description" then
- warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext
- endif
- DescriptionObject.Cancel
-
- printlog "- Format - Picture"
- FormatGraphics
- Kontext
- Active.Setpage TabZusaetze
- Kontext "TabZusaetze"
- if Alternativtext.Gettext <> "TitleText" then
- Warnlog "Alternatice text in pictures options is not set after save and reload"
- endif
- TabZusaetze.Cancel
-
- printlog "- close document"
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tFrameAlternativeText
-
- printlog "- New writer document"
- Call hNewDocument
-
- printlog "- Insert a frame"
- Call wInsertFrame
-
- printlog "- Context menu on the frame, choose 'Description'"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems Frame is not selected => Description Object could not be opened"
- endcatch
-
- printlog "- Type 'TitleText' in the Title field"
- Kontext "DescriptionObject"
- DescriptionTitle.Settext "TitleText"
-
- printlog "- Type 'This Is A Description'"
- DescriptionText.Settext "This Is A Description"
-
- printlog "- Close the dialog"
- DescriptionObject.Ok
-
- printlog "- Context menu on the frame, choose 'Description'"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems frame is not selected => Description Object could not be opened"
- endcatch
-
- printlog "Check that the Title and Description fields have been saved correctly"
- Kontext "DescriptionObject"
- if DescriptionTitle.Gettext <> "TitleText" then
- Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext
- endif
- if DescriptionText.Gettext <> "This Is A Description" then
- warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext
- endif
- DescriptionObject.Cancel
-
- printlog "- Save the document"
- Call hFileSaveAsKill ( gOfficePath + "user\work\tFrameAlternativeText.odt" )
- Call hCloseDocument
-
- printlog "- Reload"
- hFileOpen( gOfficePath + "user\work\tFrameAlternativeText.odt" )
- ' select frame
- Call wTypeKeys ("<SHIFT F4>")
-
- printlog "Check that the Title and Description fields have been saved correctly"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems frame is not selected => Description Object could not be opened"
- endcatch
-
- Kontext "DescriptionObject"
- if DescriptionTitle.Gettext <> "TitleText" then
- Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext
- endif
- if DescriptionText.Gettext <> "This Is A Description" then
- warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext
- endif
- DescriptionObject.Cancel
-
- printlog "- close document"
- Call hCloseDocument
-
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tOLEAlternativeText
-
- printlog "- New writer document"
- Call hNewDocument
-
- printlog "- Insert a OLE"
- InsertObjectOLEObject
- Kontext "OLEObjektEinfuegen"
- NeuErstellen.Check
- OLEObjektEinfuegen.Ok
- Sleep 2
- Call gMouseClick (10,10)
- Call wTypeKeys "<SHIFT F4>"
-
- printlog "- Context menu on the OLE, choose 'Description'"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems OLE is not selected => Description Object could not be opened"
- endcatch
-
- printlog "- Type 'TitleText' in the Title field"
- Kontext "DescriptionObject"
- DescriptionTitle.Settext "TitleText"
-
- printlog "- Type 'This Is A Description'"
- DescriptionText.Settext "This Is A Description"
-
- printlog "- Close the dialog"
- DescriptionObject.Ok
-
- printlog "- Context menu on the OLE, choose 'Description'"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems OLE is not selected => Description Object could not be opened"
- endcatch
-
- printlog "Check that the Title and Description fields have been saved correctly"
- Kontext "DescriptionObject"
- if DescriptionTitle.Gettext <> "TitleText" then
- Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext
- endif
- if DescriptionText.Gettext <> "This Is A Description" then
- warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext
- endif
- DescriptionObject.Cancel
-
- printlog "- Save the document"
- Call hFileSaveAsKill ( gOfficePath + "user\work\tOLEAlternativeText.odt" )
- Call hCloseDocument
-
- printlog "- Reload"
- hFileOpen( gOfficePath + "user\work\tOLEAlternativeText.odt" )
- ' select OLE
- Call wTypeKeys ("<SHIFT F4>")
-
- printlog "Check that the Title and Description fields have been saved correctly"
- try
- ContextDescriptionObject
- catch
- Warnlog "Seems OLE is not selected => Description Object could not be opened"
- endcatch
-
- Kontext "DescriptionObject"
- if DescriptionTitle.Gettext <> "TitleText" then
- Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext
- endif
- if DescriptionText.Gettext <> "This Is A Description" then
- warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext
- endif
- DescriptionObject.Cancel
-
- printlog "- close document"
- Call hCloseDocument
-
-endcase \ No newline at end of file
diff --git a/testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc b/testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc
deleted file mode 100644
index 694c3dec0de4..000000000000
--- a/testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc
+++ /dev/null
@@ -1,1446 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the AutoCorrect/AutoFormat/Options
-'*
-'\***********************************************************************
-
-sub w_autocorrect1
-
- printLog Chr(13) + "- Test the AutoCorrect/AutoFormat Options features"
-
- Call tReplaceDashes_1 'Replace all of dashes
- '## Tab page Options in Tools/Autocorrect|Autoformat ##
- Call tToolsAutocorrectOptions_1 'Use Replacement table
- Call tToolsAutocorrectOptions_2 'Correct TWo INitial CApital
- Call tToolsAutocorrectOptions_3 'Capitalize first letter of every setence
- Call tToolsAutocorrectOptions_4_1 'Automatic bold
- Call tToolsAutocorrectOptions_4_2 'Automatic underline
- Call tToolsAutocorrectOptions_5 'URL Recognition
- Call tToolsAutocorrectOptions_6 'Replace dashes
- Call tToolsAutocorrectOptions_7 'Ignore double spaces
- Call tToolsAutocorrectOptions_8 'Apply numbering
- Call tToolsAutocorrectOptions_9 'Apply Border
- Call tToolsAutocorrectOptions_10 'Create Table
- Call tToolsAutocorrectOptions_11 'Remove Blank Paragraphs
- Call tToolsAutocorrectOptions_12 'Replace bullets with •
- Call tToolsAutocorrectOptions_13 'Replace standard quotes with custom quotes
-
-end sub
-
-'-------------------------------------------------------------------------
-
-testcase tReplaceDashes_1
-
- Dim testWord as string, testResult as String
- Dim i as Integer
- Dim j as Integer
-
- printLog "Replace dashes test"
- '/// Replace dashes test
- '/// - "Bla - Bla" One short line between two words (with Blank before and after)
- '/// - "Bla--Bla" Dashes lines between two words (without Blanks)
- '/// - "Helen and --Tom" Dashes Lines before a Word (one Blank before, none after)
- '/// - "(Bla--Bla)" Testing Text in brackets ( )
- '/// - "[Bla--Bla]" Testing Text in brackets [ ]
- '/// - "{Bla--Bla}" Testing Text in brackets { }
-
- Call hNewDocument
-
- For i = 1 to 6
- Select Case i
- Case 1 : testWord = "Bla - Bla" : testResult = "Bla – Bla"
- Case 2 : testWord = "Bla--Bla" : testResult = "Bla—Bla"
- Case 3 : testWord = "Helen and --Tom" : testResult = "Helen and –Tom"
- Case 4 : testWord = "(Bla--Bla)" : testResult = "(Bla—Bla)"
- Case 5 : testWord = "[Bla--Bla]" : testResult = "[Bla—Bla]"
- Case 6 : testWord = "{Bla--Bla}" : testResult = "{Bla—Bla}"
- end select
-
- printlog "- Replace dashes " & testword & " => " & testResult
- Call wTypeKeys testWord
- Call wTypeKeys " "
- Sleep 1
- Call wTypeKeys "<Left><Shift Home>"
- EditCopy
- if GetClipboardText <> testResult then Warnlog "Something wrong in the test for " + testWord(i)
- Call wTypeKeys "<DELETE>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_1
-
- printLog "Test 'Use Replacement table'"
- '/// Test 'Use Replacement table'
- Call hNewDocument
- '/// Insert new test word in replacement table
- '/// Tools/AutoCorrect / Replace , insert new test words in new and replace ,
- '/// + and press button New.
- ToolsAutoCorrect
- Kontext
- Active.SetPage TabErsetzung
- Kontext "TabErsetzung"
- Kuerzel.SetText "Aabbcc"
- ErsetzenDurch.SetText "Aaccbb"
- Sleep 1
- try
- Neu.Click
- catch
- Warnlog "Seems settings are already made. Please remove entries from replacement table"
- endcatch
- Sleep 1
- TabErsetzung.OK
-
- printlog "- M:Y T:Y (default)"
- ToolsAutoCorrect
- Kontext
- Active.SetPage TabOptionenAutokorrektur
- Kontext "TabOptionenAutokorrektur"
- if Einstellungen.IsChecked(1,2) = FALSE then
- Warnlog "First Checkbox not checked by default"
- Einstellungen.Check(1,2)
- endif
- if Einstellungen.IsChecked(1,3) = FALSE then
- Warnlog "Second Checkbox not checked by default"
- Einstellungen.Check(1,3)
- endif
- TabOptionenAutokorrektur.Ok
-
- Call wTypeKeys "Aabbcc"
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> "Aaccbb" then Warnlog "Something wrong in Use Replacement table when M:Y T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- printlog "- M:Y T:N"
- Call fAutocorrectOptions("UseReplacementTable", 1, 0)
-
- Call wTypeKeys "Aabbcc"
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
-
- EditCopy
- if GetClipboardText <> "Aabbcc" then
- Warnlog "The content should NOT be changed before Autoformat! M:Y T:N"
- else
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Home><Shift End>"
- GetClipboardText = ""
- EditCopy
- if GetClipboardText <> "Aaccbb" then
- Warnlog "The content should be changed after Autoformat!M:Y T:N"
- end if
- end if
-
- Call wTypeKeys "<DELETE>"
-
- printlog "- M:N T:Y"
- Call fAutocorrectOptions("UseReplacementTable", 0, 1)
-
- Call wTypeKeys "Aabbcc"
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- GetClipboardText = ""
- EditCopy
- if GetClipboardText <> "Aaccbb" then Warnlog "Something wrong in Use Replacement table when M:N T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- printlog "- M:N T:N"
- Call fAutocorrectOptions("UseReplacementTable", 0, 0)
-
- Call wTypeKeys "Aabbcc"
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> "Aabbcc" then
- Warnlog "The content should NOT be changed before Autoformat! M:N T:N"
- Call hCloseDocument
- goto endsub
- else
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Home><Shift End>"
- GetClipboardText = ""
- EditCopy
- if GetClipboardText <> "Aabbcc" then
- Warnlog "The content should NOT be changed after Autoformat! M:N T:N"
- end if
- end if
-
- printlog "- Recover to the default M:Y T:Y"
- Call fAutocorrectOptions("UseReplacementTable", 1, 1)
-
- 'remove the test words which you insert in the replacement table
- Dim i as Integer
- ToolsAutoCorrect
- Kontext
- Active.SetPage TabErsetzung
- Kontext "TabErsetzung"
- for i =1 to Liste.GetItemCount
- if Kuerzel.GetText = "Aabbcc" then
- i = Liste.GetItemCount + 1
- Loeschen.Click
- else
- Liste.Typekeys "<Down>"
- end if
- next i
- TabErsetzung.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_2
-
- Dim testContent as String
- Dim hopeResult as String
- Dim hopeResultBeforeAutoformat as String
- Dim hopeResultAfterAutoformat as String
-
- printLog "Test 'Correct TWo INitial CApital' "
- '/// Test 'Correct TWo INitial CApital'
- Call hNewDocument
-
- '/// M:Y T:Y (default)
- testContent = "TEst"
- hopeResult = "Test"
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Correct TWo INitial CApital when M:Y T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:Y T:N
- testContent = "TEst"
- hopeResultBeforeAutoformat = "TEst"
- hopeResultAfterAutoformat = "Test"
-
- Call fAutocorrectOptions("CorrectTWoINitialCApitals",1,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
-
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:Y T:N"
- goto GOING1
- end if
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should be changed after Autoformat!M:Y T:N"
- end if
-
- GOING1:
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:Y
- testContent = "TEst"
- hopeResult = "Test"
-
- Call fAutocorrectOptions("CorrectTWoINitialCApitals",0,1)
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Correct TWo INitial CApital when M:N T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:N
- testContent = "TEst"
- hopeResultBeforeAutoformat = "TEst"
- hopeResultAfterAutoformat = "TEst"
-
- Call fAutocorrectOptions("CorrectTWoINitialCApitals",0,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:N T:N"
- Call hCloseDocument
- end if
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should NOT be changed after Autoformat! M:N T:N"
- end if
-
- '/// Recover to the default M:Y T:Y
- Call fAutocorrectOptions("CorrectTWoINitialCApitals",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_3
-
- Dim testContent as String
- Dim hopeResult as String
- Dim hopeResultBeforeAutoformat as String
- Dim hopeResultAfterAutoformat as String
-
- printLog "Test 'Capitalize first letter of every setence'"
- '/// Test 'Capitalize first letter of every setence'
- Call hNewDocument
-
- '/// M:Y T:Y (default)
- testContent = "the test for StarOffice automation. who is the author?"
- hopeResult = "The test for StarOffice automation. Who is the author?"
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Capitalize first letter of every setence when M:Y T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:Y T:N
- testContent = "the test for StarOffice automation. who is the author?"
- hopeResultBeforeAutoformat = "the test for StarOffice automation. who is the author?"
- hopeResultAfterAutoformat = "The test for StarOffice automation. Who is the author?"
-
- Call fAutocorrectOptions("CapitalizeFirstLetter",1,0)
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:Y T:N"
- goto GOING1
- end if
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should be changed after Autoformat!M:Y T:N"
- end if
-
-GOING1:
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:Y
- testContent = "the test for StarOffice automation. who is the author?"
- hopeResult = "The test for StarOffice automation. Who is the author?"
-
- Call fAutocorrectOptions("CapitalizeFirstLetter",0,1)
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Capitalize first letter of every setence when M:N T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- '/// test 'Capitalize first letter of every setence' , M:N T:N
- testContent = "the test for StarOffice automation. who is the author?"
- hopeResultBeforeAutoformat = "the test for StarOffice automation. who is the author?"
- hopeResultAfterAutoformat = "the test for StarOffice automation. who is the author?"
-
- Call fAutocorrectOptions("CapitalizeFirstLetter",0,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:N T:N"
- goto testend
- end if
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should NOT be changed after Autoformat! M:N T:N"
- end if
-
-testend:
-
- '/// Recover to the default
- Call fAutocorrectOptions("CapitalizeFirstLetter",1,1)
-
- Call hCloseDocument
-
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_4_1
-
- Dim testContent as String
- Dim hopeResult as String
- Dim hopeResultBeforeAutoformat as String
- Dim hopeResultAfterAutoformat as String
- Dim getStyle as String
- Dim hopeStyle as String
-
- printLog "Test 'Automatic bold and underline' --- bold "
- '/// Test 'Automatic bold'
- Call hNewDocument
-
- '/// M:Y T:Y (default)
- testContent = "*Test*"
- hopeResult = "Test"
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Automatic bold when M:Y T:Y"
-
- fFormatCharacter("TabFont")
-
- try
- getStyle = Style.GetSelText
- Style.Select 3
- hopeStyle = Style.GetSelText
- catch
- getStyle = StyleWest.GetSelText
- StyleWest.Select 3
- hopeStyle = StyleWest.GetSelText
- endcatch
- Sleep 1
-
- if getStyle <> hopeStyle then Warnlog "The style is NOT bold style when M:Y T:Y"
-
- try
- Style.Select 1
- catch
- StyleWest.Select 1
- endcatch
- Sleep 1
-
- TabFont.OK
- Sleep 1
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:Y T:N
- testContent = "*Test*"
- hopeResultBeforeAutoformat = "*Test*"
- hopeResultAfterAutoformat = "Test"
-
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",1,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
-
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:Y T:N"
- goto GOING1
- end if
-
- fFormatCharacter("TabFont")
-
- try
- getStyle = Style.GetSelText
- Style.Select 1
- hopeStyle = Style.GetSelText
- catch
- getStyle = StyleWest.GetSelText
- StyleWest.Select 1
- hopeStyle = StyleWest.GetSelText
- endcatch
- Sleep 1
-
- if getStyle <> hopeStyle then Warnlog "The style should be standard style before autoformat!"
- TabFont.Cancel
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should be changed after Autoformat!M:Y T:N"
- end if
-
- Call fFormatCharacter("TabFont")
-
- try
- getStyle = Style.GetSelText
- Style.Select 3
- hopeStyle = Style.GetSelText
- catch
- getStyle = StyleWest.GetSelText
- StyleWest.Select 3
- hopeStyle = StyleWest.GetSelText
- endcatch
- Sleep 1
-
- if getStyle <> hopeStyle then Warnlog "The style is NOT bold style when M:Y T:Y"
-
- try
- Style.Select 1
- catch
- StyleWest.Select 1
- endcatch
- Sleep 1
-
- TabFont.OK
- Sleep 1
-
- GOING1:
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:Y
- testContent = "*Test*"
- hopeResult = "Test"
-
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",0,1)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Automatic bold when M:Y T:Y"
-
- Call fFormatCharacter("TabFont")
-
- try
- getStyle = Style.GetSelText
- Style.Select 3
- hopeStyle = Style.GetSelText
- catch
- getStyle = StyleWest.GetSelText
- StyleWest.Select 3
- hopeStyle = StyleWest.GetSelText
- endcatch
- Sleep 1
-
- if getStyle <> hopeStyle then Warnlog "The style is NOT bold style when M:Y T:Y"
- try
- Style.Select 1
- catch
- StyleWest.Select 1
- endcatch
- TabFont.OK
- Sleep 1
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:N
- testContent = "*Test*"
- hopeResultBeforeAutoformat = "*Test*"
- hopeResultAfterAutoformat = "*Test*"
-
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",0,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:N T:N"
- goto testend
- end if
-
- Call fFormatCharacter("TabFont")
-
- try
- getStyle = Style.GetSelText
- Style.Select 1
- hopeStyle = Style.GetSelText
- catch
- getStyle = StyleWest.GetSelText
- StyleWest.Select 1
- hopeStyle = StyleWest.GetSelText
- endcatch
- Sleep 1
-
- if getStyle <> hopeStyle then Warnlog "The style should be standard style before autoformat!"
- TabFont.Cancel
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should NOT be changed after Autoformat! M:N T:N"
- end if
-
- Call fFormatCharacter("TabFont")
-
- try
- getStyle = Style.GetSelText
- Style.Select 1
- hopeStyle = Style.GetSelText
- catch
- getStyle = StyleWest.GetSelText
- StyleWest.Select 1
- hopeStyle = StyleWest.GetSelText
- endcatch
- Sleep 1
-
- if getStyle <> hopeStyle then Warnlog "The style should be standard style after autoformat!"
- TabFont.OK
- Sleep 1
-
- testend:
- '/// Recover to the default M:Y T:Y
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_4_2
-
- Dim testContent as String
- Dim hopeResult as String
- Dim hopeResultBeforeAutoformat as String
- Dim hopeResultAfterAutoformat as String
- Dim getUnderlineStatus as Integer
- Dim hopeUnderlineStatus as Integer ' 1 = without , 2 = single
-
- printLog "Test 'Automatic bold and underline' --- underline "
- '/// Test 'Automatic underline'
- Call hNewDocument
-
- '/// M:Y T:Y (default)
- testContent = "_Test_"
- hopeResult = "Test"
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Automatic underline when M:Y T:Y"
-
- Call fFormatCharacter("TabFontEffects")
-
- getUnderlineStatus = Underline.GetSelIndex
- Underline.Select 2
- hopeUnderlineStatus = Underline.GetSelIndex
-
- if getUnderlineStatus <> hopeUnderlineStatus then Warnlog "The content is NOT underlined when M:Y T:Y"
- Underline.Select 1
- TabFontEffects.OK
- Sleep 1
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:Y T:N
- testContent = "_Test_"
- hopeResultBeforeAutoformat = "_Test_"
- hopeResultAfterAutoformat = "Test"
-
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",1,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
-
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:Y T:N"
- goto GOING1
- end if
-
- Call fFormatCharacter("TabFontEffects")
-
- getUnderlineStatus = Underline.GetSelIndex
- Underline.Select 1
- Sleep 1
- hopeUnderlineStatus = Underline.GetSelIndex
-
- if getUnderlineStatus <> hopeUnderlineStatus then Warnlog "The content should NOT be underlined when M:Y T:N before autoformat!"
- TabFontEffects.OK
- Sleep 1
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should be changed after Autoformat!M:Y T:N"
- end if
-
- Call fFormatCharacter("TabFontEffects")
- getUnderlineStatus = Underline.GetSelIndex
- Underline.Select 2
- hopeUnderlineStatus = Underline.GetSelIndex
-
- if getUnderlineStatus <> hopeUnderlineStatus then Warnlog "The content should be underlined when M:Y T:N"
- Underline.Select 1
- TabFontEffects.OK
- Sleep 1
- GOING1:
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:Y
- testContent = "_Test_"
- hopeResult = "Test"
-
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",0,1)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Automatic bold when M:N T:Y"
-
- Call fFormatCharacter("TabFontEffects")
- getUnderlineStatus = Underline.GetSelIndex
- Underline.Select 2
- Sleep 1
- hopeUnderlineStatus = Underline.GetSelIndex
-
- if getUnderlineStatus <> hopeUnderlineStatus then Warnlog "The content is NOT underlined when M:N T:Y"
- Underline.Select 1
- Sleep 1
- TabFontEffects.OK
- Sleep 1
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:N
- testContent = "_Test_"
- hopeResultBeforeAutoformat = "_Test_"
- hopeResultAfterAutoformat = "_Test_"
-
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",0,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:N T:N"
- goto testend
- end if
-
- Call fFormatCharacter("TabFontEffects")
- getUnderlineStatus = Underline.GetSelIndex
- Underline.Select 1
- hopeUnderlineStatus = Underline.GetSelIndex
-
- if getUnderlineStatus <> hopeUnderlineStatus then Warnlog "The content should NOT be underlined before autoformat!M:N T:N "
- TabFontEffects.OK
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should NOT be changed after Autoformat! M:N T:N"
- end if
-
- Call fFormatCharacter("TabFontEffects")
- getUnderlineStatus = Underline.GetSelIndex
- Underline.Select 1
- Sleep 1
- hopeUnderlineStatus = Underline.GetSelIndex
-
- if getUnderlineStatus <> hopeUnderlineStatus then Warnlog "The content should NOT be underlined after autoformat! M:N T:N"
- TabFontEffects.OK
- Sleep 1
-
- testend:
- '/// Recover to the default M:Y T:Y
- Call fAutocorrectOptions("AutomaticBoldAndUnderline",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_5
-
- Dim testContent as String
- Dim hopeResult as String
- Dim hopeResultBeforeAutoformat as String
- Dim hopeResultAfterAutoformat as String
-
- printLog "URL Recognition"
- '/// URL Recognition
- Call hNewDocument
-
- '/// M:Y T:Y (default)
- testContent = "WWW.sun.com"
- hopeResult = "http://WWW.sun.com/"
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<Home>"
-
- Call fFormatCharacter("TabHyperlinkZeichen")
- if URLName.GetText <> hopeResult then Warnlog "The URL is NOT appeared when M:Y T:Y"
- URLName.SetText ""
- TabHyperlinkZeichen.OK
-
- Call hCloseDocument
-
- Call hNewDocument
- '/// M:Y T:N
- testContent = "WWW.sun.com"
- hopeResultBeforeAutoformat = ""
- hopeResultAfterAutoformat = "http://WWW.sun.com/"
-
- Call fAutocorrectOptions("URLRecognition",1,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<Home>"
-
- Call fFormatCharacter("TabHyperlinkZeichen")
- if URLName.GetText <> hopeResultBeforeAutoformat then Warnlog "The URL should NOT appeare when M:Y T:N before autoformat!"
- URLName.SetText ""
- TabHyperlinkZeichen.OK
-
- FormatAutoformatApply
-
- Call fFormatCharacter("TabHyperlinkZeichen")
- if URLName.GetText <> hopeResultAfterAutoformat then Warnlog "The URL should appeare when M:Y T:N after autoformat!"
- URLName.SetText ""
- TabHyperlinkZeichen.OK
-
- Call hCloseDocument
-
- Call hNewDocument
- '/// M:N T:Y
- testContent = "WWW.sun.com"
- hopeResult = "http://WWW.sun.com/"
-
- Call fAutocorrectOptions("URLRecognition",0,1)
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<Home>"
-
- Call fFormatCharacter("TabHyperlinkZeichen")
- if URLName.GetText <> hopeResult then Warnlog "The URL is NOT appeared when M:N T:Y"
- URLName.SetText ""
- TabHyperlinkZeichen.OK
-
- Call hCloseDocument
-
- Call hNewDocument
- '/// M:N T:N
- testContent = "WWW.sun.com"
- hopeResultBeforeAutoformat = ""
- hopeResultAfterAutoformat = ""
-
- Call fAutocorrectOptions("URLRecognition",0,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<Home>"
-
- Call fFormatCharacter("TabHyperlinkZeichen")
- if URLName.GetText <> hopeResultBeforeAutoformat then Warnlog "The URL should NOT appeare when M:N T:N before autoformat!"
- URLName.SetText ""
- TabHyperlinkZeichen.OK
-
- FormatAutoformatApply
-
- Call fFormatCharacter("TabHyperlinkZeichen")
- if URLName.GetText <> hopeResultAfterAutoformat then Warnlog "The URL should NOT appeare when M:N T:N after autoformat!"
- URLName.SetText ""
- TabHyperlinkZeichen.OK
-
- '/// Recover to the default M:Y T:Y
- Call fAutocorrectOptions("URLRecognition",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_6
-
- Dim testContent as String
- Dim hopeResult as String
- Dim hopeResultBeforeAutoformat
- Dim hopeResultAfterAutoformat as String
-
- printLog "Replace dashes"
- '/// Replace dashes
- Call hNewDocument
-
- '/// M:Y T:Y (default)
- testContent = "Bla - Bla"
- hopeResult = "Bla – Bla"
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Replace dashes M:Y T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:Y T:N
- testContent = "Bla - Bla"
- hopeResultBeforeAutoformat = "Bla - Bla"
- hopeResultAfterAutoformat = "Bla – Bla"
-
- Call fAutocorrectOptions("ReplaceDashes",1,0)
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:Y T:N"
- goto GOING1
- end if
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should be changed after Autoformat!M:Y T:N"
- end if
-
- GOING1:
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:Y
- testContent = "Bla - Bla"
- hopeResult = "Bla – Bla"
-
- Call fAutocorrectOptions("ReplaceDashes",0,1)
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Something wrong in Replace dashes when M:N T:Y"
-
- Call wTypeKeys "<DELETE>"
-
- '/// M:N T:N
- testContent = "Bla - Bla"
- hopeResultBeforeAutoformat = "Bla - Bla"
- hopeResultAfterAutoformat = "Bla - Bla"
-
- Call fAutocorrectOptions("ReplaceDashes",0,0)
-
- Call wTypeKeys testContent
- Call wTypeKeys " "
- Call wTypeKeys "<BACKSPACE><Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then
- Warnlog "The content should NOT be changed before Autoformat! M:N T:N"
- goto testend
- end if
-
- Call wTypeKeys "<ESCAPE>"
- FormatAutoformatApply
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then
- Warnlog "The content should NOT be changed after Autoformat! M:N T:N"
- end if
-
- testend:
-
- '/// Recover to the default
- Call fAutocorrectOptions("ReplaceDashes",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_7
-
- Dim testContent as String
- Dim hopeResult as String
-
- printLog "Ignore double spaces"
- '/// Ignore double spaces
- Call hNewDocument
-
- '/// + T:N (default)
- testContent = "Two Space"
- hopeResult = "Two Space"
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> hopeResult then Warnlog "Should NOT ignore spaces T:N"
-
- Call wTypeKeys "<DELETE>"
-
- '/// + T:Y
- testContent = "Two Space"
- hopeResult = "Two Space"
-
- Call fAutocorrectOptions("IgnoreDoubleSpaces",1,1)
- Call wTypeKeys testContent
- Call wTypeKeys "<Shift Home>"
- EditCopy
-
- if GetClipboardText <> hopeResult then Warnlog "Should ignore spaces T:Y"
-
- Call wTypeKeys "<ESCAPE>"
-
- '/// Recover to the default
- Call fAutocorrectOptions("IgnoreDoubleSpaces",0,0)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_8
-
- Dim firstLine as String
- Dim testContent as String
- Dim hopeResult as String
-
- printLog "Apply numbering"
- '/// Apply numbering
-
- Call hNewDocument
-
- '/// + T:Y (default)
-
- firstLine = "1. FirstLine"
- testContent = "Test1"
- hopeResult = "2. Test1"
-
- Call wTypeKeys firstLine
- Call wTypeKeys "<Return>"
- Call wTypeKeys testContent
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Mod1 Shift Up>"
- EditCopy
- printlog GetClipBoardtext
- if GetClipboardText <> hopeResult then Warnlog "Should Apply numbering when T:Y. Not " & hopeResult & " but " & GetClipboardtext
-
- EditSelectAll
- Call wTypeKeys "<DELETE>"
- Call wTypeKeys "<BACKSPACE>",3
-
- '/// + T:N
- testContent = "Test1"
- hopeResult = "Test1"
-
- Call fAutocorrectOptions("ApplyNumbering",0,0)
- Call wTypeKeys firstLine
- Call wTypeKeys "<Return>"
- Call wTypeKeys testContent
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Mod1 Shift Up>"
- EditCopy
-
- if GetClipboardText <> hopeResult then Warnlog "Should NOT Apply numbering when T:N. Not " & hopeResult & " but " & GetClipboardtext
-
- '/// Recover to the default
- Call fAutocorrectOptions("ApplyNumbering",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_9
-
- Dim testList() as String
- Dim testContent as String
- Dim hopeResult as String
- Dim i as integer
- Dim bottom as String
-
- bottom = "0" + gSeperator + "10" + gMeasurementUnit
-
- testList = Array( "---", "___", "===", "***", "~~~" , "###" )
-
- '/// Apply border test , including
- '/// + '---' , '___", "===", "***" , "~~~", "###"
- printLog "Apply border"
-
- Call hNewDocument
-
- For i = 0 to 5
-
- printlog testlist(i)
- printlog "- T:Y (default)"
- testContent = testlist(i)
-
- Call wTypeKeys testContent
- Call wTypeKeys "<Return><Up><Home><Shift End>"
- try
- EditCopy
- Warnlog "Apply border is NOT correct when T:Y " +testlist(i)
- catch
- endcatch
-
- Call fFormatParagraph("TabUmrandung")
- try
- Unten.SetText bottom
- catch
- Warnlog "Apply border is NOT correct when T:Y " +testlist(i)
- endcatch
- TabUmrandung.Cancel
-
- Call wTypeKeys "<Down>"
-
- printlog "- T:N"
- testContent = testlist(i)
- hopeResult = testlist(i)
-
- Call fAutocorrectOptions("ApplyBorder",0,0)
- Call wTypeKeys testContent
- Call wTypeKeys "<Return><Up><Home><Shift End>"
- EditCopy
-
- if GetClipboardText <> hopeResult then Warnlog "Something wrong when T:N "+testlist(i)
-
- Call fFormatParagraph("TabUmrandung")
- try
- Unten.SetText bottom
- Warnlog "Apply border is NOT correct when T:N "+testlist(i)
- catch
- endcatch
- TabUmrandung.Cancel
-
- printlog "- Recover to the default"
- Call fAutocorrectOptions("ApplyBorder",1,1)
-
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_10
-
- Dim testContent as String
- Dim hopeResult as String
-
- printLog "Create Table"
- '/// Create Table
- Call hNewDocument
-
- '/// + T:Y (default)
- testContent = "+---+"
- Call wTypeKeys testContent
- Call wTypeKeys "<Return><Up><Home><Shift End>"
- try
- EditCopy
- Warnlog "Something wrong in create table T:Y"
- catch
- endcatch
-
- try
- FormatRowDelete
- Sleep 1
- catch
- Warnlog "Can't delete table ,T:Y"
- endcatch
-
- '/// + T:N
- testContent = "+---+"
- hopeResult = "+---+"
-
- Call fAutocorrectOptions("CreateTable",0,0)
- Call wTypeKeys testContent
- Call wTypeKeys "<Return><Up><Home><Shift End>"
- EditCopy
-
- if GetClipboardText <> hopeResult then Warnlog "Something wrong when T:N"
-
- try
- FormatRowDelete
- Sleep 1
- Warnlog "Should NOT generate table when T:N"
- catch
- endcatch
-
- '/// Recover to the default
- Call fAutocorrectOptions("CreateTable",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_11
-
- Dim testContent1 as String
- Dim testContent2 as String
- Dim hopeResultAfterAutoformat1 as String
- Dim hopeResultAfterAutoformat2 as String
-
- testContent1 = "ABCD1234"
- testContent2 = "EFGH5678"
-
- hopeResultAfterAutoformat1 = "ABCD1234"
- hopeResultAfterAutoformat2 = "EFGH5678"
-
- printLog "Remove Blank Paragraphs"
- '/// Remove Blank Paragraphs
-
- Call hNewDocument
-
- '/// M:N (default)
- Call wTypeKeys testContent1
- Call wTypeKeys "<Return>",2
- Call wTypeKeys testContent2
-
- FormatAutoformatApply
-
- Call wTypeKeys "<Up><Up><Home><Shift End>"
- wait 200
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat1 then Warnlog "the first line's content is NOT correct when M:N"
-
- Call wTypeKeys "<Down><Home><Shift End>"
- try
- EditCopy
- Warnlog "the second line's content is NOT correct when M:N"
- catch
- endcatch
-
- Call wTypeKeys "<Down><Home><Shift End>"
- wait 200
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat2 then Warnlog "the third line's content is NOT correct when M:N"
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// M:Y
- Call fAutocorrectOptions("RemoveBlankParagraphs",1,1)
-
- Call wTypeKeys testContent1
- Call wTypeKeys "<Return>",2
- Call wTypeKeys testContent2
-
- FormatAutoformatApply
-
- Call wTypeKeys "<Up><Up><Home><Shift End>"
- wait 200
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat1 then Warnlog "the first line's content is NOT correct when M:Y"
-
- Call wTypeKeys "<Down><Home><Shift End>"
- wait 200
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat2 then Warnlog "the second line's content is NOT correct when M:Y"
-
- '/// Recover to the default
- Call fAutocorrectOptions("RemoveBlankParagraphs",0,0)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_12
-
- Dim testContent as String
- Dim hopeResultBeforeAutoformat as String
- Dim hopeResultAfterAutoformat as String
-
- printLog "Replace bullets with •"
- '/// Replace bullets with •
-
- Call hNewDocument
-
- '/// M:Y (default)
- printLog "M:Y (default)"
- testContent = "+ Hello"
- hopeResultBeforeAutoformat = "+ Hello"
- hopeResultAfterAutoformat = "• Hello"
-
- Call wTypeKeys testContent
- wait 100
- Call wTypeKeys "<Shift Home>"
- Sleep 1
- GetClipboardText = ""
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then Warnlog "should NOT change before autoformat "
-
- FormatAutoformatApply
-
- Call wTypeKeys "<Home><Shift End>"
- Sleep 1
- GetClipboardText = ""
- EditCopy
- Sleep 1
- if GetClipboardText <> hopeResultAfterAutoformat then Warnlog "should change after autoformat "
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// M:N
- printLog "M:N"
- testContent = "+ Hello"
- hopeResultBeforeAutoformat = "+ Hello"
- hopeResultAfterAutoformat = "+ Hello"
-
- Call fAutocorrectOptions("ReplaceBullets",0,0)
-
- Call wTypeKeys testContent
- wait 100
- Call wTypeKeys "<Shift Home>"
- Sleep 1
- GetClipboardText = ""
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then Warnlog "Should NOT change before autoformat "
-
- FormatAutoformatApply
- Sleep 1
- Call wTypeKeys "<Home><Shift End>"
- Sleep 1
- GetClipboardText = ""
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then Warnlog "Should NOT change after autoformat "
-
- '/// Recover to the default
- Call fAutocorrectOptions("ReplaceBullets",1,1)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectOptions_13
-
- Dim testContent as String
- Dim hopeResultBeforeAutoformat as String
- Dim hopeResultAfterAutoformat as String
-
- printLog "Replace standard quotes with custom quotes"
- '/// Replace standard quotes with custom quotes
-
- Call hNewDocument
-
- '/// M:Y (default)
- testContent = "'"
- hopeResultBeforeAutoformat = "'"
- hopeResultAfterAutoformat = "["
-
- ToolsAutoCorrect
- Kontext
- Active.SetPage TabLocalizedOptions
- Kontext "TabLocalizedOptions"
- SingleQuotesReplace.UnCheck
- SingleQuotesStart.Click
- Kontext "Sonderzeichen"
- Schriftliste.TypeKeys "<PageUp><Home>"
- Schriftliste.TypeKeys "<Right>", 59 ' is [
- Schriftliste.TypeKeys "<Space>"
- Sonderzeichen.OK
-
- Kontext "TabLocalizedOptions"
- TabLocalizedOptions.OK
-
- Call wTypeKeys (testContent + "Hello")
- wait 100
- Call wTypeKeys "<Home><Shift Right>"
- Sleep 1
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then Warnlog "Should NOT change before autoformat "
-
- FormatAutoformatApply
-
- Call wTypeKeys "<Home><Shift Right>"
- Sleep 1
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then Warnlog "Should change after autoformat "
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// M:N
- testContent = "'"
- hopeResultBeforeAutoformat = "'"
- hopeResultAfterAutoformat = "'"
-
- Call fAutocorrectOptions("ReplaceQuotes",0,0)
-
- Call wTypeKeys (testContent + "Hello")
- wait 100
- Call wTypeKeys "<Home><Shift Right>"
- Sleep 1
- EditCopy
- if GetClipboardText <> hopeResultBeforeAutoformat then Warnlog "Should NOT change before autoformat "
-
- FormatAutoformatApply
-
- Call wTypeKeys "<Home><Shift Right>"
- Sleep 1
- EditCopy
- if GetClipboardText <> hopeResultAfterAutoformat then Warnlog "Should NOT change after autoformat "
-
- '/// Recover to the default
- Call fAutocorrectOptions("ReplaceQuotes",1,1)
-
- ToolsAutoCorrect
- Kontext
- Active.Setpage TabLocalizedOptions
- Kontext "TabLocalizedOptions"
- SingleQuotesReplace.Check
- SingleQuotesDefault.Click
- wait 100
- TabLocalizedOptions.OK
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/autocorrection/w_autocorrect2.inc b/testautomation/writer/optional/includes/autocorrection/w_autocorrect2.inc
deleted file mode 100644
index 88297c3aa709..000000000000
--- a/testautomation/writer/optional/includes/autocorrection/w_autocorrect2.inc
+++ /dev/null
@@ -1,474 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test AutoCorrect/AutoFormat/Word Completion
-'*
-'\***********************************************************************
-
-sub w_autocorrect2
-
- printLog Chr(13) + "- Test the AutoCorrect/AutoFormat Word Completion features"
- Call tToolsAutocorrectWordCompletion_1 'Check the default settings
- Call tToolsAutocorrectWordCompletion_2 'Check entries
- Call tToolsAutocorrectWordCompletion_3 'Check list of suggestions can be "scrolled"
- Call tToolsAutocorrectWordCompletion_4 'Test Max entries
- Call tToolsAutocorrectWordCompletion_5 'Check 'When closing a document, save the list for later use in other documents'
- Call tToolsAutocorrectWordCompletion_6
-
-end sub
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectWordCompletion_1
-
- Dim iAcceptWith as String
- Dim iEntriesNumber as Integer
- Dim sMinWordLength as String
- Dim sMaxEntries as String
- Dim sMinMaxEntries as String
-
- iAcceptWith = 2
- iEntriesNumber = 0
- sMinWordLength = "10"
- sMaxEntries = "500"
- sMinMaxEntries = "50"
-
- printLog "Check the default settings"
- '/// Check the default settings
- '/// - Check box "Enable word completion" (default: checked)
- '/// - Check box "Append Space" (default: unchecked)
- '/// - Check box "Show as tip" (default: unchecked)
- '/// - Check box "Collect Words" (default: checked)
- '/// - Check box "When closing a document, remove the words collected from it from the list" (default: unchecked)
- '/// - List box "Accept with" (Default = "Return")
- '/// - Spin box "minimal number of characters" default = 10
- '/// - Spin box "Max. entries" (default =500, minimum = 50)
- '/// - Box: "List of words collected" -- should be empty after Office restart.
-
- Call hNewDocument
- 'Delete all entries in the list
- Call fDeleteAllEntries()
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
-
- if WoerterErgaenzen.IsChecked = False then Warnlog "Complete words should be checked ."
- if AppendSpace.IsChecked = TRUE then Warnlog "Append space should be UNchecked ."
- if AlsTipphilfe.IsChecked = TRUE then Warnlog "Show as tip should be UNchecked ."
- if VorschlaegeSammeln.IsChecked <> TRUE then Warnlog "Collect suggestions should be checked ."
- if KeepList.IsChecked = TRUE then Warnlog "When closing a document, remove the words collected from it from the list should be unchecked ."
- if AnnehmenMit.GetSelIndex <> iAcceptWith then Warnlog "The Accept with should be 'Enter' ."
- if MinWortlaenge.GetText <> sMinWordLength then Warnlog "Min word length should be " + sMinWordLength
- if MaxEintraege.GetText <> sMaxEntries then Warnlog "Max entries should be " + sMaxEntries
- if GesammelteWorte.GetItemCount <> iEntriesNumber then Warnlog "Entries number should be " + iEntriesNumber
-
- MaxEintraege.SetText "49"
-
- TabWortergaenzung.OK
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if MaxEintraege.GetText <> sMinMaxEntries then Warnlog "Max entries should be " + sMinMaxEntries
- MaxEintraege.SetText sMaxEntries
- TabWortergaenzung.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectWordCompletion_2
-
- Dim iDefaultEntriesNumber as Integer
- Dim iEntriesNumber as Integer
- Dim i as Integer
- Dim sMinWordLength as String
-
- iDefaultEntriesNumber = 0
- iEntriesNumber = 3
- sMinWordLength = "5"
-
- printLog "Check the default settings"
- '/// Check entries
- '/// delete all entries first
- '/// input some test words
- '/// check if some words should are remembered in the entries
- '/// delete all entries
- '/// close and reopen dialog, check entries again
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\autocorrection\01.odt" )
-
- 'Delete all entries in the list
- Call fDeleteAllEntries()
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount <> 0 then
- Warnlog "Entries number should be " + iDefaultEntriesNumber
- Warnlog "No test for this case"
- TabWortergaenzung.Cancel
- Call hCloseDocument
- end if
- MinWortlaenge.SetText sMinWordLength
- TabWortergaenzung.OK
-
- Call wTypeKeys "Hello World ! This is a OpenOffice.org Test .<Return>"
- Sleep 3
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount <> 3 then Warnlog "Entries number should be " + iEntriesNumber
- for i = 1 to GesammelteWorte.GetItemCount
- GesammelteWorte.Select 1
- if EintragLoeschen.IsEnabled then
- EintragLoeschen.Click
- else
- i = GesammelteWorte.GetItemCount + 1
- end if
- next i
- TabWortergaenzung.OK
- Sleep 1
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount <> 0 then Warnlog "Entries number should be " + 0
- TabWortergaenzung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectWordCompletion_3
-
- Dim aTestWord() as String
- Dim sPartOfTestWord as String
- Dim i as Integer
- Dim j as integer
-
- aTestWord = Array( "accessibility", "accomplish", "accounting" )
-
- sPartOfTestWord = "acc"
-
- printLog "Check list of suggestions can be 'scrolled'"
- '/// Check list of suggestions can be 'scrolled'
-
- '/// input some test words with first 3 letters are same
- '/// forward with <CTRL-Tab>
- '/// backwards with <SHIFT-CTRL-Tab>
- '/// endless loop test
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\autocorrection\01.odt" )
-
- 'Delete all entries in the list
- Call fDeleteAllEntries()
-
- 'forward with <CTRL-Tab>
- For i = 0 to 2
- Call wTypeKeys aTestWord(i)
- Call wTypeKeys "<Return>"
- next i
- Sleep 2
-
- For i = 0 to 2
- Call wTypeKeys sPartOfTestWord
- if i > 0 then Call wTypeKeys "<MOD1 TAB>", i
- Sleep 2
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> aTestWord(i) then Warnlog "#102535# Should be " +aTestWord(i) +" but get " +GetClipboardText
- Call wTypeKeys "<Delete>"
- next i
-
- 'endless loop test
- Call wTypeKeys sPartOfTestWord
- Call wTypeKeys "<MOD1 TAB>", 3
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> aTestWord(0) then Warnlog "#102535# Should be " +aTestWord(0) +" but get " +GetClipboardText
- Call wTypeKeys "<Delete>"
-
- 'backwards with <SHIFT-CTRL-Tab>
- j = UBound (aTestWord)
-
- For i = j to 0 step -1
- Call wTypeKeys sPartOfTestWord
- Call wTypeKeys "<MOD1 TAB>", j
- if i > 0 then Call wTypeKeys "<Shift MOD1 TAB>", i
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> aTestWord(j-i) then Warnlog "#102535# Should be " +aTestWord(j-i) +" but get " +GetClipboardText
- Call wTypeKeys "<Delete>"
- next i
-
- 'endless loop test
- Call wTypeKeys sPartOfTestWord
- Call wTypeKeys "<Shift MOD1 TAB>"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> "accounting" then Warnlog "#102535# Should be 'accounting' but get " +GetClipboardText
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectWordCompletion_4
-
- Dim sDefaultMaxEntries as String
- Dim sTestMaxEntries as String
- Dim sTestFile as String
- Dim iTestMaxEntries as Integer
-
- sDefaultMaxEntries = "500"
- sTestMaxEntries = "50"
- sTestFile = "tToolsAutocorrectWordCompletion_4.sxw"
- iTestMaxEntries = 50
-
- printLog "Test Max entries"
- '/// Test Max entries
-
- '/// Delete all entries in the list
- '/// set Max entries to 50
- '/// Open the test file ( The entries number is > 50 when Max entries is 500)
- '/// check the number of entries.
-
- Call hNewDocument
- 'Delete all entries in the list
- Call fDeleteAllEntries()
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- MaxEintraege.SetText sTestMaxEntries
- TabWortergaenzung.OK
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\advanced\" + sTestFile )
-
- Sleep 4
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount > iTestMaxEntries then Warnlog "Entries number should be less than " + iTestMaxEntries
-
- 'Recover to default
- MaxEintraege.SetText sDefaultMaxEntries
- TabWortergaenzung.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectWordCompletion_5
-
- Dim sTestWord1 as String
- Dim sTestWord2 as String
- Dim sTestWord3 as String
- Dim iEntriesNumber_Checked as Integer
- Dim iEntriesNumber_UnChecked as Integer
-
- sTestWord1 = "kilometer "
- sTestWord2 = "entertainment "
- sTestWord3 = "education "
- iEntriesNumber_Checked = 3
- iEntriesNumber_UnChecked = 1
-
- printLog "Check 'When closing a document, remove the words collected from it from the list'"
- '/// Check 'When closing a document, remove the words collected from it from the list'
- '/// delete all entries first.
- '/// 1) check when the checkbox is unchecked
- '/// a) Open a file, type "kilometer"
- '/// b) Open 2nd file, type "entertainment" and "education"
- '/// c) Close 2nd file, the number of entries in first file should be 3
- '/// 2) check when the checkbox is checked
- '/// delete all entries , and Uncheck the testing checkbox
- '/// a) Open a file, type "kilometer"
- '/// b) Open 2nd file, type "entertainment" and "education"
- '/// c) Close 2nd file, the number of entries in first file should be 1
-
- 'Test when checkbox is checkec -- default
-
- 'Open 1st file
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\autocorrection\01.odt" )
-
-
- 'Delete all entries in the list
- Call fDeleteAllEntries()
-
- ' check checkbox
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- MinWortlaenge.SetText "5"
- KeepList.UnCheck
- TabWortergaenzung.Ok
-
- Call wTypeKeys sTestWord1
-
- 'Open 2nd file
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\autocorrection\01-01.odt" )
-
-
- Call wTypeKeys sTestWord2
- Call wTypeKeys sTestWord3
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount <> 3 then
- Warnlog "Checked:Entries number should be equal 3 in 2nd file ,but get " + GesammelteWorte.GetItemCount
- end if
- TabWortergaenzung.Cancel
-
- 'Close 2nd file
- Call hCloseDocument
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount <> 3 then
- Warnlog "Checked:Entries number should be equal 3 in 1st file ,but get " + GesammelteWorte.GetItemCount
- end if
- TabWortergaenzung.Cancel
-
- Call hCloseDocument
-
- 'Test when checkbox is Checked
- 'Open 1st file
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\autocorrection\01.odt" )
-
-
- 'Delete all entries in the list
- fDeleteAllEntries()
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
-
- KeepList.Check
- TabWortergaenzung.OK
-
- Call wTypeKeys sTestWord1
-
- 'Open 2nd file
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\autocorrection\01-01.odt" )
-
-
- Call wTypeKeys sTestWord2
- Call wTypeKeys sTestWord3
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount <> 3 then
- Warnlog "UnChecked:Entries number should be equal 3 in 2nd file ,but get " + GesammelteWorte.GetItemCount
- end if
- TabWortergaenzung.Cancel
-
- 'Close 2nd file
- Call hCloseDocument
-
- ToolsAutocorrect
- Kontext
- Active.Setpage TabWortergaenzung
- Kontext "TabWortergaenzung"
- if GesammelteWorte.GetItemCount <> 1 then
- Warnlog "UnChecked:Entries number should be equal 1 in 2nd file ,but get " +GesammelteWorte.GetItemCount
- end if
- TabWortergaenzung.Cancel
-
- 'Close 1st file
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tToolsAutocorrectWordCompletion_6
-
- Dim sTestWord as String
- Dim sPartOfTestWord as String
-
- sTestWord = "OpenOffice.org"
- sPartOfTestWord = "Ope"
-
- printLog "Check Show as Tip"
- '/// Check Show as Tip
-
- '/// When uncheck ( default) , the left word will be highlight
- '/// When check , the left word will NOT be appeared, <--- can test
- '/// and a help tip will appear <--- no way to test yet
-
- 'Show as Tip -- uncheck (default)
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\autocorrection\01.odt" )
-
-
- Call wTypeKeys sTestWord
- Call wTypeKeys "<Return>"
- Sleep 1
- Call wTypeKeys sPartOfTestWord
- Sleep 4
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Shift Home>"
-
- Sleep 1
- Call wTypeKeys "StaS"
- Sleep 4
- Call wTypeKeys "<Return>"
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/autotext/w_autotext.inc b/testautomation/writer/optional/includes/autotext/w_autotext.inc
deleted file mode 100644
index 19e2955f27ab..000000000000
--- a/testautomation/writer/optional/includes/autotext/w_autotext.inc
+++ /dev/null
@@ -1,658 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Test of autotext in writer
-'*
-'\***********************************************************************
-
-sub w_autotext
-
- Call tEditAutotext_1
- Call tEditAutotext_2
- Call tEditAutotext_3
- Call tEditAutotext_4
- Call tEditAutotext_5
-
-end sub
-
-testcase tEditAutotext_1
- Dim j as integer
- Dim sAll as integer
- Dim i as integer
- Dim Vergleich1$
- Dim Vergleich2$
- Dim Vergleich3$
- Dim Vergleich4$
-
- Printlog "- Create a new autotext with content!"
- printlog " New Writerdocument"
- Call hNewDocument
- printlog " Create a new autotext category"
- if wCreateAutotextCategory( "AANewCategory" ) = false then
- Warnlog "Unable to create new Autotext category"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
- goto endsub
- end if
- wait 500
- Kontext "Autotext"
- Autotext.Close
-
- printlog " Insert some text and format text"
- Call wTypeKeys("This becomes an autotext!")
- ' Format word 'This'
- Call wTypeKeys("<Home><Right>")
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- kontext "TabFont"
- if gAsianSup = True then
- FontWest.Select 5
- if StyleWest.GetItemCount >= 3 then
- StyleWest.Select 3
- else
- For i = 6 to FontWest.GetItemCount
- FontWest.Select i
- try
- StyleWest.Select 3
- exit for
- catch
- endcatch
- next i
- end if
- Vergleich1$ = FontWest.GetSelText
- Vergleich2$ = StyleWest.GetSelText
- SizeWest.Select 5
- Vergleich3$ = SizeWest.GetSelText
- else
- Font.Select 5
- if Style.GetItemCount >= 3 then
- Style.Select 3
- else
- For i = 6 to Font.GetItemCount
- Font.Select i
- try
- Style.Select 3
- exit for
- catch
- endcatch
- next i
- end if
- Vergleich1$ = Font.GetSelText
- Vergleich2$ = Style.GetSelText
- Size.Select 5
- Vergleich3$ = Size.GetSelText
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- UrlName.Settext "http://www.irgendwas.de"
- TargetFrame.Select 2
- Vergleich4$ = TargetFrame.GetSelText
- TabHyperlinkZeichen.Ok
-
- Call wTypeKeys("<End>")
- Call wTypeKeys("<Shift Home>")
-
- printlog " Call Edit / Autotext"
- EditAutotext
- Kontext "Active"
- if Active.Exists then
- warnlog Active.Gettext
- Active.Ok
- end if
- Kontext "Autotext"
- printlog " Uncheck 'Preview and Select first group in List"
- Vorschau_anzeigen.Uncheck
- Kontext "Autotext"
- if wSelectAutotextCategory( "AANewCategory" ) = false then
- Warnlog "Unable to select Autotext category"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
- goto endsub
- end if
- wait 500
-
- printlog " Insert a name for the Autotext and a Shortcut"
- NameText.Settext "HDEAutotext"
- Kuerzel.Settext "HDE"
- printlog " Select 'New' in Menubutton 'Autotext'"
- wait 500
- if Menue.IsEnabled then
- Menue.Click
- else
- Warnlog "Unable to create autotext->Button 'Autotext' is disabled"
- Autotext.Close
- Call hCloseDocument
- goto endsub
- end if
-
- wait 500
- try
- Call hMenuSelectNr ( 1 )
- catch
- Warnlog "Menu Autotext->'New' disabled ! Test failed !"
- Call hMenuClose
- Kontext "Autotext"
- Autotext.Cancel
- Call hCloseDocument
- goto endsub
- endcatch
- printlog " Check if Autotext has been added to list"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog "Unable to add autotext: " + Active.Gettext
- Active.Ok
- Kontext "Autotext"
- Autotext.Cancel
- Call hCloseDocument
- goto endsub
- end if
- end if
-
- if wSelectAutotextCategory("AANewCategory") = false then
- Warnlog "Created autotext category not found!"
- else
- Liste.TypeKeys "+"
-
- sAll = Liste.GetItemCount
- For j = 1 to sAll
- Liste.TypeKeys "<Down>"
- if Liste.Gettext = "HDEAutotext" then
- printlog "Autotext has been found!"
- Autotext.Ok
- j = sAll + 2
- end if
- next j
- printlog " Check if content has been added to named autotext"
- Kontext "Autotext"
- if Autotext.Exists then
- Warnlog "New autotext has not been found!"
- Autotext.Close
- else
- hSetDocumentContext()
- Call wTypeKeys("<Shift Home>")
- EditCopy
- if GetClipboardtext <> "This becomes an autotext!" then
- Warnlog "Autotext has no content!"
- else
- Call wTypeKeys ("<Home><Right>")
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- Kontext "TabFont"
- if gAsianSup = True then
- if Vergleich1$ <> FontWest.GetSelText then Warnlog "Wrong Font in Autotext!"
- if Vergleich2$ <> StyleWest.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if Vergleich3$ <> SizeWest.GetSelText then Warnlog "Wrong Fontsize in Autotext!"
- else
- if Vergleich1$ <> Font.GetSelText then Warnlog "Wrong Font in Autotext!"
- if Vergleich2$ <> Style.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if Vergleich3$ <> Size.GetSelText then Warnlog "Wrong Fontsize in Autotext!"
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if UrlName.Gettext <> "http://www.irgendwas.de/" then Warnlog "Wrong hyperlink has been added to text!"
- if Vergleich4$ <> TargetFrame.GetSelText then warnlog "Wrong targetFrame has been added to text!"
- TabHyperlinkZeichen.Cancel
- end if
- end if
- end if
-
- printlog " Delete whole category with created autotext"
- Call wDeleteAutotextCategory( "AANewCategory" )
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
-
-testcase tEditAutotext_2
- Dim j as integer
- Dim sAll as integer
- Dim i as integer
- Dim Vergleich1$
- Dim Vergleich2$
- Dim Vergleich3$
- Dim Vergleich4$
-
- Printlog "- Create a new autotext with content! (Text only)"
- printlog " New Writerdocument"
- Call hNewDocument
- printlog " Create a new autotext category"
- if wCreateAutotextCategory( "AANewCategory" ) = false then
- Warnlog "Unable to create new Autotext category"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
- goto endsub
- end if
- wait 500
- Kontext "Autotext"
- Autotext.Close
- hSetDocumentContext()
- printlog " Insert some text and format text"
- Call wTypeKeys("This becomes an autotext!")
- ' Format word 'This'
- Call wTypeKeys("<Home><Right>")
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- kontext "TabFont"
- if gAsianSup = true then
- FontWest.Select 5
- if StyleWest.GetItemCount >= 3 then
- StyleWest.Select 3
- else
- For i = 6 to FontWest.GetItemCount
- FontWest.Select i
- try
- StyleWest.Select 3
- exit for
- catch
- endcatch
- next i
- end if
- Vergleich1$ = FontWest.GetSelText
- Vergleich2$ = StyleWest.GetSelText
- SizeWest.Select 5
- Vergleich3$ = SizeWest.GetSelText
- else
- Font.Select 5
- if Style.GetItemCount >= 3 then
- Style.Select 3
- else
- For i = 6 to Font.GetItemCount
- Font.Select i
- try
- Style.Select 3
- exit for
- catch
- endcatch
- next i
- end if
- Vergleich1$ = Font.GetSelText
- Vergleich2$ = Style.GetSelText
- Size.Select 5
- Vergleich3$ = Size.GetSelText
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- UrlName.Settext "http://www.irgendwas.de"
- TargetFrame.Select 2
- Vergleich4$ = TargetFrame.GetSelText
- TabHyperlinkZeichen.Ok
-
- Call wTypeKeys("<End>")
- Call wTypeKeys("<Shift Home>")
-
- printlog " Call Edit / Autotext"
- EditAutotext
- Kontext "Active"
- if Active.Exists then
- warnlog Active.Gettext
- Active.Ok
- end if
- Kontext "Autotext"
-
- printlog " Uncheck 'Preview and Select first group in List"
- Vorschau_anzeigen.Uncheck
- Kontext "Autotext"
- if wSelectAutotextCategory( "AANewCategory" ) = false then
- Warnlog "Unable to select Autotext category"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
- goto endsub
- end if
- wait 500
-
- printlog " Insert a name for the Autotext and a Shortcut"
- NameText.Settext "HDEAutotext"
- Kuerzel.Settext "HDE"
- printlog " Select 'New' in Menubutton 'Autotext'"
- wait 500
- Menue.Click
- wait 500
- try
- Call hMenuSelectNr ( 2 )
- catch
- Warnlog "Menu Autotext->'New' disabled ! Test failed !"
- Call hMenuClose
- Kontext "Autotext"
- Autotext.Cancel
- Call hCloseDocument
- goto endsub
- endcatch
- printlog " Check if Autotext has been added to list"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog "Unable to add autotext: " + Active.Gettext
- Active.Ok
- Kontext "Autotext"
- Autotext.Cancel
- Call hCloseDocument
- goto endsub
- end if
- end if
-
- if wSelectAutotextCategory("AANewCategory") = false then
- Warnlog "Created autotext category not found!"
- else
- Liste.TypeKeys "+"
-
- sAll = Liste.GetItemCount
- For j = 1 to sAll
- Liste.TypeKeys "<Down>"
- if Liste.Gettext = "HDEAutotext" then
- printlog "Autotext has been found!"
- Autotext.Ok
- j = sAll + 2
- end if
- next j
- printlog " Check if content has been added to named autotext"
- Kontext "Autotext"
- if Autotext.Exists then
- Warnlog "New autotext has not been found!"
- Autotext.Close
- else
- hSetDocumentContext()
- Call wTypeKeys("<Home><Up>" , 4)
- Call wTypeKeys("<Shift End>")
- EditCopy
- if GetClipboardtext <> "This becomes an autotext!" then
- Warnlog "Autotext has no content!"
- else
- Call wTypeKeys ("<Home><Right>")
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- Kontext "TabFont"
- if gAsianSup = true then
- if Vergleich1$ = FontWest.GetSelText then Warnlog "Wrong Font in Autotext!"
- if Vergleich2$ = StyleWest.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if Vergleich3$ = SizeWest.GetSelText then Warnlog "Wrong Fontsize in Autotext!"
- else
- if Vergleich1$ = Font.GetSelText then Warnlog "Wrong Font in Autotext!"
- if Vergleich2$ = Style.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if Vergleich3$ = Size.GetSelText then Warnlog "Wrong Fontsize in Autotext!"
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if UrlName.Gettext = "http://www.irgendwas.de/" then Warnlog "Wrong hyperlink has been added to text!"
- if Vergleich4$ = TargetFrame.GetSelText then Warnlog "Wrong targetFrame has been added to text!"
- TabHyperlinkZeichen.Cancel
- end if
- end if
- end if
-
- printlog " Delete whole category with created autotext"
- Call wDeleteAutotextCategory( "AANewCategory" )
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
-
-testcase tEditAutotext_3
-
- Dim i as Integer
- Dim j as Integer
- Dim AlterWert as String
- Dim hauMatsch as integer
-
- printlog " Edit / Autotext"
- PrintLog "- Edit / Autotext"
- printlog " New document"
- Call hNewDocument
- printlog " Select Edit / Autotext"
- EditAutotext
- Kontext "Active"
- if Active.Exists then
- warnlog Active.Gettext
- Active.Ok
- end if
-
- printlog " - Select and Insert all Autotexts "
- printlog " Select and Insert all autotexts"
- Sleep 1
- Kontext "AutoText"
- Vorschau_anzeigen.Uncheck
- Liste.Select 1
- for j=1 to 10
- Liste.TypeKeys "-"
- Liste.TypeKeys "<Down>"
- wait 500
- next j
-
- hauMatsch = Liste.GetItemCount
-
- for i = 1 to hauMatsch
- Liste.Select 1
- for j=1 to Liste.GetItemCount
- Liste.TypeKeys "-"
- Liste.TypeKeys "<Down>"
- wait 500
- next j
- Vorschau_anzeigen.Check
-
- Liste.Select i
- Liste.TypeKeys "+"
-
- Call tCheckAutotextInGroup(Liste.GetItemCount-hauMatsch,i)
-
- next i
-
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
-
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------
-
-testcase tEditAutotext_4
-
- Call hNewDocument
-
- printlog " Create a new categorie"
- printlog " - Create new categorie"
- if wCreateAutotextCategory("AAAAAA") = false then
- Warnlog "Unable to create category"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
- goto endsub
- end if
-
- printlog " Close dialog and check if categorie has been created"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- if wSelectAutotextCategory("AAAAAA") = false then
- Warnlog "New categorie has been deleted ( after closing and reopening dialog )"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Call hCloseDocument
- goto endsub
- end if
-
- Bereiche.Click
- Kontext "BereicheBearbeitenAutotext"
- printlog " Rename the new categorie"
- printlog " - Rename new categorie!"
- Bereich.Settext "AAAAAArrghh"
- Wait 500
- printlog " In dialog click 'rename'"
- if Umbenennen.IsEnabled then
- Umbenennen.Click
- BereicheBearbeitenAutoText.OK
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- warnlog Active.Gettext
- Active.Ok
- end if
- end if
- else
- Warnlog "Categorie couldn't be renamed (Button is disabled), no further test!"
- Kontext "BereicheBearbeitenAutotext"
- BereicheBearbeitenAutoText.Close
- if wDeleteAutotextCategory("AAAAAA") = false then Warnlog "Unable to delete category"
- Kontext "Autotext"
- AutoText.Close
- Call hCloseDocument
- goto endsub
- end if
-
- Kontext "BereicheBearbeitenAutotext"
- if BereicheBearbeitenAutotext.Exists then BereicheBearbeitenAutotext.Ok
- printlog " Close dialog and check if Categorie has been renamed"
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
- Sleep 1
- if wSelectAutotextCategory("AAAAAArrghh") = false then
- Warnlog "Categorie hasn't been correctly renamed"
- AlterWert=Liste.Gettext
- end if
-
- printlog " Delete new categorie"
- printlog " - Delete new categorie"
- printlog " Select 'Categories'"
- Bereiche.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- warnlog Active.Gettext
- Active.Ok
- end if
- end if
- Kontext "BereicheBearbeitenAutoText"
- Bereich.SetText "AAAAAArrghh"
- printlog " Select 'Delete', close document and check if categorie has been deleted"
- if Loeschen.IsEnabled then
- Loeschen.Click
- else
- Warnlog "Categorie couldn't be deleted (Button is disabled)!"
- end if
-
- BereicheBearbeitenAutoText.OK
- Kontext "MessageBox"
- if Not MessageBox.Exists(2) then
- Warnlog "No messsage after deleting Categorie and closing the Dialog !"
- else
- MessageBox.No
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- warnlog Active.Gettext
- Active.Ok
- end if
- end if
- if wSelectAutotextCategory("AAAAAArrghh") = false then
- Warnlog "After denying the 'Deletemessage' the categorie has been deleted!"
- else
- Kontext "Autotext"
- Bereiche.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- warnlog Active.Gettext
- Active.Ok
- end if
- end if
- Kontext "BereicheBearbeitenAutoText"
- Bereich.SetText "AAAAAArrghh"
- if Loeschen.IsEnabled then
- Loeschen.Click
- BereicheBearbeitenAutotext.Ok
- Kontext "MessageBox"
- if MessageBox.Exists(2) then MessageBox.Yes
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- QAErrorlog Active.Gettext
- Active.Ok
- end if
- end if
- Sleep 2
- if wSelectAutotextCategory("AAAAAArrghh") = true then
- Warnlog "Though the categorie has been deleted it is always there!"
- end if
- else
- Warnlog "Area couldn't be deleted (Button is disabled)!"
- end if
- end if
- end if
-
- Kontext "Autotext"
- if Autotext.Exists then Autotext.Close
-
- printlog " Close document"
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------
-
-testcase tEditAutotext_5
- printlog " - Insert Autotext with ShortCuts"
- Call hNewDocument
- printlog " try to insert autotexts with Shotcut"
-
- Call wTypeKeys "<Return>", 3
- Call wBlindtextEinfuegen
-
- Kontext "Active"
- if Active.Exists then
- warnlog Active.GetText
- Active.OK
- end if
- Sleep 1
- Call wTypeKeys "<Mod1 A>"
- Sleep 1
- EditCopy
- printlog " Check if autotext has been inserted"
- if GetClipboardText = "" then Warnlog "Autotext couldn't be inserted with Short-Cut!"
-
- printlog " Close document"
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/calculate/w_calculate.inc b/testautomation/writer/optional/includes/calculate/w_calculate.inc
deleted file mode 100644
index ccbc196d46aa..000000000000
--- a/testautomation/writer/optional/includes/calculate/w_calculate.inc
+++ /dev/null
@@ -1,463 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Put description here
-'*
-'\***********************************************************************
-
-sub w_calculate
-
- Call tToolsCalculate1
- Call tToolsCalculate2
- Call tToolsCalculate3
-
-end sub
-
-testcase tToolsCalculate1
- Printlog "- Tools / calculation base functionality formula bar"
-
- Printlog " - Add"
- Call hNewDocument
- Call wTypeKeys "2+3+4+5<Shift Home>"
- ToolsCalculate
- Call wTypeKeys "<End> = "
- EditPaste
- if GetClipboardText <> "14" then Warnlog "Result of Add is not 14 but "+ GetClipboardText
-
- Printlog " - Subtract"
- Call wTypeKeys "<Return>101-3-4-155<Shift Home>"
- ToolsCalculate
- Call wTypeKeys "<End> = "
- EditPaste
- if GetClipboardText <> "-61" then Warnlog "Result of Subtract is not -61 but "+ GetClipboardText
-
- Printlog " - multiply"
- Call wTypeKeys "<Return>11*3*1" & DecimalSeparator & "5<Shift Home>"
- ToolsCalculate
- Call wTypeKeys "<End> = "
- EditPaste
- if GetClipboardText <> "49" & DecimalSeparator & "50" and GetClipboardText <> "49" & DecimalSeparator & "5" then Warnlog "Result of Multiply is not 49" & DecimalSeparator & "50 but " & GetClipboardText
-
- Printlog " - Division"
- Call wTypeKeys "<Return>111/3/2<Shift Home>"
- ToolsCalculate
- Call wTypeKeys "<End> = "
- EditPaste
- if GetClipboardText <> "18" & DecimalSeparator & "50" and GetClipboardText <> "18" & DecimalSeparator & "5" then Warnlog "Result of Multiply is not 18" & DecimalSeparator & "50 but " & GetClipboardText
-
- Printlog " - random with brackets"
- Call wTypeKeys "<Return>((12*2)/4" & DecimalSeparator & "5+3)-1" & DecimalSeparator & "5 <Shift Home>"
-
- ToolsCalculate
- Call wTypeKeys "<End> = "
- EditPaste
- if Left$(GetClipboardText,4) <> "6" & DecimalSeparator & "83" then Warnlog "Result of mixed calculation not 6" & DecimalSeparator & "83 but " & GetClipboardText
-
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsCalculate2
- Printlog "- Tools / Calculate Basic functionality"
-
- Printlog " - Add"
- Call hNewDocument
- Call wTypeKeys "<F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.SetText "2+3+4+5" : EingabeFeld.TypeKeys "<Return>"
- if ErmittleErgebnis ( "14" ) = FALSE then Warnlog "Result of Add not 14 but "+ GetClipboardText
-
- Printlog " - Subtract"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.SetText "101-3-4-155" : EingabeFeld.TypeKeys "<Return>"
- if ErmittleErgebnis ( "-61" ) = FALSE then Warnlog "Result of Subtract not -61 but "+ GetClipboardText
-
- Printlog " - Multiply"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.SetText "11*3*1" & DecimalSeparator & "5" : EingabeFeld.TypeKeys "<Return>"
- if ErmittleErgebnis ( "49" & DecimalSeparator & "5" ) = FALSE then Warnlog "Result of Multiplication not 49" & DecimalSeparator & "5 but " & GetClipboardText
-
- Printlog " - Division"
- Call wTypeKeys "<End><Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.SetText "111/3/2" : EingabeFeld.TypeKeys "<Return>"
- if ErmittleErgebnis ( "18" & DecimalSeparator & "5" ) = FALSE then Warnlog "Result of Division not 18" & DecimalSeparator & "5 but " & GetClipboardText
-
- Printlog " - random with brackets"
- Call wTypeKeys "<End><Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.SetText "((12*2)/4" & DecimalSeparator & "5+3)-1" & DecimalSeparator & "5" : EingabeFeld.TypeKeys "<Return>"
- if ErmittleErgebnis ( "6" & DecimalSeparator & "83" ) = FALSE then Warnlog "Result of mixed calculation not 6" & DecimalSeparator & "83 but " & GetClipboardText
-
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsCalculate3
- Dim Fehlermeldung as String
-
- Printlog "- Tools / Calculate Basic functionality (formula button)"
-
- Call hNewDocument
- Printlog " - Sum (6)"
- Call wTypeKeys "<F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 1 )
- Sleep 1
- EingabeFeld.TypeKeys " (6)" : EingabeFeld.TypeKeys "<Return>"
- Sleep 1
- if ErmittleErgebnis ( "6" ) = FALSE then Warnlog "Result is not 6 but "+ GetClipboardText
-
- Printlog " - Sum ( <a1:B2>|<b4:r3> )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 1 )
- Sleep 1
- EingabeFeld.TypeKeys " ( <a1:B2" : EingabeFeld.TypeKeys ">|<b4:r3" : EingabeFeld.TypeKeys "> )" : EingabeFeld.TypeKeys "<Return>"
- select case iSprache
- case 01 : Fehlermeldung = "** Expression is faulty **"
- case 03 : Fehlermeldung = "** Expressão incorrecta **"
- case 31 : Fehlermeldung = "** Foutieve expressie **"
- case 33 : Fehlermeldung = "** Expression errone **"
- case 34 : Fehlermeldung = "** Expresión errónea **"
- case 39 : Fehlermeldung = "** Errore nell'espressione **"
- case 45 : Fehlermeldung = "** Fejlagtigt udtryk **"
- case 46 : Fehlermeldung = "** Felaktigt uttryck **"
- case 48 : Fehlermeldung = "** Nieprawiedlowe wyralenie **"
- case 49 : Fehlermeldung = "** Fehlerhafter Ausdruck **"
- case else : Fehlermeldung = ""
- end select
-
- if ErmittleErgebnis ( Fehlermeldung ) = FALSE then
- if Fehlermeldung > "" then
- Warnlog "Result is not " + Fehlermeldung + " but " & GetClipboardText
- else
- QAErrorlog "** Errortext for this language not defined **"
- end if
- end if
- Printlog " - 1323,3 round 1"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "1323" & DecimalSeparator & "345 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 2 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 1" : EingabeFeld.TypeKeys "<Return>"
- if ErmittleErgebnis ( "1323" & DecimalSeparator & "3" ) = FALSE then Warnlog "Result is not 1323" & DecimalSeparator & "3 but " & GetClipboardText
-
- Printlog " - 10 + 20 PHD ( Percent )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "10 + 20 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 3 )
- Sleep 1
- EingabeFeld.TypeKeys "<End><Return>"
- if ErmittleErgebnis ( "10" & DecimalSeparator & "2" ) = FALSE then Warnlog "Result is not 10" & DecimalSeparator & "2 but " & GetClipboardText
-
- Printlog " - SQRT 144 ( Square Root )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 4 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 144 <Return>"
- if ErmittleErgebnis ( "12" ) = FALSE then Warnlog "Result is not 12 but "+ GetClipboardText
-
- Printlog " - 4 POW 8 ( Power )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "4 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 5 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 8 <Return>"
- if ErmittleErgebnis ( "65536" ) = FALSE then Warnlog "Result is not 65536 but "+ GetClipboardText
-
- Printlog "- Tools / Calculate Operators with formula button"
- Printlog " - 2 EQ 2 ( equal )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "2 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 2 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 2 <Return>"
- if ErmittleErgebnis ( "1" ) = FALSE then Warnlog "Result is not 1 but "+ GetClipboardText
-
- Printlog " - 2 NEQ 2 ( not equal )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "2 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 3 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 2 <Return>"
- if ErmittleErgebnis ( "0" ) = FALSE then Warnlog "Result is not 0 but "+ GetClipboardText
-
- Printlog " - 2 LEQ 3 ( Less than or equal )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "2 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 4 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 3 <Return>"
- if ErmittleErgebnis ( "1" ) = FALSE then Warnlog "Result is not 1 but "+ GetClipboardText
-
- Printlog " - 2 GEO 2,0 ( greater than or equal )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "2 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 5 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 2" & DecimalSeparator & "0 <Return>"
- if ErmittleErgebnis ( "1" ) = FALSE then Warnlog "Result is not 1 but "+ GetClipboardText
-
- Printlog " - 2 L 2 ( less )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "2 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 2 <Return>"
- if ErmittleErgebnis ( "0" ) = FALSE then Warnlog "Result is not 0 but "+ GetClipboardText
-
- Printlog " - 2,01 g 2 ( greater )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "2" & DecimalSeparator & "01 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 7 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 2 <Return>"
- if ErmittleErgebnis ( "1" ) = FALSE then Warnlog "Result is not 1 but "+ GetClipboardText
-
- Printlog " - 0 OR 0 ( Boolean or )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "0 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 8 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 0 <Return>"
- if ErmittleErgebnis ( "0" ) = FALSE then Warnlog "Result is not 0 but "+ GetClipboardText
-
- Printlog " - 0 XOR 1 ( Boolean XOR )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "0 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 9 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 1 <Return>"
- if ErmittleErgebnis ( "1" ) = FALSE then Warnlog "Result is not 1 but "+ GetClipboardText
-
- Printlog " - 1 AND 0 ( Boolean And )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "1 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 10 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 0 <Return>"
- if ErmittleErgebnis ( "0" ) = FALSE then Warnlog "Result is not 0 but "+ GetClipboardText
-
- Printlog " - 0 NOT 0 ( Boolean Or )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- EingabeFeld.TypeKeys "0 "
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- Call hMenuSelectNr ( 11 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 0 <Return>"
- if ErmittleErgebnis ( "0" ) = FALSE then Warnlog "Result is not 0 but "+ GetClipboardText
-
- Printlog "- Tools / Calculate Statistical function with formula button"
- Printlog " - mean 30|40|20 ( Mean )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 7 )
- Sleep 1
- Call hMenuSelectNr ( 1 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 30|40|20 <Return>"
- if ErmittleErgebnis ( "30" ) = FALSE then Warnlog "Result is not 30 but "+ GetClipboardText
-
- Printlog " - min 1|1,01|1,001 ( Minimum )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 7 )
- Sleep 1
- Call hMenuSelectNr ( 2 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 1|1" & DecimalSeparator & "01|1" & DecimalSeparator & "001 <Return>"
- if ErmittleErgebnis ( "1" ) = FALSE then Warnlog "Result is not 1 but "+ GetClipboardText
-
- Printlog " - max 1|1,01|1,001 ( Maximum )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 7 )
- Sleep 1
- Call hMenuSelectNr ( 3 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 1|1" & DecimalSeparator & "01|1" & DecimalSeparator & "001 <Return>"
- if ErmittleErgebnis ( "1" & DecimalSeparator & "01" ) = FALSE then Warnlog "Result is not 1" & DecimalSeparator & "01 but "+ GetClipboardText
-
- Printlog "- Tools / Calculate Further functions"
- Printlog " - sin (PI/2) ( Sine )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 8 )
- Sleep 1
- Call hMenuSelectNr ( 1 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> (PI/2) <Return>"
- if ErmittleErgebnis ( "1" ) = FALSE then Warnlog "Result is not 1 but "+ GetClipboardText
-
- Printlog " - cos (PI/2) ( Cosine )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 8 )
- Sleep 1
- Call hMenuSelectNr ( 2 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> (PI/2) <Return>"
- if ErmittleErgebnis ( "0" ) = FALSE then Warnlog "Result is not 0 but "+ GetClipboardText
-
- Printlog " - tan (PI/2 - 0,001) ( Tangent )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 8 )
- Sleep 1
- Call hMenuSelectNr ( 3 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> (PI/2 - 0" & DecimalSeparator & "001) <Return>"
- if ErmittleErgebnis ( "1000" ) = FALSE then Warnlog "Result is not 1000 but "+ GetClipboardText
-
- Printlog " - asin 1 ( Arc-Sine )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 8 )
- Sleep 1
- Call hMenuSelectNr ( 4 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 1 <Return>"
- if ErmittleErgebnis ( Fehlermeldung ) = FALSE then
- if Fehlermeldung > "" then
- Warnlog "Result is not " + Fehlermeldung + " but " & GetClipboardText
- else
- QAErrorlog "** Errortext for this language not defined **"
- end if
- end if
- wait 500
-
- Printlog " - acos 0 ( Arc-Cosine )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 8 )
- Sleep 1
- Call hMenuSelectNr ( 5 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 0 <Return>"
- if ErmittleErgebnis ( "1" & DecimalSeparator & "57" ) = FALSE then Warnlog "Result is not 1" & DecimalSeparator & "57 but "+ GetClipboardText
-
- Printlog " - asin 1 ( Arc-Tangent )"
- Call wTypeKeys "<End> <Return><F2>"
- Kontext "OL_SW_Rechenleiste"
- Formel.Click
- Sleep 1
- Call hMenuSelectNr ( 8 )
- Sleep 1
- Call hMenuSelectNr ( 6 )
- Sleep 1
- EingabeFeld.TypeKeys "<End> 1 <Return>"
- if ErmittleErgebnis ( "0" & DecimalSeparator & "79" ) = FALSE then Warnlog "Result is not 0" & DecimalSeparator & "79 but "+ GetClipboardText
- Call hCloseDocument
-endcase
-
diff --git a/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc b/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc
deleted file mode 100644
index 9c432380228a..000000000000
--- a/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc
+++ /dev/null
@@ -1,409 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Chinese Translation test
-'*
-'************************************************************************
-'*
-' #1 tDefaultSetting_1 'Default settings for different Chinese language
-' #1 tDefaultSetting_2 'Default settings
-' #1 tDefaultSetting_3 'Cursor's position
-' #1 tChineseTranslate_1 'Translation for selected text
-' #1 tChineseTranslate_2 'Translation for NO-selected document
-' #1 tChineseTranslate_3 'Translation direction : T Chinese to S Chinese
-' #1 tChineseTranslate_4 'Translation direction : S Chinese to T Chinese
-' #1 tChineseTranslate_5 ''Use Taiwan , Hongkong SAR...'s statue
-' #0 fSetAsian
-'*
-'\***********************************************************************
-
-testcase tDefaultSetting_1
-
- printlog "Default settings for different Chinese language"
-
- Call hNewDocument
-
- printlog " Set default language(asian) for document is 'Simplified Chinese'"
- fSetAsian(fGetLanguageName(86))
-
- printlog " Tools/language / Chinese translation"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
-
- printlog " 'Traditional Chinese to Simplified Chinese' should be Checked by default"
- if NOT TChineseToSChinese.IsChecked then
- Warnlog "'Traditional Chinese to Simplified Chinese' should be Checked by default !"
- end if
- ChineseTranslation.Cancel
-
- printlog " Set default language(asian) for document is 'Traditional Chinese'"
- fSetAsian(fGetLanguageName(88))
-
- printlog " Tools/language / Chinese translation"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
-
- printlog " 'Simplified Chinese to Traditional Chinese' should be Checked by default"
- if NOT SChineseToTChinese.IsChecked then
- QAErrorlog "#i96768# 'Simplified Chinese to Traditional Chinese' should be Checked by default !"
- end if
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDefaultSetting_2
-
- printlog "Default settings "
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(86))
-
- printlog " Tools/language / Chinese translation"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
-
-' printlog " Use Taiwan,Hongkong SAR , and Macao SAR character variants"
-' printlog " + should NOT be Checked by default"
-' if UseSARCharacter.IsChecked then
-' Warnlog "'Use Taiwan,Hongkong SAR , and Macao SAR character variants' should NOT be Checked by default !"
-' end if
-
- printlog " 'Common Terms' should NOT be Checked by default"
- if TranslateCommonTerms.IsChecked then
- Warnlog "'Common Terms' should NOT be Checked by default !"
- end if
-
- printlog " Click 'Edit terms' button"
- EditTerms.Click
- Kontext "ChineseDictionary"
-
- printlog " 'Traditional Chinese to Simplified Chinese' should be Checked by default"
- if NOT TChineseToSChinese.IsChecked then
- Warnlog "'Traditional Chinese to Simplified Chinese' should be Checked by default !"
- end if
-
- printlog " 'Reverse mapping' should NOT be Checked by default"
- if ReverseMapping.IsChecked then
- Warnlog "'Reverse mapping' should NOT be Checked by default !"
- end if
-
- printlog " 'Property' should be 'other' by default"
- if Property.GetSelIndex <> 1 then
- Warnlog "'Property' should be 'Other' by default !"
- end if
- ChineseDictionary.Cancel
-
- Kontext "ChineseTranslation"
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDefaultSetting_3
-
- Dim sChinese as String
- Dim sExpect as String
-
- sChinese = "红上è“国"
- sExpect = "ç´…"
-
- printlog "Cursor position"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(86))
-
- printlog " Input some chinese and set cursor in the beginning"
- Call wTypeKeys sChinese
- Call wTypeKeys "<Home>"
-
- printlog " Tools/language / Chinese translation , check"
- printlog " + 'Simplified Chinese to Traditional Chinese', press OK"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- SChineseToTChinese.Check
- ChineseTranslation.OK
-
- printlog " Check if the cursor's position is changed -- Should NOT"
- Call wTypeKeys "<Shift Right>"
- try
- EditCopy
- if GetClipboardText <> sExpect then
- Warnlog "Hope to get " & sExpect & " but get " & GetClipboardText
- end if
- catch
- Warnlog "Cursor's position is changed - 117787"
- endcatch
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_1
-
- Dim sChinese as String
- Dim sExpect as String
-
- sChinese = "红上è“国"
- sExpect = "紅上è“国"
-
- printlog "Translation for selected text"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(86))
-
- printlog " Input some chinese and select part of input"
- Call wTypeKeys sChinese
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift Right>" , 2
-
- printlog " Tools/language / Chinese translation , check"
- printlog " + 'Simplified Chinese to Traditional Chinese', press OK"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- SChineseToTChinese.Check
- ChineseTranslation.OK
-
- printlog " Check if the only selected text is translated -- Should be"
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sExpect then
- Warnlog "Hope to get " & sExpect & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_2
-
- Dim sChinese as String
- Dim sExpect as String
-
- sChinese = "红上è“国"
- sExpect = "紅上è—國"
-
- printlog "Translation for NO-selected document"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(86))
-
- printlog " Input some chinese"
- Call wTypeKeys sChinese
-
- printlog " Tools/language / Chinese translation , check"
- printlog " + 'Simplified Chinese to Traditional Chinese' , press OK"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- SChineseToTChinese.Check
- ChineseTranslation.OK
-
- printlog " Check if all document is translated -- Should"
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sExpect then
- Warnlog "Hope to get " & sExpect & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_3
-
- Dim sChinese as String
- Dim sExpect as String
-
- sChinese = "红上è—國"
- sExpect = "红上è“国"
-
- printlog "Translation direction : T Chinese to S Chinese"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(88))
-
- printlog " Input some chinese , include some"
- printlog " + tradition chinese and simplified chinese"
- Call wTypeKeys sChinese
-
- printlog " Tools/language / Chinese translation , check"
- printlog " + 'Traditional Chinese to Simplified Chinese' , press OK"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- TChineseToSChinese.Check
- ChineseTranslation.OK
-
- printlog " Check if only traditional chinese is translated -- Should"
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sExpect then
- Warnlog "Hope to get " & sExpect & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_4
-
- Dim sChinese as String
- Dim sExpect as String
-
- sChinese = "红上è—國"
- sExpect = "紅上è—國"
-
- printlog "Translation direction : S Chinese to T Chinese"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(86))
-
- printlog " Input some chinese , include some"
- printlog " + tradition chinese and simplified chinese"
- Call wTypeKeys sChinese
-
- printlog " Tools/language / Chinese translation , check"
- printlog " + 'Simplified Chinese to Traditional Chinese' , press OK"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- SChineseToTChinese.Check
- ChineseTranslation.OK
-
- printlog " Check if only simplified chinese is translated -- Should"
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sExpect then
- Warnlog "Hope to get " & sExpect & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_5
- if bAsianLan <> True then
- 'This testcase might only run with 'Use Taiwan , Hongkong SAR...'s status.
- QaErrorLog "Testing with Asian languages only"
- goto endsub
- end if
-
- printlog "'Use Taiwan , Hongkong SAR...'s statue"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(88))
-
- printlog " Tools/language / Chinese translation"
- printlog " Check Traditional Chinese to Simplified Chinese"
- printlog " + 'Use Taiwan , Hongkong SAR...' should be disabled"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- TChineseToSChinese.Check
- try
- UseSARCharacter.Check
- Warnlog "'Use Taiwan , Hongkong SAR and ...' should be disabled !"
- catch
- endcatch
-
- printlog " Check Simplified Chinese to Traditional Chinese"
- printlog " + 'Use Taiwan , Hongkong SAR...' should be enabled"
- SChineseToTChinese.Check
- try
- UseSARCharacter.Check
- catch
- Warnlog "'Use Taiwan , Hongkong SAR and ...' should be enabled !"
- endcatch
-
- printlog " UnCheck 'Use Taiwan , Hongkong SAR...'"
- UseSARCharacter.UnCheck
-
- printlog " Check Translate Common Terms"
- TranslateCommonTerms.Check
-
- printlog " 'Use Taiwan , Hongkong SAR...' should be checked automatically"
- if NOT UseSARCharacter.IsChecked then
- Warnlog "'Use Taiwan , Hongkong SAR and ...' should be checked !"
- end if
- ChineseTranslation.OK
-
- printlog " Close the dialog and reopen it"
- printlog " 'Use Taiwan , Hongkong SAR...' and 'Translate Common Terms'"
- printlog " + should be checked"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- if NOT UseSARCharacter.IsChecked then
- Warnlog "'Use Taiwan , Hongkong SAR and ...' should be checked ! - 117802 "
- end if
- if NOT TranslateCommonTerms.IsChecked then
- Warnlog "'Translate common terms' should be checked ! - 117802 "
- end if
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-function fSetAsian(sAsian as String) as String
-
- 'This function is set CJK language in Tools/Options/Language Settings / Languages
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
- fSetAsian = Asiatisch.GetSelText
- if sAsian = "Null" then
- Asiatisch.Select 1
- goto GoON
- else
- Asiatisch.Select sAsian
- end if
-
- GoON:
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
-end function
-
diff --git a/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate2.inc b/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate2.inc
deleted file mode 100644
index 85e2ae9aa1f0..000000000000
--- a/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate2.inc
+++ /dev/null
@@ -1,454 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Chinese Dictionary test
-'*
-'************************************************************************
-'*
-' #1 tChineseTranslate_6 'Chinese dictionary : S Chinese to T Chinese
-' #1 tChineseTranslate_7 'Chinese dictionary : T Chinese to S Chinese
-' #1 tChineseTranslate_8 'Chinese dictionary : Reverse mapping
-' #1 tChineseTranslate_9 'Chinese dictionary : Add
-' #1 tChineseTranslate_10 'Chinese dictionary : Modify
-' #1 tChineseTranslate_11 'Chinese dictionary : Delete
-' #1 tUndoRedo 'Undo/Redo
-'*
-'\***********************************************************************
-
-testcase tChineseTranslate_6
-
- Dim sTerm as String
- Dim sMapping as String
-
- sTerm = "è“国"
- sMapping = "紙間"
-
- printlog "Chinese dictionary , S Chinese to T Chinese"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(86))
-
- printlog " Input a test term"
- Call wTypeKeys sTerm
-
- printlog " Tools/language / Chinese translation ,"
- printlog " Check 'Simplified Chinese to Traditional Chinese'"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- SChineseToTChinese.Check
-
- printlog " Check 'Translate Common Terms'"
- TranslateCommonTerms.Check
-
- printlog " Press 'Edit Terms' button"
- EditTerms.Click
- Kontext "ChineseDictionary"
-
- printlog " Click radiobutton 'Simplified Chinese to Tradtional Chinese'"
- SChineseToTChinese.Check
-
- printlog " Add test word in Term and Mapping"
- Term.SetText sTerm
- Mapping.SetText sMapping
- Add.Click
- ChineseDictionary.OK
- Sleep 4
- Kontext "ChineseTranslation"
- ChineseTranslation.OK
-
- printlog " Check if the result is correct"
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
- if GetClipboardText <> sMapping then
- Warnlog "117803 - Hope to get " & sMapping & " but got " & GetClipboardText
- end if
-
- 'Recover to default
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- TranslateCommonTerms.UnCheck
- EditTerms.Click
- Kontext "ChineseDictionary"
- SChineseToTChinese.Check
- SToTMappingContent.Select SToTMappingContent.GetItemCount
- Sleep 1
- Delete.Click
- ChineseDictionary.OK
- Sleep 2
- Kontext "ChineseTranslation"
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_7
-
- Dim sTerm as String
- Dim sMapping as String
-
- sTerm = "紙間"
- sMapping = "è“国"
-
- printlog "Chinese dictionary , T Chinese to S Chinese"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(88))
-
- printlog " Input a test term"
- Call wTypeKeys sTerm
-
- printlog " Tools/language / Chinese translation ,"
- printlog " Check Traditional Chinese to Simplified Chinese"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- TChineseToSChinese.Check
-
- printlog " Check 'Translate Common Terms'"
- TranslateCommonTerms.Check
-
- printlog " Press 'Edit Terms' button"
- EditTerms.Click
- Kontext "ChineseDictionary"
-
- printlog " Click radiobutton 'Tradtional Chinese to Simplified Chinese'"
- TChineseToSChinese.Check
-
- printlog " Add test word in Term and Mapping"
- Term.SetText sTerm
- Mapping.SetText sMapping
- Add.Click
- ChineseDictionary.OK
- Sleep 4
- Kontext "ChineseTranslation"
- ChineseTranslation.OK
-
- printlog " Check if the result is correct"
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
- if GetClipboardText <> sMapping then
- Warnlog "117803 - Hope to get " & sMapping & " but get " & GetClipboardText
- end if
-
- 'Recover to default
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- TranslateCommonTerms.UnCheck
- EditTerms.Click
- Kontext "ChineseDictionary"
- TChineseToSChinese.Check
- TToSMappingContent.Select TToSMappingContent.GetItemCount
- Sleep 1
- Delete.Click
- ChineseDictionary.OK
- Sleep 2
- Kontext "ChineseTranslation"
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_8
-
- Dim sTerm as String
- Dim sMapping as String
-
- sTerm = "è“国"
- sMapping = "紙間"
-
- printlog "Chinese dictionary , Reverse mapping"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(88))
-
- printlog " Input a test term"
- Call wTypeKeys sMapping
-
- printlog " Tools/language / Chinese translation ,"
- printlog " Check 'Traditional Chinese to Simplified Chinese'"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- TChineseToSChinese.Check
-
- printlog " Check 'Translate Common Terms'"
- TranslateCommonTerms.Check
-
- printlog " Press 'Edit Terms' button"
- EditTerms.Click
- Kontext "ChineseDictionary"
-
- printlog " Click radiobutton 'Simplified Chinese to Tradtional Chinese'"
- SChineseToTChinese.Check
-
- printlog " Check 'Reverse Mapping'"
- ReverseMapping.Check
-
- printlog " Add test word in Term and Mapping"
- Term.SetText sTerm
- Mapping.SetText sMapping
- Add.Click
- ChineseDictionary.OK
- Sleep 4
- Kontext "ChineseTranslation"
- ChineseTranslation.OK
-
- printlog " Check if the result is correct"
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
- if GetClipboardText <> sTerm then
- Warnlog "117803 - Hope to get " & sTerm & " but get " & GetClipboardText
- end if
-
- 'Recover to default
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- TranslateCommonTerms.UnCheck
- EditTerms.Click
- Kontext "ChineseDictionary"
- TChineseToSChinese.Check
- ReverseMapping.Check
- Sleep 1
- Delete.Click
- ChineseDictionary.OK
- Sleep 2
- Kontext "ChineseTranslation"
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_9
-
- Dim sTerm1 as String
- Dim sMapping1 as String
- Dim sMapping2 as String
- Dim i as Integer
-
- sTerm1 = "Term1"
- sMapping1 = "Mapping1" : sMapping2 = "Mapping2"
-
- printlog "Chinese dictionary : Add"
-
- Call hNewDocument
-
- printlog " Tools/language / Chinese translation ,"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
-
- printlog " Press 'Edit Terms' button"
- EditTerms.Click
- Kontext "ChineseDictionary"
- TChineseToSChinese.Check
-
- printlog " Check if term is empty , Add button should be inactive"
- try
- Add.Click
- Warnlog "- term is empty , Add button should be inactive !"
- catch
- endcatch
-
- printlog " Input test word in Term(A) and Mapping(B) , press Add"
- Term.SetText sTerm1
- Mapping.SetText sMapping1
- Add.Click
-
- printlog " Input test word in Term(A) and Mapping(C) , press Add"
- Term.SetText sTerm1
- Mapping.SetText sMapping2
-
- printlog " Check if term text is unaltered , Add button should be inactive"
- try
- Add.Click
- Warnlog "- term text is unaltered , Add button should be inactive !"
- catch
- endcatch
-
- ChineseDictionary.Cancel
- Kontext "ChineseTranslation"
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_10
-
- Dim sTerm1 as String
- Dim sMapping1 as String
- Dim sMapping2 as String
- Dim i as Integer
-
- sTerm1 = "Term1"
- sMapping1 = "Mapping1" : sMapping2 = "Mapping2"
-
- printlog "Chinese dictionary : Modify"
-
- Call hNewDocument
-
- printlog " Tools/language / Chinese translation ,"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
-
- printlog " Press 'Edit Terms' button"
- EditTerms.Click
- Kontext "ChineseDictionary"
- TChineseToSChinese.Check
-
- printlog " Input test word in Term(A) and Mapping(B) , press Add"
- Term.SetText sTerm1
- Mapping.SetText sMapping1
- Add.Click
-
- printlog " Input test word in Mapping(C) and select another property ,"
- printlog " + then press Modify"
- Mapping.SetText sMapping2
- Property.Select 3
- Sleep 1
- Modify.Click
-
- printlog " Check if modification is correct"
- TToSMappingContent.Select TToSMappingContent.GetItemCount
- if Term.GetText <> sTerm1 then
- Warnlog "Should get " & sTerm1 & " but get " & Term.GetText
- end if
- if Mapping.GetText <> sMapping2 then
- Warnlog "Should get " & sMapping2 & " but get " & Mapping.GetText
- end if
- if Property.GetSelIndex <> 3 then
- Warnlog "Property is NOT correct!"
- end if
- ChineseDictionary.Cancel
- Kontext "ChineseTranslation"
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tChineseTranslate_11
-
- Dim sTerm1 as String
- Dim sMapping1 as String
- Dim sTerm2 as String
- Dim i as Integer
-
- sTerm1 = "Term1" : sTerm2 = "Term2"
- sMapping1 = "Mapping1"
-
- printlog "Chinese dictionary : Delete"
-
- Call hNewDocument
-
- printlog " Tools/language / Chinese translation ,"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
-
- printlog " Press 'Edit Terms' button"
- EditTerms.Click
- Kontext "ChineseDictionary"
- TChineseToSChinese.Check
-
- printlog " Input test word in Term(A) and Mapping(B) , press Add"
- Term.SetText sTerm1
- Mapping.SetText sMapping1
- Add.Click
-
- printlog " Input test word in Term(C), check if Delete button is active"
- Term.SetText sTerm2
- try
- Delete.Click
- Warnlog "Delete button should be inactive !"
- catch
- endcatch
- ChineseDictionary.Cancel
-
- Kontext "ChineseTranslation"
- ChineseTranslation.Cancel
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tUndoRedo
-
- Dim sChinese as String
- Dim sExpect as String
-
- sChinese = "红上è“国"
- sExpect = "紅上è—國"
-
- printlog "Undo/Redo"
-
- Call hNewDocument
-
- fSetAsian(fGetLanguageName(86))
-
- printlog " Input some simplified chinese"
- Call wTypeKeys sChinese
-
- printlog " Tools/language / Chinese translation , check"
- printlog " + 'Simplified Chinese to Traditional Chinese' , press OK"
- ToolsLanguageChineseTranslation
- Kontext "ChineseTranslation"
- SChineseToTChinese.Check
- ChineseTranslation.OK
-
- printlog " Edit/Undo"
- EditUndo
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sChinese then
- Warnlog "#117810# Hope to get " & sChinese & " but get " & GetClipboardText
- end if
-
- printlog " Edit/Redo"
- EditRedo
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sExpect then
- Warnlog "#117810# Hope to get " & sExpect & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc b/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc
deleted file mode 100644
index c30bfd52d351..000000000000
--- a/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc
+++ /dev/null
@@ -1,442 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Functions for HTML-Test
-'*
-'************************************************************************
-'*
-' #0 wPasteAvailableClipboardFormats(TheNumber as integer
-' #0 wSetClipboardtestDefaults(ForWhat as string) as boolean
-' #0 wInsertNewCalcSheet(SheetName as string) as booloean
-' #0 wRenameCalcSheet(NewName as string) as boolean
-' #0 wFilterSpecialCharacters(ToFilter as string) as string
-' #0 ReplaceCharacter(stringToChange$
-' #0 wChangeHTMLCompatibility ( optional RecentCompatibility as integer ) as integer
-'*
-'\***********************************************************************
-
-function wPasteAvailableClipboardFormats(TheNumber as integer, CheckWhat as String )
- Dim i as integer, ClipboardFormat as string
- For i = 1 to TheNumber
- try
- Auswahl.Select i
- catch
- if i <= TheNumber then
- QAErrorlog "Number of clipboard formats seems to be changed!"
- end if
- exit for
- endcatch
- ClipboardFormat = Auswahl.GetSeltext
- printlog "- Paste as: " + ClipboardFormat
- Select Case CheckWhat
- Case "ctext", "DRAW"
- InhaltEinfuegen.Ok
- Sleep 3
- Case else
- InhaltEinfuegen.Ok
- Sleep 3
- end select
-
- Select Case gApplication
- Case "CALC"
- Kontext "TextImport"
- if TextImport.Exists then TextImport.Ok
- end select
-
- Kontext "Active"
- if Active.Exists then
- QAErrorlog " - " + Active.Gettext + "->Bug#110181"
- Active.Ok
- end if
- hSetDocumentContext()
- Call wTypeKeys "<Escape>",2
- Select Case gApplication
- Case "WRITER","MASTERDOCUMENT","HTML"
- Select Case CheckWhat
- Case "text","field","table"
- Call wTypeKeys "<Down><End><Return>"
- Call wTypeKeys "(" + Clipboardformat + ")"
- Call wTypeKeys "<End><Return>",2
- Case "frame", "DRAW", "graphicL", "graphicE", "ole", "control", "ctext"
- 'Call gMouseClick (50,100)
- Call wTypeKeys ("<Escape>")
- Call wTypeKeys "(" + Clipboardformat + ")"
- if i < TheNumber Then
- if gApplication <> "HTML" then
- InsertManualBreak
- Kontext "UmbruchEinfuegen"
- Seitenumbruch.Check
- UmbruchEinfuegen.OK
- else
- Call wTypeKeys ("<Return>" , 2)
- end if
- end if
- end select
- EditPasteSpecialWriter
-
- Case "IMPRESS","DRAW"
- Call gMouseClick(7,7)
- Call wRenameImpressSlide(ClipboardFormat)
- if i < TheNumber Then
- Call wInsertNewImpressSlide
- EditPasteSpecial
- end if
- Case "CALC"
- printlog " Rename first sheet"
- if wRenameCalcSheet(Clipboardformat) = False then
- Warnlog "Unable to rename Sheet Name !"
- end if
- if i < TheNumber Then
- if wInsertNewCalcSheet(Clipboardformat) = False then
- Warnlog "Unable to set Sheetname : " + Clipboardformat
- end if
- EditPasteSpecialCalc
-
- end if
- end select
- s_next_item:
- Kontext "InhaltEinfuegen"
- next i
- kontext "NavigatorDraw"
- if NavigatorDraw.Exists then NavigatorDraw.Close
- kontext "Navigator"
- if Navigator.Exists then Navigator.Close
-
- kontext "InhaltEinfuegen"
- f_exit:
- if InhaltEinfuegen.Exists then InhaltEinfuegen.Cancel
-end function
-
-' ---------------------------------------------------------------------------------
-
-function wSetClipboardtestDefaults(ForWhat as string) as boolean
- printlog " Points cursor to beginning of document "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\writer.sxw")
-
- Kontext "DocumentWriter"
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- printlog " Check if beginning of document reached "
- Call wTypeKeys "<Mod1 Shift Right>"
- EditCopy
-
- Select Case ForWhat
- Case "text"
- '"+ Select first paragraph "
- Call wTypeKeys "<Shift End>"
- Call wTypeKeys "<Shift Down>"
- '"+ Copy selected text "
-
- Case "field"
- '"+ Select paragraph with 'Date Field' "
- Call wTypeKeys "<Down>",3
- Call wTypeKeys "<Home><Shift End>"
- '"+ Copy selected text "
-
- Case "table"
- '"+ Select paragraph with 'Table' "
- Call wNavigatorAuswahl(2,1)
- 'Call wTypeKeys "<Down>",6
- Call wTypeKeys "<Mod1 A>",2
- '"+ Copy selected table "
-
- Case "frame"
- '"+ Select 'Frame' "
- Call wTypeKeys ( "<Shift F4>" )
- '"+ Copy selected frame "
-
- Case "DRAW"
- '"+ Select 'Drawing Object' "
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
- '"+ Copy selected Drawing Object "
-
- Case "graphicL"
- '"+ Select 'Linked Graphic' "
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",2
- '"+ Copy selected Linked Graphic "
-
- Case "graphicE"
- '"+ Select 'Embedded Graphic' "
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",3
- '"+ Copy selected Embedded Graphic "
-
- Case "ole"
- '"+ Select 'OLE Object' "
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",4
- '"+ Copy selected OLE Object "
-
- Case "control"
- '"+ Select 'Control' "
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",5
- '"+ Copy selected Control "
-
- Case else
- Warnlog "Unknown object!"
- end select
-
- try
- EditCopy
- EditCopy 'and a second time to make sure..
- wSetClipboardtestDefaults = True
- catch
- QAErrorlog "Error jump to beginning of document!"
- wSetClipboardtestDefaults = False
- endcatch
-
- ' Because of Clipboard bug set
- wSetClipboardtestDefaults = True
-end function
-
-' ---------------------------------------------------------------------------------
-
-function wInsertNewCalcSheet(SheetName as string) as boolean
- SheetName= wFilterSpecialCharacters(SheetName)
- printlog " Inserts a new shett and sets the name for it "
- InsertSheetCalc
- Kontext "TabelleEinfuegenCalc"
- if TabelleEinfuegenCalc.Exists then
- Nach.Check
- printlog " Check 'After current sheet' "
- NeuErstellen.Check
- printlog " Check 'New Sheet' "
- 'Tabellenname.Settext SheetName
- printlog " Set Name of sheet "
- TabelleEinfuegenCalc.Ok
- printlog " Unable to set name of Sheet ? "
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog Active.Gettext
- Active.Ok
- Kontext "TabelleEinfuegenCalc"
- if TabelleEinfuegenCalc.Exists then TabelleEinfuegenCalc.Cancel
- wInsertNewCalcSheet = False
- else
- wInsertNewCalcSheet = True
- end if
- else
- wInsertNewCalcSheet = True
- end if
- else
- Warnlog "Dialog 'Insert Sheet' not up!"
- wInsertNewCalcSheet = False
- end if
-end function
-
-' ---------------------------------------------------------------------------------
-
-function wRenameCalcSheet(NewName as string) as boolean
- printlog " Renames an existing sheet in calc "
- FormatSheetRename
- Kontext "TabelleUmbenennen"
- if TabelleUmbenennen.Exists then
- TabellenName.Settext wFilterSpecialCharacters(NewName)
- TabelleUmbenennen.Ok
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- Kontext "TabelleUmbenennen"
- if TabelleUmbenennen.Exists then TabelleUmbenennen.Cancel
- wRenameCalcSheet = False
- else
- wRenameCalcSheet = True
- end if
- else
- wRenameCalcSheet = True
- end if
- else
- wRenameCalcSheet = False
- end if
-end function
-
-' ---------------------------------------------------------------------------------
-
-sub wInsertNewImpressSlide()
- InsertSlide
-end sub
-
-' ---------------------------------------------------------------------------------
-
-sub wRenameImpressSlide(NewName as string)
- printlog " Edit->Layer->Rename "'
- try
- EditRenameSlide
- Kontext "NameDlgPage"
- if NameDlgPage.Exists then
- NameField.Settext NewName
- NameDlgPage.Ok
- else
- try
- Kontext "DocumentDrawImpress"
- TabBar.TypeKeys NewName + "<Return>" , true
- catch
- Warnlog "Unable to rename Slide (No access to to Tab-Bar!)"
- endcatch
- end if
- catch
- Warnlog "Unable to rename Slide!"
- endcatch
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-function wFilterSpecialCharacters(ToFilter as string) as string
- Dim i as integer, SpecialCharacters as string
- SpecialCharacters = "!$%&/()=?\}][{*+~'#;,:.-"
- printlog " Replace SpecialCharacters in SheetName with an underscore (_) "
- For i = 1 to len(SpecialCharacters)
- ToFilter = ReplaceCharacter(ToFilter,Mid$(SpecialCharacters,i,1),"_")
- next i
- wFilterSpecialCharacters = ToFilter
-end function
-
-' ---------------------------------------------------------------------------------
-
-function ReplaceCharacter(stringToChange$, charToReplace$, replaceWith$) As String
-
- 'Replaces a specified character in a string with another character that you specify
- Dim ln As Long
- Dim n As Long
- Dim NextLetter As String
- Dim FinalString As String
- Dim txt As String
- Dim char As String
- Dim rep As String
- txt = stringToChange$ 'store all arguments in
- char = charToReplace$ 'new variables
- rep = replaceWith$
-
- ln = Len(txt)
-
- For n = 1 To ln Step 1
- NextLetter = Mid(txt, n, 1)
- If NextLetter = char Then
- NextLetter = rep
- End If
- FinalString = FinalString & NextLetter
- Next n
- ReplaceCharacter = FinalString
-
-end function
-
-' ---------------------------------------------------------------------------------
-
-Sub wDisableImpressAutopilot()
-
- gApplication = "IMPRESS"
- Call hNewDocument
- ToolsOptions
- Call hToolsOptions ("IMPRESS","General")
- MitAutopilotStarten.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Call hCloseDocument
-
-end sub
-
-function wChangeHTMLCompatibility ( optional RecentCompatibility as integer ) as integer
- Dim i as integer
- Dim CurrentCharSet as String
- Dim RecentCharSet as integer
- Dim CharsetFound as boolean
- printlog " This function sets the charset in options to UTF-8 "
- printlog " Giving a parameter a special charset will be chosen "
-
- CharsetFound = False
- ToolsOptions
- Call hToolsOptions("LOADSAVE", "HTMLCOMPATIBILITY")
- if IsMissing(RecentCompatibility) = True then
- RecentCharSet = Zeichensatz.GetSelIndex
- For i = 1 to Zeichensatz.GetItemCount
- Zeichensatz.Select i
- CurrentCharset = Zeichensatz.GetSelText
- if Instr(Ucase(CurrentCharset), "UTF-8") then
- i = Zeichensatz.GetItemCount + 1
- CharsetFound = True
- end if
- next i
- else
- CharsetFound = True
- RecentCharSet = RecentCompatibility
- Zeichensatz.Select RecentCompatibility
- end if
- if CharsetFound = True then
- printlog "Charset has been changed!"
- else
- Warnlog "Couldn't set Charset to UTF-8!"
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- wChangeHTMLCompatibility = RecentCharset
-
-end function
-
-' ---------------------------------------------------------------------------------
-
-function wChangeHTMLCompatibilityExport ( optional wExport as integer ) as integer
- Dim i as integer
- Dim CurrentExportSet as String
- Dim RecentExportSet as integer
- Dim ExportFound as boolean
- printlog " This function sets the export in options to 'Oracle Open Office Writer' "
- printlog " Giving a parameter a special export will be chosen "
-
- ExportFound = False
- ToolsOptions
- Call hToolsOptions("LOADSAVE", "HTMLCOMPATIBILITY")
- if IsMissing ( wExport ) = True then
- RecentExportSet = Export.GetSelIndex
- For i = 1 to Export.GetItemCount
- Export.Select i
- CurrentExportset = Export.GetSelText
- if Instr(Ucase(CurrentExportset), "Oracle Open Office Writer") then
- i = Export.GetItemCount + 1
- ExportFound = True
- end if
- next i
- else
- ExportFound = True
- RecentExportSet = wExport
- Export.Select RecentExportSet
- end if
- if ExportFound = True then
- printlog "Export has been changed!"
- else
- Warnlog "Couldn't set Export to Oracle Open Office Writer!"
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- wChangeHTMLCompatibilityExport = RecentExportSet
-end function
diff --git a/testautomation/writer/optional/includes/clipboard/w_210_.inc b/testautomation/writer/optional/includes/clipboard/w_210_.inc
deleted file mode 100644
index bef3214a1d46..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_210_.inc
+++ /dev/null
@@ -1,455 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_210_
-
- Call WriterToWriterText
- Call WriterToWriterField
- Call WriterToWriterTable
- Call WriterToWriterFrame
- Call WriterToWriterDrawingObject
- Call WriterToWriterGraphicLinked
- Call WriterToWriterGraphicEmbedded
- Call WriterToWriterOLEObject
- Call WriterToWriterControl
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase WriterToWriterText
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select first paragraph "
- printlog " + Copy selected text "
- if wSetClipboardtestDefaults("text") = True then
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " + Save document as ..\user\work\writer_to_writer_text.odt"
- Call hFileSaveAsWithFilterKill( gOfficepath + "user\work\writer_to_writer_text.odt" , "writer8" )
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\writer_to_writer_text.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Text' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterField
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select paragraph with 'Date Field' "
- printlog " + Copy selected text "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("field") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " + Save document as ..\user\work\writer_to_writer_field.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_field.odt", "writer8")
- sleep (2) 'Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\writer_to_writer_field.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Field' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterTable
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Table' "
- printlog " + Copy selected table "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("table") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- sleep (1) 'Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " + Save document as ..\user\work\writer_to_writer_table.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_table.odt", "writer8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\writer_to_writer_table.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Table' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterFrame
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Frame' "
- printlog " + Copy selected frame "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("frame") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- sleep (1) 'Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
- printlog " + Save document as ..\user\work\writer_to_writer_frame.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_frame.odt", "writer8")
- WaitSlot (2000)
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_frame.odt",false)
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Frame' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterDrawingObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Drawing Object' "
- printlog " + Copy selected Drawing Object "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("DRAW") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Save document as ..\user\work\writer_to_writer_draw.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_draw.odt", "writer8")
- WaitSlot (2000)
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_draw.odt",false)
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Drawing Object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterGraphicLinked
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Linked Graphic' "
- printlog " + Copy selected Linked Graphic "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("graphicL") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- WaitSlot (2000)
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " + Save document as ..\user\work\writer_to_writer_graphic1.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_graphic1.odt", "writer8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_graphic1.odt",false)
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Linked Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterGraphicEmbedded
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Embedded Graphic' "
- printlog " + Copy selected Embedded Graphic "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("graphicE") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- Wait 500
- printlog " Paste 'Embedded Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_graphic2.odt", "writer8")
- printlog " + Save document as ..\user\work\writer_to_writer_graphic2.odt"
- WaitSlot (2000)
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_graphic2.odt",false)
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Embedded Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterOLEObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'OLE Object' "
- printlog " + Copy selected OLE Object "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("ole") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- Wait 500
- printlog " Paste 'OLE object' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
- printlog " + Save document as ..\user\work\writer_to_writer_ole.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_ole.odt", "writer8")
- WaitSlot (2000)
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_ole.odt",false)
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'OLE object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToWriterControl
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Control' "
- printlog " + Copy selected Control "
- printlog " + Open new document "
- if wSetClipboardtestDefaults("control") = True then
- Call hNewDocument
- printlog " + Edit / Paste Special "
- EditPasteSpecialWriter
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " + Save document as ..\user\work\writer_to_writer_control.odt"
- Call hFileSaveAsWithFilterKill(gOfficepath & "user\work\writer_to_writer_control.odt", "writer8")
- WaitSlot (2000)
- printlog " + Close saved document "
- Call hCloseDocument
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_control.odt",false)
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Writer -> 'Control' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/clipboard/w_211_.inc b/testautomation/writer/optional/includes/clipboard/w_211_.inc
deleted file mode 100644
index 7c4476eccc92..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_211_.inc
+++ /dev/null
@@ -1,540 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_211_
-
- Call WriterToCalcText
- Call WriterToCalcField
- Call WriterToCalcTable
- Call WriterToCalcFrame
- Call WriterToCalcDrawingObject
- Call WriterToCalcGraphicLinked 'wrn:1
- Call WriterToCalcGraphicEmbedded
- Call WriterToCalcOLEObject
- Call WriterToCalcControl
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase WriterToCalcText
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select first paragraph "
- printlog " Copy selected text "
- if wSetClipboardtestDefaults("text") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_text.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_text.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_text.ods",true)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Text' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcField
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select paragraph with 'Date Field' "
- printlog " Copy selected text "
- if wSetClipboardtestDefaults("field") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_field.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_field.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_field.ods",true)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Field' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcTable
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Table' "
- printlog " Copy selected table "
- if wSetClipboardtestDefaults("table") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- kontext "navigator"
- if navigator.exists then navigator.close
- printlog " Write Clipboard format under pasted content "
-
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_table.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_table.ods"
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- kontext "navigator"
- if navigator.exists then navigator.close
-
- hFileOpen( gOfficepath + "user\work\writer_to_calc_table.ods",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- kontext "navigator"
- if navigator.exists then navigator.close
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Table' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcFrame
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Frame' "
- printlog " Copy selected frame "
- if wSetClipboardtestDefaults("frame") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_frame.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_frame.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_frame.ods",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Frame' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcDrawingObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Drawing Object' "
- printlog " Copy selected Drawing Object "
- if wSetClipboardtestDefaults("DRAW") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_draw.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_draw.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_draw.ods",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Drawing Object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcGraphicLinked
- EnableQaErrors = true
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Linked Graphic' "
- printlog " Copy selected Linked Graphic "
- if wSetClipboardtestDefaults("graphicL") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- warnlog "Check why linked graphic fails !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_graphic1.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_graphic1.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_graphic1.ods",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Linked Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- EnableQaErrors = false
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcGraphicEmbedded
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Embedded Graphic' "
- printlog " Copy selected Embedded Graphic "
- if wSetClipboardtestDefaults("graphicE") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Embedded Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_graphic2.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_graphic2.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_graphic2.ods",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Embedded Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcOLEObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'OLE Object' "
- printlog " Copy selected OLE Object "
- if wSetClipboardtestDefaults("ole") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'OLE object' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_ole.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_ole.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_ole.ods",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'OLE object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToCalcControl
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Control' "
- printlog " Copy selected Control "
- if wSetClipboardtestDefaults("control") = True then
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_control.ods", "calc8")
- printlog " Save document as ..\user\work\writer_to_calc_control.ods"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_calc_control.ods",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Calc -> 'Control' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_212_.inc b/testautomation/writer/optional/includes/clipboard/w_212_.inc
deleted file mode 100644
index 277a837d42bd..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_212_.inc
+++ /dev/null
@@ -1,532 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_212_
-
- Call wDisableImpressAutopilot
- Call WriterToImpressText
- Call WriterToImpressField
- Call WriterToImpressTable
- Call WriterToImpressFrame
- Call WriterToImpressDrawingObject
- Call WriterToImpressGraphicLinked
- Call WriterToImpressGraphicEmbedded
- Call WriterToImpressOLEObject
- Call WriterToImpressControl
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase WriterToImpressText
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select first paragraph "
- printlog " Copy selected text "
- if wSetClipboardtestDefaults("text") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_text.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_text.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_text.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Text' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressField
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select paragraph with 'Date Field' "
- printlog " Copy selected text "
- if wSetClipboardtestDefaults("field") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_field.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_field.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_field.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Field' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressTable
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Table' "
- printlog " Copy selected table "
- if wSetClipboardtestDefaults("table") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_table.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_table.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_table.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Table' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressFrame
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Frame' "
- printlog " Copy selected frame "
- if wSetClipboardtestDefaults("frame") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_frame.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_frame.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_frame.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Frame' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressDrawingObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Drawing Object' "
- printlog " Copy selected Drawing Object "
- if wSetClipboardtestDefaults("DRAW") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_draw.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_draw.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_draw.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Drawing Object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressGraphicLinked
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Linked Graphic' "
- printlog " Copy selected Linked Graphic "
- if wSetClipboardtestDefaults("graphicL") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_graphic1.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_graphic1.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_graphic1.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Linked Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressGraphicEmbedded
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Embedded Graphic' "
- printlog " Copy selected Embedded Graphic "
- if wSetClipboardtestDefaults("graphicE") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Embedded Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_graphic2.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_graphic2.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_graphic2.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Embedded Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressOLEObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'OLE Object' "
- printlog " Copy selected OLE Object "
- if wSetClipboardtestDefaults("ole") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'OLE object' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_ole.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_ole.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_ole.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'OLE object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToImpressControl
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " Jump to beginning of document "
- printlog " Select 'Control' "
- printlog " Copy selected Control "
- if wSetClipboardtestDefaults("control") = True then
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_control.odp", "impress8")
- printlog " Save document as ..\user\work\writer_to_impress_control.odp"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_impress_control.odp",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Impress -> 'Control' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_213_.inc b/testautomation/writer/optional/includes/clipboard/w_213_.inc
deleted file mode 100644
index 72cdeac69678..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_213_.inc
+++ /dev/null
@@ -1,533 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_213_
-
- Call WriterToDrawText
- Call WriterToDrawField
- Call WriterToDrawTable
- Call WriterToDrawFrame
- Call WriterToDrawDrawingObject
- Call WriterToDrawGraphicLinked
- Call WriterToDrawGraphicEmbedded
- Call WriterToDrawOLEObject
- Call WriterToDrawControl
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase WriterToDrawText
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select first paragraph "
- printlog " + Copy selected text "
- if wSetClipboardtestDefaults("text") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_text.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_text.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_text.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Text' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawField
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select paragraph with 'Date Field' "
- printlog " + Copy selected text "
- if wSetClipboardtestDefaults("field") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_field.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_field.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_field.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Field' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawTable
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Table' "
- printlog " + Copy selected table "
- if wSetClipboardtestDefaults("table") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_table.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_table.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_table.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Table' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawFrame
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Frame' "
- printlog " + Copy selected frame "
- if wSetClipboardtestDefaults("frame") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_frame.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_frame.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_frame.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Frame' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawDrawingObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Drawing Object' "
- printlog " + Copy selected Drawing Object "
- if wSetClipboardtestDefaults("DRAW") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_draw.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_draw.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_draw.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Drawing Object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawGraphicLinked
- EnableQaErrors = true
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Linked Graphic' "
- printlog " + Copy selected Linked Graphic "
- if wSetClipboardtestDefaults("graphicL") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- warnlog "Check why linked graphic fails !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_graphic1.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_graphic1.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_graphic1.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Linked Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- EnableQaErrors = false
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawGraphicEmbedded
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Embedded Graphic' "
- printlog " + Copy selected Embedded Graphic "
- if wSetClipboardtestDefaults("graphicE") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Embedded Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_graphic2.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_graphic2.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_graphic2.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Embedded Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawOLEObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'OLE Object' "
- printlog " + Copy selected OLE Object "
- if wSetClipboardtestDefaults("ole") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'OLE object' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_ole.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_ole.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_ole.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'OLE object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToDrawControl
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Control' "
- printlog " + Copy selected Control "
- if wSetClipboardtestDefaults("control") = True then
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
- Call hCloseDocument
- wait 500
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_control.odg", "draw8")
- printlog " + Save document as ..\user\work\writer_to_draw_control.odg"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_draw_control.odg",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To Draw -> 'Control' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_214_.inc b/testautomation/writer/optional/includes/clipboard/w_214_.inc
deleted file mode 100644
index 12b9b687b426..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_214_.inc
+++ /dev/null
@@ -1,524 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_214_
-
- Call WriterToHTMLText
- Call WriterToHTMLField
- Call WriterToHTMLTable
- Call WriterToHTMLFrame
- Call WriterToHTMLDrawingObject
- Call WriterToHTMLGraphicLinked
- Call WriterToHTMLGraphicEmbedded
- Call WriterToHTMLOLEObject
- Call WriterToHTMLControl
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase WriterToHTMLText
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select first paragraph "
- printlog " + Copy selected text "
- if wSetClipboardtestDefaults("text") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_text.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_text.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_text.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Text' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLField
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select paragraph with 'Date Field' "
- printlog " + Copy selected text "
- if wSetClipboardtestDefaults("field") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_field.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_field.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_field.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Field' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLTable
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Table' "
- printlog " + Copy selected table "
- if wSetClipboardtestDefaults("table") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_table.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_table.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_table.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Table' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLFrame
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Frame' "
- printlog " + Copy selected frame "
- if wSetClipboardtestDefaults("frame") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_frame.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_frame.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_frame.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Frame' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLDrawingObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Drawing Object' "
- printlog " + Copy selected Drawing Object "
- if wSetClipboardtestDefaults("DRAW") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_draw.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_draw.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_draw.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Drawing Object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLGraphicLinked
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Linked Graphic' "
- printlog " + Copy selected Linked Graphic "
- if wSetClipboardtestDefaults("graphicL") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_graphic1.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_graphic1.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_graphic1.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Linked Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLGraphicEmbedded
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Embedded Graphic' "
- printlog " + Copy selected Embedded Graphic "
- if wSetClipboardtestDefaults("graphicE") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Embedded Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_graphic2.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_graphic2.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_graphic2.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Embedded Graphic' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLOLEObject
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'OLE Object' "
- printlog " + Copy selected OLE Object "
- if wSetClipboardtestDefaults("ole") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'OLE object' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_ole.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_ole.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_ole.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'OLE object' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase WriterToHTMLControl
- gApplication = "WRITER"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Control' "
- printlog " + Copy selected Control "
- if wSetClipboardtestDefaults("control") = True then
- gApplication = "HTML"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_control.html", "HTML")
- printlog " + Save document as ..\user\work\writer_to_html_control.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\writer_to_html_control.html")
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Writer To HTML -> 'Control' failed !"
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/clipboard/w_215_.inc b/testautomation/writer/optional/includes/clipboard/w_215_.inc
deleted file mode 100644
index 992efb2981ca..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_215_.inc
+++ /dev/null
@@ -1,448 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_215_
-
- Call CalcToWriterText1
- Call CalcToWriterText2
- Call CalcToWriterCalculation
- Call CalcToWriterHyperlink1
- Call CalcToWriterHyperlink2
- Call CalcToWriterDrawObject
- Call CalcToWriterOLE
-
-end sub
-
-'--------------------------------------------------------
-
-testcase CalcToWriterText1
- gApplication = "CALC"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
- printlog " Jump to beginning of document "
- printlog " Select cell <A2> "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
-
- Kontext "DocumentCalc"
- printlog " Jump to beginning of document "
- DocumentCalc.TypeKeys "<Mod1 Home>"
- DocumentCalc.TypeKeys "<Down>"
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_textformat_wholecell.odt", "writer8")
- printlog " Save document as ..\user\work\writer_to_writer_textformat_wholecell.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- printlog " Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\writer_to_writer_textformat_wholecell.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Call hCloseDocument
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase CalcToWriterText2
- gApplication = "CALC"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
- printlog " Jump to beginning of document "
- printlog " Select cell <A1>, press F2 and select all "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
-
- Kontext "DocumentCalc"
- printlog " Jump to beginning of document "
- DocumentCalc.TypeKeys "<Mod1 Home>"
- DocumentCalc.TypeKeys "<Down>"
- DocumentCalc.TypeKeys "<F2>"
- DocumentCalc.TypeKeys "<Mod1 A>"
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_textformat_cellcontent.odt", "writer8")
- printlog " Save document as ..\user\work\writer_to_writer_textformat_cellcontent.odt"
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_textformat_cellcontent.odt",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Call hCloseDocument
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase CalcToWriterCalculation
- gApplication = "CALC"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
- printlog " Jump to beginning of document "
- printlog " Select cell <A5:C5> "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
-
- Kontext "DocumentCalc"
- printlog " Jump to beginning of document "
- DocumentCalc.TypeKeys "<Mod1 Home>"
- DocumentCalc.TypeKeys "<Down>",4
- DocumentCalc.TypeKeys "<Shift Right>", 2
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_calculation_cellformat.odt", "writer8")
- printlog " Save document as ..\user\work\writer_to_writer_calculation_cellformat.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- printlog " Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\writer_to_writer_calculation_cellformat.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Call hCloseDocument
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase CalcToWriterHyperlink1
- gApplication = "CALC"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
- printlog " Jump to beginning of document "
- printlog " Select cell <A8> "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
-
- Kontext "DocumentCalc"
- printlog " Jump to beginning of document "
- DocumentCalc.TypeKeys "<Mod1 Home>"
- DocumentCalc.TypeKeys "<Down>",7
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_hyperlink_wholecell.odt", "writer8")
- printlog " Save document as ..\user\work\writer_to_writer_hyperlink_wholecell.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- printlog " Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\writer_to_writer_hyperlink_wholecell.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Call hCloseDocument
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase CalcToWriterHyperlink2
- gApplication = "CALC"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
- printlog " Jump to beginning of document "
- printlog " Select cell <A8> "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
-
- Kontext "DocumentCalc"
- printlog " Jump to beginning of document "
- DocumentCalc.TypeKeys "<Mod1 Home>"
- DocumentCalc.TypeKeys "<Down>",7
- DocumentCalc.TypeKeys "<F2>"
- DocumentCalc.TypeKeys "<Mod1 A>"
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Save document as ..\user\work\writer_to_writer_hyperlink_cellcontent.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt", "writer8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Call hCloseDocument
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase CalcToWriterDrawObject
- gApplication = "CALC"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
- printlog " Jump to beginning of document "
- printlog " Select Drawing object "
- printlog " Copy selected object "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
-
- Kontext "DocumentCalc"
- printlog " Jump to beginning of document "
- Call wNavigatorAuswahl(8,1)
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
- printlog " Save document as ..\user\work\writer_to_writer_draw.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_draw.odt", "writer8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_draw.odt",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Call hCloseDocument
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase CalcToWriterOLE
- gApplication = "CALC"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
- printlog " Jump to beginning of document "
- printlog " Select OLE-Object "
- printlog " Copy selected object "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
-
- Kontext "DocumentCalc"
- printlog " Jump to beginning of document "
- Call wNavigatorAuswahl(6,1)
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
- printlog " Save document as ..\user\work\writer_to_writer_ole.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_ole.odt", "writer8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\writer_to_writer_ole.odt",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Call hCloseDocument
-endcase
-
diff --git a/testautomation/writer/optional/includes/clipboard/w_216_.inc b/testautomation/writer/optional/includes/clipboard/w_216_.inc
deleted file mode 100644
index bfbbdf637695..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_216_.inc
+++ /dev/null
@@ -1,440 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_216_
-
- Call HTMLToWRITERText
- Call HTMLToWRITERField
- Call HTMLToWRITERTable
- Call HTMLToWRITERGraphicLinked
- Call HTMLToWRITERControl
- Call HTMLToWRITERFloatingFrame
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase HTMLToWRITERText
-
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select first paragraph "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- sleep (3)
- if GetDocumentCount() = 2 then
- Warnlog "#i104365#read only document remains opened"
- endif
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift Down><Shift End>"
- EditCopy
- sleep (2)
- Call wTypeKeys "<Home>"
- gApplication = "WRITER"
-
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Save document as ..\user\work\html_to_writer_text.odt"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_text.odt", "writer8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\html_to_writer_text.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close saved document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToWRITERField
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select paragraph with 'Date Field' "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- if GetDocumentCount() = 2 then
- Warnlog "#i104365#read only document remains opened"
- endif
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",2
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
-
- gApplication = "WRITER"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_field.odt", "writer8")
- printlog " Save document as ..\user\work\html_to_writer_field.odt"
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\html_to_writer_field.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close saved document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToWRITERTable
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Table' "
- printlog " Copy selected table "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- if GetDocumentCount() = 2 then
- Warnlog "#i104365#read only document remains opened"
- endif
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",5
- Call wTypeKeys "<Mod1 A>",2
- EditCopy
-
- gApplication = "WRITER"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_table.odt", "writer8")
- printlog " Save document as ..\user\work\html_to_writer_table.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- if hFileOpen (gOfficepath + "user\work\html_to_writer_table.odt",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- printlog " Reopen saved document "
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close saved document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToWRITERGraphicLinked
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Linked Graphic' "
- printlog " Copy selected Linked Graphic "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- if GetDocumentCount() = 2 then
- Warnlog "#i104365#read only document remains opened"
- endif
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- EditCopy
-
- gApplication = "WRITER"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_graphic1.odt", "writer8")
- printlog " Save document as ..\user\work\html_to_writer_graphic1.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_writer_graphic1.odt",false)
- printlog " Reopen saved document "
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close saved document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToWRITERControl
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Control' "
- printlog " Copy selected Control "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- if GetDocumentCount() = 2 then
- Warnlog "#i104365#read only document remains opened"
- endif
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
- EditCopy
-
- gApplication = "WRITER"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_control.odt", "writer8")
- printlog " Save document as ..\user\work\html_to_writer_control.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_writer_control.odt",false)
- printlog " Reopen saved document "
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close saved document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToWRITERFloatingFrame
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Floating Frame' "
- printlog " Copy selected Floating Frame "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- if GetDocumentCount() = 2 then
- Warnlog "#i104365#read only document remains opened"
- endif
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",2
- try
- EditCopy
- catch
- Warnlog "Edit / Copy is disabled ! Maybe object not selected !"
- Call hCloseDocument
- goto endsub
- endcatch
-
- gApplication = "WRITER"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Floating Frame' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_float.odt", "writer8")
- printlog " Save document as ..\user\work\html_to_writer_float.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_writer_float.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close saved document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_217_.inc b/testautomation/writer/optional/includes/clipboard/w_217_.inc
deleted file mode 100644
index 5e81b745f6d8..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_217_.inc
+++ /dev/null
@@ -1,393 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_217_
-
- Call HTMLToCALCText
- Call HTMLToCALCField
- Call HTMLToCALCTable
- Call HTMLToCALCGraphicLinked
- Call HTMLToCALCControl
- Call HTMLToCALCFloatingFrame
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase HTMLToCALCText
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select first paragraph "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift Down><Shift End>"
- EditCopy
-
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Save document as ..\user\work\html_to_calc_text.ods"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_text.ods", "calc8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\html_to_calc_text.ods",true) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToCALCField
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select paragraph with 'Date Field' "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",2
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
-
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " Save document as ..\user\work\html_to_calc_field.ods"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_field.ods", "calc8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_calc_field.ods",true)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToCALCTable
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Table' "
- printlog " Copy selected table "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",5
- Call wTypeKeys "<Mod1 A>",2
- sleep (1)
- EditCopy
-
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists(2) then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_table.ods", "calc8")
- printlog " Save document as ..\user\work\html_to_calc_table.ods"
- Call hCloseDocument
- printlog " Close saved document "
- hFileOpen( gOfficepath + "user\work\html_to_calc_table.ods",true)
- printlog " Reopen saved document "
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToCALCGraphicLinked
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Linked Graphic' "
- printlog " Copy selected Linked Graphic "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- EditCopy
- EditCopy
-
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- warnlog "Unable to execute 'Edit / Paste Special'! Test failed! Manually not reproducable"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " Save document as ..\user\work\html_to_calc_graphic1.ods"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_graphic1.ods", "calc8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_calc_graphic1.ods",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToCALCControl
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Control' "
- printlog " Copy selected Control "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
- EditCopy
-
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Save document as ..\user\work\html_to_calc_control.sxc"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_control.ods", "calc8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_calc_control.ods",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToCALCFloatingFrame
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Floating Frame' "
- printlog " Copy selected Floating Frame "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",2
- wait 500
- try
- EditCopy
- EditCopy
- catch
- Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
- Call hCloseDocument
- goto endsub
- endcatch
- gApplication = "CALC"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialCalc
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- printlog " Paste 'Floating Frame' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists(3) then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Save document as ..\user\work\html_to_calc_float.ods"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_float.ods", "calc8")
- printlog " Close saved document "
- Call hCloseDocument
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_calc_float.ods",false)
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_218_.inc b/testautomation/writer/optional/includes/clipboard/w_218_.inc
deleted file mode 100644
index 08f23ef0df96..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_218_.inc
+++ /dev/null
@@ -1,402 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_218_
-
- Call HTMLToDRAWText
- Call HTMLToDRAWField
- Call HTMLToDRAWTable
- Call HTMLToDRAWGraphicLinked
- Call HTMLToDRAWControl
- Call HTMLToDRAWFloatingFrame
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase HTMLToDRAWText
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " + Jump to beginning of document "
- printlog " + Select first paragraph "
- printlog " + Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift Down><Shift End>"
- EditCopy
-
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " + Save document as ..\user\work\html_to_draw_text.odg"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_text.odg", "draw8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- wait 500
- printlog " + Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\html_to_draw_text.odg",false) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToDRAWField
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " + Jump to beginning of document "
- printlog " + Select paragraph with 'Date Field' "
- printlog " + Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",2
- Call wTypeKeys "<Home><Shift End>"
- try
- EditCopy
- catch
- Call wTypeKeys "<Down>",1
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
- endcatch
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " + Save document as ..\user\work\html_to_draw_field.odg"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_field.odg", "draw8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- sleep (2)
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_draw_field.odg",false)
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToDRAWTable
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Table' "
- printlog " + Copy selected table "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",5
- Call wTypeKeys "<Mod1 A>",2
- EditCopy
-
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " + Save document as ..\user\work\html_to_draw_table.odg"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_table.odg", "draw8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- wait 500
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_draw_table.odg",false)
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToDRAWGraphicLinked
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Linked Graphic' "
- printlog " + Copy selected Linked Graphic "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- EditCopy
-
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " + Save document as ..\user\work\html_to_draw_graphic1.odg"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_graphic1.odg", "draw8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- wait 500
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_draw_graphic1.odg",false)
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToDRAWControl
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Control' "
- printlog " + Copy selected Control "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
- EditCopy
-
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " + Save document as ..\user\work\html_to_draw_control.odg"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_control.odg", "draw8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- wait 500
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_draw_control.odg",false)
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToDRAWFloatingFrame
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " + Jump to beginning of document "
- printlog " + Select 'Floating Frame' "
- printlog " + Copy selected Floating Frame "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",2
- try
- EditCopy
- catch
- Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
- Call hCloseDocument
- goto endsub
- endcatch
- gApplication = "DRAW"
- printlog " + Open new document "
- Call hNewDocument
- printlog " + Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Floating Frame' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " + Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " + Save document as ..\user\work\html_to_draw_float.odg"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_float.odg", "draw8")
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- wait 500
- printlog " + Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_draw_float.odg",false)
- Wait 500
- printlog " + Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_219_.inc b/testautomation/writer/optional/includes/clipboard/w_219_.inc
deleted file mode 100644
index 371e1e127e6e..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_219_.inc
+++ /dev/null
@@ -1,397 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_219_
-
- Call HTMLToIMPRESSText
- Call HTMLToIMPRESSField
- Call HTMLToIMPRESSTable
- Call HTMLToIMPRESSGraphicLinked
- Call HTMLToIMPRESSControl
- Call HTMLToIMPRESSFloatingFrame
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase HTMLToIMPRESSText
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select first paragraph "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift Down><Shift End>"
- EditCopy
-
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Save document as ..\user\work\html_to_impress_text.odp"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_text.odp", "impress8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- if hFileOpen (gOfficepath + "user\work\html_to_impress_text.odp",false) = false then
- Kontext "Active"
- if Active.Exists then
- try
- Active.Yes
- catch
- Warnlog "Unable to remove checkbox: " + Active.Gettext
- Active.ok
- endcatch
- end if
- end if
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToIMPRESSField
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select paragraph with 'Date Field' "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",2
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
-
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " Save document as ..\user\work\html_to_impress_field.odp"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_field.odp", "impress8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_impress_field.odp",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToIMPRESSTable
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Table' "
- printlog " Copy selected table "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",5
- Call wTypeKeys "<Mod1 A>",2
- EditCopy
-
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " Save document as ..\user\work\html_to_impress_table.odp"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_table.odp", "impress8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_impress_table.odp",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToIMPRESSGraphicLinked
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Linked Graphic' "
- printlog " Copy selected Linked Graphic "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- EditCopy
-
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " Save document as ..\user\work\html_to_impress_graphic1.odp"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_graphic1.odp", "impress8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_impress_graphic1.odp",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToIMPRESSControl
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Control' "
- printlog " Copy selected Control "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
- EditCopy
-
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Save document as ..\user\work\html_to_impress_control.odp"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_control.odp", "impress8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_impress_control.odp",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToIMPRESSFloatingFrame
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Floating Frame' "
- printlog " Copy selected Floating Frame "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",2
- try
- EditCopy
- catch
- Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
- Call hCloseDocument
- goto endsub
- endcatch
- gApplication = "IMPRESS"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecial
- catch
- Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
- Call hCloseDocument
- Call hCloseDocument
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Floating Frame' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- printlog " Write Clipboard format under pasted content "
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Save document as ..\user\work\html_to_impress_float.odp"
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_float.odp", "impress8")
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- wait 500
- printlog " Reopen saved document "
- hFileOpen( gOfficepath + "user\work\html_to_impress_float.odp",false)
- Wait 500
- printlog " Close saved document "
- Call hCloseDocument
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_220_.inc b/testautomation/writer/optional/includes/clipboard/w_220_.inc
deleted file mode 100644
index 4ae43a6d7124..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_220_.inc
+++ /dev/null
@@ -1,392 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_220_
-
- Call HTMLToHTMLText
- Call HTMLToHTMLField
- Call HTMLToHTMLTable
- Call HTMLToHTMLGraphicLinked
- Call HTMLToHTMLControl
- Call HTMLToHTMLFloatingFrame
-
-end sub
-
-' ---------------------------------------------------------------------------------
-
-testcase HTMLToHTMLText
-
-' if lcase(gPlatform) = "x86" and Val(mid$(gMinor, 2, Len(gMinor))) <= 129 then
-' QAErrorlog "#125780#Stacktrace ID: 251397"
-' goto endsub
-' end if
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select first paragraph "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift Down><Shift End>"
- EditCopy
-
- gApplication = "HTML"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_text.html", "HTML")
- printlog " Save document as ..\user\work\html_to_html_text.html"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_html_text.html",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToHTMLField
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select paragraph with 'Date Field' "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",2
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
-
- gApplication = "HTML"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Field' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_field.html", "HTML")
- printlog " Save document as ..\user\work\html_to_html_field.html"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_html_field.html" )
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToHTMLTable
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Table' "
- printlog " Copy selected table "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down>",5
- Call wTypeKeys "<Mod1 A>",2
- EditCopy
-
- gApplication = "HTML"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Table' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_table.html", "HTML")
- printlog " Save document as ..\user\work\html_to_html_table.html"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_html_table.html",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToHTMLGraphicLinked
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Linked Graphic' "
- printlog " Copy selected Linked Graphic "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- EditCopy
-
- gApplication = "HTML"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Linked Graphic' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_graphic1.html", "HTML")
- printlog " Save document as ..\user\work\html_to_html_graphic1.html"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- sleep (2)
- hFileOpen( gOfficepath + "user\work\html_to_html_graphic1.html",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToHTMLControl
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Control' "
- printlog " Copy selected Control "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
- EditCopy
-
- gApplication = "HTML"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Control' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_control.html", "HTML")
- printlog " Save document as ..\user\work\html_to_html_control.html"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_html_control.html",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ----------------------------------------------------------------------------------------------
-
-testcase HTMLToHTMLFloatingFrame
- gApplication = "HTML"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
- printlog " Jump to beginning of document "
- printlog " Select 'Floating Frame' "
- printlog " Copy selected Floating Frame "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\html.html")
-
- printlog " Jump to beginning of document "
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>",2
- try
- EditCopy
- catch
- Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
- Call hCloseDocument
- goto endsub
- endcatch
- gApplication = "HTML"
- printlog " Open new document "
- Call hNewDocument
- printlog " Edit / Paste Special "
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Floating Frame' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_float.html", "HTML")
- printlog " Save document as ..\user\work\html_to_html_float.html"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\html_to_html_float.html",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_221_.inc b/testautomation/writer/optional/includes/clipboard/w_221_.inc
deleted file mode 100644
index 7b5674d9ca97..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_221_.inc
+++ /dev/null
@@ -1,430 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_221_
-
- Call DrawToHTMLScrollingText
- Call DrawToHTMLGroupedObject
- Call DrawToHTML3D
- Call DrawToHTMLFontwork
- Call DrawToHTMLBullets
- Call DrawToHTMLDimensionLines
- Call DrawToHTMLConnectors
-
-end sub
-
-
-testcase DrawToHTMLScrollingText
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " + Jump to beginning of document "
- printlog " + Select Scrolling text "
- printlog " + Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>"
- EditCopy
- gApplication = "HTML"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Scrolling Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_scrolling_text.html", "HTML")
- printlog " + Save document as ..\user\work\draw_to_html_scrolling_text.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_html_scrolling_text.html",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToHTMLGroupedObject
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " + Jump to beginning of document "
- printlog " + Select Grouped Object "
- printlog " + Copy selected Object "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",2
- EditCopy
- gApplication = "HTML"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_grouped_object.html", "HTML")
- printlog " + Save document as ..\user\work\draw_to_html_grouped_object.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_html_grouped_object.html",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToHTML3D
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " + Jump to beginning of document "
- printlog " + Select cell <A5:C5> "
- printlog " + Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",3
- EditCopy
- gApplication = "HTML"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_3d.html", "HTML")
- printlog " + Save document as ..\user\work\draw_to_html_3d.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_html_3d.html",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToHTMLFontwork
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " + Jump to beginning of document "
- printlog " + Select Fontwork "
- printlog " + Copy selected Fontwork "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",4
- EditCopy
- gApplication = "HTML"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_fontwork.html", "HTML")
- printlog " + Save document as ..\user\work\draw_to_html_fontwork.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_html_fontwork.html",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToHTMLBullets
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " + Jump to beginning of document "
- printlog " + Select Bullets "
- printlog " + Copy selected Bullets "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",5
- EditCopy
- gApplication = "HTML"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_bullets.html", "HTML")
- printlog " + Save document as ..\user\work\draw_to_html_bullets.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_html_bullets.html",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToHTMLDimensionLines
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " + Jump to beginning of document "
- printlog " + Select Dimension Lines "
- printlog " + Copy selected Dimension Lines "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<PageDown>"
- DocumentDraw.TypeKeys "<Tab>"
- EditCopy
- gApplication = "HTML"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Dimension Lines' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_dim_lines.html", "HTML")
- printlog " + Save document as ..\user\work\draw_to_html_dim_lines.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_html_dim_lines.html",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToHTMLConnectors
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " + Jump to beginning of document "
- printlog " + Select Connectors "
- printlog " + Copy selected Connectors "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<PageDown>"
- DocumentDraw.TypeKeys "<Tab>"
- EditCopy
- gApplication = "HTML"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Connectors' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " + Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_connectors.html", "HTML")
- printlog " + Save document as ..\user\work\draw_to_html_connectors.html"
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_html_connectors.html",false)
- printlog " + Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " + Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
diff --git a/testautomation/writer/optional/includes/clipboard/w_222_.inc b/testautomation/writer/optional/includes/clipboard/w_222_.inc
deleted file mode 100644
index 166ad4b4e38e..000000000000
--- a/testautomation/writer/optional/includes/clipboard/w_222_.inc
+++ /dev/null
@@ -1,432 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
-'*
-'\***********************************************************************
-
-sub w_222_
-
- Call DrawToWriterScrollingText
- Call DrawToWriterGroupedObject
- Call DrawToWriter3D
- Call DrawToWriterFontwork
- Call DrawToWriterBullets
- Call DrawToWriterDimensionLines
- Call DrawToWriterConnectors
-
-end sub
-
-'------------------------------------------------------------------------------
-
-testcase DrawToWriterScrollingText
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " Jump to beginning of document "
- printlog " Select Scrolling text "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>"
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Scrolling Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_scrolling_text.odt", "writer8")
- printlog " Save document as ..\user\work\draw_to_writer_scrolling_text.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_writer_scrolling_text.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToWriterGroupedObject
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " Jump to beginning of document "
- printlog " Select Grouped Object "
- printlog " Copy selected Object "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",2
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_grouped_object.odt", "writer8")
- printlog " Save document as ..\user\work\draw_to_writer_grouped_object.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_writer_grouped_object.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToWriter3D
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " Jump to beginning of document "
- printlog " Select cell <A5:C5> "
- printlog " Copy selected text "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",3
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_3d.odt", "writer8")
- printlog " Save document as ..\user\work\draw_to_writer_3d.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_writer_3d.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToWriterFontwork
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " Jump to beginning of document "
- printlog " Select Fontwork "
- printlog " Copy selected Fontwork "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",4
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_fontwork.odt", "writer8")
- printlog " Save document as ..\user\work\draw_to_writer_fontwork.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_writer_fontwork.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToWriterBullets
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " Jump to beginning of document "
- printlog " Select Bullets "
- printlog " Copy selected Bullets "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<Tab>",5
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Text' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_bullets.odt", "writer8")
- printlog " Save document as ..\user\work\draw_to_writer_bullets.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_writer_bullets.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToWriterDimensionLines
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " Jump to beginning of document "
- printlog " Select Dimension Lines "
- printlog " Copy selected Dimension Lines "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<PageDown>"
- DocumentDraw.TypeKeys "<Tab>"
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Dimension Lines' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_dim_lines.odt", "writer8")
- printlog " Save document as ..\user\work\draw_to_writer_dim_lines.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_writer_dim_lines.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ---------------------------------------------------------------------------------
-
-testcase DrawToWriterConnectors
-
- gApplication = "DRAW"
- printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
- printlog " Jump to beginning of document "
- printlog " Select Connectors "
- printlog " Copy selected Connectors "
- hFileOpenLocally( gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
-
- Kontext "DocumentDraw"
- printlog " Jump to beginning of document "
- DocumentDraw.TypeKeys "<PageDown>"
- DocumentDraw.TypeKeys "<Tab>"
- EditCopy
- gApplication = "WRITER"
- printlog " Open a new writerdocument "
- Call hNewDocument
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
- Call hCloseDocument ' Close Source-File
- Call hCloseDocument ' Close Target-File
- goto endsub
- endcatch
- Wait 500
- printlog " Paste 'Connectors' in all available clipboard formats "
- Kontext "InhaltEinfuegen"
- if InhaltEinfuegen.Exists then
- Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
- printlog " Write Clipboard format under pasted content "
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_connectors.odt", "writer8")
- printlog " Save document as ..\user\work\draw_to_writer_connectors.odt"
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- wait 500
- hFileOpen( gOfficepath + "user\work\draw_to_writer_connectors.odt",false)
- printlog " Reopen saved document "
- Wait 500
- Call hCloseDocument
- printlog " Close saved document "
- else
- Warnlog "Dialog 'Paste Special' is not up!"
- Call hCloseDocument
- goto endsub
- end if
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc b/testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc
deleted file mode 100644
index 4965250e7c9f..000000000000
--- a/testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc
+++ /dev/null
@@ -1,433 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Pick context for context menus
-'*
-'\***********************************************************************
-
-sub w_contextmenu1
-
- Call tPickSimpleText
- Call tPickSimpleTextMultiselection
- Call tPickGraphic
- Call tPickHyperlink
- Call tHyperlinkEdit
- Call tHyperlinkRemove
- Call tHyperlinkCopy
- Call tPickDrawingObjects
-
-end sub
-
-' -----------------------------------------------------------------------------
-
-testcase tPickSimpleText
-
- Dim SetThisFontSize as string
- Dim GetThisFontSize as string
- printlog "Open context menu on unselected text"
- printlog " Open a new text document"
- Call hNewDocument
- printlog " Set zoom to 100%"
- Call wSetZoom
- printlog " Write down 'This is a test'"
- Call wTypeKeys "This is a test"
- printlog " In text document select word 'test'"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Mod1 Shift Left>"
- printlog " Open context menu in word 'This'"
- Call wTypeKeys "<Mod1 Left>", 3
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<Shift F10>"
- printlog " Change font size for word 'This'"
- try
- Call hMenuSelectNr(3)
- wait 500
- SetThisFontSize = hMenuItemGetText(MenuGetItemCount)
- Call hMenuSelectNr(MenuGetItemCount)
- catch
- Warnlog "Unable to open context menu"
- endcatch
-
- Call wTypeKeys "<Home>"
- printlog " Check if font size has changed for word 'This' and not for word 'test'"
- Call wTypeKeys "<Right>"
- FormatCharacter
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- if gAsianSup = True or gCTLSup = True then
- GetThisFontSize = SizeWest.GetSelText
- else
- GetThisFontSize = Size.GetSelText
- end if
- TabFont.Ok
-
- if GetThisFontSize <> SetThisFontSize then Warnlog "Fontsize for word 'This' has not correctly been set"
-
- Call wTypeKeys "<Mod1 Right>", 3
- Call wTypeKeys "<Right>"
- FormatCharacter
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- if gAsianSup = True or gCTLSup = True then
- GetThisFontSize = SizeWest.GetSelText
- else
- GetThisFontSize = Size.GetSelText
- end if
- TabFont.Ok
-
- if GetThisFontSize = SetThisFontSize then Warnlog "Fontsize for word 'test' has been set"
- Call hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
-
-testcase tPickSimpleTextMultiselection
- Dim SetThisFontSize as string
- Dim GetThisFontSize as string
- printlog " Open context menu on unselected text"
- Call hNewDocument
- Printlog " Set zoom to 100%"
- Call wSetZoom
- Printlog " Write down 'This is a test'"
- Call wTypeKeys "This is a test"
-
- Printlog " In text document select word 'test' and 'This'"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Mod1 Shift Left>"
- Printlog " Open context menu in word 'This'"
- Printlog " Shift + F8 changes selection mode in writer"
- Call wTypeKeys "<Shift F8>"
- Call wTypeKeys "<Mod1 Left>", 3
- Call wTypeKeys "<Mod1 Shift Right>"
- Call wTypeKeys "<Shift F8>"
- Call wTypeKeys "<Shift F10>"
-
- Printlog " Change font size"
- try
- Call hMenuSelectNr(3)
- wait 500
- SetThisFontSize = hMenuItemGetText(MenuGetItemCount)
- Call hMenuSelectNr(MenuGetItemCount)
- catch
- Warnlog "Unable to open context menu"
- endcatch
-
- Call wTypeKeys "<Home>"
- Printlog "Check if font size has changed for words 'This' and 'test'"
- Call wTypeKeys "<Right>"
- FormatCharacter
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- if gAsianSup = True or gCTLSup = True then
- GetThisFontSize = SizeWest.GetSelText
- else
- GetThisFontSize = Size.GetSelText
- end if
- TabFont.Ok
-
- if GetThisFontSize <> SetThisFontSize then Warnlog "Fontsize for word 'This' has not correctly been set"
-
- Call wTypeKeys "<Mod1 Right>", 3
- Call wTypeKeys "<Right>"
- FormatCharacter
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- if gAsianSup = True or gCTLSup = True then
- GetThisFontSize = SizeWest.GetSelText
- else
- GetThisFontSize = Size.GetSelText
- end if
- TabFont.Ok
-
- if GetThisFontSize <> SetThisFontSize then Warnlog "Fontsize for word 'test' has not correctly been set"
- printlog " Close text document"
- Call hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
-
-testcase tPickGraphic
-
- printlog "Open context menu on not focussed graphic"
- Call hNewDocument
- Printlog " Set zoom to 100%"
- Call wSetZoom
- Printlog " Insert a graphic into writerdocument"
- Call hGrafikEinfuegen ( gTesttoolPath + "writer\optional\input\menu\drums.jpg" )
- Printlog " Deselect graphic with 'Escape' and insert some text in text document"
- Call wTypeKeys "<Escape>"
- Call wTypeKeys "Don't be afraid !"
-
- Call gMouseClick ( 50,30 )
- Printlog " Open context menu upon graphic with mouse"
- Call wOpenContextMenu(true)
-
- printlog " Select 'ImageMap' in context menu"
- try
- CALL hMenuFindSelect (".uno:ImageMapDialog", true, 11, true) 'Find "ImageMap" and call the slot.
- wait 500
- catch
- Warnlog "Unable to open context menu"
- Call hCloseDocument
- goto endsub
- endcatch
- Printlog " The graphic has to be selected and the context menu has to show graphics related commands"
- Kontext "ImageMapEditor"
- if Not ImageMapEditor.Exists(3) then
- Warnlog "Unfortunately not the context menu from graphics has been used!"
- Kontext
- try
- Active.Setpage TabFont
- Kontext "TabFont"
- TabFont.Cancel
- catch
- endcatch
- else
- ImageMapEditor.Close
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.No
- end if
- end if
-
- Kontext "DocumentWriter"
- try
- FormatGraphics
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- TabType.Close
- catch
- Warnlog "Graphic has not been selected!"
- endcatch
- printlog " Close text document"
- Call hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
-
-testcase tPickHyperlink
-
- printlog " Context menu on hyperlinks"
- printlog " Open a new text document"
- Call hNewDocument
- printlog " Set zoom to 100%"
- Call wSetZoom
- printlog " Empty clipboard"
- SetClipBoard = ""
- printlog " Insert a hyperlink in document"
- Call wTypeKeys "www.oracle.com"
- Call wTypeKeys " "
- Call wTypeKeys "<HOME>"
- printlog " Open context menu on hyperlink"
- Call wTypeKeys "<SHIFT F10>"
- printlog " Last entry in menu has to be 'Open hyperlink' ...."
- CALL hMenuFindSelect (10955, false, 17, true) 'Find "Hyperlink-dialog" and call the slot.
- kontext "TabHyperlinkInternet"
- if TabHyperlinkInternet.Exists(3) then
- Warnlog "Hyperlink-Dialog opened!"
- TabHyperlinkInternet.Close
- end if
- printlog " Close text document"
- Call hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
-
-testcase tHyperlinkEdit
-
- printlog "Context menu on hyperlinks"
- printlog " Open a new text document"
- CALL hNewDocument
- printlog " Set zoom to 100%"
- Call wSetZoom
- printlog " Empty clipboard"
- SetClipBoard = ""
- printlog " Insert a hyperlink in document"
- Call wTypeKeys "www.openoffice.org"
- Call wTypeKeys " "
- Call wTypeKeys "<HOME>"
- printlog " Open context menu on hyperlink"
- Call wTypeKeys "<SHIFT F10>"
-
- printlog " Open contextmenu, find the entry 'Edit Hyperlink', and call the slot..."
- CALL hMenuFindSelect (21835, true, 18, true) 'Find "Edit Hyperlink" and call the slot.
- printlog " Check if the Hyperlink-dialogue comes up correctly."
- kontext "HyperlinkDialog"
- if NOT HyperlinkDialog.Exists(3) then
- Warnlog "No Hyperlink-Dialog visible!"
- else
- HyperlinkDialog.Close
- end if
- printlog " Close text document"
- CALL hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
-
-testcase tHyperlinkRemove
-
- printlog "Context menu on hyperlinks"
- printlog " Open a new text document"
- CALL hNewDocument
- kontext "TabHyperlinkInternet"
- if TabHyperlinkInternet.Exists then
- TabHyperlinkInternet.Close
- end if
- Kontext "DocumentWriter"
- printlog " Set zoom to 100%"
- Call wSetZoom
- printlog " Empty clipboard"
- SetClipBoard = ""
- printlog " Insert a hyperlink in document"
- Call wTypeKeys "www.openoffice.org"
- Call wTypeKeys " "
- Call wTypeKeys "<HOME>"
- printlog " Open context menu on hyperlink"
- Call wTypeKeys "<SHIFT F10>"
- printlog " Find the entry 'Remove hyperlink' in the menu... Check the position of the entry, and call it."
- CALL hMenuFindSelect (21839, true, 20, true) 'Find "Remove hyperlink" and call the slot.
- Printlog " Check that the hyperlink formatting has been removed and 'Format - Character - Hyperlink - URL' is empty."
- Call wTypeKeys "<HOME>"
- printlog " Open context menu on the hyperlink."
- Call wTypeKeys "<SHIFT F10>"
- printlog " Check that the Menu has less than 18 entries, otherwise the pasted content is wrong."
- if MenuGetItemCount > 18 then
- Warnlog " Either error or the contextmenu has changed - contact testowner."
- CALL hMenuFindSelect (21839, false, 20, false) 'Check if "Remove hyperlink" exists in the menu.
- kontext "TabHyperlinkInternet"
- if TabHyperlinkInternet.Exists(3) then
- Warnlog " ERROR. The Hyperlink-Status of the text wasn't removed. BUG!"
- TabHyperlinkInternet.Close
- end if
- end if
- printlog " Close text document"
- CALL hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
-
-testcase tHyperlinkCopy
-
- printlog "Context menu on hyperlinks"
- printlog " Open a new text document"
- Call hNewDocument
- printlog " If the Hyperlink-Dialog is open - Close it."
- kontext "TabHyperlinkInternet"
- if TabHyperlinkInternet.Exists then
- TabHyperlinkInternet.Close
- end if
- kontext "DocumentWriter"
- printlog " Set zoom to 100%"
- Call wSetZoom
- printlog " Empty clipboard"
- SetClipBoard = ""
- printlog " Insert a hyperlink in document"
- Call wTypeKeys "www.openoffice.org"
- Call wTypeKeys " "
- Call wTypeKeys "<HOME><RIGHT RIGHT RIGHT>"
- printlog " Open context menu on hyperlink"
- Call wTypeKeys "<SHIFT F10>"
- printlog " Select 'Copy Hyperlink Location'..."
- CALL hMenuFindSelect (21840, true, 19, true) 'Find "Copy Hyperlink Location" and call the slot.
- printlog " Check that the Clipboard contains something/the string we wanted to copy."
- if GetClipboard = "" then
- warnlog " Clipboard empty, notify testowner and check if the Hyperlink Copy-function works."
- end if
- printlog " Set the cursor somwhere else in the document."
- Call wTypeKeys "<END>"
- Call wTypeKeys "<RETURN>", 10
- printlog " Paste."
- EditPaste
- printlog " Check that the hyperlink URL is pasted as plain text."
- printlog " Mark the text we just pasted."
- Call wTypeKeys "<HOME><RIGHT RIGHT RIGHT>"
- printlog " We do this by opening the context menu on the text-string."
- Call wTypeKeys "<SHIFT F10>"
- printlog " Check if the contextmenu contains anything about 'Hyperlink'."
- CALL hMenuFindSelect (10955, true, 17, false) 'Try to find and call "Open Hyperlink".
- kontext "TabHyperlinkInternet"
- if TabHyperlinkInternet.Exists(3) then
- Warnlog " Seemingly, the copy wasn't plaintext, but also a hyperlink. BUG!"
- end if
- printlog " Close text document"
- Call hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
-
-testcase tPickDrawingObjects
-
- printlog "Context menu on drawing objects"
- printlog " Open a new text document"
- Call hNewDocument
- printlog " If the Hyperlink-Dialog is open - Close it."
- kontext "TabHyperlinkInternet"
- if TabHyperlinkInternet.Exists then
- TabHyperlinkInternet.Close
- end if
- kontext "DocumentWriter"
- printlog " Set zoom to 100%"
- Call wSetZoom
- printlog " empty clipboard"
- SetClipBoard = ""
- printlog " Insert 2 drawing objects (rectangle)"
-
- Call wZeichenobjektEinfuegen ( "Rechteck", 35, 40, 52, 52 )
- Call wTypeKeys "<Escape>"
- Sleep 1
- Call wZeichenobjektEinfuegen ( "Rechteck", 35, 35, 50, 50 )
- Call wTypeKeys "<Escape>"
- Sleep 1
- printlog " Select both objects"
- Call wObjektSelektieren ( 32, 32, 60, 60 )
- Sleep 1
-
- printlog " Open context menu on 1. drawing object"
- Call DocumentWriter.MouseMove 51, 51
- Call wOpenContextMenu(true)
- printlog " Normally 'copy' is last menu entry"
- CALL hMenuFindSelect (5711, true, 15, true) 'Find "Copy" and call the slot.
-
- printlog " Both drawing objects have to leave selected"
- try
- FormatGroupGroup
- Sleep 1
- catch
- Warnlog "Drawing objects did not leave selected after context menu opened"
- endcatch
-
- printlog " Close text document"
- CALL hCloseDocument
-endcase
-
-' -----------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc b/testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc
deleted file mode 100644
index 9537eb2ae948..000000000000
--- a/testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc
+++ /dev/null
@@ -1,1027 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the drawing tools
-'*
-'\***********************************************************************
-
-sub w_drawing_tools1
-
- printLog Chr(13) + "- Test of the drawing tools 1"
-
- printLog Chr(13) + " -- Format/Position And Size"
-
- Call tCreateObjects_1 'Create objects from the drawing functions of the Toolbar
-
- Call tPositionAndSize_1 'check checkbox "protect position" of the object
- Call tPositionAndSize_2 'check Undo/Redo function of position assignment
- Call tPositionAndSize_3 'check "keep ratio" option
- Call tPositionAndSize_4 'check Undo/Redo function of size assignment
- Call tPositionAndSize_5 'check rotation angle of an object
- Call tPositionAndSize_6 'check corner radius of rectangles
- Call tPositionAndSize_7 'check corner radius of textboxes
- Call tPositionAndSize_8
-
- printLog Chr(13) + " -- Format/line"
- 'Dialog format/line/line
- Call tLine_1 'check style, color, width and arrow styles . Test undo and redo .
- Call tLine_2 'Check call Format.Line dialog via Button in object bar
- Call tLine_3 'check line attributes are applied in object bar
- Call tLine_4 'check "synchronize ends"
- 'Dialog format/line/line styles
- Call tline_5 'check the attributes in format/line/line styles
- 'Dialog format/line/arrow styles
- Call tline_6 'check the attributes in format/line/arrow styles
-
-end sub
-
-'-------------------------------------------------------------------------
-
-testcase tCreateObjects_1
-
- PrintLog "- Create objects from the drawing functions of the Toolbar , include ..."
-
- Call hNewDocument
-
- Call hToolbarSelect("DRAWING", true)
-
- PrintLog "- Draw a line"
- Kontext "Drawbar"
- Linie.Click
- gMouseMove(30,30,55,55)
- gMouseClick (75,5)
- Sleep 1
-
- PrintLog "- Draw a rectangle"
- Kontext "Drawbar"
- Rechteck.Click
- gMouseMove(35,35,40,40)
- gMouseClick (75,5)
- Sleep 1
-
- PrintLog "- Draw a ellipse (circle)"
- Kontext "Drawbar"
- Ellipse.Click
- Call gMouseMove(50,30,75,50)
- gMouseClick (75,5)
- Sleep 1
-
- PrintLog "- Draw textobject"
- Kontext "Drawbar"
- Textobjekt.Click
- gMouseMove(40,60,60,75)
- Sleep 1
- Kontext "DocumentWriter"
- Call wTypeKeys "This is StarOffice Test !"
- gMouseClick (75,5)
-
- PrintLog "- Draw callouts"
- Kontext "Drawbar"
- Legende.Click
- gMouseMove(30,80,50,95)
- gMouseClick (75,5)
- Sleep 1
-
- Kontext "Drawbar"
- Drawbar.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_1
-
- Dim sPositionX as String
- Dim sPositionY as String
- Dim sPositionXMove as String
- Dim sPositionYMove as String
-
- sPositionX = "3" + gSeperator + "00" + gMeasurementUnit
- sPositionY = "3" + gSeperator + "00" + gMeasurementUnit
- sPositionXMove = "5" + gSeperator + "00" + gMeasurementUnit
- sPositionYMove = "5" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Check the checkbox 'protect position' of the object"
-
- Call hNewDocument
-
- PrintLog "- Insert a drawing object (rectangle)"
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
- Call gMouseClick(40,50)
-
- printLog "when 'protect position' is Checked"
- PrintLog "- Format/Position and size /Position and size ,"
- PrintLog "- + set positionX and positionY , and Check 'postion' in protect area"
- PrintLog "- + close the dialogue and reopen it"
- PrintLog "- check wether the rectangle can be removed when 'protect position' is Checked"
- fPositionAndSize("TabPositionAndSizeWriter")
-
- Horizontalby.Settext "3"
- Verticalby.Settext "3"
- ProtectPosition.Check
-
- TabPositionAndSizeWriter.OK
- Sleep 1
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<Right>",2
- Call wTypeKeys "<Down>" ,2
- Sleep 1
-
- fPositionAndSize("TabPositionAndSizeWriter")
-
- if Horizontalby.Gettext <> sPositionX then Warnlog "X-Position is wrong: Not -> "+sPositionX+" but -> "+Horizontalby.Gettext
- if Verticalby.Gettext <> sPositionY then Warnlog "Y-Position is wrong: Not -> "+sPositionY+" but -> "+Verticalby.Gettext
-
- ProtectPosition.UnCheck
- TabPositionAndSizeWriter.OK
-
- PrintLog "- check wether the rectangle can be removed when 'protect position' is UnChecked"
- Kontext "DocumentWriter"
- Call wTypeKeys "<Right>",2
- Call wTypeKeys "<Down>" ,2
- Sleep 1
-
- fPositionAndSize("TabPositionAndSizeWriter")
-
- if Horizontalby.Gettext <> sPositionXMove then Warnlog "X-Position is wrong: Not -> "+sPositionXMove+" but -> "+Horizontalby.Gettext
- if Verticalby.Gettext <> sPositionYMove then Warnlog "Y-Position is wrong: Not -> "+sPositionYMove+" but -> "+Verticalby.Gettext
-
- TabPositionAndSizeWriter.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_2
-
- Dim sPositionX as String
- Dim sPositionY as String
- Dim sPositionXMove as String
- Dim sPositionYMove as String
-
- sPositionX = "3" + gSeperator + "00" + gMeasurementUnit
- sPositionY = "3" + gSeperator + "00" + gMeasurementUnit
- sPositionXMove = "4" + gSeperator + "00" + gMeasurementUnit
- sPositionYMove = "4" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- check Undo/Redo function of position assignment"
-
- Call hNewDocument
-
- PrintLog "- Insert a drawing object (rectangle)"
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
- Call gMouseClick(40,50)
-
- fPositionAndSize("TabPositionAndSizeWriter")
- Horizontalby.Settext "3"
- Verticalby.Settext "3"
- TabPositionAndSizeWriter.OK
- Sleep 1
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<Down>"
- Sleep 1
-
- PrintLog "- check undo function"
- EditUndo
- Sleep 1
- EditUndo
- Sleep 1
-
- fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX then Warnlog "X-Position is wrong: Not -> "+sPositionX+" but -> "+Horizontalby.Gettext
- if Verticalby.Gettext <> sPositionY then Warnlog "Y-Position is wrong: Not -> "+sPositionY+" but -> "+Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- PrintLog "- check redo function"
- EditRedo
- Sleep 1
- EditRedo
- Sleep 1
-
- fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionXMove then Warnlog "X-Position is wrong: Not -> "+sPositionXMove+" but -> "+Horizontalby.Gettext
- if Verticalby.Gettext <> sPositionYMove then Warnlog "Y-Position is wrong: Not -> "+sPositionYMove+" but -> "+Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_3
-
- Dim sWidth as String
- Dim sHeight as String
- Dim sWidthChange as String
- Dim sHeightChange as String
-
- sHeightChange = "8" + gSeperator + "00" + gMeasurementUnit
- sWidthChange = "6" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- check 'keep ratio' option"
-
- Call hNewDocument
-
- PrintLog "- Insert a drawing object (rectangle)"
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
- Call gMouseClick(40,50)
-
- fPositionAndSize("TabPositionAndSizeWriter")
-
- PrintLog "- Check when ratio is 5:4"
- Width.Settext "5"
- Height.Settext "4"
-
- KeepRatio.Check
- Width.Settext "10"
- Sleep 2
- if Height.GetText <> sHeightChange then Warnlog "Height is wrong: Not -> "+sHeightChange+" but -> "+Height.GetText
-
- KeepRatio.UnCheck
- PrintLog "- Check when ratio is 3:5"
- Width.Settext "3"
- Height.Settext "5"
-
- KeepRatio.Check
- Height.Settext "10"
- Sleep 2
- if Width.GetText <> sWidthChange then Warnlog "Width is wrong: Not -> "+sWidthChange+" but -> "+Width.GetText
-
- 'Recover to the default
- KeepRatio.UnCheck
- TabPositionAndSizeWriter.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_4
-
- Dim sWidth as String
- Dim sHeight as String
- Dim sWidthChange as String
- Dim sHeightChange as String
-
- sWidth = "5" + gSeperator + "00" + gMeasurementUnit
- sHeight = "4" + gSeperator + "00" + gMeasurementUnit
- sWidthChange = "8" + gSeperator + "00" + gMeasurementUnit
- sHeightChange = "6" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- check Undo/Redo function of size assignment"
-
- Call hNewDocument
-
- PrintLog "- Insert a drawing object (rectangle) , and set the first Size"
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
- Call gMouseClick(40,50)
-
- fPositionAndSize("TabPositionAndSizeWriter")
- Width.Settext sWidth
- Height.Settext sHeight
- TabPositionAndSizeWriter.OK
- Sleep 1
-
- PrintLog "- Set the second Size."
- fPositionAndSize("TabPositionAndSizeWriter")
- Width.Settext sWidthChange
- Height.Settext sHeightChange
- TabPositionAndSizeWriter.OK
- Sleep 1
-
- PrintLog "- check undo function"
- EditUndo
- Sleep 1
- fPositionAndSize("TabPositionAndSizeWriter")
- if Width.GetText <> sWidth then Warnlog "Width is wrong: Not -> "+sWidth+" but -> "+Width.GetText
- if Height.GetText <> sHeight then Warnlog "Height is wrong: Not -> "+sHeight+" but -> "+Height.GetText
- TabPositionAndSizeWriter.Cancel
-
- PrintLog "- check redo function"
- EditRedo
- Sleep 1
-
- fPositionAndSize("TabPositionAndSizeWriter")
- if Width.GetText <> sWidthChange then Warnlog "Width is wrong: Not -> "+sWidthChange+" but -> "+Width.GetText
- if Height.GetText <> sHeightChange then Warnlog "Height is wrong: Not -> "+sHeightChange+" but -> "+Height.GetText
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_5
-
- PrintLog "- check rotation angle of an object"
-
- Call hNewDocument
-
- PrintLog "- Insert a drawing object (rectangle) , and set its rotation angle"
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
- Call gMouseClick(40,50)
-
- Call fPositionAndSize("TabDrehung")
- Winkel.SetText "45"
- TabDrehung.OK
- Sleep 1
-
- Call fPositionAndSize("TabDrehung")
- if Left$(Winkel.GetText,5) <> "45" + gSeperator + "00" then
- Warnlog "The rotation angle isn't corroct! It should be 45" & gSeperator & "00, but get " + Left$(Winkel.GetText, 5)
- end if
- TabDrehung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_6
-
- Dim sRadius as String
-
- sRadius = "0" + gSeperator + "50" + gMeasurementUnit
-
- PrintLog "- check corner radius of rectangles"
-
- Call hNewDocument
-
- PrintLog "- Insert a rectangle , and set its corner radius."
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
- Call gMouseClick(40,50)
-
- fPositionAndSize("TabSchraegstellen")
- Radius.SetText sRadius
- TabSchraegstellen.OK
- Sleep 1
-
- fPositionAndSize("TabSchraegstellen")
- if Radius.GetText <> sRadius then Warnlog "The Radius isn't corroct! It should be " +sRadius + " , but was " +Radius.GetText
- TabSchraegstellen.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_7
-
- Dim sRadius as String
-
- sRadius = "0" + gSeperator + "50" + gMeasurementUnit
-
- PrintLog "- check corner radius of textboxes."
-
- Call hNewDocument
-
- PrintLog "- Insert a rectangle , and set its corner radius"
-
- Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
- Call wTypeKeys "The test for corner radius of textboxes..."
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
-
- fPositionAndSize("TabSchraegstellen")
- Radius.SetText sRadius
- TabSchraegstellen.OK
- Sleep 1
-
- fPositionAndSize("TabSchraegstellen")
- if Radius.GetText <> sRadius then Warnlog "The Radius isn't corroct! It should be " +sRadius + " ,but get " +Radius.GetText
- TabSchraegstellen.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tPositionAndSize_8
-
- Dim sPositionStartX as String
- Dim sPositionStartY as String
- Dim sWidth as String
- Dim sHeight as String
- Dim sPivotDefaultX as String
- Dim sPivotDefaultY as String
- Dim sPivotStartX as String
- Dim sPivotStartY as String
- Dim sPivotEndX as String
- Dim sPivotEndY as String
-
- sPositionStartX = "3" + gSeperator + "00" + gMeasurementUnit
- sPositionStartY = "3" + gSeperator + "00" + gMeasurementUnit
- sWidth = "4" + gSeperator + "00" + gMeasurementUnit
- sHeight = "3" + gSeperator + "00" + gMeasurementUnit
-
- sPivotDefaultX = "5" + gSeperator + "00" + gMeasurementUnit
- sPivotDefaultY = "4" + gSeperator + "50" + gMeasurementUnit
- sPivotStartX = "3" + gSeperator + "50" + gMeasurementUnit
- sPivotStartY = "2" + gSeperator + "50" + gMeasurementUnit
- sPivotEndX = "6" + gSeperator + "50" + gMeasurementUnit
- sPivotEndY = "6" + gSeperator + "50" + gMeasurementUnit
-
- PrintLog "- check 'keep ratio' option"
-
- Call hNewDocument
-
- PrintLog "- Insert a drawing object (rectangle)"
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 40, 60, 60)
- Call gMouseClick(40,50)
-
- fPositionAndSize("TabPositionAndSizeWriter")
- Width.Settext sWidth
- Height.Settext sHeight
- Horizontalby.Settext sPositionStartX
- Verticalby.Settext sPositionStartY
- TabPositionAndSizeWriter.OK
- Sleep 1
- fPositionAndSize("TabDrehung")
- Winkel.SetText "270"
- TabDrehung.OK
- Sleep 1
-
- fPositionAndSize("TabDrehung")
- if PositionX.Gettext <> sPivotDefaultX then Warnlog "X-Position is wrong: Not -> "+sPivotDefaultX+" but -> "+PositionX.Gettext
- if PositionY.Gettext <> sPivotDefaultY then Warnlog "Y-Position is wrong: Not -> "+sPivotDefaultY+" but -> "+PositionY.Gettext
-
- Drehpunkt.TypeKeys "<Up>"
- Drehpunkt.TypeKeys "<Left>"
-
- if PositionX.Gettext <> sPivotStartX then Warnlog "X-Position is wrong: Not -> "+sPivotStartX+" but -> "+PositionX.Gettext
- if PositionY.Gettext <> sPivotStartY then Warnlog "Y-Position is wrong: Not -> "+sPivotStartY+" but -> "+PositionY.Gettext
-
- Drehpunkt.TypeKeys "<Right>" , 2
- Drehpunkt.TypeKeys "<Down>" , 2
-
- if PositionX.Gettext <> sPivotEndX then Warnlog "X-Position is wrong: Not -> "+sPivotEndX+" but -> "+PositionX.Gettext
- if PositionY.Gettext <> sPivotEndY then Warnlog "Y-Position is wrong: Not -> "+sPivotEndY+" but -> "+PositionY.Gettext
- TabDrehung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tLine_1
-
- Dim iLineStyle as Integer
- Dim iColor as Integer
- Dim iArrowStyleLeft as Integer
- Dim iArrowStyleRight as Integer
- Dim sLineWidth as String
- Dim sTransparency as String
- Dim sArrowWidthLeft as String
- Dim sArrowWidthRight as String
-
- Dim iLineStyleDefault as Integer
- Dim iColorDefault as Integer
- Dim iArrowStyleLeftDefault as Integer
- Dim iArrowStyleRightDefault as Integer
- Dim sLineWidthDefault as String
- Dim sTransparencyDefault as String
- Dim sArrowWidthLeftDefault as String
- Dim sArrowWidthRightDefault as String
-
- sTransparency = "25%"
- iLineStyle = 3
- iColor = 7
- iArrowStyleLeft = 2
- iArrowStyleRight = 3
- sLineWidth = "0" + gSeperator + "10" + gMeasurementUnit
- sArrowWidthLeft = "0" + gSeperator + "55" + gMeasurementUnit
- sArrowWidthRight = "0" + gSeperator + "60" + gMeasurementUnit
-
- PrintLog "- check style, color, width and arrow styles"
-
- Call hNewDocument
-
- PrintLog "- Insert a line"
- Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
- Sleep 2
- Call gMouseClick(40,40)
- Sleep 2
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- PrintLog "- modify Style ,color , width and arrow styles"
- fFormatLine("TabLinie")
-
- iLineStyleDefault = Stil.GetSelIndex
- iColorDefault = Farbe.GetSelIndex
- slineWidthDefault = Breite.GetText
- sTransparencyDefault = Transparenz.GetText
- iArrowStyleLeftDefault = StilLinks.GetSelIndex
- iArrowStyleRightDefault = StilRechts.GetSelIndex
- sArrowWidthLeftDefault = BreiteLinks.GetText
- sArrowWidthRightDefault = BreiteRechts.GetText
-
- PrintLog "- Line properties , include :"
- PrintLog "- - Style"
- Stil.Select iLineStyle
- wait 500
- PrintLog "- - Color"
- Farbe.Select iColor
- wait 500
- PrintLog "- - Width"
- Breite.SetText sLineWidth
- wait 500
- PrintLog "- - Transparency"
- Transparenz.SetText sTransparency
- wait 500
-
- PrintLog "- Arrow styles , include :"
- PrintLog "- - Synchronize ends"
- EndenSynchronisieren.UnCheck
- PrintLog "- - Style (left and right)"
- StilLinks.Select iArrowStyleLeft
- StilRechts.Select iArrowStyleRight
- wait 500
- PrintLog "- - Width (left and right)"
- BreiteLinks.SetText sArrowWidthLeft
- BreiteRechts.SetText sArrowWidthRight
- PrintLog "- - Center (left and right)"
- ZentriertLinks.Check
- ZentriertRechts.Check
-
- TabLinie.OK
-
- PrintLog "- Check all changes"
- fFormatLine("TabLinie")
-
- if Stil.GetSelIndex <> iLineStyle then Warnlog "Line style is wrong."
- if Farbe.GetSelIndex <> iColor then Warnlog "Line color is wrong."
- if Breite.GetText <> sLineWidth then Warnlog "Line width is wrong."
- if Transparenz.GetText <> sTransparency then Warnlog "Line transparency is wrong."
-
- if EndenSynchronisieren.IsChecked = TRUE then Warnlog "Synchronize ends should NOT be checked."
- if StilLinks.GetSelIndex <> iArrowStyleLeft then Warnlog "The left arrow style is wrong."
- if StilRechts.GetSelIndex <> iArrowStyleRight then Warnlog "The right arrow style is wrong."
- if BreiteLinks.GetText <> sArrowWidthLeft then Warnlog "The left arrow width is wrong."
- if BreiteRechts.GetText <> sArrowWidthRight then Warnlog "The right arrow width is wrong."
- if ZentriertLinks.IsChecked <> TRUE then Warnlog "The left 'center' should be checked"
- if ZentriertRechts.IsChecked <> TRUE then Warnlog "The right 'center' should be checked"
- TabLinie.Cancel
-
- PrintLog "- Test Undo function"
- Kontext "DocumentWriter"
- EditUndo
- Sleep 1
-
- fFormatLine("TabLinie")
- if Stil.GetSelIndex <> iLineStyleDefault then Warnlog "Line style is wrong."
- if Farbe.GetSelIndex <> iColorDefault then Warnlog "Line color is wrong."
- if Breite.GetText <> sLineWidthDefault then Warnlog "Line width is wrong."
- if Transparenz.GetText <> sTransparencyDefault then Warnlog "Line transparency is wrong."
-
- if EndenSynchronisieren.IsChecked = TRUE then Warnlog "Synchronize ends should NOT be checked."
- if StilLinks.GetSelIndex <> iArrowStyleLeftDefault then Warnlog "The left arrow style is wrong."
- if StilRechts.GetSelIndex <> iArrowStyleRightDefault then Warnlog "The right arrow style is wrong."
- if BreiteLinks.GetText <> sArrowWidthLeftDefault then Warnlog "The left arrow width is wrong."
- if BreiteRechts.GetText <> sArrowWidthRightDefault then Warnlog "The right arrow width is wrong."
- if ZentriertLinks.IsChecked = TRUE then Warnlog "The left 'center' should be checked"
- if ZentriertRechts.IsChecked = TRUE then Warnlog "The right 'center' should be checked"
- TabLinie.Cancel
-
- PrintLog "- Test Redo function"
- Kontext "DocumentWriter"
- EditRedo
- Sleep 1
-
- fFormatLine("TabLinie")
- if Stil.GetSelIndex <> iLineStyle then Warnlog "Line style is wrong."
- if Farbe.GetSelIndex <> iColor then Warnlog "Line color is wrong."
- if Breite.GetText <> sLineWidth then Warnlog "Line width is wrong."
- if Transparenz.GetText <> sTransparency then Warnlog "Line transparency is wrong."
-
- if EndenSynchronisieren.IsChecked = TRUE then Warnlog "Synchronize ends should NOT be checked."
- if StilLinks.GetSelIndex <> iArrowStyleLeft then Warnlog "The left arrow style is wrong."
- if StilRechts.GetSelIndex <> iArrowStyleRight then Warnlog "The right arrow style is wrong."
- if BreiteLinks.GetText <> sArrowWidthLeft then Warnlog "The left arrow width is wrong."
- if BreiteRechts.GetText <> sArrowWidthRight then Warnlog "The right arrow width is wrong."
- if ZentriertLinks.IsChecked <> TRUE then Warnlog "The left 'center' should be checked"
- if ZentriertRechts.IsChecked <> TRUE then Warnlog "The right 'center' should be checked"
- TabLinie.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tLine_2
-
- PrintLog "- Check call Format.Line dialog via Button in object bar."
-
- Call hNewDocument
-
- PrintLog "- Insert a line."
- Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
- Sleep 2
- Call gMouseClick(40,40)
- Sleep 2
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- PrintLog "- call Format/Line dialog via Button in object bar."
- try
- Kontext "DrawingObjectbar"
- Linie.Click
- Kontext
- active.SetPage TabLinie
- Sleep 1
- Kontext "TabLinie"
- Kontext
- active.SetPage TabLinienstile
- Sleep 1
- Kontext "TabLinienstile"
- Kontext
- active.SetPage TabLinienenden
- Sleep 1
- Kontext "TabLinienenden"
- TabLinienenden.Cancel
- catch
- Warnlog "Can't call format/line via Button in object bar."
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tLine_3
-
- Dim iLineStyle as Integer
- Dim iColor as Integer
- Dim iArrowStyleLeft as Integer
- Dim iArrowStyleRight as Integer
- Dim sLineWidth as String
-
- iLineStyle = 4
- iColor = 5
- iArrowStyleLeft = 4
- iArrowStyleRight = 6
-
- PrintLog "- check line attributes are applied in object bar ,include -"
-
- Call hNewDocument
-
- PrintLog "- Insert a line"
- Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
- Sleep 2
- Call gMouseClick(40,40)
- Sleep 2
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- PrintLog "- set Arrow Styles"
- Kontext "DrawingObjectbar"
- Linienendenstil.TearOff
- Kontext "Linienenden"
- Sleep 1
- Auswahl.TypeKeys "<Down>" , 4
- Sleep 2
- Auswahl.TypeKeys "<Return>"
- Sleep 2
- Auswahl.TypeKeys "<Right>"
- Sleep 2
- Auswahl.TypeKeys "<Down>" , 2
- Sleep 2
- Auswahl.TypeKeys "<Return>"
- Sleep 2
- Linienenden.Close
- Sleep 2
-
- PrintLog "- set Line Style"
- Kontext "DrawingObjectbar"
- Linienstil.Select iLineStyle
-
- PrintLog "- + Line Width"
- Linienbreite.More 4
- sLineWidth = Linienbreite.GetText
-
- PrintLog "- + Line Color"
- Linienfarbe.Select iColor
-
- PrintLog "- check the lines status"
- fFormatLine("TabLinie")
- if Stil.GetSelIndex <> iLineStyle then Warnlog "Line style is wrong."
- if Farbe.GetSelIndex <> iColor then Warnlog "Line color is wrong."
- if Breite.GetText <> sLineWidth then warnlog "Line width is wrong."
-
- if StilLinks.GetSelIndex <> iArrowStyleLeft then Warnlog "Arrow style is not correctly shown in format dialog"
- if StilRechts.GetSelIndex <> iArrowStyleRight then Warnlog "Arrow style is not correctly shown in format dialog"
-
- TabLinie.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tLine_4
-
- Dim iArrowStyleLeft as Integer
- Dim iArrowStyleRight as Integer
-
- iArrowStyleLeft = 2
- iArrowStyleRight = 3
-
- PrintLog "- check 'synchronize ends'"
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
- Sleep 2
- Call gMouseClick(40,40)
- Sleep 2
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- fFormatLine("TabLinie")
- PrintLog "- Check Synchronize ends"
- EndenSynchronisieren.Check
-
- PrintLog "- Style (left and right)"
- StilLinks.Select iArrowStyleLeft
- Sleep 1
- if StilRechts.GetSelIndex <> iArrowStyleLeft then Warnlog "The right arrow style is wrong."
-
- StilRechts.Select iArrowStyleRight
- Sleep 1
- if StilLinks.GetSelIndex <> iArrowStyleRight then Warnlog "The left arrow style is wrong."
-
- TabLinie.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tLine_5
-
- Dim iLineTypeLeft as Integer
- Dim iLineTypeRight as Integer
- Dim sLineStyle as String
- Dim sRightLength as String
- Dim sSpace as String
- Dim sLeftNumber as String
- Dim sRightNumber as String
-
- sLineStyle = "myTest"
- iLineTypeLeft = 1
- iLineTypeRight = 2
- sLeftNumber = "3"
- sRightNumber = "2"
- sRightLength = "0" + gSeperator + "30" + gMeasurementUnit
- sSpace = "0" + gSeperator + "10" + gMeasurementUnit
-
- PrintLog "- check 'check the attributes in format/line/line styles'"
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("LINIE", 40,40 , 60,50 , false)
- Sleep 2
- Call gMouseClick(40,40)
- Sleep 2
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Call fFormatLine("TabLinienstile")
-
- AnLinienbreite.UnCheck
-
- TypLinks.Select iLineTypeLeft
- TypRechts.Select iLineTypeRight
- AnzahlLinks.SetText sLeftNumber
- AnzahlRechts.SetText sRightNumber
- LaengeRechts.SetText sRightLength
- Abstand.SetText sSpace
- TabLinienstile.OK
- Sleep 1
-
- Kontext
- Kontext "Linienstil"
- if Linienstil.Exists then
- Hinzufuegen.Click
- else
- Warnlog "The dialog doesn't appear ! No test for this case"
- Kontext "TabLinienstile"
- goto NoTEST
- end if
- Sleep 1
-
- Kontext
- Kontext "LinieName"
-
- if LinieName.Exists then
- Sleep 1
- Eingabefeld.SetText sLineStyle
- Sleep 1
- LinieName.OK
- Sleep 1
- else
- Warnlog "The dialog doesn't appear !"
- Goto endsub
- end if
-
- Call fFormatLine("TabLinienstile")
- Sleep 2
- if AnLinienbreite.IsChecked = TRUE then Warnlog "Fit to line width should NOT be checked"
- Sleep 1
- if TypLinks.GetSelIndex <> iLineTypeLeft then Warnlog "The left line type is wrong !"
- Sleep 1
- if TypRechts.GetSelIndex <> iLineTypeRight then Warnlog "The right line type is wrong !"
- Sleep 1
- if AnzahlLinks.GetText <> sLeftNumber then Warnlog "The left number is wrong !"
- Sleep 1
- if AnzahlRechts.GetText <> sRightNumber then Warnlog "The right number is wrong !"
- Sleep 1
- if LaengeLinks.IsEnabled then Warnlog "The left length should be unable !"
- Sleep 1
- if LaengeRechts.GetText <> sRightLength then Warnlog "The right length is wrong !"
- Sleep 1
- if Abstand.GetText <> sSpace then Warnlog "The spacing is wrong !"
- Sleep 1
-
-NoTEST:
- 'delete the testing line type , recover to the default
- Loeschen.Click
- Sleep 1
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- Sleep 1
- else
- Warnlog "Something wrong when deleting the new line type!"
- end if
- end if
-
- Kontext
- Kontext "TabLinienstile"
- TabLinienstile.OK
- Sleep 1
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tLine_6
-
- Dim i as Integer
- Dim sArrowTitle1 as String
- Dim sArrowTitle2 as String
- Dim soeFile as String
- Dim soeDefaultFile as String
-
- sArrowTitle1 = "myTest1"
- sArrowTitle2 = "myTest2"
-
- soeFile = ConvertPath(gOfficePath + "user\work\standard_reserver.soe")
- soeDefaultFile = ConvertPath(gOfficePath + "user\config\standard.soe")
-
- if FileExists ( soeFile ) then app.kill ( soeFile )
-
- PrintLog "- check the attributes in format/line/arrow styles"
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 40, 40, 60)
- Call wZeichenobjektEinfuegen("ELLIPSE", 32, 65, 40, 85)
-
- Call wZeichenobjektEinfuegen("LINIE", 30,40 , 60,50 , false)
- Call gMouseClick(30,40)
-
- PrintLog "- add the first test arrow type."
- fFormatLine("TabLinienenden")
- PrintLog "- save the arrow types first."
- Speichern.Click
- Kontext
- Kontext "SpeichernDlg"
- Dateiname.SetText soeFile
- Speichern.Click
- Sleep 2
-
- Kontext
- Kontext "TabLinienenden"
- PrintLog "- delete the all arrow types."
- if Loeschen.IsEnabled then
- for i = 1 to Liste.GetItemCount
- Loeschen.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- else
- Warnlog "Something wrong when deleting the arrow types!"
- end if
- end if
- Kontext
- Kontext "TabLinienenden"
- next i
- end if
-
- Hinzufuegen.Click
- Kontext
- Kontext "LinieName"
- Eingabefeld.SetText sArrowTitle1
- LinieName.OK
-
- Kontext
- Kontext "TabLinienenden"
- TabLinienenden.OK
-
- PrintLog "- add the second test arrow type."
- Call wZeichenobjektEinfuegen("LINIE", 30,70 , 60,50 , false)
- Call gMouseClick(30,70)
- fFormatLine("TabLinienenden")
- Hinzufuegen.Click
- Kontext
- Kontext "LinieName"
- Eingabefeld.SetText sArrowTitle2
- LinieName.OK
-
- Kontext
- Kontext "TabLinienenden"
- TabLinienenden.OK
-
- Call gMouseClick(30,40)
- fFormatLine("TabLinienenden")
-
- Liste.Select 1
- if TextFeld.GetText <> sArrowTitle1 then Warnlog "The first arraw title is wrong, hope "+sArrowTitle1+ " but get " +TextFeld.GetText
- Liste.Select 2
- if TextFeld.GetText <> sArrowTitle2 then Warnlog "The first arraw title is wrong, hope "+sArrowTitle2+ " but get " +TextFeld.GetText
-
- Oeffnen.Click
- Kontext
- Kontext "OeffnenDlg"
- Pfad.SetText soeFile
- Oeffnen.Click
- Sleep 1
- Kontext
- Kontext "TabLinienenden"
-
- if FileExists ( soeDefaultFile ) then app.kill ( soeDefaultFile )
-
- Speichern.Click
- Kontext
- Kontext "SpeichernDlg"
- Dateiname.SetText soeDefaultFile
- Speichern.Click
- Sleep 2
-
- Kontext
- Kontext "TabLinienenden"
- TabLinienenden.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc b/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
deleted file mode 100644
index 17babc991f7e..000000000000
--- a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
+++ /dev/null
@@ -1,715 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the drawing tools - group
-'*
-'\***********************************************************************
-
-sub w_drawing_tools2
-
- printLog Chr(13) + "- Test of the drawing tools 2 -- Group"
- 'Group objects
- Call tGroup_1 'Generate a objects group via menu Format/Group/Group
- Call tGroup_2 'Generate a objects group via contextmenu Format/Group/Group
- Call tGroup_3 'Menu entries may not be enabled if less then two objects are selected
- Call tGroup_4 'Name a selected object group via Menu Format/Name object
- Call tGroup_5 'Name a selected object group via context menu Name object
- Call tGroup_6 'Edit object group via Menu Format/Group/Edit Group
- Call tGroup_7 'Edit object group via context menu Group/Edit Group
- Call tGroup_8 'Leave object group via Menu Format/Group/Exit Group
- Call tGroup_9 'Leave object group via context menu Group/Exit Group
- Call tGroup_10 'Create new objects inside the group ,Undo new created objects before leaving the group
- Call tGroup_11 'Create new objects inside the group ,Undo new created objects after leaving the group
- Call tGroup_12 'Save and reload document while editing a group
- Call tEncapsulatedGroup_1 'Group objects inside the group
-
-end sub
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_1
-
- PrintLog "- Generate a objects group via menu Format/Group/Group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse)"
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 30, 50, 65, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 30, 28, 70, 80 )
- Sleep 1
-
- PrintLog "- via menu Format/Group/Group objects."
- try
- FormatGroupGroup
- catch
- Warnlog "Something wrong when creating group via menu - Format/Group/Group."
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_2
-
- PrintLog "- Generate a objects group via contextmenu Format/Group/Group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse)"
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 30, 50, 65, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 30, 28, 70, 80 )
- Sleep 1
-
- PrintLog "- via contextmenu Group/Group objects."
- try
- Call wOpenContextMenu
- Call hMenuSelectNr(10)
- Call hMenuSelectNr(1)
- catch
- Warnlog "Something wrong when creating group via contextmenu Group/Group"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_3
-
- PrintLog "- Menu entries may not be enabled if less then two objects are selected."
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse)"
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 30, 50, 65, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
-
- PrintLog "- Only select 1 object."
- Call gMouseClick(32,32)
- Sleep 1
-
- PrintLog "- via menu Format/Group/Group objects."
- try
- FormatGroupGroup
- Warnlog "Should NOT generate the group when less then two objects are selected!"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_4
-
- Dim sGroupName as String
-
- sGroupName = "myTestGroup"
-
- PrintLog "- Name a selected object group via Menu Format/Name object"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse)"
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 30, 50, 65, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 30, 28, 70, 80 )
- Sleep 1
-
- PrintLog "- via menu Format/Group/Group objects."
- FormatGroupGroup
- Sleep 1
-
- try
- FormatNameObject
- Kontext "NameDlgObject"
- NameField.SetText sGroupName
- NameDlgObject.OK
- catch
- Warnlog "Something wrong when Naming the group"
- endcatch
-
- PrintLog "- let the focus out of the group."
- Call gMouseClick(5,5)
-
- Call wNavigatorAuswahl( 12 , 1 )
- Sleep 1
-
- try
- FormatNameObject
- Sleep 1
- Kontext "NameDlgObject"
- if NameField.GetText <> sGroupName then Warnlog "The group name is wrong !"
- NameDlgObject.Cancel
- catch
- Warnlog "Something wrong when checking the group name"
- endcatch
-
- Call wNavigatorClose
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_5
-
- Dim sGroupName as String
-
- sGroupName = "myTestGroup"
-
- PrintLog "- Name a selected object group via context menu Name object "
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse)"
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 30, 50, 65, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 28, 28, 70, 80 )
- Sleep 1
-
- PrintLog "- via menu Format/Group/Group objects"
- FormatGroupGroup
- Sleep 1
-
- try
- Call wOpenContextMenu
- Call hMenuSelectNr(6)
- Kontext "NameDlgObject"
- NameField.SetText sGroupName
- NameDlgObject.OK
- catch
- Warnlog "Something wrong when Naming the group"
- endcatch
-
- PrintLog "- let the focus out of the group."
- Call gMouseClick(95,95)
-
- Call wNavigatorAuswahl( 12 , 1 )
- Sleep 1
-
- try
- Call wOpenContextMenu
- Call hMenuSelectNr(6)
- Kontext "NameDlgObject"
- if NameField.GetText <> sGroupName then Warnlog "The group name is wrong !"
- NameDlgObject.Cancel
- catch
- Warnlog "Something wrong when checking the group name"
- endcatch
-
- Call wNavigatorClose
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_6
-
- Dim sPositionX1 as String
- Dim sPositionY1 as String
- Dim sPositionX2 as String
- Dim sPositionY2 as String
-
- PrintLog "- Edit object group via Menu Format/Group/Enter Group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group."
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 32, 50, 65, false)
- Sleep 1
- Call gMouseClick(34,34)
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX1 = Horizontalby.Gettext
- sPositionY1 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
- Sleep 2
- Call gMouseClick(80,80)
- Sleep 1
-
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 40, 60, 70, false)
- Sleep 2
- Call gMouseClick(50,50)
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX2 = Horizontalby.Gettext
- sPositionY2 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
- Sleep 2
- Call gMouseClick(80,80)
-
- Call wObjektSelektieren ( 31, 31, 70, 80 )
- Sleep 2
- FormatGroupGroup
- Sleep 1
-
- PrintLog "- Format/Group/Enter Group."
- FormatGroupEditGroup
- Sleep 1
-
- PrintLog "- Set the focus to ellipse, and move it."
- Call gMouseClick(50,50)
- Sleep 1
- Call wTypeKeys "<Right>",2
-
- PrintLog "- Set the focus to rectangle , check if it is moved (Should NOT)"
- Call gMouseClick(41,40)
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX1 then Warnlog "Rectangle should NOT be moved: X Not -> "+sPositionX1+" but -> "+ Horizontalby.Gettext
- if Verticalby.Gettext <> sPositionY1 then Warnlog "Rectangle should NOT be moved: Y Not -> "+sPositionY1+" but -> "+ Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- PrintLog "- Set the focus to ellipse , check if it is moved (Should)"
- Call wTypeKeys "<TAB>"
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext = sPositionX2 then Warnlog "ellipse should be moved"
- if Verticalby.Gettext = sPositionY2 then Warnlog "ellipse should be moved"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_7
-
- Dim sPositionX1 as String
- Dim sPositionY1 as String
- Dim sPositionX2 as String
- Dim sPositionY2 as String
-
- PrintLog "- Edit object group via context menu Group/Enter Group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group."
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 32, 50, 65, false)
- Sleep 1
- Call gMouseClick(40,40)
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX1 = Horizontalby.Gettext
- sPositionY1 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
- Sleep 2
- Call gMouseClick(80,80)
- Sleep 1
-
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 40, 60, 70, false)
- Sleep 2
- Call gMouseClick(50,50)
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX2 = Horizontalby.Gettext
- sPositionY2 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
- Sleep 2
- Call gMouseClick(80,80)
-
- Call wObjektSelektieren ( 31, 31, 70, 80 )
- Sleep 2
- FormatGroupGroup
- Sleep 1
-
- PrintLog "- Context menu Group/Enter Group."
- Call wOpenContextMenu
- Call hMenuSelectNr(12)
- Sleep 1
- Call hMenuSelectNr(2)
- Sleep 1
-
- PrintLog "- Set the focus to ellipse , and move it."
- Call gMouseClick(50,50)
- Sleep 1
- Call wTypeKeys "<Right>",2
-
- PrintLog "- Set the focus to rectangle , check if it is moved (Should NOT)."
- Call gMouseClick(40,40)
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX1 then Warnlog "Rectangle should NOT be moved: X Not -> "+sPositionX1+" but -> "+ Horizontalby.Gettext
- if Verticalby.Gettext <> sPositionY1 then Warnlog "Rectangle should NOT be moved: Y Not -> "+sPositionY1+" but -> "+ Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- PrintLog "- Set the focus to ellipse , check if it is moved (Should)."
- Call wTypeKeys "<TAB>"
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext = sPositionX2 then Warnlog "ellipse should be moved"
- if Verticalby.Gettext = sPositionY2 then Warnlog "ellipse should be moved"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_8
-
- Dim sPositionX as String
- Dim sPositionY as String
-
- PrintLog "- Leave object group via Menu Format/Group/Exit Group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group."
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 32, 50, 65, false)
- Sleep 1
- Call gMouseClick(34,34)
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX = Horizontalby.Gettext
- sPositionY = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- Call gMouseClick(80,80)
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 28, 28, 70, 80 )
- Sleep 1
-
- FormatGroupGroup
- Sleep 1
-
- PrintLog "- Format/Group/Edit Group."
- FormatGroupEditGroup
- Sleep 1
-
- PrintLog "- Leave group via Format/Group/Exit Group."
- FormatGroupExitGroup 'after this group , the focus should be on the group
- Sleep 1
-
- PrintLog "- Set the focus to ellipse(in fact, the focus is on the group), and move it."
- Call gMouseClick(50,50)
- Sleep 1
- Kontext "DocumentWriter"
- Call wTypeKeys "<Right>",2
- Call wTypeKeys "<Down>"
-
- PrintLog "- Set the focus to rectangle (in fact, the focus is still on the group) ,"
- PrintLog "- check if it is moved . Group is moved , Rectangle is moved ..."
- Call gMouseClick(45,45)
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext = sPositionX then Warnlog "Rectangle X should be moved!"
- if Verticalby.Gettext = sPositionY then Warnlog "Rectangle Y should be moved!"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_9
-
- Dim sPositionX as String
- Dim sPositionY as String
-
- PrintLog "- Leave object group via context Menu Format/Group/Exit Group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group."
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 32, 50, 65, false)
- Sleep 1
- Call gMouseClick(35,35)
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX = Horizontalby.Gettext
- sPositionY = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- Call gMouseClick(80,80)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 28, 28, 70, 80 )
- Sleep 1
- FormatGroupGroup
- Sleep 1
-
- PrintLog "- Format/Group/Edit Group."
- FormatGroupEditGroup
- Sleep 1
-
- PrintLog "- Leave group via context menu Group/Exit Group."
- Call gMouseClick(35,50)
- Sleep 1
- Call wOpenContextMenu
- Sleep 2
- call hMenuSelectNr(12)
- Sleep 2
- Call hMenuSelectNr(1) 'after this group , the focus should be on the group
- Sleep 2
-
- PrintLog "- Set the focus to ellipse(in fact, the focus is on the group), and move it."
- Call gMouseClick(50,50)
- Kontext "DocumentWriter"
- Call wTypeKeys "<Right>",2
- Call wTypeKeys "<Down>"
-
- PrintLog "- Set the focus to rectangle (in fact, the focus is still on the group) ,"
- PrintLog "- check if it is moved . Group is moved , Rectangle is moved ..."
- Call gMouseClick(45,45)
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext = sPositionX then Warnlog "Rectangle X should be moved!"
- if Verticalby.Gettext = sPositionY then Warnlog "Rectangle Y should be moved!"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_10
-
- PrintLog "- create new objects inside the group ,"
- PrintLog " Undo new created objects before leaving the group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group "
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 32, 50, 35, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 60, 50, 80, false)
- Sleep 1
- Call wObjektSelektieren ( 30, 30, 55, 85 )
- Sleep 1
-
- FormatGroupGroup
- Sleep 1
-
- PrintLog "- insert another object (rectangle) in the group"
- Call wZeichenobjektEinfuegen("RECHTECK", 35, 40, 45, 55)
- Sleep 1
-
- PrintLog "- Format/Group/Edit Group."
- Call gMouseClick(32,32)
- Sleep 1
- FormatGroupEditGroup
- Sleep 1
-
- PrintLog "- Undo new created object( rectangle) before leaving the group."
- EditUndo
- Sleep 1
-
- Call gMouseClick(35,40) 'set focus in the rectangle , in fact, the rectangle should be undone now.
- Sleep 1
- try
- Call fPositionAndSize("TabPositionAndSizeWriter")
- TabPositionAndSizeWriter.Cancel
- Warnlog "Undo before leaving the group is FAILED!"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_11
-
- PrintLog "- create new objects inside the group ,"
- PrintLog " Undo new created objects after leaving the group"
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group "
- Call wZeichenobjektEinfuegen("RECHTECK", 30, 30, 50, 35, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 30, 60, 50, 80, false)
- Sleep 1
- Call wObjektSelektieren ( 28, 28, 55, 85 )
- Sleep 1
-
- FormatGroupGroup
- Sleep 1
-
- PrintLog "- insert another object (rectangle) in the group"
- Call wZeichenobjektEinfuegen("RECHTECK", 35, 40, 45, 55, false)
- Sleep 2
- PrintLog "- Format/Group/Edit Group"
- Call gMouseClick(32,32)
- Sleep 3
- FormatGroupEditGroup
- Sleep 1
-
- PrintLog "- Leave the group , Format/Group/Exit Group"
- FormatGroupExitGroup
- Sleep 1
-
- PrintLog "- Undo new created object( rectangle) after leaving the group"
- EditUndo
- Sleep 1
-
- Call gMouseClick(37,42) 'set focus in the rectangle , in fact, the rectangle should be undone now.
- Sleep 1
- try
- Call fPositionAndSize("TabPositionAndSizeWriter")
- TabPositionAndSizeWriter.Cancel
- Warnlog "Undo before leaving the group is FAILED!"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tGroup_12
-
- Dim sDocument as String
-
- PrintLog "- Edit object group via Menu Format/Group/Edit Group"
-
- sDocument = ConvertPath ( gOfficePath +"user\work\tGroup_12.odt")
- if FileExists ( sDocument ) then app.kill ( sDocument )
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group "
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 32, 50, 65, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 30, 30, 70, 80 )
- Sleep 1
-
- FormatGroupGroup
- Sleep 1
-
- PrintLog "- Format/Group/Edit Group"
- FormatGroupEditGroup
- Sleep 1
-
- PrintLog "- Save document"
- Call hFileSaveAsKill(sDocument)
-
- PrintLog "- close document"
- Call hCloseDocument
-
- PrintLog "- Open previous saved document "
- Call hFileOpen( sDocument)
-
- Kontext "DocumentWriter"
- Call gMouseClick(34,34) 'set focus in the group
-
- PrintLog "- try formatGroupEditGroup"
- try
- FormatGroupEditGroup
- catch
- Warnlog "It should be in the group mode!"
- endcatch
-
- PrintLog "- close document"
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tEncapsulatedGroup_1
-
- PrintLog "- Group objects inside the group ,Encapsulated Group"
-
- Call hNewDocument
-
- PrintLog "- Insert 2 drawing objects (rectangle and ellipse) , generate a group "
-
- Call wZeichenobjektEinfuegen("RECHTECK", 32, 32, 50, 65, false)
- Sleep 1
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false)
- Sleep 1
- Call wObjektSelektieren ( 31, 31, 70, 80 )
- Sleep 1
-
- FormatGroupGroup
- Sleep 1
-
- Call gMouseClick(90,90) 'set focus outside of the group
-
- PrintLog "- insert 2 drawing objects (rectangle and ellipse) in the group"
- Call wZeichenobjektEinfuegen("RECHTECK", 35, 40, 38, 45, false)
- Call wZeichenobjektEinfuegen("ELLIPSE", 40, 40, 58, 45, false, true)
- Call wObjektSelektieren ( 31, 31, 80, 80 )
-
- Sleep 1
-
- PrintLog "- generate a new group"
- try
- FormatGroupGroup
- catch
- Warnlog "Unable to execute Format / Group"
- endcatch
-
- PrintLog "- edit the new group"
- try
- FormatGroupEditGroup
- catch
- Warnlog "Unable to execute Group / Enter Group"
- endcatch
-
- PrintLog "- leave the new group"
- try
- FormatGroupExitGroup
- catch
- Warnlog "Unable to exceute Format / Exit Group"
- endcatch
-
- PrintLog "- Undo the new group"
- try
- FormatGroupUnGroup
- catch
- Warnlog "Unable to execute Format / Ungroup"
- endcatch
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/dropdownLB/w_dropdownLB1.inc b/testautomation/writer/optional/includes/dropdownLB/w_dropdownLB1.inc
deleted file mode 100644
index 7e1eee588127..000000000000
--- a/testautomation/writer/optional/includes/dropdownLB/w_dropdownLB1.inc
+++ /dev/null
@@ -1,1093 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test Drop Down List Box
-'*
-'************************************************************************
-'*
-' #1 tDropDownLB_1 'Check 'Input List'
-' #1 tDropDownLB_2 'All input field should be initially empty
-' #1 tDropDownLB_3 'Test Add button
-' #1 tDropDownLB_4 'Test Return in Item editbox
-' #1 tDropDownLB_5 'Test new item will always be added at the end of 'Items on list'
-' #1 tDropDownLB_6 'The first entry in the list box is the shown default
-' #1 tDropDownLB_7 'Test 'Remove' button
-' #1 tDropDownLB_8 'Test 'Move Up' button
-' #1 tDropDownLB_9 'Test 'Move Down' button
-' #1 tDropDownLB_10 'Test 'Ctrl+Shift+F9'
-' #1 tDropDownLB_11 'OK button should insert new value
-' #1 tDropDownLB_12 'Test Next button
-' #1 tDropDownLB_13 'Test Edit button
-' #1 tDropDownLB_14 'Test Edit/Fields
-' #1 tDropDownLB_15 'Test Right arrow button
-' #1 tDropDownLB_16 'Test Left arrow button
-' #1 tDropDownLB_17 'Import from Word document
-'*
-'\***********************************************************************
-
-testcase tDropDownLB_1
-
- Dim iType as Integer
- iType = 2
-
- PrintLog "- Check 'Input List'"
-
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- Check if 'Input List' exists in Type area"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
- if Not EntrysList.IsVisible then
- Warnlog "Maybe wrong type selected in list. Not 'Input list'"
- end if
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_2
-
- Dim iType as Integer
-
- iType = 2
-
- PrintLog "- All input field should be initially empty"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Check if all input field should be initially empty"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
- if Len(NewListEntry.GetText) <> 0 then Warnlog "Item isn't empty!"
- if EntrysList.GetItemCount <> 0 then Warnlog "Items on list isn't empty!"
- if Len(EntryName.GetText) <> 0 then Warnlog "Name isn't empty!"
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_3
-
- Dim iType as Integer
- Dim sItem as String
-
- iType = 2 : sItem = "Entry 1"
-
- PrintLog "- Test Add button"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input text in 'Item' , then click 'Add' button"
- PrintLog "- Check if the text is inserted into 'Items on List'"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
- NewListEntry.SetText sItem
- Sleep 1
- AddListEntry.Click
- Sleep 1
- if EntrysList.GetSelText(1) <> sItem then Warnlog "the text isn't inserted into 'Items on list' correctly!"
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_4
-
- Dim iType as Integer
- Dim sItem as String
-
- iType = 2 : sItem = "Entry 1"
-
- PrintLog "- Test Pressing return in Item editbox"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input text in 'Item' , then click 'Add' button"
- PrintLog "- Check if the text is inserted into 'Items on List'"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
- NewListEntry.SetText sItem
- Sleep 1
- NewListEntry.Typekeys "<Return>"
- Sleep 1
- if EntrysList.GetSelText(1) <> sItem then Warnlog "the text isn't inserted into 'Items on list' correctly!"
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_5
-
- Dim iType as Integer
- Dim sItem() as String
- Dim i as Integer
- Dim j as Integer
-
- iType = 2
- sItem = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- "Entry 5" , _
- "Entry 6" , _
- )
- j = UBound(sItem)
-
- PrintLog "- Test new item will always be added at the end of 'Items on list'"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some items"
- PrintLog "- Check if new item will always be added at the end of 'Items on list'"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- For i = 0 to j
- NewListEntry.SetText sItem(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
-
- For i = 0 to j
- try
- EntrysList.Select i+1
- Sleep 1
- catch
- Warnlog "There should be 6 itmes in the Items on list!"
- endcatch
- if EntrysList.GetSelText <> sItem(i) then Warnlog "Hope to get " & sItem(i) & " but get " & EntrysList.GetSelText
- next i
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_6
-
- Dim iType as Integer
- Dim sItem() as String
- Dim i as Integer
- Dim j as Integer
-
- iType = 2
- sItem = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- "Entry 5" , _
- "Entry 6" , _
- )
- j = UBound(sItem)
-
- PrintLog "- The first entry in the list box is the shown default"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some items"
- PrintLog "- Set focus to the middle Item"
- PrintLog "- click insert button , then Close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- For i = 0 to j
- NewListEntry.SetText sItem(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
- EntrysList.Select 3
- Sleep 1
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- EditSelectAll
- EditCopy
-
- if GetClipboardText <> sItem(0) then Warnlog "should get " &sItem(0) & " but get " & GetClipboardText
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_7
-
- Dim iType as Integer
- Dim sItem() as String
- Dim i as Integer
- Dim j as Integer
-
- iType = 2
- sItem = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- )
- j = UBound(sItem)
-
- PrintLog "- Test Remove button"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some items"
- PrintLog "- Set focus to the middle Item"
- PrintLog "- click remove button"
- PrintLog "- check if the selected item is removed"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- try
- RemoveEntry.Click
- Warnlog "The remove button should be only ebabled when an item is selected!"
- catch
- endcatch
-
- For i = 0 to j
- NewListEntry.SetText sItem(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
-
- EntrysList.Select 3
- Sleep 1
- RemoveEntry.Click
- Sleep 1
-
- EntrysList.Select 1
- Sleep 1
- if EntrysList.GetSelText <> sItem(0) then Warnlog "Hope to get " & sItem(0) & " but get " & EntrysList.GetSelText
-
- EntrysList.Select 2
- Sleep 1
- if EntrysList.GetSelText <> sItem(1) then Warnlog "Hope to get " & sItem(1) & " but get " & EntrysList.GetSelText
-
- EntrysList.Select 3
- Sleep 1
- if EntrysList.GetSelText <> sItem(3) then Warnlog "Hope to get " & sItem(3) & " but get " & EntrysList.GetSelText
-
- try
- EntrysList.Select 4
- Warnlog "There should be only 3 itmes in the Items on list !"
- catch
- endcatch
-
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_8
-
- Dim iType as Integer
- Dim sItem() as String
- Dim sNewItem() as String
- Dim i as Integer
- Dim j as Integer
-
- iType = 2
- sItem = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- )
- sNewItem = Array( _
- "Entry 4" , _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- )
-
- j = UBound(sItem)
-
- PrintLog "- Test 'Move Up' button"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some items"
- PrintLog "- Set focus to the last Item,"
- PrintLog "- click Move Up button third times"
- PrintLog "- check if the 4th item is the 1st one"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- For i = 0 to j
- NewListEntry.SetText sItem(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
-
- EntrysList.Select 4
- Sleep 1
- MoveUpEntry.Click
- Sleep 1
- MoveUpEntry.Click
- Sleep 1
- MoveUpEntry.Click
- Sleep 1
-
- For i = 0 to j
- EntrysList.Select i+1
- Sleep 1
- if EntrysList.GetSelText <> sNewItem(i) then Warnlog "Hope to get " & sItem(i) & " but get " & EntrysList.GetSelText
- next i
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_9
-
- Dim iType as Integer
- Dim sItem() as String
- Dim sNewItem() as String
- Dim i as Integer
- Dim j as Integer
-
- iType = 2
- sItem = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- )
- sNewItem = Array( _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- "Entry 1" , _
- )
- j = UBound(sItem)
-
- PrintLog "- Test 'Move Down' button"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some items"
- PrintLog "- Set focus to the 1st Item,"
- PrintLog "- click Move Down button third times"
- PrintLog "- check if the 1st item is the 4th one"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- For i = 0 to j
- NewListEntry.SetText sItem(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
-
- EntrysList.Select 1
- Sleep 1
- MoveDownEntry.Click
- Sleep 1
- MoveDownEntry.Click
- Sleep 1
- MoveDownEntry.Click
- Sleep 1
-
- For i = 0 to j
- EntrysList.Select i+1
- Sleep 1
- if EntrysList.GetSelText <> sNewItem(i) then Warnlog "Hope to get " & sItem(i) & " but get " & EntrysList.GetSelText
- next i
- TabFunktionen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_10
-
- Dim iType as Integer
- Dim sItem as String
-
- iType = 2
- sItem = "Entry 1"
-
- PrintLog "- Test 'Ctrl+Shift+F9'"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input 1 item"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
- NewListEntry.SetText sItem
- Sleep 1
- AddListEntry.Click
- Sleep 1
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus in front of the list"
- Call wTypeKeys "<MOD1 Home>"
-
- PrintLog "- Press Ctrl+Shift+F9"
- Call wTypeKeys "<MOD1 Shift F9>"
-
- Kontext "EditInputList"
- if EditInputList.Exists then
- EditInputList.Cancel
- else
- Warnlog "The dialog can't be actived ."
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_11
-
- Dim iType as Integer
- Dim sItem1 as String
- Dim sItem2 as String
-
- iType = 2
- sItem1 = "Entry 1" : sItem2 = "Entry 2"
-
- PrintLog "- OK button should insert new value"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input 2 items"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
- NewListEntry.SetText sItem1
- Sleep 1
- AddListEntry.Click
- Sleep 1
- NewListEntry.SetText sItem2
- Sleep 1
- AddListEntry.Click
- Sleep 1
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus in front of the list"
- Call wTypeKeys "<MOD1 Home>"
-
- PrintLog "- Press Ctrl+Shift+F9"
- Call wTypeKeys "<MOD1 Shift F9>"
-
- PrintLog "- select 2nd list and press OK"
- Kontext "EditInputList"
- AllListEntrys.Select 2
- Sleep 1
- EditInputList.OK
-
- PrintLog "- Check if the result is right"
- EditSelectAll
- EditCopy
-
- if GetClipboardText <> sItem2 then Warnlog "should get " &sItem2 & " but get " & GetClipboardText
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_12
-
- Dim iType as Integer
- Dim sItem1() as String
- Dim sItem2() as String
- Dim i as Integer
- Dim j as Integer
-
- iType = 2
- sItem1 = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- )
- sItem2 = Array( _
- "Entry A" , _
- "Entry B" , _
- "Entry C" , _
- "Entry D" , _
- )
-
- j = UBound(sItem1)
-
- PrintLog "- Test Next button"
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some items"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
-
- Feldtyp.Select iType
- Sleep 3
-
- For i = 0 to j
- NewListEntry.SetText sItem1(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus to another line"
- Call wTypeKeys "<End><Return><Return>"
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some other items"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
-
- Feldtyp.Select iType
- Sleep 3
-
- For i = 0 to j
- NewListEntry.SetText sItem2(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus in front of the 1st list."
- Call wTypeKeys "<MOD1 Home>"
-
- PrintLog "- Press Ctrl+Shift+F9"
- Call wTypeKeys "<MOD1 Shift F9>"
-
- PrintLog "- the 1st group items should be in edit area."
- Kontext "EditInputList"
- For i = 0 to j
- AllListEntrys.Select i+1
- Sleep 1
- if AllListEntrys.GetSelText <> sItem1(i) then Warnlog "Hope to get " & sItem1(i) & " but get " & AllListEntrys.GetSelText
- next i
-
- PrintLog "- Press next button , the 2nd group items should be in edit area."
- NextListEntry.click
- Sleep 1
-
- For i = 0 to j
- AllListEntrys.Select i+1
- Sleep 1
- if AllListEntrys.GetSelText <> sItem2(i) then Warnlog "Hope to get " & sItem2(i) & " but get " & AllListEntrys.GetSelText
- next i
-
- EditInputList.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_13
-
- Dim iType as Integer
- Dim sItem1 as String
- Dim sItem2 as String
-
- iType = 2
- sItem1 = "Entry 1" : sItem2 = "Entry A"
-
- PrintLog "- Test Edit button"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input a item"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- NewListEntry.SetText sItem1
- Sleep 1
- AddListEntry.Click
- Sleep 1
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus to another line"
- Call wTypeKeys "<End><Return><Return>"
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input another item"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- NewListEntry.SetText sItem2
- Sleep 1
- AddListEntry.Click
- Sleep 1
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus in front of the 1st list"
- Call wTypeKeys "<MOD1 Home>"
-
- PrintLog "- Press Ctrl+Shift+F9"
- Call wTypeKeys "<MOD1 Shift F9>"
-
- PrintLog "- Press Edit button , the edit/field dialog should be up"
- Kontext "EditInputList"
- EditListEntry.click
- Sleep 1
-
- Kontext "FeldbefehlBearbeitenFunktionen"
- if FeldbefehlBearbeitenFunktionen.Exists then
- EntrysList.Select 1
- if EntrysList.GetSelText <> sItem1 then
- Warnlog "Hope to get " & sItem1 & " but get " & EntrysList.GetSelText & "->Bug#115731"
- end if
- FeldbefehlBearbeitenFunktionen.Cancel
- else
- Warnlog "The dialog can't be actived ."
- end if
-
- Kontext "EditInputList"
- EditInputList.cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_14
-
- Dim iType as Integer
- Dim sItem() as String
- Dim sEntryName as String
- Dim i as Integer
- Dim j as Integer
-
- iType = 2
- sEntryName = "entryTest"
- sItem = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- "Entry 4" , _
- "Entry 5" , _
- "Entry 6" , _
- )
- j = UBound(sItem)
-
- PrintLog "- Test Edit/Fields"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input some items"
- PrintLog "- set Entry name"
- PrintLog "- click insert button , then Close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- For i = 0 to j
- NewListEntry.SetText sItem(i)
- Sleep 1
- AddListEntry.Click
- Sleep 1
- next i
-
- EntryName.SetText sEntryName
- Einfuegen.Click
- Sleep 1
-
- TabFunktionen.Close
-
- PrintLog "- Set focus in front of the 1st list"
- Call wTypeKeys "<Home>"
-
- PrintLog "- Edit/Fields , check if the entry items' info is correct."
- EditFields
- Kontext "FeldbefehlBearbeitenFunktionen"
- For i = 0 to j
- EntrysList.Select i+1
- Sleep 1
- if EntrysList.GetSelText <> sItem(i) then Warnlog "Hope to get " & sItem(i) & " but get " & EntrysList.GetSelText
- next i
- if EntryName.GetText <> sEntryName then Warnlog "Entry name should be " & sEntryName & " but get " & EntryName.GetText
- FeldbefehlBearbeitenFunktionen.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_15
-
- Dim iType as Integer
- Dim sItem1 as String
- Dim sItem2 as String
-
- iType = 2
- sItem1 = "Entry 1" : sItem2 = "Entry A"
-
- PrintLog "- Test Right arrow button"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input a item"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- NewListEntry.SetText sItem1
- Sleep 1
- AddListEntry.Click
- Sleep 1
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus to another line"
- Call wTypeKeys "<End><Return><Return>"
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input another item"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- NewListEntry.SetText sItem2
- Sleep 1
- AddListEntry.Click
- Sleep 1
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus in front of the 1st list."
- Call wTypeKeys "<MOD1 Home>"
-
- PrintLog "- Edit/Fields"
- EditFields
-
- PrintLog "- click Right arrow button"
- Kontext "FeldbefehlBearbeitenFunktionen"
- EntrysList.Select 1
- if EntrysList.GetSelText <> sItem1 then
- Warnlog "1.Hope to get " & sItem1 & " but get " & EntrysList.GetSelText
- end if
- NaechsterFeldbefehl.Click
- Sleep 1
- EntrysList.Select 1
- if EntrysList.GetSelText <> sItem2 then
- Warnlog "2.Hope to get " & sItem2 & " but get " & EntrysList.GetSelText
- end if
- FeldbefehlBearbeitenFunktionen.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_16
-
- Dim iType as Integer
- Dim sItem1 as String
- Dim sItem2 as String
-
- iType = 2
- sItem1 = "Entry 1" : sItem2 = "Entry A"
-
- PrintLog "- Test Left arrow button"
-
- PrintLog "- Open a new document"
- Call hNewDocument
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input a item"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- NewListEntry.SetText sItem1
- Sleep 1
- AddListEntry.Click
- Sleep 1
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus to another line."
- Call wTypeKeys "<End><Return><Return>"
-
- PrintLog "- Insert/Field/Other/ Functions"
- PrintLog "- select Input list"
- PrintLog "- Input another item"
- PrintLog "- click insert and close the dialog"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select iType
- Sleep 3
-
- NewListEntry.SetText sItem2
- Sleep 1
- AddListEntry.Click
- Sleep 1
-
- Einfuegen.Click
- Sleep 1
- TabFunktionen.Close
-
- PrintLog "- Set focus in front of the 2nd list."
- Call wTypeKeys "<Home>"
-
- PrintLog "- Edit/Fields"
- EditFields
-
- PrintLog "- click Left arrow button."
- Kontext "FeldbefehlBearbeitenFunktionen"
- EntrysList.Select 1
- if EntrysList.GetSelText <> sItem2 then
- Warnlog "1.Hope to get " & sItem2 & " but get " & EntrysList.GetSelText
- end if
- VorigerFeldbefehl.Click
- Sleep 1
- EntrysList.Select 1
- if EntrysList.GetSelText <> sItem1 then
- Warnlog "2.Hope to get " & sItem1 & " but get " & EntrysList.GetSelText
- end if
- FeldbefehlBearbeitenFunktionen.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tDropDownLB_17
-
- Dim sTestFile as String
- Dim sItem1() as String
- Dim sItem2() as String
- Dim i as Integer
- Dim j as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\dropdownLB\DropDownListBox.doc")
-
- sItem1 = Array( _
- "Entry 1" , _
- "Entry 2" , _
- "Entry 3" , _
- )
- sItem2 = Array( _
- "Entry A" , _
- "Entry B" , _
- "Entry C" , _
- )
-
- PrintLog "- Import from Word document"
- PrintLog "- Open a new document"
- Call hNewDocument
- PrintLog "- Open a word document which includes 2 entries."
- hFileOpenLocally( sTestFile )
-
-
- Kontext "EditInputList"
- if EditInputList.Exists then EditInputList.Cancel
-
- PrintLog "- Set focus in front of first line."
- Call wTypeKeys "<MOD1 Home>"
- PrintLog "- Edit/Fields."
- try
- EditFields
- catch
- Warnlog "Can't import word document!"
- Call hCloseDocument
- goto endsub
- endcatch
-
- PrintLog "- click Left arrow button"
- Kontext "FeldbefehlBearbeitenFunktionen"
- if EntrysList.GetItemCount = 3 then
- For i = 1 to EntrysList.GetItemCount
- EntrysList.Select i
- Sleep 1
- if EntrysList.GetSelText <> sItem1(i-1) then Warnlog "Hope to get " & sItem1(i-1) & " but get " & EntrysList.GetSelText
- next i
- else
- warnlog "Not all entrys in field correctly imported!"
- end if
-
- FeldbefehlBearbeitenFunktionen.Cancel
-
- PrintLog "- Set focus in front of third line"
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>" , 2
- Call wTypeKeys "<Home>"
-
- PrintLog "- Edit/Fields"
- try
- EditFields
- catch
- Warnlog "Can't import word document!"
- Call hCloseDocument
- goto endsub
- endcatch
-
- PrintLog "- click Left arrow button"
- Kontext "FeldbefehlBearbeitenFunktionen"
- if EntrysList.GetItemCount = 3 then
- For i = 1 to EntrysList.GetItemCount
- EntrysList.Select i
- Sleep 1
- if EntrysList.GetSelText <> sItem2(i-1) then Warnlog "Hope to get " & sItem2(i-1) & " but get " & EntrysList.GetSelText
- next i
- else
- warnlog "Not all entrys in field correctly imported!"
- end if
-
- FeldbefehlBearbeitenFunktionen.Cancel
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
diff --git a/testautomation/writer/optional/includes/fields/w_fields1.inc b/testautomation/writer/optional/includes/fields/w_fields1.inc
deleted file mode 100644
index c6caf2c5fade..000000000000
--- a/testautomation/writer/optional/includes/fields/w_fields1.inc
+++ /dev/null
@@ -1,394 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Fields general test
-'*
-'\***********************************************************************
-
-sub w_fields1
-
- Call tInsertFieldsDate
- Call tInsertFieldsTime
- Call tInsertFieldsPageNumber
- Call tInsertFieldsPageCount
- Call tInsertFieldsSubject
- Call tInsertFieldsTitle
- Call tInsertFieldsAuthor
-
-end sub
-
-'-----------------------------------------------------------------
-
-testcase tInsertFieldsDate
-
- Dim sDate as String
- sDate = Date
-
- printlog "Insert / Fields / Date"
- '/// <b> Default should be mm/dd/yy </b>
-
- Call hNewDocument
-
- '/// Insert / Fields / Date , the 1st date is fixed
- InsertFieldsDate
-
- '/// Return
- Call wTypeKeys "<Return>"
-
- '/// Insert / Fields / Date
- InsertFieldsDate
-
- Call wTypeKeys "<Home>"
-
- '/// Set 2nd date only to be date , not fixed
- '/// In 2nd date , Edit / Fields , select date in 'select'
- '/// Select second format in 'Format'
- EditFields
- Kontext "FeldbefehlBearbeitenDokument"
- Auswahl.Select 2
- Zahlenformat.Select 2 'Should be the same as the value we get with 'Time'.
- '/// Close the dialog
- FeldbefehlBearbeitenDokument.OK
-
- '/// Set first date to the right format, but leave as unfixed
- '/// In 1nd date , Edit / Fields , select second format in 'Format'
- Call wTypeKeys "<MOD1 Home>"
-
- EditFields
- Kontext "FeldbefehlBearbeitenDokument"
- Zahlenformat.Select 2 'Should be the same as the value we get with 'Time'.
- FeldbefehlBearbeitenDokument.OK
-
- '/// Check if the date is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- EditCopy
- if GetClipboard <> sDate then
- Warnlog "Fixed date is wrong ! Hope you don't run this case in the midnight"
- end if
-
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- EditCopy
- if GetClipboard <> sDate then
- Warnlog "Date is wrong ! Hope you don't run this case in the midnight"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertFieldsTime
-
- Dim sTime as String
- Dim sTime1 as String
- Dim sTime2 as String
- Dim sTemp as String
-
- printlog "Insert / Fields / Time"
- '/// <b> Default could be hh/mm/ss pm or simply hh/mm/ss , depending on the system the test is running on.</b>
-
- Call hNewDocument
- sTime = Time
-
- '/// Insert / Fields / Time , the 1st time is fixed
- InsertFieldsTime
-
- '/// Return
- Call wTypeKeys "<Return>"
-
- '/// Insert / Fields / Time
- InsertFieldsTime
-
- Call wTypeKeys "<Home>"
-
- '/// Set 2nd time only to be time , not fixed
- '/// In 2nd time , Edit / Fields , select Time in 'select'
- EditFields
- Kontext "FeldbefehlBearbeitenDokument"
- Auswahl.Select 2
- FeldbefehlBearbeitenDokument.OK
-
- '/// Check if the time is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- EditCopy
- sTime1 = GetClipboard
- if NOT Len(sTime1) > 7 then Warnlog "Fixed time-format is wrong !"
-
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- EditCopy
- sTime2 = GetClipboard
- if NOT Len(sTime2) > 7 then Warnlog "Time-format is wrong !"
-
- printlog "Stop for a while ..."
-
- '/// Stop for a while , check if the time is still correct
- Sleep 2
- ' update fields
- Call wTypeKeys "<F9>"
- ' read field content
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- EditCopy
- if GetClipboard <> sTime1 then Warnlog "Fixed time is wrong !"
-
- '/// Stop for a while , check if the time is still correct
- Sleep 2
- ' update fields
- Call wTypeKeys "<F9>"
- ' read field content
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- EditCopy
- if GetClipboard = sTime2 then Warnlog "Time is wrong !"
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertFieldsPageNumber
-
- Dim sPage1 , sPage2 as String
-
- sPage1 = "1" : sPage2 = "2"
-
- printlog "Insert / Fields / Page Number"
-
- Call hNewDocument
-
- '/// In 1st page , Insert / Fields / Page Number
- InsertFieldsPageNumbers
-
- '/// Insert a page break
- InsertManualBreak
- Sleep 2
- kontext "UmbruchEinfuegen"
- Seitenumbruch.check
- UmbruchEinfuegen.OK
-
- '/// In 2nd page , Insert / Fields / Page Number
- InsertFieldsPageNumbers
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Check if the page number is correct
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent( ) <> sPage1 then
- QAErrorLog "#i31214# The 1st page number isn't correct ! should be: '" + sPage1 + "', but was: '" + GetClipboard + "'."
- end if
-
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboard <> sPage2 then
- Warnlog "The 2nd page number isn't correct !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertFieldsPageCount
-
- Dim sPage1 , sPage2 as String
-
- sPage1 = "1" : sPage2 = "2"
-
- printlog "Insert / Fields / Page Count"
-
- Call hNewDocument
-
- '/// In 1st page , Insert / Fields / Page Count
- InsertFieldsPageCount
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Check if the 1st page count is correct
- Call wTypeKeys "<Shift Right>"
- EditCopy
- if GetClipboard <> sPage1 then
- Warnlog "1-The 1st page count isn't correct !"
- end if
- Call wTypeKeys "<End>"
-
- '/// Insert a page break
- InsertManualBreak
- Sleep 2
- kontext "UmbruchEinfuegen"
- Seitenumbruch.check
- UmbruchEinfuegen.OK
-
- '/// In 2nd page , Insert / Fields / Page Count
- InsertFieldsPageCount
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Check if the page count is correct
- Call wTypeKeys "<Shift Right>"
- 'EditCopy
- if fGetFieldContent( ) <> sPage2 then
- Warnlog "2-The 1st page count isn't correct"
- end if
-
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboard <> sPage2 then
- Warnlog "The 2nd page count isn't correct !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertFieldsSubject
-
- Dim sSubject as String
- sSubject = "This is a Subject"
-
- printlog "Insert / Fields / Subject"
-
- Call hNewDocument
-
- '/// File / Properties / Description , input some
- '/// + text in Subject
- Call fFileProperties("TabBeschreibung")
- Thema.Settext sSubject
- TabBeschreibung.OK
-
- '/// Insert / Fields / Subject
- InsertFieldsSubject
-
- '/// Check if the subject is correct
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboard <> sSubject then
- Warnlog "Subject isn't correct ! should be: '" + sSubject + "', but was: '" + GetClipboard + "'."
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertFieldsTitle
-
- Dim sTitle as String
-
- sTitle = "This is a Title"
-
- printlog "Insert / Fields / Title"
-
- Call hNewDocument
-
- '/// File / Properties / Description , input some
- '/// + text in Title
- Call fFileProperties("TabBeschreibung")
- Titel.Settext sTitle
- TabBeschreibung.OK
-
- '/// Insert / Fields / Title
- InsertFieldsTitle
-
- '/// Check if the title is correct
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboard <> sTitle then
- Warnlog "Title isn't correct ! should be: '" + sTitle + "', but was: '" + GetClipboard + "'."
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertFieldsAuthor
-
- Dim sFirstName , sLastName as String
- Dim sFirstName1 , sLastName1 as String
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
-
- printlog "Insert / Fields / Author"
-
- Call hNewDocument
-
- '/// Change author to author :Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// File / Properties / General , check "Apply user
- '/// + data" , click "delete" button
- Call fFileProperties("TabDokument")
- BenutzerdatenVerwenden.Check
- Sleep 1
- Loeschen.Click
- Sleep 1
- TabDokument.OK
-
- '/// Insert / Fields / Author
- InsertFieldsAuthor
-
- '/// Check if the title is correct
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboard <> (sFirstName1 + " " + sLastName1) then
- Warnlog "Author isn't correct ! should be: '" + (sFirstName1 + " " + sLastName1) + "', but was: '" + GetClipboard + "'."
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields2.inc b/testautomation/writer/optional/includes/fields/w_fields2.inc
deleted file mode 100644
index 4ac611f39aa6..000000000000
--- a/testautomation/writer/optional/includes/fields/w_fields2.inc
+++ /dev/null
@@ -1,1035 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Fields general test
-'*
-'\***********************************************************************
-
-sub w_fields2
-
- Call tDialogNonModal
- Call tDocumentAuthor
- Call tDocumentAuthorFixed
- Call tDocumentChapter
- Call tDocumentDate
- Call tDocumentFilename
- Call tDocumentPage
- Call tDocumentSender
- Call tDocumentSenderFixed
- Call tDocumentStatistics
- Call tDocumentTemplate
- Call tDocumentTime
-
-end sub
-
-'-----------------------------------------------------------------
-
-testcase tDialogNonModal
-
- Dim sTest as String
-
- sTest = "This is a Test"
-
- printlog "NON modal"
- '/// <b> NON modal </b>
-
- Call hNewDocument
-
- '/// Insert / Fields / Other / Document , test if
- '/// + the dialog is NON modal
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- try
- Call wTypeKeys sTest
- catch
- Warnlog "Something is wrong in dialog document!"
- endcatch
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboard <> sTest then
- Warnlog "The text in document isn't corrrect!"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentAuthor
- if iSprache <> 1 then
- QaErrorLog "Currently no any other language than English. Aborting."
- exit sub
- end if
-
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sFirstName2 as String
- Dim sLastName2 as String
- Dim sInitial1 as String
- Dim sInitial2 as String
-
- sFirstName1 = "ABC" : sLastName1 = "DEF"
- sFirstName2 = "XYZ" : sLastName2 = "OPQ"
- sInitial1 = "AD" : sInitial2 = "XO"
-
- printlog "Insert/Fields/Other/Document / Author "
- '/// <b> Insert/Fields/Other/Document / Author </b>
-
- Call hNewDocument
-
- '/// Change author to author1 :ABC DEF
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- Kuerzel.SetText ""
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Insert/Fields/Other/Document / Author (Name, Initial)
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Author")
- Sleep 1
- Auswahl.Select 1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<Return>"
- Kontext "TabDokumentFeldbefehle"
- Auswahl.Select 2
- Sleep 1
- Einfuegen.Click
- TabDokumentFeldbefehle.Close
-
- '/// Check if the name is inserted correctly
- Call wTypeKeys "<MOD1 Home><Shift End>"
- EditCopy
- if GetClipboard <> (sFirstName1 + " " + sLastName1) then
- Warnlog "Should get " & sFirstName1 & " " & sLastName1 & " but get " & GetClipboard
- end if
-
- '/// Check if the Initial is inserted correctly
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<End><Shift Home>"
- EditCopy
- if GetClipboard <> sInitial1 then
- Warnlog "Should get " & sInitial1 & " but get " & GetClipboard
- end if
-
- '/// Change author to author1 :XYZ OPQ
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName2
- ZuName.SetText sLastName2
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep 2
-
- '/// Press F9
- Call wTypeKeys "<F9>"
- Sleep 3
-
- '/// Check if the name is changed
- Call wTypeKeys "<MOD1 Home><Shift End>"
- EditCopy
- if GetClipboard <> (sFirstName2 + " " + sLastName2) then
- Warnlog "Should get " & sFirstName2 & " " & sLastName2 & " but get " & GetClipboard
- end if
-
- '/// Check if the Initial is changed
- Call wTypeKeys "<Down><End><Shift Home>"
- EditCopy
- if GetClipboard <> sInitial2 then
- Warnlog "Should get " & sInitial2 & " but get " & GetClipboard
- end if
-
- 'Change author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentAuthorFixed
- if iSprache <> 1 then
- QaErrorLog "Currently no any other language than English. Aborting."
- exit sub
- end if
-
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sFirstName2 as String
- Dim sLastName2 as String
- Dim sInitial1 as String
-
- sFirstName1 = "ABC" : sLastName1 = "DEF"
- sFirstName2 = "XYZ" : sLastName2 = "OPQ"
- sInitial1 = "AD"
-
- printlog "Insert/Fields/Other/Document / Author - Fixed"
- '/// <b> Insert/Fields/Other/Document / Author - Fixed</b>
-
- Call hNewDocument
-
- '/// Change author to author1 :ABC DEF
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- Kuerzel.SetText ""
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Insert/Fields/Other/Document / Author (Name, Initial)
- '/// + check 'Fixed content'
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Author")
- Sleep 1
- Auswahl.Select 1
- Sleep 1
- InhaltFix.Check
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<Return>"
- Kontext "TabDokumentFeldbefehle"
- Auswahl.Select 2
- Sleep 1
- InhaltFix.Check
- Einfuegen.Click
- TabDokumentFeldbefehle.Close
-
- '/// Check if the name is inserted correctly
- Call wTypeKeys "<MOD1 Home><Shift End>"
- EditCopy
- if GetClipboard <> (sFirstName1 + " " + sLastName1) then
- Warnlog "Should get " & sFirstName1 & " " & sLastName1 & " but get " & GetClipboard
- end if
-
- '/// Check if the Initial is inserted correctly
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<End><Shift Home>"
- EditCopy
- if GetClipboard <> sInitial1 then
- Warnlog "Should get " & sInitial1 & " but get " & GetClipboard
- end if
-
- '/// Change author to author1 :XYZ OPQ
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName2
- ZuName.SetText sLastName2
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep 2
-
- '/// Press F9
- Call wTypeKeys "<F9>"
- Sleep 3
-
- '/// Check if the name is changed
- Call wTypeKeys "<MOD1 Home><Shift End>"
- EditCopy
- if GetClipboard <> (sFirstName1 + " " + sLastName1) then
- Warnlog "Still should get " & sFirstName1 & " " & sLastName1 & " but get " & GetClipboard
- end if
-
- '/// Check if the Initial is changed
- Call wTypeKeys "<Down><End><Shift Home>"
- EditCopy
- if GetClipboard <> sInitial1 then
- Warnlog "Still should get " & sInitial1 & " but get " & GetClipboard
- end if
-
- 'Change author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentChapter
-
- Dim sTestFile as String
- Dim sChapter() as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\chapterTest.sxw")
-
- sChapter = Array( _
- "My House" , _
- "Before2After" , _
- "Before2AfterMy House" , _
- "2" , _
- )
-
- printlog "Insert/Fields/Other/Document / Chapter"
- '/// <b> Insert/Fields/Other/Document / Chapter </b>
-
- Call hNewDocument
-
- '/// Open test file chapterTest.sxw
- hFileOpenLocally( sTestFile )
-
-
- Call wTypeKeys "<MOD1 End><Return>"
-
- '/// Insert/Fields/Other/Document / Chapter
- '/// Insert Chapter name, Chapter number,
- '/// Chapter number and name , Chapter number without separator
- '/// Check if the insertion is correct
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Chapter")
- for i = 0 to UBound(sChapter)
- Kontext "TabDokumentFeldbefehle"
- Formatliste.Select i+1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
- Sleep 1
- if fGetFieldContent() <> sChapter(i) then
- QaErrorLog i &"#94997# Should get " & sChapter(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Delete>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentDate
-
- Dim sDate as String
-
- printlog "Insert/Fields/Other/Document / Date"
- '/// <b> Insert/Fields/Other/Document / Date </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Document / Date
- '/// Check if the insertion is correct
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Date")
- Auswahl.Select 1
- Einfuegen.Click
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call wTypeKeys "<Shift Left>"
- EditCopy
- Sleep 1
- if GetClipboard = "" then
- Warnlog "Field returns an empty string"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentFilename
-
- if ( bAsianLan ) then
- QaErrorLog "No testing with Asian language. Aborting."
- goto endsub
- end if
-
- Dim sTestFile as String
- Dim sFilename(4) as String
- Dim i as Integer
-
- sTestFile = convertpath( gTesttoolPath & "writer\optional\input\fields\pageTest.sxw" )
-
- sFilename(0) = "pageTest.sxw"
- sFilename(1) = "pageTest"
- sFilename(2) = hGetWorkPath()
- sFilename(3) = hFileGetLocalPath( sTestFile )
-
- printlog "Insert/Fields/Other/Document / File name"
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<End><Return>"
-
- printlog "Insert/Fields/Other/Document / File name"
- printlog "Insert File name, File name without extension , Path , Path/File name"
- printlog "Check if the insertion is correct"
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("File name")
- for i = 0 to 3
- Kontext "TabDokumentFeldbefehle"
- Formatliste.Select i+1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift LEFT>" 'HOME
- Sleep 1
- if fGetFieldContent() <> sFilename(i) then
- Warnlog i &" - Should get " & sFilename(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Delete>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentPage
-
- Dim sTestFile as String
- Dim sPage() as String
- Dim i as Integer
-
- sPage = Array( _
- "2" , _
- "1" , _
- "3" , _
- )
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.sxw")
-
- printlog "Insert/Fields/Other/Document / Page"
- '/// <b> Insert/Fields/Other/Document / Page </b>
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw which includes 3 pages
- hFileOpenLocally( sTestFile )
-
-
- '/// Go to the 2nd page
- Call wTypeKeys "<MOD1 Home>"
- Call fFindWord ("Sec")
- Call wTypeKeys "<End><Return>"
-
- '/// Insert/Fields/Other/Document / Page
- '/// Insert Page numbers, Privious page , Next page
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Page")
- for i = 0 to UBound(sPage)
- Kontext "TabDokumentFeldbefehle"
- Auswahl.Select i+1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
- Sleep 1
- EditCopy
- if GetClipboard <> sPage(i) then
- Warnlog i &" - Should get " & sPage(i) & " but get " & GetClipboard
- end if
- Call wTypeKeys "<Delete>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentSender
- if iSprache <> 1 then
- QaErrorLog "Currently no testing with other languages than English. (ID's are not the same) Aborting."
- exit sub
- end if
-
- Dim aUserData(14) as String
- Dim aUserData1() as String
- Dim aUserData2() as String
-
- Dim i as Integer
-
- aUserData1 = Array( _
- "Com1" , _
- "ABC" , _
- "DEF" , _
- "AD" , _
- "Str1" , _
- "Country1" , _
- "123" , _
- "City1" , _
- "Title1" , _
- "Posi1" , _
- "123" , _
- "465" , _
- "789" , _
- "AD@a.a" , _
- "State1" , _
- )
- aUserData2 = Array( _
- "Com2" , _
- "XYZ" , _
- "OPQ" , _
- "XO" , _
- "Str2" , _
- "Country2" , _
- "321" , _
- "City2" , _
- "Title2" , _
- "Posi2" , _
- "222" , _
- "654" , _
- "987" , _
- "XO@b.b" , _
- "State2" , _
- )
-
- printlog "Insert/Fields/Other/Document / Sender"
- '/// <b> Insert/Fields/Other/Document / Sender </b>
-
- Call hNewDocument
-
- '/// Change user data
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- aUserData(0) = Firma.GetText
- aUserData(1) = VorName.GetText
- aUserData(2) = ZuName.GetText
- aUserData(3) = Strasse.GetText
- aUserData(4) = City.GetText
- aUserData(5) = State.GetText
- aUserData(6) = Zip.GetText
- aUserData(7) = Land.GetText
- aUserData(8) = Titel.GetText
- aUserData(9) = Position.GetText
- aUserData(10) = TelPriv.GetText
- aUserData(11) = TelGe.GetText
- aUserData(12) = Fax.GetText
- aUserData(13) = EMail.GetText
-
- Kuerzel.SetText ""
- Firma.SetText aUserData1(0)
- VorName.SetText aUserData1(1)
- ZuName.SetText aUserData1(2)
- Strasse.SetText aUserData1(4)
- City.SetText aUserData1(7)
- State.SetText aUserData1(14)
- Zip.SetText aUserData1(6)
- Land.SetText aUserData1(5)
- Titel.SetText aUserData1(8)
- Position.SetText aUserData1(9)
- TelPriv.SetText aUserData1(10)
- TelGe.SetText aUserData1(11)
- Fax.SetText aUserData1(12)
- EMail.SetText aUserData1(13)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Insert/Fields/Other/Document / Sender
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Sender")
- for i= 0 to UBound(aUserData1)
- Kontext "TabDokumentFeldbefehle"
- Auswahl.Select i+1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<Return>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- '/// Check if the configuration is inserted correctly
- Call wTypeKeys "<MOD1 Home>"
- for i= 0 to UBound(aUserData1)
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> aUserData1(i) then
- Warnlog "i32872 1.Should get " & aUserData1(i)& " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- '/// Change author to author1 :XYZ OPQ
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- Kuerzel.SetText ""
- Firma.SetText aUserData2(0)
- VorName.SetText aUserData2(1)
- ZuName.SetText aUserData2(2)
- Strasse.SetText aUserData2(4)
- City.SetText aUserData2(7)
- State.SetText aUserData2(14)
- Zip.SetText aUserData2(6)
- Land.SetText aUserData2(5)
- Titel.SetText aUserData2(8)
- Position.SetText aUserData2(9)
- TelPriv.SetText aUserData2(10)
- TelGe.SetText aUserData2(11)
- Fax.SetText aUserData2(12)
- EMail.SetText aUserData2(13)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep 2
-
- '/// Press F9
- Call wTypeKeys "<F9>"
- Sleep 3
-
- '/// Check if the configuration is changed
- Call wTypeKeys "<MOD1 Home>"
- for i= 0 to UBound(aUserData1)
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> aUserData2(i) then
- Warnlog "i32872 2.Should get " & aUserData2(i)& " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- 'Change author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- Firma.SetText aUserData(0)
- VorName.SetText aUserData(1)
- ZuName.SetText aUserData(2)
- Strasse.SetText aUserData(3)
- City.SetText aUserData(4)
- State.SetText aUserData(5)
- Zip.SetText aUserData(6)
- Land.SetText aUserData(7)
- Titel.SetText aUserData(8)
- Position.SetText aUserData(9)
- TelPriv.SetText aUserData(10)
- TelGe.SetText aUserData(11)
- Fax.SetText aUserData(12)
- EMail.SetText aUserData(13)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentSenderFixed
- if iSprache <> 1 then
- QaErrorLog "Currently no testing with other languages than English. (ID's are not the same) Aborting."
- exit sub
- end if
-
- Dim aUserData(16) as String
- Dim aUserData1() as String
- Dim aUserData2() as String
-
- Dim i as Integer
-
- aUserData1 = Array( _
- "Com1" , _
- "ABC" , _
- "DEF" , _
- "AD" , _
- "Str1" , _
- "Country1" , _
- "123" , _
- "City1" , _
- "Title1" , _
- "Posi1" , _
- "123" , _
- "465" , _
- "789" , _
- "AD@a.a" , _
- "State1" , _
- )
-
- aUserData2 = Array( _
- "Com2" , _
- "XYZ" , _
- "OPQ" , _
- "XO" , _
- "Str2" , _
- "Country2" , _
- "321" , _
- "City2" , _
- "Title2" , _
- "Posi2" , _
- "222" , _
- "654" , _
- "987" , _
- "XO@b.b" , _
- "State2" , _
- )
-
-
- printlog "Insert/Fields/Other/Document / Sender - Fixed"
- '/// <b> Insert/Fields/Other/Document / Sender - Fixed</b>
-
- Call hNewDocument
-
- '/// Change user data
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- aUserData(0) = Firma.GetText
- aUserData(1) = VorName.GetText
- aUserData(2) = ZuName.GetText
- aUserData(3) = Strasse.GetText
- aUserData(4) = City.GetText
- aUserData(5) = State.GetText
- aUserData(6) = Zip.GetText
- aUserData(7) = Land.GetText
- aUserData(8) = Titel.GetText
- aUserData(9) = Position.GetText
- aUserData(10) = TelPriv.GetText
- aUserData(11) = TelGe.GetText
- aUserData(12) = Fax.GetText
- aUserData(13) = EMail.GetText
-
- Kuerzel.SetText ""
- Firma.SetText aUserData1(0)
- VorName.SetText aUserData1(1)
- ZuName.SetText aUserData1(2)
- Strasse.SetText aUserData1(4)
- City.SetText aUserData1(7)
- State.SetText aUserData1(14)
- Zip.SetText aUserData1(6)
- Land.SetText aUserData1(5)
- Titel.SetText aUserData1(8)
- Position.SetText aUserData1(9)
- TelPriv.SetText aUserData1(10)
- TelGe.SetText aUserData1(11)
- Fax.SetText aUserData1(12)
- EMail.SetText aUserData1(13)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Insert/Fields/Other/Document / Sender , check 'Fixed content'
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Sender")
- for i= 0 to UBound(aUserData1)
- Kontext "TabDokumentFeldbefehle"
- Auswahl.Select i+1
- Sleep 1
- InhaltFix.Check
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<Return>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- '/// Check if the configuration is inserted correctly
- Call wTypeKeys "<MOD1 Home>"
- for i= 0 to UBound(aUserData1)
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> aUserData1(i) then
- Warnlog "i32872 1.Should get " & aUserData1(i)& " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- '/// Change author to author1 :XYZ OPQ
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- Kuerzel.SetText ""
- Firma.SetText aUserData2(0)
- VorName.SetText aUserData2(1)
- ZuName.SetText aUserData2(2)
- Strasse.SetText aUserData2(4)
- City.SetText aUserData2(7)
- State.SetText aUserData2(14)
- Zip.SetText aUserData2(6)
- Land.SetText aUserData2(5)
- Titel.SetText aUserData2(8)
- Position.SetText aUserData2(9)
- TelPriv.SetText aUserData2(10)
- TelGe.SetText aUserData2(11)
- Fax.SetText aUserData2(12)
- EMail.SetText aUserData2(13)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep 2
-
- '/// Press F9
- Call wTypeKeys "<F9>"
- Sleep 3
-
- '/// Check if the configuration is changed
- Call wTypeKeys "<MOD1 Home>"
- for i= 0 to UBound(aUserData1)
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> aUserData1(i) then
- Warnlog "i32872 2.Should get " & aUserData1(i)& " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- 'Change author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- Firma.SetText aUserData(0)
- VorName.SetText aUserData(1)
- ZuName.SetText aUserData(2)
- Strasse.SetText aUserData(3)
- City.SetText aUserData(4)
- State.SetText aUserData(5)
- Zip.SetText aUserData(6)
- Land.SetText aUserData(7)
- Titel.SetText aUserData(8)
- Position.SetText aUserData(9)
- TelPriv.SetText aUserData(10)
- TelGe.SetText aUserData(11)
- Fax.SetText aUserData(12)
- EMail.SetText aUserData(13)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentStatistics
-
- Dim sTestFile as String
- Dim sStatistics() as String
- Dim sType as string
- Dim i as Integer
-
- sStatistics = Array( "2", "2", "3", "13", "2", "2", "1" )
- sTestFile= Convertpath (gTesttoolpath + "writer\optional\input\fields\statisticsTest.sxw")
-
- printlog "Insert/Fields/Other/Document / Statistics"
- '/// <b> Insert/Fields/Other/Document / Statistics </b>
-
- '/// Open test file statisticsTest.sxw which includes
- '/// 2 tables , 2 pictures , 22 paragraph , 1 object ,
- '/// 2 words , 12 characters and 2 pages
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys "<MOD1 Home><Down>"
-
- '/// Insert/Fields/Other/Document / Statistics
- '/// Insert Pages, Paragraphs , Words , Characters , Tables, Graphics , Objects.
- '/// Check if the insertion is correct
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Statistics")
- sType = Auswahl.GetSelText
- for i = 0 to UBound(sStatistics)
- Kontext "TabDokumentFeldbefehle"
- Auswahl.Select i+1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
- Sleep 1
- EditCopy
- if GetClipboard <> sStatistics(i) then
- Warnlog "- " & sType & ": Should get " & sStatistics(i) & " but get " & GetClipboard
- end if
- Call wTypeKeys "<Delete>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentTemplate
-
- Dim sTestFile as String
- Dim sDirectory as String
- Dim oDirectory as String
- Dim sLanguage as String
- Dim sFormat() as String
- Dim sResult(6) as String
- Dim i as Integer
-
- sLanguage = fGetDirLanguage()
- sTestFile = convertpath( gTesttoolpath + "writer\optional\input\fields\diploma.ott" )
-
- sResult(0) = fGetCategory()
- sResult(1) = "diploma.ott"
- sResult(2) = "diploma"
- sResult(3) = convertpath( gOfficePath & "user/work" )
- sResult(4) = hGetWorkFile( sResult( 1 ) )
- sResult(5) = fGetStyle()
-
- printlog "Insert/Fields/Other/Document / Template"
- '/// <b> Insert/Fields/Other/Document / Template </b>
-
- '/// Open test file diploma.ott
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Insert/Fields/Other/Document / Template
- '/// Insert Category , File name , File name without extension ,
- '/// + Path , Path/File name , Style
- '/// Check if the insertion is correct
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Templates")
- for i = 1 to Formatliste.GetItemCount
- Kontext "TabDokumentFeldbefehle"
- Formatliste.Select i
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Left>"
- Sleep 1
- EditCopy
- if GetClipboard <> sResult(i-1) then
- select case i-1
- case 0
- Warnlog "Field 'Templates->Category' is empty"
- case else
- Warnlog " - Should get " & sResult(i-1) & " but get " & GetClipboard
- end select
- end if
- Call wTypeKeys "<Delete>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- hFileCloseAll()
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocumentTime
-
- Dim sTime1 as String
- Dim sTime2 as String
-
- printlog "Insert/Fields/Other/Document / Time"
- '/// <b> Insert/Fields/Other/Document / Time </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Document / Time
- '/// Insert a fixed time and a time .
- '/// Check if the insertion is correct
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("Time")
- Auswahl.Select 1 'Time (Fixed)
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<Return>"
-
- Kontext "TabDokumentFeldbefehle"
- Auswahl.Select 1 'Time
- Sleep 1
- Einfuegen.Click
- sleep 1
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- sTime1 = GetClipboard
-
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- sTime2 = GetClipboard
-
- Sleep 5
- Call wTypeKeys "<F9>"
-
- 'Check fixed time
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if sTime1 <> GetClipboard then
- Warnlog "Time should NOT change !"
- end if
-
- 'Check time
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if sTime2 <> GetClipboard then
- Warnlog "Time should change !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/fields/w_fields3.inc b/testautomation/writer/optional/includes/fields/w_fields3.inc
deleted file mode 100644
index c2fe3d5d27f6..000000000000
--- a/testautomation/writer/optional/includes/fields/w_fields3.inc
+++ /dev/null
@@ -1,993 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Fields - References Test
-'*
-'\***********************************************************************
-
-sub w_fields3
-
- Call tCrossReference
- Call tSetReferenceNoSelection
- Call tSetReferenceTextSelection
- Call tInsertReferencePage
- Call tInsertReferenceChapter
- Call tInsertReferenceReference
- Call tInsertReferenceAboveBelow
- Call tInsertReferenceAsPageStyle
- Call tInsertFootnote
- Call tInsertEndnote
- Call tInsertCaptionAbove
- Call tInsertCaptionBelow
- Call tInsertBookmarkPage
- Call tInsertBookmarkChapter
- Call tInsertBookmarkReference
- Call tInsertBookmarkAboveBelow
- Call tInsertBookmarkAsPageStyle
-
-end sub
-
-'-----------------------------------------------------------------
-
-testcase tCrossReference
-
- printlog "Insert/Cross-reference"
- '/// <b> Insert/Cross-reference </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Insert/Cross-reference
- InsertReferenceField
- Sleep 2
- Kontext "TabReferenzen"
- if TabReferenzen.Exists then
- TabReferenzen.Close
- else
- Warnlog "Tabpage References should be as the actived tabpage!"
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tSetReferenceNoSelection
-
- Dim sReference as String
- Dim sTestFile as String
-
- sReference = "myTest"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.sxw")
-
- printlog "Set Reference - Cursor at any position"
- '/// <b> Set Reference - Cursor at any position </b>
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Set curson to the 2nd page
- Call wTypeKeys "<MOD1 Home>"
- Call fFindWord ("Sec")
- Call wTypeKeys "<End><Return>"
-
- '/// Insert/Cross-reference , choose "Set Reference"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 1
- Sleep 1
- Namefeld.SetText sReference
- Einfuegen.Click
- TabReferenzen.Close
-
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- if Namefeld.GetText <> sReference then
- Warnlog "Reference can't be set correctly!"
- end if
- TabReferenzen.Close
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tSetReferenceTextSelection
-
- Dim sReference as String
-
- sReference = "myTest"
-
- printlog "Set Reference - Select some text"
- '/// <b> Set Reference - Select some text </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Input some text and select them
- Call wTypeKeys "ABCD"
- Call wTypeKeys "<Shift Home>"
-
- '/// Insert/Cross-reference , choose "Set Reference"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 1
- Sleep 1
- Namefeld.SetText sReference
- Einfuegen.Click
- TabReferenzen.Close
-
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- if Namefeld.GetText <> sReference then
- Warnlog "Reference can't be set correctly!"
- end if
- TabReferenzen.Close
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertReferencePage
-
- Dim sReference as String
- Dim sTestFile as String
-
- sReference = "myTest"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.sxw")
-
- printlog "Insert Reference - Page"
- '/// <b> Insert Reference - Page </b>
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Set curson to the 2nd page
- Call wTypeKeys "<MOD1 Home>"
- Call fFindWord ("Sec")
- Call wTypeKeys "<End><Return>"
-
- '/// Insert/Cross-reference , choose "Set Reference"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 1
- Sleep 1
- Namefeld.SetText sReference
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<Return>" , 2
-
- '/// Insert/Cross-reference , choose "Insert Reference" and "Page"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select sReference
- Sleep 1
- Formatliste.Select 1
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent( ) <> "2" then
- Warnlog "Should get 2 , but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertReferenceChapter
-
- Dim sReference as String
- Dim sTestFile as String
-
- sReference = "myTest"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\chapterTest.sxw")
-
- printlog "Insert Reference - Chapter"
- '/// <b> Insert Reference - Chapter </b>
-
- Call hNewDocument
-
- '/// Open test file chapterTest.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Set curson to the 2nd line
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down><Home>"
-
- '/// Insert/Cross-reference , choose "Set Reference"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 1
- Sleep 1
- Namefeld.SetText sReference
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Return>" , 2
-
- '/// Insert/Cross-reference , choose "Insert Reference" and "Chapter"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select sReference
- Sleep 1
- Formatliste.Select 2
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent( ) <> "2" then
- Warnlog "Should get 2 , but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertReferenceReference
-
- Dim sReference as String
- Dim sReferenceName as String
-
- sReference = "est !"
- sReferenceName = "myTest"
-
- printlog "Insert Reference - Reference"
- '/// <b> Insert Reference - Reference</b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Input some thing in the document and press return
- Call wTypeKeys "This is a test !"
- Call wTypeKeys "<Return>"
-
- '/// Select some text
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>" , 5
-
- '/// Insert/Cross-reference , choose "Set Reference"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 1
- Sleep 1
- Namefeld.SetText sReferenceName
- Einfuegen.Click
- TabReferenzen.Close
-
- '/// set focus to 2nd line
- Call wTypeKeys "<Down>"
-
- '/// Insert/Cross-reference , choose "Insert Reference" and "Reference"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select sReferenceName
- Sleep 1
- Formatliste.Select 3
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sReference then
- Warnlog "Should get " & sReference & " but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertReferenceAboveBelow
-
- Dim sReference as String
- Dim sAbove as String
- Dim sBelow as String
-
- sReference = "myTest"
- Select Case iSystemSprache
- Case 01 : sAbove = "above" : sBelow = "below"
- Case 35 : sAbove = "sur" : sBelow = "sous"
- Case 39 : sAbove = "sopra" : sBelow = "sotto"
- Case 49 : sAbove = "oben" : sBelow = "unten"
- Case 46 : sAbove = "ovan" : sBelow = "under"
- Case 55 : sAbove = "arriba" : sBelow = "abajo"
- End Select
-
- printlog "Insert Reference - Above/Below"
- '/// <b> Insert Reference - Above/Below</b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Press Return first , then input some text in
- '/// + the document , press return again
- Call wTypeKeys "<Return>"
- Call wTypeKeys "This is a test !"
- Call wTypeKeys "<Return>"
-
- '/// Insert a reference before "This is ..."
- Call wTypeKeys "<Up><Home>"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 1
- Sleep 1
- Namefeld.SetText sReference
- Einfuegen.Click
- TabReferenzen.Close
-
- '/// set focus to 3rd line
- Call wTypeKeys "<Down>"
-
- '/// Insert/Cross-reference , choose "Insert Reference" and "above/below"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select sReference
- Sleep 1
- Formatliste.Select 4
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sAbove then 'Check systemlanguage / Office-Language - if other than 01 then ignore/QaErrorLog!
- Warnlog "Should get " & sAbove & " but get " & fGetFieldContent()
- end if
-
- '/// set focus to 1st line
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Insert/Cross-reference , choose "Insert Reference" and "above/below"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select sReference
- Sleep 1
- Formatliste.Select 4
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sBelow then
- Warnlog "Should get " & sBelow & " but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertReferenceAsPageStyle
-
- Dim sReference as String
- Dim sTestSytle as String
-
- sReference = "myTest"
- sTestSytle = "A"
-
- printlog "Insert Reference - As Page Style"
- '/// <b> Insert Reference - As Page Style </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Fomrat/page / page , set Format as "A , B , C ..."
- Call fFormatPageWriter("TabSeite")
- Numerierung.Select 1
- TabSeite.OK
-
- '/// Input some thing in the document , press return
- Call wTypeKeys "This is a test !"
- Call wTypeKeys "<Return>"
-
- '/// Insert a reference before "This is ..."
- Call wTypeKeys "<Up><Home>"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 1
- Sleep 1
- Namefeld.SetText sReference
- Einfuegen.Click
- TabReferenzen.Close
-
- '/// set focus to 2nd line
- Call wTypeKeys "<Down>"
-
- '/// Insert/Cross-reference , choose "Insert Reference" and "As Page Style"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select sReference
- Sleep 1
- Formatliste.Select 5
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sTestSytle then
- Warnlog "Should get " & sTestSytle & " but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertFootnote
-
- Dim sFootnote as String
-
- sFootnote = "Test"
-
- printlog "Insert Footnote"
- '/// <b> Insert Footnote </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Insert/Footnote
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- 'check footnote
- Fussnote.Check
- Zeichen.Check
- ZeichenText.SetText sFootnote
- FussnoteEinfuegen.OK
-
- '/// Check if footnote is inserted correctly
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> sFootnote then
- Warnlog "Should get " & sFootnote & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertEndnote
-
- Dim sEndnote as String
-
- sEndnote = "Test"
-
- printlog "Insert Endnote"
- '/// <b> Insert Endnote </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Insert Endnote
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- 'check endnote
- Endnote.Check
- Zeichen.Check
- ZeichenText.SetText sEndnote
- FussnoteEinfuegen.OK
-
- '/// Check if footnote is inserted correctly
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> sEndnote then
- Warnlog "Should get " & sEndnote & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertCaptionAbove
-
- Dim sCategory as String
- Dim sCaption as String
- Dim sSeparator as String
-
- sCategory = "A" : sCaption = "B" : sSeparator = "*"
-
- printlog "Insert Caption - Above"
- '/// <b> Insert Caption - Above </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Insert a frame
- Call wInsertFrame
-
- '/// Insert / Caption , set Category as A , set Caption as B , Set Seperator as *
- InsertCaption
- Kontext "Beschriftung"
- Kategorie.SetText sCategory
- Separator.SetText sSeparator
- BeschriftungsText.SetText sCaption
- Position.Select 1
- Beschriftung.OK
- Sleep 1
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Up><Home><Shift End>"
- EditCopy
-
- if fGetFieldContent() <> sCategory & " 1" & sSeparator & sCaption then
- Warnlog "Should get " & sCategory & " 1" & sSeparator & sCaption & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<Home><Shift End>"
- try
- EditCopy
- Warnlog "Should NOT get anything !"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertCaptionBelow
-
- Dim sCategory as String
- Dim sCaption as String
- Dim sSeparator as String
-
- sCategory = "A" : sCaption = "B" : sSeparator = "*"
-
- printlog "Insert Caption - Below"
- '/// <b> Insert Caption - Below </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Insert a frame
- Call wInsertFrame
-
- '/// Insert / Caption , set Category as A , set Caption as B,
- '/// + select position as Above
- InsertCaption
- Kontext "Beschriftung"
- Kategorie.SetText sCategory
- Separator.SetText sSeparator
- BeschriftungsText.SetText sCaption
- Position.Select 2
- Beschriftung.OK
- Sleep 1
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<Return>"
- Call wTypeKeys "<Up><Home><Shift End>"
- try
- EditCopy
- Warnlog "Should NOT get anything !"
- catch
- endcatch
-
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
- if fGetFieldContent() <> sCategory & " 1" & sSeparator & sCaption then
- Warnlog "Should get " & sCategory & " 1" & sSeparator & sCaption & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertBookmarkPage
-
- Dim sBookmark as String
- Dim sTestFile as String
-
- sBookmark = "myTest"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.sxw")
-
- printlog "Insert Bookmark - Page"
- '/// <b> Insert Bookmark - Page </b>
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Set curson to the 2nd page
- Call wTypeKeys "<MOD1 Home>"
- Call fFindWord ("Sec")
- Call wTypeKeys "<Home>"
-
- '/// Insert a bookmark
- InsertBookmark
- Kontext "TextmarkeEinfuegen"
- Textmarken.SetText sBookmark
- TextmarkeEinfuegen.OK
-
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Return>" , 2
-
- '/// Insert/Cross-reference , choose "Bookmarks" and "Page"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 5
- Sleep 1
- Auswahl.Select sBookmark
- Sleep 1
- Formatliste.Select 1
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent( ) <> "2" then
- Warnlog "Should get 2 , but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertBookmarkChapter
-
- Dim sBookmark as String
- Dim sTestFile as String
-
- sBookmark = "myTest"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\chapterTest.sxw")
-
- printlog "Insert Bookmark - Chapter"
- '/// <b> Insert Bookmark - Chapter </b>
-
- Call hNewDocument
-
- '/// Open test file chapterTest.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Set curson to the 2nd line
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down><Home>"
-
- '/// Insert a bookmark
- InsertBookmark
- Kontext "TextmarkeEinfuegen"
- Textmarken.SetText sBookmark
- TextmarkeEinfuegen.OK
-
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Return>" , 2
-
- '/// Insert/Cross-reference , choose "Bookmarks" and "Chapter"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 5
- Sleep 1
- Auswahl.Select sBookmark
- Sleep 1
- Formatliste.Select 2
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent( ) <> "2" then
- Warnlog "Should get 2 , but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertBookmarkReference
-
- Dim sReference as String
- Dim sBookmark as String
-
- sReference = "est !"
- sBookmark = "myTest"
-
- printlog "Insert Bookmkar - Reference"
- '/// <b> Insert Bookmkar - Reference</b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Input some thing in the document and press return
- Call wTypeKeys "This is a test !"
- Call wTypeKeys "<Return>"
-
- '/// Select some text
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>" , 5
-
- '/// Insert a bookmark
- InsertBookmark
- Kontext "TextmarkeEinfuegen"
- Textmarken.SetText sBookmark
- TextmarkeEinfuegen.OK
-
- '/// set focus to 2nd line
- Call wTypeKeys "<Down>"
-
- '/// Insert/Cross-reference , choose "Bookmark" and "Reference"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 5
- Sleep 1
- Auswahl.Select sBookmark
- Sleep 1
- Formatliste.Select 3
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sReference then
- Warnlog "Should get " & sReference & " but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertBookmarkAboveBelow
-
- Dim sBookmark as String
- Dim sAbove as String
- Dim sBelow as String
-
- sBookmark = "myTest"
- Select Case iSystemSprache
- Case 01 : sAbove = "above" : sBelow = "below"
- Case 35 : sAbove = "sur" : sBelow = "sous"
- Case 39 : sAbove = "sopra" : sBelow = "sotto"
- Case 49 : sAbove = "oben" : sBelow = "unten"
- Case 46 : sAbove = "ovan" : sBelow = "under"
- Case 55 : sAbove = "arriba" : sBelow = "abajo"
- End Select
-
- printlog "Insert Bookmark - Above/Below"
- '/// <b> Insert Bookmark - Above/Below</b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Press Return first , then input some thing in
- '/// + the document , press return again
- Call wTypeKeys "<Return>"
- Call wTypeKeys "This is a test !"
- Call wTypeKeys "<Return>"
-
- '/// Insert a Bookmark before "This is ..."
- Call wTypeKeys "<Up><Home>"
- InsertBookmark
- Kontext "TextmarkeEinfuegen"
- Textmarken.SetText sBookmark
- TextmarkeEinfuegen.OK
-
- '/// set focus to 3rd line
- Call wTypeKeys "<Down>"
-
- '/// Insert/Cross-reference , choose "Bookmarks" and "above/below"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 5
- Sleep 1
- Auswahl.Select sBookmark
- Sleep 1
- Formatliste.Select 4
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sAbove then
- Warnlog "Should get " & sAbove & " but get " & fGetFieldContent()
- end if
-
- '/// set focus to 1st line
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Insert/Cross-reference , choose "Bookmark" and "above/below"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 5
- Sleep 1
- Auswahl.Select sBookmark
- Sleep 1
- Formatliste.Select 4
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sBelow then
- Warnlog "Should get " & sBelow & " but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tInsertBookmarkAsPageStyle
-
- Dim sBookmark as String
- Dim sTestSytle as String
-
- sBookmark = "myTest"
- sTestSytle = "A"
-
- printlog "Insert Bookmark - As Page Style"
- '/// <b> Insert Bookmark - As Page Style </b>
-
- '/// Open a new document
- Call hNewDocument
-
- '/// Fomrat/page / page , set Format as "A , B , C ..."
- Call fFormatPageWriter("TabSeite")
- Numerierung.Select 1
- TabSeite.OK
-
- '/// Input some thing in the document , press return
- Call wTypeKeys "This is a test !"
- Call wTypeKeys "<Return>"
-
- '/// Insert a Bookmark before "This is ..."
- Call wTypeKeys "<Up><Home>"
- InsertBookmark
- Kontext "TextmarkeEinfuegen"
- Textmarken.SetText sBookmark
- TextmarkeEinfuegen.OK
-
- '/// set focus to 2nd line
- Call wTypeKeys "<Down>"
-
- '/// Insert/Cross-reference , choose "Bookmark" and "As Page Style"
- InsertReferenceField
- Kontext "TabReferenzen"
- Feldtyp.Select 5
- Sleep 1
- Auswahl.Select sBookmark
- Sleep 1
- Formatliste.Select 5
- Sleep 1
- Einfuegen.Click
- TabReferenzen.Close
-
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift Home>"
-
- if fGetFieldContent() <> sTestSytle then
- Warnlog "Should get " & sTestSytle & " but get " & fGetFieldContent()
- end if
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc
deleted file mode 100644
index 459e91da7912..000000000000
--- a/testautomation/writer/optional/includes/fields/w_fields4.inc
+++ /dev/null
@@ -1,967 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Doc Information Test
-'*
-'\***********************************************************************
-
-sub w_fields4
-
- Call tDocInformationTitle
- Call tDocInformationSubject
- Call tDocInformationKeywords
- Call tDocInformationDescription
- Call tDocInformationUserDefined
- Call tDocInformationCreated
- Call tDocInformationModified
- Call tDocInformationModifiedSavefile
- Call tDocInformationPrinted
- Call tDocInformationRevisionnumber
- Call tDocInformationTotaleditingtime
-
-end sub
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationTitle
-
- Dim sTitle as String
- Dim sTestFile as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sTitle = "Title Test"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sVarResult = sTitle
- sFixResult = "This is the title"
-
- printlog "Doc Information - Title"
- '/// <b> Doc Information - Title </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// File / Properties / Description , input some
- '/// + new text in Title
- Call fFileProperties("TabBeschreibung")
- Titel.Settext sTitle
- TabBeschreibung.OK
-
- '/// Check if the title is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Title")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult then
- Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationSubject
-
- Dim sSubject as String
- Dim sTestFile as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sSubject = "Subject Test"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sVarResult = sSubject
- sFixResult = "This is the subject"
-
- printlog "Doc Information - Subject"
- '/// <b> Doc Information - Subject </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// File / Properties / Description , input some
- '/// + text in Subject
- Call fFileProperties("TabBeschreibung")
- Thema.Settext sSubject
- TabBeschreibung.OK
-
- '/// Check if the Subject is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Subject")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult then
- Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationKeywords
-
- Dim sKeywords as String
- Dim sTestFile as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sKeywords = "Keywords Test"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sVarResult = sKeywords
- sFixResult = "This are keywords"
-
- printlog "Doc Information - Keywords"
- '/// <b> Doc Information - Keywords </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// File / Properties / Description , input some
- '/// + text in Keywords
- Call fFileProperties("TabBeschreibung")
- Schluesselwoerter.Settext sKeywords
- TabBeschreibung.OK
-
- '/// Check if the Keywords is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Keywords")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult then
- Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationDescription
-
- Dim sDescription as String
- Dim sTestFile as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sDescription = "Description Test"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sVarResult = sDescription
- sFixResult = "This is the description"
-
- printlog "Doc Information - Description"
- '/// <b> Doc Information - Description </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// File / Properties / Description , input some
- '/// + text in Description
- Call fFileProperties("TabBeschreibung")
- Beschreibung.Settext sDescription
- Schluesselwoerter.Gettext '<--This command is useless , but important ! :-)
- TabBeschreibung.OK
-
- '/// Check if the Description is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Description")
-
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Down>" , 4
- Call wTypeKeys "<Right>" , 2
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult then
- Warnlog "Due to i31893 , should get " & sVarResult & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationUserDefined
- Warnlog "#i95523#Tabpage 'Custom properties' has no declaration"
- goto endsub
- Dim sTestFile as String
- Dim sVarResult() as String
- Dim sFixResult() as String
- Dim i as integer
- Dim j as Integer
-
- j = UBound(sVarResult)
- sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
- sVarResult = Array( _
- "A1" , _
- "B2" , _
- "C3" , _
- "D4" , _
- )
-
- sFixResult = Array( _
- "Lennon" , _
- "McCartney" , _
- "Harrison" , _
- "Star" , _
- )
-
- printlog "Doc Information - User Defined"
-
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
- '/// File / Properties / Description , input some
- '/// + text in Description
- Call fFileProperties("TabDokument")
- Info0.Settext sVarResult(0)
- Info1.Settext sVarResult(1)
- Info2.Settext sVarResult(2)
- Info3.Settext sVarResult(3)
- TabBenutzer.OK
-
- '/// Check if the User defined is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Info fields")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i= 0 to UBound(sVarResult)
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationCreated
-
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- dim sTestFile as string
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "07/20/2000"
- sFixResult(2) = "11:41:21"
-
- printlog "Doc Information - Created"
- '/// <b> Doc Information - Created </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
-
- Call fFindWord ("Created")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author :Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// File / Properties / General , check "Apply user
- '/// + data" , click "delete" button
- Call fFileProperties("TabDokument")
- BenutzerdatenVerwenden.Check
- Sleep 1
- Loeschen.Click
- Sleep 1
- TabDokument.OK
-
- '/// Check if the Created field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Created")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationModified
-
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
- sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/18/2000"
- sFixResult(2) = "11:40:11"
-
- printlog "Doc Information - Modified"
- '/// <b> Doc Information - Modified </b>
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
- Call hFileSaveAsKill (sSaveAsFile)
-
- Call fFindWord ("Modified")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// File / Properties / General , check "Apply user
- '/// + data" , click "delete" button
- Call fFileProperties("TabDokument")
- BenutzerdatenVerwenden.Check
- Sleep 1
- Loeschen.Click
- Sleep 1
- TabDokument.OK
-
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the Modified field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Modified")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationModifiedSavefile
- QaErrorLog "#i102792# - tDocInformationModifiedSavefile outcommented due to issue."
- goto endsub
-
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
- sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/18/2000"
- sFixResult(2) = "11:40:11"
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Modified (save file)"
- '/// <b> Doc Information - Modified (save file)</b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
- Call fFindWord ("Modified")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Check if the Modified field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Modified")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- QAErrorlog "#i41327# Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- QAErrorlog "#i41327# Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationPrinted
-
- Dim sTestFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/11/2004"
- sFixResult(2) = "11:46:06"
-
- printlog "Doc Information - Printed"
- '/// <b> Doc Information - Printed </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
- Call fFindWord ("Last printed")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Call wTypeKeys "<Shift Right>"
- Sleep 1
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Print file
- FilePrint
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer! The testcase isn't tested !"
- Kontext "Printing"
- Sleep 1
- Printing.Cancel
- goto NoTest
- end if
- else
- Kontext "Printing"
- Sleep 1
- Printing.OK
- kontext "active"
- if active.exists(5) then
- QaErrorLog "Error Printing..."
- Active.ok
- end if
- end if
-
- '/// Check if the Printed field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Last printed")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should NOT get " & sFixResult(2)
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- NoTest:
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationRevisionnumber
-
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sVarResult = "17" : sFixResult = "4"
-
- sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
- sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Revision number"
- '/// <b> Doc Information - Revision number</b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Press F9
- Call wTypeKeys "<F9>"
-
- '/// Save the file
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the Revision number field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Version")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult then
- Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tDocInformationTotaleditingtime
-
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sFixResult = "00:29:05"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Tatal editing time"
- '/// <b> Doc Information - Tatal editing time </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- hFileOpenLocally( sTestFile )
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Press F9
- Call wTypeKeys "<F9>"
-
- Call fFindWord ("Accessed")
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult = fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Save the file
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the tatal editing time field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Accessed")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult then
- Warnlog "Should NOT get " & sVarResult
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/fields/w_fields5.inc b/testautomation/writer/optional/includes/fields/w_fields5.inc
deleted file mode 100644
index 6ff7f2c1701d..000000000000
--- a/testautomation/writer/optional/includes/fields/w_fields5.inc
+++ /dev/null
@@ -1,839 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Fields - Variables
-'*
-'\***********************************************************************
-
-sub w_fields5
-
- Call tVariablesSetValueToText
- Call tVariablesSetValueToNumber
- Call tVariablesSetFormats
- Call tVariablesShowVariable1
- Call tVariablesShowVariable2
- Call tVariablesInsertFormula
- Call tVariablesNumberRange
- Call tVariablesInputfield
- Call tVariablesUserfield
- Call tVariablesDDEFieldManual
- Call tVariablesDDEFieldAutomatic
-
-end sub
-
-'-----------------------------------------------------------------
-
-testcase tVariablesSetValueToText
- if bAsianLan = true then
- QaErrorLog "No testing with Asian language. Aborting."
- exit sub
- end if
-
- Dim sName() as String
- Dim sValue as String
- Dim sResult() as String
- Dim i as Integer
- Dim j as Integer
-
- sValue = "This is a test!"
-
- sName = Array( _
- "myTest1" , _
- "myTest2" , _
- "myTest3" , _
- "myTest4" , _
- "myTest5" , _
- "myTest6" , _
- )
- sResult = Array( _
- "This is a test!" , _
- "1" , _
- "1" , _
- "1" & gSeperator & "00" , _
- "1" , _
- "1" & gSeperator & "00" , _
- )
- j = UBound(sResult)
-
- printlog "Set value to text"
- '/// <b> Set value to text </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set Name and Value(text) , then choose Text , General ,
- '/// + -1234 , -1234.12 , -1,234 , -1,234,12 separately
- Call fInsertFieldsOther("TabVariablen")
- for i = 0 to j
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName(i)
- Wert.SetText sValue
- Zahlenformat.Select i+1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<Return>"
- Kontext "TabVariablen"
- next i
- Kontext "TabVariablen"
- TabVariablen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
-
- for i = 0 to j
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sResult(i) then
- Warnlog i & "Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesSetValueToNumber
- if bAsianLan = true then
- QaErrorLog "No testing with Asian language. Aborting."
- exit sub
- end if
-
- Dim sName() as String
- Dim sValue as String
- Dim sResult() as String
- Dim i as Integer
- Dim j as Integer
-
- sValue = "1234,567"
-
- sName = Array( _
- "myTest1" , _
- "myTest2" , _
- "myTest3" , _
- "myTest4" , _
- "myTest5" , _
- "myTest6" , _
- )
- sResult = Array( _
- "1234,567" , _
- "1234,57" , _
- "1235" , _
- "1234,57" , _
- "1.235" , _
- "1.234,57" , _
- )
- j = UBound(sResult)
-
- printlog "Set value to number"
- '/// <b> Set value to number </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set Name and Value(number) , then choose Text , General ,
- '/// + -1234 , -1234.12 , -1,234 , -1,234,12 separately
- Call fInsertFieldsOther("TabVariablen")
- for i = 0 to j
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName(i)
- Wert.SetText sValue
- Zahlenformat.Select i+1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<Return>"
- Kontext "TabVariablen"
- next i
- Kontext "TabVariablen"
- TabVariablen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
-
- for i = 0 to j
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sResult(i) then
- Warnlog i & "Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesSetFormats
-
- Dim sName as String
- Dim sValue as String
- Dim iFormat() as Integer
- Dim sResult() as String
- Dim i as Integer
- Dim j as Integer
- Dim mUnit as String
-
- sName = "myTest"
- sValue = "1234.567"
-
- iFormat = Array( 8, 10 , 52 , 55 , 56)
- sResult = Array( _
- "123456.70%" , _
- "$1,234.57" , _
- "1.23E+003" , _
- "1234 55/97" , _
- "TRUE" , _
- )
- j = UBound(sResult)
-
- printlog "Set format as 'Additional formats...'"
- '/// <b> Set format as 'Additional formats...' </b>
-
- Call hNewDocument
- CALL GetLanguageText (01)
- mUnit = fSetMeasurementToCM() ' Set measurement unit to cm
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set Name and Value(number) , then choose format as 'Additional formats...'
- '/// In the number format dialog , select 'All' in Category
- '/// + Select some different formats ...
- Call fInsertFieldsOther("TabVariablen")
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName
- Wert.SetText sValue
-
- for i = 0 to j
- Zahlenformat.Select Zahlenformat.GetItemCount
- Sleep 3
- Kontext "Zahlenformat"
- Sprache.Select fGetLanguageName(01)
- Sleep 2
- Kategorie.Select 1
- Sleep 1
- KategorieFormat.Select iFormat(i)
- Sleep 1
- Zahlenformat.OK
-
- Kontext "TabVariablen"
- Einfuegen.Click
- Call wTypeKeys "<Shift Left>"
- sleep 1
- if fGetFieldContent() <> sResult(i) then
- Warnlog i & ": Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- Kontext "TabVariablen"
- next i
- TabVariablen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesShowVariable1
-
- Dim sName() as String
- Dim sResult() as String
- Dim i as Integer
- Dim j as Integer
-
- sName = Array( _
- "myTest1" , _
- "myTest2" , _
- "myTest3" , _
- )
- sResult = Array( _
- "1" , _
- "10" , _
- "100" , _
- )
- j = UBound(sResult)
-
- printlog "Show Variable - 1"
- '/// <b> Show Variable - 2</b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set Name and Value , then choose General , add 3 variables
- '/// + then select Show Variable , insert 3 variables
- Call fInsertFieldsOther("TabVariablen")
- for i = 0 to j
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName(i)
- Wert.SetText sResult(i)
- Zahlenformat.Select 2
- Einfuegen.Click
- sleep 1
- next i
- for i = 0 to j
- Call wTypeKeys "<Return>"
- Kontext "TabVariablen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select i+1
- Einfuegen.Click
- sleep 1
- next i
- TabVariablen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
-
- for i = 0 to j
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sResult(i) then
- Warnlog "Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- next i
-
- '/// Delete the 1st line
- Call wTypeKeys "<MOD1 Home><Shift End><Delete>"
-
- Call wTypeKeys "<MOD1 Home>"
-
- for i = 0 to j
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> "0" then
- Warnlog i & "Should get 0 but get " & fGetFieldContent()
- end if
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesShowVariable2
-
- Dim sName as String
- Dim sValue as String
- Dim sResult() as String
- Dim i as Integer
- Dim j as Integer
-
- sResult = Array( _
- "100" , _
- "100" , _
- "200" , _
- "200" , _
- )
- j = UBound(sResult)
-
- sName = "myTest"
-
- printlog "Show Variable - 2"
- '/// <b> Show Variable - 2 </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set Name and Value , then choose General , insert a variable
- Call fInsertFieldsOther("TabVariablen")
- sValue = "100"
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName
- Wert.SetText sValue
- Zahlenformat.Select 2
- Einfuegen.Click
-
- '/// Then select Show Variable , insert this variable
- Call wTypeKeys "<Return>"
- Kontext "TabVariablen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select 1
- Einfuegen.Click
-
- '/// Insert a same name variable again , but set to another number
- Call wTypeKeys "<Return>"
- sValue = "200"
- Kontext "TabVariablen"
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName
- Wert.SetText sValue
- Zahlenformat.Select 2
- Einfuegen.Click
-
- '/// Then select Show Variable , insert this variable again
- Call wTypeKeys "<Return>"
- Kontext "TabVariablen"
- Feldtyp.Select 2
- Sleep 1
- Auswahl.Select 1
- Einfuegen.Click
- TabVariablen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<F9><MOD1 Home>"
-
- for i = 0 to j
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sResult(i) then
- Warnlog i & "Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesInsertFormula
-
- Dim sName() as String
- Dim sValue() as String
- Dim sResult as String
- Dim i as Integer
- Dim j as Integer
-
- sName = Array( _
- "myTest1" , _
- "myTest2" , _
- )
- sValue = Array( _
- "10" , _
- "100" , _
- )
- sResult = "110"
- j = UBound(sName)
-
- printlog "Insert formula"
- '/// <b> Insert formula </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" , add 2 variables - A and B
- Call fInsertFieldsOther("TabVariablen")
- for i = 0 to j
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName(i)
- Wert.SetText sValue(i)
- Zahlenformat.Select 2
- Einfuegen.Click
- sleep 1
- next i
-
- '/// Then select 'Insert formula' , A+B
- Call wTypeKeys "<Return>"
- Kontext "TabVariablen"
- Feldtyp.Select 4
- Wert.SetText (sName(0) & "+" & sName(1))
- Einfuegen.Click
- TabVariablen.Close
-
- Call wTypeKeys "<Shift Left>"
- if fGetFieldContent() <> sResult then
- Warnlog "Should get " & sResult & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesNumberRange
-
- Dim sResult() as String
- Dim i as Integer
- Dim x as Integer
-
- printlog "Number range"
- '/// <b> Number range </b>
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert/Fields/Other/Variables / Select "Number range" , insert 4 numbers for
- '/// + Table , text , drawing and illustration
- Call fInsertFieldsOther("TabVariablen")
- for i = 1 to 4
- Feldtyp.Select 6
- Sleep 1
- Auswahl.Select i
- Einfuegen.Click
- Call wTypeKeys "<Return>"
- Kontext "TabVariablen"
- sleep 1
- next i
-
- '/// Then insert Table , text , drawing and illustration separately
- '/// + Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Kontext "TabVariablen"
-
- for i = 1 to 4
- Feldtyp.Select 6
- Sleep 1
- Auswahl.Select i
- Einfuegen.Click
- Sleep 2
- Call wTypeKeys "<Home>"
- sResult = Array("1" , "1" , "1" , "1" , "1")
- sResult(i) = "2"
- for x = 0 to 4
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sResult(x) then
- Warnlog "Should get " & sResult(x) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next x
- Call wTypeKeys "<MOD1 Home><Shift End><Delete>"
- sleep 1
- Kontext "TabVariablen"
- next i
- TabVariablen.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesInputfield
-
- Dim sName as String
- Dim sValue as String
- Dim sReference as String
- Dim sFieldContent as String
-
- sName = "myTest" : sValue = "100"
- sReference = "NewTest"
- sFieldContent = "10000"
-
- printlog "Input field"
- '/// <b> Input field </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" , add 1 variable - A
- Call fInsertFieldsOther("TabVariablen")
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName
- Wert.SetText sValue
- Zahlenformat.Select 2
- Einfuegen.Click
- Call wTypeKeys "<Return>"
- Sleep 1
-
- '/// Select "Input field" , set reference , press insert ,
- '/// + a dialog should pop up , insert field content
- '/// + Table , text , drawing and illustration
- Kontext "TabVariablen"
- Feldtyp.Select 5
- Wert.SetText sReference
- Einfuegen.Click
- Kontext "Eingabefeld"
- if Titel.GetText <> sReference then
- Warnlog "Reference should be " & sReference & " but get " & Titel.GetText
- end if
- EingabeText.SetText sFieldContent
- Eingabefeld.OK
-
- Kontext "TabVariablen"
- TabVariablen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sValue then
- Warnlog "Should get " & sValue & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFieldContent then
- Warnlog "Should get " & sFieldContent & " but get " & fGetFieldContent()
- end if
-
- '/// Delete variable A in the document , Check if the insertion is still correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right><Delete>"
-
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFieldContent then
- Warnlog "2-Should get " & sFieldContent & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesUserfield
-
- Dim sName() as String
- Dim sValue() as String
- Dim sResult1() as String
- Dim sResult2() as String
- Dim i as Integer
- Dim j as Integer
-
- sName = Array("U1" , "UserField" , "U2")
- sValue = Array("UserField - 10" , "100" , "UserField + 10")
- sResult1 = Array("-10" , "100" , "110")
- sResult2 = Array("90" , "100" , "110")
- j = UBound(sResult1)
-
- printlog "User field"
- '/// <b> User field </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "User Field"
- Call fInsertFieldsOther("TabVariablen")
- for i = 0 to j
- Feldtyp.Select 9
- Sleep 1
- NameText.SetText sName(i)
- Wert.SetText sValue(i)
- Zahlenformat.Select 3
- Einfuegen.Click
- Sleep 2
- Call wTypeKeys "<Shift Left>"
- if fGetFieldContent() <> sResult1(i) then
- Warnlog "Should get " & sResult1(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Return>"
- sleep 1
- Kontext "TabVariablen"
- next i
- TabVariablen.Close
-
- '/// Check if the result is OK.
- Call wTypeKeys "<F9>"
- Call wTypeKeys "<MOD1 Home>"
- Sleep 1
- for i = 0 to j
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sResult2(i) then
- Warnlog "Should get " & sResult2(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Left>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesDDEFieldManual
- qaerrorlog "#i112079#testcase must be reworked"
- goto endsub
-
- Dim sDDEFile as String
- Dim sContent as String
- Dim sName as String
- Dim sDDEStatement as String
- Dim sSectionName as String
-
- sDDEFile = Convertpath ( gOfficePath + "\user\work\dde_test.odt")
- sContent = "DDE"
- sName = "myTest"
- sSectionName = "Section1"
- sDDEStatement = "soffice " & sDDEFile & " " & sSectionName
-
- printlog "DDE field - manual"
- '/// <b> DDE field - manual </b>
-
- if FileExists ( sDDEFile ) then app.kill ( sDDEFile )
-
- Call hNewDocument
-
- '/// Input something , insert a section , then save it and close the file
- Call wTypeKeys sContent
- Call wTypeKeys "<Shift Home>"
- Call fInsertSection("TabBereiche")
- Bereichsliste.Settext sSectionName
- TabBereiche.OK
- Sleep 1
- Call hFileSaveAsKill(sDDEFile)
- Call hCloseDocument
-
- '/// Opan a new document
- Call hNewDocument
- '/// Insert/Fields/Other/Variables / Select "DDE Field"
- '/// Set DDE name and DDE statement , select "DDE manual"
- Call fInsertFieldsOther("TabVariablen")
- Feldtyp.Select 3
- Sleep 1
- NameText.SetText sName
- Wert.SetText sDDEStatement
- Formatliste.Select 1
- Einfuegen.Click
- Sleep 2
- TabVariablen.Close
- Sleep 2
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> sContent then
- Warnlog "Should get " & sContent & " but get " & fGetFieldContent()
- end if
-
- '/// Open the test file which you just closed , add something ,
- '/// Save the file
- hFileOpenLocally( sDDEFile)
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "XYZ"
- FileSave
- Call hCloseDocument
-
- '/// Check if the content is changed -- Should NOT
- Sleep 2
- Call wTypeKeys "<F9>"
- Call wTypeKeys "<MOD1 Home><Shift End>"
- if fGetFieldContent() <> sContent then
- Warnlog "Should get " & sContent & " but get " & fGetFieldContent()
- end if
-
- '/// Edit/Fields , press update button
- EditFields
- Kontext "VerknuepfungenBearbeiten"
- Aktualisieren.Click
- VerknuepfungenBearbeiten.Close
-
- '/// Check if the content is changed -- Should NOT
- Sleep 1
- Call wTypeKeys "<F9>"
- Call wTypeKeys "<MOD1 Home><Shift End>"
- if fGetFieldContent() <> ("XYZ" & sContent) then
- Warnlog "Should get XYZ" & sContent & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
- if FileExists( sDDEFile ) then app.kill ( sDDEFile )
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tVariablesDDEFieldAutomatic
- qaerrorlog "#i112079#testcase must be reworked"
- goto endsub
-
- qaerrorlog "#i102792# - tVariablesDDEFieldAutomatic outcommented. Fields not updated."
- goto endsub
-
- Dim sDDEFile as String
- Dim sContent as String
- Dim sName as String
- Dim sDDEStatement as String
- Dim sSectionName as String
-
- sDDEFile = Convertpath ( gNetzOfficePath + "dde_test.oxt")
- sContent = "DDE"
- sName = "myTest"
- sSectionName = "Section1"
- sDDEStatement = "soffice " & sDDEFile & " " & sSectionName
-
- printlog "DDE field - automatic"
- '/// <b> DDE field - automatic </b>
-
- if FileExists ( sDDEFile ) then app.kill ( sDDEFile )
-
- Call hNewDocument
-
- '/// Input something , insert a section , then save it and close the file
- Call wTypeKeys sContent
- Call wTypeKeys "<Shift Home>"
- Call fInsertSection("TabBereiche")
- Bereichsliste.Settext sSectionName
- TabBereiche.OK
- Sleep 1
- Call hFileSaveAsKill(sDDEFile)
- Call hCloseDocument
-
- '/// Opan a new document
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "DDE Field"
- '/// Set DDE name and DDE statement , select "DDE automatic"
- Call fInsertFieldsOther("TabVariablen")
- Feldtyp.Select 3
- Sleep 1
- NameText.SetText sName
- Wert.SetText sDDEStatement
- Formatliste.Select 2
- Einfuegen.Click
- Sleep 2
- TabVariablen.Close
- Sleep 2
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- if fGetFieldContent() <> sContent then
- Warnlog "Should get " & sContent & " but get " & fGetFieldContent()
- end if
-
- '/// Open the test file which you just closed , add something ,
- '/// Save the file
- hFileOpenLocally( sDDEFile)
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "XYZ"
- FileSave
- Call hCloseDocument
-
- '/// Check if the content is changed -- Should
- Sleep 2
- Call wTypeKeys "<F9>"
- Call wTypeKeys "<MOD1 Home><Shift End>"
- if fGetFieldContent() <> ("XYZ" & sContent) then
- Warnlog "Should get XYZ" & sContent & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
- if FileExists ( sDDEFile ) then app.kill ( sDDEFile )
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/fields/w_fields6.inc b/testautomation/writer/optional/includes/fields/w_fields6.inc
deleted file mode 100644
index f29eff451edb..000000000000
--- a/testautomation/writer/optional/includes/fields/w_fields6.inc
+++ /dev/null
@@ -1,830 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Fields - Functions
-'*
-'\***********************************************************************
-
-sub w_fields6
-
- Call tFunctionsConditionalText
- Call tFunctionsHiddenText
- Call tFunctionsHiddenParagraph
- Call tFunctionsInputField
- Call tFunctionsPlaceholderText
- Call tFunctionsPlaceholderTable
- Call tFunctionsPlaceholderFrame
- Call tFunctionsPlaceholderGraphics
- Call tFunctionsPlaceholderObject
- Call tFunctionsInputlistRemove
- Call tFunctionsInputlistMoveUp
- Call tFunctionsInputlistMoveDown
- Call tFunctionsCombineCharacter
-
-end sub
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsConditionalText
-
- Dim sName as String
- Dim sValue() as String
- Dim sCondition as String
- Dim sElse as String
- Dim sThen as String
- Dim sResult() as String
- Dim iType as Integer
- Dim i as Integer
- Dim j as Integer
-
- sName = "X"
- SCondition = "X==" + Chr(34) + "Sun" + Chr(34)
- SThen = "Yes"
- sElse = "No"
-
- sValue = Array( _
- "Sun" , _
- "NOTSun" , _
- )
- sResult = Array( _
- "Sun" , _
- "Yes" , _
- "NOTSun" , _
- "No" , _
- )
-
- printlog "Conditional text"
- '/// <b> Conditional text </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set 1 Name and set its Value to "Sun" , then goto tabpage function
- '/// + choose "Conditional text" , set condition like
- '/// if X="Sun" then "YES" else "NO"
- '/// Set another value to "NoSun"
- j = UBound(sValue)
- for i = 0 to j
- Call fInsertFieldsOther("TabVariablen")
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName
- Wert.SetText sValue(i)
- Zahlenformat.Select 1
- Einfuegen.Click
- TabVariablen.Close
- Call wTypeKeys "<Return>"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 1
- Sleep 1
- Bedingung.SetText sCondition
- Dann.SetText sThen
- Sonst.SetText sElse
- Einfuegen.Click
- TabFunktionen.Close
- Call wTypeKeys "<Return>"
- next i
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- j = UBound(sResult)
- for i = 0 to j
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sResult(i) then
- Warnlog "Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsHiddenText
-
- Dim sName as String
- Dim sValue() as String
- Dim sCondition as String
- Dim sHiddenText as String
- Dim sResult() as String
- Dim bHiddenText as Boolean
- Dim i as Integer
- Dim j as Integer
-
- sName = "X"
- SCondition = "X==" + Chr(34) + "ABC" + Chr(34)
- sHiddenText = "HiddenText"
-
- sValue = Array( _
- "ABC" , _
- "NOTABC" , _
- )
- sResult = Array( _
- "" , _
- "HiddenText" , _
- )
-
- printlog "Hidden text"
- '/// <b> Hidden text </b>
-
- Call hNewDocument
-
- '/// Tools/Options / StarOffice writer / Formatting Aids
- '/// Uncheck 'Fields : Hidden text"
- ToolsOptions
- Call hToolsOptions("WRITER","FORMATTINGAIDS")
- bHiddenText = FeldVersteckterText.IsChecked
- if bHiddenText = TRUE then
- FeldVersteckterText.UnCheck
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set Name and set its Value to "ABC" , then goto tabpage function
- '/// + choose "hidden text" , set condition like
- '/// if X="ABC" as condition , hidden text is "HiddenText"
- '/// Set another value to "NoTABC"
- '/// Check if the insertion is correct
- j = UBound(sValue)
- for i = 0 to j
- Call wTypeKeys "<MOD1 Home><Shift End>"
- Call fInsertFieldsOther("TabVariablen")
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName
- Wert.SetText sValue(i)
- Zahlenformat.Select 1
- Einfuegen.Click
- TabVariablen.Close
- Call wTypeKeys "<Return>"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 7 'Hidden text
- Sleep 1
- Bedingung.SetText sCondition
- Hinweis.SetText sHiddenText
- Einfuegen.Click
- TabFunktionen.Close
-
- Call wTypeKeys "<Shift Left>"
- if fGetFieldContent() <> sResult(i) then
- Warnlog "Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- next i
-
- 'Recover to default
- ToolsOptions
- Call hToolsOptions("WRITER","FORMATTINGAIDS")
- if bHiddenText = TRUE then FeldVersteckterText.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsHiddenParagraph
-
- Dim sName as String
- Dim sValue() as String
- Dim sCondition as String
- Dim sHiddenText as String
- Dim sResult() as String
- Dim bHiddenText as Boolean
- Dim i as Integer
- Dim j as Integer
-
- sName = "X"
- SCondition = "X==" + Chr(34) + "ABC" + Chr(34)
- sHiddenText = "HiddenText"
-
- sValue = Array( _
- "ABC" , _
- "NOTABC" , _
- )
- sResult = Array( _
- "ABC" , _
- "HiddenText" , _
- )
-
- printlog "Hidden paragraph"
- '/// <b> Hidden paragraph </b>
-
- Call hNewDocument
-
- '/// Tools/Options / StarOffice writer / Formatting Aids
- '/// Uncheck 'Fields : Hidden paragraph"
- ToolsOptions
- Call hToolsOptions("WRITER","FORMATTINGAIDS")
- bHiddenText = VersteckteAbsatze.IsChecked
- if bHiddenText = TRUE then
- VersteckteAbsatze.UnCheck
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Input a paragraph first
- Call wTypeKeys "<Return>"
- Call wTypeKeys sHiddenText
- Call wTypeKeys "<Up>"
-
- '/// Insert/Fields/Other/Variables / Select "set Variable" ,
- '/// Set Name and set its Value to "ABC" , then goto tabpage function
- '/// + choose "hidden paragraph" , set condition like
- '/// if X="ABC" as condition
- '/// Check if the paragraph disappear or not
- j = UBound(sValue)
- for i = 0 to j
- Call wTypeKeys "<MOD1 Home><Shift End>"
- Call fInsertFieldsOther("TabVariablen")
- Feldtyp.Select 1
- Sleep 1
- NameText.SetText sName
- Wert.SetText sValue(i)
- Zahlenformat.Select 1
- Einfuegen.Click
- TabVariablen.Close
- Call wTypeKeys "<Down><Home>"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 8 'Hidden paragraph
- Sleep 1
- Bedingung.SetText sCondition
- Einfuegen.Click
- TabFunktionen.Close
-
- Call wTypeKeys "<MOD1 Home><Down><Shift End>"
- if fGetFieldContent() <> sResult(i) then
- Warnlog "Should get " & sResult(i) & " but get " & fGetFieldContent()
- end if
- next i
-
- 'Recover to default
- ToolsOptions
- Call hToolsOptions("WRITER","FORMATTINGAIDS")
- if bHiddenText = TRUE then VersteckteAbsatze.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsInputField
-
- Dim sReference as String
- Dim sFieldContent as String
-
- sReference = "NewTest"
- sFieldContent = "10000"
-
- printlog "Input field"
- '/// <b> Input field </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Functions / Select "Input field" ,
- '/// + set reference , press insert button , input field content
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 3 'Input field
- Sleep 1
- Hinweis.SetText sReference
- Einfuegen.Click
- Kontext "Eingabefeld"
- if Titel.GetText <> sReference then
- Warnlog "Reference should be " & sReference & " but get " & Titel.GetText
- end if
- EingabeText.SetText sFieldContent
- Eingabefeld.OK
-
- Kontext "TabFunktionen"
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFieldContent then
- Warnlog "Should get " & sFieldContent & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsPlaceholderText
-
- Dim sPlaceHolder as String
-
- sPlaceHolder = "Text"
-
- printlog "Placeholder - Text"
- '/// <b> Placeholder - Text </b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Functions / Select "Placeholder" ,
- '/// + select Text
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 5 'Placeholder
- Sleep 1
- Formatliste.Select 1
- Platzhalter.SetText sPlaceHolder
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> ("<" & sPlaceHolder & ">" )then
- Warnlog "Should get <" & sPlaceHolder & "> but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsPlaceholderTable
-
- printlog "Placeholder - Table"
- '/// <b> Placeholder - Table </b>
-
- Call hNewDocument
-
- Call fFormatPageWriter("TabSeite")
- Breite.SetText "15"
- Hoehe.SetText "15"
- Links.SetText "0"
- Rechts.SetText "0"
- Oben.SetText "0"
- Unten.SetText "0"
- TabSeite.OK
- Sleep 2
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then ' is it a messagebox ?
- Active.Yes
- else
- Warnlog "Messagebox is not up "
- end if
- else
- Warnlog "Something wrong !"
- end if
-
- '/// Insert/Fields/Other/Functions / Select "Placeholder" ,
- '/// + select Table
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 5 'Placeholder
- Sleep 1
- Formatliste.Select 2
- Platzhalter.SetText "TableTableTableTableTable"
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> ("<TableTableTableTableTable>" )then
- Warnlog "Should get <TableTableTableTableTable> but get " & fGetFieldContent()
- end if
-
- Call fSetToBigSize()
- Call wTypeKeys "<MOD1 Home>"
- Sleep 1
-
- Call gMouseMove(0,0,30,25)
- Call gMouseClick(30,25)
- Sleep 3
-
- Kontext "TabelleEinfuegenWriter"
- if TabelleEinfuegenWriter.Exists then
- TabelleEinfuegenWriter.Cancel
- else
- Warnlog "Insert table dialog isn't up !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsPlaceholderFrame
-
- printlog "Placeholder - Frame"
- '/// <b> Placeholder - Frame </b>
-
- Call hNewDocument
-
- fFormatPageWriter("TabSeite")
- Breite.SetText "15"
- Hoehe.SetText "15"
- Links.SetText "0"
- Rechts.SetText "0"
- Oben.SetText "0"
- Unten.SetText "0"
- TabSeite.OK
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then ' is it a messagebox ?
- Active.Yes
- else
- Warnlog "Messagebox is not up "
- end if
- else
- Warnlog "Something wrong !"
- end if
-
- '/// Insert/Fields/Other/Functions / Select "Placeholder" ,
- '/// + select Frame
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 5 'Placeholder
- Sleep 1
- Formatliste.Select 3
- Platzhalter.SetText "FrameFrameFrameFrameFrameFrame"
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> ("<FrameFrameFrameFrameFrameFrame>" )then
- Warnlog "Should get <FrameFrameFrameFrameFrameFrame> but get " & fGetFieldContent()
- end if
-
- Call fSetToBigSize()
- Call wTypeKeys "<MOD1 Home>"
- Sleep 1
- Call gMouseMove(0,0,30,25)
- Call gMouseClick(30,25)
- Sleep 3
-
- try
- Kontext
- Active.SetPage TabType
- Kontext "TabType"
- AutoHoehe.UnCheck
- TabType.Cancel
- catch
- Warnlog "Format/Frame dialog isn't up !"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsPlaceholderGraphics
-
- printlog "Placeholder - Graphics"
- '/// <b> Placeholder - Graphics </b>
-
- Call hNewDocument
-
- fFormatPageWriter("TabSeite")
- Breite.SetText "15"
- Hoehe.SetText "15"
- Links.SetText "0"
- Rechts.SetText "0"
- Oben.SetText "0"
- Unten.SetText "0"
-
- TabSeite.OK
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then ' is it a messagebox ?
- Active.Yes
- else
- Warnlog "Messagebox is not up "
- end if
- else
- Warnlog "Something wrong !"
- end if
-
- '/// Insert/Fields/Other/Functions / Select "Placeholder" ,
- '/// + select Graphics
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 5 'Placeholder
- Sleep 1
- Formatliste.Select 4
- Platzhalter.SetText "GraphicsGraphicsGraphicsGraphicsGraphics"
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> ("<GraphicsGraphicsGraphicsGraphicsGraphics>" )then
- Warnlog "Should get <GraphicsGraphicsGraphicsGraphicsGraphics> but get " & fGetFieldContent()
- end if
-
- Call fSetToBigSize()
- Call wTypeKeys "<MOD1 Home>"
- Sleep 1
- Call gMouseMove(0,0,30,25)
- Call gMouseClick(30,25)
- Sleep 3
-
- try
- Kontext "GrafikEinfuegenDlg"
- Oeffnen.Click
- GrafikEinfuegenDlg.Cancel
- catch
- Warnlog "Insert picture dialog isn't up !"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsPlaceholderObject
-
- printlog "Placeholder - Object"
- '/// <b> Placeholder - Object </b>
-
- Call hNewDocument
-
- fFormatPageWriter("TabSeite")
- Breite.SetText "15"
- Hoehe.SetText "15"
- Links.SetText "0"
- Rechts.SetText "0"
- Oben.SetText "0"
- Unten.SetText "0"
- TabSeite.OK
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then ' is it a messagebox ?
- Active.Yes
- else
- Warnlog "Messagebox is not up "
- end if
- else
- Warnlog "Something wrong !"
- end if
-
- '/// Insert/Fields/Other/Functions / Select "Placeholder" ,
- '/// + select object
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 5 'Placeholder
- Sleep 1
- Formatliste.Select 5
- Platzhalter.SetText "ObjectObjectObjectObjectObjectObject"
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> ("<ObjectObjectObjectObjectObjectObject>" )then
- Warnlog "Should get <ObjectObjectObjectObjectObjectObject> but get " & fGetFieldContent()
- end if
-
- Call fSetToBigSize()
- Call wTypeKeys "<MOD1 Home>"
- Sleep 1
- Call gMouseMove(0,0,30,25)
- Call gMouseClick(30,25)
- Sleep 3
-
- try
- Kontext "OLEObjektEinfuegen"
- NeuErstellen.Check
- OLEObjektEinfuegen.Cancel
- catch
- Warnlog "Insert OLE Object dialog isn't up !"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsInputlistRemove
-
- Dim sItem1 as String
- Dim sItem2 as String
-
- sItem1 = "First" : sItem2 = "Second"
-
- printlog "Input list - Remove"
- '/// <b> Input list Remove</b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Functions / Select "Input list" ,
- '/// + insert 2 itmes , remove 1st one
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 2 'Input list
- Sleep 1
- NewListEntry.SetText sItem1
- AddListEntry.Click
- NewListEntry.SetText sItem2
- AddListEntry.Click
- Sleep 1
- Einfuegen.Click
- Call wTypeKeys "<Return>"
- Kontext "TabFunktionen"
- EntrysList.Select 1
- RemoveEntry.Click
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sItem1 then
- Warnlog "Should get " & sItem1 & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sItem2 then
- Warnlog "Should get " & sItem2 & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsInputlistMoveUp
-
- Dim sItem1 as String
- Dim sItem2 as String
-
- sItem1 = "First" : sItem2 = "Second"
-
- printlog "Input list - Move up"
- '/// <b> Input list Move up</b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Functions / Select "Input list" ,
- '/// + insert 2 itmes , press move up
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 2 'Input list
- Sleep 1
- NewListEntry.SetText sItem1
- AddListEntry.Click
- NewListEntry.SetText sItem2
- AddListEntry.Click
- Sleep 1
- Einfuegen.Click
- Call wTypeKeys "<Return>"
- Kontext "TabFunktionen"
- MoveUpEntry.Click
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sItem1 then
- Warnlog "Should get " & sItem1 & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sItem2 then
- Warnlog "Should get " & sItem2 & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsInputlistMoveDown
-
- Dim sItem1 as String
- Dim sItem2 as String
-
- sItem1 = "First" : sItem2 = "Second"
-
- printlog "Input list - Move down"
- '/// <b> Input list Move down</b>
-
- Call hNewDocument
-
- '/// Insert/Fields/Other/Functions / Select "Input list" ,
- '/// + insert 2 itmes , press move down
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 2 'Input list
- Sleep 1
- NewListEntry.SetText sItem1
- AddListEntry.Click
- NewListEntry.SetText sItem2
- AddListEntry.Click
- Sleep 1
- Einfuegen.Click
- Call wTypeKeys "<Return>"
- Kontext "TabFunktionen"
- EntrysList.Select 1
- MoveDownEntry.Click
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sItem1 then
- Warnlog "Should get " & sItem1 & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Down><Home>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sItem2 then
- Warnlog "Should get " & sItem2 & " but get " & fGetFieldContent()
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tFunctionsCombineCharacter
-
- Dim sCombineCharacter as String
- Dim sTestFile as String
-
- sCombineCharacter = "ABC"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\CombineTest.sxw")
-
- printlog "Combine Character"
- '/// <b> Combine Character </b>
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Right>"
-
- '/// Insert/Fields/Other/Functions / Select "Combine characters"
- Call fInsertFieldsOther("TabFunktionen")
- Feldtyp.Select 6 'Combine characters
- Sleep 1
- Namefeld.SetText sCombineCharacter
- Einfuegen.Click
- TabFunktionen.Close
-
- '/// Check if the insertion is correct
- Call wTypeKeys "<Shift Left>"
- if fGetFieldContent() <> sCombineCharacter then
- Warnlog "Should get " & sCombineCharacter & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if StrToDouble(Horizontalby.Gettext) < 6.5 OR StrToDouble(Horizontalby.Gettext) > 7.5 then
- Warnlog "Something wrong in combine character"
- end if
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/fields/w_fields7.inc b/testautomation/writer/optional/includes/fields/w_fields7.inc
deleted file mode 100644
index c5b21d00d5eb..000000000000
--- a/testautomation/writer/optional/includes/fields/w_fields7.inc
+++ /dev/null
@@ -1,400 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Fields - L10N test
-'*
-'\***********************************************************************
-
-sub w_fields7
-
- Call tL10NtestAboveBelow
- Call tL10NtestDate
- Call tL10NtestTime
-
-end sub
-
-'-----------------------------------------------------------------
-
-testcase tL10NtestAboveBelow
-
- if iSprache <> 1 then
- QaErrorLog "Currently no any other language than English. Aborting."
- exit sub
- end if
-
- Dim sTestFile as String
- Dim sAbove() as String
- Dim sBelow() as String
- Dim iCountry() as Integer
- Dim i as Integer
- Dim j as Integer
-
- Dim sUILanguage as integer, sLocale as integer
- Dim sCurrency as integer, sWestern as integer, sAsian as integer, sCTL as integer
- Dim sAsiancb as boolean, sCTLcb as boolean
- Dim sAsiancbChecked as boolean, sCTLcbChecked as boolean
-
- if iSprache <> 01 then
- QAErrorlog "This is a English-only testcase"
- end if
-
- Call hNewDocument
- ' Get current settings on language tabpage and remember
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
- sUILanguage = UILanguage.GetSelIndex
- sLocale = Gebietsschema.GetSelIndex
- sCurrency = StandardWaehrung.GetSelIndex
- sWestern = Westlich.GetSelIndex
- if Asiatisch.IsEnabled then sAsian = Asiatisch.GetSelIndex
- if LanguageComplexScript.IsEnabled then sCTL = LanguageComplexScript.GetSelIndex
- sAsiancb = Aktivieren.IsEnabled
- sCTLcb = ComplexScriptEnabled.IsEnabled
- sAsiancbChecked = Aktivieren.IsChecked
- sCTLcbChecked = ComplexScriptEnabled.IsChecked
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- Call hCloseDocument
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\AboveBelow.sxw")
-
- sBelow = Array( _
- "below" , _
- "infra" , _
- "abajo" , _
- "sotto" , _
- "ovan" , _
- "unten" , _
- "abaixo" , _
- "後述" , _
- "아래" , _
- "下é¢" , _
- "下é¢" , _
- )
- sAbove = Array( _
- "above" , _
- "supra" , _
- "arriba" , _
- "sopra" , _
- "nedan" , _
- "oben" , _
- "acima" , _
- "å‰è¿°" , _
- "위" , _
- "上é¢" , _
- "上é¢" , _
- )
- iCountry = Array ( 1 , 33 , 34 , 39 , 46 , 49 , _
- 55, 81 , 82 , 86 , 88 )
-
- printlog "L10N test - above/below"
- '/// <b> L10N test - above/below </b>
-
- Call hNewDocument
-
- '/// Open test file AboveBelow.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Check if reference above/below is changed after language is changed
-
- j = UBound(iCountry)
- for i = 0 to j
- Call wTypeKeys "<MOD1 Home>"
- fSetLocale(fGetLanguageName(iCountry(i)))
- if iCountry(i) < 80 then
- fSetWestern(fGetLanguageName(iCountry(i)))
- fSetAsian("Null")
- else
- fSetWestern("Null")
- fSetAsian(fGetLanguageName(iCountry(i)))
- end if
-
- Call wTypeKeys "<F9>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sBelow(i) then
- Warnlog "Should get " & sBelow(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Shift Left>"
- if fGetFieldContent() <> sAbove(i) then
- Warnlog i & " - Should get " & sAbove(i) & " but get " & fGetFieldContent()
- end if
- next i
-
- ' set back language tabpage values
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
- UILanguage.Select sUILanguage
- Gebietsschema.Select sLocale
- StandardWaehrung.Select sCurrency
- Westlich.Select sWestern
- if sAsiancb = true then
- if sAsiancbChecked = true then Aktivieren.IsChecked
- end if
-
- if sCTLcb = true then
- if sCTLcbChecked = true then ComplexScriptEnabled.IsChecked
- end if
-
- if Asiatisch.IsEnabled and sAsian > 0 then Asiatisch.Select sAsian
- if LanguageComplexScript.IsEnabled and sCTL > 0 then LanguageComplexScript.Select sCTL
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tL10NtestDate
- if iSprache <> 1 then
- QaErrorLog "Currently no any other language than English. Aborting."
- exit sub
- end if
-
- Dim sTestFile as String
- Dim sDate() as String
- Dim iCountry() as Integer
- Dim i , j as Integer
-
- Dim sUILanguage as integer, sLocale as integer
- Dim sCurrency as integer, sWestern as integer, sAsian as integer, sCTL as integer
- Dim sAsiancb as boolean, sCTLcb as boolean
- Dim sAsiancbChecked as boolean, sCTLcbChecked as boolean
-
- if iSprache <> 01 then
- QAErrorlog "This is a English-only testcase"
- goto endsub
- end if
-
- Call hNewDocument
- ' Get current settings on language tabpage and remember
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
- sUILanguage = UILanguage.GetSelIndex
- sLocale = Gebietsschema.GetSelIndex
- sCurrency = StandardWaehrung.GetSelIndex
- sWestern = Westlich.GetSelIndex
- if Asiatisch.IsEnabled then sAsian = Asiatisch.GetSelIndex
- if LanguageComplexScript.IsEnabled then sCTL = LanguageComplexScript.GetSelIndex
- sAsiancb = Aktivieren.IsEnabled
- sCTLcb = ComplexScriptEnabled.IsEnabled
- sAsiancbChecked = Aktivieren.IsChecked
- sCTLcbChecked = ComplexScriptEnabled.IsChecked
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- Call hCloseDocument
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Date.sxw")
- sDate = Array( _
- "Tuesday, August 3, 2004" , _
- "mardi 3 août 2004" , _
- "martes, 3 de agosto de 2004" , _
- "martedì 3 agosto 2004" , _
- "tisdag 3 augusti 2004" , _
- "Dienstag, 3. August 2004" , _
- "Terça-feira, 3 de Agosto de 2004" , _
- "2004å¹´8月3日(ç«æ›œæ—¥ï¼‰" , _
- "04-8-3 화요ì¼" , _
- "2004年8月3日 星期二" , _
- "中è¯æ°‘國93å¹´8月3æ—¥ 星期二" , _
- )
- iCountry = Array ( 1 , 33 , 34 , 39 , 46 , 49 , _
- 55, 81 , 82 , 86 , 88 )
-
- printlog "L10N test - Date"
- '/// <b> L10N test - Date </b>
-
- Call hNewDocument
-
- '/// Open test file Date.sxw
- hFileOpenLocally( sTestFile )
-
- '/// Check if Date is changed after language is changed
- j = UBound(iCountry)
- for i = 0 to j
- Call wTypeKeys "<MOD1 Home>"
- fSetLocale(fGetLanguageName(iCountry(i)))
- if iCountry(i) < 80 then
- fSetWestern(fGetLanguageName(iCountry(i)))
- fSetAsian("Null")
- else
- fSetWestern("Null")
- fSetAsian(fGetLanguageName(iCountry(i)))
- end if
-
- Call wTypeKeys "<F9>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sDate(i) then
- Warnlog i & " - Should get " & sDate(i) & " but get " & fGetFieldContent()
- end if
- next i
-
- ' set back language tabpage values
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
- UILanguage.Select sUILanguage
- Gebietsschema.Select sLocale
- StandardWaehrung.Select sCurrency
- Westlich.Select sWestern
- if sAsiancb = true then
- if sAsiancbChecked = true then Aktivieren.IsChecked
- end if
-
- if sCTLcb = true then
- if sCTLcbChecked = true then ComplexScriptEnabled.IsChecked
- end if
-
- if Asiatisch.IsEnabled and sAsian > 0 then Asiatisch.Select sAsian
- if LanguageComplexScript.IsEnabled and sCTL > 0 then LanguageComplexScript.Select sCTL
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tL10NtestTime
- if iSprache <> 1 then
- QaErrorLog "Currently no any other language than English. Aborting."
- goto endsub
- end if
-
- Dim sTestFile as String
- Dim sTime() as String
- Dim iCountry() as Integer
- Dim i as Integer
- Dim j as Integer
-
- Dim sUILanguage as integer, sLocale as integer
- Dim sCurrency as integer, sWestern as integer, sAsian as integer, sCTL as integer
- Dim sAsiancb as boolean, sCTLcb as boolean
- Dim sAsiancbChecked as boolean, sCTLcbChecked as boolean
-
- if iSprache <> 01 then
- QAErrorlog "This is a English-only testcase"
- goto endsub
- end if
-
- Call hNewDocument
- ' Get current settings on language tabpage and remember
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
- sUILanguage = UILanguage.GetSelIndex
- sLocale = Gebietsschema.GetSelIndex
- sCurrency = StandardWaehrung.GetSelIndex
- sWestern = Westlich.GetSelIndex
- if Asiatisch.IsEnabled then sAsian = Asiatisch.GetSelIndex
- if LanguageComplexScript.IsEnabled then sCTL = LanguageComplexScript.GetSelIndex
- sAsiancb = Aktivieren.IsEnabled
- sCTLcb = ComplexScriptEnabled.IsEnabled
- sAsiancbChecked = Aktivieren.IsChecked
- sCTLcbChecked = ComplexScriptEnabled.IsChecked
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- Call hCloseDocument
-
-
- sTestFile = gTesttoolpath + "writer\optional\input\fields\Time.sxw"
- sTime = Array( _
- "04:46:08 PM" , _
- "04:46:08 PM" , _
- "04:46:08 PM" , _
- "04.46.08 p." , _
- "04:46:08 em" , _
- "04:46:08 nachm." , _
- "04:46:08 PM" , _
- "åˆå¾Œ 4:46:08" , _
- "오후 4시 46분 8초" , _
- "ä¸‹åˆ 04:46:08" , _
- "ä¸‹åˆ 04:46:08" , _
- )
- iCountry = Array ( 1 , 33 , 34 , 39 , 46 , 49 , _
- 55, 81 , 82 , 86 , 88 )
-
- printlog "L10N test - time"
- '/// <b> L10N test - time </b>
-
- Call hNewDocument
-
- '/// Open test file Time.sxw
- hFileOpenLocally( sTestFile )
-
- '/// Check if time is changed after language is changed
- j = UBound(iCountry)
- for i = 0 to j
- Call wTypeKeys "<MOD1 Home>"
- fSetLocale(fGetLanguageName(iCountry(i)))
- if iCountry(i) < 80 then
- fSetWestern(fGetLanguageName(iCountry(i)))
- fSetAsian("Null")
- else
- fSetWestern("Null")
- fSetAsian(fGetLanguageName(iCountry(i)))
- end if
-
- Call wTypeKeys "<F9>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sTime(i) then
- Warnlog i & " - Should get " & sTime(i) & " but get " & fGetFieldContent()
- end if
- next i
-
- ' set back language tabpage values
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
- UILanguage.Select sUILanguage
- Gebietsschema.Select sLocale
- StandardWaehrung.Select sCurrency
- Westlich.Select sWestern
- if sAsiancb = true then
- if sAsiancbChecked = true then Aktivieren.IsChecked
- end if
-
- if sCTLcb = true then
- if sCTLcbChecked = true then ComplexScriptEnabled.IsChecked
- end if
-
- if Asiatisch.IsEnabled and sAsian > 0 then Asiatisch.Select sAsian
- if LanguageComplexScript.IsEnabled and sCTL > 0 then LanguageComplexScript.Select sCTL
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/filter/w_filter.inc b/testautomation/writer/optional/includes/filter/w_filter.inc
deleted file mode 100644
index 43a47baf0d2a..000000000000
--- a/testautomation/writer/optional/includes/filter/w_filter.inc
+++ /dev/null
@@ -1,608 +0,0 @@
-'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@oracle.com
-'*
-'* short description :
-'*
-'*******************************************************************
-' #1 tSammleImportFilter
-' #1 tCollectSaveAsFilter
-' #1 tCollectExportFilters
-' #1 fReadComparePrintLists
-' #1 tGroupNameCheck
-'\******************************************************************
-
-testcase tSammleImportFilter
-'/// compare IST- with SOLL- import filter state ///'
-
- Dim i as Integer
- Dim j as Integer
- Dim x as Integer
- Dim Ende as Integer
- Dim EndeSoll as Integer
-
-' Dim Zaehler as Integer ' count entries with "(STAROFFICE WRITER)" in IST
- Dim gZaehler as Integer ' do the same as 'i' in 'compare for-next' ?
- Dim gZaehler2 as Integer ' do the same as 'i' in 'compare for-next' ?
-
- Dim lsListe(350) as String ' IST list gets generated with tested SO and written into
- Dim Eintrag as String ' during compare: entry (i) from IST list
- Dim lsListeFail(350) as String ' List that gets set from the compare function, if anny filters are not available, optional parammeter to function
-
-'----new implementation of filter lists
- Dim sPlatform as String
- Dim fStandardFilterList as String
- Dim fStandardLanguageFilterList as String
- Dim fExceptionLanguageFilterList as String
- Dim fCompleteDiffFilterList as String
- Dim fW4WDiffFilterList as String
- Dim fActualFilterFile as String
- Dim fSortedFilterFile as String
- Dim iFilterCount as Integer
- Dim a as integer
- Dim b as integer
- Dim c as integer
-'--------------------------------------
-
-' INIT Stuff
- gZaehler = 0
- lsListe(0)=0
-
-'/// There are 3 files with filter lists ///'
-'///+ 1. Language independent, System independent, Standard installation : if_st_all.txt ///'
-'///+ 2. Language dependent, System independent, Standard installation : if_st_xx_all.txt ///'
-'///+ 2. Language dependent, System independent, Standard installation, Exceptions : if_st_xx_exe.txt ///'
-'///+ 3. Language independent, System dependent, Complete installation diff to 1.) & 2.) : if_cod_xxx.txt ///'
-'///+ 3. Language independent, System dependent, Standard installation diff to 1.) : if_w4w_xxx.txt ///'
-'///+ they are all found in "input\\writer\\la_sp\\" ///'
-'/// System depends on: w95, sol, lin; if system is not regcognizeable: Fallback to lin ///'
-'///+ Path to filter lists: 'input\\writer\\la_sp\\' ///
-'///+ Filter files have to be saved as Unicode UTF8 encoded ///'
-
-' since utf8 encoding isn't supported as list-write-format it doesn't make sense to save the list
-
- ' set Platform variable
- 'printlog " + + + gPCName: "+ gPCName+ " gPlatgroup: "+ gPlatgroup +" gPlatform: "+ gPlatform + " gSYSName: "+gSYSName
- select case gPlatgroup
- case "w95" : sPlatform = "w95"
- case "unx" :
- select case gPlatform
- case "lin" : sPlatform = "lin"
- case "x86" : sPlatform = "lin" ' i think there were w4w licensing problems
- case "sol" : sPlatform = "w95"
- case else : sPlatform = "lin" ' minimal filter list
- end select
- case else : sPlatform = "lin" ' minimal filter list
- end select
-
- 'this one gets hard coded!
- fStandardFilterList = ConvertPath(gTesttoolPath + "writer\optional\input\filter\if_st_all." + "txt")
- fStandardLanguageFilterList = ConvertPath(gTesttoolPath + "writer\optional\input\filter\if_st_"+ iSprache+"_all." + "txt")
- fExceptionLanguageFilterList = ConvertPath(gTesttoolPath + "writer\optional\input\filter\if_st_"+ iSprache+"_exe." + "txt")
-
- fCompleteDiffFilterList = ConvertPath(gTesttoolPath + "writer\optional\input\filter\if_cod_" + sPlatform + ".txt")
- fW4WDiffFilterList = ConvertPath(gTesttoolPath + "writer\optional\input\filter\if_w4w_" + sPlatform + ".txt")
-
- fActualFilterFile = ConvertPath(gTesttoolPath + "writer\optional\input\filter\actual.txt") 'unsorted
- fSortedFilterFile = ConvertPath(gTesttoolPath + "writer\optional\input\filter\sorted.txt") 'sorted
-
-'' generate IST-list and write to file ///'
- FileOpen
- sleep (3)
- Kontext "OeffnenDlg"
- sleep (3)
- iFilterCount = Dateityp.GetItemCount ' have to substract already used ones at the end somewhere...
- sleep (3)
- for i=1 to Dateityp.GetItemCount
- ListAppend ( lsListe(), DateiTyp.GetItemText (i) )
- next i
- OeffnenDlg.Cancel
- 'ListWrite(lsListe(),fActualFilterFile, "utf8")
- 'Call ListCopy(lsListe(),lsListeSort())
- Call ListSort(lsListe())
- 'ListWrite(lsListe(),fSortedFilterFile, "utf8")
- ' printlog "-------------------------------------------------------------"
- ' for i=1 to ListCount ( lsListeSort() )
- ' printlog lsListeSort(i)
- ' next i
- ' printlog "-------------------------------------------------------------"
- 'Printlog "- Got Filters from Office; written to: " + fActualFilterFile + "; Count: "+ ListCount (lsListe())
- 'Printlog "- Got Filters from Office; written to: " + fSortedFilterFile + chr(13)
-
- lsListeFail(0) = 0
- printlog "'///- comparing ## Language independent ## Standard installation ## filters with existing ones"
- printlog "----- found : "+ fReadComparePrintLists (fStandardFilterList, lsListe(),lsListeFail()) + chr(13)
-
- a = ListCount (lsListeFail()) ' not found filters
- if (a > 0) then ' sort out filters for platforms, where we don't have licenses for OR the translator has good reasons....(swedish)
- if (iSprache = 46) then
- b = fReadComparePrintLists (fExceptionLanguageFilterList, lsListeFail())
- printlog "----- found : "+ b + chr(13)
- if (ListCount (lsListeFail()) <> 0) then
- a = ListCount ( lsListeFail() )
- for i=1 to a
- Printlog lsListeFail(i)
- next i
- printlog "----- NOT found : "+ c + chr(13)
- else
- qaErrorLog "--------- EVERYTHING is fine now, ignore every failure above about not found filters! :-) --------------"
- end if
- end if
- if (sPlatform = "lin") then
- qaErrorLog "ok there are failures, lets check them: sort out filters that are not allowed on this platform! (LINUX) :-)"
- b = fReadComparePrintLists (fW4WDiffFilterList, lsListeFail())
- printlog "----- found : "+ b + chr(13)
- if (ListCount (lsListeFail()) <> 0) then
- warnlog "By now, there are STILL some Filters realy missing :-("
- c = ListCount ( lsListeFail() )
- for i=1 to c
- Printlog lsListeFail(i)
- next i
- printlog "----- NOT found : "+ c + chr(13)
- else
- qaErrorLog "--------- EVERYTHING is fine now, ignore every failure above about not found filters! :-) --------------"
- end if
- else
- Warnlog ("The above filters are missing: " + a)
- end if
- end if
-
- printlog "'///- comparing ## Language dependent ## Standard installation ## filters with existing ones"
- b = fReadComparePrintLists (fStandardLanguageFilterList, lsListe())
- printlog "----- found : "+ b + chr(13)
- if b = 0 then
- warnlog " No filters found :-( - maybe because list-file is empty, please create it!"
- warnlog " take the file </testtool/input/writer/la_sp/if_st_1.all> and put all filters for this language on the same position into the file: " +fStandardLanguageFilterList
- end if
- a = ListCount (lsListeFail()) ' not found filters
- if (a > 0) then
- Warnlog ("The above filters are missing: " + a)
- end if
-
- '///' delete ------------ filters from IST-list (used filters appear twice) ///'
- '/// <font color=#ff0000> TBO TODO: select them! nice behaviour i think :-) </FONT> ///'
- printlog "- remove seperators ----------------------------"
- gZaehler2 = 0
- for i=1 to ListCount ( lsListe() )
- Eintrag = lsListe(i)
- if instr(Eintrag,"---------") then
- gZaehler2 = gZaehler2 + 1
- ListDelete ( lsListe(), i ) ' delete seperator
- i=i-1 ' so the i-counter has to be decremented by one
- end if
- next i
- printlog " + (" + gZaehler2 + "/8) seperators are available."
- if gZaehler2 <> 8 then
- warnlog " there are seperators missing or too much :-("
- Printlog " check if all groups are available! the groupnames can be found in the tostcase <tGroupNameCheck> later on"
- warnlog " !!! NO FILTER IS ALLOWED TO HAVE THE SAME NAME AS ANY GROUPNAME !!! because than this group won't show up in the FileOpen Dialog!"
- end if
- '///' delete <...> filters from IST-list (used filters appear twice) ///'
- printlog "- Already used filters in previous tests."
- gZaehler = 0
- for i=1 to ListCount ( lsListe() )
- Eintrag = lsListe(i)
- if Left$(Eintrag,1) = "<" and Right$(Eintrag,1) = ">" then
- gZaehler = gZaehler + 1
- printlog "" + Eintrag
- ListDelete ( lsListe(), i ) ' delete already used filter (i)
- i=i-1 ' so the i-counter has to be decremented by one
- end if
- next i
- printlog " + " + gZaehler + " Filters have been used in previous tests."
- printlog "++++++ this was now : " + (iFilterCount - gZaehler - gZaehler2) +" existing filters in office"
-
- if ListCount (lsListe()) > 50 then
- printlog chr(13)+"'/// - this is a COMPLETE Installation ?! (>50 filters still available): "+ListCount (lsListe()) + chr(13)
- printlog "'///- comparing ## Language independent ## Complete installation ## filters with existing ones"
- printlog "----- found : "+ fReadComparePrintLists (fCompleteDiffFilterList, lsListe()) + chr(13)
- else
- printlog chr(13)+"'/// - this is a STANDARD Installation ?! (<50 filters still available): "+ListCount (lsListe()) + chr(13)
- end if
-
- if ListCount ( lsListe() ) <> 0 then
- printlog Chr(13)
- Warnlog "*** The following Filters are available, but nobody wants them??'!" + "; Count: "+ ListCount (lsListe())
- Warnlog ("please compare them to the missing ones from above!")
- for i=1 to ListCount ( lsListe() )
- Printlog lsListe(i)
- next i
- end if
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tCollectSaveAsFilter
- Dim i as Integer
- Dim j as Integer
- Dim x as Integer
-
- Dim lsListe(350) as String ' IST list gets generated with tested SO and written into
- Dim iFilterCount as Integer
- Dim fActualFilterFile as String
- Dim fSortedFilterFile as String
-
- ListAllDelete(lsListe())
- x = 0
-
- fActualFilterFile = ConvertPath(gOfficePath + "user/work/sa_actua."+iSprache) 'unsorted
- fSortedFilterFile = ConvertPath(gOfficePath + "user/work/sa_sorte."+iSprache) 'sorted
-
-'/// go into every application and print out the filters found under 'File -> SaveAs' ///'
- for j = 1 to 7
- select case j
- case 1: gApplication = "WRITER"
- case 2: gApplication = "CALC"
- case 3: gApplication = "IMPRESS"
- case 4: gApplication = "DRAW"
- case 5: gApplication = "MASTERDOCUMENT"
- case 6: gApplication = "MATH"
- case 7: gApplication = "HTML"
- end select
- hNewDocument()
- '' generate IST-list and write to file ///'
- FileSaveAs
- sleep (3)
- Kontext "SpeichernDlg"
- sleep (3)
- iFilterCount = Dateityp.GetItemCount ' have to substract already used ones at the end somewhere...
- x = x + iFilterCount
- sleep (3)
- printlog " ---- " + gApplication + " : " + iFilterCount
- for i=1 to Dateityp.GetItemCount
- ListAppend ( lsListe(), DateiTyp.GetItemText (i) )
- Printlog DateiTyp.GetItemText (i)
- next i
- Printlog "-----------------------------------------------"
- SpeichernDlg.Cancel
- hCloseDocument()
- next j
-
- Printlog chr(13)+" This are "+ x + " - from 85 expected." + chr(13)
- if x <> 85 then warnlog "Somewhere Over the rainbow... there are filters missing / too much :-("
-
- if (app.dir(fActualFilterFile) = "") then
- Call ListWrite(lsListe(),fActualFilterFile, "utf8")
- Printlog "- Got Filters from Office; written to: " + fActualFilterFile + "; Count: "+ ListCount (lsListe())
- end if
- if (app.dir(fSortedFilterFile) = "") then
- Call ListSort(lsListe())
- Call ListWrite(lsListe(),fSortedFilterFile, "utf8")
- Printlog "- Got Filters from Office; written to: " + fSortedFilterFile + chr(13)
- end if
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tCollectExportFilters
- Dim i as Integer
- Dim j as Integer
- Dim x as Integer
-
- Dim lsListe(350) as String ' IST list gets generated with tested SO and written into
- Dim iFilterCount as Integer
- Dim fActualFilterFile as String
- Dim fSortedFilterFile as String
-
- ListAllDelete(lsListe())
- x = 0
-
- fActualFilterFile = ConvertPath(gOfficePath + "user/work/ex_actua."+iSprache) 'unsorted
- fSortedFilterFile = ConvertPath(gOfficePath + "user/work/ex_sorte."+iSprache) 'sorted
-
-'/// go into every application and print out the filters found under 'File -> SaveAs' ///'
- for j = 1 to 7
- select case j
- case 1: gApplication = "WRITER"
- case 2: gApplication = "CALC"
- case 3: gApplication = "IMPRESS"
- case 4: gApplication = "DRAW"
- case 5: gApplication = "MASTERDOCUMENT"
- case 6: gApplication = "MATH"
- case 7: gApplication = "HTML"
- end select
- hNewDocument()
- '' generate IST-list and write to file ///'
- FileExport
- sleep (3)
- Kontext "SpeichernDlg"
- sleep (3)
- iFilterCount = Dateityp.GetItemCount ' have to substract already used ones at the end somewhere...
- x = x + iFilterCount
- sleep (3)
- printlog " ---- " + gApplication + " : " + iFilterCount
- for i=1 to Dateityp.GetItemCount
- ListAppend ( lsListe(), DateiTyp.GetItemText (i) )
- Printlog DateiTyp.GetItemText (i)
- next i
- Printlog "-----------------------------------------------"
- SpeichernDlg.Cancel
- hCloseDocument()
- next j
-
- Printlog chr(13)+" This are "+ x + " - from 65 expected." + chr(13)
- if x <> 65 then warnlog "Somewhere Over the rainbow... there are filters missing / too much :-("
-
- if (app.dir(fActualFilterFile) = "") then
- Call ListWrite(lsListe(),fActualFilterFile, "utf8")
- Printlog "- Got Filters from Office; written to: " + fActualFilterFile + "; Count: "+ ListCount (lsListe())
- end if
- if (app.dir(fSortedFilterFile) = "") then
- Call ListSort(lsListe())
- Call ListWrite(lsListe(),fSortedFilterFile, "utf8")
- Printlog "- Got Filters from Office; written to: " + fSortedFilterFile + chr(13)
- end if
-' Should look like this:
-' ---- WRITER : 3
-'PDF - Portable Document Format (.pdf)
-'------------------------------------------
-'XHTML (.xhtml)
-'-----------------------------------------------
-' ---- CALC : 3
-'PDF - Portable Document Format (.pdf)
-'------------------------------------------
-'XHTML (.xhtml)
-'-----------------------------------------------
-' ---- IMPRESS : 23
-'HTML Document (StarOffice Impress) (.html;.htm)
-'PDF - Portable Document Format (.pdf)
-'Macromedia Flash (SWF) (.swf)
-'------------------------------------------
-'BMP - Windows Bitmap (.bmp)
-'EMF - Enhanced Metafile (.emf)
-'EPS - Encapsulated PostScript (.eps)
-'GIF - Graphics Interchange Format (.gif)
-'JPEG - Joint Photographic Experts Group (.jpg;.jpeg;.jfif;.jif;.jpe)
-'MET - OS/2 Metafile (.met)
-'PBM - Portable Bitmap (.pbm)
-'PCT - Mac Pict (.pct)
-'PGM - Portable Graymap (.pgm)
-'PNG - Portable Network Graphic (.png)
-'PPM - Portable Pixelmap (.ppm)
-'PWP - PlaceWare (.pwp)
-'RAS - Sun Raster Image (.ras)
-'SVG - Scalable Vector Graphics (.svg)
-'SVM - StarView Metafile (.svm)
-'TIFF - Tagged Image File Format (.tif;.tiff)
-'WMF - Windows Metafile (.wmf)
-'XPM - X PixMap (.xpm)
-'XHTML (.xhtml)
-'-----------------------------------------------
-' ---- DRAW : 22
-'HTML Document (StarOffice Draw) (.html;.htm)
-'PDF - Portable Document Format (.pdf)
-'Macromedia Flash (SWF) (.swf)
-'------------------------------------------
-'BMP - Windows Bitmap (.bmp)
-'EMF - Enhanced Metafile (.emf)
-'EPS - Encapsulated PostScript (.eps)
-'GIF - Graphics Interchange Format (.gif)
-'JPEG - Joint Photographic Experts Group (.jpg;.jpeg;.jfif;.jif;.jpe)
-'MET - OS/2 Metafile (.met)
-'PBM - Portable Bitmap (.pbm)
-'PCT - Mac Pict (.pct)
-'PGM - Portable Graymap (.pgm)
-'PNG - Portable Network Graphic (.png)
-'PPM - Portable Pixelmap (.ppm)
-'RAS - Sun Raster Image (.ras)
-'SVG - Scalable Vector Graphics (.svg)
-'SVM - StarView Metafile (.svm)
-'TIFF - Tagged Image File Format (.tif;.tiff)
-'WMF - Windows Metafile (.wmf)
-'XPM - X PixMap (.xpm)
-'XHTML (.xhtml)
-'-----------------------------------------------
-' ---- GLOBALDOC : 7
-'PDF - Portable Document Format (.pdf)
-'------------------------------------------
-'StarOffice 6.0 Text Document (.sxw)
-'StarWriter 5.0 (.sdw)
-'StarWriter 4.0 (.sdw)
-'StarWriter 3.0 (.sdw)
-'Open Office Text (.oot)
-'-----------------------------------------------
-' ---- MATH : 1
-'PDF - Portable Document Format (.pdf)
-'-----------------------------------------------
-' ---- HTML : 7
-'PDF - Portable Document Format (.pdf)
-'------------------------------------------
-'StarOffice Text Document (StarOffice Writer/Web) (.sxw)
-'StarWriter 5.0 (StarOffice Writer/Web) (.sdw)
-'StarWriter 4.0 (StarOffice Writer/Web) (.sdw)
-'StarWriter 3.0 (StarOffice Writer/Web) (.sdw)
-'Open Office Text (StarOffice Writer/Web) (.oot)
-'-----------------------------------------------
-endcase
-
-function fReadComparePrintLists (fFilterList as string, gFilterList() as string, optional gFilterListFail() as string) as integer
-'/// input : filename of the to load list, existing list, return filter list of fails ///'
-'///+ output: changed existing list, generates file of list, if not available.. sometimes ///'
-'///+ count of found list entries ///'
-'///+ optional gFilterListFail gets set to the missing filters, for further evaluation! ///
-'///+ function: loads list from file, searches, prints, deletes found listentries from given list ///'
-'///+ prints listentries from loaded list, which were not found ///'
-
- Dim lFilterList(350) as String
- Dim Eintrag as String
- Dim i as Integer
- Dim j as Integer
- Dim x as Integer
- Dim Ende as Integer
- Dim EndeSoll as Integer
- Dim gZaehler as Integer ' do the same as 'i' in 'compare for-next' ?
-
-'----temp stuff only used, if filternames change again :-[
- Dim lsTemp(350) as String
- dim iTemp as integer
- dim sTemp as string
- dim fTempFilterList as string
-'--------------------------------------
-
- lFilterList(0) = 0
- fReadComparePrintLists = -1 ' worst case
-
-'/// read Standard-list ONE from file ///'
- if Dir ( fFilterList ) <> "" then
- ListRead ( lFilterList(), fFilterList, "utf8" )
- Printlog " - Read Filters-to-find-List from: " + fFilterList + "; Count: "+ ListCount (lFilterList())
- '------------temp stuff------------- to get the part in braces '()'
- ' lsTemp(0) = 0
- ' for iTemp =1 to ListCount (lFilterList())
- ' sTemp = lFilterList(iTemp)
- ' ListAppend (lsTemp(), mid (sTemp, inStr(sTemp, "("), len(stemp)+1-inStr(sTemp, "(") ))
- ' Printlog " " + lsTemp(iTemp)
- ' next iTemp
- ' fTempFilterList = ConvertPath(gTesttoolPath + "writer\optional\input\filter\if_st_XX_all_ext.txt")
- ' ListRead ( lsTemp(), fTempFilterList, "utf8" )
- ' for iTemp =1 to ListCount (lFilterList())
- ' sTemp = lFilterList(iTemp) + lsTemp(iTemp)
- ' Printlog " " + sTemp
- ' lsTemp(iTemp) = sTemp
- ' next iTemp
- ' ListWrite ( lsTemp(), fFilterList+"X", "utf8" )
- '-----------------------------------
-'/// delete ONE filters from both, IS and ONE, lists and print out found & not found ones ///'
- Call ListSort(lFilterList())
- Call ListSort(gFilterList())
- printlog " - List Filters which have been found in both Lists:"
- x=0 ' count found filters
- Ende = ListCount ( gFilterList() )
- for i=1 to Ende
- gZaehler = gZaehler + 1
- Eintrag = gFilterList(i)
- for j=1 to ListCount ( lFilterList() )
- if Eintrag = lFilterList(j) then ' if entry found -> delete from IST & SOLL list
- Printlog " - " + lFilterList(j)
- x=x+1
- ListDelete ( lFilterList(), j )
- ' don't modify the gFilterList, copy the not found entry to new global list !!!!
- ListDelete ( gFilterList(), i )
- i=i-1
- ' here i have to check the function, how a list gets deleted... ! i think evrything from that entry on moves one up
- j = 1000 ' goto next entry
-' Fehler = FALSE ' -> found state
- else
-' Fehler = TRUE
- end if
- next j
- if gZaehler = Ende then i=1000 ' Abbruch, weil die Schleife einmal druchgegangen ist
- next i
- 'printlog "+++ these are " + x
- else
- warnlog " Missing list file, create empty file: "+fFilterList
- ListWrite ( lFilterList(), fFilterList, "utf8")
- end if
- '/// print filters which were not found from ONE list ///'
- if ListCount ( lFilterList() ) <> 0 then
- qaErrorLog "The following filters aren't available in the Office! look what happend to them !!!" + "; Count: "+ ListCount (lFilterList())
- for i=1 to ListCount ( lFilterList() )
- Printlog "" + lFilterList(i)
- next i
- ListCopy (lFilterList(), gFilterListFail())
- else
- ListAllDelete (gFilterListFail())
- end if
- fReadComparePrintLists = x
-end function
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tGroupNameCheck
- if gPlatGroup = "unx" then
- Printlog "No testing under Unix/Linux. Exiting testcase."
- goto endsub
- end if
-
-'///' inspired from #97305 : 86+88: missing import filters in fileopen dialog ///'
-'///+' -> 97723 97758 ///'
-'///' solution for sucha problem is, that the group name (Webseiten) is the same as a filtername (Webseite) in the translation. ///'
-'///+' so you have to keep an eye on the names in 'UI.xml' & 'TypeDetection.xml' from '\share\config\registry\instance\org\openoffice\Office' ///'
-'///+' they have to be different! ///'
-
- Dim saGroups (50) as string
- dim i as integer
-
-'TypeDetection.xml
- saGroups (0)=0
-' cfg:value; xml:lang = de...
-' saGroups = TBOXMLGetFirstCharsForElement ( "UI;FilterClassification;GlobalFilters;Classes;FilterClass;DisplayName;cfg:value", UIxml, TRUE )
- TBOXMLGetListOfFilterGroups (iSprache, saGroups ())
- for i = 1 to ListCount (saGroups())
- Printlog " "+i+": '" + saGroups(i)+"'"
- next i
-endcase
-
-function TBOXMLGetListOfFilterGroups ( iLang as integer, sList() as string ) as String
-'/// parse xml file for special needs ///'
- dim sElementLine as String
- dim sXMLFile as String
-
- Dim bCloseLocal as Boolean
- dim i as integer
- Dim x as integer
- Dim y as integer
- dim sLang, sClass as string
- dim iAttrCount as integer
-
- sElementLine = "UI;FilterClassification;GlobalFilters;Classes"
- sXMLFile = gNetzOfficePath & ConvertPath("Basis\share\registry\res\" + gISOLang + "\org\openoffice\Office\UI.xcu")
-
- if (dir(sXMLFile) = "") then
- qaErrorLog "File doesn't exist :-( '" + sXMLFile + "'"
- exit function
- end if
- SAXReadFile ( sXMLFile )
- bCloseLocal = TRUE
- call hXMLGotoElement ( sElementLine )
-
- for i = 1 to SAXGetChildCount
- SAXSeekElement ( i )
-' if SAXGetNodeType <> NodeTypeCharacter then
-' Printlog " '"+SAXGetAttributeName (1) +"' : '"+SAXGetAttributeValue (1) +"' :"
- for y = 1 to SAXGetChildCount
- SAXSeekElement ( y )
- SAXSeekElement ( 1 )
- sLang = SAXGetAttributeValue (1)
- SAXSeekElement ( 1 )
- if (y = 1) then
-' if SAXGetNodeType = NodeTypeCharacter then Printlog " "+ConvertLanguage2( slang )+":"+slang +":"+i+":"+SAXGetChars
- if (ConvertLanguage2( slang, TRUE ) = iLang) then ListAppend (sList(),SAXGetChars)
- else
-' if SAXGetNodeType = NodeTypeCharacter then Printlog " "+":"+slang +":"+i+":"+SAXGetChars
- end if
- SAXSeekElement ( 0 )
- SAXSeekElement ( 0 )
- SAXSeekElement ( 0 )
- next y
-' end if
- SAXSeekElement ( 0 )
- next i
- if bCloseLocal = TRUE then SAXRelease
-end function
-
diff --git a/testautomation/writer/optional/includes/fontwork/w_fontwork1.inc b/testautomation/writer/optional/includes/fontwork/w_fontwork1.inc
deleted file mode 100644
index 6fff78a962fe..000000000000
--- a/testautomation/writer/optional/includes/fontwork/w_fontwork1.inc
+++ /dev/null
@@ -1,400 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test Format/Fontwork
-'*
-'************************************************************************
-'*
-' #1 tFontWork_1
-' #1 tFontWork_2
-' #1 tFontWork_3
-' #1 tFontWork_4
-' #1 tFontWork_5
-' #1 tFontWork_6
-'*
-'\***********************************************************************
-
-testcase tFontWork_1
-
- Dim i as Integer
-
- printLog Chr(13) + "- Test pre-defined shapes (upper/lower Semicircle,...) to the selected text object"
- '/// Test pre-defined shapes (upper/lower Semicircle,...) to the selected text object
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
- Call wTypeKeys "First Line<Return>"
- Call wTypeKeys "Second Line<Return>"
- Call wTypeKeys "Third Line<Return>"
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
-
- '/// format/fontwork
- FormatFontWork
- Kontext
- Kontext "Fontwork"
-
- '/// test Rotate
- Drehen.Click
- For i = 1 to 12
- kreisAuswahl.TypeKeys "<Right>"
- Sleep 3
- next i
-
- '/// test Upright
- Aufrecht.Click
- For i = 1 to 12
- kreisAuswahl.TypeKeys "<Right>"
- Sleep 3
- next i
-
- '/// test Slant Horizontal
- HorizontalKippen.Click
- For i = 1 to 12
- kreisAuswahl.TypeKeys "<Right>"
- Sleep 3
- next i
-
- '/// test Slant Vertical
- VertikalKippen.Click
- For i = 1 to 12
- kreisAuswahl.TypeKeys "<Right>"
- Sleep 3
- next i
-
- Fontwork.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tFontWork_2
-
- Dim i , j as Integer
-
- printLog Chr(13) + "- Test Orientation"
- '/// Test Orientation
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
- Call wTypeKeys "Test"
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
-
- '/// format/fontwork
- FormatFontWork
- Kontext "Fontwork"
-
- '/// Test Orientation in Rotate
- Drehen.Click
- kreisAuswahl.TypeKeys "<Right>"
- Laufrichtgung.Click
- Sleep 2
- Laufrichtgung.Click
-
- '/// Test Orientation in Upright
- Aufrecht.Click
- kreisAuswahl.TypeKeys "<Right>"
- Laufrichtgung.Click
- Sleep 2
- Laufrichtgung.Click
-
- '/// Test Orientation in Horizontal
- HorizontalKippen.Click
- kreisAuswahl.TypeKeys "<Right>"
- Laufrichtgung.Click
- Sleep 2
- Laufrichtgung.Click
-
- '/// Test Orientation in Slant Vertical
- VertikalKippen.Click
- kreisAuswahl.TypeKeys "<Right>"
- Laufrichtgung.Click
- Sleep 2
- Laufrichtgung.Click
-
- Fontwork.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tFontWork_3
-
- Dim i , j as Integer
-
- printLog Chr(13) + "- Test Align , include Left , Center, Right and Autosize ."
- '/// Test Align , include Left , Center, Right and Autosize
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
- Call wTypeKeys "Test"
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
-
- '/// format/fontwork
- FormatFontWork
- Kontext "Fontwork"
-
- '/// Test Align in Rotate
- Drehen.Click
- kreisAuswahl.TypeKeys "<Right>"
- Linksbuendig.Click
- Sleep 2
- Zentriert.Click
- Sleep 2
- Rechtsbuendig.Click
- Sleep 2
-
- '/// Test Align in Upright
- Aufrecht.Click
- kreisAuswahl.TypeKeys "<Right>"
- Linksbuendig.Click
- Sleep 2
- Zentriert.Click
- Sleep 2
- Rechtsbuendig.Click
- Sleep 2
-
- '/// Test Align in Horizontal
- HorizontalKippen.Click
- kreisAuswahl.TypeKeys "<Right>"
- Linksbuendig.Click
- Sleep 2
- Zentriert.Click
- Sleep 2
- Rechtsbuendig.Click
- Sleep 2
-
- '/// Test Align in Slant Vertical
- VertikalKippen.Click
- kreisAuswahl.TypeKeys "<Right>"
- Linksbuendig.Click
- Sleep 2
- Zentriert.Click
- Sleep 2
- Rechtsbuendig.Click
- Sleep 2
-
- Fontwork.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tFontWork_4
-
- Dim sDistance , sIndent as String
-
- sDistance = "1" + gSeperator + "00" + gMeasurementUnit
- sIndent = "1" + gSeperator + "10" + gMeasurementUnit
-
- printLog Chr(13) + "- Test distance and indent"
- '/// Test distance and indent
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
- Call wTypeKeys "Test"
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
-
- '/// format/fontwork , set distance and indent
- FormatFontWork
- Kontext "Fontwork"
- Drehen.Click
- Sleep 4
- kreisAuswahl.TypeKeys "<Right>"
- Sleep 5
- Linksbuendig.Click
- Sleep 5
- Abstand.SetText sDistance
- Sleep 5
- Einzug.SetText sIndent
- Sleep 5
- Fontwork.Close
- Sleep 5
-
- FormatFontWork
- Kontext
- Kontext "Fontwork"
- Sleep 2
- if Left$(Abstand.GetText,4) <> Left$(sDistance,4) then Warnlog "Distance should be "+sDistance+" but -> "+Abstand.GetText
- Sleep 2
- if Left$(Einzug.GetText,4) <> Left$(sIndent,4) then Warnlog "Indent should be "+sIndent+" but -> "+Einzug.GetText
- Sleep 2
- Fontwork.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tFontWork_5
-
- printLog Chr(13) + "- Test Contour - include contour and text contour"
- '/// Test Contour - include contour and text contour
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
- Call wTypeKeys "Test"
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
-
- '/// format/fontwork
- FormatFontWork
- Kontext
- Kontext "Fontwork"
- Drehen.Click
- kreisAuswahl.TypeKeys "<Right>"
- Kontur.Click
- Buchstabenumrandung.Click
- Sleep 2
- Kontur.Click
- Buchstabenumrandung.Click
- Fontwork.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tFontWork_6
-
- Dim sDistanceX , sDistanceY as String
- Dim sAngle , SPercent as String
- Dim iVerticalShadowColor , iSlantedShadowColor as Integer
-
- Select case iSprache
- case 01 : sAngle = "140" + gSeperator + "0 degrees"
- case 03 : sAngle = "140" + gSeperator + "0 graus"
- case 31 : sAngle = "140" + gSeperator + "0graden"
- case 33 : sAngle = "140" + gSeperator + "0 degrés"
- case 34 : sAngle = "140" + gSeperator + "0Grados"
- case 39 : sAngle = "140" + gSeperator + "0gradi"
- case 46 : sAngle = "140" + gSeperator + "0 grader"
- case 49 : sAngle = "140" + gSeperator + "0 Grad"
- case 55 : sAngle = "140" + gSeperator + "0 graus"
- case 81 : sAngle = "140" + gSeperator + "0度"
- case 82 : sAngle = "140" + gSeperator + "0 ë„"
- case 86 : sAngle = "140" + gSeperator + "0度"
- case 88 : sAngle = "140" + gSeperator + "0度"
- case else : QAErrorLog "Now, the test does not support for the language " +iSprache
- Goto endsub
- end select
-
- sDistanceX = "1" + gSeperator + "00" + gMeasurementUnit
- sDistanceY = "1" + gSeperator + "50" + gMeasurementUnit
- SPercent = "150%"
- iVerticalShadowColor = 3
- iSlantedShadowColor = 4
-
- printLog Chr(13) + "- Test shadow - include vertical and slanted"
- '/// Test shadow - include vertical and slanted
-
- Call hNewDocument
-
- Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
- Call wTypeKeys "Test"
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
-
- '/// format/fontwork
- FormatFontWork
- Kontext "Fontwork"
- Drehen.Click
- Sleep 2
- kreisAuswahl.TypeKeys "<Right>"
- Sleep 2
- Zentriert.Click ' center
- Sleep 2
-
- 'vertical shadow
- Senkrecht.Click
- Sleep 2
- AbstandX.SetText sDistanceX
- Sleep 2
- AbstandY.SetText sDistanceY
- Sleep 2
- Schattenfarbe.Select iVerticalShadowColor
- Sleep 2
- FontWork.Close
- Sleep 2
-
- FormatFontWork
- Kontext "Fontwork"
- Sleep 2
- if AbstandX.GetText <> sDistanceX then Warnlog "Distance X should be "+sDistanceX+" but -> "+AbstandX.GetText
- Sleep 2
- if AbstandY.GetText <> sDistanceY then Warnlog "Distance Y should be "+sDistanceY+" but -> "+AbstandY.GetText
- Sleep 2
- if Schattenfarbe.GetSelIndex <> iVerticalShadowColor then Warnlog "Vertical shadow color is wrong."
- Sleep 2
- 'Slanted shadow
- Kippen.Click
- Sleep 2
-
- printLog "-" + AbstandX.GetText
- AbstandX.SetText sAngle
- Sleep 2
- AbstandY.SetText SPercent
- Sleep 2
- Schattenfarbe.Select iSlantedShadowColor
- Sleep 2
- Fontwork.Close
- Sleep 2
-
- FormatFontWork
- Kontext "Fontwork"
- Sleep 2
- if AbstandX.GetText <> sAngle then Warnlog "Distance X should be "+sAngle+" but -> "+AbstandX.GetText
- Sleep 2
- if Left$(AbstandY.GetText,3) <> Left$(SPercent,3) then Warnlog "Distance Y should be "+SPercent+" but -> "+AbstandY.GetText
- Sleep 2
- if Schattenfarbe.GetSelIndex <> iSlantedShadowColor then Warnlog "Slanted shadow color is wrong."
- Sleep 2
- Fontwork.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc b/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
deleted file mode 100644
index 9cfd50567a78..000000000000
--- a/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
+++ /dev/null
@@ -1,750 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Standard character formatting. Setting Styles.
-'*
-'\***********************************************************************
-
-testcase tFormatCharacter1
- printlog "- Check if 'Pair Kerning' is enabled by default!"
- '/// Format / Character / Tab Position ///
- Call hNewDocument
- '/// Open new document
- FormatCharacter
- '/// Format / Character => Select Tabpage 'Position'
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- '/// 'Pair Kerning' should be checked by default
- if Not PairKerning.IsChecked then
- warnlog "Pair Kerning should be checked by default !"
- end if
- TabFontPosition.Cancel
- '/// Close dialog and open Stylist
- Kontext "Stylist"
- if Not Stylist.Exists then FormatStylist
- '/// Open context menu on selected style and choose 'Edit'
- Vorlagenliste.OpenContextMenu
- Call hMenuSelectNr(2)
- '/// Select Tabpage 'Position'
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- '/// 'Pair Kerning' should be checked by default
- if Not PairKerning.IsChecked then
- warnlog "Pair Kerning should be checked by default !"
- end if
- TabFontPosition.Cancel
- '/// close Stylist
- FormatStylist
-
- '/// close document
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tFormatCharacter2
- '/// Format / Default ///
- '/// New document ///
- Call hNewDocument
- Printlog " - adjust Font- and Paragraph-Format"
- '/// Insert a word and select it ///
- Call wTypeKeys "Format<Shift Mod1 Left>"
- '/// Select Format / Character and adjust Font- and Paragraph-Formats ///
- FormatCharacter
- Sleep 5
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- Outline.Check
- Shadow.Check
- Underline.Select 2
- StrikeThrough.Select 2
- TabFontEffects.OK
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
- Automatisch.Check
- '/// Close dialog ///
- TabEinzuegeUndAbstaende.OK
- Wait 500
-
- Printlog " - Format / Default"
- FormatDefaultWriter
- Wait 500
-
- Printlog " - check Font- and Paragraph-Formats"
-
- '/// Check if Font- and Paragraph-Formats have benn set to default ///
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if Outline.IsChecked then Warnlog "Outline is checked"
- if Shadow.IsChecked then Warnlog "Shadow is checked"
- if Underline.GetSelIndex = 2 then Warnlog "Wrong entry in 'Underline' is selected"
- if StrikeThrough.GetSelIndex = 2 then Warnlog "Wrong entry in 'StrikeThrough' is selected"
- TabFontEffects.OK
-
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
- if Automatisch.IsChecked then Warnlog "Automatic is checked"
- TabEinzuegeUndAbstaende.OK
-
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tFormatCharacter3
- Dim Vergleich1 as integer
- Dim Vergleich2 as string
- Dim Vergleich3 as string
- Dim Vergleich4 as string
- Dim vLink as integer
-
- printlog "New document"
- Call hNewDocument
- printlog "add some text to document => 'formatted text with hyperlink'"
- Call wTypeKeys ("formatted text with hyperlink")
- printlog "select text"
- Call wTypeKeys ("<Shift Home>")
-
- FormatCharacter
- WaitSlot (5)
- Kontext
- printlog "On Tabpage 'Font' adjust settings"
- active.SetPage TabFont
- kontext "TabFont"
- try
- FontWest.Select 1
- Vergleich2 = FontWest.GetSelText
- Vergleich1 = StyleWest.GetItemCount
- StyleWest.Select Vergleich1
- Vergleich3 = StyleWest.GetSelText
- SizeWest.Select 24
- catch
- Font.Select 1
- Vergleich2 = Font.GetSelText
- Vergleich1 = Style.GetItemCount
- Style.Select Vergleich1
- Vergleich3 = Style.GetSelText
- Size.Select 24
- endcatch
- wait 100
- Kontext
- printlog "On Tabpage 'Font Effects' adjust settings"
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- Blinking.Check
- Kontext
- Active.Setpage TabFontPosition
- printlog "On Tabpage 'Font Position ' adjust settings"
- Kontext "TabFontPosition"
- Spacing.Select 2
- SpacingBy.More 3
- Vergleich4 = SpacingBy.GetText
- if Right ( Vergleich4, 2 ) <> "pt" then Warnlog "Wrong Unit at Spacing by"
- Kontext
- printlog "On Tabpage 'Hyperlink' adjust settings"
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- URLName.SetText "www.mikeportnoy.com"
- NameText.SetText "A hyperlink with testtool"
- TargetFrame.Select 2
- Select Case iSprache
- Case 36
- vLink = 2
- Case else
- vLink = 6
- end select
- UnbesuchterLink.Select vLink
- kontext
- active.SetPage TabHintergrund
- kontext "TabHintergrund"
- Sleep 1
- Hintergrundfarbe.Typekeys "<Down><Left>", 4
- TabHintergrund.OK
- printlog "Close dialog"
-
- printlog "Reopen with Format / Character and check settings made"
- Call wTypeKeys "<Home><Right>"
- FormatCharacter
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
- if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
- catch
- if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
- if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
- endcatch
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing activated, is not the 2. but " + Spacing.GetSelText
- if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong Value selected. Not: " + Vergleich4 +" but " + SpacingBy.GetText
-
- Kontext
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i105855#Wrong URL : " + URLName.GetText
- SetClipboard UrlName.Gettext
- if NameText.GetText <> "A hyperlink with testtool" then Warnlog "#i105855#Wrong Linkname : " + NameText.GetText
- if TargetFrame.GetSelIndex <> 2 then Warnlog "#i105855#Wrong Target selected : " + TargetFrame.GetSelText
- if UnbesuchterLink.GetSelIndex <> vLink then Warnlog "#i105855#Wrong Style for unused Link :" + UnbesuchterLink.GetSelIndex
- TabHyperlinkZeichen.OK
-
- printlog "Save document as '../user/work/format1.sxw' and close it"
- if gApplication = "WRITER" then
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odt", "writer8")
- else
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odm", "writer8") 'gMasterDocFilter
- end if
-
- printlog "Close document"
- Call hCloseDocument
- printlog "reopen previous saved document and check saved character format"
- if gApplication = "WRITER" then
- hFileOpen( gOfficePath & "user\work\format1.odt" )
- else
- hFileOpen( gOfficePath & "user\work\format1.odm" )
- end if
- Call wTypeKeys "<Mod1 Home><Right>"
- Wait 500
- FormatCharacter
- WaitSlot (3)
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
- if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
- catch
- if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
- if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
- endcatch
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing selected. Not 2. but " + Spacing.GetSelText
- if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong value selectzed. Not " + Vergleich4 +" but " + SpacingBy.GetText
- Kontext
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i105855#Wrong URL : " + URLName.GetText
- if NameText.GetText <> "A hyperlink with testtool" then Warnlog "#i105855#Wrong Linkname : " + NameText.GetText
- if TargetFrame.GetSelIndex <> 2 then Warnlog "#i105855#Wrong Target selected : " + TargetFrame.GetSelText
- TabHyperlinkZeichen.OK
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tFormatHyperlink
- ' /// This testcase has been written due to bug #109488
- '/// Open a new writerdocument
- Call hNewDocument
- '/// Enter a URL (www.sun.com) in document
- Call wTypeKeys "Autocorrect my URL www.sun.com"
- '/// Enter a space after URL
- Call wTypeKeys " "
- '/// URL should have been autocompleted to http://www.sun.com
- Call wTypeKeys "<Left>",7
- FormatCharacter
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.sun.com/" then
- Warnlog "Autocorrection for hyperlink does not work!"
- else
- printlog "Hyperlink has been auto-corrected"
- end if
- TabHyperlinkZeichen.Cancel
-
- '/// Change URL to www.sauna.com
- Call wTypeKeys "a"
- Call wTypeKeys "<Left>" ,2
- Call wTypeKeys "a"
-
- '/// Check whether URL has been changed
- FormatCharacter
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.sun.com/" then
- Warnlog "Autocorrection for hyperlink should not have been affected to URL!"
- else
- printlog "Hyperlink has not been auto-corrected"
- end if
- TabHyperlinkZeichen.Cancel
- '/// Close document
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tFormatStyles1
- Dim iMenuEntry as integer
-
- if hIsExtensionAlreadyInstalled("SunSearchToolbar.oxt") = true then
- iMenuEntry = 6
- else
- iMenuEntry = 5
- end if
- '/// All format styles in context-menu ///
- '/// Open a new document ///
- Call hNewDocument
- printlog "- Style 'Bold' "
- '/// Write 'Style Bold' - execute Context menu 'Style Bold'
- Call wTypeKeys "Style Bold"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- if hMenuFindSelect (".uno:Bold", true, 1, false) = true then 'Find 'Bold' and call the slot.
- '/// Check if changes to style have been made ///
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 0 then
- Warnlog "Style 'Bold' with context menu has not been set!"
- end if
-
- Call wTypeKeys "<End><Mod1 Shift X>"
- wait 500
- Call wTypeKeys "<Return>"
- endif
-
- printlog "- Style 'Italic' "
- '/// Write 'Style Italic' - execute Context menu 'Style Italic'
- Call wTypeKeys "Style Italic"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- if hMenuFindSelect (".uno:Italic", true, 2, false) = true then 'Find 'Italic' and call the slot.
- ' /// Check if changes to style have been made ///
- Kontext "TextObjectbar"
- if Kursiv.Getstate(2) = 0 then
- Warnlog "#58722#Style 'Italic' with context menu has not been set!"
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
- end if
-
- printlog "- Style 'Underline' "
- '/// Write 'Style Underline' - execute Context menu 'Style Underline'
- Call wTypeKeys "Style Underline"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- if hMenuFindSelect (".uno:Underline", true, 4, false) = true then 'Find 'Underline' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Underline.GetSelIndex <> 2 then Warnlog "Style 'Underline' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
- end if
-
- printlog "- Style 'Overline' "
- '/// Write 'Style Overline' - execute Context menu 'Style Strikethrough'
- Call wTypeKeys "Style Overline"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- if hMenuFindSelect (".uno:Overline", true, 3, false) = true then 'Find 'Overline' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Overline.GetSelIndex <> 2 then Warnlog "Style 'Overline' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
- end if
-
- printlog "- Style 'StrikeThrough' "
- '/// Write 'Style Strikethrough' - execute Context menu 'Style Strikethrough'
- Call wTypeKeys "Style Strikethrough"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- if hMenuFindSelect (".uno:Strikeout", true, 5, false) = true then 'Find 'Strikethrough' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Style 'StrikeThrough' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Right><Return>"
- end if
-
- printlog "- Style 'Shadow' "
- '/// Write 'Style Shadow' - execute Context menu 'Style Shadow'
- Call wTypeKeys "Style Shadow"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- if hMenuFindSelect (".uno:Shadowed", true, 6, false) = true then 'Find 'Shadowed' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Shadow.IsChecked = False then Warnlog "Style 'Shadow' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
- end if
-
- printlog "- Style 'Outline' "
- '/// Write 'Style Outline' - execute Context menu 'Style Outline'
- Call wTypeKeys "Style Outline"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- if hMenuFindSelect (".uno:OutlineFont", true, 7, false) = true then 'Find 'Outline' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Outline.IsChecked = false then Warnlog "Style 'Outline' with context menu has not been set!"
- TabFontEffects.Cancel
- end if
-
- printlog "Close Document."
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------------------------------------------------------------------
-
-testcase tFormatCharacter
- Dim Vergleich1%, Vergleich2$, Vergleich3$, Vergleich4$
-
- PrintLog "- Format / Character"
- Call hNewDocument
-
- printlog "add some text to document => 'formatted text with hyperlink'"
- Call wTypeKeys ("formatted text with hyperlink")
- printlog "select text"
- Call wTypeKeys ("<Shift Home>")
-
- printlog " - adjust character"
- printlog "Format->Character"
- FormatCharacter
- Sleep 5
- Kontext
- printlog "On Tabpage 'Font' adjust settings"
- active.SetPage TabFont
- kontext "TabFont"
- try
- FontWest.Select 1
- Vergleich2$ = FontWest.GetSelText
- Vergleich1% = StyleWest.GetItemCount
- StyleWest.Select Vergleich1%
- Vergleich3$ = StyleWest.GetSelText
- SizeWest.Select 24
- catch
- Font.Select 1
- Vergleich2$ = Font.GetSelText
- Vergleich1% = Style.GetItemCount
- Style.Select Vergleich1%
- Vergleich3$ = Style.GetSelText
- Size.Select 24
- endcatch
- wait 100
- Kontext
- printlog "On Tabpage 'Font Effects' adjust settings"
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- Blinking.Check
- Kontext
- Active.Setpage TabFontPosition
- printlog "On Tabpage 'Font Position ' adjust settings"
- Kontext "TabFontPosition"
- Spacing.Select 2
- SpacingBy.More 3
- Vergleich4$ = SpacingBy.GetText
- if Right ( Vergleich4$, 2 ) <> "pt" then Warnlog "Wrong Unit at Spacing by"
- Kontext
- printlog "On Tabpage 'Hyperlink' adjust settings"
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- URLName.SetText "www.mikeportnoy.com"
- NameText.SetText "Link created by testtool"
- TargetFrame.Select 2
-
- UnbesuchterLink.Select 6
- Kontext
- active.SetPage TabHintergrund
- kontext "TabHintergrund"
- Sleep 1
- Hintergrundfarbe.Typekeys "<Down><Left>", 4
- TabHintergrund.OK
- printlog "Close dialog"
-
- printlog " Type Home- and Right-Key"
- Call wTypeKeys "<Home><Right>"
-
- printlog "recheck settings made with opening Format->Character"
- FormatCharacter
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- if FontWest.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ FontWest.GetSelText
- if StyleWest.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
- catch
- if Font.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ Font.GetSelText
- if Style.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
- endcatch
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing activated, is not the 2. but " + Spacing.GetSelText
- if SpacingBy.GetText <> Vergleich4$ then Warnlog "Wrong Value selected. Not: " + Vergleich4$ +" but " + SpacingBy.GetText
-
- Kontext
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i105855#Wrong URL : " + URLName.GetText + " (#BugID:90982)"
- SetClipboard UrlName.Gettext
- if NameText.GetText <> "Link created by testtool" then Warnlog "#i105855#Wrong Linkname : " + NameText.GetText
- if TargetFrame.GetSelIndex <> 2 then Warnlog "#i105855#Wrong Target selected : " + TargetFrame.GetSelText
- if UnbesuchterLink.GetSelIndex <> 6 then Warnlog "#i105855#Wrong Style for unused Link :" + UnbesuchterLink.GetSelIndex
- TabHyperlinkZeichen.OK
-
- printlog "Save document as '../user/work/format1.sxw' and close it"
- if gApplication = "WRITER" then
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odt", "writer8" )
- else
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odm", "writer8" ) 'gMasterDocFilter
- end if
- Call hCloseDocument
- printlog "re-open previous saved document"
- if gApplication = "WRITER" then
- hFileOpen( gOfficePath & "user\work\format1.odt" )
- else
- hFileOpen( gOfficePath & "user\work\format1.odm" )
- end if
- Call wTypeKeys "<Mod1 Home><Right>"
- Wait 500
-
- printlog "Execute Format->Character and re-check settings made"
- FormatCharacter
-
- Sleep 3
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- if FontWest.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ FontWest.GetSelText
- if StyleWest.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
- catch
- if Font.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ Font.GetSelText
- if Style.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
- endcatch
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing selected. Not 2. but " + Spacing.GetSelText
- if SpacingBy.GetText <> Vergleich4$ then Warnlog "Wrong value selectzed. Not " + Vergleich4$ +" but " + SpacingBy.GetText
- Kontext
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i105855#Wrong URL : " + URLName.GetText
- if NameText.GetText <> "Link created by testtool" then Warnlog "#i105855#Wrong Linkname : " + NameText.GetText
- if TargetFrame.GetSelIndex <> 2 then Warnlog "#i105855#Wrong Target selected : " + TargetFrame.GetSelText
- TabHyperlinkZeichen.OK
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tFormatCharacterOverline1
- Dim iCounter as integer
- Dim CompareValue1 as string
- Dim CompareValue2 as string
- Dim CompareValue3 as string
- Dim CompareValue4 as string
-
- Printlog " New Writer document."
- Call hNewDocument
- Printlog " Format Character."
- FormatCharacter
- Printlog " Tab 'Font Effects'."
- Kontext
- active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Printlog " Select Overline Listbox."
- Printlog " Default (first) entry is 'Without'."
- Overline.Select (1)
-
- Printlog " Select Colour Listbox."
- Printlog " Verify that Colour List box is DISABLED."
- try
- OverlineColor.Select (1)
- warnlog "Color-listbox was falsely enabled."
- catch
- printlog "Color-listbox is correctly disabled by default."
- endcatch
-
- Printlog " Select Overline Listbox again."
- Printlog " Select second entry 'Single'."
- Overline.Select (2)
-
- Printlog " Step down all 14 entries (Last: 'Double Wave' in English UI)."
- for iCounter = 2 to Overline.GetItemCount
- Overline.Select (iCounter)
- wait (500)
- next iCounter
-
- Printlog " Select Color Listbox."
- Printlog " Verify that Color List box is ENABLED."
- try
- OverlineColor.Select (OverlineColor.GetItemCount)
- printlog "Color-listbox is correctly enabled."
- catch
- warnlog "Color-listbox was falsely disabled."
- endcatch
-
- 'CompareValue2 = OverlineColor.GetSelIndex
-
- Printlog " Close dialog."
- TabFontEffects.Ok
- Printlog " Close document."
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
-
-testcase tFormatCharacterOverline2
- Dim CompareValue1 as string
- Dim CompareValue2 as string
- Dim CompareValue3 as string
- Dim CompareValue4 as string
- Dim SaveFilePathAndName as String
-
- SaveFilePathAndName = gOfficePath + "user\work\OverlineTest2.odt"
-
- Printlog " New Writer document."
- Call hNewDocument
- Printlog " Type 'Overline Single Red' (without quotes)."
- Call wTypeKeys "Overline Single Red"
- Printlog " Select entire string."
- Call wTypeKeys "<HOME>"
- Call wTypeKeys "<SHIFT END>"
- Printlog " Format Character."
- FormatCharacter
- Printlog " Tab 'Font Effects'."
- Kontext
- active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Printlog " Select Overline Listbox."
- Printlog " Select second entry 'Single'."
- Overline.Select (2)
-
- Printlog " Select Color Listbox."
- Printlog " In Color List box, select Color 'Red', OK."
- OverlineColor.Select (6)
-
- CompareValue1 = Overline.GetSelIndex
- CompareValue2 = OverlineColor.GetSelIndex
-
- Printlog " Close dialog."
- TabFontEffects.Ok
-
- Printlog " Save document."
- Call hFileSaveAsKill ( SaveFilePathAndName )
- Printlog " Reload document."
- FileReload
- Printlog " Select entire string."
- Call wTypeKeys "<HOME><SHIFT END>"
- Printlog " Format Character."
- FormatCharacter
- Printlog " Tab 'Font Effects'."
- Kontext
- active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Printlog " Verify that 'Overline Single' and Overline Colour 'Red' is set."
-
- If Overline.GetSelIndex <> CompareValue1 then warnlog "The Overline-Value wasn't saved after closing the options-dialogue."
- If OverlineColor.GetSelIndex <> CompareValue2 then warnlog "The Color-Value wasn't saved after closing the options-dialogue."
-
- Printlog " Close dialog."
- TabFontEffects.Ok
- Printlog " Close document."
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
deleted file mode 100644
index ef6280b51cfd..000000000000
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
+++ /dev/null
@@ -1,878 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the functionality of Page Formatting / Page Styles - 1
-'*
-'************************************************************************
-'*
-' #1 tFormatPage_1 'Open format/page dialog
-' #1 tFormatPage_2 'Test Portrait in tabpage Page
-' #1 tFormatPage_3 'Test Landscape in tabpage Page
-' #1 tFormatPage_4 'Width and Height boxes must change after changing between Portrait and Landscape
-' #1 tFormatPage_5 'The sum of "Left margin" and "Right margin" must always stay below the Paper width.(Same for top/bottom and height)
-' #1 tFormatPage_6 'Test predefined formats
-' #1 tFormatPage_7 'Test user defined formats
-' #1 tFormatPage_8 'Check Listbox Text Direction when Asian language support is enabled
-' #1 tFormatPage_9 'Check Listbox Text Direction when CTL is enabled
-' #1 tFormatPage_10 'when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox
-' #1 TFormatPage_11 'Test Page layout - Right and left
-' #1 tFormatPage_12 'Test Page layout - Mirrored
-' #1 tFormatPage_13 'Test Page layout - Only right
-' #1 tFormatPage_14 'Test Page layout - Only left
-' #1 tFormatPage_15 'Insertfields / other / Document / Type/Page -> As page Style must be set
-'*
-'\***********************************************************************
-
-testcase tFormatPage_1
-
- PrintLog "- Open format/page dialog"
- '/// <b> Open format/page dialog </b> ///
-
- Call hNewDocument
-
- '/// 1. via Mouse clicks in Menu: Format-Page
- try
- fFormatPageWriter("TabSeite")
- TabSeite.Cancel
- catch
- endcatch
-
- '/// 2. via shortcuts in menu (manual test is needed)
-
- '/// 3. via Context menu when Cursor is in the document
- try
- hMenuSelectNr(5)
- Sleep 2
- hMenuSelectNr(5)
- Sleep 2
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_2
-
- Dim sTestString as String
- Dim iRepectLength as Integer
- Dim iFormat as Integer
-
- sTestString = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQ"
- iRepectLength = 26
- iFormat = 2 'A4 paper
-
- PrintLog "- Test Portrait in tabpage Page"
- '/// <b> Test Portrait in tabpage Page </b> ///
-
- Call hNewDocument
-
- '/// Input a long test string
- Call wTypeKeys sTestString
-
- '/// Format/Page , tabpage page , check 'Portrait'
- fFormatPageWriter("TabSeite")
- Papierformat.Select iFormat
- Wait 500
- Hoch.Check
- Wait 500
- TabSeite.OK
-
- '/// Check if Checkbox -- Portrait works fine
- Call wTypeKeys "<Shift Home>"
- EditCopy
- wait 500
- if Len(GetClipboardText) < iRepectLength then Warnlog "Checkbox Portrait doesn't work fine!"
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_3
-
- Dim iTextLength as integer
-
- PrintLog "- Test Landscape in tabpage Page"
- '/// Test Landscape in tabpage Page
-
- Call hNewDocument
-
- Call wOptionsUndo( "Grundschriften" )
-
- '/// Input a long test string
- Call wTypeKeys "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQ"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iTextLength = Len(GetClipBoardtext)
-
- '/// Format/Page , tabpage page , check 'Landscape'
- fFormatPageWriter("TabSeite")
- Papierformat.Select 2 ' A4 Paper
- Wait 500
- Quer.Check
- Wait 500
- TabSeite.OK
-
- '/// Check if Checkbox -- Landscape works fine
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- wait 500
- if Len(GetClipboardText) <= iTextLength then Warnlog "Checkbox Landscape doesn't work fine!"
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_4
-
- Dim iFormat as Integer
- Dim sWidth as String
- Dim sHeight as String
-
- iFormat = 2 'A4 paper
-
- PrintLog "- Width and Height boxes must change after changing between Portrait and Landscape"
- '/// Width and Height boxes must change after changing between Portrait and Landscape
-
- Call hNewDocument
-
- '/// Format/Page tabpage page ,
- '/// + check 'Portrait' first and get width and height ,
- '/// + then change from Portrait to Landscape
- '/// + check if the change is effective
- fFormatPageWriter("TabSeite")
- Papierformat.Select iFormat
- Wait 500
- Hoch.Check
- Sleep 1
- sWidth = Breite.GetText
- sHeight = Hoehe.GetText
-
- Quer.Check
- Sleep 1
- if Breite.GetText <> sHeight then Warnlog "Width isn't changed when changing from Portrait to Landscape !"
- if Hoehe.GetText <> sWidth then Warnlog "Height isn't changed when changing from Portrait to Landscape !"
- TabSeite.Cancel
-
- '/// Format/Page tabpage page ,
- '/// + check 'Landscape' first and get width and height ,
- '/// + then change from Landscape to Portrait
- '/// + check if the change is effective
- fFormatPageWriter("TabSeite")
- Papierformat.Select iFormat
- Wait 500
- Quer.Check
- Sleep 1
- sWidth = Breite.GetText
- sHeight = Hoehe.GetText
-
- Hoch.Check
- Sleep 1
- if Breite.GetText <> sHeight then Warnlog "Width isn't changed when changing from Landscape to Portrait !"
- if Hoehe.GetText <> sWidth then Warnlog "Height isn't changed when changing from Landscape to Portrait !"
- TabSeite.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_5
-
- Dim iFormat as Integer
- Dim sWidth as String , sHeight as String
- Dim sLeft as String , sRight as String , sUp as String , sBottom as String ' set page size
- Dim sLeft1 as String , sRight1 as String , sUp1 as String , sBottom1 as String ' get page size
-
- iFormat = 2 'A4 paper
- sWidth = "20" + gSeperator + "00" + gMeasurementUnit
- sHeight = "25" + gSeperator + "00" + gMeasurementUnit
-
- sLeft = "15" + gSeperator + "00" + gMeasurementUnit
- sRight = "15" + gSeperator + "00" + gMeasurementUnit
- sUp = "15" + gSeperator + "00" + gMeasurementUnit
- sBottom = "15" + gSeperator + "00" + gMeasurementUnit
-
- sLeft1 = "15" + gSeperator + "00" + gMeasurementUnit
- sRight1 = "4" + gSeperator + "50" + gMeasurementUnit
- sUp1 = "15" + gSeperator + "00" + gMeasurementUnit
- sBottom1 = "9" + gSeperator + "50" + gMeasurementUnit
-
- PrintLog "- The sum of 'Left margin' and 'Right margin' must always stay below the Paper width."
- PrintLog " (Same for top/bottom and height)"
- '/// The sum of "Left margin" and "Right margin" must always stay below the Paper width.
- '/// (Same for top/bottom and height)
-
- Call hNewDocument
-
- '/// Format/Page , tabpage Page , set width and height , close the dialog
- fFormatPageWriter("TabSeite")
- Papierformat.Select iFormat
- Wait 500
- Hoch.Check
- Sleep 1
- Breite.SetText sWidth
- Wait 500
- Hoehe.SetText sHeight
- Wait 500
- TabSeite.OK
-
- '/// Format/Page , tabpage Page ,
- '/// + Set the sum of "Left margin" and "Right margin" more than Width
- fFormatPageWriter("TabSeite")
- Links.SetText sLeft
- Wait 500
- Rechts.SetText sRight
- Wait 500
- TabSeite.OK
-
- '/// Check if the setting is OK
- fFormatPageWriter("TabSeite")
- if Left$(Links.GetText,5) <> Left$(sLeft1,5) then Warnlog "The Margin(left) is wrong!"
- if Left$(Rechts.GetText,4) <> Left$(sRight1,4) then Warnlog "The Margin(right) is wrong!"
- TabSeite.Cancel
-
- '/// Format/Page , tabpage Page ,
- '/// + Set the sum of "Up margin" and "Bottom margin" more than Heigth
- fFormatPageWriter("TabSeite")
- Oben.SetText sUp
- Wait 500
- Unten.SetText sBottom
- Wait 500
- TabSeite.OK
-
- '/// Check if the setting is OK
- fFormatPageWriter("TabSeite")
- if Left$(Oben.GetText,5) <> Left$(sUp1,5) then Warnlog "The Margin(Up) is wrong!"
- if Left$(Unten.GetText,4) <> Left$(sBottom1,4) then Warnlog "The Margin(Bottom) is wrong!"
- TabSeite.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_6
-
- Dim iPaperTray as Integer , iPageLayout as Integer
- Dim iFormatLayout as Integer , iReferenceStyle as Integer
- Dim sWidth as String, sHeight as String
- Dim sLeft as String , sRight as String , sUp as String , sBottom as String
-
- iPaperTray = 1 : iPageLayout = 2
- iFormatLayout = 2 : iReferenceStyle = 5
-
- sWidth = "20" + gSeperator + "00" + gMeasurementUnit
- sHeight = "25" + gSeperator + "00" + gMeasurementUnit
- sLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sRight = "2" + gSeperator + "00" + gMeasurementUnit
- sUp = "2" + gSeperator + "00" + gMeasurementUnit
- sBottom = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Pre-defined formats"
- '/// Test Pre-defined formats
-
- Call hNewDocument
-
- '/// Format/Page , tabpage page , do some configuration
- fFormatPageWriter("TabSeite")
- Hoch.Check
- Wait 500
- Breite.SetText sWidth
- Wait 500
- Hoehe.SetText sHeight
- Wait 500
- Schacht.Select iPaperTray
- Wait 500
- Links.SetText sLeft
- Wait 500
- Rechts.SetText sRight
- Wait 500
- Oben.SetText sUp
- Wait 500
- Unten.SetText sBottom
- Wait 500
- Seitenlayout.Select iPageLayout
- Wait 500
- Numerierung.Select iFormatLayout
- Wait 500
- Einschalten.Check
- Sleep 1
- AbsatzVorlage.Select iReferenceStyle
- Wait 500
- TabSeite.OK
-
- '/// Save the file , close the file and reload the file
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\tFormatPage_6.odt", "writer8")
- Call hCloseDocument
-
- Call hNewDocument
-
- hFileOpen( gOfficepath + "user\work\tFormatPage_6.odt")
-
- '/// Check if Pre-defined formats are correct
- fFormatPageWriter("TabSeite")
- if Hoch.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
- if Left$(Breite.GetText,5) <> Left$(sWidth,5) then Warnlog "The width is wrong!"
- if Left$(Hoehe.GetText,5) <> Left$(sHeight,5) then Warnlog "The height is wrong!"
- if Schacht.GetSelIndex <> iPaperTray then Warnlog "The Paper tray is wrong!"
- if Left$(Links.GetText,4) <> Left$(sLeft,4) then Warnlog "The Margin(left) is wrong!"
- if Left$(Rechts.GetText,4) <> Left$(sRight,4) then Warnlog "The Margin(right) is wrong!"
- if Left$(Oben.GetText,4) <> Left$(sUp,4) then Warnlog "The Margin(top) is wrong!"
- if Left$(Unten.GetText,4) <> Left$(sBottom,4) then Warnlog "The Margin(bottom) is wrong!"
- if Seitenlayout.GetSelIndex <> iPageLayout then Warnlog "The paper layout is wrong!"
- if Numerierung.GetSelIndex <> iFormatLayout then Warnlog "The layout settings(format) is wrong!"
- if Einschalten.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
- if AbsatzVorlage.GetSelIndex <> iReferenceStyle then Warnlog "The reference style is wrong!"
- TabSeite.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_7
-
- Dim iPaperTray as Integer , iPageLayout as Integer
- Dim iFormatLayout as Integer , iReferenceStyle as Integer
- Dim sWidth as String , sHeight as String
- Dim sLeft as String , sRight as String , sUp as String , sBottom as String
-
- iPaperTray = 1 : iPageLayout = 2
- iFormatLayout = 2 : iReferenceStyle = 5
-
- sWidth = "20" + gSeperator + "00" + gMeasurementUnit
- sHeight = "25" + gSeperator + "00" + gMeasurementUnit
- sLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sRight = "2" + gSeperator + "00" + gMeasurementUnit
- sUp = "2" + gSeperator + "00" + gMeasurementUnit
- sBottom = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test user defined formats"
- '/// Test user defined formats
-
- Call hNewDocument
-
- '/// Format/Page , tabpage page , do some configuration
- fFormatPageWriter("TabSeite")
- Hoch.Check
- Wait 500
- Breite.SetText sWidth
- Wait 500
- Hoehe.SetText sHeight
- Wait 500
- Schacht.Select iPaperTray
- Wait 500
- Links.SetText sLeft
- Wait 500
- Rechts.SetText sRight
- Wait 500
- Oben.SetText sUp
- Wait 500
- Unten.SetText sBottom
- Wait 500
- Seitenlayout.Select iPageLayout
- Wait 500
- Numerierung.Select iFormatLayout
- Wait 500
- Einschalten.Check
- Sleep 1
- AbsatzVorlage.Select iReferenceStyle
- Wait 500
- TabSeite.OK
-
- '/// Check if user defined formats are correct
- fFormatPageWriter("TabSeite")
- if Hoch.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
- if Left$(Breite.GetText,5) <> Left$(sWidth,5) then Warnlog "The width is wrong!"
- if left$(Hoehe.GetText,5) <> Left$(sHeight,5) then Warnlog "The height is wrong!"
- if Schacht.GetSelIndex <> iPaperTray then Warnlog "The Paper tray is wrong!"
- if Left$(Links.GetText,4) <> Left$(sLeft,4) then Warnlog "The Margin(left) is wrong!"
- if Left$(Rechts.GetText,4) <> Left$(sRight,4) then Warnlog "The Margin(right) is wrong!"
- if Left$(Oben.GetText,4) <> Left$(sUp,4) then Warnlog "The Margin(top) is wrong!"
- if Left$(Unten.GetText,4) <> Left$(sBottom,4) then Warnlog "The Margin(bottom) is wrong!"
- if Seitenlayout.GetSelIndex <> iPageLayout then Warnlog "The paper layout is wrong!"
- if Numerierung.GetSelIndex <> iFormatLayout then Warnlog "The layout settings(format) is wrong!"
- if Einschalten.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
- if AbsatzVorlage.GetSelIndex <> iReferenceStyle then Warnlog "The reference style is wrong!"
- TabSeite.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_8
- Dim RecheckCTLSupport as string
- Dim RecheckAsianSupport as string
- RecheckCTLSupport = gCTLSup
- RecheckAsianSupport = gAsianSup
-
- Select Case iSystemSprache
- Case 81, 82, 86, 88
- printlog "No test with asian lovale, because checkbox 'Asian language support' is disabled by default!"
- goto endsub
- end select
-
- PrintLog "- Check Listbox Text Direction when Asian language support is enabled"
- '/// Check Listbox Text Direction when Asian language support is enabled
-
- Call hNewDocument
-
- '/// Set CTL unable
- Call ActiveDeactivateCTLSupport(FALSE)
- '/// Enable Asian Support
- Call ActiveDeactivateAsianSupport(TRUE)
- '/// - the Listbox Text Direction should be visible when Asian language support is enabled
- Call fFormatPageWriter("TabSeite")
- if Not Textfluss.IsVisible then
- Warnlog "Listbox 'Text Direction' isn't visible though asian support is enabled"
- end if
- TabSeite.Cancel
-
- '/// Disable Asian Support
- Call ActiveDeactivateAsianSupport(FALSE)
- '/// - the Listbox Text Direction should be invisible when Asian language support is unabled
- Call fFormatPageWriter("TabSeite")
- if Textfluss.IsVisible then
- Warnlog "Listbox 'Text Direction' is visible though asian support is disabled"
- end if
- TabSeite.Cancel
-
- if RecheckCTLSupport = True then
- Call ActiveDeactivateCTLSupport(TRUE)
- else
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
- if RecheckAsianSupport = True then
- Call ActiveDeactivateAsianSupport(TRUE)
- else
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_9
-
- Dim RecheckCTLSupport as string
- Dim RecheckAsianSupport as string
- RecheckCTLSupport = gCTLSup
- RecheckAsianSupport = gAsianSup
-
- PrintLog "- Check Listbox Text Direction when CTL is enabled"
- '/// Check Listbox Text Direction when CTL is enabled
-
- Call hNewDocument
-
- '/// Set CTL enabled
- Call ActiveDeactivateAsianSupport(FALSE)
- Call ActiveDeactivateCTLSupport(TRUE)
- '/// Check if 'Text direction' appears
- Call fFormatPageWriter("TabSeite")
- if Textfluss.IsVisible = False then
- Warnlog "Right to Left (horizontal) should appear when CTL is checked!"
- end if
- TabSeite.Cancel
-
- '/// Set CTL unable
- Call ActiveDeactivateCTLSupport(FALSE)
-
- '/// Check if 'Text direction' appears
- Call fFormatPageWriter("TabSeite")
- if Textfluss.IsVisible = TRUE then
- Warnlog "Left to Right (horizontal) appears though CTL is disabled"
- end if
- TabSeite.Cancel
-
- if RecheckCTLSupport = True then
- Call ActiveDeactivateCTLSupport(TRUE)
- else
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
- if RecheckAsianSupport = True then
- Call ActiveDeactivateAsianSupport(TRUE)
- else
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_10
-
- Dim RecheckCTLSupport as string
- Dim RecheckAsianSupport as string
- RecheckCTLSupport = gCTLSup
- RecheckAsianSupport = gAsianSup
-
- PrintLog "- when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox"
- '/// when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox
-
- Call hNewDocument
-
- '/// Set Asian support enabled and Set CTL enabled
- Call ActiveDeactivateAsianSupport(TRUE)
- Call ActiveDeactivateCTLSupport(TRUE)
-
- '/// Check if there are 3 entires in Text Direction listbox
- fFormatPageWriter("TabSeite")
- if Textfluss.GetItemCount <> 3 then
- Warnlog "There should be 3 entries in Text direction listbox , but get " & Textfluss.GetItemCount
- end if
- TabSeite.Cancel
-
- if RecheckCTLSupport = True then
- Call ActiveDeactivateCTLSupport(TRUE)
- else
- Call ActiveDeactivateCTLSupport(FALSE)
- end if
- if RecheckAsianSupport = True then
- Call ActiveDeactivateAsianSupport(TRUE)
- else
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_11
-
- Dim sTestFile as String
- Dim sMarginsLeft as String
- Dim iPageLayout as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
- sMarginsLeft = "10" + gSeperator + "00" + gMeasurementUnit
- iPageLayout = 1
-
- PrintLog "- Test Page layout - Right and left"
- '/// Test Page layout - Right and left
-
- Call hNewDocument
-
- '/// Open a test file ,
- '/// + There are 2 pictures in 2 pages separately ,
- '/// + and they are anchored as character
- hFileOpenLocally( sTestFile )
-
-
- '/// FormatPage / tabpage Page , Set left margins to 10cm ,
- '/// + and set page layout to "Right to left"
- fFormatPageWriter("TabSeite")
- Links.SetText sMarginsLeft
- Sleep 1
- Seitenlayout.Select iPageLayout
- Sleep 1
- TabSeite.OK
-
- '/// Set focus to first picture , format/anchor to Page
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
-
- FormatAnchorToPage
- Sleep 1
-
- '/// Check its position
- fPositionAndSize("TabPositionAndSizeWriter")
- if Left$(Horizontalby.Gettext,5) <> Left$(sMarginsLeft,5) then Warnlog "1-The position X isn't right , should be " &sMarginsLeft & " but get " & Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Set focus to second picture , format/anchor to Page
- Call wTypeKeys "<Tab>"
-
- FormatAnchorToPage
- Sleep 1
-
- '/// Check its position
- fPositionAndSize("TabPositionAndSizeWriter")
- if Left$(Horizontalby.Gettext,5) <> Left$(sMarginsLeft,5) then Warnlog "2-The position X isn't right , should be " &sMarginsLeft & " but get " & Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_12
-
- Dim sTestFile as String
- Dim sMarginsLeft as String
- Dim sMarginsRight as String
- Dim iPageLayout as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
- sMarginsLeft = "10" + gSeperator + "00" + gMeasurementUnit
- sMarginsRight = "4" + gSeperator + "00" + gMeasurementUnit
- iPageLayout = 2
-
- PrintLog "- Test Page layout - Mirrored"
- '/// Test Page layout - Mirrored
-
- Call hNewDocument
-
- '/// Open a test file ,
- '/// + there are 2 pictures in 2 pages separately , and they are anchored as character
- hFileOpenLocally( sTestFile )
-
-
- '/// FormatPage / tabpage Page , Set left margins to 10cm ,
- '/// + and set page layout to "Mirrored"
- fFormatPageWriter("TabSeite")
- Links.SetText sMarginsLeft
- Sleep 1
- Rechts.SetText sMarginsRight
- Sleep 1
- Seitenlayout.Select iPageLayout
- Sleep 1
- TabSeite.OK
-
- '/// Set focus to first picture , format/anchor to Page
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
-
- FormatAnchorToPage
- Sleep 1
-
- '/// Check its position
- fPositionAndSize("TabPositionAndSizeWriter")
- if Left$(Horizontalby.Gettext,5) <> Left$(sMarginsLeft,5) then Warnlog "1-The position X isn't right , should be " &sMarginsLeft & " but get " & Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Set focus to second picture , format/anchor to Page
- Call wTypeKeys "<Tab>"
-
- FormatAnchorToPage
- Sleep 1
-
- '/// Check its position
- fPositionAndSize("TabPositionAndSizeWriter")
- if Left$(Horizontalby.Gettext,4) <> Left$(sMarginsRight,4) then Warnlog "2-The position X isn't right , should be " &sMarginsRight & " but get " & Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_13
-
- Dim sTestFile as String
- Dim sPage1 as String
- Dim sPage2 as String
- Dim iPageLayout as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
- sPage1 = "1"
- sPage2 = "3"
- iPageLayout = 3
-
- PrintLog "- Test Page layout - Only right"
- '/// Test Page layout - Only right
-
- Call hNewDocument
-
- '/// Open a test file ,
- '/// + there are 2 pictures in 2 pages separately
- hFileOpenLocally( sTestFile )
-
-
- '/// FormatPage / tabpage Page , Set left margins to 10cm ,
- '/// + and set page layout to "Only right"
- fFormatPageWriter("TabSeite")
- Seitenlayout.Select iPageLayout
- Sleep 1
- TabSeite.OK
-
- '/// Set focus to first picture , Check if the picture is in first page
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> sPage1 then Warnlog "1st pic isn't in page 1 !"
- fCloseNavigator
- Wait 500
-
- '/// Set focus to second picture , Check if the picture is in third page
- Call wTypeKeys "<Tab>"
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> sPage2 then Warnlog "2nd pic isn't in page 3 !"
- fCloseNavigator
- Wait 500
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_14
- Dim sTestFile as String
- Dim sPage1 as String
- Dim sPage2 as String
- Dim iPageLayout as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\pageLayout.sxw")
- sPage1 = "2"
- sPage2 = "4"
- iPageLayout = 4
-
- PrintLog "- Test Page layout - Only left"
- '/// Test Page layout - Only left
-
- Call hNewDocument
-
- '/// Open a test file ,
- '/// + there are 2 pictures in 2 pages separately
- hFileOpenLocally( sTestFile )
-
-
- '/// FormatPage / tabpage Page , Set left margins to 10cm ,
- '/// + and set page layout to "Only left"
- fFormatPageWriter("TabSeite")
- Seitenlayout.Select iPageLayout
- Sleep 1
- TabSeite.OK
-
- '/// Set focus to first picture , Check if the picture is in first page
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> sPage1 then Warnlog "1st pic isn't in page 2 !"
- fCloseNavigator
- Wait 500
-
- '/// Set focus to second picture , Check if the picture is in third page
- Call wTypeKeys "<Tab>"
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> sPage2 then Warnlog "2nd pic isn't in page 4 !"
- fCloseNavigator
- Wait 500
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_15
- Dim sType as String
- Dim sFormat as String
-
- Select case iSprache
- case 01: sType = "Page"
- sFormat = "As Page Style"
- case 03: sType = "Página"
- sFormat = "Como estilo de página"
- case 31: sType = "Pagina"
- sFormat = "Zoals paginaopmaakprofiel"
- case 33 : sType = "Page"
- sFormat = "D'après le style de page"
- case 34 : sType = "Página"
- sFormat = "Como estilo de página"
- case 39 : sType = "Pagina"
- sFormat = "Come modello di pagina"
- case 46: sType = "Sida"
- sFormat = "Som sidformatmall"
- case 49: sType = "Seite"
- sFormat = "Wie Seitenvorlage"
- case 50: sType = "Stran"
- sFormat = "Kot predloga za stran"
- case 55 : sType = "Estatísticas"
- sFormat = "Como Estilo de Página"
- case 81 : sType = "ページ"
- sFormat = "ページスタイル�?�設定"
- case 82 : sType = "통계"
- sFormat = "페�?�지 스타�?� 설정"
- case 86 : sType = "页"
- sFormat = "和页�?�样�?相�?�"
- case 88 : sType = "�?"
- sFormat = "和�?�?�樣�?相�?�"
- case else : QAErrorLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- PrintLog "- Insertfields / other / Document / Type/Page -> As page Style must be set."
- '/// Insertfield / other / Document / Type/Page -> As page Style must be set.
-
- Call hNewDocument
-
- '/// InsertFields / other , tabpage document , select page ,
- '/// + check if Page format is right
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select sType
- Sleep 3
- if Formatliste.GetSelText <> sFormat then
- warnlog "the format setting should be " & sFormat & " but get " &Formatliste.GetSelText
- end if
- TabDokumentFeldbefehle.Close
-
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage2.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage2.inc
deleted file mode 100644
index a191efc726cf..000000000000
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage2.inc
+++ /dev/null
@@ -1,986 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the functionality of Page Formatting / Page Styles - 2
-'*
-'************************************************************************
-'*
-' #1 tFormatPage_16 'AutoFit height - Check (Header,change font size)
-' #1 tFormatPage_17 'AutoFit height - Check (Header,multiline content)
-' #1 tFormatPage_18 'AutoFit height - UnCheck (Header,change font size)
-' #1 tFormatPage_19 'AutoFit height - UnCheck (Header,multiline content)
-' #1 tFormatPage_20 'AutoFit height - Check (Footer,change font size)
-' #1 tFormatPage_21 'AutoFit height - Check (Footer,multiline content)
-' #1 tFormatPage_22 'AutoFit height - UnCheck (Footer,change font size)
-' #1 tFormatPage_23 'AutoFit height - UnCheck (Footer,multiline content)
-' #1 tFormatPage_24 'warning message should appear when turning off header -1
-' #1 tFormatPage_25 'warning message should appear when turning off header -2
-' #1 tFormatPage_26 'warning message should appear when turning off footer -1
-' #1 tFormatPage_27 'warning message should appear when turning off footer -2
-' #1 tFormatPage_28 'Header/footer is limited to 80% of height of page text area
-'*
-'\***********************************************************************
-
-testcase tFormatPage_16
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - Check (Header,change font size)"
- '/// AutoFit height - Check (Header,change font size)
-
- Call hNewDocument
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy = GetClipboardText
-
- '/// Insert a header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(3))
- Sleep 2
-
- '/// formatPage , tabpage header
- fFormatPageWriter("TabKopfzeile")
-
- '/// AutoFit Height should be checked
- if Hoehedynamisch.IsChecked <> TRUE then
- warnlog "AutoFit Height should be checked!"
- Hoehedynamisch.Check
- end if
- TabKopfzeile.OK
-
- '/// Input some test words and select them
- Call wTypeKeys "Test"
- Call wTypeKeys "<End><Shift Home>"
-
- '/// Set the bigger fonts to selection in the header
- fFormatCharacter("TabFont")
- try
- SizeWest.Select SizeWest.GetItemCount-2
- catch
- Size.Select Size.GetItemCount-2
- endcatch
- TabFont.OK
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in AutoFit Height!"
- Call fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_17
-
- Dim sTestFile as String
- Dim sDummy1 as String
- Dim sDummy2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - Check (Header,multiline content)"
- '/// AutoFit height - Check (Header,multiline content)
-
- Call hNewDocument
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy1 = GetClipboardText
-
- Call wTypeKeys "<Up>"
- Call wTypeKeys "<Home><Shift End>"
-
- EditCopy
- sDummy2 = GetClipboardText
-
- '/// Insert a header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(3))
- Sleep 2
-
- '/// formatPage , tabpage header
- fFormatPageWriter("TabKopfzeile")
-
- '/// AutoFit Height should be checked
- if Hoehedynamisch.IsChecked <> TRUE then
- warnlog "AutoFit Height should be checked!"
- Hoehedynamisch.Check
- end if
- TabKopfzeile.OK
-
- '/// Input some test words
- Call wTypeKeys "Test1"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "Test2"
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in AutoFit Height --1 !"
- fCloseNavigator
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy2
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height --2 !"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_18
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - UnCheck (Header,change font size)"
- '/// AutoFit height - UnCheck (Header,change font size)
-
- Call hNewDocument
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy = GetClipboardText
-
- '/// Insert a header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(3))
- Sleep 2
-
- '/// formatPage , tabpage header ,UnCheck AutoFit Height
- fFormatPageWriter("TabKopfzeile")
- Hoehedynamisch.UnCheck
- TabKopfzeile.OK
-
- '/// Input some test words
- Call wTypeKeys "Test"
- Call wTypeKeys "<End><Shift Home>"
-
- '/// Set the bigger fonts to selection in the header
- fFormatCharacter("TabFont")
- try
- SizeWest.Select SizeWest.GetItemCount-2
- catch
- Size.Select Size.GetItemCount-2
- endcatch
- TabFont.OK
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_19
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - UnCheck (Header,multiline content)"
- '/// AutoFit height - UnCheck (Header,multiline content)
-
- Call hNewDocument
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy = GetClipboardText
-
- '/// Insert a header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(3))
- Sleep 2
-
- '/// formatPage , tabpage header , Uncheck AutoFit Height
- fFormatPageWriter("TabKopfzeile")
- Hoehedynamisch.UnCheck
- TabKopfzeile.OK
-
- '/// input some test words
- Call wTypeKeys "Test1"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "Test2"
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_20
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - Check (Footer,change font size)"
- '/// AutoFit height - Check (Footer,change font size)
-
- Call hNewDocument
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy = GetClipboardText
-
- '/// Insert a footer
- DocumentWriter.UseMenu
- Sleep 2
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- Call hMenuFindSelect (".uno:InsertPageFooter?PageStyle:string=Default&On:bool=true", true, 3, true) 'Find "Insert:Footer:Default" and call the slot.
-' MenuSelect(Menugetitemid(3))
- Sleep 2
-
- '/// formatPage , tabpage footer
- fFormatPageWriter("TabFusszeile")
-
- '/// AutoFit Height should be checked
- if Hoehedynamisch.IsChecked <> TRUE then
- warnlog "AutoFit Height should be checked!"
- Hoehedynamisch.Check
- end if
- TabFusszeile.OK
-
- Call wTypeKeys "Test"
- Call wTypeKeys "<End><Shift Home>"
-
- '/// Set the bigger fonts to selection in the footer
- fFormatCharacter("TabFont")
- try
- SizeWest.Select SizeWest.GetItemCount-2
- catch
- Size.Select Size.GetItemCount-2
- endcatch
- TabFont.OK
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in AutoFit Height!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_21
-
- Dim sTestFile as String
- Dim sDummy1 as String
- Dim sDummy2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - Check (Footer,multiline content)"
- '/// AutoFit height - Check (Footer,multiline content)
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy1 = GetClipboardText
-
- '/// Again 1 step up
- Call wTypeKeys "<Up>"
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in current line
- EditCopy
- sDummy2 = GetClipboardText
-
- printlog " Insert a footer"
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- Call hMenuFindSelect (".uno:InsertPageFooter?PageStyle:string=Default&On:bool=true", true, 3, true) 'Find "Insert:Footer:Default" and call the slot.
- Sleep 2
-
- '/// formatPage , tabpage footer
- fFormatPageWriter("TabFusszeile")
-
- '/// AutoFit Height should be checked
- if Hoehedynamisch.IsChecked <> TRUE then
- warnlog "AutoFit Height should be checked!"
- Hoehedynamisch.Check
- end if
- TabFusszeile.OK
-
- '/// input some test words
- Call wTypeKeys "Test1"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "Test2"
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in AutoFit Height --1 !"
- fCloseNavigator
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy2
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height --2 !"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_22
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - UnCheck (Footer,change font size)"
- '/// AutoFit height - UnCheck (Footer,change font size)
-
- Call hNewDocument
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy = GetClipboardText
-
- '/// Insert a footer
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- Call hMenuFindSelect (".uno:InsertPageFooter?PageStyle:string=Default&On:bool=true", true, 3, true) 'Find "Insert:Footer:Default" and call the slot.
-' MenuSelect(Menugetitemid(3))
- Sleep 2
-
- '/// formatPage , tabpage footer ,UnCheck AutoFit Height
- fFormatPageWriter("TabFusszeile")
- Hoehedynamisch.UnCheck
- TabFusszeile.OK
-
- '/// input some test words
- Call wTypeKeys "Test"
- Call wTypeKeys "<End><Shift Home>"
-
- '/// Set the bigger fonts to selection in the footer
- fFormatCharacter("TabFont")
- try
- SizeWest.Select SizeWest.GetItemCount-2
- catch
- Size.Select Size.GetItemCount-2
- endcatch
- TabFont.OK
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_23
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testForAutoFit.sxw")
-
- PrintLog "- AutoFit height - UnCheck (Footer,multiline content)"
- '/// AutoFit height - UnCheck (Footer,multiline content)
-
- '/// Open test file testForAutoFit.sxw
- hFileOpenLocally( sTestFile )
-
-
- '/// Open Navigator and enter as page number 2
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Seitennummer.TypeKeys "<Return>"
- '/// Close Navigator
- ViewNavigator
-
- '/// Step 3 times up in document
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Remember number in line
- EditCopy
- sDummy = GetClipboardText
-
- '/// Insert a footer
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- Call hMenuFindSelect (".uno:InsertPageFooter?PageStyle:string=Default&On:bool=true", true, 3, true) 'Find "Insert:Footer:Default" and call the slot.
-' MenuSelect(Menugetitemid(3))
- Sleep 2
-
- '/// formatPage , tabpage footer ,Uncheck AutoFit Height
- fFormatPageWriter("TabFusszeile")
- Hoehedynamisch.UnCheck
- TabFusszeile.OK
-
- '/// input some test words
- Call wTypeKeys "Test1"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "Test2"
-
- '/// Check if AutoFit Height works well
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in AutoFit Height!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_24
-
- PrintLog "- warning message should appear when turning off header -1"
- '/// warning message should appear when turning off header -1
-
- Call hNewDocument
-
- '/// Insert a header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// formatPage , tabpage header
- fFormatPageWriter("TabKopfzeile")
-
- '/// + turn off header (uncheck Header on) ,
- '/// + a warning message should appear
- KopfzeileMitAbstand.UnCheck
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.No
- else
- warnlog "There should be a warning message appear when turn off header !"
- end if
-
- Kontext "TabKopfzeile"
- TabKopfzeile.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_25
-
- PrintLog "- warning message should appear when turning off header -2"
- '/// warning message should appear when turning off header -2
-
- Call hNewDocument
-
- '/// Insert a header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// turn off header from menu
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.No
- else
- warnlog "There should be a warning message appear when turn off header !"
- end if
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_26
-
- PrintLog "- warning message should appear when turning off footer -1"
- '/// warning message should appear when turning off footer -1
-
- Call hNewDocument
-
- '/// Insert a footer
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// formatPage , tabpage footer
- fFormatPageWriter("TabKopfzeile")
-
- '/// + turn off header (uncheck Header on) ,
- '/// + a warning message should appear
- KopfzeileMitAbstand.UnCheck
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.No
- else
- warnlog "There should be a warning message appear when turn off footer !"
- end if
-
- Kontext "TabKopfzeile"
- TabKopfzeile.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_27
-
- PrintLog "- warning message should appear when turning off footer -2"
- '/// warning message should appear when turning off footer -2
-
- Call hNewDocument
-
- '/// Insert a footer
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// + turn off footer from menu ,
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// + the warning message should appear
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.No
- else
- warnlog "There should be a warning message appear when turn off footer !"
- end if
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_28
-
- Dim iFormat as Integer
- Dim sHeightInPage as String , sHeight as String
-
- iFormat = 2 'A4 paper
- sHeightInPage = "20" + gSeperator + "00" + gMeasurementUnit
- sHeight = "18" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Header/footer is limited to 80% of height of page text area "
- '/// Header/footer is limited to 80% of height of page text area
-
- Call hNewDocument
-
- '/// 1. Header is limited to 80% of height of page text area
- fFormatPageWriter("TabSeite")
- Papierformat.Select iFormat
- Wait 500
- Hoehe.SetText sHeightInPage
- Wait 500
- TabSeite.OK
-
- '/// formatPage , tabpage header ,
- '/// + turn on header , and set header height more
- '/// + than 80% of page height
- fFormatPageWriter("TabKopfzeile")
- KopfzeileMitAbstand.Check
- Sleep 2
- Hoehe.SetText sHeight
- Sleep 1
- TabKopfzeile.OK
-
- '/// Check if Header is limited to 80% of height of page text area
- fFormatPageWriter("TabKopfzeile")
- if StrToDouble(Hoehe.GetText) >= 16 then
- warnlog "Header height is > 16cm ! Get " & StrToDouble(Hoehe.GetText)
- end if
- TabKopfzeile.Cancel
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// 2. Footer is limited to 80% of height of page text area
- fFormatPageWriter("TabSeite")
- Papierformat.Select iFormat
- Wait 500
- Hoehe.SetText sHeightInPage
- Wait 500
- TabSeite.OK
-
- '/// formatPage , tabpage footer ,
- '/// + turn on footer , and set footer height more
- '/// + than 80% of page height
- fFormatPageWriter("TabFusszeile")
- FusszeileMitAbstand.Check
- Sleep 2
- Hoehe.SetText sHeight
- Sleep 1
- TabFusszeile.OK
-
- '/// Check if footer is limited to 80% of height of page text area
- fFormatPageWriter("TabFusszeile")
- if StrToDouble(Hoehe.GetText) >= 16 then
- warnlog "Footer height is > 16cm ! Get " & StrToDouble(Hoehe.GetText)
- end if
- TabFusszeile.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
deleted file mode 100644
index df0f810f9093..000000000000
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
+++ /dev/null
@@ -1,1372 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the functionality of Page Formatting / Page Styles - 3
-'*
-'************************************************************************
-'*
-' #1 tFormatPage_29 'check for same content on left/right pages in header
-' #1 tFormatPage_30 'check for different content on left/right pages in header
-' #1 tFormatPage_31 'check for same content on left/right pages in footer
-' #1 tFormatPage_32 'check for different content on left/right pages in footer
-' #1 tFormatPage_33 'cursor should jump to header when inserting a header via menu
-' #1 tFormatPage_34 'cursor shouldn't jump to header when inserting a header via checking 'Header on'
-' #1 tFormatPage_35 'cursor should jump to footer when inserting a footer via menu
-' #1 tFormatPage_36 'cursor shouldn't jump to footer when inserting a footer via checking 'Footer on'
-' #1 tFormatPage_37 'Header must be applied to the current page style when inserting via menu
-' #1 tFormatPage_38 'Footer must be applied to the current page style when inserting via menu
-' #1 tFormatPage_39 'Set multi column via controls in page dialog
-' #1 tFormatPage_40 'Set multi column via spinfield in page dialog
-' #1 tFormatPage_41 'create columns with different width
-' #1 tFormatPage_42 'vary distance between columns
-' #1 tFormatPage_43 'seperator line between columns - change height/position of seperator
-' #1 tFormatPage_44 'seperator line between columns - different line formats
-' #1 tFormatPage_45 'shouldn't exist spacing after remove separator line
-' #1 tFormatPage_46 'Check if the settings are kept after reopening the file
-' #1 tFormatPage_47 'Test Travel through the 5 columns preset boxes
-'*
-'\***********************************************************************
-
-testcase tFormatPage_29
-
- Dim sTestFile as String , sNewContent as String
- Dim sContentInHeaderInPage1 as String , sContentInHeaderInPage2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testHeaderContent29.sxw")
- sContentInHeaderInPage1 = "Header1"
- sContentInHeaderInPage2 = "Header2"
- sNewContent = "MyTest"
-
- PrintLog "- check for same content on left/right pages in header"
- '/// check for same content on left/right pages in header
-
- Call hNewDocument
-
- '/// Open test file testHeaderContent29.sxw
- '/// + (The test file include 2 pages , and the
- '/// + content in header are different )
- hFileOpenLocally( sTestFile )
-
-
- '/// formatPage , tabpage header , check 'same content left/right'
- fFormatPageWriter("TabKopfzeile")
- InhaltLinksRechtsGleich.Check
- Sleep 1
- TabKopfzeile.OK
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInHeaderInPage2
- Sleep 1
- SearchAll.Click
- Sleep 1
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.OK
- else
- warnlog "The content should be same after checking 'same content left/right' !"
- end if
-
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- '/// type some new content in the header in page1
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInHeaderInPage1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<Backspace>" , 7
- Call wTypeKeys sNewContent
- Sleep 1
-
- '/// Check if the content in footer in page2 is changed
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInHeaderInPage1
- Sleep 1
- SearchAll.Click
- Sleep 1
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.OK
- else
- warnlog "The content should be same after changing content in header in 1st page!"
- end if
-
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_30
-
- Dim sTestFile as String
- Dim sContentInHeader as String , sNewContent as String
- Dim sPage2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testHeaderContent30.sxw")
- sContentInHeader = "Header"
- sNewContent = "MyTest"
- sPage2 = "Second"
-
- PrintLog "- check for different content on left/right pages in header"
- '/// check for different content on left/right pages in header
-
- Call hNewDocument
-
- '/// Open test file testHeaderContent30.sxw
- '/// + (The test file include 2 pages , and the
- '/// + content in header is same )
- hFileOpenLocally( sTestFile )
-
-
- '/// formatPage , tabpage header , Uncheck 'same content left/right'
- fFormatPageWriter("TabKopfzeile")
- InhaltLinksRechtsGleich.UnCheck
- TabKopfzeile.OK
-
- '/// type some new content in the header in page1
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInHeader
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<Backspace>" , 6
- Call wTypeKeys sNewContent
- Sleep 1
-
- '/// Check if the content in footer in page2 is changed
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInHeader
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in Header in 1st page!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-
-testcase tFormatPage_31
-
- Dim sTestFile as String , sNewContent as String
- Dim sContentInFooterInPage1 as String , sContentInFooterInPage2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testFooterContent31.sxw")
- sContentInFooterInPage1 = "Footer1"
- sContentInFooterInPage2 = "Footer2"
- sNewContent = "MyTest"
-
- PrintLog "- check for same content on left/right pages in footer"
- '/// check for same content on left/right pages in footer
-
- Call hNewDocument
-
- '/// Open test file testFooterContent31.sxw
- '/// + (The test file include 2 pages , and the content
- '/// + in footer are different )
- hFileOpenLocally( sTestFile )
-
-
- '/// + formatPage , tabpage footer , check 'same content left/right'
- fFormatPageWriter("TabFusszeile")
- InhaltLinksRechtsGleich.Check
- Sleep 1
- TabFusszeile.OK
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInFooterInPage2
- Sleep 1
- SearchAll.Click
- Sleep 1
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.OK
- else
- warnlog "The content should be same after checking 'same content left/right' !"
- end if
-
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- '/// type some new content in the footer in page1
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInFooterInPage1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<Backspace>" , 7
- Call wTypeKeys sNewContent
- Sleep 1
-
- '/// Check if the content in footer in page2 is changed
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInFooterInPage1
- Sleep 1
- SearchAll.Click
- Sleep 1
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.OK
- else
- warnlog "The content should be same after changing content in footer in 1st page!"
- end if
-
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_32
-
- Dim sTestFile as String
- Dim sContentInFooter as String , sNewContent as String
- Dim sPage2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testFooterContent32.sxw")
- sContentInFooter = "Footer"
- sNewContent = "MyTest"
- sPage2 = "Second"
-
- PrintLog "- check for different content on left/right pages in footer"
- '/// check for different content on left/right pages in footer
-
- Call hNewDocument
-
- '/// Open test file testFooterContent32.sxw
- '/// + (The test file include 2 pages , and the
- '/// + content in footer is same )
- hFileOpenLocally( sTestFile )
-
-
- '/// formatPage , tabpage footer , Uncheck 'same content left/right'
- fFormatPageWriter("TabFusszeile")
- InhaltLinksRechtsGleich.UnCheck
- TabFusszeile.OK
-
- '/// type some new content in the footer in page1
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInFooter
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<Backspace>" , 6
- Call wTypeKeys sNewContent
- Sleep 1
-
- '/// Check if the content in the footer in page2 is changed
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sContentInFooter
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "Something wrong in Footer in 1st page!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_33
-
- Dim sTest as String
-
- sTest = "Test"
-
- PrintLog "- cursor should jump to header when inserting a header via menu"
- '/// cursor should jump to header when inserting a header via menu
-
- Call hNewDocument
-
- '/// Input some test words
- Call wTypeKeys "ABC"
-
- '/// Insert a header via menu
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// type some test words -- it should be in the header
- Call wTypeKeys sTest
-
- '/// check if the text in header is right
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Sleep 1
-
- EditSelectAll
- EditCopy
-
- if GetClipboardText <> sTest then warnlog "The content in the header isn't right, should be " &sTest & " but get " & GetClipboardText
-
- '/// Remove the header
- Kontext
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.Yes
- else
- warnlog "There should be a warning message appear when turn off header !"
- end if
- Sleep 1
-
- '/// Check if the content in header is removed
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.OK
- else
- warnlog "The content in header should be removed!"
- end if
-
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_34
-
- Dim sTest as String
-
- sTest = "Test"
-
- PrintLog "- cursor shouldn't jump to header when inserting a header via checking 'Header on'"
- '/// cursor shouldn't jump to header when inserting a header via checking 'Header on'
-
- Call hNewDocument
-
- Call wTypeKeys "ABC"
-
- '/// formatPage , tabpage header
- fFormatPageWriter("TabKopfzeile")
-
- '/// + turn on header (check Header on)
- KopfzeileMitAbstand.Check
- TabKopfzeile.OK
- Sleep 1
-
- '/// type some test words -- it should be in the header
- Call wTypeKeys sTest
-
- '/// check if the text in header is right
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- WholeWordsOnly.UnCheck
- Sleep 1
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Sleep 1
-
- EditSelectAll
- EditCopy
-
- if GetClipboardText <> "ABC"+sTest then warnlog "The content in the header isn't right, should be null"
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_35
-
- Dim sTest as String
-
- sTest = "Test"
-
- PrintLog "- cursor should jump to footer when inserting a footer via menu"
- '/// cursor should jump to footer when inserting a footer via menu
-
- Call hNewDocument
-
- Call wTypeKeys "ABC"
-
- '/// Insert a footer via menu
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// type some test words - it should be in the footer
- Call wTypeKeys sTest
-
- '/// check if the text in footer is right
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Sleep 1
-
- EditSelectAll
- EditCopy
-
- if GetClipboardText <> sTest then warnlog "The content in the footer isn't right, should be " &sTest & " but get " & GetClipboardText
-
- '/// Remove the footer
- Kontext
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.Yes
- else
- warnlog "There should be a warning message appear when turn off footer !"
- end if
- Sleep 1
-
- '/// Check if the content in footer is removed
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.OK
- else
- warnlog "The content in footer should be removed!"
- end if
-
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_36
-
- Dim sTest as String
-
- sTest = "Test"
-
- PrintLog "- cursor shouldn't jump to footer when inserting a footer via checking 'Footer on'"
- '/// cursor shouldn't jump to footer when inserting a footer via checking 'Footer on'
-
- Call hNewDocument
-
- Call wTypeKeys "ABC"
-
- '/// formatPage , tabpage footer
- fFormatPageWriter("TabKopfzeile")
-
- '/// + turn on footer (check Footer on)
- KopfzeileMitAbstand.Check
- TabKopfzeile.OK
- Sleep 1
-
- '/// type some test words - it should be in the footer
- Call wTypeKeys sTest
-
- '/// check if the text in footer is right
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- WholeWordsOnly.UnCheck
- Sleep 1
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Sleep 1
-
- EditSelectAll
- EditCopy
-
- if GetClipboardText <> "ABC"+sTest then warnlog "The content in the footer isn't right, should be null"
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_37
-
- Dim sHeader as String
-
- Select case iSprache
- case 01 : sHeader = "Header"
- case 31 : sHeader = "Koptekst"
- case 33 : sHeader = "En-tête"
- case 34 : sHeader = "Encabezamiento"
- case 39 : sHeader = "Riga d'intestazione"
- case 46 : sHeader = "Sidhuvud"
- case 49 : sHeader = "Kopfzeile"
- case 50 : sHeader = "Glava"
- case 55 : sHeader = "Cabeçalho"
- case 81 : sHeader = "ヘッダ"
- case 82 : sHeader = "머리글"
- case 86 : sHeader = "页眉"
- case 88 : sHeader = "é é¦–"
- case else : QAErrorLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- PrintLog "- Header must be applied to the current page style when inserting via menu"
- '/// Header must be applied to the current page style when inserting via menu
-
- Call hNewDocument
-
- '/// Insert a header via menu
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// Check if header can be seen in status bar
- Kontext "TableObjectbar"
-
- if Vorlage2.GetSelText <> sHeader then
- warnlog "The header can't be seen in status bar ! "
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_38
-
- Dim sFooter as String
-
- Select case iSprache
- case 01 : sFooter = "Footer"
- case 31 : sFooter = "Voettekst"
- case 33 : sFooter = "Pied de page"
- case 34 : sFooter = "Pie de página"
- case 39 : sFooter = "Piè di pagina"
- case 46 : sFooter = "Sidfot"
- case 49 : sFooter = "Fußzeile"
- case 50 : sFooter = "Noga"
- case 55 : sFooter = "Rodapé"
- case 81 : sFooter = "フッタ"
- case 82 : sFooter = "바닥글"
- case 86 : sFooter = "页脚"
- case 88 : sFooter = "é å°¾"
- case else : QAErrorLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- PrintLog "- Footer must be applied to the current page style when inserting via menu"
- '/// Footer must be applied to the current page style when inserting via menu
-
- Call hNewDocument
-
- '/// Insert a footer via menu
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// Check if header can be seen in status bar
- Kontext "TableObjectbar"
-
- if Vorlage2.GetSelText <> sFooter then
- warnlog "The footer can't be seen in status bar ! "
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_39
-
- Dim sTestFile as String
- Dim sColumn as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testColumnInPage.sxw")
- sColumn = "3"
-
- PrintLog "- Set multi column via controls in page dialog"
- '/// Set multi column via controls in page dialog
-
- Call hNewDocument
-
- '/// Open test file testColumnInPage.sxw
- '/// + (The test file includes 2 pages , some text
- '/// + is in 1st page and another is in 2nd page)
- hFileOpenLocally( sTestFile )
-
-
- '/// formatPage , tabpage columns , change column to 3 via controls
- fFormatPageWriter("TabSpalten")
- Anzahl.TypeKeys "<Up>", 2
- Sleep 1
- TabSpalten.OK
-
- '/// Check if the text in 1st page in the 1st column
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "ABCD"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if Len(GetClipboardText) = 26 then warnlog "the first column isn't right!"
-
- '/// Check if the text in 2nd page in the 2nd column
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "This"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "the second column isn't right!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_40
-
- Dim sTestFile as String
- Dim sColumn as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testColumnInPage.sxw")
- sColumn = "3"
-
- PrintLog "- Set multi column via spinfield in page dialog"
- '/// Set multi column via spinfield in page dialog
-
- Call hNewDocument
-
- '/// Open test file testColumnInPage.sxw
- '/// + (The test file includes 2 pages , some text is
- '/// + in 1st page and another is in 2nd page)
- hFileOpenLocally( sTestFile )
-
-
- '/// formatPage , tabpage columns , change column to 3 via spinfield
- fFormatPageWriter("TabSpalten")
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- TabSpalten.OK
-
- '/// Check if the text in 1st page in the 1st column
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "ABCD"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if Len(GetClipboardText) = 26 then warnlog "the first column isn't right!"
-
- '/// Check if the text in 2nd page in the 2nd column
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "This"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "the second column isn't right!"
- fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_41
-
- Dim sTestFile as String
- Dim sColumn as String
- Dim sWidthColumn1 as String
- Dim sWidthColumn2 as String
- Dim sWidthColumn3 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testColumnInPage2.sxw")
- sColumn = "3"
- sWidthColumn1 = "2" + gSeperator + "00"
- sWidthColumn2 = "4" + gSeperator + "00"
-
- PrintLog "- create columns with different width "
- '/// create columns with different width
-
- Call hNewDocument
-
- '/// Open test file testColumnInPage2.sxw
- '/// + (The test file includes 2 pages , some text is
- '/// + in 1st page and another is in 2nd page)
- hFileOpenLocally( sTestFile )
-
-
- '/// Create 3 with different columns . formatPage ,
- '/// + tabpage columns , set 3 columns
- Call fFormatPageWriter("TabSpalten")
- Anzahl.TypeKeys "<Up>", 2
- Sleep 1
- AutomBreite.Uncheck
- Sleep 1
- Spaltenbreite1.SetText sWidthColumn1
- wait 500
- Spaltenbreite2.SetText sWidthColumn2
- wait 500
- Art.Select 1
- wait 500
- sWidthColumn3 = Spaltenbreite3.GetText
- wait 500
- TabSpalten.OK
-
- '/// Check if columns' width is right
- fFormatPageWriter("TabSpalten")
- if Left$(Spaltenbreite1.GetText,4) <> sWidthColumn1 then Warnlog "the column1's width isn't set correctly !"
- if Left$(Spaltenbreite2.GetText,4) <> sWidthColumn2 then Warnlog "the column2's width isn't set correctly !"
- if Spaltenbreite3.GetText <> sWidthColumn3 then Warnlog "the column3's width isn't set correctly !"
- TabSpalten.Cancel
-
- 'detailed check for column1
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "ABCD"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if Len(GetClipboardText) > 8 then Warnlog "Something wrong in the column1"
-
- 'detailed check for column2
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "ZYXW"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if Len(GetClipboardText) > 14 then Warnlog "Something wrong in the column2"
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_42
-
- Dim sTestFile as String
- Dim sColumn as String
- Dim sWidthColumn1 as String
- Dim sWidthColumn2 as String
- Dim sWidthColumn3 as String
- Dim sSpacing1 as String
- Dim sSpacing2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testColumnInPage2.sxw")
- sColumn = "3"
-
- sWidthColumn1 = "2" + gSeperator + "00" + gMeasurementUnit
- sWidthColumn2 = "4" + gSeperator + "00" + gMeasurementUnit
- sSpacing1 = "1" + gSeperator + "00" + gMeasurementUnit
- sSpacing2 = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- vary distance between columns "
- '/// vary distance between columns
-
- Call hNewDocument
-
- '/// Open test file testColumnInPage2.sxw
- '/// + (The test file includes 2 pages , some text is
- '/// + in 1st page and another is in 2nd page)
- hFileOpenLocally( sTestFile )
-
-
- '/// formatPage , tabpage columns , set 3 columns
- fFormatPageWriter("TabSpalten")
- Anzahl.TypeKeys "<Up>", 2
- Sleep 1
- TabSpalten.OK
-
- '/// vary distance between columns
- fFormatPageWriter("TabSpalten")
- AutomBreite.Uncheck
- Sleep 1
- Spaltenbreite1.SetText sWidthColumn1
- wait 500
- Spaltenbreite2.SetText sWidthColumn2
- wait 500
- Abstand12.SetText sSpacing1
- Sleep 2
- Abstand23.SetText sSpacing2
- Sleep 2
- Art.Select 1
- Sleep 1
- sWidthColumn2 = "3" + gSeperator + "00" + gMeasurementUnit
- sWidthColumn3 = Spaltenbreite3.GetText
- wait 500
- TabSpalten.OK
-
- '/// Check if columns' width and spacing are right
- fFormatPageWriter("TabSpalten")
- if Spaltenbreite1.GetText <> sWidthColumn1 then Warnlog "the column1's width isn't set correctly !"
- if Spaltenbreite2.GetText <> sWidthColumn2 then Warnlog "the column2's width isn't set correctly !"
- if Spaltenbreite3.GetText <> sWidthColumn3 then Warnlog "the column3's width isn't set correctly !"
- if Abstand12.GetText <> sSpacing1 then Warnlog "the spacing1 isn't correct!"
- if Abstand23.GetText <> sSpacing2 then Warnlog "the spacing1 isn't correct!"
- TabSpalten.Cancel
-
- 'detailed check for column2
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "ZYXW"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if Len(GetClipboardText) > 11 then Warnlog "Somthing wrong in the column2"
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_43
-
- Dim sColumn as String
- Dim sHeight as String
- Dim iLine as Integer
- Dim iPosition as Integer
-
- sColumn = "2"
- sHeight = "50%"
- iLine = 2
- iPosition = 2
-
- PrintLog "- seperator line between columns - change height/position of seperator"
- '/// seperator line between columns - change height/position of seperator
-
- Call hNewDocument
-
- '/// formatPage , tabpage columns , set 2 columns
- fFormatPageWriter("TabSpalten")
- Anzahl.TypeKeys "<Up>"
- Sleep 1
- TabSpalten.OK
-
- '/// + Change height/position of seperator
- fFormatPageWriter("TabSpalten")
- Art.Select iLine
- Sleep 1
- Hoehe.SetText sHeight
- Sleep 1
- Position.Select iPosition
- Sleep 1
- TabSpalten.OK
-
- '/// Check if height/position of seperator is changed
- fFormatPageWriter("TabSpalten")
- if Hoehe.GetText <> sHeight then Warnlog "Height isn't correct!"
- Sleep 1
- if Position.GetSelIndex <> iPosition then Warnlog "Position isn't correct!"
- TabSpalten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_44
-
- Dim sColumn as String
- Dim i as Integer
-
- sColumn = "2"
-
- PrintLog "- seperator line between columns - different line formats "
- '/// seperator line between columns - different line formats
-
- Call hNewDocument
-
- '/// formatPage , tabpage columns , set 2 columns
- fFormatPageWriter("TabSpalten")
- Anzahl.TypeKeys "<Up>"
- Sleep 1
- TabSpalten.OK
-
- '/// + Change seperator line style
-
- '/// Check if height/position of seperator is changed
-
- fFormatPageWriter("TabSpalten")
- for i = 1 to Art.GetItemCount
- if i > 1 then fFormatPageWriter("TabSpalten")
- Art.Select i
- Sleep 1
- TabSpalten.OK
-
- fFormatPageWriter("TabSpalten")
- if Art.GetSelIndex <> i then Warnlog "Seperator line isn't correct!"
- TabSpalten.Cancel
- next i
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_45
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim iTestTextLength as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testSeparatorLine.sxw")
- sTestText = "llll"
-
- PrintLog "- shouldn't exist spacing after remove separator line"
- '/// shouldn't exist spacing after remove separator line
-
- Call hNewDocument
-
- '/// Open test file testSeparatorLine.sxw
- '/// + (The test file includes 6 columns , some
- '/// + test text lllll... is in 2nd column
- hFileOpenLocally( sTestFile )
-
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTestText
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iTestTextLength = Len(GetClipboardText)
-
- '/// formatPage , tabpage columns, set Separator line to 5pt
- fFormatPageWriter("TabSpalten")
- Art.Select Art.GetItemCount
- Sleep 1
- TabSpalten.OK
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTestText
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if iTestTextLength <= Len(GetClipboardText) then Warnlog "Seperator line isn't correct!"
-
- '/// + set separator line to null
- fFormatPageWriter("TabSpalten")
- Art.Select 1
- Sleep 1
- TabSpalten.OK
-
- '/// Check if column is covered to former
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTestText
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if iTestTextLength <> Len(GetClipboardText) then Warnlog "The column isn't covered to former! #112632"
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_46
-
- Dim sColumn as String
- Dim sWidthColumn1 as String
- Dim sWidthColumn2 as String
- Dim sWidthColumn3 as String
- Dim sSpacing1 as String
- Dim sSpacing2 as String
- Dim iLine as Integer
- Dim sLineHeight as String
- Dim iLinePosition as Integer
-
- sColumn = "3"
- sWidthColumn1 = "2" + gSeperator + "00" + gMeasurementUnit
- sWidthColumn2 = "4" + gSeperator + "00" + gMeasurementUnit
- sSpacing1 = "0" + gSeperator + "30" + gMeasurementUnit
- sSpacing2 = "0" + gSeperator + "50" + gMeasurementUnit
- iLine = 4
- sLineHeight = "50%"
- iLinePosition = 2
-
- PrintLog "- Check if the settings are kept after reopening the file"
- '/// Check if the settings are kept after reopening the file
-
- Call hNewDocument
-
- '/// Format/Page / columns , do some configurations
-
- 'set 3 columns
- fFormatPageWriter("TabSpalten")
- Anzahl.TypeKeys "<Up>", 2
- Sleep 1
- TabSpalten.OK
-
- 'UnCheck autowidth , set different width to 3 columns
- fFormatPageWriter("TabSpalten")
- AutomBreite.Uncheck
- Sleep 1
- Abstand12.SetText sSpacing1
- Sleep 1
- Abstand23.SetText sSpacing2
- Sleep 1
- Spaltenbreite1.SetText sWidthColumn1
- wait 500
- Spaltenbreite2.SetText sWidthColumn2
- wait 500
- Art.Select iLine
- wait 500
- Hoehe.SetText sLineHeight
- Sleep 1
- Position.Select iLinePosition
- Sleep 1
- sWidthColumn3 = Spaltenbreite3.GetText
- wait 500
- TabSpalten.OK
-
- '/// Save the file , close the file and reopen it
- Call hFileSaveAsWithFilterKill(gOfficepath + "user\work\tFormatPage_46.odt", "writer8")
- Call hCloseDocument
-
- Call hNewDocument
- hFileOpen( gOfficepath + "user\work\tFormatPage_46.odt")
-
- '/// Check if the setting are still kept
- fFormatPageWriter("TabSpalten")
- if AutomBreite.Ischecked = TRUE then Warnlog "Autowidth shouldn't be checked !"
- if Abstand12.GetText <> sSpacing1 then Warnlog "Spacing1 isn't right , should be " &sSpacing1 & " but get " &Abstand12.GetText
- if Abstand23.GetText <> sSpacing2 then Warnlog "Spacing2 isn't right , should be " &sSpacing2 & " but get " &Abstand23.GetText
- if Spaltenbreite1.GetText <> sWidthColumn1 then Warnlog "column1 isn't right , should be " &sWidthColumn1 & " but get " &Spaltenbreite1.GetText
- if Spaltenbreite2.GetText <> sWidthColumn2 then Warnlog "column1 isn't right , should be " &sWidthColumn2 & " but get " &Spaltenbreite2.GetText
- if Spaltenbreite3.GetText <> sWidthColumn3 then Warnlog "column1 isn't right , should be " &sWidthColumn2 & " but get " &Spaltenbreite3.GetText
- if Art.GetSelIndex <> iLine then Warnlog "Line style isn't right !"
- if Hoehe.GetText <> sLineHeight then Warnlog "Height isn't correct!"
- if Position.GetSelIndex <> iLinePosition then Warnlog "Position isn't correct!"
- TabSpalten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_47
-
- Dim sWidth as String
- Dim sLeft as String , sRight as String ' set margin size
- Dim sWidth1 as String , sWidth2 as String , sWidth3 as String
-
- sWidth = "20" + gSeperator + "00" + gMeasurementUnit
- sLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sRight = "3" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Travel through the 5 columns preset boxes "
- '/// Test Travel through the 5 columns preset boxes
-
- Call hNewDocument
-
- 'Set page's width to 20cm and left margin: 3cm , right margin : 2cm
- fFormatPageWriter("TabSeite")
- Breite.SetText sWidth
- Wait 500
- Links.SetText sLeft
- Wait 500
- Rechts.SetText sRight
- Wait 500
- TabSeite.OK
-
- '/// formatPage , tabpage columns
- fFormatPageWriter("TabSpalten")
-
- '/// - Select fisrt box ==> only 1 column
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- if Len(Spaltenbreite1.GetText) <> 0 then Warnlog "width1 shouldn't be writable when there is only 1 column !"
- Sleep 1
-
- '/// - Select second box ==> 2 columns ( 1st = 2rd )
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- sWidth1 = "7" + gSeperator + "50" + gMeasurementUnit
- sWidth2 = "7" + gSeperator + "50" + gMeasurementUnit
- if Spaltenbreite1.GetText <> sWidth1 then Warnlog "2.width1 should be " &sWidth1 & " but get " &Spaltenbreite1.GetText
- if Spaltenbreite2.GetText <> sWidth2 then Warnlog "2.width2 should be " &sWidth2 & " but get " &Spaltenbreite2.GetText
- if AutomBreite.IsChecked <> TRUE then Warnlog "2.Autowidth should be checked !"
-
- '/// - Select third box ==> 3 columns ( 1st = 2rd = third )
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- sWidth1 = "5" + gSeperator + "00" + gMeasurementUnit
- sWidth2 = "5" + gSeperator + "00" + gMeasurementUnit
- sWidth3 = "5" + gSeperator + "00" + gMeasurementUnit
- if Spaltenbreite1.GetText <> sWidth1 then Warnlog "3.width1 should be " &sWidth1 & " but get " &Spaltenbreite1.GetText
- if Spaltenbreite2.GetText <> sWidth2 then Warnlog "3.width2 should be " &sWidth2 & " but get " &Spaltenbreite2.GetText
- if Spaltenbreite3.GetText <> sWidth3 then Warnlog "3.width3 should be " &sWidth2 & " but get " &Spaltenbreite3.GetText
- if AutomBreite.IsChecked <> TRUE then Warnlog "3.Autowidth should be checked !"
-
- '/// - Select forth box ==> 2 columns ( 1st : 2rd = 2:1 )
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- sWidth1 = "10" + gSeperator + "00" + gMeasurementUnit
- sWidth2 = "5" + gSeperator + "00" + gMeasurementUnit
- if Spaltenbreite1.GetText <> sWidth1 then Warnlog "4.width1 should be " &sWidth1 & " but get " &Spaltenbreite1.GetText
- if Spaltenbreite2.GetText <> sWidth2 then Warnlog "4.width2 should be " &sWidth2 & " but get " &Spaltenbreite2.GetText
- if AutomBreite.IsChecked = TRUE then Warnlog "4.Autowidth should be Unchecked !"
-
- '/// - Select fifth box ==> 2 columns ( 1st : 2rd = 1:2 )
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- sWidth1 = "5" + gSeperator + "00" + gMeasurementUnit
- sWidth2 = "10" + gSeperator + "00" + gMeasurementUnit
- if Spaltenbreite1.GetText <> sWidth1 then Warnlog "5.width1 should be " &sWidth1 & " but get " &Spaltenbreite1.GetText
- if Spaltenbreite2.GetText <> sWidth2 then Warnlog "5.width2 should be " &sWidth2 & " but get " &Spaltenbreite2.GetText
- if AutomBreite.IsChecked = TRUE then Warnlog "5.Autowidth should be Unchecked !"
-
- '/// - Press right key again, will get the first box
- ColumnValueset.TypeKeys "<Right>"
- Sleep 1
- if Anzahl.GetText <> "1" then Warnlog "The focus should be in the leftest box !"
- Sleep 1
-
- TabSpalten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
deleted file mode 100644
index 728cd204ed50..000000000000
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
+++ /dev/null
@@ -1,788 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the functionality of Page Formatting / Page Styles - 4
-'*
-'************************************************************************
-'*
-' #1 tFormatPage_48 'Text flow direction test Right to Left (Vertical) - Paragraph
-' #1 tFormatPage_49 'Text flow direction test Right to Left (Vertical) - Section
-' #1 tFormatPage_50 'Text flow direction test Right to Left (Vertical) - Footnotes
-' #1 tFormatPage_51 'Text flow direction test Right to Left (Vertical) - Endnotes
-' #1 tFormatPage_52 'Text flow direction test Right to Left (Vertical) - Table
-' #1 tFormatPage_53 'Text flow direction test Right to Left (Vertical) - Columns
-' #1 tFormatPage_54 'Only when a border is set, "spacing to contents" gets a minimum value of 0.05cm
-' #1 tFormatPage_55 'All "spacing to contents" spin boxes are limited to 5cm
-' #1 tFormatPage_56 'Test Uncheck 'Synchronize'
-' #1 tFormatPage_57 'Test Check 'Synchronize'
-' #1 tFormatPage_58 'Test default shadow color
-' #1 tFormatPage_59 'Test if the shadow settings is OK after closing the dialog
-' #1 tFormatPage_60 'Test if the shadow settings is OK after reopening the file
-'*
-'\***********************************************************************
-
-testcase tFormatPage_48
-
- Dim sTestText1 as string, sTestText2 as String
- Dim RecheckAsianSupport as boolean
- RecheckAsianSupport = gAsianSup
-
- Select Case iSystemSprache
- Case 81, 82, 86, 88
- printlog "No test with asian lovale, because checkbox 'Asian language support' is disabled by default!"
- goto endsub
- end select
-
- sTestText1 = "This is the test!"
- sTestText2 = "That isn't a test!"
-
- PrintLog "- Text flow direction test Right to Left (Vertical) - Paragraph"
- '/// Text flow direction test Right to Left (Vertical) - Paragraph
-
- Call hNewDocument
-
- '/// Set Asian language support enabled
- Call ActiveDeactivateCTLSupport(FALSE)
- Call ActiveDeactivateAsianSupport(TRUE)
-
- '/// Input some test words
- Call wTypeKeys sTestText1
- Call wTypeKeys "<Return>"
- Call wTypeKeys sTestText2
- Sleep 1
-
- '/// formatPage , tabpage page, select right to left (vertical)
- fFormatPageWriter("TabSeite")
- Textfluss.Select 2
- Sleep 1
- TabSeite.OK
- Sleep 2
-
- '/// Check if the direction of the test words is changed
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Down>", 4
- Sleep 1
- EditCopy
- if GetClipboardText <> "This" then
- Warnlog "Something wrong in first word - get " &GetClipboardText
- end if
-
- Call wTypeKeys "<Home><Left>"
- Call wTypeKeys "<Shift Down>" , 4
- Sleep 1
- EditCopy
- if GetClipboardText <> "That" then
- Warnlog "Something wrong in second word - get " &GetClipboardText
- end if
-
- if RecheckAsianSupport = False then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_49
-
- Dim sTestText as String
- Dim RecheckAsianSupport as boolean
- RecheckAsianSupport = gAsianSup
-
- sTestText = "This is the test!"
-
- PrintLog "- Text flow direction test Right to Left (Vertical) - Section"
- '/// Text flow direction test Right to Left (Vertical) - Section
-
- Call hNewDocument
-
- '/// Set Asian language support enabled
- Call ActiveDeactivateAsianSupport(TRUE)
-
- '/// Insert a section
- fInsertSection("TabBereiche")
- TabBereiche.OK
-
- '/// insert something in the section
- Call wTypeKeys "<Up>"
- Call wTypeKeys sTestText
-
- '/// formatPage , tabpage page, select right to left (vertical)
- fFormatPageWriter("TabSeite")
- Textfluss.Select 2
- Sleep 1
- TabSeite.OK
- Sleep 2
-
- '/// Check if the direction of the test words is changed
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift Down>" , 4
- EditCopy
- if GetClipboardText <> "This" then Warnlog "Something wrong in the section - get " &GetClipboardText
-
- if RecheckAsianSupport = False then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_50
-
- Dim RecheckAsianSupport as boolean
- RecheckAsianSupport = gAsianSup
-
- PrintLog "- Text flow direction test Right to Left (Vertical) - Footnotes"
- '/// Text flow direction test Right to Left (Vertical) - Footnotes
-
- Call hNewDocument
-
- '/// Set Asian language support enabled
- Call ActiveDeactivateAsianSupport(TRUE)
-
- '/// Insert a footnotes
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- Sleep 1
- Fussnote.Check
- Sleep 1
- FussnoteEinfuegen.OK
- Sleep 1
-
- Call wTypeKeys "<PageUp>"
- Sleep 1
-
- '/// formatPage , tabpage page, select right to left (vertical)
- Call fFormatPageWriter("TabSeite")
- Textfluss.Select 2
- Sleep 1
- TabSeite.OK
- Sleep 2
-
- '/// Check if the direction of the footnote is changed
- Call wTypeKeys "<Down>"
- try
- EditFootnote
- Kontext "FussnoteBearbeiten"
- FussnoteBearbeiten.Cancel
- Warnlog "Should NOT execute edit/footnote when focus is under the footnote"
- catch
- endcatch
-
- Call wTypeKeys "<Up>"
- try
- EditFootnote
- Kontext "FussnoteBearbeiten"
- FussnoteBearbeiten.Cancel
- catch
- Warnlog "Should execute edit/footnote when focus is up the footnote"
- endcatch
-
- if RecheckAsianSupport = False then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_51
-
- Dim RecheckAsianSupport as boolean
- RecheckAsianSupport = gAsianSup
-
- PrintLog "- Text flow direction test Right to Left (Vertical) - Endnotes"
- '/// Text flow direction test Right to Left (Vertical) - Endnotes
-
- Call hNewDocument
-
- '/// Set Asian language support enabled
- Call ActiveDeactivateAsianSupport(TRUE)
-
- '/// Insert a endnotes
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- Sleep 1
- Endnote.Check
- Sleep 1
- FussnoteEinfuegen.OK
- Sleep 1
-
- Call wTypeKeys "<PageUp>"
- Sleep 1
-
- '/// formatPage , tabpage page, select right to left (vertical)
- Call fFormatPageWriter("TabSeite")
- Textfluss.Select 2
- Sleep 1
- TabSeite.OK
- Sleep 2
-
- '/// Check if the direction of the endnote is changed
- Call wTypeKeys "<Down>"
- try
- EditFootnote
- Kontext "FussnoteBearbeiten"
- FussnoteBearbeiten.Cancel
- Warnlog "Should NOT execute edit/footnote when focus is under the endnote"
- catch
- endcatch
-
- Call wTypeKeys "<Up>"
- try
- EditFootnote
- Kontext "FussnoteBearbeiten"
- FussnoteBearbeiten.Cancel
- catch
- Warnlog "Should execute edit/footnote when focus is on the endnote!"
- endcatch
-
- if RecheckAsianSupport = False then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_52
-
- Dim sTest1 as String , sTest2 as String , sTest3 as String
- Dim RecheckAsianSupport as boolean
- RecheckAsianSupport = gAsianSup
-
- sTest1 = "A1" : sTest2 = "B1" : sTest3 = "A2"
-
- PrintLog "- Text flow direction test Right to Left (Vertical) - Table"
- '/// Text flow direction test Right to Left (Vertical) - Table
-
- Call hNewDocument
-
- '/// Set Asian language support enabled
- Call ActiveDeactivateAsianSupport(TRUE)
-
- '/// Insert a table
- Call hTabelleEinfuegen
-
- '/// + input some string in the table , like
- '/// a1 b1
- '/// a2
- Call wTypeKeys sTest1
- wait 500
- Call wTypeKeys "<Right>"
- wait 500
- Call wTypeKeys sTest2
- wait 500
- Call wTypeKeys "<Down><Left>" 'so far, the focus should be in 2nd line of the table
- wait 500
- Call wTypeKeys sTest3
- Call wTypeKeys "<Up><Home>" 'so far, the focus should be in front of A1
-
- '/// formatPage , tabpage page, select right to left (vertical)
- Call fFormatPageWriter("TabSeite")
- Textfluss.Select 2
- Sleep 1
- TabSeite.OK
- Sleep 2
-
- '/// Check if the direction of the table is changed
- Call wTypeKeys "<Shift Down>" , 2
- Sleep 1
- EditCopy
- if GetClipboardText <> sTest1 then
- Warnlog "1st word in table is wrong!"
- end if
-
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<Shift Down>" , 2
- Sleep 1
- EditCopy
- if GetClipboardText <> sTest2 then
- Warnlog "2nd word in table is wrong!"
- end if
-
- Call wTypeKeys "<Left><Up>"
- Call wTypeKeys "<Shift Home>"
- Sleep 1
- EditCopy
- if GetClipboardText <> sTest3 then
- Warnlog "2rd word in table is wrong!"
- end if
-
- if RecheckAsianSupport = False then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_53
-
- Dim sTest as String
- Dim sTestFile as String
- Dim RecheckAsianSupport as boolean
- RecheckAsianSupport = gAsianSup
-
- sTest = "Test"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testColumnVertical.sxw")
-
- PrintLog "- Text flow direction test Right to Left (Vertical) - Column"
- '/// Text flow direction test Right to Left (Vertical) - Column
-
- Call hNewDocument
-
- '/// Set Asian language support enabled
- Call ActiveDeactivateAsianSupport(TRUE)
-
- '/// Open test file testColumnVertical.sxw
- '/// + There are 8 columns in the page , and a test
- '/// + word is in 3rd column
- hFileOpenLocally( sTestFile )
-
-
- '/// formatPage , tabpage page, select right to left (vertical)
- Call fFormatPageWriter("TabSeite")
- Textfluss.Select 2
- Sleep 1
- TabSeite.OK
- Sleep 2
-
- '/// Check if the direction of the column is changed
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Sleep 1
-
- Call wTypeKeys "<Down>"
- Sleep 1
-
- Call wTypeKeys "<Shift Up>" , 4
- EditCopy
- if GetClipboardText <> sTest then
- Warnlog "the test word is wrong!"
- end if
-
- if RecheckAsianSupport = False then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_54
-
- Dim sSpacingToContentsNoBorder as String 'no border in the page
- Dim sSpacingToContentsYesBorder as String 'border exists in the page
-
- sSpacingToContentsNoBorder = "0" + gSeperator + "0" '+ gMeasurementUnit
- sSpacingToContentsYesBorder = "0" + gSeperator + "05" '+ gMeasurementUnit
-
- PrintLog "- Only when a border is set, 'spacing to contents' gets a minimum value of 0.05cm"
- '/// Only when a border is set, "spacing to contents" gets a minimum value of 0.05cm
-
- Call hNewDocument
-
- PrintLog "Check if 'spacing to contents' is 0.00cm when there is no border in the page"
- '/// format/Page , tabpage borders ,
- '/// + Check if "spacing to contents" is 0.00cm when
- '/// + there is no border in the page
- fFormatPageWriter("TabUmrandung")
- if InStr( Links.GetText, sSpacingToContentsNoBorder) = false then Warnlog "Default of left Spacing to contents is wrong !"
- if InStr( Rechts.GetText, sSpacingToContentsNoBorder) = false then Warnlog "Default of right Spacing to contents is wrong !"
- if InStr( Oben.GetText, sSpacingToContentsNoBorder) = false then Warnlog "Default of up Spacing to contents is wrong !"
- if InStr( Unten.GetText, sSpacingToContentsNoBorder) = false then Warnlog "Default of bottom Spacing to contents is wrong !"
- TabUmrandung.Cancel
-
- PrintLog "Check if 'spacing to contents' is 0.50cm when there are borders in the page"
- '/// format/Page , tabpage borders
- '/// + Check if "spacing to contents" is 0.05cm when
- '/// + there are borders in the page
- fFormatPageWriter("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- TabUmrandung.OK
-
- fFormatPageWriter("TabUmrandung")
- if InStr( Links.GetText, sSpacingToContentsYesBorder) = false then Warnlog "Default of left Spacing to contents is wrong !"
- if InStr( Rechts.GetText, sSpacingToContentsYesBorder) = false then Warnlog "Default of right Spacing to contents is wrong !"
- if InStr( Oben.GetText, sSpacingToContentsYesBorder) = false then Warnlog "Default of up Spacing to contents is wrong !"
- if InStr( Unten.GetText, sSpacingToContentsYesBorder) = false then Warnlog "Default of bottom Spacing to contents is wrong !"
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_55
-
- Dim sSpacingToContents as String 'the max spacing to content
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
-
- sSpacingToContents = "5" + gSeperator + "0" '+ gMeasurementUnit
- sSpacingToContentsL = "6" + gSeperator + "0" '+ gMeasurementUnit
- sSpacingToContentsR = "7" + gSeperator + "0" '+ gMeasurementUnit
- sSpacingToContentsU = "8" + gSeperator + "0" '+ gMeasurementUnit
- sSpacingToContentsB = "9" + gSeperator + "0" '+ gMeasurementUnit
-
- PrintLog "- All 'spacing to contents' spin boxes are limited to 5cm"
- '/// All "spacing to contents" spin boxes are limited to 5cm
-
- Call hNewDocument
-
- 'set border exists in the page
- fFormatPageWriter("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- TabUmrandung.OK
-
- '/// format/Page , tabpage borders , set all spacing to content's size
- '/// + more than 5.00cm
- fFormatPageWriter("TabUmrandung")
- Synchronisieren.Uncheck
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- TabUmrandung.OK
-
- '/// Check if all "spacing to contents" is 5.00cm
- fFormatPageWriter("TabUmrandung")
-
- if InStr( Links.GetText, sSpacingToContents) = false then Warnlog "left Spacing to contents is wrong !"
- if InStr( Rechts.GetText, sSpacingToContents) = false then Warnlog "right Spacing to contents is wrong !"
- if InStr( Oben.GetText, sSpacingToContents) = false then Warnlog "up Spacing to contents is wrong !"
- if InStr( Unten.GetText, sSpacingToContents) = false then Warnlog "bottom Spacing to contents is wrong !"
-
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_56
-
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
-
- sSpacingToContentsL = "0" + gSeperator + "5" '+ gMeasurementUnit
- sSpacingToContentsR = "0" + gSeperator + "6" '+ gMeasurementUnit
- sSpacingToContentsU = "0" + gSeperator + "7" '+ gMeasurementUnit
- sSpacingToContentsB = "0" + gSeperator + "8" '+ gMeasurementUnit
-
- PrintLog "- Test Uncheck 'Synchronize'"
- '/// Test Uncheck 'Synchronize'
-
- Call hNewDocument
-
- 'set border exists in the page
- fFormatPageWriter("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- TabUmrandung.OK
-
- '/// format/Page , tabpage borders
- '/// + Uncheck synchronize
- '/// + Set all spacing to contents
- fFormatPageWriter("TabUmrandung")
- Synchronisieren.Uncheck
- Sleep 1
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- TabUmrandung.OK
- Sleep 1
-
- '/// Check if all "spacing to contents" is correct
- fFormatPageWriter("TabUmrandung")
- if InStr( Links.GetText, sSpacingToContentsL) = false then Warnlog "left Spacing to contents is wrong !"
- if InStr( Rechts.GetText, sSpacingToContentsR) = false then Warnlog "right Spacing to contents is wrong !"
- if InStr( Oben.GetText, sSpacingToContentsU) = false then Warnlog "up Spacing to contents is wrong !"
- if InStr( Unten.GetText, sSpacingToContentsB) = false then Warnlog "bottom Spacing to contents is wrong !"
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_57
-
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
-
- sSpacingToContentsL = "0" + gSeperator + "5" '+ gMeasurementUnit
- sSpacingToContentsR = "0" + gSeperator + "6" '+ gMeasurementUnit
- sSpacingToContentsU = "0" + gSeperator + "7" '+ gMeasurementUnit
- sSpacingToContentsB = "0" + gSeperator + "8" '+ gMeasurementUnit
-
- PrintLog "- Test Check 'Synchronize'"
- '/// Test Check 'Synchronize'
-
- Call hNewDocument
-
- 'set border exists in the page
- fFormatPageWriter("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- TabUmrandung.OK
-
- '/// format/Page , tabpage borders
- '/// + Check synchronize
- '/// + Set all spacing to contents
- fFormatPageWriter("TabUmrandung")
- Synchronisieren.Check
- Sleep 1
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- TabUmrandung.OK
- Sleep 1
-
- '/// Check if all "spacing to contents" is correct
- fFormatPageWriter("TabUmrandung")
- if InStr( Links.GetText, sSpacingToContentsL) = true then Warnlog "left Spacing to contents is wrong !"
- if InStr( Rechts.GetText, sSpacingToContentsR) = true then Warnlog "right Spacing to contents is wrong !"
- if InStr( Oben.GetText, sSpacingToContentsU) = true then Warnlog "up Spacing to contents is wrong !"
- if InStr( Unten.GetText, sSpacingToContentsB) = false then Warnlog "bottom Spacing to contents is wrong !"
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_58
-
- Dim sDefaultShadowColor as String
-
- Select case iSprache
- case 01 : sDefaultShadowColor = "Gray"
- case 31 : sDefaultShadowColor = "Grijs"
- case 33 : sDefaultShadowColor = "Gris"
- case 34 : sDefaultShadowColor = "Gris"
- case 39 : sDefaultShadowColor = "Grigio"
- case 46 : sDefaultShadowColor = "Grått"
- case 49 : sDefaultShadowColor = "Grau"
- case 50 : sDefaultShadowColor = "Siva"
- case 55 : sDefaultShadowColor = "Cinza"
- case 81 : sDefaultShadowColor = "ç°è‰²"
- case 82 : sDefaultShadowColor = "회색"
- case 86 : sDefaultShadowColor = "ç°è‰²"
- case 88 : sDefaultShadowColor = "ç°è‰²"
- case else : QAErrorLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- PrintLog "- Test default shadow color"
- '/// Test default shadow color
-
- Call hNewDocument
-
- '/// format/Page , tabpage borders
- '/// + Check if the default shadow color is gray
- fFormatPageWriter("TabUmrandung")
- if SchattenFarbe.GetSelText <> sDefaultShadowColor then
- Warnlog "Shadow default color is wrong , get " &SchattenFarbe.GetSelText
- end if
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_59
-
- Dim iBorderColor as Integer , iShadowColor as Integer
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
- Dim sShadowDistance as String
-
- iBorderColor = 5 : iShadowColor = 4
-
- sSpacingToContentsL = "0" + gSeperator + "5" '+ gMeasurementUnit
- sSpacingToContentsR = "0" + gSeperator + "6" '+ gMeasurementUnit
- sSpacingToContentsU = "0" + gSeperator + "7" '+ gMeasurementUnit
- sSpacingToContentsB = "0" + gSeperator + "8" '+ gMeasurementUnit
- sShadowDistance = "2" + gSeperator + "54" '+ gMeasurementUnit
-
- PrintLog "- Test if the shadow settings is OK after closing the dialog"
- '/// Test if the shadow settings is OK after closing the dialog
-
- Call hNewDocument
-
- '/// format/Page , tabpage borders , do some configuration
- '/// + and close the dialog
- fFormatPageWriter("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- Synchronisieren.UnCheck
- Sleep 1
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- StilFarbe.Select iBorderColor 'set border color
-
- Position.TypeKeys "<Right>" , 4
- Sleep 2
- Groesse.SetText sShadowDistance
- SchattenFarbe.Select iShadowColor 'set shadow color
- Sleep 1
- TabUmrandung.OK
-
- '/// format/Page , check if the configuration is all right
- fFormatPageWriter("TabUmrandung")
- if Synchronisieren.IsChecked = TRUE then Warnlog "Synchronize should be Unchecked !"
- if InStr( Links.GetText, sSpacingToContentsL) = false then Warnlog "left Spacing to contents is wrong !"
- if InStr( Rechts.GetText, sSpacingToContentsR) = false then Warnlog "right Spacing to contents is wrong !"
- if InStr( Oben.GetText, sSpacingToContentsU) = false then Warnlog "up Spacing to contents is wrong !"
- if InStr( Unten.GetText, sSpacingToContentsB) = false then Warnlog "bottom Spacing to contents is wrong !"
- if StilFarbe.GetSelIndex <> iBorderColor then Warnlog "border color is wrong !"
-
- if InStr( Groesse.GetText, sShadowDistance) = false then Warnlog "shadow distance is wrong !"
- if SchattenFarbe.GetSelindex <> iShadowColor then Warnlog "shadow color is wrong !"
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tFormatPage_60
-
- Dim iBorderColor as Integer , iShadowColor as Integer
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
- Dim sShadowDistance as String
-
- iBorderColor = 5 : iShadowColor = 4
-
- sSpacingToContentsL = "0" + gSeperator + "5" '+ gMeasurementUnit
- sSpacingToContentsR = "0" + gSeperator + "6" '+ gMeasurementUnit
- sSpacingToContentsU = "0" + gSeperator + "7" '+ gMeasurementUnit
- sSpacingToContentsB = "0" + gSeperator + "8" '+ gMeasurementUnit
- sShadowDistance = "2" + gSeperator + "74" '+ gMeasurementUnit
-
- PrintLog "- Test if the shadow settings is OK after reopening the file"
- '/// Test if the shadow settings is OK after reopening the file
-
- Call hNewDocument
-
- '/// format/Page , tabpage borders , do some configuration
- '/// + and close the dialog
- fFormatPageWriter("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- Synchronisieren.UnCheck
- Sleep 1
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- StilFarbe.Select iBorderColor 'set border color
-
- Position.TypeKeys "<Right>" , 4
- Sleep 2
- Groesse.SetText sShadowDistance
- SchattenFarbe.Select iShadowColor 'set shadow color
- Sleep 1
- TabUmrandung.OK
-
- '/// Save the file , close the file and reopen it
- Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\tFormatPage_60.odt", "writer8")
- Call hCloseDocument
-
- Call hNewDocument
- hFileOpen( gOfficepath + "user\work\tFormatPage_60.odt")
-
-
- '/// check if the configuration is all right
- fFormatPageWriter("TabUmrandung")
- if Synchronisieren.IsChecked = TRUE then Warnlog "Synchronize should be Unchecked !"
- if InStr( Links.GetText, sSpacingToContentsL) = false then Warnlog "left Spacing to contents is wrong !"
- if InStr( Rechts.GetText, sSpacingToContentsR) = false then Warnlog "right Spacing to contents is wrong !"
- if InStr( Oben.GetText, sSpacingToContentsU) = false then Warnlog "up Spacing to contents is wrong !"
- if InStr( Unten.GetText, sSpacingToContentsB) = false then Warnlog "bottom Spacing to contents is wrong !"
- if StilFarbe.GetSelIndex <> iBorderColor then Warnlog "border color is wrong !"
-
- if InStr( Groesse.GetText, sShadowDistance) = false then Warnlog "shadow distance is wrong !"
- if SchattenFarbe.GetSelindex <> iShadowColor then Warnlog "shadow color is wrong !"
- TabUmrandung.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'--------------------------------------------------
diff --git a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc
deleted file mode 100644
index 686c246d0400..000000000000
--- a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc
+++ /dev/null
@@ -1,1263 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the functionality of Paragraph Formatting - 1
-'*
-'************************************************************************
-'*
-' #1 tFormatParagraph1 'Open format/paragraph dialog
-' #1 tParagraphIndent1 'Set values for Indent - Before text
-' #1 tParagraphIndent2 'Set values for Indent - after text
-' #1 tParagraphIndent3 'Set values for Indent - first line
-' #1 tParagraphIndent4 'Test checkbox - "automatic"
-' #1 tParagraphIndent5 'Set values for "Above paraghraph"
-' #1 tParagraphIndent6 'Set values for "Below paraghraph"
-' #1 tParagraphIndent7 'Test above and below spacing of successive paragraphs are not added up, the biggest one should be displayed
-' #1 tParagraphIndent8 'Test above and below spacing of successive paragraphs are added up
-' #1 tParagraphIndent9 'Test Line spacing - Single
-' #1 tParagraphIndent10 'Test Line spacing - 1.5 lines
-' #1 tParagraphIndent11 'Test Line spacing - Double lines
-' #1 tParagraphIndent12 'Test Line spacing - Proportional
-' #1 tParagraphIndent13 'Test Line spacing - At least
-' #1 tParagraphIndent14 'Test Line spacing - Leading
-' #1 tParagraphIndent15 'Test Line spacing - Fixed
-' #1 tParagraphIndent16 'Test Regester-true Active
-' #1 tParagraphIndent17 'Test "Add spacing between paragarph and talbes" when importing from MS-Word
-' #1 tParagraphIndent18 'Test Negativ indent
-'*
-'\***********************************************************************
-
-testcase tformatparagraph1
-
- PrintLog "- 'Open format/paragraph dialog"
- '/// <b>Open format/paragraph dialog</b>
-
- Call hNewDocument
-
- '/// via Mouse clicks in Menu: Format-paragraph
- try
- Call fFormatParagraph("TabTextfluss")
- TabTextfluss.Cancel
- catch
- endcatch
-
- '/// via shortcuts in menu (manual test is needed)
-
- '/// via Context menu when Cursor is in the document
- try
- hMenuSelectNr(8)
- Sleep 2
- Kontext
- Active.SetPage TabTextfluss
- Kontext "TabTextfluss"
- TabTextfluss.Cancel
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent1
-
- Dim sTest as String
- Dim iLenTest as Integer
- Dim iLenHalf as Integer
- Dim sPageWidth as String
- Dim sMarginLeft as String
- Dim sMarginRight as String
- Dim sIndentLeft as String
-
- sTest = "lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll"
- sPageWidth = "8" + gSeperator + "00" + gMeasurementUnit
- sMarginLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sMarginRight = "2" + gSeperator + "00" + gMeasurementUnit
- sIndentLeft = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Set values for Indent - Before text"
- '/// <b>Set values for Indent - Before text</b>
-
- Call hNewDocument
-
- 'Format/Page , tabpage Page , set page size and margin size
- Call fFormatPageWriter("TabSeite")
- Breite.SetText sPageWidth
- Links.SetText sMarginLeft
- Rechts.SetText sMarginRight
- TabSeite.OK
-
- '/// Input some test words which should be longer than one line
- Call wTypeKeys sTest
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenTest = Len(getclipboardtext)
-
- '/// Format/Paragraph / Indents & Spacing , set 2cm in "before Text"
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Vonlinks.SetText sIndentLeft
- TabEinzuegeUndAbstaende.OK
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenHalf = Len(getclipboardtext)
-
- if iLenHalf <> Int(iLenTest/2) AND iLenHalf <> Int(iLenTest/2 +1) AND iLenHalf <> Int(iLenTest/2 -1) then
- Warnlog "1.Indents - before Text is not right !"
- end if
-
- Call wTypeKeys "<Right><Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenHalf = Len(getclipboardtext)
-
- if iLenHalf <> Int(iLenTest/2) AND iLenHalf <> Int(iLenTest/2 +1) AND iLenHalf <> Int(iLenTest/2 -1) then
- Warnlog "2.Indents - before Text is not right !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent2
-
- Dim sTest as String
- Dim iLenTest as Integer
- Dim iLenHalf as Integer
- Dim sPageWidth as String
- Dim sMarginLeft as String
- Dim sMarginRight as String
- Dim sIndentRight as String
-
- sTest = "lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll"
- sPageWidth = "8" + gSeperator + "00" + gMeasurementUnit
- sMarginLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sMarginRight = "2" + gSeperator + "00" + gMeasurementUnit
- sIndentRight = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Set values for Indent - after text"
- '/// <b>Set values for Indent - after text</b>
-
- Call hNewDocument
-
- 'Format/Page , tabpage Page , set page size and margin size
- Call fFormatPageWriter("TabSeite")
- Breite.SetText sPageWidth
- Links.SetText sMarginLeft
- Rechts.SetText sMarginRight
- TabSeite.OK
-
- '/// Input some test words which should be longer than one line
- Call wTypeKeys sTest
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenTest = Len(getclipboardtext)
-
- '/// Format/Paragraph / Indents & Spacing , set 2cm in "after Text"
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- VonRechts.SetText sIndentRight
- TabEinzuegeUndAbstaende.OK
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenHalf = Len(getclipboardtext)
-
- if iLenHalf <> Int(iLenTest/2) AND iLenHalf <> Int(iLenTest/2 +1) AND iLenHalf <> Int(iLenTest/2 -1) then
- Warnlog "1.Indents - after Text is not right !"
- end if
-
- Call wTypeKeys "<Right><Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenHalf = Len(getclipboardtext)
-
- if iLenHalf <> Int(iLenTest/2) AND iLenHalf <> Int(iLenTest/2 +1) AND iLenHalf <> Int(iLenTest/2 -1) then
- Warnlog "2.Indents - after Text is not right !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent3
-
- Dim sTest as String
- Dim iLenTest as Integer
- Dim iLenNew as Integer
- Dim sPageWidth as String
- Dim sMarginLeft as String
- Dim sMarginRight as String
- Dim sIndentRight as String
- Dim sIndentFirst as String
-
- sTest = "lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll"
- sPageWidth = "8" + gSeperator + "00" + gMeasurementUnit
- sMarginLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sMarginRight = "2" + gSeperator + "00" + gMeasurementUnit
- sIndentFirst = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Set values for Indent - First line"
- '/// <b>Set values for Indent - First line</b>
-
- Call hNewDocument
-
- 'Format/Page , tabpage Page , set page size and margin size
- Call fFormatPageWriter("TabSeite")
- Breite.SetText sPageWidth
- Links.SetText sMarginLeft
- Rechts.SetText sMarginRight
- TabSeite.OK
-
- '/// Input some test words which should be longer than one line
- Call wTypeKeys sTest
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenTest = Len(getclipboardtext)
-
- '/// Format/Paragraph / Indents & Spacing , set 2cm in "first line"
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- ErsteZeile.SetText sIndentFirst
- TabEinzuegeUndAbstaende.OK
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenNew = Len(getclipboardtext)
-
- if iLenNew <> Int(iLenTest/2) AND iLenNew <> Int(iLenTest/2 +1) AND iLenNew <> Int(iLenTest/2 -1) then
- Warnlog "1.Indents - First line is not right !"
- end if
-
- Call wTypeKeys "<Right><Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenNew = Len(getclipboardtext)
-
- if iLenNew <> iLenTest then
- Warnlog "2.Indents - first line is not right !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent4
-
- Dim sTest as String
- Dim iLenTest as Integer
- Dim iLenNew as Integer
- Dim sPageWidth as String
- Dim sMarginLeft as String
- Dim sMarginRight as String
- Dim sIndentRight as String
- Dim sIndentFirst as String
-
- sTest = "lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll"
- sPageWidth = "8" + gSeperator + "00" + gMeasurementUnit
- sMarginLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sMarginRight = "2" + gSeperator + "00" + gMeasurementUnit
- sIndentFirst = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test checkbox - 'automatic'"
- '/// <b>Test checkbox - "automatic"</b>
-
- Call hNewDocument
-
- 'Format/Page , tabpage Page , set page size and margin size
- Call fFormatPageWriter("TabSeite")
- Breite.SetText sPageWidth
- Links.SetText sMarginLeft
- Rechts.SetText sMarginRight
- TabSeite.OK
-
- '/// Input some test words which should be longer than one line
- Call wTypeKeys sTest
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenTest = Len(getclipboardtext)
-
- '/// Format/Paragraph / Indents & Spacing , Check "automatic"
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Automatisch.Check
- Sleep 2
- if ErsteZeile.IsEnabled = TRUE then Warnlog "The first line shouldn't be enabled when checking automatic !"
- TabEinzuegeUndAbstaende.OK
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenNew = Len(getclipboardtext)
-
- 'the first line should be shorter than before and longer then 1/2 previous length
- if iLenNew >= iLenTest OR iLenNew < Int(iLenTest/2 -1) then
- Warnlog "The 1st line length isn't right after checking 'automatic'!"
- end if
-
- Call wTypeKeys "<Right><Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- iLenNew = Len(getclipboardtext)
-
- 'the 2nd line should be equal the previous length
- if iLenNew <> iLenTest then
- Warnlog "The 2nd line length isn't right after checking 'automatic'!"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent5
-
- Dim sTestFile as String
- Dim sTest1 as String
- Dim sTest2 as String 'the words in 2nd paragraph (sTest1 is head , sTest2 is end)
- Dim sSpacing as String
-
- sTest1 = "He2" : sTest2 = "endof2ndparagraph"
- sSpacing = "10" + gSeperator + "00" + gMeasurementUnit
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\indent.sxw")
-
- PrintLog "- Set values for 'Above paraghraph'"
- '/// <b>Set values for "Above paraghraph"</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 2 paragraphs , and the end of 2nd paragraph is in 1st page
- hFileOpenLocally( sTestFile )
-
-
- 'Set the focus to 2nd paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- '/// Format/Paragraph / Indents & Spacing , set 10cm for "Above paraghraph"
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Oben.SetText sSpacing
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the 2nd paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest2
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- '/// check if the 2nd paragraph is in 2nd page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in 'Above paraghraph'! The end of 2nd paragraph should be 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent6
-
- Dim sTestFile as String
- Dim sTest1 as String
- Dim sTest2 as String '(sTest1 is head of paragraph 1 , sTest2 is end of paragraph2)
- Dim sSpacing as String
-
- sTest1 = "He1" : sTest2 = "endof2ndparagraph"
- sSpacing = "10" + gSeperator + "00" + gMeasurementUnit
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\indent.sxw")
-
- PrintLog "- Set values for 'Below paraghraph'"
- '/// <b>Set values for "Below paraghraph"</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 2 paragraphs , and the end of 2nd paragraph is in 1st page
- hFileOpenLocally( sTestFile )
-
-
- 'Set the focus to 1st paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- '/// Format/Paragraph / Indents & Spacing , set 10cm for "Below paraghraph"
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Unten.SetText sSpacing
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the 2nd paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest2
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- '/// check if the 2nd paragraph is in 2nd page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in 'Above paraghraph'! The end of 2nd paragraph should be 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent7
-
- Dim sTestFile as String
- Dim sEndOfPara1 as String
- Dim sStartPara2 as String
- Dim sEndPara2 as String
- Dim sParagraph2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\spacing.sxw")
- sEndOfPara1 = "endpara1"
- sStartPara2 = "StartPara2" : sEndPara2 = "endofpara2"
- sParagraph2 = "StartPara2mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmendofpara2"
-
- PrintLog "- Test above and below spacing of successive paragraphs are not added up, the biggest one should be displayed"
- '/// <b>Test above and below spacing of successive paragraphs are not added up, the biggest one should be displayed"</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 1 paragraph which is design like
- '/// spacing above : 1cm , spacing below : 2cm
- '/// the checkbox ��Add spacing between paragraphs and tables�� in
- '/// Tools -> Options... -> Text Document -> Compatibility is checked
- '/// if the spacing is adopted 1cm ,2nd paragrahp will be in 1st page
- '/// if the spacing is adopted 2cm ,2nd paragrahp part will be in 1st page , part will be in 2nd page
- '/// if the spacing is adopted 3cm ,2nd paragrahp will be in 2nd page
- hFileOpenLocally( sTestFile )
-
-
- 'Set the focus to the end of the 1st paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sEndOfPara1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<End>"
- Sleep 1
-
- Call wTypeKeys "<Return>"
- Sleep 1
-
- '/// insert 2nd paragraph
- Call wTypeKeys sParagraph2
- Sleep 1
-
- '/// check if the head of paragraph2 is in 1st page and
- '/// + the end of paragraph2 is in 2nd page
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sStartPara2
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The start of paragraph2 should be in 1st page !"
- fCloseNavigator
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sEndPara2
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The end of paragraph2 should be in 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent8
-
- Dim sTestFile as String
- Dim sEndOfPara1 as String
- Dim sStartPara2 as String
- Dim sParagraph2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\spacing1.sxw")
- sEndOfPara1 = "endpara1"
- sStartPara2 = "StartPara2"
- sParagraph2 = "StartPara2mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmendofpara2"
-
- PrintLog "- Test above and below spacing of successive paragraphs are added up"
- '/// <b>Test above and below spacing of successive paragraphs are added up</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 1 paragraph which is design like
- '/// spacing above : 1cm , spacing below : 2cm
- '/// the checkbox "Add spacing between paragraphs and tables" in
- '/// Tools -> Options... -> Text Document -> Compatibility is Unchecked
- '/// if the spacing is adopted 1cm ,2nd paragrahp will be in 1st page
- '/// if the spacing is adopted 2cm ,2nd paragrahp part will be in 1st page , part will be in 2nd page
- '/// if the spacing is adopted 3cm ,2nd paragrahp will be in 2nd page
- hFileOpenLocally( sTestFile )
-
-
- 'Set the focus to the end of the 1st paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sEndOfPara1
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Call wTypeKeys "<End>"
- Sleep 1
-
- Call wTypeKeys "<Return>"
- Sleep 1
-
- '/// insert 2nd paragraph
- Call wTypeKeys sParagraph2
- Sleep 1
-
- '/// check if the paragraph2 is in 2nd page
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sStartPara2
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The start of paragraph2 should be in 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent9
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightline.sxw")
-
- PrintLog "- Test Line spacing - Single"
- '/// <b>Test Line spacing - Single</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 8 lines ,
- '/// + when the spacing is single line , the 8 lines should be in 1 page as design.
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Indents & Spacing , select single line in Line spacing
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 1
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Sleep 1
-
- '/// check if the last line is in 1 page (it should be)
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The end of paragraph should be in 1st page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent10
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightline.sxw")
-
- PrintLog "- Test Line spacing - 1.5 lines"
- '/// <b>Test Line spacing - 1.5 lines</b> ///
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 8 lines
- '/// when the spacing is 1.5 lines ,
- '/// + the last 2(or 3) lines should be in 2nd page.
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Indents & Spacing , select 1.5 lines in Line spacing
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 2
- Sleep 1
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Sleep 1
-
- Call wTypeKeys "<Home>"
- Sleep 1
-
- '/// check if the last 2 lines(7th and 8th) is in 2nd page (it should be)
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 8th line should be in 2nd page !"
- fCloseNavigator
-
- Call wTypeKeys "<Up>"
- Sleep 1
- Call wTypeKeys "<Home>"
- Sleep 1
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 7th line should be in 2nd page !"
- fCloseNavigator
-
- Call wTypeKeys "<Up>" , 2
- Sleep 1
- Call wTypeKeys "<Home>"
- Sleep 1
-
- '/// check if the 5th lines is in 1st page (it should be)
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The 5th line should be in 1st page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent11
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightline.sxw")
-
- PrintLog "- Test Line spacing - Double lines"
- '/// <b>Test Line spacing - Double lines</b>
-
- Call hNewDocument
- Call wOptionsUndo ( "Grundschriften" )
- '/// Open the test file
- '/// This file includes 8 lines
- '/// when the spacing is Double lines , the first 4 lines should be in 1st page
- '/// + the last 4 lines should be in 2nd page.
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Indents & Spacing , select Double lines in Line spacing
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 3
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Sleep 1
-
- Call wTypeKeys "<Home>"
- Sleep 1
-
- '/// check if the last 4 lines is in 2nd page (it should be)
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 8th line should be in 2nd page !"
- fCloseNavigator
-
- Call wTypeKeys "<Up>" , 3
- Sleep 1
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 5th line should be in 2nd page !"
- fCloseNavigator
-
- Call wTypeKeys "<Up>"
- Sleep 1
-
- '/// check if the first 4 lines is in 1st page (it should be)
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The 4th line should be in 1st page !"
- fCloseNavigator
-
- 'Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Sleep 1
-
- Call wTypeKeys "m"
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "3" then warnlog "The 9th line should be in 3rd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent12
-
- Dim sTestFile as String
- Dim sProportional as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightline.sxw")
- sProportional = "130%"
-
- PrintLog "- Test Line spacing - Proportional"
- '/// <b>Test Line spacing - Proportional</b>
-
- Call hNewDocument
-
- '/// 1.Test the max of Proportional is 200%
- '/// Open the test file
- '/// This file includes 8 lines
- '/// when the spacing Proportional is more than 200% ,
- '/// + then it will change to be Double line automatically
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Indents & Spacing ,
- '/// + select Proportional in Line spacing , and input 300%
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 4
- Sleep 2
- Um.SetText "300%"
- TabEinzuegeUndAbstaende.OK
-
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- if Zeilenabstand.GetSelIndex <> 3 then warnlog "should get double line, but get " & Zeilenabstand.GetSelText(Zeilenabstand.GetSelIndex)
- TabEinzuegeUndAbstaende.Cancel
-
- '/// 2.Test when Proportional is 130%
-
- '/// Format/Paragraph / Indents & Spacing ,
- '/// + select Proportional in Line spacing , and input 130%
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 4
- Sleep 2
- Um.SetText sProportional
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Sleep 1
-
- Call wTypeKeys "<Home>"
- Sleep 1
-
- '/// check if the last 2 lines is in 2nd page (it should be)
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 8th line should be in 2nd page !"
- fCloseNavigator
-
- Call wTypeKeys "<Up>" , 2
- Sleep 1
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The 6th line should be in 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent13
-
- Dim sTestFile as String
- Dim sAtLeast as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightLineAdd1Pic.sxw")
- sAtLeast = "4" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Line spacing - At least"
- '/// <b>Test Line spacing - At least</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 8 lines and 1 pic is anchored as character in 1st line
- '/// when the spacing is At least to 4cm, there should be 1 line/page
- '/// + and the pic should move down
- hFileOpenLocally( sTestFile )
-
-
- 'Get the original coordinate-Y
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
- FormatAnchorAsCharacter
- Sleep 1
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
-
- '/// Format/Paragraph / Indents & Spacing , select At least in Line spacing and set 4cm
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 5
- Sleep 1
- Von.SetText sAtLeast
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Sleep 1
-
- '/// check if it is 1 line /page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "8" then Warnlog "The 8th line should be in 8th page !"
- fCloseNavigator
-
- '/// check if the pic moves
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
-
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if sPositionY = Verticalby.Gettext then warnlog "The pic should move !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent14
-
- Dim sTestFile as String
- Dim sAtLeast as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightLineAdd1Pic.sxw")
- sAtLeast = "4" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Line spacing - leading"
- '/// <b>Test Line spacing - leading</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// This file includes 8 lines and 1 pic is anchored as character in 1st line
- '/// when the spacing is leading to 4cm, there should be 1 line/page
- '/// + and the pic should NOT move
- hFileOpenLocally( sTestFile )
-
-
- 'Get the original coordinate-Y
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
- FormatAnchorAsCharacter
- Sleep 1
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
-
- '/// Format/Paragraph / Indents & Spacing , select leading in Line spacing and set 4cm
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 6
- Sleep 1
- Von.SetText sAtLeast
- TabEinzuegeUndAbstaende.OK
-
- 'Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Sleep 1
-
- '/// check if it is 1 line /page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "8" then Warnlog "The 8th line should be in 8th page !"
- fCloseNavigator
-
- '/// check if the pic moves
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
-
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if sPositionY <> Verticalby.Gettext then warnlog "The pic should NOT move !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent15
-
- Dim sTestFile as String
- Dim sFixed as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightline.sxw")
- sFixed = "0" + gSeperator + "50" + gMeasurementUnit
-
- PrintLog "- Test Line spacing - Fixed lines"
- '/// <b>Test Line spacing - Fixed lines</b>
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 8 lines , and font size is 12
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Indents & Spacing ,
- '/// + select Fixed lines in Line spacing
- '/// + set 0.5cm
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Zeilenabstand.Select 7
- sleep 1
- Von.SetText sFixed
- TabEinzuegeUndAbstaende.OK
-
- '/// Format/Character / Font ,Change font size to 24
- Call wTypeKeys "<MOD1 a>"
- Sleep 1
- Call fFormatCharacter("TabFont")
- try
- SizeWest.Select "24"
- catch
- Size.Select "24"
- endcatch
- TabFont.OK
-
- '/// check if there are still 8 lines/page and there
- '/// + should be 2 pages
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>" , 7
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The 8th line should be in 1st page !"
- Call fCloseNavigator
-
- Call wTypeKeys "<Down>"
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 9th line should be in 2nd page !"
- Call fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent16
-
- Dim sTestFile as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\registerTrue.sxw")
-
- PrintLog "- Test Regester-true Active"
- '/// <b>Test Regester-true Active</b>
-
- Call hNewDocument
-
- '/// Open the test file .
- '/// This file includes 2 paragraphs ,
- '/// + and 2 columns , in format/page / page ,
- '/// + regester-true has been checked as text body.
- '/// + You will find out the "He2 heard quiet steps"
- '/// + isn't at the same line with the context left it .
- '/// + There is a pic anchored "He2" .
- hFileOpenLocally( sTestFile )
-
-
- 'Get the original location for the pic
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX = Horizontalby.Gettext
- sPositionY = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorAsCharacter
- Sleep 1
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<MOD1 A>"
-
- '/// Format/Paragraph / Indents & Spacing ,
- '/// + check Regester-true Active
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Registerhaltigkeit.Check
- Sleep 1
- TabEinzuegeUndAbstaende.OK
-
- '/// Check if "He2 heard quiet steps" is at the same line with the context left it.
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if sPositionX <> Horizontalby.Gettext then warnlog "Position X should NOT be changed !"
- if sPositionY = Verticalby.Gettext then warnlog "Position Y should be changed !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent17
-
- Dim sTestFile1 as String
- Dim sTestFile2 as String
-
- sTestFile1 = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\AddSpacingShouldCheck.doc")
- sTestFile2 = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\AddSpacingShouldNotCheck.doc")
-
- PrintLog "- Test 'Add spacing between paragarph and talbes' when importing from MS-Word"
- '/// <b>Test 'Add spacing between paragarph and talbes' when importing from MS-Word</b>
-
- Call hNewDocument
-
- '/// 1.Open the test file - AddSpacingShouldCheck.doc
- '/// In Tools/Optionis/Text Document/Compatibility,
- '/// + the 'Add spacing between paragarph and talbes'
- '/// + should be checked
- hFileOpenLocally( sTestFile1)
-
-
- ToolsOptions
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
- Sleep 2
- Options.TypeKeys "<Down>"
- if Options.IsChecked <> TRUE then
- warnlog "'Add spacing between paragarph and talbes' should be checked"
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// 2.Open the test file - AddSpacingShouldNotCheck.doc
- '/// In Tools/Optionis/Text Document/Compatibility,
- '/// + the 'Add spacing between paragarph and talbes'
- '/// + should NOT be checked
- hFileOpenLocally( sTestFile2)
-
-
- ToolsOptions
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
- Sleep 2
- Options.TypeKeys "<Down>"
- if Options.IsChecked = TRUE then
- warnlog "'Add spacing between paragarph and talbes' should NOT be checked"
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphIndent18
-
- Dim sPageWidth as String
- Dim sMarginLeft as String
- Dim sMarginRight as String
- Dim sBeforeText as String
- Dim sAfterText as String
-
- sPageWidth = "8" + gSeperator + "00" + gMeasurementUnit
- sMarginLeft = "2" + gSeperator + "00" + gMeasurementUnit
- sMarginRight = "2" + gSeperator + "00" + gMeasurementUnit
- sBeforeText = "-10" + gSeperator + "00" + gMeasurementUnit
- sAfterText = "-12" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Negativ indent"
- '/// <b>Test Negativ indent</b> ///
-
- Call hNewDocument
-
- '/// Format/Page , tabpage Page , set page size and margin size ///
- Call fFormatPageWriter("TabSeite")
- Breite.SetText sPageWidth
- Links.SetText sMarginLeft
- Rechts.SetText sMarginRight
- TabSeite.OK
-
- '/// Format/Paragraph / Indents & Spacing , ///
- '/// + set -10cm in 'before text' ///
- '/// + set -12cm in 'after text' ///
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- Vonlinks.SetText sBeforeText
- VonRechts.SetText sAfterText
- TabEinzuegeUndAbstaende.OK
-
- '/// Check if the configuration is right ///
- Call fFormatParagraph("TabEinzuegeUndAbstaende")
- if Vonlinks.GetText <> sBeforeText then warnlog "Before text is wrong , get :" &Vonlinks.GetText
- if VonRechts.GetText <> sAfterText then warnlog "After text is wrong , get :" &VonRechts.SetText
- TabEinzuegeUndAbstaende.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
diff --git a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc
deleted file mode 100644
index 7d34b25d886a..000000000000
--- a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc
+++ /dev/null
@@ -1,1412 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the functionality of Paragraph Formatting - 2
-'*
-'\***********************************************************************
-
-testcase tParagraphAlignment1
-
- Dim sTestFile as String
- Dim sPositionX as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTest.sxw")
-
- PrintLog "- Test 'Left' alignment"
- '/// Test 'Left' alignment
-
- Call hNewDocument
-
- '/// + Open the test file
- '/// + This file includes 1 paragraphs , and a pic is anchored to the character
- hFileOpenLocally( sTestFile )
-
- 'Get the original coordinate-X
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
- FormatAnchorAsCharacter
- Sleep 1
- Call wTypeKeys "<ESCAPE>"
-
- '/// + Format/Paragraph / Alignment , choose Left/Top option
- Call fFormatParagraph("TabAusrichtungAbsatz")
- Links.Check
- TabAusrichtungAbsatz.OK
-
- '/// + check if the alignment is moved to left
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if sPositionX <> Horizontalby.Gettext then warnlog "Alignment Left doesn't work !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphAlignment2
-
- Dim sTestFile as String
- Dim sPositionX as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTestRight.sxw")
- sPositionX = "11" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test 'Right' alignment"
- '/// Test 'Right' alignment
-
- Call hNewDocument
-
- '/// + Open the test file
- '/// + This file includes 1 paragraphs , and a pic is anchored to the laste character
- hFileOpenLocally( sTestFile )
-
- '/// + Format/Paragraph / Alignment , choose Right/Bottom option
- Call fFormatParagraph("TabAusrichtungAbsatz")
- Rechts.Check
- TabAusrichtungAbsatz.OK
-
- '/// + check if the alignment is moved to Right
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX) > 0.02 then
- warnlog "Alignment Right doesn't work !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphAlignment3
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTest.sxw")
-
- PrintLog "- Test 'Center' alignment"
- '/// Test 'Center' alignment
-
- Call hNewDocument
-
- '/// + Open the test file
- '/// + This file includes 1 paragraphs , and a pic is anchored to the character
- hFileOpenLocally( sTestFile )
-
- '/// + Format/Paragraph / Alignment , choose Center option
- Call fFormatParagraph("TabAusrichtungAbsatz")
- Zentriert.Check
- TabAusrichtungAbsatz.OK
-
- '/// + check if the alignment is moved to Center
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Int( Left(Horizontalby.Gettext , 1) ) > 7 OR Int( Left(Horizontalby.Gettext , 1) ) < 4 then
- warnlog "Alignment Center doesn't work !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphAlignment4
-
- Dim sTestFile as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTestJustified.sxw")
- sPositionX1 = "12" + gSeperator + "84" + gMeasurementUnit
-
- PrintLog "- Test 'Justified' alignment - Default"
- '/// Test 'Justified' alignment - Default
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 1 paragraphs , and a pic is anchored to the last character
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
-
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX2 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
- Call wTypeKeys "<ESCAPE>"
-
- '/// Format/Paragraph / Alignment , choose Justified option , and select default in last line
- Call fFormatParagraph("TabAusrichtungAbsatz")
- Blocksatz.Check
- Sleep 1
- LetzteZeile.Select 1
- TabAusrichtungAbsatz.OK
-
- '/// check if the alignment is moved as Justified
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<Tab>"
- Sleep 1
- FormatAnchorToPage
- Sleep 1
-
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX1) > 0.02 then
- if gPlatGroup = "unx" then
- Warnlog "Different font-sizes under Linux/Unix compared with windows."
- else
- Warnlog "Alignment Justified doesn't work -1 !"
- end if
- end if
- TabPositionAndSizeWriter.Cancel
-
- Call wTypeKeys "<Tab>"
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX2 then
- if gPlatGroup = "unx" then
- Warnlog "Different font-sizes under Linux/Unix compared with windows."
- else
- warnlog "Alignment Justified doesn't work -2 !"
- end if
- end if
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphAlignment5
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTestJustified.sxw")
-
- PrintLog "- Test 'Justified' alignment - Centered"
- '/// Test 'Justified' alignment - Centered
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 1 paragraphs , and a pic is anchored to the last character
- hFileOpenLocally( sTestFile )
-
- '/// Format/Paragraph / Alignment ,
- '/// + choose Justified option , and select centered in last line
- Call fFormatParagraph("TabAusrichtungAbsatz")
- Blocksatz.Check
- Sleep 1
- LetzteZeile.Select 2
- TabAusrichtungAbsatz.OK
-
- '/// check if the alignment is moved as Justified
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if StrToDouble(Horizontalby.Gettext) < 7.5 OR StrToDouble(Horizontalby.Gettext) > 8.8 then
- warnlog "Alignment Justified - Centered doesn't work !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphAlignment6
-
- Dim sTestFile as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTestJustifiedCentered.sxw")
- sPositionX2 = "11" + gSeperator + "15" + gMeasurementUnit
-
- PrintLog "- Test 'Justified' alignment - Justified"
- '/// Test 'Justified' alignment - Justified
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 1 paragraphs,
- '/// + and 2 pics are in 2nd line
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys ( "<Shift F4>" )
- Call wTypeKeys "<TAB>"
- Sleep 1
- FormatAnchorToPage
- Sleep 1
-
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX1 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
- FormatAnchorAsCharacter
- Sleep 1
- Call wTypeKeys "<ESCAPE>"
-
- '/// Format/Paragraph / Alignment ,
- '/// + choose Justified option , and select Justified in last line
- Call fFormatParagraph("TabAusrichtungAbsatz")
- Blocksatz.Check
- Sleep 1
- LetzteZeile.Select 3
- TabAusrichtungAbsatz.OK
-
- '/// check if the alignment is moved as Justified
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
-
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX1 then
- if gPlatGroup = "unx" then
- Warnlog "Different font-sizes under Linux/Unix compared with windows."
- else
- warnlog "Alignment Justified doesn't work -1 !"
- end if
- end if
- TabPositionAndSizeWriter.Cancel
-
- Call wTypeKeys "<Tab>"
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX2) > 0.02 then Warnlog "Alignment Justified doesn't work -2 !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphAlignment7
-
- Dim sTestFile as String
- Dim sPositionX as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\testExpand.sxw")
-
- Printlog "- Test 'Expand single word'"
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 1 paragraphs ,
- '/// + there is only 1 word - "That" in last line ,
- '/// + and a drawring object is anchored as character after "That"
- hFileOpenLocally( sTestFile )
-
- printlog "Select the object."
- Sleep 1
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- printlog "Note the position of the drawing object"
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- printlog "Deselect the object"
- Sleep 1
- Call wTypeKeys ( "<ESCAPE>" )
-
- '/// Format/Paragraph / Alignment ,
- '/// + choose Justified option , select Justified in 'last line'
- '/// + check 'expand single word'
- Call fFormatParagraph("TabAusrichtungAbsatz")
- Blocksatz.Check
- Sleep 1
- LetzteZeile.Select 3
- Sleep 1
- EinzelnesWortAustreiben.Check
- Sleep 1
- TabAusrichtungAbsatz.OK
-
- printlog "Select the drawing object , Format/Anchor / To page"
- Call wTypeKeys ( "<Shift F4>" )
-
- Sleep 1
- FormatAnchorToPage
- Sleep 1
-
- printlog "Check if the drawing object has moved from where it was before."
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext = sPositionX then QAErrorLog "#114314# Expand single word doesn't work"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphAlignment8
-
- Dim bAsianLanguage as Boolean
- Dim sTestFile as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\testExpand.sxw")
- sPositionY = "2" + gSeperator + "80" + gMeasurementUnit
-
- PrintLog "- Test Uncheck 'Snap to text grid'"
- '/// <b> Test Uncheck 'Snap to text grid' </b> ///
-
- Call hNewDocument
-
- '/// Set 'Asian Language support' on ///
- bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
-
- '/// Open the test file
- '/// + This file includes 1 paragraphs ,
- '/// + and a drawring object is anchored as character after "That"
- hFileOpenLocally( sTestFile )
-
- '/// Get the drawing object original position ///
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
- FormatAnchorAsCharacter
- Sleep 1
- Call wTypeKeys "<ESCAPE>"
-
- '/// Format/Paragraph / Alignment ,
- '/// + Uncheck 'Snap to text grid'
- Call fFormatParagraph("TabAusrichtungAbsatz")
- TextrasterFangen.UnCheck
- Sleep 1
- TabAusrichtungAbsatz.OK
-
- '/// Format/page / Text Grid
- '/// + Check 'Grid (lines only)
- '/// + close the dialog
- Call fFormatPageWriter("TabGrid")
- LinesGrid.Check
- Sleep 1
- TabGrid.OK
-
- '/// Check if the drawing object is in the same position
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX then warnlog "Uncheck 'Snap to text grid' doesn't work - x position!"
- if fCalculateTolerance(Verticalby.Gettext , sPositionY) > 0.1 then Warnlog "Uncheck 'Snap to text grid' doesn't work - y position!"
- TabPositionAndSizeWriter.Cancel
-
- '/// Set the 'Asian Language support' to default
- if bAsianLanguage = FALSE then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphAlignment9
-
- Dim bAsianLanguage as Boolean
- Dim sTestFile as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\testExpand.sxw")
- sPositionY = "3" + gSeperator + "61" + gMeasurementUnit
-
- PrintLog "- Test check 'Snap to text grid'"
- '/// <b> Test check 'Snap to text grid' </b> ///
-
- Call hNewDocument
-
- '/// Set 'Asian Language support' on ///
- bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
-
- '/// Open the test file
- '/// + This file includes 1 paragraphs ,
- '/// + and a drawring object is anchored as character after "That"
- hFileOpenLocally( sTestFile )
-
- '/// Get the drawing object original position ///
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
- FormatAnchorAsCharacter
- Sleep 1
- Call wTypeKeys "<ESCAPE>"
-
- '/// Format/Paragraph / Alignment ,
- '/// + check 'Snap to text grid'
- Call fFormatParagraph("TabAusrichtungAbsatz")
- TextrasterFangen.Check
- Sleep 1
- TabAusrichtungAbsatz.OK
-
- '/// Format/page / Text Grid
- '/// + Check 'Grid (lines only)
- '/// + close the dialog
- Call fFormatPageWriter("TabGrid")
- LinesGrid.Check
- Sleep 1
- TabGrid.OK
-
- '/// Check if the drawing object is in the same position
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX then warnlog "check 'Snap to text grid' doesn't work - x position!"
- if fCalculateTolerance(Verticalby.Gettext , sPositionY) > 0.1 then Warnlog "check 'Snap to text grid' doesn't work - y position!"
- TabPositionAndSizeWriter.Cancel
-
- '/// Set the 'Asian Language support' to default
- if bAsianLanguage = FALSE then
- Call ActiveDeactivateAsianSupport(FALSE)
- end if
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow1
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\hyphenation.sxw")
- sTestText = "h"
-
- PrintLog "- Hyphenation must be processed while entering text WITHOUT inquiry"
- '/// Hyphenation must be processed while entering text WITHOUT inquiry
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 2 words : AAA and Kilometerhigh
- hFileOpenLocally( sTestFile )
-
- 'the focus is in front of Kilometerhigh
- Call wTypeKeys "<Home>"
-
- '/// 1. Test there is no Hyphenation configuratioin
- For i = 1 to 10
- Call wTypeKeys "M"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboardText <> sTestText then
- if GetClipboardText = "A" then
- Goto GoON
- else
- warnlog "no Hyphenation configuratioin doesn't work !"
- end if
- end if
- Call wTypeKeys "<Home>"
- next i
-
- warnlog "1.Something wrong in Hyphenation test !"
-
- GoON:
-
- Call hCloseDocument
-
- Call hNewDocument
- hFileOpenLocally( sTestFile )
-
- '/// 2. Test there is the Hyphenation configuratioin
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- TabTextfluss.OK
-
- Call wTypeKeys "<Home>"
-
- For i = 1 to 10
- Call wTypeKeys "M"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboardText <> sTestText then
- if GetClipboardText = "t" then
- Goto GoON1
- else
- warnlog "Hyphenation configuratioin doesn't work !"
- end if
- end if
- Call wTypeKeys "<Home>"
- next i
- warnlog "2.Something wrong in Hyphenation test !"
-
- GoON1:
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphTextFlow2
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\hyphenation.sxw")
- sTestText = "Kilomet"
-
- PrintLog "- Hyphenation - Characters at line end"
- '/// Hyphenation - Characters at line end
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 2 words : AAA and Kilometerhigh
- hFileOpenLocally( sTestFile )
-
- '/// 1.Test Characters at line end ==> 6
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- '/// + Set 6 in 'Characters at line end'
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- Sleep 1
- AbZeichenende.SetText "6"
- TabTextfluss.OK
-
- 'the focus is in front of Kilometerhigh
- Call wTypeKeys "<Home>"
-
- For i = 1 to 10
- Call wTypeKeys "M"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 7
-
- EditCopy
- if GetClipboardText = sTestText then Goto GoON1
- Call wTypeKeys "<Home>"
- next i
- warnlog "Something wrong in Characters at line end = > 6"
-
- GoON1:
- Call hCloseDocument
-
- Call hNewDocument
-
- hFileOpenLocally( sTestFile )
-
- '/// 2.Test Characters at line end ==> 8
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- '/// + Set 8 in 'Characters at line end'
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- Sleep 1
- AbZeichenende.SetText "8"
- TabTextfluss.OK
-
- 'the focus is in front of Kilometerhigh
- Call wTypeKeys "<Home>"
-
- For i = 1 to 10
- Call wTypeKeys "M"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 6
- EditCopy
- if GetClipboardText = sTestText then warnlog "Something wrong in Characters at line end = > 8"
- Call wTypeKeys "<Home>"
- next i
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow3
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\hyphenation.sxw")
- sTestText = "lomet"
-
- PrintLog "- Hyphenation - Characters at line begin"
- '/// Hyphenation - Characters at line begin
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 2 words : AAA and Kilometerhigh
- hFileOpenLocally( sTestFile )
-
- '/// 1.Test Characters at line begin ==> 4
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- '/// + Set 4 in 'Characters at line begin'
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- Sleep 1
- AbZeichenAnfang.SetText "4"
- TabTextfluss.OK
-
- 'the focus is in front of Kilometerhigh
- Call wTypeKeys "<Home>"
-
- For i = 1 to 10
- Call wTypeKeys "M"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 5
- EditCopy
- if GetClipboardText = sTestText then Goto GoON1
- Call wTypeKeys "<Home>"
- next i
- warnlog "Something wrong in Characters at line end = > 4"
-
- GoON1:
- Call hCloseDocument
-
- Call hNewDocument
-
- hFileOpenLocally( sTestFile )
-
-
- '/// 2.Test Characters at line end ==> 6
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- '/// + Set 8 in 'Characters at line end'
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- Sleep 1
- AbZeichenAnfang.SetText "6"
- TabTextfluss.OK
-
- 'the focus is in front of Kilometerhigh
- Call wTypeKeys "<Home>"
-
- For i = 1 to 10
- Call wTypeKeys "M"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 5
-
- EditCopy
- if GetClipboardText = sTestText then Goto GoON2
- Call wTypeKeys "<Home>"
-
- next i
- warnlog "Something wrong in Characters at line end = > 6"
-
- GoON2:
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow4
-
- Dim sTestFile as String
- Dim i as Integer
- Dim j as Integer
- Dim sTestText() as Variant
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\hyphenationNew.odt")
-
- PrintLog "- Hyphenation - maxinum number of consecutive typhens"
- '/// Hyphenation - maxinum number of consecutive typhens
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + This file includes 4 words : KiloAmterhigh1 kiloAmeterhigh2 kiloAmeterhigh3 kiloAmeterhigh4
- '/// + the words' length is longer then page length
- hFileOpenLocally( sTestFile )
-
- '/// 1.Test maxinum number of consecutive typhens (default => 0)
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- '/// + Set 0 in 'maxinum number of consecutive typhens'
- sTestText = Array( _
- "Amet" , _
- "1 kilo" , _
- "erhigh" , _
- "Amet" , _
- )
-
- j = UBound(sTestText)
-
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- Sleep 1
- Trennstellen.SetText "0"
- TabTextfluss.OK
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>"
- For i = 0 to j
- Call wTypeKeys "<Down>" , i*2
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sTestText(i) then
- warnlog " Something wrong in Consecutive typhens 0 : " &i
- exit for
- end if
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>"
- Next i
-
- '/// 2.Test maxinum number of consecutive typhens = >1
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- '/// + Set 0 in 'maxinum number of consecutive typhens'
- sTestText = Array( _
- "Amete" , _
- "kilo" , _
- "rhigh2" , _
- "Amete" , _
- )
-
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- Sleep 1
- Trennstellen.SetText "1"
- TabTextfluss.OK
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>"
- For i = 0 to j
- Call wTypeKeys "<Down>" , i*2
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sTestText(i) then
- warnlog " Something wrong in Consecutive typhens 1 : " &i
- exit for
- end if
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>"
- Next i
-
- '/// 3.Test maxinum number of consecutive typhens = >2
- '/// + Format/Paragraph / Text Flow ,
- '/// + Check Hyphenation 'Automatically'
- '/// + Set 0 in 'maxinum number of consecutive typhens'
- sTestText = Array( _
- "Amet" , _
- "1 kilo" , _
- "erhigh" , _
- "Amet" , _
- )
-
- Call fFormatParagraph("TabTextfluss")
- Automatisch.Check
- Sleep 1
- Trennstellen.SetText "2"
- TabTextfluss.OK
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>"
- For i = 0 to j
- Call wTypeKeys "<Down>" , i*2
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sTestText(i) then
- warnlog " Something wrong in Consecutive typhens 2 : " &i
- exit for
- end if
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>"
- Next i
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow5
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\columnBreakParagraphBefore.sxw")
-
- PrintLog "- Paragraph break before Column"
- '/// Paragraph break before Column
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There are 2 columns/page ,includes 2 paragraph
- '/// + the 1st paragraph is in 1st and 2nd column
- '/// + the 2nd paragraph is is 2nd and 3rd column
- hFileOpenLocally( sTestFile )
-
- '/// Set the focus to 2nd paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "She"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- '/// Format/Paragraph / Text Flow
- '/// + Set 'Breaks' enable
- '/// + Select column in Type' and select Before in 'Position'
- Call fFormatParagraph("TabTextfluss")
- Umbruch.Check
- Sleep 1
- UmbruchTyp.Select 2
- Sleep 1
- UmbruchPosition.Select 1
- TabTextfluss.OK
-
- '/// + check if the 2nd paragraph is in 2nd page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in 'Paragraph break before Column'!"
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow6
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\columnBreakParagraphAfter.sxw")
-
- PrintLog "- Paragraph break after Column"
- '/// Paragraph break after Column
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There are 2 columns/page ,includes 1 paragraph
- '/// + the paragraph is in 1st and 2nd column
- '/// + and it is NOT full of 2nd column
- hFileOpenLocally( sTestFile )
-
- '/// Format/Paragraph / Text Flow
- '/// + Set 'Breaks' enable
- '/// + Select column in Type' and select After in 'Position'
- Call fFormatParagraph("TabTextfluss")
- Umbruch.Check
- Sleep 1
- UmbruchTyp.Select 2
- Sleep 1
- UmbruchPosition.Select 2
- TabTextfluss.OK
-
- '/// Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Return>"
-
- '/// + check if the 2nd paragraph is in 2nd page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in 'Paragraph break after Column'! "
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow7
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\pageBreakBefore.sxw")
-
- PrintLog "- Paragraph break before Page"
- '/// Paragraph break before Page
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There are 2 paragraphs in 1 page
- hFileOpenLocally( sTestFile )
-
- '/// Set the focus to 2nd paragraph
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "She"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- '/// Format/Paragraph / Text Flow
- '/// + Set 'Breaks' enable
- '/// + Select page in 'Type' and select Before in 'Position'
- '/// + Select 3rd in 'with page style' and set 4 in 'page number'
- Call fFormatParagraph("TabTextfluss")
- Umbruch.Check
- Sleep 1
- UmbruchTyp.Select 1
- Sleep 1
- UmbruchPosition.Select 1
- Sleep 1
- MitSeitenvorlage.Check
- Sleep 1
- Vorlage.Select 3
- Seitenzahl.SetText "4"
- TabTextfluss.OK
-
- '/// + check if the 2nd paragraph is in 4th page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in ' Column break after paragraph'! "
- fCloseNavigator
-
- Call fFormatParagraph("TabTextfluss")
- if Vorlage.GetSelIndex <> 3 then warnlog "Should select the 3rd in with page style , but get " &Vorlage.GetSelIndex
- if Seitenzahl.GetText <> "4" then warnlog "Should get 4 in with page number , but get " &Seitenzahl.GetText
- TabTextfluss.OK
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow8
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\pageBreakAfter.sxw")
-
- PrintLog "- Paragraph break after page"
- '/// Paragraph break after page
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 paragraph in the file
- hFileOpenLocally( sTestFile )
-
- '/// Format/Paragraph / Text Flow
- '/// + Set 'Breaks' enable
- '/// + Select page in Type' and select After in 'Position'
- Call fFormatParagraph("TabTextfluss")
- Umbruch.Check
- Sleep 1
- UmbruchTyp.Select 1
- Sleep 1
- UmbruchPosition.Select 2
- TabTextfluss.OK
-
- '/// Set the focus to the end of the paragraph
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Return>"
-
- '/// + check if the 2nd paragraph is in 2nd page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "Something wrong in 'Paragraph break after page'! "
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow9
-
- Dim sTestFile as String
- Dim sPage1 as String
- Dim sPage2 as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\textFlowOptions.sxw")
-
- PrintLog "- Don't split paragraph"
- '/// Don't split paragraph
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 paragraph which cross 2 pages
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- Call fFindWord("She")
- Call wTypeKeys "<Home>"
-
- PrintLog "- Uncheck Don't split paragraph"
- '/// 1. Test unchecking "Don't split paragraph"
- '/// Format/Paragraph / Text Flow
- '/// + UnCheck "Don't split paragraph"
- Call fFormatParagraph("TabTextfluss")
- AbsatzNichtTrennen.UnCheck
- TabTextfluss.OK
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The head of the paragraph should be in 1st page !"
- fCloseNavigator
-
- Call wTypeKeys "<MOD1 End>"
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The end of the paragraph should be in 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
- PrintLog "- Check Don't split paragraph"
- Call hNewDocument
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys "<MOD1 Home>"
-
- Call fFindWord("She")
- Call wTypeKeys "<Home>"
-
- '/// 2. Test checking "Don't split paragraph"
- '/// Format/Paragraph / Text Flow
- '/// + Check "Don't split paragraph"
- Call fFormatParagraph("TabTextfluss")
- AbsatzNichtTrennen.Check
- TabTextfluss.OK
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The head of the paragraph should be in 2nd page !"
- fCloseNavigator
-
- Call wTypeKeys "<MOD1 End>"
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The end of the paragraph should be in 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow10
-
- Dim sTestFile as String
- Dim sPage1 as String
- Dim sPage2 as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\textFlowOptions1.sxw")
-
- PrintLog "- Keep with next paragraph"
- '/// Keep with next paragraph
-
- Call hNewDocument
-
- '/// Open the test file
- '/// There are 2 paragraphes in the file , 1st one crosses
- '/// + 1st and 2nd page , 2nd one is in 2nd page
- hFileOpenLocally( sTestFile )
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "He1"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Call wTypeKeys "<Home>"
-
- PrintLog "- Uncheck Keep with next paragraph"
- '/// 1. Test unchecking "Keep with next paragraph"
- '/// Format/Paragraph / Text Flow
- '/// + UnCheck "Keep with next paragraph"
- Call fFormatParagraph("TabTextfluss")
- AbsaetzeZusammenhalten.UnCheck
- TabTextfluss.OK
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The head of the 1st paragraph should be in 1st page ! == " &i
- fCloseNavigator
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "He2"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The head of the 2nd paragraph should be in 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-
- Call hNewDocument
-
- hFileOpenLocally( sTestFile )
-
- PrintLog "- Check Keep with next paragraph"
- '/// 2. Test checking "Keep with next paragraph"
- '/// Set focus to first paragraph ,Format/Paragraph / Text Flow
- '/// + Check "Keep with next paragraph"
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "He1"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
- Call wTypeKeys "<Home>"
- Call fFormatParagraph("TabTextfluss")
- AbsaetzeZusammenhalten.Check
- TabTextfluss.OK
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The head of the 1st paragraph should be in 2nd page !"
- fCloseNavigator
-
- 'Get the head of 2nd paragarph's location
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText "He2"
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The head of the 2nd paragraph should be in 2nd page !"
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow11
-
- Dim sTestFile as String
- Dim sLines as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightline.sxw")
- sLines = "3"
-
- PrintLog "- Orphan control"
- '/// 'Orphan control
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 paragraph (8 lines) in the file
- hFileOpenLocally( sTestFile )
-
- '/// Format/Paragraph / Text Flow
- '/// + Check 'Orphan control' , set 3 in 'Lines'
- Call fFormatParagraph("TabTextfluss")
- Hurenkinderregelung.Check
- Sleep 1
- HurenkinderZeilen.SetText sLines
- TabTextfluss.OK
-
- '/// Press return 5 times to let only 3 lines are in 1st page
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Return>" , 5
-
- '/// + check if the 1st line is in 1st page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The 1st line should be in 1st page!"
- fCloseNavigator
-
- '/// Press Return again
- Call wTypeKeys "<Return>"
-
- '/// + check if the 1st line is in 2nd page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 1st line should be in 2nd page!"
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow12
-
- Dim sTestFile as String
- Dim sLines as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\eightline.sxw")
- sLines = "3"
-
- PrintLog "- Widow control"
- '/// 'Widow control
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 paragraph (8 lines) in the file
- hFileOpenLocally( sTestFile )
-
- '/// Format/Paragraph / Text Flow
- '/// + Check 'Widow control' , set 3 in 'Lines'
- Call fFormatParagraph("TabTextfluss")
- Schusterjungenregelung.Check
- Sleep 1
- SchusterZeilen.SetText sLines
- TabTextfluss.OK
-
- '/// Press return to let the lastest line into 2nd page
- Call wTypeKeys "<MOD1 Home><Return>"
-
- '/// + check if the lastest 3rd line(6th line) is in 2nd page
- Call wTypeKeys "<Down>" , 5
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then warnlog "The 6th line should be in 2nd page!"
- fCloseNavigator
-
- '/// + check if the 5th line is in 1st page
- Call wTypeKeys "<Up>"
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then warnlog "The 5th line should be in 1st page!"
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tParagraphTextFlow13
-
- Dim sTestFile as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\specialHyphenation.sxw")
-
- PrintLog "- Special test for Hyphenation"
- '/// <b> 'Widow control </b> ///
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 word TABC in the end of the first line
- hFileOpenLocally( sTestFile )
-
- '/// Press spaces in the head of the first line , we hope
- '/// + the whole word - 'TABC' will go to 2nd line at one time
- For i = 1 to 30
- Call wTypeKeys "<Home>"
- Call wTypeKeys " "
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboardText = "B" then
- QAErrorLog "#114094#"
- Exit for
- else
- if GetClipboardText <> "C" then
- Exit for
- end if
- end if
- next i
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc
deleted file mode 100644
index 37c79948a1cc..000000000000
--- a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc
+++ /dev/null
@@ -1,1199 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the functionality of Paragraph Formatting - 3
-'*
-'************************************************************************
-'*
-' #1 tParagraphTabs1 'Test Tab stops - Left
-' #1 tParagraphTabs2 'Test Tab stops - Right
-' #1 tParagraphTabs3 'Test Tab stops - Centered
-' #1 tParagraphTabs4 'Test Tab stops - Decimal
-' #1 tParagraphTabs5 'Delete a selected tab stop
-' #1 tParagraphTabs6 'Delete all tab stops
-' #1 tParagraphDropCaps1 'Test Drop Caps - Default
-' #1 tParagraphDropCaps2 'Test Drop Caps - select a word
-' #1 tParagraphDropCaps3 'Test Drop Caps - select different Number of characters
-' #1 tParagraphDropCaps4 'Test Drop Caps - select different number of Lines
-' #1 tParagraphDropCaps5 'Test Drop Caps - Set different 'Space to text'
-' #1 tParagraphDropCaps6 'Test max 'Space to text'
-' #1 tParagraphDropCaps7 'Test text in Contents "Text" field
-' #1 tParagraphDropCaps8 'Test 'Character Style' with given template
-' #1 tParagraphDropCaps9 'Test 'Character Style' with user-defined template
-' #1 tParagraphNumbering1 'Test Numbering
-' #1 tParagraphBorder1 'Test Default borders
-' #1 tParagraphBorder2 'All 'spacing to contents' spin boxes are limited to 5cm
-' #1 tParagraphBorder3 'Test Uncheck 'Synchronize'
-' #1 tParagraphBorder4 'Test check 'Synchronize'
-' #1 tParagraphBorder5 'Test default shadow color
-' #1 tParagraphBorder6 'Test shadow setting
-'*
-'\***********************************************************************
-
-testcase tParagraphTabs1
-
- Dim sTestFile as String
- Dim sTabs as String
- Dim sPosition as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\TabsTest.sxw")
- sTabs = "3" + gSeperator + "00" + gMeasurementUnit
- sPosition = "5" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Tab stops - Left"
- '/// Test Tab stops - Left
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Tabs ,
- '/// + check Left in the type area , and input 3cm in Position
- Call fFormatParagraph("TabTabulatoren")
- TypLinks.Check
- Position.SetText sTabs
- TabTabulatoren.OK
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Press TAB
- Call wTypeKeys "<TAB>"
-
- '/// Check if TAB is configurated correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPosition) > 0.02 then Warnlog "Tab type (left) doesn't work !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphTabs2
-
- Dim sTestFile as String
- Dim sTabs as String
- Dim sPosition as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\TabsTest.sxw")
- sTabs = "3" + gSeperator + "00" + gMeasurementUnit
- sPosition = "4" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Tab stops - Right"
- '/// Test Tab stops - Right
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Tabs ,
- '/// + check Right in the type area , and input 3cm in Position
- Call fFormatParagraph("TabTabulatoren")
- TypRechts.Check
- Position.SetText sTabs
- TabTabulatoren.OK
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Press TAB
- Call wTypeKeys "<TAB>"
-
- '/// Check if TAB is configurated correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPosition) > 0.02 then Warnlog "Tab type (Right) doesn't work !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphTabs3
-
- Dim sTestFile as String
- Dim sTabs as String
- Dim sPosition as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\TabsTest.sxw")
- sTabs = "3" + gSeperator + "00" + gMeasurementUnit
- sPosition = "4" + gSeperator + "50" + gMeasurementUnit
-
- PrintLog "- Test Tab stops - Centered"
- '/// Test Tab stops - Centered
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Tabs ,
- '/// + check Centered in the type area , and input 3cm in Position
- Call fFormatParagraph("TabTabulatoren")
- TypZentriert.Check
- Position.SetText sTabs
- TabTabulatoren.OK
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Press TAB
- Call wTypeKeys "<TAB>"
-
- '/// Check if TAB is configurated correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPosition) > 0.02 then Warnlog "Tab type (Centered) doesn't work !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphTabs4
-
- Dim sTestFile as String
- Dim sTabs as String
- Dim sPosition as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\TabsDecimal.sxw")
- sTabs = "5" + gSeperator + "00" + gMeasurementUnit
- sPosition = "7" + gSeperator + "11" + gMeasurementUnit
-
- PrintLog "- Test Tab stops - Decimal"
- '/// Test Tab stops - Decimal
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file ,
- '/// + and there are 1 "." seperator in front of the pic
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Tabs ,
- '/// + check Decimal in the type area ,
- '/// + input "." in 'character' and input 5cm in 'Position'
- Call fFormatParagraph("TabTabulatoren")
- TypDezimal.Check
- Sleep 1
- TypZeichen.SetText "." 'I use seperator as '.' in this case
- Position.SetText sTabs
- TabTabulatoren.OK
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Press TAB
- Call wTypeKeys "<TAB>"
-
- '/// Check if TAB is configurated correctly
- '/// + [Check . should be at distance 5.00cm]
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPosition) > 0.03 then Warnlog "Tab type (Decimal) doesn't work !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphTabs5
-
- Dim sTab1 , sTab2 , sTab3 as String
-
- sTab1 = "1" + gSeperator + "00" + gMeasurementUnit
- sTab2 = "2" + gSeperator + "00" + gMeasurementUnit
- sTab3 = "3" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Delete a selected tab stop"
- '/// Delete a selected tab stop
-
- Call hNewDocument
-
- '/// Format/Paragraph / Tabs ,
- '/// + insert 3 new tab stops
- Call fFormatParagraph("TabTabulatoren")
- Position.SetText sTab1
- Neu.Click
- Sleep 1
- Position.SetText sTab2
- Neu.Click
- Sleep 1
- Position.SetText sTab3
- Neu.Click
- Sleep 1
- TabTabulatoren.OK
-
- '/// Delete the selected tab stop
- '/// + Select 2.00cm , and press delete key
- Call fFormatParagraph("TabTabulatoren")
- Position.Select 2
- Sleep 2
- Loeschen.Click
- Sleep 2
- Position.Select 1
- if Position.GetSelText <> sTab1 then warnlog "should get " &sTab1 & " but get " &Position.GetSelText
- Position.Select 2
- if Position.GetSelText <> sTab3 then warnlog "should get " &sTab3 & " but get " &Position.GetSelText
-
- if Position.GetItemCount <> 2 then warnlog "should only be 2 items in the listbox !"
- TabTabulatoren.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphTabs6
-
- Dim sTab1 , sTab2 , sTab3 as String
-
- sTab1 = "1" + gSeperator + "00" + gMeasurementUnit
- sTab2 = "2" + gSeperator + "00" + gMeasurementUnit
- sTab3 = "3" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Delete all tab stops"
- '/// Delete all tab stops
-
- Call hNewDocument
-
- '/// Format/Paragraph / Tabs ,
- '/// + insert 3 new tab stops
- Call fFormatParagraph("TabTabulatoren")
- Position.SetText sTab1
- Neu.Click
- Sleep 1
- Position.SetText sTab2
- Neu.Click
- Sleep 1
- Position.SetText sTab3
- Neu.Click
- Sleep 1
- TabTabulatoren.OK
-
- '/// Delete all tab stops
- '/// + Press 'Delete All' Key
- Call fFormatParagraph("TabTabulatoren")
- AlleLoeschen.Click
- Sleep 2
- if Position.GetItemCount <> 0 then warnlog "should be no items in the listbox !"
- TabTabulatoren.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps1
-
- Dim sTestFile as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\DropCapsTest.sxw")
- sPositionX = "4" + gSeperator + "00" + gMeasurementUnit
- sPositionY = "3" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Drop Caps - Default"
- '/// Test Drop Caps - Default
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' , close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- if Initialentext.GetText <> "H" then
- warnlog "The text is wrong : should be H , but get " &Initialentext.GetText
- TabInitialen.OK
- goto endsub
- end if
- if Zeilen.GetText <> "3" then
- warnlog "The default number should be 3 lines , but get " &Zeilen.GetText
- TabInitialen.OK
- goto endsub
- end if
- TabInitialen.OK
-
- '/// Set focus to the pic , check if its position is changed correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX) > 0.4 then Warnlog "X position isn't right !"
- if fCalculateTolerance(Verticalby.Gettext , sPositionY) > 0.4 then Warnlog "Y position isn't right !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps2
-
- Dim sTestFile as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\DropCapsTest.sxw")
- sPositionX = "6" + gSeperator + "00" + gMeasurementUnit
- sPositionY = "3" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Drop Caps - select a word"
- '/// Test Drop Caps - select a word
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' , then check 'whole word' , then close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- GanzesWort.Check
- Sleep 1
- if Initialentext.GetText <> "He" then
- warnlog "The text is wrong : should be He , but get " &Initialentext.GetText
- TabInitialen.OK
- goto endsub
- end if
- if Zeilen.GetText <> "3" then
- warnlog "The default number should be 3 lines , but get " &Zeilen.GetText
- TabInitialen.OK
- goto endsub
- end if
- TabInitialen.OK
-
- '/// Set focus to the pic , check if its position is changed correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX) > 0.4 then Warnlog "X position isn't right !"
- if fCalculateTolerance(Verticalby.Gettext , sPositionY) > 0.4 then Warnlog "Y position isn't right !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps3
-
- Dim sTestFile as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\DropCapsTest.sxw")
- sPositionX = "4" + gSeperator + "50" + gMeasurementUnit
- sPositionY = "4" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Drop Caps - select different Number of characters"
- '/// Test Drop Caps - select different Number of characters
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' , then set '6' in 'number of characters' ,then close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- Anzahl.SetText "6"
- Sleep 1
- if Initialentext.GetText <> "He hea" then
- warnlog "The text is wrong : should be 'He hea' , but get " &Initialentext.GetText
- TabInitialen.OK
- goto endsub
- end if
- if Zeilen.GetText <> "3" then
- warnlog "The default number should be 3 lines , but get " &Zeilen.GetText
- TabInitialen.OK
- goto endsub
- end if
- TabInitialen.OK
-
- '/// Set focus to the pic , check if its position is changed correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX) > 0.4 then Warnlog "X position isn't right !"
- if fCalculateTolerance(Verticalby.Gettext , sPositionY) > 0.4 then Warnlog "Y position isn't right !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps4
-
- Dim sTestFile as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\DropCapsTest.sxw")
- sPositionX = "7" + gSeperator + "50" + gMeasurementUnit
- sPositionY = "2" + gSeperator + "80" + gMeasurementUnit
-
- PrintLog "- Test Drop Caps - select different number of Lines"
- '/// Test Drop Caps - select different number of Lines
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' , then set '6' in 'Lines' ,then close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- Zeilen.SetText "6"
- Sleep 1
- if Initialentext.GetText <> "H" then
- warnlog "The text is wrong : should be 'H' , but get " &Initialentext.GetText
- TabInitialen.OK
- goto endsub
- end if
- TabInitialen.OK
-
- '/// Set focus to the pic , check if its position is changed correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX) > 0.5 then Warnlog "X position isn't right !"
- if fCalculateTolerance(Verticalby.Gettext , sPositionY) > 0.5 then Warnlog "Y position isn't right !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps5
-
- Dim sTestFile as String
- Dim sSpace as String
- Dim sPositionX as String
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\DropCapsTest.sxw")
- sSpace = "1" + gSeperator + "00" + gMeasurementUnit
- sPositionX = "6" + gSeperator + "00" + gMeasurementUnit
- sPositionY = "3" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Drop Caps - Set different 'Space to text'"
- '/// Test Drop Caps - Set different 'Space to text'
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' ,then set 'Space to text' to be 1cm , close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- AbstandZumText.SetText sSpace
- if Initialentext.GetText <> "H" then
- warnlog "The text is wrong : should be H , but get " &Initialentext.GetText
- TabInitialen.OK
- goto endsub
- end if
- if Zeilen.GetText <> "3" then
- warnlog "The default number should be 3 lines , but get " &Zeilen.GetText
- TabInitialen.OK
- goto endsub
- end if
- TabInitialen.OK
-
- '/// Set focus to the pic , check if its position is changed correctly
- Call wTypeKeys ( "<Shift F4>" )
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance(Horizontalby.Gettext , sPositionX) > 0.4 then Warnlog "X position isn't right !"
- if fCalculateTolerance(Verticalby.Gettext , sPositionY) > 0.4 then Warnlog "Y position isn't right !"
- TabPositionAndSizeWriter.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps6
-
- Dim sSpace , sMaxSpace as String
-
- sSpace = "3" + gSeperator + "00" + gMeasurementUnit
- sSpace = "2" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test max 'Space to text'"
- '/// Test max 'Space to text'
-
- Call hNewDocument
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' ,then set 'Space to text' to be 3cm , close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- AbstandZumText.SetText sSpace
- Sleep 1
- TabInitialen.OK
-
- '/// Reopen Format/Paragraph / Drop Caps ,
- '/// + 'Space to text' should be 2cm
- Call fFormatParagraph("TabInitialen")
- if AbstandZumText.GetText <> sSpace then Warnlog "Max 'Space to text' should be 2cm!"
- TabInitialen.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps7
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim sHopeResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\DropCapsTest.sxw")
- sTestText = "Xyz"
- sHopeResult = "Xyzhe"
-
- PrintLog "- Test text in Contents 'Text' field"
- '/// Test text in Contents "Text" field
-
- Call hNewDocument
-
- '/// Open the test file
- '/// + There is 1 pic which is anchored as character in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' ,then set Xyz in Contents 'Text' field , close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- Initialentext.SetText sTestText
- Sleep 1
- TabInitialen.OK
-
- '/// Check if the head of the artile is changed to be "Xyzhe"
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift Right>" , 5
-
- EditCopy
- if GetClipboardText <> sHopeResult then
- warnlog "Get the wrong result : " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps8
-
- Dim iCharacterStyle as Integer
-
- iCharacterStyle = 3
-
- PrintLog "- Test 'Character Style' with given template"
- '/// Test 'Character Style' with given template
-
- Call hNewDocument
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' ,then select 3rd in Contents 'Character Style' field , close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- Zeichenvorlage.Select iCharacterStyle
- Sleep 1
- TabInitialen.OK
-
- '/// Check if the set is OK
- Call fFormatParagraph("TabInitialen")
- if Zeichenvorlage.GetSelIndex <> iCharacterStyle then
- warnlog "Get the wrong result : " & iCharacterStyle
- end if
- TabInitialen.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphDropCaps9
-
- Dim sCharacterStyle as String
- Dim i as Integer
-
- sCharacterStyle = "aNewTestStyle"
-
- PrintLog "- Test 'Character Style' with user-defined template"
- '/// Test 'Character Style' with user-defined template
-
- Call hNewDocument
-
- '/// Make a user-defined template
- '/// Stylist , select 'Character Styles'
- '/// Press New button to add a new character style
- Call wStyleCreate ( sCharacterStyle, "Character" )
-
- '/// Format/Paragraph / Drop Caps ,
- '/// + Check 'Display Drop Caps' ,then select the character style which you just inserted
- '/// + in Contents 'Character Style' field , close the dialog
- Call fFormatParagraph("TabInitialen")
- Anzeigen.Check
- Sleep 1
- Zeichenvorlage.Select sCharacterStyle
- Sleep 1
- TabInitialen.OK
-
- '/// Check if the set is OK
- Call fFormatParagraph("TabInitialen")
- if Zeichenvorlage.GetSelText <> sCharacterStyle then
- Warnlog "Get the wrong result : " & Zeichenvorlage.GetSelText
- end if
- TabInitialen.Cancel
-
- '/// Delete Style
- Call wStyleDelete( sCharacterStyle, "Character" )
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphNumbering1
-
- Dim sTestFile as String
- Dim sTest1 , sTest2 as String
- Dim iNumberingStyle1 as Integer
- Dim sNumberingStartWith1 as String
- Dim sLineNumberingStartWith1 as String
- Dim iNumberingStyle2 as Integer
- Dim sNumberingStartWith2 as String
- Dim sLineNumberingStartWith2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\paragraphNumbering.sxw")
- sTest1 = "He1"
- iNumberingStyle1 = 3
- sNumberingStartWith1 = "2"
- sLineNumberingStartWith1 = "3"
- sTest2 = "He2"
- iNumberingStyle2 = 8
- sNumberingStartWith2 = "4"
- sLineNumberingStartWith2 = "5"
-
- PrintLog "- Test Numbering"
- '/// Test Numbering
-
- Call hNewDocument
-
- '/// Open the test file ,
- '/// + there are 2 paragraphes in the file
- hFileOpenLocally( sTestFile )
-
-
- '/// Find the test word , set the focus to 1st paragraph
- Call fFindWord( sTest1 )
-
- '/// Format/Paragraph / Numbering , select 3rd in Numbering Style ,
- '/// + Check "Restart at this paragraph" ,
- '/// + check "Start with" in Numbering area , input 2
- '/// + check "include this paragraph in line numbering" ,
- '/// + check "Restart at this paragraph" in Line numbering area ,
- '/// + check "Start with" in Line Numbering area , input 3
- Call fFormatParagraph("TabNumerierungAbsatz")
- Vorlage.Select iNumberingStyle1
- Sleep 1
- NumerierungNeuBeginnen.Check
- Sleep 1
- StartWith.Check
- Sleep 1
- NumerierungBeginnenBei.SetText sNumberingStartWith1
- ZeilenumerierungZeilenMitzaehlen.Check
- Sleep 1
- ZeilenumerierungNeuBeginnen.Check
- Sleep 1
- ZeilenumerierungBeginnenBei.SetText sLineNumberingStartWith1
- TabNumerierungAbsatz.OK
-
- '/// Find the test word , set the focus to 2nd paragraph
- Call fFindWord( sTest2 )
-
- '/// Format/Paragraph / Numbering , select 8th in Numbering Style ,
- '/// + Check "Restart at this paragraph" ,
- '/// + check "Start with" in Numbering area , input 4
- '/// + check "include this paragraph in line numbering" ,
- '/// + check "Restart at this paragraph" in Line numbering area ,
- '/// + check "Start with" in Line Numbering area , input 5
- Call fFormatParagraph("TabNumerierungAbsatz")
- Vorlage.Select iNumberingStyle2
- Sleep 1
- NumerierungNeuBeginnen.Check
- Sleep 1
- StartWith.Check
- Sleep 1
- NumerierungBeginnenBei.SetText sNumberingStartWith2
- ZeilenumerierungZeilenMitzaehlen.Check
- Sleep 1
- ZeilenumerierungNeuBeginnen.Check
- Sleep 1
- ZeilenumerierungBeginnenBei.SetText sLineNumberingStartWith2
- TabNumerierungAbsatz.OK
-
- '/// Check if the configuration in paragraph1 is correct
- PrintLog "- Check if the configuration in paragraph1 is correct"
- Call fFindWord( sTest1 )
-
- Call fFormatParagraph("TabNumerierungAbsatz")
- if Vorlage.GetSelIndex <> iNumberingStyle1 then
- Warnlog "The numbering Style is wrong , get " & Vorlage.GetSelIndex
- end if
- if NumerierungNeuBeginnen.IsChecked <> TRUE then
- Warnlog "'Restart at this paragraph' should be checked !"
- end if
- if StartWith.IsChecked <> TRUE then
- Warnlog "'Start with' in Numbering area should be checked !"
- end if
- if NumerierungBeginnenBei.GetText <> sNumberingStartWith1 then
- Warnlog "'Start with' in Numbering area is wrong , get " & NumerierungBeginnenBei.GetText
- end if
- if ZeilenumerierungZeilenMitzaehlen.IsChecked <> TRUE then
- Warnlog "'include this paragraph in line numbering' should be checked!"
- end if
- if ZeilenumerierungNeuBeginnen.IsChecked <> TRUE then
- Warnlog "'Restart at this paragraph' in Line numbering area should be checked!"
- end if
- if ZeilenumerierungBeginnenBei.GetText <> sLineNumberingStartWith1 then
- Warnlog "'Restart at this paragraph' in Line numbering area is wrong , get " & ZeilenumerierungBeginnenBei.GetText
- end if
- TabNumerierungAbsatz.Cancel
-
- '/// Check if the configuration in paragraph2 is correct
- PrintLog "- Check if the configuration in paragraph2 is correct"
- Call fFindWord( sTest2 )
-
- Call fFormatParagraph("TabNumerierungAbsatz")
- if Vorlage.GetSelIndex <> iNumberingStyle2 then
- Warnlog "The numbering Style is wrong , get " & Vorlage.GetSelIndex
- end if
- if NumerierungNeuBeginnen.IsChecked <> TRUE then
- Warnlog "'Restart at this paragraph' should be checked !"
- end if
- if StartWith.IsChecked <> TRUE then
- Warnlog "'Start with' in Numbering area should be checked !"
- end if
- if NumerierungBeginnenBei.GetText <> sNumberingStartWith2 then
- Warnlog "'Start with' in Numbering area is wrong , get " & NumerierungBeginnenBei.GetText
- end if
- if ZeilenumerierungZeilenMitzaehlen.IsChecked <> TRUE then
- Warnlog "'include this paragraph in line numbering' should be checked!"
- end if
- if ZeilenumerierungNeuBeginnen.IsChecked <> TRUE then
- Warnlog "'Restart at this paragraph' in Line numbering area should be checked!"
- end if
- if ZeilenumerierungBeginnenBei.GetText <> sLineNumberingStartWith2 then
- Warnlog "'Restart at this paragraph' in Line numbering area is wrong , get " & ZeilenumerierungBeginnenBei.GetText
- end if
- TabNumerierungAbsatz.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphBorder1
-
- Dim sSpacingToContentsNoBorder as String 'no border in the page
- Dim sSpacingToContentsYesBorder as String 'border exists in the page
-
- sSpacingToContentsNoBorder = "0" + gSeperator + "00" + gMeasurementUnit
- sSpacingToContentsYesBorder = "0" + gSeperator + "05" + gMeasurementUnit
-
- PrintLog "Test Default borders"
- '/// <b> Test Default borders </b> ///
-
- PrintLog "- when no border is set, 'spacing to contents'"
- '/// 1. When no border is set ///
-
- Call hNewDocument
-
- '/// Check if "spacing to contents" is unable ///
- '/// format/Paragraph , tabpage borders
- Call fFormatParagraph("TabUmrandung")
- if Links.GetText <> sSpacingToContentsNoBorder then
- Warnlog "Default of left Spacing to contents is wrong !"
- end if
- if Rechts.GetText <> sSpacingToContentsNoBorder then
- Warnlog "Default of right Spacing to contents is wrong !"
- end if
- if Oben.GetText <> sSpacingToContentsNoBorder then
- Warnlog "Default of up Spacing to contents is wrong !"
- end if
- if Unten.GetText <> sSpacingToContentsNoBorder then
- Warnlog "Default of bottom Spacing to contents is wrong !"
- end if
- TabUmrandung.Cancel
-
- PrintLog "Check if 'spacing to contents' is 0.05cm when there are borders in the paragraph"
- '/// 2. Check if "spacing to contents" is 0.05cm when there are borders in the paragraph ///
- '/// format/Paragraph , tabpage borders ///
- '/// + select 2nd in Default area ///
- Call fFormatParagraph("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
-
- if Links.GetText <> sSpacingToContentsYesBorder then
- Warnlog "Default of left Spacing to contents is wrong !"
- end if
- if Rechts.GetText <> sSpacingToContentsYesBorder then
- Warnlog "Default of right Spacing to contents is wrong !"
- end if
- if Oben.GetText <> sSpacingToContentsYesBorder then
- Warnlog "Default of up Spacing to contents is wrong !"
- end if
- if Unten.GetText <> sSpacingToContentsYesBorder then
- Warnlog "Default of bottom Spacing to contents is wrong !"
- end if
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphBorder2
-
- Dim sSpacingToContents as String 'the max spacing to content
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
-
- sSpacingToContents = "5" + gSeperator + "00" + gMeasurementUnit
- sSpacingToContentsL = "6" + gSeperator + "00" + gMeasurementUnit
- sSpacingToContentsR = "7" + gSeperator + "00" + gMeasurementUnit
- sSpacingToContentsU = "8" + gSeperator + "00" + gMeasurementUnit
- sSpacingToContentsB = "9" + gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- All 'spacing to contents' spin boxes are limited to 5cm"
- '///<b> All "spacing to contents" spin boxes are limited to 5cm </b>///
-
- Call hNewDocument
-
- '/// format/Page , tabpage borders , ///
- '/// + set border exists in the paragraph ///
- '/// + set all spacing to content's size ///
- '/// + more than 5.00cm ///
- Call fFormatParagraph("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- Synchronisieren.Uncheck
- Sleep 1
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- TabUmrandung.OK
-
- '/// Check if all "spacing to contents" is 5.00cm ///
- Call fFormatParagraph("TabUmrandung")
- if Links.GetText <> sSpacingToContents then
- Warnlog "left Spacing to contents is wrong !"
- end if
- if Rechts.GetText <> sSpacingToContents then
- Warnlog "right Spacing to contents is wrong !"
- end if
- if Oben.GetText <> sSpacingToContents then
- Warnlog "up Spacing to contents is wrong !"
- end if
- if Unten.GetText <> sSpacingToContents then
- Warnlog "bottom Spacing to contents is wrong !"
- end if
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphBorder3
-
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
-
- sSpacingToContentsL = "0" + gSeperator + "50" + gMeasurementUnit
- sSpacingToContentsR = "0" + gSeperator + "60" + gMeasurementUnit
- sSpacingToContentsU = "0" + gSeperator + "70" + gMeasurementUnit
- sSpacingToContentsB = "0" + gSeperator + "80" + gMeasurementUnit
-
- PrintLog "- Test Uncheck 'Synchronize'"
- '///<b> Test Uncheck 'Synchronize' </b>///
-
- Call hNewDocument
-
- '/// format/Page , tabpage borders , ///
- '/// + set border exists in the paragraph ///
- '/// + Uncheck synchronize ///
- '/// + Set all spacing to contents ///
- Call fFormatParagraph("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- Synchronisieren.Uncheck
- Sleep 1
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- TabUmrandung.OK
-
- '/// + Check if all "spacing to contents" is correct
- Call fFormatParagraph("TabUmrandung")
- if Links.GetText <> sSpacingToContentsL then
- Warnlog "left Spacing to contents is wrong !"
- end if
- if Rechts.GetText <> sSpacingToContentsR then
- Warnlog "right Spacing to contents is wrong !"
- end if
- if Oben.GetText <> sSpacingToContentsU then
- Warnlog "up Spacing to contents is wrong !"
- end if
- if Unten.GetText <> sSpacingToContentsB then
- Warnlog "bottom Spacing to contents is wrong !"
- end if
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphBorder4
-
- Dim sSpacingToContentsL as String
- Dim sSpacingToContentsR as String
- Dim sSpacingToContentsU as String
- Dim sSpacingToContentsB as String
-
- sSpacingToContentsL = "0" + gSeperator + "50" + gMeasurementUnit
- sSpacingToContentsR = "0" + gSeperator + "60" + gMeasurementUnit
- sSpacingToContentsU = "0" + gSeperator + "70" + gMeasurementUnit
- sSpacingToContentsB = "0" + gSeperator + "80" + gMeasurementUnit
-
- PrintLog "- Test Check 'Synchronize'"
- '/// <b> Test Check 'Synchronize' </b> ///
-
- Call hNewDocument
-
- '/// format/Page , tabpage borders , ///
- '/// + set border exists in the paragraph ///
- '/// + check synchronize ///
- '/// + Set all spacing to contents ///
- Call fFormatParagraph("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- Synchronisieren.Check
- Sleep 1
- Links.SetText sSpacingToContentsL
- Rechts.SetText sSpacingToContentsR
- Oben.SetText sSpacingToContentsU
- Unten.SetText sSpacingToContentsB
- TabUmrandung.OK
-
- '/// + Check if all "spacing to contents" is correct
- Call fFormatParagraph("TabUmrandung")
- if Links.GetText <> sSpacingToContentsB then
- Warnlog "left Spacing to contents is wrong !"
- end if
- if Rechts.GetText <> sSpacingToContentsB then
- Warnlog "right Spacing to contents is wrong !"
- end if
- if Oben.GetText <> sSpacingToContentsB then
- Warnlog "up Spacing to contents is wrong !"
- end if
- if Unten.GetText <> sSpacingToContentsB then
- Warnlog "bottom Spacing to contents is wrong !"
- end if
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphBorder5
-
- Dim sDefaultShadowColor as String
-
- Select case iSprache
- case 01 : sDefaultShadowColor = "Gray"
- case 31: sDefaultShadowColor = "Grijs"
- case 33 : sDefaultShadowColor = "Gris"
- case 34 : sDefaultShadowColor = "Gris"
- case 39 : sDefaultShadowColor = "Grigio"
- case 46 : sDefaultShadowColor = "Grått"
- case 49 : sDefaultShadowColor = "Grau"
- case 55 : sDefaultShadowColor = "Cinza"
- case 81 : sDefaultShadowColor = "ç°è‰²"
- case 82 : sDefaultShadowColor = "회색"
- case 86 : sDefaultShadowColor = "ç°è‰²"
- case 88 : sDefaultShadowColor = "ç°è‰²"
- case else : QAErrorLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- PrintLog "- Test default shadow color"
- '/// <b> Test default shadow color </b>///
-
- Call hNewDocument
-
- '/// + format/Paragraph , tabpage borders
- '/// + Check if the default shadow color is gray
- Call fFormatParagraph("TabUmrandung")
- if SchattenFarbe.GetSelText <> sDefaultShadowColor then
- Warnlog "Shadow default color is wrong , get " & SchattenFarbe.GetSelText
- end if
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tParagraphBorder6
-
- Dim iBorderColor , iShadowColor as Integer
- Dim sShadowDistance as String
-
- iBorderColor = 5 : iShadowColor = 4
- sShadowDistance = "0" + gSeperator + "40" + gMeasurementUnit
-
- PrintLog "- Test shadow setting"
- '/// <b> Test shadow setting </b>///
-
- Call hNewDocument
-
- '/// Format/Paragraph , tabpage borders , do some configuration => ///
- '/// + select 2nd border in default , select 5th border color ,///
- '/// + select 5th shadow , select 4th shadow color , set shadow distance to 0.40cm ///
- '/// + and close the dialog ///
- Call fFormatParagraph("TabUmrandung")
- Vorgaben.TypeKeys "<Right>" , 2
- Sleep 2
- StilFarbe.Select iBorderColor 'set border color
- Position.TypeKeys "<Right>" , 4
- Sleep 2
- Groesse.SetText sShadowDistance
- SchattenFarbe.Select iShadowColor 'set shadow color
- Sleep 1
- TabUmrandung.OK
-
- '/// + format/Page , check if the configuration is all right
- Call fFormatParagraph("TabUmrandung")
- if StilFarbe.GetSelIndex <> iBorderColor then Warnlog "border color is wrong !"
- if Groesse.GetText <> sShadowDistance then Warnlog "shadow distance is wrong !"
- if SchattenFarbe.GetSelindex <> iShadowColor then Warnlog "shadow color is wrong !"
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-
diff --git a/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion1.inc b/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion1.inc
deleted file mode 100644
index a16949d37851..000000000000
--- a/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion1.inc
+++ /dev/null
@@ -1,698 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of Hangul/Hanja Conversion - 1
-'*
-'************************************************************************
-'*
-' #1 tHHNoSelction_1 'No selection
-' #1 tHHNoSelction_2 'Multi languages -1 (Korean before Chinese)
-' #1 tHHNoSelction_3 'Multi languages -2 (Chinese before Korean)
-' #1 tHHNoSelction_4 'Multi languages -3 (no Chinese and Korean)
-' #1 tHHNoSelction_5 'Cursor's position is in the end of the document
-' #1 tHHNoSelction_6 'Notconvertible Hangul character
-' #1 tHHNoSelction_7 'Notconvertible Hanja character
-' #1 tHHSingleSelction_1 'Single selection
-' #1 tHHMultiSelction_1 'Multi selection
-' #1 tHHTextBox_1 'Hangul character in text box
-' #1 tHHDrawBox_1 'Hangul character in draw box
-'*
-'\***********************************************************************
-
-testcase tHHNoSelction_1
-
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
- Dim sTestFile as String
- Dim sResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sResult = "漢字"
-
- GetClipboardText = ""
-
- printlog "- No Selection "
- '/// <b> If no selection is made in the document , </b>
- '/// + <b> the Hangul/Hanja conversion will start </b>
- '/// + <b> exactly at the cursor's location. </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean characters
- '/// + and some Chinese characters
- hFileOpenLocally(sTestFile)
-
- '/// Set focus before the 3rd character
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Down>"
-
- '/// Tools / HangulHanjaConversion
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
-
- '/// Press Peplace button
- if ReplaceBtn.IsEnabled then
- ReplaceBtn.Click
- else
- Warnlog "Replace button is disabled !"
- HangulHanjaConversion.Close
- Call hCloseDocument
- goto endsub
- end if
- Sleep 1
-
- HangulHanjaConversion.Close
-
- '/// Check if conversion really happens at cursor's location
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift Right>",2
- try
- EditCopy
- catch
- Warnlog "#116346#Hangul/Hanja selection to begin of line impossible after closing hhc dialog"
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Right>" , 4
- Call wTypeKeys "<Shift Home>"
- EditCopy
- Sleep 1
- endcatch
-
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHNoSelction_2
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\multiLanguage_K.sxw")
- sResult = "English sèction säction ピンイン Numérico 書翰中"
-
- GetClipboardText = ""
-
- printlog "- Multi languages -1 (Korean before Chinese) "
- '/// <b> In multiple-script/language selections/words, </b>
- '/// + <b> only the Korean and Chinese part will be selected for conversion.</b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some English ,
- '/// + Germany , French , Korean and Chinese characters
- '/// + (Korean is before Chinese)
- Call hFileOpenLocally(sTestFile)
-
- '/// Set focus to the beginning
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
-
- '/// Press Peplace button
- if ReplaceBtn.IsEnabled then
- ReplaceBtn.Click
- else
- Ignore.Click
- Sleep 1
- ReplaceBtn.Click
- end if
-
- if HangulHanjaConversion.Exists then HangulHanjaConversion.Close
-
- '/// Check if Korean is converted
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHNoSelction_3
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\multiLanguage_C.sxw")
- sResult = "English sèction säction ピンイン Numérico 중서한"
-
- GetClipboardText = ""
-
- printlog "- Multi languages -2 (Chinese before Korean) "
- '/// <b> In multiple-script/language selections/words, </b>
- '/// + <b> only the Korean and Chinese part will be selected for conversion.</b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some English ,
- '/// + Germany , French , Korean and Chinese characters
- '/// + (Chinese is before Korean)
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Set focus to the beginning
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
-
- '/// Press Peplace button
- if ReplaceBtn.IsEnabled then
- ReplaceBtn.Click
- else
- Sleep 1
- Ignore.Click
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
- end if
-
- '/// Check if Chinese is converted
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHNoSelction_4
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\noKoreanAndChinese.sxw")
-
- printlog "- Multi languages -3 (no Chinese and Korean) "
- '/// <b> In multiple-script/language selections/words, </b>
- '/// + <b> only the Korean and Chinese part will be selected for conversion.</b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some English ,
- '/// + Germany , French characters .
- '/// + There are no Chinese and Korean
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Set focus to the beginning
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion ,
- '/// + nothing should happen
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
-
- if HangulHanjaConversion.Exists then
- HangulHanjaConversion.Close
- QAErrorlog "#i39017#Conversion dialog should NOT appear !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHNoSelction_5
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sResult = "書翰"
-
- printlog "- Cursor's position is in the end of the document "
- '/// <b> If the cursor resides at the end of a paragraph </b>
- '/// + <b> the first available word/character in the file </b>
- '/// + <b> will be chosen. </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese and Korean
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Set focus to the end of the file
- Call wTypeKeys "<MOD1 End>"
-
- '/// Tools / HangulHanjaConversion ,
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- Sleep 1
- if Word.GetText <> sResult then
- Warnlog "Hope to get " & sResult & " but get " & Word.GetText
- end if
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHNoSelction_6
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\notConvertHangulHanja.sxw")
- sResult = "入力를入力를入力"
-
- printlog "- notconvertible Hangul character"
- '/// <b> When the Hangul conversion is invoked on </b>
- '/// + <b> a notconvertible Hangul character , the </b>
- '/// + <b> dialogue will start with with an empty suggestion </b>
- '/// + <b> and the buttons "Replace" and "Always Replace" will be disabled </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese and Korean,
- '/// + the 3rd character in 1st line isn't convertible
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Set focus to the 3rd character (korean)
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Right>" , 2
-
- '/// Tools / HangulHanjaConversion , Replace and Always Replace
- '/// + should be disabled , "suggestion" should be empty .
- '/// + Press Ignore button will jump to the next convertible Hangul/Hanja character
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- if Suggestions.GetItemCount <> 0 then
- Warnlog "Suggestion should be empty !"
- end if
- try
- ReplaceBtn.Click
- Warnlog "Replace button should NOT work !"
- AlwaysReplace.Click
- Warnlog "Always Replace button should NOT work !"
- catch
- Ignore.Click
- endcatch
- ReplaceBtn.Click
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- if HangulHanjaConversion.Exists then HangulHanjaConversion.Close
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion doesn't work well !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHNoSelction_7
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\notConvertHangulHanja.sxw")
- sResult = "중문奖중문奖중문"
-
- printlog "- notconvertible Hangul character"
- '/// <b> When the Hanja conversion is invoked on </b>
- '/// + <b> a notconvertible Hanja character the </b>
- '/// + <b> dialogue will start with with an empty suggestion </b>
- '/// + <b> and the buttons "Replace" and "Always Replace" will be disabled </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese and Korean,
- '/// + the 3rd character in 2nd line isn't convertible
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Set focus to the 3rd chinese character
- Call wTypeKeys "<MOD1 Home><Down><Home>"
- Call wTypeKeys "<Right>" , 2
-
- '/// Tools / HangulHanjaConversion ,
- '/// + Press Peplace button
- '/// Tools / HangulHanjaConversion , Replace and Always Replace
- '/// + should be disabled , "suggestion" should be empty .
- '/// + Press Ignore button will jump to the next convertible Hangul/Hanja character
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- if Suggestions.GetItemCount <> 0 then
- Warnlog "Suggestion should be empty !"
- end if
- try
- ReplaceBtn.Click
- Warnlog "Replace button should NOT work !"
- AlwaysReplace.Click
- Warnlog "Always Replace button should NOT work !"
- catch
- Ignore.Click
- endcatch
- ReplaceBtn.Click
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- '/// Check if the result is correct
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion doesn't work well !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHSingleSelction_1
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\notConvertHangulHanja.sxw")
- sResult = "入力를入力를입력"
-
-
- printlog "- Single selection"
- '/// <b> Single selection </b>
- '/// <b> Depending on the replacement setting </b>
- '/// + <b>(by word or by character) progressing </b>
- '/// + <b>(step by step) suggestions will be made </b>
- '/// + <b> until the end of selection. </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese and Korean
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Select from 4th to 7th character
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Right>" , 3
- Call wTypeKeys "<Shift Right>" , 4
-
- '/// Tools / HangulHanjaConversion ,
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- if ReplaceBtn.IsEnabled then
- ReplaceBtn.Click
- Sleep 1
- try
- ReplaceBtn.Click
- Sleep 1
- catch
- endcatch
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
- else
- Warnlog "Replace-Button is disabled!"
- end if
-
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------
-
-testcase tHHMultiSelction_1
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim sMultiWord as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\multiSelection.sxw")
- sResult = "를入力를ì—서한ìžì™€ê¸°í˜¸ë¥¼å…¥åŠ›"
- sMultiWord = "ìž…ë ¥"
-
- printlog "- Multi selection"
- '/// <b> Multi selection </b>
- '/// <b> conversion will jump after finishing </b>
- '/// + <b> selection to next selection until end. </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Do a multi Selectiong to the charcters -- ìž…ë ¥
- Call fFindWord(sMultiWord)
-
- '/// Tools / HangulHanjaConversion ,
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- ReplaceBtn.Click
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion doesn't work well !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------
-
-testcase tHHTextBox_1
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\textBox.sxw")
-
- printlog "- Hangul character in text box"
- '/// <b> Hangul character in text box </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes a text box and
- '/// + some Korean chacters in the text box
- Call hFileOpenLocally( sTestFile )
- ()
-
- '/// Tools / HangulHanjaConversion , the below 4 checkboxes ralated
- '/// + ruby should be disabled .
- '/// -> 'Hanja As Ruby Above Hangul'
- '/// -> 'Hanja As Ruby Below Hangul'
- '/// -> 'Hangul As Ruby Above Hanja'
- '/// -> 'Hangul As Ruby Below Hanja'
- try
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- if NOT HangulHanjaConversion.Exists then
- Warnlog "Hangul/Hanja Conversion dialogue isn't poped up !"
- Call hCloseDocument
- goto endsub
- end if
- catch
- Warnlog "- Format / HangulHanjaConversion is disabled or hidden!"
- Call hCloseDocument
- goto endsub
- endcatch
-
- try
- HanjaAsRubyAbove.Check
- Warnlog "'Hanja As Ruby Above Hangul' should be disabled!"
- catch
- endcatch
-
- try
- HanjaAsRubyBelow.Check
- Warnlog "'Hanja As Ruby Below Hangul' should be disabled!"
- catch
- endcatch
-
- try
- HangulAsRubyAbove.Check
- Warnlog "'Hangul As Ruby Above Hanja' should be disabled!"
- catch
- endcatch
-
- try
- HangulAsRubyBelow.Check
- Warnlog "'Hangul As Ruby Below Hanja' should be disabled!"
- catch
- endcatch
-
- HangulHanjaConversion.Close
- Sleep 1
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------
-
-testcase tHHDrawBox_1
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\drawBox.sxw")
-
- printlog "- Hangul character in draw box"
- '/// <b> Hangul character in draw box </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes a draw box and
- '/// + some Korean chacters in the text box
- Call hFileOpenLocally( sTestFile )
- ()
- '/// Tools / HangulHanjaConversion , the below 4 checkboxes ralated
- '/// + ruby should be disabled .
- '/// -> 'Hanja As Ruby Above Hangul'
- '/// -> 'Hanja As Ruby Below Hangul'
- '/// -> 'Hangul As Ruby Above Hanja'
- '/// -> 'Hangul As Ruby Below Hanja'
- try
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- if NOT HangulHanjaConversion.Exists then
- Warnlog "Hangul/Hanja Conversion dialogue isn't poped up !"
- Call hCloseDocument
- goto endsub
- end if
- catch
- Warnlog "- Format / HangulHanjaConversion is disabled or hidden!"
- Call hCloseDocument
- goto endsub
- endcatch
-
- try
- HanjaAsRubyAbove.Check
- Warnlog "'Hanja As Ruby Above Hangul' should be disabled!"
- catch
- endcatch
-
- try
- HanjaAsRubyBelow.Check
- Warnlog "'Hanja As Ruby Below Hangul' should be disabled!"
- catch
- endcatch
-
- try
- HangulAsRubyAbove.Check
- Warnlog "'Hangul As Ruby Above Hanja' should be disabled!"
- catch
- endcatch
-
- try
- HangulAsRubyBelow.Check
- Warnlog "'Hangul As Ruby Below Hanja' should be disabled!"
- catch
- endcatch
-
- HangulHanjaConversion.Close
- Sleep 1
-
- Call hCloseDocument
-
-endcase
-
diff --git a/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion2.inc b/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion2.inc
deleted file mode 100644
index dface018692f..000000000000
--- a/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion2.inc
+++ /dev/null
@@ -1,1618 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of Hangul/Hanja Conversion - 2
-'*
-'************************************************************************
-'*
-' #1 tHHConversion_1 'Hanja/Hangul (Korean -> Chinese)
-' #1 tHHConversion_2 'Hanja/Hangul (Chinese -> Korean)
-' #1 tHHConversion_3 'Hanja(Hangul) (Korean -> Chinese)
-' #1 tHHConversion_4 'Hanja(Hangul) (Chinese -> Korean)
-' #1 tHHConversion_5 'Hangul(Hanja) (Korean -> Chinese)
-' #1 tHHConversion_6 'Hangul(Hanja) (Chinese -> Korean)
-' #1 tHHConversion_7 ''Hanja As Ruby Above Hangul' (Korean -> Chinese)
-' #1 tHHConversion_8 ''Hanja As Ruby Above Hangul' (Chinese -> Korean)
-' #1 tHHConversion_9 ''Hanja As Ruby Below Hangul' (Korean -> Chinese)
-' #1 tHHConversion_10 ''Hanja As Ruby Below Hangul' (Chinese -> Korean)
-' #1 tHHConversion_11 ''Hangul As Ruby Above Hanja' (Korean -> Chinese)
-' #1 tHHConversion_12 ''Hangul As Ruby Above Hanja' (Chinese -> Korean)
-' #1 tHHConversion_13 ''Hangul As Ruby Below Hanja' (Korean -> Chinese)
-' #1 tHHConversion_14 ''Hangul As Ruby Below Hanja' (Chinese -> Korean)
-' #1 tHHConversion_15 'Hangul Only
-' #1 tHHConversion_16 'Hanja Only
-' #1 tHHConversion_17 'Ignore
-' #1 tHHConversion_18 'Always Ignore -1
-' #1 tHHConversion_19 'Always Ignore -2
-' #1 tHHConversion_20 'Replace
-' #1 tHHConversion_21 'Always Replace -1
-' #1 tHHConversion_22 'Always Replace -2
-' #1 tHHConversion_23 'Always Replace -3
-' #1 tHHConversion_24 'Replace by character -1
-' #1 tHHConversion_25 'Replace by character -2(Always Ignore)
-' #1 tHHConversion_26 'Replace by character -3(Always Replace)
-'*
-'\***********************************************************************
-
-testcase tHHConversion_1
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
- sResult = "漢字入力ì€è©²ç•¶í•˜å…¥åŠ›í•˜ä¸­æ–‡ä¿¡æ¯"
-
-
- printlog "- Hanja/Hangul (Korean -> Chinese)"
- '/// <b> Simple convert from Hangul into Hanja </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion ,
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
- For i = 1 to 15
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_2
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
- sResult = "ìƒì‚°í•˜ä¹¡í™©í•˜é•¿ê°•ë ¥ì€í•´ë‹¹"
-
- printlog "- Hanja/Hangul (Chinese -> Korean)"
- '/// <b> Simple convert from Hanja into Hangul </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Chinese character and Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , check hanja only .
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HanjaOnly.Check
- For i = 1 to 15
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion doesn't work well !"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_3
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
- sResult = "漢字(í•œìž)入力(ìž…ë ¥)ì€è©²ç•¶(해당)하入力(ìž…ë ¥)하中文信æ¯"
-
-
- printlog "- Hanja(Hangul) (Korean -> Chinese)"
- '/// <b> Test Hanja(Hangul) - Simple convert from Hangul into Hanja </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , check Hanja(Hangul)
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HanjaHangul.Check
- Sleep 1
- For i = 1 to 15
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_4
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
- sResult = "上山下(ìƒì‚°í•˜)乡黄河(황하)长江(ê°•)ë ¥ì€è©²ç•¶(해당)"
-
-
- printlog "- Hanja(Hangul) (Chinese -> Korean)"
- '/// <b> Test Hanja(Hangul) - Simple convert from Hanja into Hangul </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Chinese character and Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , check Hanja(Hangul).
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HanjaHangul.Check
- Sleep 1
- For i = 1 to 15
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_5
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
- sResult = "í•œìž(漢字)ìž…ë ¥(入力)ì€í•´ë‹¹(該當)하입력(入力)하中文信æ¯"
-
-
- printlog "- Hangul(Hanja) (Korean -> Chinese)"
- '/// <b> Test Hangul(Hanja) - Simple convert from Hangul into Hanja </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , check Hangul(Hanja) ,
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HangulHanja.Check
- Sleep 1
- For i = 1 to 15
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_6
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
- sResult = "ìƒì‚°í•˜(上山下)乡황하(黄河)é•¿ê°•(江)ë ¥ì€í•´ë‹¹(該當)"
-
-
-
- printlog "- Hangul(Hanja) (Chinese -> Korean)"
- '/// <b> Test Hangul(Hanja) - Simple convert from Hanja into Hangul </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Chinese character and Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , check Hangul(Hanja),
- '/// + Press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HangulHanja.Check
- Sleep 1
- For i = 1 to 15
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is correct
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "Conversion result not: " & sResult & " but: " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_7
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "í•œìž"
- sHanjaText = "漢字"
- iAlignment = 2 'Center
- iPosition = 1 'Top
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
-
- printlog "- 'Hanja As Ruby Above Hangul' (Korean -> Chinese)"
- '/// <b> Test 'Hanja As Ruby Above Hangul' - Simple convert from Hangul into Hanja </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hanja As Ruby Above Hangul' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HanjaAsRubyAbove.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHangulText then
- Warnlog "Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHanjaText then
- Warnlog "Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_8
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "ìƒì‚°í•˜"
- sHanjaText = "上山下"
- iAlignment = 2 'Center
- iPosition = 1 'Top
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
-
- printlog "- 'Hanja As Ruby Above Hangul' (Chinese -> Korean)"
- '/// <b> Test 'Hanja As Ruby Above Hangul' - Simple convert from Hanja into Hangul </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hanja As Ruby Above Hangul' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HanjaAsRubyAbove.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHangulText then
- Warnlog "#i39186# Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHanjaText then
- Warnlog "#i39186# Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_9
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "í•œìž"
- sHanjaText = "漢字"
- iAlignment = 2 'Center
- iPosition = 2 'Bottom
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
-
- printlog "- 'Hanja As Ruby Below Hangul' (Korean -> Chinese)"
- '/// <b> Test 'Hanja As Ruby Below Hangul' - Simple convert from Hangul into Hanja </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hanja As Ruby Below Hangul' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HanjaAsRubyBelow.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHangulText then
- Warnlog "Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHanjaText then
- Warnlog "Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_10
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "ìƒì‚°í•˜"
- sHanjaText = "上山下"
- iAlignment = 2 'Center
- iPosition = 2 'Bottom
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
-
- printlog "- 'Hanja As Ruby Below Hangul' (Chinese -> Korean)"
- '/// <b> Test 'Hanja As Ruby Below Hangul' - Simple convert from Hanja into Hangul </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hanja As Ruby Below Hangul' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HanjaAsRubyBelow.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHangulText then
- Warnlog "#i39186# Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHanjaText then
- Warnlog "#i39186# Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_11
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "í•œìž"
- sHanjaText = "漢字"
- iAlignment = 2 'Center
- iPosition = 1 'Top
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
-
- printlog "- 'Hangul As Ruby Above Hanja' (Korean -> Chinese)"
- '/// <b> Test 'Hangul As Ruby Above Hanja' - Simple convert from Hangul into Hanja </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hangul As Ruby Above Hanja' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HangulAsRubyAbove.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHanjaText then
- Warnlog "Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHangulText then
- Warnlog "Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_12
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "ìƒì‚°í•˜"
- sHanjaText = "上山下"
- iAlignment = 2 'Center
- iPosition = 1 'Top
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
-
- printlog "- 'Hangul As Ruby Above Hanja' (Chinese -> Korean)"
- '/// <b> Test 'Hangul As Ruby Above Hanja' - Simple convert from Hanja into Hangul </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hangul As Ruby Above Hanja' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HangulAsRubyAbove.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHanjaText then
- Warnlog "#i39186# Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHangulText then
- Warnlog "#i39186# Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_13
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "í•œìž"
- sHanjaText = "漢字"
- iAlignment = 2 'Center
- iPosition = 2 'Bottom
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
-
- printlog "- 'Hangul As Ruby Below Hanja' (Korean -> Chinese)"
- '/// <b> Test 'Hangul As Ruby Below Hanja' - Simple convert from Hangul into Hanja </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hangul As Ruby Below Hanja' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HangulAsRubyBelow.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHanjaText then
- Warnlog "Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHangulText then
- Warnlog "Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_14
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sHangulText , sHanjaText as String
- Dim iAlignment , iPosition as Integer
-
- sHangulText = "ìƒì‚°í•˜"
- sHanjaText = "上山下"
- iAlignment = 2 'Center
- iPosition = 2 'Bottom
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
-
- printlog "- 'Hangul As Ruby Below Hanja' (Chinese -> Korean)"
- '/// <b> Test 'Hangul As Ruby Below Hanja' - Simple convert from Hanja into Hangul </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , check 'Hangul As Ruby Below Hanja' ,
- '/// + press Peplace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- HangulAsRubyBelow.Check
- Sleep 1
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- '/// Format/Ruby , check if the result is correct
- FormatRuby
- Kontext "RubyDialog"
- Sleep 4
- if BasisText1.GetText <> sHanjaText then
- Warnlog "#i39186# Base text : hope to get " & sHangulText & " but get " & BasisText1.GetText
- end if
- if RubyText1.GetText <> sHangulText then
- Warnlog "#i39186# Ruby text : hope to get " & sHanjaText & " but get " & RubyText1.GetText
- end if
- if Adjust.GetSelIndex <> iAlignment then
- Warnlog "Alignment : hope to get " & Adjust.GeTSelText(iAlignment) & " but get " & Adjust.GeTSelText
- end if
- if RubyPosition.GetSelIndex <> iPosition then
- Warnlog "Position: hope to get " & RubyPosition.GeTSelText(iPosition) & " but get " & RubyPosition.GeTSelText
- end if
- RubyDialog.Close
- Sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_15
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
-
- printlog "- Hangul Only"
- '/// <b> Test 'Hangul Only' </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters .
- '/// + Set focus before Korean character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion ,
- '/// + 'Hangul Only' should be active and Unchecked,
- '/// + 'Hanja Only' should be inactive
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- if HangulOnly.IsChecked = TRUE then
- Warnlog "The default of Hangul Only should be Unchecked ! Bug#116320"
- end if
-
- try
- HangulOnly.UnCheck
- HangulOnly.Check
- catch
- Warnlog "'Hangul Only' Should be active !"
- endcatch
-
- try
- HanjaOnly.Check
- Warnlog "'Hanja Only' should be inactive !"
- catch
- endcatch
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_16
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\ChineseToKorean.sxw")
-
- printlog "- Hanja Only"
- '/// <b> Test 'Hanja Only' </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters .
- '/// + Set focus before Chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion ,
- '/// + 'Hanja Only' should be active and Unchecked,
- '/// + 'Hangul Only' should be inactive
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- if HanjaOnly.IsChecked = TRUE then
- Warnlog "The default of Hanja Only should be Unchecked ! Bug#116320"
- end if
-
- try
- HanjaOnly.UnCheck
- HanjaOnly.Check
- catch
- Warnlog "'Hanja Only' Should be active !"
- endcatch
-
- try
- HangulOnly.Check
- Warnlog "'Hangul Only' should be inactive !"
- catch
- endcatch
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_17
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult , sWord as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\KoreanToChinese.sxw")
- sResult = "í•œìžå…¥åŠ›"
- sWord = "入力"
- GetClipboardText = ""
-
- printlog "- Ignore"
- '/// <b> Test 'Ignore' </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters .
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , press Ignore ,
- '/// + next word should be selected for conversion.
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- Ignore.Click
- Sleep 1
- if Word.GetText <> sWord then
- Warnlog "Hope get " & sWord & " in Word" & " but get " & Word.GetText
- end if
- ReplaceBtn.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift Right>" , 4
- EditCopy
- if GetClipboardText <> sResult then
- Warnlog "Should get " & sResult & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_18
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim sWord as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\alwayIgnore.sxw")
- GetClipboardText = ""
- sWord = "산하"
- sResult = "산하 황하 ìƒì‚°í•˜ä¹¡ 산하"
-
- printlog "- Always Ignore -1"
- '/// <b> Test 'Always Ignore' -1 </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters =>.
- '/// + 山下 上山下乡 山下
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , press Always Ignore ,
- '/// + (here, 山下 should be selected) , then press Replace
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- AlwaysIgnore.Click
- Sleep 1
- For i = 1 to 4
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// The result should be only 黄河 and 上山下 are converted
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sResult then
- Warnlog "Should get " & sResult & " but get " & GetClipboardText
- end if
-
- '/// Close this active document
- Call hCloseDocument
-
- '/// So far , there is still a StarOffice session exists .
-
- '/// Reopen the test file
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion ,
- '/// + ,(here, 黄河 should be selected)
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- if Word.GetText <> sWord then
- Warnlog "#i39308# Don't get " & sWord & " but get " & Word.GetText
- end if
-
- For i = 1 to 4
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// The result should be only 黄河 and 上山下 are converted
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sResult then
- QAErrorlog "#i39308# Should get " & sResult & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_19
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sWord as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\alwayIgnore.sxw")
- sWord = "산하"
-
- printlog "- Always Ignore -2"
- '/// <b> Test 'Always Ignore' -2 </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters =>.
- '/// + 山下 上山下乡 山下
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , press Always Ignore ,
- '/// + (here, 山下 should be selected)
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- AlwaysIgnore.Click
- Sleep 1
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
- '/// Close all Office session
- try
- Call hCloseDocument
- Call hCloseDocument
- catch
- endcatch
- Sleep 2
-
- Call hNewDocument
- '/// Reopen the test file
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , 山下 should be selcted
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- if Word.GetText <> sWord then
- Warnlog "Don't get " & sWord & " but get " & Word.GetText
- end if
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_20
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sWord as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\Replace.sxw")
- sWord = "書翰"
- sResult = "æ›¸ç¿°ìž ì™€"
-
- GetClipboardText = ""
-
- printlog "- Replace"
- '/// <b> Test Replace </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , select a word in selection
- '/// + then press Replace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- try
- Suggestions.Select sWord
- catch
- Warnlog "No suggestion made in Hangul/Hanja converter"
- HangulHanjaConversion.Close
- Call hCloseDocument
- goto endsub
- endcatch
-
- Sleep 1
- For i = 1 to 4
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is right
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sResult then
- Warnlog "Should get " & sResult & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_21
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sWord1 as String
- Dim sWord2 as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\Replace.sxw")
- sWord1 = "書翰" : sWord2 = "書翰"
- sResult = "æ›¸ç¿°ìž ì™€"
- GetClipboardText = ""
-
-
-
-
- printlog "- Replace All -1"
- '/// <b> Test 'Replace All' -1</b>
- '/// <b> replace list will be active for the office session </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , select a word in selection,
- '/// + press 'always replace' , then press Replace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- try
- Suggestions.Select sWord1
- catch
- Warnlog "No suggestion made in Hangul/Hanja converter"
- HangulHanjaConversion.Close
- Call hCloseDocument
- goto endsub
- endcatch
-
- Sleep 2
- AlwaysReplace.Click
- Sleep 1
- For i = 1 to 2
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is right
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "1st:Should get " & sResult & " but get " & GetClipboardText
- end if
-
- '/// Close the file , so far , there is still a StarOffice session
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// Reopen this test file
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- if Word.GetText <> sWord2 then
- Warnlog "#i39308# Should get " & sWord2 & " but get " & Word.GetText
- HangulHanjaConversion.Close
- Call hCloseDocument
- goto endsub
- end if
- For i = 1 to 2
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is right
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- GetClipboardText = ""
- EditCopy
- Sleep 1
- if GetClipboardText <> sResult then
- Warnlog "2nd:Should get " & sResult & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_22
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\Replace.sxw")
- GetClipboardText = ""
-
- printlog "- Replace All -2"
- '/// <b> Test 'Replace All' -2</b>
- '/// <b> replace list will NOT be active when office session is deleted </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , select a word in selection,
- '/// + press 'always replace' , then press Replace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- try
- Suggestions.Select 1
- catch
- Warnlog "No suggestion made in Hangul/Hanja converter"
- HangulHanjaConversion.Close
- Call hCloseDocument
- goto endsub
- endcatch
-
- Sleep 1
- AlwaysReplace.Click
- if HangulHanjaConversion.Exists then HangulHanjaConversion.Close
-
- '/// Close all documents
- For i = 1 to GetDocumentCount - 1
- Call hCloseDocument
- next i
-
- '/// Restart the office
- Call hStartTheOffice
- Call hNewDocument
- '/// Reopen this test file
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- if HangulHanjaConversion.Exists then
- HangulHanjaConversion.Close
- else
- Warnlog "Replace list is active after office-restart"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_23
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sWord as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\replaceAll.sxw")
- sResult = "ì€ë ¥éŠ€æ²³"
- GetClipboardText = ""
-
- printlog "- Replace All -3"
- '/// <b> Test 'Replace All' -3 </b>
- '/// <b> Replacing AF must not lead to replace the AF within CAFE </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , select a word in selection,
- '/// + press 'always replace' , then press Replace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- for i = 1 to 2
- if ReplaceBtn.IsEnabled then
- try
- Suggestions.Select 1
- catch
- Warnlog "No suggestion made in Hangul/Hanja converter"
- HangulHanjaConversion.Close
- Call hCloseDocument
- goto endsub
- endcatch
- else
- Ignore.Click
- end if
- next i
- Sleep 1
- AlwaysReplace.Click
- Sleep 1
- For i = 1 to 2
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is right
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sResult then
- Warnlog "Should get " & sResult & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_24
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\replaceAll.sxw")
- sResult = "垠力垠下"
- GetClipboardText = ""
-
- printlog "- Replace by character -1"
- '/// <b> Test 'Replace by character' -1 </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , the default for 'Replace by character'
- '/// + is OFF . Check 'Replace by character' , then press Replace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- if ReplaceByCharacter.IsChecked = TRUE then
- Warnlog "The default for 'Replace By Character' should be OFF !"
- end if
- ReplaceByCharacter.Check
- Sleep 1
- For i = 1 to 4
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is right
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sResult then
- Warnlog "Should get " & sResult & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_25
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\alwayIgnore.sxw")
- sResult = "山하 황하 ìƒå±±í•˜ä¹¡ 山하"
- GetClipboardText = ""
-
- printlog "- Replace by character -2"
- '/// <b> Test 'Replace by character' -2 </b>
- '/// <b> Test Always Ignore when 'Replace by character' is checked </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Chinese chacters =>.
- '/// + 山下 上山下乡 山下
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , Check 'Replace by character' ,
- '/// + press Always Ignore , then press Replace
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- ReplaceByCharacter.Check
- Sleep 1
- AlwaysIgnore.Click
- Sleep 1
- For i = 1 to 10
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// The result should be only 黄河 and 上山下 are converted
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sResult then
- Warnlog "Should get " & sResult & " but get " & GetClipboardText
- end if
-
- '/// Close this active document
- Call hCloseDocument
-
- 'The purpose is to delete Office session
- try
- Call hCloseDocument
- Call hCloseDocument
- catch
- endcatch
- Sleep 2
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHConversion_26
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sWord as String
- Dim sResult as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\replaceAll.sxw")
- sWord = "æ©"
- sResult = "æ©åŠ›æ©ä¸‹"
- GetClipboardText = ""
-
- printlog "- Replace by character -3"
- '/// <b> Test 'Replace by character' -3 </b>
- '/// <b> Test Always Replace when 'Replace by character' is checked </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some Korean chacters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<Home>"
-
- '/// Tools / HangulHanjaConversion , Check 'Replace by character' ,
- '/// + select a word in selection, press 'always replace' ,
- '/// + then press Replace button
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
- ReplaceByCharacter.Check
- Sleep 1
- Grid.Typekeys "<Right>"
- Sleep 1
- AlwaysReplace.Click
- Sleep 1
- For i = 1 to 4
- if NOT HangulHanjaConversion.Exists then
- Exit for
- end if
- ReplaceBtn.Click
- Sleep 1
- next i
-
- '/// Check if the result is right
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipboardText <> sResult then
- Warnlog "Should get " & sResult & " but get " & GetClipboardText
- end if
-
- Call hCloseDocument
-
- 'Close all Office session
- try
- Call hCloseDocument
- Call hCloseDocument
- catch
- endcatch
-
-endcase
-
-'-----------------------------------------------------------------
-
diff --git a/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion3.inc b/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion3.inc
deleted file mode 100644
index e7b89b0accf0..000000000000
--- a/testautomation/writer/optional/includes/hangulhanjaonversion/hhConversion3.inc
+++ /dev/null
@@ -1,1022 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of Hangul/Hanja Conversion - 3
-'*
-'\***********************************************************************
-
-testcase tHHOptions_1
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
-
- printlog "- User defined dictionaries"
- '/// <b> User defined dictionaries </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
-
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + there should be no entries in User defined dictionaries
- ToolsLanguageHangulHanjaConversion : WaitSlot
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- if UserDefineDictionary.GetItemCount <> 0 then
- Warnlog "With a standard installation the will be no entry here !"
- end if
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_2
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName1 as String
- Dim sDictionaryName2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName1 = "myDictionary1"
- sDictionaryName2 = "myDictionary2"
-
- printlog "- Options - New -1"
- '/// <b> Options - New (more than 2 dictionaries) </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , enter 1 new dictionar name ,
- '/// + close the new dictionary dialog , and add another new
- '/// + dictionary name
- ToolsLanguageHangulHanjaConversion: WaitSlot
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- if NOT HangulHanjaNewDictionary.Exists then
- Warnlog "The window isn't up!"
- Kontext "HangulHanjaOptions"
- goto NOTest
- end if
- DictionaryName.SetText sDictionaryName1
- HangulHanjaNewDictionary.OK
-
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName2
- HangulHanjaNewDictionary.OK
-
- '/// Test if the new dictionaries' name exist and are checked
- Kontext "HangulHanjaOptions"
- UserDefineDictionary.typekeys "<Home>"
- if UserDefineDictionary.GetSelText <> sDictionaryName1 then
- Warnlog "The dictionary1 name should be " & sDictionaryName & " but get " & UserDefineDictionary.GetSelText
- end if
- if UserDefineDictionary.IsChecked <> TRUE then
- Warnlog "The dictionary1 entry should be checked!"
- end if
-
- UserDefineDictionary.typekeys "<Down>"
- if UserDefineDictionary.GetSelText <> sDictionaryName2 then
- Warnlog "The dictionary2 name should be " & sDictionaryName2 & " but get " & UserDefineDictionary.GetSelText
- end if
- if UserDefineDictionary.IsChecked <> TRUE then
- Warnlog "The dictionary2 entry should be checked!"
- end if
-
- 'remove the dictionary you just insert .
- UserDefineDictionary.typekeys "<Home>"
- DeleteDictionary.Click
- Sleep 1
- DeleteDictionary.Click
- Sleep 1
-NOTest:
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_3
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
-
- printlog "- Options - New -2"
- '/// <b> Options - New (duplicate dictionaries) </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese characters
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , enter 1 new dictionary name ,
- '/// + close the new dictionary dialog , and add this dictionary again
- '/// + there should be a error message dialog pop up
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- end if
- else
- QAErrorLog "#i39920# The warning message box doesn't pup up ! "
- end if
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- UserDefineDictionary.typekeys "<Home>"
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_4
-warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
-
- printlog "- Options - New -3"
- '/// <b> Options - New (checkbox) </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , enter 1 new dictionar name ,
- '/// + close the new dictionary dialog
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- Kontext "HangulHanjaOptions"
-
- '/// Uncheck the new dictionary and close the dialog
- Kontext "HangulHanjaOptions"
- UserDefineDictionary.typekeys "<Home>"
- UserDefineDictionary.UnCheck
- HangulHanjaOptions.OK
-
- '/// Press options button , check if the dictionary isn't checked
- Kontext "HangulHanjaConversion"
- Options.Click
- Kontext "HangulHanjaOptions"
- if UserDefineDictionary.IsChecked = TRUE then
- Warnlog "The dictionary entry should NOT be checked!"
- end if
-
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
-
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_5
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName1 as String
- Dim sDictionaryName2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName1 = "nDictionary1"
- sDictionaryName2 = "mDictionary2"
-
- printlog "- Options - Edit (Book)"
- '/// <b> Options - Edit </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 2 new dictionaries
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName1
- HangulHanjaNewDictionary.OK
-
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName2
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
- if Book.GetItemText(1) <> sDictionaryName1 then
- Warnlog "The dictionary name should be " & sDictionaryName1 & " but get " & Book.GetItemText(1)
- end if
- if Book.GetItemText(2) <> sDictionaryName2 then
- Warnlog "The dictionary name should be " & sDictionaryName2 & " but get " & Book.GetItemText(2)
- end if
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_6
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
- Dim sHangul1 , sHanja1a , sHanja1b as String
- Dim sHangul2 , sHanja2a , sHanja2b as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
- sHangul1 = "ì—" : sHanja1a = "里" : sHanja1b = "梨"
- sHangul2 = "를" : sHanja2a = "力" : sHanja2b = "求"
-
- printlog "- Options - Edit (Original) -1"
- '/// <b> Options - Edit (Original) -2 </b>
- '/// <b> insert 2 entries in original, </b>
- '/// <b> check if the result is correct when inputing </b>
- '/// <b> the hangul character in original </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 1 new dictionary
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
- '/// Test new button . It should NOT active when no entry in suggestion
- try
- NewEntry.Click
- Warnlog "New button should NOT be active when no entry in suggestion !"
- catch
- endcatch
-
- '/// Input 1 Hangul character in original
- '/// + and 2 Hanja character in suggestion , then click new
- Original.SetText sHangul1
- Sleep 1
- Suggestion1.SetText sHanja1a
- Sleep 1
- Suggestion2.SetText sHanja1b
- Sleep 1
- NewEntry.Click
- Sleep 1
- '/// Input another Hangul character in original
- '/// + and 2 Hanja character in suggestion , then click new
- Original.SetText sHangul2
- Sleep 1
- Suggestion1.SetText sHanja2a
- Sleep 1
- Suggestion2.SetText sHanja2b
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Input 1st Hangul character in original ,
- '/// + check if 2 Hanja character are in suggestion
- Original.SetText sHangul1
- Sleep 1
- if Suggestion1.GetText <> sHanja1a then
- Warnlog "Don't get " & sHanja1a
- end if
- if Suggestion2.GetText <> sHanja1b then
- Warnlog "Don't get " & sHanja1b
- end if
-
- '/// Input 2nd Hangul character in original ,
- '/// + check if 2 Hanja character are in suggestion
- Original.SetText sHangul2
- Sleep 1
- if Suggestion1.GetText <> sHanja2a then
- Warnlog "Don't get " & sHanja2a
- end if
- if Suggestion2.GetText <> sHanja2b then
- Warnlog "Don't get " & sHanja2b
- end if
-
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_7
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
- Dim sHangul1 , sHanja1a , sHanja1b as String
- Dim sHangul2 , sHanja2a , sHanja2b as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
- sHangul1 = "ì—" : sHanja1a = "里" : sHanja1b = "梨"
- sHangul2 = "를" : sHanja2a = "力" : sHanja2b = "求"
-
- printlog "- Options - Edit (Original) -2"
- '/// <b> Options - Edit (Original) -2 </b>
- '/// <b> insert 2 entries in original, </b>
- '/// <b> check if the result is correct when selecting </b>
- '/// <b> the hangul character in original </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 1 new dictionary
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
-
- '/// Input 1 Hangul character in original
- '/// + and 2 Hanja character in suggestion , then click new
- Original.SetText sHangul1
- Sleep 1
- Suggestion1.SetText sHanja1a
- Sleep 1
- Suggestion2.SetText sHanja1b
- Sleep 1
- NewEntry.Click
- Sleep 1
- '/// Input another Hangul character in original
- '/// + and 2 Hanja character in suggestion , then click new
- Original.SetText sHangul2
- Sleep 1
- Suggestion1.SetText sHanja2a
- Sleep 1
- Suggestion2.SetText sHanja2b
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- if Original.GetItemCount <> 2 then
- Warnlog "#i39936# There should be only 2 items , but get " & Original.GetItemCount
- Goto NoTest
- end if
-
- '/// Select 1st Hangul character in original ,
- '/// + check if 2 Hanja character are in suggestion
- Original.Select sHangul1
- Sleep 1
- if Suggestion1.GetText <> sHanja1a then
- Warnlog "Don't get " & sHanja1a
- end if
- if Suggestion2.GetText <> sHanja1b then
- Warnlog "Don't get " & sHanja1b
- end if
-
- '/// Input 2nd Hangul character in original ,
- '/// + check if 2 Hanja character are in suggestion
- Original.Select sHangul2
- Sleep 1
- if Suggestion1.GetText <> sHanja2a then
- Warnlog "Don't get " & sHanja2a
- end if
- if Suggestion2.GetText <> sHanja2b then
- Warnlog "Don't get " & sHanja2b
- end if
-NoTest:
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_8
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
- Dim sHangul1 , sHanja1 as String
- Dim sHangul2 , sHanja2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
- sHangul1 = "ì—" : sHanja1 = "里"
- sHangul2 = "를" : sHanja2 = "力"
-
- printlog "- Options - Edit (Original) -3"
- '/// <b> Options - Edit (Original)-3 </b>
- '/// <b> Test delele in Edit custom Dictionary dialog </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 1 new dictionary
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
-
- '/// Insert 2 entries
- Original.SetText sHangul1
- Sleep 1
- Suggestion1.SetText sHanja1
- Sleep 1
- NewEntry.Click
- Sleep 1
- Original.SetText sHangul2
- Sleep 1
- Suggestion1.SetText sHanja2
- Sleep 1
- NewEntry.Click
-
- '/// Select 2nd Hangul character in original
- Original.Select sHangul2
- Sleep 1
-
- '/// Press Delete button
- DeleteEntry.Click
- Sleep 1
-
- '/// Check if 2nd entry is really deleted
- if Original.GetItemCount <> 1 then
- Warnlog "There should be only 1 item , but get " & Original.GetItemCount
- end if
-
- Original.SetText sHangul1
- Sleep 1
- if Suggestion1.GetText <> sHanja1 then
- Warnlog "Don't get " & sHanja1
- end if
-
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_9
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
- Dim sHangul , sHanja1 , sHanja2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
- sHangul = "ì—" : sHanja1 = "里" : sHanja2 = "力"
-
- printlog "- Options - Edit (Original) -4"
- '/// <b> Options - Edit (Original)-4 </b>
- '/// <b> Add a suggestion </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 1 new dictionary
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
-
- '/// Insert 1 original and 1 suggestion
- Original.SetText sHangul
- Sleep 1
- Suggestion1.SetText sHanja1
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Input 1st Hangul character in original
- Original.SetText sHangul
- Sleep 1
-
- '/// Add a new suggestion , and press NEW again
- Suggestion2.SetText sHanja2
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Check if 2nd entry is really added
- Original.SetText sHangul
- Sleep 1
- if Suggestion1.GetText <> sHanja1 then
- Warnlog "Don't get " & sHanja1
- end if
- if Suggestion2.GetText <> sHanja2 then
- Warnlog "Don't get " & sHanja2
- end if
-
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_10
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
- Dim sHangul , sHanja1 , sHanja2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
- sHangul = "ì—" : sHanja1 = "里" : sHanja2 = "力"
-
- printlog "- Options - Edit (Original) -5"
- '/// <b> Options - Edit (Original)-5 </b>
- '/// <b> Delete a suggestion </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 1 new dictionary
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
-
- '/// Insert 1 original and 2 suggestions , click NEW
- Original.SetText sHangul
- Sleep 1
- Suggestion1.SetText sHanja1
- Sleep 1
- Suggestion2.SetText sHanja2
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Input 1st Hangul character in original
- Original.SetText sHangul
- Sleep 1
-
- '/// Delete 2nd suggestion , and press NEW again
- Suggestion2.SetText ""
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Check if 2nd suggestion is really deleted
- Original.SetText sHangul
- Sleep 1
- if Suggestion1.GetText <> sHanja1 then
- Warnlog "Don't get " & sHanja1
- end if
- if Suggestion2.GetText <> "" then
- Warnlog "#i39319# Something wrong in 2nd suggestion , get " & Suggestion2.GetText
- end if
-
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_11
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
- Dim sHangul , sHanja1 , sHanja2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
- sHangul = "ì—" : sHanja1 = "里" : sHanja2 = "力"
-
- printlog "- Options - Edit (Original) -6"
- '/// <b> Options - Edit (Original)-6 </b>
- '/// <b> Update a suggestion </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 1 new dictionary
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
-
- '/// Insert 1 original and 1 suggestion , click NEW
- Original.SetText sHangul
- Sleep 1
- Suggestion1.SetText sHanja1
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Input 1st Hangul character in original
- Original.SetText sHangul
- Sleep 1
-
- '/// Update 1st suggestion , and press NEW again
- Suggestion1.SetText sHanja2
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Check if 1st suggestion is really updated
- Original.SetText sHangul
- Sleep 1
- if Suggestion1.GetText <> sHanja2 then
- Warnlog "#i39319# Don't get " & sHanja2 & " but get " & Suggestion1.GetText
- end if
-
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tHHOptions_12
- warnlog( "#i111911# - Test is broken beyond repait, please rewrite" )
- goto endsub
-
-
- Dim sTestFile as String
- Dim sDictionaryName as String
- Dim sHangul , sHanja as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\hangulhanjaonversion\hangul.sxw")
- sDictionaryName = "myDictionary"
- sHangul = "ì—" : sHanja = "里力"
-
- printlog "- Options - Edit (Original) -7"
- '/// <b> Options - Edit (Original)-7 </b>
- '/// <b> Original length isn't same as suggestion length </b>
-
- Call hNewDocument
-
- '/// Open a test file , which includes some
- '/// + Korean chacters and chinese character
- hFileOpenLocally( sTestFile )
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Tools / HangulHanjaConversion , Press Options button ,
- '/// + then press new button , insert 1 new dictionary
- ToolsLanguageHangulHanjaConversion
- Kontext "HangulHanjaConversion"
-
- Options.Click
- Kontext "HangulHanjaOptions"
- NewDictionary.Click
- Kontext "HangulHanjaNewDictionary"
- DictionaryName.SetText sDictionaryName
- HangulHanjaNewDictionary.OK
-
- '/// Press Edit button
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
- Kontext "HangulHanjaEditDictionary"
-
- '/// Insert 1 original and 1 suggestion which is 2
- '/// + hanja character , click NEW
- Original.SetText sHangul
- Sleep 1
- Suggestion1.SetText sHanja
- Sleep 1
- NewEntry.Click
- Sleep 1
-
- '/// Check if a warning message appears
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- else
- Warnlog "The warning message box doesn't pop up ! "
- end if
- end if
-
- Kontext "HangulHanjaEditDictionary"
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- EditDictionary.Click
-
- Kontext "HangulHanjaEditDictionary"
-
- '/// Check if the suggestion is added (should NOT)
- '/// Input 1st Hangul character in original
- Original.SetText sHangul
- Sleep 1
-
- if Suggestion1.GetText <> "" then
- Warnlog "Should get nothing , but get " & Suggestion1.GetText
- end if
-
- HangulHanjaEditDictionary.Close
-
- Kontext "HangulHanjaOptions"
- 'remove the dictionary you just insert .
- DeleteDictionary.Click
- Sleep 1
- HangulHanjaOptions.Cancel
-
- Kontext "HangulHanjaConversion"
- HangulHanjaConversion.Close
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
diff --git a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
deleted file mode 100644
index 560265c301e8..000000000000
--- a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
+++ /dev/null
@@ -1,380 +0,0 @@
-'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@oracle.com
-'*
-'* short description : hyphenation functionality test
-'*
-'************************************************************************
-'*
-' #1 tHyphenation_1
-' #1 tHyphenation_2
-' #1 tHyphenation_3
-' #1 tHyphenation_4
-'*
-'\***********************************************************************
-
-testcase tHyphenation_1
-
- Dim testFile as String
- Dim testWord as String
- Dim PartOfTestWord as String
-
- testFile = "tHyphenation.odt"
- testWord = "following"
- PartOfTestWord = "fol"
-
- printlog "Test Hyphenation using ctrl and -"
-
- printlog "open a test file"
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
-
-
- ' we must assure the word 'following' is the first word in second line
- ' otherwise the test will not work correctly
- if fPrepareHyphenationDocument(testWord) = false then
- Warnlog "Unable to prepare document for hyphenation. Check testcase"
- Call hCloseDocument
- end if
-
- printlog "add '-' between 'fol' and 'lowing'"
- printlog "+ check if fol in the end of the line"
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Right>" , 3
- Call wTypeKeys "<Mod1 SUBTRACT>"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Delete>"
-
- Call wTypeKeys "<End><Left>"
- Call wTypeKeys "<Mod1 Shift Left>"
- EditCopy
-
- if GetClipboardText <> PartOfTestWord then
- Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & PartOfTestWord & "'"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tHyphenation_2
-
- Dim testFile as String
- Dim testWord as String
- Dim PartOfTestWord as String
-
- testFile = "tHyphenation.odt"
- testWord = "following"
- PartOfTestWord = "follow"
-
- printlog "Test Hyphenation using ctrl and -"
-
- printlog "open a test file"
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
-
-
- ' we must assure the word 'following' is the first word in second line
- ' otherwise the test will not work correctly
- if fPrepareHyphenationDocument(testWord) = false then
- Warnlog "Unable to prepare document for hyphenation. Check testcase"
- Call hCloseDocument
- end if
-
- printlog "add '-' between 'follow' and 'ing'"
- printlog "+ check if 'follow' in the end of the line"
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Right>" , 6
- Call wTypeKeys "<Mod1 SUBTRACT>"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End>"
- if gPlatgroup = "unx" then
- Call wTypeKeys "<Delete>", 6
- else
- Call wTypeKeys "<Delete>", 7
- end if
-
- Call wTypeKeys "<End><Left>"
- Call wTypeKeys "<Mod1 Shift Left>"
- EditCopy
-
- if GetClipboardText <> PartOfTestWord then
- Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & PartOfTestWord & "'"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tHyphenation_3
-
- Dim testFile as String
- Dim testWord as String
- Dim firstPartOfTestWord as String
- Dim secondPartOfTestWord as String
- Dim testWordInHyphenationDlg as String
-
- testFile = "tHyphenation.odt"
- testWord = "following"
- testWordInHyphenationDlg = "fol=low-ing"
- firstPartOfTestWord = "fol"
- secondPartOfTestWord = "follow"
-
- printlog "Test Hyphenation using Tools/Hyphenation ,test like fol-lowing"
-
- printlog "open a test file"
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
-
-
- ' we must assure the word 'following' is the first word in second line
- ' otherwise the test will not work correctly
- if fPrepareHyphenationDocument(testWord) = false then
- Warnlog "Unable to prepare document for hyphenation. Check testcase"
- Call hCloseDocument
- end if
-
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End>"
- if gPlatgroup = "unx" then
- Call wTypeKeys "<Delete>", 6
- else
- Call wTypeKeys "<Delete>", 7
- end if
-
- printlog "Tools/Hyphenation"
- ToolsLanguageHyphenate
- Kontext "Hyphenation"
-
- if Not Hyphenation.Exists then
- Warnlog "Unable to bring up Dialog 'Hyphenation'!"
- Call hCloseDocument
- goto endsub
- end if
-
- printlog "check if get 'fol=low-ing'"
- if Wort.Gettext <> testWordInHyphenationDlg then
- Warnlog "Expected " & testWordInHyphenationDlg & " but found " & Wort.Gettext
- Hyphenation.Cancel
- Call hCloseDocument
- goto endsub
- end if
-
- if NOT Vor.IsEnabled then
- Warnlog "the 'Vor' button is Not enabled, or something wrong!"
- Hyphenation.Cancel
- Call hCloseDocument
- goto endsub
- end if
-
- printlog "add '-' between 'fol' and 'lowing' using left arrow key"
- Vor.Click
- Hyphenation.OK
-
- ' Messagebox 'Start hypheantion from the beginning ?
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- catch
- Active.ok
- endcatch
- else
- Warnlog "No messagebox asking for hyphenate at beginning of document"
- end if
- end if
-
- ' End of hyphenation message
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- Active.yes
- endcatch
- else
- Warning "No 'end of hyphenation' messagebox"
- end if
- end if
-
- printlog "Press 3 times 'space bar' in front of the line"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Left>"
- Call wTypeKeys "<Shift Mod1 Left>"
- EditCopy
-
- printlog "Check if get 'fol'"
- if GetClipboardText <> firstPartOfTestWord then
- Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & PartOfTestWord & "'"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tHyphenation_4
-
- Dim testFile as String
- Dim testWord as String
- Dim firstPartOfTestWord as string
- Dim secondPartOfTestWord as String
- Dim testWordInHyphenationDlg1 as String
- Dim testWordInHyphenationDlg2 as String
-
- testFile = "tHyphenation.odt"
- testWord = "following"
- firstPartOfTestWord = "fol"
- secondPartOfTestWord = "follow"
- testWordInHyphenationDlg1 = "fol=low-ing"
- testWordInHyphenationDlg2 = "fol-low=ing"
-
- printLog "- Test Hyphenation using Tools/Hyphenation ,test like follow-ing"
- printlog "Test Hyphenation using Tools/Hyphenation ,test like follow-ing"
-
- printlog "open a test file"
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
-
-
- ' we must assure the word 'following' is the first word in second line
- ' otherwise the test will not work correctly
- if fPrepareHyphenationDocument(testWord) = false then
- Warnlog "Unable to prepare document for hyphenation. Check testcase"
- Call hCloseDocument
- end if
-
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End>"
- if gPlatgroup = "unx" then
- Call wTypeKeys "<Delete>", 6
- else
- Call wTypeKeys "<Delete>", 7
- end if
-
- printlog "Tools/Hyphenation"
- ToolsLanguageHyphenate
- Kontext "Hyphenation"
-
- if Not Hyphenation.Exists then
- Call hCloseDocument
- goto endsub
- end if
-
- printlog "check if get 'fol=low-ing'"
- if Wort.Gettext <> testWordInHyphenationDlg1 then
- Warnlog "Expected " & testWordInHyphenationDlg1 & " but found " & Wort.Gettext
- Hyphenation.Cancel
- Call hCloseDocument
- goto endsub
- end if
-
- printlog "click left arrow key"
- if NOT Vor.IsEnabled then
- Warnlog "the Vor button is Not enabled, or something wrong!"
- Hyphenation.Cancel
- Call hCloseDocument
- goto endsub
- end if
- Vor.Click
-
- printlog "check if get ''fol-low=ing'"
- if Wort.Gettext <> testWordInHyphenationDlg2 then
- Warnlog "Expected " & testWordInHyphenationDlg2 & " but found " & Wort.Gettext
- Call hCloseDocument
- goto endsub
- end if
-
- printlog "add '-' between 'follow' and 'ing' pressing right arrow key"
- if NOT Zurueck.IsEnabled then
- Warnlog "the 'Back' button is Not enabled, or something wrong!"
- Call hCloseDocument
- goto endsub
- end if
- Zurueck.Click
-
- printlog "check if get 'fol-low=ing'"
- if Wort.Gettext <> testWordInHyphenationDlg1 then
- Warnlog "The test word should be changed after clicking Zurueck!"
- Call hCloseDocument
- goto endsub
- end if
-
- Sleep 1
-
- printlog "close all dialogs"
- Hyphenation.OK
-
- ' Messagebox 'Start hypheantion from the beginning ?
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- catch
- Active.ok
- endcatch
- else
- Warnlog "No messagebox asking for hyphenate at beginning of document"
- end if
- end if
-
- ' End of hyphenation message
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- Active.yes
- endcatch
- else
- Warning "No 'end of hyphenation' messagebox"
- end if
- end if
-
- printlog "Press 3 times 'space bar' in front of the line"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Left>"
- Call wTypeKeys "<Shift Mod1 Left>"
- EditCopy
-
- printlog "Check if get 'follow'"
- if GetClipboardText <> secondPartOfTestWord then
- Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & secondPartOfTestWord & "'"
- end if
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc
deleted file mode 100644
index 1def138817b4..000000000000
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc
+++ /dev/null
@@ -1,958 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the insert graphic function - 1
-'*
-'************************************************************************
-'*
-' #1 tInsertGraphic_1 'Test default directory of inserting graphic -1
-' #1 tInsertGraphic_2 'Test default directory of inserting graphic -2
-' #1 tInsertGraphic_3 'Call up dialog Insert / Graphic via Menu ?Insert - Graphics - From File...
-' #1 tInsertGraphic_4 'Call up dialog Insert / Graphic via button from Insert-Toolbox of the Toolbar
-' #1 tInsertGraphic_5 'Insert a graphic with open button
-' #1 tInsertGraphic_6 'Insert a graphic with double click (Return)
-' #1 Tinsertgraphic_7 'Default setting in insert/graphic dialog
-' #1 tInsertGraphic_8 'Test preselect Filter (Format <All>)
-' #1 tInsertGraphic_9 'Test preselect Filter excepte for (Format <All>)
-' #1 tInsertGraphic_10 'Insert linked graphics and break the links via Menu Edit - Link
-' #1 tInsertGraphic_11 'Insert graphics from clipboard -- Edit/Paste
-' #1 tInsertGraphic_12 'Insert graphics from clipboard -- Edit/Paste special
-' #1 fInsertGraphics 'This function will insert a graphic with Link checked
-'*
-'\***********************************************************************
-
-testcase tInsertGraphic_1
-
- Dim iJump as Integer
- Dim sPathName as String
- Dim i as integer
-
- PrintLog "- Test default dirtory of inserting graphic -1"
- '/// Test default directory of inserting graphic -1
- select case iSprache
- case 01: iJump = 5
- case 31: iJump = 1
- case 33: iJump = 14
- case 34: iJump = 12
- case 36: iJump = 10
- case 39: iJump = 5
- case 46: iJump = 11
- case 49: iJump = 11
- case 55: iJump = 9
- case 81: iJump = 16
- case 82: iJump = 4
- case 86: iJump = 7
- case 88: iJump = 5
- case else : QAErrorLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- Call hNewDocument
-
- '/// Tools / Options / StarOffice / Paths
- ToolsOptions
- call hToolsOptions ("StarOffice", "Paths")
-
- Typ.TypeKeys "<HOME><SPACE>"
- Sleep 1
- if iJump-1 > 0 then Typ.TypeKeys "<DOWN>", iJump-1
- Sleep 1
- Bearbeiten.Click
-
- Kontext "OeffnenDlg"
- '/// Set a new path to Graphic
- Pfad.SetText (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic\"))
- Sleep 1
- Oeffnen.Click
- Sleep 1
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep 1
-
- '/// Insert / Graphic / From file
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
-
- '/// Input the jpg file's name which exists in the graphic dirtory , then press open button
- Dateiname.Settext "Bughunter.jpg"
- Sleep 1
-
- Oeffnen.Click
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK
- QAErrorLog "#112220#The graphic directory in Tools/options doesn't work"
- end if
- end if
-
- Kontext "GrafikEinfuegenDlg"
- if GrafikEinfuegenDlg.Exists then GrafikEinfuegenDlg.Cancel
-
- '/// Reset to default path
- ToolsOptions
- call hToolsOptions ("StarOffice", "Paths")
- Typ.TypeKeys "<HOME>"
- Sleep 1
- if iJump-1 > 0 then Typ.TypeKeys "<DOWN>", iJump-1
- Sleep 1
- Standard.Click
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_2
-
- PrintLog "- Test default dirtory of inserting graphic -2"
- '/// Test default dirtory of inserting graphic -2
-
- Call hNewDocument
-
- '/// Input the 1st picture which exists in the dirtory1(full path) ,
- '/// + then press open button
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext ConvertPath(gTesttoolpath + "writer\optional\input\insertgraphic\Bughunter.jpg")
- Sleep 1
- Oeffnen.Click
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK
- Sleep 1
- Warnlog "1 - the file isn't in the dirtory " + ConvertPath(gTesttoolpath + "writer\optional\input\insertgraphic\")
- end if
-
- Kontext "GrafikEinfuegenDlg"
- GrafikEinfuegenDlg.Cancel
- end if
-
- Call wTypeKeys "<ESCAPE>"
-
- '/// Input the 2nd picture which exists in the dirtory2(only file name) ,
- '/// + then press open button
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext "jolink.jpg"
- Sleep 1
- Oeffnen.Click
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK
- Sleep 1
- else
- Warnlog "2 - Should get the warning messagebox"
- end if
-
- Kontext "GrafikEinfuegenDlg"
- GrafikEinfuegenDlg.Cancel
- end if
-
- Call wTypeKeys "<ESCAPE>"
-
- '/// Input the 3rd picture which exists in the dirtory2(full path) ,
- '/// + then press open button
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext ConvertPath(gTesttoolpath + "writer\optional\input\graphics\bild.jpg")
- Sleep 1
- Oeffnen.Click
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK
- Sleep 1
- Warnlog "3 - the file isn't in the dirtory " + ConvertPath(gTesttoolpath + "writer\optional\input\grafik")
- end if
-
- Kontext "GrafikEinfuegenDlg"
- GrafikEinfuegenDlg.Cancel
- end if
-
- Call wTypeKeys "<ESCAPE>"
-
- '/// Input the 2nd picture which exists in the dirtory2(only file name) again,
- '/// + then press open button
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext "jolink.jpg"
- Sleep 1
- Oeffnen.Click
- Sleep 2
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK
- Sleep 1
- Warnlog "2 - the file isn't in the dirtory " + ConvertPath(gTesttoolpath + "writer\optional\input\grafik")
- end if
-
- Kontext "GrafikEinfuegenDlg"
- GrafikEinfuegenDlg.Cancel
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_3
-
- PrintLog "- Call up dialog Insert / Graphic via Menu ?Insert - Graphics - From File..."
- '/// Call up dialog Insert / Graphic via Menu ?Insert - Graphics - From File
-
- Call hNewDocument
-
- try
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
-
- if GrafikEinfuegenDlg.Exists then
- GrafikEinfuegenDlg.Cancel
- else
- Warnlog "The dialogue can't be opened from Menu Insert - Graphics - From File..."
- end if
- catch
- Warnlog "Something wrong when calling up dialogue from Menu Insert - Graphics - From File..."
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_X
- Dim sShortcut as string
- PrintLog "- Call up dialog Insert / Picture via Alt+I+U+F ..."
- '/// Call up dialog Insert / Graphic via Alt+I+G+F
-
- Select case iSprache
- case 01: sShortcut = "<MOD2 I U F>"
- case else
- QAErrorlog "Please add shortcut for Insert->Picture"
- goto endsub
- end select
-
- Call hNewDocument
-
- try
- Call wTypeKeys sShortcut
- Kontext "GrafikEinfuegenDlg"
-
- if GrafikEinfuegenDlg.Exists then
- GrafikEinfuegenDlg.Cancel
- else
- Warnlog "The dialogue can't be opened from Menu Insert - Picture - From File..."
- end if
- catch
- Warnlog "Something wrong when calling up dialogue from Menu Insert - Picture - From File..."
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_4
-
- PrintLog "- Call up dialog Insert / Graphic via button from Insert-Toolbox of the Toolbar "
- '/// Call up dialog Insert / Graphic via button from Insert-Toolbox of the Toolbar
-
- Call hNewDocument
-
- Call hToolbarSelect("INSERT", true )
- Sleep 2
- Grafik.Click
- Sleep 3
-
- Kontext "GrafikEinfuegenDlg"
-
- if GrafikEinfuegenDlg.Exists then
- GrafikEinfuegenDlg.Cancel
- else
- Warnlog "The dialogue can't be opened from Insert-Toolbox of the Toolbar"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_5
-
- PrintLog "- Insert a graphic with open button"
- '/// Insert a graphic with open button
-
- Call hNewDocument
-
- '/// Insert a Graphic , Insert/Graphics/From file
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
- Sleep 1
- Oeffnen.Click
-
- if NOT GrafikEinfuegenDlg.Exists then Warnlog "The insert graphic dialog should be still there!"
-
- Dateiname.Settext ("boy.gif")
-
- '/// check if open button can insert a graphic or not
- Oeffnen.Click
- Sleep 2
-
- if GrafikEinfuegenDlg.Exists then Warnlog "The insert graphic dialog should NOT be there!"
-
- try
- fFormatGraphic("TabZusaetze")
- Kontext "TabZusaetze"
- TabZusaetze.Cancel
- catch
- Warnlog "The graphic is NOT inserted correctly !"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_6
-
- PrintLog "- Insert a graphic with double click (Return)"
- '/// Insert a graphic with double click (Return)
-
- Call hNewDocument
-
- '/// Insert a Graphic , Insert/Graphics/From file
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
- Sleep 1
- Oeffnen.Click
-
- if NOT GrafikEinfuegenDlg.Exists then Warnlog "The insert graphic dialog should be still there!"
-
- Dateiname.Settext ("boy.gif")
-
- '/// check if double click (return) can insert a graphic or not
- '/// [Note : the first is CVS directory]
- DateiAuswahl.Select 2
- Sleep 1
-
- DateiAuswahl.TypeKeys "<Return>"
- Sleep 2
-
- if GrafikEinfuegenDlg.Exists then Warnlog "The insert graphic dialog should NOT be there!"
-
- try
- fFormatGraphic("TabZusaetze")
- Kontext "TabZusaetze"
- TabZusaetze.Cancel
- catch
- Warnlog "The graphic is NOT inserted correctly !"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_7
-
- Dim iFileType as Integer
- Dim sStyle as String
-
- iFileType = 1
-
- select case iSprache
- case 01 : sStyle = "Graphics"
- case 31 : sStyle = "Afbeeldingen"
- case 33 : sStyle = "Image"
- case 34 : sStyle = "Imagen"
- case 39 : sStyle = "Immagine"
- case 46 : sStyle = "Grafik"
- case 49 : sStyle = "Grafik"
- case 55 : sStyle = "Figuras"
- case 81 : sStyle = "図"
- case 82 : sStyle = "그래픽"
- case 86 : sStyle = "图形"
- case 88 : sStyle = "圖形"
- case else : QAErrorLog "Now, this testcase does not support for the language " +iSprache
- exit sub
- end select
-
- PrintLog "- Default setting in insert/graphic dialog"
- '/// Default setting in insert/graphic dialog
-
- Call hNewDocument
-
- '/// Insert a Graphic , Insert/Graphics/From file
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- if Stil.GetItemText(Stil.GetSelIndex) <> sStyle then Warnlog "The default setting for Style is wrong ! should be "+ sStyle + " but get " + Stil.GetItemText(Stil.GetSelIndex)
- if Dateityp.GetSelIndex <> iFileType then Warnlog "The default setting for file type is wrong ! should be "+ Dateityp.GetItemText(iFileType) + " but get " + Dateityp.GetItemText(Dateityp.GetSelIndex)
- GrafikEinfuegenDlg.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_8
-
- Dim iFileType as Integer
- Dim iFileNumber as Integer
-
- iFileType = 1 'filter (Format <All>)
- iFileNumber = 4
-
- PrintLog "- Test preselect Filter (Format <All>)"
- '/// Test preselect Filter (Format <All>)
-
- Call hNewDocument
-
- '/// Insert a Graphic , Insert/Graphics/From file
- InsertGraphicsFromFile
-
- '/// Select filter (Format <All>)
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
- Sleep 1
- Oeffnen.Click
-
- Dateityp.Select iFileType
- Sleep 1
-
- '/// Check if Filter (Format <All>) works well
- if DateiAuswahl.GetItemCount <> iFileNumber then Warnlog "Filter (Format <All>) does NOT work well"
- GrafikEinfuegenDlg.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_9
-
- Dim iFileType as Integer
- Dim iFileNumber as Integer
-
- iFileType = 2 'another filter except for (Format <All>) -- bmp
- iFileNumber = 1
-
- PrintLog "- Test preselect Filter excepte for (Format <All>)"
- '/// Test preselect Filter excepte for (Format <All>)
-
- Call hNewDocument
-
- '/// Insert a Graphic , Insert/Graphics/From file
- InsertGraphicsFromFile
-
- '/// Select filter 'BMP'
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
- Sleep 1
- Oeffnen.Click
-
- Dateityp.Select iFileType
- Sleep 1
-
- '/// Check if Filter BMP works well
- if DateiAuswahl.GetItemCount <> iFileNumber then Warnlog "Filter BMP does NOT work well"
- GrafikEinfuegenDlg.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_10
-
- Dim sTestFile as String
- dim sOutFile as string
-
- sTestFile = ConvertPath(gOfficepath + "user\work\tInsertGraphic_5.sxw")
- sOutFile = gOfficepath + "user\work\tInsertGraphic_5.odt"
-
- PrintLog "- Insert linked graphics and break the links via Menu Edit - Link"
- '/// Insert linked graphics and break the links via Menu Edit - Link
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>" , 2
-
- '/// Insert a jpg Graphic
- Call fInsertGraphics("Bughunter.jpg")
-
- '/// + and set name as TEST1
- Call fFormatGraphic("TabZusaetze")
- sleep(1)
- Kontext "TabZusaetze"
- ObjektName.SetText "TEST1"
- TabZusaetze.OK
- sleep(1)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<Return>" , 2
- sleep(2)
-
- '/// Insert a gif Graphic (animated)
- Call fInsertGraphics("boy.gif")
-
- '/// + and set name as TEST2
- Call fFormatGraphic("TabZusaetze")
- sleep(1)
- Kontext "TabZusaetze"
- ObjektName.SetText "TEST2"
- TabZusaetze.OK
- sleep(1)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<Return>" , 2
- sleep(2)
-
- '/// Insert a bmp Graphic
- Call fInsertGraphics("game.bmp")
-
- '/// + and set name as TEST3
- Call fFormatGraphic("TabZusaetze")
- sleep(2)
- Kontext "TabZusaetze"
- ObjektName.SetText "TEST3"
- TabZusaetze.OK
- sleep(1)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<Return>" , 2
- sleep(2)
-
- '/// Edit / Links
- EditLinksWriter
- Kontext "VerknuepfungenBearbeiten"
-
- '/// Select all graphics
- Liste.TypeKeys "<Shift End>"
- sleep(1)
-
- '/// Remove link
- Loesen.Click
- sleep(1)
- Kontext "Active"
- if Active.Exists(1) then
- Active.YES
- else
- warnlog "Messagebox should appear!"
- end if
- sleep(2)
-
- '/// Close the edit/link dialogue
- Kontext "VerknuepfungenBearbeiten"
- VerknuepfungenBearbeiten.Close
- sleep(1)
-
- '/// Check if the inserted graphics are still there
- Kontext "DocumentWriter"
- Call wTypeKeys ( "<Shift F4>" )
- sleep(1)
- fFormatGraphic("TabZusaetze")
- sleep(1)
- Kontext "TabZusaetze"
- if ObjektName.GetText <> "TEST1" then warnlog "The first graphic isn't right!"
- TabZusaetze.OK
- sleep(1)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<Tab>"
- Call fFormatGraphic("TabZusaetze")
- sleep(1)
- Kontext "TabZusaetze"
- if ObjektName.GetText <> "TEST2" then Warnlog "The second graphic isn't right!"
- TabZusaetze.OK
- sleep(1)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<Tab>"
- Call fFormatGraphic("TabZusaetze")
- sleep(1)
- Kontext "TabZusaetze"
- if ObjektName.GetText <> "TEST3" then Warnlog "The third graphic isn't right!"
- TabZusaetze.OK
- sleep(1)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<ESCAPE><Home>"
- PrintLog "- Save and Reload the file"
-
- '/// Save the file and close the file
- Call hFileSaveAsWithFilterKill( sOutFile, "writer8")
- sleep(2)
- Call hCloseDocument
- sleep(2)
-
- '/// Reload the file
- hFileOpen( sOutFile )
- sleep(2)
-
-
- '/// Check if the inserted graphics are still there
- Kontext "DocumentWriter"
- Call wTypeKeys ( "<Shift F4>" )
- sleep(1)
- if fFormatGraphic("TabZusaetze") = false then
- Warnlog "#linked JPEG pictures will disappear when doc is modified."
-
- kontext "TabZusatze"
- if ( TabZusaetze.exists() ) then TabZusaetze.close()
- kontext "DocumentWriter"
- Call hCloseDocument
- goto endsub
- end if
- sleep(1)
- Kontext "TabZusaetze"
- if ObjektName.GetText <> "TEST1" then Warnlog "The first graphic isn't right!"
- TabZusaetze.OK
- sleep(1)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<Tab>"
- sleep(1)
- Call fFormatGraphic("TabZusaetze")
- sleep(1)
- Kontext "TabZusaetze"
- if ObjektName.GetText <> "TEST2" then Warnlog "The second graphic isn't right!"
- TabZusaetze.OK
- sleep(2)
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<Tab>"
- sleep(1)
- Call fFormatGraphic("TabZusaetze")
- sleep(1)
- Kontext "TabZusaetze"
- if ObjektName.GetText <> "TEST3" then Warnlog "The third graphic isn't right!"
- TabZusaetze.OK
- sleep(1)
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_11
-
- Dim sGraphicName as String
- Dim sWidth as String
- Dim sHeight as String
- Dim sLeft as String
- Dim sUp as String
- Dim iFromLeft as Integer
- Dim iFromUp as Integer
- Dim sURL as String
-
- sGraphicName = "TEST1"
- sWidth = "5"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "4"+ gSeperator + "00" + gMeasurementUnit
- sLeft = "2"+ gSeperator + "00" + gMeasurementUnit
- sUp = "3"+ gSeperator + "00" + gMeasurementUnit
-
- iFromLeft = 4
- iFromUp = 4
-
- sURL = "http://www.sun.com/"
-
- PrintLog "- Insert graphics from clipboard -- Edit/Paste"
- '/// Insert graphics from clipboard -- Edit/Paste
-
- Call hNewDocument
-
- '/// Insert a jpg Graphic and do some configuration
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- Kontext "TabZusaetze"
- ObjektName.SetText sGraphicName
- TabZusaetze.OK
- sleep(2)
- fFormatGraphic("TabType")
- Kontext "TabType"
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- Horizontal.Select iFromLeft
- wait 500
- Vertical.Select iFromUp
- wait 500
- HorizontalBy.SetText sLeft
- wait 500
- VerticalBy.SetText sUp
- wait 500
- TabType.OK
- sleep(1)
- Call fFormatGraphic("TabHyperlinkRahmen")
- Kontext "TabHyperlinkRahmen"
- Sleep 1
- URL.SetText sURL
- wait 500
- TabHyperlinkRahmen.OK
-
- '/// copy graphic to clipboard
- EditCopy
- Sleep 1
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// paste the graphic from clipboard
- EditPaste
- Sleep 1
-
- '/// Check if the pasted graphic is correct
- Call fFormatGraphic("TabZusaetze")
- Sleep 1
- Kontext "TabZusaetze"
- if ObjektName.GetText <> sGraphicName then Warnlog "The graphic's name is not correct ! "
- TabZusaetze.Cancel
- sleep(1)
- Call fFormatGraphic("TabType")
- Sleep 1
- Kontext "TabType"
- if Width.GetText <> sWidth then Warnlog "The graphic's width is not correct ! "
- wait 500
- if Height.GetText <> sHeight then Warnlog "The graphic's height is not correct ! "
- wait 500
- if Horizontal.GetSelIndex <> iFromLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- wait 500
- if Vertical.GetSelIndex <> iFromUp then Warnlog "The graphic's vertical option is not correct ! "
- wait 500
- if HorizontalBy.GetText <> sLeft then Warnlog "The graphic's Horizontal is not correct ! "
- wait 500
- if VerticalBy.GetText <> sUp then Warnlog "The graphic's vertical is not correct ! "
- wait 500
- TabType.Cancel
-
- Call fFormatGraphic("TabHyperlinkRahmen")
- Sleep 1
- Kontext "TabHyperlinkRahmen"
- if URL.GetText <> sURL then Warnlog "The graphic's URL is not correct ! "
- wait 500
- TabHyperlinkRahmen.Cancel
- sleep(1)
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_12
-
- Dim sGraphicName as String
- Dim sOriginalGraphicName as String
- Dim sWidth as String
- Dim sHeight as String
- Dim sLeft as String
- Dim sUp as String
- Dim sOriginalWidth as String
- Dim sOriginalHeight as String
- Dim sOriginalLeft as String
- Dim sOriginalUp as String
- Dim iFromLeft as Integer
- Dim iFromUp as Integer
- Dim iOriginalFromLeft as Integer
- Dim iOriginalFromUp as Integer
- Dim sURL as String
- Dim i as integer
-
- sGraphicName = "TEST1"
- sWidth = "5"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "4"+ gSeperator + "00" + gMeasurementUnit
- sLeft = "2"+ gSeperator + "00" + gMeasurementUnit
- sUp = "3"+ gSeperator + "00" + gMeasurementUnit
-
- iFromLeft = 4
- iFromUp = 4
-
- sURL = "http://www.sun.com/"
-
- PrintLog "- Insert graphics from clipboard -- Edit/Paste special"
- '/// Insert graphics from clipboard -- Edit/Paste special
-
- Call hNewDocument
-
- '/// Insert a jpg Graphic and do some configuration
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- sOriginalGraphicName = ObjektName.GetText
- wait 500
- ObjektName.SetText sGraphicName
- wait 500
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
-
- sOriginalWidth = Width.GetText
- sOriginalHeight = Height.GetText
- iOriginalFromLeft = Horizontal.GetSelIndex
- iOriginalFromUp = Vertical.GetSelIndex
- sOriginalLeft = HorizontalBy.GetText
- sOriginalUp = VerticalBy.GetText
-
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- Horizontal.Select iFromLeft
- wait 500
- Vertical.Select iFromUp
- wait 500
- HorizontalBy.SetText sLeft
- wait 500
- VerticalBy.SetText sUp
- wait 500
- TabType.OK
-
- fFormatGraphic("TabHyperlinkRahmen")
- Sleep 1
- URL.SetText sURL
- wait 500
- TabHyperlinkRahmen.OK
-
- '/// copy graphic to clipboard
- EditCopy
- Sleep 1
-
- '/// delete the graphic
- Call wTypeKeys "<Delete>"
- Sleep 1
-
- '/// 1. Edit/Paste special the graphic from
- '/// + Graphic [StarOffice Writer]
- EditPasteSpecialWriter
- Sleep 1
- Kontext "InhaltEinfuegen"
- if Auswahl.GetItemCount < 4 then
- QAErrorlog "#i47320#Only " & Auswahl.GetItemCount & " graphic formats available"
- InhaltEinfuegen.Cancel
- else
- Auswahl.Select 1
- PrintLog "- " & Auswahl.GetSelText
- InhaltEinfuegen.OK
- Sleep 1
-
- '/// Check if the pasted graphic properties are correct
- FormatGraphics
- Kontext
- Active.Setpage TabZusaetze
- Kontext "TabZusaetze"
- Sleep 1
- if ObjektName.GetText <> sGraphicName then Warnlog "The graphic's name is not correct ! "
-
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- Sleep 1
- if Width.GetText <> sWidth then Warnlog "The graphic's width is not correct ! "
- wait 500
- if Height.GetText <> sHeight then Warnlog "The graphic's height is not correct ! "
- wait 500
- if Horizontal.GetSelIndex <> iFromLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- wait 500
- if Vertical.GetSelIndex <> iFromUp then Warnlog "The graphic's vertical option is not correct ! "
- wait 500
- if HorizontalBy.GetText <> sLeft then Warnlog "The graphic's Horizontal is not correct ! "
- wait 500
- if VerticalBy.GetText <> sUp then Warnlog "The graphic's vertical is not correct ! "
- wait 500
-
- Kontext
- Active.Setpage TabHyperlinkRahmen
- Kontext "TabHyperlinkRahmen"
- Sleep 1
- if URL.GetText <> sURL then Warnlog "The graphic's URL is not correct ! "
- wait 500
- TabHyperlinkRahmen.Ok
-
- 'delete the graphic
- Call wTypeKeys "<Delete>"
- Sleep 1
- end if
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-function fInsertGraphics (sFileName as String)
- 'This function will insert a graphic with Link checked
-
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic\" + sFileName) )
- Sleep 1
- Link.Check
- Sleep 1
- Oeffnen.Click
- Sleep 2
-
-end function
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc
deleted file mode 100644
index c6c38ddfe934..000000000000
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic2.inc
+++ /dev/null
@@ -1,985 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the insert graphic function - 2
-'*
-'************************************************************************
-'*
-' #1 tInsertGraphic_13 'Test Set different attributes via dialog Arrange (send to back)
-' #1 tInsertGraphic_14 'Test Set different attributes via dialog Arrange (send backward)
-' #1 tInsertGraphic_15 'Test Set different attributes via dialog Arrange (bring to front)
-' #1 tInsertGraphic_16 'Test Set different attributes via dialog Arrange (bring forward)
-' #1 tInsertGraphic_17 'Test Set different attributes via Contextmenu Arrange (send to back)
-' #1 tInsertGraphic_18 'Test Set different attributes via Contextmenu Arrange (send backward)
-' #1 tInsertGraphic_19 'Test Set different attributes via Contextmenu Arrange (bring to front)
-' #1 tInsertGraphic_20 'Test Set different attributes via Contextmenu Arrange (bring forward)
-'*
-'\***********************************************************************
-
-testcase tInsertGraphic_13
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via dialog Arrange (send to back)"
- '/// Test Set different attributes via dialog Arrange (send to back)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// Format / Arrange / Send to back
- FormatArrangeSendToBack
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_14
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via dialog Arrange (send backward)"
- '/// Test Set different attributes via dialog Arrange (send backward)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// Format / Arrange / Send backward
- FormatArrangeSetBackward
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_15
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via dialog Arrange (bring to front)"
- '/// Test Set different attributes via dialog Arrange (bring to front)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// Format / Arrange / Send to back
- FormatArrangeSendToBack
- Sleep 2
-
- '/// Format / Arrange / bring to front
- FormatArrangeBringToFront
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_16
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via dialog Arrange (bring forward)"
- '/// Test Set different attributes via dialog Arrange (bring forward)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// Format / Arrange / Send to back
- FormatArrangeSendToBack
- Sleep 1
-
- '/// Format / Arrange / bring forward
- FormatArrangeBringForward
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_17
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via Contextmenu Arrange (send to back)"
- '/// Test Set different attributes via Contextmenu Arrange (send to back)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// ContextMenu Arrange / Send to back
- Call wOpenContextMenu
- hMenuSelectNr(1)
- Sleep 2
- hMenuSelectNr(4)
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_18
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via Contextmenu Arrange (send backward)"
- '/// Test Set different attributes via Contextmenu Arrange (send backward)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// ContextMenu Arrange / Send backward
- Call wOpenContextMenu
- hMenuSelectNr(1)
- Sleep 2
- hMenuSelectNr(3)
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_19
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via Contextmenu Arrange (bring to front)"
- '/// Test Set different attributes via Contextmenu Arrange (bring to front)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
-
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
-
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// Format / Arrange / Send to back
- FormatArrangeSendToBack
- Sleep 2
-
- '/// ContextMenu Arrange / bring to front
- Call wOpenContextMenu
- hMenuSelectNr(1)
- Sleep 2
- hMenuSelectNr(1)
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_20
-
- Dim sGraphicName1 as String
- Dim sGraphicName2 as String
- Dim sGraphicName3 as String
- Dim sWidth as String
- Dim sHeight as String
-
- sGraphicName1 = "TEST1"
- sGraphicName2 = "TEST2"
- sGraphicName3 = "TEST3"
-
- sWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test Set different attributes via Contextmenu Arrange (bring forward)"
- '/// Test Set different attributes via Contextmenu Arrange (bring forward)
-
- Call hNewDocument
-
- Call wTypeKeys "<Return>"
-
- '/// Insert three Graphics at the same place , and named in series
-
- 'the 1st graphic
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName1
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 2nd graphic
- fInsertGraphics("flowers.gif")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName2
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCape>"
-
- 'the 3rd graphic
- fInsertGraphics("game.bmp")
-
- fFormatGraphic("TabZusaetze")
- Sleep 1
- ObjektName.SetText sGraphicName3
- TabZusaetze.OK
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- Sleep 1
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- TabType.OK
-
- '/// Format / Arrange / Send to back
- FormatArrangeSendToBack
- Sleep 1
-
- '/// ContextMenu Arrange / bring forward
- Call wOpenContextMenu
- hMenuSelectNr(1)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- '/// Check if the attributes Arrange (send to back) works well
- Call wNavigatorAuswahl(4,1)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName1 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName1 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,2)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName2 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName2 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call wNavigatorAuswahl(4,3)
- Sleep 1
- fFormatGraphic("TabZusaetze")
- Sleep 1
- if ObjektName.GetText <> sGraphicName3 then Warnlog "The graphic's name is not correct ,should be "+sGraphicName3 + " but get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc
deleted file mode 100644
index 2a161b2200d1..000000000000
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc
+++ /dev/null
@@ -1,1041 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the insert graphic function - 3
-'*
-'************************************************************************
-'*
-' #1 tInsertGraphic_21 'Test Alignment via dialog: anchor to paragraph -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_22 'Test Alignment via dialog: anchor to page -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_23 'Test Alignment via dialog: anchor to character -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_24 'Test Alignment via dialog: anchor as character -> top, center, bottom of baseline
-' #1 tInsertGraphic_25 'Test Alignment via Contextmenu: anchor to paragraph -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_26 'Test Alignment via Contextmenu: anchor to page -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_27 'Test Alignment via Contextmenu: anchor to character -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_28 'Test Alignment via Contextmenu: anchor as character -> top, center, bottom of baseline
-' #1 tInsertGraphic_29 'Test Wrap via dialog : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph
-' #1 tInsertGraphic_30 'Test Wrap via ContextMenuTest : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph
-'*
-'\***********************************************************************
-
-testcase tInsertGraphic_21
-
- Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via dialog: anchor to paragraph -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via dialog: anchor to paragraph -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// Format / anchor / to paragraph
- FormatAnchorToParagraph
- Sleep 1
-
- PrintLog " Left:"
- '/// Format / Alignment / Left
- FormatAlignmentLeft
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// Format / Alignment / Centered
- FormatAlignmentCentered
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// Format / Alignment / Right
- FormatAlignmentRight
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// Format / Alignment / Top
- FormatAlignmentTop
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// Format / Alignment / Center
- FormatAlignmentCenter
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "#110281# The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// Format / Alignment / Bottom
- FormatAlignmentBottom
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_22
-
- Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via dialog: anchor to page -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via dialog: anchor to page -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// Format / anchor / To Page
- FormatAnchorToPage
- Sleep 1
-
- PrintLog " Left:"
- '/// Format / Alignment / Left
- FormatAlignmentLeft
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'To Page' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// Format / Alignment / Centered
- FormatAlignmentCentered
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// Format / Alignment / Right
- FormatAlignmentRight
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// Format / Alignment / Top
- FormatAlignmentTop
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// Format / Alignment / Center
- FormatAlignmentCenter
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// Format / Alignment / Bottom
- FormatAlignmentBottom
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_23
-
- Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via dialog: anchor to character -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via dialog: anchor to character -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// Format / anchor / To character
- FormatAnchorTocharacter
- Sleep 1
-
- PrintLog " Left:"
- '/// Format / Alignment / Left
- FormatAlignmentLeft
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// Format / Alignment / Centered
- FormatAlignmentCentered
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// Format / Alignment / Right
- FormatAlignmentRight
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// Format / Alignment / Top
- FormatAlignmentTop
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// Format / Alignment / Center
- FormatAlignmentCenter
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iCenterVertical then qaErrorLog "#111962# The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// Format / Alignment / Bottom
- FormatAlignmentBottom
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_24
-
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via dialog: anchor as character -> top, center, bottom of baseline"
- '/// Test Alignment via dialog: anchor as character -> top, center, bottom of baseline
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// Format / anchor / As character
- FormatAnchorAsCharacter
- Sleep 1
-
- PrintLog " Base line at top:"
- '/// Format / Alignment / Base line at top
- FormatAlignmentTop
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Base line at center:"
- '/// Format / Alignment / Base line at center
- FormatAlignmentCenter
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Base line at bottom:"
- '/// Format / Alignment / Base line at bottom
- FormatAlignmentBottom
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_25
-
- Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via Contextmenu: anchor to paragraph -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via Contextmenu: anchor to paragraph -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// ContextMenu anchor / to paragraph
- Call wOpenContextMenu
- hMenuSelectNr(3)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- PrintLog " Left:"
- '/// ContextMenu Alignment / Left
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(1)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// ContextMenu Alignment / Centered
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// ContextMenu Alignment / Right
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(3)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// ContextMenu Alignment / Top
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(4)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// ContextMenu Alignment / Center
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(5)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "#110281# The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// ContextMenu Alignment / Bottom
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(6)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_26
-
- Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via Contextmenu: anchor to page -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via dialog: Contextmenu to page -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// ContextMenu anchor / To Page
- Call wOpenContextMenu
- hMenuSelectNr(3)
- Sleep 2
- hMenuSelectNr(1)
- Sleep 1
-
- PrintLog " Left:"
- '/// ContextMenu Alignment / Left
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(1)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'To Page' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// ContextMenu Alignment / Centered
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// ContextMenu Alignment / Right
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(3)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// ContextMenu Alignment / Top
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(4)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// ContextMenu Alignment / Center
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(5)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// ContextMenu Alignment / Bottom
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(6)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_27
-
- Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via Contextmenu: anchor to character -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via Contextmenu: anchor to character -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// ContextMenu anchor / To character
- Call wOpenContextMenu
- hMenuSelectNr(3)
- Sleep 2
- hMenuSelectNr(3)
- Sleep 1
-
- PrintLog " Left:"
- '/// ContextMenu Alignment / Left
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(1)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// ContextMenu Alignment / Centered
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// ContextMenu Alignment / Right
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(3)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// ContextMenu Alignment / Top
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(4)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// ContextMenu Alignment / Center
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(5)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iCenterVertical then QAErrorlog "#111962#The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// ContextMenu Alignment / Bottom
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(6)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_28
-
- Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer
-
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via Contextmenu: anchor as character -> top, center, bottom of baseline"
- '/// Test Alignment via Contextmenu: anchor as character -> top, center, bottom of baseline
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// ContextMenu anchor / As character
- Call wOpenContextMenu
- hMenuSelectNr(3)
- Sleep 2
- hMenuSelectNr(4)
- Sleep 1
-
- PrintLog " Base line at top:"
- '/// ContextMenu Alignment / Base line at top
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(1)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Base line at center:"
- '/// ContextMenu Alignment / Base line at center
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Base line at bottom:"
- '/// ContextMenu Alignment / Base line at bottom
- Call wOpenContextMenu
- hMenuSelectNr(2)
- Sleep 2
- hMenuSelectNr(3)
- Sleep 1
-
- '/// - Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_29
-
- PrintLog "- Test Wrap via dialog : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph"
- '/// <b> Test Wrap via dialog , including </b>
- '/// + </b> none, Page Wrap, Optimal Page Wrap, Contour Wrap, </b>
- '/// + </b> Wrap through, in Background, first paragraph </b>
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " 1. No Wrap:"
- '/// Format / Wrap / No Wrap
- FormatWrapNoWrap
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Kein.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 2. Page Wrap:"
- '/// Format / Wrap / Page Wrap
- FormatWrapPageWrap
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 3. Optimal Page Wrap:"
- '/// Format / Wrap / Optimal Page Wrap
- FormatWrapOptimalPageWrap
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Dynamisch.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 4. Wrap through:"
- '/// Format / Wrap / Wrap through
- FormatWrapThrough
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 5. In Background:"
- '/// Format / Wrap / in Background
- FormatWrapInBackground
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- if ImHintergrund.IsChecked <> TRUE then Warnlog "Background configuration is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 6. first paragraph:"
- '/// Format / Wrap / first paragraph
- FormatWrapFirstparagraph
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- if ErsterAbsatz.IsChecked <> TRUE then Warnlog "first paragraph configuration is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 7. Contour:"
- '/// Format / Wrap / Contour
- FormatWrapPageWrap
- Sleep 1
- FormatWrapContour
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Kontur.IsChecked <> TRUE then Warnlog "Contour configuration is wrong !"
- TabUmlauf.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_30
-
- PrintLog "- Test Wrap via Contextmenu : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph"
- '/// <b> Test Wrap via Contextmenu , including </b>
- '/// + <b> none, Page Wrap, Optimal Page Wrap, Contour Wrap, </b>
- '/// + <b> Wrap through, in Background, first paragraph </b>
-
- Call hNewDocument
-
- '/// + Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " 1. No Wrap:"
- '/// Contextmenu Wrap / No Wrap
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(1)
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Kein.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 2. Page Wrap:"
- '/// Contextmenu Wrap / Page Wrap
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 3. Optimal Page Wrap:"
- '/// Contextmenu Wrap / Optimal Page Wrap
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(3)
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Dynamisch.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 4. Wrap through:"
- '/// Contextmenu Wrap / Wrap through
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(4)
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 5. In Background:"
- '/// Contextmenu Wrap / in Background
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(5)
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- if ImHintergrund.IsChecked <> TRUE then Warnlog "Background configuration is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 6. first paragraph:"
- '/// Contextmenu Wrap / first paragraph
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(7)
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- if ErsterAbsatz.IsChecked <> TRUE then Warnlog "first paragraph configuration is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 7. Contour:"
- '/// Contextmenu Wrap / Contour
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(2)
- Sleep 1
-
- Call wOpenContextMenu
- hMenuSelectNr(4)
- Sleep 2
- hMenuSelectNr(6)
- Sleep 1
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Kontur.IsChecked <> TRUE then Warnlog "Contour configuration is wrong !"
- TabUmlauf.Cancel
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
deleted file mode 100644
index 561768ee8320..000000000000
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
+++ /dev/null
@@ -1,831 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the insert graphic function - 4
-'*
-'************************************************************************
-'*
-' #1 tInsertGraphic_31 'Test Alignment via format/graphic: Anchor to paragraph -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_32 'Test Alignment via format/graphic: Anchor to page -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_33 'Test Alignment via format/graphic: Anchor to character -> Left, centered, right, top, center, bottom
-' #1 tInsertGraphic_34 'Test Alignment via format/graphic: Anchor as character -> top, center, bottom of baseline
-' #1 tInsertGraphic_35 'Test Wrap via format/graphic : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph
-' #1 tInsertGraphic_36 'Test original size
-' #1 tInsertGraphic_37 'Test keep ratio
-' #1 tInsertGraphic_38 'Check the graphic name in Navigator
-' #1 tInsertGraphic_39 'Test checkbox 'Position' in protect area
-' #1 tInsertGraphic_40 'Test checkbox 'Print' in Property area"
-' #1 tInsertGraphic_41 'Test checkbox 'Keep image size'
-' #1 tInsertGraphic_42 'Test checkbox 'Keep scale'
-'*
-'\***********************************************************************
-
-testcase tInsertGraphic_31
-
- Dim iLeft as Integer
- Dim iRight as Integer
- Dim iCenterHorizontal as Integer
- Dim iTop as Integer
- Dim iBottom as Integer
- Dim iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via format/graphic: Anchor to paragraph -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via format/graphic: Anchor to paragraph -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " Left:"
- '/// Format / Graphic tabpage Type ,
- '/// + Anchor to paragraph , and set Horizontal to left
- fFormatGraphic("TabType")
- Kontext "TabType"
- AnchorAtparagraph.Check
- Horizontal.Select iLeft
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Kontext "TabType"
- Sleep 1
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to paragraph , and set Horizontal to Centered
- fFormatGraphic("TabType")
- Kontext "TabType"
- AnchorAtparagraph.Check
- Horizontal.Select iCenterHorizontal
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- Kontext "TabType"
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to paragraph , and set Horizontal to Right
- fFormatGraphic("TabType")
- Kontext "TabType"
- AnchorAtparagraph.Check
- Horizontal.Select iRight
- TabType.OK
- sleep(1)
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- Kontext "TabType"
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to paragraph , and set Vertical to top
- fFormatGraphic("TabType")
- Kontext "TabType"
- AnchorAtparagraph.Check
- Vertical.Select iTop
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- Kontext "TabType"
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to paragraph , and set Vertical to Center
- fFormatGraphic("TabType")
- Kontext "TabType"
- AnchorAtparagraph.Check
- Vertical.Select iCenterVertical
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! #bug110281"
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to paragraph , and set Vertical to Bottom
- fFormatGraphic("TabType")
- AnchorAtparagraph.Check
- Vertical.Select iBottom
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtparagraph.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'to paragraph' !"
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_32
-
- Dim iLeft as Integer
- Dim iRight as Integer
- Dim iCenterHorizontal as Integer
- Dim iTop as Integer
- Dim iBottom as Integer
- Dim iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via format/graphic: Anchor to page -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via format/graphic: Anchor to page -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " Left:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to page , and set Horizontal to left
- fFormatGraphic("TabType")
- AnchorAtPage.Check
- Horizontal.Select iLeft
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to page , and set Horizontal to Centered
- fFormatGraphic("TabType")
- AnchorAtPage.Check
- Horizontal.Select iCenterHorizontal
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to page , and set Horizontal to Right
- fFormatGraphic("TabType")
- AnchorAtPage.Check
- Horizontal.Select iRight
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to page , and set Vertical to top
- fFormatGraphic("TabType")
- AnchorAtPage.Check
- Vertical.Select iTop
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to page , and set Vertical to Center
- fFormatGraphic("TabType")
- AnchorAtPage.Check
- Vertical.Select iCenterVertical
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor to page , and set Vertical to Bottom
- fFormatGraphic("TabType")
- AnchorAtPage.Check
- Vertical.Select iBottom
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtPage.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Page' !"
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_33
-
- Dim iLeft as Integer
- Dim iRight as Integer
- Dim iCenterHorizontal as Integer
- Dim iTop as Integer
- Dim iBottom as Integer
- Dim iCenterVertical as Integer
-
- iLeft = 1 : iRight = 2 : iCenterHorizontal = 3
- iTop = 1 : iBottom = 2 : iCenterVertical = 4
-
- PrintLog "- Test Alignment via format/graphic: Anchor to character -> Left, centered, right, top, center, bottom"
- '/// Test Alignment via format/graphic: Anchor to character -> Left, centered, right, top, center, bottom
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " Left:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor At Character , and set Horizontal to left
- fFormatGraphic("TabType")
- AnchorAtCharacter.Check
- Horizontal.Select iLeft
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
- if Horizontal.GetSelIndex <> iLeft then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Centered:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor At Character , and set Horizontal to Centered
- fFormatGraphic("TabType")
- AnchorAtCharacter.Check
- Horizontal.Select iCenterHorizontal
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
- if Horizontal.GetSelIndex <> iCenterHorizontal then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Right:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor At Character , and set Horizontal to Right
- fFormatGraphic("TabType")
- AnchorAtCharacter.Check
- Horizontal.Select iRight
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
- if Horizontal.GetSelIndex <> iRight then Warnlog "The graphic's Horizontal option is not correct ! "
- TabType.Cancel
-
- PrintLog " Top:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor At Character , and set Vertical to top
- fFormatGraphic("TabType")
- AnchorAtCharacter.Check
- Vertical.Select iTop
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Center:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor At Character , and set Vertical to Center
- fFormatGraphic("TabType")
- AnchorAtCharacter.Check
- Vertical.Select iCenterVertical
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
- if Vertical.GetSelIndex <> iCenterVertical then
- if iSprache = 82 then
- QAErrorlog "#i59378#Missing vertical position in in Format-Picture-dialog"
- else
- if Vertical.GetItemCount <> 6 then
- QAErrorlog "#i59378#Missing vertical position in in Format-Picture-dialog"
- else
- Warnlog "The graphic's Vertical option is not correct ! "
- end if
- end if
- end if
- TabType.Cancel
-
- PrintLog " Bottom:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor At Character , and set Vertical to Bottom
- fFormatGraphic("TabType")
- AnchorAtCharacter.Check
- Vertical.Select iBottom
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAtCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'At Character' !"
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_34
-
- Dim iTop as Integer
- Dim iBottom as Integer
- Dim iCenterVertical as Integer
-
- iTop = 1 : iBottom = 2 : iCenterVertical = 3
-
- PrintLog "- Test Alignment via format/graphic: Anchor as character -> top, center, bottom of baseline"
- '/// Test Alignment via format/graphic: Anchor as character -> top, center, bottom of baseline
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " Base line at top:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor as character , and set Base line at top
- fFormatGraphic("TabType")
- Sleep 1
- AnchorAsCharacter.Check
- Vertical.Select iTop
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAsCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'As character' !"
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iTop then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Base line at center:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor as character , and set Base line at center
- fFormatGraphic("TabType")
- Sleep 1
- AnchorAsCharacter.Check
- Vertical.Select iCenterVertical
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAsCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'As character' !"
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iCenterVertical then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- PrintLog " Base line at bottom:"
- '/// Format / Graphic tabpage Type
- '/// + Anchor as character , and set Base line at bottom
- fFormatGraphic("TabType")
- Sleep 1
- AnchorAsCharacter.Check
- Vertical.Select iBottom
- TabType.OK
-
- '/// Check the graphic position
- fFormatGraphic("TabType")
- Sleep 1
- if AnchorAsCharacter.IsChecked <> TRUE then Warnlog "Anchor should be checked to 'As character' !"
- if Horizontal.IsEnabled = TRUE then Warnlog "The Horizontal listbox should not be enabled ! "
- if Vertical.GetSelIndex <> iBottom then Warnlog "The graphic's Vertical option is not correct ! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_35
-
- PrintLog "- Test Wrap via dialog : none, Page Wrap, Optimal Page Wrap, Contour Wrap ,Wrap through, in Background , first paragraph"
- '/// <b> Test Wrap via dialog , including </b>
- '/// +<b> none, Page Wrap, Optimal Page Wrap, Contour Wrap, </b>
- '/// +<b> Wrap through, in Background, first paragraph </b>
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " 1. No Wrap:"
- '/// Format / Graphic / tabpage Wrap - No page
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Kein.Check
- TabUmlauf.OK
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Kein.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 2. Page Wrap:"
- '/// Format / Graphic / tabpage Wrap - Page Wrap
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Parallel.Check
- TabUmlauf.OK
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 3. Optimal Page Wrap:"
- '/// Format / Graphic / tabpage Wrap - Optimal Page Wrap
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Dynamisch.Check
- TabUmlauf.OK
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Dynamisch.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 4. Wrap through:"
- '/// Format / Graphic / tabpage Wrap - Wrap through
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Durchlauf.Check
- TabUmlauf.OK
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 5. In Background:"
- '/// Format / Graphic / tabpage Wrap - In Background
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Durchlauf.Check
- ImHintergrund.Check
- TabUmlauf.OK
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Durchlauf.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- if ImHintergrund.IsChecked <> TRUE then Warnlog "Background configuration is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 6. first paragraph:"
- '/// Format / Graphic / tabpage Wrap - first paragraph
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Parallel.Check
- ErsterAbsatz.Check
- TabUmlauf.OK
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Parallel.IsChecked <> TRUE then Warnlog "Graphic wrapping situation is wrong !"
- if ErsterAbsatz.IsChecked <> TRUE then Warnlog "first paragraph configuration is wrong !"
- TabUmlauf.Cancel
-
- PrintLog " 7. Contour:"
- '/// Format / Graphic / tabpage Wrap - first paragraph
- FormatWrapPageWrap
- Sleep 1
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Kontur.Check
- TabUmlauf.OK
-
- fFormatGraphic("TabUmlauf")
- Sleep 1
- if Kontur.IsChecked <> TRUE then Warnlog "Contour configuration is wrong !"
- TabUmlauf.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_36
-
- Dim sOriginalWidth as String
- Dim sOriginalHeight as String
- Dim sNewWidth as String
- Dim sNewHeight as String
-
- sNewWidth = "7"+ gSeperator + "00" + gMeasurementUnit
- sNewHeight = "5"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test original size "
- '/// Test original size
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// Format / Graphic tabpage Type , change the graphic's size
- fFormatGraphic("TabType")
- sOriginalWidth = Width.GetText
- sOriginalHeight = Height.GetText
- KeepRatio.UnCheck
- wait 500
- Width.SetText sNewWidth
- wait 500
- Height.SetText sNewHeight
- wait 500
- TabType.OK
-
- '/// Check if original size works well
- fFormatGraphic("TabType")
- if Width.GetText <> sNewWidth then Warnlog "The graphic's width is wrong !"
- wait 500
- if Height.GetText <> sNewHeight then Warnlog "The graphic's height is wrong !"
- wait 500
- OriginalSize.Click
- Sleep 1
- if Width.GetText <> sOriginalWidth then Warnlog "The graphic's width isn't recovered to before!"
- wait 500
- if Height.GetText <> sOriginalHeight then Warnlog "The graphic's height isn't recovered to before !"
- wait 500
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_37
-
- Dim sWidth as String
- Dim sHeight as String
- Dim sNewWidth as String
- Dim sNewHeight as String
-
- sWidth = "4"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "3"+ gSeperator + "00" + gMeasurementUnit
-
- sNewWidth = "8"+ gSeperator + "00" + gMeasurementUnit
- sNewHeight = "6"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test keep ratio"
- '/// Test keep ratio
-
- Call hNewDocument
-
- '/// Insert a graphics and check 'keep ratio'
- fInsertGraphics("Bughunter.jpg")
-
- fFormatGraphic("TabType")
- KeepRatio.UnCheck
- wait 500
- Width.SetText sWidth
- wait 500
- Height.SetText sHeight
- wait 500
- KeepRatio.Check
- wait 500
- TabType.OK
- Sleep 1
-
- '/// Format / Graphic tabpage Type , change the graphic's width
- '/// + Check if keep ratio works well
- fFormatGraphic("TabType")
- Kontext "TabType"
- Width.SetText sNewWidth
- Sleep 1
- if Height.GetText <> sNewHeight then Warnlog "The graphic's height is wrong !"
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_38
-
- Dim sGraphicName as String
- Dim sNavActualItemName as string
-
- sGraphicName = "TEST1"
-
- PrintLog "- Check the graphic name in Navigator"
- '/// Check the graphic name in Navigator
-
- Call hNewDocument
-
- '/// Insert a graphics
- Call fInsertGraphics("Bughunter.jpg")
-
- '/// Format / Graphic / Options , set a new name
- Call fFormatGraphic("TabZusaetze")
- sleep(3)
- Kontext "TabZusaetze"
- ObjektName.SetText sGraphicName
- sleep(3)
- TabZusaetze.OK
- sleep(1)
-
- '/// Active navigator to check the graphic name
- Call fStartupNavigator( "Graphics" , 2 )
- sleep(2)
- Kontext "NavigatorWriter"
- sNavActualItemName = Auswahlliste.GetitemText(2)
- if sNavActualItemName <> sGraphicName then
- warnlog "The graphic name should be " + sGraphicName & " but get " & sNavActualItemName & "!"
- end if
- Call fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_39
-
- Dim sHorizontalBy as String
- Dim sVerticalBy as String
-
- PrintLog "- Test checkbox 'Position' in protect area"
- '/// Test checkbox 'Position' in protect area
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// Format / Graphic / Options , check 'Position'
- fFormatGraphic("TabZusaetze")
- wait 500
- if PositionSchuetzen.IsChecked = TRUE then warnlog "The default situation of checkbox - position should be unchecked"
- wait 500
- PositionSchuetzen.Check
- wait 500
- TabZusaetze.OK
-
- 'Check the original position
- fFormatGraphic("TabType")
- wait 500
- sHorizontalBy = HorizontalBy.GetText
- sVerticalBy = VerticalBy.GetText
- TabType.Cancel
-
- '/// move the picture with keyboard
- Call wTypeKeys "<Down><Down><Right><Right>"
-
- '/// + Check if the position is changed
- fFormatGraphic("TabType")
- if HorizontalBy.GetText <> sHorizontalBy then warnlog "The position Horizontal should be " +sHorizontalBy + " but get " + HorizontalBy.GetText
- if VerticalBy.GetText <> sVerticalBy then warnlog "The position Vertical should be " +sVerticalBy + " but get " + VerticalBy.GetText
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_40
-
- Dim sHorizontalBy as String
- Dim sVerticalBy as String
-
- PrintLog "- Test checkbox 'Print' in Property area"
- '/// Test checkbox 'Print' in Property area
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- '/// Format / Graphic / Options , check Position
- fFormatGraphic("TabZusaetze")
- wait 500
- if Drucken.IsChecked <> TRUE then warnlog "The default situation of checkbox - print should be checked"
- wait 500
- PositionSchuetzen.UnCheck
- wait 500
- TabZusaetze.OK
-
- '/// Print to Printer
- PrintLog "- Please go to printer to check if you get a blank paper!"
- FilePrint
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer!"
- Kontext "Printing"
- Sleep 1
- Printing.Cancel
- end if
- else
- Kontext "Printing"
- Sleep 1
- Printing.OK
- Sleep 5
- end if
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- end if
- end if
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc
deleted file mode 100644
index 23ec4e96ff06..000000000000
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic5.inc
+++ /dev/null
@@ -1,755 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the insert graphic function - 4
-'*
-'************************************************************************
-'*
-' #1 tInsertGraphic_41 'Test checkbox 'Keep image size'
-' #1 tInsertGraphic_42 'Test checkbox 'Keep scale'
-' #1 tInsertGraphic_43 'Test spacing in tabpage 'wrap'
-' #1 tInsertGraphic_44 'Set the possible Options for the different Wrap types
-' #1 tInsertGraphic_45 'Test Scale in Corp tabpage
-' #1 tInsertGraphic_46 'Test Image size in Corp tabpage
-' #1 tInsertGraphic_47 'Test Restore via "Original Size" button
-' #1 tInsertGraphic_48 'Test link area via a embeded file
-' #1 tInsertGraphic_49 'Test link area via a linked file
-'*
-'\***********************************************************************
-
-testcase tInsertGraphic_41
-
- Dim sLeft as String
- Dim sRight as String
- Dim sUp as String
- Dim sBottom as String
- Dim sScaleWidth as String
- Dim sScaleHeight as String
- Dim sImageWidth as String
- Dim sImageHeight as String
- Dim dDummy1 as double
- Dim dDummy2 as double
-
- sLeft = "1"+ gSeperator + "00" + gMeasurementUnit
- sRight = "1"+ gSeperator + "00" + gMeasurementUnit
- sUp = "1"+ gSeperator + "00" + gMeasurementUnit
- sBottom = "1"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test checkbox 'Keep image size'"
- '/// Test checkbox 'Keep image size'
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("game.bmp")
-
- '/// Format / Graphic / Crop , check 'Keep image size' ,
- '/// - increase the value , check if "keep image size" is efficient
- fFormatGraphic("TabZuschneiden")
- wait 500
- GroesseBeibehalten.Check
- wait 500
-
- sScaleWidth = MassstabBreite.GetText
- sScaleHeight = MassstabHoehe.GetText
- sImageWidth = GroesseBreite.GetText
- sImageHeight = GroesseHoehe.GetText
-
- PrintLog "- increase Left "
- Links.SetText sLeft
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <= StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sScaleWidth = MassstabBreite.GetText
-
- PrintLog "- increase Right"
- Rechts.SetText sRight
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <= StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sScaleWidth = MassstabBreite.GetText
-
- PrintLog "- increase Top "
- Oben.SetText sUp
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <= StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sScaleHeight = MassstabHoehe.GetText
-
- PrintLog "- increase Bottom "
- Unten.SetText sBottom
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <= StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- TabZuschneiden.Cancel
-
- '/// - decrease value , check if "keep image size" is efficient
- fFormatGraphic("TabZuschneiden")
- wait 500
- GroesseBeibehalten.Check
- wait 500
-
- sScaleWidth = MassstabBreite.GetText
- sScaleHeight = MassstabHoehe.GetText
- sImageWidth = GroesseBreite.GetText
- sImageHeight = GroesseHoehe.GetText
-
- PrintLog "- decrease Left "
- Links.SetText "-" + sLeft
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) >= StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sScaleWidth = MassstabBreite.GetText
-
- PrintLog "- decrease Right"
- Rechts.SetText "-" + sRight
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) >= StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sScaleWidth = MassstabBreite.GetText
-
- PrintLog "- decrease Top "
- Oben.SetText "-" + sUp
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) >= StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sScaleHeight = MassstabHoehe.GetText
-
- PrintLog "- decrease Bottom "
- Unten.SetText "-" + sBottom
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) >= StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- TabZuschneiden.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_42
-
- Dim sLeft as String
- Dim sRight as String
- Dim sUp as String
- Dim sBottom as String
- Dim sScaleWidth as String
- Dim sScaleHeight as String
- Dim sImageWidth as String
- Dim sImageHeight as String
- Dim dDummy1 as double
- Dim dDummy2 as double
-
- sLeft = "1"+ gSeperator + "00" + gMeasurementUnit
- sRight = "1"+ gSeperator + "00" + gMeasurementUnit
- sUp = "1"+ gSeperator + "00" + gMeasurementUnit
- sBottom = "1"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test checkbox 'Keep scale'"
- '/// Test checkbox 'Keep scale'
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("game.bmp")
-
- '/// Format / Graphic / Crop , check Keep scale
- '/// - increase the value
- fFormatGraphic("TabZuschneiden")
- wait 500
- MassstabBeibehalten.Check
- wait 500
-
- sScaleWidth = MassstabBreite.GetText
- sScaleHeight = MassstabHoehe.GetText
- sImageWidth = GroesseBreite.GetText
- sImageHeight = GroesseHoehe.GetText
-
- PrintLog "- increase Left "
- Links.SetText sLeft
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) >= StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sImageWidth = GroesseBreite.GetText
-
- PrintLog "- increase Right"
- Rechts.SetText sRight
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) >= StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sImageWidth = GroesseBreite.GetText
-
- PrintLog "- increase Top "
- Oben.SetText sUp
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) >= StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sImageHeight = GroesseHoehe.GetText
-
- PrintLog "- increase Bottom "
- Unten.SetText sBottom
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) >= StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- TabZuschneiden.Cancel
-
- '/// - decrease value
- fFormatGraphic("TabZuschneiden")
- wait 500
- MassstabBeibehalten.Check
- wait 500
-
- sScaleWidth = MassstabBreite.GetText
- sScaleHeight = MassstabHoehe.GetText
- sImageWidth = GroesseBreite.GetText
- sImageHeight = GroesseHoehe.GetText
-
- PrintLog "- decrease Left "
- Links.SetText "-" + sLeft
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <= StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sImageWidth = GroesseBreite.GetText
-
- PrintLog "- decrease Right"
- Rechts.SetText "-" + sRight
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <= StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <> StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sImageWidth = GroesseBreite.GetText
-
- PrintLog "- decrease Top "
- Oben.SetText "-" + sUp
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <= StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- sImageHeight = GroesseHoehe.GetText
-
- PrintLog "- decrease Bottom "
- Unten.SetText "-" + sBottom
- Sleep 2
-
- if StrToDouble(MassstabBreite.GetText) <> StrToDouble(sScaleWidth) then warnlog "Scale Width isn't right !"
- if StrToDouble(MassstabHoehe.GetText) <> StrToDouble(sScaleHeight) then warnlog "Scale Height isn't right !"
- if StrToDouble(GroesseBreite.GetText) <> StrToDouble(sImageWidth) then warnlog "Image Width isn't right !"
- if StrToDouble(GroesseHoehe.GetText) <= StrToDouble(sImageHeight) then warnlog "Image Height isn't right !"
-
- TabZuschneiden.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_43
-
- Dim sLeft as String
- Dim sRight as String
- Dim sUp as String
- Dim sBottom as String
-
- sLeft = "1"+ gSeperator + "00" + gMeasurementUnit
- sRight = "2"+ gSeperator + "00" + gMeasurementUnit
- sUp = "3"+ gSeperator + "00" + gMeasurementUnit
- sBottom = "4"+ gSeperator + "00" + gMeasurementUnit
-
- PrintLog "- Test spacing in tabpage 'wrap'"
- '/// Test spacing in tabpage 'wrap'
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("game.bmp")
-
- '/// Format / Graphic / Wrap , set value in spacing area
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Kein.Check
- wait 500
- AbstaendeLinks.SetText sLeft
- wait 500
- AbstaendeRechts.SetText sRight
- wait 500
- AbstaendeOben.SetText sUp
- wait 500
- AbstaendeUnten.SetText sBottom
- wait 500
- TabUmlauf.OK
-
- '/// Check if the set value is correct
- fFormatGraphic("TabUmlauf")
- if AbstaendeLinks.GetText <> sLeft then warnlog "Spacing - Lefe isn't correct!"
- if AbstaendeRechts.GetText <> sRight then warnlog "Spacing - Right isn't correct!"
- if AbstaendeOben.GetText <> sUp then warnlog "Spacing - Top isn't correct!"
- if AbstaendeUnten.GetText <> sBottom then warnlog "Spacing - Bottom isn't correct!"
- TabUmlauf.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_44
-
- PrintLog "- Set the possible Options for the different Wrap types"
- '/// Set the possible Options for the different Wrap types
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("Bughunter.jpg")
-
- PrintLog " 1. No Wrap:"
- '/// Format / Graphic / tabpage Wrap - No page , check possible options
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Kein.Check
- Sleep 1
- if ErsterAbsatz.IsEnabled = TRUE then Warnlog "Checkbox - First paragraph should be unenabled!"
- if ImHintergrund.IsEnabled = TRUE then Warnlog "Checkbox - In background should be unenabled!"
- if Kontur.IsEnabled = TRUE then Warnlog "Checkbox - Contour should be unenabled!"
- if NurAussen.IsEnabled = TRUE then Warnlog "Checkbox - Outside only should be unenabled!"
- TabUmlauf.Cancel
-
- PrintLog " 2. Before:"
- '/// Format / Graphic / tabpage Wrap - Before , check possible options
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Links.Check
- Sleep 1
- if ErsterAbsatz.IsEnabled <> TRUE then Warnlog "Checkbox - First paragraph should be enabled!"
- if ImHintergrund.IsEnabled = TRUE then Warnlog "Checkbox - In background should be unenabled!"
- if Kontur.IsEnabled <> TRUE then Warnlog "Checkbox - Contour should be enabled!"
- if NurAussen.IsEnabled = TRUE then Warnlog "Checkbox - Outside only should be unenabled!"
-
- Kontur.Check
- wait 500
- if NurAussen.IsEnabled <> TRUE then Warnlog "Checkbox - Outside only should be enabled after checking contour!"
- TabUmlauf.Cancel
-
- PrintLog " 3. After:"
- '/// Format / Graphic / tabpage Wrap - After , check possible options
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Rechts.Check
- Sleep 1
- if ErsterAbsatz.IsEnabled <> TRUE then Warnlog "Checkbox - First paragraph should be enabled!"
- if ImHintergrund.IsEnabled = TRUE then Warnlog "Checkbox - In background should be unenabled!"
- if Kontur.IsEnabled <> TRUE then Warnlog "Checkbox - Contour should be enabled!"
- if NurAussen.IsEnabled = TRUE then Warnlog "Checkbox - Outside only should be unenabled!"
-
- Kontur.Check
- wait 500
- if NurAussen.IsEnabled <> TRUE then Warnlog "Checkbox - Outside only should be enabled after checking contour!"
- TabUmlauf.Cancel
-
- PrintLog " 4. Parallel:"
- '/// Format / Graphic / tabpage Wrap - Parallel , check possible options
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Parallel.Check
- Sleep 1
- if ErsterAbsatz.IsEnabled <> TRUE then Warnlog "Checkbox - First paragraph should be enabled!"
- if ImHintergrund.IsEnabled = TRUE then Warnlog "Checkbox - In background should be unenabled!"
- if Kontur.IsEnabled <> TRUE then Warnlog "Checkbox - Contour should be enabled!"
- if NurAussen.IsEnabled = TRUE then Warnlog "Checkbox - Outside only should be unenabled!"
-
- Kontur.Check
- wait 500
- if NurAussen.IsEnabled <> TRUE then Warnlog "Checkbox - Outside only should be enabled after checking contour!"
- TabUmlauf.Cancel
-
- PrintLog " 5. Through:"
- '/// Format / Graphic / tabpage Wrap - Through , check possible options
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Durchlauf.Check
- Sleep 1
- if ErsterAbsatz.IsEnabled <> TRUE then Warnlog "Checkbox - First paragraph should be enabled!"
- if ImHintergrund.IsEnabled <> TRUE then Warnlog "Checkbox - In background should be enabled!"
- if Kontur.IsEnabled = TRUE then Warnlog "Checkbox - Contour should be unenabled!"
- if NurAussen.IsEnabled = TRUE then Warnlog "Checkbox - Outside only should be unenabled!"
- TabUmlauf.Cancel
-
- PrintLog " 6. Optimal:"
- '/// Format / Graphic / tabpage Wrap - Optimal , check possible options
- fFormatGraphic("TabUmlauf")
- Sleep 1
- Dynamisch.Check
- Sleep 1
- if ErsterAbsatz.IsEnabled <> TRUE then Warnlog "Checkbox - First paragraph should be enabled!"
- if ImHintergrund.IsEnabled = TRUE then Warnlog "Checkbox - In background should be unenabled!"
- if Kontur.IsEnabled <> TRUE then Warnlog "Checkbox - Contour should be enabled!"
- if NurAussen.IsEnabled = TRUE then Warnlog "Checkbox - Outside only should be unenabled!"
-
- Kontur.Check
- wait 500
- if NurAussen.IsEnabled <> TRUE then Warnlog "Checkbox - Outside only should be enabled after checking contour!"
- TabUmlauf.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_45
-
- Dim sScaleWidth as String
- Dim sScaleHeight as String
- Dim sImageWidth as String
- Dim sImageHeight as String
-
- sScaleWidth = "100%"
- sScaleHeight = "100%"
-
- PrintLog "- Test Scale in Corp tabpage"
- '/// Test Scale in Corp tabpage
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("game.bmp")
- Sleep 1
-
- '/// Format/Graphic tabpage corp , double Scale (width and height)
- fFormatGraphic("TabZuschneiden")
- wait 500
- MassstabBreite.SetText sScaleWidth
- MassstabHoehe.SetText sScaleHeight
- TabZuschneiden.OK
-
- fFormatGraphic("TabZuschneiden")
- wait 500
- sImageWidth = GroesseBreite.GetText
- sImageHeight = GroesseHoehe.GetText
-
- sScaleWidth = "200%"
- sScaleHeight = "200%"
-
- MassstabBreite.SetText sScaleWidth
- wait 500
- MassstabHoehe.SetText sScaleHeight
- wait 500
-
- sImageWidth = Str(StrToDouble(sImageWidth) *2) + gMeasurementUnit
- sImageHeight = Str(StrToDouble(sImageHeight)*2) + gMeasurementUnit
-
- '/// Check if the image size (width and height) are changed corresponding
- if fCalculateTolerance(GroesseBreite.GetText , sImageWidth) > 0.03 then
- Warnlog "Image Width is wrong, should be " + sImageWidth + " but get " + GroesseBreite.GetText
- end if
-
- if fCalculateTolerance(GroesseHoehe.GetText , sImageHeight) > 0.03 then
- Warnlog "Image Height is wrong, should be " + sImageHeight + " but get " + GroesseHoehe.GetText
- end if
- TabZuschneiden.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_46
-
- Dim sScaleWidth as String
- Dim sScaleHeight as String
- Dim sImageWidth as String
- Dim sImageHeight as String
-
- sImageWidth = "4"+ gSeperator + "00" + gMeasurementUnit
- sImageHeight = "2"+ gSeperator + "80" + gMeasurementUnit
-
- PrintLog "- Test Image size in Corp tabpage"
- '/// Test Image size in Corp tabpage
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("game.bmp")
- Sleep 1
-
- '/// Format/Graphic tabpage corp , double Imagin size (width and height)
- fFormatGraphic("TabZuschneiden")
- wait 500
- GroesseBreite.SetText sImageWidth
- GroesseHoehe.SetText sImageHeight
- TabZuschneiden.OK
-
- fFormatGraphic("TabZuschneiden")
- wait 500
- sScaleWidth = MassstabBreite.GetText
- sScaleHeight = MassstabHoehe.GetText
-
- sImageWidth = "8"+ gSeperator + "00" + gMeasurementUnit
- sImageHeight = "5"+ gSeperator + "60" + gMeasurementUnit
-
- GroesseBreite.SetText sImageWidth
- wait 500
- GroesseHoehe.SetText sImageHeight
- wait 500
-
- '/// Check if the Scale(width and height) are changed corresponding
- if Abs(StrToDouble(sScaleWidth) *2 - StrToDouble(MassstabBreite.GetText) ) > 2 then
- Warnlog "Scale Width is wrong, should be " + Str(StrToDouble(sScaleWidth) *2) + "%" + " but get " + MassstabBreite.GetText
- end if
-
- if Abs(StrToDouble(sScaleHeight) *2 - StrToDouble(MassstabHoehe.GetText) ) > 2 then
- Warnlog "Scale Height is wrong, should be " + Str(StrToDouble(sScaleHeight)*2) + "%" + " but get " + MassstabHoehe.GetText
- end if
- TabZuschneiden.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_47
-
- Dim sScaleWidth as String
- Dim sScaleHeight as String
- Dim sImageWidth as String
- Dim sImageHeight as String
- Dim sNewImageWidth as String
- Dim sNewImageHeight as String
-
- sNewImageWidth = "8"+ gSeperator + "00" + gMeasurementUnit
- sNewImageHeight = "5"+ gSeperator + "60" + gMeasurementUnit
-
- PrintLog "- Test Restore via 'Original Size' button"
- '/// Test Restore via "Original Size" button
-
- Call hNewDocument
-
- '/// Insert a graphics
- fInsertGraphics("game.bmp")
- Sleep 1
-
- '/// Format/Graphic tabpage corp , double Image size (width and height)
- fFormatGraphic("TabZuschneiden")
- wait 500
- sScaleWidth = MassstabBreite.GetText
- sScaleHeight = MassstabHoehe.GetText
- sImageWidth = GroesseBreite.GetText
- sImageHeight = GroesseHoehe.GetText
-
- GroesseBreite.SetText sNewImageWidth
- wait 500
- GroesseHoehe.SetText sNewImageHeight
- wait 500
-
- '/// + Click 'Original size' button
- Originalgroesse.Click
- Sleep 1
-
- '/// Check if the Scale and Image size are recovered to the original size
- if MassstabBreite.GetText <> sScaleWidth then warnlog "Scale Width isn't right !"
- if MassstabHoehe.GetText <> sScaleHeight then warnlog "Scale Height isn't right !"
- if GroesseBreite.GetText <> sImageWidth then warnlog "Image Width isn't right !"
- if GroesseHoehe.GetText <> sImageHeight then warnlog "Image Height isn't right !"
- TabZuschneiden.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_48
-
- Dim sFileName as String
-
- sFileName = "game.bmp"
-
- PrintLog "- Test link area via a embedded file"
- '/// Test link area via a embedded file
-
- Call hNewDocument
-
- '/// Insert a graphics (embeded)
- InsertGraphicsFromFile
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic\" + sFileName) )
- Sleep 1
- Link.UnCheck
- Sleep 1
- Oeffnen.Click
- Sleep 2
-
- '/// Format/Graphic tabpage Graphics , check if we can get [None] in file name in Link area
- fFormatGraphic("TabGrafik")
- wait 500
- if left(Dateiname.GetText , 1) <> "[" then warnlog "Should be none in file name, but get " + Dateiname.GetText
- if Durchsuchen.IsEnabled = TRUE then Warnlog "Button should be unEnabled!"
- TabGrafik.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tInsertGraphic_49
-
- Dim sFileName as String
- Dim sHopeResult as String
-
- sFileName = "game.bmp"
- sHopeResult = fConvertBacklashToSlash(gTesttoolpath + "writer\optional\input\insertgraphic\" + sFileName)
-
- if gPlatGroup <> "unx" then
- sHopeResult = "file:///" + sHopeResult
- else
- sHopeResult = "file://" + sHopeResult
- end if
-
- PrintLog "- Test link area via a linked file"
- '/// Test link area via a linked file
-
- Call hNewDocument
-
- '/// Insert a graphics (linked)
- fInsertGraphics(sFileName)
-
- '/// Format/Graphic tabpage Graphics , check if we can get
- '/// + the correct name in 'file name' in Link area
- fFormatGraphic("TabGrafik")
- wait 500
- if Dateiname.GetText <> sHopeResult then warnlog "linked file name is wrong, should be " + sHopeResult + " but get " + Dateiname.GetText
- try
- Durchsuchen.Click
- Kontext
- Kontext "GrafikEinfuegenDlg"
- if Dateiname.GetSelText <> sFileName then warnlog "file name is wrong, should be " + sFileName + " but get " + Dateiname.GetText
- if Link.IsChecked <> TRUE then warnlog "The linked checkbox should be checked!"
- GrafikEinfuegenDlg.Cancel
- catch
- warnlog "Button should be enabled!"
- endcatch
-
- Kontext "TabGrafik"
- TabGrafik.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-function fCalculateTolerance( sNumber1 , sNumber2 )
-
-'/// change 2 parameters to number , then Compare them and return the result.
-
- Dim dNumber1 as Single
- dim dNumber2 as Single
- Dim iCommaLocation1 as integer
- Dim iCommaLocation2 as Integer
-
- 'the code below 4 lines is set "2,00cm" to "2.00"cm if needed
- iCommaLocation1 = InStr(sNumber1 , ",")
- if iCommaLocation1 > 0 then
- sNumber1 = Left(sNumber1 , iCommaLocation1-1) + "." + Right(sNumber1,Len(sNumber1) - iCommaLocation1)
- end if
-
- iCommaLocation2 = InStr(sNumber2 , ",")
- if iCommaLocation2 > 0 then
- sNumber2 = Left(sNumber2 , iCommaLocation2-1) + "." + Right(sNumber2,Len(sNumber2) - iCommaLocation2)
- end if
-
- dNumber1 = Val( Left(sNumber1, Len(sNumber1)-Len(gMeasurementUnit) ))
- dNumber2 = Val( Left(sNumber2, Len(sNumber2)-Len(gMeasurementUnit) ))
- fCalculateTolerance = Abs( dNumber1 - dNumber2 )
-
-end function
-
diff --git a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
deleted file mode 100644
index 2598c2b5f912..000000000000
--- a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
+++ /dev/null
@@ -1,447 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Checks the export to all available Filters from
-'*
-'\***********************************************************************
-
-testcase tExportAllReadableFormatsIntoODF
-
- if iSprache <> 1 then
- QAErrorlog "#100970#test only support english language"
- goto endsub
- end if
-
- Dim AvailableFilters( 35 ) as String
- Dim ImportFileList ( 300 ) as String
- Dim ExportFileList ( 300 ) as String
- Dim WorkDirectory as String
- Dim ImportDir as String
- Dim SavedCorrectly as Boolean
- Dim sExportFilter as string
- Dim sExportFile as string
- Dim sExceptionFile as string
- Dim i as Integer
-
- WorkDirectory = ( ConvertPath ( gOfficePath + "user\work\" + gPlatgroup + "\export\"))
- ImportDir = ConvertPath ( gTesttoolPath + "writer\optional\input\import\")
-
- if gSamePC = TRUE then ' delete export directory
- GetFileList ( WorkDirectory, "*.*", ExportFileList() )
- if KillFileList ( ExportFileList() ) <> TRUE then
- Warnlog "Couldn't delete all Files in Output-Directory, the followings are still there:"
- for i=1 to FehlerListe(0)
- printlog " <> " & FehlerListe(i)
- next i
- goto endsub
- end if
- end if
- app.Mkdir WorkDirectory
-
- Printlog "- Read the directory with files we wish to import."
- GetFileList ( ImportDir, "*.*", ImportFileList() )
- printlog "- Done."
-
- ' Create local copies of all files to be imported
- hFileListCopyLocal( ImportFileList() )
-
- printlog "- Start loading files in list"
- For i = 1 to listCount(ImportFileList())
- printlog "- " & i & ". load: " & ImportFileList(i)
- sExportFile = ImportFileList(i)
- sExceptionFile = DateiExtract ( sExportFile )
- printlog sExceptionFile
- if GetExtention ( sExportFile ) = "psw" then
- QAErrorlog "#i102221#Pocket Word filter puts General I/O Error"
- elseif LCase( sExceptionFile ) = "swdos.txt" then
- Warnlog "General I/O error loading StarWriter DOS file"
- else
- Call hFileOpenLocally( ImportFileList(i) )
- printlog "- done"
-
- Kontext "TextImport"
- if TextImport.Exists then
- TextImport.Ok
- printlog "- Text import dialog passed"
- end if
-
- Kontext "Filterauswahl"
- if Filterauswahl.Exists then
- Filterauswahl.Cancel
- printlog "- Filterdialog passed"
- end if
-
- Kontext "AsciiFilterOptionen"
- if AsciiFilterOptionen.Exists then
- AsciiFilterOptionen.Ok
- printlog "- ASCII-Filter dialog passed"
- end if
-
- Kontext "SecurityWarning"
- if SecurityWarning.Exists(3) then
- SecurityWarning.Ok
- printlog "- Security warning passed"
- end if
-
- Kontext "DocumentWriter"
- if DocumentWriter.Exists(3) then
- Do until DocumentWriter.StatusIsProgress = false
- wait 500
- Loop
- else
- Kontext "DocumentCalc"
- if DocumentCalc.Exists(3) then
- Do until DocumentCalc.StatusIsProgress = false
- wait 500
- Loop
- else
- Warnlog "Neither DocumentWriter or DocumentCalc existed? Some other dialogue in focus?"
- end if
- end if
-
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(ImportFileList(i),"sw40") = false then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
- end if
- SecurityWarning.Cancel
- end if
- Sleep 1
-
- Kontext "AlienWarning"
- if AlienWarning.Exists then
- AlienWarning.Ok
- printlog "- Alien warning passed"
- end if
-
- ' HTML-File can't be exported as odf this way
- if GetExtention(ImportFileList(i)) <> "html" then
-
- sExportFile = WorkDirectory & "ExportedFile" & i & ".odf"
- Printlog "- Save as : " & ConvertPath ( sExportFile )
- if hFileSaveAsWithFilterKill (sExportFile, "writer8") = true then
- printlog "- done"
- printlog "- close file"
- Call hCloseDocument
-
- Printlog "- Open previous saved file"
- Call hFileOpenWithFilter (sExportFile, "writer8")
- printlog "- done"
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(ImportFileList(i),"sw40") = false then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
- end if
- SecurityWarning.Cancel
- end if
- Sleep 1
- else
- Warnlog "Unable to save file: " & sExportFile
- end if
- else
- printlog "- HTML-file is not exported this way"
- end if
-
- printlog "- Close all open files."
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- endif
- next i 'File
-
-endcase
-
-'---------------------------------------------------------------------------------------------------------------------
-
-testcase tExportAllReadableFormatsIntoThemselves
-
- if iSprache <> 1 then
- QAErrorlog "#100970#test only support english language"
- goto endsub
- end if
-
- Dim AvailableFilters( 35 ) as String
- Dim SavedCorrectly as Boolean
- Dim ImportFileList ( 300 ) as String
- Dim ExportFileList ( 300 ) as String
- 'Used - below
- Dim sLoadFile as String
- Dim sSaveFile as String
- Dim sCurrentFile as String
- Dim sCurrentFilter as String
- Dim sWorkDirectory as String
- Dim sImportDir as String
- Dim iCurrentFileIndex as Integer
- Dim iCounter as integer
- Dim DocumentCount as integer
-
- sWorkDirectory = ( ConvertPath ( gOfficePath + "user\work\" + gPlatgroup + "\export\"))
- sImportDir = ConvertPath ( gTesttoolPath + "writer\optional\input\import\")
-
- if gSamePC = TRUE then ' delete export directory
- GetFileList ( sWorkDirectory, "*.*", ExportFileList() )
- if KillFileList ( ExportFileList() ) <> TRUE then
- Warnlog "Couldn't delete all Files in Output-Directory, the followings are still there:"
- for iCounter=1 to FileList(0)
- printlog " <> " & FileList(i)
- next iCounter
- end if
- end if
- app.Mkdir sWorkDirectory
-
- For iCurrentFileIndex = 1 to 7
- select case iCurrentFileIndex
- case 1 : sCurrentFile = "xml2.odt"
- sCurrentFilter = "writer8"
- case 2 : sCurrentFile = "wpsfile.wps"
- sCurrentFilter = "Text (encoded)"
- case 3 : sCurrentFile = "dostext.txt"
- sCurrentFilter = "Text (encoded)"
- case 4 : sCurrentFile = "html.html"
- sCurrentFilter = "HTML (StarWriter)"
- case 5 : sCurrentFile = "rtf.rtf"
- sCurrentFilter = "Rich Text Format"
- case 6 : sCurrentFile = "sw60.sxw"
- sCurrentFilter = "StarOffice XML (Writer)"
- case 7 : sCurrentFile = "winw97.doc"
- sCurrentFilter = "MS Word 97"
- case 8 : sCurrentFile = "winword6.doc"
- sCurrentFilter = "MS Word 95"
- case 9 : sCurrentFile = "wintext.txt"
- sCurrentFilter = "Text (encoded)"
- end select
-
- sLoadFile = sImportDir & sCurrentFile
- sSaveFile = sWorkDirectory & "filenr_" & iCurrentFileIndex & "." & GetExtention ( sCurrentFile )
- printlog "- Export of File nr " + iCurrentFileIndex + " started"
- printlog " - Save file: " & sLoadFile
- printlog " - to file: " & sSaveFile
-
-
- ' Load In-file
- Call hFileOpenWithFilter(sLoadFile, sCurrentFilter, false)
-
- kontext "active"
- if active.exists(2) then
- active.ok
- warnlog "Error with file " + sLoadFile + " as " + sSaveFile + "."
- end if
-
- Kontext "TextImport"
- if TextImport.Exists then
- TextImport.Ok
- end if
-
- Kontext "Filterauswahl"
- if Filterauswahl.Exists then
- Filterauswahl.Cancel
- end if
-
- Kontext "AsciiFilterOptionen"
- if AsciiFilterOptionen.Exists then AsciiFilterOptionen.Ok
- Kontext "SecurityWarning"
- if SecurityWarning.Exists(3) then SecurityWarning.Ok
- Kontext "DocumentWriter"
- if DocumentWriter.Exists(3) then
- Do until DocumentWriter.StatusIsProgress = false
- wait 500
- Loop
- else
- Kontext "DocumentCalc"
- if DocumentCalc.Exists(3) then
- Do until DocumentCalc.StatusIsProgress = false
- wait 500
- Loop
- else
- Warnlog "Neither DocumentWriter or DocumentCalc existed? Some other dialogue in focus?"
- end if
- end if
-
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(currentfile,"sw40") = false then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
- end if
- SecurityWarning.Cancel
- end if
- Sleep 1
-
- Kontext "AlienWarning"
- if AlienWarning.Exists then AlienWarning.Ok
-
- ' Save Out-file
- Call hFileSaveAsWithFilterKill(sSaveFile, sCurrentFilter)
-
- kontext "active"
- if active.exists(2) then
- active.ok
- warnlog "Error saving file " + sLoadFile + " as " + sSaveFile + "."
- goto Cleanup
- end if
-
- ' Load Out-file again
- Call hFileOpenWithFilter(sSaveFile, sCurrentFilter, false)
-
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(currentfile,"sw40") > 0 then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
- end if
- SecurityWarning.Cancel
- end if
- Sleep 1
-
- Cleanup:
- kontext "active"
- if active.exists(2) then
- active.ok
- Select Case iCurrentFileIndex
- case 7: QAErrorlog "#i106758#Saving StarWriter 3 template corrupts file"
- case else
- warnlog "Error with file " + sLoadFile + " as " + sSaveFile + "."
- end select
- end if
-
- printlog " Close all open files."
- hFileCloseAll()
-
- printlog " - File nr " + iCurrentFileIndex + " completed."
- Next iCurrentFileIndex
-
-endcase
-
-'---------------------------------------------------------------------------------------------------------------------
-
-testcase tExportTop5FormatsIntoTop5
-
- if iSprache <> 1 then
- QAErrorlog "#100970#test only support english language"
- goto endsub
- end if
-
- Dim ExportFileList(300) as String
- Dim sWorkDirectory as String
- Dim sImportDir as String
- Dim iCurrentLoadFileIndex as Integer
- Dim sCurrentLoadFile as String
- Dim sCurrentLoadFilter as String
- Dim iCurrentSaveFileIndex as Integer
- Dim sCurrentSaveFile as String
- Dim sCurrentSaveFilter as String
- Dim iCounter as Integer
- Dim DocumentCount as Integer
- Dim FileList as String
-
- sWorkDirectory = ( ConvertPath ( gOfficePath + "user\work\" + gPlatgroup + "\loadsavetop5\"))
- sImportDir = ConvertPath ( gTesttoolPath + "writer\optional\input\import\")
-
- if gSamePC = TRUE then ' delete export directory
- GetFileList ( sWorkDirectory, "*.*", ExportFileList() )
- if KillFileList ( ExportFileList() ) <> TRUE then
- Warnlog "Couldn't delete all Files in Output-Directory, the followings are still there:"
- for iCounter=1 to FileList(0)
- printlog " <> " & FileList(i)
- next iCounter
- end if
- end if
- app.Mkdir sWorkDirectory
-
- '// Start of the LOAD-Loop
- For iCurrentLoadFileIndex = 1 to 4
- Select case iCurrentLoadFileIndex
- case 1 : sCurrentLoadFile = sImportDir & "xml2.odt"
- sCurrentLoadFilter = "writer8"
- case 2 : sCurrentLoadFile = sImportDir & "sw60.sxw"
- sCurrentLoadFilter = "StarOffice XML (Writer)"
- case 3 : sCurrentLoadFile = sImportDir & "winw97.doc"
- sCurrentLoadFilter = "MS Word 97"
- case 4 : sCurrentLoadFile = sImportDir & "rtf.rtf"
- sCurrentLoadFilter = "Rich Text Format"
- case 5 : sCurrentLoadFile = sImportDir & "html.html"
- sCurrentLoadFilter = "HTML (StarWriter)"
- End select
-
- printlog "- Export of File nr " + iCurrentLoadFileIndex + " started."
- printlog " - Save file: " & sCurrentLoadFile
-
- '/// Here comes the SAVE-Loop
- For iCurrentSaveFileIndex = 1 to 5
- if hFileOpenWithFilter((sCurrentLoadFile), sCurrentLoadFilter) = true then
- Select case iCurrentSaveFileIndex
- case 1 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s1.odt"
- sCurrentSaveFilter = "writer8"
- case 2 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s2.sxw"
- sCurrentSaveFilter = "StarOffice XML (Writer)"
- case 3 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s3.doc"
- sCurrentSaveFilter = "MS Word 97"
- case 4 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s4.rtf"
- sCurrentSaveFilter = "Rich Text Format"
- case 5 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s5.html"
- sCurrentSaveFilter = "HTML (StarWriter)"
- End select
-
- printlog " - " & iCurrentSaveFileIndex & ". to file: " & sCurrentSaveFile
- if hFileSaveAsWithFilterKill(sCurrentSaveFile, sCurrentSaveFilter) = true then
- printlog " - close all open documents"
- hFileCloseAll()
- printlog " - check if file exists"
- if FileExists (sCurrentSaveFile) then
- printlog " - success"
- printlog " - reload previously saved file"
- if hFileOpenWithFilter(sCurrentSaveFile, sCurrentSaveFilter) = true then
- printlog " - success"
- else
- Warnlog "error loading file: " & sCurrentSaveFile
- end if
- hFileCloseAll()
- else
- Warnlog "Saved file doesn't exist"
- 'Close the opened file
- hFileCloseAll()
- end if
- else
- Warnlog "Error saving file: " & sCurrentLoadFile
- 'Close the opened file
- hFileCloseAll()
- end if
- else
- Warnlog "Error loading file: " & sCurrentLoadFile
- 'Close the opened file
- hFileCloseAll()
- end if
-
- Next iCurrentSaveFileIndex
- printlog "- Export of File nr " + iCurrentLoadFileIndex + " completed."
- Next iCurrentLoadFileIndex
- '// End of the LOAD-Loop.
-endcase
diff --git a/testautomation/writer/optional/includes/navigator/w_navigator.inc b/testautomation/writer/optional/includes/navigator/w_navigator.inc
deleted file mode 100644
index 1750b4de3950..000000000000
--- a/testautomation/writer/optional/includes/navigator/w_navigator.inc
+++ /dev/null
@@ -1,807 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Navigator test
-'*
-'\***********************************************************************
-
-sub w_navigator
- printLog Chr(13) + "--------- Navigator Functions - ----------"
-
- Call tViewNavigator1 ' alle Methoden am Dockingwindow - Navigator
- Call tViewNavigator2 ' dokument?bergreifenden Methoden am Dockingwindow
- Call tViewNavigator3 ' Funktionen testen
- Call tViewNavigator4 ' Inhaltsansicht des Navigators ?berpr?fen
- Call tViewNavigator5 ' Anspringen von Punkten im Dokument ?ber die Inhaltsansicht
- Call tViewNavigator6 ' Umbenennen von Objekten aus dem Navigator
-
-end sub
-
-' **********************************************************************
-
-testcase tViewNavigator1
- Dim xPos as long : Dim yPos as long: Dim xSize% : Dim ySize%
-
- '/// Edit / Navigator ( all methods from Navigator as Window ) ///
- printlog "- Edit / Navigator : all methods from Navigator as Window"
- '/// New document ///
- Call hNewDocument
- '/// Call Navigator with 'F5' ///
- printlog " - Call Navigator with F5"
- call wTypeKeys "<F5>"
-
- Kontext "Navigator"
- if Navigator.NotExists then
- Warnlog "No Navigator with F5"
- ViewNavigator
- end if
-
- '/// Move Navigator ///
- printlog " - move Navigator"
- Navigator.Move 300, 400
- Sleep 1
- Navigator.Move 590, 790
- Sleep 1
- Navigator.Move 10, 10
- Sleep 1
-
- xPos = Navigator.GetPosX
- yPos = Navigator.GetPosY
- xSize% = Navigator.GetSizeX
- ySize% = Navigator.GetSizeY
-
- '/// Size Navigator ///
- printlog " - size Navigator"
- try
- Navigator.Size (300, 400)
- catch
- Warnlog "Sizen Navigator doesn't work"
- endcatch
- Sleep 1
- try
- Navigator.Size (xSize%, ySize%)
- catch
- Printlog "Sizen Navigator doesn't work"
- endcatch
-
- Sleep 1
-
- '/// Close and reopen Navigator, size should not change ///
- printlog " - Close Navigator and reopen, the size has to be the same"
- xPos = Navigator.GetPosX
- yPos = Navigator.GetPosY
- xSize% = Navigator.GetSizeX
- ySize% = Navigator.GetSizeY
- ViewNavigator
- Sleep 1
- ViewNavigator
- if xPos <> Navigator.GetPosX then Warnlog "X-Pos. has been changed : Should -> "+ xPos + " Is -> "+ Navigator.GetPosX
- if yPos <> Navigator.GetPosY then Warnlog "Y-Pos. has been changed : Should -> "+ yPos + " Is -> "+ Navigator.GetPosY
- if xSize% <> Navigator.GetSizeX then Warnlog "X-Size has been changed : Should -> "+ xSize% + " Is -> "+ Navigator.GetSizeX
- if ySize% <> Navigator.GetSizeY then Warnlog "Y-Size has been changed : Should -> "+ ySize% + " Is -> "+ Navigator.GetSizeY
-
- '/// Close Navigator ///
- try
- Navigator.Close
- catch
- Warnlog "Unable to close Navigator!"
- endcatch
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tViewNavigator2
- Dim xPos% : Dim yPos% : Dim xSize% : Dim ySize%
- Dim datgeht as boolean
- if gApplication <> "WRITER" then
- goto endsub
- endif
- '/// Edit / Navigator ( document-spreading methods with Navigator as Window ) ///
- printlog "- Edit / Navigator : document-spreading methods with Navigator as Window"
- '/// New document ///
- Call hNewDocument
- printlog " - Call Navigator in Document and check in another"
- '/// Insert some text in first document ///
- call wTypeKeys "Navigator test document 1"
-
- '/// Edit / Navigator ///
- Kontext "Navigator"
- if Navigator.NotExists then ViewNavigator
- '/// New document ///
- Call hNewDocument
- '/// Insert some text in second document ///
- call wTypeKeys "Navigator test document 1"
-
- Kontext "Navigator"
- '/// Check if Navigator has been opened in new document ///
- if Navigator.NotExists then Warnlog "In new Document is no Navigator"
-
- '/// Close both documents and reopen one ///
- printlog " - Close all documents and reopen one"
- Call hCloseDocument
- Sleep 2
- Call hCloseDocument
- Sleep 2
- Call hNewDocument
- '/// Check if Navigator has been opened with document ///
- Kontext "NavigatorWriter"
- if NavigatorWriter.NotExists then Warnlog "In new Document is no Navigator"
- call wTypeKeys "This is a navigator test!"
-
- '/// Dock Navigator ///
- printlog " - dock Navigator in Document and check in another"
- Kontext "Navigator"
- Navigator.Dock
- Sleep 1
- '/// New Document ///
- Call hNewDocument
- '/// Check if Navigator is in new document docked ///
- Kontext "Navigator"
- if NOT Navigator.IsDocked then Warnlog "In new Document Navigator is not docked"
-
- '/// Close all documents reopen a new and check if Navigator is docked ///
- printlog " - Close all documents reopen a new and check if Navigator is docked"
- hFileCloseAll()
-
- '/// New document ///
- Call hNewDocument
- hSetDocumentContext()
- try
- DocumentWriter.FadeOut
- catch
- Warnlog "Unable to Fade out Navigator!"
- endcatch
- try
- DocumentWriter.FadeIn
- catch
- Warnlog "Unable to Fade out Navigator!"
- endcatch
-
- Kontext "Navigator"
- if NOT Navigator.IsDocked then Warnlog "In new Document Navigator is not docked"
-
- printlog " - Close Navigator with <F5>"
- Navigator.Undock
- Sleep 1
- '/// Undock Navigator and close with 'F5' ///
- call wTypeKeys "<F5>"
-
- Kontext "Navigator"
- if NOT Navigator.NotExists then
- Warnlog "Navigator is already open"
- try
- Navigator.Close
- catch
- Warnlog "Could not close Navigator!"
- endcatch
- end if
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tViewNavigator3
- QAErrorlog "#i94614# - tViewNavigator3 outcommented"
- goto endsub
-
- Dim NavigationTearOff as boolean
- '/// Edit / Navigator : check some Navigator-Functions ///
- printlog "- Edit / Navigator : check some Navigator-Functions"
- '/// Open document ( navigator.odt ) ///
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\navigator\navigator.odt" )
-
- '/// Open Navigator ///
- Kontext "Navigator"
- if Navigator.NotExists then ViewNavigator
- Kontext "NavigatorWriter"
- '/// Enter Pagenumber '5' in Navigator
- Seitennummer.Settext "5"
- printlog " - Navigation"
- '/// Tear Off Navigation Window ///
- NavigationTearOff = False
- try
- Navigation.TearOff
- NavigationTearOff = true
- catch
- Warnlog "Unable to tear off Navigation Toolbar!"
- endcatch
- if NavigationTearOff = true then
- Sleep 1
- Kontext "NavigationsFenster"
- '/// Move Navigation Window ///
- NavigationsFenster.Move 300, 400
- sleep 1
- '/// Minimize Navigation Window ///
- NavigationsFenster.Minimize
- sleep 1
- '/// Maximize Navigation Window ///
- NavigationsFenster.Maximize
- sleep 1
- Auswahl.MouseDoubleClick ( 45, 20 )
- sleep 1
- '/// Close Navigation Window ///
- NavigationsFenster.Close
- end if
-
- '/// Functions in Navigator ///
- printlog " - next Page"
- Kontext "NavigatorWriter"
-
- '/// previous page ///
- printlog " - previous page"
- VorherigeSeite.Click
- wait 200
- Call gMouseClick ( 20, 30 )
- call wTypeKeys " <Left>"
-
- InsertFieldsPageNumbers
- call wTypeKeys "+0<Shift Left><Shift Left><Shift Left>"
-
- wait 200
- ToolsCalculate
- Sleep 1
- if GetClipboardText <> "4" then QAErrorlog "#i94614#Previous Page isn't 4 but " & GetClipboardText
- Kontext "NavigatorWriter"
-
- '/// Click Next page 2 times ///
- NaechsteSeite.Click
- wait 200
- NaechsteSeite.Click
- wait 200
- Call gMouseClick 20, 60
- call wTypeKeys " <Left>"
-
- InsertFieldsPageNumbers
- call wTypeKeys "+0<Shift Left><Shift Left><Shift Left>"
-
- wait 200
- ToolsCalculate
- if GetClipboardText <> "6" then QAErrorlog "#i94614#Next Page isn't 6 but " & GetClipboardText
- Kontext "NavigatorWriter"
-
- printlog " - switch Selectbox off and on"
- '/// Switsch Select box off and on ///
- if Auswahlliste.Exists then Auswahlbox.Click
- wait 500
- Auswahlbox.Click
- wait 500
- if Auswahlliste.NotExists then
- Warnlog "Navigator hasn't been sized to default size"
- Auswahlbox.Click
- end if
- Kontext "NavigatorWriter"
-
- printlog " - Set Reminder"
- '/// Set Reminder ///
- Merker.Click
- wait 500
-
- printlog " - jump to header"
- '/// Select Jump to header ///
- Kopfzeile.Click
- wait 500
- call wTypeKeys "<Home><Shift End>"
-
- EditCopy
- if GetClipboardText <> "Kopfzeile" then Warnlog "Cursorposition wrong: Not in Header"
- Kontext "NavigatorWriter"
-
- '/// Select Jump to Footer ///
- printlog " - jump to footer"
- Fusszeile.Click
- wait 500
- call wTypeKeys "<Home><Shift End>"
-
- EditCopy
- if GetClipboardText <> "Fusszeile" then Warnlog "Cursorposition wrong: Not in Footer"
- Kontext "NavigatorWriter"
-
- printlog " - to Anchor <-> Text"
- '/// Select Anchor to Text ///
- AnkerText.Click
- wait 500
- call wTypeKeys "<Right><Shift Mod1 Right><Shift Left>"
-
- EditCopy
- if GetClipboardText <> "sed" then Warnlog "Cursorposition wrong: Not in Footer"
- wait 500
- Kontext "NavigatorWriter"
- AnkerText.Click
- wait 200
- call wTypeKeys "<Home><Shift End>"
-
- EditCopy
- if GetClipboardText <> "Fussnote" then Warnlog "Cursorposition wrong: Not in Footer"
-
- '/// Close Navigator ///
- Kontext "Navigator"
- try
- Navigator.Close
- catch
- Warnlog "Could not close Navigator!"
- endcatch
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tViewNavigator4
- Dim i : Dim j : Dim Ende : Dim k
- Dim AlteGruppe$ : Dim AlterUnterwert$
- Ende=1000
- if gApplication <> "WRITER" then
- goto endsub
- endif
- printlog "- Edit / Navigator : check entry's in Navigator Index"
- '/// File / Open / 'gTesttoolpath + "writer\optional\input\navigator\navigator.odt"' ///
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\navigator\navigator.odt" )
-
- '/// Open Navigator through Edit / Navigator ///
- ViewNavigator
- Kontext "NavigatorWriter"
- '/// Check all entrys in Navigator and notice the name ///
- for i= 1 to 12
- Call wNavigatorAuswahl(i,0) ' Gruppe im Navigator
- Kontext "NavigatorWriter"
- printlog "- " + Auswahlliste.Gettext
- AlteGruppe$ = Auswahlliste.Gettext ' Gruppe merken
- select case i
- case 1 : Ende = 7 ' Headings does not work ( Testtoolproblem )
- case 2 : Ende = 4 ' Tables
- case 3 : Ende = 1 ' text frame
- case 4 : Ende = 3 ' Graphics
- case 5 : Ende = 0 ' OLE-Objects
- case 6 : Ende = 3 ' Bookmarks
- case 7 : Ende = 0 ' Sections
- case 8 : Ende = 2 ' Hyperlinks
- case 9 : Ende = 0 ' References
- case 10 : Ende = 0 ' Indexes
- case 11 : Ende = 0 ' Notes
- case 12 : Ende = 0 ' Drawing objects
- end select
-
- Call wNavigatorAuswahl(i,Ende) ' Eintrag im Navigator
- Kontext "NavigatorWriter"
- '/// Switch in Navigator to Index View ///
- AlterUnterwert$ = Auswahlliste.Gettext ' Eintrag merken
- Inhaltsansicht.Click
- Auswahlliste.TypeKeys "<Up>", 12
- if Auswahlliste.Gettext <>AlteGruppe$ then
- if i <> 1 then Warnlog "- Wrong group with switching to Index View"
- else
- Auswahlliste.TypeKeys "<Down>",Ende + 1
- if Auswahlliste.Gettext <> AlterUnterwert$ then Warnlog "Not all Subpoints in Index View are visible"
- end if
- next i
- '/// Compare entrys in index view with entrys in Navigator///
-
- Kontext "Navigator"
- try
- Navigator.Close
- catch
- Warnlog "Could not close Navigator!"
- endcatch
- '/// Close Navigator ///
- Call hCloseDocument
- '/// Close document ///
-endcase
-
-' **********************************************************************
-
-testcase tViewNavigator5
- QaErrorLog "#i94614# - tViewNavigator5 outcommented"
- goto endsub
-
- if gApplication <> "WRITER" then
- goto endsub
- endif
-
- Dim j as integer
- Dim Dummy as String
- Dim Bildname as string
- Dim Abbild as String
-
- printlog "- Edit / Navigator : Check Jumpmark from Index in Navigator"
- '/// File / Open / 'gTesttoolpath + "writer\optional\input\navigator\navigator.odt"' ///
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\navigator\navigator.odt" )
-
- '/// Open Navigator ///
- Kontext "NavigatorWriter"
- if Not NavigatorWriter.Exists then
- ViewNavigator
- Kontext "NavigatorWriter"
- end if
-
- printlog " - Header"
- '/// In Navigator switch to Index view ///
- Call wNavigatorAuswahl(1,0)
- Kontext "NavigatorWriter"
- wait 500
- Inhaltsansicht.Click
- '/// In Navigator select 'Headings' and jump to headers in document ///
- wait 500
- Auswahlliste.TypeKeys "<Home>"
- Auswahlliste.TypeKeys "<+>"
- if Auswahlliste.GetItemCount = 8 then
- for j=2 to 6
- Auswahlliste.Select j
- Auswahlliste.TypeKeys "<return>"
- Sleep 1
- call wTypeKeys "<Home><Shift End>"
-
- EditCopy
- Sleep 1
- '/// Check if the correct header has been selected ///
- if GetClipboardText <> "Heading " & j - 1 then Warnlog "Wrong Jumppoint: Should -> Heading " & j - 1 & " Is -> " & GetClipboardText
- Kontext "NavigatorWriter"
- next j
- for j=2 to 3
- Auswahlliste.TypeKeys "<down>"
- Dummy = Auswahlliste.GetText
- Auswahlliste.TypeKeys "<return>"
- wait 200
- call wTypeKeys "<Home><Shift End>"
-
- EditCopy
- wait 100
- Kontext "NavigatorWriter"
- next j
- else
- Warnlog "There are not 7 but " & Auswahlliste.GetItemCount & " headings in navigator list"
- end if
- '/// Select in Navigator entry 'Tables' and jump via Navigator to tables in document ///
- printlog " - Tables"
- Call wNavigatorAuswahl(2,0)
- Kontext "NavigatorWriter"
- wait 500
- Inhaltsansicht.Click
- wait 500
- Auswahlliste.TypeKeys "<Home>"
- wait 500
- for j=1 to 4
- Auswahlliste.TypeKeys "<down><return>"
- Sleep 2
- call wTypeKeys "<Home>"
- call wTypeKeys "<Mod1 A>"
-
- EditCopy
- '/// Check if correct tables has been selected ///
- if GetClipboardText <> "Tabelle" + j then Warnlog "Wrong Cursorposition: Should -> Tabelle" + j + " Is -> " + GetClipboardText
- Kontext "NavigatorWriter"
- next j
-
- '/// Select in Navigator entry 'Text frames' and jump via Navigator to text frames in document ///
- printlog " - Text frames"
- Call wNavigatorAuswahl(3,0)
- Kontext "NavigatorWriter"
- wait 500
- Inhaltsansicht.Click
- wait 500
- Auswahlliste.TypeKeys "<Home>"
- Auswahlliste.TypeKeys "<Down><Return>"
- Sleep 2
- call wTypeKeys "<Home><Shift End>"
-
- '/// Check if correct text frames have been selected ///
- try
- EditCopy
- if Left$(GetClipboardText,6) <> "Figura" then Warnlog "Wrong Cursorposition: Should -> Figura" + " Is -> "+ Left(GetClipboardText,6)
- catch
- Printlog "Unable to go into the Text frame with testtool"
- endcatch
- Kontext "NavigatorWriter"
-
- '/// Select in Navigator entry 'Graphics' and jump via Navigator to graphics in document ///
- printlog " - Graphics"
- Call wNavigatorAuswahl(4,0)
- Kontext "NavigatorWriter"
- wait 500
- Inhaltsansicht.Click
- wait 500
- Auswahlliste.TypeKeys "<Home>"
- '/// Check if correct graphic have been selected ///
- for j=1 to 3
- Auswahlliste.TypeKeys "<down><return>"
- Sleep 2
- FormatGraphics
- Kontext
- Active.SetPage TabZusaetze
- Kontext "TabZusaetze"
- Bildname = ObjektName.GetText
- select case j
- case 1 : if Bildname <> "Der Baer" then Warnlog "Wrong Graphicname: Not -> 'Der B�r' But -> "+ Bildname
- case 2 : if Bildname <> "Star Division" then Warnlog "Wrong Graphicname: Not -> 'Star Division' But -> "+ Bildname
- case 3 : if Bildname <> "Der Hase" then Warnlog "Wrong Graphicname: Not -> 'Der Hase' But -> "+ Bildname
- end select
- TabZusaetze.Cancel
- Kontext "NavigatorWriter"
- next j
-
- '/// Select in Navigator entry 'Bookmarks' and jump via Navigator to references in document ///
- printlog " - Bookmarks"
- Call wNavigatorAuswahl(6,0)
- Kontext "NavigatorWriter"
- wait 500
- Inhaltsansicht.Click
- wait 500
- Auswahlliste.TypeKeys "<Home>"
- for j=1 to 3
- Auswahlliste.TypeKeys "<down><return>"
- Sleep 2
- call wTypeKeys "<Shift Mod1 Right>"
-
- wait 200
- EditCopy
- '/// Check if correct reference have been selected ///
- select case j
- case 1 : if GetClipboardText <> "rerum" then Warnlog "Wrong Bookmark: Should -> 'rerum' Is -> "+ GetClipboardText
- case 2 : if GetClipboardText <> "non " then Warnlog "Wrong Bookmark: Should -> 'non' Is -> "+ GetClipboardText
- case 3 : if GetClipboardText <> "invenietur" then Warnlog "Wrong Bookmark: Should -> 'invenietur' Is -> "+ GetClipboardText
- end select
- Kontext "NavigatorWriter"
- next j
- wait 500
-
- '/// Select in Navigator entry 'Hyperlinks' and jump via Navigator to hyperlinks in document ///
- printlog " - Hyperlinks"
- Call wNavigatorAuswahl(8,0)
- Kontext "NavigatorWriter"
- wait 500
- Inhaltsansicht.Click
- wait 500
- Auswahlliste.TypeKeys "<Home>"
- wait 500
- for j=1 to 2
- Auswahlliste.TypeKeys "<down><return>"
- Sleep 2
- wait 200
- EditCopy
- '/// Check if correct hyperlinks have been selected ///
- select case j
- case 1 : if GetClipboardText <> "offensantes" then Warnlog "Wrong Hyperlink: Should -> 'offensantes' Is -> "+ GetClipboardText
- case 2 : if GetClipboardText <> "decreverint" then Warnlog "Wrong Hyperlink: Should -> 'decreverint' Is -> "+ GetClipboardText
- end select
- Kontext "NavigatorWriter"
- next j
- Inhaltsansicht.Click
-
- '/// Close Navigator ///
- Kontext "Navigator"
- try
- Navigator.Close
- catch
- Warnlog "Could not close Navigator!"
- endcatch
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tViewNavigator6
- Dim j as integer
- Dim datIsderAlte(4) as string
-
- if gApplication <> "WRITER" then
- goto endsub
- endif
-
- printlog "- Edit / Navigator : Rename Objects"
- '/// File / Open / 'gTesttoolpath + "writer\optional\input\navigator\st1_1.sxw" ' ///
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\navigator\st1_1.sxw" )
-
- Kontext "Navigator"
- '/// Open Navigator ///
- if Navigator.NotExists then ViewNavigator
- Kontext "NavigatorWriter"
- Call wNavigatorAuswahl(1,0)
-
- printlog "- rename Objects"
- '/// Rename Objects in Navigator through context menue (4 Objects) ///
-
- Kontext "NavigatorWriter"
- for j= 1 to 4
- Auswahlliste.Select j + 1
- printlog "- Now "+ Auswahlliste.GetItemText(j+1) +" is selected!"
- Auswahlliste.TypeKeys "+"
- Auswahlliste.Select j + 2
-
- datIsderAlte(j) = Auswahlliste.GetitemText(j+2)
-
- Auswahlliste.OpenContextMenu
- Call hMenuSelectNr(4) ' Object nmenu
- Sleep 2
- Call hMenuSelectNr(3) ' Rename entry
- Sleep 2
-
- Kontext "ObjekteUmbenennen"
- if Not ObjekteUmbenennen.Exists then
- Warnlog "- Dialog to rename object isn't up!"
- else
- Objektname.Settext "RenamingObjects" + j
- Sleep 1
- try
- ObjekteUmbenennen.Ok
- catch
- Warnlog "- Object could not be renamed!"
- ObjekteUmbenennen.Cancel
- endcatch
- end if
-
- '/// Check in Navigator if Object has been renamed ///
- Sleep 1
- Kontext "NavigatorWriter"
- if Auswahlliste.GetItemText(j+2) = datIsderAlte(j) then Warnlog "- Entry " + datIsderAlte(j) + " wasn't renamed in Navigator!"
-
- Auswahlliste.Select j+1
- Auswahlliste.TypeKeys "-"
- next j
- wait 500
- Call gMouseDoubleClick(99,50)
- '/// Save document///
- Call hFileSaveAsWithFilterKill (gOfficePath + "user\work\uvobj.odt", "writer8")
- '/// Close document and reopen previous saved document ///
- Call hCloseDocument
- Sleep 2
-
- printlog "- Saving and Loading the document, check settings"
- hFileOpen( gOfficePath & "user\work\uvobj.odt")
- '/// Navigator has to be opened with document ///
- Kontext "Navigator"
- if Navigator.NotExists then
- Warnlog "- The Navigator should have been opened!"
- ViewNavigator
- end if
- Kontext "NavigatorWriter"
-
- For j= 1 to 12
- Auswahlliste.Select j
- Auswahlliste.TypeKeys "-"
- next j
-
- '/// Check table names in Navigator ///
- printlog "- Table"
- Auswahlliste.Select 2
- Auswahlliste.TypeKeys "+"
- Auswahlliste.Select 3
- Auswahlliste.OpenContextMenu
- Sleep 1
- try
- Call hMenuSelectNr(4)
- Sleep 1
- Call hMenuSelectNr(1)
- Sleep 4
- catch
- Warnlog "Unable to open Context-menu!"
- FormatTable
- endcatch
- Kontext
-
- Kontext
- Active.Setpage TabTabelle
- Kontext "TabTabelle"
- if Tabellenname.Gettext<>"RenamingObjects1" then Warnlog "- Name of Table in Properties is wrong!"
- Sleep 1
- TabTabelle.Cancel
- Kontext "NavigatorWriter"
- Auswahlliste.Select 2
- Auswahlliste.TypeKeys "-"
-
- '/// Check Text frames names in Navigator ///
- printlog "- Text Frames"
- Auswahlliste.Select 3
- Auswahlliste.TypeKeys "+"
- Auswahlliste.Select 4
- Auswahlliste.OpenContextMenu
- Sleep 1
- Call hMenuSelectNr(4)
- Sleep 1
- Call hMenuSelectNr(1)
- Sleep 2
- Kontext
- try
- Active.Setpage TabZusaetze
- catch
- FormatFrame
- Sleep 2
- Kontext
- Active.Setpage TabZusaetze
- endcatch
- Kontext "TabZusaetze"
- if Objektname.Gettext<>"RenamingObjects2" then Warnlog "- Name of textframe in Properties is wrong!"
- Sleep 1
- TabZusaetze.Cancel
- Kontext "NavigatorWriter"
- Auswahlliste.Select 3
- Auswahlliste.TypeKeys "-"
-
- '/// Check graphic names in Navigator ///
- printlog "- Graphic"
- Auswahlliste.Select 4
- Auswahlliste.TypeKeys "+"
- Auswahlliste.Select 5
- Auswahlliste.OpenContextMenu
- Call hMenuSelectNr(4)
- Sleep 1
- Call hMenuSelectNr(1)
- Sleep 2
- Kontext
- try
- Active.Setpage TabZusaetze
- catch
- FormatGraphics
- Kontext
- Active.Setpage TabZusaetze
- endcatch
- Kontext "TabZusaetze"
- if Objektname.Gettext<>"RenamingObjects3" then Warnlog "- Name of graphic in Properties is wrong!"
- Sleep 1
- TabZusaetze.Cancel
- Kontext "NavigatorWriter"
- Auswahlliste.Select 4
- Auswahlliste.TypeKeys "-"
-
- '/// Check OLE-Objects names in Navigator ///
- printlog "- Ole-Object"
- Auswahlliste.Select 5
- Auswahlliste.TypeKeys "+"
- Auswahlliste.Select 6
- Auswahlliste.OpenContextMenu
- try
- Call hMenuSelectNr(4)
- Sleep 1
- Call hMenuSelectNr(1)
- Sleep 5
- catch
- Warnlog "Unable to open context menu!"
- FormatFrame
- endcatch
- Kontext
- try
- Active.Setpage TabZusaetze
- catch
- FormatFrame
- Kontext
- Active.Setpage TabZusaetze
- endcatch
-
- Kontext "TabZusaetze"
- if Objektname.Gettext<>"RenamingObjects4" then Warnlog "- Name of OLE-Oblect is wrong!"
- Sleep 1
- TabZusaetze.Cancel
- Kontext
- '/// Close Navigator ///
- ViewNavigator
- Sleep 1
- '/// Close document ///
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/number/w_205_.inc b/testautomation/writer/optional/includes/number/w_205_.inc
deleted file mode 100644
index 2d9c844ff922..000000000000
--- a/testautomation/writer/optional/includes/number/w_205_.inc
+++ /dev/null
@@ -1,731 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Testing Number and Bullets
-'*
-'\***********************************************************************
-
-sub w_205_
-
- Call tNumberingBullets_1
- Call tFormatNumberingBullets
- Call tFormatNumberingPosition
- Call tFormatNumberingOptions
- Call tFormatNumberingAll
-
-end sub
-
-testcase tNumberingBullets_1
-
- printlog "Turn several selected paragraphs into numbered list"
- '/// Open a new text document
- Call hNewDocument()
- '/// Insert 3 times dummy text
- Call wBlindTextEinfuegen()
- Call wBlindTextEinfuegen()
- Call wBlindTextEinfuegen()
- '/// Select all inserted text
- call wTypeKeys "<shift mod1 home>"
-
- '/// Choose 'Numbering' on 'Objectbar'
- Kontext "TextObjectbar"
- try
- Numerierung.Click
- catch
- warnlog "Objectbar is not accessible for numbering bullets"
- endcatch
- '/// Check if numbering has been created
- if (hIsNumberingBullets () <> True) then
- Warnlog " - Seems numbering has not been created"
- else
- printlog " - Numbering has been created"
- end if
-
- '/// Turn numbereing off via Toolbar
- Printlog "Turn Numbering off"
- OL_Writer_Numerierung
- '/// Check if numbering has been turned off
- if (hIsNumberingBullets () <> False) then
- warnlog " - Seems numbering is still available"
- else
- printlog " - Numbering has been turned off"
- end if
-
- Printlog "'/// Restart counting via Format->Paragraph->Numbering ///"
- Call hFormatParagraphNumbering ("",1,-1)
- if (hIsNumberingBullets () <> True) then
- Warnlog "Seems numbering has not been created"
- else
- printlog "Numbering has been created"
- end if
-
- Printlog "'/// +O+ restart numbering enable///"
- ' checked 'restart numbering' on tabpage toggles icon at Objectbar
- Kontext "NumObjectbar"
- if Not NumObjectBar.Exists then Call hToolbarSelect ( "BULLETSANDNUMBERING", true )
-
- ' Button in objectbar has to be checked
- if NeuStarten.GetState(2) <> 1 then
- warnlog "Button 'Restart Numbering' not pressed!"
- NeuStarten.Click
- sleep (1)
- if NeuStarten.GetState(2) <> 1 then
- warnlog "doesn't work"
- else
- printlog " --- worked :-)"
- end if
- else
- ' Undo 'restart numbering'
- Printlog "' disable"
- NeuStarten.Click
- sleep (1)
- if NeuStarten.GetState(2) <> 0 then
- warnlog "doesn't work "
- else
- printlog " --- worked :-)"
- end if
- end if
-
- Call hCloseDocument
-
-endcase
-
-'--------------------------------------------------
-
-testcase tFormatNumberingBullets
- Dim i as Integer :
- PrintLog "- Format / Numbering and Bullets"
-
- '/// New document ///
- Call hNewDocument
-
- printlog " - All bullet entries"
- '/// Insert all bullet entries ///
- for i=1 to 8
- FormatNumberingBullets
- Kontext
- Active.SetPage TabBullet
- Kontext "TabBullet"
- Auswahl.TypeKeys "<Right>", i
- TabBullet.OK
- call wTypeKeys "Bullet <Return><Return>"
- next i
-
- printlog " - All Numbering entries"
- '/// Insert all numbering entries ///
- for i=1 to 8
- FormatNumberingBullets
- Kontext
- Active.SetPage TabNumerierungsart
- Kontext "TabNumerierungsart"
- Auswahl.TypeKeys "<Right>", i
- TabNumerierungsart.OK
- call wTypeKeys "Nummerierungsart <Return><Return>"
- Sleep 1
- next i
-
- printlog " - All entries in Level"
- '/// Insert all level entries ///
- for i=1 to 8
- FormatNumberingBullets
- Kontext
- Active.SetPage TabGliederung
- Kontext "TabGliederung"
- Auswahl.TypeKeys "<Right>", i
- TabGliederung.OK
- call wTypeKeys "Gliederung <Return><Return>"
- Sleep 1
- next i
-
- printlog " - All entries in graphic"
- '/// Insert all graphic entries ///
- for i=1 to 29
- FormatNumberingBullets
- Kontext
- Active.SetPage TabGrafiken
- Kontext "TabGrafiken"
- wait 500
- Auswahl.TypeKeys "<Right>", i
- TabGrafiken.OK
- call wTypeKeys "Grafik <Return><Return>"
- Sleep 1
- next i
-
- printlog " - Save document and reload"
- '/// Save document, close and reopen previous saved document ///
- Call hFileSaveAsKill ( gOfficePath + "user\work\format4." & WriterFilterExtension(0) )
- Sleep 2
- Call hCloseDocument
- Sleep 2
- hFileOpen( gOfficePath & "user\work\format4." & WriterFilterExtension(0) )
- Sleep 2
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------
-testcase tFormatNumberingPosition
- Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
- Dim V11 : Dim V12 : Dim V13 : Dim V14 : Dim V15 : Dim V16
-
- printlog " - adjust position of Numbering"
- '/// New document ///
- Call hNewDocument
- '/// Select Format / Numbering Bullets and adjust position for each level ///
- FormatNumberingBullets
- Kontext
- Active.SetPage TabPositionNumerierung
- Kontext "TabPositionNumerierung"
- Level.Select 1
- Alignment.Select 2 ' Zentriert
-' if Relativ.IsEnabled then Warnlog "Relativ is enabled with level1!"
- AlignedAt.More 5
- V1 = AlignedAt.GetText
- IndentAt.More 1
- V2 = IndentAt.GetText
- Level.Select 3
- Alignment.Select 3 ' Rechts
-' Relativ.Check
- AlignedAt.Less 5
- V3 = AlignedAt.GetText
-' AbstandTextNumerierung.More 2
-' V4 = AbstandTextNumerierung.GetText
- Level.Select 4
- Alignment.Select 1 ' Links
-' Relativ.Check
- V5 = AlignedAt.GetText
- ' V6 = AbstandTextNumerierung.GetText
- V7 = IndentAt.GetText
- Level.Select 6
- Alignment.Select 3 ' Rechts
-' Relativ.Check
- AlignedAt.More 4
- V8 = AlignedAt.GetText
-' AbstandTextNumerierung.Less 3
-' V9 = AbstandTextNumerierung.GetText
- IndentAt.Less 3
- V10 = IndentAt.GetText
- Level.Select 9
- Alignment.Select 1
-' Relativ.Check
- AlignedAt.Less 2
- V11 = AlignedAt.GetText
-' AbstandTextNumerierung.More 2
-' V12 = AbstandTextNumerierung.GetText
- IndentAt.More 3
- V13 = IndentAt.GetText
- Level.Select 10
- Alignment.Select 3
-' Relativ.Check
- AlignedAt.More 4
- V14 = AlignedAt.GetText
-' AbstandTextNumerierung.Less 3
-' V15 = AbstandTextNumerierung.GetText
- IndentAt.Less 3
- V16 = IndentAt.GetText
- TabPositionNumerierung.OK
-
- printlog " - write down numbering"
- '/// write down the numbering ///
- call wTypeKeys "Nummerierung 1. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 2. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 3. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 4. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 5. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 6. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 7. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 8. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 9. Ebene<Return>"
- call wTypeKeys "<Tab>Nummerierung 10. Ebene<Return>"
- call wTypeKeys "<Tab>Immer noch 10. Ebene<Return>"
- call wTypeKeys "<Return><Return>Ende der Nummerierung"
- call wTypeKeys "<Up>", 5
-
- printlog " - check numbering-position"
- '/// reopen Format / NumberingBullets and check settings made ///
- FormatNumberingBullets
- Kontext
- Active.SetPage TabPositionNumerierung
- Kontext "TabPositionNumerierung"
- Level.Select 1
-' if Alignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong alignment: Should = 2 Ist = "+ Alignment.GetSelIndex
- if V1 <> AlignedAt.GetText then Warnlog "Level 1: Wrong Text <-> Rand: Should = "+ V1+ " Is = "+ AlignedAt.GetText
- if V2 <> IndentAt.GetText then Warnlog "Level 1: Wrong indent: Should = "+ V2+ " Is = "+ IndentAt.GetText
- Level.Select 3
-' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 3!"
- if Alignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
- if V3 <> AlignedAt.GetText then Warnlog "Level 3: Wrong Text <-> Spacing to text: Should = "+ V3+ " Is = "+ AlignedAt.GetText
-' if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Wrong indent: Should = "+ V4+ " Is = "+ AbstandTextNumerierung.GetText
- Level.Select 4
-' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 4!"
- if Alignment.GetSelIndex <> 1 then Warnlog "Level 4: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
- if V5 <> AlignedAt.GetText then Warnlog "Level 4: Wrong Text <-> Spacing to text: Should = "+ V5+ " Is = "+ AlignedAt.GetText
-' if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V6+ " Is = "+ AbstandTextNumerierung.GetText
- if V7 <> IndentAt.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V7+ " Is = "+ IndentAt.GetText
- Level.Select 6
-' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 6!"
- if Alignment.GetSelIndex <> 3 then Warnlog "Level 6: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
- if V8 <> AlignedAt.GetText then Warnlog "Level 6: Wrong Text <-> Spacing to text: Should = "+ V8+ " Is = "+ AlignedAt.GetText
-' if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V9+ " Is = "+ AbstandTextNumerierung.GetText
- if V10 <> IndentAt.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V10+ " Is = "+ IndentAt.GetText
- Level.Select 9
-' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 9!"
- if Alignment.GetSelIndex <> 1 then Warnlog "Level 9: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
- if V11 <> AlignedAt.GetText then Warnlog "Level 9: Wrong Text <-> Spacing to text: Should = "+ V11+ " Is = "+ AlignedAt.GetText
-' if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V12+ " Is = "+ AbstandTextNumerierung.GetText
- if V13 <> IndentAt.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V13+ " Is = "+ IndentAt.GetText
- Level.Select 10
-' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 10!"
- if Alignment.GetSelIndex <> 3 then Warnlog "Level 10: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
- if V14 <> AlignedAt.GetText then Warnlog "Level 10: Wrong Text <-> Spacing to text: Should = "+ V14+ " Is = "+ AlignedAt.GetText
-' if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V15+ " Is = "+ AbstandTextNumerierung.GetText
- if V16 <> IndentAt.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V16+ " Is = "+ IndentAt.GetText
- TabPositionNumerierung.Ok
-
- printlog " - check previous saved numbering"
- '/// save document, close it and reload previous saved document ///
- Sleep 1
- Call hFileSaveAsKill ( gOfficePath + "user\work\tFormatNumberingPosition." & WriterFilterExtension(0) )
- Sleep 2
- Call hCloseDocument
- Sleep 2
- hFileOpen( gOfficePath & "user\work\tFormatNumberingPosition." & WriterFilterExtension(0) )
-
- '/// check settings on Format / NumberingBullets ///
- FormatNumberingBullets
- Kontext
- Active.SetPage TabPositionNumerierung
- Kontext "TabPositionNumerierung"
- Level.Select 1
-
- if Alignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong alignment: Should = 2 Ist = "+ Alignment.GetSelIndex
- if V1 <> AlignedAt.GetText then Warnlog "Level 1: Wrong Text <-> Rand: Should = "+ V1+ " Is = "+ AlignedAt.GetText
- if V2 <> IndentAt.GetText then Warnlog "Level 1: Wrong indent: Should = "+ V2+ " Is = "+ IndentAt.GetText
- Level.Select 3
-' if Not Relativ.IsChecked then Relativ.Check
- if Alignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
- if V3 <> AlignedAt.GetText then Warnlog "Level 3: Wrong Text <-> Spacing to text: Should = "+ V3+ " Is = "+ AlignedAt.GetText
-' if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Wrong indent: Should = "+ V4+ " Is = "+ AbstandTextNumerierung.GetText
- Level.Select 4
-' if Not Relativ.IsChecked then Relativ.Check
- if Alignment.GetSelIndex <> 1 then Warnlog "Level 4: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
- if V5 <> AlignedAt.GetText then Warnlog "Level 4: Wrong Text <-> Spacing to text: Should = "+ V5+ " Is = "+ AlignedAt.GetText
-' if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V6+ " Is = "+ AbstandTextNumerierung.GetText
- if V7 <> IndentAt.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V7+ " Is = "+ IndentAt.GetText
- Level.Select 6
-' if Not Relativ.IsChecked then Relativ.Check
- if Alignment.GetSelIndex <> 3 then Warnlog "Level 6: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
- if V8 <> AlignedAt.GetText then Warnlog "Level 6: Wrong Text <-> Spacing to text: Should = "+ V8+ " Is = "+ AlignedAt.GetText
-' if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V9+ " Is = "+ AbstandTextNumerierung.GetText
- if V10 <> IndentAt.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V10+ " Is = "+ IndentAt.GetText
- Level.Select 9
-' if Not Relativ.IsChecked then Relativ.Check
- if Alignment.GetSelIndex <> 1 then Warnlog "Level 9: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
- if V11 <> AlignedAt.GetText then Warnlog "Level 9: Wrong Text <-> Spacing to text: Should = "+ V11+ " Is = "+ AlignedAt.GetText
-' if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V12+ " Is = "+ AbstandTextNumerierung.GetText
- if V13 <> IndentAt.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V13+ " Is = "+ IndentAt.GetText
- Level.Select 10
-' if Not Relativ.IsChecked then Relativ.Check
- if Alignment.GetSelIndex <> 3 then Warnlog "Level 10: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
- if V14 <> AlignedAt.GetText then Warnlog "Level 10: Wrong Text <-> Spacing to text: Should = "+ V14+ " Is = "+ AlignedAt.GetText
-' if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V15+ " Is = "+ AbstandTextNumerierung.GetText
- if V16 <> IndentAt.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V16+ " Is = "+ IndentAt.GetText
- TabPositionNumerierung.Cancel
- Sleep 1
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------
-
-testcase tFormatNumberingOptions
- Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
- Dim i as integer
-
- printlog " - adjust numbering properties"
- '/// New document ///
- Call hNewDocument
- '/// Select Format / Numbering Bullets and adjust properties for each level ///
- FormatNumberingBullets
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
-
- Ebene.Select 1
- Numerierung.Select 11 ' Keine
- Davor.SetText "Vorher "
- Dahinter.SetText "sp�ter "
-
- Ebene.Select 3
- Numerierung.Select 2 ' A,B,C,...
- Davor.SetText "��� "
- Dahinter.SetText "��� "
- Zeichenvorlage.Select 2
- V9 = Zeichenvorlage.GetSelText
- Vollstaendig.Less 1
- V1 = Vollstaendig.GetText
- BeginnBei.More 4
- V2 = BeginnBei.GetText
-
- Ebene.Select 5
- Numerierung.Select 8 ' Bullets
- if Davor.IsVisible then Warnlog "'Before' is visible on Bullet-Options"
- if Dahinter.IsVisible then Warnlog "'After' is visible on Bullet-Options"
- Zeichenvorlage.Select 1
-
- Ebene.Select 7
- Numerierung.Select 9 ' Grafik
- if Davor.IsVisible then Warnlog "'Before' is visible on Graphic-Options"
- if Dahinter.IsVisible then Warnlog "'After' is visible on Graphic-Options"
- Auswahl.Click
- Call hMenuSelectNr (1)
- Kontext "OeffnenDlg"
- Dateiname.Settext Convertpath(gtesttoolpath + "writer\optional\input\graphics\bullet.gif")
- Oeffnen.Click
- wait 500
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog Active.Gettext
- Active.Ok
- end if
- end if
-
- Kontext "TabOptionenNumerierung"
- Breite.More 4
- V3 = Breite.GetText
- Hoehe.More 3
- V4 = Hoehe.GetText
- Ausrichtung.Select 4
-
- Ebene.Select 9
- Numerierung.Select 1 ' 1,2,3,...
- Zeichenvorlage.Select 3
- V10 = Zeichenvorlage.GetSelText
-
- Ebene.Select 10
- Numerierung.Select 3 ' a,b,c,...
- V5 = Davor.GetText
- V6 = Dahinter.GetText
- Vollstaendig.More 9
- V7 = Vollstaendig.GetText
- BeginnBei.More 3
- V8 = BeginnBei.GetText
- TabOptionenNumerierung.OK
-
- printlog " - write down numbering"
- '/// write down numbering ///
- call wTypeKeys "Hallo 1. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 2. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 3. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 4. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 5. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 6. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 7. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 8. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 9. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 10. Ebene<Return>"
- call wTypeKeys "<Tab>Immer noch 10. Ebene<Return>"
- call wTypeKeys "<Return><Return>Ende der Numerierung"
- call wTypeKeys "<Up>", 5
-
- FormatNumberingBullets
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- Ebene.Select 1
- if Numerierung.GetSelIndex <> 11 then Warnlog "Level 1: Wrong Numbering type : Should 11 Is " + Numerierung.GetSelIndex
- if Davor.GetText <> "Vorher " then Warnlog "Level 1: Wrong Text in 'After': Should 'Vorher ' Is " + Davor.GetText
- if Dahinter.GetText <> "sp�ter " then Warnlog "Level 1: Wrong Text in 'Before': Should 'sp�ter ' Is " + Dahinter.GetText
- Ebene.Select 3
- if Numerierung.GetSelIndex <> 2 then Warnlog "Level 3: Wrong Numbering type : Should 2 Is " + Numerierung.GetSelIndex
- if Davor.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'Before': Should '��� ' Is " + Davor.GetText
- if Dahinter.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'After': Should '��� ' Is " + Dahinter.GetText
- if Zeichenvorlage.GetSelText <> V9 then Warnlog "Level 3: Wrong Character Style: Should " + V9 + " Is " + Zeichenvorlage.GetSelText
- if V1 <> Vollstaendig.GetText then Warnlog "Level 3: 'Show Sublevels' Is wrong: Should " + V1 + " Is: " + Vollstaendig.GetText
- if V2 <> BeginnBei.GetText then Warnlog "Level 3: 'Start at' Is wrong: Should " + V2 + " Is: " + BeginnBei.GetText
- Ebene.Select 5
- if Numerierung.GetSelIndex <> 8 then Warnlog "Level 5: Wrong Numbering type : Should 8 Is " + Numerierung.GetSelIndex
- if Zeichenvorlage.GetSelIndex <> 1 then Warnlog "Level 5: Wrong Character Style: Should 1 Is " + Zeichenvorlage.GetSelIndex
- Ebene.Select 7
- if Numerierung.GetSelIndex <> 9 then
- Warnlog "Level 7: Wrong Numbering type : Should 9 Is " + Numerierung.GetSelIndex
- else
- if V3 <> Breite.GetText then Warnlog "Level 7: Wrong graphic width: Should " + V3 + " Is: " + Breite.GetText
- if V4 <> Hoehe.GetText then Warnlog "Level 7: Wrong graphic height: Should " + V4 + " Is: " + Hoehe.GetText
- if Ausrichtung.GetSelIndex <> 4 then Warnlog "Level 7: Alignment Is not 4 but " + Ausrichtung.GetSelIndex
- end if
- Ebene.Select 9
- if Numerierung.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering type : Should 1 Is " + Numerierung.GetSelIndex
- if Zeichenvorlage.GetSelText <> V10 then Warnlog "Level 9: Wrong Character Style: Should " + V10 +" Is " + Zeichenvorlage.GetSelText
- Ebene.Select 10
- if Numerierung.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering type : Should 3 Is " + Numerierung.GetSelIndex
- if Davor.GetText <> V5 then Warnlog "Level 10: Wrong Text in 'Before': Should "+ V5 + " Is " + Davor.GetText
- if Dahinter.GetText <> V6 then Warnlog "Level 10: Wrong Text in 'After': Should "+ V6 + " Is " + Dahinter.GetText
- if V7 <> Vollstaendig.GetText then Warnlog "Level 10: 'Show Sublevels' Is wrong: Should " + V7 + " Is: " + Vollstaendig.GetText
- if V8 <> BeginnBei.GetText then Warnlog "Level 10: 'Start at' Is wrong: Should " + V8 + " Is: " + BeginnBei.GetText
- TabOptionenNumerierung.Cancel
-
- printlog " - check previous saved numbering"
- '/// save document, close it and reload previous saved document ///
- Call hFileSaveAsKill ( gOfficePath + "user\work\format6." & WriterFilterExtension(0) )
- Sleep 2
- Call hCloseDocument
- Sleep 2
- hFileOpen( gOfficePath & "user\work\format6." & WriterFilterExtension(0) )
- For i = 1 to 15
- call wTypeKeys "<Up>"
- Wait 500
- next i
- call wTypeKeys "<Home>"
-
- '/// check settings in Format / Numbering Bullets ///
- FormatNumberingBullets
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- Ebene.Select 1
- if Numerierung.GetSelIndex <> 11 then Warnlog "Level 1: Wrong Numbering type : Should 11 Is " + Numerierung.GetSelIndex
- if Davor.GetText <> "Vorher " then Warnlog "Level 1: Wrong Text in 'After': Should 'Vorher ' Is " + Davor.GetText
- if Dahinter.GetText <> "sp�ter " then Warnlog "Level 1: Wrong Text in 'Before': Should 'sp�ter ' Is " + Dahinter.GetText
- Ebene.Select 3
- if Numerierung.GetSelIndex <> 2 then Warnlog "Level 3: Wrong Numbering type : Should 2 Is " + Numerierung.GetSelIndex
- if Davor.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'Before': Should '��� ' Is " + Davor.GetText
- if Dahinter.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'After': Should '��� ' Is " + Dahinter.GetText
- if Zeichenvorlage.GetSelText <> V9 then Warnlog "Level 3: Wrong Character Style: Should " + V9 + " Is " + Zeichenvorlage.GetSelText
- if V1 <> Vollstaendig.GetText then Warnlog "Level 3: 'Show Sublevels' Is wrong: Should " + V1 + " Is: " + Vollstaendig.GetText
- if V2 <> BeginnBei.GetText then Warnlog "Level 3: 'Start at' Is wrong: Should " + V2 + " Is: " + BeginnBei.GetText
- Ebene.Select 5
- if Numerierung.GetSelIndex <> 8 then Warnlog "Level 5: Wrong Numbering type : Should 8 Is " + Numerierung.GetSelIndex
- if Zeichenvorlage.GetSelIndex <> 1 then Warnlog "Level 5: Wrong Character Style: Should 1 Is " + Zeichenvorlage.GetSelIndex
- Ebene.Select 7
- if Numerierung.GetSelIndex <> 9 then
- Warnlog "Level 7: Wrong Numbering type : Should 9 Is " + Numerierung.GetSelIndex
- else
- if V3 <> Breite.GetText then Warnlog "Level 7: Wrong graphic width: Should " + V3 + " Is: " + Breite.GetText
- if V4 <> Hoehe.GetText then Warnlog "Level 7: Wrong graphic height: Should " + V4 + " Is: " + Hoehe.GetText
- if Ausrichtung.GetSelIndex <> 4 then Warnlog "Level 7: Alignment Is not 4 but " + Ausrichtung.GetSelIndex
- end if
- Ebene.Select 9
- if Numerierung.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering type : Should 1 Is " + Numerierung.GetSelIndex
- if Zeichenvorlage.GetSelText <> V10 then Warnlog "Level 9: Wrong Character Style: Should " + V10 +" Is " + Zeichenvorlage.GetSelText
- Ebene.Select 10
- if Numerierung.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering type : Should 3 Is " + Numerierung.GetSelIndex
- if Davor.GetText <> V5 then Warnlog "Level 10: Wrong Text in 'Before': Should "+ V5 + " Is " + Davor.GetText
- if Dahinter.GetText <> V6 then Warnlog "Level 10: Wrong Text in 'After': Should "+ V6 + " Is " + Dahinter.GetText
- if V7 <> Vollstaendig.GetText then Warnlog "Level 10: 'Show Sublevels' Is wrong: Should " + V7 + " Is: " + Vollstaendig.GetText
- if V8 <> BeginnBei.GetText then Warnlog "Level 10: 'Start at' Is wrong: Should " + V8 + " Is: " + BeginnBei.GetText
- TabOptionenNumerierung.Cancel
-
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------
-testcase tFormatNumberingAll
- Dim i as Integer
- Dim Wert( 20 ) as Integer
- printlog "- Format / Numbering -Bullets in detail"
- printlog " - adjust different Numbering and check the properties"
- '/// New document ///
- Call hNewDocument
- '/// Select Format / NumberingBullets and adjust different numbering ///
- FormatNumberingBullets
-
- Kontext
- Active.SetPage TabBullet
- Kontext "TabBullet"
- Sleep 1
- Auswahl.TypeKeys "<Right><Down>"
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 1 select a bullet ///
- Ebene.Select 1 ' 1. Ebene ein Bullet einstellen
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 2 select a numbering ///
- Ebene.Select 2 ' 2. Ebene eine Numerierungsart einstellen
-
- Kontext
- Active.SetPage TabNumerierungsart
- Kontext "TabNumerierungsart"
- Sleep 1
- Auswahl.TypeKeys "<Down>", 2
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 3 select a numbering ///
- Ebene.Select 3 ' 3. Ebene eine Numerierungsart einstellen
-
- Kontext
- Active.SetPage TabNumerierungsart
- Kontext "TabNumerierungsart"
- Sleep 1
- Auswahl.TypeKeys "<Down><Right>", 2
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 4 select a graphic ///
- Ebene.Select 4 ' 4. Ebene eine Grafik einstellen
-
- Kontext
- Active.SetPage TabGrafiken
- Kontext "TabGrafiken"
- Sleep 1
- Auswahl.TypeKeys "<Right>"
- ' 5. und 6. Ebene werden nicht besonders eingestellt
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 7 select a graphic ///
- Ebene.Select 7 ' 7. Ebene eine Grafik einstellen
-
- Kontext
- Active.SetPage TabGrafiken
- Kontext "TabGrafiken"
- Sleep 1
- Auswahl.TypeKeys "<Right><Down>"
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 8 select a graphic ///
- Ebene.Select 8 ' 8. Ebene eine Grafik einstellen
-
- Kontext
- Active.SetPage TabGrafiken
- Kontext "TabGrafiken"
- Sleep 1
- Auswahl.TypeKeys "<Right>", 5
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 9 select a bullet ///
- Ebene.Select 9 ' 9. Ebene ein Bullet einstellen
-
- Kontext
- Active.SetPage TabBullet
- Kontext "TabBullet"
- Sleep 1
- Auswahl.TypeKeys "<Down>"
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- '/// Level 10 select a numbering ///
- Ebene.Select 10 ' 10. Ebene eine Numerierungsart einstellen
-
- Kontext
- Active.SetPage TabNumerierungsart
- Kontext "TabNumerierungsart"
- Sleep 1
- Auswahl.TypeKeys "<Right>", 2
-
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
-
- for i=1 to 10
- Ebene.Select i
- Wert (i) = Numerierung.GetSelIndex
- next i
- '/// check settings made ///
-
- if Wert(1) <> 8 then Warnlog "Selected entry => 1. Level Is not Bullets (8. Entry) but entry " + Wert(1)
- if Wert(2) <> 2 then Warnlog "Selected entry => 2. Level Is not Numbering 1 but entry " + Wert(2)
- if Wert(3) <> 3 then Warnlog "Selected entry => 3. Level Is not Numbering 2 but entry " + Wert(3)
- if Wert(4) <> 9 then Warnlog "Selected entry => 4. Level Is not Graphic (9. Entry) but entry " + Wert(4)
- if Wert(5) <> 8 then Warnlog "Selected entry => 5. Level Is not Bullets (8. Entry) but entry " + Wert(5)
- if Wert(6) <> 8 then Warnlog "Selected entry => 6. Level Is not Bullets (8. Entry) but entry " + Wert(6)
- if Wert(7) <> 9 then Warnlog "Selected entry => 7. Level Is not Graphic (9. Entry) but entry " + Wert(7)
- if Wert(8) <> 9 then Warnlog "Selected entry => 8. Level Is not Graphic (9. Entry) but entry " + Wert(8)
- if Wert(9) <> 8 then Warnlog "Selected entry => 9. Level Is not Bullets (8. Entry) but entry " + Wert(9)
- if Wert(10) <> 1 then Warnlog "Selected entry => 10. Level Is not Numbering 1 but entry " + Wert(10)
-
- TabOptionenNumerierung.OK
-
- printlog " - create numbering and check them"
- '/// create numbering and check it ///
- call wTypeKeys "Hallo 1. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 2. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 3. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 4. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 5. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 6. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 7. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 8. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 9. Ebene<Return>"
- call wTypeKeys "<Tab>Hallo 10. Ebene<Return>"
- call wTypeKeys "<Tab>Immer noch 10. Ebene<Return>"
- call wTypeKeys "<Return><Return>Ende der Numerierung"
- call wTypeKeys "<Up>", 5
-
- FormatNumberingBullets
- '/// reopen dialog and check settings ///
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- for i=1 to 10
- Ebene.Select i
- if Numerierung.GetSelIndex <> Wert(i) then
- Warnlog "After creating: => Level " + i + " has not numbering " + Wert (i) + " but " + Numerierung.GetSelIndex
- end if
- next i
- TabOptionenNumerierung.Cancel
-
- printlog " - check previous saved numbering"
- '/// save document, close and reload previous saved document ///
- Sleep 2
- Call hFileSaveAsKill ( gOfficePath + "user\work\format7." & WriterFilterExtension(0) )
- Sleep 2
- Call hCloseDocument
- Sleep 2
- hFileOpen( gOfficePath & "user\work\format7." & WriterFilterExtension(0) )
- Sleep 2
- FormatNumberingBullets
- '/// reopen Format / NumberingBullets and check saved settings ///
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
- for i=1 to 10
- Ebene.Select i
- if Numerierung.GetSelIndex <> Wert(i) then Warnlog "After saving: => Level " + i + " has not Numbering " + Wert (i) + " but " + Numerierung.GetSelIndex
- next i
- TabOptionenNumerierung.Cancel
-
- '/// close document ///
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/number/w_205a_.inc b/testautomation/writer/optional/includes/number/w_205a_.inc
deleted file mode 100644
index 579ea242c635..000000000000
--- a/testautomation/writer/optional/includes/number/w_205a_.inc
+++ /dev/null
@@ -1,875 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description :
-'*
-'\***********************************************************************
-
-sub w_205a_
- printLog Chr(13) + "--------- Level 1 - Tools - Menu (3) ----------"
-
- Call tToolsOutlineNumbering1 ' Numerierungtabpage f�r Kapitelnumerierung
- Call tToolsOutlineNumbering2 ' Positionstabpage f�r Kapitelnumerierung
- Call tToolsOutlineNumbering3 ' Gesamtes f�r Kapitelnumerierung
- Call tToolsFootnoteEndnote ' Fu�- + Endnoten formatieren
-
-end sub
-
-' *******************************************************************
-
-testcase tToolsOutlineNumbering1
- Dim VorlagenLst(11) as String : Dim Zaehler as Integer
- Dim i as integer
- PrintLog "- Tools / Outline Numbering: Part 1 - Numbering"
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\number\numbering1.sxw" )
-
-
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
-
- PrintLog " - adjust level"
- Ebene.Select 1
- ' I need to know the name of entry (none), depends on language, for checking the results
- Absatzvorlage.Select 1
- VorlagenLst(11)= Absatzvorlage.GetSelText
- Sleep 2
- ' Select next paragraph style
- Absatzvorlage.Select 2
- Nummer.Select 1
- if Vollstaendig.IsEnabled then Warnlog "On 1. Level 'Show Sublevels' is active -> Bug"
- BeginBei.SetText "7"
- Davor.SetText "Ha "
- Dahinter.SetText " aH"
-
- Ebene.Select 2
- Absatzvorlage.Select 3
- Nummer.Select 2
- Vollstaendig.SetText "0"
- BeginBei.SetText "4"
- Davor.SetText "Q "
- Dahinter.SetText " Q"
-
- Ebene.Select 3
- Absatzvorlage.Select 4
- Nummer.Select 3
- Vollstaendig.SetText "3"
- BeginBei.SetText "2"
- Davor.SetText "A "
- Dahinter.SetText " s"
-
- Ebene.Select 4
- Absatzvorlage.Select 5
- Nummer.Select 4
- Vollstaendig.SetText "1"
- Davor.SetText "Ups "
- Dahinter.SetText " spU"
-
- Ebene.Select 5
- Absatzvorlage.Select 6
- Nummer.Select 5
- Vollstaendig.SetText "0"
- Davor.SetText "*. "
- Dahinter.SetText " @�"
-
- Ebene.Select 6
- Absatzvorlage.Select 7
- Nummer.Select 6
- Vollstaendig.SetText "5"
- Davor.SetText " "
- Sleep 1
-
- Ebene.Select 7
- Absatzvorlage.Select 8
- Nummer.Select 5
- Vollstaendig.SetText "9"
- Sleep 1
-
- Ebene.Select 8
- Absatzvorlage.Select 9
- Nummer.Select 4
- Vollstaendig.SetText "9"
- Sleep 1
-
- Ebene.Select 9
- Absatzvorlage.Select 10
- Nummer.Select 3
- Vollstaendig.SetText "9"
- Dahinter.SetText "Hallo dies ist ein langer Text"
- Sleep 1
-
- Ebene.Select 10
- Absatzvorlage.Select 11
- Nummer.Select 3
- Vollstaendig.SetText "9"
- Davor.SetText "Hallo dies ist ein langer Text"
- Sleep 1
-
- ' remember the paragraph style
- For i = 1 to 10
- Ebene.Select i
- VorlagenLst(i) = Absatzvorlage.GetSelText
- next i
-
- TabKapitelnumerierung.Ok
-
- printlog "- format document"
- call wTypeKeys "<Up>", 25
-
- for Zaehler = 1 to 10
- call wTypeKeys "<Shift End>"
- if wStyleSet ( VorlagenLst(Zaehler) ) = false then
- Warnlog "- Style '" & VorlagenLst(Zaehler) & "' could not be set!"
- end if
- call wTypeKeys "<Down>", 8
- call wTypeKeys "<Home>"
- wait 500
- next Zaehler
-
- printlog "- check properties"
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- Ebene.Select 1
- if Absatzvorlage.GetSelText <> VorlagenLst(1) then Warnlog "Level 1: wrong Paragraph Style"
- if Nummer.GetSelIndex <> 1 then Warnlog "Level 1: wrong Character Style -> " + Nummer.GetSeltext + "instead of 1 !"
- if BeginBei.GetText <> "7" then Warnlog "7 is not selected at 'Start at' but " + BeginBei.Gettext
- if Davor.GetText <> "Ha " then Warnlog "Level 1: Seperator before not 'Ha ' but " + Davor.Gettext
- if Dahinter.GetText <> " aH" then Warnlog "Level 1: Seperator after not ' aH' but " + Dahinter.Gettext
-
- Ebene.Select 2
- if Absatzvorlage.GetSelText <> VorlagenLst(2) then Warnlog "Level 2: Paragraph Style not " + VorlagenLst(2) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 2 then Warnlog "Level 2: wrong Character Style"
- if Vollstaendig.GetText <> "1" then Warnlog "Level 2: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
- if Davor.GetText <> "Q " then Warnlog "Level 2: Seperator before is wrong"
- if Dahinter.GetText <> " Q" then Warnlog "Level 2: Seperator after is wrong"
-
- Ebene.Select 3
- if Absatzvorlage.GetSelText <> VorlagenLst(3) then Warnlog "Level 3: Paragraph Style" + VorlagenLst(3) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 3 then Warnlog "Level 3: wrong Character Style"
- if Vollstaendig.GetText <> "3" then Warnlog "Level 3: 'Show Sublevels' is not 3 but " + Vollstaendig.GetText
- if Davor.GetText <> "A " then Warnlog "Level 3: Seperator before is wrong"
- if Dahinter.GetText <> " s" then Warnlog "Level 3: Seperator after is wrong"
-
- Ebene.Select 4
- if Absatzvorlage.GetSelText <> VorlagenLst(4) then Warnlog "Level 4: Paragraph Style" + VorlagenLst(4) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 4 then Warnlog "Level 4: wrong Character Style"
- if Vollstaendig.GetText <> "1" then Warnlog "Level 4: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
- if Davor.GetText <> "Ups " then Warnlog "Level 4: Seperator before is wrong"
- if Dahinter.GetText <> " spU" then Warnlog "Level 4: Seperator after is wrong"
-
- Ebene.Select 5
- if Absatzvorlage.GetSelText <> VorlagenLst(5) then Warnlog "Level 5: Paragraph Style" + VorlagenLst(5) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 5 then Warnlog "Level 5: wrong Character Style"
- if Vollstaendig.GetText <> "1" then Warnlog "Level 5: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
- if Davor.GetText <> "*. " then Warnlog "Level 5: Seperator before is wrong"
- if Dahinter.GetText <> " @�" then Warnlog "Level 5: Seperator after is wrong"
-
- Ebene.Select 6
- if Absatzvorlage.GetSelText <> VorlagenLst(6) then Warnlog "Level 6: Paragraph Style" + VorlagenLst(6) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 6 then Warnlog "Level 6: wrong Character Style"
- if Vollstaendig.GetText <> "5" then Warnlog "Level 6: 'Show Sublevels' is not 5 but " + Vollstaendig.GetText
- if Davor.GetText <> " " then Warnlog "Level 6: Seperator before is wrong"
-
- Ebene.Select 7
- if Absatzvorlage.GetSelText <> VorlagenLst(7) then Warnlog "Level 7: Paragraph Style" + VorlagenLst(7) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 5 then Warnlog "Level 7: wrong Character Style"
- if Vollstaendig.GetText <> "7" then Warnlog "Level 7: 'Show Sublevels' is not 7 but " + Vollstaendig.GetText
-
- Ebene.Select 8
- if Absatzvorlage.GetSelText <> VorlagenLst(8) then Warnlog "Level 8: Paragraph Style" + VorlagenLst(8) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 4 then Warnlog "Level 8: wrong Character Style"
- if Vollstaendig.GetText <> "8" then Warnlog "Level 8: 'Show Sublevels' is not 8 but " + Vollstaendig.GetText
-
- Ebene.Select 9
- if Absatzvorlage.GetSelText <> VorlagenLst(9) then Warnlog "Level 9: Paragraph Style not " + VorlagenLst(9) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 3 then Warnlog "Level 9: wrong Character Style"
- if Vollstaendig.GetText <> "9" then Warnlog "Level 9: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
- if Dahinter.GetText <> "Hallo dies ist ein langer Text" then Warnlog "Level 9: Seperator after is wrong"
-
- Ebene.Select 10
- if Absatzvorlage.GetSelText <> VorlagenLst(10) then
- QAErrorlog "#125998#Level 10: Paragraph Style not " + VorlagenLst(10) + " but " + Absatzvorlage.GetSelText
- end if
- if Nummer.GetSelIndex <> 3 then Warnlog "Level 10: wrong Character Style"
- if Vollstaendig.GetText <> "9" then Warnlog "Level 10: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
- if Davor.GetText <> "Hallo dies ist ein langer Text" then Warnlog "Level 10: Seperator before is wrong"
- TabKapitelnumerierung.Ok
-
- for i = 1 to 2
- Select Case i
- Case 1
- printlog "- Save as sxw"
- Call hFileSaveAsKill ( gOfficePath + "user\work\tToolsOutlineNumbering1.sxw" )
- Case 2
- printlog "- Save as odt"
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsOutlineNumbering1.odt", "writer8")
- end select
- next i
- Call hCloseDocument
-
- for i = 1 to 2
- Select Case i
- Case 1
- printlog "- Load sxw and check formatting"
- hFileOpen( gOfficePath & "user\work\tToolsOutlineNumbering1.sxw" )
- Case 2
- printlog "- Load odt and check formatting"
- hFileOpen( gOfficePath & "user\work\tToolsOutlineNumbering1.odt" )
- end select
- call wTypeKeys "<PageUp>", 8
- call wTypeKeys "<Up>", 10
-
- for Zaehler = 1 to 10
- call wTypeKeys "<Shift End>"
- if wStyleGet(VorlagenLst(Zaehler)) = false then Warnlog "Wrong Style for Outline Numbering " + Zaehler
- call wTypeKeys "<Down>", 8
- call wTypeKeys "<Home>"
- next Zaehler
-
- printlog " - check saved properties"
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- Ebene.Select 1
- if Absatzvorlage.GetSelText <> VorlagenLst(1) then Warnlog " - Level 1: wrong Paragraph Style"
- if Nummer.GetSelIndex <> 1 then Warnlog " - Level 1: wrong Character Style -> " + Nummer.GetSeltext + "instead of 1 !"
- if BeginBei.GetText <> "7" then Warnlog " - 7 is not selected at 'Start at' but " + BeginBei.Gettext
- if Davor.GetText <> "Ha " then Warnlog " - Level 1: Seperator before not 'Ha ' but " + Davor.Gettext
- if Dahinter.GetText <> " aH" then Warnlog " - Level 1: Seperator after not ' aH' but " + Dahinter.Gettext
-
- Ebene.Select 2
- if Absatzvorlage.GetSelText <> VorlagenLst(2) then Warnlog " - Level 2: Paragraph Style not " + VorlagenLst(2) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 2 then Warnlog " - Level 2: wrong Character Style"
- if Vollstaendig.GetText <> "1" then Warnlog " - Level 2: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
- if Davor.GetText <> "Q " then Warnlog " - Level 2: Seperator before is wrong"
- if Dahinter.GetText <> " Q" then Warnlog " - Level 2: Seperator after is wrong"
-
- Ebene.Select 3
- if Absatzvorlage.GetSelText <> VorlagenLst(3) then
- QAErrorlog " - #125998#Level 3: Paragraph Style not " + VorlagenLst(3) + " but " + Absatzvorlage.GetSelText
- end if
- if Nummer.GetSelIndex <> 3 then Warnlog " - Level 3: wrong Character Style"
- if Vollstaendig.GetText <> "3" then Warnlog " - Level 3: 'Show Sublevels' is not 3 but " + Vollstaendig.GetText
- if Davor.GetText <> "A " then Warnlog " - Level 3: Seperator before is wrong"
- if Dahinter.GetText <> " s" then Warnlog " - Level 3: Seperator after is wrong"
-
- Ebene.Select 4
- if Absatzvorlage.GetSelText <> VorlagenLst(4) then Warnlog " - Level 4: Paragraph Style not " + VorlagenLst(4) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 4 then Warnlog " - Level 4: wrong Character Style"
- if Vollstaendig.GetText <> "1" then Warnlog " - Level 4: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
- if Davor.GetText <> "Ups " then Warnlog " - Level 4: Seperator before is wrong"
- if Dahinter.GetText <> " spU" then Warnlog " - Level 4: Seperator after is wrong"
-
- Ebene.Select 5
- if Absatzvorlage.GetSelText <> VorlagenLst(5) then Warnlog " - Level 5: Paragraph Style not " + VorlagenLst(5) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 5 then Warnlog " - Level 5: wrong Character Style"
- if Vollstaendig.GetText <> "1" then Warnlog " - Level 5: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
- if Davor.GetText <> "*. " then Warnlog " - Level 5: Seperator before is wrong"
- if Dahinter.GetText <> " @�" then Warnlog " - Level 5: Seperator after is wrong"
-
- Ebene.Select 6
- if Absatzvorlage.GetSelText <> VorlagenLst(6) then Warnlog " - Level 6: Paragraph Style not " + VorlagenLst(6) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 6 then Warnlog " - Level 6: wrong Character Style"
- if Vollstaendig.GetText <> "5" then Warnlog " - Level 6: 'Show Sublevels' is not 5 but " + Vollstaendig.GetText
- if Davor.GetText <> " " then Warnlog " - Level 6: Seperator before is wrong"
-
- Ebene.Select 7
- if Absatzvorlage.GetSelText <> VorlagenLst(7) then Warnlog " - Level 7: Paragraph Style not " + VorlagenLst(7) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 5 then Warnlog " - Level 7: wrong Character Style"
- if Vollstaendig.GetText <> "7" then Warnlog " - Level 7: 'Show Sublevels' is not 7 but " + Vollstaendig.GetText
-
- Ebene.Select 8
- if Absatzvorlage.GetSelText <> VorlagenLst(8) then Warnlog " - Level 8: Paragraph Style not " + VorlagenLst(8) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 4 then Warnlog " - Level 8: wrong Character Style"
- if Vollstaendig.GetText <> "8" then Warnlog " - Level 8: 'Show Sublevels' is not 8 but " + Vollstaendig.GetText
-
- Ebene.Select 9
- if Absatzvorlage.GetSelText <> VorlagenLst(9) then Warnlog " - Level 9: Paragraph Style not " + VorlagenLst(9) + " but " + Absatzvorlage.GetSelText
- if Nummer.GetSelIndex <> 3 then Warnlog " - Level 9: wrong Character Style"
- if Vollstaendig.GetText <> "9" then Warnlog " - Level 9: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
- if Dahinter.GetText <> "Hallo dies ist ein langer Text" then Warnlog " - Level 9: Seperator after is wrong"
-
- Ebene.Select 10
- if Absatzvorlage.GetSelText <> VorlagenLst(10) then
- QAErrorlog " - #125998#Level 10: Paragraph Style not " + VorlagenLst(10) + " but " + Absatzvorlage.GetSelText
- end if
- if Nummer.GetSelIndex <> 3 then Warnlog " - Level 10: wrong Character Style"
- if Vollstaendig.GetText <> "9" then Warnlog " - Level 10: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
- if Davor.GetText <> "Hallo dies ist ein langer Text" then Warnlog " - Level 10: Seperator before is wrong"
- TabKapitelnumerierung.Cancel
-
- Call hCloseDocument
- next i
-
-endcase
-
-'--------------------------------------------------
-
-testcase tToolsOutlineNumbering2
- Dim i as Integer
- Dim VorlagenLst (11) as String
- Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
- Dim V11 : Dim V12 : Dim V13 : Dim V14 : Dim V15 : Dim V16
-
- PrintLog "- Tools / Outline Numbering: Part 2 - Tabpage Position"
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\number\numbering1.sxw" )
-
-
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- for i=1 to 10
- if iSprache = 01 then
- VorlagenLst (i) = Absatzvorlage.GetItemText ( i+1 )
- else
- VorlagenLst (i) = Absatzvorlage.GetItemText ( i+2 )
- end if
- next i
- Kontext
- Active.SetPage TabPositionKapitelnumerierung
- Kontext "TabPositionKapitelnumerierung"
-
- Level.Select 1
- NumberAlignment.Select 2
- if relativ.IsEnabled then Warnlog "'Relative' is enabled when selecting 'Level 1' -> Bug"
- IndentAt.More 5
- V1 = IndentAt.GetText
- AlignedAt.More 1
- V2 = AlignedAt.GetText
-
- Level.Select 3
- NumberAlignment.Select 3
- Relativ.Check
- IndentAt.Less 5
- V3 = IndentAt.GetText
- AbstandTextNumerierung.More 2
- V4 = AbstandTextNumerierung.GetText
-
- Level.Select 4
- NumberAlignment.Select 1
- Relativ.Check
- V5 = IndentAt.GetText
- V6 = AbstandTextNumerierung.GetText
- V7 = AlignedAt.GetText
-
- Level.Select 6
- NumberAlignment.Select 3
- Relativ.Check
- IndentAt.More 4
- V8 = IndentAt.GetText
- AbstandTextNumerierung.Less 3
- V9 = AbstandTextNumerierung.GetText
- AlignedAt.Less 3
- V10 = AlignedAt.GetText
-
- Level.Select 9
- NumberAlignment.Select 1
- Relativ.Check
- IndentAt.Less 2
- V11 = IndentAt.GetText
- AbstandTextNumerierung.More 2
- V12 = AbstandTextNumerierung.GetText
- AlignedAt.More 3
- V13 = AlignedAt.GetText
-
- Level.Select 10
- NumberAlignment.Select 3
- Relativ.Check
- IndentAt.More 4
- V14 = IndentAt.GetText
- AbstandTextNumerierung.Less 3
- V15 = AbstandTextNumerierung.GetText
- AlignedAt.Less 3
- V16 = AlignedAt.GetText
- TabPositionKapitelnumerierung.OK
-
- printlog " - create Numbering"
- for i = 1 to 10
- call wTypeKeys "<Shift End>"
- if wStyleSet ( VorlagenLst(i) ) = false then
- Warnlog "- Style '" & VorlagenLst(i) & "' could not be set!"
- end if
- call wTypeKeys "<Down>", 8
- call wTypeKeys "<Home>"
- next i
-
- printlog " - check Numbering-Position"
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabPositionKapitelnumerierung
- Kontext "TabPositionKapitelnumerierung"
- Level.Select 1
- if NumberAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberAlignment.GetSelIndex
- if V1 <> IndentAt.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ IndentAt.GetText
- if V2 <> AlignedAt.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ AlignedAt.GetText
- Level.Select 3
- if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
- if V3 <> IndentAt.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ IndentAt.GetText
- if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Minimum Space numbering <> Text Not = "+ V4+ " But = "+ AbstandTextNumerierung.GetText
- Level.Select 4
- if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 4: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
- if V5 <> IndentAt.GetText then Warnlog "Level 4: Wrong Indent: Not = "+ V5+ " But = "+ IndentAt.GetText
- if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Minimum Space numbering <> Text Not = "+ V6+ " But = "+ AbstandTextNumerierung.GetText
- if V7 <> AlignedAt.GetText then Warnlog "Level 4: Space to Text Not = "+ V7+ " But = "+ AlignedAt.GetText
- Level.Select 6
- if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 6: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
- if V8 <> IndentAt.GetText then Warnlog "Level 6: Wrong Indent: Not = "+ V8+ " But = "+ IndentAt.GetText
- if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Minimum Space numbering <> Text Not = "+ V9+ " But = "+ AbstandTextNumerierung.GetText
- if V10 <> AlignedAt.GetText then Warnlog "Level 6: Space to Text Not = "+ V10+ " But = "+ AlignedAt.GetText
- Level.Select 9
- if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
- if V11 <> IndentAt.GetText then Warnlog "Level 9: Wrong Indent: Not = "+ V11+ " But = "+ IndentAt.GetText
- if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Minimum Space numbering <> Text Not = "+ V12+ " But = "+ AbstandTextNumerierung.GetText
- if V13 <> AlignedAt.GetText then Warnlog "Level 9: Space to Text Not = "+ V13+ " But = "+ AlignedAt.GetText
- Level.Select 10
- if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
- if V14 <> IndentAt.GetText then Warnlog "Level 10: Wrong Indent: Not = "+ V14+ " But = "+ IndentAt.GetText
- if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Minimum Space numbering <> Text Not = "+ V15+ " But = "+ AbstandTextNumerierung.GetText
- if V16 <> AlignedAt.GetText then Warnlog "Level 10: Space to Text Not = "+ V16+ " But = "+ AlignedAt.GetText
- TabPositionKapitelnumerierung.Cancel
-
- printlog " - check saved Numbering"
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsOutlineNumbering2.odt", "writer8" )
- Call hCloseDocument
- hFileOpen( gOfficePath & "user\work\tToolsOutlineNumbering2.odt" )
-
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabPositionKapitelnumerierung
- Kontext "TabPositionKapitelnumerierung"
- Level.Select 1
- if NumberAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberAlignment.GetSelIndex
- if V1 <> IndentAt.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ IndentAt.GetText
- if V2 <> AlignedAt.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ AlignedAt.GetText
- Level.Select 3
- if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
- if V3 <> IndentAt.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ IndentAt.GetText
- if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Minimum Space numbering <> Text Not = "+ V4+ " But = "+ AbstandTextNumerierung.GetText
- Level.Select 4
- if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 4: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
- if V5 <> IndentAt.GetText then Warnlog "Level 4: Wrong Indent: Not = "+ V5+ " But = "+ IndentAt.GetText
- if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Minimum Space numbering <> Text Not = "+ V6+ " But = "+ AbstandTextNumerierung.GetText
- if V7 <> AlignedAt.GetText then Warnlog "Level 4: Space to Text Not = "+ V7+ " But = "+ AlignedAt.GetText
- Level.Select 6
- if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 6: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
- if V8 <> IndentAt.GetText then Warnlog "Level 6: Wrong Indent: Not = "+ V8+ " But = "+ IndentAt.GetText
- if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Minimum Space numbering <> Text Not = "+ V9+ " But = "+ AbstandTextNumerierung.GetText
- if V10 <> AlignedAt.GetText then Warnlog "Level 6: Space to Text Not = "+ V10+ " But = "+ AlignedAt.GetText
- Level.Select 9
- if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
- if V11 <> IndentAt.GetText then Warnlog "Level 9: Wrong Indent: Not = "+ V11+ " But = "+ IndentAt.GetText
- if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Minimum Space numbering <> Text Not = "+ V12+ " But = "+ AbstandTextNumerierung.GetText
- if V13 <> AlignedAt.GetText then Warnlog "Level 9: Space to Text Not = "+ V13+ " But = "+ AlignedAt.GetText
- Level.Select 10
- if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
- if V14 <> IndentAt.GetText then Warnlog "Level 10: Wrong Indent: Not = "+ V14+ " But = "+ IndentAt.GetText
- if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Minimum Space numbering <> Text Not = "+ V15+ " But = "+ AbstandTextNumerierung.GetText
- if V16 <> AlignedAt.GetText then Warnlog "Level 10: Space to Text Not = "+ V16+ " But = "+ AlignedAt.GetText
- TabPositionKapitelnumerierung.Cancel
-
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsOutlineNumbering3
- Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
-
- PrintLog "- Tools / Outline Numbering: Part 3 - Total"
-
- Call hNewDocument
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
-
- PrintLog " - Same Formatting from 1-10"
- Ebene.Select 11
- if Absatzvorlage.IsEnabled then Warnlog "Able to adjust Paragraph Style for all Levels -> Bug"
- Nummer.Select 4
- Davor.SetText "HoHo "
- Dahinter.SetText " HiHi "
- BeginBei.SetText "4"
-
- Ebene.Select 1
- Nummer.Select 3
- Davor.SetText "Anders 1 "
- Dahinter.SetText " 1 Anders"
- BeginBei.SetText "1"
-
- Ebene.Select 5
- Nummer.Select 2
- Davor.SetText "Anders 5 "
- Dahinter.SetText " 5 Anders"
- BeginBei.SetText "2"
-
- Kontext
- Active.SetPage TabPositionKapitelnumerierung
- Kontext "TabPositionKapitelnumerierung"
-
- Level.Select 1
- NumberingAlignment.Select 2
- if relativ.IsEnabled then Warnlog "Relative is enabled when selecting Level 1 -> Bug!"
- AlignedAt2.More 5
- V1 = AlignedAt2.GetText
- IndentAt2.More 1
- V2 = IndentAt2.GetText
-
- Level.Select 3
- NumberingAlignment.Select 3
- AlignedAt2.More 5
- V3 = AlignedAt2.GetText
- AbstandTextNumerierung2.More 2
- V4 = AbstandTextNumerierung2.GetText
-
- Level.Select 7
- NumberingAlignment.Select 1
- IndentAt2.More 4
- Sleep 1
- V5 = AlignedAt2.GetText
- V6 = AbstandTextNumerierung2.GetText
- V7 = IndentAt2.GetText
-
- Level.Select 8
- NumberingAlignment.Select 3
- AlignedAt2.More 1
- AbstandTextNumerierung2.Less 4
- IndentAt2.More 4
- V8 = AlignedAt2.GetText
- V9 = AbstandTextNumerierung2.GetText
- V10 = IndentAt2.GetText
-
- TabPositionKapitelnumerierung.OK
- Sleep 1
-
- PrintLog " - check the Levels"
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- printlog " - Tabpage Numbering"
- Ebene.Select 1
- if Nummer.GetSelIndex <> 3 then Warnlog "Level 1: Wrong number selected, not 3 but " + Nummer.GetSelIndex
- if Davor.GetText <> "Anders 1 " then Warnlog "Level 1:Seperator before is wrong.. Not 'Anders 1 ' But " + Davor.GetText
- if Dahinter.GetText <> " 1 Anders" then Warnlog "Level 1: Seperator after text is wrong. Not ' Anders 1' But " + Dahinter.GetText
- if BeginBei.GetText <> "1" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
-
- Ebene.Select 2
- if Nummer.GetSelIndex <> 4 then Warnlog "Level 2: Wrong number selected, not 4 but " + Nummer.GetSelIndex
- if Davor.GetText <> "HoHo " then Warnlog "Level 2:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
- if Dahinter.GetText <> " HiHi " then Warnlog "Level 2: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
- if BeginBei.GetText <> "4" then Warnlog "Level 2: Start at is not 4 but " + BeginnBei.GetText
-
- Ebene.Select 5
- if Nummer.GetSelIndex <> 2 then Warnlog "Level 5: Wrong number selected, not 2 but " + Nummer.GetSelIndex
- if Davor.GetText <> "Anders 5 " then Warnlog "Level 5:Seperator before is wrong.. Not 'Anders 5 ' But " + Davor.GetText
- if Dahinter.GetText <> " 5 Anders" then Warnlog "Level 5: Seperator after text is wrong. Not ' 5 Anders' But " + Dahinter.GetText
- if BeginBei.GetText <> "2" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
-
- Ebene.Select 7
- if Nummer.GetSelIndex <> 4 then Warnlog "Level 7: Wrong number selected, not 4 but " + Nummer.GetSelIndex
- if Davor.GetText <> "HoHo " then Warnlog "Level 7:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
- if Dahinter.GetText <> " HiHi " then Warnlog "Level 7: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
- if BeginBei.GetText <> "4" then Warnlog "Level 7: Start at is not 4 but " + BeginnBei.GetText
-
- Ebene.Select 11
- if Nummer.GetSelIndex <> 0 then Warnlog "Level 1-10: Setting for 'Number' is not 'keine Selektion' but " + Nummer.GetSelIndex
- if Davor.GetText <> "" then Warnlog "Level 1-10: Seperator before is not 'keine Selektion' but " + Davor.GetText
- if Dahinter.GetText <> "" then Warnlog "Level 1-10: Seperator after is not 'keine Selektion' but " + Dahinter.GetText
- if BeginBei.GetText <> "" then Warnlog "Level 1-10: Start at is not 'keine Selektion' but " + BeginBei.GetText
-
- Kontext
- Active.SetPage TabPositionKapitelnumerierung
- Kontext "TabPositionKapitelnumerierung"
- printlog " - Tabpage Position"
- Level.Select 1
- if NumberingAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberingAlignment.GetSelIndex
- if V1 <> AlignedAt2.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ AlignedAt2.GetText
- if V2 <> IndentAt2.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ IndentAt2.GetText
- Level.Select 3
- if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
- if V3 <> AlignedAt2.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ AlignedAt2.GetText
- if V4 <> AbstandTextNumerierung2.GetText then Warnlog "Level 3: Space to Text Not = "+ V4+ " But = "+ AbstandTextNumerierung2.GetText
- Level.Select 7
- if NumberingAlignment.GetSelIndex <> 1 then Warnlog "Level 7: Wrong Numbering Alignment: Not = 1 But = "+ NumberingAlignment.GetSelIndex
- if V5 <> AlignedAt2.GetText then Warnlog "Level 7: Wrong Indent: Not = "+ V5+ " But = "+ AlignedAt2.GetText
- if V6 <> AbstandTextNumerierung2.GetText then Warnlog "Level 7: Space to Text Not = "+ V6+ " But = "+ AbstandTextNumerierung2.GetText
- if V7 <> IndentAt2.GetText then Warnlog "Level 7: Space to Text Not = "+ V7+ " But = "+ IndentAt2.GetText
- Level.Select 8
- if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 8: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
- if V8 <> AlignedAt2.GetText then Warnlog "Level 8: Wrong Indent: Not = "+ V8+ " But = "+ AlignedAt2.GetText
- if V9 <> AbstandTextNumerierung2.GetText then Warnlog "Level 8: Space to Text Not = "+ V9+ " But = "+ AbstandTextNumerierung2.GetText
- if V10 <> IndentAt2.GetText then Warnlog "Level 8: Space to Text Not = "+ V10+ " But = "+ IndentAt2.GetText
-
- TabPositionKapitelnumerierung.Cancel
-
- printlog " - check saved Numbering"
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsOutlineNumbering3.odt", "writer8" )
- Call hCloseDocument
- hFileOpen( gOfficePath & "user\work\tToolsOutlineNumbering3.odt" )
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- printlog " - Tabpage Numbering"
- Ebene.Select 1
- if Nummer.GetSelIndex <> 3 then Warnlog "Level 1: Wrong number selected, not 3 but " + Nummer.GetSelIndex
- if Davor.GetText <> "Anders 1 " then Warnlog "Level 1:Seperator before is wrong.. Not 'Anders 1 ' But " + Davor.GetText
- if Dahinter.GetText <> " 1 Anders" then Warnlog "Level 1: Seperator after text is wrong. Not ' Anders 1' But " + Dahinter.GetText
- if BeginBei.GetText <> "1" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
-
- Ebene.Select 2
- if Nummer.GetSelIndex <> 4 then Warnlog "Level 2: Wrong number selected, not 4 but " + Nummer.GetSelIndex
- if Davor.GetText <> "HoHo " then Warnlog "Level 2:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
- if Dahinter.GetText <> " HiHi " then Warnlog "Level 2: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
- if BeginBei.GetText <> "4" then Warnlog "Level 2: Start at is not 4 but " + BeginnBei.GetText
-
- Ebene.Select 5
- if Nummer.GetSelIndex <> 2 then Warnlog "Level 5: Wrong number selected, not 2 but " + Nummer.GetSelIndex
- if Davor.GetText <> "Anders 5 " then Warnlog "Level 5:Seperator before is wrong.. Not 'Anders 5 ' But " + Davor.GetText
- if Dahinter.GetText <> " 5 Anders" then Warnlog "Level 5: Seperator after text is wrong. Not ' 5 Anders' But " + Dahinter.GetText
- if BeginBei.GetText <> "2" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
-
- Ebene.Select 7
- if Nummer.GetSelIndex <> 4 then Warnlog "Level 7: Wrong number selected, not 4 but " + Nummer.GetSelIndex
- if Davor.GetText <> "HoHo " then Warnlog "Level 7:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
- if Dahinter.GetText <> " HiHi " then Warnlog "Level 7: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
- if BeginBei.GetText <> "4" then Warnlog "Level 7: Start at is not 4 but " + BeginnBei.GetText
-
- Ebene.Select 11
- if Nummer.GetSelIndex <> 0 then Warnlog "Level 1-10: Setting for 'Number' is not 'keine Selektion' but " + Nummer.GetSelIndex
- if Davor.GetText <> "" then Warnlog "Level 1-10: Seperator before is not 'keine Selektion' but " + Davor.GetText
- if Dahinter.GetText <> "" then Warnlog "Level 1-10: Seperator after is not 'keine Selektion' but " + Dahinter.GetText
- if BeginBei.GetText <> "" then Warnlog "Level 1-10: Start at is not 'keine Selektion' but " + BeginBei.GetText
-
- Kontext
- Active.SetPage TabPositionKapitelnumerierung
- Kontext "TabPositionKapitelnumerierung"
- printlog " - Tabpage Position"
- Level.Select 1
- if NumberingAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberingAlignment.GetSelIndex
- if V1 <> AlignedAt2.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ AlignedAt2.GetText
- if V2 <> IndentAt2.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ IndentAt2.GetText
- Level.Select 3
- if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
- if V3 <> AlignedAt2.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ AlignedAt2.GetText
- if V4 <> AbstandTextNumerierung2.GetText then Warnlog "Level 3: Space to Text Not = "+ V4+ " But = "+ AbstandTextNumerierung2.GetText
- Level.Select 7
- if NumberingAlignment.GetSelIndex <> 1 then Warnlog "Level 7: Wrong Numbering Alignment: Not = 1 But = "+ NumberingAlignment.GetSelIndex
- if V5 <> AlignedAt2.GetText then Warnlog "Level 7: Wrong Indent: Not = "+ V5+ " But = "+ AlignedAt2.GetText
- if V6 <> AbstandTextNumerierung2.GetText then Warnlog "Level 7: Space to Text Not = "+ V6+ " But = "+ AbstandTextNumerierung2.GetText
- if V7 <> IndentAt2.GetText then Warnlog "Level 7: Space to Text Not = "+ V7+ " But = "+ IndentAt2.GetText
- Level.Select 8
- if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 8: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
- if V8 <> AlignedAt2.GetText then Warnlog "Level 8: Wrong Indent: Not = "+ V8+ " But = "+ AlignedAt2.GetText
- if V9 <> AbstandTextNumerierung2.GetText then Warnlog "Level 8: Space to Text Not = "+ V9+ " But = "+ AbstandTextNumerierung2.GetText
- if V10 <> IndentAt2.GetText then Warnlog "Level 8: Space to Text Not = "+ V10+ " But = "+ IndentAt2.GetText
-
- TabPositionKapitelnumerierung.Cancel
-
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsFootnoteEndnote
- PrintLog "- Tools / Format Footnote- and Endnote"
-
- Call hNewDocument
- ToolsFootnote
- Printlog " - adjust Footnote-properties"
- Kontext
- Active.SetPage TabFussnoten
- Kontext "TabFussnoten"
- Numerierung.Select 2
- Pro.Select 1
- if BeginnBei.IsEnabled then Warnlog "On Numbering 'per page' 'Start at' is active. Bug!"
- Pro.Select 2
- if BeginnBei.IsEnabled then Warnlog "On Numbering 'per Chaper' 'Start at' is active. Bug!"
- Pro.Select 3
- BeginnBei.SetText "3"
- Davor.SetText "Vorher "
- Dahinter.SetText " Hinterher"
- Absatz.Select 4
- ZeichenvorlageTextbereich.Select 1
- ZeichenvorlageFussnotenbereich.Select 1
- SeitenEnde.Check
- FolgeSeite.SetText "Aha"
- Beginn.SetText "oHo"
-
- Printlog " - adjust Endnote-properties"
- Kontext
- Active.SetPage TabEndnoten
- Kontext "TabEndnoten"
- Numerierung.Select 1
- BeginnBei.SetText "8"
- Absatz.Select 3
- Seite.Select 2
- Davor.SetText "Hihi "
- Dahinter.SetText " HaHa"
- ZeichenvorlageTextbereich.Select 4
- ZeichenvorlageEndnotenbereich.Select 5
- TabEndnoten.OK
-
- call wTypeKeys "Footnote bound to this text"
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- Fussnote.Check
- FussnoteEinfuegen.OK
-
- call wTypeKeys "Wassup<PageUp><Return>Followed by an endnote."
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- Endnote.Check
- FussnoteEinfuegen.OK
-
- call wTypeKeys "Wassup<PageUp><Return>And again a footnote"
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- Fussnote.Check
- FussnoteEinfuegen.OK
- InsertFieldsPageNumbers
- call wTypeKeys "+0"
- call wTypeKeys "<Shift Home>"
- Sleep 1
- try
- ToolsCalculate
- catch
- ' Workaround for bug.
- call wTypeKeys "<End>"
- call wTypeKeys "<Shift Home>"
- try
- ToolsCalculate
- Warnlog "Selecting text in footnote with <Shift Home> works only at the second time (bug#101047)"
- catch
- Warnlog "Tools/Calculate is disabled!"
- endcatch
- endcatch
- if GetClipboardText <> "1" then Warnlog "2. Footnote has not been inserted on 1. Page."
-
- call wTypeKeys "<PageUp><Return>Again followed by an endnote"
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- Endnote.Check
- FussnoteEinfuegen.OK
- InsertFieldsPageNumbers
- call wTypeKeys "+0"
- call wTypeKeys "<Shift Home>"
- Sleep 1
- try
- ToolsCalculate
- catch
- ' Workaround for bug.
- call wTypeKeys "<End>"
- call wTypeKeys "<Shift Home>"
- try
- ToolsCalculate
- catch
- Warnlog "Tools/Calculate is disabled!"
- endcatch
- endcatch
- Sleep 1
- ToolsCalculate
- if GetClipboardText <> "2" then Warnlog "2. Footnote has not been inserted on 2. page"
-
- call wTypeKeys "<PageUp><Return>That's it!"
-
- printlog " - check properties"
- ToolsFootnote
- Kontext
- Active.SetPage TabFussnoten
- Kontext "TabFussnoten"
- if Numerierung.GetSelIndex <> 2 then Warnlog "Footnote: Numbering not the 2. entry selected, but " + Numerierung.GetSelIndex
- if Pro.GetSelIndex <> 3 then Warnlog "Footnote: 'Per document (3. entry) is not selected but " + Pro.GetSelIndex
- if BeginnBei.GetText <> "3" then Warnlog "Footnote: Start at is not 3 but " + BeginnBei.GetText
- if Davor.GetText <> "Vorher " then Warnlog "Footnote: Text 'Before' is wrong. Not 'Vorher ' but " + Davor.GetText
- if Dahinter.GetText <> " Hinterher" then Warnlog "Footnote: Text 'After' is wrong. Not ' Hinterher' but " + Dahinter.GetText
- if Absatz.GetSelIndex <> 4 then Warnlog "Footnote: Wrong entry selected in paragraph. Not 4 but " + Absatz.GetSelIndex
- if ZeichenvorlageTextbereich.GetSelIndex <> 1 then Warnlog "Footnote: Text area has been changed!"
- if ZeichenvorlageFussnotenbereich.GetSelIndex <> 1 then Warnlog "Footnote: Footnote area has been changed!"
- if NOT SeitenEnde.IsChecked then Warnlog "Footnote: End of page is not checked anymore."
- if FolgeSeite.GetText <> "Aha" then Warnlog "Footnote: End of footnote is not 'Aha' but " + FolgeSeite.GetText
- if Beginn.GetText <> "oHo" then Warnlog "Footnote: Start of next page is not 'oHo' but " + Beginn.GetText
-
- Kontext
- Active.SetPage TabEndnoten
- Kontext "TabEndnoten"
- if Numerierung.GetSelIndex <> 1 then Warnlog "Endnote: Numbering not 1. entry but " + Numerierung.GetSelIndex
- if BeginnBei.GetText <> "8" then Warnlog "Endnote: Strat at is not 8 but " + BeginnBei.GetText
- if Davor.GetText <> "Hihi " then Warnlog "Endnote: 'Before' is wrong. Not 'Hihi ' but " + Davor.GetText
- if Dahinter.GetText <> " HaHa" then Warnlog "Endnote: Text after is wrong. Not ' HaHa' but " + Dahinter.GetText
- if Absatz.GetSelIndex <> 3 then Warnlog "Endnote: Wrong entry selected in paragraph. Not 3 but " + Absatz.GetSelIndex
- if Seite.GetSelIndex <> 2 then Warnlog "Endnote: Wrong Page entry selected. Not 2 but " + Seite.GetSelIndex
- if ZeichenvorlageTextbereich.GetSelIndex <> 4 then Warnlog "Endnote: Text area has been changed!"
- if ZeichenvorlageEndnotenbereich.GetSelIndex <> 5 then Warnlog "Endnote: Endnote area has been changed!"
-
- TabEndnoten.Cancel
-
- printlog " - Save and reload"
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsFootnoteEndnote.odt", "writer8" )
- Call hCloseDocument
- hFileOpen( gOfficePath & "user\work\tToolsFootnoteEndnote.odt" )
- printlog " - check saved properties"
- ToolsFootnote
- Kontext
- Active.SetPage TabFussnoten
- Kontext "TabFussnoten"
- if Numerierung.GetSelIndex <> 2 then Warnlog "Footnote: Numbering not the 2. entry selected, but " + Numerierung.GetSelIndex
- if Pro.GetSelIndex <> 3 then Warnlog "Footnote: 'Per document (3. entry) is not selected but " + Pro.GetSelIndex
- if BeginnBei.GetText <> "3" then Warnlog "Footnote: Start at is not 3 but " + BeginnBei.GetText
- if Davor.GetText <> "Vorher " then Warnlog "Footnote: Text 'Before' is wrong. Not 'Vorher ' but " + Davor.GetText
- if Dahinter.GetText <> " Hinterher" then Warnlog "Footnote: Text 'After' is wrong. Not ' Hinterher' but " + Dahinter.GetText
- if Absatz.GetSelIndex <> 4 then Warnlog "Footnote: Wrong entry selected in paragraph. Not 4 but " + Absatz.GetSelIndex
- if ZeichenvorlageTextbereich.GetSelIndex <> 1 then Warnlog "Footnote: Text area has been changed!"
- if ZeichenvorlageFussnotenbereich.GetSelIndex <> 1 then Warnlog "Footnote: Footnote area has been changed!"
- if NOT SeitenEnde.IsChecked then Warnlog "Footnote: End of page is not checked anymore."
- if FolgeSeite.GetText <> "Aha" then Warnlog "Footnote: End of footnote is not 'Aha' but " + FolgeSeite.GetText
- if Beginn.GetText <> "oHo" then Warnlog "Footnote: Start of next page is not 'oHo' but " + Beginn.GetText
-
- Kontext
- Active.SetPage TabEndnoten
- Kontext "TabEndnoten"
- if Numerierung.GetSelIndex <> 1 then Warnlog "Endnote: Numbering not 1. entry but " + Numerierung.GetSelIndex
- if BeginnBei.GetText <> "8" then Warnlog "Endnote: Strat at is not 8 but " + BeginnBei.GetText
- if Davor.GetText <> "Hihi " then Warnlog "Endnote: 'Before' is wrong. Not 'Hihi ' but " + Davor.GetText
- if Dahinter.GetText <> " HaHa" then Warnlog "Endnote: Text after is wrong. Not ' HaHa' but " + Dahinter.GetText
- if Absatz.GetSelIndex <> 3 then Warnlog "Endnote: Wrong entry selected in paragraph. Not 3 but " + Absatz.GetSelIndex
- if Seite.GetSelIndex <> 2 then Warnlog "Endnote: Wrong Page entry selected. Not 2 but " + Seite.GetSelIndex
- if ZeichenvorlageTextbereich.GetSelIndex <> 4 then Warnlog "Endnote: Text area has been changed!"
- if ZeichenvorlageEndnotenbereich.GetSelIndex <> 5 then Warnlog "Endnote: Endnote area has been changed!"
- TabEndnoten.Cancel
-
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/number/w_206_.inc b/testautomation/writer/optional/includes/number/w_206_.inc
deleted file mode 100644
index 92958c2d9b18..000000000000
--- a/testautomation/writer/optional/includes/number/w_206_.inc
+++ /dev/null
@@ -1,726 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Testing Number and Bullets
-'*
-'\***********************************************************************
-
-sub w_206_
-
- Call tToolsNumbering1
- Call tToolsNumbering2
- Call tToolsNumbering3
- Call tToolsNumbering4
- Call tToolsNumbering5
- Call tToolsNumbering6
- Call tToolsNumbering7
- Call tToolsNumbering8
- Call tToolsNumbering9
- Call tToolsNumbering10
- Call tToolsNumbering11
-
-end sub
-
-testcase tToolsNumbering1
- printlog "Create a simple numbering without selection"
- '/// Create a simple numbering without selection
- Dim i as integer
-
- '/// Open a new text document
- Call hNewDocument
-
- '/// Activate Numbering/Bullets via Objectbar
- Call hToolbarSelect("BulletsAndNumbering", true)
-
- '/// Create a numbering
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then
- Warnlog "Numbering/Bullets objectbar not accessible"
- Call hCloseDocument
- goto endsub
- end if
-
- NumberingOnOff.Click
- For i = 1 to 5
- call wTypeKeys ( "Numbering Level " & i )
- call wTypeKeys ( "<RETURN>" )
- next i
-
- '/// Check if numbering has been created
- For i = 1 to 5
- call wTypeKeys ( "<UP>" )
- if hIsNumberingBullets() = false then
- Warnlog "Seems numbering has not been completely created"
- end if
- next i
-
- '/// CloseDocument
- Call hCloseDocument
-
-endcase
-
-testcase tToolsNumbering2
- printlog "Create simple bullets without selection"
- '/// Create simple bullets without selection
- Dim i as integer
-
- '/// Open a new text document
- Call hNewDocument
-
- '/// Activate Numbering/Bullets via Objectbar
- Call hToolbarSelect("BulletsAndNumbering", true)
-
- '/// Create bullets
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then
- Warnlog "Numbering/Bullets objectbar not accessible"
- Call hCloseDocument
- goto endsub
- end if
-
- BulletsOnOff.Click
- For i = 1 to 5
- call wTypeKeys ( "Numbering Level " & i )
- call wTypeKeys ( "<RETURN>" )
- next i
-
- '/// Check if numbering has been created
- For i = 1 to 5
- call wTypeKeys ( "<UP>" )
- if hIsNumberingBullets() = false then
- Warnlog "Seems numbering has not been completely created"
- end if
- next i
-
- '/// CloseDocument
- Call hCloseDocument
-
-endcase
-
-
-testcase tToolsNumbering3
- printlog "Turn several selected paragraphs into numbering"
- '/// Turn several selected paragraphs into numbering
- Dim i as integer
-
- '/// Open a new text document
- Call hNewDocument
-
- '/// Insert autotext 'Dummy text' 3 times
- for i = 1 to 3
- Call wBlindtextEinfuegen
- next i
-
- '/// Point cursor to beginning of document
- call wTypeKeys ( "<Mod1 Home>" )
- '/// Select all text inserted
- call wTypeKeys ( "<Mod1 A>" )
-
- '/// Activate Numbering/Bullets via Objectbar
- Call hToolbarSelect("BulletsAndNumbering", true)
-
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then
- Warnlog "Numbering/Bullets objectbar not accessible"
- Call hCloseDocument
- goto endsub
- end if
-
- NumberingOnOff.Click
- '/// Check if numbering has been created
- call wTypeKeys ( "<Mod1 Home>" )
-
- For i = 1 to 2
- if hIsNumberingBullets() = false then
- Warnlog "Seems numbering has not been completely created"
- end if
- call wTypeKeys ( "<Mod1 Down>" )
- next i
-
- '/// CloseDocument
- Call hCloseDocument
-
-endcase
-
-
-testcase tToolsNumbering4
- printlog "Turn several selected paragraphs into bullets"
- '/// Turn several selected paragraphs into bullets
- Dim i as integer
-
- '/// Open a new text document
- Call hNewDocument
-
- '/// Insert autotext 'Dummy text' 3 times
- for i = 1 to 3
- Call wBlindtextEinfuegen
- next i
-
- '/// Point cursor to beginning of document
- call wTypeKeys ( "<Mod1 Home>" )
- '/// Select all text inserted
- call wTypeKeys ( "<Mod1 A>" )
-
- '/// Activate Numbering/Bullets via Objectbar
- Call hToolbarSelect("BulletsAndNumbering", true)
-
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then
- Warnlog "Numbering/Bullets objectbar not accessible"
- Call hCloseDocument
- goto endsub
- end if
-
- BulletsOnOff.Click
- '/// Check if numbering has been created
- call wTypeKeys ( "<Mod1 Home>" )
-
- For i = 1 to 2
- if hIsNumberingBullets() = false then
- Warnlog "Seems bullets have not been completely created"
- end if
- call wTypeKeys ( "<Mod1 Down>" )
- next i
-
- '/// CloseDocument
- Call hCloseDocument
-
-endcase
-
-
-testcase tToolsNumbering5
- printlog "create numbering via autoformat"
- '/// create numbering via autoformat
- Dim i as integer, sClipBrd() as string
-
- For i = 1 to 8
- '/// Open a new text document
- Call hNewDocument
-
- '/// Insert '1.' // 'I.' // 'a.' followed by text
- Select Case i
- Case 1
- printlog "- Enter numbering starting with 1)"
- call wTypeKeys ( "1) " )
- Case 2
- call wTypeKeys ( "1. " )
- printlog "- Enter numbering starting with 1."
- Case 3
- call wTypeKeys ( "(1) " )
- printlog "- Enter numbering starting with (1)"
- Case 4
- call wTypeKeys ( "I. " )
- printlog "- Enter numbering starting with I."
- Case 5
- call wTypeKeys ( "i. " )
- printlog "- Enter numbering starting with i."
- Case 6
- call wTypeKeys ( "A) " )
- printlog "- Enter numbering starting with A)"
- Case 7
- call wTypeKeys ( "a) " )
- printlog "- Enter numbering starting with a)"
- Case 8
- call wTypeKeys ( "(a) " )
- printlog "- Enter numbering starting with (a)"
- end select
-
- '/// + 'my new numbering'
- '/// + followed by return (creats the numbering)
- '/// + followed by text 'my newer numbering'
- call wTypeKeys "my new numbering<Return>"
- call wTypeKeys "my newer numbering"
-
- '/// check if numbering has been created
- call wTypeKeys ( "<MOD1 A>" )
- EditCopy
- Select Case gPlatGroup
- Case "unx"
- sClipBrd() = Split (GetClipboardText, CHR$(10))
- Case else
- sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
- end select
- if Ubound(sClipBrd()) = 1 then
- Select Case i
- Case 1
- if Left$(sClipBrd(1), 2) <> "2)" then
- Warnlog "Seems numbering 1) has not been correctly created"
- end if
- Case 2
- if Left$(sClipBrd(1), 2) <> "2." then
- Warnlog "Seems numbering 1. has not been correctly created"
- end if
- Case 3
- if Left$(sClipBrd(1), 3) <> "(2)" then
- Warnlog "Seems numbering (1) has not been correctly created"
- end if
- Case 4
- if Left$(sClipBrd(1), 3) <> "II." then
- Warnlog "Seems numbering I. has not been correctly created"
- end if
- Case 5
- if Left$(sClipBrd(1), 3) <> "ii." then
- QaErrorLog "#i78524#Auto-capitalisation of letter i hinders Automatic numbering" 'Warnlog "Seems numbering i. has not been correctly created"
- end if
- Case 6
- if Left$(sClipBrd(1), 2) <> "B)" then
- QaErrorLog "#i71136# - Autocorrect won't start numbering by 'A)'" 'warnlog "Seems numbering A) has not been correctly created"
- end if
- Case 7
- if Left$(sClipBrd(1), 2) <> "b)" then
- QaErrorLog "#i71136# - Autocorrect won't start numbering by 'a)'" 'warnlog "Seems numbering a) has not been correctly created"
- end if
- Case 8
- if Left$(sClipBrd(1), 2) <> "(b)" then
- QaErrorLog "#i71136# - Autocorrect won't start numbering by '(a)'" 'warnlog "Seems numbering (a) has not been correctly created"
- end if
- end select
- else
- Warnlog "Error in clipboard content! " & Ubound(sClipBrd())
- end if
-
- '/// CloseDocument
- Call hCloseDocument
- next i
-
-endcase
-
-
-testcase tToolsNumbering6
- printlog "Remove numbering from paragraph by pressing <DEL> key (normal numbering)"
- Dim j as integer
- Dim i as integer, sClipBrd() as string
-
- '/// Remove numbering from paragraph by pressing "DEL" key (normal numbering)
- '/// Open a new text document
- Call hNewDocument
- '/// Insert some text '1. This is the first' followed by a return
- call wTypeKeys ( "1. This is the first<Return>" )
- '/// Insert some text 'This is the second' followed by a return
- call wTypeKeys ( "This is the second<Return>" )
- '/// Insert some text 'This is the third'
- call wTypeKeys ( "This is the third" )
-
- '/// Press key <STRG HOME> to go to first
- call wTypeKeys ( "<MOD1 Home>" )
- '/// Press <HOME> to highlight numbering
- call wTypeKeys ( "<Home>" )
- '/// Press <DELETE> to remove first paragraph numbering
- call wTypeKeys ( "<DELETE>" )
- '/// Check if numbering of the following paragraphs has been adapted even after save and reload
- For j = 1 to 2
- if j = 2 then
- '/// Save document
- Call hFileSaveAsKill ( gOfficepath & "user\work\tToolsNumbering6.odt" )
- '/// Close and reload document
- Call hCloseDocument
- hFileOpen( gOfficepath & "user\work\tToolsNumbering6.odt" )
- end if
- call wTypeKeys ( "<MOD1 A>" )
- EditCopy
- Select Case gPlatGroup
- Case "unx"
- sClipBrd() = Split (GetClipboardText, CHR$(10))
- Case else
- sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
- end select
-
- For i = 1 to 3
- Select Case i
- Case 1
- if sClipBrd(0) <> "This is the first" then
- Warnlog "First paragraph not 'This is the first' but: " & sClipBrd(0)
- end if
- Case 2
- if sClipBrd(1) <> "1. This is the second" then
- Warnlog "First paragraph not '1.This is the second' but: " & sClipBrd(1)
- end if
- Case 3
- if sClipBrd(2) <> "2. This is the third" then
- Warnlog "First paragraph not '2.This is the third' but: " & sClipBrd(2)
- end if
- end select
- next i
- next j
- '/// Close document
- Call hCloseDocument
-
-endcase
-
-
-testcase tToolsNumbering7
- printlog "Remove numbering from paragraph by pressing <DEL> key (outlined numbering)"
- Dim j as integer, sVorlage as string
- Dim i as integer, sClipBrd() as string
- '/// Remove numbering from paragraph by pressing "DEL" key (outlined numbering)
- '/// Open a new text document
- Call hNewDocument
- '/// Tools / Outline Numbering
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- sVorlage = Absatzvorlage.GetSelText
- '/// Select as Numbering Number 1 in list
- Nummer.Select 2
- '/// Set as Seperator (After) a `.`
- Dahinter.Settext "."
- '/// Close 'Outline Numbering' dialog
- TabKapitelnumerierung.Ok
-
- ' Numbering of outlines will not be copied to clipboard
- ' so we use the Field 'Chapter' which does
- for i = 1 to 3
- InsertFieldsOther
- Kontext
- Active.Setpage TabDokumentFeldbefehle
- Kontext "TabDokumentFeldbefehle"
- try
- Feldtyp.Select fGetType("Chapter")
- wait 500
- Select Case iSprache
- Case 7 :Formatliste.Select 3 'Chapternumber
- Case 34 :Formatliste.Select 3 'Chapternumber
- Case else :Formatliste.Select 2 'Chapternumber
- end select
- catch
- Warnlog "Unable to select field 'chapter'"
- TabDokumentFeldbefehle.Close
- Call hCloseDocument
- goto endsub
- endcatch
- Einfuegen.Click
- TabDokumentFeldbefehle.Close
-
- Select Case i
- Case 1
- '/// Insert some text 'My first number' followed by a return
- call wTypeKeys ( "My first number<RETURN>" )
- Case 2
- '/// Insert some text 'My second number' followed by a return
- call wTypeKeys ( "My second number<RETURN>" )
- Case 3
- '/// Insert some text 'My third number'
- call wTypeKeys ( "My third number" )
- end select
- next i
- '/// Select all text
- call wTypeKeys ( "<MOD1 A>" )
- '/// Set Style 'Heading 1'
- Call wStyleSet ( sVorlage )
-
- '/// Press key <STRG HOME> to go to first
- call wTypeKeys ( "<MOD1 Home>" )
- '/// Press <HOME> to highlight numbering
- call wTypeKeys ( "<Home>" )
- '/// Press <DELETE> to remove first paragraph numbering
- call wTypeKeys ( "<DELETE>" )
- '/// Check if numbering of the following paragraphs has been adapted even after save and reload
- For j = 1 to 2
- if j = 2 then
- '/// Save document
- Call hFileSaveAsKill ( gOfficepath & "user\work\tToolsNumbering7.odt" )
- '/// Close and reload document
- Call hCloseDocument
- hFileOpen( gOfficepath & "user\work\tToolsNumbering7.odt" )
- end if
-
- call wTypeKeys ( "<MOD1 A>" )
- EditCopy
- Select Case gPlatGroup
- Case "unx"
- sClipBrd() = Split (GetClipboardText, CHR$(10))
- Case else
- sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
- end select
-
- For i = 1 to 3
- Select Case i
- Case 1
- if sClipBrd(0) <> "My first number" then
- if Left$(sClipBrd(0), 2) = "1." then
- Warnlog "Outline Numbering cannot be deleted pressing '<DELETE>' key"
- exit for
- else
- Warnlog "First paragraph not 'My first number' but: " & sClipBrd(0)
- end if
- end if
- Case 2
- if sClipBrd(1) <> "1. 1.My second number" then
- Warnlog "#128041#Second paragraph not '1. 1.My second number' but: " & sClipBrd(1)
- end if
- Case 3
- if sClipBrd(2) <> "2. 2.My third number" then
- Warnlog "#128041#Third paragraph not '2. 2.My third number' but: " & sClipBrd(2)
- end if
- end select
- next i
- next j
- '/// Close document
- Call hCloseDocument
-
-endcase
-
-
-testcase tToolsNumbering8
- printlog "Take care that numbering can be activated within tables"
- Dim i as integer
- '/// Take care that numbering can be activated within tables
- '/// Open a new text document
- Call hNewDocument
- '/// Insert a table with 6 rows and 3 columns
- TableInsertTable
- Kontext "TabelleEinfuegenWriter"
- Spalten.Settext "3"
- Zeilen.Settext "6"
- TabelleEinfuegenWriter.Ok
-
- '/// Select 2nd to 6th row in first column
- call wTypeKeys ( "<Mod1 Home>" )
- call wTypeKeys ( "<Down>" )
- call wTypeKeys ( "<Shift Down>", 4 )
-
- '/// Activate Numbering/Bullets via Objectbar
- Call hToolbarSelect("BulletsAndNumbering", true)
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then
- Warnlog "Numbering/Bullets objectbar not accessible"
- Call hCloseDocument
- goto endsub
- end if
-
- '/// Enable numbering
- NumberingOnOff.Click
- '/// Check if numbering has been created in table
- call wTypeKeys ( "<Mod1 Home>" )
- For i = 1 to 5
- if i = 1 then
- if hIsNumberingBullets() = true then
- Warnlog "Seems numbering has been created in first row"
- end if
- else
- if hIsNumberingBullets() = false then
- Warnlog "Seems numbering has not been created correctly"
- exit for
- end if
- end if
- call wTypeKeys ( "<Down>" )
- next i
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tToolsNumbering9
- Dim i as integer
- printlog "Turn off a numbered list"
- '/// Turn off a numbered list via toolbar
- '/// Open a new text docoument
- Call hNewDocument
- '/// Create a numbering
- '/// Write in document '1. This numbering' followed by a return
- call wTypeKeys "1. This numbering<Return>"
- '/// + write 'that will be automatically created' followed by a return
- call wTypeKeys "that will be automatically created<RETURN>"
- '/// + write 'and be turned off via toolbar'
- call wTypeKeys ( "and turned off via toolbar" )
- '/// Select all
- call wTypeKeys ( "<Mod1 A>" )
- '/// Activate Numbering/Bullets via Objectbar
- Call hToolbarSelect("BulletsAndNumbering", true)
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then
- Warnlog "Numbering/Bullets objectbar not accessible"
- Call hCloseDocument
- goto endsub
- end if
- '/// Turn numbering off by clicking 'Numbering' symbol
- NumberingOnOff.Click
-
- '/// Check if numbering has been turned off
- call wTypeKeys ( "<Mod1 Home>" )
- For i = 1 to 3
- call wTypeKeys ( "<Shift End>" )
- EditCopy
- Select Case i
- Case 1
- if GetClipboardtext <> "This numbering" then
- Warnlog "It seems numbering isn't turned off"
- exit for
- end if
- Case 2
- if GetClipboardtext <> "that will be automatically created" then
- Warnlog "It seems numbering isn't turned off"
- exit for
- end if
- Case 3
- if GetClipboardtext <> "and turned off via toolbar" then
- Warnlog "It seems numbering isn't turned off"
- end if
- end select
- call wTypeKeys ( "<Down><Home>" )
- next i
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tToolsNumbering10
- Dim i as integer
- printlog "Pressing <ENTER> key in an empty paragraph turns off numbering"
- '/// Press <ENTER> key in an empty paragraph turns off numbering
- '/// Open a new text docoument
- Call hNewDocument
- '/// Create a numbering
- '/// Write in document '1. This numbering' followed by a return
- call wTypeKeys "1. This numbering<Return>"
- '/// + write 'that will be automatically created' followed by a return
- call wTypeKeys "that will be automatically created<RETURN>"
- '/// + write 'and be turned off via return' followed by a return
- call wTypeKeys ( "and turned off via return<RETURN>" )
- '/// + enter <Return> to create an empty paragraph
- call wTypeKeys ( "<Return>" )
- '/// Hit <Return> again should leave a numbering with 3 paragraphs
- call wTypeKeys ( "No numbering anymore" )
- call wTypeKeys ( "<Shift Home>" )
- EditCopy
- if GetClipboardtext <> "No numbering anymore" then
- Warnlog "Seems numbering wasn't turned off !"
- else
- call wTypeKeys ( "<Mod1 Home>" )
- For i = 1 to 3
- if hIsNumberingBullets() = false then
- Warnlog "Seems numbering has been completely turned off"
- exit for
- end if
- call wTypeKeys ( "<Down>" )
- next i
- end if
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tToolsNumbering11
- Dim i as integer, sVorlage as string
- Dim sClipBrd() as string
- printlog "Create an empty heading (Ouline numbering)"
- '/// Create an empty heading (Ouline numbering)
- '/// Open a new text document
- Call hNewDocument
- ' Get name of 'Heading' (language dependent)
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- sVorlage = Absatzvorlage.GetSelText
- TabKapitelnumerierung.Cancel
-
- '/// Create a outline numbering
- ' Numbering of outlines will not be copied to clipboard
- ' so we use the Field 'Chapter' which does
- for i = 1 to 3
- InsertFieldsOther
- Kontext
- Active.Setpage TabDokumentFeldbefehle
- Kontext "TabDokumentFeldbefehle"
- try
- Feldtyp.Select fGetType("Chapter")
- wait 500
- Select Case iSprache
- Case 7 :Formatliste.Select 3 'Chapternumber
- Case else :Formatliste.Select 2 'Chapternumber
- end select
- catch
- Warnlog "Unable to select field 'chapter'"
- TabDokumentFeldbefehle.Close
- Call hCloseDocument
- goto endsub
- endcatch
- Einfuegen.Click
- TabDokumentFeldbefehle.Close
-
- Select Case i
- Case 1
- '/// Insert some text 'A new first paragraph' followed by a return
- call wTypeKeys ( "A new first paragraph<RETURN>" )
- Case 2
- '/// Insert an empty paragraph
- call wTypeKeys ( "<RETURN>" )
- Case 3
- '/// Insert some text 'A new third paragraph'
- call wTypeKeys ( "A new third paragraph" )
- end select
- next i
- '/// Select all text
- call wTypeKeys ( "<MOD1 A>" )
- '/// Set Style 'Heading 1'
- Call wStyleSet ( sVorlage )
- '/// Activate Numbering/Bullets via Objectbar
- Call hToolbarSelect("BulletsAndNumbering", true)
- '/// Create a numbering
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then
- Warnlog "Numbering/Bullets objectbar not accessible"
- Call hCloseDocument
- goto endsub
- end if
- NumberingOnOff.Click
- '/// Check if second paragraph is empty but numbered
-
- EditCopy
- Select Case gPlatGroup
- Case "unx"
- sClipBrd() = Split (GetClipboardText, CHR$(10))
- Case else
- sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
- end select
-
- For i = 1 to 3
- Select Case i
- Case 1
- if sClipBrd(0) <> "1 1A new first paragraph" then
- Warnlog "First Heading not: '1 1A new first paragraph' but: " & sClipBrd(0)
- end if
- Case 2
- if sClipBrd(1) <> "2 2" then
- Warnlog "First paragraph not '2 2' but: " & sClipBrd(1)
- end if
- Case 3
- if sClipBrd(2) <> "3 3A new third paragraph" then
- Warnlog "First paragraph not '3 3A new third paragraph' but: " & sClipBrd(2)
- end if
- end select
- next i
-
- '/// Close document
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/number/w_207_.inc b/testautomation/writer/optional/includes/number/w_207_.inc
deleted file mode 100644
index 1836987718e1..000000000000
--- a/testautomation/writer/optional/includes/number/w_207_.inc
+++ /dev/null
@@ -1,178 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Testing Number and Bullets
-'*
-'\***********************************************************************
-
-sub w_207_
-
- Call tToolsNumbering12
- Call tToolsNumbering13
-
-end sub
-
-'------------------------------------------------------------------------------------------------------------------------
-
-testcase tToolsNumbering12
-
- printlog "Import / Export Regression Test"
- '/// Import / Export Regression-Test
- Dim DocFileList( 30 ) as String, sCurrentFilter as string
- Dim sSourcePath as String, sCurrentFilterExt as string
- Dim iCurrentDocument as Integer
- Dim iDocumentType as Integer
- Dim ExportFileName as string
-
- ReDim DocFileList( 30 ) as String
-
- '/// load all documents from "sun_writer\optional\input\number\regression"
- sSourcePath = convertpath( gTesttoolPath & "writer\optional\input\number\regression\" )
- GetFileList ( sSourcePath, "*.*", DocFileList() )
- hListPrint( DocFileList(), "Files to be loaded" )
-
- printlog( "Start loading and exporting files" )
- for iCurrentDocument = 1 to ListCount ( DocFileList() )
- printlog( "File: " & DocFileList( iCurrentDocument ) )
- For iDocumentType = 1 to 3
- Select Case iDocumentType
- Case 1
- sCurrentFilter = "writer8" 'gWriterFilter
- sCurrentFilterExt = "odt" 'WriterFilterExtension(0)
- Case 2
- sCurrentFilter = "StarOffice XML (Writer)" 'hGetUIFiltername("StarOffice XML (Writer)") & " (.sxw)"
- sCurrentFilterExt = "sxw"
- Case 3
- sCurrentFilter = "StarWriter 5.0" 'StarWriter 5.0 (.sdw)
- sCurrentFilterExt = "sdw"
- end select
-
- printlog( "Open file: " & DocFileList( iCurrentDocument ) )
- hFileOpenLocally( DocFileList( iCurrentDocument ) )
-
- printlog( "Make a copy if the file is write protected" )
-
-
- printlog( "Test for unexpected dialog: Filter Selection" )
- Kontext "Filterauswahl"
- if ( Filterauswahl.Exists( 1 ) ) then
- Warnlog " - Filter Selection dialog is up !"
- Filterauswahl.Cancel
- hFileCloseAll()
- goto endsub
- endif
-
- printlog( "Test for unexpected dialog: ASCII Filter Options" )
- Kontext "AsciiFilterOptionen"
- if ( AsciiFilterOptionen.Exists() ) then
- AsciiFilterOptionen.Ok
- hFileCloseAll()
- goto endsub
- endif
-
- printlog( "Allow macro execution (if general setting permit" )
- hAllowMacroExecution()
-
- '/// check if loaded
- if ( GetDocumentCount <= 2 ) then
- ExportFileName = ConvertPath ( gOfficePath & "user\work\" & _
- DateiOhneExt(DateiExtract ( DocFileList( iCurrentDocument ) ) ) & _
- "." & sCurrentFilterExt )
- hDeleteFile( ExportFileName ) ' There should never be a reason to overwrite
-
- ' Binary export filter was removed
- if iDocumentType < 3 then
- printlog " - export as: " & ExportFileName
- Call hFileSaveAsWithFilter( ExportFileName, sCurrentFilter )
- Call hCloseDocument
-
- printlog " - load previous saved document"
- hFileOpen( ExportFileName )
- endif
-
- printlog " - close document"
- hFileCloseAll()
- else
- Warnlog " - Doc probably didn't get loaded !!!"
- end if
- next iDocumentType
- next iCurrentDocument
-
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------
-
-testcase tToolsNumbering13
-
- Dim i as integer, iCounter as integer
- '/// #i73790 Regression testing
- '/// This testcase loads a Worddocument that lost all formatting
- printlog "#i73790 regression testing"
- '/// Load document 'writer\\optional\\input\\number\\regression\\73790.doc'
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\number\regression\73790.doc" )
-
- '/// Document has Heading1-Heading3 formatted, be sure it is
- call wTypeKeys ("<Mod1 Home>")
- '/// Point cursor to top of document with <STRG HOME>
- Select Case iSprache
- case 01 : iCounter = 2
- case 03 : iCounter = 1
- case 07 : iCounter = 2
- case 31 : iCounter = 1
- case 33 : iCounter = 3
- case 34 : iCounter = 2
- case 36 : iCounter = 2
- case 39 : iCounter = 2
- case 45 : iCounter = 1
- case 46 : iCounter = 2
- case 48 : iCounter = 2
- case 49 : iCounter = 3
- case 55 : iCounter = 3
- case 81 : iCounter = 3
- case 82 : iCounter = 1
- case 86 : iCounter = 1
- case 88 : iCounter = 3
- case else : iCounter = 2
- end select
- For i = 1 to 3
- call wTypeKeys ("<Shift End>")
- '/// Select first to third entry and check it i formatted with 'Heading1','Heading2','Heading3'
- Kontext "Textobjectbar"
- if Vorlage.GetSelIndex <> ( i + iCounter ) then
- Warnlog "Heading " & i & " not " & ( i + iCounter ) & " but " & Vorlage.GetSelIndex
- end if
- call wTypeKeys ( "<Home>" )
- call wTypeKeys ( "<Down>" )
- next i
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/option/wh_o_1.inc b/testautomation/writer/optional/includes/option/wh_o_1.inc
deleted file mode 100644
index 4eb667c7dc19..000000000000
--- a/testautomation/writer/optional/includes/option/wh_o_1.inc
+++ /dev/null
@@ -1,642 +0,0 @@
-'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@oracle.com
-'*
-'* short description : HTML-Options
-'*
-'\***********************************************************************
-
-sub wh_o_1
-
- printLog Chr(13) + "--------- Options - Tools HTML - ----------"
-
- Call tToolsOptionsHTMLContent
- Call tToolsOptionsHTMLLayout 'wrn:1
- Call tToolsOptionsHTMLGrid 'wrn:4
-
-end sub
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsHTMLContent
-
- Dim bCheckboxStatus(17) as boolean
-
- printlog "tToolsOptionsHTMLContent datei erstellen zum laden"
- '/// uses "input\\writer\\optional\\options\\options1.sxw" ///
- '///+ Created Dokument with everything on ///'
- Call hNewDocument
-
- printlog "'///- Tools/Options/HTML: Content ///"
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("HTML","View")
-
- bCheckboxStatus(1) = GrafikenUndObjekte.IsChecked
- bCheckboxStatus(3) = Zeichnungen.IsChecked
- bCheckboxStatus(4) = Feldnamen.IsChecked
- bCheckboxStatus(5) = Notizen.IsChecked
-
- 'bCheckboxStatus(9) = Felder.IsChecked
-
- printlog ("'/// - all states inverting ///")
-
- if bCheckboxStatus(1) Then GrafikenUndObjekte.UnCheck Else GrafikenUndObjekte.Check
- if bCheckboxStatus(3) Then Zeichnungen.UnCheck Else Zeichnungen.Check
- if bCheckboxStatus(4) Then Feldnamen.UnCheck Else Feldnamen.Check
- if bCheckboxStatus(5) Then Notizen.UnCheck Else Notizen.Check
-
- 'if bCheckboxStatus(9) Then Felder.UnCheck Else Felder.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "HTML","View" )
-
- if ( bCheckboxStatus(1) = GrafikenUndObjekte.IsChecked ) Then WarnLog "Grafiken state changed"
- if ( bCheckboxStatus(3) = Zeichnungen.IsChecked ) Then WarnLog "Zeichnungen state changed"
- if ( bCheckboxStatus(4) = Feldnamen.IsChecked ) Then WarnLog "Feldnamen state changed"
- if ( bCheckboxStatus(5) = Notizen.IsChecked ) Then WarnLog "Notizen state changed"
-
- printlog ("'/// - all UnCheck -> o ///")
-
- GrafikenUndObjekte.UnCheck
- Zeichnungen.UnCheck
- Feldnamen.UnCheck
- Notizen.UnCheck
-
- 'Felder.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- hToolsOptions ( "HTML","View" )
-
- if GrafikenUndObjekte.IsChecked Then WarnLog "Grafiken x"
- if Zeichnungen.IsChecked Then WarnLog "Zeichnungen x"
- if Feldnamen.IsChecked Then WarnLog "Feldnamen x"
- if Notizen.IsChecked Then WarnLog "Notizen x"
-
- Printlog ("'/// - all Check -> x ///")
- GrafikenUndObjekte.Check
- Zeichnungen.Check
- Feldnamen.Check
- Notizen.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "HTML","View" )
-
- if true <> GrafikenUndObjekte.IsChecked Then WarnLog "Grafiken o"
- if True <> Zeichnungen.IsChecked Then WarnLog "Zeichnungen o"
- if True <> Feldnamen.IsChecked Then WarnLog "Feldnamen o"
- if True <> Notizen.IsChecked Then WarnLog "Notizen o"
-
- printlog ("'/// - restore states ///")
- if ( bCheckboxStatus(1) = TRUE ) Then GrafikenUndObjekte.Check Else GrafikenUndObjekte.UnCheck
- if ( bCheckboxStatus(3) = TRUE ) Then Zeichnungen.Check Else Zeichnungen.UnCheck
- if ( bCheckboxStatus(4) = TRUE ) Then Feldnamen.Check Else Feldnamen.UnCheck
- if ( bCheckboxStatus(5) = TRUE ) Then Notizen.Check Else Notizen.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsHTMLLayout
- Dim bCheckboxStatus(11) as boolean
- Dim iMasseinheit(3) as integer
- Dim iTemp(3) as integer
- '///Open "writer\\optional\\input\\options\\options1.sxw ///
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
-
-
- printlog "'///- Tools/Options/Writer: View ///"
- ToolsOptions
- Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1)
-
- bCheckboxStatus(1) = Hilfslinien.IsChecked
- bCheckboxStatus(2) = FarbigeHandles.IsChecked
- bCheckboxStatus(3) = GrosseHandles.IsChecked
- bCheckboxStatus(4) = HorizontaleBildlaufleiste.IsChecked
- bCheckboxStatus(5) = VertikaleBildlaufleiste.IsChecked
- bCheckboxStatus(10) = Lineal.IsChecked
- bCheckboxStatus(6) = HorizontalesLineal.IsChecked
- bCheckboxStatus(7) = VertikalesLineal.IsChecked
- bCheckboxStatus(8) = WeichesScrollen.IsChecked
-
- iMasseinheit(2) = HorizontalesLinealMasseinheit.GetSelIndex
- iMasseinheit(3) = VertikalesLinealMasseinheit.GetSelIndex
-
- printlog ("'/// - all states inverting ///")
-
- 'this one has 2 places: ViewTextBoundaries
- if bCheckboxStatus(1) Then Hilfslinien.UnCheck Else Hilfslinien.Check
- if bCheckboxStatus(2) Then FarbigeHandles.UnCheck Else FarbigeHandles.Check
- if bCheckboxStatus(3) Then GrosseHandles.UnCheck Else GrosseHandles.Check
-
- 'this one has 2 places: ViewRuler
- if bCheckboxStatus(4) Then HorizontaleBildlaufleiste.UnCheck Else HorizontaleBildlaufleiste.Check
- if bCheckboxStatus(5) Then VertikaleBildlaufleiste.UnCheck Else VertikaleBildlaufleiste.Check
- if bCheckboxStatus(10) then Lineal.UnCheck Else Lineal.Check ' has to be checked to enable Horizontal and Vertical Ruler
- if Lineal.IsChecked then
- if bCheckboxStatus(6) Then HorizontalesLineal.UnCheck Else HorizontalesLineal.Check
- if bCheckboxStatus(7) Then VertikalesLineal.UnCheck Else VertikalesLineal.Check
- if ( HorizontalesLinealMasseinheit.GetItemCount <> iMasseinheit(2) ) Then HorizontalesLinealMasseinheit.Select (HorizontalesLinealMasseinheit.GetItemCount) Else HorizontalesLinealMasseinheit.Select (1)
- if ( VertikalesLinealMasseinheit.GetItemCount <> iMasseinheit(3) ) Then VertikalesLinealMasseinheit.Select (VertikalesLinealMasseinheit.GetItemCount) Else VertikalesLinealMasseinheit.Select (1)
- iTemp(2) = HorizontalesLinealMasseinheit.GetSelIndex
- iTemp(3) = VertikalesLinealMasseinheit.GetSelIndex
- '/// if Asian Language enabled there has to be a checkbox 'Right-aligned' for 'Vertical-Ruler' ///
- if gAsianSup = True and VertikalesLineal.IsChecked = True then
- if RechtsAusgerichtet.IsVisible = True then
- if bCheckboxStatus(9) Then RechtsAusgerichtet.Uncheck Else RechtsAusgerichtet.Check
- else
- Warnlog "- Checkbox 'Right-aligned' is not visible !"
- end if
- end if
- end if
- if bCheckboxStatus(8) Then WeichesScrollen.UnCheck Else WeichesScrollen.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///" )
- ToolsOptions
- Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1)
-
- if ( bCheckboxStatus(1) = Hilfslinien.IsChecked ) Then WarnLog "Hilfslinien state changed"
- if ( bCheckboxStatus(2) = FarbigeHandles.IsChecked ) Then WarnLog "FarbigeHandles state changed"
- if ( bCheckboxStatus(3) = GrosseHandles.IsChecked ) Then WarnLog "GrosseHandles state changed"
- if ( bCheckboxStatus(4) = HorizontaleBildlaufleiste.IsChecked ) Then WarnLog "HorizontaleBildlaufleiste state changed"
- if ( bCheckboxStatus(5) = VertikaleBildlaufleiste.IsChecked ) Then WarnLog "VertikaleBildlaufleiste state changed"
- if ( bCheckboxStatus(8) = WeichesScrollen.IsChecked ) Then WarnLog "WeichesScrollen state changed"
- if ( bCheckboxStatus(10) = Lineal.IsChecked ) Then
- WarnLog "Ruler state changed"
- if ( bCheckboxStatus(6) = HorizontalesLineal.IsChecked ) Then WarnLog "HorizontalesLineal state changed"
- if ( bCheckboxStatus(7) = VertikalesLineal.IsChecked ) Then WarnLog "VertikalesLineal state changed"
- if ( HorizontalesLinealMasseinheit.GetSelIndex <> iTemp(2) ) Then WarnLog "HorizontalesLinealMasseinheit state changed"
- if ( VertikalesLinealMasseinheit.GetSelIndex <> iTemp(3) ) Then WarnLog "VertikalesLinealMasseinheit state changed"
-
- if gAsianSup = True and VertikalesLineal.IsChecked = True then
- if RechtsAusgerichtet.IsVisible = True then
- if bCheckboxStatus(9) = RechtsAusgerichtet.IsChecked then WarnLog "Right-aligned state changed"
- else
- Warnlog "- Checkbox 'Right-aligned' is not visible !"
- end if
- end if
- end if
-
- printlog ("'/// - all UnCheck -> o ///")
- Hilfslinien.UnCheck
- FarbigeHandles.UnCheck
- GrosseHandles.UnCheck
-
- HorizontaleBildlaufleiste.UnCheck
- VertikaleBildlaufleiste.UnCheck
- Lineal.Check
- HorizontalesLineal.UnCheck
- if gAsianSup = True then
- VertikalesLineal.Check
- RechtsAusgerichtet.Uncheck
- end if
- VertikalesLineal.Uncheck
- HorizontalesLinealMasseinheit.Select (1)
- VertikalesLinealMasseinheit.Select (1)
- Lineal.Uncheck
- WeichesScrollen.Uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- ViewTextBoundaries
- ViewRuler
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1)
- if Hilfslinien.IsChecked Then WarnLog "Hilfslinien x"
- if FarbigeHandles.IsChecked Then WarnLog "FarbigeHandles x"
- if GrosseHandles.IsChecked Then WarnLog "GrosseHandles x"
-
- if HorizontaleBildlaufleiste.IsChecked Then WarnLog "HorizontaleBildlaufleiste x"
- if VertikaleBildlaufleiste.IsChecked Then WarnLog "VertikaleBildlaufleiste x"
- if HorizontalesLineal.IsChecked Then WarnLog "HorizontalesLineal x/ ViewRuler"
- if VertikalesLineal.IsChecked Then WarnLog "VertikalesLineal x"
- if WeichesScrollen.IsChecked Then WarnLog "WeichesScrollen x"
- if gAsianSup=True then
- if RechtsAusgerichtet.IsVisible = True then
- if RechtsAusgerichtet.IsEnabled = True then WarnLog "Right-aligned checkbox is enabled"
- else
- Warnlog "- Checkbox 'Right-aligned' is not visible !"
- end if
- end if
-
- if ( HorizontalesLinealMasseinheit.GetSelIndex <> 1 ) Then WarnLog "HorizontalesLinealMasseinheit is not item 1"
- if ( VertikalesLinealMasseinheit.GetSelIndex <> 1 ) Then WarnLog "VertikalesLinealMasseinheit is not item 1"
-
- Printlog ("'/// - all Check -> x ///")
- Hilfslinien.Check
- FarbigeHandles.Check
- GrosseHandles.Check
- Lineal.Check
- HorizontaleBildlaufleiste.Check
- VertikaleBildlaufleiste.Check
- HorizontalesLineal.Check
- VertikalesLineal.Check
- WeichesScrollen.Check
-
- HorizontalesLinealMasseinheit.Select (2)
- VertikalesLinealMasseinheit.Select (2)
- itemp(2) = HorizontalesLinealMasseinheit.GetSelIndex
- itemp(3) = VertikalesLinealMasseinheit.GetSelIndex
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- ViewTextBoundaries ' see here :-)
- ViewRuler
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1)
- if True <> Hilfslinien.IsChecked Then WarnLog "Hilfslinien o"
- if True <> FarbigeHandles.IsChecked Then WarnLog "FarbigeHandles o"
- if True <> GrosseHandles.IsChecked Then WarnLog "GrosseHandles o"
-
- if True <> HorizontaleBildlaufleiste.IsChecked Then WarnLog "HorizontaleBildlaufleiste o"
- if True <> VertikaleBildlaufleiste.IsChecked Then WarnLog "VertikaleBildlaufleiste o"
- if True <> HorizontalesLineal.IsChecked Then WarnLog "HorizontalesLineal o/ ViewRuler"
- if True <> VertikalesLineal.IsChecked Then WarnLog "VertikalesLineal o"
- if True <> WeichesScrollen.IsChecked Then WarnLog "WeichesScrollen o"
-
- if ( HorizontalesLinealMasseinheit.GetSelIndex <> iTemp(2) ) Then WarnLog "HorizontalesLinealMasseinheit is not item " + iTemp(2) + " it's: " + HorizontalesLinealMasseinheit.GetSelIndex
- if ( VertikalesLinealMasseinheit.GetSelIndex <> iTemp(3) ) Then WarnLog "VertikalesLinealMasseinheit is not item " + iTemp(3) + " it's: " + VertikalesLinealMasseinheit.GetSelIndex
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- '------------------------------------------------------------------
- printlog "'/// Lines Visibility Test ///'"
- Call hNewDocument
-
- ' Table insert
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- TabelleEinfuegenWriter.OK
-
- ' changing linewidth to 0
- FormatTable
- Kontext
- active.SetPage TabUmrandung
- Kontext "TabUmrandung"
- Stil.Select 1
- 'Stil.Typekeys "<home>"
- TabUmrandung.Ok
- sleep (3)
-
- ' insert graphic
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<down>"
- DocumentWriter.TypeKeys "<down>"
-
- Call hGrafikEinfuegen gTesttoolPath + "writer\optional\input\options\ga000907.gif"
-
- ' see everything
- ToolsOptions
- Call hToolsOptions ( "HTML" , "VIEW" )
-
- '///' Hilfslinien.Check only, when graphic's in motion! ///'
- FarbigeHandles.Check
- GrosseHandles.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- ToolsOptions
- Call hToolsOptions ( "HTML" , "VIEW" )
- FarbigeHandles.UnCheck
- GrosseHandles.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- Call hCloseDocument
-
- ToolsOptions
- Call hToolsOptions ( "HTML" , "VIEW" )
-
- if ( bCheckboxStatus(1) = TRUE ) Then Hilfslinien.Check Else Hilfslinien.UnCheck
- if ( bCheckboxStatus(2) = TRUE ) Then FarbigeHandles.Check Else FarbigeHandles.UnCheck
- if ( bCheckboxStatus(3) = TRUE ) Then GrosseHandles.Check Else GrosseHandles.UnCheck
-
- if ( bCheckboxStatus(4) = TRUE ) Then HorizontaleBildlaufleiste.Check Else HorizontaleBildlaufleiste.UnCheck
- if ( bCheckboxStatus(5) = TRUE ) Then VertikaleBildlaufleiste.Check Else VertikaleBildlaufleiste.UnCheck
- Lineal.Check
- if ( bCheckboxStatus(6) = TRUE ) Then HorizontalesLineal.Check Else HorizontalesLineal.UnCheck
- if ( bCheckboxStatus(7) = TRUE ) Then VertikalesLineal.Check Else VertikalesLineal.UnCheck
- HorizontalesLinealMasseinheit.Select (iMasseinheit(2))
- VertikalesLinealMasseinheit.Select (iMasseinheit(3))
-
- if ( bCheckboxStatus(8) = TRUE ) Then WeichesScrollen.Check Else WeichesScrollen.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsHTMLGrid
-
- Dim bCheckboxStatus(3) as boolean
- Dim sMetricField(4) as string ' MetricField
- Dim sTempMetricField(4) as string
-
- '/// uses: "writer\\optional\\input\\options\\options1.sxw" ///
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
-
-
- printlog "'///- Tools/Options/HTML: Grid ///"
- printlog ("'/// - save states ///")
-
- ToolsOptions
- Call hToolsOptions ( "HTML","Grid" )
-
- printlog ("'///TabRaster all UnCheck ! ///")
-
- bCheckboxStatus(1) = FangrasterBenutzen.IsChecked
- bCheckboxStatus(2) = RasterSichtbar.IsChecked
- bCheckboxStatus(3) = AchsenSynchronisieren.IsChecked
-
- sMetricField(1) = RasterAufloesungXAchse.GetText
- sMetricField(2) = RasterAufloesungYAchse.GetText
- sMetricField(3) = RasterUnterteilungXAchse.GetText
- sMetricField(4) = RasterUnterteilungYAchse.GetText
-
- printlog ("'/// - all states inverting ///")
-
- if bCheckboxStatus(1) Then FangrasterBenutzen.UnCheck Else FangrasterBenutzen.Check
- if bCheckboxStatus(2) Then RasterSichtbar.UnCheck Else RasterSichtbar.Check
- ' if bCheckboxStatus(3) Then AchsenSynchronisieren.UnCheck Else AchsenSynchronisieren.Check
- ' this CheckBox interacts with the MetricBoxes:
- AchsenSynchronisieren.UnCheck
-
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
- RasterAufloesungXAchse.ToMax
- RasterAufloesungYAchse.ToMin
- RasterUnterteilungXAchse.ToMin
- RasterUnterteilungYAchse.ToMax
- if ( RasterAufloesungXAchse.GetText = sTempMetricField(1) ) Then RasterAufloesungXAchse.ToMin
- if ( RasterAufloesungYAchse.GetText = sTempMetricField(2) ) Then RasterAufloesungYAchse.ToMax
- if ( RasterUnterteilungXAchse.GetText = sTempMetricField(3) ) Then RasterUnterteilungXAchse.ToMax
- if ( RasterUnterteilungYAchse.GetText = sTempMetricField(4) ) Then RasterUnterteilungYAchse.ToMin
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start///" )
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "HTML","Grid" )
-
- if (bCheckboxStatus(1) = FangrasterBenutzen.IsChecked ) Then WarnLog "FangrasterBenutzen state changed BugID: 82944 "
- if (bCheckboxStatus(2) = RasterSichtbar.IsChecked ) Then WarnLog "RasterSichtbar state changed"
- if ( AchsenSynchronisieren.IsChecked = TRUE ) Then WarnLog "AchsenSynchronisieren state changed"
- if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) Then WarnLog "RasterAufloesungXAchse state changed"
- if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) Then WarnLog "RasterAufloesungYAchse state changed"
- if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) Then WarnLog "RasterUnterteilungXAchse state changed"
- if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) Then WarnLog "RasterUnterteilungYAchse state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- Call hToolsOptions ( "HTML","Grid" )
-
- FangrasterBenutzen.UnCheck
- RasterSichtbar.UnCheck
- AchsenSynchronisieren.UnCheck
- RasterAufloesungXAchse.ToMin
- RasterAufloesungYAchse.ToMin
- RasterUnterteilungXAchse.ToMin
- RasterUnterteilungYAchse.ToMin
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
- printlog ("'/// More test ///'")
- RasterAufloesungXAchse.More
- RasterAufloesungYAchse.More
- RasterUnterteilungXAchse.More
- RasterUnterteilungYAchse.More
- if ( sTempMetricField(1) = RasterAufloesungXAchse.GetText ) Then WarnLog "RasterAufloesungXAchse More-Button not working"
- if ( sTempMetricField(2) = RasterAufloesungYAchse.GetText ) Then WarnLog "RasterAufloesungYAchse More-Button not working"
- if ( sTempMetricField(3) = RasterUnterteilungXAchse.GetText ) Then WarnLog "RasterUnterteilungXAchse More-Button not working"
- if ( sTempMetricField(4) = RasterUnterteilungYAchse.GetText ) Then WarnLog "RasterUnterteilungYAchse More-Button not working"
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- Call hToolsOptions ( "HTML","Grid" )
-
- if FangrasterBenutzen.IsChecked Then WarnLog "FangrasterBenutzen x"
- if RasterSichtbar.IsChecked Then WarnLog "RasterSichtbar x"
- if AchsenSynchronisieren.IsChecked Then WarnLog "AchsenSynchronisieren x"
- if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) Then WarnLog "RasterAufloesungXAchse is not min."
- if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) Then WarnLog "RasterAufloesungYAchse is not min."
- if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) Then WarnLog "RasterUnterteilungXAchse is not min."
- if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) Then WarnLog "RasterUnterteilungYAchse is not min."
-
- Printlog (" - all Check -> x")
-
- FangrasterBenutzen.Check
- RasterSichtbar.Check
- AchsenSynchronisieren.Check
-
- '///' Synchronize axes check -------------------- ///'
- RasterAufloesungXAchse.ToMax
- wait 500
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- if RasterAufloesungYAchse.GetText <> sTempMetricField(1) then Warnlog "Y-axis res. differs from X-axis"
- RasterUnterteilungXAchse.ToMax
- wait 500
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- if RasterUnterteilungYAchse.GetText <> sTempMetricField(3) then Warnlog "Y-axis sub. differs from X-axis"
- '--------------------------------------------
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "HTML","Grid" )
-
- if True <> FangrasterBenutzen.IsChecked Then WarnLog "FangrasterBenutzen o"
- if True <> RasterSichtbar.IsChecked Then WarnLog "RasterSichtbar o"
- if True <> AchsenSynchronisieren.IsChecked Then WarnLog "AchsenSynchronisieren o"
- if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) Then WarnLog "RasterAufloesungXAchse is not max.Bug 54934 in 01:"
- if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) Then WarnLog "RasterAufloesungYAchse is not max."
- if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) Then WarnLog "RasterUnterteilungXAchse is not max."
- if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) Then WarnLog "RasterUnterteilungYAchse is not max."
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- sleep (4)
-
- '-------------------------------------------------------------------------------
- printlog ("'/// Function Test: Grid Resolution ///'")
- '/// ( gTesttoolPath + "writer\optional\input\options\gridtst.sxw" ) ///'
- '/// NOT Possible Without <ALT> + <cursor> stuff :-((((( BugID: 84741 ///'
- '/// uses"writer\optional\input\options\htmltag.html" ///
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\htmltag.html" )
-
-
- '/// check if writeable!///'
- try
- FormatStylist
- FormatStylist
- catch
- '/// make writeable :-)///'
- Kontext "Funktionsleiste"
- Bearbeiten.click
- endcatch
- sleep (3)
-
- ' select grafik element
- Call wNavigatorAuswahl(4,1)
- ViewNavigator
- sleep (2)
- FormatGraphics
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- AnchorAtPage.Check
- sleep (1)
- if ( 0 <> StrToDouble (HorizontalBy.GetText)) Then WarnLog "HorizontalBy wrong presupposition != 0"
- if ( 0 <> StrToDouble (VerticalBy.GetText)) Then WarnLog "VerticalBy wrong presupposition != 0"
- TabType.OK
-
- ' change Grid Resolution
- ToolsOptions
- Call hToolsOptions ( "HTML","Grid" )
- RasterAufloesungXAchse.SetText("2")
- RasterAufloesungYAchse.SetText("3")
- RasterUnterteilungXAchse.SetText("2")
- RasterUnterteilungYAchse.SetText("3")
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// move grafik with <Alt> + <up/down> ///'
- '/// resulting step = resolution / subdivision ///'
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Mod2 Down>"
- DocumentWriter.TypeKeys "<Mod2 Right>"
- DocumentWriter.TypeKeys "<Mod2 Up>"
- DocumentWriter.TypeKeys "<Mod2 Left>"
- DocumentWriter.TypeKeys "<Mod2 Right>"
- DocumentWriter.TypeKeys "<Mod2 Down>"
-
- ' check if @ (1,1) Current-Measure-Unit :-)
- Call wNavigatorAuswahl(4,1)
- ViewNavigator
- sleep (2)
- FormatGraphics
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- AnchorAtPage.Check
- sleep (1)
- if ( 0 = StrToDouble (HorizontalBy.GetText)) Then
- QAErrorLog "RasterAufloesungXAchse should be 1 is: " + HorizontalBy.GetText
- end if
- if ( 0 = StrToDouble (VerticalBy.GetText)) Then
- QAErrorLog "RasterAufloesungYAchse should be 1 is: " + VerticalBy.GetText
- end if
- TabType.Cancel
- Call hCloseDocument
- '--------------------------------------------------
-
- printlog ("'/// - restore states ///")
- ToolsOptions
- Call hToolsOptions ( "HTML","Grid" )
-
- if ( bCheckboxStatus(1) = TRUE ) Then FangrasterBenutzen.Check Else FangrasterBenutzen.UnCheck
- if ( bCheckboxStatus(2) = TRUE ) Then RasterSichtbar.Check Else RasterSichtbar.UnCheck
- if ( bCheckboxStatus(3) = TRUE ) Then AchsenSynchronisieren.Check Else AchsenSynchronisieren.UnCheck
- RasterAufloesungXAchse.SetText (sMetricField(1))
- RasterAufloesungYAchse.SetText (sMetricField(2))
- RasterUnterteilungXAchse.SetText (sMetricField(3))
- RasterUnterteilungYAchse.SetText (sMetricField(4))
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
diff --git a/testautomation/writer/optional/includes/option/wh_o_2.inc b/testautomation/writer/optional/includes/option/wh_o_2.inc
deleted file mode 100644
index 841af13dafec..000000000000
--- a/testautomation/writer/optional/includes/option/wh_o_2.inc
+++ /dev/null
@@ -1,485 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Functional-Tests for Tools - Options - Html - Print & Table
-'*
-'\***********************************************************************
-
-sub wh_o_2
-
- Call tToolsOptionsHTMLPrint 'wrn:2
- Call tToolsOptionsHTMLTable
- Call tToolsOptionsHTMLTable1
-
-end sub
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsHTMLPrint
-
- dim bCheckboxStatus(12) as boolean ' Checkbox states
- dim iListBox(1) as integer ' ListBox
- dim iTempListBox(1) as integer
- dim bRadioBut(4) as boolean ' RadioButtons
- dim bTempRadioBut(4) as boolean
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\test.html" )
-
- printlog "- Tools/Options/HTML: PrintHTML "
-
- printlog (" - save states ")
- ToolsOptions
- Call hToolsOptions ("HTML","PRINT")
-
- bCheckboxStatus(1) = Grafiken.IsChecked
- bCheckboxStatus(2) = Kontrollfelder.IsChecked
- bCheckboxStatus(3) = Hintergrund.IsChecked
- bCheckboxStatus(4) = SchwarzDrucken.IsChecked
-
- bCheckboxStatus(5)= Prospekt.IsChecked
-
- bCheckboxStatus(6)= AusDruckereinstellung.IsChecked
-
- iListBox(1) = Fax.GetSelIndex
-
- bRadioBut(1) = Keine.IsChecked
- bRadioBut(2) = NurNotizen.IsChecked
- bRadioBut(3) = Dokumentende.IsChecked
- bRadioBut(4) = Seitenende.IsChecked
-
- printlog (" - all states inverting ")
-
- if bCheckboxStatus(1) Then Grafiken.UnCheck Else Grafiken.Check
- if bCheckboxStatus(2) Then Kontrollfelder.UnCheck Else Kontrollfelder.Check
- if bCheckboxStatus(3) Then Hintergrund.UnCheck Else Hintergrund.Check
- if bCheckboxStatus(4) Then SchwarzDrucken.UnCheck Else SchwarzDrucken.Check
-
- if bCheckboxStatus(5) Then Prospekt.UnCheck Else Prospekt.Check
-
- if bCheckboxStatus(6) Then AusDruckereinstellung.UnCheck Else AusDruckereinstellung.Check
-
- if ( Keine.IsEnabled) then
- if (Keine.IsChecked = True) Then
- NurNotizen.Check
- Else
- Keine.Check
- end if
- end if
-
- bTempRadioBut(1) = Keine.IsChecked
- bTempRadioBut(2) = NurNotizen.IsChecked
- bTempRadioBut(3) = Dokumentende.IsChecked
- bTempRadioBut(4) = Seitenende.IsChecked
-
- if ( Fax.GetItemCount <> iListBox(1) ) Then Fax.Select (Fax.GetItemCount) _
- Else Fax.Select(1)
- iTempListBox(1) = Fax.GetSelIndex
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- sleep (4)
- Call hFileSaveAsKill(gOfficepath + "user\work\printtest.html")
- Call hCloseDocument
-
- printlog (" - SO quit - start ")
-
- Call wOfficeRestart
-
- printlog (" - checking states ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "PRINT" )
-
- if ( bCheckboxStatus(1) = Grafiken.IsChecked ) Then WarnLog "'Graphics' state changed"
- if ( bCheckboxStatus(2) = Kontrollfelder.IsChecked ) Then WarnLog "'Controls' state changed"
- if ( bCheckboxStatus(3) = Hintergrund.IsChecked ) Then WarnLog "'Background' state changed"
- if ( bCheckboxStatus(4) = SchwarzDrucken.IsChecked ) Then WarnLog "'Print black' state changed"
-
- if ( bCheckboxStatus(5)= Prospekt.IsChecked ) Then WarnLog "'Brochure' state changed"
-
- if ( bCheckboxStatus(6)= AusDruckereinstellung.IsChecked ) Then WarnLog "'Paper tray from printer settings' state changed"
-
- if ( bTempRadioBut(1) <> Keine.IsChecked ) Then WarnLog "'None' state changed (Bug#99202)"
- if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) Then WarnLog "'Notes only' state changed (Bug#99202)"
- if ( bTempRadioBut(3) <> Dokumentende.IsChecked) Then WarnLog "'End of document' state changed"
- if ( bTempRadioBut(4) <> Seitenende.IsChecked ) Then WarnLog "'End of page' state changed"
-
- if ( Fax.GetSelIndex <> iTempListBox(1) ) Then warnlog "Fax state changed"
-
- printlog (" - all UnCheck -> o ")
-
- Grafiken.UnCheck
- Kontrollfelder.UnCheck
- Hintergrund.UnCheck
- SchwarzDrucken.UnCheck
-
- Prospekt.UnCheck
-
- AusDruckereinstellung.UnCheck
-
- if (NurNotizen.IsChecked = True) Then Dokumentende.Check Else NurNotizen.Check
-
- bTempRadioBut(1) = Keine.IsChecked
- bTempRadioBut(2) = NurNotizen.IsChecked
- bTempRadioBut(3) = Dokumentende.IsChecked
- bTempRadioBut(4) = Seitenende.IsChecked
-
- Fax.Select(1)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog (" - check if all UnChecked ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "PRINT" )
-
- if Grafiken.IsChecked Then WarnLog "'Graphics' x"
- if Kontrollfelder.IsChecked Then WarnLog "'Controls' x"
- if Hintergrund.IsChecked Then WarnLog "'Background' x"
- if SchwarzDrucken.IsChecked Then WarnLog "'Print black' x"
-
- if Prospekt.IsChecked Then WarnLog "'Brochure' x"
-
- if AusDruckereinstellung.IsChecked Then WarnLog "'Paper tray from printer settings' x"
-
- ' Is saved with document
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- hFileOpen( gOfficePath & "user\work\printtest.html")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "PRINT" )
-
- if ( bTempRadioBut(1) <> Keine.IsChecked ) Then WarnLog "'None' state changed"
- if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) Then WarnLog "'Notes only' state changed"
- if ( bTempRadioBut(3) <> Dokumentende.IsChecked) Then WarnLog "'End of document' state changed"
- if ( bTempRadioBut(4) <> Seitenende.IsChecked ) Then WarnLog "'end of page' state changed"
-
- if ( Fax.GetSelIndex <> 1 ) Then WarnLog "Fax is not item 1"
-
- Printlog (" - all Check -> x ")
-
- Grafiken.Check
- Kontrollfelder.Check
- Hintergrund.Check
- SchwarzDrucken.Check
-
- Prospekt.Check
-
- AusDruckereinstellung.Check
-
- if ( Dokumentende.IsEnabled ) then
- if (Dokumentende.IsChecked = True) Then
- Seitenende.Check
- Else
- Dokumentende.Check
- end if
- end if
-
- bTempRadioBut(1) = Keine.IsChecked
- bTempRadioBut(2) = NurNotizen.IsChecked
- bTempRadioBut(3) = Dokumentende.IsChecked
- bTempRadioBut(4) = Seitenende.IsChecked
-
- Fax.Select(Fax.GetItemCount)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog (" - check if all Checked ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "PRINT" )
-
- if not Grafiken.IsChecked Then WarnLog "'Graphics' o"
- if not Kontrollfelder.IsChecked Then WarnLog "'Controls' o"
- if not Hintergrund.IsChecked Then WarnLog "'Background' o"
- if not SchwarzDrucken.IsChecked Then WarnLog "'Print black' o"
-
- if not Prospekt.IsChecked Then WarnLog "'Brochure' o"
-
- if not AusDruckereinstellung.IsChecked Then WarnLog "'Paper tray from printer settings' o"
-
- if ( bTempRadioBut(1) <> Keine.IsChecked ) Then WarnLog "'None' state changed"
- if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) Then WarnLog "'Notes only' state changed"
- if ( bTempRadioBut(3) <> Dokumentende.IsChecked) Then WarnLog "'End of document' state changed"
- if ( bTempRadioBut(4) <> Seitenende.IsChecked ) Then WarnLog "'End of page' state changed"
-
- if ( Fax.GetSelIndex <> Fax.GetItemCount ) Then WarnLog "Fax is not item (GetItemCount)"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- printlog (" - restore states ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "PRINT" )
-
- if ( bCheckboxStatus(1) = TRUE ) Then Grafiken.Check Else Grafiken.UnCheck
- if ( bCheckboxStatus(2) = TRUE ) Then Kontrollfelder.Check Else Kontrollfelder.UnCheck
- if ( bCheckboxStatus(3) = TRUE ) Then Hintergrund.Check Else Hintergrund.UnCheck
- if ( bCheckboxStatus(4) = TRUE ) Then SchwarzDrucken.Check Else SchwarzDrucken.UnCheck
-
- if ( bCheckboxStatus(5) = TRUE ) Then Prospekt.Check Else Prospekt.UnCheck
-
- if ( bCheckboxStatus(7) = TRUE ) Then AusDruckereinstellung.Check Else AusDruckereinstellung.UnCheck
-
- try
- Fax.Select (iListBox(1))
- catch
- warnlog "restore fax doesn't work"
- endcatch
-
- if ( bRadioBut(1) = TRUE ) Then Keine.Check
- if ( bRadioBut(2) = TRUE ) Then NurNotizen.Check
- if ( bRadioBut(3) = TRUE ) Then Dokumentende.Check
- if ( bRadioBut(4) = TRUE ) Then Seitenende.Check
-
- Fax.Select (iListBox(1))
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsHTMLTable
- '/ Table ///'
- '/ ----- ///'
- '/ tToolsOptionsHTMLTable ///'
- '/ normal ///'
- '/ Function: ///'
- '/ ///'
-
- dim sMetricField(4) as string ' MetricField
- dim sTempMetricField(4) as string
- dim bRadioBut(3) as boolean ' RadioButton states
- dim bTempRadioBut(3) as boolean
-
- ' sMetricField(i) and sTempMetricField(i)
- '(1) = VerschiebenZeile
- '(2) = VerschiebenSpalte
- '(3) = EinfuegenZeile
- '(4) = EinfuegenSpalte
-
- ' bRadioBut(i) and bTempRadioBut(i)
- '(1) = VerhaltenFix
- '(2) = FixProportional
- '(3) = Variabel
-
- Call hNewDocument
- printlog ("- Tools/Options/HTML: Table ")
-
- printlog (" - save states ")
- ToolsOptions
- Call hToolsOptions ("HTML","Table")
-
- sMetricField(1) = VerschiebenZeile.GetText
- sMetricField(2) = VerschiebenSpalte.GetText
- sMetricField(3) = EinfuegenZeile.GetText
- sMetricField(4) = EinfuegenSpalte.GetText
-
- bRadioBut(1) = VerhaltenFix.IsChecked
- bRadioBut(2) = FixProportional.IsChecked
- bRadioBut(3) = Variabel.IsChecked
-
- if ((bRadioBut(1) Xor bRadioBut(2) Xor bRadioBut(3)) = False) Then Warnlog (" RadioButtons have NO init state: " + bRadioBut(1) +", BugID: 83097")
-
- printlog (" - all states inverting ")
-
- VerschiebenZeile.ToMax
- VerschiebenSpalte.ToMax
- EinfuegenZeile.ToMax
- EinfuegenSpalte.ToMax
- if ( VerschiebenZeile.GetText = sMetricField(1) ) Then VerschiebenZeile.ToMin
- if ( VerschiebenSpalte.GetText = sMetricField(2) ) Then VerschiebenSpalte.ToMin
- if ( EinfuegenZeile.GetText = sMetricField(3) ) Then EinfuegenZeile.ToMin
- if ( EinfuegenSpalte.GetText = sMetricField(4) ) Then EinfuegenSpalte.ToMin
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
-
- FixProportional.Check
-
- bTempRadioBut(1) = VerhaltenFix.IsChecked
- bTempRadioBut(2) = FixProportional.IsChecked
- bTempRadioBut(3) = Variabel.IsChecked
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog (" - SO quit - start ")
-
- Call wOfficeRestart
-
- printlog (" - checking states ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "Table" )
-
- if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) Then WarnLog "Move cells: 'Rows' state changed BugID: 82990 "
- if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) Then WarnLog "Move cells: 'Column' state changed"
- if ( EinfuegenZeile.GetText <> sTempMetricField(3) ) Then WarnLog "Insert Cell: 'Row' state changed"
- if ( EinfuegenSpalte.GetText <> sTempMetricField(4) ) Then WarnLog "Insert Cell: 'Column' state changed"
-
- if ( bTempRadioBut(1) <> VerhaltenFix.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Fixed' state changed"
- if ( bTempRadioBut(2) <> FixProportional.IsChecked) Then WarnLog "Behaviour of rows/columns : 'Fixed, proportional' state changed"
- if ( bTempRadioBut(3) <> Variabel.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Variable' state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog (" - all UnCheck -> o ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "Table" )
-
- VerschiebenZeile.ToMin
- VerschiebenSpalte.ToMin
- EinfuegenZeile.ToMin
- EinfuegenSpalte.ToMin
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
- printlog (" More test ///'")
- VerschiebenZeile.More
- VerschiebenSpalte.More
- EinfuegenZeile.More
- EinfuegenSpalte.More
- if ( sTempMetricField(1) = VerschiebenZeile.GetText ) Then WarnLog "'Move Cells Row' : More-Button not working"
- if ( sTempMetricField(2) = VerschiebenSpalte.GetText ) Then WarnLog "'Move Cells Column' : More-Button not working"
- if ( sTempMetricField(3) = EinfuegenZeile.GetText ) Then WarnLog "'Insert Cell Row' : More-Button not working"
- if ( sTempMetricField(4) = EinfuegenSpalte.GetText ) Then WarnLog "'Insert Cell Column' : More-Button not working"
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
-
- Variabel.Check
-
- bTempRadioBut(1) = VerhaltenFix.IsChecked
- bTempRadioBut(2) = FixProportional.IsChecked
- bTempRadioBut(3) = Variabel.IsChecked
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog (" - check if all UnChecked ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "Table" )
-
- if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) Then WarnLog "Move Cells : 'Row' is not min."
- if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) Then WarnLog "Move Cells : 'Column' is not min."
- if ( EinfuegenZeile.GetText <> sTempMetricField(3) ) Then WarnLog "Insert Cells : 'Row' is not min."
- if ( EinfuegenSpalte.GetText <> sTempMetricField(4) ) Then WarnLog "Insert Cells : 'Column' is not min."
-
- if ( bTempRadioBut(1) <> VerhaltenFix.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Fixed' state changed"
- if ( bTempRadioBut(2) <> FixProportional.IsChecked) Then WarnLog "Behaviour of rows/columns : 'Fixed, proportional' state changed"
- if ( bTempRadioBut(3) <> Variabel.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Variable' state changed"
-
- Printlog (" - all Check -> x ")
-
- VerschiebenZeile.ToMax
- VerschiebenSpalte.ToMax
- EinfuegenZeile.ToMax
- EinfuegenSpalte.ToMax
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
- printlog (" Less test ///'")
- VerschiebenZeile.Less
- VerschiebenSpalte.Less
- EinfuegenZeile.Less
- EinfuegenSpalte.Less
- if ( sTempMetricField(1) = VerschiebenZeile.GetText ) Then WarnLog "'Move Cells Row' : Less-Button not working"
- if ( sTempMetricField(2) = VerschiebenSpalte.GetText ) Then WarnLog "'Move Cells Column' : Less-Button not working"
- if ( sTempMetricField(3) = EinfuegenZeile.GetText ) Then WarnLog "'Insert Cell Row' : Less-Button not working"
- if ( sTempMetricField(4) = EinfuegenSpalte.GetText ) Then WarnLog "'Insert Cell Column' : Less-Button not working"
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
-
- VerhaltenFix.Check
-
- bTempRadioBut(1) = VerhaltenFix.IsChecked
- bTempRadioBut(2) = FixProportional.IsChecked
- bTempRadioBut(3) = Variabel.IsChecked
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog (" - check if all Checked ")
- ToolsOptions
- Call hToolsOptions ( "HTML" , "Table" )
-
- if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) Then WarnLog "Move Cells : 'Row' is not max."
- if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) Then WarnLog "Move Cells : 'Column' is not min."
- if ( EinfuegenZeile.GetText <> sTempMetricField(3) ) Then WarnLog "Insert Cells : 'Row' is not max."
- if ( EinfuegenSpalte.GetText <> sTempMetricField(4) ) Then WarnLog "Insert Cells : 'Column' is not min."
-
- if ( bTempRadioBut(1) <> VerhaltenFix.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Fixed' state changed"
- if ( bTempRadioBut(2) <> FixProportional.IsChecked) Then WarnLog "Behaviour of rows/columns : 'Fixed, proportional' state changed"
- if ( bTempRadioBut(3) <> Variabel.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Variable' state changed"
-
- printlog (" - restore states ")
-
- VerschiebenZeile.SetText (sMetricField(1))
- VerschiebenSpalte.SetText (sMetricField(2))
- EinfuegenZeile.SetText (sMetricField(3))
- EinfuegenSpalte.SetText (sMetricField(4))
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsHTMLTable1
-
- '/// There was a bug from OpenOffice where the Office crashed ///
- '/// This testcase check for this bug ///
-
- Call hNewDocument
- printlog ("- Tools/Options/Text document: Table ")
-
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- VerhaltenFix.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/option/wh_o_3.inc b/testautomation/writer/optional/includes/option/wh_o_3.inc
deleted file mode 100644
index 58b87a72ea08..000000000000
--- a/testautomation/writer/optional/includes/option/wh_o_3.inc
+++ /dev/null
@@ -1,389 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Funcitonal-Test for Tools -Options - HTML - Cursor.
-'*
-'\***********************************************************************
-
-sub wh_o_3
- Call tToolsOptionsHTMLInsert
-
-' on view2 with ex content
- Call tToolsOptionsHTMLCursor
-end sub
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsHTMLInsert
-
-'/ Insert ///'
-'/ ------ ///'
-'/ tToolsOptionsHTMLInsert ///'
-'/ normal ///'
-'/ Function: ///'
-'/ Function: not yet: Tables ///'
-'/ ///'
-
- dim irgendwas(8) as boolean ' Checkbox states
-
-'(1) = Automatisch
-'
-'(2) = Ueberschrift
-'(3) = Wiederholen depends on Ueberschrift
-'(4) = NichtTrennen
-'(5) = Umrandung
-'
-'(6) = AutomatischeZahlenerkennung
-'(7) = Zahlenformaterkennung depends on AutomatischeZahlenerkennung
-'(8) = AutomatischeAusrichtung depends on AutomatischeZahlenerkennung
-
- call hNewDocument
- printlog "'///- Tools/Options/HTML: Insert ///"
-
- printlog ("'/// - save states ///")
- ToolsOptions
- hToolsOptions ("HTML","Table")
-
- irgendwas(2) = Ueberschrift.IsChecked
- irgendwas(3) = Wiederholen.IsChecked
- irgendwas(5) = Umrandung.IsChecked
-
- irgendwas(6) = AutomatischeZahlenerkennung.IsChecked
- irgendwas(7) = Zahlenformaterkennung.IsChecked
- irgendwas(8) = AutomatischeAusrichtung.IsChecked
-
- printlog ("'/// - all states inverting ///")
-
-' if irgendwas(2) Then Ueberschrift.UnCheck Else Ueberschrift.Check
- Ueberschrift.Check
- if irgendwas(3) Then Wiederholen.UnCheck Else Wiederholen.Check
- if irgendwas(5) Then Umrandung.UnCheck Else Umrandung.Check
-
-' if irgendwas(6) Then AutomatischeZahlenerkennung.UnCheck Else AutomatischeZahlenerkennung.Check
- AutomatischeZahlenerkennung.Check
- if irgendwas(7) Then Zahlenformaterkennung.UnCheck Else Zahlenformaterkennung.Check
- if irgendwas(8) Then AutomatischeAusrichtung.UnCheck Else AutomatischeAusrichtung.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- hToolsOptions ( "HTML" , "Table" )
-
-' If ( irgendwas(2) = Ueberschrift.IsChecked ) Then WarnLog "Ueberschrift state changed"
- If ( Ueberschrift.IsChecked = False ) Then WarnLog "Ueberschrift state changed"
- If ( irgendwas(3) = Wiederholen.IsChecked ) Then WarnLog "Wiederholen state changed"
- If ( irgendwas(5) = Umrandung.IsChecked ) Then WarnLog "Umrandung state changed"
-
-' If ( irgendwas(6) = AutomatischeZahlenerkennung.IsChecked ) Then WarnLog "AutomatischeZahlenerkennung state changed"
- If ( AutomatischeZahlenerkennung.IsChecked = False ) Then WarnLog "AutomatischeZahlenerkennung state changed"
- If ( irgendwas(7) = Zahlenformaterkennung.IsChecked ) Then WarnLog "Zahlenformaterkennung state changed"
- If ( irgendwas(8) = AutomatischeAusrichtung.IsChecked ) Then WarnLog "AutomatischeAusrichtung state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- hToolsOptions ( "HTML" , "Table" )
-
- Ueberschrift.UnCheck
-' Wiederholen.UnCheck
- Umrandung.UnCheck
-
- AutomatischeZahlenerkennung.UnCheck
-' Zahlenformaterkennung.UnCheck
-' AutomatischeAusrichtung.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
-'These Options also have another location
-
-'/// 2.Location of Options: InsertTableWriter get's checked too ///'
-
- Printlog "'/// - check in InsertTableHTML ///"
- Call hNewDocument
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
-
- If ( Ueberschrift.IsChecked ) Then WarnLog "Ueberschrift x"
-' If ( UeberschriftWiederholen.IsChecked ) Then WarnLog "Wiederholen x"
- If ( Umrandung.IsChecked ) Then WarnLog "Umrandung x"
-
- TabelleEinfuegenWriter.OK
-
-'/// Function: Input in tables ///'
-
- Kontext "DocumentWriter"
-
- DocumentWriter.TypeKeys "<Down>1<Tab><Left>"
-
- FormatParagraph
-
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if NOT Links.IsChecked then Warnlog "Die automatische Ausrichtung der Zahl wurde trotzdem durchgeführt!"
-
- TabAusrichtungAbsatz.Cancel
-
-
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- If Kategorie.GetSelIndex <> 11 then Warnlog "Das Zahlenformat ist nicht Text geblieben!"
-
- Zahlenformat.Cancel
-
-
- Call hCloseDocument
-
-'.................
-
- printlog ("'/// - check if all UnChecked ///")
-
- ' Workaround issue i48383 Slot get's executed on backing window
- Kontext "DocumentWriter"
- DocumentWriter.typekeys ("a")
-
- ToolsOptions
- hToolsOptions ( "HTML" , "Table" )
-
- If Ueberschrift.IsChecked Then WarnLog "Ueberschrift x"
-' If Wiederholen.IsChecked Then WarnLog "Wiederholen x"
- If Umrandung.IsChecked Then WarnLog "Umrandung x"
-
- If AutomatischeZahlenerkennung.IsChecked Then WarnLog "AutomatischeZahlenerkennung x"
-' If Zahlenformaterkennung.IsChecked Then WarnLog "Zahlenformaterkennung x"
-' If AutomatischeAusrichtung.IsChecked Then WarnLog "AutomatischeAusrichtung x"
-
- Printlog ("'/// - all Check -> x ///")
-
- Ueberschrift.Check
- Wiederholen.Check
- Umrandung.Check
-
- AutomatischeZahlenerkennung.Check
- Zahlenformaterkennung.Check
- AutomatischeAusrichtung.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
-'These Options also have another location
-
- Printlog "'/// - check in InsertTableWriter ///"
- hNewDocument
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
-
- If ( Ueberschrift.IsChecked = FALSE ) Then WarnLog "Ueberschrift o"
- If ( UeberschriftWiederholen.IsChecked = FALSE ) Then WarnLog "Wiederholen o"
- If ( Umrandung.IsChecked = FALSE ) Then WarnLog "Umrandung o"
-
- TabelleEinfuegenWriter.Ok
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Down>1<Tab><Left>"
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if NOT Rechts.IsChecked then Warnlog "Alignment of number didn't change to: right!"
- TabAusrichtungAbsatz.Cancel
-
- FormatNumberFormat
- Kontext "Zahlenformat"
- If Kategorie.GetSelIndex <> 3 then Warnlog "numberformat didn't get changed!"
- Zahlenformat.Cancel
-
- Call hCloseDocument
-
-'.......................
-
- printlog ("'/// - check if all Checked ///")
-
- ' Workaround issue i48383 Slot get's executed on backing window
- Kontext "DocumentWriter"
- DocumentWriter.typekeys ("a")
-
- ToolsOptions
- hToolsOptions ( "HTML" , "Table" )
-
- If ( Ueberschrift.IsChecked = FALSE ) Then WarnLog "Ueberschrift o"
- If ( Wiederholen.IsChecked = FALSE ) Then WarnLog "Wiederholen o"
- If ( Umrandung.IsChecked = FALSE ) Then WarnLog "Umrandung o"
-
- If ( AutomatischeZahlenerkennung.IsChecked = FALSE ) Then WarnLog "AutomatischeZahlenerkennung o"
- If ( Zahlenformaterkennung.IsChecked = FALSE ) Then WarnLog "Zahlenformaterkennung o"
- If ( AutomatischeAusrichtung.IsChecked = FALSE ) Then WarnLog "AutomatischeAusrichtung o"
-
- printlog ("'/// - restore states ///")
-
- If ( irgendwas(2) = TRUE ) Then Ueberschrift.Check Else Ueberschrift.UnCheck
- If ( irgendwas(3) = TRUE ) Then Wiederholen.Check Else _
- if Ueberschrift.IsChecked Then Wiederholen.UnCheck
- If ( irgendwas(5) = TRUE ) Then Umrandung.Check Else Umrandung.UnCheck
-
- AutomatischeZahlenerkennung.Check
- if AutomatischeZahlenerkennung.IsChecked then
- if ( irgendwas(7) = TRUE ) Then Zahlenformaterkennung.Check
- if ( irgendwas(8) = TRUE ) Then AutomatischeAusrichtung.Check
- end if
- if ( irgendwas(6) = TRUE ) Then AutomatischeAusrichtung.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------
-
-testcase tToolsOptionsHTMLCursor
-
- dim irgendwas(17) as boolean ' Checkbox states
-
-'(10) = Absatzenden
-'(11) = WeicheTrenner
-'(12) = Leerzeichen
-'(13) = GeschLeerzeichen
-'(14) = Tabulatoren
-'(15) = Umbrueche
-'(16) = VersteckterText
-'(17) = VersteckteAbsatze
-
- hNewDocument
- printlog "'///- Tools/Options/Writer: View 2 ///"
-
- printlog ("'/// - save states ///")
- ToolsOptions
- hToolsOptions ("HTML","FORMATTINGAIDS")
-
- irgendwas(10) = Absatzenden.IsChecked
- irgendwas(11) = WeicheTrenner.IsChecked
- irgendwas(12) = Leerzeichen.IsChecked
- irgendwas(13) = GeschLeerzeichen.IsChecked
- irgendwas(15) = Umbrueche.IsChecked
-
- printlog ("'/// - all states inverting ///")
-
- if irgendwas(10) Then Absatzenden.UnCheck Else Absatzenden.Check
- if irgendwas(11) Then WeicheTrenner.UnCheck Else WeicheTrenner.Check
- if irgendwas(12) Then Leerzeichen.UnCheck Else Leerzeichen.Check
- if irgendwas(13) Then GeschLeerzeichen.UnCheck Else GeschLeerzeichen.Check
- if irgendwas(15) Then Umbrueche.UnCheck Else Umbrueche.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- hToolsOptions ( "HTML" , "FORMATTINGAIDS" )
-
- If ( irgendwas(10) = Absatzenden.IsChecked ) Then WarnLog "Absatzenden state changed"
- If ( irgendwas(11) = WeicheTrenner.IsChecked ) Then WarnLog "WeicheTrenner state changed"
- If ( irgendwas(12) = Leerzeichen.IsChecked ) Then WarnLog "Leerzeichen state changed"
- If ( irgendwas(13) = GeschLeerzeichen.IsChecked ) Then WarnLog "GeschLeerzeichen state changed (Bug#99202)"
- If ( irgendwas(15) = Umbrueche.IsChecked ) Then WarnLog "Umbrueche state changed (Bug#99202)"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- hToolsOptions ( "HTML" , "FORMATTINGAIDS" )
-
- Absatzenden.UnCheck
- WeicheTrenner.UnCheck
- Leerzeichen.UnCheck
- GeschLeerzeichen.UnCheck
- Umbrueche.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- hToolsOptions ( "HTML" , "FORMATTINGAIDS" )
-
- If Absatzenden.IsChecked Then WarnLog "Absatzenden x"
- If WeicheTrenner.IsChecked Then WarnLog "WeicheTrenner x"
- If Leerzeichen.IsChecked Then WarnLog "Leerzeichen x"
- If GeschLeerzeichen.IsChecked Then WarnLog "GeschLeerzeichen x"
- If Umbrueche.IsChecked Then WarnLog "Umbrueche x"
-
- Printlog ("'/// - all Check -> x ///")
-
- Absatzenden.Check
- WeicheTrenner.Check
- Leerzeichen.Check
- GeschLeerzeichen.Check
- Umbrueche.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- hToolsOptions ( "HTML" , "FORMATTINGAIDS" )
-
- If True <> Absatzenden.IsChecked Then WarnLog "Absatzenden o BugID: 82942 OS"
- If True <> WeicheTrenner.IsChecked Then WarnLog "WeicheTrenner o"
- If True <> Leerzeichen.IsChecked Then WarnLog "Leerzeichen o"
- If True <> GeschLeerzeichen.IsChecked Then WarnLog "GeschLeerzeichen o"
- If True <> Umbrueche.IsChecked Then WarnLog "Umbrueche o"
-
- printlog ("'/// - restore states ///")
-
- If ( irgendwas(10) = TRUE ) Then Absatzenden.Check Else Absatzenden.UnCheck
- If ( irgendwas(11) = TRUE ) Then WeicheTrenner.Check Else WeicheTrenner.UnCheck
- If ( irgendwas(12) = TRUE ) Then Leerzeichen.Check Else Leerzeichen.UnCheck
- If ( irgendwas(13) = TRUE ) Then GeschLeerzeichen.Check Else GeschLeerzeichen.UnCheck
- If ( irgendwas(15) = TRUE ) Then Umbrueche.Check Else Umbrueche.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
diff --git a/testautomation/writer/optional/includes/option/wr_o_1.inc b/testautomation/writer/optional/includes/option/wr_o_1.inc
deleted file mode 100644
index 6ca437431ec4..000000000000
--- a/testautomation/writer/optional/includes/option/wr_o_1.inc
+++ /dev/null
@@ -1,937 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Functional-Tests for Tools-Options-Writer -View & Grid
-'*
-'\***********************************************************************
-
-sub wr_o_1
- printLog Chr(13) + "--------- Options - Tools Writer - ----------"
-
- Call tToolsOptionsWriterView1
- Call tToolsOptionsWriterView2
- Call tToolsOptionsWriterView3
- Call tToolsOptionsWriterView4
- Call tToolsOptionsWriterView5
- Call tToolsOptionsWriterView6
- Call tToolsOptionsWriterView7
- Call tToolsOptionsWriterGrid1
- Call tToolsOptionsWriterGrid2
- Call tToolsOptionsWriterGrid3
- Call tToolsOptionsWriterGrid4
-
-end sub
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterView1
- dim option_value(11) as boolean
- dim measurement_unit(3) as integer
- dim iTemp(3) as integer
- '/// new writerdocument
- Call hNewDocument
-
- '///- Tools/Options/Writer: View
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- option_value(1) = Hilfslinien.IsChecked
- option_value(2) = FarbigeHandles.IsChecked
- option_value(3) = GrosseHandles.IsChecked
- option_value(4) = HorizontaleBildlaufleiste.IsChecked
- option_value(5) = VertikaleBildlaufleiste.IsChecked
- option_value(10) = Lineal.IsChecked
- option_value(6) = HorizontalesLineal.IsChecked
- option_value(7) = VertikalesLineal.IsChecked
- option_value(8) = WeichesScrollen.IsChecked
-
- measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
- measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
-
- '/// - all states inverting
- if option_value(1) = true then Hilfslinien.UnCheck else Hilfslinien.Check
- if option_value(2) = true then FarbigeHandles.UnCheck else FarbigeHandles.Check
- if option_value(3) = true then GrosseHandles.UnCheck else GrosseHandles.Check
- if option_value(4) = true then HorizontaleBildlaufleiste.UnCheck else HorizontaleBildlaufleiste.Check
- if option_value(5) = true then VertikaleBildlaufleiste.UnCheck else VertikaleBildlaufleiste.Check
- ' has to be checked to enable Horizontal and Vertical Ruler
- if option_value(10) = true then Lineal.UnCheck else Lineal.Check
- if Lineal.IsChecked = true then
- if option_value(6) = true then HorizontalesLineal.UnCheck else HorizontalesLineal.Check
- if option_value(7) = true then VertikalesLineal.UnCheck else VertikalesLineal.Check
- if ( HorizontalesLinealMasseinheit.GetItemCount <> measurement_unit(2) ) then
- HorizontalesLinealMasseinheit.Select (HorizontalesLinealMasseinheit.GetItemCount)
- else
- HorizontalesLinealMasseinheit.Select (1)
- end if
- if ( VertikalesLinealMasseinheit.GetItemCount <> measurement_unit(3) ) then
- VertikalesLinealMasseinheit.Select (VertikalesLinealMasseinheit.GetItemCount)
- else
- VertikalesLinealMasseinheit.Select (1)
- end if
- iTemp(2) = HorizontalesLinealMasseinheit.GetSelIndex
- iTemp(3) = VertikalesLinealMasseinheit.GetSelIndex
- '/// if Asian Language enabled there has to be a checkbox 'Right-aligned' for 'Vertical-Ruler' ///
- if bAsianLan=true and VertikalesLineal.IsChecked = true then
- if RechtsAusgerichtet.IsVisible = true then
- if option_value(9)= true then
- RechtsAusgerichtet.Uncheck
- else
- RechtsAusgerichtet.Check
- end if
- else
- Warnlog "- Checkbox 'Right-aligned' is not visible !"
- end if
- end if
- end if
- if option_value(8)= true then WeichesScrollen.UnCheck else WeichesScrollen.Check
-
- '/// close options dialog
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// - SO quit - restart
- Call wOfficeRestart
- '///- Tools/Options/Writer: View
- '/// - checking states
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
- if ( option_value(1) = Hilfslinien.IsChecked ) then WarnLog "Hilfslinien state changed"
- if ( option_value(2) = FarbigeHandles.IsChecked ) then WarnLog "FarbigeHandles state changed"
- if ( option_value(3) = GrosseHandles.IsChecked ) then WarnLog "GrosseHandles state changed"
- if ( option_value(4) = HorizontaleBildlaufleiste.IsChecked ) then WarnLog "HorizontaleBildlaufleiste state changed"
- if ( option_value(5) = VertikaleBildlaufleiste.IsChecked ) then WarnLog "VertikaleBildlaufleiste state changed"
- if ( option_value(8) = WeichesScrollen.IsChecked ) then WarnLog "WeichesScrollen state changed"
- if ( option_value(10) = Lineal.IsChecked ) then
- WarnLog "Ruler state changed"
- if ( option_value(6) = HorizontalesLineal.IsChecked ) then WarnLog "HorizontalesLineal state changed"
- if ( option_value(7) = VertikalesLineal.IsChecked ) then WarnLog "VertikalesLineal state changed"
- if ( HorizontalesLinealMasseinheit.GetSelIndex <> iTemp(2) ) then WarnLog "HorizontalesLinealMasseinheit state changed"
- if ( VertikalesLinealMasseinheit.GetSelIndex <> iTemp(3) ) then WarnLog "VertikalesLinealMasseinheit state changed"
-
- if bAsianLan=true and VertikalesLineal.IsChecked = true then
- if RechtsAusgerichtet.IsVisible = true then
- if option_value(9) = RechtsAusgerichtet.IsChecked then WarnLog "Right-aligned state changed"
- else
- Warnlog "- Checkbox 'Right-aligned' is not visible !"
- end if
- end if
- end if
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- Call wOptionsUndo( "All" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterView2
- dim option_value(11) as boolean
- dim measurement_unit(3) as integer
- dim iTemp(3) as integer
- '/// new writerdocument
- Call hNewDocument
-
- '///- Tools/Options/Writer: View
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- '/// remember settings
- option_value(1) = Hilfslinien.IsChecked
- option_value(2) = FarbigeHandles.IsChecked
- option_value(3) = GrosseHandles.IsChecked
- option_value(4) = HorizontaleBildlaufleiste.IsChecked
- option_value(5) = VertikaleBildlaufleiste.IsChecked
- option_value(10) = Lineal.IsChecked
- option_value(6) = HorizontalesLineal.IsChecked
- option_value(7) = VertikalesLineal.IsChecked
- option_value(8) = WeichesScrollen.IsChecked
-
- measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
- measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
-
- '/// - uncheck all checkboxes
- Hilfslinien.UnCheck
- FarbigeHandles.UnCheck
- GrosseHandles.UnCheck
-
- HorizontaleBildlaufleiste.UnCheck
- VertikaleBildlaufleiste.UnCheck
- Lineal.Check
- HorizontalesLineal.UnCheck
- if bAsianLan = true then
- VertikalesLineal.Check
- RechtsAusgerichtet.Uncheck
- end if
- VertikalesLineal.Uncheck
- HorizontalesLinealMasseinheit.Select (1)
- VertikalesLinealMasseinheit.Select (1)
- Lineal.Uncheck
- WeichesScrollen.Uncheck
-
- '/// close options-dialog
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// check if ViewRuler is disabled
- ViewTextBoundaries
- try
- ViewRuler
- Warnlog "View / Ruler should be disabled !"
- catch
- endcatch
-
- '/// - SO quit - restart
- Call wOfficeRestart
- '///- Tools/Options/Writer: View
- '/// - checking states
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
- if Hilfslinien.IsChecked = true then WarnLog "Hilfslinien x"
- if FarbigeHandles.IsChecked = true then WarnLog "FarbigeHandles x"
- if GrosseHandles.IsChecked = true then WarnLog "GrosseHandles x"
-
- if HorizontaleBildlaufleiste.IsChecked = true then WarnLog "HorizontaleBildlaufleiste x"
- if VertikaleBildlaufleiste.IsChecked = true then WarnLog "VertikaleBildlaufleiste x"
- if HorizontalesLineal.IsChecked = true then WarnLog "HorizontalesLineal x/ ViewRuler"
- if VertikalesLineal.IsChecked = true then WarnLog "VertikalesLineal x"
- if WeichesScrollen.IsChecked = true then WarnLog "WeichesScrollen x"
- if bAsianLan=true then
- if RechtsAusgerichtet.IsVisible = true then
- if RechtsAusgerichtet.IsEnabled = true then WarnLog "Right-aligned checkbox is enabled"
- else
- Warnlog "- Checkbox 'Right-aligned' is not visible !"
- end if
- end if
-
- if ( HorizontalesLinealMasseinheit.GetSelIndex <> 1 ) then WarnLog "HorizontalesLinealMasseinheit is not item 1"
- if ( VertikalesLinealMasseinheit.GetSelIndex <> 1 ) then WarnLog "VertikalesLinealMasseinheit is not item 1"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- Call wOptionsUndo( "All" )
-
- '/// close writer document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterView3
- dim option_value(11) as boolean
- dim measurement_unit(3) as integer
- dim iTemp(3) as integer
-
- '/// new writer document
- Call hNewDocument
-
- '///- Tools/Options/Writer: View
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- '/// remember all settings
- option_value(1) = Hilfslinien.IsChecked
- option_value(2) = FarbigeHandles.IsChecked
- option_value(3) = GrosseHandles.IsChecked
- option_value(4) = HorizontaleBildlaufleiste.IsChecked
- option_value(5) = VertikaleBildlaufleiste.IsChecked
- option_value(10) = Lineal.IsChecked
- option_value(6) = HorizontalesLineal.IsChecked
- option_value(7) = VertikalesLineal.IsChecked
- option_value(8) = WeichesScrollen.IsChecked
-
- measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
- measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
-
- '/// - check all checkboxes
- Hilfslinien.Check
- FarbigeHandles.Check
- GrosseHandles.Check
- Lineal.Check
- HorizontaleBildlaufleiste.Check
- VertikaleBildlaufleiste.Check
- HorizontalesLineal.Check
- VertikalesLineal.Check
- WeichesScrollen.Check
-
- HorizontalesLinealMasseinheit.Select (2)
- VertikalesLinealMasseinheit.Select (2)
- itemp(2) = HorizontalesLinealMasseinheit.GetSelIndex
- itemp(3) = VertikalesLinealMasseinheit.GetSelIndex
-
- '/// close options dialog
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- ViewTextBoundaries
- ViewRuler
-
- '/// - SO quit - restart
- Call wOfficeRestart
- '///- Tools/Options/Writer: View
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- '/// - check if all checked
- if Hilfslinien.IsChecked = false then WarnLog "Hilfslinien o"
- if FarbigeHandles.IsChecked = false then WarnLog "FarbigeHandles o"
- if GrosseHandles.IsChecked = false then WarnLog "GrosseHandles o"
-
- if HorizontaleBildlaufleiste.IsChecked = false then WarnLog "HorizontaleBildlaufleiste o"
- if VertikaleBildlaufleiste.IsChecked = false then WarnLog "VertikaleBildlaufleiste o"
- if HorizontalesLineal.IsChecked = false then WarnLog "HorizontalesLineal o/ ViewRuler"
- if VertikalesLineal.IsChecked = false then WarnLog "VertikalesLineal o"
- if WeichesScrollen.IsChecked = false then WarnLog "WeichesScrollen o"
-
- if ( HorizontalesLinealMasseinheit.GetSelIndex <> iTemp(2) ) then WarnLog "HorizontalesLinealMasseinheit is not item " + iTemp(2) + " it's: " + HorizontalesLinealMasseinheit.GetSelIndex
- if ( VertikalesLinealMasseinheit.GetSelIndex <> iTemp(3) ) then WarnLog "VertikalesLinealMasseinheit is not item " + iTemp(3) + " it's: " + VertikalesLinealMasseinheit.GetSelIndex
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- Call wOptionsUndo( "All" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterView4
- dim option_value(11) as boolean
- dim measurement_unit(3) as integer
- dim iTemp(3) as integer
- '/// new writer document
- printlog "- new writer document"
- Call hNewDocument
-
- '///- Tools/Options/Writer: View
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- '/// remember all values
- printlog "- remember all values"
- option_value(1) = Hilfslinien.IsChecked
- option_value(2) = FarbigeHandles.IsChecked
- option_value(3) = GrosseHandles.IsChecked
- option_value(4) = HorizontaleBildlaufleiste.IsChecked
- option_value(5) = VertikaleBildlaufleiste.IsChecked
- option_value(10) = Lineal.IsChecked
- option_value(6) = HorizontalesLineal.IsChecked
- option_value(7) = VertikalesLineal.IsChecked
- option_value(8) = WeichesScrollen.IsChecked
-
- measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
- measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
-
- '/// close options dialog
- printlog "- close options dialog"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Insert a table
- printlog "- insert a table"
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- TabelleEinfuegenWriter.OK
-
- '/// changing linewidth to 0
- printlog "- changing linewidth to 0"
- FormatTable
- Kontext
- active.SetPage TabUmrandung
- Kontext "TabUmrandung"
- Stil.Select 1
- TabUmrandung.Ok
- sleep (3)
-
- '/// insert a graphic
- printlog "- insert a graphic"
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<down>"
- DocumentWriter.TypeKeys "<down>"
-
- Call hGrafikEinfuegen ( gTesttoolPath + "writer\optional\input\options\ga000907.gif" )
-
- ' see everything
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- '///' Hilfslinien.Check only, when graphic's in motion! ///'
- printlog "- check values"
- FarbigeHandles.Check
- GrosseHandles.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
- printlog "- uncheck values"
- FarbigeHandles.UnCheck
- GrosseHandles.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- printlog "- set defaultsvalues in options"
- Call wOptionsUndo( "All" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterView5
- dim option_value(17) as boolean
-
- Call hNewDocument
- '/// open document: writer\\optional\\input\\options\\options1.sxw
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
-
- '///- Tools/Options/Writer: View
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","VIEW")
-
- option_value(1) = GrafikenUndObjekte.IsChecked
- option_value(2) = Zeichnungen.IsChecked
- option_value(3) = Feldname.IsChecked
- option_value(4) = Notizen.IsChecked
-
- printlog ("'/// - all states inverting ///")
-
- if option_value(1) then GrafikenUndObjekte.UnCheck else GrafikenUndObjekte.Check
- if option_value(2) then Zeichnungen.UnCheck else Zeichnungen.Check
- if option_value(3) then Feldname.UnCheck else Feldname.Check
- if option_value(4) then Notizen.UnCheck else Notizen.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- CALL wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- if ( option_value(1) = GrafikenUndObjekte.IsChecked ) then WarnLog "Graphics and objects state changed"
- if ( option_value(2) = Zeichnungen.IsChecked ) then WarnLog "Zeichnungen state changed"
- if ( option_value(3) = Feldname.IsChecked ) then WarnLog "Feldname state changed"
- if ( option_value(4) = Notizen.IsChecked ) then WarnLog "Notizen state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- printlog "- set defaultsvalues in options"
- Call wOptionsUndo( "All" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterView6
- dim option_value(17) as boolean
-
- Call hNewDocument
- '/// open document: writer\\optional\\input\\options\\options1.sxw
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
-
- '///- Tools/Options/Writer: View
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","VIEW")
-
- option_value(1) = GrafikenUndObjekte.IsChecked
- option_value(2) = Zeichnungen.IsChecked
- option_value(3) = Feldname.IsChecked
- option_value(4) = Notizen.IsChecked
-
- printlog ("'/// - all states unchecked ///")
-
- GrafikenUndObjekte.UnCheck
- Zeichnungen.UnCheck
- Feldname.UnCheck
- Notizen.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- CALL wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "VIEW" )
-
- if GrafikenUndObjekte.IsChecked then WarnLog "Graphics and objects x"
- if Zeichnungen.IsChecked then WarnLog "Zeichnungen x"
- if Feldname.IsChecked then WarnLog "Feldname x"
- if Notizen.IsChecked then WarnLog "Notizen x"
-
- printlog ("'/// - restore states ///")
- if ( option_value(1) = TRUE ) Then GrafikenUndObjekte.Check Else GrafikenUndObjekte.UnCheck
- if ( option_value(2) = TRUE ) Then Zeichnungen.Check Else Zeichnungen.UnCheck
- if ( option_value(3) = TRUE ) Then Feldname.Check Else Feldname.UnCheck
- if ( option_value(4) = TRUE ) Then Notizen.Check Else Notizen.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- printlog "- set defaultsvalues in options"
- Call wOptionsUndo( "All" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterView7
- dim option_value(17) as boolean
-
- Call hNewDocument
- '/// open document: writer\\optional\\input\\options\\options1.sxw
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
-
- '///- Tools/Options/Writer: View
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","VIEW")
-
- option_value(1) = GrafikenUndObjekte.IsChecked
- option_value(2) = Zeichnungen.IsChecked
- option_value(3) = Feldname.IsChecked
- option_value(4) = Notizen.IsChecked
-
- printlog ("'/// - all Check -> x ///")
-
- GrafikenUndObjekte.Check
- Zeichnungen.Check
- Feldname.Check
- Notizen.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- CALL wOfficeRestart
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- hToolsOptions ( "WRITER" , "VIEW" )
-
- if true <> GrafikenUndObjekte.IsChecked then WarnLog "Graphics and objects o"
- if true <> Zeichnungen.IsChecked then WarnLog "Zeichnungen o"
- if true <> Feldname.IsChecked then WarnLog "Feldname o"
- if true <> Notizen.IsChecked then WarnLog "Notizen o"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// restore default values
-' printlog "- set defaultsvalues in options"
-' Call wOptionsUndo( "All" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterGrid1
- dim option_value(3) as boolean
- dim sMetricField(4) as string ' MetricField
- dim sTempMetricField(4) as string
-
- '/// new writer document
-
- Call hNewDocument
-
- '/// Tools/Options/Writer: Grid
- printlog "- Tools/Options/Writer: Grid"
-
- '/// remember values
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
- printlog "- remember values"
- option_value(1) = FangrasterBenutzen.IsChecked
- option_value(2) = RasterSichtbar.IsChecked
- option_value(3) = AchsenSynchronisieren.IsChecked
-
- sMetricField(1) = RasterAufloesungXAchse.GetText
- sMetricField(2) = RasterAufloesungYAchse.GetText
- sMetricField(3) = RasterUnterteilungXAchse.GetText
- sMetricField(4) = RasterUnterteilungYAchse.GetText
-
- '/// - all states inverting
- printlog "- all states inverting"
-
- if option_value(1) then FangrasterBenutzen.UnCheck else FangrasterBenutzen.Check
- if option_value(2) then RasterSichtbar.UnCheck else RasterSichtbar.Check
- 'if option_value(3) then AchsenSynchronisieren.UnCheck else AchsenSynchronisieren.Check
- 'this CheckBox interacts with the MetricBoxes:
- AchsenSynchronisieren.UnCheck
-
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
- RasterAufloesungXAchse.ToMax
- RasterAufloesungYAchse.ToMin
- RasterUnterteilungXAchse.ToMin
- RasterUnterteilungYAchse.ToMax
- if ( RasterAufloesungXAchse.GetText = sTempMetricField(1) ) then RasterAufloesungXAchse.ToMin
- if ( RasterAufloesungYAchse.GetText = sTempMetricField(2) ) then RasterAufloesungYAchse.ToMax
- if ( RasterUnterteilungXAchse.GetText = sTempMetricField(3) ) then RasterUnterteilungXAchse.ToMax
- if ( RasterUnterteilungYAchse.GetText = sTempMetricField(4) ) then RasterUnterteilungYAchse.ToMin
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// - SO quit - start
- printlog "'- SO quit - start"
- Call wOfficeRestart
- '/// - checking states
- printlog "- checking states"
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
-
- if (option_value(1) = FangrasterBenutzen.IsChecked ) then WarnLog "FangrasterBenutzen state changed BugID: 82944 "
- if (option_value(2) = RasterSichtbar.IsChecked ) then WarnLog "RasterSichtbar state changed"
- 'if (option_value(3)= AchsenSynchronisieren.IsChecked ) then WarnLog "AchsenSynchronisieren state changed"
- if ( AchsenSynchronisieren.IsChecked = true ) then WarnLog "AchsenSynchronisieren state changed"
- if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) then WarnLog "RasterAufloesungXAchse state changed"
- if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) then WarnLog "RasterAufloesungYAchse state changed"
- if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) then WarnLog "RasterUnterteilungXAchse state changed"
- if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) then WarnLog "RasterUnterteilungYAchse state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- printlog "- set defaultsvalues in options"
- Call wOptionsUndo( "Grid" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterGrid2
- dim option_value(3) as boolean
- dim sMetricField(4) as string ' MetricField
- dim sTempMetricField(4) as string
-
- '/// new writer document
- Call hNewDocument
- '/// Tools/Options/Writer: Grid
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
-
- '/// remember values set
- option_value(1) = FangrasterBenutzen.IsChecked
- option_value(2) = RasterSichtbar.IsChecked
- option_value(3) = AchsenSynchronisieren.IsChecked
-
- sMetricField(1) = RasterAufloesungXAchse.GetText
- sMetricField(2) = RasterAufloesungYAchse.GetText
- sMetricField(3) = RasterUnterteilungXAchse.GetText
- sMetricField(4) = RasterUnterteilungYAchse.GetText
-
- printlog "- uncheck all checkboxes and set metric fields to min"
- '/// - uncheck all checkboxes and set metric fields to min
- FangrasterBenutzen.UnCheck
- RasterSichtbar.UnCheck
- AchsenSynchronisieren.UnCheck
-
- RasterAufloesungXAchse.ToMin
- RasterAufloesungYAchse.ToMin
- RasterUnterteilungXAchse.ToMin
- RasterUnterteilungYAchse.ToMin
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
-
- RasterAufloesungXAchse.More
- RasterAufloesungYAchse.More
- RasterUnterteilungXAchse.More
- RasterUnterteilungYAchse.More
- if ( sTempMetricField(1) = RasterAufloesungXAchse.GetText ) then WarnLog "RasterAufloesungXAchse More-Button not working"
- if ( sTempMetricField(2) = RasterAufloesungYAchse.GetText ) then WarnLog "RasterAufloesungYAchse More-Button not working"
- if ( sTempMetricField(3) = RasterUnterteilungXAchse.GetText ) then WarnLog "RasterUnterteilungXAchse More-Button not working"
- if ( sTempMetricField(4) = RasterUnterteilungYAchse.GetText ) then WarnLog "RasterUnterteilungYAchse More-Button not working"
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// SO quit - start
- printlog "- SO quit - start"
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
-
- if FangrasterBenutzen.IsChecked then WarnLog "FangrasterBenutzen x"
- if RasterSichtbar.IsChecked then WarnLog "RasterSichtbar x"
- if AchsenSynchronisieren.IsChecked then WarnLog "AchsenSynchronisieren x"
- if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) then WarnLog "RasterAufloesungXAchse is not min."
- if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) then WarnLog "RasterAufloesungYAchse is not min."
- if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) then WarnLog "RasterUnterteilungXAchse is not min."
- if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) then WarnLog "RasterUnterteilungYAchse is not min."
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- printlog "- set defaultsvalues in options"
- Call wOptionsUndo( "Grid" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterGrid3
- dim option_value(3) as boolean
- dim sMetricField(4) as string ' MetricField
- dim sTempMetricField(4) as string
-
- '/// New document
- Call hNewDocument
- printlog "'///- Tools/Options/Writer: Grid ///"
- '/// Tools/Options/Writer: Grid
- printlog ("'/// - save states ///")
- '/// remember values
-
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
- option_value(1) = FangrasterBenutzen.IsChecked
- option_value(2) = RasterSichtbar.IsChecked
- option_value(3) = AchsenSynchronisieren.IsChecked
-
- sMetricField(1) = RasterAufloesungXAchse.GetText
- sMetricField(2) = RasterAufloesungYAchse.GetText
- sMetricField(3) = RasterUnterteilungXAchse.GetText
- sMetricField(4) = RasterUnterteilungYAchse.GetText
-
- printlog "- all Check"
- '/// check all values
- FangrasterBenutzen.Check
- RasterSichtbar.Check
- AchsenSynchronisieren.Check
-
- '///' Synchronize axes check -------------------- ///'
- RasterAufloesungXAchse.ToMax
- wait 500
- sTempMetricField(1) = RasterAufloesungXAchse.GetText
- if RasterAufloesungYAchse.GetText <> sTempMetricField(1) then Warnlog "Y-axis res. differs from X-axis"
- RasterUnterteilungXAchse.ToMax
- wait 500
- sTempMetricField(3) = RasterUnterteilungXAchse.GetText
- if RasterUnterteilungYAchse.GetText <> sTempMetricField(3) then Warnlog "Y-axis sub. differs from X-axis"
- sTempMetricField(2) = RasterAufloesungYAchse.GetText
- sTempMetricField(4) = RasterUnterteilungYAchse.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
-
- if FangrasterBenutzen.IsChecked = false then WarnLog "FangrasterBenutzen o"
- if RasterSichtbar.IsChecked = false then WarnLog "RasterSichtbar o"
- if AchsenSynchronisieren.IsChecked = false then WarnLog "AchsenSynchronisieren o"
- if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) then WarnLog "RasterAufloesungXAchse is not max.Bug 54934 in 01:"
- if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) then WarnLog "RasterAufloesungYAchse is not max."
- if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) then WarnLog "RasterUnterteilungXAchse is not max."
- if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) then WarnLog "RasterUnterteilungYAchse is not max."
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// restore default values
- printlog "- set defaultsvalues in options"
- Call wOptionsUndo( "Grid" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterGrid4
- dim option_value(3) as boolean
- dim sMetricField(4) as string ' MetricField
- dim sTempMetricField(4) as string
-
- '/// new writer document
-
- Call hNewDocument
-
- printlog "'///- Tools/Options/Writer: Grid ///"
-
- printlog ("'/// - save states ///")
-
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
-
- printlog ("'///TabRaster all UnCheck ! ///")
-
- option_value(1) = FangrasterBenutzen.IsChecked
- option_value(2) = RasterSichtbar.IsChecked
- option_value(3) = AchsenSynchronisieren.IsChecked
-
- sMetricField(1) = RasterAufloesungXAchse.GetText
- sMetricField(2) = RasterAufloesungYAchse.GetText
- sMetricField(3) = RasterUnterteilungXAchse.GetText
- sMetricField(4) = RasterUnterteilungYAchse.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- printlog ("'/// Function Test: Grid Resolution ///'")
- '/// ( gTesttoolPath + "writer\optional\input\options\gridtst.sxw" ) ///'
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\gridtst.sxw", False )
-
-
- ' select grafik element
- Call wNavigatorAuswahl(4,1)
-
- ' check if @ (0,0) Pineapples ;-)
- wait 500
- ViewNavigator
- wait 500
- FormatGraphics
- wait 500
- Kontext
- Active.SetPage TabType
- Kontext "TabType"
- wait 500
- if ( StrToDouble (HorizontalBy.GetText) <> 0 ) then WarnLog "HorizontalBy wrong presupposition != 0"
- if ( StrToDouble (VerticalBy.GetText) <> 0 ) then WarnLog "VerticalBy wrong presupposition != 0"
- TabType.Cancel
- sleep (3)
-
- ' change Grid Resolution
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GRID" )
- AchsenSynchronisieren.Uncheck
- RasterAufloesungXAchse.SetText("2")
- RasterAufloesungYAchse.SetText("3")
- RasterUnterteilungXAchse.SetText("2")
- RasterUnterteilungYAchse.SetText("3")
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// move grafik with <Alt> + <up/down> ///'
- '/// resulting step = 1 Step = 0.10cm ///'
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Mod2 Down>", 45
- sleep (3)
- DocumentWriter.TypeKeys "<Mod2 Right>", 45
-
- ' check if @ (1,1) Current-Measure-Unit :-)
- Call wNavigatorAuswahl(4,1)
- ViewNavigator
- sleep (3)
- try
- FormatGraphics
- catch
- printlog "why is formatgraphics not enabled ????!!! wrong focus??"
- endcatch
- Kontext "TabType"
- ' This value depends on the current screensize, so I check only if value have changed!!
- if ( 0 = StrToDouble (HorizontalBy.GetText)) then WarnLog "RasterAufloesungXAchse has not been changed !"
- if ( 0 = StrToDouble (VerticalBy.GetText)) then WarnLog "RasterAufloesungYAchse has not been changed!"
- TabType.Cancel
-
- Call hCloseDocument
- Call hNewDocument
-
- '/// restore default values
- printlog "- set defaultsvalues in options"
- Call wOptionsUndo( "Grid" )
-
- '/// close document
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/option/wr_o_2.inc b/testautomation/writer/optional/includes/option/wr_o_2.inc
deleted file mode 100644
index 4c5cdc95391f..000000000000
--- a/testautomation/writer/optional/includes/option/wr_o_2.inc
+++ /dev/null
@@ -1,990 +0,0 @@
- '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@oracle.com
-'*
-'* short description : Functional-Tests for Tools-Options-Writer-DefaultFont, Print, Table
-'*
-'\***********************************************************************
-
-sub wr_o_2
- Dim temp as boolean
-
- Call tToolsOptionsWriterDefaultfont("BASICFONTS")
- Call tToolsOptionsWriterPrint
- ' is located in wr_o_a.inc
- Call tToolsOptionsWriterPrint1
- Call tToolsOptionsWriterTable
- Call tToolsOptionsWriterTable1
- ' is located in wr_o_a.inc
- Call tToolsOptionsWriterTableMove
- Call tToolsOptionsWriterTableInsert
- Call tToolsOptionsWriterTableEffects
- Call tToolsOptionsWriterTableEffects2
-end sub
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterDefaultfont (WestOrEast as string)
-
- Dim bCheckboxes(1) as boolean ' Checkbox states
- Dim iListBox(5) as integer ' ListBox
- Dim sListBox(5) as String
- Dim iListBoxSize(5) as integer ' ListBox
- Dim sListBoxSize(5) as String
- Dim iTempListBox(5) as integer
- Dim sTempListBox(5) as String
- Dim iTempListBoxSize(5) as integer
- Dim sTempListBoxSize(5) as String
- Dim sInitFont(5) as String
- Dim sInitFontSize(5) as String
- Dim i as integer
- Dim x as integer
- Dim sFileName as string
- Dim sTempS as String
-
- '/// Got called two times ///'
- '///+ 1. for the western- ///'
- '///+ 2. for the asian font page ///'
-
- Call hNewDocument
- ' Remember the init-font directly after installation
- ToolsOptions
- Call hToolsOptions ("WRITER",WestOrEast)
- Standard.Click
- sInitFont(1) = StandardSchrift.GetSelText
- sInitFont(2) = Ueberschrift.GetSelText
- sInitFont(3) = Liste.GetSelText
- sInitFont(4) = Beschriftung.GetSelText
- sInitFont(5) = Verzeichnis.GetSelText
- sInitFontSize(1) = StandardSchriftGroesse.GetSelText
- sInitFontSize(2) = UeberschriftGroesse.GetSelText
- sInitFontSize(3) = ListeGroesse.GetSelText
- sInitFontSize(4) = BeschriftungGroesse.GetSelText
- sInitFontSize(5) = VerzeichnisGroesse.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- if (Ucase(WestOrEast) = "BASICFONTSASIAN") then
- printlog "------------ ASIAN FONTS -------------"
- warnlog "TBO: don't know how it get's handeld, so don't pay ANY attention to warnlogs :-)"
- sFileName = gTesttoolPath + "writer\optional\input\options\options2.sxw"
- else
- printlog "------------ WESTERN FONTS -------------"
- Call ActiveDeactivateAsianSupport(False)
- sFileName = gTesttoolPath + "writer\optional\input\options\options2.sxw"
- end if
-
- '/// use a document to check the font with styles///'
- '///+ use 'input\\writer\\optional\\options\\options2.sxw' ///
- hFileOpenLocally( sFileName )
-
- printlog "- Tools/Options/Writer: DefaultFont"
-
- printlog ("/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER",WestOrEast)
-
- bCheckboxes(1) = AktuellesDokument.IsChecked
- iListBox(1) = StandardSchrift.GetSelIndex
- iListBox(2) = Ueberschrift.GetSelIndex
- iListBox(3) = Liste.GetSelIndex
- iListBox(4) = Beschriftung.GetSelIndex
- iListBox(5) = Verzeichnis.GetSelIndex
- sListBox(1) = StandardSchrift.GetSelText
- sListBox(2) = Ueberschrift.GetSelText
- sListBox(3) = Liste.GetSelText
- sListBox(4) = Beschriftung.GetSelText
- sListBox(5) = Verzeichnis.GetSelText
-
- iListBoxSize(1) = StandardSchriftGroesse.GetSelIndex
- iListBoxSize(2) = UeberschriftGroesse.GetSelIndex
- iListBoxSize(3) = ListeGroesse.GetSelIndex
- iListBoxSize(4) = BeschriftungGroesse.GetSelIndex
- iListBoxSize(5) = VerzeichnisGroesse.GetSelIndex
- sListBoxSize(1) = StandardSchriftGroesse.GetSelText
- sListBoxSize(2) = UeberschriftGroesse.GetSelText
- sListBoxSize(3) = ListeGroesse.GetSelText
- sListBoxSize(4) = BeschriftungGroesse.GetSelText
- sListBoxSize(5) = VerzeichnisGroesse.GetSelText
-
- printlog ("'/// - all states inverting ///")
-
- AktuellesDokument.UnCheck
- if ( StandardSchrift.GetItemCount > iListBox(1) ) then StandardSchrift.Select(iListBox(1) + 2) else StandardSchrift.Select(iListBox(1)-1)
- if ( Ueberschrift.GetItemCount > iListBox(2) and iListBox(2) > 1 ) then Ueberschrift.Select(iListBox(2)-1) else Ueberschrift.Select(iListBox(2)+1)
- if ( Liste.GetItemCount > iListBox(3) ) then Liste.Select (iListBox(3) + 1) else Liste.Select(iListBox(3)-1)
- if ( Beschriftung.GetItemCount > iListBox(4) and iListBox(4) > 1 ) then Beschriftung.Select (iListBox(4)-1) else Beschriftung.Select(iListBox(4)+1)
- if ( Verzeichnis.GetItemCount > iListBox(5) ) then Verzeichnis.Select (iListBox(5) + 1) else Verzeichnis.Select(iListBox(5)-1)
-
- if ( StandardSchriftGroesse.GetItemCount > iListBoxSize(1) ) then StandardSchriftGroesse.Select(iListBoxSize(1) + 2) else StandardSchriftGroesse.Select(iListBox(1)-1)
- if ( UeberschriftGroesse.GetItemCount > iListBoxSize(2) and iListBoxSize(2) > 1 ) then UeberschriftGroesse.Select(iListBoxSize(2)-1) else UeberschriftGroesse.Select(iListBoxSize(2)+1)
- if ( ListeGroesse.GetItemCount > iListBoxSize(3) ) then ListeGroesse.Select (iListBoxSize(3) + 1) else ListeGroesse.Select(iListBoxSize(3)-1)
- if ( BeschriftungGroesse.GetItemCount > iListBoxSize(4) and iListBoxSize(4) > 1 ) then BeschriftungGroesse.Select (iListBoxSize(4)-1) else BeschriftungGroesse.Select(iListBoxSize(4)+1)
- if ( VerzeichnisGroesse.GetItemCount > iListBoxSize(5) ) then VerzeichnisGroesse.Select (iListBoxSize(5) + 1) else VerzeichnisGroesse.Select(iListBoxSize(5)-1)
-
- iTempListBox(1) = StandardSchrift.GetSelIndex
- iTempListBox(2) = Ueberschrift.GetSelIndex
- iTempListBox(3) = Liste.GetSelIndex
- iTempListBox(4) = Beschriftung.GetSelIndex
- iTempListBox(5) = Verzeichnis.GetSelIndex
-
- sTempListBox(1) = StandardSchrift.GetSelText
- sTempListBox(2) = Ueberschrift.GetSelText
- sTempListBox(3) = Liste.GetSelText
- sTempListBox(4) = Beschriftung.GetSelText
- sTempListBox(5) = Verzeichnis.GetSelText
-
- iTempListBoxSize(1) = StandardSchriftGroesse.GetSelIndex
- iTempListBoxSize(2) = UeberschriftGroesse.GetSelIndex
- iTempListBoxSize(3) = ListeGroesse.GetSelIndex
- iTempListBoxSize(4) = BeschriftungGroesse.GetSelIndex
- iTempListBoxSize(5) = VerzeichnisGroesse.GetSelIndex
-
- sTempListBoxSize(1) = StandardSchriftGroesse.GetSelText
- sTempListBoxSize(2) = UeberschriftGroesse.GetSelText
- sTempListBoxSize(3) = ListeGroesse.GetSelText
- sTempListBoxSize(4) = BeschriftungGroesse.GetSelText
- sTempListBoxSize(5) = VerzeichnisGroesse.GetSelText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- Printlog "'/// - check whether fonts get changed in doc. ///"
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up>", 5
- Call wTypeKeys "<Home><Right>"
- sTempS = wGetCharacterFont()
- if sTempS <> sTempListBox(1) then Warnlog "Default font: state changed is: "+sTempS+" ;should: "+sTempListBox(1)+" : "+iTempListBox(1)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sTempListBox(2) then Warnlog "Heading font: state changed is: "+sTempS+" ;should: "+sTempListBox(2)+" : "+iTempListBox(2)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sTempListBox(3) then Warnlog "List font: state changed is: "+sTempS+" ;should: "+sTempListBox(3)+" : "+iTempListBox(3)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sTempListBox(4) then Warnlog "Caption font: state changed is: "+sTempS+" ;should: "+sTempListBox(4)+" : "+iTempListBox(4)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sTempListBox(5) then Warnlog "Index font: state changed is: "+sTempS+" ;should: "+sTempListBox(5)+" : "+iTempListBox(5)
-
- Call wTypeKeys "<Mod1 Home><Right>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sTempListBoxSize(1) then Warnlog "Default fontsize: state changed is: "+sTempS+" ;should: "+sTempListBoxSize(1)+" : "+iTempListBoxSize(1)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sTempListBoxSize(2) then Warnlog "Heading fontsize: state changed is: "+sTempS+" ;should: "+sTempListBoxSize(2)+" : "+iTempListBoxSize(2)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sTempListBoxSize(3) then Warnlog "List fontsize: state changed is: "+sTempS+" ;should: "+sTempListBoxSize(3)+" : "+iTempListBoxSize(3)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sTempListBoxSize(4) then Warnlog "Caption fontsize: state changed is: "+sTempS+" ;should: "+sTempListBoxSize(4)+" : "+iTempListBoxSize(4)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sTempListBoxSize(5) then Warnlog "Index fontsize: state changed is: "+sTempS+" ;should: "+sTempListBoxSize(5)+" : "+iTempListBoxSize(5)
-
- printlog (" - SO quit - start" )
-
- Call wOfficeRestart
- WaitSlot (2)
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , WestOrEast )
-
- if ( AktuellesDokument.IsChecked = TRUE ) then WarnLog "Current document only state changed"
- if ( StandardSchrift.GetSelIndex <> iTempListBox(1) ) then WarnLog "Default font state changed"
- if ( Ueberschrift.GetSelIndex <> iTempListBox(2) ) then WarnLog "Heading font state changed"
- if ( Liste.GetSelIndex <> iTempListBox(3) ) then WarnLog "List font state changed"
- if ( Beschriftung.GetSelIndex <> iTempListBox(4) ) then WarnLog "Caption font state changed"
- if ( Verzeichnis.GetSelIndex <> iTempListBox(5) ) then WarnLog "Index state changed"
-
- if ( StandardSchriftGroesse.GetSelIndex <> iTempListBoxSize(1) ) then WarnLog "Default fontsize state changed"
- if ( UeberschriftGroesse.GetSelIndex <> iTempListBoxSize(2) ) then WarnLog "Heading fontsize state changed"
- if ( ListeGroesse.GetSelIndex <> iTempListBoxSize(3) ) then WarnLog "List fontsize state changed"
- if ( BeschriftungGroesse.GetSelIndex <> iTempListBoxSize(4) ) then WarnLog "Caption fontsize state changed"
- if ( VerzeichnisGroesse.GetSelIndex <> iTempListBoxSize(5) ) then WarnLog "Index fontsize state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- Printlog "'/// - verify global settings don't affect saved Document ///"
- '///+ use input\\writer\\optional\\options\\options2.sxw ///
- hFileOpenLocally( sFileName )
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up>", 5
- Call wTypeKeys "<Home><Right>"
-
- sTempS = wGetCharacterFont()
- if sTempS <> sListBox(1) then Warnlog "Default font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBox(1)+" : "+iListBox(1)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sListBox(2) then Warnlog "Heading font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBox(2)+" : "+iListBox(2)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sListBox(3) then Warnlog "List font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBox(3)+" : "+iListBox(3)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sListBox(4) then Warnlog "Caption font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBox(4)+" : "+iListBox(4)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFont()
- if sTempS <> sListBox(5) then Warnlog "Index font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBox(5)+" : "+iListBox(5)
-
- Call wTypeKeys "<Mod1 Home><Right>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sListBoxSize(1) then Warnlog "Default font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBoxSize(1)+" : "+iListBoxSize(1)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sListBoxSize(2) then Warnlog "Heading font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBoxSize(2)+" : "+iListBoxSize(2)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sListBoxSize(3) then Warnlog "List font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBoxSize(3)+" : "+iListBoxSize(3)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sListBoxSize(4) then Warnlog "Caption font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBoxSize(4)+" : "+iListBoxSize(4)
- Call wTypeKeys "<Down>"
- sTempS = wGetCharacterFontSize()
- if sTempS <> sListBoxSize(5) then Warnlog "Index font: Writer changed Font !?! is: "+sTempS+" ;should: "+sListBoxSize(5)+" : "+iListBoxSize(5)
-
- Call hCloseDocument
- Call hNewDocument
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , WestOrEast )
-
- if AktuellesDokument.IsEnabled = true then
- AktuellesDokument.Check
- else
- ' Workraound: Sometimes checkbox is disabled...don't know why
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- WaitSlot (1)
- ToolsOptions
- Call hToolsOptions ( "WRITER" , WestOrEast )
- AktuellesDokument.Check
- end if
-
- StandardSchrift.Select(1)
- Ueberschrift.Select(1)
- Liste.Select(1)
- Beschriftung.Select(1)
- Verzeichnis.Select(1)
-
- StandardSchriftGroesse.Select(1)
- UeberschriftGroesse.Select(1)
- ListeGroesse.Select(1)
- BeschriftungGroesse.Select(1)
- VerzeichnisGroesse.Select(1)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , WestOrEast )
-
- if ( AktuellesDokument.IsChecked <> True ) then WarnLog "Current document only is not checked anymore"
- if ( StandardSchrift.GetSelIndex <> 1 ) then WarnLog "Default font is not item 1"
- if ( Ueberschrift.GetSelIndex <> 1 ) then WarnLog "Heading font is not item 1"
- if ( Liste.GetSelIndex <> 1 ) then WarnLog "List font is not item 1"
- if ( Beschriftung.GetSelIndex <> 1 ) then WarnLog "Caption font is not item 1"
- if ( Verzeichnis.GetSelIndex <> 1 ) then WarnLog "Index font is not item 1"
-
- if ( StandardSchriftGroesse.GetSelIndex <> 1 ) then WarnLog "Default fontsize is not item 1"
- if ( UeberschriftGroesse.GetSelIndex <> 1 ) then WarnLog "Heading fontsize is not item 1"
- if ( ListeGroesse.GetSelIndex <> 1 ) then WarnLog "List fontsize is not item 1"
- if ( BeschriftungGroesse.GetSelIndex <> 1 ) then WarnLog "Caption fontsize is not item 1"
- if ( VerzeichnisGroesse.GetSelIndex <> 1 ) then WarnLog "Index fontsize is not item 1"
-
- Printlog ("'/// - all Check -> x ///")
-
- Sleep 1
- AktuellesDokument.Check
- StandardSchrift.Select(StandardSchrift.GetItemCount)
- Ueberschrift.Select (Ueberschrift.GetItemCount )
- Liste.Select (Liste.GetItemCount )
- Beschriftung.Select (Beschriftung.GetItemCount )
- Verzeichnis.Select (Verzeichnis.GetItemCount )
-
- StandardSchriftGroesse.Select(StandardSchriftGroesse.GetItemCount)
- UeberschriftGroesse.Select (UeberschriftGroesse.GetItemCount )
- ListeGroesse.Select (ListeGroesse.GetItemCount )
- BeschriftungGroesse.Select (BeschriftungGroesse.GetItemCount )
- VerzeichnisGroesse.Select (VerzeichnisGroesse.GetItemCount )
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , WestOrEast )
-
- if not AktuellesDokument.IsChecked then WarnLog "AktuellesDokument o"
- if ( StandardSchrift.GetSelIndex <> StandardSchrift.GetItemCount ) then WarnLog "Default font is not item (GetItemCount):"+StandardSchrift.GetSelIndex
- if ( Ueberschrift.GetSelIndex <> Ueberschrift.GetItemCount ) then WarnLog "Heading font is not item (GetItemCount)"
- if ( Liste.GetSelIndex <> Liste.GetItemCount ) then WarnLog "List font is not item (GetItemCount)"
- if ( Beschriftung.GetSelIndex <> Beschriftung.GetItemCount ) then WarnLog "Caption font is not item (GetItemCount)"
- if ( Verzeichnis.GetSelIndex <> Verzeichnis.GetItemCount ) then WarnLog "Index font is not item (GetItemCount)"
-
- if ( StandardSchriftGroesse.GetSelIndex <> StandardSchriftGroesse.GetItemCount ) then WarnLog "Default fontsize is not item (GetItemCount):"+StandardSchrift.GetSelIndex
- if ( UeberschriftGroesse.GetSelIndex <> UeberschriftGroesse.GetItemCount ) then WarnLog "Heading fontsize is not item (GetItemCount)"
- if ( ListeGroesse.GetSelIndex <> ListeGroesse.GetItemCount ) then WarnLog "List fontsize is not item (GetItemCount)"
- if ( BeschriftungGroesse.GetSelIndex <> BeschriftungGroesse.GetItemCount ) then WarnLog "Caption fontsize is not item (GetItemCount)"
- if ( VerzeichnisGroesse.GetSelIndex <> VerzeichnisGroesse.GetItemCount ) then WarnLog "Index fontsize is not item (GetItemCount)"
-
- printlog ("'/// - check Default Button ///")
- Standard.Click ' mal schauen, ob vorhanden...
-
- if ( StandardSchrift.GetSelText <> sInitFont(1) ) then WarnLog "Default not init font!"
- if ( Ueberschrift.GetSelText <> sInitFont(2) ) then WarnLog "Heading not init font! BUGID: 89816"
- if ( Liste.GetSelText <> sInitFont(3) ) then WarnLog "List not init font!"
- if ( Beschriftung.GetSelText <> sInitFont(4) ) then WarnLog "Caption not init font!"
- if ( Verzeichnis.GetSelText <> sInitFont(5) ) then WarnLog "Index not init font!"
-
- if ( StandardSchriftGroesse.GetSelText <> sInitFontSize(1) ) then WarnLog "Default fontsize not init font!"
- if ( UeberschriftGroesse.GetSelText <> sInitFontSize(2) ) then WarnLog "Heading fontsize not init font! BUGID: 89816"
- if ( ListeGroesse.GetSelText <> sInitFontSize(3) ) then WarnLog "List fontsize not init font!"
- if ( BeschriftungGroesse.GetSelText <> sInitFontSize(4) ) then WarnLog "Caption fontsize not init font!"
- if ( VerzeichnisGroesse.GetSelText <> sInitFontSize(5) ) then WarnLog "Index fontsize not init font!"
- AktuellesDokument.Uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- '/// Open a new docuent and check fonts for default
- Call hNewDocument
- ToolsOptions
- Call hToolsOptions ( "WRITER" , WestOrEast )
-
- if ( StandardSchrift.GetSelText <> sInitFont(1) ) then warnlog "Default not init font!"
- if ( Ueberschrift.GetSelText <> sInitFont(2) ) then warnlog "Heading not init font! BUGID: 89816"
- if ( Liste.GetSelText <> sInitFont(3) ) then warnlog "List not init font!"
- if ( Beschriftung.GetSelText <> sInitFont(4) ) then warnlog "Caption not init font!"
- if ( Verzeichnis.GetSelText <> sInitFont(5) ) then warnlog "Index not init font!"
-
- if ( StandardSchriftGroesse.GetSelText <> sInitFontSize(1) ) then warnlog "Default fontsize not init font!"
- if ( UeberschriftGroesse.GetSelText <> sInitFontSize(2) ) then warnlog "Heading fontsize not init font! BUGID: 89816"
- if ( ListeGroesse.GetSelText <> sInitFontSize(3) ) then warnlog "List fontsize not init font!"
- if ( BeschriftungGroesse.GetSelText <> sInitFontSize(4) ) then warnlog "Caption fontsize not init font!"
- if ( VerzeichnisGroesse.GetSelText <> sInitFontSize(5) ) then warnlog "Index fontsize not init font!"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- Call hCloseDocument
- Call hNewDocument
-
- printlog ("'/// - restore states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , WestOrEast )
-
- if ( bCheckboxes(1) = TRUE ) then AktuellesDokument.Check else AktuellesDokument.UnCheck
- StandardSchrift.SetText (sListBox(1))
- Ueberschrift.SetText (sListBox(2))
- Liste.SetText (sListBox(3))
- Beschriftung.SetText (sListBox(4))
- Verzeichnis.SetText (sListBox(5))
-
- StandardSchriftGroesse.SetText (sListBoxSize(1))
- UeberschriftGroesse.SetText (sListBoxSize(2))
- ListeGroesse.SetText (sListBoxSize(3))
- BeschriftungGroesse.SetText (sListBoxSize(4))
- VerzeichnisGroesse.SetText (sListBoxSize(5))
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterPrint1
- Dim bCheckboxes(13) as boolean ' Checkbox states
- Dim iListBox(1) as string ' ListBox
- Dim iTempListBox(1) as string
- Dim bRadioBut(4) as boolean ' RadioButtons
- Dim bTempRadioBut(4) as boolean
- Dim i as integer, sWriterFilter as string
- Dim WriterFilterExtension(10) as string
- WriterFilterExtension() = hGetFilternameExtension ( "writer8" )
-
- ' sMetricField(i) and sTempMetricField(i)
- '(1) = Grafiken
- '(2) = Tabellen
- '(4) = Kontrollfelder
- '(5) = Hintergrund
- '(6) = SchwarzDrucken
- '
- '(7) = LinkeSeiten
- '(8) = RechteSeiten
- '(10)= Prospekt
- '
- '(11)= EinzelneDruckauftraege
- '(12)= AusDruckereinstellung
-
- ' bRadioBut(i) and bTempRadioBut(i) / RadioButton
- '(1) = Keine
- '(2) = NurNotizen
- '(3) = Dokumentende
- '(4) = Seitenende
-
- '/// uses "input\\writer\\optional\\options\\options3.sxw" ///
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\options3.sxw" )
-
- printlog "'///- Tools/Options/Writer: PrintWriter ///"
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","PRINT")
-
- bCheckboxes(1) = Grafiken.IsChecked
- bCheckboxes(2) = Kontrollfelder.IsChecked
- bCheckboxes(3) = Hintergrund.IsChecked
- bCheckboxes(4) = SchwarzDrucken.IsChecked
- bCheckboxes(5) = HiddenText.IsChecked
- bCheckboxes(6) = TextPlaceholder.IsChecked
-
- bCheckboxes(7) = LinkeSeiten.IsChecked
- bCheckboxes(8) = RechteSeiten.IsChecked
- bCheckboxes(9)= Prospekt.IsChecked
-
- bCheckboxes(10)= LeereSeitenDrucken.IsChecked
- bCheckboxes(11)= AusDruckereinstellung.IsChecked
-
- iListBox(1) = Fax.GetSelText
-
- bRadioBut(1) = Keine.IsChecked
- bRadioBut(2) = NurNotizen.IsChecked
- bRadioBut(3) = Dokumentende.IsChecked
- bRadioBut(4) = Seitenende.IsChecked
-
- printlog ("'/// - all states inverting ///")
-
- if bCheckboxes(1) then Grafiken.UnCheck else Grafiken.Check
- if bCheckboxes(2) then Kontrollfelder.UnCheck else Kontrollfelder.Check
- if bCheckboxes(3) then Hintergrund.UnCheck else Hintergrund.Check
- if bCheckboxes(4) then SchwarzDrucken.UnCheck else SchwarzDrucken.Check
- if bCheckboxes(5) then HiddenText.UnCheck else HiddenText.Check
- if bCheckboxes(6) then TextPlaceholder.UnCheck else TextPlaceholder.Check
-
- if bCheckboxes(7) then LinkeSeiten.UnCheck else LinkeSeiten.Check
- if bCheckboxes(8) then RechteSeiten.UnCheck else RechteSeiten.Check
- if bCheckboxes(9) then Prospekt.UnCheck else Prospekt.Check
-
- if bCheckboxes(10) then LeereSeitenDrucken.UnCheck else LeereSeitenDrucken.Check
- if bCheckboxes(11) then AusDruckereinstellung.UnCheck else AusDruckereinstellung.Check
-
- if Keine.IsEnabled then
- if (Keine.IsChecked = True) then
- NurNotizen.Check
- else
- Keine.Check
- endif
- endif
-
- bTempRadioBut(1) = Keine.IsChecked
- bTempRadioBut(2) = NurNotizen.IsChecked
- bTempRadioBut(3) = Dokumentende.IsChecked
- bTempRadioBut(4) = Seitenende.IsChecked
-
- try
- if (NO_REAL_PRINT = False) then FL_Drucken
- for i = 1 to 10
- Kontext "Druckbestaetigung"
- if Druckbestaetigung.Exists then
- Sleep 1
- else
- i = 100
- end if
- next i
- catch
- print " :::::::::::::::wr2::::::test d1"
- endcatch
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- printlog Active.Gettext
- try
- Active.Ok
- catch
- Active.Yes
- endcatch
- end if
- end if
- Kontext "TabDruckenWriter"
- wait 500
- if Fax.GetSelText <> iListBox(1) then
- Fax.Select (Fax.GetItemCount)
- else
- Fax.Select(1)
- end if
- iTempListBox(1) = Fax.GetSelIndex
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
- Call hFileSaveAsWithFilterKill(gOfficepath + "user\work\printtest." & WriterFilterExtension(0) , "writer8")
-
- printlog ("'/// - SO quit - start ///")
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "PRINT" )
-
- if ( bCheckboxes(1) = Grafiken.IsChecked ) then WarnLog "Grafiken state changed"
- if ( bCheckboxes(2) = Kontrollfelder.IsChecked ) then WarnLog "Kontrollfelder state changed"
- if ( bCheckboxes(3) = Hintergrund.IsChecked ) then WarnLog "Hintergrund state changed"
- if ( bCheckboxes(4) = SchwarzDrucken.IsChecked ) then WarnLog "SchwarzDrucken state changed"
- if ( bCheckboxes(5) = HiddenText.IsChecked ) then WarnLog "HiddenText state changed"
- if ( bCheckboxes(6) = TextPlaceholder.IsChecked ) then WarnLog "TextPlaceholder state changed"
-
- if ( bCheckboxes(7) = LinkeSeiten.IsChecked ) then WarnLog "LinkeSeiten state changed"
- if ( bCheckboxes(8) = RechteSeiten.IsChecked ) then WarnLog "RechteSeiten state changed"
- if ( bCheckboxes(9)= Prospekt.IsChecked ) then WarnLog "Prospekt state changed"
-
- if ( bCheckboxes(10)= LeereSeitenDrucken.IsChecked ) then WarnLog "'Print automatically inserted blank pages' state changed"
- if ( bCheckboxes(11)= AusDruckereinstellung.IsChecked ) then WarnLog "AusDruckereinstellung state changed"
-
- if ( Fax.GetSelIndex <> iTempListBox(1) ) Then warnlog "Fax state changed"
-
- if ( bTempRadioBut(1) <> Keine.IsChecked ) then WarnLog "Keine state changed"
- if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) then WarnLog "NurNotizen state changed"
- if ( bTempRadioBut(3) <> Dokumentende.IsChecked) then WarnLog "Dokumentende state changed"
- if ( bTempRadioBut(4) <> Seitenende.IsChecked ) then WarnLog "Seitenende state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
- ' Notify is saved with document
- hFileOpen( gOfficePath & "user\work\printtest." & WriterFilterExtension(0) )
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "PRINT" )
-
- if ( bTempRadioBut(1) <> Keine.IsChecked ) then WarnLog "Keine state changed (Not saved with document)"
- if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) then WarnLog "NurNotizen state changed (Not saved with document)"
- if ( bTempRadioBut(3) <> Dokumentende.IsChecked) then WarnLog "Dokumentende state changed (Not saved with document)"
- if ( bTempRadioBut(4) <> Seitenende.IsChecked ) then WarnLog "Seitenende state changed (Not saved with document)"
-
- printlog ("'/// - all UnCheck -> o ///")
-
- Grafiken.UnCheck
- Kontrollfelder.UnCheck
- Hintergrund.UnCheck
- SchwarzDrucken.UnCheck
- HiddenText.UnCheck
- TextPlaceholder.UnCheck
-
- LinkeSeiten.UnCheck
- RechteSeiten.UnCheck
- Prospekt.UnCheck
-
- LeereSeitenDrucken.UnCheck
- AusDruckereinstellung.UnCheck
-
- if NurNotizen.IsEnabled then
- if (NurNotizen.IsChecked = True) then
- Dokumentende.Check
- else
- NurNotizen.Check
- endif
- endif
-
- bTempRadioBut(1) = Keine.IsChecked
- bTempRadioBut(2) = NurNotizen.IsChecked
- bTempRadioBut(3) = Dokumentende.IsChecked
- bTempRadioBut(4) = Seitenende.IsChecked
-
- Fax.Select(1)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "PRINT" )
-
- if Grafiken.IsChecked then WarnLog "Grafiken is checked"
- if Kontrollfelder.IsChecked then WarnLog "Kontrollfelder is checked"
- if Hintergrund.IsChecked then WarnLog "Hintergrund is checked"
- if SchwarzDrucken.IsChecked then WarnLog "SchwarzDrucken is checked"
- if HiddenText.IsChecked then WarnLog "HiddenText is checked"
- if TextPlaceholder.IsChecked then WarnLog "TextPlaceholder is checked"
-
- if LinkeSeiten.IsChecked then WarnLog "LinkeSeiten is checked"
- if RechteSeiten.IsChecked then WarnLog "RechteSeiten is checked"
- if Prospekt.IsChecked then WarnLog "Prospekt is checked"
-
- if LeereSeitenDrucken.IsChecked then WarnLog "LeereSeitenDrucken is checked"
- if AusDruckereinstellung.IsChecked then WarnLog "AusDruckereinstellung is checked"
-
- if ( bTempRadioBut(1) <> Keine.IsChecked ) then WarnLog "Keine state changed"
- if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) then WarnLog "NurNotizen state changed"
- if ( bTempRadioBut(3) <> Dokumentende.IsChecked) then WarnLog "Dokumentende state changed"
- if ( bTempRadioBut(4) <> Seitenende.IsChecked ) then WarnLog "Seitenende state changed"
-
- if ( Fax.GetSelIndex <> 1 ) then WarnLog "Fax is not item 1"
-
- Printlog ("'/// - all Check -> x ///")
-
- Grafiken.Check
- Kontrollfelder.Check
- Hintergrund.Check
- SchwarzDrucken.Check
- HiddenText.Check
- TextPlaceholder.Check
-
- LinkeSeiten.Check
- RechteSeiten.Check
- Prospekt.Check
-
- LeereSeitenDrucken.Check
- AusDruckereinstellung.Check
-
- if Dokumentende.IsEnabled then
- if (Dokumentende.IsChecked = True) then
- Seitenende.Check
- else
- Dokumentende.Check
- endif
- endif
-
- bTempRadioBut(1) = Keine.IsChecked
- bTempRadioBut(2) = NurNotizen.IsChecked
- bTempRadioBut(3) = Dokumentende.IsChecked
- bTempRadioBut(4) = Seitenende.IsChecked
-
- Fax.Select(Fax.GetItemCount)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "PRINT" )
-
- if not Grafiken.IsChecked then WarnLog "Grafiken is unchecked"
- if not Kontrollfelder.IsChecked then WarnLog "Kontrollfelder is unchecked"
- if not Hintergrund.IsChecked then WarnLog "Hintergrund is unchecked"
- if not SchwarzDrucken.IsChecked then WarnLog "SchwarzDrucken is unchecked"
- if not HiddenText.IsChecked then WarnLog "HiddenText is unchecked "
- if not TextPlaceholder.IsChecked then WarnLog "TextPlaceholder is unchecked"
-
- if not LinkeSeiten.IsChecked then WarnLog "LinkeSeiten is unchecked"
- if not RechteSeiten.IsChecked then WarnLog "RechteSeiten is unchecked"
- if not Prospekt.IsChecked then WarnLog "Prospekt is unchecked"
-
- if not LeereSeitenDrucken.IsChecked then WarnLog "LeereSeitenDrucken is unchecked"
- if not AusDruckereinstellung.IsChecked then WarnLog "AusDruckereinstellung is unchecked"
-
- ' This state will be saved with the document
- if ( bTempRadioBut(1) <> Keine.IsChecked ) then WarnLog "Keine state changed"
- if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) then WarnLog "NurNotizen state changed"
- if ( bTempRadioBut(3) <> Dokumentende.IsChecked) then WarnLog "Dokumentende state changed"
- if ( bTempRadioBut(4) <> Seitenende.IsChecked ) then WarnLog "Seitenende state changed"
-
- if ( Fax.GetSelIndex <> Fax.GetItemCount ) then WarnLog "Fax is not item (GetItemCount)"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- printlog ("'/// - restore states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "PRINT" )
-
- if ( bCheckboxes(1) = TRUE ) then Grafiken.Check else Grafiken.Uncheck
- if ( bCheckboxes(2) = TRUE ) then Kontrollfelder.Check else Kontrollfelder.UnCheck
- if ( bCheckboxes(3) = TRUE ) then Hintergrund.Check else Hintergrund.Uncheck
- if ( bCheckboxes(4) = TRUE ) then SchwarzDrucken.Check else SchwarzDrucken.UnCheck
- if ( bCheckboxes(5) = TRUE ) then HiddenText.check else HiddenText.Uncheck
- if ( bCheckboxes(6) = TRUE ) then TextPlaceholder.check else TextPlaceholder.Uncheck
-
- if ( bCheckboxes(7) = TRUE ) then LinkeSeiten.Check else LinkeSeiten.Uncheck
- if ( bCheckboxes(8) = TRUE ) then RechteSeiten.Check else RechteSeiten.Uncheck
- if ( bCheckboxes(9) = TRUE ) then Prospekt.Check else Prospekt.Uncheck
-
- if ( bCheckboxes(10) = TRUE ) then LeereSeitenDrucken.Check else LeereSeitenDrucken.UnCheck
- if ( bCheckboxes(11) = TRUE ) then AusDruckereinstellung.Check else AusDruckereinstellung.UnCheck
-
- try
- Fax.Select (iListBox(1))
- catch
- warnlog "restore fax doesn't work"
- endcatch
-
- if ( bRadioBut(1) = TRUE ) then Keine.Check
- if ( bRadioBut(2) = TRUE ) then NurNotizen.Check
- if ( bRadioBut(3) = TRUE ) then Dokumentende.Check
- if ( bRadioBut(4) = TRUE ) then Seitenende.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterTable
- Dim sMetricField(4) as string ' MetricField
- Dim sTempMetricField(4) as string
- Dim bRadioBut(3) as boolean ' RadioButton states
- Dim bTempRadioBut(3) as boolean
-
- ' sMetricField(i) and sTempMetricField(i)
- '(1) = VerschiebenZeile
- '(2) = VerschiebenSpalte
- '(3) = EinfuegenZeile
- '(4) = EinfuegenSpalte
-
- ' bRadioBut(i) and bTempRadioBut(i)
- '(1) = VerhaltenFix
- '(2) = FixProportional
- '(3) = Variabel
-
- Call hNewDocument
- printlog ("'///- Tools/Options/Writer: Table ///")
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
-
- sMetricField(1) = VerschiebenZeile.GetText
- sMetricField(2) = VerschiebenSpalte.GetText
- sMetricField(3) = EinfuegenZeile.GetText
- sMetricField(4) = EinfuegenSpalte.GetText
-
- bRadioBut(1) = VerhaltenFix.IsChecked
- bRadioBut(2) = FixProportional.IsChecked
- bRadioBut(3) = Variabel.IsChecked
-
- if ((bRadioBut(1) Xor bRadioBut(2) Xor bRadioBut(3)) = False) then Warnlog (" RadioButtons have NO init state: " + bRadioBut(1) +", BugID: 83097")
-
- printlog ("'/// - all states inverting ///")
-
- VerschiebenZeile.ToMax
- VerschiebenSpalte.ToMax
- EinfuegenZeile.ToMax
- EinfuegenSpalte.ToMax
- if ( VerschiebenZeile.GetText = sMetricField(1) ) then VerschiebenZeile.ToMin
- if ( VerschiebenSpalte.GetText = sMetricField(2) ) then VerschiebenSpalte.ToMin
- if ( EinfuegenZeile.GetText = sMetricField(3) ) then EinfuegenZeile.ToMin
- if ( EinfuegenSpalte.GetText = sMetricField(4) ) then EinfuegenSpalte.ToMin
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
-
- if (VerhaltenFix.IsChecked = True) then FixProportional.Check else VerhaltenFix.Check
-
- bTempRadioBut(1) = VerhaltenFix.IsChecked
- bTempRadioBut(2) = FixProportional.IsChecked
- bTempRadioBut(3) = Variabel.IsChecked
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- printlog ("'/// - SO quit - start ///")
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) then WarnLog "VerschiebenZeile state changed BugID: 82990 "
- if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) then WarnLog "VerschiebenSpalte state changed"
- if ( EinfuegenZeile.GetText <> sTempMetricField(3) ) then WarnLog "EinfuegenZeile state changed"
- if ( EinfuegenSpalte.GetText <> sTempMetricField(4) ) then WarnLog "EinfuegenSpalte state changed"
-
- if ( bTempRadioBut(1) <> VerhaltenFix.IsChecked ) then WarnLog "VerhaltenFix state changed"
- if ( bTempRadioBut(2) <> FixProportional.IsChecked) then WarnLog "FixProportional state changed"
- if ( bTempRadioBut(3) <> Variabel.IsChecked ) then WarnLog "Variabel state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- VerschiebenZeile.ToMin
- VerschiebenSpalte.ToMin
- EinfuegenZeile.ToMin
- EinfuegenSpalte.ToMin
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
- printlog ("'/// More test ///'")
- VerschiebenZeile.More
- VerschiebenSpalte.More
- EinfuegenZeile.More
- EinfuegenSpalte.More
-
- if ( sTempMetricField(1) = VerschiebenZeile.GetText ) then WarnLog "VerschiebenZeile. More-Button not working"
- if ( sTempMetricField(2) = VerschiebenSpalte.GetText ) then WarnLog "VerschiebenSpalte. More-Button not working"
- if ( sTempMetricField(3) = EinfuegenZeile.GetText ) then WarnLog "EinfuegenZeile. More-Button not working"
- if ( sTempMetricField(4) = EinfuegenSpalte.GetText ) then WarnLog "EinfuegenSpalte. More-Button not working"
-
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
-
- if (FixProportional.IsChecked = True) then Variabel.Check else FixProportional.Check
- bTempRadioBut(1) = VerhaltenFix.IsChecked
- bTempRadioBut(2) = FixProportional.IsChecked
- bTempRadioBut(3) = Variabel.IsChecked
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) then WarnLog "VerschiebenZeile is not min."
- if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) then WarnLog "VerschiebenSpalte is not min."
- if ( EinfuegenZeile.GetText <> sTempMetricField(3) ) then WarnLog "EinfuegenZeile is not min."
- if ( EinfuegenSpalte.GetText <> sTempMetricField(4) ) then WarnLog "EinfuegenSpalte is not min."
-
- if ( bTempRadioBut(1) <> VerhaltenFix.IsChecked ) then WarnLog "VerhaltenFix state changed"
- if ( bTempRadioBut(2) <> FixProportional.IsChecked) then WarnLog "FixProportional state changed"
- if ( bTempRadioBut(3) <> Variabel.IsChecked ) then WarnLog "Variabel state changed"
-
- Printlog ("'/// - all Check -> x ///")
-
- VerschiebenZeile.ToMax
- VerschiebenSpalte.ToMax
- EinfuegenZeile.ToMax
- EinfuegenSpalte.ToMax
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
- printlog ("'/// Less test ///'")
- VerschiebenZeile.Less
- VerschiebenSpalte.Less
- EinfuegenZeile.Less
- EinfuegenSpalte.Less
- if ( sTempMetricField(1) = VerschiebenZeile.GetText ) then WarnLog "VerschiebenZeile. Less-Button not working"
- if ( sTempMetricField(2) = VerschiebenSpalte.GetText ) then WarnLog "VerschiebenSpalte. Less-Button not working"
- if ( sTempMetricField(3) = EinfuegenZeile.GetText ) then WarnLog "EinfuegenZeile. Less-Button not working"
- if ( sTempMetricField(4) = EinfuegenSpalte.GetText ) then WarnLog "EinfuegenSpalte. Less-Button not working"
- sTempMetricField(1) = VerschiebenZeile.GetText
- sTempMetricField(2) = VerschiebenSpalte.GetText
- sTempMetricField(3) = EinfuegenZeile.GetText
- sTempMetricField(4) = EinfuegenSpalte.GetText
-
- if (Variabel.IsChecked = True) then VerhaltenFix.Check else Variabel.Check
- bTempRadioBut(1) = VerhaltenFix.IsChecked
- bTempRadioBut(2) = FixProportional.IsChecked
- bTempRadioBut(3) = Variabel.IsChecked
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- if ( VerschiebenZeile.GetText <> sTempMetricField(1) ) then WarnLog "VerschiebenZeile is not max."
- if ( VerschiebenSpalte.GetText <> sTempMetricField(2) ) then WarnLog "VerschiebenSpalte is not max."
- if ( EinfuegenZeile.GetText <> sTempMetricField(3) ) then WarnLog "EinfuegenZeile is not max."
- if ( EinfuegenSpalte.GetText <> sTempMetricField(4) ) then WarnLog "EinfuegenSpalte is not max."
-
- if ( bTempRadioBut(1) <> VerhaltenFix.IsChecked ) then WarnLog "VerhaltenFix state changed"
- if ( bTempRadioBut(2) <> FixProportional.IsChecked) then WarnLog "FixProportional state changed"
- if ( bTempRadioBut(3) <> Variabel.IsChecked ) then WarnLog "Variabel state changed"
-
- printlog ("'/// - restore states ///")
-
- VerschiebenZeile.SetText (sMetricField(1))
- VerschiebenSpalte.SetText (sMetricField(2))
- EinfuegenZeile.SetText (sMetricField(3))
- EinfuegenSpalte.SetText (sMetricField(4))
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterTable1
-
- '/// There was a bug from OpenOffice where the Office crashed ///
- '/// This testcase check for this bug ///
-
- Call hNewDocument
- printlog ("'///- Tools/Options/HTML: Table ///")
- ToolsOptions
- Call hToolsOptions ("HTML","Table")
- '/// Check fixed and choose 'OK' ///
- VerhaltenFix.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- '/// ///
- ToolsOptions
- Call hToolsOptions ("HTML","Table")
- '/// Reset radiobutton to 'Variable' in Options ///
- Variabel.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-'------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/option/wr_o_3.inc b/testautomation/writer/optional/includes/option/wr_o_3.inc
deleted file mode 100644
index 0a047499d9f8..000000000000
--- a/testautomation/writer/optional/includes/option/wr_o_3.inc
+++ /dev/null
@@ -1,1403 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Writer options tests
-'*
-'\***********************************************************************
-'*
-'* tToolsOptionsWriterCursor
-'* tToolsOptionsWriterChanges
-'* tToolsOptionsWriterInsert
-'* tToolsOptionsAutocaption
-'* tToolsOptionsWriterCompatibility1
-'* tToolsOptionsWriterCompatibility2
-'* tToolsOptionsWriterCompatibility3
-'*
-'\***********************************************************************
-
-sub wr_o_3
-
- Call tToolsOptionsWriterCursor
- Call tToolsOptionsWriterChanges
- Call tToolsOptionsWriterInsert
- Call tToolsOptionsAutocaption
- Call tToolsOptionsWriterCompatibility1
- Call tToolsOptionsWriterCompatibility2
- Call tToolsOptionsWriterCompatibility3
-
-end sub
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsWriterCursor
-
- Dim irgendwas(17) as boolean ' Checkbox states
- Dim bRadioBut(4) as boolean ' RadioButtons
- Dim bTempRadioBut(4) as boolean
- Dim iListBox(1) as integer ' ListBox
- Dim iTempListBox(1) as integer
-
- Call hNewDocument
- printlog "'///- Tools/Options/Writer: View 2 ///"
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","FORMATTINGAIDS")
-
- irgendwas(1) = DirektCursor.IsChecked
- irgendwas(2) = Zonen_Cursor.IsChecked
-
- bRadioBut(1) = Absatzausrichtung.IsChecked
- bRadioBut(2) = LinkerAbsatzrand.IsChecked
- bRadioBut(3) = Tabulator.IsChecked
- bRadioBut(4) = TabulatorUndLeerzeichen.IsChecked
-
- if ((bRadioBut(1) Xor bRadioBut(2) Xor bRadioBut(3) Xor bRadioBut(4)) = False) then Warnlog (" RadioButtons have NO init state: " + bRadioBut(1) +", BugID: Not Yet l.f.?")
-
- irgendwas(10) = Absatzenden.IsChecked
- irgendwas(11) = WeicheTrenner.IsChecked
- irgendwas(12) = Leerzeichen.IsChecked
- irgendwas(13) = GeschLeerzeichen.IsChecked
- irgendwas(14) = Tabulatoren.IsChecked
- irgendwas(15) = Umbrueche.IsChecked
- irgendwas(16) = VersteckterText.IsChecked
- irgendwas(17) = VersteckteAbsatze.IsChecked
-
- printlog ("'/// - all states inverting ///")
-
- if irgendwas(1) then DirektCursor.UnCheck Else DirektCursor.Check
- if irgendwas(2) then Zonen_Cursor.UnCheck Else Zonen_Cursor.Check
-
- if (Absatzausrichtung.IsChecked = True) then LinkerAbsatzrand.Check Else Absatzausrichtung.Check
- bTempRadioBut(1) = Absatzausrichtung.IsChecked
- bTempRadioBut(2) = LinkerAbsatzrand.IsChecked
- bTempRadioBut(3) = Tabulator.IsChecked
- bTempRadioBut(4) = TabulatorUndLeerzeichen.IsChecked
-
- if irgendwas(10) then Absatzenden.UnCheck Else Absatzenden.Check
- if irgendwas(11) then WeicheTrenner.UnCheck Else WeicheTrenner.Check
- if irgendwas(12) then Leerzeichen.UnCheck Else Leerzeichen.Check
- if irgendwas(13) then GeschLeerzeichen.UnCheck Else GeschLeerzeichen.Check
- if irgendwas(14) then Tabulatoren.UnCheck Else Tabulatoren.Check
- if irgendwas(15) then Umbrueche.UnCheck Else Umbrueche.Check
- if irgendwas(16) then VersteckterText.UnCheck Else VersteckterText.Check
- if irgendwas(17) then VersteckteAbsatze.UnCheck Else VersteckteAbsatze.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- WaitSlot (2)
-
- printlog ("'/// - SO quit - start ///")
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "FORMATTINGAIDS" )
-
- if ( irgendwas(1) = DirektCursor.IsChecked ) then WarnLog "DirektCursor state changed BugID: 82955"
- if ( irgendwas(2) = Zonen_Cursor.IsChecked ) then WarnLog "Zonen_Cursor state changed"
-
- if ( bTempRadioBut(1) <> Absatzausrichtung.IsChecked ) then WarnLog "Absatzausrichtung state changed"
- if ( bTempRadioBut(2) <> LinkerAbsatzrand.IsChecked ) then WarnLog "LinkerAbsatzrand state changed"
- if ( bTempRadioBut(3) <> Tabulator.IsChecked ) then WarnLog "Tabulator state changed"
- if ( bTempRadioBut(4) <> TabulatorUndLeerzeichen.IsChecked ) then WarnLog "TabulatorUndLeerzeichen state changed"
-
- if ( irgendwas(10) = Absatzenden.IsChecked ) then WarnLog "Absatzenden state changed"
- if ( irgendwas(11) = WeicheTrenner.IsChecked ) then WarnLog "WeicheTrenner state changed"
- if ( irgendwas(12) = Leerzeichen.IsChecked ) then WarnLog "Leerzeichen state changed"
- if ( irgendwas(13) = GeschLeerzeichen.IsChecked ) then WarnLog "GeschLeerzeichen state changed"
- if ( irgendwas(14) = Tabulatoren.IsChecked ) then WarnLog "Tabulatoren state changed"
- if ( irgendwas(15) = Umbrueche.IsChecked ) then WarnLog "Umbrueche state changed"
- if ( irgendwas(16) = VersteckterText.IsChecked ) then WarnLog "VersteckterText state changed"
- if ( irgendwas(17) = VersteckteAbsatze.IsChecked ) then WarnLog "VersteckteAbsatze state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "FORMATTINGAIDS" )
-
- DirektCursor.UnCheck
- Zonen_Cursor.UnCheck
-
- if (LinkerAbsatzrand.IsChecked = True) then Tabulator.Check Else LinkerAbsatzrand.Check
- bTempRadioBut(1) = Absatzausrichtung.IsChecked
- bTempRadioBut(2) = LinkerAbsatzrand.IsChecked
- bTempRadioBut(3) = Tabulator.IsChecked
- bTempRadioBut(4) = TabulatorUndLeerzeichen.IsChecked
-
- Absatzenden.UnCheck
- WeicheTrenner.UnCheck
- Leerzeichen.UnCheck
- GeschLeerzeichen.UnCheck
- Tabulatoren.UnCheck
- Umbrueche.UnCheck
- VersteckterText.UnCheck
- VersteckteAbsatze.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "FORMATTINGAIDS" )
-
- if DirektCursor.IsChecked then WarnLog "DirektCursor x"
- if Zonen_Cursor.IsChecked then WarnLog "Zonen_Cursor x"
-
- if ( bTempRadioBut(1) <> Absatzausrichtung.IsChecked ) then WarnLog "Absatzausrichtung state changed"
- if ( bTempRadioBut(2) <> LinkerAbsatzrand.IsChecked ) then WarnLog "LinkerAbsatzrand state changed"
- if ( bTempRadioBut(3) <> Tabulator.IsChecked ) then WarnLog "Tabulator state changed"
- if ( bTempRadioBut(4) <> TabulatorUndLeerzeichen.IsChecked ) then WarnLog "TabulatorUndLeerzeichen state changed"
-
- if Absatzenden.IsChecked then WarnLog "Absatzenden x"
- if WeicheTrenner.IsChecked then WarnLog "WeicheTrenner x"
- if Leerzeichen.IsChecked then WarnLog "Leerzeichen x"
- if GeschLeerzeichen.IsChecked then WarnLog "GeschLeerzeichen x"
- if Tabulatoren.IsChecked then WarnLog "Tabulatoren x"
- if Umbrueche.IsChecked then WarnLog "Umbrueche x"
- if VersteckterText.IsChecked then WarnLog "VersteckterText x"
- if VersteckteAbsatze.IsChecked then WarnLog "VersteckteAbsatze x"
-
- Printlog ("'/// - all Check -> x ///")
-
- DirektCursor.Check
- Zonen_Cursor.Check
-
- if (Tabulator.IsChecked = True) then TabulatorUndLeerzeichen.Check Else Tabulator.Check
- bTempRadioBut(1) = Absatzausrichtung.IsChecked
- bTempRadioBut(2) = LinkerAbsatzrand.IsChecked
- bTempRadioBut(3) = Tabulator.IsChecked
- bTempRadioBut(4) = TabulatorUndLeerzeichen.IsChecked
-
- Absatzenden.Check
- WeicheTrenner.Check
- Leerzeichen.Check
- GeschLeerzeichen.Check
- Tabulatoren.Check
- Umbrueche.Check
- VersteckterText.Check
- VersteckteAbsatze.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "FORMATTINGAIDS" )
-
- if not DirektCursor.IsChecked then WarnLog "DirektCursor o"
- if not Zonen_Cursor.IsChecked then WarnLog "Zonen_Cursor o"
-
- if ( bTempRadioBut(1) <> Absatzausrichtung.IsChecked ) then WarnLog "Absatzausrichtung state changed"
- if ( bTempRadioBut(2) <> LinkerAbsatzrand.IsChecked ) then WarnLog "LinkerAbsatzrand state changed"
- if ( bTempRadioBut(3) <> Tabulator.IsChecked ) then WarnLog "Tabulator state changed"
- if ( bTempRadioBut(4) <> TabulatorUndLeerzeichen.IsChecked ) then WarnLog "TabulatorUndLeerzeichen state changed"
-
- if Not Absatzenden.IsChecked then WarnLog "Absatzenden o BugID: 82942 OS"
- if Not WeicheTrenner.IsChecked then WarnLog "WeicheTrenner o"
- if Not Leerzeichen.IsChecked then WarnLog "Leerzeichen o"
- if Not GeschLeerzeichen.IsChecked then WarnLog "GeschLeerzeichen o"
- if Not Tabulatoren.IsChecked then WarnLog "Tabulatoren o"
- if Not Umbrueche.IsChecked then WarnLog "Umbrueche o"
- if Not VersteckterText.IsChecked then WarnLog "VersteckterText o"
- if Not VersteckteAbsatze.IsChecked then WarnLog "VersteckteAbsatze o"
-
- printlog ("'/// - restore states ///")
-
- if ( irgendwas(1) = TRUE ) then DirektCursor.Check Else DirektCursor.UnCheck
- if ( irgendwas(2) = TRUE ) then Zonen_Cursor.Check Else Zonen_Cursor.UnCheck
-
- if ( bRadioBut(1) = TRUE ) then Absatzausrichtung.Check
- if ( bRadioBut(2) = TRUE ) then LinkerAbsatzrand.Check
- if ( bRadioBut(3) = TRUE ) then Tabulator.Check
- if ( bRadioBut(4) = TRUE ) then TabulatorUndLeerzeichen.Check
-
- if ( irgendwas(10) = TRUE ) then Absatzenden.Check Else Absatzenden.UnCheck
- if ( irgendwas(11) = TRUE ) then WeicheTrenner.Check Else WeicheTrenner.UnCheck
- if ( irgendwas(12) = TRUE ) then Leerzeichen.Check Else Leerzeichen.UnCheck
- if ( irgendwas(13) = TRUE ) then GeschLeerzeichen.Check Else GeschLeerzeichen.UnCheck
- if ( irgendwas(14) = TRUE ) then Tabulatoren.Check Else Tabulatoren.UnCheck
- if ( irgendwas(15) = TRUE ) then Umbrueche.Check Else Umbrueche.UnCheck
- if ( irgendwas(16) = TRUE ) then VersteckterText.Check Else VersteckterText.UnCheck
- if ( irgendwas(17) = TRUE ) then VersteckteAbsatze.Check Else VersteckteAbsatze.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsWriterChanges
- Dim iListBox(2) as integer ' ListBox
- Dim iTempListBox(2) as integer
- Dim iListBox2(3,2) as integer ' ListBox
- Dim iTempListBox2(3,2) as integer
-
- Call hNewDocument
- Call wBlindtextEinfuegen
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Return>"
- Call hTabelleEinfuegen
-
- Call wTypeKeys ("<Up>" , 2)
-
- printlog ("'///- Tools/Options/Writer: Changes ///")
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","CHANGES")
-
- iListBox2(1,1) = EinfuegenAttribute.GetSelIndex
- iListBox2(1,2) = EinfuegenFarbe.GetSelIndex
- iListBox2(2,1) = LoeschenAttribute.GetSelIndex
- iListBox2(2,2) = LoeschenFarbe.GetSelIndex
- iListBox2(3,1) = AendernAttribute.GetSelIndex
- iListBox2(3,2) = AendernFarbe.GetSelIndex
-
- iListBox(1) = ZeilenMarkierung.GetSelIndex
- iListBox(2) = ZeilenFarbe.GetSelIndex
-
- printlog ("'/// - Change states ///")
- EinfuegenAttribute.Select 1
- EinfuegenFarbe.Select 15
- LoeschenAttribute.Select 5
- LoeschenFarbe.Select 4
- AendernAttribute.Select 8
- AendernFarbe.Select 65
- ZeilenMarkierung.Select 4
- ZeilenFarbe.Select 19
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog "'/// - changes record with current formats ///"
- UseBindings
- EditChangesRecord
-
- Call wTypeKeys "<Return> Here are some changes"
- DocumentWriter.TypeKeys "<Up>", 8
- DocumentWriter.TypeKeys "<Backspace>", 10
- DocumentWriter.TypeKeys "<Down>", 2
- DocumentWriter.TypeKeys "<Delete>", 10
- DocumentWriter.TypeKeys "<Shift End>"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Outline.Check
- Shadow.Check
- TabFontEffects.OK
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Down>", 20
- DocumentWriter.TypeKeys "<Up>Die ホnderung in einer Tabelle"
- DocumentWriter.TypeKeys "<Tab>", 10
-
- printlog ("'/// - all states inverting ///")
-
- ToolsOptions
- Call hToolsOptions ("WRITER","CHANGES")
-
- if ( EinfuegenAttribute.GetItemCount <> iListBox2(1,1) ) then EinfuegenAttribute.Select (iListBox2(1,1)+1) Else EinfuegenAttribute.Select(iListBox2(1,1)-1)
- if ( EinfuegenFarbe.GetItemCount <> iListBox2(1,2) ) then EinfuegenFarbe.Select (EinfuegenFarbe.GetItemCount ) Else EinfuegenFarbe.Select (1)
- iTempListBox2(1,1) = EinfuegenAttribute.GetSelIndex
- iTempListBox2(1,2) = EinfuegenFarbe.GetSelIndex
- if ( LoeschenAttribute.GetItemCount <> iListBox2(2,1) ) then LoeschenAttribute.Select (LoeschenAttribute.GetItemCount) Else LoeschenAttribute.Select(1)
- if ( LoeschenFarbe.GetItemCount <> iListBox2(2,2) ) then LoeschenFarbe.Select (LoeschenFarbe.GetItemCount ) Else LoeschenFarbe.Select (1)
- iTempListBox2(2,1) = LoeschenAttribute.GetSelIndex
- iTempListBox2(2,2) = LoeschenFarbe.GetSelIndex
- if ( AendernAttribute.GetItemCount <> iListBox2(3,1) ) then AendernAttribute.Select (AendernAttribute.GetItemCount) Else AendernAttribute.Select(1)
- if ( AendernFarbe.GetItemCount <> iListBox2(3,2) ) then AendernFarbe.Select (AendernFarbe.GetItemCount ) Else AendernFarbe.Select (1)
- iTempListBox2(3,1) = AendernAttribute.GetSelIndex
- iTempListBox2(3,2) = AendernFarbe.GetSelIndex
- if ( ZeilenMarkierung.GetItemCount <> iListBox(1) ) then ZeilenMarkierung.Select (ZeilenMarkierung.GetItemCount ) Else ZeilenMarkierung.Select (1)
- if ( ZeilenFarbe.GetItemCount <> iListBox(2) ) then ZeilenFarbe.Select (ZeilenFarbe.GetItemCount ) Else ZeilenFarbe.Select (1)
- iTempListBox(1) = ZeilenMarkierung.GetSelIndex
- iTempListBox(2) = ZeilenFarbe.GetSelIndex
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- Call wOfficeRestart
- WaitSlot (2)
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "CHANGES" )
-
- if ( EinfuegenAttribute.GetSelIndex <> iTempListBox2(1,1) ) then WarnLog "EinfuegenAttribute state changed; is: "+EinfuegenAttribute.GetSelIndex +"; should: "+ iTempListBox2(1,1)
- if ( EinfuegenFarbe.GetSelIndex <> iTempListBox2(1,2) ) then WarnLog "EinfuegenFarbe state changed"
- if ( LoeschenAttribute.GetSelIndex <> iTempListBox2(2,1) ) then WarnLog "LoeschenAttribute state changed"
- if ( LoeschenFarbe.GetSelIndex <> iTempListBox2(2,2) ) then WarnLog "LoeschenFarbe state changed"
- if ( AendernAttribute.GetSelIndex <> iTempListBox2(3,1) ) then WarnLog "AendernAttribute state changed"
- if ( AendernFarbe.GetSelIndex <> iTempListBox2(3,2) ) then WarnLog "AendernFarbe state changed"
- if ( ZeilenMarkierung.GetSelIndex <> iTempListBox(1) ) then WarnLog "ZeilenMarkierung state changed"
- if ( ZeilenFarbe.GetSelIndex <> iTempListBox(2) ) then WarnLog "ZeilenFarbe state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "CHANGES" )
-
- EinfuegenAttribute.Select(1)
- EinfuegenFarbe.Select (1)
- LoeschenAttribute.Select (LoeschenAttribute.GetItemCount)
- LoeschenFarbe.Select (LoeschenFarbe.GetItemCount )
- AendernAttribute.Select(1)
- AendernFarbe.Select (1)
-
- ZeilenMarkierung.Select (1)
- ZeilenFarbe.Select (1)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all UnChecked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "CHANGES" )
-
- if (EinfuegenAttribute.GetSelIndex <> 1 ) then WarnLog "EinfuegenAttribute is not item 1"
- if (EinfuegenFarbe.GetSelIndex <> 1 ) then WarnLog "EinfuegenFarbe is not item 1"
- if (LoeschenAttribute.GetSelIndex <> LoeschenAttribute.GetItemCount ) then WarnLog "LoeschenAttribute is not item (GetItemCount)"
- if (LoeschenFarbe.GetSelIndex <> LoeschenFarbe.GetItemCount ) then WarnLog "LoeschenFarbe is not item (GetItemCount)"
- if (AendernAttribute.GetSelIndex <> 1 ) then WarnLog "AendernAttribute is not item 1"
- if (AendernFarbe.GetSelIndex <> 1 ) then WarnLog "AendernFarbe is not item 1"
- if (ZeilenMarkierung.GetSelIndex <> 1 ) then WarnLog "ZeilenMarkierung is not item 1"
- if (ZeilenFarbe.GetSelIndex <> 1 ) then WarnLog "ZeilenFarbe is not item 1"
-
- Printlog ("'/// - all Check -> x ///")
- EinfuegenAttribute.Select (EinfuegenAttribute.GetItemCount)
- EinfuegenFarbe.Select (EinfuegenFarbe.GetItemCount )
- LoeschenAttribute.Select(1)
- LoeschenFarbe.Select (1)
- AendernAttribute.Select (AendernAttribute.GetItemCount)
- AendernFarbe.Select (AendernFarbe.GetItemCount )
-
- ZeilenMarkierung.Select (ZeilenMarkierung.GetItemCount )
- ZeilenFarbe.Select (ZeilenFarbe.GetItemCount )
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "CHANGES" )
-
- if (EinfuegenAttribute.GetSelIndex <> EinfuegenAttribute.GetItemCount ) then WarnLog "EinfuegenAttribute is not item (GetItemCount)"
- if (EinfuegenFarbe.GetSelIndex <> EinfuegenFarbe.GetItemCount ) then WarnLog "EinfuegenFarbe is not item (GetItemCount)"
- if (LoeschenAttribute.GetSelIndex <> 1 ) then WarnLog "LoeschenAttribute is not item 1"
- if (LoeschenFarbe.GetSelIndex <> 1 ) then WarnLog "LoeschenFarbe is not item 1"
- if (AendernAttribute.GetSelIndex <> AendernAttribute.GetItemCount ) then WarnLog "AendernAttribute is not item (GetItemCount)"
- if (AendernFarbe.GetSelIndex <> AendernFarbe.GetItemCount ) then WarnLog "AendernFarbe is not item (GetItemCount)"
-
- if (ZeilenMarkierung.GetSelIndex <> ZeilenMarkierung.GetItemCount ) then WarnLog "ZeilenMarkierung is not item (GetItemCount)"
- if (ZeilenFarbe.GetSelIndex <> ZeilenFarbe.GetItemCount ) then WarnLog "ZeilenFarbe is not item (GetItemCount)"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- '--------------------------------------------------------------------------
- 'new document starts with unchecked edit changes record!? (i hope always ;-))
- printlog ("'/ Function test: color-real-print / screenshot also possible///'")
- Call hNewDocument
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "This is normal text"
- DocumentWriter.TypeKeys "<return>"
- DocumentWriter.TypeKeys "The quick brown fox jumps over the lazy dog"
- DocumentWriter.TypeKeys "<return>"
-
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "CHANGES" )
- EinfuegenAttribute.Select (2) 'bold
- EinfuegenFarbe.Select (8) 'mangenta
- LoeschenAttribute.Select (4) 'strikethrough
- LoeschenFarbe.Select (92) ' sun3
- AendernAttribute.Select (8) 'smallcaps
- AendernFarbe.Select (30)'red4
-
- ZeilenMarkierung.Select (4) 'outer margins
- ZeilenFarbe.Select (52)'turquise4
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "This is inserted text"
- DocumentWriter.TypeKeys "<return>"
- EditChangesRecord
- DocumentWriter.TypeKeys "The quick brown fox jumps over the lazy dog"
- DocumentWriter.TypeKeys "<return>"
- EditChangesRecord
- DocumentWriter.TypeKeys "This is attribut-changed text"
- DocumentWriter.TypeKeys "<return>"
- DocumentWriter.TypeKeys "The quick brown fox jumps over the lazy dog"
- EditChangesRecord
- DocumentWriter.TypeKeys "<shift home>"
- DocumentWriter.TypeKeys "<mod1 i><end>"
- DocumentWriter.TypeKeys "<return>"
- EditChangesRecord
- DocumentWriter.TypeKeys "This is backspaced text"
- DocumentWriter.TypeKeys "<return>"
- DocumentWriter.TypeKeys "The quick brown fox jumps over the lazy dog"
- DocumentWriter.TypeKeys "<shift home>"
- EditChangesRecord
- DocumentWriter.TypeKeys "<backspace>"
- EditChangesRecord
- DocumentWriter.TypeKeys "<end><return>"
- DocumentWriter.TypeKeys "This is deleted text"
- DocumentWriter.TypeKeys "<return>"
- DocumentWriter.TypeKeys "The quick brown fox jumps over the lazy dog"
- EditChangesRecord
- DocumentWriter.TypeKeys "<shift home>"
- DocumentWriter.TypeKeys "<delete><end>"
- DocumentWriter.TypeKeys "<return>"
- EditChangesRecord
- Call hCloseDocument
-
- '--------------------------------------------------------------------------
- printlog ("'/// - restore states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "CHANGES" )
-
- try
- EinfuegenAttribute.Select (iListBox2(1,1))
- catch
- EinfuegenAttribute.Select (1)
- Warnlog ("EinfuegenAttribute has wrong initialvalue: " + iListBox2(1,1) + ", BugID: 83097")
- endcatch
- try
- EinfuegenFarbe.Select (iListBox2(1,2))
- catch
- EinfuegenFarbe.Select (1)
- WarnLog ("EinfuegenFarbe has wrong initialvalue: " + iListBox2(1,2))
- endcatch
-
- try
- printlog iListBox2(2,1)
- LoeschenAttribute.Select (iListBox2(2,1))
- catch
- LoeschenAttribute.Select (1)
- WarnLog ("LoeschenAttribute has wrong initialvalue: " + iListBox2(2,1) )
- endcatch
-
- try
- LoeschenFarbe.Select (iListBox2(2,2))
- catch
- LoeschenFarbe.Select (1)
- WarnLog ("LoeschenFarbe has wrong initialvalue: " + iListBox2(2,2))
- endcatch
-
- try
- AendernAttribute.Select (iListBox2(3,1))
- catch
- AendernAttribute.Select (1)
- WarnLog ("AendernAttribute has wrong initialvalue: " + iListBox2(3,1) )
- endcatch
-
- try
- AendernFarbe.Select (iListBox2(3,2))
- catch
- AendernFarbe.Select (1)
- WarnLog ("AendernFarbe has wrong initialvalue: " + iListBox2(3,2))
- endcatch
-
- try
- ZeilenMarkierung.Select (iListBox(1))
- catch
- ZeilenMarkierung.Select (1)
- WarnLog ("ZeilenMarkierung has wrong initialvalue: " + iListBox(3))
- endcatch
-
- try
- ZeilenFarbe.Select (iListBox(2))
- catch
- ZeilenFarbe.Select (1)
- WarnLog ("ZeilenFarbe has wrong initialvalue: " + iListBox(4))
- endcatch
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsWriterInsert
-
- Dim irgendwas(8) as boolean ' Checkbox states
-
- Call hNewDocument
- printlog "'///- Tools/Options/Writer: Table ///"
-
- printlog ("'/// - save states ///")
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
-
- irgendwas(2) = Ueberschrift.IsChecked
- irgendwas(3) = Wiederholen.IsChecked
- irgendwas(4) = NichtTrennen.IsChecked
- irgendwas(5) = Umrandung.IsChecked
-
- irgendwas(6) = AutomatischeZahlenerkennung.IsChecked
- irgendwas(7) = Zahlenformaterkennung.IsChecked
- irgendwas(8) = AutomatischeAusrichtung.IsChecked
-
- printlog ("'/// - all states inverting ///")
-
- Ueberschrift.Check
- if irgendwas(3) then Wiederholen.UnCheck Else Wiederholen.Check
- if irgendwas(4) then NichtTrennen.UnCheck Else NichtTrennen.Check
- if irgendwas(5) then Umrandung.UnCheck Else Umrandung.Check
- AutomatischeZahlenerkennung.Check
- if irgendwas(7) then Zahlenformaterkennung.UnCheck Else Zahlenformaterkennung.Check
- if irgendwas(8) then AutomatischeAusrichtung.UnCheck Else AutomatischeAusrichtung.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - SO quit - start ///")
-
- Call wOfficeRestart
-
- printlog ("'/// - checking states ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- if ( Ueberschrift.IsChecked = False ) then WarnLog "Ueberschrift state changed"
- if ( irgendwas(3) = Wiederholen.IsChecked ) then WarnLog "Wiederholen state changed"
- if ( irgendwas(4) = NichtTrennen.IsChecked ) then WarnLog "NichtTrennen state changed"
- if ( irgendwas(5) = Umrandung.IsChecked ) then WarnLog "Umrandung state changed"
-
- if ( AutomatischeZahlenerkennung.IsChecked = False ) then WarnLog "AutomatischeZahlenerkennung state changed"
- if ( irgendwas(7) = Zahlenformaterkennung.IsChecked ) then WarnLog "Zahlenformaterkennung state changed"
- if ( irgendwas(8) = AutomatischeAusrichtung.IsChecked ) then WarnLog "AutomatischeAusrichtung state changed"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - all UnCheck -> o ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- Ueberschrift.UnCheck
- NichtTrennen.UnCheck
- Umrandung.UnCheck
- AutomatischeZahlenerkennung.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Printlog "'/// - check in InsertTableWriter ///"
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
-
- if ( Ueberschrift.IsChecked ) then WarnLog "Ueberschrift x"
- if ( TabelleNichtTrennen.IsChecked ) then WarnLog "NichtTrennen x"
- if ( Umrandung.IsChecked ) then WarnLog "Umrandung x"
-
- TabelleEinfuegenWriter.OK
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Down>1<Tab><Left>"
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if NOT Links.IsChecked then Warnlog "Die automatische Ausrichtung der Zahl wurde trotzdem durchgefï¾hrt!"
- TabAusrichtungAbsatz.Cancel
-
- FormatNumberFormat
- Kontext "Zahlenformat"
- if Kategorie.GetSelIndex <> 11 then Warnlog "Das Zahlenformat ist nicht Text geblieben!"
- Zahlenformat.Cancel
- Call hCloseDocument
- Call hNewDocument
-
- printlog ("'/// - check if all UnChecked ///")
- Call hNewDocument
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- if Ueberschrift.IsChecked then WarnLog "Ueberschrift x"
- if NichtTrennen.IsChecked then WarnLog "NichtTrennen x"
- if Umrandung.IsChecked then WarnLog "Umrandung x"
-
- if AutomatischeZahlenerkennung.IsChecked then WarnLog "AutomatischeZahlenerkennung x"
-
- Printlog ("'/// - all Check -> x ///")
-
- Ueberschrift.Check
- Wiederholen.Check
- NichtTrennen.Check
- Umrandung.Check
-
- AutomatischeZahlenerkennung.Check
- Zahlenformaterkennung.Check
- AutomatischeAusrichtung.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Printlog "'/// - check in InsertTableWriter ///"
- Call hNewDocument
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
-
- if ( Ueberschrift.IsChecked = FALSE ) then WarnLog "Ueberschrift o"
- if ( UeberschriftWiederholen.IsChecked = FALSE ) then WarnLog "Wiederholen o"
- if ( TabelleNichtTrennen.IsChecked = FALSE ) then WarnLog "NichtTrennen o"
- if ( Umrandung.IsChecked = FALSE ) then WarnLog "Umrandung o"
-
- TabelleEinfuegenWriter.Ok
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Down>1<Tab><Left>"
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if NOT Rechts.IsChecked then Warnlog "Alignment of number didn't change to: right!"
- TabAusrichtungAbsatz.Cancel
-
- FormatNumberFormat
- Kontext "Zahlenformat"
- if Kategorie.GetSelIndex <> 3 then Warnlog "numberformat didn't get changed!"
- Zahlenformat.Cancel
-
- Call hCloseDocument
- Call hNewDocument
-
- printlog ("'/// - check if all Checked ///")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "Table" )
-
- if ( Ueberschrift.IsChecked = FALSE ) then WarnLog "Ueberschrift o"
- if ( Wiederholen.IsChecked = FALSE ) then WarnLog "Wiederholen o"
- if ( NichtTrennen.IsChecked = FALSE ) then WarnLog "NichtTrennen o"
- if ( Umrandung.IsChecked = FALSE ) then WarnLog "Umrandung o"
-
- if ( AutomatischeZahlenerkennung.IsChecked = FALSE ) then WarnLog "AutomatischeZahlenerkennung o"
- if ( Zahlenformaterkennung.IsChecked = FALSE ) then WarnLog "Zahlenformaterkennung o"
- if ( AutomatischeAusrichtung.IsChecked = FALSE ) then WarnLog "AutomatischeAusrichtung o"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("'/// - restore states ///")
-
- Call wOptionsUndo("Table")
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-' ********************************************************************
-
-testcase tToolsOptionsAutocaption
-
- Dim Auswahl(20) as String
- Dim i as Integer
- Dim SplitString as string
- Dim ObjectTmp() as string
- printlog "- Tools/Options/StarOffice Writer/AutoCaption"
-
- Call hNewDocument
- Call wOptionsUndo( "All" )
-
- ToolsOptions
- Call hToolsOptions("WRITER","AutoCaption")
- Kontext "TabAutocaption"
- Select Case iSprache
- case 36 : SplitString = "-"
- case else : SplitString = " "
- end select
- for i=1 to ObjectList.GetItemCount
- ObjectList.Select i
- ObjectList.Check
- ObjectTmp() = Split(ObjectList.GetSelText, SplitString)
- Auswahl(i) = ObjectTmp(Ubound(ObjectTmp()))
- Category.SetText Auswahl(i)
- next i
-
- ObjectList.Select 1
- Position.Select Position.GetItemCount 'Select "Caption: Below"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog " - Check table caption"
- ViewZoom
- Kontext "Massstab"
- Seitenbreite.Check
- Massstab.OK
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- TabelleEinfuegenWriter.OK
- Kontext "DocumentWriter"
- Call wTypeKeys ("<MOD1 Home>")
- Call wTypeKeys ("<DOWN>", 2)
- Call wTypeKeys ("<HOME>")
- Select Case iSprache
- Case 31:
- Call wTypeKeys ("<Mod1 Shift Right>") ', 3
- Case else
- Call wTypeKeys ("<Mod1 Shift Right>")
- end select
- EditCopy
- wait 500
- if Trim$(GetClipboardText) <> Auswahl ( 1 ) then Warnlog "Table caption is wrong. Not " & Auswahl(1) & " but: " & GetClipboardtext
- EditUndo
-
- printlog "'/// - Check frame caption ///"
- InsertFrame
- Kontext
- Active.SetPage TabType
- Kontext "TabType"
-' if gPlatGroup = "unx" then
- Width.SetText "2"
- TabType.OK
- Call wTypeKeys ("<Return>")
- sleep (1)
- Call wTypeKeys ("<Down><Home>")
- Select Case iSprache
- Case 31:
- Call wTypeKeys ("<Mod1 Shift Right>", 3)
- Case else
- Call wTypeKeys ("<Mod1 Shift Right>")
- end select
- EditCopy
- Wait 500
- if Trim$(GetClipboardText) <> Auswahl (2) then
- Warnlog "Caption of a frame is wrong. Not " & Auswahl(2) & " but: " & GetClipboardtext
- endif
- Call wTypeKeys ("<Escape>")
- sleep(1)
- Call wTypeKeys ("<Home><SHIFT END><Delete>")
-
- printlog "'/// - Check graphics caption ///"
- '///+ "writer\optional\input\graphics\jolink.jpg" ///
- Call hGrafikEinfuegen ( gTesttoolPath + "writer\optional\input\graphics\jolink.jpg" )
- Call wTypeKeys ("<Return>")
- sleep (1)
- Call wTypeKeys ("<MOD1 Home>")
- Select Case iSprache
- Case 31:
- Call wTypeKeys ("<Mod1 Shift Right>", 3)
- Case 82:
- Call wTypeKeys ("<Down><Shift End>")
- Case else
- Call wTypeKeys ("<Mod1 Shift Right>")
- end select
- EditCopy
- if Trim$(GetClipboardText) <> Auswahl (3) then
- Warnlog "Caption of a graphic is wrong. Not " & Auswahl(3) & " but: " & GetClipboardtext
- endif
- Call hCloseDocument
-
- printlog "'/// - Check caption of all other objects ///"
- for i=1 to 5
- Call hNewDocument
- InsertObjectOLEObject
- Kontext "OLEObjektEinfuegen"
- Objekttyp.Select i
- printlog " - " & Objekttyp.GetSelText
- OLEObjektEinfuegen.OK
-
- Kontext "DocumentWriter"
- Call gMouseClick ( 90, 90 )
- Sleep 2
- Call wTypeKeys ("<Return>")
- sleep (2)
- Call wTypeKeys ("<MOD1 Home>")
- Select Case i
- Case 1,3,4,5
- Select Case iSprache
- Case 31
- Call wTypeKeys ("<Mod1 Shift Right>",3)
- Case else
- Call wTypeKeys ("<Mod1 Shift Right>")
- end select
- Case else
- Call wTypeKeys ("<Mod1 Shift Right>")
- end select
- EditCopy
- if Trim$(GetClipboardText) <> Auswahl (i+3) then Warnlog "Caption of a " & Auswahl(i+3) & " is wrong. Not " & Auswahl(i+3) & " but: " & GetClipboardtext
- sleep (1)
- Call hCloseDocument
- next i
- Call hNewDocument
- printlog "'/// - Set defaults ///"
- ViewZoom
- Kontext "Massstab"
- Vergroesserung100.Check
- Massstab.OK
-
- ToolsOptions
- Call hToolsOptions("WRITER","AutoCaption")
- Kontext "TabAutocaption"
- for i=1 to ObjectList.GetItemCount
- ObjectList.Select i
- ObjectList.Uncheck
- next i
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- sleep (1)
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------
-
-testcase tToolsOptionsWriterCompatibility1
-
- Dim i as integer
-
- printlog "Check status change of all checkboxes in StarOffice Writer->Compatibility options"
- printlog " Test of option 'Use StarOffice 6.0/7 tabstop formatting'"
- Call hNewDocument
- ToolsOptions
- Call hToolsOptions("WRITER","COMPATIBILITY")
- printlog " Check defaults of checkboxes. if default is wrong then set to default"
- Kontext "TabCompatibility"
- For i = 1 to Options.GetItemCount
- Options.Select i
- Select case i
- Case 2,3,7,11
- if Not Options.IsChecked then
- Warnlog "Default for checkbox " & i & " is wrong (not checked)"
- Options.Check
- end if
- Case else
- if Options.IsChecked then
- Warnlog "Default for checkbox " & i & " is wrong (checked)"
- Options.UnCheck
- end if
- end select
- next i
- printlog " - check all checkboxes"
- For i = 1 to Options.GetItemCount
- Options.Select i
- Options.Check
- next i
- Default.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- end if
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- printlog "- save document"
- Call hFileSaveAsKill (gOfficePath + "user\work\tToolsOptionsWriterCompatibility1.odt")
- Call hCloseDocument
-
- printlog "- restart the office"
- Call wOfficeRestart
-
- printlog "- load previously saved document"
- Call hNewDocument
- hFileOpen( gOfficePath & "user\work\tToolsOptionsWriterCompatibility1.odt")
-
- Printlog "check state of all checkboxes and uncheck all checkboxes"
- ToolsOptions
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
- For i = 1 to Options.GetItemCount
- Options.Select i
- if Not Options.IsChecked then
- Warnlog "Checkbox " & i & " looses state after restart"
- else
- Options.Uncheck
- end if
- next i
- Default.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- end if
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- Call hCloseDocument
-
- '/// restart the office
- Call wOfficeRestart
- WaitSlot (2)
-
- printlog "check state of all checkboxes and set defaults"
- ToolsOptions
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
- For i = 1 to Options.GetItemCount
- Options.Select i
- if Options.IsChecked then
- Warnlog "Checkbox " & i & " looses state after restart"
- end if
- Select Case i
- Case 2,3,7,11
- Options.Check
- Case else
- Options.UnCheck
- end select
- next i
- Default.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- end if
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'-------------------------------------------------------------------
-
-testcase tToolsOptionsWriterCompatibility2
-
- Dim i as integer
- Dim DefaultFailed as boolean
- printlog "Test of option 'Use StarOffice 6.0/7 tabstop formatting'"
-
- Call hNewDocument
- printlog "open document ./writer/leve11/input/options/compatibility1.doc"
- printlog "check formatting of current opened document"
- hFileOpenLocally( gTesttoolpath & "writer\optional\input\options\compatibility1.doc" )
-
-
- Call wTypeKeys ("<Mod1 Home>")
- Call wTypeKeys ("<Down>")
- Call wTypeKeys ("<Shift Right>")
-
- try
- EditCopy
- if GetClipboardtext <> "A" then
- Warnlog "Seems document has been formatted wrong"
- DefaultFailed = true
- end if
- catch
- Warnlog "Seems document has been formatted wrong"
- DefaultFailed = true
- endcatch
-
- Call wTypeKeys ("<Home>")
- Call wTypeKeys ("<Down>" ,3)
- Call wTypeKeys ("<Shift Right>")
- try
- EditCopy
- if GetClipboardtext <> "A" then
- Warnlog "Seems document has been formatted wrong"
- DefaultFailed = true
- end if
- catch
- Warnlog "Seems document has been formatted wrong"
- DefaultFailed = true
- endcatch
-
- if DefaultFailed = false then
- printlog " in Tools->Options->StarOffice Writer->Compatitibility check option 'Use StarOffice 6.0/7 tabstop formatting'"
- ToolsOptions
- Call hToolsOptions("WRITER","COMPATIBILITY")
- printlog " Check defaults of checkboxes. if default is wrong then set to default"
- Kontext "TabCompatibility"
- Options.Select 4
- Options.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
- printlog " Now check if document has been reformatted"
- Call wTypeKeys ("<Mod1 Home>")
- Call wTypeKeys ("<Down>" , 2)
- Call wTypeKeys ("<Shift Right>")
- try
- EditCopy
- if GetClipboardtext <> "A" then
- Warnlog "Seems document has been formatted wrong"
- end if
- catch
- Warnlog "Seems document has been formatted wrong"
- endcatch
-
- Call wTypeKeys ("<Home>")
- Call wTypeKeys ("<Down>" , 4)
- Call wTypeKeys ("<Shift Right>")
- try
- EditCopy
- if GetClipboardtext <> "A" then
- Warnlog "Seems document has been formatted wrong"
- end if
- catch
- Warnlog "Seems document has been formatted wrong"
- endcatch
-
- printlog "in Tools->Options->StarOffice Writer->Compatitibility uncheck option 'Use StarOffice 6.0/7 tabstop formatting'"
- ToolsOptions
- Call hToolsOptions("WRITER","COMPATIBILITY")
- printlog "Check defaults of checkboxes. if default is wrong then set to default"
- Kontext "TabCompatibility"
- Options.Select 4
- Options.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
- end if
-
- printlog "Close document"
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------------------------------------
-testcase tToolsOptionsWriterCompatibility3
-
- DIM iWords_to_right AS integer 'variable for counting word-steps
- DIM iOptionsCount AS integer 'variable for counting options on cmopatibility page
- DIM sDocument AS string 'variable for saving the doc
- DIM sFoundWord AS string 'variable for word found one line below
-
- printlog ">>> Configuration of behavior when a line break is inserted <<<"
- '/// New Writer Doc
- Call hNewDocument
- sleep (1)
- printlog "New writer doc opened"
- ToolsOptions
- Kontext "ExtrasOptionenDLG"
- printlog "Checking Options settings"
-
- printlog "Tools-Options-OOo Writer-Compatibility"
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
-
- printlog "Verify that the entry 'Expand word space on lines with manual line breaks in justified paragraphs' is checked by default"
- iOptionsCount = Options.GetItemCount
- Options.Select iOptionsCount
- if Options.isChecked then
- printlog "Expand word space on lines... is checked"
- else
- warnlog "Warning: Expand word space on lines...is not checked as default!"
- Options.Check
- end if
-
- printlog " Close dialog with OK"
- Kontext "ExtrasOptionenDLG"
- ExtrasOptionenDLG.OK
- sleep (1)
-
- printlog " Insert a paragraph with several lines of text"
- Kontext "DocumentWriter"
- DocumentWriter.typekeys ("one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty twentyone twentytwo twentythree twentyfour twentyfive twentysix")
- printlog "Inserting text"
- Kontext "DocumentWriter"
-
- DocumentWriter.UseMenu 'use menu to select all
- Call hMenuSelectNr (2) 'edit
- CALL hMenuFindSelect (".uno:SelectAll", true, 11, true) 'Find "Select All" and call the slot.
-
- printlog "Click the 'Justified icon in the toolbar"
- sleep (1)
- Kontext "TextObjectbar"
- Blocksatz.Click 'setting to justified
- Kontext "DocumentWriter"
-
- printlog "(Now the paragraph adjustment is 'justified')"
- printlog "Setting text to justified."
- sleep (1)
-
- printlog " Click into the middle of a line"
- DocumentWriter.TypeKeys "<MOD1 HOME>" 'jumping to beginning of text
- DocumentWriter.TypeKeys "<MOD1 RIGHT>",9,true '9 times to the right
- sleep (1)
-
- printlog " Insert a line break by pressing <SHIFT>+<ENTER>"
- DocumentWriter.TypeKeys "<SHIFT RETURN>"
- sleep (1)
-
- printlog " Verify that the remaining words are aligned justified"
- DocumentWriter.TypeKeys "<MOD1 LEFT>" 'going back into remaining text
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<DOWN>" 'one line down
- sleep (1)
- DocumentWriter.TypeKeys "<MOD1 LEFT>" 'one word to the left
- sleep (1)
- DocumentWriter.TypeKeys "<MOD1 SHIFT RIGHT>" 'selecting complete word
- sleep (1)
- DocumentWriter.TypeKeys "<SHIFT LEFT>" 'deleting space
- EditCopy
- if (GetClipboardText = "twenty") OR (GetClipboardText = "nineteen") OR (GetClipboardText = "eighteen") then 'one word or the other, because the system-font might differ from system to system...
- printlog "Correct word found."
- else
- warnlog "wrong word found, formatting broken. Found word was: '" + GetClipboardText + "'."
- end if
- sleep (1)
-
- printlog "Tools-Options-OOo Writer-Compatibility"
- ToolsOptions
- Kontext "ExtrasOptionenDLG"
-
- printlog "Uncheck the entry 'Expand word space [...]'"
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
- iOptionsCount = Options.GetItemCount
- Options.Select iOptionsCount
- if Options.isChecked then
- printlog "Unchecking expand word space... settings now."
- Options.Uncheck 'unchecking
- else
- warnlog "Warning: Expand word space on lines...is not checked anymore!"
- end if
- Kontext "ExtrasOptionenDLG"
-
- printlog " Close dialog with OK"
- ExtrasOptionenDLG.OK
-
- printlog " Verify that the remainig words are aligned left"
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<UP>" 'one up
- sleep (1)
- DocumentWriter.TypeKeys "<MOD1 LEFT>" 'one word left to the same starting position as before
- sleep (1)
- DocumentWriter.TypeKeys "<DOWN>" ' one line down
- sleep (1)
- DocumentWriter.TypeKeys "<MOD1 LEFT>" 'one word left
- sleep (1)
- DocumentWriter.TypeKeys "<MOD1 SHIFT RIGHT>" ' selecting the complete word
- sleep (1)
- DocumentWriter.TypeKeys "<SHIFT LEFT>" 'deleting space
- EditCopy
- if (GetClipboardText = "fifteen") OR (GetClipboardText = "fourteen") then
- printlog "Correct word found, alignment ok"
- else
- warnlog "Wrong word found, formatting broken"
- end if
- sleep (1)
-
- printlog " Save document"
- sDocument = ConvertPath ( gOfficePath + "user\work\test1.odt")
- 'deleting old Docs in the directory
- if Dir (sDocument) <> "" then kill sDocument 'deleting old docs
- Call hFileSaveAsKill (sDocument)
- printlog "Document saved"
-
- printlog "close Document"
- Call hCloseDocument
- printlog "Document Closed"
-
- printlog "New document"
- Call hNewDocument
- printlog "New Doc opened"
-
- printlog "Tools-Options-OOo Writer-Compatibility"
- ToolsOptions
- Kontext "ExtrasOptionenDLG"
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
-
- printlog "Verify that the entry 'Expand word space [...]' is checked"
- iOptionsCount = Options.GetItemCount
- Options.Select iOptionsCount
- if Options.isChecked then
- printlog "Expand word space on lines... is checked"
- else
- warnlog "Warning: Expand word space on lines...is not checked as default!"
- end if
-
- printlog "Close dialog with 'Cancel'"
- Kontext "ExtrasOptionenDLG"
- ExtrasOptionenDLG.Cancel
-
- printlog "Reload recently saved document"
- hFileOpen( sDocument)
-
- printlog "Tools-Options-OOo Writer-Compatibility"
- ToolsOptions
- Kontext "ExtrasOptionenDLG"
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
-
- printlog "Verify that the entry 'Expand word space [...]' is unchecked"
- iOptionsCount = Options.GetItemCount
- Options.Select iOptionsCount
- if Options.isChecked then
- warnlog "Warning: should not be checked in saved file!"
- else
- printlog "Ok, Expand word space on lines... in saved file is checked."
- end if
- sleep (1)
-
- printlog "Click 'Default'"
- Default.Click
-
- printlog "In upcoming dialog 'Do you want to change the default template', click 'Yes'"
- sleep (1)
- Kontext "Active"
- if Active.Exists then
- Active.Yes
- printlog "Changing to defaults"
- else
- warnlog "Warning: Messagebox is not up!"
- end if
- sleep (1)
- Kontext "ExtrasOptionenDLG"
- ExtrasOptionenDLG.OK
-
- printlog " Close document"
- Kontext "DocumentWriter"
- Call hCloseDocument
-
- printlog " New Writer document"
- Call hNewDocument
-
- printlog " Insert a paragraph with several lines of text"
- DocumentWriter.typekeys ("one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty twentyone twentytwo twentythree twentyfour twentyfive twentysix")
- printlog "Inserting text"
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu 'use menu to select all
- Call hMenuSelectNr (2) 'edit
- CALL hMenuFindSelect (".uno:SelectAll", true, 11, true) 'Find "Select All" and call the slot.
-
- printlog " Format-Paragraph-Tab 'Alignment' Click the 'Justified' radio button"
- DocumentWriter.UseMenu 'use menu to call format/paragraph
- Call hMenuSelectNr (5) 'Format
- Call hMenuSelectNr (3) 'Paragraph
- sleep (1)
- Kontext
- Active.SetPage TabAusrichtungAbsatz 'changing to correct tabpage
- sleep (1)
- Kontext "TabAusrichtungAbsatz"
- Blocksatz.Check 'checking option for justified
-
- printlog " Close dialog with 'OK'"
- TabAusrichtungAbsatz.OK
-
- printlog " Now the paragraph adjustment is 'justified'"
- Kontext "TextObjectbar"
- if Blocksatz.GetState(2) = 1 then
- printlog "Text is justified now" 'this is ok
- else
- warnlog "Warning: Text is not justified!" 'this should not happen
- end if
- Kontext "DocumentWriter"
-
- printlog " Click into the middle of a line"
- DocumentWriter.TypeKeys "<MOD1 HOME>" 'jumping to beginning of text
- DocumentWriter.TypeKeys "<MOD1 RIGHT>",9,true '9 times to the right
- sleep (1)
-
- printlog " [via menu]: Insert-Manual Break, select 'Line break', OK"
- DocumentWriter.UseMenu 'use menu to call insert/line break
- Call hMenuSelectNr (4) 'Insert
- Call hMenuSelectNr (1) 'Manual Break
- Kontext "UmbruchEinfuegen"
- Zeilenumbruch.Check
- UmbruchEinfuegen.OK
- printlog "Manual Linebreak inserted"
- Kontext "DocumentWriter"
-
- printlog " Tools-Options-OOo Writer-Compatibility"
- ToolsOptions 'calling options
- Kontext "ExtrasOptionenDLG"
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
-
- printlog " Check the entry 'Expand word space [...]"
- iOptionsCount = Options.GetItemCount
- Options.Select iOptionsCount
- if Options.isChecked then
- printlog "Expand word space.. is checked "
- else
- printlog "Expand word space.. is not checked."
- Options.Check
- end if
-
- printlog " Click 'Default'"
- Default.Click
-
- printlog " In upcoming dialog 'Do you want to change the default template', click 'Yes'"
- sleep (1)
- Kontext "Active"
- if Active.Exists then
- Active.Yes 'Closing dialog clicking yes
- printlog "Changing to defaults"
- else
- warnlog "Warning: Messagebox is not up!"
- end if
- sleep (1)
- Kontext "ExtrasOptionenDLG"
- ExtrasOptionenDLG.OK 'Closing the options
-
- printlog " Close document"
- Call hCloseDocument
-
- printlog " New Writer document"
- Call hNewDocument
-
- printlog " Tools-Options-OOo Writer-Compatibility"
- ToolsOptions 'calling options
- Kontext "ExtrasOptionenDLG"
- Call hToolsOptions("WRITER","COMPATIBILITY")
- Kontext "TabCompatibility"
-
- printlog " Verify that the entry 'Expand word space [...]' is checked"
- iOptionsCount = Options.GetItemCount
- Options.Select iOptionsCount
- if Options.isChecked then
- printlog "Expand word space on lines... is checked" ' ok
- else
- warnlog "Warning: Expand word space on lines...is not checked as default!" 'should not happen!
- end if
- Kontext "ExtrasOptionenDLG"
- ExtrasOptionenDLG.Cancel 'leaving the options
-
- printlog " Close document"
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-' -------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/option/wr_o_4.inc b/testautomation/writer/optional/includes/option/wr_o_4.inc
deleted file mode 100644
index d5516718ee66..000000000000
--- a/testautomation/writer/optional/includes/option/wr_o_4.inc
+++ /dev/null
@@ -1,988 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description :
-'*
-'\***********************************************************************
-
-sub wr_o_4
-
- Call tToolsOptionsWriterOther
- Call tToolsOptionsWriterAutoCaption
- Call tToolsOptionsWriterGeneral
- Call tToolsOptionsWriterMailMerge
-
-end sub
-
-'------------------------------------------------------------------------------
-testcase tToolsOptionsWriterOther
- dim irgendwas(7) as boolean ' Checkbox states
- dim bRadioBut(3) as boolean ' RadioButton states
- dim bTempRadioBut(3) as boolean
- dim iMasseinheit as integer
- dim sTabAbstand as string
- dim sTemp as string
- dim iTemp as integer
- dim sTemp2 as string
-
-
- ' irgendwas(i)
- '-(1) = NurFuerAktuellesDokument
-
- '(2) = Feldbefehle
- '(3) = Diagramme
- '-(4) = FelderUndDiagrammeAktuellesDokument
-
- '(5) = Abstaende
- '(6) = AbstaendeSeitenanfang
- '(7) = TabulatorpositionAusrichten
-
- ' bRadioBut(i) and bTempRadioBut(i)
- '(1) = Immer
- '(2) = AufNachfrage
- '(3) = Nie
-
- ' !!! -Feldbefehle- has to be checked, to get -Diagramme- enabeld !!!
-
- '- !!! -Current Document only- ist bei office beenden zu beachten!!!
-
- Call hNewDocument
- printlog ("- Tools/Options/Writer: General ")
-
- printlog (" - save states ")
- ToolsOptions
- Call hToolsOptions ("WRITER","GENERAL")
-
- irgendwas(2) = Feldbefehle.IsChecked
- irgendwas(3) = Diagramme.IsChecked
-
- bRadioBut(1) = Immer.IsChecked
- bRadioBut(2) = AufNachfrage.IsChecked
- bRadioBut(3) = Nie.IsChecked
-
- iMasseinheit = Masseinheit.GetSelIndex
- sTabAbstand = Tabulatorenabstand.GetText
-
- printlog ("- all states inverting ")
-
- if irgendwas(2) Then Feldbefehle.UnCheck Else Feldbefehle.Check
- if Feldbefehle.IsChecked Then if irgendwas(3) Then Diagramme.UnCheck Else Diagramme.Check
-
- if (Immer.IsChecked = True) Then AufNachfrage.Check Else Immer.Check
-
- bTempRadioBut(1) = Immer.IsChecked
- bTempRadioBut(2) = AufNachfrage.IsChecked
- bTempRadioBut(3) = Nie.IsChecked
-
- Tabulatorenabstand.ToMax
- sTemp = Tabulatorenabstand.GetText
- Tabulatorenabstand.More
-
- if (LiberalMeasurement (sTemp,Tabulatorenabstand.GetText) <> TRUE) Then Warnlog ("BugID: 82740: Tab stops max. isn't max.")
- Tabulatorenabstand.SetText (sTabAbstand)
-
- if ( Masseinheit.GetItemCount <> iMasseinheit ) Then Masseinheit.Select (Masseinheit.GetItemCount) _
- Else Masseinheit.Select (1)
- iTemp = Masseinheit.GetSelIndex
-
- sTemp = Tabulatorenabstand.GetText
- Tabulatorenabstand.ToMax
- if ( Tabulatorenabstand.GetText = sTemp ) Then Tabulatorenabstand.ToMin
- sTemp = Tabulatorenabstand.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- SO quit - start ")
-
- Call wOfficeRestart
-
- printlog ("- checking states ")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GENERAL" )
-
- if ( irgendwas(2) = Feldbefehle.IsChecked ) Then WarnLog "Feldbefehle state changed"
- if Feldbefehle.IsChecked Then if ( irgendwas(3) = Diagramme.IsChecked ) Then WarnLog "Diagramme state changed"
- if ( bTempRadioBut(1) <> Immer.IsChecked ) Then WarnLog "Immer state changed"
- if ( bTempRadioBut(2) <> AufNachfrage.IsChecked) Then WarnLog "AufNachfrage state changed"
- if ( bTempRadioBut(3) <> Nie.IsChecked ) Then WarnLog "Nie state changed"
-
- if ( Masseinheit.GetSelIndex <> iTemp ) Then WarnLog "Masseinheit state changed"
- if (LiberalMeasurement (sTemp,Tabulatorenabstand.GetText) <> TRUE ) Then WarnLog "Tabulatorenabstand state changed - watch BugID: 82744 for Status"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- all UnCheck -> o ")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GENERAL" )
-
- Feldbefehle.UnCheck
-
- if (AufNachfrage.IsChecked = True) Then Nie.Check Else AufNachfrage.Check
-
- bTempRadioBut(1) = Immer.IsChecked
- bTempRadioBut(2) = AufNachfrage.IsChecked
- bTempRadioBut(3) = Nie.IsChecked
-
- Masseinheit.Select (1)
- Tabulatorenabstand.ToMin
- sTemp = Tabulatorenabstand.GetText
- printlog ("More test ///'")
- Tabulatorenabstand.More
- if ( sTemp = Tabulatorenabstand.GetText ) Then WarnLog "Tabulatorenabstand More-Button not working; stemp1: "+sTemp + " =? (2) " +Tabulatorenabstand.GetText
- sTemp = Tabulatorenabstand.GetText
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- check if all UnChecked ")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GENERAL" )
-
- if Feldbefehle.IsChecked Then WarnLog "Feldbefehle x"
-
- if ( bTempRadioBut(1) <> Immer.IsChecked ) Then WarnLog "Immer state changed"
- if ( bTempRadioBut(2) <> AufNachfrage.IsChecked) Then WarnLog "AufNachfrage state changed"
- if ( bTempRadioBut(3) <> Nie.IsChecked ) Then WarnLog "Nie state changed"
-
- if ( Masseinheit.GetSelIndex <> 1 ) Then WarnLog "Masseinheit is not item 1"
- sTemp2 = Tabulatorenabstand.GetText
- if (LiberalMeasurement (sTemp, sTemp2) <> TRUE ) Then WarnLog "Tabulatorenabstand is not min. is: " +Tabulatorenabstand.GetText + " should: " +sTemp
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
-'---------------------------------------------------------------------------------
-
- printlog ("- check if tab stops get saved in document ")
- Call hNewDocument
-
- ' set Default Tab Stop to 2,5cm
- ToolsOptions
- Call hToolsOptions ("WRITER","GENERAL")
- Masseinheit.Select (2) ' cm
-' printlog "before " + Tabulatorenabstand.GetText
- Tabulatorenabstand.SetText ("2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "50" + mUnit)
-' printlog "after " + Tabulatorenabstand.GetText
-' printlog "seperator: " + GetDecimalSeperator(Tabulatorenabstand.GetText)
-' printlog "generated string: " + "2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "50cm"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
-' creating document with tabstops and save it
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "a<Tab>b<Tab>c<Tab>d<Tab>e<Tab>f<Tab>g<Tab>h<Tab>i<Tab>j"
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tab25cm.odt", "Writer8")
- Call hCloseDocument
- sleep (2)
-
-' change tab stops
- Call hNewDocument
-' set Default Tab Stop to 2,9cm
- ToolsOptions
- Call hToolsOptions ("WRITER","GENERAL")
- Masseinheit.Select (2) ' cm
-' printlog "before " + Tabulatorenabstand.GetText
- Tabulatorenabstand.SetText ( "2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "90" + mUnit )
-' printlog "after " + Tabulatorenabstand.GetText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- sleep (2)
-
-' load file in this environment
- '///use "output\\writer\\w95\\tab25cm.odt" ///
- hFileOpen( gOfficePath & "user\work\tab25cm.odt")
- sleep (2)
-' check TabStops, have to be the ones this file was saved with
- ToolsOptions
- Call hToolsOptions ("WRITER","GENERAL")
- Masseinheit.Select (2) ' cm
-' printlog "before " + Tabulatorenabstand.GetText
- if Tabulatorenabstand.GetText <> ("2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "50" + mUnit) Then
- warnlog "the tab stops didn't get saved in the document !!!"
- printlog "should be 2,.50" + mUnit + ", is" + Tabulatorenabstand.GetText
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Call hCloseDocument
- Call hCloseDocument
-
-'---------------------------------------------------------------------------------
- Printlog ("- all Check -> x ")
-
- ToolsOptions
- Call hToolsOptions ("WRITER","GENERAL")
-
-' NurFuerAktuellesDokument.Check
- Feldbefehle.Check
- Diagramme.Check
-' FelderUndDiagrammeAktuellesDokument.Check
-
- if (Nie.IsChecked = True) Then Immer.Check Else Nie.Check
-
- bTempRadioBut(1) = Immer.IsChecked
- bTempRadioBut(2) = AufNachfrage.IsChecked
- bTempRadioBut(3) = Nie.IsChecked
-
- Masseinheit.Select (2)
- itemp = Masseinheit.GetSelIndex
- sTemp = "3" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "21" + mUnit
- Tabulatorenabstand.SetText (sTemp)
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- check if all Checked ")
- ToolsOptions
- Call hToolsOptions ( "WRITER" , "GENERAL" )
-
-' if not NurFuerAktuellesDokument.IsChecked Then WarnLog "NurFuerAktuellesDokument o"
- if not Feldbefehle.IsChecked Then WarnLog "Feldbefehle o"
- if not Diagramme.IsChecked Then WarnLog "Diagramme o"
-' if not FelderUndDiagrammeAktuellesDokument.IsChecked Then WarnLog "FelderUndDiagrammeAktuellesDokument o"
-
- if ( bTempRadioBut(1) <> Immer.IsChecked ) Then WarnLog "Immer state changed"
- if ( bTempRadioBut(2) <> AufNachfrage.IsChecked) Then WarnLog "AufNachfrage state changed"
- if ( bTempRadioBut(3) <> Nie.IsChecked ) Then WarnLog "Nie state changed"
-
- if ( Masseinheit.GetSelIndex <> iTemp ) Then WarnLog "Masseinheit is not item " + iTemp + " it's: " + Masseinheit.GetSelIndex
- if (LiberalMeasurement (sTemp,Tabulatorenabstand.GetText) <> TRUE ) Then WarnLog "Tabulatorenabstand is not " + sTemp + " it's: " + Tabulatorenabstand.GetText
-
- printlog ("- restore states ")
-
-' if ( irgendwas(1) = TRUE ) Then NurFuerAktuellesDokument.Check Else NurFuerAktuellesDokument.UnCheck
- if ( irgendwas(2) = TRUE ) Then Feldbefehle.Check Else Feldbefehle.UnCheck
- if ( irgendwas(3) = TRUE ) Then Diagramme.Check Else _
- if Feldbefehle.IsChecked Then Diagramme.UnCheck
-' if Diagramme.IsVisible Then Diagramme.UnCheck
-' if ( irgendwas(4) = TRUE ) Then FelderUndDiagrammeAktuellesDokument.Check Else FelderUndDiagrammeAktuellesDokument.UnCheck
-
- if ( bRadioBut(1) = TRUE ) Then Immer.Check
- if ( bRadioBut(2) = TRUE ) Then AufNachfrage.Check
- if ( bRadioBut(3) = TRUE ) Then Nie.Check
-
- Masseinheit.Select (iMasseinheit) 'sw:ListBox:TP_LAYOUT_O
- Tabulatorenabstand.SetText (sTabAbstand) ' sw:MetricField:TP_LAYOUT_OPT:MF_TAB
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- hFileCloseAll()
-
-endcase
-
-'------------------------------------------------------------------------------
-sub hGetAllOptionsWriterGeneralCaption
- Dim fHoleTabPage as String
- Dim fHoleTabPage2 as String
- Dim lsHoleTabPage(100) as String
- Dim lsHoleTabPage2(100) as String
- dim i as integer
- dim x as integer
- dim y as integer ' for schleifen stuff
-
- '/// usually there are 4 entries in the list for Options->Writer->General->Caption->Categorie ///'
- '///+ if not, this routine is called ///'
- '///+ The error only appears, if the wrong listItem is not called yet! ///'
-
- lsHoleTabPage(0)=0
- lsHoleTabPage2(0)=0
-
- '/// on error, save before selecting entries to "output\\writer\\opt__" + iSprache + "." + gPlatGroup) ///
- '/// on error, save entries after selecting all to "output\\writer\\opt2__" + iSprache + "." + gPlatGroup) ///
- fHoleTabPage = ConvertPath(gOfficePath + "user\work\opt__" + iSprache + "." + gPlatGroup)
- fHoleTabPage2 = ConvertPath(gOfficePath + "user\work\opt2_" + iSprache + "." + gPlatGroup)
-
- '------------------------
- Printlog "(1/3) Get all items before selecting smth. "
- ' put them in lsHoleTabPage and write them to 'user\work\opt__...'
-
- Call hNewDocument
-
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
-
- for x=1 to ObjectList.GetItemCount
-' Printlog x
- ObjectList.Select (x)
- ListAppend ( lsHoleTabPage(), ObjectList.GetText + " " + Category.GetItemCount)
- for y=1 to Category.GetItemCount
- Category.Select (y)
- sleep (1)
- ListAppend ( lsHoleTabPage(), " " + Category.GetSelText )
- next y
- next x
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call ListWrite(lsHoleTabPage(),fHoleTabPage, "utf8")
- Printlog "list with all entries written to: "+fHoleTabPage
-
-' ------------------------
-
- Printlog "(2/3) Select every ListItem & exit with OK "
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
-
- for x=1 to ObjectList.GetItemCount
-' Printlog "-" + x
- ObjectList.Select (x)
- i=0
- while ( i < Category.GetItemCount )
- try
- Category.Select (i+1)
- catch
- Category.Select (i)
- endcatch
- i = Category.GetSelIndex
-' Printlog i
- sleep (2)
- Kontext "TabAutoCaption"
- Wend
- next x
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '------------------------
- Printlog "(3/3) Get all items after selecting all "
- ' put them in lsHoleTabPage2 and write them to 'user\work\opt2_...'
-
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
- for x=1 to ObjectList.GetItemCount
-' Printlog x
- ObjectList.Select (x)
- ListAppend ( lsHoleTabPage2(), ObjectList.GetText + " " + Category.GetItemCount)
- for y=1 to Category.GetItemCount
- Category.Select (y)
- sleep (1)
- ListAppend ( lsHoleTabPage2(), " " + Category.GetSelText )
- next y
- next x
-
- Call ListWrite(lsHoleTabPage2(),fHoleTabPage2, "utf8")
- Printlog "list with all entries after selecting every entry written to: "+fHoleTabPage2
-
-end sub
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterAutoCaption
-
- '/// look if properties get saved for each list item ///
- '///+ take "Numbering" ListBox to verify this ///
-
- ' checking Listentry '(7) = StarOffice 6.0 Impress' completely
-
- dim vObjectList(10) as integer
- dim vObjectListDescription(10) as string
- Dim vCategory(10) as integer
- Dim vCategoryTmp(10) as string
- Dim vNumbering(10) as integer
- Dim vCaptionSeparator(10) as string
- Dim vPosition(10) as integer
- Dim vLevel(10) as integer
- Dim vChapterSeparator(10) as string
- Dim vCharacterStyle(10) as integer
- Dim vApplyBorderAndShadow(10) as boolean
- Dim NumberOfObjects as integer
- dim i as integer
- dim y as integer ' for schleifen stuff
-
- '/// !no more Listentries than 9, you have to update the allocation for the var's! ///'
- Call hNewDocument
- printlog "- Tools/Options/Writer: AutoCaption "
-
- printlog ("- save states ")
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
-
- NumberOfObjects = ObjectList.GetItemCount
- Select Case gPlatGroup
- Case "w95"
- if (NumberOfObjects <> 9) then
- warnlog "Number of Object List is not correct"
- end if
- Case else
- if (NumberOfObjects <> 8) then
- warnlog "Number of Object List is not correct"
- end if
- end select
-
- for i=1 to NumberOfObjects
- ObjectList.Select (i)
- vObjectList(i) = ObjectList.IsChecked
- vObjectListDescription(i) = ObjectList.GetText
- vCategory(i) = Category.GetSelIndex
- vNumbering(i) = Numbering.GetSelIndex
- vCaptionSeparator(i) = CaptionSeparator.GetText
- vPosition(i) = Position.GetSelIndex
- vLevel(i) = Level.GetSelIndex
- vChapterSeparator(i) = ChapterSeparator.GetText
- vCharacterStyle(i) = CharacterStyle.GetSelIndex
- vApplyBorderAndShadow(i) = ApplyBorderAndShadow.IsChecked
- next i
-
- '-- just checking the checkboxes of 'ObjectList'
- printlog ("- uncheck all object - checkboxes ")
- for i=1 to NumberOfObjects
- ObjectList.Select (i)
- ObjectList.UnCheck
- next i
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- verify if all unchecked and check all ")
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
- for i=1 to NumberOfObjects
- ObjectList.Select (i)
- if ObjectList.IsChecked Then
- WarnLog ObjectList.GetText & " is checked though it had been unchecked before"
- else
- ObjectList.Check
- end if
- next i
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- verify all checkboxes are checked ")
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
- for i=1 to NumberOfObjects
- ObjectList.Select (i)
- if ( ObjectList.IsChecked = FALSE ) Then
- WarnLog ObjectList.GetText & " is unchecked though it had been checked before"
- ObjectList.Check
- end if
- next i
-
- printlog ("- change states ")
- '/// look if properties get saved for each list item
- for i=1 to NumberOfObjects
- ObjectList.Select (i)
- printlog " - " & ObjectList.GetText
- if ObjectList.IsChecked Then
- if i <= 7 then Numbering.Select i
- CaptionSeparator.Settext "Caption Separator " & cstr(i)
- ChapterSeparator.Settext cstr(i)
- Level.Select i
- CharacterStyle.Select i
- Select Case i
- case 1:
- Category.Select 2
- Position.Select 1
- case 2:
- Category.Select 3
- Position.Select 2
- case 3:
- Category.Select 4
- ApplyBorderAndShadow.Check
- case 4:
- Category.Select 5
- case 5:
- Category.Select 2
- case 6:
- Category.Select 3
- case 7:
- Category.Select 4
- case 8:
- Category.Select 5
- if Numbering.GetItemCount > 7 then
- Numbering.Select Numbering.GetItemCount
- else
- Numbering.Select 4
- end if
- case 9:
- Category.Select 2
- if Numbering.GetItemCount > 7 then
- Numbering.Select Numbering.GetItemCount
- else
- Numbering.Select 5
- end if
-
- end select
- vCategoryTmp(i) = Category.GetSelText
- else
- Warnlog ObjectList.GetText & " is not checked: Verify test script"
- end if
- next i
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- SO quit - start")
-
- Call wOfficeRestart
-
- printlog ("- checking states ")
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
- for i=1 to NumberOfObjects
- ObjectList.Select (i)
- printlog " - " & ObjectList.GetText
- wait 500
- if ObjectList.IsChecked Then
- if i <= 7 then
- if Numbering.GetSelIndex <> i then
- Warnlog "- 'Numbering' changed after restart"
- else
- printlog "- 'Numbering' => ok"
- end if
- end if
- if CaptionSeparator.Gettext <> "Caption Separator " & cstr(i) then
- Warnlog "- 'Caption Separator' changed after restart"
- else
- printlog "- 'Caption Separator' => ok"
- end if
- if ChapterSeparator.Gettext <> cstr(i) then
- Warnlog "- 'Chapter Separator' changed after restart"
- else
- printlog "- 'Chapter Separator' => ok"
- end if
- if Level.GetSelIndex <> i then
- Warnlog "- 'Level' changed after restart"
- else
- Printlog "- 'Level' => ok"
- end if
- if CharacterStyle.GetSelIndex <> i then
- Warnlog "- 'Character Style' changed after restart"
- else
- printlog "- 'Character Style' => ok"
- end if
-
- if Category.GetSelText <> vCategoryTmp(i) then
- Warnlog "- 'Category' changed after restart. Not " & vCategoryTmp(i) & " but " & Category.GetSelText
- else
- printlog "- 'Category' => ok"
- end if
-
- Select Case i
- case 1:
- if Position.GetSelIndex <> 1 then
- Warnlog "- 'Position' changed after restart"
- else
- printlog "- 'Position' => ok"
- end if
-
- case 2:
- if Position.GetSelIndex <> 2 then
- Warnlog "- 'Position' changed after restart"
- else
- printlog "- 'Position' => ok"
- end if
-
- case 3:
- if Position.IsEnabled = true then
- Warnlog "- 'Position' should be disabled"
- else
- printlog "- 'Position' disabled => ok"
- end if
-
- if ApplyBorderAndShadow.IsChecked = false then
- Warnlog "- 'Apply Border and Shadow' changed after restart"
- else
- printlog "- 'Apply Border and Shadow => ok"
- end if
-
- case 4:
- if Position.IsEnabled = true then
- Warnlog "- 'Position' should be disabled"
- else
- printlog "- 'Position' disabled => ok"
- end if
-
- case 5:
- if Position.IsEnabled = true then
- Warnlog "- 'Position' should be disabled"
- else
- printlog "- 'Position' disabled => ok"
- end if
-
- case 6:
- if Position.IsEnabled = true then
- Warnlog "- 'Position' should be disabled"
- else
- printlog "- 'Position' disabled => ok"
- end if
-
- case 7:
- if Position.IsEnabled = true then
- Warnlog "- 'Position' should be disabled"
- else
- printlog "- 'Position' disabled => ok"
- end if
-
- case 8:
- if Numbering.GetItemCount > 7 then
- if Numbering.GetSelIndex <> Numbering.GetItemCount then
- Warnlog "- 'Numbering' changed after restart"
- else
- printlog "- 'Numbering' => ok"
- end if
- else
- if Numbering.GetSelIndex <> 4 then
- Warnlog "- 'Numbering' changed after restart"
- else
- printlog "- 'Numbering' => ok"
- end if
- end if
-
- if Position.IsEnabled = true then
- Warnlog "- 'Position' should be disabled"
- else
- printlog "- 'Position' disabled => ok"
- end if
-
- case 9:
- if Numbering.GetItemCount > 7 then
- if Numbering.GetSelIndex <> Numbering.GetItemCount then
- Warnlog "- Numbering changed after restart"
- else
- printlog "- Numbering => ok"
- end if
- else
- if Numbering.GetSelIndex <> 5 then
- Warnlog "- 'Numbering changed after restart"
- else
- printlog "- 'Numbering' => ok"
- end if
- end if
-
- if Position.IsEnabled = true then
- Warnlog "- 'Position' should be disabled"
- else
- printlog "- 'Position' disabled => ok"
- end if
-
- end select
- else
- Warnlog "- " & ObjectList.GetText & " is not checked"
- end if
- next i
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog ("- restore states ")
-
- ToolsOptions
- Call hToolsOptions ("WRITER","AutoCaption")
- Kontext "TabAutoCaption"
-
- for i=1 to NumberOfObjects
- ObjectList.Select (i)
- if ObjectList.IsChecked then
- if vCategory(i) > Category.GetItemCount then
- Category.Select Category.GetItemCount
- else
- Category.Select vCategory(i)
- end if
- Numbering.Select vNumbering(i)
- CaptionSeparator.SetText vCaptionSeparator(i)
- if Position.IsEnabled then Position.Select vPosition(i)
- Level.Select vLevel(i)
- ChapterSeparator.Settext vChapterSeparator(i)
- CharacterStyle.Select vCharacterStyle(i)
- if ApplyBorderAndShadow.IsEnabled then
- Select Case vApplyBorderAndShadow(i)
- Case true
- ApplyBorderAndShadow.Check
- case false
- ApplyBorderAndShadow.Uncheck
- end select
- end if
- end if
- Select case vObjectList(i)
- Case true
- ObjectList.Check
- case false
- ObjectList.Uncheck
- end select
- next i
-
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- hFileCloseAll()
-
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterGeneral
- Dim i as integer
- Dim ist_aktualisiert as boolean
- Dim CompareThis as string
-
- ' State is saved with document. Thats why I use 3 docs
- Call hNewDocument
- printlog "- Extras / Optionen / Sonstiges / Verkn?pfungen aktualisieren "
- ToolsOptions
- Call hToolsOptions("WRITER","GENERAL")
- printlog "- Update links when loading -> always "
- Immer.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- FileOpen
- Kontext "OeffnenDlg"
- Dateiname.SetText ConvertPath(gtesttoolpath + "writer\optional\input\masterdoc\update1.sxg")
- Oeffnen.Click
- Kontext "Active"
- if active.exists then
- if Active.GetRT = 304 then
- Warnlog Active.Gettext
- Warnlog "Update all links should not appear!"
- wait 500
- try
- Active.yes
- catch
- Active.Ok
- endcatch
- end if
- end if
- Sleep 2
- Call hCloseDocument
- Sleep 2
-
- ToolsOptions
- Call hToolsOptions("WRITER","GENERAL")
- if not Immer.IsChecked then Warnlog "Option 'always' has not been changed"
- printlog "- Update links when loading -> On request "
- AufNachfrage.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- FileOpen
- Kontext "OeffnenDlg"
- Dateiname.SetText ConvertPath(gtesttoolpath + "writer\optional\input\masterdoc\update2.sxg")
- Oeffnen.Click
- Sleep 2
- Kontext "Active"
- if active.exists then
- if Active.GetRT = 304 then
- Active.yes
- else
- Warnlog "Update all links should appear!"
- end if
- end if
- Sleep 2
- Call hCloseDocument
- Sleep 2
-
- ToolsOptions
- Call hToolsOptions("WRITER","GENERAL")
- if not AufNachfrage.IsChecked then Warnlog "Option 'On request' has been changed"
- printlog "- Update links when loading -> Never "
- Nie.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- FileOpen
- Kontext "OeffnenDlg"
- Dateiname.SetText ConvertPath(gtesttoolpath + "writer\optional\input\masterdoc\update3.sxg")
- Oeffnen.Click
- Kontext "Active"
- if active.exists then
- if Active.GetRT = 304 then
- Warnlog "Update all links should not appear!"
- Active.yes
- end if
- end if
- Sleep 3
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up>",10
- DocumentWriter.TypeKeys "<Mod1 Home>", 4
- for i=1 to 4
- DocumentWriter.TypeKeys "<Shift End>"
- try
- EditCopy
- if i <> 4 and GetClipboardtext <> "Dies ist der Text" then ist_aktualisiert = true
- catch
- ist_aktualisiert=false
- endcatch
- DocumentWriter.TypeKeys "<Mod1 End>"
- wait 500
- DocumentWriter.TypeKeys "<Down><Home>"
- next i
- if ist_aktualisiert=true then Warnlog " Document has been updated !"
- Sleep 2
- Call hCloseDocument
- Sleep 2
-
- ToolsOptions
- Call hToolsOptions("WRITER","GENERAL")
- if Nie.IsChecked = false then Warnlog "Option 'Never' is not checked"
- AufNachfrage.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- hFileCloseAll()
-
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterMailMerge
-
- Call hNewDocument
- printlog ("- Tools/Options/Writer: Mail Merge ")
- Kontext "Navigator"
- if Navigator.Exists then ViewNavigator
- ToolsOptions
- Call hToolsOptions ("WRITER","MailMergeEMail")
-
- '/// Fill out all fields
- printlog " - fill out Mail Settings"
- Kontext "TabMailMergeEmail"
- YourName.Settext "Fredrik Haegg"
- EmailAddress.Settext "helge.delfs@oracle.com"
- SendReplies.Check
- ReplyAddress.Settext "fredrikh@openoffice.org"
- ServerName.Settext "MySMTP-Server"
- UseSecure.Check
-
- '/// Change details for Server Authentication
- printlog " - fill out Authentication Settings"
- ServerAuthentication.Click
- wait 500
- Kontext "ServerAuthentication"
- SMTPauthentication.Check
-
- IncomingMailServer.Check
- Server.Settext "MySMTP-Server"
- Port.Settext "111"
- IMAP.Check
- User.Settext "MyAuthenticationUserName"
- Password.Settext "MyAuthenticationPassword"
- ServerAuthentication.Ok
-
- '/// Close 'Server Authentication dialog, reopen and check values set
- printlog " - check settings"
- Kontext "TabMailMergeEmail"
- ServerAuthentication.Click
- wait 500
- Kontext "ServerAuthentication"
- if Not SMTPauthentication.IsChecked then Warnlog "SMTP Authentication is not checked anymore"
- if Not IncomingMailServer.IsChecked then Warnlog "Incoming Mail Server has been changed"
- if Server.Gettext <> "MySMTP-Server" then Warnlog "Servername has been changed"
- if Port.Gettext <> "111" then Warnlog "Server Port has been changed"
- if Not IMAP.IsChecked then Warnlog "IMAP-state has been changed"
- if User.Gettext <> "MyAuthenticationUserName" then Warnlog "Authentication username has been changed"
- if Password.Gettext <> "MyAuthenticationPassword" then Warnlog "Authentication password has been changed"
-
- '/// Change settings for SMTP outgoing
- SMTPOutgoing.Check
- OutgoingUsername.Settext "MyOutgoingUsername"
- OutgoingPassword.Settext "MyOutgoingPassword"
- ServerAuthentication.Ok
-
- '/// Close options dialog and restart the office
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
- printlog " - restart office"
- Call wOfficeRestart
-
- '/// Reopen Tools/Options and check settings
- printlog " - check settings"
- ToolsOptions
- Call hToolsOptions ("WRITER","MailMergeEMail")
-
- Kontext "TabMailMergeEmail"
- if YourName.Gettext <> "Fredrik Haegg" then Warnlog "'Your Name' has been changed after a restart"
- if EmailAddress.Gettext <> "helge.delfs@oracle.com" then Warnlog "'Email Address' has been changed after a restart"
- if Not SendReplies.IsChecked then Warnlog "'Send replies' has been changed after a restart"
- if ReplyAddress.Gettext <> "fredrikh@openoffice.org" then Warnlog "'Reply adresses' has been changed after a restart"
- if ServerName.Gettext <> "MySMTP-Server" then Warnlog "'Server name' has been changed after a restart"
- if UseSecure.IsChecked = false then Warnlog "'Secure' has been changed after a restart"
-
- ServerAuthentication.Click
- wait 500
- Kontext "ServerAuthentication"
- if Not SMTPOutgoing.IsChecked then Warnlog "'SMTP Server' has been changed after a restart"
- if OutgoingUsername.Gettext <> "MyOutgoingUsername" then Warnlog "'Username' has been changed after a restart"
- if OutgoingPassword.Gettext <> "MyOutgoingPassword" then Warnlog "'Password' has been changed after a restart"
-
- ServerAuthentication.Ok
-
- '/// Check 'Test Settings' button
- Kontext "TabMailMergeEmail"
- TestSettings.Click
-
- Kontext "TestAccountSettings"
- Do
- if TaskStatusListBox.GetItemCount > 0 then
- TestAccountSettings.Cancel
- exit do
- end if
- wait 500
- Loop
- if TestAccountSettings.Exists then TestAccountSettings.Cancel
-
- '/// Reset all states
- Kontext "TabMailMergeEmail"
- ServerAuthentication.Click
-
- Kontext "ServerAuthentication"
- IncomingMailServer.Check
- Server.Settext ""
- Port.Settext "110"
- User.Settext ""
- Password.Settext ""
-
- SMTPOutgoing.Check
- OutgoingUsername.Settext ""
- OutgoingPassword.Settext ""
-
- SMTPauthentication.UnCheck
- ServerAuthentication.Ok
-
- Kontext "TabMailMergeEmail"
- YourName.Settext ""
- EmailAddress.Settext = ""
- ReplyAddress.Settext ""
- ServerName.Settext ""
- SendReplies.UnCheck
- UseSecure.Uncheck
-
- '/// Close options dialog and restart the office
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- hFileCloseAll()
-
-endcase
-'------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/option/wr_o_5.inc b/testautomation/writer/optional/includes/option/wr_o_5.inc
deleted file mode 100644
index c8676fb164f2..000000000000
--- a/testautomation/writer/optional/includes/option/wr_o_5.inc
+++ /dev/null
@@ -1,200 +0,0 @@
-'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@oracle.com
-'*
-'* short description : This testcase is for thai issues only
-'*
-'\***********************************************************************
-
-sub wr_o_5
-
- Call tLanguageSettingsComplexTextLayout
-
-end sub
-
-testcase tLanguageSettingsComplexTextLayout
-
- Dim i as integer
- Dim j as integer
- Dim iNumeralsCounter as integer
- Dim iNumeralsCount as integer
- Dim bAsianLanguage as boolean
- Dim bCTLLanguage as boolean
- Dim sCTLLan() as string
- Dim sCurrentDocumentLanguage as string
- Dim sCurrentCTLLanguage as string
- Dim bSequenceChecking as boolean
-
- '/// Open new writerdocument
- Call hNewDocument
- '/// Activate Asian support
- bAsianLanguage = ActiveDeactivateAsianSupport(True)
- '/// Activate CTL support
- bCTLLanguage = ActiveDeactivateCTLSupport(True)
-
- ToolsOptions
- '/// Goto 'Tools->Options->Language settings->Languages
- Call hToolsOptions ("LanguageSettings","Languages")
- sCurrentCTLLanguage = LanguageComplexScript.GetSelText
- Kontext "TabSprachen"
- For i = 1 to LanguageComplexScript.GetItemCount
- '/// Select CTL-Language
- LanguageComplexScript.Select i
- sCurrentDocumentLanguage = LanguageComplexScript.GetSelText
- printlog "- Current selected CTL Language: " & sCurrentDocumentLanguage
- '/// close options dialog with 'ok'
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
- '/// Reopen options and go to Tabpage 'Complex Text Layout'
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","ComplexTextLayout")
-
- Kontext "TabComplexTextLayout"
- bSequenceChecking = FALSE
- Select Case iSprache
- '/// Checkboxes under 'Sequence checking' should all be checked for CTL languages
- '/// + like "Thai", "Lao", "Khmer", "Vietnamese"
- Case 01
- sCTLLan = Array("Thai", "Lao", "Khmer", "Burmese", "Vietnamese")
- Case 49
- sCTLLan = Array("Thai", "Lao", "Khmer", "Birmanisch", "Vietnamesisch")
- Case else
- QAErrorlog "Please adapt testcase for this language"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
- goto IfNoSupport
- end select
-
- for j = 0 to 4
- if sCTLLan(j) = sCurrentDocumentLanguage then
- bSequenceChecking = TRUE
- exit for
- end if
- next j
-
- Select Case bSequenceChecking
- Case TRUE
- if UseSequenceChecking.IsChecked = False then
- Warnlog "'Sequence Checking' should be checked for language: " & sCurrentDocumentLanguage
- end if
- if Restricted.IsEnabled = False or Restricted.IsChecked = False then
- Warnlog "'Restricted' should be enabled and checked for language: " & sCurrentDocumentLanguage
- end if
- if TypeAndReplace.IsEnabled = False or TypeAndReplace.IsChecked = False then
- Warnlog "'Type And Replace' should be enabled and checked for language: " & sCurrentDocumentLanguage
- end if
-
- Case FALSE
- if UseSequenceChecking.IsChecked = True then
- QAErrorlog "'Sequence Checking' should not be checked for language: " & sCurrentDocumentLanguage
- end if
- if Restricted.IsEnabled = True AND Restricted.IsChecked = True then
- QAErrorlog "'Restricted' should not be checked for language: " & sCurrentDocumentLanguage
- end if
- if TypeAndReplace.IsEnabled = True AND TypeAndReplace.IsChecked = True then
- QAErrorlog "'Type And Replace' should not checked for language: " & sCurrentDocumentLanguage
- end if
- end select
-
- 'Get the number of Numerals-entries.
- iNumeralsCount = Numerals.GetItemCount
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","Languages")
- Kontext "TabSprachen"
- next i
-
- Kontext "ExtrasOptionenDlg"
- if ExtrasOptionenDlg.Exists then ExtrasOptionenDlg.Ok
-
- printlog "Check the Numerals-menu."
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","ComplexTextLayout")
-
- Printlog " Select every entry in the list, then press OK to close the dialogue, then open it again and check if the value got saved."
- for iNumeralsCounter = 1 to iNumeralsCount
- Numerals.Select iNumeralsCounter
- Printlog " Numerals nr: " + iNumeralsCounter + " = " + Numerals.GetSelText
-
- 'Press ok, and open the dialogue again.
- Kontext "ExtrasOptionenDlg"
- if ExtrasOptionenDlg.Exists then ExtrasOptionenDlg.Ok
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","ComplexTextLayout")
-
- if Numerals.GetSelIndex <> iNumeralsCounter then Warnlog "The Numeral-Entry number: " + iNumeralsCounter + " didn't get saved when pressing OK in the FormatCharacter-dialogue."
- next iNumeralsCounter
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- '/// Choose Thai as CTL language
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","Languages")
- Kontext "TabSprachen"
- LanguageComplexScript.Select sCTLLan(0)
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
- '/// Restart office
- Call wOfficeRestart
-
- '/// Reopen options and go to Tabpage 'Complex Text Layout'
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","ComplexTextLayout")
- '/// Check if all checkboxes under 'Sequence checking' are checked
- if UseSequenceChecking.IsChecked = False then
- Warnlog "'Sequence Checking' should be checked for language: " & sCTLLan(0)
- end if
- if Restricted.IsEnabled = False or Restricted.IsChecked = False then
- Warnlog "'Restricted' should be enabled and checked for language: " & sCTLLan(0)
- end if
- if TypeAndReplace.IsEnabled = False or TypeAndReplace.IsChecked = False then
- Warnlog "'Type And Replace' should be enabled and checked for language: " & sCTLLan(0)
- end if
-
- '/// Reset CTL Language
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
- ToolsOptions
- Call hToolsOptions ("LanguageSettings","Languages")
- Kontext "TabSprachen"
- LanguageComplexScript.Select sCurrentCTLLanguage
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Ok
-
-IfNoSupport:
- Call ActiveDeactivateAsianSupport(bAsianLanguage)
- Call ActiveDeactivateCTLSupport(bCTLLanguage)
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
diff --git a/testautomation/writer/optional/includes/option/wr_o_a.inc b/testautomation/writer/optional/includes/option/wr_o_a.inc
deleted file mode 100644
index 64f60fa7e0f9..000000000000
--- a/testautomation/writer/optional/includes/option/wr_o_a.inc
+++ /dev/null
@@ -1,663 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Writer options test
-'*
-'************************************************************************
-'*
-' #1 tToolsOptionsWriterPrint
-' #1 tToolsOptionsWriterTableMove
-' #1 tToolsOptionsWriterTableInsert
-' #1 tToolsOptionsWriterTableEffects
-' #1 tToolsOptionsWriterTableEffects2
-' #1 tToolsOptionsWriterDirectCursor2
-'*
-'\***********************************************************************
-
-testcase tToolsOptionsWriterPrint
- ' called after my save/restart testing
- ' The real print with paper to touch - and to get from the printer :-(
-
- Dim i as integer
- printlog "- Tools/Options/Writer: PrintWriter (real print)"
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\options\options3.sxw" )
-
-
- Printlog " - check all (real print)"
- ToolsOptions
- Call hToolsOptions("WRITER","PRINT")
-
- Grafiken.Check
- Kontrollfelder.Check
- Hintergrund.Check
- SchwarzDrucken.Check
- LinkeSeiten.Check
- RechteSeiten.Check
- Prospekt.UnCheck
-
- Seitenende.Check
- AusDruckereinstellung.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- if (NO_REAL_PRINT = False) Then
- Printlog " - print 1"
- kontext "funktionsleiste"
- Drucken
- for i=1 to 10
- Kontext "Druckbestaetigung"
- if Druckbestaetigung.Exists then
- sleep 1
- else
- i=100
- end if
- next i
- Sleep 3
- end if
-
- ToolsOptions
- Call hToolsOptions("WRITER","PRINT")
-
- Printlog " - uncheck everything"
-
- Grafiken.UnCheck
- Kontrollfelder.UnCheck
- Hintergrund.UnCheck
- SchwarzDrucken.UnCheck
- LinkeSeiten.Check ' that's so, otherwise there will be no printing
- RechteSeiten.Check ' that's so, otherwise there will be no printing
- Prospekt.UnCheck
- Keine.Check
- AusDruckereinstellung.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep 10
-
- if (NO_REAL_PRINT = False) Then
- Printlog " - print 2"
- kontext "funktionsleiste"
- Drucken
- for i=1 to 10
- Kontext "Druckbestaetigung"
- if Druckbestaetigung.Exists then
- sleep 1
- else
- i=100
- end if
- next i
- Sleep 3
- end if
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- Call wOptionsUndo ( "Drucken" )
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterTableMove
- Dim sLager$
- Dim Spalte1 as Double
- Dim Spalte2 as Double
- Dim Zeile1 as Double
- Dim Zeile2 as Double
- Dim Abstaende(3) as Double
- Dim AbLi as Double
- Dim AbRe as Double
- Dim VerschubZeile as Double
- Dim VerschubSpalte as Double
- Dim sSeparator as string
- Dim sRow1 as string
-
- ' Hints if there are some errors:
- ' win2000: Start::Systemsteuerung::Laendereinstellungen::Gebietsschema
- ' winXP : Sart::ControlPanel::Regional and Language Options:: Region Options:: Standards&formats
-
- '/// New writerdocument
- Call hNewDocument
- ToolsOptions ' Measurement unit should be set to cm
- Call hToolsOptions("WRITER","GENERAL")
- '/// Set measurement unit to cm in options
- Masseinheit.Select 2
- sSeparator = GetDecimalSeperator ( Tabulatorenabstand.GetText )
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- printlog "'///- Tools / Options / Table: Move"
- '/// Tools / Options / Table
- ToolsOptions
- Call hToolsOptions("WRITER","TABLE")
-
- Printlog "'/// - check minimum settings"
- '/// check minimum settings
- if gPlatform="solaris" then
- sLager$ = sSeparator + "25" + mUnit
- else
- sLager$ = "0" + sSeparator + "25" + mUnit
- end if
- VerschiebenZeile.ToMin
- if sLager$ <> VerschiebenZeile.GetText then Warnlog "Move cells: Row isn't min ( " + sLager$ + " ) but " +VerschiebenZeile.GetText
- VerschiebenSpalte.ToMin
- if sLager$ <> VerschiebenSpalte.GetText then Warnlog "Move cells: Column isn't min ( " + sLager$ + " ) but " +VerschiebenZeile.GetText
-
- Printlog "- make settings"
- '/// make the following settings
- '/// set move cells: row to 1.00
- '/// set move cells: column to 1.25
- VerschiebenZeile.SetText "1" + sSeparator + "00"
- VerschiebenSpalte.SetText "1" + sSeparator + "25"
- VerschubZeile = 1.00
- VerschubSpalte = 1.25
-
- '/// check radiobutton 'Variable'
- Variabel.Check
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Printlog "- Insert table"
- '/// Insert a table
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- '/// set rows an columns to 2
- Spalten.SetText "2"
- Zeilen.SetText "2"
- TabelleEinfuegenWriter.OK
-
- Printlog "remember column width of inserted table"
- Call wTypeKeys "<Left><Mod2 Down>"
- Call wTypeKeys "<Left><Mod2 Up>"
-
- ' ** Grundwerte der Tabelle holen ( alles schon in Double und rechenbar ) since 05.02.2001 ;-)
- Spalte1 = SpaltenBreiteHolen
-
- FormatRowHeight
- Kontext "Zellenhoehe"
- sRow1 = Hoehe.GetText
- Zellenhoehe.OK
-
- Zeile1 = ZeilenHoeheHolen
- Call wTypeKeys "<Right>"
- Spalte2 = SpaltenBreiteHolen
- Call wTypeKeys "<Down>"
- Zeile2 = Zeile1
- Call wTypeKeys "<Up><Left>"
- SeitenAbstaendeHolen ( Abstaende() )
- AbLi = Abstaende(1)
- AbRe = Abstaende(2)
-
- Printlog "Startwerte"
- Printlog "Width : Column 1: " & Spalte1 & " Column 2: " & Spalte2
- Printlog "Height : Row 1: " & Zeile1 & " Row 2: " & Zeile2 & Chr(13)
-
- Printlog "- with <Alt Left> downsize 1. column from right side"
- Call wTypeKeys "<Mod2 Left>"
- Call SpaltenBreiteTesten ( Spalte1-VerschubZeile )
- Call SeitenAbstaendeTesten ( 0.00, VerschubZeile )
-
- Printlog "- with <Shift Alt Right> downsize 1. column from left side"
- Call wTypeKeys "<Shift Mod2 Right>"
- Call SpaltenBreiteTesten ( Spalte1 - VerschubZeile *2 )
- Call SeitenAbstaendeTesten ( VerschubZeile, VerschubZeile )
-
- Printlog "- with <Alt Right> upsize 1. column to the right 2 times"
- Call wTypeKeys "<Mod2 Right>"
- Call wTypeKeys "<Mod2 Right>"
- Call SpaltenBreiteTesten ( Spalte1 )
- Call SeitenAbstaendeTesten ( VerschubZeile, 0 )
-
- Printlog "- check size of 2. column"
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte2 - VerschubZeile )
- Call SeitenAbstaendeTesten ( VerschubZeile, 0 )
-
- Printlog "- with <Alt Left> upsize 2. column from left"
- Call wTypeKeys "<Mod2 Left>"
- wait 100
- Call SpaltenBreiteTesten ( Spalte2 - VerschubZeile*2 )
- Call SeitenAbstaendeTesten ( VerschubZeile, VerschubZeile )
-
- Printlog "- with <Shift Alt Right> downsize 2. column from left"
- Call wTypeKeys "<Shift Mod2 Right>"
- Call SpaltenBreiteTesten ( Spalte2 - VerschubZeile*3 )
- Call SeitenAbstaendeTesten ( VerschubZeile*2, VerschubZeile )
-
- Printlog "- with <Shift Alt Left> upsize 2. column to the left 2 times"
- Call wTypeKeys "<Shift Mod2 Left>"
- Call wTypeKeys "<Shift Mod2 Left>"
- Call SpaltenBreiteTesten ( Spalte2-VerschubZeile )
- Call SeitenAbstaendeTesten ( 0, VerschubZeile )
-
- Printlog "- with <Shift Alt Left> upsize 2. column to the right"
- Call wTypeKeys "<Shift Mod2 Left>"
- Call SpaltenBreiteTesten ( Spalte2 )
- Call SeitenAbstaendeTesten ( 0, 0 )
-
- Printlog "- with <Alt Down> upsize 1. column down"
- Call wTypeKeys "<Left><Mod2 Down>"
- Call ZeilenHoeheTesten ( Zeile1+VerschubSpalte )
- Call SeitenAbstaendeTesten ( 0, 0 )
-
- Printlog "- with <Alt Up> downsize 1. column up"
- Call wTypeKeys "<Mod2 Up>"
- Call ZeilenHoeheTesten ( ( Zeile1 ) )
- Call SeitenAbstaendeTesten ( 0, 0 )
-
- FormatRowHeight
- Kontext "Zellenhoehe"
- if (StrToDouble ( Hoehe.Gettext ) <> Zeile1 ) then
- Hoehe.More
- printlog " from now on, there is an offset to the original of 10mm"
- Zeile2 = Zeile2 + ( StrToDouble ( Hoehe.Gettext ) - Zeile2 )
- end if
- Zellenhoehe.OK
-
- Printlog "- with <Alt Down> upsize 2. column down"
- Call wTypeKeys "<Right><Mod2 Down>"
- Call ZeilenHoeheTesten ( Zeile2+VerschubSpalte*2/2 )
- Call SeitenAbstaendeTesten ( 0, 0 )
-
- Printlog "- with <Alt Up> downsize 2. column up"
- Call wTypeKeys "<Mod2 Up>"
- Call ZeilenHoeheTesten ( Zeile2 )
- Call SeitenAbstaendeTesten ( 0, 0 )
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- Call wOptionsUndo "Tabelle"
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterTableInsert
- Dim sLager$
- Dim Spalte1 as Double
- Dim Spalte2 as Double
- Dim Zeile as Double
- Dim VerschubZeile as Double
- Dim VerschubSpalte as Double
- Dim sSeparator as string
-
- Call hNewDocument
-
- printlog "- Tools / Options / Table"
- ToolsOptions
- Call hToolsOptions("WRITER","TABLE")
-
- Printlog "- make settings"
- sSeparator = GetDecimalSeperator(EinfuegenZeile.GetText)
- EinfuegenZeile.SetText "0" + sSeparator + "73"
- VerschubZeile = 0.73
- EinfuegenSpalte.SetText "3" + sSeparator + "15"
- VerschubSpalte = 3.15
- Variabel.Check
- Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Printlog "- Insert a table"
- Call hNewDocument
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- Spalten.SetText "2"
- Zeilen.SetText "2"
- TabelleEinfuegenWriter.OK
-
- ' ** Grundwerte der Tabelle holen ( alles schon in Double und rechenbar )
- Spalte1 = SpaltenBreiteHolen
- Zeile = ZeilenHoeheHolen
- Call wTypeKeys "<Right>"
- Spalte2 = SpaltenBreiteHolen
- ' **
-
- Printlog "- with <Alt Insert><Up> insert a row from top"
- Call wTypeKeys "<Mod2 Insert><Up>"
- Call ZeilenHoeheTesten ( VerschubZeile )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
- Call ZeilenTesten ( 3 )
- Call SpaltenTesten ( 2 )
-
- Printlog "- with <Alt Insert><Down> insert a row from downside"
- Call wTypeKeys "<Down><Mod2 Insert><Down>"
- Call ZeilenHoeheTesten ( VerschubZeile )
- Call ZeilenTesten ( 4 )
- Call SpaltenTesten ( 2 )
-
- Printlog "- with <Alt Delete><Up> delete 1. row from top"
- Call wTypeKeys "<Mod2 Delete><Up>"
- Call ZeilenHoeheTesten ( 0.01 )
- Call ZeilenTesten ( 3 )
- Call SpaltenTesten ( 2 )
-
- Printlog "- with <Alt Delete><Down> delete 1. row from the button"
- Call wTypeKeys "<Mod2 Delete><Down>"
- Call ZeilenHoeheTesten ( VerschubZeile )
- Call ZeilenTesten ( 2 )
- Call SpaltenTesten ( 2 )
-
- Printlog "- with <Alt Insert><Left> insert a column from left side"
- Call wTypeKeys "<Mod2 Insert><Left>"
- Call SpaltenBreiteTesten ( VerschubSpalte )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
- Call ZeilenTesten ( 2 )
- Call SpaltenTesten ( 3 )
-
- Printlog "- with <Alt Insert><Right> insert a rown from right side"
- Call wTypeKeys "<Right><Right><Mod2 Insert><Right>"
- Call SpaltenBreiteTesten ( VerschubSpalte )
- Call ZeilenTesten ( 2 )
- Call SpaltenTesten ( 4 )
-
- Printlog "- with <Alt Delete><Left> delete 1. Column from left side"
- Call wTypeKeys "<Mod2 Delete><Left>"
- DocumentWriter.TypeKeys "<Up>"
- Call SpaltenBreiteTesten ( Spalte1-VerschubSpalte )
- Call ZeilenTesten ( 2 )
- Call SpaltenTesten ( 3 )
- Call wTypeKeys "<Right>"
- Call SeitenAbstaendeTesten ( VerschubSpalte, 0.00 )
-
- Printlog "- with <Alt Delete><Right> delete last column from right side"
- Call wTypeKeys "<Right><Right><Mod2 Delete><Right>"
- Call SpaltenBreiteTesten ( Spalte2-VerschubSpalte )
- Call ZeilenTesten ( 2 )
- Call SpaltenTesten ( 2 )
- Call SeitenAbstaendeTesten ( VerschubSpalte, Spalte2 -VerschubSpalte )
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- Call wOptionsUndo "Tabelle"
-endcase
-
-' ************************************************************************
-
-testcase tToolsOptionsWriterTableEffects
- Dim Spalte1 as Double
- Dim Spalte2 as Double
- Dim Spalte3 as Double
- Dim VerschubZeile as Double
-
- Call hNewDocument
-
- printlog "- Tools / Options / Table"
- ToolsOptions
- Call hToolsOptions("WRITER","TABLE")
- VerschubZeile = ZahlAusSpinnfield ( VerschiebenZeile.GetText )
- VerhaltenFix.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog "- Fixed: changes affect the adjacent area only"
- Call hNewDocument
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- Spalten.SetText "3"
- Zeilen.SetText "2"
- TabelleEinfuegenWriter.OK
-
- Spalte1 = SpaltenBreiteHolen
- Call wTypeKeys "<Right>"
- Spalte2 = SpaltenBreiteHolen
- Call wTypeKeys "<Right>"
- Spalte3 = SpaltenBreiteHolen
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Left>", 3
-
- Printlog "- with <Alt Left> downsize 1. Column from right side"
- Call wTypeKeys "<Mod2 Left>"
- Call SpaltenBreiteTesten ( Spalte1-VerschubZeile )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte2+VerschubZeile )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte3 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Left>", 3
- Printlog "- with <Alt Shift Right> no changes should be happen"
- Call wTypeKeys "<Mod2 Shift Left>"
- Call SpaltenBreiteTesten ( Spalte1-VerschubZeile )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte2+VerschubZeile )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte3 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Left>", 3
- Printlog "- with <Alt Right> re-establish initial state ///"
- Call wTypeKeys "<Mod2 Right>"
- Call SpaltenBreiteTesten ( Spalte1 )
- Call wTypeKeys "<Right>"
- SpaltenBreiteTesten ( Spalte2 )
- Call wTypeKeys "<Right>"
- SpaltenBreiteTesten ( Spalte3 )
- SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Printlog "- with <Alt Down> row will be upsized ///"
- Call wTypeKeys "<Mod2 Down>"
- Call ZeilenHoeheTesten ( 1.17 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- if iSprache <> 01 then
- Printlog "- with <Alt Up> row gets initial state"
- Call wTypeKeys "<Mod2 Up>"
- Call ZeilenHoeheTesten ( 0.7 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Printlog "- with <Alt Shift Up> row will be upsized"
- Call wTypeKeys "<Mod2 Shift Up>"
- Call ZeilenHoeheTesten ( 1.17 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Printlog "- with <Alt Shift Down> column gets initial state"
- Call wTypeKeys "<Mod2 Shift Down>"
- Call ZeilenHoeheTesten ( 0.7 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
- end if
- Call hCloseDocument
- Call hNewDocument
-
- printlog "- Fixed, proportional: Changes affect the entire table"
- ToolsOptions
- Call hToolsOptions("WRITER","TABLE"
- FixProportional.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- Spalten.SetText "3"
- Zeilen.SetText "2"
- TabelleEinfuegenWriter.OK
-
- Printlog "- with <Alt Left> downsize 1. column from right"
- Call wTypeKeys "<Mod2 Left>"
- Call SpaltenBreiteTesten ( Spalte1-VerschubZeile )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte2+VerschubZeile/2 )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte3+VerschubZeile/2 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Left>", 3
- Printlog "- with <Alt Shift Right> nothing should happen"
- Call wTypeKeys "<Mod2 Shift Left>"
- Call SpaltenBreiteTesten ( Spalte1-VerschubZeile )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte2+VerschubZeile/2 )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte3+VerschubZeile/2 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Left>", 3
- Printlog "- with <Alt Right> reach initial state"
- Call wTypeKeys "<Mod2 Right>"
- Call SpaltenBreiteTesten ( Spalte1 )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte2 )
- Call wTypeKeys "<Right>"
- Call SpaltenBreiteTesten ( Spalte3 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- if iSprache <> 01 then
- Printlog "- with <Alt Down> row will be upsized"
- Call wTypeKeys "<Mod2 Down>"
- Call ZeilenHoeheTesten ( 1.2 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Printlog "- with <Alt Up> column gets intitial state"
- Call wTypeKeys "<Mod2 Up>"
- Call ZeilenHoeheTesten ( 0.7 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Printlog "- with <Alt Shift Up> column will be upsized"
- Call wTypeKeys "<Mod2 Shift Up>"
- Call ZeilenHoeheTesten ( 1.2 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
-
- Printlog "- with <Alt Shift Down> column gets initial state"
- Call wTypeKeys "<Mod2 Shift Down>"
- Call ZeilenHoeheTesten ( 0.7 )
- Call SeitenAbstaendeTesten ( 0.00, 0.00 )
- end if
- Call wOptionsUndo "Tabelle"
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterTableEffects2
- Dim Spalte1 as Double
- Dim vSeparator as string
- Dim VerschubZeile as Double
-
- vSeparator = GetDecimalSeperator
-
- printlog "- Tools / Options / Table"
- printlog "- Effect options should work immediately"
-
- Call hNewDocument
-
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- Spalten.SetText "3"
- Zeilen.SetText "2"
- TabelleEinfuegenWriter.OK
-
- Spalte1 = SpaltenBreiteHolen
-
- ToolsOptions
- Call hToolsOptions("WRITER","TABLE")
- VerschubZeile = ZahlAusSpinnfield ( VerschiebenZeile.GetText )
- if NOT Variabel.IsChecked then
- Warnlog "Variable is not checked so test will be interrupted here"
- goto endsub
- else
- printlog "- change 'Behaviour of columns/rows to 'Fix'"
- VerhaltenFix.Check
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog "- resize cell with <Alt Left>"
- Call wTypeKeys "<Mod2 Left>"
- Call SpaltenBreiteTesten ( ( Spalte1-VerschubZeile ) )
-
- FormatTable
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
- if ZahlAusSpinnfield ( NachRechts.GetText ) <> "0" then
- Warnlog "Table size has been changed though 'Behaviour of rows/columns has been set to 'Fix'"
- end if
- TabTabelle.Cancel
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- Call wOptionsUndo "Tabelle"
-endcase
-
-'------------------------------------------------------------------------------
-
-testcase tToolsOptionsWriterDirectCursor2
- printlog "- Tools / Options / Direct Cursor / Left paragraph margin"
-
- Call hNewDocument
- ViewZoom
- Kontext "Massstab"
- Optimal.Check
- Massstab.OK
-
- Printlog "- set left paragraph margin"
- ToolsOptions
- Call hToolsOptions("WRITER","FORMATTINGAIDS")
- DirektCursor.Check
- LinkerAbsatzrand.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Printlog "- set cursor to the right"
- Kontext "DocumentWriter"
- DocumentWriter.MouseDoubleClick 80, 60
- DocumentWriter.Mousemove 20, 50
- DocumentWriter.TypeKeys "Right"
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if NOT Links.IsChecked then Warnlog "Cursor set to right but it isn't left aligned"
- TabAusrichtungAbsatz.Cancel
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Shift Home>"
- Sleep 1
- EditCopy
- if GetClipboardText = "" then Warnlog "Maybe tabs or spaces inserted"
-
- ViewZoom
- Kontext "Massstab"
- Vergroesserung100.Check
- Massstab.OK
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
- Call wOptionsUndo "Cursor"
-endcase
-
-'------------------------------------------------------------------------------
-
diff --git a/testautomation/writer/optional/includes/redlining/w_redlining1.inc b/testautomation/writer/optional/includes/redlining/w_redlining1.inc
deleted file mode 100644
index f84205c34021..000000000000
--- a/testautomation/writer/optional/includes/redlining/w_redlining1.inc
+++ /dev/null
@@ -1,1233 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the Redlinig function - 1
-'*
-'************************************************************************
-'*
-' #1 tRedlining_1 'Test Default settings
-' #1 tRedlining_2 'Inserted text : from Typing
-' #1 tRedlining_3 'Inserted text : from Clipboard
-' #1 tRedlining_4 'Inserted text : from another file
-' #1 tRedlining_5 'Inserted text : from Autotext
-' #1 tRedlining_6 'Deleteed text
-' #1 tRedlining_7 'sorted text
-' #1 tRedlining_8 'Searched and replaced text
-' #1 tRedlining_9 'text attributs
-' #1 tRedlining_10 'Inserted Section
-' #1 tRedlining_11 'Inserted Table
-' #1 tRedlining_12 'Inserted field (Date)
-' #1 tRedlining_13 'Inserted footnotes
-' #1 tRedlining_14 'Inserted headers
-' #1 tRedlining_15 'Inserted footers
-' #1 tRedlining_16 'moved paragraphs/chapters
-'*
-'\***********************************************************************
-
-testcase tRedlining_1
-
- Dim iInsertionAttr as Integer
- Dim iInsertionColor as Integer
- Dim iDeletionAttr as Integer
- Dim iDeletionColor as Integer
- Dim iChangedAttr as Integer
- Dim iChangedColor as Integer
- Dim iLineChangedMark as Integer
- Dim iLineChangedColor as Integer
-
- iInsertionAttr = 4 : iInsertionColor = 2
- iDeletionAttr = 4 : iDeletionColor = 2
- iChangedAttr = 2 : iChangedColor = 2
- iLineChangedMark = 2 : iLineChangedColor = 1
-
- Call hNewDocument
-
- PrintLog "- Test Default settings"
- '/// Test Default settings
-
- '/// The default setting for Redlining is Off
- Call wTypeKeys "Redlining test"
- Call wTypeKeys "<Backspace>",2
- Sleep 1
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "g te" then Warnlog "The default setting for Redlining is NO Off"
-
- '/// Tools / Options / Textdocument / Changes
- ToolsOptions
- Call hToolsOptions("WRITER","CHANGES")
-
- '/// Check default settings
-
- '/// 1) Insertion Attributes , Insertion color
- if EinfuegenAttribute.GetSelIndex <> iInsertionAttr then
- warnlog "The default settings for Insertion Attribute isn't correct, should be " + EinfuegenAttribute.GetItemText(iInsertionAttr) + " but get " +EinfuegenAttribute.GetItemText(EinfuegenAttribute.GetSelIndex)
- end if
- if EinfuegenFarbe.GetSelIndex <> iInsertionColor then
- warnlog "The default settings for Insertion color isn't correct, should be " + EinfuegenFarbe.GetItemText(iInsertionColor) + " but get " +EinfuegenFarbe.GetItemText(EinfuegenFarbe.GetSelIndex)
- end if
-
- '/// 2) Deletion Attribute , Deletion color
- if LoeschenAttribute.GetSelIndex <> iDeletionAttr then
- warnlog "The default settings for Deletion Attribute isn't correct, should be " + LoeschenAttribute.GetItemText(iDeletionAttr) + " but get " +LoeschenAttribute.GetItemText(LoeschenAttribute.GetSelIndex)
- end if
- if LoeschenFarbe.GetSelIndex <> iDeletionColor then
- warnlog "The default settings for Deletion color isn't correct, should be " + LoeschenFarbe.GetItemText(iDeletionColor) + " but get " +LoeschenFarbe.GetItemText(LoeschenFarbe.GetSelIndex)
- end if
-
- '/// 3) Changed Attribute , Changed color
- if AendernAttribute.GetSelIndex <> iChangedAttr then
- warnlog "The default settings for Changed Attribute isn't correct, should be " + AendernAttribute.GetItemText(iChangedAttr) + " but get " +AendernAttribute.GetItemText(AendernAttribute.GetSelIndex)
- end if
- if AendernFarbe.GetSelIndex <> iChangedColor then
- warnlog "The default settings for Changed color isn't correct, should be " + AendernFarbe.GetItemText(iChangedColor) + " but get " +AendernFarbe.GetItemText(AendernFarbe.GetSelIndex)
- end if
-
- '/// 4) Lines changed Mark , Lines changed color
- if ZeilenMarkierung.GetSelIndex <> iLineChangedMark then
- warnlog "The default settings for Lines Changed Mark isn't correct, should be " + ZeilenMarkierung.GetItemText(iLineChangedMark) + " but get " +ZeilenMarkierung.GetItemText(ZeilenMarkierung.GetSelIndex)
- end if
- if ZeilenFarbe.GetSelIndex <> iLineChangedColor then
- warnlog "The default settings for Lines Changed color isn't correct, should be " + ZeilenFarbe.GetItemText(iLineChangedColor) + " but get " +ZeilenFarbe.GetItemText(ZeilenFarbe.GetSelIndex)
- end if
-
- '/// Close the tools/option dialogue
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tRedlining_2
-
- '/// Test Inserted text : from Typing
- printlog "Inserted text : from Typing"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert any sentence into document
- Call wTypeKeys "Redlining test => OK_1<Return>"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert some new sentence
- Call wTypeKeys "Redlining test => OK_2<Return>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the changes have been accepted
- Call wTypeKeys "<Up>", 2
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- Sleep 1
- if GetClipboardText <> "2" then Warnlog "The 2nd line is incorrect!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase tRedlining_3
-
- '/// Test Inserted text : from Clipboard
- printlog "Inserted text : from Clipboard"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert any sentence into document , and copy it to clipboard
- Call wTypeKeys "Redlining test => OK_2<Return>"
- EditSelectAll
- EditCopy
- Sleep 1
-
- '/// Insert a new sentence into document
- Call wTypeKeys "Redlining test => OK_1<Return>"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// copy the clipboard into the document
- EditPaste
- Sleep 1
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the changes have been accepted
- Call wTypeKeys "<Up>", 2
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- Sleep 1
- if GetClipboardText <> "2" then Warnlog "The 2nd Line is incorrect!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_4
-
- '/// Test Inserted text : from another file
- printlog "Inserted text : from another file"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert a sentence into document
- Call wTypeKeys "Redlining test => OK_1<Return>"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// insert a file - Insert/File
- InsertFileWriter
- Kontext "OeffnenDlg"
- Dateiname.Settext Convertpath (gTesttoolpath + "writer\optional\input\redlining\tRedlining_4.sxw")
- Oeffnen.Click
- Sleep 2
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the changes have been accepted
- Call wTypeKeys "<Up>", 2
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- Sleep 1
- if GetClipboardText <> "2" then Warnlog "i35222 - The 2nd Line is incorrect!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_5
-
- Dim j as Integer
- Dim iAll as Integer
-
- '/// Test Inserted text : from Autotext
- printlog "Inserted text : from Autotext"
-
- '/// New document
- Call hNewDocument
-
- 'insert a category
- Call wCreateAutotextCategory("1-MyTest")
-
- Kontext "Autotext"
- Autotext.Close
-
- 'insert a autotext
- '-----------------------------------------------------
- Call wTypeKeys "Redlining test => OK_2<Return>"
- Sleep 1
- EditSelectAll
- Sleep 1
-
- EditAutotext
- Sleep 2
- Kontext "Autotext"
- Sleep 1
- Liste.Select 1 '1-MyTest'
- Sleep 1
-
- 'Insert a name for the Autotext and a Shortcut
- NameText.Settext "AutotextForRedlininggTest"
- Sleep 1
- Kuerzel.Settext "AFT"
-
- 'Select 'New' in Menubutton 'Autotext'
- Sleep 2
- Menue.Click
- Sleep 2
- Call hMenuSelectNr ( 1 )
- Sleep 2
-
- Autotext.Close
- '-----------------------------------------------------
-
- '/// Insert a sentence into document
- Kontext "DocumentWriter"
- EditSelectAll
- Call wTypeKeys "Redlining test => OK_1<Return>"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert autotext
- Call wTypeKeys "AFT"
- Call wTypeKeys "<F3>"
- Sleep 1
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// Close Redlining dialog
- Redlining.Close
-
- '/// Check if the changes have been accepted
- Call wTypeKeys "<Up>", 2
- Call wTypeKeys "<Down>"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- Sleep 1
- if GetClipboardText <> "2" then Warnlog "The 2nd Line is incorrect!"
-
- ' Delete the new category
- ' ------------------------------------------------
- EditAutotext
- Sleep 2
- Kontext "Autotext"
- Sleep 1
- Bereiche.Click
- Sleep 5
- Kontext "BereicheBearbeitenAutoText"
- Liste.Select 1
- Sleep 2
- Loeschen.Click
- Sleep 5
- BereicheBearbeitenAutoText.OK
- Sleep 2
- Kontext "Active"
- if Active.Exists then Active.Yes
- Kontext "Autotext"
- Autotext.Close
- '-------------------------------------------------
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_6
-
- '/// Test Deleted text
- printlog "Deleted text"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert a sentence into document
- Call wTypeKeys "Redlining test => OK_1"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Delete the last 2 characters
- Call wTypeKeys "<Backspace>",2
- Sleep 1
-
- '/// Check if the changes is OK => The characters are deleted ,
- '/// + but their location exists
- Call wTypeKeys "<End>"
- Sleep 1
- Call wTypeKeys "<Shift Left>" , 2
- Sleep 1
-
- Editcopy
- if Len(GetClipboardText)>0 then Warnlog "Something is wrong in deleting text before accepting the changes!"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Sleep 2
- Kontext "Redlining"
- Sleep 1
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 2
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the changes have been accepted => The
- '/// + characters are deleted , and their location doesn't exist
- Call wTypeKeys "<End>"
- Sleep 1
- Call wTypeKeys "<Shift Left>" , 2
- Sleep 1
-
- EditCopy
- Sleep 1
- if GetClipboardText <> "OK" then Warnlog "Something is wrong in deleting text after accepting the changes! Getting " + GetClipboardText
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_7
-
- '/// Test sorted text
- printlog "sorted text"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test text
- Call wTypeKeys "XYZ<Return>"
- Call wTypeKeys "ABC"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Select Tools / Sort , Language (English USA) , Alphanumeric
- EditSelectAll
- ToolsSort
- Kontext "Sortieren"
- Schluesseltyp1.Select 1
- Aufsteigend1.Check
- Sortieren.OK
-
- '/// Check if the changes is OK => The characters are changed ,
- '/// + but their location exists
- Call wTypeKeys "<Down>" , 4
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if Len(GetClipboardText)>0 then Warnlog "Something is wrong in sorting text before accepting the changes!"
-
- Call wTypeKeys "<Up>" , 4
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> "ABC" then Warnlog "Should get ABC in the first line, but get " +GetClipboardText + " before accepting the changes!"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Sleep 2
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 2
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the changes have been accepted => The characters
- '/// + are changed , and their location doesn't exist
- Call wTypeKeys "<Down>" , 4
- Call wTypeKeys "<End><Backspace>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if Len(GetClipboardText) <> 3 then Warnlog "Something is wrong in sorting text after accepting the changes!"
-
- Call wTypeKeys "<Up>" , 4
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> "ABC" then Warnlog "Should get ABC in the first line, but get " +GetClipboardText + " after accepting the changes!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_8
-
- '/// Test searched and replaced text
- printlog "searched and replaced text"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert a sentence into document
- Call wTypeKeys "Redlining test => OK_1"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Select Edit / Find & Replace
- EditSearchAndReplace
- Kontext "FindAndReplace"
-
- '/// + Set OK_1 in search for editbox
- SearchFor.SetText "OK_1"
- Sleep 2
-
- '/// + set OK_2 in replace with editbox
- ReplaceWith.SetText "OK_2"
- Sleep 2
-
- '/// + Replace all and close the dialogue
- ReplaceAll.Click
- sleep 2
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK
- Sleep 1
- else
- Warnlog "Messagebox, how often replaced, not up !"
- end if
- end if
-
- Kontext "FindAndReplace"
- FindAndReplace.close
-
- '/// Check if the changes is OK => The characters are changed ,
- '/// + but their location exists
- Call wTypeKeys "<End>"
- wait 500
- Call wTypeKeys "<Shift Left>"
- wait 500
- Editcopy
- wait 500
- if GetClipboardText <> "2" then Warnlog "Something is wrong in changing text before accepting the changes!"
-
- Call wTypeKeys "<Left>" , 3
- Sleep 1
- Call wTypeKeys "<Shift Left>" , 4
- Sleep 1
- Editcopy
- wait 500
- if Len(GetClipboardText) > 0 then Warnlog "Something is wrong in changing text before accepting the changes!"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Sleep 2
- Kontext "Redlining"
- Sleep 2
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 2
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the changes have been accepted => The characters
- '/// + are changed , and their location doesn't exist
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>"
-
- EditCopy
- Sleep 1
- if GetClipboardText <> "2" then Warnlog "Something is wrong in changing text after accepting the changes!"
-
- Call wTypeKeys "<Left>" , 3
- Sleep 1
- Call wTypeKeys "<Shift Left>" , 4
- Sleep 1
- Editcopy
- if Len(GetClipboardText) <> 4 then Warnlog "Something is wrong in changing text after accepting the changes!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_9
-
- Dim iComparison1$,iComparison2$,iComparison3$,iComparison4$
-
- '/// Test text attributs
- printlog "Test text attributs"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert a sentence into document
- Call wTypeKeys "Redlining test => OK_1<Home>"
- Call wTypeKeys "<Shift Right>" , 9
- Sleep 1
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Select Format / Character , changes some font Attributes
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- kontext "TabFont"
-
- if gAsianSup = True then
- FontWest.Select 5
- iComparison1$ = FontWest.GetSelText
- try
- StyleWest.Select 3
- catch
- StyleWest.Select StyleWest.GetItemCount
- endcatch
- iComparison2$ = StyleWest.GetSelText
- SizeWest.Select 5
- iComparison3$ = SizeWest.GetSelText
- else
- Font.Select 5
- iComparison1$ = Font.GetSelText
- try
- Style.Select 3
- catch
- Style.Select Style.GetItemCount
- endcatch
- iComparison2$ = Style.GetSelText
- Size.Select 5
- iComparison3$ = Size.GetSelText
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- UrlName.Settext "http://www.sun.com/"
- Sleep 1
- TargetFrame.Select 2
- Sleep 1
- iComparison4$ = TargetFrame.GetSelText
- wait 500
- TabHyperlinkZeichen.Ok
-
- Sleep 1
- Call wTypeKeys "<Left>" , 2
- Sleep 1
-
- '/// Check if the Attribute changes id OK before accepting the changes
- printlog "Check if the Attribute changes id OK before accepting the changes"
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- Kontext "TabFont"
- if gAsianSup = True then
- if iComparison1$ <> FontWest.GetSelText then Warnlog "Wrong Font in Autotext!"
- if iComparison2$ <> StyleWest.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if iComparison3$ <> SizeWest.GetSelText then QAErrorlog "#108881#Wrong Fontsize in Autotext!"
- else
- if iComparison1$ <> Font.GetSelText then Warnlog "Wrong Font in Autotext!"
- if iComparison2$ <> Style.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if iComparison3$ <> Size.GetSelText then Warnlog "Wrong Fontsize in Autotext!"
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if UrlName.Gettext <> "http://www.sun.com/" then Warnlog "Wrong hyperlink has been added to text!"
- if iComparison4$ <> TargetFrame.GetSelText then Warnlog "Wrong targetFrame has been added to text!"
- TabHyperlinkZeichen.Cancel
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the Attribute changes id OK after accepting the changes
- printlog "Check if the Attribute changes id OK after accepting the changes"
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- Kontext "TabFont"
- if gAsianSup = True then
- if iComparison1$ <> FontWest.GetSelText then Warnlog "Wrong Font in Autotext!"
- if iComparison2$ <> StyleWest.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if iComparison3$ <> SizeWest.GetSelText then QAErrorlog "#108881#Wrong Fontsize in Autotext!"
- else
- if iComparison1$ <> Font.GetSelText then Warnlog "Wrong Font in Autotext!"
- if iComparison2$ <> Style.GetSelText then Warnlog "Wrong Fontstyle in Autotext!"
- if iComparison3$ <> Size.GetSelText then Warnlog "Wrong Fontsize in Autotext!"
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if UrlName.Gettext <> "http://www.sun.com/" then Warnlog "Wrong hyperlink has been added to text!"
- if iComparison4$ <> TargetFrame.GetSelText then Warnlog "Wrong targetFrame has been added to text!"
- TabHyperlinkZeichen.Cancel
-
- '/// Close the document
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_10
-
- Dim sSectionName as String
-
- sSectionName = "testForRedlining"
-
- '/// Test inserted sections
- printlog "inserted sections"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert a sentence into document
- Call wTypeKeys "Redlining test => OK_1<Shift Home>"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert a section in the testing sentence , insert / section
- InsertSection
- wait 500
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sSectionName
- TabBereiche.OK
- wait 500
-
- '/// Check if the section is inserted correctly before accepting the changes , format / sections
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sSectionName then warnlog "the section is NOt inserted correctly before accepting the changes "
- BereicheBearbeiten.Cancel
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the section is inserted correctly after accepting the changes , format / sections
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sSectionName then warnlog "the section is NOt inserted correctly after accepting the changes "
- BereicheBearbeiten.Cancel
-
- '/// Close the document
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_11
-
- '/// Test inserted tables
- printlog "inserted tables"
-
- '/// New document
- Call hNewDocument
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert a table
- Call hTabelleEinfuegen
-
- '/// Check if the table is inserted correctly before accepting the changes
- Call wOpenContextMenu
- hMenuSelectNr(10)
-
- try
- Kontext
- Active.Setpage TabTabelle
- Kontext "TabTabelle"
- if Right(TabellenName.GetText , 1) <> "1" then warnlog "the table is NOt inserted correctly before accepting the changes "
- TabTabelle.Cancel
- catch
- Warnlog "Something wrong in inserting table before accepting the changes!"
- endcatch
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the table is inserted correctly after accepting the changes
- Call wOpenContextMenu
- hMenuSelectNr(10)
-
- try
- Kontext
- Active.Setpage TabTabelle
- Kontext "TabTabelle"
- if Right(TabellenName.GetText , 1) <> "1" then warnlog "the table is NOt inserted correctly after accepting the changes "
- TabTabelle.Cancel
- catch
- Warnlog "Something wrong in inserting table after accepting the changes!"
- endcatch
-
- '/// Close the document
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_12
-
- '/// Test inserted field (date)
- printlog "inserted field (date)"
-
- '/// New document
- Call hNewDocument
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert a date , insert / field / date
- InsertFieldsDate
-
- Call wTypeKeys "<Home>"
- Sleep 1
-
- '/// Check if the date is inserted correctly before accepting the changes
- try
- EditFields
- Kontext "FeldbefehlBearbeitenDokument"
- FeldbefehlBearbeitenDokument.Cancel
- catch
- Warnlog "Something wrong in inserting date before accepting the changes!"
- endcatch
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
- Sleep 1
-
- Call wTypeKeys "<Home>"
-
- '/// Check if the date is inserted correctly after accepting the changes
- try
- EditFields
- Kontext "FeldbefehlBearbeitenDokument"
- FeldbefehlBearbeitenDokument.Cancel
- catch
- Warnlog "Something wrong in inserting date after accepting the changes!"
- endcatch
-
- '/// Close the document
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_13
-
- '/// Test inserted footnotes
- printlog "inserted footnotes"
-
- '/// New document
- Call hNewDocument
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert a footnote , insert / footnotes
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- Sleep 1
- FussnoteEinfuegen.OK
-
- Call wTypeKeys "<PageUp><Home>"
-
- '/// Check if the footnote is inserted correctly before
- '/// + accepting the changes
- try
- EditFootnote
- Kontext "FussnoteBearbeiten"
- FussnoteBearbeiten.Cancel
- catch
- Warnlog "Something wrong in inserting footnote before accepting the changes!"
- endcatch
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- Call wTypeKeys "<Home>"
-
- '/// Check if the footnote is inserted correctly after accepting the changes
- try
- EditFootnote
- Kontext "FussnoteBearbeiten"
- FussnoteBearbeiten.Cancel
- catch
- Warnlog "Something wrong in inserting footnote after accepting the changes!"
- endcatch
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_14
-
- '/// Test inserted header
- printlog "inserted header"
-
- '/// New document
- Call hNewDocument
-
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert a header , insert / header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- '/// input some test words in the header
- Call wTypeKeys "Header Test"
-
- '/// Check if the header is inserted correctly before
- '/// + accepting the changes
- FormatPageWriter
- Kontext
- Active.SetPage TabKopfzeile
- Kontext "TabKopfzeile"
- if Not KopfzeileMitAbstand.IsChecked then Warnlog "The header is NOT inserted correctly before accepting the changes!"
- TabKopfzeile.Cancel
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the header is inserted correctly after accepting the changes
- FormatPageWriter
- Kontext
- Active.SetPage TabKopfzeile
- Kontext "TabKopfzeile"
- if Not KopfzeileMitAbstand.IsChecked then Warnlog "The header is NOT inserted correctly after accepting the changes!"
- TabKopfzeile.Cancel
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_15
-
- '/// Test inserted footer
- printlog "inserted footer"
-
- '/// New document
- Call hNewDocument
-
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert a footer , insert / footer
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- Call wTypeKeys "Footer Test"
-
- '/// Check if the footer is inserted correctly before
- '/// + accepting the changes
- FormatPageWriter
- Kontext
- Active.SetPage TabFusszeile
- Kontext "TabFusszeile"
- if Not FusszeileMitAbstand.IsChecked then Warnlog "The footer is NOT inserted correctly before accepting the changes!"
- TabFusszeile.Cancel
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the footer is inserted correctly after accepting the changes
- FormatPageWriter
- Kontext
- Active.SetPage TabFusszeile
- Kontext "TabFusszeile"
- if Not FusszeileMitAbstand.IsChecked then Warnlog "The footer is NOT inserted correctly after accepting the changes!"
- TabFusszeile.Cancel
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tRedlining_16
-
- Dim iComparison1$ , iComparison2$
-
- '/// Test moved paragraphs/chapters
- printlog "moved paragraphs/chapters"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert a paragraph ( Open the test file )
- '/// + There are 3 lines
- '/// + Redlining test => OK_1 <-- No numbering
- '/// + Redlining test => OK_2 <-- Numbering style : list 2
- '/// + Redlining test => OK_3 <-- Numbering style : list 3
-
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\redlining\tRedlining_15.sxw" )
-
-
- Call wTypeKeys "<Up>" , 3
-
- Call wTypeKeys "<Down>"
- FormatParagraph
- Kontext
- Active.SetPage TabNumerierungAbsatz
- Kontext "TabNumerierungAbsatz"
- iComparison1$ = Vorlage.GetSelText
- TabNumerierungAbsatz.Cancel
-
- Call wTypeKeys "<Down>"
- FormatParagraph
- Kontext
- Active.SetPage TabNumerierungAbsatz
- Kontext "TabNumerierungAbsatz"
- iComparison2$ = Vorlage.GetSelText
- TabNumerierungAbsatz.Cancel
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Down Right>"
- '/// Cut the selection
- EditCut
-
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<End><Return>"
- '/// paste under the first line
- EditPaste
-
- Call wTypeKeys "<Up><Up><End><Delete>"
-
- '/// Check if the paragraph is moved correctly before
- '/// + accepting the changes
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>"
- try
- EditCopy
- catch
- Warnlog "Bullets cannot be removed by Del key"
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- endcatch
-
- if GetClipboardText <> "3" then Warnlog "A.The paragraph is moved incorrect before accepting the changes - 2nd line"
-
- FormatParagraph
- Kontext
- Active.SetPage TabNumerierungAbsatz
- Kontext "TabNumerierungAbsatz"
- if iComparison2$ <> Vorlage.GetSelText then Warnlog "B.The paragraph is moved incorrect before accepting the changes - 2nd line"
- TabNumerierungAbsatz.Cancel
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboardText <> "2" then Warnlog "A. The paragraph is moved incorrect before accepting the changes - 3rd line"
-
- FormatParagraph
- Kontext
- Active.SetPage TabNumerierungAbsatz
- Kontext "TabNumerierungAbsatz"
- if iComparison1$ <> Vorlage.GetSelText then Warnlog "B . The paragraph is moved incorrect before accepting the changes - 3rd line"
- TabNumerierungAbsatz.Cancel
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Sleep 2
- Kontext "Redlining"
- Sleep 2
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 2
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
- Sleep 2
-
- '/// Check if the footnote is inserted correctly after
- '/// + accepting the changes
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>"
- try
- EditCopy
- catch
- Warnlog "Bullets cannot be removed by Del key"
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- endcatch
- if GetClipboardText <> "3" then Warnlog "A.The paragraph is moved incorrect after accepting the changes - 2nd line"
-
- FormatParagraph
- Kontext
- Active.SetPage TabNumerierungAbsatz
- Kontext "TabNumerierungAbsatz"
- if iComparison2$ <> Vorlage.GetSelText then Warnlog "B.The paragraph is moved incorrect after accepting the changes - 2nd line"
- TabNumerierungAbsatz.Cancel
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboardText <> "2" then Warnlog "A. The paragraph is moved incorrect after accepting the changes - 3rd line"
-
- FormatParagraph
- Kontext
- Active.SetPage TabNumerierungAbsatz
- Kontext "TabNumerierungAbsatz"
- if iComparison1$ <> Vorlage.GetSelText then Warnlog "The paragraph is moved incorrect after accepting the changes - 3rd line"
- TabNumerierungAbsatz.Cancel
-
- PrintLog "Close active documents"
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-endcase
-
diff --git a/testautomation/writer/optional/includes/redlining/w_redlining2.inc b/testautomation/writer/optional/includes/redlining/w_redlining2.inc
deleted file mode 100644
index f3930b8db721..000000000000
--- a/testautomation/writer/optional/includes/redlining/w_redlining2.inc
+++ /dev/null
@@ -1,1267 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of the Redlinig function - 2
-'*
-'************************************************************************
-'*
-' #1 tAcceptReject_1 'Test Default settings
-' #1 tAcceptReject_2 'Test Accept in Edit / Changes / Accept or Reject
-' #1 tAcceptReject_3 'Test Reject in Edit / Changes / Accept or Reject
-' #1 tAcceptReject_4 'Test Accept All in Edit / Changes / Accept or Reject
-' #1 tAcceptReject_5 'Test Reject All in Edit / Changes / Accept or Reject
-' #1 tAcceptReject_6 'Test filter changes by author
-' #1 tAcceptReject_7 'Test filter changes by time
-' #1 tAcceptReject_8 'Test filter changes by action
-' #1 tAcceptReject_9 'Test filter changes by comment
-' #1 tAcceptReject_10 'Adding a comment to a change over the context menu
-' #1 tAcceptReject_11 'Sort the list of changes over context menu -- action
-' #1 tAcceptReject_12 'Sort the list of changes over context menu -- author
-' #1 tAcceptReject_13 'Sort the list of changes over context menu -- date
-' #1 tAcceptReject_14 'Sort the list of changes over context menu -- comment
-' #1 tAcceptReject_15 'Sort the list of changes over context menu -- document position
-'*
-'\***********************************************************************
-
-testcase tAcceptReject_1
-
- '/// Test focus -- the focus must be set in the document on the change pointed in the dialog.
- printlog "Test focus -- the focus must be set in the document on the change pointed in the dialog"
-
- '/// New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return><Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Multi operations : Insert a new sentence , and delete some test text
- Call wTypeKeys "<Up>"
- Call wTypeKeys "Focus Test"
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>" , 3
-
- '/// Set the focus to the Start
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Sleep 2
- Kontext "Redlining"
- Sleep 2
-
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 2
-
- '/// Select the 1st -- insertion
- ListItem.TypeKeys "<Up>"
- Sleep 2
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- Sleep 1
- if GetClipboardText <> "Focus Test" then Warnlog "The inserted focus location is incorrect! Getting " +GetClipboardText
-
- Kontext "Redlining"
- '/// Select the 2nd -- deletion
- ListItem.TypeKeys "<Down>"
- Sleep 2
-
- Kontext "DocumentWriter"
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 4
- Sleep 1
- EditCopy
- Sleep 1
- if GetClipboardText <> "O" then Warnlog "The deleted focus location is incorrect! Getting " +GetClipboardText
-
- '/// Close Redlining dialog
- Kontext "Redlining"
- Redlining.Close
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_2
-
- '/// Test Accept in Edit / Changes / Accept or Reject
- printlog "Test Accept in Edit / Changes / Accept or Reject "
-
- '/// New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return><Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Multi operations : Insert a new sentence , and
- '/// + delete some test text
- Call wTypeKeys "<Up>"
- Call wTypeKeys "Focus Test"
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>" , 1
- Call wTypeKeys "<Up>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Sleep 2
- Kontext "Redlining"
- Sleep 2
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 2
- '/// + Select 'Accept'
- Akzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
- Sleep 2
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up>" , 3
- Sleep 1
- Call wTypeKeys "<Down><Home><Shift End>"
- Sleep 1
- EditCopy
- Sleep 1
- if GetClipboardText <> "Focus Test" then Warnlog "The inserted text is incorrect! Getting" + GetClipboardText
-
- Call wTypeKeys "<Down><End>"
- Sleep 1
- Call wTypeKeys "<Shift Left>" , 4
- Sleep 1
- EditCopy
- Sleep 1
- if GetClipboardText <> " OK_" then Warnlog "The deleted text is incorrect! Getting" + GetClipboardText
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_3
-
- '/// Test Reject in Edit / Changes / Accept or Reject
- printlog "Test Reject in Edit / Changes / Accept or Reject "
-
- '/// New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return><Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Multi operations : Insert a new sentence , and delete some test text
- Call wTypeKeys "<Up>"
- Call wTypeKeys "Focus Test"
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>" , 3
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Home>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
-
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 1
-
- ListItem.TypeKeys "<Up>"
- Sleep 2
-
- '/// + Select 'Reject'
- Ablehnen.Click
- Sleep 2
-
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up>" , 3
- Call wTypeKeys "<Down><Home><Shift End>"
-
- try
- EditCopy
- Warnlog "The inserted text should be rejected , so EditCopy shouldn't be actived!"
- catch
- endcatch
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "O" then Warnlog "The deleted text should be deleted and their location should be still reserved! Getting " + GetClipboardText
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_4
-
- '/// Test Accept All in Edit / Changes / Accept or Reject
- printlog "Test Accept All in Edit / Changes / Accept or Reject "
-
- '/// + New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return><Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Multi operations : Insert a new sentence , and delete some test text
- Call wTypeKeys "<Up>"
- Sleep 1
- Call wTypeKeys "Focus Test"
- Sleep 1
- Call wTypeKeys "<Down><End>"
- Sleep 1
- Call wTypeKeys "<Backspace>" , 3
- Sleep 2
- Call wTypeKeys "<Up>" , 3
- Sleep 2
- Call wTypeKeys "<Home>"
- Sleep 1
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- Sleep 1
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 1
- '/// + Select 'Accept All'
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
- Sleep 1
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up>" , 3
- Sleep 1
- Call wTypeKeys "<Down><Home><Shift End>"
- Sleep 1
- EditCopy
- Sleep 1
- if GetClipboardText <> "Focus Test" then Warnlog "The inserted text is incorrect! Getting " + GetClipboardText
-
- Call wTypeKeys "<Down><End>"
- Sleep 2
- Call wTypeKeys "<Shift Left>" , 4
- Sleep 2
- EditCopy
- if GetClipboardText <> "=> O" then Warnlog "The deleted text is incorrect! Getting " + GetClipboardText
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_5
-
- '/// Test Reject all in Edit / Changes / Accept or Reject
- printlog "Test Reject all in Edit / Changes / Accept or Reject "
-
- '/// New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return><Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Multi operations : Insert a new sentence , and delete some test text
- Call wTypeKeys "<Up>"
- Call wTypeKeys "Focus Test"
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>" , 3
- wait 500
- Call wTypeKeys "<Up>" , 3
- wait 500
- Call wTypeKeys "<Home>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 1
- '/// + Select 'Reject All'
- AlleAblehnen.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up>" , 3
- wait 500
- Call wTypeKeys "<Down><Home><Shift End>"
- wait 500
- try
- EditCopy
- Warnlog "The inserted text should be rejected , so EditCopy shouldn't be actived!"
- catch
- endcatch
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "OK_2" then Warnlog "The deleted text should not be deleted! Getting " + GetClipboardText
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_6
-
- Dim sFirstName , sLastName as String
- Dim sFirstName1 , sLastName1 as String
- Dim sFirstName2 , sLastName2 as String
-
- sFirstName1 = "Test1" : sLastName1 = "Test1"
- sFirstName2 = "Test2" : sLastName2 = "Test2"
-
- '/// Test filter changes by author
- printlog "Test filter changes by author"
-
- '/// New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- '/// Change author to author1 :Test1 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// author1 : delete some text
- Call wTypeKeys "<Up><End>"
- Sleep 1
- Call wTypeKeys "<Backspace>" , 3
- Sleep 1
-
- '/// Change author to author2 :Test2 Test2
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName2
- ZuName.SetText sLastName2
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// author2 : delete some other text
- Call wTypeKeys "<Down><End>"
- Sleep 1
- Call wTypeKeys "<Backspace>" , 4
- Sleep 1
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'Filter' ///
- TabControl.SetPage TabFilter
- Sleep 1
- '/// + Check 'Author'
- Autor.Check
- Sleep 2
- '/// + Select Author2
- try
- AutoListe.Select 2
- catch
- Warnlog "Change of author (User name) disregarded when changed during Office session"
- Redlining.Close
- Call hCloseDocument
- goto endsub
- endcatch
- Sleep 2
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 2
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
-
- '/// + Close Redlining dialog
- Redlining.Close
- Sleep 1
-
- '/// + Check if Filter works well
- Call wTypeKeys "<Up>" , 2
- Sleep 1
- Call wTypeKeys "<End>"
- Sleep 1
- Call wTypeKeys "<Shift Left>" , 6
- Sleep 1
- EditCopy
- Sleep 1
- if GetClipboardText <> "> O" then Warnlog "The deleted text by author1 is incorrect! Getting " + GetClipboardText
-
- Call wTypeKeys "<Down><End>"
- Sleep 1
- Call wTypeKeys "<Shift Left>" , 6
- Sleep 1
- EditCopy
- Sleep 1
- if GetClipboardText <> "st => " then Warnlog "The deleted text by author2 is incorrect! Getting " + GetClipboardText
-
- 'Change author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// + Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_7
-
- Dim sTime as String
-
- '/// Test filter changes by date
- printlog "Test filter changes by date"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// delete some text in first line
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>" , 3
-
- sTime = Str ( Format( Now ) )
- sTime = Mid ( sTime , 12 , 5 )
-
- '/// wait 70 seconds
- Sleep 70
-
- '/// delete some text in second line
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>" , 2
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'Filter' ///
- TabControl.SetPage TabFilter
- Sleep 1
- '/// + Check 'Date'
- Datum.Check
- Sleep 1
- '/// + Select earlier than
- DatumListe.Select 1
- Sleep 1
- '/// + insert time
- Zeit1.SetText sTime
- Sleep 1
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 1
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// + Check if Filter works well
- Call wTypeKeys "<Up>" , 2
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "=> O" then Warnlog "The deleted text in first line is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "OK" then Warnlog "The deleted text in second line is incorrect!"
-
- '/// + Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_8
-
- Dim iComparison1$,iComparison2$,iComparison3$,iComparison4$
-
- '/// Test filter changes by action
- printlog "Test filter changes by action"
-
- '/// New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Change the first line's attribute .
- Call wTypeKeys "<Up><Home><Shift End>"
-
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- kontext "TabFont"
-
- if gAsianSup = True then
- FontWest.Select 5
- iComparison1$ = FontWest.GetSelText
- try
- StyleWest.Select 3
- catch
- StyleWest.Select StyleWest.GetItemCount
- endcatch
- iComparison2$ = StyleWest.GetSelText
- SizeWest.Select 5
- iComparison3$ = SizeWest.GetSelText
- else
- Font.Select 5
- iComparison1$ = Font.GetSelText
- try
- Style.Select 3
- catch
- Style.Select Style.GetItemCount
- endcatch
- iComparison2$ = Style.GetSelText
- Size.Select 5
- iComparison3$ = Size.GetSelText
- end if
-
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- UrlName.Settext "http://www.sun.com/"
- Sleep 1
- TargetFrame.Select 2
- Sleep 1
- iComparison4$ = TargetFrame.GetSelText
- Sleep 1
- TabHyperlinkZeichen.Ok
-
- '/// Delete some text in second line
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>" , 3
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'Filter' ///
- TabControl.SetPage TabFilter
- Sleep 1
- '/// + Check 'Action' , select format
- Aktion.Check
- Sleep 1
- Aktionsliste.Select 3
- Sleep 1
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 1
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if Filter works well
- Call wTypeKeys "<Up><Home><Right>"
- FormatCharacter
- Kontext
- Active.SetPage TabFont
- Kontext "TabFont"
- if gAsianSup = True then
- if iComparison1$ <> FontWest.GetSelText then Warnlog "Wrong Font in first line!"
- if iComparison2$ <> StyleWest.GetSelText then Warnlog "Wrong Fontstyle in first line!"
- if iComparison3$ <> SizeWest.GetSelText then QAErrorlog "#108881#Wrong Fontsize in first line!"
- else
- if iComparison1$ <> Font.GetSelText then Warnlog "Wrong Font in first line!"
- if iComparison2$ <> Style.GetSelText then Warnlog "Wrong Fontstyle in first line!"
- if iComparison3$ <> Size.GetSelText then Warnlog "Wrong Fontsize in first line!"
- end if
- wait 100
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if UrlName.Gettext <> "http://www.sun.com/" then Warnlog "Wrong hyperlink has been added to text!"
- if iComparison4$ <> TargetFrame.GetSelText then Warnlog "Wrong targetFrame has been added to text!"
- TabHyperlinkZeichen.Cancel
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "O" then Warnlog "The deleted text is incorrect!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_9
-
- '/// Test filter changes by comments
- printlog "Test filter changes by comments"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test sentences
- Call wTypeKeys "Redlining test => OK_1<Return>"
- Call wTypeKeys "Redlining test => OK_2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// delete some text in first line .
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>" , 3
-
- '/// insert comment1: Edit / Changes / Comment
- EditChangesComment
- Kontext "Kommentar"
- KommentarText.SetText "Comment1"
- Kommentar.OK
-
- '/// delete some text in second line .
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>" , 2
-
- '/// insert comment2: Edit / Changes / Comment
- EditChangesComment
- Kontext "Kommentar"
- KommentarText.SetText "Comment2"
- Kommentar.OK
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
- '/// + Select tabpage 'Filter' ///
- TabControl.SetPage TabFilter
- Sleep 1
- '/// + Check 'comment' , and input comment1 in the relevant editbox
- Comment.Check
- CommentText.SetText "Comment1"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 1
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 1
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "=> O" then Warnlog "The deleted text in first line is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 4
- EditCopy
- if GetClipboardText <> "OK" then Warnlog "The deleted text in second line is incorrect!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_10
-
- '/// Adding a comment to a change over the context menu.
- printlog "Adding a comment to a change over the context menu."
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test sentences
- Call wTypeKeys "Redlining test => O1<Return>"
- Call wTypeKeys "Redlining test => K2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// delete some text in first line .
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>"
-
- '/// delete some text in second line .
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Backspace>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
-
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- Sleep 1
-
- '/// + insert comment with context menu
- '/// + insert comment for first line
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(1)
- Sleep 1
-
- Kontext "NotizBearbeiten"
- Texteingabe.SetText "Comment1"
- NotizBearbeiten.OK
-
- '/// + insert comment for second line
- Kontext "Redlining"
- ListItem.TypeKeys "<Down>"
- ListItem.OpenContextMenu
- hMenuSelectNr(1)
-
- Kontext "NotizBearbeiten"
- Texteingabe.SetText "Comment2"
- NotizBearbeiten.OK
-
- Kontext "Redlining"
-
- '/// + Select tabpage 'Filter' ///
- TabControl.SetPage TabFilter
- Sleep 1
- '/// + Check 'comment' , and input comment1 in the relevant editbox
- Comment.Check
- CommentText.SetText "Comment1"
- '/// + Select tabpage 'List' ///
- TabControl.SetPage TabListe
- Sleep 1
- '/// + Select 'Accept All'///
- AlleAkzeptieren.Click
- Sleep 1
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> " O" then Warnlog "The deleted text in first line is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> "K" then Warnlog "The deleted text in second line is incorrect!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_11
-
- '/// Sort the list of changes over context menu -- action.
- '/// Action sort depends on not only StarOffice/StarSuite , but also system language.
- printlog "Sort the list of changes over context menu -- action."
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test sentences
- Call wTypeKeys "Redlining_11_test<Return>"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// Insert some test sentences
- Call wTypeKeys "A"
-
- '/// delete some text in first line .
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>"
-
- 'This step to ensure the 1st list is deletion , the 2nd list is insertion
- Call wTypeKeys "<Home>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
-
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- Sleep 1
-
- 'Sort the list of changes with their position
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- Call hMenuSelectNr(2)
- Sleep 1
- Call hMenuSelectNr(5)
- Sleep 1
-
- '/// + Sort the list of changes over context menu -- action
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- Call hMenuSelectNr(2)
- Sleep 1
- Call hMenuSelectNr(1)
- Sleep 1
-
- '/// + Click accept
- Akzeptieren.Click
- Sleep 1
-
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>"
- EditCopy
- if GetClipboardText <> "s" then Warnlog "The deleted text in first line is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> "A" then Warnlog "The inserted text in second line is incorrect!"
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_12
-
- Dim sFirstName , sLastName as String
- Dim sFirstName1 , sLastName1 as String
- Dim sFirstName2 , sLastName2 as String
-
- sFirstName1 = "ATest1" : sLastName1 = "ATest1"
- sFirstName2 = "BTest2" : sLastName2 = "BTest2"
-
- '/// Sort the list of changes over context menu -- author.
- printlog "Sort the list of changes over context menu -- author."
-
- '/// New document
- Call hNewDocument
-
- 'Insert some test sentences
- Call wTypeKeys "Redlining test => O1<Return>"
- Call wTypeKeys "Redlining test => K2"
-
- '/// Change author to author1 :ATest1 ATest1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// author1 : delete some text in 2nd line
- Call wTypeKeys "<Backspace>"
-
- '/// Change author to author2 :BTest2 BTest2
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName2
- ZuName.SetText sLastName2
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// author2 : delete some text in 1st line
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>"
- Sleep 1
- Call wTypeKeys "<Home>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
-
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- Sleep 1
-
- 'Sort the list of changes with their position
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(2)
- Sleep 1
- hMenuSelectNr(5)
- Sleep 1
-
- '/// + Sort the list of changes over context menu - author
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(2)
- Sleep 1
- hMenuSelectNr(2)
- Sleep 1
-
- '/// + Select author 1
- ListItem.TypeKeys "<Up>"
- Sleep 1
-
- '/// + Click accept
- Akzeptieren.Click
- Sleep 1
-
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if Filter works well
- Call wTypeKeys "<Up>" , 2
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> "O" then Warnlog "The deleted text by author1 is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> " K" then Warnlog "The deleted text by author2 is incorrect!"
-
- 'Change author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// + Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_13
-
- '/// Sort the list of changes over context menu -- date.
- printlog "Sort the list of changes over context menu -- date."
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test sentences
- Call wTypeKeys "Redlining test => O1<Return>"
- Call wTypeKeys "Redlining test => K2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// delete some text in 2nd line .
- Call wTypeKeys "<Backspace>"
-
- '/// wait 70 seconds
- Sleep 70
-
- '/// delete some text in 1st line .
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
-
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- Sleep 1
-
- 'Sort the list of changes with their position
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(2)
- Sleep 1
- hMenuSelectNr(5)
- Sleep 1
-
- '/// + Sort the list of changes over context menu -- date
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(2)
- Sleep 1
- hMenuSelectNr(3)
- Sleep 1
-
- '/// + Select 2nd item (it should be the 2nd deletion operation)
- ListItem.TypeKeys "<Down>"
-
- '/// + Click accept
- Akzeptieren.Click
- Sleep 1
-
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> " O" then Warnlog "The deleted text in first line is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> "K" then Warnlog "The deleted text in second line is incorrect!"
-
- '/// + Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_14
-
- '/// Sort the list of changes over context menu -- comment.
- printlog "Sort the list of changes over context menu -- comment"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test sentences
- Call wTypeKeys "Redlining test => O1<Return>"
- Call wTypeKeys "Redlining test => K2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// delete some text in 2nd line .
- Call wTypeKeys "<Backspace>"
-
- '/// insert comment1: Edit / Changes / Comment
- EditChangesComment
- Kontext "Kommentar"
- KommentarText.SetText "Comment1"
- Kommentar.OK
-
- '/// delete some text in 1st line .
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>"
-
- '/// insert comment2: Edit / Changes / Comment
- EditChangesComment
- Kontext "Kommentar"
- KommentarText.SetText "Comment2"
- Kommentar.OK
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
-
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- Sleep 1
-
- 'Sort the list of changes with their position
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(2)
- Sleep 1
- hMenuSelectNr(5)
- Sleep 1
-
- '/// + Sort the list of changes over context menu -- comment
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(2)
- Sleep 1
- hMenuSelectNr(4)
- Sleep 1
-
- '/// + Select 2nd item
- ListItem.TypeKeys "<Down>"
-
- '/// + Click accept
- Akzeptieren.Click
- Sleep 1
-
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> " O" then Warnlog "The deleted text in first line is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> "K" then Warnlog "The deleted text in second line is incorrect!"
-
- '/// + Close the document
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------------------
-
-testcase tAcceptReject_15
-
- '/// Sort the list of changes over context menu -- document position.
- printlog "Sort the list of changes over context menu -- document position"
-
- '/// New document
- Call hNewDocument
-
- '/// Insert some test sentences
- Call wTypeKeys "Redlining test => O1<Return>"
- Call wTypeKeys "Redlining test => K2"
-
- UseBindings
- '/// Edit / Changes / Record
- EditChangesRecord
-
- '/// delete some text in 2nd line .
- Call wTypeKeys "<Backspace>"
-
- '/// delete some text in 1st line .
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Backspace>"
-
- Call wTypeKeys "<Home>"
-
- '/// Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- Kontext "Redlining"
-
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- Sleep 1
-
- '/// + Sort the list of changes over context menu -- document position
- ListItem.TypeKeys "<Up>"
- ListItem.OpenContextMenu
- hMenuSelectNr(2)
- Sleep 1
- hMenuSelectNr(5)
- Sleep 1
-
- '/// + Select 2nd item
- ListItem.TypeKeys "<Down>"
- Sleep 1
-
- '/// + Click accept
- Akzeptieren.Click
- Sleep 1
-
- '/// + Close Redlining dialog
- Redlining.Close
-
- '/// Check if the configuration is all right
- Call wTypeKeys "<Up><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> "O" then Warnlog "The deleted text in first line is incorrect!"
-
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Shift Left>" , 2
- EditCopy
- if GetClipboardText <> " K" then Warnlog "The deleted text in second line is incorrect!"
-
- '/// Close the document
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/regexp/regular.inc b/testautomation/writer/optional/includes/regexp/regular.inc
deleted file mode 100644
index d53277085b13..000000000000
--- a/testautomation/writer/optional/includes/regexp/regular.inc
+++ /dev/null
@@ -1,974 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Search for regular expressions
-'*
-'\***********************************************************************
-
-sub regular
- call tAny_Character
- call tWord_At_Paragraph_Beginning
- call tWord_At_Paragraph_End
- call tNone_Or_Several_Between
- call tAtLeast_One_Between
- call tText_At_WordBeginning
- call tText_At_WordEnd
- call tDolar
- call tTabulator
- call tOr_Search
- call tEmpty_Paragraph
- call tLineBreak
- call tSingle_Selected
- call tOne_Area_Selected
- call tTwo_Areas_Selected
- call tHexadecimal_Code
- call tHexadecimal_Code_NEW
- call tAttach_Behind_WordToFind
- Call tWord_At_Beginning_With_Empty_Field
- Call tWord_At_Beginning_With_Frame
- Call tWord_At_End_With_Empty_Field
- Call tWord_At_End_With_Frame
-'---------New------------
- call tChartype_digit
- call tChartype_space
- call tChartype_print
- call tChartype_alnum
- call tChartype_alpha
- call tChartype_cntrl
-
- call tChartype_lower
- call tChartype_upper
-end sub
-
-'---------------------------------------------------------
-' Wort mit einem beliebigen Zeichen im Wort Search : geht mit '.'
-'
-testcase tAny_Character
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
- RegularExpressions.Check '/// hmmm, one time set, evry time work : just here gets regexp checked ?!///
- '/// Start Search & Compare ///
- Such_Text = "M.ller" 'beliebiges Zeichen im Wort
- '///+ Enter RegExp in Field Search for : 'M.ller' ///
- Vergleichstext = "MöllerMüller"
- '/// Compare string found with: 'M�llerM�ller' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-'///' Wort am Absatzanfang Search : geht mit '^' ///
-'
-testcase tWord_At_Paragraph_Beginning
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "^Anfang" 'Wort am Absatzanfang
- '///+ Enter RegExp in Field Search for : '^Anfang' ///
- Vergleichstext = "Anfang"
- '/// Compare string found with: 'Anfang' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' Wort am Absatzende Search : geht mit 'xxx$' - Dollarzeichen
-'
-testcase tWord_At_Paragraph_End
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "Ende$" 'Wort am Absatzende
- '///+ Enter RegExp in Field Search for : 'Ende$' ///
- Vergleichstext = "Ende"
- '/// Compare string found with: 'Ende' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' Wort oder Satzteile Search. Zwischen den Worten mit dem Suchbegriff darf kein oder mehrere Buchstaben stehen : geht mit '.*'
-'
-testcase tNone_Or_Several_Between
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "Peter.*Haus" 'Kein oder mehrere Zeichen dazwischen
- '///+ Enter RegExp in Field Search for : 'Peter.*Haus' ///
- Vergleichstext = "Peter ist im HausPeter liebt dieses HausPeters HausPeterhaus"
- '/// Compare string found with: 'Peter ist im HausPeter liebt dieses HausPeters HausPeterhaus' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' Wort oder Satzteile Search. Zwischen den Worten mit dem Suchbegriff mu├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬â•Ã”ö£Ôòæ├ö├Â┬úÔö£Ôòæ├ö├Â┬úÔö£├æ mindestens ein Buchstabe stehen : geht mit '.+'
-'
-testcase tAtLeast_One_Between
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "Peter.+Haus"
- '///+ Enter RegExp in Field Search for : 'Peter.+Haus' ///
- Vergleichstext = "Peter ist im HausPeter liebt dieses HausPeters Haus"
- '/// Compare string found with: 'Peter ist im HausPeter liebt dieses HausPeters Haus' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' Worte mit Vergleichtext am Wortanfang Search : geht mit '\<'
-'
-testcase tText_At_WordBeginning
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "\<aaa"
- '///+ Enter RegExp in Field Search for : '\<aaa' ///
- Vergleichstext = "aaa"
- '/// Compare string found with: 'aaa' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' Worte mit Vergleichtext am Wortende Search : geht mit '\>'
-'
-testcase tText_At_WordEnd
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "eee\>" 'Text am Wortende
- '///+ Enter RegExp in Field Search for : 'eee\>' ///
- Vergleichstext = "eee"
- '/// Compare string found with: 'eee' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' Normale mit regulren Ausdrcke Search, hier das Dollarzeichen geht mit \$
-
-testcase tDolar
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "\$" 'Sonderzeichen ($)
- '///+ Enter RegExp in Field Search for : '\$' ///
- Vergleichstext = "$$"
- '/// Compare string found with: '$$' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht nach Tabulatoren : geht mit \t
-'
-testcase tTabulator
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "\t" 'Tabulatoren
- '///+ Enter RegExp in Field Search for : '\t' ///
- Vergleichstext = Chr$(9)+Chr$(9)+Chr$(9)
- '/// Compare string found with: ' ' ///
- call Search_Und_Vergleichen
-' findet nun t
-endcase
-
-'---------------------------------------------------------
-' entweder das eine Wort oder das andere Wort Search : geht mit 'aaa|bbb'
-'
-testcase tOr_Search
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "Erstes|Zweites" 'ODER-Suche
- '///+ Enter RegExp in Field Search for : 'Erstes|Zweites' ///
- Vergleichstext = "ZweitesErstesZweites"
- '/// Compare string found with: 'ZweitesErstesZweites' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht leere Abstze : geht mit '^$'
-'
-testcase tEmpty_Paragraph
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "^$"
- '///+ Enter RegExp in Field Search for : '^$' ///
- if gPlatgroup = "unx" then
- Vergleichstext = Chr$(10)
- else
- Vergleichstext = Chr$(13) + Chr$(10)
- end if
- '/// Compare string found with: 'An empty paragraph' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht nach einem weichen Zeilenumbruch ( linefeed, newline ): geht mit '\n'
-'
-testcase tLineBreak
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "\n" 'Zeilenumbruch
- '///+ Enter RegExp in Field Search for : '\n' ///
- Vergleichstext = Chr$(10)
- '/// Compare string found with: a line break ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht alle ausgewlten Zeichen : geht mit '[xyz]'
-'
-testcase tSingle_Selected
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[xyz]" 'Einzelne ausgewhlte Zeichen
- '///+ Enter RegExp in Field Search for : '[xyz]' ///
- Vergleichstext = "xZzzZzxxzzZZzZzXxYyZz"
- '/// Compare string found with: 'xZzzZzxxzzZZzZzXxYyZz' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht alle Zeichen im Bereich zwischen zwei Buchstaben : geht mit '[x-z]'
-'
-testcase tOne_Area_Selected
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[w-z]" 'Bereich ausgewhlter Zeichen
- '///+ Enter RegExp in Field Search for : '[w-z]' ///
- Vergleichstext = "xZWWzWzZzwWWxWwxWwzzZwWWwZwWzZzWwXxYyZz"
- '/// Compare string found with: 'xZWWzWzZzwWWxWwxWwzzZwWWwZwWzZzWwXxYyZz' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht alle Zeichen aus zwei angegebenen Buchstabenbereichen : geht mit '[a-cg-h]'
-'
-testcase tTwo_Areas_Selected
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[B-Dx-z]" 'Zwei Bereiche ausgewhlter Zeichen
- '///+ Enter RegExp in Field Search for : '[B-Dx-z]' ///
- Vergleichstext = "xdcbbZcddcddbzddcbddbzddcbddZczcdbdcDccxddcxddddzcbdbzZDddZbzZcbdzcBbCcDdXxYyZzcddDd"
- '/// Compare string found with: 'xdcbbZcddcddbzddcbddbzddcbddZczcdbdcDccxddcxddddzcbdbzZDddZbzZcbdzcBbCcDdXxYyZzcddDd' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht alle Zeichen mit dem Hexadezimalcode .. : geht mit '\x..'
-'
-testcase tHexadecimal_Code_NEW
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "\x3E" 'Zeichen mit Hexadezimal-Code finden
- '///+ Enter RegExp in Field Search for : '\x3E' ///
- Vergleichstext = ">"
- '/// Compare string found with: '>' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht alle Zeichen mit dem Hexadezimalcode .. : geht mit '\x..'
-'
-testcase tHexadecimal_Code
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "\x003E" 'Zeichen mit Hexadezimal-Code finden
- '///+ Enter RegExp in Field Search for : '\x003E' ///
- Vergleichstext = ">"
- '/// Compare string found with: '>' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht Wort am Anfang eines Absatzes mit leerem Feldbefehl davor : geht mit '^'
-'
-testcase tWord_At_Beginning_With_Empty_Field
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "^Halloo"
- '///+ Enter RegExp in Field Search for : '^Halloo' ///
- Vergleichstext = "Halloo"
- '/// Compare string found with: 'Halloo' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht Wort am Anfang eines Absatzes mit zeichengebundenen Rahmen davor : geht mit '^'
-'
-testcase tWord_At_Beginning_With_Frame
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "^Rahmen"
- '///+ Enter RegExp in Field Search for : '^Rahmen' ///
- Vergleichstext = "Rahmen"
- '/// Compare string found with: 'Rahmen' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht Wort am Ende eines Absatzes mit leerem Feldbefehl davor : geht mit '^'
-'
-testcase tWord_At_End_With_Empty_Field
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "hhallo$"
- '///+ Enter RegExp in Field Search for : 'hhallo$' ///
- Vergleichstext = "hhallo"
- '/// Compare string found with: 'hhallo' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-' sucht Wort am Ende eines Absatzes mit zeichengebundenen Rahmen davor : geht mit '^'
-'
-testcase tWord_At_End_With_Frame
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "Rahmenend$"
- '///+ Enter RegExp in Field Search for : 'Rahmenend$' ///
- Vergleichstext = "Rahmenend"
- '/// Compare string found with: 'Rahmenend' ///
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-testcase tAttach_Behind_WordToFind
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// look for 'Sonderzeichen' replace with '& sind toll' ///'
- '/// Start Search & Compare ///
- Such_Text = "Sonderzeichen" 'Anh├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬â•Ã”ö£ÔòæÔö£├ÂÔö£├éÔö¼├║Ôö£├ÂÔö£ÔòùÔö£├Ñngen an gesuchtes Wort
- '///+ Enter RegExp in Field Search for : 'Sonderzeichen' ///
- SearchFor.SetText Such_Text
- ReplaceWith.SetText "& sind toll"
- ReplaceAll.Click
- sleep 1
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK 'MSG-Box (... x ersetzt) schlie�en
- else
- Warnlog "Messagebox, how often replaced, not up !"
- end if
- end if
- Kontext "FindAndReplace"
- FindAndReplace.Close
- kontext "DocumentWriter"
- DocumentWriter.Typekeys "<PAGEUP>"
- DocumentWriter.Typekeys "<MOD1 HOME>"
- EditSearchAndReplace
- kontext "FindAndReplace" 'Search&Replace-Fenster ├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬â•Ã”ö£ÔòæÔö£├ÂÔö£├éÔö¼├║├ö├Â┬úÔö¼┬½ffnen
- if RegularExpressions.IsVisible = False then More.Click
- RegularExpressions.Uncheck
- Such_Text = "Sonderzeichen sind toll"
- Vergleichstext = "Sonderzeichen sind tollSonderzeichen sind toll"
- call Search_Und_Vergleichen
-endcase
-
-'--------------NEW ONES from TBO; to SO 6.0---------------------------------
-
-testcase tChartype_digit
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:digit:]*"
- '///+ Enter RegExp in Field Search for : '[:digit:]*' ///
- Vergleichstext = "²³¹¼½¾"
- '/// Compare string found with: '' ///
- call Search_Und_Vergleichen
-endcase
-
-testcase tChartype_space
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:space:]*"
- '///+ Enter RegExp in Field Search for : '[:space:]*' ///
- Vergleichstext = " "
- '/// Compare string found with: 'All spaces in document' ///
- call Search_Und_Vergleichen
-endcase
-
-testcase tChartype_print
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:print:]*"
- '///+ Enter RegExp in Field Search for : '[:print:]*' ///
- Vergleichstext = "HuhuhuHuhuhuTest-Text für "+chr$(34)+"Reguläre Ausdrücke"+chr$(34)+"Ein beliebiges Zeichen in einem WortFinde Möller und Müller, nicht Mller und Mueller !Wort am Anfang des AbsatzesAnfang Quaeramus tum aliarum rerum, quae vitam instruunt, diligens sine admiratione cuiusquam, usura fortunae muneribus, non servitura.Wort am Ende des AbsatzesQuaeramus tum aliarum rerum, quae vitam instruunt, diligens sine admiratione cuiusquam, usura fortunae muneribus, non servitura EndeKein oder mehrere Zeichen zwischen den WörternPeter ist im Haus. - Aha !Peter liebt dieses Haus. - Warum?Es ist Peters Haus. Ach so.Das Peterhaus. - Natürlich!Suchtext am Anfang des Wortesaaahier kommt das wortaaaSuchtext am Ende des Worteseeehier kommt das worteeeSonderzeichen$TabulatorenHiersindTabsgesetzt !AlternativgruppenErst kam ein Zweites WortDann kam ein Erstes WortUnd wieder ein Zweites WortLeerer AbsatzZeilenvorschubSonderzeichen@`Àà!Aa¡Ãá"+chr$(34)+"Bb¢Ââ#Cc£Ãã$Dd¤Ää%Ee¥Åå&FfÆæ'Gg§Çç(Hh¨Èè)Ii©ÉéJjªÊê+KkËë,Ll¬ÌìMmÃí.®Îî/Oo¯ÃïPp°ÃðQq±ÑñRr²ÒòSs³ÓóTt´ÔôUuÕõVv¶ÖöWw·×÷Xx¸ØøYy¹Ùù:ZzºÚú;[{Ûû<\|¼Üü=]}½Ãý>^~¾Þþ?_¿ßÿ-RahmenHalloo kikiriki kirikeircidkvvdn hhalloDer Rahmen ist hier hinten Rahmenend" 'Test-Text für "+chr$(34)+"Reguläre Ausdrücke"+chr$(34)
- '/// Compare string found with: '' ///
- call Search_Und_Vergleichen
-endcase
-
-testcase tChartype_alnum
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:alnum:]*"
- '///+ Enter RegExp in Field Search for : '[:alnum:]*' ///
- Vergleichstext = "HuhuhuHuhuhuTestTextfürReguläreAusdrückeEinbeliebigesZeichenineinemWortFindeMöllerundMüllernichtMllerundMuellerWortamAnfangdesAbsatzesAnfangQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraWortamEndedesAbsatzesQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraEndeKeinodermehrereZeichenzwischendenWörternPeteristimHausAhaPeterliebtdiesesHausWarumEsistPetersHausAchsoDasPeterhausNatürlichSuchtextamAnfangdesWortesaaahierkommtdaswortaaaSuchtextamEndedesWorteseeehierkommtdasworteeeSonderzeichenTabulatorenHiersindTabsgesetztAlternativgruppenErstkameinZweitesWortDannkameinErstesWortUndwiedereinZweitesWortLeererAbsatzZeilenvorschubSonderzeichenÀàAaÃáBbÂâCcÃãDdÄäEeÃ…Ã¥FfÆæGgÇçHhÈèIiÉéJjªÊêKkËëLlÌìMmÃíÎîOoÃïPpÃðQqÑñRr²ÒòSs³ÓóTtÔôUuÕõVvÖöWwXxØøYy¹ÙùZzºÚúÛû¼Üü½Ãý¾ÞþßÿRahmenHallookikirikikirikeircidkvvdnhhalloDerRahmenisthierhintenRahmenend" 'Test
- '/// Compare string found with: '' ///
- call Search_Und_Vergleichen
-endcase
-
-testcase tChartype_alpha
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:alpha:]*"
- '///+ Enter RegExp in Field Search for : '[:alpha:]*' ///
- Vergleichstext = "HuhuhuHuhuhuTestTextfürReguläreAusdrückeEinbeliebigesZeichenineinemWortFindeMöllerundMüllernichtMllerundMuellerWortamAnfangdesAbsatzesAnfangQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraWortamEndedesAbsatzesQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraEndeKeinodermehrereZeichenzwischendenWörternPeteristimHausAhaPeterliebtdiesesHausWarumEsistPetersHausAchsoDasPeterhausNatürlichSuchtextamAnfangdesWortesaaahierkommtdaswortaaaSuchtextamEndedesWorteseeehierkommtdasworteeeSonderzeichenTabulatorenHiersindTabsgesetztAlternativgruppenErstkameinZweitesWortDannkameinErstesWortUndwiedereinZweitesWortLeererAbsatzZeilenvorschubSonderzeichenÀàAaÃáBbÂâCcÃãDdÄäEeÃ…Ã¥FfÆæGgÇçHhÈèIiÉéJjªÊêKkËëLlÌìMmÃíÎîOoÃïPpÃðQqÑñRrÒòSsÓóTtÔôUuÕõVvÖöWwXxØøYyÙùZzºÚúÛûÜüÃýÞþßÿRahmenHallookikirikikirikeircidkvvdnhhalloDerRahmenisthierhintenRahmenend" 'Test"
- '/// Compare string found with: '' ///
- call Search_Und_Vergleichen
-endcase
-
-testcase tChartype_cntrl
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:cntrl:]*"
- '///+ Enter RegExp in Field Search for : '[:cntrl:]*' ///
- Vergleichstext = Chr(9) + Chr(9) + Chr(9)
- '/// Compare string found with: '' ///
- call Search_Und_Vergleichen
-endcase
-
-testcase tChartype_lower
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:lower:]*"
- '///+ Enter RegExp in Field Search for : '[:lower:]*' ///
- Vergleichstext = "uhuhuuhuhuestextfüreguläreusdrückeinbeliebigeseichenineinemortindeöllerundüllernichtllerunduellerortamnfangdesbsatzesnfanguaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraortamndedesbsatzesuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonserviturandeeinodermehrereeichenzwischendenörterneteristimaushaeterliebtdiesesausarumsistetersauschsoaseterhausatürlichuchtextamnfangdesortesaaahierkommtdaswortaaauchtextamndedesorteseeehierkommtdasworteeeonderzeichenabulatoreniersindabsgesetztlternativgruppenrstkameinweitesortannkameinrstesortndwiedereinweitesorteererbsatzeilenvorschubonderzeichenàaábâcãdäeåfægçhèiéjªêkëlìmíîoïpðqñròsótôuõvöwxøyùzºúûüýþßÿahmenallookikirikikirikeircidkvvdnhhalloerahmenisthierhintenahmenend" 'est"
- '/// Compare string found with: '' ///
- MatchCase.Check
- call Search_Und_Vergleichen
-endcase
-
-testcase tChartype_upper
- call Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
-
- '/// Start Search & Compare ///
- Such_Text = "[:upper:]*"
- '///+ Enter RegExp in Field Search for : '[:upper:]*' ///
- Vergleichstext = "HHTTRAEZWFMMMMWAAAQWEAQEKZWPHAPHWEPHADPNSAWSEWSTHTAEZWDEWUZWLAZSÀAÃBÂCÃDÄEÃ…FÆGÇHÈIÉJÊKËLÃŒMÃÃŽOÃPÃQÑRÃ’SÓTÔUÕVÖWXØYÙZÚÛÜÃÞRHDRR"
- '/// Compare string found with: '' ///
- MatchCase.Check
- call Search_Und_Vergleichen
-endcase
-
-'---------------------------------------------------------
-'---------------------------------------------------------
-'--------------- Unterprogramme ----------------------
-'---------------------------------------------------------
-sub Ausgangszustand_herstellen
- '/// <B>Set to default values</B> ///
- '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
- '///+ Close 'Find&Replace' dialog if open ///
- '///+ Point cursor to beginning of document ///
- '///+ Open 'Find&Replace' dialog ///
- '///+ Clear Editfield 'Search for' ///
- '///+ Uncheck 'Whole words only' ///
- '///+ Uncheck 'Backwards' ///
- '///+ Uncheck 'Match Case' ///
- '///+ Uncheck 'Current selection only' ///
- '///+ Uncheck 'Search for Styles' ///
- '///+ Uncheck 'Similarity Search' ///
- '///+ Check 'Regular Expressions' ///
- hFileOpenLocally( gtesttoolpath + "writer\optional\input\search\regu_aus.sxw")
-
- kontext
- if FindAndReplace.Exists then FindAndReplace.Close
- kontext "DocumentWriter"
- DocumentWriter.Typekeys "<PAGEUP>", 2 'an den Anfang des Textes gehen
- DocumentWriter.Typekeys "<MOD1 HOME>"
- EditSearchAndReplace
- kontext "FindAndReplace" 'Search&Replace-Fenster ├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬â•Ã”ö£ÔòæÔö£├ÂÔö£├éÔö¼├║├ö├Â┬úÔö¼┬½ffnen
- try
- SearchFor.Settext ""
- catch
- endcatch
- if SimilaritySearch.IsVisible = False then More.Click
- if SimilaritySearch.IsEnabled then SimilaritySearch.Uncheck
- if SearchForStyles.IsEnabled then SearchForStyles.Uncheck
- if RegularExpressions.IsEnabled then RegularExpressions.Uncheck
- if NoFormat.IsEnabled then NoFormat.Click
- if CurrentSelectionOnly.IsEnabled then CurrentSelectionOnly.Uncheck
- WholeWordsOnly.Uncheck 'Im Suchdialog alles unchecken,
- Backwards.Uncheck 'damit ein definierter Anfangs-
- MatchCase.Uncheck 'zustand erreicht wird.
- RegularExpressions.Check 'Regul├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬â•Ã”ö£ÔòæÔö£├ÂÔö£├éÔö¼├║Ôö£├ÂÔö£ÔòùÔö£├Ñrer Ausdruck mu├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬â•Ã”ö£Ôòæ├ö├Â┬úÔö£Ôòæ├ö├Â┬úÔö£├æ gecheckt sein
-end sub
-
-'-------------------------------------------------------
-sub Search_Und_Vergleichen
- dim dummy as string 'Sucht den Ausdruck und vergleicht
- 'Such_Text mit dem Text, der nach
- SearchFor.SetText Such_Text 'nach der Suche markiert ist und
- if Such_Text = "$" then
- SearchNow.Click
- else
- SearchAll.Click
- end if
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then ' MESSBOX
- Warnlog "active: " + Active.Gettext
- Active.Ok
- end if
- end if
- kontext "FindAndReplace"
- if FindAndReplace.Exists then
- FindAndReplace.Close
- else
- Warnlog "Dialog 'Find & Replace' not open anymore!"
- end if
- Kontext "DocumentWriter"
- try
- EditCopy
- catch
- Warnlog "Edit /Copy disabled!"
- DocumentWriter.Typekeys "<MOD1 HOME>"
- hCloseDocument
- exit sub
- endcatch
-
- Sleep 1
- if Vergleichstext = chr(13)+chr(10) OR Vergleichstext = chr(10) OR Vergleichstext = chr(13) then
- dummy = GetClipboard
- else
- dummy = GetClipboardText
- end if
- if Vergleichstext <> dummy then
- Warnlog "'",dummy,"' has been found, and not '",Vergleichstext,"'"
- else
- printlog "'Find' found correct word!"
- end if
- DocumentWriter.Typekeys "<MOD1 HOME>"
-
- hCloseDocument
-end sub
diff --git a/testautomation/writer/optional/includes/regexp/search.inc b/testautomation/writer/optional/includes/regexp/search.inc
deleted file mode 100644
index e5fe3b4f267f..000000000000
--- a/testautomation/writer/optional/includes/regexp/search.inc
+++ /dev/null
@@ -1,1697 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Search & Replace
-'*
-'\***********************************************************************
-
-sub search
-
- if bAsianLan = false then Call ActiveDeactivateAsianSupport(False)
- call tCheckDialog
- call tCallDialog
- call tFree_Text
-
- call tAlle_Suchen
- call tSelection
- call tPart_of_a_word
- call tWhole_Word
- call tMatch_Case
-
- call tItalic_Search
-
- call tItalic_Replace
- call tUnderline_Search
- call tUnderline_Replace
- call tAll_Replace
-
- call tReplace_Arial_with_TmsRmn
- call tBackwards_Search
- call tSeveral_Times
- call tFurther_Look_up_At_The_Beginning
- call tParagraphStyle_Search
- call tText_In_Table
- call tText_In_Frame
- call tSimilarity_Search
-
-end sub
-
-'---------------------------------------------------------
-testcase tCheckDialog
-
- Dim Checkboxtitel
- Call hNewDocument
- EditSearchAndReplace
- Sleep 2
- Kontext "FindAndReplace"
- if FindAndReplace.NotExists then EditSearchAndReplace
-
- printlog "Check Find-and-Replace-Dialog"
- printlog "- Dependencies of Buttons in Search-for-Entry"
- SearchFor.SetText ""
- if Not Backwards.IsVisible then More.Click
- if SimilaritySearch.IsEnabled and SimilaritySearch.IsChecked then SimilaritySearch.Uncheck
- if SearchAll.IsEnabled then Warnlog "Without Search-for-entry Find-All is active!"
- if SearchNow.IsEnabled then Warnlog "Without Search-for-entry Find is active!"
- if ReplaceAll.IsEnabled then Warnlog "Without Search-for-entry Replace-All is active!"
- if ReplaceBtn.IsEnabled then Warnlog "Without Search-for-entry Replace is active!"
- if NoFormat.IsEnabled then Warnlog "Without selecting Formats , No-Format is active!"
- SearchFor.SetText "Hallo"
- if NOT SearchAll.IsEnabled then Warnlog "Containing Search-for-entry Find-All is inactive!"
- if NOT SearchNow.IsEnabled then Warnlog "Containing Search-for-entry Find inactive!"
- if NOT ReplaceAll.IsEnabled then Warnlog "Containing Search-for-entry Replace-All is inactive!"
- if NOT ReplaceBtn.IsEnabled then Warnlog "Containing Search-for-entry Replace is inactive!"
-
- Sleep 5
- printlog "- Dependencies of Format-Properties"
- Kontext "FindAndReplace"
- Formats.Click
- wait 500
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Outline.Check
- TabFontEffects.OK
- wait 500
- kontext "FindAndReplace"
- if NOT NoFormat.IsEnabled then Warnlog "Containing Formats, No-Formats is inactive!"
- NoFormat.Click
- wait 500
-
- printlog "- Dependencies of Checkboxes"
- RegularExpressions.Check
- wait 500
- if WholeWordsOnly.IsEnabled then Warnlog "Regular expressions: 'Whoole words only' is active => BUG!"
- if NOT Backwards.IsEnabled then Warnlog "Regular expressions: 'Backwards' is inactive => BUG!"
- if NOT MatchCase.IsEnabled then Warnlog "Regular expressions: 'Match case' is inactive => BUG!"
- if CurrentSelectionOnly.IsEnabled then Warnlog "Regular expressions: 'Current selection only' is active => BUG!"
- if NOT SearchForStyles.IsEnabled then Warnlog "Regular expressions: 'Search for Styles' is inactive => BUG!"
- if SimilaritySearch.IsEnabled then Warnlog "Regular expressions: 'Similarity search' is active => BUG!"
- if SimilaritySearchFor.IsEnabled then Warnlog "Regular expressions: Button for 'Similarity search' - dialog is active => BUG!"
- RegularExpressions.UnCheck
-
- wait 500
- SearchForStyles.Check
- if WholeWordsOnly.IsEnabled then Warnlog "Search for Styles: 'Whole words only' is active => BUG!"
- if NOT Backwards.IsEnabled then Warnlog "Search for Styles: 'Backwards' is inactive => BUG!"
- if RegularExpressions.IsEnabled then Warnlog "Search for Styles: 'Regular expressions' is active => BUG!"
- if MatchCase.IsEnabled then Warnlog "Search for Styles: 'Match case' is active => BUG!"
- if CurrentSelectionOnly.IsEnabled then Warnlog "Regular expressions: 'Current selection only' is active => BUG!"
- if SimilaritySearch.IsEnabled then Warnlog "Search for Styles: 'Similarity search' is active => BUG!"
- if SimilaritySearchFor.IsEnabled then Warnlog "Search for Styles: Button for 'Similarity search' - dialog is active => BUG! "
- SearchForStyles.UnCheck
-
- wait 500
- SimilaritySearch.Check
- if NOT WholeWordsOnly.IsEnabled then Warnlog "Similarity Search: 'Whole words only' is active => BUG!"
- if NOT Backwards.IsEnabled then Warnlog "Similarity Search: 'Backwards' is inactive => BUG!"
- if RegularExpressions.IsEnabled then Warnlog "Similarity Search: 'Regular expressions' is active => BUG!"
- if NOT MatchCase.IsEnabled then Warnlog "Similarity Search: 'Match case' is active => BUG!"
- if CurrentSelectionOnly.IsEnabled then Warnlog "Regular expressions: 'Current selection only' is active => BUG!"
- if SearchForStyles.IsEnabled then Warnlog "Regular expressions: 'Search for Styles' is active => BUG!"
- if NOT SimilaritySearchFor.IsEnabled then Warnlog "Similarity Search: Button for 'Similarity search' - dialog is active => BUG! "
- SimilaritySearch.UnCheck
- Sleep 2
- FindAndReplace.Close
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "hallo <Shift Home>"
- EditSearchAndReplace
- kontext "FindAndReplace"
- if NOT CurrentSelectionOnly.IsEnabled then Warnlog "WIth a selected entry, 'Current selection only' isn't active! => BUG"
- Sleep 2
- FindAndReplace.Close
- wait 500
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tCallDialog
- Dim Shortcut as String
- Call hNewDocument
- '/// Open new document ///
- kontext "FindAndReplace"
- Sleep 2
- if FindAndReplace.Exists then FindAndReplace.Close
- '/// Close Search&Replace dialog if open ///
- Kontext "DocumentWriter"
- select case iSprache
- case 01 : Shortcut = "<Mod1 f>"
- case 03 : Shortcut = "<Mod1 g>"
- case 07 : Shortcut = "<Mod1 f>"
- case 31 : Shortcut = "<Mod1 f>"
- case 33 : Shortcut = "<Mod1 f>"
- case 34 : Shortcut = "<Mod1 b>"
- case 39 : Shortcut = "<Mod1 f>"
- case 46 : Shortcut = "<Mod1 f>"
- case 49 : Shortcut = "<Mod1 f>"
- case 50 : Shortcut = "<Mod1 f>"
- case 55 : Shortcut = "<Mod1 f>"
- case 81 : Shortcut = "<Mod1 f>"
- case 82 : Shortcut = "<Mod1 f>"
- case 86 : Shortcut = "<Mod1 f>"
- case 88 : Shortcut = "<Mod1 f>"
- case else : QAErrorLog "Shortcut to call Find&Replace-Dialog has to be included!"
- Call hCloseDocument
- goto endsub
- end select
- '/// Open Search and Replace dialog with Shortcut depending on current language ///
- DocumentWriter.TypeKeys Shortcut
- kontext "FindAndReplace"
- if FindAndReplace.NotExists then
- Warnlog "Shortcut " + Shortcut + " didn't call the Find dialog"
- else
- printlog "- Dialog has been called with Shortcut: " + Shortcut
- end if
- Call hCloseDocument
- '/// Close active document ///
- Call hNewDocument
- '/// Open new document ///
- Kontext "Navigator"
- If Navigator.Exists then ViewNavigator
- printlog "- Check, if dialog is not present in a new document"
- '/// Check, if dialog is not present in a new document ///
- kontext "FindAndReplace"
- if FindAndReplace.Exists then
- Warnlog "Search-For-Dialog has been opened in a new document"
- EditSearchAndReplace
- end if
- Call hCloseDocument
- '/// Close active document ///
-endcase
-
-'---------------------------------------------------------
-testcase tFree_Text
- Call wSetFindAndReplaceToDefault(1)
- Such_Text = "non" 'Suchen in freiem Text
- Meldungs_Text = "Suchen in freiem Text"
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchNow.Click
- call Vergleichen_und_ausgeben
- EditSearchAndReplace
- kontext "FindAndReplace" 'Suchen&Replace-Fenster "ffnen
- SearchNow.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tSelection
- Call wSetFindAndReplaceToDefault(1)
- Such_Text = "d n"
- Meldungs_Text = "Suchen in selektiertem Text" 'Suchen in selektiertem Text
- Sleep 2
- FindAndReplace.Close
- kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Shift PageDown>"
- EditSearchAndReplace
- kontext "FindAndReplace"
- SearchFor.SetText Such_Text
- if CurrentSelectionOnly.IsVisible = False then More.Click
- if not CurrentSelectionOnly.ischecked then 'Sollte automatisch
- Warnlog " 'Current selection only' has not been checked automatically" 'gecheckt sein, wenn
- CurrentSelectionOnly.check 'Text markiert ist
- else
- printlog "OK: Only in Selection is checked automatically"
- end if
- ReplaceWith.SetText Meldungs_Text
- SearchNow.Click
- call Vergleichen_und_ausgeben
-
- EditSearchAndReplace
- kontext "FindAndReplace" 'Suchen&Replace-Fenster "ffnen
- SearchNow.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tPart_of_a_word
- Call wSetFindAndReplaceToDefault(1)
- Such_Text = "te"
- Meldungs_Text = "Suchen Teil eines Wortes" 'Suchen Teil eines Wortes
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchNow.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tWhole_Word
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "illa"
- Meldungs_Text = "Suchen nur ganzes Wort" 'Suchen nur ganzes Wort
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- WholeWordsOnly.Check
- SearchNow.Click '"te" ist Teil eines Wortes, "Te" als
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tMatch_Case
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "Be" 'Exakte Suche
- Meldungs_Text = "Exakte Suche"
- ReplaceWith.SetText Meldungs_Text
- 'sleep 1
- MatchCase.check
- SearchFor.SetText Such_Text
- SearchAll.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tItalic_Search
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "k" 'Suche nach Format "kursiv"
- Meldungs_Text = "Suchen Format kursiv"
- SearchFor.SetText Such_Text
- try
- Formats.Click
- wait 500
- catch
- Warnlog "Button 'Format is disabled !"
- Call hCloseDocument
- goto endsub
- endcatch
-
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- if gAsianSup = True or gCTLSup = True then
- try
- StyleWest.Select 2
- catch
- Warnlog "Style has not been found ! -> Asian-Support: " + gAsianSup + "CTL-Support: " + gCTLSup
- Style.Select 2
- endcatch
- else
- Style.Select 2
- end if
- wait 500
- TabFont.Ok
- ' Workaround
- Kontext "FindAndReplace"
- NoFormat.Click
- wait 500
- Formats.Click
- sleep 1
- kontext
- Active.SetPage TabFont
- kontext "TabFont"
- sleep 1
- if gAsianSup = True or gCTLSup = True then
- StyleWest.Select 2
- else
- Style.Select 2
- end if
- sleep 1
- TabFont.OK
- sleep 1
- ' Workaround ends here
- Kontext "FindAndReplace"
- ReplaceWith.SetText Meldungs_Text
- sleep 1
- SearchAll.Click 'wenn auf Format geachtet wird,
- sleep 1
- call Vergleichen_und_ausgeben 'darf nur ein "k" gefunden werden
- sleep 1
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tItalic_Replace
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "kursiv" 'Suche Format "kursiv", ersetze
- Meldungs_Text = "Ersetzte kursiv mit durchgestrichen" 'mit Format "durchgestrichen"
- SearchFor.SetText Such_Text
- wait 500
- try
- NoFormat.Click
- catch
- endcatch
- wait 500
- Formats.Click
- sleep 1
- kontext
- Active.SetPage TabFont
- kontext "TabFont"
- sleep 1
- if gAsianSup = True or gCTLSup = True then
- try
- StyleWest.Select 2
- catch
- Warnlog "Style has not been found ! -> Asian-Support: " + gAsianSup + "CTL-Support: " + gCTLSup
- Style.Select 2
- endcatch
- else
- Style.Select 2
- end if
- sleep 1
- TabFont.OK
- sleep 1
- kontext "FindAndReplace"
- NoFormat.Click
- ' Tried a workaround, because sometimes, searchstring ends with ','. Dont know why !?
- Formats.Click
- sleep 1
- kontext
- Active.SetPage TabFont
- kontext "TabFont"
- sleep 1
- if gAsianSup = True or gCTLSup = True then
- StyleWest.Select 2
- else
- Style.Select 2
- end if
- sleep 1
- TabFont.OK
- sleep 1
- kontext "FindAndReplace"
-
-
- ReplaceWith.SetText "durchgestrichen"
- sleep 1
- Formats.Click
- kontext
- sleep 1
- Active.SetPage TabFontEffects
- kontext "TabFontEffects"
- sleep 1
- StrikeThrough.Select 2
- sleep 1
- TabFontEffects.OK
- sleep 1
- kontext "FindAndReplace"
- sleep 1
- ReplaceAll.Click
- sleep 1
- kontext
- sleep 1
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK 'MSG-Box (... x ersetzt) schließen
- else
- Warnlog "Messagebox, how often replaced, not up !"
- end if
- end if
- sleep 2
- kontext "FindAndReplace"
- FindAndReplace.Close
- sleep 1
- Kontext "DocumentWriter"
- DocumentWriter.Typekeys "<MOD1 HOME>"
- EditSearchAndReplace
- kontext "FindAndReplace"
- Such_Text = "durchgestrichen"
- SearchFor.SetText Such_Text
- sleep 1
- if NoFormat.IsVisible = False then More.Click
- NoFormat.Click
- sleep 1
- ReplaceWith.SetText "durchgestrichen suchen"
- sleep 1
- NoFormat.Click
- sleep 1
- SearchAll.Click
- sleep 1
- call Vergleichen_und_ausgeben
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Format 'Strikethrough' has not been overtaken!"
- TabFontEffects.Cancel
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tUnderline_Search
- if gCTLSup = True then
- QAErrorlog "No Check for attributes if CTL enabled!"
- goto endsub
- end if
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "U" 'search for Attributes underlined
- Meldungs_Text = "search Attribut Underlined"
- if gAsianSup = false then
- Select Case iSprache
- case 01: ToggleAttribute(30,"True") 'Check Attributes underlined
- case 07: ToggleAttribute(16,"True") 'Check Attributes underlined
- case 31: ToggleAttribute(12,"True") 'Check Attributes underlined
- case 33: ToggleAttribute(27,"True")
- case 34: ToggleAttribute(28,"True")
- case 39: ToggleAttribute(27,"True")
- case 46: ToggleAttribute(30,"True")
- case 49: ToggleAttribute(28,"True")
- case 50: ToggleAttribute(15,"True")
- case 55: ToggleAttribute(29,"True")
- case 88: ToggleAttribute(13,"True")
- case else : QAErrorlog "Please adapt test for this language!"
- Call hCloseDocument
- goto endsub
- end select
- else
- Select Case iSprache
- case 01: ToggleAttribute(39,"True") 'Check Attributes underlined
- case 07: ToggleAttribute(22,"True")
- case 31: ToggleAttribute(17,"True") 'Onderstrepen
- case 33: ToggleAttribute(36,"True") ' Soulignage
- case 34: ToggleAttribute(37,"True") ' Subrayado
- case 39: ToggleAttribute(35,"True") ' Sottolineato
- case 46: ToggleAttribute(40,"True") ' Understruken
- case 49: ToggleAttribute(37,"True") ' Unterstrichen
- case 50: ToggleAttribute(24,"True") ' PodÄrtano
- case 55: ToggleAttribute(38,"True") ' Sublinhado
- case 88: ToggleAttribute(13,"True")
- case else : QAErrorlog "Please adapt test for this language!"
- Call hCloseDocument
- goto endsub
- end select
- end if
-
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchAll.Click 'if looking for the Attributes,
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tUnderline_Replace
- if gCTLSup = True then
- QAErrorlog "No Check for attributes if CTL enabled!"
- goto endsub
- end if
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "Unterstrichen" 'search for Attributes underlined
- Meldungs_Text = "search underlined, replace shadow" 'replace with 'shadow'
- SearchFor.SetText Such_Text
- if gAsianSup = false then
- Select Case iSprache
- case 01: ToggleAttribute(30,"True") 'Check Attributes underlined
- case 07: ToggleAttribute(16,"True")
- case 31: ToggleAttribute(12,"True")
- case 33: ToggleAttribute(27,"True")
- case 34: ToggleAttribute(28,"True")
- case 39: ToggleAttribute(27,"True")
- case 46: ToggleAttribute(30,"True")
- case 49: ToggleAttribute(28,"True")
- case 50: ToggleAttribute(15,"True")
- case 55: ToggleAttribute(29,"True")
- case 88: ToggleAttribute(13,"True")
- case else : QAErrorlog "Please adapt test for this language!"
- Call hCloseDocument
- goto endsub
- end select
- else
- Select Case iSprache
- case 01: ToggleAttribute(39,"True") 'Check Attributes underlined
- case 07: ToggleAttribute(22,"True")
- case 31: ToggleAttribute(17,"True") ' Onderstrepen
- case 33: ToggleAttribute(36,"True") ' Soulignage
- case 34: ToggleAttribute(37,"True") ' Subrayado
- case 39: ToggleAttribute(35,"True") ' Sottolineato
- case 46: ToggleAttribute(40,"True") ' Understruken
- case 49: ToggleAttribute(37,"True") ' Unterstrichen
- case 50: ToggleAttribute(24,"True") ' PodÄrtano
- case 55: ToggleAttribute(38,"True") ' Sublinhado
- case 88: ToggleAttribute(13,"True")
- case else : QAErrorlog "Please adapt test for this language!"
- Call hCloseDocument
- goto endsub
- end select
- end if
- ReplaceWith.SetText "Schatten"
- Formats.Click
- kontext
- Active.SetPage TabFontEffects
- kontext "TabFontEffects"
- Shadow.Check
- TabFontEffects.OK
- kontext "FindAndReplace"
- ReplaceAll.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK 'MSG-Box (... x ersetzt) schließen
- end if
- end if
- kontext "FindAndReplace"
- Such_Text = "Schatten"
- SearchFor.SetText Such_Text
- NoFormat.Click
- 'ReplaceWith.SetText Meldungs_Text
- SearchAll.Click
- call Vergleichen_und_ausgeben
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if NOT Shadow.IsChecked then Warnlog "Attribute 'Shadow' has not been overtaken!"
- TabFontEffects.Cancel
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tAll_Replace
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "x" 'Replace alle
- Meldungs_Text = "Replace alle"
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- ReplaceWith.SetText "y"
- ReplaceAll.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK 'MSG-Box (... x ersetzt) schließen
- end if
- end if
- Such_Text = "y" 'Suchen aller "y", um die Ersetzung
- kontext "FindAndReplace" 'zu pruefen
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchAll.Click
- Such_Text = "yyyy" '4 mal wurde ersetzt
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tReplace_Arial_with_TmsRmn
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "opus" 'Suche Arial, 16 pt, ersetze
- Meldungs_Text = "Ers. Arial mit Times Roman" 'mit Times New Roman, normal 24pt
- SearchFor.SetText Such_Text
-
- Formats.Click
- kontext
- Active.SetPage TabFont
- kontext "TabFont"
- try
- FontWest.SetText "Arial"
- catch
- Font.SetText "Arial"
- endcatch
- sleep 2
- try
- SizeWest.SetText "16"
- catch
- Size.SetText "16"
- endcatch
- sleep 2
- TabFont.OK
- kontext "FindAndReplace"
- ReplaceWith.SetText "Ersetzungstext"
- sleep 2
-
- Formats.Click
- kontext
- Active.SetPage TabFont
- kontext "TabFont"
- if gAsianSup = True or gCTLSup = True then
- try
- FontWest.SetText "Times New Roman"
- catch
- Warnlog "Control: 'FontWest' has not been found ! -> Asian-Support: " + gAsianSup + "CTL-Support: " + gCTLSup
- Font.SetText "Times New Roman"
- endcatch
- else
- Font.SetText "Times New Roman"
- end if
- sleep 2
- if gAsianSup = True or gCTLSup = True then
- StyleWest.Select 1
- else
- Style.Select 1
- end if
- sleep 2
- try
- SizeWest.SetText "20"
- catch
- Size.SetText "20"
- endcatch
- sleep 2
- TabFont.OK
- sleep 2
- kontext "FindAndReplace"
- ReplaceAll.Click
-
- sleep 2
- kontext
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.OK 'MSG-Box (... x ersetzt) schließen
- else
- Warnlog "Messagebox, how often replaced, not up !"
- end if
- end if
- Sleep 2
- kontext "FindAndReplace"
- FindAndReplace.Close
- Kontext "DocumentWriter"
- DocumentWriter.Typekeys "<MOD1 HOME>"
-
- EditSearchAndReplace
- kontext "FindAndReplace"
- Such_Text = "Ersetzungstext"
- SearchFor.SetText Such_Text
- if NoFormat.IsVisible = False then More.Click
- NoFormat.Click
- ReplaceWith.SetText "Ersetzungstext suchen"
- NoFormat.Click
- SearchAll.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tBackwards_Search
- call wSetFindAndReplaceToDefault(1)
- Sleep 2
- FindAndReplace.Close
- kontext "DocumentWriter" 'Suchen rückwärts, dafür an
- DocumentWriter.Typekeys "<PAGEDOWN>" 'das Ende des Dokuments gehen
- DocumentWriter.Typekeys "<MOD1 END>"
- Such_Text = "no"
- Meldungs_Text = "Suchen rückwärts"
- EditSearchAndReplace
- kontext "FindAndReplace"
- if Backwards.IsVisible = False then More.Click
- Backwards.Check
- if WholeWordsOnly.ischecked then
- Warnlog " 'Match case' is checked"
- WholeWordsOnly.uncheck
- end if
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchNow.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tSeveral_Times
- dim Zaehler as integer
-
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "m" 'Suchen mehrmals
- Meldungs_Text = "Suchen mehrmals"
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- for Zaehler = 1 to 10
- SearchNow.Click
- next Zaehler
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tAlle_Suchen
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "x" 'Suchen alle
- Meldungs_Text = "Suchen alle"
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchAll.Click
- Such_Text = "xxxx" 'im Beispieltext kommt "x" 4 mal vor
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tFurther_Look_up_At_The_Beginning
- call wSetFindAndReplaceToDefault(1)
- Sleep 2
- FindAndReplace.Close 'Meldung am Dokumentende
- kontext "DocumentWriter"
- DocumentWriter.Typekeys "<MOD1 END>" 'and Ende des Dokuments gehen
- Such_Text = "o"
- Meldungs_Text = "Am Dokumentanfang weitersuchen"
- EditSearchAndReplace
- kontext "FindAndReplace"
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchNow.Click
- Kontext "Active"
- if Active.Exists (1) then
- dummy_text = Active.GetText 'Auslesen der Meldung (dt/engl/frz)
- call Meldungs_Test (dummy_text) 'in der Query-Box und Schließen
- Active.Yes 'mit JA
- end if
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tParagraphStyle_Search
- call wSetFindAndReplaceToDefault(1)
- ' print "the base for the dialog isn't reached!???? before"
- if Not SearchForStyles.IsVisible then More.Click
- SearchForStyles.Check
- ' <font color=#ff0000> TBO TODO : insert global LOCALE routine for text : 'Heading' </FONT>
- Select Case iSprache
- Case 01 : Such_Text = "Heading"
- Case 03 : Such_Text = "Título"
- Case 07 : Such_Text = "Заголовок"
- Case 31 : Such_Text = "Kop"
- Case 33 : Such_Text = "Titre"
- Case 34 : Such_Text = "Encabezado"
- Case 39 : Such_Text = "Intestazione"
- Case 46 : Such_Text = "Överskrift"
- Case 49 : Such_Text = "Ãœberschrift" 'Suchen Absatzformat "Ãœberschrift"
- Case 50 : Such_Text = "Naslov"
- Case 55 : Such_Text = "Título Principal"
- Case 81 : Such_Text = "見出ã—"
- Case 86 : Such_Text = "标题"
- Case 88 : Such_Text = "標題"
- case else: QAErrorlog "Insert heading-name (" + wGetHeadingName + ") for language: " + iSprache
- Call hCloseDocument
- goto endsub
- end select
- Meldungs_Text = "Suchen Absatzformat"
- Sleep 2
- FindAndReplace.Close
- kontext "DocumentWriter"
- DocumentWriter.Typekeys "<RIGHT>"
- DocumentWriter.Typekeys "<LEFT>"
- EditSearchAndReplace
- kontext "FindAndReplace"
- if SearchForStyles.IsVisible = False then More.Click
- SearchForStyles.Check
- sleep 1 'Vorlagen muessen erst gelesen werden
- SearchForStyle.Select Such_Text
- SearchNow.Click
- Such_Text = chr(9) + "Absatzformat: Ãœberschrift"
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tText_In_Table
- call wSetFindAndReplaceToDefault(1)
-'warnlog "WorkAround beginn-----------------"
-' kontext "FindAndReplace"
-' Sleep 2
-' if FindAndReplace.Exists then 'Evtl. offenes Fenster schließen
-' FindAndReplace.Close
-' end if
-' kontext "DocumentWriter"
-' EditSearchAndReplace
-' kontext "FindAndReplace" 'Suchen&Replace-Fenster öffnen
-' sleep 2
-'warnlog "WorkAround ending!-----------------"
-
- 'print "the base for the dialog isn't reached!???? after!"
- Such_Text = "Tabelle" 'Suchen Text in Tabelle
- Meldungs_Text = "Text in Tabelle"
- try
- SearchFor.SetText Such_Text
- catch
- print "Text in table not enabled"
- endcatch
- ReplaceWith.SetText Meldungs_Text
- SearchNow.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-testcase tText_In_Frame
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "Rahmen" 'Suchen Text in Rahmen
- Meldungs_Text = "Suchen Text in Rahmen" '
- SearchFor.SetText Such_Text
- ReplaceWith.SetText Meldungs_Text
- SearchNow.Click
- call Vergleichen_und_ausgeben
- Call hCloseDocument
-endcase
-
-'---------------------------------------------------------
-
-testcase tSimilarity_Search
- dim Zaehler as integer
- dim Zaehler2 as integer
- dim Zeichen_Tauschen as integer
- dim Zeichen_Hinzufuegen as integer
- dim Zeichen_Entfernen as integer
-
- call wSetFindAndReplaceToDefault(1)
- Such_Text = "Ähnlichkeit" 'Ähnlichkeitssuche
- SearchFor.SetText Such_Text
- if SimilaritySearch.IsVisible = False then More.Click
- SimilaritySearch.check
- for Zaehler2 = 1 to 4 'Es werden die Optionen
- for Zaehler = 1 to 3 'Tauschen, Hinzufuegen und Entfernen
- Zeichen_Tauschen = 0 '1 bis 3 mal angechewählt
- Zeichen_Hinzufuegen = 0
- Zeichen_Entfernen = 0
- if SimilaritySearch.IsVisible = False then More.Click
- SimilaritySearchFor.click
- kontext "Aehnlichkeitssuche"
- Kombinieren.check
- ZeichenTauschen.ToMin
- ZeichenHinzufuegen.ToMin
- ZeichenEntfernen.ToMin
- ZeichenTauschen.Less
- ZeichenHinzufuegen.Less
- ZeichenEntfernen.Less
- select case Zaehler2
- Case 1 : Zeichen_Tauschen = Zaehler
- Case 2 : Zeichen_Hinzufuegen = Zaehler
- Case 3 : Zeichen_Entfernen = Zaehler
- Case 4 : Zaehler = 3 'Die 3 Optionen werden gleichzeitig
- Zeichen_Tauschen = Zaehler 'angewählt.
- Zeichen_Hinzufuegen = Zaehler
- Zeichen_Entfernen = Zaehler
- end select
- ZeichenTauschen.More (Zeichen_Tauschen)
- ZeichenHinzufuegen.More (Zeichen_Hinzufuegen)
- ZeichenEntfernen.More (Zeichen_Entfernen)
- Aehnlichkeitssuche.OK
- kontext "FindAndReplace"
- SearchAll.Click
- select case Zeichen_Tauschen
- Case 1 : Such_Text = "Ähnlechkiit"
- Meldungs_Text = "Ähnlichkeitssuche Tauschen 1x"
- Case 2 : Such_Text = "ÄhnlechkiitÄhnilchkiet"
- Meldungs_Text = "Ähnlichkeitssuche Tauschen 2x"
- Case 3 : Such_Text = "ÄhnlechkiitÄhnilchkiethänilchkiet"
- Meldungs_Text = "Ähnlichkeitssuche Tauschen 3x"
- end select
- select case Zeichen_Hinzufuegen
- Case 1 : Such_Text = "Ähnnlichkeit"
- Meldungs_Text = "Ähnlichkeitssuche Hinzufuegen 1x"
- Case 2 : Such_Text = "ÄhnnlichkeitÄhnnliichkeit"
- Meldungs_Text = "Ähnlichkeitssuche Hinzufuegen 2x"
- Case 3 : Such_Text = "ÄhnnlichkeitÄhnnliichkeitÄhnliichhkeeit"
- Meldungs_Text = "Ähnlichkeitssuche Hinzufuegen 3x"
- end select
- select case Zeichen_Entfernen
- Case 1 : Such_Text = "Ähnlichkei"
- Meldungs_Text = "Ähnlichkeitssuche Entfernen 1x"
- Case 2 : Such_Text = "ÄhnlichkeiÄhnlichke"
- Meldungs_Text = "Ähnlichkeitssuche Entfernen 2x"
- Case 3 : Such_Text = "ÄhnlichkeiÄhnlichkeÄhnlichk"
- Meldungs_Text = "Ähnlichkeitssuche Entfernen 3x"
- end select
- if Zaehler2 = 4 then
- Such_Text = "ÄhnlechkiitÄhnilchkiethänilchkietÄhnnlichkeitÄhnnliichkeitÄhnliichhkeeitÄhnlichkeiÄhnlichkeÄhnlichkÄnhliikheeii"
- Meldungs_Text ="Ähnlichkeitssuche Hinzu+Entfern+Tausch, je3x"
- end if
- call Vergleichen_und_ausgeben
- kontext "DocumentWriter"
- DocumentWriter.Typekeys "<PAGEUP>", 'an den Anfang des Textes gehen
- DocumentWriter.Typekeys "<MOD1 HOME>"
- EditSearchAndReplace
- kontext "FindAndReplace" 'Suchen&Replace-Fenster öffnen
- next Zaehler
- next Zaehler2
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------------------
-
-function wCountNumberOfAttributes() as Integer
- Dim i as integer, AttributeCount as integer
- Attribute.Click
- Kontext "Attribute"
- wait 500
- ' Count how much Attributes are in the list
- For i = 1 to 200
- try
- Auswahl.Select i
- printlog Auswahl.GetSelText
- AttributeCount = AttributeCount + 1
- catch
- wCountNumberOfAttributes = AttributeCount
- i = 202
- endcatch
- next i
- Attribute.Close
-end function
-
-' ----------------------------------------------------------------------------------
-
-function wSelectAttributeName(aNumber as integer, AsianSupport as boolean, SetState as integer) as string
- 'This function checks for the Attribute name depending on the given number (aNumber).
- 'SetState is given to check or uncheck the Attribute in list
- 'Returns the Attribute name if found and successfully checked in list.
- 'Default for this test is given from the german office-Version (easier for me:-))
- Dim i as integer, aSelectIt as String
- Kontext "FindAndReplace"
- Attributes.Click
- Kontext "Attribute"
-
- Select Case aNumber
- Case 1
- Select Case iSprache
- Case 49: aSelectIt = "Absatz trennen"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 2
- Select Case iSprache
- Case 49: aSelectIt = "Absätze zusammenhalten"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 3
- Select Case iSprache
- Case 49: aSelectIt = "Abstand"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 4
- Select Case iSprache
- Case 49: aSelectIt = "Asiatische Schrift"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 5
- Select Case iSprache
- Case 49: aSelectIt = "Ausrichtung"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 6
- Select Case iSprache
- Case 49: aSelectIt = "Auszeichnung"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 7
- Select Case iSprache
- Case 49: aSelectIt = "Betonungszeichen"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 8
- Select Case iSprache
- Case 49: aSelectIt = "Blinkend"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 9
- Select Case iSprache
- Case 49: aSelectIt = "Doppelzeilig"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 10
- Select Case iSprache
- Case 49: aSelectIt = "Durchgestrichen"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 11
- Select Case iSprache
- Case 49: aSelectIt = "Einzug"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 12
- Select Case iSprache
- Case 49: aSelectIt = "Hängende Interpunktion"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 13
- Select Case iSprache
- Case 49: aSelectIt = "Hurenkinder"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 14
- Select Case iSprache
- Case 49: aSelectIt = "Kerning"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 15
- Select Case iSprache
- Case 49: aSelectIt = "Kontur"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 16
- Select Case iSprache
- Case 49: aSelectIt = "Position"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 17
- Select Case iSprache
- Case 49: aSelectIt = "Registerhaltigkeit"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 18
- Select Case iSprache
- Case 49: aSelectIt = "Relief"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 19
- Select Case iSprache
- Case 49: aSelectIt = "Rotation"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 20
- Select Case iSprache
- Case 49: aSelectIt = "Schattiert"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 21
- Select Case iSprache
- Case 49: aSelectIt = "Schrift"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 22
- Select Case iSprache
- Case 49: aSelectIt = "Schriftfarbe"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 23
- Select Case iSprache
- Case 49: aSelectIt = "Schriftgrad"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 24
- Select Case iSprache
- Case 49: aSelectIt = "Schriftgrad asiatische Schrift"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 25
- Select Case iSprache
- Case 49: aSelectIt = "Schriftstärke"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 26
- Select Case iSprache
- Case 49: aSelectIt = "Schriftstärke asiatische Schrift"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 27
- Select Case iSprache
- Case 49: aSelectIt = "Schriftstellung"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 28
- Select Case iSprache
- Case 49: aSelectIt = "Schriftstellung asiatische Schrift"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 29
- Select Case iSprache
- Case 49: aSelectIt = "Schusterjungen"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 30
- Select Case iSprache
- Case 49: aSelectIt = "Seitenvorlage"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 31
- Select Case iSprache
- Case 49: aSelectIt = "Hyphenation"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 32
- Select Case iSprache
- Case 49: aSelectIt = "Skalierung"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 33
- Select Case iSprache
- Case 49: aSelectIt = "Sprache"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 34
- Select Case iSprache
- Case 49: aSelectIt = "Sprache asiatische Schrift"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 35
- Select Case iSprache
- Case 49: aSelectIt = "Tabulatoren"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 36
- Select Case iSprache
- Case 49: aSelectIt = "Text Abstand"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 37
- Select Case iSprache
- Case 49: aSelectIt = "Unterstrichen"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 38
- Select Case iSprache
- Case 49: aSelectIt = "Verbotene Zeichen"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 39
- Select Case iSprache
- Case 49: aSelectIt = "Vertikale Textausrichtung"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 40
- Select Case iSprache
- Case 49: aSelectIt = "Wortweise"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 41
- Select Case iSprache
- Case 49: aSelectIt = "Zeichenhintergrund"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- Case 42
- Select Case iSprache
- Case 49: aSelectIt = "Zeilenabstand"
- Case else: Warnlog "Language not supported. No test"
- exit function
- end select
-
- end select
-
- ' Searches for selected Attribute in Attributes list
- For i = 1 to 42
- try
- Auswahl.Select i
- if Ucase(Auswahl.GetSelText) = Ucase(aSelectIt) then
- Select Case SetState
- Case 1
- Auswahl.UnCheck
- Case 2
- Auswahl.Check
- end select
- wSelectAttributeName = aSelectIt
- i = 50
- end if
- catch
- i = 50
- endcatch
- next i
- 'if Attributes not found
- if i = 42 then
- if AsianSupport = True then Warnlog "Unable to locate Attribute in list!"
- wSelectAttributeName = ""
- end if
- Attribute.Ok
-end function
-
-
-sub wCheckAttribute(aNumber as integer)
- Dim i as integer
- Kontext "FindAndReplace"
- SearchNow.Click
- if wCheckActiveMessageboxes = False then
- Warnlog "Search for Attributes has failed!"
- exit sub
- end if
- Select Case aNumber
- Case 1 ' "Absatz trennen"
- EditCopy
- if Left$(GetClipboardtext,15) <> "First Paragraph" then
- Warnlog "- Wrong paragraph has been found!"
- end if
- Case 2 '"Absätze zusammenhalten"
- EditCopy
- if Left$(GetClipboardtext,25) <> "Keep with next paragraph1" then
- Warnlog "- Wrong paragraph has been found!"
- end if
- Case 3 '"Abstand"
- EditCopy
- if Left$(GetClipBoardText,15) <> "Spacing between" then
- Warnlog "- Wrong paragraph has been found!"
- end if
- Case 4 '"Asiatische Schrift"
- Case 5 '"Ausrichtung"
- EditCopy
- if Left$(GetClipBoardtext,20) <> "Wow, Alignment right" then
- Warnlog "- Wrong paragraph has been found!"
- else
- printlog "- 'Alignment right' found!"
- end if
- For i = 1 to 2
- Kontext "FindAndReplace"
- SearchNow.Click
- if wCheckActiveMessageboxes = False then
- Warnlog "Search for Attributes has failed!"
- exit sub
- end if
- EditCopy
- Select Case i
- Case 1
- if Left$(GetClipBoardtext,23) <> "Wow, Alignment centered" then
- Warnlog "- Wrong paragraph has been found!"
- exit sub
- else
- printlog "- 'Alignment centered' found!"
- end if
- Case 2
- if Left$(GetClipBoardtext,24) <> "Wow, Alignment justified" then
- Warnlog "- Wrong paragraph has been found!"
- exit sub
- else
- printlog "- 'Alignment justified' found!"
- end if
- end select
- next i
- Case 6 '"Auszeichnung"
- EditCopy
- If Ucase(GetClipBoardtext) <> "CAPITALS" then
- Warnlog "Wrong effect has been found"
- exit sub
- end if
- For i = 1 to 3
- Kontext "FindAndReplace"
- SearchNow.Click
- if wCheckActiveMessageboxes = False then
- Warnlog "Search for effects has failed!"
- exit sub
- end if
- EditCopy
- Select Case i
- Case 1
- If Ucase(GetClipBoardtext) <> "LOWERCASE" then
- Warnlog "Wrong effect has been found"
- exit sub
- end if
- Case 2
- If Ucase(GetClipBoardtext) <> "TITLE" then
- Warnlog "Wrong effect has been found"
- exit sub
- end if
- Case 3
- If Ucase(GetClipBoardtext) <> "SMALL CAPITALS" then
- Warnlog "Wrong effect has been found"
- exit sub
- end if
- end select
- next i
- Case 7 '"Betonungszeichen"
- Case 8 '"Blinkend"
- EditCopy
- if Left$(GetClipBoardText,13) <> "Blinking text" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Case 9 '"Doppelzeilig"
- Case 10 '"Durchgestrichen"
- EditCopy
- if Left$(GetClipBoardText,14) <> "Strike through" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- For i = 1 to 4
- Kontext "FindAndReplace"
- SearchNow.Click
- EditCopy
- if Left$(GetClipBoardText,14) <> "Strike through" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- next i
- Case 11 '"Einzug"
- EditCopy
- if Left$(GetClipBoardText,6) <> "Indent" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Case 12 '"Hängende Interpunktion"
- Case 13 '"Hurenkinder"
- EditCopy
- if Left$(GetClipBoardText, 9) <> "Hurenkind" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Kontext "FindAndReplace"
- SearchNow.Click
- EditCopy
- if Left$(GetClipBoardText, 8) <> "tstststs" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Case 14 '"Kerning"
- EditCopy
- if Left$(GetClipBoardText, 8) <> "Kerning1" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Kontext "FindAndReplace"
- SearchNow.Click
- EditCopy
- if Left$(GetClipBoardText, 8) <> "Kerning2" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Case 15 '"Kontur"
- EditCopy
- if Left$(GetClipBoardText, 6) <> "Kontur" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Case 16 '"Position"
- EditCopy
- if Left$(GetClipBoardText, 4) <> "Hoch" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Kontext "FindAndReplace"
- SearchNow.Click
- EditCopy
- if Left$(GetClipBoardText, 4) <> "Tief" then
- Warnlog "- Wrong Attribute has been found!"
- end if
- Case 17 '"Registerhaltigkeit"
-
- Case 18 '"Relief"
- Case 19 '"Rotation"
- Case 20 '"Schattiert"
- Case 21 '"Schrift"
- Case 22 '"Schriftfarbe"
- Case 23 '"Schriftgrad"
- Case 24 '"Schriftgrad asiatische Schrift"
- Case 25 '"Schriftstärke"
- Case 26 '"Schriftstärke asiatische Schrift"
- Case 27 '"Schriftstellung"
- Case 28 '"Schriftstellung asiatische Schrift"
- Case 29 '"Schusterjungen"
- Case 30 '"Seitenvorlage"
- Case 31 '"Hyphenation"
- Case 32 '"Skalierung"
- Case 33 '"Sprache"
- Case 34 '"Sprache asiatische Schrift"
- Case 35 '"Tabulatoren"
- Case 36 '"Text Abstand"
- Case 37 '"Unterstrichen"
- Case 38 '"Verbotene Zeichen"
- Case 39 '"Vertikale Textausrichtung"
- Case 40 '"Wortweise"
- Case 41 '"Zeichenhintergrund"
- Case 42 '"Zeilenabstand"
- end select
- Kontext "FindAndReplace"
-end sub
-
-function wCheckActiveMessageboxes() as boolean
- wCheckActiveMessageboxes=True
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try ' Question if StarOffice should search at start of document
- Active.yes
- ' Exit when search has again failed
- if Active.Exists then
- if Active.GetRT = 304 then
- wCheckActiveMessageboxes = False
- Warnlog Active.Gettext
- Active.Ok
- end if
- end if
- catch
- wCheckActiveMessageboxes = False
- Warnlog Active.Gettext
- Active.Ok
- endcatch
- end if
- end if
-end function
-
-'---------------------------------------------------------
-' Unterprogramme
-'---------------------------------------------------------
-'---------------------------------------------------------
-sub wSetFindAndReplaceToDefault(WhichDocument as integer)
- '/// <font color=#ff0000> TODO: translate this test ///'
- '/// file "input\\writer\\such_u_e.sxw" will be used <FONT> ///
- Dim i as integer
- Select Case WhichDocument
- Case 0
- Call hNewDocument ' empty Document
- Case 1
- hFileOpenLocally( gTesttoolPath +"writer\optional\input\search\such_u_e.sxw")
-
- case 2
- hFileOpenLocally( gTesttoolPath +"writer\optional\input\search\attrib.sxw")
-
- end select
- kontext "FindAndReplace"
- Sleep 2
- if FindAndReplace.Exists then 'Evtl. offenes Fenster schließen
- FindAndReplace.Close
- end if
- kontext "DocumentWriter"
- DocumentWriter.Typekeys "<PAGEUP>", 'an den Anfang des Textes gehen
- DocumentWriter.Typekeys "<MOD1 HOME>"
- EditSearchAndReplace
- kontext "FindAndReplace" 'Suchen&Replace-Fenster öffnen
- if Not SearchForStyles.IsVisible then More.Click
- if SearchForStyles.IsEnabled then SearchForStyles.Uncheck
- try
- SearchFor.SetText ""
- catch
- warnlog "in 'grundzustand' writing a text to search for is not possible :-("
- endcatch
- if SimilaritySearch.IsEnabled then SimilaritySearch.Uncheck
- ' Column 1
- WholeWordsOnly.Uncheck
- Backwards.Uncheck
- RegularExpressions.Uncheck
- ' Column 2
- MatchCase.Uncheck
- if CurrentSelectionOnly.IsEnabled then CurrentSelectionOnly.Uncheck
- 'Column 3
- Attributes.Click
- Kontext "Attribute"
- ' List has 32 Attributes
- For i = 1 to 32
- Auswahl.Select i
- Auswahl.Uncheck
- Next i
- Attribute.OK
- kontext "FindAndReplace"
- if NoFormat.IsEnabled then NoFormat.Click
- Kontext "FindAndReplace"
-end sub
-
-'---------------------------------------------------------
-sub Vergleichen_und_ausgeben
- 'ht Such_Text mit dem,
- dim i as integer
- dim Boxen_RT as integer
-
- kontext
- for i = 1 to 2 'Close all Message-, Info-, and Query-Boxes
- if active.exists (1) then
- Boxen_RT = Active.GetRT
- select case Boxen_RT
- Case 304, 305 : Active.OK
- Case 308 : Active.Yes
- end select
- end if
- next i
- kontext "FindAndReplace"
- Sleep 2
- try
- FindAndReplace.Close
- catch
- Warnlog "Dialog is not present. Should be open!"
- endcatch
-
- wait 500
- Kontext "DocumentWriter"
- try
- BearbeitenKopieren
- catch
- DocumentWriter.Typekeys "<PAGEUP>"
- DocumentWriter.Typekeys "<MOD1 END>"
- DocumentWriter.Typekeys "<SHIFT LEFT>", 15
- EditCopy
- endcatch
- wait 500
- dummy_Text = GetClipboardText
- if dummy_Text = Such_Text then
- Printlog "OK ",Meldungs_Text
- else
- warnlog "'",Such_Text,"' was not found, but '", Dummy_Text, "' " '"With '" + Meldungs_Text+ "'
- end if
- Sleep 2
-end sub
-
-'--------------------------------------------------------- 'abhängig von der Sprache wird die
-sub Meldungs_Test
- 'Meldung "...bis zum Dokumentende
- dim Text_In_Meldung as string, sProduct as string
-
- if gOOO = true then
- sProduct = "OpenOffice.org"
- else
- sProduct = "Oracle Open Office"
- end if
-
- select case iSprache
- Case 01 : Text_In_Meldung = sProduct & " Writer has searched to the end of the document. Do you want to continue at the beginning?"
- Case 07 : Text_In_Meldung = sProduct & " Writer оÑущеÑтвил поиÑк к концу документа. Продолжить поиÑк Ñ Ð½Ð°Ñ‡Ð°Ð»Ð° документа?"
- Case 03 : Text_In_Meldung = "O " & sProduct & " Writer procurou até ao fim do documento. Deseja continuar a procura no início do documento?"
- Case 31 : Text_In_Meldung = sProduct & " Writer heeft tot aan het einde van het document gezocht. Wilt u doorgaan met zoeken vanaf het begin?"
- Case 33 : Text_In_Meldung = sProduct & " Writer a atteint la fin du document. Souhaitez-vous reprendre la recherche au début du document ?"
- Case 34 : Text_In_Meldung = sProduct & " Writer ha buscado hasta el final del documento. ¿Desea continuar la búsqueda desde el principio?"
- Case 39 : Text_In_Meldung = sProduct & " Writer ha cercato fino alla fine del documento. Volete continuare dall'inizio del documento?"
- Case 46 : Text_In_Meldung = sProduct & " Writer har sökt till slutet av dokument. Vill du fortsätta sökningen i början av dokumentet?"
- Case 49 : Text_In_Meldung = sProduct & " Writer hat bis zum Ende des Dokumentes gesucht. Möchten Sie die Suche am Dokumentanfang fortsetzen?"
- Case 50 : Text_In_Meldung = sProduct & " Writer je preiskal do konca dokumenta. Ali želite nadaljevati na zaÄetku?"
- Case 55 : Text_In_Meldung = sProduct & " Writer pesquisou até o final do documento. Deseja continuar do início?"
- Case 81 : Text_In_Meldung = sProduct & " Writer ã¯ã€æ–‡æ›¸æœ«ã¾ã§æ¤œç´¢ã—ã¾ã—ãŸã€‚文書ã®å§‹ã‚ã«æˆ»ã£ã¦ç¶šè¡Œã—ã¾ã™ã‹ã€‚"
- Case 82 : Text_In_Meldung = sProduct & " Writerê°€ ë¬¸ì„œì˜ ë까지 검색했습니다. ë¬¸ì„œì˜ ì‹œìž‘ë¶€ë¶„ì—ì„œ ê²€ìƒ‰ì„ ê³„ì†í•˜ê² ìŠµë‹ˆê¹Œ?"
- Case 88 : Text_In_Meldung = sProduct & " Writer 已經æœå°‹è‡³æ–‡ä»¶çš„çµæŸä½ç½®ã€‚è¦å¾žæ–‡ä»¶çš„起始ä½ç½®ç¹¼çºŒæœå°‹ï¼Ÿ"
- end select
-
- if Dummy_text = Text_In_Meldung then
- printlog "OK Correct Message at end of document"
- else
- if Text_In_Meldung > "" then
- Warnlog " No correct message at end of document"
- printlog Dummy_text
- else
- QAErrorlog "Please adapt test for this language!"
- printlog Dummy_text
- end if
- end if
-end sub
-
-
-function ToggleAttribute(sNumber as integer, sCheck as boolean)
- Kontext "FindAndReplace"
- Attributes.Click
- Kontext "Attribute"
- Auswahl.Select sNumber 'Check Attributes underlined
- wait 500
- if sCheck = "True" then
- Auswahl.Check
- else
- Auswahl.Uncheck
- end if
- wait 500
- Attribute.OK
- Kontext "FindAndReplace"
-end function
-
-
-function wGetHeadingName() as string
- ' This function gets the name 'Heading' from Stylist
- ' Needed this function for additional languages !
- FormatStylist
- Kontext "Stylist"
- if Stylist.NotExists then FormatStylist
- Absatzvorlagen.Click
-
- ' "Heading" should always be the 9th entry
- Gruppenliste.Select 5 ' Automatic
- wait 500
- Vorlagenliste.Select 9 ' Heading
- wGetHeadingName = Vorlagenliste.GetSeltext
- Call SetClipboard (wGetHeadingName)
- printlog "- Name of 'heading' for this language has been pasted to clipboard!"
- Stylist.Close
-end function
-
-'---------------------------------------------------------
-sub LoadIncludeFiles
- use "inc\master.inc"
- use "inc\gvariabl.inc"
- gApplication = "WRITER"
- Call GetUseFiles
-end sub
diff --git a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc b/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc
deleted file mode 100644
index aa5cc4672277..000000000000
--- a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc
+++ /dev/null
@@ -1,515 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Avoid regression (issuezilla tasks)
-'*
-'\***********************************************************************
-
-sub w_issuezilla_regression
-
- Call i64991
- Call i65094
- Call i69045
- Call i69521
- Call i75027
- Call i76637
- Call i88656
- Call i103265
-
-end sub
-
-'--------------------------------------------------------------------------
-
-testcase i64991
- Dim PrevMacroSetting as integer
- Dim sDocName as string, i as integer, j as integer
-
- sDocName = ConvertPath(gtesttoolpath & "writer\optional\input\regression\issuezilla\i64991.odt")
- '/// New writer document
- Call hNewDocument
- '/// Set macro security to 'Medium' to activate Macros
- PrevMacroSetting = hSetMacroSecurity(1)
- '/// Open file \\writer\\optional\\input\\regression\\issuezilla\\i64991.odt
- printlog "- Open file: " & sDocName
- call hFileOpen (sDocName,false)
- Kontext "SecurityWarning"
- if SecurityWarning.Exists(2) then
- SecurityWarning.OK
- else
- Warnlog "Security Warning not up. Test interrupted!"
- Call hCloseDocument
- goto endsub
- end if
-
- printlog "Save document to be able to find macro module later"
- Call hFileSaveAsKill (gOfficepath + "user\work\i64991.odt")
-
- printlog "- execute macro"
- ToolsMacrosRunMacro
- ' Sometimes it lasts long until dialog is shown
- For i = 1 to 15
- Sleep(i)
- Kontext "ScriptSelector"
- if ScriptSelector.Exists then exit for
- next i
- printlog " - select 'i64991' in Library list"
- Kontext "ScriptSelector"
- For i = 1 to LibraryTreeList.GetItemCount
- LibraryTreeList.Select i
- if InStr(LibraryTreeList.GetSelText,"i64991") then
- printlog " - open node 'i64991' in Library list"
- i = LibraryTreeList.GetItemCount + 1
- LibraryTreeList.TypeKeys "+"
- wait 500
- printlog " - select 'Standard' in Library list"
- LibraryTreeList.TypeKeys "<Down>"
- wait 500
- printlog " - open node 'Standard' in Library list"
- LibraryTreeList.TypeKeys "+"
- wait 500
- LibraryTreeList.TypeKeys "<Down>"
- printlog " - select 'check_page_style' in Library list"
- if LibraryTreeList.GetSelText <> "check_page_style" then
- Warnlog "Unable to find macro. Test interrupted!"
- ScriptSelector.Cancel
- Call hCloseDocument
- goto endsub
- end if
- printlog "- Now select script 'Main'"
- for j = 1 to ScriptList.GetItemCount
- ScriptList.Select j
- if ScriptList.GetSelText = "Main" then
- printlog " - execute Script 'Main'"
- ScriptSelector.Ok
- exit for
- end if
- next j
- end if
- next i
- Kontext "ScriptSelector"
- if ScriptSelector.Exists then
- Warnlog "Something failed executing macro. Test interrupted"
- ScriptSelector.Cancel
- else
- '/// check if page layout on first page is landscape
- printlog "Check layout on first page"
- FormatPageWriter
- Kontext
- Active.Setpage TabSeite
- Kontext "TabSeite"
- if Not Quer.IsChecked then Warnlog "Setting a printer make the page styles to be lost"
- TabSeite.Cancel
-
- Call wTypeKeys ("<Down>")
-
- '/// check if page layout on second page is still portrait
- printlog "Check layout on second page"
- FormatPageWriter
- Kontext
- Active.Setpage TabSeite
- Kontext "TabSeite"
- if Not Hoch.IsChecked then Warnlog "Setting a printer make the page styles to be lost"
- TabSeite.Cancel
- end if
-
- '/// Set macro setting to previous value
- Call hSetMacroSecurity(PrevMacroSetting)
-
- '/// Close document
- Call hCloseDocument
-
-endcase
-'--------------------------------------------------------------------------
-
-testcase i65094
-
- '/// New writer document
- Call hNewDocument
- '/// Open file \\writer\\optional\\input\\regression\\issuezilla\\i65094a.odt
- printlog "- Open file: i65094a.odt"
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\regression\issuezilla\i65094a.odt" )
-
- '/// Compare document with other version \\writer\\optional\\input\\regression\\issuezilla\\i65094b.odt
-' UseBindings
- printlog "- Compare document with other version"
- EditCompareDocument
- Kontext "OeffnenDlg"
- '/// Open document ( i65094b.odt )
- Dateiname.SetText ConvertPath( gTesttoolPath + "writer\optional\input\regression\issuezilla\i65094b.odt" )
-' Sleep 2
- Oeffnen.Click
- Sleep 5
-
- printlog "- Accept all"
- '/// In Redlining dialog select 'Accept all'
- Kontext "Redlining"
- if Redlining.exists then
- try
- AlleAkzeptieren.Click
- Sleep 1
- catch
- warnlog "accept button is disabled"
- endcatch
- '/// Close Redlining dialog
- Redlining.Close
- '/// Save document as "..\user\work\i65094compare.odt
- Call hFileSaveAsKill (gOfficepath + "user\work\i65094compare.odt")
- '/// Save document as "..\user\work\i65094compare.odt"
- Wait 500
- printlog "- Compare done and document saved"
- else
- warnlog "Redlining dialog does not exist"
- end if
- Call hCloseDocument
-
-endcase
-'--------------------------------------------------------------------------
-
-testcase i69045
-
- '/// New writer document
- Call hNewDocument
- printlog "- Open new dokument, enable redlining and make some changes"
- '/// Enable redlining
- EditChangesRecord
- '/// Change document
- Call wTypeKeys "Here are some changes"
- '/// Save document as "..\user\work\i65094compare.odt and close it
- Call hFileSaveAsKill (gOfficepath & "user\work\i69045.odt")
- Call hCloseDocument
- printlog "- Save, close and load document"
- '/// Open saved document
- hFileOpen( gOfficepath & "user\work\i69045.odt" )
- '/// Check
- try
- EditChangesAcceptOrReject
- catch
- warnlog "Redlining has not been saved or does not work"
- endcatch
- Kontext "Redlining"
- if Redlining.exists then
- try
- AlleAkzeptieren.Click
- Sleep 1
- printlog "- Edit changes has been saved and accepted"
- catch
- warnlog "AcceptAll is not enabled"
- endcatch
- '/// Close Redlining dialog
- Redlining.Close
- end if
- Call hCloseDocument
-
-endcase
-'--------------------------------------------------------------------------
-
-testcase i69521
-
- Dim iItems as integer
-
- '/// New writer document
- Call hNewDocument
- '/// Load document: \\writer\\optional\\input\\regression\\issuezilla\\i69521.odt
- hFileOpenLocally( gTesttoolpath & "writer\optional\input\regression\issuezilla\i69521.odt")
-
- '/// Loaded document should have 5 EPS Graphics
- iItems = CountItemsInNavigatorGroup(4)
- if iItems <> 5 then
- Warnlog "Initially there are not 5 Grahics in document but: " & iItems
- Call hCloseDocument
- goto endsub
- end if
-
- '/// save document as OfficePath\\user\work\\i96521-1.odt"
- Call hFileSaveAsKill (gOfficePath & "user\work\i96521-1.odt")
- '/// close document
- Call hCloseDocument
- '/// reload previous saved document
- hFileOpen( gOfficePath & "user\work\i96521-1.odt")
- '/// Check if all 5 Graphics are still in document
- iItems = CountItemsInNavigatorGroup(4)
- if iItems <> 5 then
- Warnlog "After save and reload there are not 5 Grahics in document but: " & iItems
- end if
-
- Call hCloseDocument
-
-endcase
-'--------------------------------------------------------------------------
-
-testcase i75027
-
- Dim i as integer
- Dim j as integer
- Dim sClipBrd() as string
- Dim bNumberingError as boolean
-
- gApplication = "HTML"
- '/// New HTML Document
- Call hNewDocument
- '/// type 'This<BR>is<BR>a numbering<BR>test'
- Call wTypeKeys ("This<Return>is<Return>a numbering<Return>test")
- '/// Select all paragraphs
- Call wTypeKeys ("<Mod1 A>")
- '/// Format with simple numbering
- Kontext "TextObjectbar"
- if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
- '/// Select 'Numbering' in object bar ///
- Numerierung.Click
- '/// move "is" to numbering level 2
- '/// move "a numbering" to numbering level 3
- '/// move "test" to numbering level 4
- printlog "- create numbering"
- Call wTypeKeys ("<Mod1 Home>"
- for i = 1 to 3
- Call wTypeKeys ("<Down>")
- Kontext "NumObjectbar"
- if Not NumObjectbar.Exists then Call hToolbarSelect("BULLETSANDNUMBERING", true)
- for j = 1 to 1 + i
- Hinunterstufen.Click
- next j
- next i
- '/// should look like:
- '/// 1. this
- '/// 1. is
- '/// 1. a numbering
- '/// 1. test
- printlog "- check numbering"
- Call wTypeKeys ( "<MOD1 A>" )
- EditCopy
- Select Case gPlatGroup
- Case "unx"
- sClipBrd() = Split (GetClipboardText, CHR$(10))
- Case else
- sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
- end select
- if Ubound(sClipBrd()) = 3 then
- if Left$(sClipBrd(0), 2) <> "1." then bNumberingError = true
- if Left$(sClipBrd(1), 2) <> "1." then bNumberingError = true
- if Left$(sClipBrd(2), 2) <> "1." then bNumberingError = true
- if Left$(sClipBrd(3), 2) <> "1." then bNumberingError = true
- else
- Warnlog "Error in clipboard content! " & Ubound(sClipBrd())
- end if
- if bNumberingError = true then
- Warnlog "Seems numbering I. has not been correctly created"
- end if
- bNumberingError = false
- '/// save as HTML-file i75027.html
- Call hFileSaveAsKill (gOfficepath & "user\work\i75027.html")
- '/// Reload previous saved document
- Call hCloseDocument
- hFileOpen( gOfficepath & "user\work\i75027.html")
- '/// Check that the numbering is still the same.
- printlog "- check numbering (previous saved)"
- Call wTypeKeys ( "<MOD1 A>" )
- EditCopy
- Select Case gPlatGroup
- Case "unx"
- sClipBrd() = Split (GetClipboardText, CHR$(10))
- Case else
- sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
- end select
- if Ubound(sClipBrd()) = 3 then
- if Left$(sClipBrd(0), 2) <> "1." then bNumberingError = true
- if Left$(sClipBrd(1), 2) <> "1." then bNumberingError = true
- if Left$(sClipBrd(2), 2) <> "1." then bNumberingError = true
- if Left$(sClipBrd(3), 2) <> "1." then bNumberingError = true
- else
- Warnlog "Error in clipboard content! " & Ubound(sClipBrd())
- end if
- if bNumberingError = true then
- Warnlog "Seems numbering I. has not been correctly created"
- end if
- '/// Close Document
- Call hCloseDocument
- gApplication = "WRITER"
-
-endcase
-'--------------------------------------------------------------------------
-
-testcase i76637
-
- 'Variables:
- DIM sDocument AS String 'variable for saving the doc
-
- gApplication = "WRITER"
-
- '/// open a swriter
- Call hNewDocument 'NewDocument
- Kontext "DocumentWriter"
- printlog "New writer doc"
-
- '/// [Insert]-[Envelope]
- InsertEnvelope
- printlog "inserting envelope.."
-
- '/// click "New Doc" button in Envelope_Dlg
- Kontext
- active.SetPage TabEnvelope 'setting correct Tabpage
- Kontext "TabEnvelope"
- TabEnvelope.OK 'clicking on NewDoc button, which is OK button with another name
-
- '/// Save document
- sDocument = ConvertPath ( gOfficePath + "user\work\test1.odt")
- 'deleting old Docs in the directory
- if Dir (sDocument) <> "" then kill sDocument 'deleting old docs
- Call hFileSaveAsKill (sDocument)
- printlog "Document saved"
-
- '/// click [File]-[Reload]
- Kontext "DocumentWriter"
- FileReload
- printlog "reloading ..here the crash happened in i76637."
- '///crash occurred here
-
- Call hCloseDocument
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase i88656
- printlog "Test Format - AutoFormat - Apply And Edit Changes."
-
- printlog " Open a new writerdocument."
- Call hNewDocument
- printlog "Write the forrlowing text into the document: This is a test-text to be autoformatted."
- wTypeKeys ("This is a test-text to be autoformatted.")
-
- 'Without text selected.
- printlog "Use the menu: Format - Autoformat - Apply and Edit Changes."
- FormatAutoformatApplyAndEditChanges
-
- kontext "active"
- if active.exists(2) then
- printlog " In the dialog: choose 'Accept."
- active.Ok
- end if
-
- printlog "Press SHIFT + HOME. To select the text we just wrote."
- wTypeKeys ("<SHIFT HOME>")
-
- 'with text selected
- printlog "Again, but with the text selected; use the menu: Format - Autoformat - Apply and Edit Changes."
- FormatAutoformatApplyAndEditChanges
-
- kontext "active"
- if active.exists(3) then
- printlog " In the dialog: choose 'no'."
- active.Cancel
- end if
-
- kontext "active"
- if active.exists(3) then
- printlog " In the dialog: choose 'no'."
- active.No
- end if
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------
-
-testcase i103265
-
- Dim i as integer
-
- printlog "ODF Hyperlinks in TOCs"
- Call hNewDocument
- printlog "- Open test document"
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\regression\issuezilla\i103265.odt" )
-
- printlog "- Update TOC"
- ToolsUpdateAllIndexes
-
- printlog "Check that every hyperlink jumps correctly to its target"
- For i = 1 to 3
- ' point cursor to beginning of document
- Call wTypeKeys "<MOD1 HOME>"
- ' point cursor to index entry
- Call wTypeKeys "<DOWN>", 4 + i
- 'execute Hyperlink
- ContextOpenHyperlink
- ' check if it jumps to correct target
- Call wTypeKeys "<SHIFT END>"
- EditCopy
- Select Case i
- Case 1:
- if GetClipboardText <> "# 1 Test" then
- Warnlog "First hyperlink not correctly jumped to. Not '# 1 Test' but " & GetClipboardtext
- end if
- Case 2:
- if GetClipboardText <> "1. Test" then
- Warnlog "Second hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext
- end if
- Case 3:
- if GetClipboardText <> "1 Test " then
- Warnlog "Third hyperlink not correctly jumped to. Not '1 Test' but " & GetClipboardtext
- end if
- end select
- next i
-
- printlog "- Save as HTML"
- gApplication = "HTML"
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\ODFHyperlinksInTOCs.html", "HTML (StarWriter)" )
- Call hCloseDocument
-
- printlog "- Reload"
- hFileOpen( gOfficePath & "user\work\ODFHyperlinksInTOCs.html" )
- printlog "Check that every hyperlink jumps correctly to its target"
- For i = 1 to 3
- ' point cursor to beginning of document
- Call wTypeKeys "<MOD1 HOME>"
- ' point cursor to index entry
- Call wTypeKeys "<DOWN>", 5 + i
- 'execute Hyperlink
- ContextOpenHyperlink
- ' check if it jumps to correct target
- Call wTypeKeys "<SHIFT END>"
- EditCopy
- Select Case i
- Case 1:
- if GetClipboardText <> "# 1 Test" then
- Warnlog "First hyperlink not correctly jumped to. Not '# 1 Test' but " & GetClipboardtext
- end if
- Case 2:
- if GetClipboardText <> "1. Test" then
- Warnlog "First hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext
- end if
- Case 3:
- if GetClipboardText <> "1Test " then
- Warnlog "First hyperlink not correctly jumped to. Not 'Test ' but " & GetClipboardtext
- end if
- end select
- next i
-
- Call hCloseDocument
-
-endcase \ No newline at end of file
diff --git a/testautomation/writer/optional/includes/section/w_section_1.inc b/testautomation/writer/optional/includes/section/w_section_1.inc
deleted file mode 100644
index da7417779401..000000000000
--- a/testautomation/writer/optional/includes/section/w_section_1.inc
+++ /dev/null
@@ -1,620 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Section test(Insert/Section Format/Section)
-'*
-'************************************************************************
-'*
-' #1 tInsertSection_1 'test for insert a section
-' #1 tInsertSection_2 'test for the default section name and automatic numbering
-' #1 tInsertSection_3 'Need to check section name
-' #1 tInsertSection_4 'check if the layout in section is not destroyed
-' #1 tInsertSection_5 'Linked Section test
-' #1 tInsertSection_6 'Insert Section should be disabled in the follow opeation
-'*
-'\***********************************************************************
-
-sub w_section_1
- printLog Chr(13) + "--------- Insert Section ----------"
- Call tInsertSection_1
- Call tInsertSection_2
- Call tInsertSection_3
- Call tInsertSection_4
- Call tInsertSection_5
- Call tInsertSection_6
-end sub
-
-'-------------------------------------------------------------------------
-
-testcase tInsertSection_1
-
- Call hNewDocument
- Call fInsertSection("Section Test")
- sleep(1)
- Call wTypeKeys "<RETURN>"
- '/// Test for insert a section with western words ///
- Call fInsertSection("Western Test")
- sleep(1)
- Call wTypeKeys "<UP>" , 1
- Call wTypeKeys "Section : western test"
-
- 'If Asian office...
- if bAsianLan = TRUE then
- Call wTypeKeys "<DOWN>" , 1
- Call wTypeKeys "<RETURN>"
- '///+... test for insert a section with asian character -- Simplified Chinese ///
- Call fInsertSection("Asian Test")
- sleep(1)
- Call wTypeKeys "<UP>" , 1
- Call wTypeKeys "简体中文"
- end if
-
- Call wTypeKeys "<DOWN>" , 1
- Call wTypeKeys "<RETURN>"
-
- '/// Test for insert a section with a graphic object
- Call fInsertSection("Graphic Test")
- Call wTypeKeys "<UP>" , 1
- Call hGrafikEinfuegen(gTesttoolPath + "writer\optional\input\graphics\jolink.jpg")
- sleep(1)
- gMouseClick(6,1)
- Call wTypeKeys "<DOWN>" , 10
- Call wTypeKeys "<RETURN>"
- '/// Test for insert a section with a draw object ///
- Call fInsertSection("Draw Test")
- sleep(1)
- Call wTypeKeys "<UP>" , 1
- InsertObjectOLEObject
- sleep(1)
- Kontext "OLEObjektEinfuegen"
- AusDateiErstellen.Check
- oleDatei.Settext ConvertPath(gTesttoolpath + "writer\optional\input\section\section_test.sxd")
- OLEObjektEinfuegen.OK
- sleep(4)
- 'Close document
- Call hCloseDocument
- sleep(1)
-
- Call hNewDocument
-
- '/// Test for insert a section with combination of different objects///
- Call fInsertSection("combination of different objects test")
- sleep(1)
-
- '/// -- western words ///
- Call wTypeKeys "<UP>" , 1
- Call wTypeKeys "Section : western test<return>"
- '/// -- Graphic ///
- Call hGrafikEinfuegen(gTesttoolPath & "writer\optional\input\graphics\jolink.jpg")
- sleep(1)
- gMouseClick(1,1)
- Call wTypeKeys "<DOWN>" , 1
- Call wTypeKeys "<RETURN>"
- '/// -- drawing object ///
- InsertObjectOLEObject
- sleep(1)
- Kontext "OLEObjektEinfuegen"
- AusDateiErstellen.Check
- oleDatei.Settext ConvertPath(gTesttoolpath & "writer\optional\input\section\section_test.sxd")
- OLEObjektEinfuegen.OK
- sleep(3)
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tInsertSection_2
-
- Dim SectionName as String
- Dim j
-
- '/// Test for the default section name and automatic numbering
- '///+<b>Only Big 10 languages!</b>
- '///+ Automatic numbering test is from 1-3.
-
- Call hNewDocument
- for j=1 to 3
- SectionName = gDefaultSectionName + j
- InsertSection
- sleep(2)
- Kontext "TabBereiche"
- TabBereiche.OK
- sleep(2)
- Call wTypeKeys "<UP>"
- 'Check the section name is correct or NOT (Format/Section)
- FormatSections
- sleep(1)
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> SectionName then
- QAErrorLog "The default Section Name may be changed or wrong wrong : " & BereichsName.Gettext
- end if
- BereicheBearbeiten.Cancel
- sleep(1)
- Call wTypeKeys "<DOWN>"
- next j
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tInsertSection_3
-
- Dim SectionName() as Variant
- Dim i,j as Integer
-
- '*************************************************************
- '/// Need to check section name, include : ///
- '/// SectionTest --- normal name ///
- '/// Section Test --- devided by space ///
- '/// Section-Test --- devided by dash ///
- '/// Section*Test --- devided by asterisk ///
- '/// sèction --- include German umlaut character ///
- '/// säction --- include French character ///
- ' ///
- '/// *** maybe need add more testcases here *** ///
- '*************************************************************
-
- SectionName = Array( _
- "SectionTest" , _
- "Section Test" , _
- "Section-Test" , _
- "Section*Test" , _
- "sèction" , _
- "säction" , _
- )
-
- j = UBound(SectionName)
-
- Call hNewDocument
-
- For i = 0 to j
- try
- fInsertSection(SectionName(i))
- Call wTypeKeys "<Up>" , 1
-
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> SectionName(i) then warnlog " The Section Name is wrong, it should be :" +SectionName(i) +", but: "+BereichsName.GetText
- BereicheBearbeiten.Cancel
-
- Call wTypeKeys "<Down>" , 1
- catch
- Warnlog " Insert Section is failed , the section name should be " +SectionName(i)
- endcatch
- next i
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tInsertSection_4
-
- Dim Message1 as String
- Dim j
-
- '/// Check if the layout in section is not destroyed.
-
- '/// 1. Test for a section includes more than 1 line of text.
- printlog " Section includes more than 1 line of text"
- Call hNewDocument
- sleep(2)
- Call wTypeKeys "This is first line<return>"
- Call wTypeKeys "This is Second line"
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- Message1 = GetClipboardText
- InsertSection
- sleep(2)
- Kontext "TabBereiche"
- TabBereiche.OK
- sleep(1)
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- if Message1 <> GetClipboardText then Warnlog " Layout is destroyed"
- Call hCloseDocument
-
- '/// 2. test for a section includes more than 1 graphic///
- printlog " Section includes more than 1 graphic"
- Call hNewDocument
- sleep(2)
- Call hGrafikEinfuegen ( gTesttoolPath & "writer\optional\input\graphics\jolink.jpg" )
- sleep(2)
- FormatGraphics
- sleep(2)
- Kontext
- Active.SetPage TabZusaetze
- Kontext "TabZusaetze"
- ObjektName.SetText "jolink"
- sleep(2)
- TabZusaetze.OK
- sleep(1)
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<RETURN>" , 2
- sleep(1)
- Call hGrafikEinfuegen ( gTesttoolPath + "writer\optional\input\graphics\bild.jpg" )
- sleep(2)
- FormatGraphics
- sleep(2)
- Kontext
- Active.SetPage TabZusaetze
- Kontext "TabZusaetze"
- ObjektName.SetText "bild"
- TabZusaetze.OK
- sleep(1)
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<RETURN>" , 4
- sleep(1)
- EditSelectAll
- sleep(2)
- InsertSection
- sleep(2)
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- TabBereiche.OK
- 'Check if correct graphic have been selected
- for j=1 to 2
- Call wNavigatorAuswahl(4,j)
- FormatGraphics
- sleep(2)
- Kontext
- Active.SetPage TabZusaetze
- Kontext "TabZusaetze"
- sleep(1)
- Message1 = ObjektName.GetText
- select case j
- case 1 : if Message1 <> "jolink" then Warnlog "Wrong Graphicname: Not -> 'jolink' But -> "+ Message1
- case 2 : if Message1 <> "bild" then Warnlog "Wrong Graphicname: Not -> 'bild' But -> "+ Message1
- end select
- TabZusaetze.Cancel
- sleep(1)
- next j
- Call fCloseNavigator
- sleep(1)
- Call hCloseDocument
-
- '/// 3. test for a section across page breaks ///
- printlog " Section across page breaks"
- Call hNewDocument
-
- ' Call dialog with Insert/ManualBreak and in dialog check 'page break'
- Call wTypeKeys "Page Break"
- Call wTypeKeys "<LEFT>" , 5
- Kontext
- InsertManualBreak
- sleep(1)
- Kontext "UmbruchEinfuegen"
- Seitenumbruch.Check
- UmbruchEinfuegen.OK
- sleep(1)
- EditSelectAll
- sleep(1)
- InsertSection
- sleep(2)
- Kontext "TabBereiche"
- TabBereiche.OK
- sleep(1)
- Kontext
- ViewNavigator
- sleep(1)
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- sleep(2)
- 'set page number to 2
- if Seitennummer.GetText <> "2" then
- warnlog "Something wrong in a section across page breaks, perhaps due to bug #101873."
- end if
- Call fCloseNavigator
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tInsertSection_5
-
- Dim Message1
- Dim Message2
- Dim Message3
-
- if Dir (gOfficePath + "user\work\link_of_section_test.oot") <> "" then
- kill (gOfficePath + "user\work\link_of_section_test.oot")
- end if
-
- '/// Linked Section test ///
-
- Call hNewDocument
-
- '/// 1. Check option 'Link' in dialogue Insert-Section ///
- printlog " - Check option 'Link' in dialogue Insert-Section"
- InsertSection
- sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- sleep 1
-
- Geschuetzt.UnCheck
- Verknuepfung.Check
- if Geschuetzt.IsChecked <>TRUE then warnlog "The checkbox 'protect' is NOT checked"
-
- '/// 2. Check Link from other sections ///
- printlog " - Check Link from other sections "
-
- '/// - Check if the link document contains no sections"
- printlog " - Check if the link document contains no sections"
-
- DateiVerknuepfung.Settext ConvertPath(gTesttoolpath + "writer\optional\input\section\bt.sxw")
-
- if Bereich.GetItemCount <> 0 then warnlog "Should NO entry in the section listbox"
- TabBereiche.Cancel
-
- Call wTypeKeys "Hello World!"
- EditSelectAll
-
- FormatCharacter
- sleep 2
- Kontext
-
- ' On Tabpage 'Font' adjust settings
- active.SetPage TabFont
- kontext "TabFont"
- try
- FontWest.Select 1
- Message2 = FontWest.GetSelText
- Message1 = StyleWest.GetItemCount
- StyleWest.Select Message1
- Message3 = StyleWest.GetSelText
- SizeWest.Select 24
- catch
- Font.Select 1
- Message2 = Font.GetSelText
- Message1 = Style.GetItemCount
- Style.Select Message1
- Message3 = Style.GetSelText
- Size.Select 24
- endcatch
- wait 100
-
- TabFont.OK
-
- Call fInsertSection("Section-Test-link")
-
- ' Save document
- if gApplication = "WRITER" then
- Call hFileSaveAsKill (gOfficePath + "user\work\link_of_section_test.odt")
- end if
-
- Call hCloseDocument
-
- Call hNewDocument
-
- InsertSection
- sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Verknuepfung.Check
-
- Auswaehlen.Click
- Kontext "OeffnenDlg"
- Dateiname.Settext ConvertPath(gOfficePath + "user\work\link_of_section_test.odt")
- Auswaehlen.Click
- sleep 4
-
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Geschuetzt.UnCheck
-
- try
- Bereich.Select 1
- catch
- Warnlog "Something wrong in Section name . Bug i35168"
- endcatch
-
- if Bereich.GetSelText <> "Section-Test-link" then warnlog "the section name is wrong" + Bereich.GetSelText
-
- Bereichsliste.Settext "SectionLink"
-
- TabBereiche.OK
- sleep 2
-
- Call wTypeKeys "<up>" , 2
-
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> "SectionLink" then warnlog "The Section Name is wrong : " + BereichsName.Gettext
- BereicheBearbeiten.Cancel
-
- FormatCharacter
- sleep 2
- Kontext
- 'On Tabpage 'Font' adjust settings
- active.SetPage TabFont
- kontext "TabFont"
- try
- if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Message2 +" is "+ FontWest.GetSelText
- if StyleWest.GetSelIndex <> Message1 then Warnlog "FontStyle should " +Message3+" is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
- catch
- if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Message2 +" is "+ Font.GetSelText
- if Style.GetSelIndex <> Message1 then Warnlog "FontStyle should " +Message3+" is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
- endcatch
- wait 100
- TabFont.Cancel
- Call hCloseDocument
-
- '/// 3. Check simple link from file ///
- printlog " - Check simple link from file"
-
- '/// test for entering path/name directly ///
- Call hNewDocument
-
- InsertSection
- sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Verknuepfung.Check
-
- DateiVerknuepfung.Settext ConvertPath(gTesttoolpath + "writer\optional\input\section\bt.sxw")
- TabBereiche.OK
- sleep 4
-
- Call hCloseDocument
-
- '/// 4. test via browse - button ///
- Call hNewDocument
-
- InsertSection
- sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- sleep 1
- Verknuepfung.Check
-
- Auswaehlen.Click
- Kontext "OeffnenDlg"
- Dateiname.Settext ConvertPath(gTesttoolpath + "writer\optional\input\section\bt.sxw")
- Auswaehlen.Click
- sleep 4
-
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- TabBereiche.OK
- sleep 4
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tInsertSection_6
-
- '/// Insert Section should be disabled in the follow opeations///
- printlog " - Insert Section should be disabled in the follow opeations"
-
- Call hNewDocument
-
- '/// 1. Multiselection ///
- printlog " - Multiselection "
-
- Call wTypeKeys "Multiselection test , Multiselection test !"
- Call fMultiSelection("Multiselection")
-
- try
- InsertSection
- sleep 2
- Warnlog "Menu Insert / Section should be disabled !"
- catch
- endcatch
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// 2. cell selection in table ///
- printlog " - Check cell selection in table "
- InsertTableWriter
-
- Kontext "TabelleEinfuegenWriter"
- TabelleEinfuegenWriter.OK
- sleep 1
-
- Call wTypeKeys "<Shift Right>"
-
- try
- InsertSection
- sleep 2
- Warnlog "Menu Insert / Section should be disabled !"
- catch
- endcatch
-
- Call hCloseDocument
-
- '/// 3. insert a frame ///
- printlog " - Check after insert a frame "
- Call hNewDocument
- InsertFrame
- Kontext
- active.SetPage TabType
- Kontext "TabType"
- TabType.OK
-
- try
- InsertSection
- sleep 2
- Warnlog "Menu Insert / Section should be disabled !"
- catch
- endcatch
-
- Call hCloseDocument
-
- '/// 4. insert a graphic ///
- printlog " - Check after insert a graphic "
- Call hNewDocument
- Call hGrafikEinfuegen ( gTesttoolPath + "writer\optional\input\graphics\jolink.jpg" )
-
- try
- InsertSection
- sleep 2
- Warnlog "Menu Insert / Section should be disabled !"
- catch
- endcatch
-
- Call hCloseDocument
-
- '/// 5. insert a OLE object ///
- printlog " - Check after insert a OLE-object (drawing) "
- Call hNewDocument
- InsertObjectOLEObject
- Kontext "OLEObjektEinfuegen"
- AusDateiErstellen.Check
- oleDatei.Settext ConvertPath(gTesttoolpath + "writer\optional\input\section\section_test.sxd")
- OLEObjektEinfuegen.OK
- sleep 3
- try
- InsertSection
- sleep 2
- Warnlog "Menu Insert / Section should be disabled !"
- catch
- endcatch
-
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/section/w_section_2.inc b/testautomation/writer/optional/includes/section/w_section_2.inc
deleted file mode 100644
index 92aa69bff1d5..000000000000
--- a/testautomation/writer/optional/includes/section/w_section_2.inc
+++ /dev/null
@@ -1,1055 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Hide section / Protect section / Display of dialogues
-'*
-'************************************************************************
-'*
-' #1 tHideSection_1
-' #1 tHideSection_2
-' #1 tHideSection_3
-' #1 tProtectSection_1
-' #1 tDisplaySection_1
-' #1 tDisplaySection_2
-' #1 tDisplaySection_3
-' #1 tDisplaySection_4
-' #1 tDisplaySection_5
-' #1 tDisplaySection_6
-' #1 tDisplaySection_7
-' #1 tDisplaySection_8
-' #1 tDisplaySection_9
-'*
-'\***********************************************************************
-
-sub w_section_2
-
- printLog Chr(13) + "--------- Hide Section ----------"
- Call tHideSection_1 'Hide Section without condition
- Call tHideSection_2 'Hide Section with condition
- Call tHideSection_3 'Headings and index entries in hidden section should disappear from an index (after actualizing the index)
-
- printLog Chr(13) + "--------- Protect Section ----------"
- Call tProtectSection_1 'Protect Section
-
- printLog Chr(13) + "--------- Display of dialogues (Insert - Section) ----------"
- Call tDisplaySection_1 'Check display of dialogues -- Insert Section
-
- printLog Chr(13) + "--------- Display of dialogues (Format - Section) ----------"
- Call tDisplaySection_2 'Check display of dialogues -- Format Section -1
- Call tDisplaySection_3 'Check display of dialogues -- Format Section -2
- Call tDisplaySection_4 'hiding a section hierarchy hides all subsections
-
- printLog Chr(13) + "--------- Display of dialogues (Navigator) ----------"
- Call tDisplaySection_5 'Sections are displayed in row of their insertion in Navigator
- Call tDisplaySection_6 'Jump to a section by double-clicking it in navigator
- Call tDisplaySection_7 'Activate Navigator, insert a section , it must be displayed
- Call tDisplaySection_8 'Select a section in the Navigator, call context menu, choose "Edit"
- Call tDisplaySection_9 'Check to insert a paragraph before and after a section
-
-end sub
-
-'***********************************************************************
-
-testcase tHideSection_1
- '/// <b>Hide Section without condition </b>
- printlog "Hide Section without condition "
-
- '/// 1. Test from insert/section
- '/// Open a new document.
- Call hNewDocument
-
- '/// Press Return and then input some test words
- Call wTypeKeys "<Return>"
- Call wTypeKeys "Section: hidden without condition"
-
- '/// Select the test words with SHIFT and HOME keys.
- Call wTypeKeys "<Shift Home>"
-
- '/// Insert/Section / Section, check 'Hide' in Hide area
- InsertSection
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Ausblenden.check
- TabBereiche.OK
- sleep(2)
-
- '/// Edit / SelectAll
- EditSelectAll
-
- '/// Edit / Copy
- 'Edit / Copy should NOT be available because the words in the section are hidden.
- try
- EditCopy
- warnlog "Hide Section without condition doesn't work in insert/section!"
- catch
- endcatch
-
- Call hCloseDocument
-
- '/// 2.Test from format/section
- Call hNewDocument
-
- '/// Press Return and then input some test words
- Call wTypeKeys "<Return>"
- Call wTypeKeys "Section: hidden without condition"
-
- '/// Select the test words with SHIFT and HOME keys.
- Call wTypeKeys "<Shift Home>"
-
- '/// Insert a section
- Call fInsertSection("HideSection")
-
- '/// Format/Section and check 'Hide' in Hide area
- FormatSections
- Kontext "BereicheBearbeiten"
- Ausblenden.check
- BereicheBearbeiten.OK
-
- '/// Edit / SelectAll
- EditSelectAll
-
- '/// Edit / Copy
- 'Edit / Copy should NOT be available , because the words in the section are hided
- try
- EditCopy
- warnlog "Hide Section without condition doesn't work in format/section!"
- catch
- endcatch
- '///Close the document.
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tHideSection_2
- Dim rightCondition as String
- Dim wrongCondition as String
- '/// <b> Hide Section with condition </b>
- printlog "Hide Section with condition "
- '/// Open a new document.
- Call hNewDocument
- '/// Press RETURN and then input some test words.
- Call wTypeKeys "<Return>"
- Call wTypeKeys "Section: hidden with condition<return>"
-
- '/// Select test words with UP- then HOME-key. Press SHIFT- and END-keys together.
- Call wTypeKeys "<Up><Home><Shift End>"
-
- '/// Insert a section.
- Call fInsertSection("HideSection")
-
- '/// Place the cursor out of the section with DOWN key.
- Call wTypeKeys "<Down>"
-
- '/// Insert a user field
- '/// Insert/Fields/Others , Tabpage Variables ,
- '/// + select 'User field' in 'Type' area ,
- '/// + then select 'Text' in 'Format' area ,
- '/// + input 'myTest' in Name and 'a' in Value ,
- '/// + click insert button , and close the dialog
- InsertFieldsOther
- Kontext
- Active.SetPage TabVariablen
- Kontext "TabVariablen"
- Feldtyp.Select Feldtyp.GetItemCount 'User Field
- Zahlenformat.Select(1) 'Text
- NameText.SetText "myTest"
- Formel.SetText "a"
- Einfuegen.Click '--insert button
- sleep(1)
- TabVariablen.Close
-
- '/// Format/Section, click Hide and enter condition
- FormatSections
- Kontext "BereicheBearbeiten"
- Ausblenden.check
- '/// -- enter wrong condition should NOT hide section
- '/// => wrong Condition is (myTest eq "B")
- wrongCondition = "myTest eq " + String(1,34) + "B" + String(1,34)
- Bedingung.SetText wrongCondition
- BereicheBearbeiten.OK
- sleep(2)
-
- 'Tools/Update/Fields to ensure to hide the section if the section can be hided
- ToolsUpdateFields
- sleep(2)
-
- '/// Use UP-, then HOME-keys, then SHIFT- and END-keys together to
- '///+ check if the test words in section is hidden.
- Call wTypeKeys "<Up><Home><Shift End>"
- try
- EditCopy
- catch
- warnlog "Hide Section with wrong condition should NOT hide the section!"
- Goto endsub
- endcatch
-
- if GetClipboardText = "Section: hidden with condition" then
- '/// Press DOWN key.
- Call wTypeKeys "<Down>"
- Kontext
- '/// Format / Sections
- FormatSections
- Kontext "BereicheBearbeiten"
- '/// Check 'Hide'-checkbox.
- Ausblenden.check
- '/// -- enter right condition should hide section
- '/// => rightCondition is (myTest eq "A")
- rightCondition = "myTest eq " + String(1,34) + "a" + String(1,34)
- Bedingung.SetText rightCondition
- '/// Close the dialogue with OK.
- BereicheBearbeiten.OK
- sleep(2)
- '/// Tools / Update / Fields
- ToolsUpdateFields
- sleep(1)
-
- '/// Check if the test words in section are hidden.
- Call wTypeKeys "<Up><Home><Shift End>"
- try
- EditCopy
- if GetClipboardText = "Section: hidden with condition" then
- warnlog "Hide Section with wrong condition should NOT hide the section!"
- else
- warnlog "Something wrong, need to check! -- II"
- end if
- catch
- endcatch
- else
- warnlog "Something wrong, need to check! -- I"
- end if
- '///Close the document.
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tHideSection_3
-
- '/// Headings and index entries in hidden section should disappear from an index (after actualizing the index)
- printlog " -- Headings and index entries in hidden section should disappear from an index (after actualizing the index)"
-
- Call hNewDocument
-
- '/// Insert some test words
- Call wTypeKeys "Test for Heading and Index in section<Return>"
- Call wTypeKeys "<Up>"
- Call wTypeKeys "<Home><Shift End>"
-
- '/// Insert a section
- fInsertSection("HeadAndIndexInSection")
-
- '/// select part in the section.
- Call wTypeKeys "<Home><Shift Mod1 Right>"
-
- '/// Select Insert/Indexes and Tables/Entrys and add this part to an index
- InsertIndexesEntry
- Sleep 4
- Kontext "VerzeichniseintragEinfuegen"
-
- '/// generate testing index - myTest
- EintragNeu.Click
- Kontext
- Kontext "BenutzerverzeichnisDefinieren"
- NameBenutzerverzeichnis.Settext "myTest"
- BenutzerverzeichnisDefinieren.Ok
-
- Kontext
- Kontext "VerzeichniseintragEinfuegen"
- EintragOk.Click
- Sleep 1
- VerzeichniseintragEinfuegen.close
-
- '/// Move the cursor out of the section
- Call wTypeKeys "<down>"
-
- '/// Insert/Indexes and Tables/Indexes and Tables ...
- InsertIndexes
- Sleep 2
- Kontext
- Active.SetPage TabVerzeichnisseVerzeichnis
- Kontext "TabVerzeichnisseVerzeichnis"
- Verzeichnistyp.Select "myTest"
- '/// protected against manual changes UNcheck
- VerzeichnisGeschuetzt.UnCheck
- TabVerzeichnisseVerzeichnis.OK
-
- '/// Edit section with Format/Section and choose 'Hide'
- Call wTypeKeys "<Up>"
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Ausblenden.check
- BereicheBearbeiten.OK
-
- ToolsUpdateAllIndexes
-
- EditSelectAll
- EditCopy
-
- if InStr( GetClipboardText , "Test" ) <> 0 then warnlog "Headings and index entries in hidden section don't disappear from an index:" + GetClipboardText
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tProtectSection_1
-
- printlog " - Protect Section"
- '/// Protect Section ///
-
- Call hNewDocument
-
- '/// Open options and check 'Direct-Cursor' in options ///
- fCheckDirectCursor
-
- Call wTypeKeys "Should be edited<return>"
- Call wTypeKeys "Section: protected"
- Call wTypeKeys "<Shift Home>"
-
- '/// Insert a protected section in the bottom ///
-
- InsertSection
- Sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext "protect section"
- Geschuetzt.Check
- TabBereiche.OK
- sleep 1
-
- EditCopy
-
- '/// 1) Warning should appear when trying to write in protected area! ///
- if GetClipBoardtext = "Section: protected" then
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Space>"
- Kontext "Active"
- If Active.Exists then
- Active.ok
- else
- warnlog "- No warning when trying to write in protected area!"
- end if
- else
- warnlog "Testtool couldn't find the protected area!"
- end if
-
- Call wTypeKeys "<Up>"
- Call wTypeKeys "<Home><Shift End>"
-
- EditCopy
-
- '/// 2) Warning should NOT appear when trying to write in un-protected area
- '/// + even the protected section at the end of document
- if GetClipBoardtext = "Should be edited" then
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "Can you see what I am doing?"
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
- If GetClipBoardtext <> "Can you see what I am doing?Should be edited" then warnlog "Should edit in the no-protected area"
-
- else
- warnlog "Testtool couldn't find the edited area!"
- end if
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_1
-
- '/// Check display of dialogues -- Insert Section
- printlog " - Check display of dialogues -- Insert Section"
-
- Dim SectionName() as String
- Dim correctSequence() as String
- Dim selectName as String
- Dim i as Integer
- Dim j as Integer
-
- SectionName = Array( _
- "a1","b2","c3","d4","e5","f6","g7", _
- "h1","i2","j3","k4","l5","m6","n7", _
- "H1","I2","J3","K4","L5","M6","N7", _
- "A1","B2","C3","D4","E5","F6","G7", _
- )
-
- Select case iSystemSprache
- case 81,82,86,88 : correctSequence = Array( _
- "a1","A1","b2","B2","c3","C3","d4","D4", _
- "e5","E5","f6","F6","g7","G7", _
- "h1","H1","i2","I2","j3","J3","k4","K4", _
- "l5","L5","m6","M6","n7","N7", _
- )
- case else : correctSequence = Array( _
- "a1","A1","b2","B2","c3","C3","d4","D4", _
- "e5","E5","f6","F6","g7","G7", _
- "h1","H1","i2","I2","j3","J3","k4","K4", _
- "l5","L5","m6","M6","n7","N7", _
- )
- end select
-
-' correctSequence = Array( _
-' "A1","a1","B2","b2","C3","c3","D4","d4", _
-' "E5","e5","F6","f6","G7","g7", _
-' "H1","h1","I2","i2","J3","j3","K4","k4", _
-' "L5","l5","M6","m6","N7","n7", _
-' )
-
- j = UBound(SectionName)
-
- Call hNewDocument
-
- '/// insert a lot of sections
- For i = 0 to j
- fInsertSection(SectionName(i))
- next i
-
- InsertSection
- Sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
-
- '/// Check if Section name display alphabetically
- For i = 1 to j+1
- Bereichsliste.Select i
- selectName = Bereichsliste.GetSelText
- if selectName <> correctSequence(i-1) then warnlog "Section name displays alphabetically wrong! Getting section name:"+ selectName +" The section name should be: "+ correctSequence(i-1)
- next i
-
- '/// check if vertical scrollbar display
- if (Bereichsliste.HasScrollbar (AlignRight)) = FALSE then warnlog "Vertical scrollbar should be displayed !"
-
- TabBereiche.Cancel
- sleep 1
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// Insert a section with a long name
- fInsertSection("a loooooooooooooooooooooooooooooooooooooooooooooooong name section")
-
- InsertSection
- Sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
-
- '/// check if horizontal scrollbar display
- if (Bereichsliste.HasScrollbar (AlignBottom)) = FALSE then warnlog "horizontal scrollbar should be displayed"
-
- TabBereiche.Cancel
- sleep 1
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_2
-
- Dim SectionName() as String
- Dim i , j as Integer
-
- if Dir (gOfficePath + "user\work\testlink1.odt") <> "" then kill (gOfficePath + "user\work\testlink1.odt")
- if Dir (gOfficePath + "user\work\testlink2.odt") <> "" then kill (gOfficePath + "user\work\testlink2.odt")
-
- '/// Check display of dialogues -- Format Section -1
- printlog " - Check display of dialogues -- Format Section"
- '/// -- Section names are displayed in row of their insertion
- SectionName = Array("a2","A1","a4","A5")
- j = UBound(SectionName)
-
- Call hNewDocument
-
- For i = 0 to j
- fInsertSection(SectionName(i))
- next i
-
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>",4
-
- For i = 0 to j
- if BereichsName.GetText <> SectionName(i) then warnlog "Section names are NOT displayed in row of their insertion"
- Bereich.TypeKeys "<Down>"
- next i
-
- BereicheBearbeiten.Cancel
- sleep 2
-
- Call hCloseDocument
-
- '/// -- An exception is the hierarchical order; this is diplayed by an indentation
- SectionName = Array("A2","testlink1","A1","testlink2")
- j = UBound(SectionName)
-
- Call hNewDocument
- fInsertSection("testlink1")
- Call hFileSaveAsKill (gOfficePath + "user\work\testlink1.odt")
- Call hCloseDocument
-
- Call hNewDocument
- fInsertSection("testlink2")
- Call hFileSaveAsKill (gOfficePath + "user\work\testlink2.odt")
- Call hCloseDocument
-
- '/// insert fisrt section linked a test file which include a section
- Call hNewDocument
- InsertSection
- Sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext "A2"
- Verknuepfung.Check
-
- DateiVerknuepfung.Settext ConvertPath(gOfficePath + "user\work\testlink1.odt")
- TabBereiche.OK
-
- '/// insert another section linked another test file which include another section
- InsertSection
- Sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext "A1"
- Verknuepfung.Check
-
- DateiVerknuepfung.Settext ConvertPath(gOfficePath + "user\work\testlink2.odt")
- TabBereiche.OK
-
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
-
- Bereich.TypeKeys "<Up>",4
-
- For i = 0 to j
- if BereichsName.GetText <> SectionName(i) then warnlog "Section names are NOT displayed in row of their insertion"
- Bereich.TypeKeys "<Down>"
- next i
-
- BereicheBearbeiten.Cancel
- sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_3
-
- '/// Check display of dialogues -- Format Section -2
- '/// + double clicking a section with subsections hides the subsections,
- '/// + another double-click displays them again
-
- if Dir (gOfficePath + "user\work\DisplaySection_3.odt") <> "" then kill (gOfficePath + "user\work\DisplaySection_3.odt")
-
- printlog " - Check display of dialogues -- Format Section -2"
-
- Call hNewDocument
- fInsertSection("testlink1")
- Call hFileSaveAsKill (gOfficePath + "user\work\DisplaySection_3.odt")
- Call hCloseDocument
-
- '/// insert a section(A2) linked a test file which include a section(testlink1)
- Call hNewDocument
- InsertSection
- Sleep 2
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext "A2"
- Verknuepfung.Check
-
- DateiVerknuepfung.Settext ConvertPath(gOfficePath + "user\work\DisplaySection_3.odt")
- TabBereiche.OK
-
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
-
- Bereich.TypeKeys "+"
- if Bereich.GetItemCount < 2 then warnlog "Should be 2 sections in the list tree, now get " +Bereich.GetItemCount
- Bereich.TypeKeys "-"
- if Bereich.GetItemCount > 1 then warnlog "Should be 1 section in the list tree, get " +Bereich.GetItemCount
- Bereich.TypeKeys "+"
- if Bereich.GetItemCount < 2 then warnlog "Should be 2 sections in the list tree, now get " +Bereich.GetItemCount
- Bereich.TypeKeys "-"
- if Bereich.GetItemCount > 1 then warnlog "Should be 1 section in the list tree, get " +Bereich.GetItemCount
-
- BereicheBearbeiten.Cancel
- sleep 2
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_4
- Dim mMessage as String
- Dim allMessage as String
- '///<u>Goal</u>: Hiding a section hierarchy hides all subsections.
- '///+(Except if the section which should be hided is the whole document - than this feature is disabled!)
- '///+<u>Note</u>: The display in the dialog should not affected by changes in the document view.
- printlog " - Check hiding a section hierarchy hides all subsections -- Format Section -3"
- Call hNewDocument
- '/// Creating a new document.
- Call wTypeKeys "This is Section_s<Shift Home>"
- '/// Writing This is Section_s, marking it and use Insert / Section to create a <i>Section_s</i>.
- Call fInsertSection("Section_s")
- '/// Saving it as DisplaySection_4.odt in the user-work-dir.
- Call hFileSaveAsKill (gOfficePath & "user\work\DisplaySection_4.odt")
- '/// Closing the document.
- Call hCloseDocument
- '/// Creating a new document.
- Call hNewDocument
- '/// <b>Entering a RETURN at the beginning of the new document</b>!
- Call wTypeKeys "<RETURN>"
- '/// Writing <i>This is Section_m</i> and marking it.
- '/// Insert a section named <i>Section_m</i>.
- Call wTypeKeys "This is Section_m<Shift Home>"
- Call fInsertSection("Section_m")
- '/// Create a new line with END and RETURN in the actual section.
- Call wTypeKeys "<END><RETURN>"
- '/// Write <i>This Section should be Section_s</i> and mark it.
- Call wTypeKeys "This Section should be Section_s<Shift Home>"
- Kontext
- '/// Insert / Section
- InsertSection
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- '/// Name it <i>Section_u</i>.
- Bereichsliste.Settext "Section_u"
- '/// <b>Link it</b> to the first created document and the section in it.
- '///+ There should be pop up a warning! Press OK on it!
- Verknuepfung.Check
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- else
- warnlog "No messagebox warns of deleting content of the current section!"
- end if
- end if
- Kontext "TabBereiche"
- Dateiverknuepfung.Settext ConvertPath(gOfficePath & "user\work\DisplaySection_4.odt")
- '/// Unprotect it if it is protected.
- Geschuetzt.UnCheck
- '/// be sure that it is visible.
- Ausblenden.UnCheck
- '/// OK on the <i>section</i> dialog.
- TabBereiche.OK
- sleep(2)
-
- Call wTypeKeys "<MOD1 HOME>",2
- '/// Type the keys <CTRL HOME> together and twice.
- Call wTypeKeys "<SHIFT END>"
- '/// Type the keys <SHIFT END> together.
- EditCopy
- '/// Copy it to the clipboard (Edit / Copy).
- '/// <i>This is Section_m</i> should be now in the clipboard.
- if GetClipboardText = "This is Section_m" then
- '/// Type keys <DOWN> and then <HOME>
- Call wTypeKeys "<DOWN><HOME>"
- '/// Type keys <SHIFT END> together
- Call wTypeKeys "<SHIFT END>"
- EditCopy
- '/// Copy it to the clipboard (Edit / Copy).
- if GetClipboardText = "This is Section_s" then
- '/// <i>This is Section_s</i> should be visible/in the clipboard because the top section should not be affected if a lower section has been hided.
- Kontext
- '/// Format / Sections
- FormatSections
- Kontext "BereicheBearbeiten"
- '/// Hide the <i>Section_s</i> (Middle section).
- Bereich.TypeKeys "<Down>"
- Ausblenden.Check
- '/// OK on the dialog.
- BereicheBearbeiten.OK
- sleep(2)
-
- Call wTypeKeys "<HOME>"
- '/// Type key <HOME>
- Call wTypeKeys "<SHIFT END>"
- '/// Type key <SHIFT END> together
- EditCopy
- '/// Copy it to the clipboard (Edit / Copy).
- if GetClipboardText <> "This is Section_m" then warnlog "Should only display the content in section_m, but '" & GetClipboardText & "' is visible."
- '/// <i>This is Section_m</i> should be in the clipboard, nothing more.
- Kontext
- '/// Format / Sections
- FormatSections
- Kontext "BereicheBearbeiten"
- '/// Verify that all sections we have created are visible in the dialog.
- Bereich.TypeKeys "<Up>" , 2
- if BereichsName.GetText <> "Section_m" then warnlog "The display in dialogue is affected: '" & BereichsName.GetText & "'."
- Bereich.TypeKeys "<Down>"
- if BereichsName.GetText <> "Section_u" then warnlog "The display in dialogue is affected: '" & BereichsName.GetText & "'."
- Bereich.TypeKeys "<Down>"
- if BereichsName.GetText <> "Section_s" then warnlog "The display in dialogue is affected: '" & BereichsName.GetText & "'."
- '/// Unhide all Sections.
- Ausblenden.UnCheck
- '/// Go to the top section (<i>Section_m</i>
- Bereich.TypeKeys "<UP>" , 2
- '/// Hide the top section.
- Ausblenden.Check
- '/// OK on the dialog.
- BereicheBearbeiten.OK
- sleep(2)
- '/// Edit / Select all
- EditSelectAll
- try
- '/// Verify that Edit / Copy is NOT usable! There is nothing selected because all sections should be hided!
- EditCopy
- warnlog "It was possible to use Edit / Copy but it should be an empty document and the menu item should be disabled!"
- catch
- printlog "Edit / Copy was disabled because there should be nothing in the document which could be copied."
- endcatch
- Kontext
- '/// Format / Sections
- FormatSections
- '///+ Verify that hidintg <i>section_m</i> in the document does not affect the dialog:
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<UP>" , 3
- if BereichsName.GetText <> "Section_m" then warnlog "the display in dialogue is affected" +BereichsName.GetText
- Bereich.TypeKeys "<DOWN>"
- if BereichsName.GetText <> "Section_u" then warnlog "the display in dialogue is affected" +BereichsName.GetText
- Bereich.TypeKeys "<DOWN>"
- if BereichsName.GetText <> "Section_s" then warnlog "the display in dialogue is affected" +BereichsName.GetText
- BereicheBearbeiten.Cancel
- '/// Cancel the dialog.
- else
- warnlog "Don't get the correct content of Section_s"
- end if
- else
- warnlog "Don't get the correct content of Section_m"
- end if
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_5
-
- Dim sectionName() as String
- Dim correctSequence() as String
- Dim i as Integer
- Dim j as Integer
-
- if Dir (gOfficePath + "user\work\NavigatorSection_1.odt") <> "" then kill (gOfficePath + "user\work\NavigatorSection_1.odt")
-
- '/// Sections are displayed in row of their insertion in Navigator.
- '///+Hierarchies, protected and hidden sections have no special mark.
- printlog " - Check Section name display in navigator"
-
- 'Generate a .odt file which include a section
- Call hNewDocument
- fInsertSection("Section_S")
- Call wTypeKeys "<up>This is section_S"
- Call hFileSaveAsKill (gOfficePath + "user\work\NavigatorSection_1.odt")
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// Input some test words
- Call wTypeKeys "Test is in sectionNormal<return>"
- Call wTypeKeys "Test is in sectionHide<return>"
- Call wTypeKeys "Test is in sectionProtect<return>"
-
- sectionName = Array( _
- "sectionNormal", _
- "sectionHide", _
- "sectionProtect", _
- "sectionLink", _
- "Section_S", _
- )
-
- correctSequence = Array( _
- "sectionHide", _
- "sectionNormal", _
- "sectionProtect", _
- "sectionLink", _
- "Section_S", _
- )
-
- j = UBound(sectionName)
-
- Call wTypeKeys "<Up>",4
-
- For i = 0 to j-1
- Call wTypeKeys "<Home><Shift End>"
- fInsertSection(sectionName(i))
- Call wTypeKeys "<Down>"
- next i
-
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
-
- '/// insert a normal section
- Bereich.TypeKeys "<Up>",4
-
- '/// insert a section with hide option
- Bereich.TypeKeys "<Down>"
- if BereichsName.GetText = sectionName(1) then
- Ausblenden.check
- else
- warnlog "The second section should be " +sectionName(1) +" bug get" +BereichsName.GetText
- end if
-
- '/// insert a section with protect option
- Bereich.TypeKeys "<Down>"
- if BereichsName.GetText = sectionName(2) then
- Geschuetzt.Check
- else
- warnlog "The second section should be " +sectionName(2) +" bug get" +BereichsName.GetText
- end if
-
- '/// insert a section with Link option
- Bereich.TypeKeys "<Down>"
- if BereichsName.GetText = sectionName(3) then
- Verknuepfung.Check
- Dateiname.Settext ConvertPath(gOfficePath + "user\work\NavigatorSection_1.odt")
- else
- warnlog "The second section should be " +sectionName(3) +" bug get" +BereichsName.GetText
- end if
-
- BereicheBearbeiten.OK
- Sleep 1
-
- 'start up Navigator
- Call wNavigatorAuswahl(7,1, true)
-
- printlog " -- check if the section name in navigator is right "
- for i= 0 to j
- if Auswahlliste.GetitemText(8+i) <> correctSequence(i) then QAErrorLog "The Section Name may be wrong, should be " + sectionName(i) +" but get " & Auswahlliste.GetitemText(i+2)
- next i
-
- 'Close Navigator before close the document
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_6
-
- Dim sectionContent() as String
- Dim j as Integer
-
- '/// Jump to a section by double-clicking it in navigator
- '/// +instead of 'double-click', we choose return
- printlog " - Check Jump to a section by double-clicking it in navigator"
-
- Call hNewDocument
-
- sectionContent = Array( _
- "Test is in Section1", _
- "Test is in Section2", _
- )
-
- '/// Input some test words
- Call wTypeKeys sectionContent(0)
- Call wTypeKeys "<return>"
- Call wTypeKeys sectionContent(1)
-
- Call wTypeKeys "<up><home><Shift End>"
- fInsertSection("section1")
-
- Call wTypeKeys "<down><home><Shift End>"
- fInsertSection("section2")
-
- 'start up Navigator
- Call wNavigatorAuswahl(7,1, true)
-
- 'Jump to a section by double-clicking it
- printlog " -- check Jump to a section by double-clicking it "
- for j=1 to 2
- Auswahlliste.TypeKeys "<return>"
- Sleep 2
- Call wTypeKeys "<home><Shift End>"
- EditCopy
- if GetClipboardText <> sectionContent(j-1) then warnlog "The focus is NOT in the correct location"
- Kontext "NavigatorWriter"
- Auswahlliste.TypeKeys "<down>"
- next j
-
- 'Close Navigator before close the document
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_7
-
- Dim i as Integer
-
- '/// Activate Navigator, insert a section , it must be displayed
- '/// + immediately in the Navigator .
- printlog " - Check inserting a section must be displayed immediately in the Navigator "
-
- Call hNewDocument
-
- 'start up Navigator first
- Call wNavigatorAuswahl(7,1)
-
- fInsertSection("sectionNormal")
- Sleep 1
-
- Call wNavigatorAuswahl(7,1)
-
- Kontext "NavigatorWriter"
- Auswahlliste.TypeKeys "<return>"
-
- printlog " -- check if the section name in navigator is right "
- if Auswahlliste.GetitemText(8) <> "sectionNormal" then warnlog "The section can't be displayed immediately in the Navigator. Found this: '" + Auswahlliste.GetitemText(8) + "' instead."
-
- 'Close Navigator before close the document
- fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_8
-
- Dim i as Integer
-
- '/// Select a section in the Navigator, call context menu, choose "Edit"
- '///+ Format-Section dialogue must appear
- printlog " - Check if the context menu should work in navigator / section "
-
- Call hNewDocument
- sleep(2)
- fInsertSection("sectionNormal")
- sleep(2)
- 'start up Navigator
- Call wNavigatorAuswahl(7,1, true)
- sleep(2)
- Auswahlliste.OpenContextMenu
- sleep(2)
- hMenuSelectNr(4)
- sleep(2)
- 'Check if the edit section dialog is up
- Kontext "BereicheBearbeiten"
- if NOT BereicheBearbeiten.Exists then
- warnlog "- Dialog to eidt section isn't up!"
- else
- BereicheBearbeiten.Cancel
- end if
- sleep(1)
- 'Close Navigator before close the document
- fCloseNavigator
- sleep(1)
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tDisplaySection_9
-
- Dim i as Integer
- Dim shouldbe as string
-
- '/// Check to insert a paragraph before and after a section"
- printlog " - Check to insert a paragraph before and after a section"
- '/// Open a new writerdocument ///
- Call hNewDocument
- '/// Write some text, selct it and insert a section named 'My Section' ///
- Call wTypeKeys "Add a paragraph before and after a section!<Shift Home>"
- fInsertSection("My Section")
- Sleep 1
- '/// Point cursor before text and press Alt+Return ///
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Mod2 Return>"
- '/// A paragraph should have been inserted before section ///
- Call wTypeKeys "Paragraph before a section"
- '/// Point cursor at end of text in section and press Alt + Return ///
- Call wTypeKeys "<Down><End>"
- Call wTypeKeys "<Mod2 Return>"
- '/// A paragraph should have been inserted after section ///
- Call wTypeKeys "Paragraph after a section"
- '/// Check settings ///
- Call wTypeKeys "<Home><Up>",4
- For i = 1 to 3
- Select Case i
- Case 1
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipBoardtext <> "Paragraph before a section" then
- warnlog "Problem with paragraph before section"
- end if
- Case 2
- Call wTypeKeys "<Shift Down>"
- EditCopy
- if gPlatGroup = "unx" then
- shouldbe = "Add a paragraph before and after a section!" + CHR$(10)
- else
- shouldbe = "Add a paragraph before and after a section!" + CHR$(13) & CHR$(10)
- end if
-
- if GetClipBoardtext <> shouldbe then
- Warnlog "Copied text not correctly exported through the clipboard" ' "Problem with section"
- end if
- Case 3
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipBoardtext <> "Paragraph after a section" then
- warnlog "Problem with paragraph after section"
- end if
- end select
- Call wTypeKeys "<Home><Down>"
- next i
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/section/w_section_3.inc b/testautomation/writer/optional/includes/section/w_section_3.inc
deleted file mode 100644
index e23b4c8502d5..000000000000
--- a/testautomation/writer/optional/includes/section/w_section_3.inc
+++ /dev/null
@@ -1,1761 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Hide section /Protect section / Display of dialogues
-'*
-'************************************************************************
-'*
-' #1 tBookmarkSection_1
-' #1 tBookmarkSection_2
-' #1 tFootnoteEndnoteSection_1
-' #1 tFootnoteEndnoteSection_2
-' #1 tFootnoteEndnoteSection_3
-' #1 tFootnoteEndnoteSection_4
-' #1 tFootnoteEndnoteSection_5
-' #1 tFootnoteEndnoteSection_6
-' #1 tMultiColumnSection_1
-' #1 tMultiColumnSection_2
-' #1 tMultiColumnSection_3
-' #1 tOperationSection_1
-' #1 tOperationSection_2
-' #1 tOperationSection_3
-' #1 tPasswordProtectSection_1
-' #1 tPasswordProtectSection_2
-' #1 tPasswordProtectSection_3
-' #1 tPasswordProtectSection_4
-' #1 tWrappedSections_1
-' #1 tWrappedSections_2
-' #1 tWrappedSections_3
-' #1 tWrappedSections_4
-' #1 tWrappedSections_5
-' #1 tWrappedSections_6
-' #1 tWrappedSections_7
-'*
-'\***********************************************************************
-
-sub w_section_3
-
- printLog Chr(13) + "--------- Insert bookmarks into sections ----------"
- Call tBookmarkSection_1 'Insert bookmarks into section, jump to
- Call tBookmarkSection_2 'Insert bookmarks into a protect section, jump to
-
- printLog Chr(13) + "--------- Footnotes/Endnotes in sections ----------"
- Call tFootnoteEndnoteSection_1 'select Text, that contains foot-/endnotes, insert section
- Call tFootnoteEndnoteSection_2 'insert footnote into text of an existing section
- Call tFootnoteEndnoteSection_3 'footnote text must be protected in a protected section
- Call tFootnoteEndnoteSection_4 'linked sections, where source section contains footnotes , footnote text must be also protected
- Call tFootnoteEndnoteSection_5 'footnotes in hidden areas 1 footnote text must also be hidden
- Call tFootnoteEndnoteSection_6 'ALL footnotes appear before the endnotes
-
- printLog Chr(13) + "--------- Multi-column sections ----------"
- Call tMultiColumnSection_1 'Create multi-column section directly when inserting via dialogue (TabPage "Columns")
- Call tMultiColumnSection_2 'Create multi-column section from format/section - options (TabPage "Columns")
- Call tMultiColumnSection_3 'Fill columns balanced -- Active
-
- printLog Chr(13) + "--------- Cut/copy/paste/move/delete sections ----------"
- Call tOperationSection_1 'Cut/copy/paste/move/delete sections -- Shortcut
- Call tOperationSection_2 'Cut/copy/paste/move/delete sections -- function bar
- Call tOperationSection_3 'when inserting from clipboard the sections have to be named automatically with the correct number
-
- printLog Chr(13) + "--------- Password protect sections ----------"
- Call tPasswordProtectSection_1 'Format - Section: check "Password protected" PW-Dialogue has to appear two times
- Call tPasswordProtectSection_2 'reload document, Format-section 1 PW-Dialog has to appear
- Call tPasswordProtectSection_3 'try wrong password ,Error massage should appear, sections-dialogue not accessible
- Call tPasswordProtectSection_4 'Remove password protection by unchecking, reload document, Format-sections 'PW-dialogue' should NOT appear
-
- printLog Chr(13) + "--------- Wrapping and Wrapped sections ----------"
- Call tWrappedSections_1 'select Text inside a section and insert a section
- Call tWrappedSections_2 'select text across a section an insert a section
- Call tWrappedSections_3 'wrapped sections are following properties of the wrapping section - write protection
- Call tWrappedSections_4 'wrapped sections are following properties of the wrapping section - visibility
- Call tWrappedSections_5 'wrapped sections are following properties of the wrapping section - Foot-/endnote position
- Call tWrappedSections_6 'The formatting of columns of sectionWrapping and sectionWrapped can be configured separately
- Call tWrappedSections_7 'The background graphic of sectionWrapping and sectionWrapped can be configured separately
-
-end sub
-
-'***********************************************************************
-
-testcase tBookmarkSection_1
-
- Dim sectionName as String
- Dim testText as String
- Dim bookmarkName as String
-
- sectionName = "bookmarkSection"
- bookmarkName = "myBookmark"
- testText = "Hello World"
-
- PrintLog " - Insert bookmarks into a section, jump to"
-
- Call hNewDocument
-
- PrintLog " insert a section , and input Text"
- Call wTypeKeys testText
- Call wTypeKeys "<Shift Home>"
- fInsertSection(sectionName)
-
- PrintLog " insert a bookmark in front of Text"
- try
- fInsertBookmark(bookmarkName)
- catch
- Warnlog " Insert a bookmark into a section failed"
- endcatch
-
- printlog "set the focus end of Text, make sure no text is marked."
- Call wTypeKeys "<End><SPACE><BACKSPACE>"
-
- PrintLog " active Navigator, double click the bookmark which be inserted,"
- PrintLog " + then the focus should be in front of $testText"
- Call wNavigatorAuswahl(6,1, true)
- Auswahlliste.TypeKeys "<return>"
- sleep(1)
-' Call wTypeKeys "<Shift End>" 'Outcommented since the bookmark also selects the text. Just like it was when it got bookmarked.
-' sleep(1)
- EditCopy
- sleep(1)
- if GetClipboardText <> testText then Warnlog "The focus is NOT in front of " +testText
-
- printlog "Close Navigator before close the document"
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------
-
-testcase tBookmarkSection_2
-
- Dim sectionName as String
- Dim testText as String
- Dim bookmarkName as String
-
- sectionName = "bookmarkSection"
- bookmarkName = "myBookmark"
- testText = "Hello World"
-
- PrintLog " - Jump to for bookmarks in a protect section"
-
- Call hNewDocument
- sleep(2)
- PrintLog " Open options and check 'Direct-Cursor' in options"
- Call fCheckDirectCursor
- sleep(2)
- PrintLog " insert a bookmark in front of Text"
- Call fInsertBookmark(bookmarkName)
- sleep(2)
- PrintLog " insert Text"
- Call wTypeKeys testText
- Call wTypeKeys "<Shift Home>"
- sleep(1)
- PrintLog " insert a section with protect option"
- InsertSection
- sleep(2)
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sectionName
- Geschuetzt.Check
- TabBereiche.OK
- sleep(2)
-
- PrintLog " set the focus end of Text"
- Call wTypeKeys "<End>"
- sleep(2)
- PrintLog " active Navigator, double click the bookmark which be inserted,"
- PrintLog " + then the focus should be in front of Text"
- Call wNavigatorAuswahl(6,1, true)
- sleep(2)
- Auswahlliste.TypeKeys "<down><return>"
- sleep(2)
- Call wTypeKeys "<Shift End>"
- sleep(1)
- EditCopy
- sleep(2)
- if GetClipboardText <> testText then Warnlog "The focus is NOT in front of " & testText
- printlog "Close Navigator before close the document"
- Call fCloseNavigator
- sleep(1)
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tFootnoteEndnoteSection_1
-
- Dim sectionName as String
- Dim testText as String
- Dim preMessage as String
-
- sectionName = "FootnoteEndnoteSection"
- testText = "This is footnotes/endnotes test"
-
- PrintLog " - Insert a section that contains foot-/endnotes"
-
- Call hNewDocument
-
- PrintLog " insert footnote in front of Text"
- fInsertFootnote("automatic")
- Call wTypeKeys "<PageUp>"
-
- PrintLog " insert some test words"
- Call wTypeKeys testText
-
- PrintLog " insert endnote at end of Text"
- fInsertEndnote("automatic")
- Call wTypeKeys "<PageUp>"
-
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- preMessage = GetClipBoardtext
-
- PrintLog " insert a section which include Text, foot-/endnotes"
- try
- fInsertSection(sectionName)
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- if GetClipboardText <> preMessage then Warnlog "There is something changed aftering inserting the section which include Text, foot-/endnotes"
- catch
- Warnlog " Could NOT insert a section which include Text, foot-/endnotes"
- endcatch
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tFootnoteEndnoteSection_2
-
- Dim sectionName as String
- Dim testText as String
- Dim preMessage as String
-
- sectionName = "FootnoteEndnoteSection"
- testText = "This is footnotes/endnotes test"
-
- PrintLog " - insert footnote/endnote into text of an existing section "
-
- Call hNewDocument
-
- PrintLog " insert some test words"
- Call wTypeKeys testText
- Call wTypeKeys "<Shift Home>"
-
- PrintLog " insert a section which include Text"
- fInsertSection(sectionName)
-
- Call wTypeKeys "<Home>"
-
- PrintLog " insert footnote into the section"
- try
- fInsertFootnote("automatic")
- catch
- Warnlog " Could NOT insert a footnote into the section"
- endcatch
-
- Call wTypeKeys "<PageUp><End>"
-
- PrintLog " insert endnote into the section"
- try
- fInsertEndnote("automatic")
- catch
- Warnlog " Could NOT insert a endnote into the section"
- endcatch
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tFootnoteEndnoteSection_3
-
- Dim sectionName as String
- Dim preMessage as String
-
- sectionName = "FootnoteEndnoteSection"
-
- PrintLog " - footnote text must be protected in a protected section"
-
- Call hNewDocument
-
- PrintLog " Open options and check 'Direct-Cursor' in options"
- fCheckDirectCursor
-
- PrintLog " insert a footnote"
- fInsertFootnote("automatic")
- Call wTypeKeys "<PageUp>"
-
- PrintLog " insert a endnote"
- fInsertEndnote("automatic")
- Call wTypeKeys "<PageUp>"
-
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
-
- preMessage = GetClipBoardtext
-
- PrintLog " insert a section with protect option"
- InsertSection
- sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sectionName
- Geschuetzt.Check
- TabBereiche.OK
- sleep 2
-
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
-
- if GetClipBoardtext = preMessage then
- Call wTypeKeys "<Space>"
- Kontext "Active"
- if Active.Exists then
- Active.ok
- else
- Warnlog "- No warning when trying to write in protected area!"
- end if
- else
- Warnlog "Testtool couldn't find the protected area!"
- end if
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tFootnoteEndnoteSection_4
-
- Dim sectionName as String
- Dim sourceSectionName as String
- Dim testText as String
- Dim preMessage as String
-
- sectionName = "FootnoteEndnoteSection"
- sourceSectionName = "NormalSection"
- testText = "The test is in source section"
-
- if Dir (gOfficePath + "user\work\tFootnoteEndnoteSection_4.odt") <> "" then kill (gOfficePath + "user\work\tFootnoteEndnoteSection_4.odt")
-
- PrintLog " - linked sections, where source section contains footnotes , footnote text must be also protected "
-
- PrintLog " insert a footnote in a section, then save the file"
- Call hNewDocument
-
- fInsertFootnote("automatic")
- Call wTypeKeys "<PageUp>"
-
- Call wTypeKeys testText
-
- fInsertEndnote("automatic")
- Call wTypeKeys "<PageUp>"
-
- Call wTypeKeys "<Shift Home>"
- fInsertSection(sourceSectionName)
-
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- preMessage = GetClipBoardtext
-
- Call hFileSaveAsKill (gOfficePath + "user\work\tFootnoteEndnoteSection_4.odt")
- Call hCloseDocument
-
- Call hNewDocument
-
- PrintLog " Open options and check 'Direct-Cursor' in options"
- fCheckDirectCursor
-
- PrintLog " insert a section with link option"
- InsertSection
- sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sectionName
- Verknuepfung.Check
-
- DateiVerknuepfung.Settext ConvertPath(gOfficePath + "user\work\tFootnoteEndnoteSection_4.odt")
- TabBereiche.OK
- sleep 2
-
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
-
- PrintLog " the footnote should be protected"
- if GetClipBoardtext = preMessage then
- Call wTypeKeys "<Space>"
- Kontext "Active"
- if Active.Exists then
- Active.ok
- else
- Warnlog "- No warning when trying to write in protected area!"
- end if
- else
- Warnlog "Testtool couldn't find the protected area!"
- end if
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tFootnoteEndnoteSection_5
- Dim sectionName as String
- sectionName = "FootnoteEndnoteSection"
- printlog " - Footnotes in hidden areas 1 footnote text must also be hidden"
- Call hNewDocument
-
- PrintLog " Insert a footnote"
- fInsertFootnote("automatic")
- Call wTypeKeys "<PAGEUP>"
- PrintLog " Insert a endnote"
- fInsertEndnote("automatic")
- Call wTypeKeys "<PAGEUP>"
- Call wTypeKeys "<HOME>"
- Call wTypeKeys "<RETURN>"
- Call wTypeKeys "<SHIFT END>"
- PrintLog " Insert a section with hide option"
- InsertSection
- sleep(1)
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sectionName
- Ausblenden.Check
- TabBereiche.OK
- sleep(1)
- try
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- warnlog "'Edit / Copy' is usable but if there is nothing in the document (hidden section in footnote) it should be disabled!"
- catch
- printlog "Clipboard should be and is empty."
- endcatch
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tFootnoteEndnoteSection_6
-
- Dim sectionName as String
-
- sectionName = "FootnoteEndnoteSection"
-
- PrintLog " - ALL footnotes appear before the endnotes "
-
- Call hNewDocument
-
- fInsertSection(sectionName)
- Call wTypeKeys "<Up>"
-
- PrintLog " insert the first footnote"
- fInsertFootnote("automatic")
- Call wNavigatorAuswahl(7,1, true)
- if Seitennummer.GetText <> "1" then warnlog "The first footnote should be in the first page"
- fCloseNavigator
- Call wTypeKeys "<PageUp>"
-
- PrintLog " insert a endnote"
- fInsertEndnote("automatic")
- Call wNavigatorAuswahl(7,1, true)
- if Seitennummer.GetText <> "2" then warnlog "The first endnote should be in the second page"
- fCloseNavigator
- Call wTypeKeys "<PageUp>"
-
- PrintLog " insert the second footnote"
- fInsertFootnote("automatic")
- Call wNavigatorAuswahl(7,1, true)
- if Seitennummer.GetText <> "1" then warnlog "The second footnote should be in the first page"
- fCloseNavigator
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tMultiColumnSection_1
-
- Dim columnNumber as String
-
- columnNumber = "3"
-
- PrintLog " - Create multi-column section directly when inserting via dialogue (TabPage 'Columns')"
-
- Call hNewDocument
-
- PrintLog " insert a section(insert/section with TabPage 'Columns',"
- PrintLog " + set column to $columnNumber"
- InsertSection
- sleep 1
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- Anzahl.Settext columnNumber
- TabSpalten.OK
- sleep 1
-
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- 'Check volumn number
- if Anzahl.Gettext <> columnNumber then Warnlog "The volumn we hope is " +columnNumber +" but get " + Anzahl.Gettext
-
- 'Check volumn width
- if Spaltenbreite1.Gettext <> Spaltenbreite2.Gettext OR Spaltenbreite1.Gettext <> Spaltenbreite3.Gettext then Warnlog "column width is NOT Balance"
-
- TabSpalten.Cancel
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tMultiColumnSection_2
-
- Dim columnNumber , sectionName as String
-
- sectionName = "MultiColumnSection"
- columnNumber = "3"
-
- PrintLog " - Create multi-column section from format/section - options (TabPage Columns)"
-
- Call hNewDocument
-
- PrintLog " insert a section with only 1 culumn, that means a normal section"
- fInsertSection(sectionName)
-
- PrintLog " change the volumn number (format/section) with"
- PrintLog " + TabPage 'Columns', set column to $columnNumber"
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- 'Set volumn number
- Anzahl.Settext columnNumber
- TabSpalten.OK
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.OK
-
- PrintLog " Check the volumn number"
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- 'Check volumn number
- if Anzahl.Gettext <> columnNumber then Warnlog "The volumn we hope is " +columnNumber +" but get " + Anzahl.Gettext
-
- TabSpalten.Cancel
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tMultiColumnSection_3
-
- Dim columnNumber as String
- Dim testText1 as String
- Dim testText2 as String
- Dim i as Integer
-
- columnNumber = "2"
- testText1 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV"
- testText2 = "-"
-
- PrintLog " fill columns balanced -- Active"
-
- PrintLog " when text inserted into a section, the columns have"
- PrintLog " + to be filled equally"
-
- PrintLog " - fill columns balanced -- Active"
-
- Call hNewDocument
-
- PrintLog " input some text , less 1 line"
- Call wTypeKeys testText1
- EditSelectAll
-
- PrintLog " insert a section ,set column to $columnNumber"
- InsertSection
- sleep 1
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- Anzahl.Settext columnNumber
- TabSpalten.OK
- sleep 1
-
- Call wTypeKeys "<Escape>"
-
- PrintLog " input '-' in the end of the text check if"
- PrintLog " + the '-' will appare to second colum"
- For i = 0 to 100
- Call wTypeKeys testText2
- Call wTypeKeys "<Shift Home>"
- sleep(1)
- EditCopy
- sleep(1)
- if GetClipboardText = testText2 then goto GoON
- Call wTypeKeys "<Escape>"
- Call wTypeKeys "<End>"
- next i
- Warnlog "We can't get " +hopeResult2 +" in second column"
-
-GoON:
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tOperationSection_1
- Dim testText1 as String
- Dim testText2 as String
- Dim testText3 as String
- Dim sectionName as String
-
- sectionName = "OperationSection"
- testText1 = "The operation CUT for Section test"
- testText2 = "The operation COPY for Section test"
- testText3 = "The operation DELETE for Section test"
-
- PrintLog " - Cut/copy/paste/move/delete sections - Via key shortcuts"
-
- Call hNewDocument
-
- PrintLog " insert a section"
- Call wTypeKeys "<Return>"
- fInsertSection(sectionName)
- Call wTypeKeys "<Up>"
- Call wTypeKeys testText1
- Call wTypeKeys "<Up>"
- EditSelectAll
-
- PrintLog " Cut section"
- Call wTypeKeys "<Mod1 x>"
-
- try
- FormatSections
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
- Warnlog "Cut section is failed!"
- catch
- endcatch
-
- PrintLog " Paste section"
- Call wTypeKeys "<Mod1 v>"
-
- 'start up Navigator
- Call wNavigatorAuswahl(7,1, true)
- PrintLog " 1)check section name"
- if Auswahlliste.GetSelText = sectionName then
- PrintLog " 2)check the content in section"
- Call wTypeKeys "<home><Shift End>"
- sleep(1)
- EditCopy
- sleep(1)
- if GetClipboardText <> testText1 then Warnlog "The content is the section is NOT right in cut/paste section!"
- else
- warnlog "The Section Name is wrong, should be " + sectionName +" but get " +Auswahlliste.GetSelText
- end if
-
- 'Close Navigator before close the document
- Kontext
- Call fCloseNavigator
-
- Call hCloseDocument
-
- Call hNewDocument
-
- PrintLog " insert a section"
- Call wTypeKeys "<Return>"
- Call fInsertSection(sectionName)
- Call wTypeKeys "<Up>"
- Call wTypeKeys testText2
- Call wTypeKeys "<Up>"
- EditSelectAll
-
- PrintLog " Copy section"
- Call wTypeKeys "<Mod1 c>"
-
- Call hCloseDocument
-
- Call hNewDocument
-
- 'Paste section
- Call wTypeKeys "<Mod1 v>"
-
- 'start up Navigator
- Call wNavigatorAuswahl(7,1, true)
-
- PrintLog " 1)check section name"
- if Auswahlliste.GetSelText = sectionName then
- PrintLog " 2)check the content in section"
- sleep 1
- Call wTypeKeys "<home><Shift End>"
- sleep(1)
- EditCopy
- sleep(1)
- if GetClipboardText <> testText2 then Warnlog "The content is the section is NOT right in copy/paste section!"
- else
- warnlog "The Section Name is wrong, should be " + sectionName +" but get " +Auswahlliste.GetSelText
- end if
-
- printlog "'Close Navigator before close the document"
- Call fCloseNavigator
-
- Call hCloseDocument
-
- Call hNewDocument
-
- PrintLog " insert a section"
- Call wTypeKeys "<Return>"
- Call fInsertSection(sectionName)
- Call wTypeKeys "<Up>"
- Call wTypeKeys testText3
- Call wTypeKeys "<Up>"
- EditSelectAll
-
- PrintLog " delete the section"
- Call wTypeKeys "<Delete>"
-
- PrintLog " check if section exists or not"
- try
- FormatSections
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
- Warnlog "Delete section is failed!"
- catch
- endcatch
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tOperationSection_2
-
- Dim testText1 as String
- Dim testText2 as String
- Dim testText3 as String
- Dim sectionName as String
-
- sectionName = "OperationSection"
- testText1 = "The operation CUT for Section test"
- testText2 = "The operation COPY for Section test"
- testText3 = "The operation DELETE for Section test"
-
- PrintLog " - Cut/copy/paste/move/delete sections - Via function bar"
-
- Call hNewDocument
-
- PrintLog " insert a section"
- Call wTypeKeys "<Return>"
- Call fInsertSection(sectionName)
- Call wTypeKeys "<Up>"
- Call wTypeKeys testText1
- Call wTypeKeys "<Up>"
- EditSelectAll
- sleep 1
- PrintLog " Cut section"
- Kontext "Standardbar"
- Ausschneiden.Click
-
- try
- FormatSections
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
- Warnlog "Cut section is failed!"
- catch
- endcatch
-
- PrintLog " Paste section"
- Kontext "Standardbar"
- Einfuegen.Click
-
- 'start up Navigator
- Call wNavigatorAuswahl(7,1, true)
-
- PrintLog " 1)check section name"
- if Auswahlliste.GetSelText = sectionName then
- PrintLog " 2)check the content in section"
- Call wTypeKeys "<home><Shift End>"
- sleep(1)
- EditCopy
- sleep(1)
- if GetClipboardText <> testText1 then Warnlog "The content is the section is NOT right in cut/paste section!"
- else
- warnlog "The Section Name is wrong, should be " + sectionName +" but get " +Auswahlliste.GetSelText
- end if
-
- printlog "Close Navigator before close the document"
- Call fCloseNavigator
- Call hCloseDocument
- Call hNewDocument
-
- PrintLog " insert a section"
- Call wTypeKeys "<Return>"
- Call fInsertSection(sectionName)
- Call wTypeKeys "<Up>"
- Call wTypeKeys testText2
- Call wTypeKeys "<Up>"
- EditSelectAll
- sleep 1
-
- PrintLog " Copy section"
- Kontext "Standardbar"
- Kopieren.Click
-
- Call hCloseDocument
-
- Call hNewDocument
-
- PrintLog " Paste section"
- Kontext "Standardbar"
- Einfuegen.Click
-
- 'start up Navigator
- Call wNavigatorAuswahl(7,1, true)
-
- PrintLog " 1)check section name"
- if Auswahlliste.GetSelText = sectionName then
- PrintLog " 2)check the content in section"
- sleep 1
- Call wTypeKeys "<home><Shift End>"
- sleep(1)
- EditCopy
- sleep(1)
- if GetClipboardText <> testText2 then Warnlog "The content is the section is NOT right in copy/paste section!"
- else
- warnlog "The Section Name is wrong, should be " + sectionName +" but get " +Auswahlliste.GetSelText
- end if
-
- Call fCloseNavigator
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tOperationSection_3
-
- Dim sectionName as String
-
- PrintLog " when inserting from clipboard the sections have to be named automatically"
- PrintLog " + with the correct number, means:"
- PrintLog " + when copying 1 section inside a document, the new section must be"
- PrintLog " + named 'Section2' automatically, if the copied section is named Section1"
-
- PrintLog " - when inserting from clipboard the sections have to be named automatically with the correct number"
-
- sectionName = gDefaultSectionName + 2
-
- PrintLog " New document"
- Call hNewDocument
- Call wTypeKeys "<Return>"
-
- PrintLog " Insert a section with default name"
- InsertSection
- sleep 1
- Kontext
- Kontext "TabBereiche"
- TabBereiche.OK
- sleep 1
-
- PrintLog " Copy and Paste the section into the document"
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- Call wTypeKeys "<Escape>"
- sleep(1)
- EditPaste
-
- Kontext
- FormatSections
- sleep(1)
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>",2
- Bereich.TypeKeys "<Down>"
-
- if BereichsName.GetText <> sectionName then warnlog "We hope the section name is " & sectionName & " but get " & BereichsName.GetText
- BereicheBearbeiten.Cancel
-
- PrintLog " Close document"
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tPasswordProtectSection_1
-
- Dim Password as String
- Dim newPassword as String
-
- Password = "protectedarea"
- newPassword = "newProtectedArea"
-
- PrintLog " - Format - Section: check 'Password protected' 1 PW-Dialogue has to appear two times "
-
- Call hNewDocument
-
- PrintLog " Insert a section with password"
- InsertSection
- sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Geschuetzt.Check
- sleep 1
- Passwort.Check
-
- Kontext "BereicheSchuetzen"
- PasswortName.Settext Password
- PasswortBestaetigen.Settext Password
- BereicheSchuetzen.Ok
-
- Kontext
- Kontext "TabBereiche"
- TabBereiche.OK
-
- FormatSections
- Kontext "BereicheBearbeiten"
-
- EnterPasswort.Click
-
- Kontext
- Kontext "BereicheSchuetzen"
-
- PrintLog " PassWord-Dialogue should appear first time"
- if BereicheSchuetzen.NotExists then
- Warnlog "Unable to enter passwort for section, because dialog is not up!"
- else
- PasswortName.Settext Password
- BereicheSchuetzen.Ok
- sleep 1
-
- PrintLog " + PW-Dialogue should appear second time"
- if BereicheSchuetzen.NotExists then
- Warnlog "Unable to enter passwort for section, because dialog is not up!"
- else
- PasswortName.Settext newPassword
- PasswortBestaetigen.Settext newPassword
- BereicheSchuetzen.Ok
-
- Kontext
- Kontext "BereicheBearbeiten"
- PrintLog " + 'Password protected' checkbox must be checked after inputing new password"
- if Passwort.IsChecked <> TRUE then Warnlog "The 'password protected' checkbox should be checked"
- end if
- end if
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.OK
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tPasswordProtectSection_2
-
- Dim Password as String
-
- Password = "protectedarea"
-
- if Dir (gOfficePath + "user\work\tPasswordProtectSection_2.odt") <> "" then
- kill (gOfficePath + "user\work\tPasswordProtectSection_2.odt")
- end if
- PrintLog " - reload document, Format-section 1 PW-Dialog has to appear "
-
- Call hNewDocument
-
- PrintLog " Insert a section with password , and save the file"
- InsertSection
- sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Geschuetzt.Check
- sleep 1
- Passwort.Check
-
- Kontext "BereicheSchuetzen"
- PasswortName.Settext Password
- PasswortBestaetigen.Settext Password
- BereicheSchuetzen.Ok
-
- Kontext "TabBereiche"
- TabBereiche.OK
-
- Call hFileSaveAsKill (gOfficePath + "user\work\tPasswordProtectSection_2.odt")
-
- Call hCloseDocument
-
- PrintLog " Reload the file"
- hFileOpen( gOfficepath + "user\work\tPasswordProtectSection_2.odt")
-
- FormatSections
- Kontext "BereicheBearbeiten"
-
- Optionen.Click
-
- Kontext "BereicheSchuetzen"
- PrintLog " PassWord-Dialogue should appear when clicking 'option' button"
- if BereicheSchuetzen.NotExists then
- Warnlog "Unable to enter passwort for section, because dialog is not up!"
- else
- BereicheSchuetzen.Cancel
- end if
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tPasswordProtectSection_3
-
- Dim Password as String
- Dim wrongPassword as String
-
- Password = "protectedarea"
- wrongPassword = "wrongPW"
-
- PrintLog " - Input wrong password ,Error massage should appear, sections-dialogue not accessible "
-
- Call hNewDocument
-
- PrintLog " Insert a section with password"
- InsertSection
- sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Geschuetzt.Check
- sleep 1
- Passwort.Check
-
- Kontext "BereicheSchuetzen"
- PasswortName.Settext Password
- PasswortBestaetigen.Settext Password
- BereicheSchuetzen.Ok
-
- Kontext "TabBereiche"
- TabBereiche.OK
-
- FormatSections
- Kontext "BereicheBearbeiten"
-
- EnterPasswort.Click
-
- Kontext "BereicheSchuetzen"
-
- PasswortName.Settext wrongPassword
-
- BereicheSchuetzen.Ok
- sleep 1
-
- Kontext
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT <> 304 then warnlog "Error message box is NOT up! The active box is " +Active.GetRT
- Active.OK
- else
- Warnlog "Error message box is NOT up!"
- end if
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tPasswordProtectSection_4
-
- Dim Password as String
-
- Password = "protectedarea"
-
- if Dir (gOfficePath + "user\work\tPasswordProtectSection_4.odt") <> "" then
- kill (gOfficePath + "user\work\tPasswordProtectSection_4.odt")
- end if
-
- PrintLog " - Remove password protection by unchecking, reload document, Format-sections 'PW-dialogue' may not appear"
-
- Call hNewDocument
-
- PrintLog " Insert a section with password"
- InsertSection
- sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Geschuetzt.Check
- sleep 1
- Passwort.Check
-
- Kontext "BereicheSchuetzen"
- PasswortName.Settext Password
- PasswortBestaetigen.Settext Password
- BereicheSchuetzen.Ok
-
- Kontext "TabBereiche"
- TabBereiche.OK
-
- PrintLog " Remove the password protection and save the file"
- FormatSections
- Kontext "BereicheBearbeiten"
-
- Passwort.Uncheck
- Kontext "BereicheSchuetzen"
- PrintLog " PassWord-Dialogue should appear when clicking 'option' button"
- if BereicheSchuetzen.NotExists then
- Warnlog "Unable to uncheck password for section, because dialog is not up!"
- else
- PasswortName.Settext Password
- BereicheSchuetzen.OK
- end if
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.OK
-
- Call hFileSaveAsKill (gOfficePath + "user\work\tPasswordProtectSection_4.odt")
-
- Call hCloseDocument
-
- PrintLog " Reload the file"
- hFileOpen( gOfficepath + "user\work\tPasswordProtectSection_4.odt")
-
- PrintLog " In format/section, PW-Dialogue should appear when clicking 'option' button"
- FormatSections
- Kontext "BereicheBearbeiten"
-
- Optionen.Click
-
- Kontext "BereicheSchuetzen"
-
- if BereicheSchuetzen.Exists then
- Warnlog "Unable to enter passwort for section, because dialog is not up!"
- PasswortName.Settext Password
- BereicheSchuetzen.OK
- end if
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- TabSpalten.Cancel
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-
-'****************************************************************************
-'** After the Wrapping section and Wrapped section are generated, the display
-'** is like
-'**
-'** This is <----|--------------------
-'** wrapped <---- Wrapped section <----| Wrapping section
-'** sections test <----|--------------------
-'*****************************************************************************
-testcase tWrappedSections_1
-
- Dim wrappingSection as String
- Dim wrappedSection as String
- Dim testText as String
-
- wrappingSection = "wrappingSection"
- wrappedSection = "wrappedSection"
- testText = "This is wrapped section test"
-
- PrintLog " - select Text inside a section and insert a section "
-
- Call hNewDocument
-
- PrintLog " insert wrapping section"
- Call wTypeKeys testText
- EditSelectAll
- fInsertSection(wrappingSection)
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Mod1 Right>",2
- Call wTypeKeys "<Mod1 Shift Right>"
-
- try
- PrintLog " insert wrapped section"
- fInsertSection(wrappedSection)
-
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>"
-
- if BereichsName.GetText <> wrappingSection then Warnlog "The wrapping section names is wrong : " +BereichsName.GetText
- Bereich.TypeKeys "<Down>"
- if BereichsName.GetText <> wrappedSection then Warnlog "The wrapped section names is wrong : " +BereichsName.GetText
-
- BereicheBearbeiten.Cancel
- catch
- Warnlog "Can't generate wrapped section"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------
-
-testcase tWrappedSections_2
-
- Dim wrappingSection as String
- Dim wrappedSection as String
- Dim testTextInFirstline as String
- Dim testTextInSecondline as String
-
- wrappingSection = "wrappingSection"
- wrappedSection = "wrappedSection"
- testTextInFirstline = "This is wrapped section test in first line"
- testTextInSecondline = "This is wrapped section test in second line"
-
- printlog " - select text across a section an insert a section "
- Call hNewDocument
-
- PrintLog " Insert wrapped section"
- Call wTypeKeys "<Return>"
- Call wTypeKeys(testTextInFirstline)
- Call wTypeKeys "<Return>"
- Call wTypeKeys(testTextInSecondline)
- Call wTypeKeys "<MOD1 HOME><SHIFT END>"
- Call fInsertSection(wrappedSection)
-
- EditSelectAll
- try
- PrintLog " Insert wrapping section"
- Call fInsertSection(wrappingSection)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<UP>"
- if BereichsName.GetText <> wrappingSection then
- QAErrorLog "#102552# - The wrapping section names is wrong."
- end if
- Bereich.TypeKeys "<Down>"
- if BereichsName.GetText <> wrappedSection then
- QAErrorLog "#102552# - The wrapped section names is wrong."
- end if
- BereicheBearbeiten.Cancel
- catch
- Warnlog "Can't generate wrapping section"
- endcatch
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tWrappedSections_3
-
- Dim wrappingSection as String
- Dim wrappedSection as String
- Dim testText as String
- Dim contentInWrappedSection as String
-
- wrappingSection = "wrappingSection"
- wrappedSection = "wrappedSection"
- testText = "This is wrapped section test"
- contentInWrappedSection = "wrapped "
-
- PrintLog " - wrapped sections are following properties of the wrapping section - write protection"
-
- Call hNewDocument
-
- PrintLog " Open options and check 'Direct-Cursor' in options"
- fCheckDirectCursor
-
- PrintLog " insert wrapping section"
- Call wTypeKeys testText
- EditSelectAll
- fInsertSection(wrappingSection)
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Mod1 Right>",2
- Call wTypeKeys "<Mod1 Shift Right>"
-
- PrintLog " insert wrapped section"
- fInsertSection(wrappedSection)
-
- PrintLog " format/section, choose protect in wrappingSection"
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>"
- Geschuetzt.Check
- BereicheBearbeiten.OK
-
- Call wTypeKeys "<Home><Shift End>"
- sleep(1)
- EditCopy
- sleep(1)
- if GetClipBoardtext = contentInWrappedSection then
- Call wTypeKeys "<Space>"
- Kontext "Active"
- if Active.Exists then
- Active.ok
- else
- Warnlog "- No warning when trying to write in protected area!"
- end if
- else
- Warnlog "The focus is NOT in the wrapped section!"
- end if
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tWrappedSections_4
-
- Dim wrappingSection as String
- Dim wrappedSection as String
- Dim testText as String
-
- wrappingSection = "wrappingSection"
- wrappedSection = "wrappedSection"
- testText = "This is wrapped section test"
-
- printlog " - wrapped sections are following properties of the wrapping section - visibility"
-
- Call hNewDocument
-
- PrintLog " insert wrapping section"
- Call wTypeKeys "<RETURN>"
- Call wTypeKeys testText
- Call wTypeKeys "<SHIFT HOME>"
- Call fInsertSection(wrappingSection)
- Call wTypeKeys "<HOME>"
- Call wTypeKeys "<MOD1 RIGHT>" , 2
- Call wTypeKeys "<MOD1 SHIFT RIGHT>"
- PrintLog " insert wrapped section"
- Call fInsertSection(wrappedSection)
- PrintLog " format/section, choose hide checkbox in wrappingSection"
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<UP>"
- Ausblenden.check
- BereicheBearbeiten.OK
-
- try
- EditSelectAll
- sleep(1)
- EditCopy
- sleep(1)
- warnlog "There should be nothing visible in the document but 'Edit / Copy' is available!"
- warnlog "Clipboard: " & GetClipBoardtext
- catch
- printlog "All sections are invisible."
- endcatch
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tWrappedSections_5
-
- Dim wrappingSection as String
- Dim wrappedSection as String
- Dim testText as String
-
- wrappingSection = "wrappingSection"
- wrappedSection = "wrappedSection"
- testText = "This is wrapped section test"
-
- PrintLog " - wrapped sections are following properties of the wrapping section - Foot-/endnote position"
-
- Call hNewDocument
- PrintLog " insert wrapping section"
- Call wTypeKeys testText
- EditSelectAll
- Call fInsertSection(wrappingSection)
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Mod1 Right>",2
- Call wTypeKeys "<Mod1 Shift Right>"
-
- PrintLog " insert wrapped section"
- fInsertSection(wrappedSection)
-
- PrintLog " format/section, choose wrappingSection , then press options button,"
- PrintLog " + then tabpage footnotes/endnotes ,"
- PrintLog " + check collect at end of text in footnotes area and"
- PrintLog " + check collect at end of text in endnotes area"
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>"
- 'press options button
- Optionen.Click
-
- 'tabpage footnotes/endnotes
- Kontext
- Active.Setpage TabFussEndnoten
- Kontext "TabFussEndnoten"
-
- 'check collect at end of text in footnotes area and
- 'check collect at end of text in endnotes area
- FussnotenAmTextendeSammeln.Check
- EndnotenAmBereichsendeSammeln.Check
-
- TabFussEndnoten.OK
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.OK
-
- PrintLog " format/section again, choose wrappedSection , then press options button,"
- PrintLog " + then tabpage footnotes/endnotes ,"
- PrintLog " + check if collect at end of text in footnotes area and"
- PrintLog " + collect at end of text in endnotes area are checked"
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Down>"
- 'press options button
- Optionen.Click
-
- 'tabpage footnotes/endnotes
- Kontext
- Active.Setpage TabFussEndnoten
- Kontext "TabFussEndnoten"
-
- PrintLog " check if collect at end of text in footnotes area is checked"
- if FussnotenAmTextendeSammeln.IsChecked <> TRUE then
- Warnlog "The footnotes check option is NOT checked in wrappedSection"
- end if
-
- PrintLog " check if collect at end of text in endnotes area is checked"
- if EndnotenAmBereichsendeSammeln.IsChecked <> TRUE then
- Warnlog "The endnotes check option is NOT checked in wrappedSection"
- end if
-
- TabFussEndnoten.Cancel
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tWrappedSections_6
-
- Dim wrappingSection as String
- Dim wrappedSection as String
- Dim testText as String
- Dim columnInwrappingSection as String
- Dim columnInwrappedSection as String
-
- wrappingSection = "wrappingSection"
- wrappedSection = "wrappedSection"
- testText = "This is wrapped section test"
- columnInwrappingSection = "2"
- columnInwrappedSection = "3"
-
- PrintLog " - The formatting of columns of sectionWrapping and sectionWrapped can be configured separately"
-
- Call hNewDocument
-
- PrintLog " insert wrapping section"
- Call wTypeKeys testText
- EditSelectAll
- fInsertSection(wrappingSection)
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Mod1 Right>",2
- Call wTypeKeys "<Mod1 Shift Right>"
-
- PrintLog " insert wrapped section"
- fInsertSection(wrappedSection)
-
- PrintLog " format/section, choose wrappingSection , then press options button,"
- PrintLog " + then tabpage columns, set columns to $columnInwrappingSection"
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>"
- 'press options button
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- 'Set column to $columnInwrappingSection
- Anzahl.Settext columnInwrappingSection
- TabSpalten.OK
-
- PrintLog " format/section, choose wrappedSection , then press options button,"
- PrintLog " + then tabpage columns, set columns to $columnInwrappedSection"
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Down>"
- 'press options button
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- 'Set column to $columnInwrappedSection
- Anzahl.Settext columnInwrappedSection
- TabSpalten.OK
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.OK
-
- PrintLog " format/section again, then check if columns is configured separately"
- 'check columns in wrappingSection
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- if Anzahl.Gettext <> columnInwrappingSection then
- Warnlog "The volumn in wrappingSection should be " +columnInwrappingSection +" but get " + Anzahl.Gettext
- end if
- TabSpalten.Cancel
-
- 'check columns in wrappedSection
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Down>"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- if Anzahl.Gettext <> columnInwrappedSection then
- Warnlog "The volumn in wrappedSection should be " +columnInwrappedSection +" but get " + Anzahl.Gettext
- end if
- TabSpalten.Cancel
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------
-
-testcase tWrappedSections_7
-
- Dim wrappingSection as String
- Dim wrappedSection as String
- Dim testText as String
- Dim testFileWrapping , testFileWrapped as String
-
- wrappingSection = "wrappingSection"
- wrappedSection = "wrappedSection"
- testText = "This is wrapped section test"
- testFileWrapping = ConvertPath ( gTesttoolPath + "writer\optional\input\graphics\jolink.jpg")
- testFileWrapped = ConvertPath ( gTesttoolPath + "writer\optional\input\graphics\bild.jpg")
-
- PrintLog " - The background graphic of sectionWrapping and sectionWrapped can be configured separately"
-
- Call hNewDocument
- PrintLog " insert wrapping section"
- Call wTypeKeys testText
- EditSelectAll
- Call fInsertSection(wrappingSection)
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Mod1 Right>",2
- Call wTypeKeys "<Mod1 Shift Right>"
-
- PrintLog " insert wrapped section"
- Call fInsertSection(wrappedSection)
-
- PrintLog " format/section,"
- PrintLog " + choose wrappingSection , then press options button ,"
- PrintLog " + then tabpage backgroud / graphic, browse a picture ,"
- PrintLog " + choose 'Position' in type ."
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>"
- 'press options button
- Optionen.Click
-
- Kontext
- Active.SetPage TabHintergrund
- sleep 1
- Kontext "TabHintergrund"
-
- Als.Select (2)
- sleep 1
- Durchsuchen.click
-
- Kontext "GrafikEinfuegenDlg"
- Dateiname.SetText testFileWrapping
- sleep 1
- Oeffnen.Click
- sleep 2
-
- Kontext "TabHintergrund"
- Position.Check
-
- TabHintergrund.OK
- PrintLog " choose wrappingSection , then press options button ,"
- PrintLog " + then tabpage backgroud / graphic, browse a picture ,"
- PrintLog " + choose 'area' in type ."
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Down>"
- 'press options button
- Optionen.Click
-
- Kontext
- Active.SetPage TabHintergrund
- sleep 1
- Kontext "TabHintergrund"
-
- Als.Select (2)
- sleep 1
- Durchsuchen.click
-
- Kontext "GrafikEinfuegenDlg"
- Dateiname.SetText testFileWrapped
- sleep 1
- Oeffnen.Click
- sleep 2
-
- Kontext "TabHintergrund"
- Flaeche.Check
- TabHintergrund.OK
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.OK
-
- PrintLog " format/section again,"
- PrintLog " + choose wrappingSection , then press options button,"
- PrintLog " + then tabpage background / graphic,"
- PrintLog " + check if 'Position' is checked in type"
- FormatSections
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Up>"
- 'press options button
- Optionen.Click
-
- Kontext
- Active.SetPage TabHintergrund
- sleep 1
- Kontext "TabHintergrund"
- Als.Select (2)
- sleep 1
-
- if Position.IsChecked <> TRUE then
- Warnlog "'Position' is NOT checked in type"
- end if
-
- TabHintergrund.Cancel
-
- PrintLog " choose wrappedSection , then press options button,"
- PrintLog " + then tabpage backgroud / graphic,"
- PrintLog " + check if 'Area' is checked in type ."
- Kontext "BereicheBearbeiten"
- Bereich.TypeKeys "<Down>"
- 'press options button
- Optionen.Click
-
- Kontext
- Active.SetPage TabHintergrund
- sleep 1
- Kontext "TabHintergrund"
- Als.Select (2)
- sleep 1
-
- if Flaeche.IsChecked <> TRUE then
- Warnlog "'Area' is NOT checked in type"
- end if
- TabHintergrund.Cancel
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/section/w_section_4.inc b/testautomation/writer/optional/includes/section/w_section_4.inc
deleted file mode 100644
index 632956e92d17..000000000000
--- a/testautomation/writer/optional/includes/section/w_section_4.inc
+++ /dev/null
@@ -1,1509 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Functional-Test for Section.
-'*
-'************************************************************************
-'*
-' #1 tSectionInTables_1
-' #1 tSectionInTables_2
-' #1 tSectionInTables_3
-' #1 tSectionInTables_4
-' #1 tSectionInTables_5
-' #1 tSectionInTables_6
-' #1 tSectionInTables_7
-' #1 tSectionInFootnotes_1
-' #1 tSectionInFootnotes_2
-' #1 tEditSection_1
-' #1 tEditSection_2
-' #1 tEditSection_3
-' #1 tEditSection_4
-' #1 tEditSection_5
-' #1 tParagraphSection_1
-' #1 tParagraphSection_2
-' #1 tParagraphSection_3
-' #1 tScenarioSection_1
-' #1 tScenarioSection_2
-' #1 tCTLSection_1
-' #1 tCTLSection_2
-'*
-'\***********************************************************************
-
-sub w_section_4
-
- printLog Chr(13) + "- Sections in special areas -"
-
- printLog Chr(13) + "--- Sections in tables ---"
- Call tSectionInTables_1 'insert section in empty cell
- Call tSectionInTables_2 'select text in a cell and insert section
- Call tSectionInTables_3 'insert multicolumn-section into cell
- Call tSectionInTables_4 'insert footnote into section which is in table
- Call tSectionInTables_5 'hide section in cell, resize cell via key shortcuts, make section visible again
- Call tSectionInTables_6 'insert a section when you have a multi-selection in a table must be impossible
- Call tSectionInTables_7 'insert a section when cells are selected must be impossible
-
- printLog Chr(13) + "--- Sections in footnote areas ---"
- Call tSectionInFootnotes_1 'insert a simple section over some words or lines
- Call tSectionInFootnotes_2 'insert section into footnote that spreads over several pages
-
- printLog Chr(13) + "- Edit sections later on (via Format - Sections...) -"
- Call tEditSection_1 'uncheck "Autowidth" and vary width manually
- Call tEditSection_2 'hide section
- Call tEditSection_3 'protect section
- Call tEditSection_4 'remove link(s), also via Edit - Links
- Call tEditSection_5 'Remove section
-
- printLog Chr(13) + "- section breaks (several following sections) -"
- Call tParagraphSection_1 'Keep paragraphs together
- Call tParagraphSection_2 'paragraph spacing
- Call tParagraphSection_3 'paragraph borders
-
- printLog Chr(13) + "- Test scenarios -"
- Call tScenarioSection_1 'create Masterdocument from another document that also contains sections
- Call tScenarioSection_2 'create Masterdocument from another document that also contains sections and footnotes
-
- printLog Chr(13) + "- CTL specials -"
- Call tCTLSection_1 'CTL specials -- insert/sections /Columns
- Call tCTLSection_2 'CTL specials -- format/section/options /Columns
-
-end sub
-
-'***********************************************************************
-
-testcase tSectionInTables_1
-
- Dim tableName as String
- Dim columnNumber as String
- Dim rowNumber as String
- Dim sectionName as String
-
- tableName = "testTable"
- columnNumber = "4"
- rowNumber = "2"
-
- sectionName = "tableSection"
-
- '/// insert section in empty cell ///
- PrintLog " - insert section in empty cell "
-
- Call hNewDocument
-
- '/// insert a table
- Call fInsertTable(tableName , columnNumber, rowNumber)
-
- '/// insert section in empty cell
- try
- Call fInsertSection(sectionName)
-
- ' Check the section name is correct or NOT (Format/Section)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sectionName then warnlog "The section Name is wrong : " & BereichsName.Gettext
- BereicheBearbeiten.Cancel
- catch
- Warnlog "insert section in empty cell failed"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------------
-
-testcase tSectionInTables_2
-
- Dim tableName as String
- Dim columnNumber as String
- Dim rowNumber as String
- Dim testText as String
- Dim sectionName as String
-
- tableName = "testTable"
- columnNumber = "4"
- rowNumber = "2"
- testText = "Table-Section"
-
- sectionName = "tableSection"
-
- '/// select text in a cell and insert section ///
- PrintLog " - select text in a cell and insert section "
-
- Call hNewDocument
-
- '/// insert a table
- Call fInsertTable(tableName , columnNumber, rowNumber)
-
- '/// input some test text in the table
- Call wTypeKeys testText
-
- '/// select text
- Call wTypeKeys "<Shift Home>"
-
- '/// insert section include select text
- try
- Call fInsertSection(sectionName)
-
- ' Check the section name is correct or NOT (Format/Section)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sectionName then warnlog "The section Name is wrong : " & BereichsName.Gettext
- BereicheBearbeiten.Cancel
-
- ' Check the content in section is correct or NOT
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Shift End>"
- EditCopy
- if GetClipBoardText <> testText then Warnlog "The content in section is NOT right : " +GetClipBoardText
-
- catch
- Warnlog "insert section which include text failed"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------------------
-
-testcase tSectionInTables_3
-
- Dim tableName as String
- Dim columnNumber as String
- Dim rowNumber as String
- Dim sectionName as String
- Dim columnInSection as String
-
- tableName = "testTable"
- columnNumber = "4"
- rowNumber = "2"
- sectionName = "tableSection"
- columnInSection = "3"
-
- '/// insert multicolumn-section into cell ///
- PrintLog " - insert multicolumn-section into cell "
-
- Call hNewDocument
-
- '/// insert a table
- Call fInsertTable(tableName , columnNumber, rowNumber)
-
- '/// insert section with column = columnInSection in empty cell
- try
- InsertSection
- Sleep 1
-
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sectionName
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- Anzahl.Settext columnInSection
- TabSpalten.OK
- sleep 1
-
- ' Check the section name is correct or NOT (Format/Section)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sectionName then warnlog "The section Name is wrong : " & BereichsName.Gettext
-
- ' Check the section column is correct or NOT (options button)
- Optionen.Click
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
- if Anzahl.Gettext <> columnInSection then Warnlog "The volumn should be " +columnInSection +" but get " + Anzahl.Gettext
- TabSpalten.Cancel
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
- catch
- Warnlog "insert section in empty cell failed"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'------------------------------------------------------------------------
-
-testcase tSectionInTables_4
-
- Dim tableName as String
- Dim columnNumber as String
- Dim rowNumber as String
- Dim sectionName as String
- Dim footNote as String
- Dim endNote as String
-
- tableName = "testTable"
- columnNumber = "4"
- rowNumber = "2"
-
- sectionName = "tableSection"
- footNote = "Foot"
- endNote = "End"
-
- '///insert footnote into section which is in table ///
- PrintLog " - insert footnote into section which is in table "
-
- Call hNewDocument
-
- '/// insert a table
- Call fInsertTable(tableName , columnNumber, rowNumber)
-
- try
- '/// insert section
- Call fInsertSection(sectionName)
-
- Call wTypeKeys "<Up>"
-
- '/// insert a footnote
- Call fInsertFootnote("character",footNote)
-
- Call wTypeKeys "<PageUp>"
-
- '/// insert a endnote
- fInsertEndnote("character",endNote)
-
- Call wTypeKeys "<PageUp>"
-
- '/// Check the section name is correct or NOT (Format/Section)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sectionName then warnlog "The section Name is wrong : " & BereichsName.Gettext
- BereicheBearbeiten.Cancel
-
- '/// Check the footnote and endnote are correct or NOT
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipBoardText <> footNote+endNote then Warnlog "The footnote/endnote are NOt inserted into section correctly!"
- catch
- Warnlog "insert section in empty cell failed"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------------------
-
-testcase tSectionInTables_5
- Dim tableName as String
- Dim columnNumber as String
- Dim rowNumber as String
- Dim testText as String
- Dim sectionName as String
-
- tableName = "testTable"
- columnNumber = "4"
- rowNumber = "2"
- testText = "Hide-Section"
- sectionName = "tableSection"
-
- '/// Hide section in cell, resize cell via key shortcuts, make section visible again ///
- printlog " - hide section in cell, resize cell via key shortcuts, make section visible again"
- Call hNewDocument
-
- '/// insert a table
- Call wTypeKeys "<RETURN>"
- Call fInsertTable(tableName , columnNumber, rowNumber)
- '/// input some test text , select text and insert a section with hide option
- Call wTypeKeys testText
- Call wTypeKeys "<SHIFT HOME>"
- try
- InsertSection
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sectionName
- Ausblenden.check
- TabBereiche.OK
- sleep(1)
- '/// Check the content in section is hidden or NOT
- SetClipboard = ""
- Call wTypeKeys "<LEFT><DOWN>"
- Call wTypeKeys "<SHIFT END>"
- try
- EditCopy
- catch
- printlog "There is no text in the document. Good."
- endcatch
- if GetClipboardText = "" then
- '/// Resize cell via key shortcuts
- Call wTypeKeys "<MOD1 MOD2 RIGHT>" , 2
- '/// UnCheck hide option (Format/Section)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Ausblenden.Uncheck
- BereicheBearbeiten.OK
- sleep(2)
- Call wTypeKeys "<LEFT><HOME>"
- Call wTypeKeys "<SHIFT END>"
- EditCopy
- if GetClipBoardText <> testText then warnlog "The content in section should be visible but get : " & GetClipBoardText
- else
- QAErrorLog "#99460# The content in section is NOT hidden!"
- end if
- catch
- warnlog "insert section which include text failed"
- endcatch
-
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------
-
-testcase tSectionInTables_6
-
- Dim tableName as String
- Dim columnNumber as String
- Dim rowNumber as String
- Dim testText as String
- Dim selectedString as String
- Dim sectionName as String
-
- tableName = "testTable"
- columnNumber = "4"
- rowNumber = "2"
- testText = "Mul-s-Mul"
- selectedString = "Mul"
-
- sectionName = "tableSection"
-
- '/// insert a section when you have a multi-selection in a table must be impossible ///
- PrintLog " - insert a section when you have a multi-selection in a table must be impossible"
-
- Call hNewDocument
-
- '/// insert a table
- Call fInsertTable(tableName , columnNumber, rowNumber)
-
- '/// input some words and do multi-selection
- Call wTypeKeys testText
- fMultiSelection(selectedString)
-
- '/// insert section
- try
- Call fInsertSection(sectionName)
- Warnlog "Create section should be impossible!"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------------------
-
-testcase tSectionInTables_7
-
- Dim tableName as String
- Dim columnNumber as String
- Dim rowNumber as String
- Dim sectionName as String
-
- tableName = "testTable"
- columnNumber = "4"
- rowNumber = "2"
-
- sectionName = "tableSection"
-
- '/// insert a section when cells are selected must be impossible ///
- PrintLog " - insert a section when cells are selected must be impossible"
-
- Call hNewDocument
-
- '/// insert a table
- Call fInsertTable(tableName , columnNumber, rowNumber)
-
- '/// more than one cell are selected
- Call wTypeKeys "<Shift Right>",2
-
- '/// insert section
- try
- Call fInsertSection(sectionName)
- Warnlog "Create section should be impossible!"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------------------------
-
-testcase tSectionInFootnotes_1
-
- Dim sectionName as String
-
- sectionName = "footnoteSection"
-
- '/// insert a simple section over some words or lines ///
- PrintLog " - insert a simple section over some words or lines "
-
- Call hNewDocument
-
- '/// + insert footnote
- Call fInsertFootnote("automatic")
-
- '/// + insert some dummy text in the footnote area
- wBlindtextEinfuegen
-
- EditSelectAll
-
- '/// + insert a section for selected words
- try
- Call fInsertSection(sectionName)
-
- ' Check the section name is correct or NOT (Format/Section)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sectionName then warnlog "The section Name is wrong : " & BereichsName.Gettext
- BereicheBearbeiten.Cancel
- catch
- Warnlog "insert a section failed !"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'--------------------------------------------------------------------
-
-testcase tSectionInFootnotes_2
-
- Dim sectionName as String
-
- sectionName = "footnoteSection"
-
- '/// insert section into footnote that spreads over several pages ///
- PrintLog " - insert section into footnote that spreads over several pages "
-
- Call hNewDocument
-
- '/// insert footnote
- Call fInsertFootnote("automatic")
- sleep(2)
- '/// insert some dummy text that spreads over several pages in the footnote area
- Call wBlindtextEinfuegen
- Call wBlindtextEinfuegen
- Call wBlindtextEinfuegen
- Call wBlindtextEinfuegen
- Call wBlindtextEinfuegen
- Call wBlindtextEinfuegen
- Call wBlindtextEinfuegen
-
- Kontext
- ViewNavigator
- sleep(1)
- Kontext "NavigatorWriter"
-
- '/// Check if dummy text is enough in footnote area
- if Seitennummer.GetText > "1" then
- EditSelectAll
- sleep(1)
- '/// + insert a section for selected words
- try
- Call fInsertSection(sectionName)
- ' Check the section name is correct or NOT (Format/Section)
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- if BereichsName.GetText <> sectionName then warnlog "The section Name is wrong : " & BereichsName.Gettext
- BereicheBearbeiten.Cancel
- catch
- Warnlog "insert a section failed !"
- endcatch
- else
- QAErrorLog "Not enough dummy text in the footnote area!"
- end if
- Call fCloseNavigator
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tEditSection_1
-
- Dim columnNumber as String
- Dim sectionName as String
- Dim width1 as String
- Dim width2 as String
-
- sectionName = "MultiColumnSection"
- columnNumber = "3"
-
- '/// uncheck "Autowidth" and vary width manually ///
- PrintLog " - Create multi-column section from format/section - options (TabPage Columns)"
-
- Call hNewDocument
-
- '/// insert a section with only 1 culumn, that means a normal section
- Call fInsertSection(sectionName)
- Call wTypeKeys "<Up>"
-
- '/// change the column number (format/section) with
- '/// + TabPage "Columns", set column to $columnNumber
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- '/// + Set column number
- Anzahl.Settext columnNumber
- Sleep 1
-
- 'This step is useless , but must be done ! Because after the aboved step, all control are NOT actived !
- Kontext
- Active.Setpage TabHintergrund
- Kontext "TabHintergrund"
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- '/// uncheck "Autowidth" and vary width manually
- AutomBreite.UnCheck
-
- width1 = "4" + gSeperator + "00" + gMeasurementUnit
- width2 = "3" + gSeperator + "00" + gMeasurementUnit
-
- Spaltenbreite1.Settext width1
- Sleep 1
- Spaltenbreite2.Settext width2
- Sleep 1
- TabSpalten.TypeKeys "<Tab>"
- Sleep 1
-
- TabSpalten.OK
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.OK
-
- Call wTypeKeys "<Up>"
- '/// Check the column's width
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- if Spaltenbreite1.Gettext <> width1 then Warnlog "column1 width is NOT correct , hope to get " + width1 + " but get " +Spaltenbreite1.Gettext
- if Spaltenbreite2.Gettext <> width2 then Warnlog "column2 width is NOT correct , hope to get " + width2 + " but get " +Spaltenbreite2.Gettext
-
- TabSpalten.Cancel
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'------------------------------------------------------
-
-testcase tEditSection_2
-
- Dim sectionName as String
- Dim testText as String
-
- sectionName = "HideSection"
- testText = "Hide Section"
-
- '/// hide section in format/section ///
- printlog " - hide section in format/section"
-
- Call hNewDocument
-
- '/// insert a normal section, and input some words
- Call wTypeKeys "<RETURN>"
- Call wTypeKeys testText
- Call wTypeKeys "<SHIFT HOME>"
- Call fInsertSection(sectionName)
- '/// Edit section with Format/Section and choose 'Hide'
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Ausblenden.check
- BereicheBearbeiten.OK
- sleep(1)
- '/// check the section and its contents
- printlog " -- check the section and its contents "
- try
- EditSelectAll
- EditCopy
- warnlog "'Edit / Copy' is usable but if there is nothing in the document (hidden section) it should be disabled!"
- catch
- printlog "Clipboard should be and is empty."
- endcatch
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------------------
-
-testcase tEditSection_3
-
- Dim sectionName as String
- Dim testText as String
-
- sectionName = "ProtectSection"
- testText = "Protect Section"
-
- '/// protect section in format/section ///
- PrintLog " - protect section in format/section"
-
- Call hNewDocument
-
- '/// Open options and check 'Direct-Cursor' in options ///
- fCheckDirectCursor
-
- '/// insert a normal section, and input some words
- Call wTypeKeys testText
- Call wTypeKeys "<Shift Home>"
-
- Call fInsertSection(sectionName)
-
- '/// Edit section with Format/Section and choose 'Protect'
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Geschuetzt.Check
- BereicheBearbeiten.OK
- sleep 1
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Space>"
- Kontext "Active"
- If Active.Exists then
- Active.ok
- else
- Warnlog "- No warning when trying to write in protected area!"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'--------------------------------------------------------
-
-testcase tEditSection_4
-
- Dim sectionName as String
- Dim testText as String
-
- sectionName = "LinkSection"
- testText = "Link Section"
-
- if Dir (gOfficePath + "user\work\tEditSection_4.odt") <> "" then kill (gOfficePath + "user\work\tEditSection_4.odt")
-
- '/// remove link(s), also via Edit - Links ///
- PrintLog " - remove link(s), also via Edit - Links "
-
- '/// edit a test file and save it
- Call hNewDocument
- Call wTypeKeys testText
- Call hFileSaveAsKill (gOfficePath + "user\work\tEditSection_4.odt")
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// insert a section and link the test file
- InsertSection
- Sleep 1
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext sectionName
- Verknuepfung.Check
-
- DateiVerknuepfung.Settext ConvertPath(gOfficePath + "user\work\tEditSection_4.odt")
- TabBereiche.OK
- Sleep 1
-
- '/// Edit section with Format/Section and unCheck 'link'
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Verknuepfung.UnCheck
- BereicheBearbeiten.OK
- sleep 1
-
- '/// the test file's content should be reserved after
- '/// + unlinking the test file
- EditSelectAll
- EditCopy
- if GetClipBoardText <> testText then Warnlog "the test file's content should be reserved after unlinking the test file"
-
- '/// check if the unlink is taken effect
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- If Verknuepfung.IsChecked = TRUE then Warnlog "The link option should be UnChecked!"
- BereicheBearbeiten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------
-
-testcase tEditSection_5
-
- Dim sectionName as String
- Dim testText as String
-
- sectionName = "RemoveSection"
- testText = "Remove Section Test"
-
- '/// remove section via Edit - undo ///
- PrintLog " - remove section via Edit - undo"
-
- Call hNewDocument
-
- '/// insert a normal section, and input some words
- Call wTypeKeys testText
- Call wTypeKeys "<Shift Home>"
- Call fInsertSection(sectionName)
-
- '/// remove section with Format/Section and click undo button
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
-
- 'click undo button
- Aufheben.Click
- Sleep 1
- BereicheBearbeiten.OK
- sleep 1
-
- 'check if section is still existed
- try
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
- Warnlog "There are should be no section existed!"
- catch
- endcatch
-
- '/// the test file's content should be reserved after removing the section
- EditSelectAll
- EditCopy
- if GetClipBoardText <> testText then Warnlog "the test file's content should be reserved after removing the section"
-
- Call hCloseDocument
-
-endcase
-
-'------------------------------------------------
-
-testcase tParagraphSection_1
-
- Dim documentName as String
- Dim sectionName as String
- Dim hopeResult as String
-
- documentName = ConvertPath(gTesttoolpath + "writer\optional\input\section\tParagraphSection_1.sxw")
- sectionName = "ParagraphSection"
- hopeResult = "He "
-
- '/// Keep paragraphs together ///
- PrintLog " - Keep paragraphs together"
-
- '/// Open a file with 4 paragraphs, the 4th paragraph is crossing the page
- hFileOpenLocally( documentName)
-
-
- EditSelectAll
- Call fInsertSection(sectionName)
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Up>",3
-
- FormatParagraph
- Kontext
- active.SetPage TabTextfluss
- kontext "TabTextfluss"
-
- '/// Check option "Do not split paragraphs"
- AbsatzNichtTrennen.Check
-
- TabTextfluss.OK
-
- Call wTypeKeys "<MOD1 Home>"
-
- 'Set the focus to the head of second page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Sleep 2
- fCloseNavigator
-
- Call wTypeKeys "<Shift MOD1 Right>"
- EditCopy
-
- if GetClipBoardText <> hopeResult then Warnlog "Something wrong in Keep paragraphs together test!"
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------
-
-testcase tParagraphSection_2
-
- Dim sectionName as String
- Dim beforeTextIntent1 as String
- Dim afterTextIntent1 as String
- Dim firstTextIntent1 as String
- Dim beforeTextSpace1 as String
- Dim afterTextSpace1 as String
- Dim beforeTextIntent2 as String
- Dim afterTextIntent2 as String
- Dim firstTextIntent2 as String
- Dim beforeTextSpace2 as String
- Dim afterTextSpace2 as String
-
- sectionName = "ParagraphSection"
-
- '/// paragraph spacing ///
- PrintLog " - paragraph spacing "
-
- Call hNewDocument
-
- '/// insert first paragraph , and do some configurations
- if wBlindtextEinfuegen() = false then
- Call hCloseDocument
- goto endsub
- end if
-
- if iSprache = 82 then
- Call wTypeKeys "<Return>"
- end if
- Call wTypeKeys "<Up>"
-
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
-
- beforeTextIntent1 = "0" + gSeperator + "10" + gMeasurementUnit
- afterTextIntent1 = "0" + gSeperator + "20" + gMeasurementUnit
- firstTextIntent1 = "0" + gSeperator + "30" + gMeasurementUnit
- beforeTextSpace1 = "0" + gSeperator + "40" + gMeasurementUnit
- afterTextSpace1 = "0" + gSeperator + "50" + gMeasurementUnit
-
- Vonlinks.SetText beforeTextIntent1
- VonRechts.SetText afterTextIntent1
- ErsteZeile.SetText firstTextIntent1
- Oben.SetText beforeTextSpace1
- Unten.SetText afterTextSpace1
- Automatisch.Check
- Registerhaltigkeit.UnCheck
- TabEinzuegeUndAbstaende.OK
-
- call wTypeKeys "<Down>"
- call wTypeKeys "<RETURN>"
-
- '/// insert second paragraph , and do some configurations which is different from the first one
- wBlindtextEinfuegen
- Call wTypeKeys "<Up>"
-
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
-
- beforeTextIntent2 = "0" + gSeperator + "60" + gMeasurementUnit
- afterTextIntent2 = "0" + gSeperator + "70" + gMeasurementUnit
- firstTextIntent2 = "0" + gSeperator + "80" + gMeasurementUnit
- beforeTextSpace2 = "0" + gSeperator + "90" + gMeasurementUnit
- afterTextSpace2 = "0" + gSeperator + "10" + gMeasurementUnit
-
- Vonlinks.SetText beforeTextIntent2
- VonRechts.SetText afterTextIntent2
- Automatisch.UnCheck
- ErsteZeile.SetText firstTextIntent2
- Oben.SetText beforeTextSpace2
- Unten.SetText afterTextSpace2
- Registerhaltigkeit.Check
- TabEinzuegeUndAbstaende.OK
-
- EditSelectAll
- Call fInsertSection(sectionName)
-
- 'Check the first paragraph's configuration
- Call wTypeKeys "<MOD1 Home>"
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
-
- if Automatisch.IsChecked <> TRUE then Warnlog "Something wrong with the checkbox 'Automatic' in first paragraph!"
- if Registerhaltigkeit.IsChecked = TRUE then Warnlog "Something wrong with the checkbox 'Register' in first paragraph!"
-
- if Vonlinks.GetText <> beforeTextIntent1 then Warnlog "Something wrong with the before-text-intent-area in the first paragraph"
- if VonRechts.GetText <> afterTextIntent1 then Warnlog "Something wrong with the after-text-intent-area in the first paragraph"
- if ErsteZeile.GetText <> firstTextIntent1 then Warnlog "Something wrong with the first-text-intent-area in the first paragraph"
- if Oben.GetText <> beforeTextSpace1 then Warnlog "Something wrong with the before-sparcing area in the first paragraph"
- if Unten.GetText <> afterTextSpace1 then Warnlog "Something wrong with the after-sparcing area in the first paragraph"
-
- TabEinzuegeUndAbstaende.Cancel
-
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Up>",3
-
- 'Check the second paragraph's configuration
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
-
- if Automatisch.IsChecked = TRUE then Warnlog "Something wrong with the checkbox 'Automatic' in the second paragraph!"
- if Registerhaltigkeit.IsChecked <> TRUE then Warnlog "Something wrong with the checkbox 'Register' in the second paragraph!"
-
- if Vonlinks.GetText <> beforeTextIntent2 then Warnlog "Something was wrong with the before-text-intent in the second paragraph!"
- if VonRechts.GetText <> afterTextIntent2 then Warnlog "Something wrong with the after-text-intent in the second paragraph!"
- if ErsteZeile.GetText <> firstTextIntent2 then Warnlog "Something wrong with the first-text-intent in the second paragraph!"
- if Oben.GetText <> beforeTextSpace2 then Warnlog "Something wrong with the before-text-sparcing area in the second paragraph!"
- if Unten.GetText <> afterTextSpace2 then Warnlog "Something wrong with the after-text-sparcing area in the second paragraph!"
-
- TabEinzuegeUndAbstaende.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------
-
-testcase tParagraphSection_3
-
- Dim sectionName as String
- Dim left1 as String
- Dim right1 as String
- Dim top1 as String
- Dim bottom1 as String
- Dim distance1 as String
- Dim left2 as String
- Dim distance2 as String
- Dim COMPAREvar1 as String
- Dim COMPAREvar2 as String
- Dim COMPAREvar3 as String
- Dim COMPAREvar4 as String
-
- sectionName = "ParagraphSection"
-
- '/// paragraph borders ///
- PrintLog " - paragraph borders "
-
- Call hNewDocument
-
- '/// insert first paragraph , and do some configurations
- if wBlindtextEinfuegen() = false then
- Call hCloseDocument
- goto endsub
- end if
- if iSprache = 82 then
- Call wTypeKeys "<Return>"
- end if
- Call wTypeKeys "<Up>"
-
- FormatParagraph
- Kontext
- active.SetPage TabUmrandung
- kontext "TabUmrandung"
-
- Vorgaben.Typekeys "<home><right>" ' 2nd from the left
- synchronisieren.UnCheck
-
- left1 = "0" + gSeperator + "1"
- right1 = "0" + gSeperator + "2"
- top1 = "0" + gSeperator + "3"
- bottom1 = "0" + gSeperator + "4"
- distance1 = "4" + gSeperator + "2"
-
- Links.SetText left1
- Rechts.SetText right1
- Oben.SetText top1
- Unten.SetText bottom1
-
- Position.TypeKeys "<home><right>" ' 2nd. from the left
- Groesse.SetText distance1
- SchattenFarbe.Select 2
- TabUmrandung.OK
-
- Call wTypeKeys "<Down>",2
-
- '/// insert second paragraph , and do some configurations
- '/// + which is different from the first one
- wBlindtextEinfuegen
- Call wTypeKeys "<Up>"
-
- FormatParagraph
- Kontext
- active.SetPage TabUmrandung
- kontext "TabUmrandung"
-
- Vorgaben.Typekeys "<home><right><right>" ' 3nd from the left
- synchronisieren.Check
-
- left2 = "0" + gSeperator + "6"
- distance2 = "4" + gSeperator + "7"
-
- Links.SetText left2
-
- Position.TypeKeys "<home><right><right>" ' 3nd. from the left
- Groesse.SetText distance2
- SchattenFarbe.Select 5
- TabUmrandung.OK
-
- EditSelectAll
- Call fInsertSection(sectionName)
-
- '<<< Check the FIRST paragraph's configuration >>>
- Call wTypeKeys "<MOD1 Home>"
-
- FormatParagraph
- Kontext
- active.SetPage TabUmrandung
- kontext "TabUmrandung"
-
- ' if synchronisieren.IsChecked = TRUE then Warnlog "The Synchronize option should NOT be checked in first paragraph!"
- COMPAREvar1 = Links.GetText
- COMPAREvar2 = Rechts.GetText
- COMPAREvar3 = Oben.GetText
- COMPAREvar4 = Unten.GetText
-
- printlog (InStr( COMPAREvar1, left1 ) = false)
- if InStr( COMPAREvar1, left1 ) = false then Warnlog "Something wrong with the Left -space to contents area in first paragraph"
- if InStr( COMPAREvar2, right1 ) = false then Warnlog "Something wrong with the Right -space to contents area in first paragraph"
- if InStr( COMPAREvar3, top1 ) = false then Warnlog "Something wrong with the Top -space to contents area in first paragraph"
- if InStr( COMPAREvar4, bottom1 ) = false then Warnlog "Something wrong with the Bottom -space to contents area in first paragraph"
-
- if InStr( Groesse.GetText, distance1 ) = false then Warnlog "Something wrong with the size in first paragraph"
-' Groesse.GetText <> distance1 then Warnlog "Something wrong with the size in first paragraph"
- if SchattenFarbe.GetSelIndex <> 2 then Warnlog "Something wrong in shadow color in the first paragraph"
-
- TabUmrandung.Cancel
-
- Call wTypeKeys "<MOD1 End>"
- Call wTypeKeys "<Up>",3
-
- '<<<Check the SECOND paragraph's configuration>>>
- FormatParagraph
- Kontext
- active.SetPage TabUmrandung
- kontext "TabUmrandung"
-
- ' if synchronisieren.IsChecked <> TRUE then Warnlog "The Synchronize option should be checked in second paragraph!"
-
- if InStr( Links.GetText, left2 ) = false OR InStr( Rechts.GetText, left2 ) = false OR InStr( Oben.GetText, left2 ) = false OR InStr( Unten.GetText, left2 ) = false then
- Warnlog "Something wrong in space to contents area in second paragraph"
- end if
-
- if InStr( Groesse.GetText, distance2 ) = false then Warnlog "Something wrong with the size in first paragraph"
- if SchattenFarbe.GetSelIndex <> 5 then Warnlog "Something wrong in shadow style area in the first paragraph"
-
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------
-
-testcase tScenarioSection_1
-
- Dim SectionName() as String
- Dim tempFile as String
- DIM sectionInMasterDoc
- Dim MasterDoc as String
- DIM ContentInMasterDoc() as String
- Dim i as integer
- Dim j as Integer
- Dim temp1 as String
- Dim temp2 as String
- Dim LinkFile as String
-
- '/// create Masterdocument from another document that also contains sections ///
- PrintLog " - create Masterdocument from another document that also contains sections"
-
- MasterDoc = Convertpath( gOfficePath + "user\work\tScenarioSection_1.odm" )
-
- SectionName = Array( _
- "tScenarioSection_11.odt", _
- "tScenarioSection_12.odt", _
- "tScenarioSection_13.odt", _
- )
-
- ContentInMasterDoc = Array( _
- "This is scenario Section test" , _
- "The content in hide section" , _
- "The content in protect section", _
- )
-
-
- j = UBound(SectionName)
-
- if FileExists ( MasterDoc ) then app.kill ( MasterDoc )
-
- For i = 0 to j
- tempFile = Convertpath( gOfficePath + "user\work\" + SectionName(i) )
- if FileExists ( tempFile ) then app.kill ( tempFile )
- next i
-
- '/// open testdocument (tScenarioSection_1.sxw) ///
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\section\tScenarioSection_1.sxw")
-
-
- '/// Select 'File /Send -> Create Masterdocument ///
- FileSendCreateMasterdocument
-
- '/// the 'Save as...' dialog has to appear ///
- Kontext "SendMasterDocument"
- if SendMasterDocument.NotExists then Warnlog "Save As - Dialog didn't appear!"
-
- '/// Select as template 'Default' ///
- Vorlage.Select 1
-
- '/// Save document as 'tScenarioSection_1.odm' ///
- Dateiname.SetText Convertpath( gOfficePath + "user\work\tScenarioSection_1" )
-
- Speichern.Click
- Sleep 3
-
- Kontext "Active"
- if Active.Exists then
- Active.yes
- else
- Warnlog "- No messagebox asking for the actualizationing of the master document !"
- end if
- Sleep 1
-
- Kontext "Navigator"
- if Navigator.Exists then
- Navigator.Close
- else
- Warnlog "Navigator in Master document isn't up!"
- end if
-
- Call wTypeKeys "<Up>" , 3
-
- '/// Check the sections in MasterDoc
- '/// 1) check the content is section
- '/// 2) check the section name
- '/// 3) check if the section is hidden (should NOT be hidden)
- '/// 4) check if the section is protected (should be protected)
- '/// 5) check if the section is linked and linked file is correct or not (should be linked)
-
- For i = 0 to j
-
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
-
- if GetClipboardText = ContentInMasterDoc(i) then
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
-
- if BereichsName.GetText <> SectionName(i) then
- Warnlog "The first section's name is wrong !"
- Warnlog "We hope it is " + SectionName(i) + " but get: " +BereichsName.GetText
- end if
- if Ausblenden.IsChecked = TRUE then Warnlog "The section should NOT be hidden"
- if Geschuetzt.IsChecked <> TRUE then Warnlog "The section should be protected"
- if Verknuepfung.IsChecked = TRUE then
- temp1 = LCase("user/work/" & SectionName(i))
- temp2 = LCase(Dateiname.GetText)
-
- if Instr(temp2, temp1) = 0 then Warnlog "The linked file is NOT correct!"
- else
- Warnlog "The section should be linked"
- end if
- BereicheBearbeiten.Cancel
- else
- Warnlog "The content in first section in Master file is wrong!"
- end if
-
- Call wTypeKeys "<Down>"
-
- next i
-
- Call hCloseDocument
-endcase
-
-'-------------------------------------------------------
-
-testcase tScenarioSection_2
-
- Dim SectionName() as String
- Dim tempFile as String
- DIM sectionInMasterDoc as String
- Dim MasterDoc as String
- DIM ContentInMasterDoc() as String
- Dim i as Integer
- Dim j as Integer
- Dim k as Integer
- Dim sValue as String
-
- '/// create Masterdocument from another document that also contains sections and footnotes
- PrintLog " - create Masterdocument from another document that also contains sections and footnotes"
-
- MasterDoc = Convertpath( gOfficePath + "user\work\tScenarioSection_2.sxg" )
-
- SectionName = Array( _
- "tScenarioSection_21.odt", _
- "tScenarioSection_22.odt", _
- "tScenarioSection_23.odt", _
- )
-
- ContentInMasterDoc = Array( _
- "This is scenario Section test" , _
- "FootNote1The content in hide sectionEndNote1" , _
- "FootNote2The content in protect sectionEndNote2", _
- )
-
- j = UBound(SectionName)
-
- if FileExists ( MasterDoc ) then app.kill ( MasterDoc )
-
- For i = 0 to j
- tempFile = Convertpath( gOfficePath + "user\work\" + SectionName(i) )
- if FileExists ( tempFile ) then app.kill ( tempFile )
- next i
-
- '/// open testdocument (tScenarioSection_2.sxw) ///
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\section\tScenarioSection_2.sxw")
-
-
- '/// Select 'File -> Send -> Create Masterdocument ///
- FileSendCreateMasterdocument
-
- '/// the 'Save as...' dialog has to appear ///
- Kontext "SendMasterDocument"
- if SendMasterDocument.NotExists then Warnlog "Save As - Dialog didn't appear!"
-
- '/// Select as template 'Default' ///
- Vorlage.Select 1
-
- '/// Save document as 'masterdoc.odm' ///
- Dateiname.SetText Convertpath( gOfficePath + "user\work\tScenarioSection_2" )
-
- Speichern.Click
- Sleep 3
-
- Kontext "Active"
- if Active.Exists then
- Active.yes
- else
- Warnlog "- No messagebox asking for the actualizationing of the master document !"
- end if
- Sleep 1
-
- Kontext "Active"
- if Active.Exists(5) then
- Active.Yes
- end if
-
- Kontext "Navigator"
- if Navigator.Exists then
- Navigator.Close
- else
- Warnlog "Navigator in Master document isn't up!"
- end if
-
- Call wTypeKeys "<Up>" , 3
-
- '/// Check the sections in MasterDoc
- '/// 1) check the content is section
- '/// 2) check the section name
- '/// 3) check if the section is hidden (should NOT be hidden)
- '/// 4) check if the section is protected (should be protected)
- '/// 5) check if the section is linked and linked file is correct or not (should be linked)
-
- For i = 0 to j
-
- Call wTypeKeys "<Home><Shift End>"
- EditCopy
-
- if GetClipboardText = ContentInMasterDoc(i) then
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
-
- if BereichsName.GetText <> SectionName(i) then
- Warnlog "The first section's name is wrong !"
- Warnlog "We hope it is " + SectionName(i) + " but get: " +BereichsName.GetText
- end if
-
- if Ausblenden.IsChecked = TRUE then Warnlog "The section should NOT be hidden"
- if Geschuetzt.IsChecked <> TRUE then Warnlog "The section should be protected"
- if Verknuepfung.IsChecked = TRUE then
- sValue = ConvertPath ( gOfficePath & "user/work/" + SectionName(i) )
- if Instr( ConvertPath(Dateiname.Gettext), sValue) = false then
- Warnlog "The linked file is NOT correct!"
- end if
- else
- Warnlog "The section should be linked"
- end if
- BereicheBearbeiten.Cancel
- else
- Warnlog "The content in first section in Master file is wrong!"
- end if
-
- Call wTypeKeys "<Down>"
-
- next i
-
- Call hCloseDocument
-
-endcase
-
-'----------------------------------------------
-
-testcase tCTLSection_1
-
- '/// CTL specials Check -- insert/sections ///
- PrintLog " - CTL specials -- insert/sections "
-
- Call hNewDocument
-
- '/// 1)Switch on "Complex scripts support" in Tools/Options/Language Settings/Languages
- ActiveDeactivateCTLSupport(True)
-
- '/// 2)Insert/sections / Columns
- InsertSection
- Sleep 1
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- '/// 3)Check if text direction listbox is visible
- if (TextDirection.Exists) then
-
- '/// 4)Check the default name
- if TextDirection.GetSelIndex <> 3 then
- Warnlog "The default name we hope is :" + TextDirection.GetItemText(3) +" but get: "+TextDirection.GetSelText
- end if
-
- '/// 5)Check the available values ( Should 3 items )
- if TextDirection.GetItemCount <> 3 then
- Warnlog "The values in TextDirection should be 3, but get " +TextDirection.GetItemCount
- end if
-
- else
- Warnlog "the textdirection listbox doesn't exist!"
- end if
-
- TabSpalten.Cancel
-
- 'Recover to default
- ActiveDeactivateCTLSupport(False)
-
- Call hCloseDocument
-
-endcase
-
-'-------------------------------------------------------
-
-testcase tCTLSection_2
-
- Dim SectionName as String
-
- SectionName = "CTLSection"
-
- '/// CTL specials -- format/section/options /Columns ///
- PrintLog " - CTL specials -- format/section/options /Columns "
-
- Call hNewDocument
-
- '/// 1)Switch on "Complex scripts support" in Tools/Options/Language Settings/Languages
- ActiveDeactivateCTLSupport(True)
-
- '/// 2)Insert a section
- Call fInsertSection(SectionName)
-
- '/// 3)format/section/options /Columns
- Kontext
- FormatSections
- Kontext "BereicheBearbeiten"
- Optionen.Click
-
- Kontext
- Active.Setpage TabSpalten
- Kontext "TabSpalten"
-
- '/// 4)Check if text direction listbox is visible
- if (TextDirection.Exists) then
-
- '/// 5)Check the default name
- if TextDirection.GetSelIndex <> 3 then
- Warnlog "The default name we hope is :" + TextDirection.GetItemText(3) +" but get: "+TextDirection.GetSelText
- end if
-
- '/// 6)Check the available values ( Should 3 items )
- if TextDirection.GetItemCount <> 3 then
- Warnlog "The values in TextDirection should be 3, but get " +TextDirection.GetItemCount
- end if
-
- else
- Warnlog "the textdirection listbox doesn't exist!"
- end if
-
- TabSpalten.Cancel
-
- Kontext
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Cancel
-
- 'Recover to default
- ActiveDeactivateCTLSupport(False)
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/section/w_section_tools.inc b/testautomation/writer/optional/includes/section/w_section_tools.inc
deleted file mode 100644
index 2d441cad8450..000000000000
--- a/testautomation/writer/optional/includes/section/w_section_tools.inc
+++ /dev/null
@@ -1,186 +0,0 @@
-'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@oracle.com
-'*
-'* short description : tools/functions for the Section-testing
-'*
-'************************************************************************
-'*
-' #1 fInsertSection
-' #1 fInsertBookmark
-' #1 fInsertFootnote
-' #1 fInsertEndnote
-' #1 fInsertTable
-' #1 fCloseNavigator
-' #1 fCheckDirectCursor
-' #1 fMultiSelection
-'*
-'\***********************************************************************
-
-'******************************************************
-'* insert a section with name SectionName **
-'******************************************************
-function fInsertSection(SectionName as string)
- InsertSection
- wait 500
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- Bereichsliste.Settext SectionName
- TabBereiche.OK
- wait 500
-end function
-
-'******************************************************
-'* insert a bookmark with name **
-'******************************************************
-function fInsertBookmark(BookmarkName as string)
-
- InsertBookmark
- Kontext
- Kontext "TextmarkeEinfuegen"
- Textmarken.SetText BookmarkName
- TextmarkeEinfuegen.OK
-
-end function
-
-
-'******************************************************
-'* insert a footnote **
-'******************************************************
-function fInsertFootnote(Numbering as string , ConTentInCharater as String)
-
- InsertFootnote
- Kontext "FussnoteEinfuegen"
-
- ' check footnote
- Fussnote.Check
-
- Select Case Numbering
- Case "automatic" : Automatisch.Check
- Case "character" : Zeichen.Check
- ZeichenText.SetText ConTentInCharater
- Case else : Warnlog "Maybe new options! :-)"
- Automatisch.Check
- end select
-
- FussnoteEinfuegen.OK
-
-end function
-
-
-'******************************************************
-'* insert a endnote **
-'******************************************************
-function fInsertEndnote(Numbering as string , ConTentInCharater as String)
-
- InsertFootnote
- Kontext "FussnoteEinfuegen"
-
- ' check endnote
- Endnote.Check
-
- Select Case Numbering
- Case "automatic" : Automatisch.Check
- Case "character" : Zeichen.Check
- ZeichenText.SetText ConTentInCharater
- Case else : Warnlog "Maybe new options! :-)"
- Automatisch.Check
- end select
-
- FussnoteEinfuegen.OK
-
-end function
-
-
-'******************************************************
-'* insert a table with name TableName **
-'* Column is table's column's number **
-'* Row is table's row 's number **
-'******************************************************
-function fInsertTable(TableName as string, ColumnNumber as string, RowNumber as string)
-
- InsertTableWriter
- Sleep 1
- Kontext "TabelleEinfuegenWriter"
- TabellenName.SetText TableName
-
- Spalten.SetText ColumnNumber
- Zeilen.SetText RowNumber
-
- TabelleEinfuegenWriter.OK
-
-end function
-
-'*******************************************************
-'* Close Navigator **
-'*******************************************************
-function fCloseNavigator
-
- Kontext
- Kontext "Navigator"
- try
- Navigator.Close
- catch
- Warnlog "Could not close Navigator!"
- endcatch
-
-end function
-
-'*******************************************************
-'* Open options and check 'Direct-Cursor' in options **
-'*******************************************************
-function fCheckDirectCursor
-
- ToolsOptions
- Call hToolsOptions("WRITER","FormattingAids")
- Zonen_Cursor.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
-end function
-
-
-'*********************************************************
-'* This function is evaluated multisection **
-'* selectString is the selected string in the text **
-'* There must be more than 2 selectStrings in the text **
-'*********************************************************
-function fMultiSelection(selectedString as String)
-
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
-
- SearchFor.SetText selectedString
- SearchAll.Click
- Sleep 1
-
- FindAndReplace.Close
-
-end function
diff --git a/testautomation/writer/optional/includes/shortcut/w_shortcuts.inc b/testautomation/writer/optional/includes/shortcut/w_shortcuts.inc
deleted file mode 100644
index da1b7dd1704c..000000000000
--- a/testautomation/writer/optional/includes/shortcut/w_shortcuts.inc
+++ /dev/null
@@ -1,859 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Shortcut-test in writer
-'*
-'************************************************************************
-'*
-'* tShortcutGlobalNew
-'* tShortcutGlobalOpen
-'* tShortcutGlobalSave
-'* tShortcutGlobalSaveAs
-'* tShortcutSelectAll
-'* tShortcutFindAndReplace
-'* tShortcutBold
-'* tShortcutItalic
-'* tShortcutUnderline
-'* tShortcutDoubleUnderline
-'* tShortcutAlign
-'* tShortcutSuperscript
-'* tShortcutSubscript
-'*
-'\***********************************************************************
-
-sub w_shortcuts
-
- Call tShortcutGlobalNew
- Call tShortcutGlobalOpen
- Call tShortcutGlobalSave
- Call tShortcutGlobalSaveAs
- Call tShortcutSelectAll
- Call tShortcutFindAndReplace
- Call tShortcutBold
- Call tShortcutItalic
- Call tShortcutUnderline
- Call tShortcutDoubleUnderline
- Call tShortcutAlign
- Call tShortcutSuperscript
- Call tShortcutSubscript
-
-end sub
-
-testcase tShortcutGlobalNew
- Dim vShortcut as string
- Dim vNoOfDocs as integer
- '/// This testcases checks the global shortcut -> New
-
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'New' in en/sv/pt-BR is <Strg+N>
- '/// Shortcut for 'New' in de is <Strg+N>
- '/// Shortcut for 'New' in fr is <Strg+N>
- '/// Shortcut for 'New' in it is <Strg+N>
- vShortcut = "<Mod1 N>"
- Case 34
- '/// Shortcut for 'New' in es is <Strg+U>
- vShortcut = "<Mod1 U>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- vNoOfDocs = GetDocumentCount
- '/// After executing previous named shortcut a new document should be opened
- Call wTypeKeys ( vShortcut )
- wait 500
- if GetDocumentCount = (vNoOfDocs + 1) then
- printlog "Shortcut " & vShortcut & " opens a new document!"
- '/// close document
- Call hCloseDocument
- else
- Warnlog "Shortcut " & vShortcut & " didn't open a new document!"
- end if
- '/// Close document opened on start
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutGlobalOpen
- Dim vShortcut as string
- '/// This testcases checks the global shortcut -> Open
-
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 49, 31, 33, 39, 36, 46, 55, 86, 82, 81
- '/// Shortcut for 'Open' in en/sv/pt-BR is <Strg+O>
- '/// Shortcut for 'Open' in de is <Strg+O>
- '/// Shortcut for 'Open' in fr is <Strg+O>
- '/// Shortcut for 'Open' in it is <Strg+O>
- vShortcut = "<Mod1 O>"
- Case 34
- '/// Shortcut for 'Open' in es is <Strg+A>
- vShortcut = "<Mod1 A>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// After executing previous named shortcut FileOpen dialog should be opened
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists then
- printlog "Shortcut " & vShortcut & " opens FileOpen dialog"
- '/// close FileOpenDialog
- OeffnenDlg.Cancel
- else
- printlog "Shortcut " & vShortcut & " didn't open FileOpen dialog"
- end if
- '/// Close document opened on start
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutGlobalSave
- Dim vShortcut as string
- '/// This testcases checks the global shortcut -> Save
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Save' in en/sv/pt-BR is <Strg+S>
- '/// Shortcut for 'Save' in de is <Strg+S>
- '/// Shortcut for 'Save' in fr is <Strg+S>
- '/// Shortcut for 'Save' in it is <Strg+S>
- vShortcut = "<Mod1 S>"
- Case 34
- '/// Shortcut for 'Save' in es is <Strg+G>
- vShortcut = "<Mod1 G>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// After executing previous named shortcut FileSave dialog should be opened
- Call wTypeKeys ( vShortcut )
- Kontext "SpeichernDlg"
- if SpeichernDlg.Exists then
- printlog "Shortcut " & vShortcut & " opens FileSave dialog"
- '/// close FileOpenDialog
- SpeichernDlg.Cancel
- else
- printlog "Shortcut " & vShortcut & " didn't open FileSave dialog"
- end if
- '/// Close document opened on start
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutGlobalSaveAs
- Dim vShortcut as string
- '/// This testcases checks the global shortcut -> Save
-
- '/// Open a new text document
- Call hNewDocument
- vShortcut = "<Mod1 Shift S>"
-
- '/// After executing previous named shortcut FileSave dialog should be opened
- Call wTypeKeys ( vShortcut )
- Kontext "SpeichernDlg"
- if SpeichernDlg.Exists then
- printlog "Shortcut " & vShortcut & " opens FileSaveAs dialog"
- '/// close FileOpenDialog
- SpeichernDlg.Cancel
- else
- printlog "Shortcut " & vShortcut & " didn't open FileSaveAs dialog"
- end if
- '/// Close document opened on start
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutSelectAll
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Select All
-
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Select All' in en/sv/pt-BR is <Strg+A>
- '/// Shortcut for 'Select All' in de is <Strg+A>
- '/// Shortcut for 'Select All' in fr is <Strg+A>
- '/// Shortcut for 'Select All' in it is <Strg+A>
- vShortcut = "<Mod1 A>"
- Case 34
- '/// Shortcut for 'Select All' in es is <Strg+E>
- vShortcut = "<Mod1 E>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// write down 'The complete text should be selected'
- Call wTypeKeys ( "The complete text should be selected" )
- '/// execute shortcut->the complete text should be selected
- Call wTypeKeys ( vShortcut )
- wait 500
- try
- EditCopy
- catch
- Warnlog "Text seems not to be selected! Edit / Copy is disabled"
- Call hCloseDocument
- goto endsub
- endcatch
-
- if GetClipboardText <> "The complete text should be selected" then
- Warnlog "Not all of the text has been selected with shortcut " & vShortcut
- else
- printlog "All of the text has been selected!"
- end if
-
- '/// close document previously opened
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutFindAndReplace
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Find & Replace and Repeat Search
- '/// Open a new text document
- Call hNewDocument
- '/// Check shortcut to open 'Find & Replace' dialog
- Select Case iSprache
- Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Find & Replace' in en/sv/pt-BR is <Strg+F>
- '/// Shortcut for 'Find & Replace' in de is <Strg+F>
- '/// Shortcut for 'Find & Replace' in fr is <Strg+F>
- '/// Shortcut for 'Find & Replace' in it is <Strg+F>
- vShortcut = "<Mod1 F>"
- Case 34
- '/// Shortcut for 'Find & Replace' in es is <Strg+B>
- vShortcut = "<Mod1 B>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- printlog "Shortcut for 'Find & Replace'"
- '/// write down 'Check Find & Replace'
- Call wTypeKeys ( "Check Find & Replace" )
- '/// execute shortcut->the Find & Replace dialog should come up
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "FindAndReplace"
- if FindAndReplace.Exists then
- printlog "Shortcut " & vShortcut & " opens Find & Replace dialog"
- FindAndReplace.Cancel
- else
- printlog "Shortcut " & vShortcut & " didn't open Find & Replace dialog"
- end if
-
- '/// Check shortcut to Repeat search
- Select Case iSprache
- Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Repeat Search' in en/sv/pt-BR is <Strg+Shift+F>
- '/// Shortcut for 'Repeat Search' in de is <Strg+Shift+F>
- '/// Shortcut for 'Repeat Search' in fr is <Strg+Shift+F>
- '/// Shortcut for 'Repeat Search' in it is <Strg+Shift+F>
- vShortcut = "<Mod1 Shift F>"
- Case 34
- '/// Shortcut for 'Find & Replace' in es is <Strg+N>
- vShortcut = "<Mod1 B>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- printlog "Shortcut for 'Repeat Search'"
- '/// execute shortcut->a messagebox should appear asking to start from the beginning
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- printlog "Shortcut " & vShortcut & " seems to work"
- catch
- Active.Ok
- printlog "Shortcut " & vShortcut & " seems not to work correctly"
- endcatch
- end if
- end if
- '/// Quitting messagebox with 'Yes' should bring up another Messagebox
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- end if
- end if
-
- '/// close document previously opened
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutBold
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Bold
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 31, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Bold' in en/sv/pt-BR is <Strg+B>
- '/// Shortcut for 'Bold' in it is <Strg+B>
- vShortcut = "<Mod1 B>"
- Case 49
- '/// Shortcut for 'Bold' in de is <Strg+Shift+F>
- vShortcut = "<Mod1 Shift F>"
- Case 33
- '/// Shortcut for 'Bold' in fr is <Strg+G>
- vShortcut = "<Mod1 G>"
- Case 34
- '/// Shortcut for 'Bold' in es is <Strg+N>
- vShortcut = "<Mod1 N>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// write down word 'Bold' and select it
- Call wTypeKeys ( "Bold" )
- Call wTypeKeys ( "<Shift Home>" )
- '/// execute shortcut and check if word is now formatted as 'Bold'
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 1 then
- printlog "Shortcut " & vShortcut & " to format 'Bold' works"
- else
- Warnlog "Shortcut " & vShortcut & " to format 'Bold' doesn't work"
- end if
-
- '/// close previous opened document
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutItalic
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Italic
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Italic' in en/sv/pt-BR is <Strg+I>
- '/// Shortcut for 'Italic' in fr is <Strg+I>
- '/// Shortcut for 'Italic' in it is <Strg+I>
- vShortcut = "<Mod1 I>"
- Case 49
- '/// Shortcut for 'Italic' in de is <Strg+Shift+K>
- vShortcut = "<Mod1 Shift K>"
- Case 34
- '/// Shortcut for 'Italic' in es is <Strg+K>
- vShortcut = "<Mod1 K>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// write down word 'Italic' and select it
- Call wTypeKeys ( "Italic" )
- Call wTypeKeys ( "<Shift Home>" )
- '/// execute shortcut and check if word is now formatted as 'Italic'
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "TextObjectbar"
- if Kursiv.Getstate(2) = 1 then
- printlog "Shortcut " & vShortcut & " to format 'Italic' works"
- else
- Warnlog "Shortcut " & vShortcut & " to format 'Italic' doesn't work"
- end if
-
- '/// close previous opened document
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutUnderline
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Underline
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Underline' in en/sv/pt-BR is <Strg+U>
- '/// Shortcut for 'Underline' in fr is <Strg+U>
- '/// Shortcut for 'Underline' in it is <Strg+U>
- vShortcut = "<Mod1 U>"
- Case 49
- '/// Shortcut for 'Underline' in de is <Strg+Shift+U>
- vShortcut = "<Mod1 Shift U>"
- Case 34
- '/// Shortcut for 'Underline' in es is <Strg+S>
- vShortcut = "<Mod1 S>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// write down word 'Underline' and select it
- Call wTypeKeys ( "Underline" )
- Call wTypeKeys ( "<Shift Home>" )
- '/// execute shortcut and check if word is now formatted as 'Underline'
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "TextObjectbar"
- if Unterstrichen.Getstate(2) = 1 then
- printlog "Shortcut " & vShortcut & " to format 'Underline' works"
- else
- Warnlog "Shortcut " & vShortcut & " to format 'Underline' doesn't work"
- end if
-
- '/// close previous opened document
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutDoubleUnderline
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Double Underline
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81
- '/// Shortcut for 'Underline' in en/sv/pt-BR is <Strg+D>
- '/// Shortcut for 'Underline' in fr is <Strg+D>
- '/// Shortcut for 'Underline' in es is <Strg+D>
- '/// Shortcut for 'Underline' in it is <Strg+D>
- '/// Shortcut for 'Underline' in de is <Strg+D>
- vShortcut = "<Mod1 D>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// write down word 'Underline' and select it
- Call wTypeKeys ( "Double Underline" )
- Call wTypeKeys ( "<Shift Home>" )
- '/// execute shortcut and check if word is now formatted as 'Double Underline'
- Call wTypeKeys ( vShortcut )
- wait 500
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Underline.GetSelIndex <> 3 then
- Warnlog "Shortcut " & vShortcut & " to format 'Double Underline' doesn't work"
- else
- printlog "Shortcut " & vShortcut & " to format 'Double Underline' works"
- end if
-
- TabFontEffects.Cancel
-
- '/// close previous opened document
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutAlign
- Dim vShortcut as string
- '/// This testcases checks the shortcuts -> Align Left, Right, Centered, Justified
-
- '/// Open a new text document
- printlog "- Shortcut 'Align Left'"
- Call hNewDocument
- '/// "- Shortcut 'Align Left'"
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81
- '/// Shortcut for 'Align Left' in en/sv/pt-BR is <Strg+L>
- '/// Shortcut for 'Align Left' in fr is <Strg+L>
- '/// Shortcut for 'Align Left' in es is <Strg+L>
- '/// Shortcut for 'Align Left' in it is <Strg+L>
- '/// Shortcut for 'Align Left' in de is <Strg+L>
- vShortcut = "<Mod1 L>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// write down word 'Align Left'
- Call wTypeKeys ( "Align Left" )
- '/// execute shortcut and check if word is now aligned left
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "TextObjectbar"
- if Linksbuendig.Getstate(2) = 1 then
- printlog "- Shortcut " & vShortcut & " to 'Align Left' works"
- else
- Warnlog "- Shortcut " & vShortcut & " to 'Align Left' doesn't work"
- end if
-
- '/// "- Shortcut 'Align Right'"
- printlog "- Shortcut 'Align Right'"
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81
- '/// Shortcut for 'Align Right' in en/sv/pt-BR is <Strg+R>
- '/// Shortcut for 'Align Right' in fr is <Strg+R>
- '/// Shortcut for 'Align Right' in es is <Strg+R>
- '/// Shortcut for 'Align Right' in it is <Strg+R>
- '/// Shortcut for 'Align Right' in de is <Strg+R>
- vShortcut = "<Mod1 R>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// Insert a line break
- Call wTypeKeys ( "<Return>" )
- '/// write down word 'Align Right'
- Call wTypeKeys ( "Align Right" )
- '/// execute shortcut and check if word is now aligned right
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "TextObjectbar"
- if Rechtsbuendig.Getstate(2) = 1 then
- printlog "- Shortcut " & vShortcut & " to 'Align Right' works"
- else
- Warnlog "- Shortcut " & vShortcut & " to 'Align Right' doesn't work"
- end if
-
- '/// "- Shortcut 'Align Centered'"
- printlog "- Shortcut 'Align Centered'"
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 36, 39, 49, 46, 55, 86, 82, 81
- '/// Shortcut for 'Align Centered' in en/sv/pt-BR is <Strg+E>
- '/// Shortcut for 'Align Centered' in fr is <Strg+E>
- '/// Shortcut for 'Align Centered' in it is <Strg+E>
- '/// Shortcut for 'Align Centered' in de is <Strg+E>
- vShortcut = "<Mod1 E>"
- case 34
- '/// Shortcut for 'Align Centered' in es is <Strg+T>
- vShortcut = "<Mod1 T>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// Insert a line break
- Call wTypeKeys ( "<Return>" )
- '/// write down word 'Align Right'
- Call wTypeKeys ( "Align Centered" )
- '/// execute shortcut and check if word is now aligned centered
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "TextObjectbar"
- if Zentriert.Getstate(2) = 1 then
- printlog "- Shortcut " & vShortcut & " to 'Align Centered' works"
- else
- Warnlog "- Shortcut " & vShortcut & " to 'Align Centered' doesn't work"
- end if
-
- '/// "- Shortcut 'Align Justified'"
- printlog "- Shortcut 'Align Justified'"
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Align Justified' in en/sv/pt-BR is <Strg+J>
- '/// Shortcut for 'Align Justified' in fr is <Strg+J>
- '/// Shortcut for 'Align Justified' in it is <Strg+J>
- '/// Shortcut for 'Align Justified' in de is <Strg+J>
- vShortcut = "<Mod1 J>"
- case 49
- '/// Shortcut for 'Align Justified' in de is <Strg+B>
- vShortcut = "<Mod1 B>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- '/// Insert a line break
- Call wTypeKeys ( "<Return>" )
- '/// write down word 'Align Right'
- Call wTypeKeys ( "Align Justified" )
- '/// execute shortcut and check if word is now aligned centered
- Call wTypeKeys ( vShortcut )
- wait 500
- Kontext "TextObjectbar"
- if Blocksatz.Getstate(2) = 1 then
- printlog "- Shortcut " & vShortcut & " to 'Align Justified' works"
- else
- Warnlog "- Shortcut " & vShortcut & " to 'Align Justified' doesn't work"
- end if
-
- '/// close previous opened document
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutSuperscript
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Superscript
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Superscript' in en/sv/pt-BR is <Strg+D>
- '/// Shortcut for 'Superscript' in fr is <Strg+D>
- '/// Shortcut for 'Superscript' in es is <Strg+D>
- '/// Shortcut for 'Superscript' in it is <Strg+D>
- vShortcut = "<Mod1 Shift P>"
- Case 49
- '/// Shortcut for 'Superscript' in de is <Strg+H>
- vShortcut = "<Mod1 H>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- Kontext "DrawBar"
- if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
- '/// Open 'Draw functions' toolbar ///
- Textobjekt.Click
- '/// Draw a Textobject ///
- Call gMouseMove ( 30, 30, 40, 40 )
- '/// write down word 'Superscript' and select it
- call wTypeKeys ("Superscript")
- call wTypeKeys ("<Shift Home>")
-
- '/// execute shortcut and check if word is now formatted as 'Superscript'
- Call wTypeKeys ( vShortcut )
- wait 500
- FormatCharacter
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Superscript.IsChecked = true then
- printlog "Shortcut " & vShortcut & " to format 'Superscript' works"
- else
- Warnlog "Shortcut " & vShortcut & " to format 'Superscript' doesn't work"
- end if
- TabFontPosition.Cancel
-
- '/// close previous opened document
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutSubscript
- Dim vShortcut as string
- '/// This testcases checks the shortcut -> Subscript
- '/// Open a new text document
- Call hNewDocument
- Select Case iSprache
- Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81
- '/// Shortcut for 'Subscript' in en/sv/pt-BR is <Strg+Shift+B>
- '/// Shortcut for 'Subscript' in fr is <Strg+Shift+B>
- '/// Shortcut for 'Subscript' in es is <Strg+Shift+B>
- '/// Shortcut for 'Subscript' in it is <Strg+Shift+B>
- vShortcut = "<Mod1 Shift B>"
- Case 49
- '/// Shortcut for 'Subscript' in de is <Strg+T>
- vShortcut = "<Mod1 T>"
- Case else
- Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
- Call hCloseDocument
- goto endsub
- end select
-
- Kontext "DrawBar"
- if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
- '/// Open 'Draw functions' toolbar ///
- Textobjekt.Click
- '/// Draw a Textobject ///
- Call gMouseMove ( 30, 30, 40, 40 )
- '/// write down word 'Subscript' and select it
-
- call wTypeKeys ("Subscript")
- call wTypeKeys ("<Shift Home>")
-
- '/// execute shortcut and check if word is now formatted as 'Superscript'
- Call wTypeKeys ( vShortcut )
- wait 500
- FormatCharacter
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Subscript.IsChecked = true then
- printlog "Shortcut " & vShortcut & " to format 'Subscript' works"
- else
- Warnlog "Shortcut " & vShortcut & " to format 'Subscript' doesn't work"
- end if
- TabFontPosition.Cancel
-
- '/// close previous opened document
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------------------
-
-testcase tShortcutPasteUnformattedText
-
- Dim vShortcut as string
- Dim DefaultSize as integer
- Dim DefaultStyle as integer
-
- printlog "This testcases checks the shortcut -> Paste Unformatted Text"
- printlog "Open a new text document"
- Call hNewDocument
-
- vShortcut = "<Mod1 Mod2 Shift V>"
- printlog "Type 'This is a formatted sentence'"
- Call wTypeKeys ("This is a formatted sentence")
-
- printlog "Format the word 'formatted' in bold, italic, font size 20"
- Call wTypeKeys ("<Home>")
- Call wTypeKeys ("<Mod1 Right>", 3)
- Call wTypeKeys ("<Mod1 Shift Right>")
-
- FormatCharacter
- WaitSlot (5)
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- wait 500
- DefaultSize = Size.GetSelIndex
- Size.Select 14 ' Size 20
- DefaultStyle = Style.GetSelIndex
- Style.Select 4 ' Style Bold, Italic
- TabFont.Ok
-
- printlog "Copy word 'formatted'"
- EditCopy
-
- printlog "Go to the end of line"
- Call wTypeKeys ("<End>")
- printlog "insert a space"
- Call wTypeKeys ("<Space>")
- printlog "Press Ctrl+Alt+Shift+V (cmd+option+shift+V on Mac)"
- Call wTypeKeys ( vShortcut )
- wait 500
-
- Call wTypeKeys ("<Mod1 Home>")
- printlog "check if sentence is now: This is a formatted sentence formatted"
- Call wTypeKeys ("<Shift End>")
- EditCopy
- if Trim(GetClipboardText) = "This is a formatted sentence formatted" then
- printlog "- shortcut did work"
- else
- if gPlatgroup = "osx" then
- Warnlog "It is not possible to customize the keyboard combination cmd+option on MAC OSX."
- Call hCloseDocument
- goto endsub
- else
- Warnlog "Shortcut did not work"
- Call hCloseDocument
- goto endsub
- end if
- end if
-
- printlog "Check if formatted word held its formatting"
- Call wTypeKeys ("<Home>")
- Call wTypeKeys ("<Mod1 Right>", 3)
- Call wTypeKeys ("<Mod1 Shift Right>")
-
- FormatCharacter
- WaitSlot (5)
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- wait 500
- if Size.GetSelIndex <> 14 then
- Warnlog "formatted word has lost its size"
- endif
- if Style.GetSelIndex <> 4 then
- Warnlog "formatted word has lost its style"
- endif
- TabFont.Cancel
-
- printlog "Check if pasted word has default formatting"
- Call wTypeKeys ("<End>")
- Call wTypeKeys ("<Mod1 Right>", 3)
- Call wTypeKeys ("<Mod1 Shift Left>")
-
- FormatCharacter
- WaitSlot (5)
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- wait 500
- if Size.GetSelIndex <> DefaultSize then
- Warnlog "formatted word has no default size"
- endif
- if Style.GetSelIndex <> DefaultStyle then
- Warnlog "formatted word has no default style"
- endif
- TabFont.Cancel
-
- printlog "close previous opened document"
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/sorting/w_sorting1.inc b/testautomation/writer/optional/includes/sorting/w_sorting1.inc
deleted file mode 100644
index 70fcbab3f26f..000000000000
--- a/testautomation/writer/optional/includes/sorting/w_sorting1.inc
+++ /dev/null
@@ -1,646 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Sorting functions in Writer
-'*
-'\***********************************************************************
-
-sub w_sorting
-
- Call tToolsSort1 ' Text in one Column and 1 Key
- Call tToolsSort2 ' Numbers in 1 Column and 1 Key
- Call tToolsSort3 ' Text in several Columns and 3 Keys
- Call tToolsSort4 ' Table with Header ( Text and Numbers mixed )
- Call tToolsSort5 ' Table without Header ( Text and Numbers mixed )
- Call tToolsSort6 ' Copy sorted table in another table
-
-end sub
-
-
-testcase tToolsSort1
- PrintLog "- Tools / Sort normal Text ( 1. Column )"
- Printlog " - alphanumeric ascending ( Key 1 )"
- Call hNewDocument
- Call wTypeKeys "Ohallo<Return>Ahallo<Return>Ghallo<Return>Zhallo<Return>Shallo"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Schluessel2.UnCheck
- Schluessel3.UnCheck
- Spalte1.SetText "1"
- Schluesseltyp1.Select 1
- Aufsteigend1.Check
- Sortieren.OK
- Call AufsteigendKontrollieren ( FALSE )
-
- Printlog " - alphanumeric descending ( Key 1 )"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select 1
- Absteigend1.Check
- Sortieren.OK
- AbsteigendKontrollieren ( FALSE )
-
- Printlog " - alphanumeric ascending ( Key 2 )"
- Call wTypeKeys "<Mod1 a>"
- Call wTypeKeys "<Delete>"
- Sleep 1
- Call wTypeKeys "Ohallo<Return>Ahallo<Return>Ghallo<Return>Zhallo<Return>Shallo"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel2.Check
- Schluessel1.Uncheck
- Schluessel3.UnCheck
- Spalte2.SetText "1"
- Schluesseltyp2.Select 1
- Aufsteigend2.Check
- Sortieren.OK
- Call AufsteigendKontrollieren ( FALSE )
-
- Printlog " - alphanumeric descending ( Key 2 )"
- Call wTypeKeys "<Mod1 a>"
- ToolsSort
- Kontext "Sortieren"
- Spalte2.SetText "1"
- Schluesseltyp2.Select 1
- Absteigend2.Check
- Sortieren.OK
- AbsteigendKontrollieren ( FALSE )
-
- Printlog " - alphanumeric ascending ( Key 3 )"
- Call wTypeKeys "<Mod1 a>"
- Call wTypeKeys "<Delete>"
- Sleep 1
- Call wTypeKeys "Ohallo<Return>Ahallo<Return>Ghallo<Return>Zhallo<Return>Shallo"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel3.Check
- Schluessel1.UnCheck
- Schluessel2.UnCheck
- Spalte3.SetText "1"
- Schluesseltyp3.Select 1
- Aufsteigend3.Check
- Sortieren.OK
- Call AufsteigendKontrollieren ( FALSE )
-
- Printlog " - alphanumeric descending ( Key 3 )"
- Call wTypeKeys "<Mod1 a>"
- ToolsSort
- Kontext "Sortieren"
- Schluessel3.Check
- Schluessel1.Uncheck
- Schluessel2.UnCheck
- Spalte3.SetText "1"
- Schluesseltyp3.Select 1
- Absteigend3.Check
- Sortieren.OK
- Call AbsteigendKontrollieren ( FALSE )
-
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSort2
- PrintLog "- Tools / Sorting numbers ( 1. Column )"
-
- Printlog " - numeric ascending ( Key 1 )"
- Call hNewDocument
- Call wTypeKeys "43<Return>54<Return>23<Return>65<Return>56"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select 2
- Aufsteigend1.Check
- Sortieren.OK
- Call AufsteigendKontrollieren ( TRUE )
-
- Printlog " - numeric descending ( Key 1 )"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select 2
- Absteigend1.Check
- Sortieren.OK
- Call AbsteigendKontrollieren ( TRUE )
-
- Printlog " - numeric ascending ( Key 2 )"
- Call wTypeKeys "<Mod1 a>"
- Call wTypeKeys "<Delete>"
- Sleep 1
- Call wTypeKeys "43<Return>54<Return>23<Return>65<Return>56"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Uncheck
- Schluessel2.Check
- Spalte2.SetText "1"
- Schluesseltyp2.Select 2
- Aufsteigend2.Check
- Sortieren.OK
- Call AufsteigendKontrollieren ( TRUE )
-
- Printlog " - numeric descending ( Key 2 )"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Uncheck
- Schluessel2.Check
- Spalte2.SetText "1"
- Schluesseltyp2.Select 2
- Absteigend2.Check
- Sortieren.OK
- Call AbsteigendKontrollieren ( TRUE )
-
- Printlog " - numeric ascending ( Key 3 )"
- Call wTypeKeys ( "<Mod1 a>" )
- Call wTypeKeys ( "<Delete>" )
- Sleep 1
- Call wTypeKeys "43<Return>54<Return>23<Return>65<Return>56"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Uncheck
- Schluessel2.UnCheck
- Schluessel3.Check
- Spalte3.SetText "1"
- Schluesseltyp3.Select 2
- Aufsteigend3.Check
- Sortieren.OK
- Call AufsteigendKontrollieren ( TRUE )
-
- Printlog " - numeric descending ( Key 3 )"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Uncheck
- Schluessel2.UnCheck
- Schluessel3.Check
- Spalte3.SetText "1"
- Schluesseltyp3.Select 2
- Absteigend3.Check
- Sortieren.OK
- Call AbsteigendKontrollieren ( TRUE )
-
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSort3
- Dim i as Integer
- PrintLog "- Tools / Sorting text in several lines"
- for i=1 to 3
- select case i
- case 1: Printlog " - Separator is a tabulator"
- case 2: Printlog " - Separator is a semicolon"
- Trennzeichen = ";"
- case 3: Printlog " - Separator is a '|'"
- Trennzeichen = "|"
- end select
- if gApplication = "WRITER" then
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort2.odt" )
- else
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort2.odm" )
- end if
-
- if i <> 1 then TrennzeichenSetzen ( Trennzeichen )
-
- Printlog " - alphanumeric ascending after 1.Column, followed by 4.Column and 3. Column"
- Call wTypeKeys ( "<Mod1 a>" )
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select 1
- Aufsteigend1.Check
-
- Schluessel2.Check
- Spalte2.SetText "4"
- Schluesseltyp2.Select 1
- Aufsteigend2.Check
-
- Schluessel3.Check
- Spalte3.SetText "3"
- Schluesseltyp3.Select 1
- Aufsteigend3.Check
-
- if i=1 then
- Tabulator.Check
- else
- Zeichen.Check
- ZeichenText.SetText Trennzeichen
- end if
- Sortieren.OK
- Call AufSortierungPruefen(i)
- Call UndoRichtigBeiSortierung
-
- Printlog " - alphanumeric descending 1.Column, followed by 4. column and 3. column"
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select 1
-
- Schluessel2.Check
- Spalte2.SetText "4"
- Schluesseltyp2.Select 1
-
- Schluessel3.Check
- Spalte3.SetText "3"
- Schluesseltyp3.Select 1
-
- Absteigend1.Check
- Absteigend2.Check
- Absteigend3.Check
- if i=1 then
- Tabulator.Check
- else
- Zeichen.Check
- ZeichenText.SetText Trennzeichen
- end if
- Sortieren.OK
- Call AbSortierungPruefen(i)
- Call UndoRichtigBeiSortierung
- Call hCloseDocument
- next i
-
- 'Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSort4
- PrintLog "- Tools / Sorting in table with header"
- if gApplication = "WRITER" then
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort1.odt" )
- else
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort1.odm" )
- end if
- Call wTypeKeys "<Mod1 a>", 2
-
- Printlog " - 3. column alphanum., 1. column num., 3. column alphanum. ascending"
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "3"
- Schluesseltyp1.Select 1
-
- Schluessel2.Check
- Spalte2.SetText "1"
- Schluesseltyp2.Select 2
-
- Schluessel3.Check
- Spalte3.SetText "2"
- Schluesseltyp3.Select 1
- Aufsteigend1.Check
- Aufsteigend2.Check
- Aufsteigend3.Check
- if Tabulator.IsEnabled then Warnlog "Tabs is active"
- if Zeichen.IsEnabled then Warnlog "Char is active"
- Sortieren.OK
-
- Printlog " - Check"
- Call wTypeKeys "<Mod1 a>", 3 ' Umstellung zur 5.0 Cursor steht nach Sortierung in der letzten Zelle, mit 3*Ctrl_A kommt man in die 1.
- wait 100
- EditCopy
- if GetClipboardText <> "1" then Warnlog "Header of the first column has been sorted"
- if ZelleRuntertesten("2") = FALSE then Warnlog "1/2 is wrong"
- if ZelleRuntertesten("4") = FALSE then Warnlog "1/3 is wrong"
- if ZelleRuntertesten("5") = FALSE then Warnlog "1/4 is wrong"
- if ZelleRuntertesten("3") = FALSE then Warnlog "1/5 is wrong"
- if ZelleRuntertesten("6") = FALSE then Warnlog "1/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "a" then Warnlog "Header of the 2. column has not been sorted"
- if ZelleRuntertesten("a") = FALSE then Warnlog "2/2 is wrong"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/3 is wrong"
- if ZelleRuntertesten("c") = FALSE then Warnlog "2/4 is wrong"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/5 is wrong"
- if ZelleRuntertesten("c") = FALSE then Warnlog "2/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "zz" then Warnlog "Header der 3. column has not been sorted"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/2 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/3 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/4 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/5 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/6 is wrong"
-
- Printlog " - 3. column alphanum., 1. column num., 3. column alphanum. descending"
- Call wTypeKeys "<Left Right>"
- Call wTypeKeys "<Mod1 a>", 2
- Sleep 2
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "3"
- Schluesseltyp1.Select 1
-
- Schluessel2.Check
- Spalte2.SetText "1"
- Schluesseltyp2.Select 2
-
- Schluessel3.Check
- Spalte3.SetText "2"
- Schluesseltyp3.Select 1
- Absteigend1.Check
- Absteigend2.Check
- Absteigend3.Check
- Sortieren.OK
-
- Printlog " - check"
- Call wTypeKeys "<up><Left>", 6
- Call wTypeKeys "<Mod1 a>"
- wait 100
- EditCopy
- if GetClipboardText <> "1" then Warnlog "Header of the 1. column has been sorted"
- if ZelleRuntertesten("6") = FALSE then Warnlog "1/2 is wrong"
- if ZelleRuntertesten("3") = FALSE then Warnlog "1/3 is wrong"
- if ZelleRuntertesten("5") = FALSE then Warnlog "1/4 is wrong"
- if ZelleRuntertesten("4") = FALSE then Warnlog "1/5 is wrong"
- if ZelleRuntertesten("2") = FALSE then Warnlog "1/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "a" then Warnlog "Header of the 2. column has not been sorted"
- if ZelleRuntertesten("c") = FALSE then Warnlog "2/2 is wrong"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/3 is wrong"
- if ZelleRuntertesten("c") = FALSE then Warnlog "2/4 is wrong"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/5 is wrong"
- if ZelleRuntertesten("a") = FALSE then Warnlog "2/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "zz" then Warnlog "Header of the 3. column has not been sorted"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/2 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/3 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/4 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/5 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/6 is wrong"
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSort5
- PrintLog "- Tools / Sorting in table without header"
- if gApplication = "WRITER" then
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort1.odt" )
- else
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort1.odm" )
- end if
-
- Call wNavigatorAuswahl (2, 2)
- Call wTypeKeys "<Mod1 a>", 2
- Printlog " - 3. column alphanum., 1. column num., 2. column alphanum. ascending"
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "3"
- Schluesseltyp1.Select 1
-
- Schluessel2.Check
- Spalte2.SetText "1"
- Schluesseltyp2.Select 2
-
- Schluessel3.Check
- Spalte3.SetText "2"
- Schluesseltyp3.Select 1
- Aufsteigend1.Check
- Aufsteigend2.Check
- Aufsteigend3.Check
- if Tabulator.IsEnabled then Warnlog "'Tabs' is active when table is selected"
- if Zeichen.IsEnabled then Warnlog "'Character' is active when table is selected"
- Sortieren.OK
-
- Printlog " - check"
- Call wNavigatorAuswahl (2, 2)
- Call wTypeKeys "<Mod1 a>"
- wait 100
- EditCopy
-
- if GetClipboardText <> "2" then Warnlog "1/1 is wrong!"
- if ZelleRuntertesten("4") = FALSE then Warnlog "1/2 is wrong"
- if ZelleRuntertesten("5") = FALSE then Warnlog "1/3 is wrong"
- if ZelleRuntertesten("1") = FALSE then Warnlog "1/4 is wrong"
- if ZelleRuntertesten("3") = FALSE then Warnlog "1/5 is wrong"
- if ZelleRuntertesten("6") = FALSE then Warnlog "1/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "a" then Warnlog "2/1 is wrong!"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/2 is wrong"
- if ZelleRuntertesten("c") = FALSE then Warnlog "2/3 is wrong"
- if ZelleRuntertesten("a") = FALSE then Warnlog "2/4 is wrong"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/5 is wrong"
- if ZelleRuntertesten("c") = FALSE then Warnlog "2/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "xx" then Warnlog "3/1 is wrong!"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/2 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/3 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/4 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/5 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/6 is wrong"
-
-
- Printlog " - 3. column alphanum., 1. column num., 2. column alphanum. descending"
- Call wNavigatorAuswahl (2, 2)
- Call wTypeKeys "<Mod1 a>", 2
- Sleep 2
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "3"
- Schluesseltyp1.Select 1
-
- Schluessel2.Check
- Spalte2.SetText "1"
- Schluesseltyp2.Select 2
-
- Schluessel3.Check
- Spalte3.SetText "2"
- Schluesseltyp3.Select 1
- Absteigend1.Check
- Absteigend2.Check
- Absteigend3.Check
- Sortieren.OK
-
- Printlog " - check"
- Call wNavigatorAuswahl (2, 2)
- Call wTypeKeys "<Mod1 a>"
- wait 100
- EditCopy
- if GetClipboardText <> "6" then Warnlog "1/1 is wrong!"
- if ZelleRuntertesten("3") = FALSE then Warnlog "1/2 is wrong"
- if ZelleRuntertesten("1") = FALSE then Warnlog "1/3 is wrong"
- if ZelleRuntertesten("5") = FALSE then Warnlog "1/4 is wrong"
- if ZelleRuntertesten("4") = FALSE then Warnlog "1/5 is wrong"
- if ZelleRuntertesten("2") = FALSE then Warnlog "1/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "c" then Warnlog "2/1 is wrong!"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/2 is wrong"
- if ZelleRuntertesten("a") = FALSE then Warnlog "2/3 is wrong"
- if ZelleRuntertesten("c") = FALSE then Warnlog "2/4 is wrong"
- if ZelleRuntertesten("b") = FALSE then Warnlog "2/5 is wrong"
- if ZelleRuntertesten("a") = FALSE then Warnlog "2/6 is wrong"
- Call wTypeKeys "<Right>"
- Call wTypeKeys "<up>", 5
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "zz" then Warnlog "3/1 is wrong!"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/2 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/3 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/4 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/5 is wrong"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/6 is wrong"
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSort6
- PrintLog "- Tools / Sort a sorted table and copy in another one"
-
- if gApplication = "WRITER" then
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort3.odt" )
- else
- hFileOpenLocally( gTesttoolPath + "writer\optional\input\sorting\sort3.odm" )
- end if
- Call wTypeKeys "<Mod1 a>", 2
-
- Printlog " - Sort 1. column numeric descending"
- ToolsSort
- Kontext "Sortieren"
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select 2
- Absteigend1.Check
- Absteigend2.Check
- Absteigend3.Check
- Sortieren.OK
-
- Printlog " - check"
- Call wTypeKeys "<Mod1 a>", 3
- wait 100
- EditCopy
- if GetClipboardText <> "4" then Warnlog "Header of the 1. column has not been sorted"
- if ZelleRuntertesten("3") = FALSE then Warnlog "1/2 is wrong"
- if ZelleRuntertesten("2") = FALSE then Warnlog "1/3 is wrong"
- if ZelleRuntertesten("1") = FALSE then Warnlog "1/4 is wrong"
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<up>", 3
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "dd" then Warnlog "Header of the 2. column has not been sorted"
- if ZelleRuntertesten("cc") = FALSE then Warnlog "2/2 is wrong"
- if ZelleRuntertesten("bb") = FALSE then Warnlog "2/3 is wrong"
- if ZelleRuntertesten("aa") = FALSE then Warnlog "2/4 is wrong"
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<up>", 3
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "ww" then Warnlog "Header of the 3 column has not been sorted"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/2 is wrong"
- if ZelleRuntertesten("yy") = FALSE then Warnlog "3/3 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/4 is wrong"
-
- Printlog " - copy table"
- Call wTypeKeys "<Left Right>"
- Call wTypeKeys "<Mod1 a>", 2
- Sleep 1
- EditCopy
- Sleep 1
- Printlog " - insert table"
- Call wTypeKeys "<Down>", 10
- Call wTypeKeys "<Up>", 4
- EditPaste
- Sleep 1
-
- Printlog " - check"
- Call wTypeKeys "<Mod1 a>"
- wait 100
- EditCopy
- if GetClipboardText <> "4" then Warnlog "Header of the 1. column has not been sorted"
- if ZelleRuntertesten("3") = FALSE then Warnlog "1/2 is wrong"
- if ZelleRuntertesten("2") = FALSE then Warnlog "1/3 is wrong"
- if ZelleRuntertesten("1") = FALSE then Warnlog "1/4 is wrong"
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<up>", 3
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "dd" then Warnlog "Header of the 2. column has not been sorted"
- if ZelleRuntertesten("cc") = FALSE then Warnlog "2/2 is wrong"
- if ZelleRuntertesten("bb") = FALSE then Warnlog "2/3 is wrong"
- if ZelleRuntertesten("aa") = FALSE then Warnlog "2/4 is wrong"
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<up>", 3
- Call wTypeKeys "<Mod1 a>"
- Wait 100
- EditCopy
- if GetClipboardText <> "ww" then Warnlog "Header of the 3 column has not been sorted"
- if ZelleRuntertesten("xx") = FALSE then Warnlog "3/2 is wrong"
- if ZelleRuntertesten("yy") = FALSE then Warnlog "3/3 is wrong"
- if ZelleRuntertesten("zz") = FALSE then Warnlog "3/4 is wrong"
- Call hCloseDocument
-endcase
-
diff --git a/testautomation/writer/optional/includes/sorting/w_sorting2.inc b/testautomation/writer/optional/includes/sorting/w_sorting2.inc
deleted file mode 100644
index c716b597126b..000000000000
--- a/testautomation/writer/optional/includes/sorting/w_sorting2.inc
+++ /dev/null
@@ -1,345 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Sort functionality test
-'*
-'************************************************************************
-'*
-' #1 tSort_1
-' #1 tSort_2
-'*
-'\***********************************************************************
-
-testcase tSort_1
-
- Dim contentInTable() as String
- Dim i as Integer
- Dim j as Integer
- Dim sKeyType as String
- Dim sLanguage as String
- Dim TestFile as string
-
- if iSprache <> 01 then
- QaErrorLog "Aborting test since this test currently only work with English."
- goto endsub
- end if
-
- PrintLog "- Tools / Sorting in table - Ascending mode "
- for j = 1 to 3
- Select Case j
- Case 1:
- PrintLog "- 1.test for Alphanumeric"
- contentInTable = Array( _
- "FIRST NAME", "LAST NAME", "PHONE HOME", "PHONE WORK" , _
- "Alan" , "Brown" , "212121" , "(407) 555-5454" , _
- "Julie" , "Clark" , "321123" , "(040) 555-007" , _
- "Patricia" , "Fisher" , "121212" , "(202) 555-4455" , _
- "Peter" , "Arnold" , "432104" , "(212) 555-9876 Ext. 543" , _
- )
- TestFile = gTesttoolPath & "writer\optional\input\sorting\phonelist.odt"
- sKeyType = fGetKeyType(01)
- sLanguage = fGetCountryName(01)
- Case 2:
- PrintLog "- 2.test for Phonebook"
- contentInTable = Array( _
- "FIRST NAME", "LAST NAME", "PHONE HOME", "PHONE WORK" , _
- "Alan" , "Brown" , "212121" , "(407) 555-5454" , _
- "Julie" , "Clark" , "321123" , "(040) 555-007" , _
- "Patricia" , "Fisher" , "121212" , "(202) 555-4455" , _
- "Peter" , "Arnold" , "432104" , "(212) 555-9876 Ext. 543" , _
- )
- TestFile = gTesttoolPath + "writer\optional\input\sorting\phonelist.odt"
- sKeyType = fGetKeyType(49)
- sLanguage = fGetCountryName(49)
- Case 3:
- PrintLog "- 3.test for pinyin"
- contentInTable = Array( _
- "姓å" , "电è¯(家)" , "电è¯(å•ä½)" , _
- "钱二" , "212121" , "(407) 555-5454" , _
- "孙三" , "432104" , "(212) 555-9876 Ext. 543" , _
- "å¼ å››" , "321123" , "(040) 555-007" , _
- "赵一" , "121212" , "(202) 555-4455" , _
- )
- TestFile = gTesttoolPath + "writer\optional\input\sorting\phonelist_sc.odt"
- sKeyType = fGetKeyType(86)
- sLanguage = fGetCountryName(86)
- end select
-
-
- printlog " open a test file"
- hFileOpenLocally( TestFile )
-
-
- printlog " select all table"
- Call wTypeKeys "<Mod1 a>", 2
-
- printlog " Tools/Sort , choose Ascending mode"
- printlog " choose English in language and Alphanumeric in keytype"
- ToolsSort
- Kontext "Sortieren"
- Sprache.Select sLanguage
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select sKeyType
- Aufsteigend1.Check
- Schluessel2.UnCheck
- Schluessel3.UnCheck
- Sortieren.OK
- Sleep 1
-
- Call wTypeKeys "<Mod1 a>" ,2
-
- For i = 0 to UBound(contentInTable)
- Call wTypeKeys "<Mod1 a>"
- wait 100
- EditCopy
- if GetClipboardText <> contentInTable(i) then
- Warnlog "The content in table is Wrong! We hope to get " + contentInTable(i) + " But get " + GetClipboardText
- end if
- Call wTypeKeys "<Escape><TAB>"
- next i
-
- Call hCloseDocument
- next j
-endcase
-
-'-------------------------------------------------------------------------
-
-testcase tSort_2
-
- Dim contentInTable() as String
- Dim i as Integer
- Dim j as Integer
- Dim sKeyType as String
- Dim sLanguage as String
- Dim TestFile as string
-
- if iSprache <> 01 then
- QaErrorLog "Aborting test since this test currently only work with English."
- goto endsub
- end if
-
- PrintLog "- Tools / Sorting in table - Descending mode "
- for j = 1 to 3
- Select Case j
- Case 1:
- PrintLog "- 1.test for Alphanumeric"
- contentInTable = Array( _
- "FIRST NAME", "LAST NAME", "PHONE HOME", "PHONE WORK" , _
- "Peter" , "Arnold" , "432104" , "(212) 555-9876 Ext. 543" , _
- "Patricia" , "Fisher" , "121212" , "(202) 555-4455" , _
- "Julie" , "Clark" , "321123" , "(040) 555-007" , _
- "Alan" , "Brown" , "212121" , "(407) 555-5454" , _
- )
- TestFile = gTesttoolPath & "writer\optional\input\sorting\phonelist.odt"
- sKeyType = fGetKeyType(01)
- sLanguage = fGetCountryName(01)
- Case 2:
- PrintLog "- 2.test for Phonebook"
- contentInTable = Array( _
- "FIRST NAME", "LAST NAME", "PHONE HOME", "PHONE WORK" , _
- "Peter" , "Arnold" , "432104" , "(212) 555-9876 Ext. 543" , _
- "Patricia" , "Fisher" , "121212" , "(202) 555-4455" , _
- "Julie" , "Clark" , "321123" , "(040) 555-007" , _
- "Alan" , "Brown" , "212121" , "(407) 555-5454" , _
- )
- TestFile = gTesttoolPath + "writer\optional\input\sorting\phonelist.odt"
- sKeyType = fGetKeyType(49)
- sLanguage = fGetCountryName(49)
- Case 3:
- PrintLog "- 3.test for pinyin"
- contentInTable = Array( _
- "姓å" , "电è¯(家)" , "电è¯(å•ä½)" , _
- "赵一" , "121212" , "(202) 555-4455" , _
- "å¼ å››" , "321123" , "(040) 555-007" , _
- "孙三" , "432104" , "(212) 555-9876 Ext. 543" , _
- "钱二" , "212121" , "(407) 555-5454" , _
- )
- TestFile = gTesttoolPath + "writer\optional\input\sorting\phonelist_sc.odt"
- sKeyType = fGetKeyType(86)
- sLanguage = fGetCountryName(86)
- end select
-
- printlog " open a test file"
- hFileOpenLocally( TestFile )
-
-
- printlog " select all table"
- Call wTypeKeys "<Mod1 a>", 2
-
- printlog " Tools/Sort , choose Ascending mode."
- printlog " choose English in language and Alphanumeric in keytype."
- ToolsSort
- Kontext "Sortieren"
- Sprache.Select sLanguage
- Schluessel1.Check
- Spalte1.SetText "1"
- Schluesseltyp1.Select sKeyType
- Absteigend1.Check
- Schluessel2.UnCheck
- Schluessel3.UnCheck
- Sortieren.OK
- Sleep 1
-
- Call wTypeKeys "<Mod1 a>" ,2
-
- For i = 0 to UBound(contentInTable)
- Call wTypeKeys "<Mod1 a>"
- wait 100
- EditCopy
- if GetClipboardText <> contentInTable(i) then
- Warnlog "The content in table is Wrong! We hope to get " + contentInTable(i) + " But get " + GetClipboardText
- end if
- Call wTypeKeys "<Escape><TAB>"
- next i
-
- Call hCloseDocument
- next j
-endcase
-
-'--------------------------------------------------------------
-
-function fGetCountryName( CountryID as Integer ) as String
-
- select case iSprache
- case 01 : ' English (USA)
- select case CountryID
- case 1: fGetCountryName = "English (USA)"
- case 49: fGetCountryName = "German (Germany)"
- case 86: fGetCountryName = "Chinese (simplified)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetCountryName = ""
- end select
-
- case 31:
- select case CountryID
- case 1: fGetCountryName = "Engels (VS)"
- case 49: fGetCountryName = "Duits (Duitsland)"
- case 86: fGetCountryName = "Chinees (vereenvoudigd)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetCountryName = ""
- end select
-
- case 49 : ' German
- select case CountryID
- case 1: fGetCountryName = "Englisch (USA)"
- case 49: fGetCountryName = "Deutsch (Deutschland)"
- case 86: fGetCountryName = "Chinesisch (einfach)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetCountryName = ""
- end select
- case 81 : ' Japanese
- select case CountryID
- case 1: fGetCountryName = "英語(米国)"
- case 49: fGetCountryName = "ドイツ語(ドイツ)"
- case 86: fGetCountryName = "中国語(簡体字)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetCountryName = ""
- end select
-
- case 86 : ' Chinese (simplified)
- select case CountryID
- case 1: fGetCountryName = "英语(美国)"
- case 49: fGetCountryName = "德语(德国)"
- case 86: fGetCountryName = "中文(简体字)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetCountryName = ""
- end select
-
- case 88 : ' Chinese (traditional)
- select case CountryID
- case 1: fGetCountryName = "英語(美國)"
- case 49: fGetCountryName = "德語(德國)"
- case 86: fGetCountryName = "中文(簡體字)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetCountryName = ""
- end select
- case else : ' Fallback
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetCountryName = ""
- end select
-end function
-
-'-------------------------------------------------------
-
-function fGetKeyType( KeyType as Integer ) as String
-
- select case iSprache
- case 01, 31, 49 :
- select case KeyType
- case 1: fGetKeyType = "Alphanumeric"
- case 49: fGetKeyType = "Phone book"
- case 86: fGetKeyType = "Pinyin"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetKeyType = ""
- end select
-
- case 81 :' Japanese
- select case KeyType
- case 1: fGetKeyType = "英数字"
- case 49: fGetKeyType = "電話帳"
- case 86: fGetKeyType = "ピンイン(中国語ã®ãƒ­ãƒ¼ãƒžå­—表記法)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetKeyType = ""
- end select
-
- case 86 :' Chinese (simplified)
- select case KeyType
- case 1: fGetKeyType = "å­—æ¯æ•°å­—å¼"
- case 49: fGetKeyType = "电è¯ç°¿"
- case 86: fGetKeyType = "拼音"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetKeyType = ""
- end select
-
- case 88 :' Chinese (traditional)
- select case KeyType
- case 1: fGetKeyType = "å­—æ¯æ•¸å­—å¼"
- case 49: fGetKeyType = "電話簿"
- case 86: fGetKeyType = "拼音"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetKeyType = ""
- end select
-
- case else :' Fallback
- QAErrorLog "The test does not support the language " + iSprache
- fGetKeyType = ""
- end select
-
-end function
diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
deleted file mode 100644
index df7e2c5dba34..000000000000
--- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
+++ /dev/null
@@ -1,1477 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Spellcheck-Testing. Functional-Test.
-'*
-'\***********************************************************************
-
-sub w_spellcheck
-
- Call tToolsSpellcheckWithShortcut
- Call tToolsSpellcheckCorrect
- Call tToolsSpellcheck1Mistake
- Call tToolsSpellcheckForward
- Call tToolsSpellcheckOnlyOneWord
- Call tToolsSpellcheckAutomatic
- Call tToolsSpellcheckChangeLanguageAttribute
- Call tToolsThesaurus
- Call tToolsSpellcheckButtonChange
- Call tToolsSpellcheckButtonChangeAll
- Call tToolsThesaurusSynonyms
-
-end sub
-
-
-testcase tToolsSpellcheckWithShortcut
- Dim TheFile as String
- '/// Check if Spellcheck dialog comes up with shortcut 'F7'
- 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 FileExists ( TheFile ) <> TRUE then
- Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
- exit sub
- end if
-
- call hFileOpenLocally (TheFile,false)
-
-
- 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 50 : Call wTypeKeys ("To je test Ä?rkvana<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
-
- Call wTypeKeys "<HOME>" 'Setting cursor to beginning
- Call wTypeKeys "<F7>" 'Calling spellchecker with shortcut
- sleep (1)
-
- Kontext "Active"
- if Active.Exists(1) then 'checking if messagebox comes up
- if Active.getRT = 304 then 'checking ressource type
- Active.OK
- else
- printlog "No message Box!"
- end if
- printlog "Message Box closed, Spellchecker came up"
- else
- Kontext "Spellcheck" 'checking if spellcheck dialog came up
- if Spellcheck.Exists then
- printlog "OK, Spellchecker comes up"
- Spellcheck.Close 'closing spellchecker
- else
- Warnlog "Spellchecker does not come up with shortcut 'F7'"
- end if
- end if
- Call hCloseDocument
-endcase
-
-'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-
-testcase tToolsSpellcheckCorrect
- Dim sHyphenationFile as String
- Dim TheFile as String
- Dim FFText as String
-
- TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if FileExists ( TheFile ) <> TRUE then
- Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
- exit sub
- end if
-
- Printlog "- Checking Dictionary-Files"
- select case iSprache
- case 1 : sHyphenationFile = "01-44-hyph.dat"
- 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 else : sHyphenationFile = "" & iSprache & "-hyph.dat"
- end select
- if gNetzInst = TRUE then
- sHyphenationFile = Convertpath (gNetzOfficePath + "share\dict\" + trim$(sHyphenationFile))
- else
- sHyphenationFile = Convertpath (gOfficePath + "share\dict\" + trim$(sHyphenationFile))
- end if
-
- PrintLog "- Tools / Spellcheck without text"
-
- printlog " Open document where the formatting is set to the language we wish to test."
- call hFileOpenLocally (TheFile,false)
-
-
- printlog " Insert some faulty text"
- Sleep 1
- '/// Call Spellcheck in empty document ///
- ToolsSpellcheckWriter
- Sleep 2
- Kontext "Active"
- if NOT Active.Exists(1) then
- Warnlog "No Finished message"
- else
- Active.OK
- end if
-
- PrintLog "- Tools / Spellcheck with correct text"
- '/// Call Spellcheck for correct text ///
- select case iSprache
- case 01 : FFText = "This is a text without any error.<Return>"
- case 03 : FFText = "Escreva os seus dados de utilizador correctamente e tome nota deles (guardar / imprimir).<Return>"
- case 07 : FFText = "принÑ?тый ГоÑ?ударÑ?твенной Думой в первом чтении 16 ноÑ?брÑ? 1999 года.<Return>"
- case 31 : FFText = "Dit werk is beschermd door de Auteurswet.<Return>"
- case 33 : FFText = "Il nous faut donc un de temps pour examiner avec soin tous les dossiers.<Return>"
- case 34 : FFText = "Este archivo contiene información importante sobre el programa.<Return>"
- case 36 : FFText = "Boszniai amerikai kontingens háromnegyedesek – mintegy négyezer katona – magyarországi telepítése egy éven belül megtörténhet.<Return>"
- case 39 : FFText = "La ringraziamo per l'interesse mostrato a collaborare con la firma.<Return>"
- case 45 : FFText = "Danmark ikke er sikret maksimal indflydelse på den fremtidige europæiske udlændingepolitik.<Return>"
- case 46 : FFText = "Den här filen innehåller viktig programinformation.<Return>"
- case 48 : FFText = "Nie wolno w zadnim wypadku przerywa uruchomionego serwisu !<Return>"
- case 49 : FFText = "Dies ist ein Text ohne Fehler.<Return>"
- case 50 : FFText = "To je besedilo brez napake.<Return>"
- case 55 : FFText = "Ele ouviu passos silenciosos atrás dele. Isso não estava certo.<Return>"
- case else : QAErrorLog " - The language " + iSprache +" has no defined language text. No Test !"
- exit Sub
- end select
-
- Call wTypeKeys FFText
- wait 500
- ToolsSpellcheckWriter
- Sleep 2
- Kontext "Active"
- try
- Active.Yes
- Sleep 1
- catch
- Warnlog "No message to jump to start"
- endcatch
-
- Kontext "Active"
- try
- Active.OK
- catch
- Kontext "Spellcheck"
- if Spellcheck.Exists then
- Warnlog "With correct text the Spellcheck dialog appears ( maybe wrong language selected )"
- Spellcheck.Close
- end if
- endcatch
-
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSpellcheck1Mistake
- Dim sWordToBeChecked as string
- Dim sLanguageName as string
- Dim sDummy as string
- Dim sErrorSampleText as string
- Dim TheFile as String
-
- TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if FileExists ( TheFile ) <> TRUE then
- Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
- exit sub
- end if
-
- PrintLog "- Tools / Spellcheck with a defined mistake"
- Select Case iSprache
- case 01 : sErrorSampleText = "Thatts not a trick, it" ' 's a Sony." (removing this last part because of different apostrophes in StarSuite)
- sWordToBeChecked = "Thatts"
- sLanguageName = "English (USA)"
- case 03 : sErrorSampleText = "Escrive os seus dados de utilizador correctamente e tome nota deles."
- sWordToBeChecked = "Escrive"
- sLanguageName = "Português"
- case 07 : sErrorSampleText = "ВоеннаÑ? техничеÑ?кого Ñ?aтрудничеÑ?тва, проблему задолженноÑ?ти и вопроÑ?Ñ‹ региональных Ñ?вÑ?зей."
- sWordToBeChecked = "Ñ?aтрудничеÑ?тва"
- sLanguageName = "РуÑ?Ñ?кий"
- case 31 : sErrorSampleText = "Wijek danken u voor uw interesse in het samenwerken met Sun Microsystems."
- sWordToBeChecked = "Wijek"
- sLanguageName = "Nederlands (NL)"
- case 33 : sErrorSampleText = "Ilk nous faut donc un de temps pour examiner avec soin"
- sWordToBeChecked = "Ilk"
- sLanguageName = "Français (France)"
- case 34 : sErrorSampleText = "Este archivo contiene información importnte sobre el programa."
- sWordToBeChecked = "importnte"
- sLanguageName = "Español (España)"
- case 36 : sErrorSampleText = "Boszniai amerikai kontingens háromnegyedének – mintegy négyezer katona – magyarországi telepítése egy éven belül megtörténhet."
- sWordToBeChecked = "háromnegyedének"
- sLanguageName = "Magyar"
- case 39 : sErrorSampleText = "Lab ringraziamo per l'interesse"
- sWordToBeChecked = "Lab"
- sLanguageName = "Italiano (Italia)"
- case 45 : sErrorSampleText = "Igke er sikret maksimal indflydelse på den fremtidige europæiske udlændingepolitik."
- sWordToBeChecked = "Igke"
- sLanguageName = "Dansk"
- case 46 : sErrorSampleText = "Dsän här filen innehåller viktig programinformation."
- sWordToBeChecked = "Dsän"
- sLanguageName = "svenska (Sverige)"
- case 48 : sErrorSampleText = "walno w zadnim wypadku przerywa uruchomionego serwisu !"
- sWordToBeChecked = "Walno"
- sLanguageName = "Polski"
- case 49 : sErrorSampleText = "Diees ist ein Fehler."
- sWordToBeChecked = "Diees"
- sLanguageName = "Deutsch (Deutschland)"
- case 50 : sErrorSampleText = "Tuki je nekaj narobe."
- sWordToBeChecked = "Tuki"
- sLanguageName = "SlovenÅ¡Ä?ina"
- case 55 : sErrorSampleText = "Esta poderia ser a respista para suas preces?"
- sWordToBeChecked = "respista"
- sLanguageName = "Português (Brasil)"
- 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 else : QAErrorLog "The language " + wSysLanguage +" has no defined Errortext. No test"
- goto endsub
- end select
-
- printlog " Open document where the formatting is set to the language we wish to test."
- call hFileOpenLocally (TheFile,false)
-
-
- '/// Insert a sentence with one definded mistake and execute spellcheck ///
- Call wTypeKeys sErrorSampleText
- Call wTypeKeys "<Return><Up>"
- wait 500
- ToolsSpellcheckWriter
- 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
- Sleep 2
- Kontext "Spellcheck"
- if Not Spellcheck.Exists then
- Warnlog "Spellchecker is not up !"
- Call hCloseDocument
- goto endsub
- end if
- printlog "Current selected dictionary language is: " & DictionaryLanguage.GetSelText
- ' Dictionary Language is language dependend. Function to be created
- printlog " - check language"
- 'if DictionaryLanguage.GetSelText <> gLanguage then Warnlog "Dictionary language " + DictionaryLanguage.GetSelText +" selected"
- printlog " - replace wrong word with a suggestion"
- '/// replace wrong word with a suggestion ///
-
- if trim$(NotInDictionary.GetText) <> trim(sErrorSampleText) then
- warnlog " " & sErrorSampleText & " has not been detected as mistake. Detected mistake is:" & NotInDictionary.GetText
- end if
-
- if Suggestions.GetItemCount > 0 then
- if Suggestions.IsEnabled then
- try
- sDummy = Suggestions.GetItemText (2)
- Suggestions.Select 2
- catch
- sDummy = Suggestions.GetItemText (1)
- Suggestions.Select 1
- endcatch
- ' Next check does not work because if word is selected it will only be highlited!!"
- ' if Not NotInDictionary.GetText <> sErrorSampleText then Warnlog "Text in preview has not been replaced with the suggestion"
- Change.Click
- else
- QAErrorLog "No suggestions made from spellchecker"
- end if
- else
- QAErrorLog "Please choose another word to check suggestions, because no suggestion found!"
- end if
- Kontext "Active"
- if Active.Exists then
- try
- Active.OK
- catch
- Warnlog Active.Gettext
- Active.No
- endcatch
- end if
-
- Kontext "Spellcheck"
- if Spellcheck.Exists then SpellcheckClose.Click
-
- Call wTypeKeys "<Up><Home>"
- Call wTypeKeys "<Shift End>"
- Sleep 1
- EditCopy
- if GetClipboardText = sErrorSampleText then Warnlog "Replaced text in document is wrong. Not "+ sErrorSampleText + " but " + GetClipboardText
- Call hCloseDocument
-
-endcase
-
-' *******************************************************************
-
-testcase tToolsSpellcheckForward
- Dim sDummy as string
- Dim sWordToBeAdded as string
- Dim InsFile as string
- Dim Add_Word as string
- Dim sDictionary as string
-
- PrintLog "- Tools / Spellcheck / check forward"
- '/// Open specified document depending on language to check spellcheck ///
- '/// document has 4 defined wrong words ///
- InsFile = wGetSpellcheckDocumentName(1)
- Select Case InsFile
- Case "None"
- Printlog "- No Spellcheck for this language available!"
- goto endsub
- case "Empty"
- QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
- goto endsub
- end select
-
- if gApplication = "MASTERDOCUMENT" then
- if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
- EditPaste
- else
- hFileOpenLocally( InsFile)
-
- end if
- '/// point cursor to beginning of document and execute spellcheck ///
- Call wTypeKeys "<Mod1 Home>"
-
- select case iSprache
- case 01 : sDummy = "exprass" : sWordToBeAdded = "pablischer"
- case 07 : sDummy = "решаaт" : sWordToBeAdded = "кaнкретных"
- case 03 : sDummy = "quante" : sWordToBeAdded = "cempas"
- case 31 : sDummy = "haaietanden" : sWordToBeAdded = "widerzijdse"
- case 33 : sDummy = "votrex" : sWordToBeAdded = "recontacterons"
- case 34 : sDummy = "Asegúree" : sWordToBeAdded = "diretorio"
- case 36 : sDummy = "hétozres" : sWordToBeAdded = "jelentos"
- case 39 : sDummy = "meczanici" : sWordToBeAdded = "anniche"
- case 45 : sDummy = "grend" : sWordToBeAdded = "lando"
- case 46 : sDummy = "handbroken" : sWordToBeAdded = "viktikt"
- case 48 : sDummy = "znajdujacej" : sWordToBeAdded = "usuniete"
- case 49 : sDummy = "reichtt" : sWordToBeAdded = "viierter"
- case 50 : sDummy = "Paglejmo" : sWordToBeAdded = "Ä?trto"
- case 55 : sDummy = "horat" : sWordToBeAdded = "dpa"
- end select
-
- wait 500
- ToolsSpellcheckWriter
- Sleep 2
- Kontext "Spellcheck"
- Printlog " - Replace all (" + NotInDictionary.Gettext + ") ...."
- '/// Replace first found word with 1 suggestion in list ///
- if Suggestions.IsEnabled then
- Suggestions.Select 1
- Printlog " - .... with (" + NotInDictionary.Gettext + ")"
- wait 500
- try
- ChangeAll.Click
- catch
- Warnlog "Button 'change all' is not accessible!"
- endcatch
- '/// Select 'Always replace' ///
- Sleep 1
- else
- QAErrorLog "No suggestions made from spellchecker!=>Choose 'Ignore All'"
- if IgnoreAll.IsEnabled then IgnoreAll.Click
- end if
-
- Printlog " - Ignore All (" + NotInDictionary.Gettext + ")"
- '/// For second wrong word select 'Ignore all' ///
- wait 500
- try
- IgnoreAll.Click
- catch
- Warnlog "Button 'Ignore all' is not accessible"
- endcatch
- Sleep 1
-
- Printlog " - Ignore (" + NotInDictionary.Gettext + ")"
- '/// For 3rd wrong word select 'Ignore' ///
- wait 500
-' try
-' IgnoreOnce.Click
-' catch
-' Warnlog "Button 'Ignore once' is not accessible"
-' endcatch
-' Sleep 1
-
- Kontext "Active"
- if Active.Exists(3) then
- if Active.GetRT = 304 then
- Warnlog "Spellcheck has ended! Not reproducable by hand !"
- end if
- else
- Kontext "Spellcheck"
- Add_Word = trim$(NotInDictionary.Gettext)
- Printlog " - Add (" + sDummy + ")"
- '/// Add 4th word to dictionary ///
- if AddToDictionary.IsEnabled then
- AddToDictionary.Click
- wait 500
- '/// remember selected dictionary
- sDictionary = MenuGetitemText(1)
- Call hMenuSelectNr(1)
- Sleep 1
- else
- Warnlog "Unable to add word to dictionary->button is disabled!"
- end if
- end if
-
- Kontext "Active"
- if Active.Exists then
- If Active.GetRT = 304 then
- Active.Ok
- end if
- end if
-
- Kontext "Spellcheck"
- if Spellcheck.Exists then Spellcheck.Close
- Call wTypeKeys "<Home>"
-
- Printlog " - recheck: One mistake has to be found 3 times"
- wait 500
- '/// Recheck: One mistake has to be found 3 times ///
- ToolsSpellcheckWriter
- Sleep 2
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- Active.Yes
- Warnlog Active.Gettext
- endcatch
- end if
- end if
- Kontext "Spellcheck"
- if Spellcheck.Exists then
- if Instr(NotInDictionary.GetText, sDummy) = 0 then
- Warnlog "Jumped to wrong mistake! Not " & sDummy & " but " & Suggestions.GetSelText
- else
- try
- IgnoreAll.Click
- catch
- Warnlog "Button 'Ignore all' is not accessible"
- endcatch
- end if
- end if
- Sleep 2
- Kontext
- if Active.Exists(2) then
- Active.OK
- else
- Kontext "Spellcheck"
- if Spellcheck.Exists then Spellcheck.Close
- end if
- Sleep 1
-
- GoOn:
- Printlog "- Deleting the Ignore list"
- '/// Delete entrys in Ignorelist ///
- Call wIgnorierenListeLoeschen
-
- Printlog " - Delete added word in dictionary"
- '/// Delete added word in dictionary ///
- Call WortAusWoerterbuchLoeschen ( sDummy )
-
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSpellcheckOnlyOneWord
- Dim sWordToBeChecked as string
- Dim InsFile as string
- Dim ReplacedWith as String
- Dim i as integer
-
- '/// Open specified document depending on language to check spellcheck ///
- '/// document has 1 defined wrong word ///
- PrintLog "- Tools / Spellchecking / Check only one word"
- InsFile = wGetSpellcheckDocumentName(2)
- Select Case InsFile
- Case "None"
- Printlog "- No Spellcheck for this language available!"
- goto endsub
- case "Empty"
- QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!"
- goto endsub
- end select
-
- if gApplication = "MASTERDOCUMENT" then
- if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
- EditPaste
- else
- hFileOpenLocally( InsFile)
-
- end if
- Call wTypeKeys "<Mod1 Home>"
-
- select case iSprache
- case 01 : sWordToBeChecked = "excetionally" ' this word is wrong
- case 07 : sWordToBeChecked = "КaнÑ?титуции"
- case 03 : sWordToBeChecked = "semstre" ' this word is wrong
- case 31 : sWordToBeChecked = "lidstartesn" ' this word is wrong
- case 33 : sWordToBeChecked = "heues" ' this word is wrong
- case 34 : sWordToBeChecked = "vacunaión" ' this word is wrong
- case 36 : sWordToBeChecked = "fekvo" ' this word is wrong
- case 39 : sWordToBeChecked = "brasilianir" ' this word is wrong
- case 45 : sWordToBeChecked = "Amserdam" ' this word is wrong
- case 46 : sWordToBeChecked = "avrttades" ' this word is wrong
- case 48 : sWordToBeChecked = "stosowanei" ' this word is wrong
- case 49 : sWordToBeChecked = "georaphischen" ' this word is wrong
- case 50 : sWordToBeChecked = "ssmo" ' this word is wrong
- case 55 : sWordToBeChecked = "Veigo" ' this word is wrong
- end select
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- try
- SearchFor.Settext ""
- catch
- endcatch
- if SimilaritySearch.IsVisible = False then More.Click
- if SimilaritySearch.IsEnabled then SimilaritySearch.Uncheck
- if SearchForStyles.IsEnabled then SearchForStyles.Uncheck
- if RegularExpressions.IsEnabled then RegularExpressions.Uncheck
- if NoFormat.IsEnabled then NoFormat.Click
- if CurrentSelectionOnly.IsEnabled then CurrentSelectionOnly.Uncheck
- WholeWordsOnly.Uncheck
- Backwards.Uncheck
- MatchCase.Uncheck
- RegularExpressions.Check
-
- SearchFor.Settext sWordToBeChecked
- SearchNow.Click
- Kontext "Active"
- if Active.Exists then
- if Active.getRT = 304 then
- Warnlog Active.Gettext
- try
- Active.Ok
- catch
- Active.No
- endcatch
- end if
- end if
-
- Kontext "FindAndReplace"
- if FindAndReplace.Exists then FindAndReplace.Close
-
- ToolsSpellcheckWriter
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog "Spellcheck doesn't work correctly:" & Active.Gettext
- try
- Active.Ok
- catch
- Active.No
- endcatch
- Call hCloseDocument
- goto endsub
- end if
- end if
-
- Kontext "Spellcheck"
- Printlog " - Replace all"
- if Suggestions.GetItemCount > 0 then
- if Suggestions.IsEnabled then
- Suggestions.Select 1
- wait 500
- Suggestions.TypeKeys "<Down><Up>"
- ReplacedWith = Suggestions.GetSelText
- wait 500
- if Change.IsEnabled then Change.Click
- Sleep 1
- else
- QAErrorLog "No suggestions made from spellchecker!"
- Spellcheck.Close
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "No suggestion for word: " & sWordToBeChecked & " found. Test stops"
- Spellcheck.Close
- Call hCloseDocument
- goto endsub
- end if
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- Active.No
- Warnlog Active.Gettext
- endcatch
- end if
- end if
-
- Kontext "Spellcheck"
- if Spellcheck.Exists then SpellcheckClose.Click
-
- Call wTypeKeys "<Mod1 Shift Left>"
- try
- EditCopy
- if GetClipboardtext = sWordToBeChecked then
- Warnlog "Spellchecker does not commit changes correctly (" & GetClipboardtext & " found )"
- Call hCloseDocument
- goto endsub
- end if
- catch
- Warnlog "- Didn't found the word to check! No Spellchecking for one word!"
- Call hCloseDocument
- goto endsub
- endcatch
-
- '/// Execute spellcheck again ///
- wait 500
- ToolsSpellcheckWriter
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- Warnlog "Spellchecker finishes though wrong words in documents"
- end if
- end if
- catch
- Active.Ok
- endcatch
- end if
- else
- Sleep 2
- Kontext "Spellcheck"
- if Spellcheck.Exists then
- Warnlog "Probably the replaced word found wrong again!"
- Spellcheck.Close
- end if
- end if
-
- Kontext "Spellcheck"
- if Spellcheck.Exists then Spellcheck.Close
-
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSpellcheckAutomatic
- Dim iError1 as integer
- Dim iError2 as integer
- Dim sError1 as string
- Dim sError2 as string
- Dim j as integer
- Dim sNumberOfSuggestions as string
- Dim sReplaceWithWord as string
- Dim sDefaultFormat as string
- Dim TheFile as String
-
- TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt")
- if FileExists ( TheFile ) <> TRUE then
- Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
- exit sub
- end if
-
- PrintLog "- Tools / Spellcheck / AutoSpellcheck"
- printlog " Open document where the formatting is set to the language we wish to test."
- call hFileOpenLocally (TheFile,false)
-
-
- '/// Enable Auto-Spellcheck in options
- Call wEnableAutoSpellcheck ( true )
-
- '/// Check Auto-Spellcheck and insert a sentence with 2 mistakes ///
- printlog " - write text"
- select case iSprache
- case 01 : wTypeKeys "Hello thiis here are too errorrs "
- iError1 = 1 : iError2 = 4
- sError1 = "thiis" : sError1 = "errorrs"
- sDefaultFormat = "Standard"
- case 03 : wTypeKeys "Aqui poderá elimitnar componentes já instalados ou instalar novos compotentes numa "
- iError1 = 2 : iError2 = 7
- sError1 = "elimitnar" : sError1 = "compotentes"
- sDefaultFormat = "Padrão"
- case 31 : wTypeKeys "Betaling binnern 14 dagen rekeningsdatum met 2% kortng, binnen 30 dagen nettor "
- iError1 = 1 : iError2 = 7
- sError1 = "binnern" : sError1 = "rekeningsdatum"
- sDefaultFormat = "Standaard"
- case 33 : wTypeKeys "Je vious remercie d'accuser réception dex ce courrier "
- iError1 = 1 : iError2 = 4
- sError1 = "vious" : sError1 = "dex"
- sDefaultFormat = "Standard"
- case 34 : wTypeKeys "Este archvo contiene información importnte sobre el programa."
- iError1 = 1 : iError2 = 3
- sError1 = "archvo" : sError1 = "importnte"
- sDefaultFormat = "Estándar"
- case 36 : wTypeKeys "A hétezres koszovói amerikai kontingens jelentos részét is a magyarországi bázison helyezi majd el."
- iError1 = 1 : iError2 = 4
- sError1 = "hétezres" : sError1 = "jelentos"
- sDefaultFormat = "Alapértelmezett"
- case 39 : wTypeKeys "La sfumaturar è statsi modificata senza salvare "
- iError1 = 1 : iError2 = 2
- sError1 = "sfumaturar" : sError1 = "statsi"
- sDefaultFormat = "Standard"
- case 45 : wTypeKeys "Han advarade både mod at kalde traktüten et fredens projekt "
- iError1 = 1 : iError2 = 5
- sError1 = "advarade" : sError1 = "traktüten"
- sDefaultFormat = "Standard"
- case 46 : wTypeKeys "Den här fiten innehåller viktit programinformation "
- iError1 = 2 : iError2 = 2
- sError1 = "fiten" : sError1 = "viktit"
- sDefaultFormat = "Standard"
- case 48 : wTypeKeys "Nie wolno w zadim wypadku przerywa uruchomiongo serwisu "
- iError1 = 3 : iError2 = 3
- sError1 = "zadim" : sError1 = "uruchomiongo"
- sDefaultFormat = "Standard"
- case 49 : wTypeKeys "Hallo hiaer sind swei Fehler "
- iError1 = 1 : iError2 = 2
- sError1 = "hiaer" : sError1 = "swei"
- sDefaultFormat = "Standard"
- case 50 : wTypeKeys "Tuki sta dve napki"
- iError1 = 1 : iError2 = 2
- sError1 = "Tuki" : sError1 = "napki"
- sDefaultFormat = "Standard"
- case 55 : wTypeKeys "Aqui poderá elimitnar componentes já instalados ou instalar novos compotentes numa "
- iError1 = 2 : iError2 = 7
- sError1 = "elimitnar" : sError1 = "compotentes"
- sDefaultFormat = "Padrão"
- case 81 : Printlog "- No Spellcheck in Japanese!"
- Call hCloseDocument
- goto endsub
- case 82 : Printlog "- No Spellcheck in Korean!"
- Call hCloseDocument
- goto endsub
- case 86 : Printlog "- No Spellcheck in Chinese (simplified)!"
- Call hCloseDocument
- goto endsub
- case 88 : Printlog "- No Spellcheck in Chinese (traditional)!"
- Call hCloseDocument
- goto endsub
- case else : QAErrorlog "The language " + iSprache +" has no defined errortext. No Test!"
- Call hCloseDocument
- goto endsub
- end select
-
- Call wTypeKeys "<Space><Return>"
-
- printlog " - relieve mistake"
- Call wTypeKeys "<Up><Home>"
- Call wTypeKeys "<Mod1 Right>", iError1
- Call wTypeKeys "<Right>" ' Cursor in fehlerhaftes NotInDictionary stellen
- Wait (500)
- '/// Open contextmenu in first wrong word ///
- Call wTypeKeys "<Shift F10>"
- sReplaceWithWord=hMenuItemGetText (2)
- if sReplaceWithWord<>sDefaultFormat then
- sNumberOfSuggestions=MenuGetItemCount - 6
- '/// Check if there is a suggestion and replace word ///
- if sNumberOfSuggestions <=0 then
- Warnlog "- No suggestions in Context menu for the first wrong word!"
- else
- printlog "- Context menu has " + sNumberOfSuggestions + " suggestions to the 1. wrong word!"
- Call hMenuSelectNr (2)
- Call wTypeKeys "<Shift Mod1 Left>"
- try
- EditCopy
- if GetClipboardtext<> sReplaceWithWord then
- Warnlog "- 1. wrong Word has not been replaced with " + sReplaceWithWord + " but "+ GetClipBoardtext
- else
- printlog "- 1. wrong word has been replaced with the 1. entry in context menu!"
- end if
- catch
- endcatch
- end if
- else
- Warnlog "- AutoSpellcheck doesn't work , wrong Context menu! (1.Word)"
- end if
- Wait (5000)
- Call wTypeKeys "<Mod1 Right>", iError2
- Wait (5000)
- Call wTypeKeys "<Right>" ' Cursor in fehlerhaftes NotInDictionary stellen
- Wait (5000)
- Call wTypeKeys "<Shift F10>"
-
- sReplaceWithWord=hMenuItemGetText (2)
- if sReplaceWithWord<>sDefaultFormat then
- sNumberOfSuggestions=MenuGetItemCount - 6
- if sNumberOfSuggestions <=0 then
- Warnlog "- No suggestions in Contextmenu for 2. wrong Word !"
- else
- printlog "- Context menu has " + sNumberOfSuggestions + " suggestions for the 2. wrong word!"
- Call hMenuSelectNr (2)
- Call wTypeKeys "<Shift Mod1 Left>"
- try
- EditCopy
- if GetClipboardtext<> sReplaceWithWord then
- Warnlog "- 2. wrong word has not been replaced with " + sReplaceWithWord + " but "+ GetClipBoardtext
- else
- printlog "- 2. mistake has been replaced with the 1. entry in context menu!"
- end if
- catch
- endcatch
- end if
- else
- Warnlog "- AutoSpellcheck doesn't work, wrong Context menu (2.Word)!"
- end if
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<F7>"
- Sleep 2
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.ok
- catch
- Active.Gettext
- Active.No
- endcatch
- end if
- else
- Kontext "Spellcheck"
- if Spellcheck.Exists then
- QAErrorlog "- Spellchecking dialog is still open. Not all words have been replaced!"
- Spellcheck.Close
- end if
- end if
-
- Kontext "Active"
- if Active.Exists then Active.ok
-
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-'------------------------------------------------------------------------------------------------------------------------------------------------------------------
-
-testcase tToolsSpellcheckChangeLanguageAttribute
-
- Dim sWordToBeChecked as string
- Dim InsFile as string
- Dim i as integer
- Dim ReplacedWith as string
- Dim PriorLanguage as string
- Dim CurrentLanguage as string
-
- '/// Open specified document depending on language to check spellcheck ///
- '/// document has 1 defined wrong word ///
- PrintLog "- Tools / Spellchecking / Check only one word"
- InsFile = wGetSpellcheckDocumentName(2)
- Select Case InsFile
- Case "None"
- Printlog "- No Spellcheck for this language available!"
- goto endsub
- case "Empty"
- QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
- goto endsub
- end select
-
- if gApplication = "MASTERDOCUMENT" then
- if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
- EditPaste
- else
- hFileOpenLocally( InsFile)
-
- end if
- Call wTypeKeys "<Mod1 Home>"
-
- select case iSprache
- case 01 : sWordToBeChecked = "excetionally" ' this word is wrong
- case 03 : sWordToBeChecked = "semstre" ' this word is wrong
- case 07 : sWordToBeChecked = "военно"
- case 31 : sWordToBeChecked = "lidstartesn" ' this word is wrong
- case 33 : sWordToBeChecked = "heues" ' this word is wrong
- case 34 : sWordToBeChecked = "vacunaión" ' this word is wrong
- case 36 : sWordToBeChecked = "jelentos"
- case 39 : sWordToBeChecked = "brasilianir" ' this word is wrong
- case 45 : sWordToBeChecked = "Amserdam" ' this word is wrong
- case 46 : sWordToBeChecked = "avrttades" ' this word is wrong
- case 48 : sWordToBeChecked = "stosowanei" ' this word is wrong
- case 49 : sWordToBeChecked = "georaphischen" ' this word is wrong
- case 50 : sWordToBeChecked = "ssmo" ' this word is wrong
- case 55 : sWordToBeChecked = "Veigo" ' this word is wrong
- end select
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- try
- SearchFor.Settext ""
- catch
- endcatch
- if SimilaritySearch.IsVisible = False then More.Click
- if SimilaritySearch.IsEnabled then SimilaritySearch.Uncheck
- if SearchForStyles.IsEnabled then SearchForStyles.Uncheck
- if RegularExpressions.IsEnabled then RegularExpressions.Uncheck
- if NoFormat.IsEnabled then NoFormat.Click
- if CurrentSelectionOnly.IsEnabled then CurrentSelectionOnly.Uncheck
- WholeWordsOnly.Uncheck
- Backwards.Uncheck
- MatchCase.Uncheck
- RegularExpressions.Check
-
- SearchFor.Settext sWordToBeChecked
- SearchNow.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog "- Didn't found the word to check! No Spellchecking for one word!"
- Active.Ok
- Kontext "FindAndReplace"
- FindAndReplace.Cancel
- Call hCloseDocument
- goto endsub
- end if
- end if
- Kontext "FindAndReplace"
- if FindAndReplace.Exists then FindAndReplace.Cancel
- EditCopy
-
- '/// Execute spellcheck: change language Attributes
- wait 500
- ToolsSpellcheckWriter
- Sleep 2
- Kontext "Spellcheck"
- if Not Spellcheck.Exists then
- Kontext "Active"
- If Active.Exists then
- If Active.GetRT = 304 then
- Warnlog Active.Gettext
- Warnlog "- Probably didn't found the word to check! No Spellchecking for one word!"
- Active.ok
- end if
- end if
- ToolsSpellcheckWriter
- Kontext "Spellcheck"
- end if
- '/// Replace found word with suggestion from list
- if Spellcheck.Exists then
- PriorLanguage = DictionaryLanguage.GetSelText
- printlog "- remember selected language: " & PriorLanguage
- for i = 1 to DictionaryLanguage.GetItemCount
- DictionaryLanguage.Select i
- if Suggestions.GetItemCount > 0 then
- CurrentLanguage = DictionaryLanguage.GetSelText
- if Suggestions.IsEnabled and CurrentLanguage <> PriorLanguage then
- printlog "- replace with language: " & CurrentLanguage
- Suggestions.Select 1
- ReplacedWith = Suggestions.GetSelText
- printlog "- replace with word: " & ReplacedWith
- i = DictionaryLanguage.GetItemCount + 1
- end if
- end if
- next i
- '/// Close spellcheck dialog and check if properties have been set
- if ReplacedWith > "" then
- Change.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- catch
- endcatch
- end if
- end if
- ' Finished message ?
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- endcatch
- end if
- end if
- wait 500
- Kontext "Spellcheck"
- if Spellcheck.Exists then
- SpellcheckClose.Click
- end if
- wait 500
- Call wTypeKeys "<Mod1 Home>"
- printlog "- find replaced word"
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- try
- SearchFor.Settext ""
- catch
- endcatch
-
- SearchFor.Settext ReplacedWith
- SearchNow.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Warnlog "- Didn't found the replaced word !"
- Active.Ok
- Kontext "FindAndReplace"
- FindAndReplace.Cancel
- Call hCloseDocument
- goto endsub
- end if
- end if
- Kontext "FindAndReplace"
- if FindAndReplace.Exists then FindAndReplace.Cancel
- wait 500
- FormatCharacter
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- try
- if Language.GetSelText <> CurrentLanguage then
- if Language.GetSelText = PriorLanguage then
- Warnlog "Language Attributes has not been set to" & CurrentLanguage
- else
- Warnlog "Language Attributes has not been set to " & CurrentLanguage & " but " & Language.GetSelText
- end if
- end if
- catch
- if LanguageWest.GetSelText <> CurrentLanguage then
- if LanguageWest.GetSelText = PriorLanguage then
- Warnlog "Language Attributes has not been set to" & CurrentLanguage
- else
- Warnlog "Language Attributes has not been set to " & CurrentLanguage & " but " & LanguageWest.GetSelText
- end if
- end if
- endcatch
- TabFont.Cancel
- else
- QAErrorlog "No suggestions found! Maybe wrong word should be changed to run more deeper testing"
- end if
- else
- Warnlog "Spellcheck dialog is not up !"
- end if
- '/// Close document ///
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsSpellcheckButtonChange
- Dim InsFile as string
- Dim i as integer
- '/// Open specified document depending on language to check spellcheck ///
- '/// document has 1 defined wrong word ///
- PrintLog "- Tools / Spellchecking / Check button 'change'"
- InsFile = wGetSpellcheckDocumentName(2)
- Select Case InsFile
- Case "None"
- Printlog "- No Spellcheck for this language available!"
- goto endsub
- case "Empty"
- QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
- goto endsub
- end select
-
- if gApplication = "MASTERDOCUMENT" then
- if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
- EditPaste
- else
- hFileOpenLocally( InsFile)
-
- end if
- Call wTypeKeys "<Mod1 Home>"
-
- '/// invoke the spellchecker
- ToolsSpellcheckWriter
- '/// Check if button change if disabled if
- '/// 1. No suggestion has been given from spellchecker
- '/// 2. The button 'change' should be enabled if found mistake has been changed!"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- Warnlog "No mistake found in sample document -> Bug!"
- catch
- endcatch
- else
- Kontext "Spellcheck"
- if Spellcheck.Exists then
- for i = 1 to DictionaryLanguage.GetItemCount
- DictionaryLanguage.Select i
- if Suggestions.GetItemCount = 0 then
- if Change.IsEnabled = true then
- Warnlog "Button 'Change' is enabled though no sugggestion is given"
- else
- NotInDictionary.TypeKeys "Enable me"
- wait 500
- if Not Change.IsEnabled = true then
- Warnlog "Button 'Change' is disabled though text has been changed"
- end if
- end if
- end if
- next i
- end if
- end if
- end if
- Kontext "Spellcheck"
- if Spellcheck.Exists then SpellcheckClose.Click
- '/// Close document
- Call hCloseDocument
-
-endcase
-
-' *******************************************************************
-
-testcase tToolsSpellcheckButtonChangeAll
- Dim InsFile as string
- Dim i as integer
- '/// Open specified document depending on language to check spellcheck ///
- '/// document has 1 defined wrong word ///
- PrintLog "- Tools / Spellchecking / Check button 'change all'"
- InsFile = wGetSpellcheckDocumentName(2)
- Select Case InsFile
- Case "None"
- Printlog "- No Spellcheck for this language available!"
- goto endsub
- case "Empty"
- QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
- goto endsub
- end select
-
- if gApplication = "MASTERDOCUMENT" then
- if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
- EditPaste
- else
- hFileOpenLocally( InsFile)
-
- end if
- Call wTypeKeys "<Mod1 Home>"
-
- '/// invoke the spellchecker
- ToolsSpellcheckWriter
- '/// Check if button 'change all' disabled if found mistake has been changed!"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- Warnlog "No mistake found in sample document -> Bug!"
- catch
- endcatch
- else
- Kontext "Spellcheck"
- if ChangeAll.IsEnabled then
- NotInDictionary.TypeKeys "Disable me"
- wait 500
- if ChangeAll.IsEnabled = true then
- Warnlog "Button 'Change all' is disabled though text has been changed"
- end if
- else
- Warnlog "Button 'Change all' should be enabled"
- end if
- SpellcheckClose.Click
- end if
- end if
- '/// Close document
- Call hCloseDocument
-
-endcase
-
-' *******************************************************************
-
-testcase tToolsThesaurus
-
- Dim sWordInitial as string
- Dim sWordToBeFound as string
- Dim TheFile as String
-
- PrintLog "- Tools / Thesaurus"
-
- 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 FileExists ( TheFile ) <> TRUE then
- Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
- exit sub
- end if
-
- select case iSprache
- case 01 : sWordInitial = "Morning"
- case 03 : sWordInitial = "Confirmam"
- case 07 : Printlog "- No Thesaurus in Russian!"
- goto endsub
- case 31 : sWordInitial = "Hulp"
- case 33 : sWordInitial = "Payer"
- case 34 : sWordInitial = "Suficiente"
- case 36 : Printlog "- No Thesaurus in Hungarian!"
- goto endsub
- case 39 : sWordInitial = "Lingua"
- case 45 : sWordInitial = "Først"
- case 46 : sWordInitial = "Däng"
- case 48 : sWordInitial = "wypowiedź"
- case 49 : sWordInitial = "Mann"
- case 50 : sWordInitial = "smisel"
- case 55 : Printlog "- No Thesaurus in Portuguese (Brazil) !"
- 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 30, 35, 36, 37, 42, 47, 48, 51, 90
- Printlog "- No Thesaurus available !"
- goto endsub
- case else : QAErrorlog "The language " + iSprache + " has no defined errortext. No Test!"
- goto endsub
- end select
-
- printlog "Open new preformatted-writerdocument"
- call hFileOpenLocally (TheFile,false)
-
-
- printlog "- Thesaurus without a word"
- '/// Call Thesaurus without a written word ///
- ToolsLanguageThesaurus
- Kontext "Thesaurus"
- if CurrentWord.GetSelText <> "" then Warnlog "- Though no word has been selected Current Word textfield is filled !"
- if ReplaceWith.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!"
- printlog "Set language dependent word in textfield Current Word"
- CurrentWord.Settext sWordInitial
-
- Sleep 2
- if Alternatives.GetItemCount = 0 then
- Warnlog "No alternatives text"
- else
- if ReplaceWith.Gettext <> Alternatives.GetText(Alternatives.GetSelIndex) then
- Warnlog "Replace with textfield was not filled with word from alternative"
- endif
- endif
- sWordToBeFound = ReplaceWith.GetText
- Thesaurus.OK
- Call wTypeKeys "<Home><Shift End>"
- wait 200
- EditCopy
- if iSprache = 1 then
- if GetClipboardText <> sWordToBeFound then Warnlog "Wrong word has been replaced, not => " + sWordInitial + " but => " + GetClipboardText
- else
- if LCase (GetClipboardText) <> LCase (sWordToBeFound) then Warnlog "Wrong word has been replaced, not => " + sWordToBeFound + " but => " + GetClipboardText
- end if
- Call hCloseDocument
- wait 500
-
- printlog " Open new preformatted-document where the formatting is set to the language we wish to test."
- call hFileOpenLocally (TheFile,false)
-
-
- Call wTypeKeys sWordInitial
- Call wTypeKeys "<Home><Right><Right>"
-
- printlog "- Replace ( select alternative with cursor within word )"
- ToolsLanguageThesaurus
- Kontext "Thesaurus"
- wait 500
- if CurrentWord.GetSeltext = sWordInitial then
- sWordToBeFound = ReplaceWith.Gettext
- if Alternatives.GetItemCount > 0 then
- printlog "Select last entry in alternatives list"
- Alternatives.Select Alternatives.GetItemCount
- Alternatives.TypeKeys "<Space>"
- if ReplaceWith.Gettext = sWordToBeFound then
- Warnlog "Though alternative was selected replace with was not changed"
- else
- sWordToBeFound = ReplaceWith.Gettext
- end if
- Thesaurus.OK
- Call wTypeKeys "<Home><Shift End>"
- wait 200
- EditCopy
- if GetClipboardText <> sWordToBeFound then Warnlog "Text has not been correctly replaced, not => " + sWordToBeFound + " but => " + GetClipboardText
- else
- Warnlog "- No Alternative for current word"
- Thesaurus.Ok
- end if
- else
- Warnlog "Current word is not selected word !"
- end if
-
- Call wTypeKeys "<Home><Shift End><Delete>"
- Call wTypeKeys sWordInitial
-
- printlog "- Replace unchecked ( Cursor at words end )"
- ToolsLanguageThesaurus
- Kontext "Thesaurus"
- wait 500
- if CurrentWord.GetSeltext = sWordInitial then
- sWordToBeFound = ReplaceWith.Gettext
- if Alternatives.GetItemCount > 0 then
- printlog "Select last entry in alternatives list"
- Alternatives.Select Alternatives.GetItemCount
-
- if ReplaceWith.Gettext = sWordToBeFound then
- Warnlog "Though alternative was selected replace with was not changed"
- else
- Alternatives.TypeKeys "<Space>"
- sWordToBeFound = ReplaceWith.Gettext
- end if
- Thesaurus.OK
- Call wTypeKeys "<Home><Shift End>"
- wait 200
- EditCopy
- if GetClipboardText <> sWordToBeFound then Warnlog "Text has not been correctly replaced, not => " + sWordToBeFound + " but => " + GetClipboardText
- else
- Warnlog "- No Alternative for current word"
- Thesaurus.Ok
- end if
- else
- Warnlog "Current word is not selected word !"
- end if
-
- '/// Close thesaurus and writerdocument ///
- Call hCloseDocument
-endcase
-
-' *******************************************************************
-
-testcase tToolsThesaurusSynonyms
-
- Dim sWordInitial as string
- Dim sNumberOfSuggestions as string
- Dim sReplaceWithWord as string
- Dim TheFile as String
-
- PrintLog "- Tools / Thesaurus"
-
- 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 FileExists ( TheFile ) <> TRUE then
- Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
- exit sub
- end if
-
- select case iSprache
- case 01 : sWordInitial = "Morning"
- case 03 : sWordInitial = "Confirmam"
- case 07 : Printlog "- No Thesaurus in Russian!"
- goto endsub
- case 31 : sWordInitial = "Hulp"
- case 33 : sWordInitial = "Payer"
- case 34 : sWordInitial = "Suficiente"
- case 36 : Printlog "- No Thesaurus in Hungarian!"
- goto endsub
- case 39 : sWordInitial = "Lingua"
- case 45 : sWordInitial = "Først"
- case 46 : sWordInitial = "Däng"
- case 48 : sWordInitial = "wypowiedź"
- case 49 : sWordInitial = "Mann"
- case 50 : sWordInitial = "smisel"
- case 55 : Printlog "- No Thesaurus in Portuguese (Brazil) !"
- 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 30, 35, 36, 37, 42, 47, 48, 51, 90
- Printlog "- No Thesaurus available !"
- goto endsub
- case else : QAErrorlog "The language " + iSprache + " has no defined errortext. No Test!"
- goto endsub
- end select
-
- printlog "Open new preformatted-writerdocument"
- call hFileOpenLocally (TheFile,false)
-
- Call wTypeKeys sWordInitial
- Call wTypeKeys "<Shift Home>"
-
- printlog "Open contextmenu in wrong word"
- Call wTypeKeys "<Shift F10>"
- printlog "Select 'Synonyms' in context menu"
- Call hMenuSelectNr (13)
- sNumberOfSuggestions=MenuGetItemCount - 2
- '/// Check if there is a suggestion and replace word ///
- if sNumberOfSuggestions <=0 then
- Warnlog "- No synonyms in Context menu for the first wrong word!"
- else
- printlog "- Context menu has " + sNumberOfSuggestions + " synonyms for the 1. wrong word!"
- sReplaceWithWord=hMenuItemGetText (1)
- Call hMenuSelectNr (1)
- Call wTypeKeys "<Shift Mod1 Left>"
- try
- EditCopy
- if GetClipboardtext<> sReplaceWithWord then
- Warnlog "- 1. wrong Word has not been replaced with " + sReplaceWithWord + " but "+ GetClipBoardtext
- else
- printlog "- 1. wrong word has been replaced with the 1. entry in context menu!"
- end if
- catch
- endcatch
- end if
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck1.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck1.inc
deleted file mode 100644
index d2df892a3bc5..000000000000
--- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck1.inc
+++ /dev/null
@@ -1,160 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Spellcheck-Testing. Functional-Test.
-'*
-'\***********************************************************************
-
-sub w_spellcheck1
- Call tLanguage_Guess
-end sub
-
-'-------------------------------------------------------------------------
-
-testcase tLanguage_Guess
-
-'Variables:
-DIM iStringPosition AS integer 'Position of string in context menu for word, paragraph
-DIM iLanguageCount AS integer 'variable for counting through languages in test doc
-DIM WordPreSet AS string 'given string for comparison from w_locale_strings2.inc
-DIM WordLanguage AS string '"word is..."entry in context menu
-DIM ParagraphLanguage AS string '"paragraph is..."entry in context menu
-DIM ParagraphPreSet AS string 'given string for comparison of paragraphs from w_locale_strings2.inc
-DIM WordLanguageTemp AS string 'variable for checking if Office language is already covered in w_locale_strings2.inc
-
- '///Load test document///
- call hFileOpen (ConvertPath ( gTesttoolPath + "writer\optional\input\spellcheck\Language_Guessing_Sample_Texts.odt")) 'loading Test-Doc
-
- sleep(5)
- '----------------------------------------------------------------
- '///Enable auto spellcheck///
- Kontext "Standardbar"
- if AutoSpellcheck.GetState(2) <> 1 then 'cheking if auto-spellcheck is checked
- printlog "Autospellcheck not checked, checking Autospellcheck now"
- AutoSpellcheck.Click
- printlog "Autospellcheck checked"
- else
- printlog "Autospellcheck is already checked"
- end if
- '----------------------------------------------------------------
- ViewNavigator 'opening navigator and selecting table
- sleep(1)
- Call wNavigatorAuswahl(2,1)
- DocumentWriter.TypeKeys "<MOD1 UP>"
- ViewNavigator 'closing navigator
- printlog "-----------------"
- '----------------------------------------------------------------
- '///Put the cursor in the first wrong word///
-
- for iLanguageCount = 1 to 11 'running through the languages
- 'checking the word proposal
- printlog "CHECKING WORD:"
- DocumentWriter.TypeKeys "<MOD1 DOWN>"
- DocumentWriter.TypeKeys "<MOD1 DOWN>"
- '///Call context menu///
- DocumentWriter.TypeKeys "<SHIFT F10>" 'calling context menu
- 'selecting 'word is... position
- iStringPosition = hMenuItemGetCount - 1 'calculating last but one entry
-
- 'getting string from position
- WordLanguage = hMenuItemGetText(iStringPosition) 'gets text from entry
- 'printing out string for having a look at the values.
- printlog "WordLanguage is " + WordLanguage
- '///Verify that the language proposal "word is..." is correct///
- WordLanguageTemp = wGetLanguageGuessString("WordPreSet", iLanguageCount) 'comparing reality against the string in w_locale_strings2.inc
- if WordLanguageTemp > "" then 'checking if the language has really an entry in w_locale_strings2.inc
- if WordLanguage = WordLanguageTemp then
- printlog "Word language proposal is correct" 'all ok
- else
- warnlog "Word language proposal is not correct!" 'problem!
- end if
- else
- Call MenuSelect(0) 'closing menu when language is not yet covered
- Call hCloseDocument ''closing doc when language is not yet covered
- exit sub
- end if
-
- '///Apply the language for this word ///
- call hMenuItemCheck (iStringPosition) 'clicking on menu entry, closing context. Word looses redline.
- sleep (1)
- '///Verifiy that the language is set correctly for this word ///
- DocumentWriter.TypeKeys "<SHIFT F10>" 'calling context menu
- iStringPosition = hMenuItemGetCount - 1 'calculating last but one entry
- WordLanguage = hMenuItemGetText(iStringPosition) 'gets text from entry
- if WordLanguage = WordPreSet then ' checking if context menu ahs changed
- warnlog "Word language not applied correctly!" 'Problem!
- else
- printlog "Word language applied correctly" ''all ok
- end if
- Call MenuSelect(0) 'closing menu
-
- '----------------------------------------------------------------
- printlog "CHECKING PARAGRAPH:"
- EditUndo 'undoing hMenuItemCheck from Check-word-part
- DocumentWriter.TypeKeys "<MOD1 LEFT>"
- sleep (1)
- '///Call context menu///
- DocumentWriter.TypeKeys "<SHIFT F10>" 'calling context menu
- 'selecting 'paragraph is... position
- iStringPosition = hMenuItemGetCount 'calculating last entry
- 'getting string from position
- ParagraphLanguage = hMenuItemGetText(iStringPosition) 'gets text from entry
- 'printing out string
- printlog ParagraphLanguage
- '///Verify that the language proposal "paragraph is..." is correct///
- if ParagraphLanguage = wGetLanguageGuessString("ParagraphPreSet", iLanguageCount) then 'comparing reality against the string in w_locale_strings2.inc
- printlog "Paragraph language proposal is correct" 'all ok
- else
- warnlog "Paragraph language proposal is not correct!" 'Problem!
- end if
-
-
- '///Apply the language for this paragraph ///
- call hMenuItemCheck (iStringPosition) 'clicking on last menu entry, closing context. Paragraph looses redline.
- sleep (1)
- '///Verify that the language is set correctly for this paragraph ///
- DocumentWriter.TypeKeys "<SHIFT F10>" 'calling context menu
- iStringPosition = hMenuItemGetCount 'calculating last entry
- ParagraphLanguage = hMenuItemGetText(iStringPosition) 'gets text from entry
- '///Verify that the language is set correctly for this paragraph ///
- if ParagraphLanguage = ParagraphPreSet then
- warnlog "Paragraph language not applied correctly!" 'Problem
- else
- printlog "Paragraph language applied correctly" 'all ok
- end if
- Call MenuSelect(0) 'closing menu
- printlog "-----------------"
- '///Go to the next text sample ///
- '///Repeat for all western languages ///
- next iLanguageCount
-
- call hCloseDocument 'engl. Test-Doc closed
- '----------------------------------------------------------------
-endcase
-
diff --git a/testautomation/writer/optional/includes/stylist/w_stylist.inc b/testautomation/writer/optional/includes/stylist/w_stylist.inc
deleted file mode 100644
index ce607be28d30..000000000000
--- a/testautomation/writer/optional/includes/stylist/w_stylist.inc
+++ /dev/null
@@ -1,1024 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test common stylist functions and assigning styles
-'*
-'************************************************************************
-'*
-' #1 tFormatStylist1
-' #1 tFormatStylist2
-' #1 tFormatStylist3
-' #1 tFormatStylist4
-' #1 tFormatStylist5
-' #1 tFormatStylist6
-' #1 tFormatStylist7
-' #1 tAssigningStyles1
-' #1 tAssigningStyles2
-' #1 tAssigningStyles3
-' #1 tAssigningStyles4
-' #1 tAssigningStyles5
-' #1 tAssigningStyles6
-' #1 tAssigningStyles7
-' #1 tKeyboardShortcutToStyles
-'*
-'\***********************************************************************
-
-sub w_stylist
- printLog Chr(13) + "--------- Level 1 - Format / Stylist ----------"
-
- Call tFormatStylist1 ' all methods on stylist
- Call tFormatStylist2 ' interacting between documents
- Call tFormatStylist3 ' show all templates
- Call tFormatStylist4 ' search/create templates
- Call tFormatStylist5 ' select templet in stylist
- Call tFormatStylist6 ' new template from selection
- Call tFormatStylist7 ' new template from selection, modified via ContextMenu.
- Call tAssigningStyles1
- Call tAssigningStyles2
- Call tAssigningStyles3
- Call tAssigningStyles4
- Call tAssigningStyles5
- Call tAssigningStyles6
- Call tAssigningStyles7
- Call tKeyboardShortcutToStyles
-
-end sub
-
-' **********************************************************************
-
-testcase tFormatStylist1
- Dim xPos as long
- Dim yPos as long
- Dim xSize%
- Dim ySize%
-
- printlog "- Format / Stylist : all methods with Navigator as window"
- printlog "New writerdocument"
- Call hNewDocument
- printlog " - Call Stylist with F11"
- printlog "Call stylist with <F11> aand proof all windowmethods at stylist"
- if lcase(gPlatform) = "osx" then
- call hTypekeys "<mod1 t>"
- else
- Call wTypeKeys "<F11>"
- end if
- Kontext "Stylist"
- if Stylist.NotExists then
- Warnlog "No Stylist with <F11>"
- FormatStylist
- end if
- xPos = Stylist.GetPosX
- yPos = Stylist.GetPosY
- xSize% = Stylist.GetSizeX
- ySize% = Stylist.GetSizeY
-
- printlog " - move Stylist"
- Stylist.Move 10, 10
- Sleep 1
- Stylist.Move 300, 400
- Sleep 1
- Stylist.Move 590, 790
- Sleep 1
- Stylist.Move xPos, yPos
- Sleep 1
-
- printlog " - size Stylist"
- try
- Stylist.Size 300, 400
- catch
- Warnlog "Sizen Stylist doesn't work"
- endcatch
- Sleep 1
- try
- Stylist.Size xSize%, ySize%
- catch
- Warnlog "Sizen Stylist doesn't work"
- endcatch
- Sleep 1
-
- printlog " - close Stylist and reopen ( has to be the same size )"
- xPos = Stylist.GetPosX
- yPos = Stylist.GetPosY
- xSize% = Stylist.GetSizeX
- ySize% = Stylist.GetSizeY
- FormatStylist
- Sleep 1
- FormatStylist
- if xPos <> Stylist.GetPosX then Warnlog "x-Pos. has been changed : Not -> "+ xPos + " but -> "+ Stylist.GetPosX
- if yPos <> Stylist.GetPosY then Warnlog "y-Pos. has been changed : Not -> "+ yPos + " but -> "+ Stylist.GetPosY
- if xSize% <> Stylist.GetSizeX then Warnlog "x-Size has been changed : Not -> "+ xSize% + " but -> "+ Stylist.GetSizeX
- if ySize% <> Stylist.GetSizeY then Warnlog "y-Size has been changed : Not -> "+ ySize% + " but -> "+ Stylist.GetSizeY
-
- printlog " - dock Stylist"
- Stylist.Dock
- Sleep 1
- if NOT Stylist.IsDocked then Warnlog "Stylist has not been docked in"
- Stylist.Undock
- Sleep 1
-
- Stylist.Close
- printlog "Close document"
- Call hCloseDocument
-
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist2
- Dim xPos%
- Dim yPos%
- Dim xSize%
- Dim ySize%
-
- printlog "- Format/Stylist : Methods from Stylist as Window between more than one document"
- printlog " New document"
- Call hNewDocument
- printlog "check all methods of Stylist as Window between more than one document"
- Call wTypeKeys "Test the stylist functions"
- printlog " - Call Stylist in first document and check in a second document"
- Sleep 2
- Kontext "Stylist"
- If Not Stylist.Exists then FormatStylist
- Sleep 2
- Call hNewDocument
- Call wTypeKeys "Test the stylist functions"
- Sleep 2
- Kontext "Stylist"
- if Stylist.NotExists then Warnlog "No Stylist in new document"
-
- printlog " - Close all documents and reopen"
- Sleep 2
- Call hCloseDocument
- Sleep 2
- Call hCloseDocument
- Sleep 2
- Call hNewDocument
- Sleep 2
- Call wTypeKeys "Test the stylist functions"
- Kontext "Stylist"
- if Stylist.NotExists then Warnlog "No Stylist in a new document"
-
- printlog " - Dock Stylist in first document and check in a new if docked"
- Sleep 2
- Stylist.Dock
- Sleep 1
- Call hNewDocument
- Call wTypeKeys "Test the stylist functions"
- Kontext "Stylist"
- if NOT Stylist.IsDocked then Warnlog "Stylist is not docked in new document"
-
- printlog " - Close all documents, reopen one and check docked Stylist"
- Call hCloseDocument
- Sleep 2
- Call hCloseDocument
- Sleep 2
- Call hNewDocument
- Kontext "Stylist"
- if NOT Stylist.IsDocked then Warnlog "Stylist is not docked in new document"
-
- printlog " - Close Stylist with <F11>"
- Stylist.Undock
- Sleep 1
- if lcase(gPlatform) = "osx" then
- call hTypekeys "<mod1 t>"
- else
- Call wTypeKeys "<F11>"
- end if
- Kontext "Stylist"
- if NOT Stylist.NotExists then
- Warnlog "Stylist is still open"
- Stylist.Close
- end if
- printlog "Close document"
- Call hCloseDocument
-
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist3
- Dim i as Integer
- Dim AllStyles as integer
- Dim j as integer
- Dim RemString as string
- printlog "- Format / Stylist : select all Style properties"
-
- Call hNewDocument
- printlog " New writerdocument"
- FormatStylist
- printlog "Select all style properties in stylist"
- Kontext "Stylist"
- if Stylist.NotExists then FormatStylist
- printlog " - Paragraph Styles"
- Absatzvorlagen.Click
-
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- wait 500
- if i = 2 then ' All Styles
- Vorlagenliste.TypeKeys "<Home>"
- AllStyles = 1
- For j = 1 to 200
- RemString = Vorlagenliste.Gettext
- 'Include this, if you want to see the styles in writerdocument
- 'SetClipboard Vorlagenliste.Gettext
- 'Kontext "DocumentWriter"
- 'DocumentWriter.TypeKeys GetClipboardtext + "<Return>"
- 'Kontext "Stylist"
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.Gettext <> RemString then
- AllStyles = AllStyles + 1
- else
- j = 202
- if AllStyles <> "122" then
- Select Case iSprache
- Case 07
- warnlog "Double styles in stylist"
- Case 55
- warnlog "Missing Style in Stylist"
- Case 31
- warnlog "Missing Style in Stylist"
- Case else
- Warnlog "There are " + AllStyles + " styles in this category and not 122!"
- end select
- else
- printlog "There are " + AllStyles + " styles in this category!"
- end if
- end if
- next j
- end if
- Sleep 1
- next i
-
- Zeichenvorlagen.Click
- Sleep 2
- printlog " - Chapter Styles"
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- AllStyles = AllStyles + 1
- Sleep 1
- next i
-
- Rahmenvorlagen.Click
- Sleep 2
- printlog " - Frame Styles"
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- AllStyles = AllStyles + 1
- Sleep 1
- next i
-
- Seitenvorlagen.Click
- Sleep 2
- printlog " - Page Styles"
- for i=1 to Gruppenliste.GetItemCount
- Gruppenliste.Select i
- AllStyles = AllStyles + 1
- Sleep 1
- next i
- Stylist.Close
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist4
- Dim i as Integer
- Dim AlterWert$
- Dim NeuerWert$
-
- printlog "- Format / Stylist : check created Styles"
- printlog "New writerdocument"
- Call hNewDocument
- printlog " - create Paragraph Style in Stylist"
- Call wStyleCreate ( "ATesttool", "Paragraph", true )
- Kontext "Stylist"
- printlog "Check if Style has been added in stylist"
- if wStyleSelect ( "ATesttool", "Paragraph" ) = false then Warnlog "Paragraph Style has not been found"
-
- printlog " - Create Character Style in Stylist"
- Call wStyleCreate ( "BTesttool", "Character", true )
- if wStyleSelect ( "BTesttool", "Character" ) = false then Warnlog "Character Style has not been found!"
- printlog " - Create Frame Style in Stylist"
- Call wStyleCreate ( "CTesttool", "Frame", true )
- if wStyleSelect ( "CTesttool", "Frame" ) = false then Warnlog "Frame Style has not been found!"
-
- printlog " - Create Page Style in Stylist"
- Call wStyleCreate ( "DTesttool", "Page", true )
- if wStyleSelect ( "DTesttool", "Page" ) = false then Warnlog "Page Style has not been found"
-
- printlog " - creating Styles should not have been affecting to new documents"
- ' To avoid focus problems on unix first close stylist
- Kontext "Stylist"
- if Stylist.Exists then FormatStylist
- Call hNewDocument
- Kontext "Stylist"
- if Not Stylist.Exists then FormatStylist
-
- if wStyleSelect ( "ATesttool", "Paragraph" ) = true then Warnlog "Paragraph Style has been found in new document"
- if wStyleSelect ( "BTesttool", "Character" ) = true then Warnlog "Character Style has been found in new document"
- 'if wStyleSelect ( "CTesttool", "Frame" ) = true then Warnlog "Frame Style has been found in new document"
- if wStyleSelect ( "DTesttool", "Page" ) = true then Warnlog "Page Style has been found in new document"
-
- Call hCloseDocument
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist5
- Dim SuchMal as string, i as integer
- Dim bStyleFound as boolean
-
- printlog "- Format / Stylist : select Style"
- printlog "New writerdocument"
- if bAsianLan = True then
- printlog "- Not in Asian languages!"
- goto endsub
- end if
- Call hNewDocument
- Call wTypeKeys "Dies ist ein formatierter Text <Shift Home>"
- printlog " - format Text"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- StrikeThrough.Select 2
- Outline.Check
- TabFontEffects.OK
-
- printlog " - adjust to Standard-Format through the Stylist"
- printlog "adjust to Standard-Format through the Stylist"
- FormatStylist
- Kontext "Stylist"
- if Stylist.NotExists then FormatStylist
- 'Get name for 'default' template
- Kontext "TextObjectbar"
- SuchMal = Vorlage.GetSelText
- printlog "Using " & SuchMal & " as 'default'"
- Kontext "Stylist"
-
- Vorlagenliste.TypeKeys "<Home>"
- bStyleFound = false
- for i=1 to Vorlagenliste.GetItemCount
- Vorlagenliste.Select i
- if Vorlagenliste.GetText = Suchmal then
- Vorlagenliste.TypeKeys "<Return>"
- bStyleFound = true
- exit for
- end if
- next i
- Stylist.Close
-
- if bStyleFound = false then
- Warnlog "Style: " & Suchmal & " has not been found in Stylist"
- Call hCloseDocument
- goto endsub
- end if
-
- printlog " - check format"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if StrikeThrough.GetSelIndex = 2 then Warnlog "Wrong entry selected in StrikeThrough"
- if Outline.IsChecked then Warnlog "Format Outline is still checked"
- TabFontEffects.OK
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist6
- Dim i as integer
-
- printlog "- Format / Stylist : new Style from selection"
- printlog "New writerdocument"
- Call hNewDocument
- Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
- printlog "create a new style from selection"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Shadow.Check
- StrikeThrough.Select 2
- Overline.Select 2
- OverlineColor.Select 6
- Outline.Check
- Effects.Select 3
- Blinking.Check
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- URLName.SetText "www.mikeportnoy.com"
- TabHyperlinkZeichen.OK
-
- printlog " - Create Character Style from selection"
- Kontext "Stylist"
- if not Stylist.Exists then FormatStylist
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- Sleep 1
-
- AusSelektion.OpenMenu
- Sleep 1
- hMenuSelectNr(1)
- Sleep 1
-
- Kontext "VorlageErzeugen"
- if VorlageErzeugen.Exists then
- VorlagenName.SetText "Testtool"
- VorlageErzeugen.OK
- else
- Warnlog "Creating Style did not work. Dialog not up!"
- end if
-
- printlog " - assign new Character Style to a new text"
- wTypeKeys "<Home><Down>",3
- wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- if Vorlagenliste.GetSeltext <> "Testtool" then 'Go find the entry.
- Vorlagenliste.TypeKeys "<Home>"
- For i = 1 to 100
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
- i = 102
- end if
- next i
- end if
- Vorlagenliste.TypeKeys "<Return>" 'Assign to text.
- Stylist.Close
- if i = 101 then
- Warnlog "Created Style could not be found in Stylist!"
- else
- Printlog " - check Style"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
- if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
- if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
- if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
- if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "TabHyperlink: URL is wrong " + URLName.Gettext
- TabHyperlinkZeichen.OK
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tFormatStylist7
- Dim i as integer
-
- printlog "- Format / Stylist : new Style from selection, then modified via the ContextMenu."
- printlog "New writerdocument"
- Call hNewDocument
- Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
- printlog "create a new style from selection"
-
- printlog " - Create Character Style from selection"
- Kontext "Stylist"
- if not Stylist.Exists then FormatStylist
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- Sleep 1
-
- AusSelektion.OpenMenu
- Sleep 1
- hMenuSelectNr(1)
- Sleep 1
-
- Kontext "VorlageErzeugen"
- if VorlageErzeugen.Exists then
- VorlagenName.SetText "Testtool"
- VorlageErzeugen.OK
- else
- Warnlog "Creating Style did not work. Dialog not up!"
- end if
-
- printlog " Open ContextMenu over the 'Testtool' Style."
- Kontext "Stylist"
- if not Stylist.Exists then FormatStylist
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- if Vorlagenliste.GetSeltext <> "Testtool" then
- Vorlagenliste.TypeKeys "<Home>"
- For i = 1 to 100
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.GetSeltext = "Testtool" then
- i = 102
- end if
- next i
- if i = 101 then
- warnlog "No Testtool -Stylist found. Check if new stylists can be created. Test ends."
- goto endsub
- end if
- end if
- Vorlagenliste.TypeKeys "<SHIFT F10>" 'Open ContextMenu
- Sleep 1
- printlog " Select 'Modify'"
- Call hMenuSelectNr(2) 'Modify
- Sleep 1
-
- printlog " Goto Tabpage 'Font Effects' and change some settings."
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Shadow.Check
- StrikeThrough.Select 2
- Overline.Select 2
- OverlineColor.Select 6
- Outline.Check
- Effects.Select 3
- Blinking.Check
- TabFontEffects.OK
-
- printlog " - assign new Character Style to a new text"
- wTypeKeys "<Home><Down>",3
- wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
-
- if Vorlagenliste.GetSeltext <> "Testtool" then
- Vorlagenliste.TypeKeys "<Home>"
- For i = 1 to 100
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
- i = 102
- end if
- next i
- end if
- Vorlagenliste.TypeKeys "<Return>" 'Assign Style to Text.
- Stylist.Close
- if i = 101 then
- Warnlog "Created Style could not be found in Stylist!"
- else
- Printlog " - check Style"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
- if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
- if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
- if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
- if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
- TabFontEffects.OK
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles1
- Dim i as integer
- Dim sStyles() as string
- Dim sTemp as string
- Dim j as integer
- Dim bStyleInList as boolean
-
- printlog "UI and Strings check"
- Call hNewDocument
- printlog "Open a new writerdocument"
- printlog "Check if the following strings and only those strings are present:"
- printlog "Clear formatting"
- printlog "Heading 1"
- printlog "Heading 2"
- printlog "Heading 3"
- printlog "Default"
- printlog "Text body"
- printlog "More..."
- Select Case iSprache
- Case 01 : sStyles = Array("Clear formatting", "Default", "Heading 1", "Heading 2", "Heading 3", "Text body", "More...")
- Case 07 : sStyles = Array("Отменить форматирование", "Базовый", "Заголовок 1", "Заголовок 2", "Заголовок 3", "ОÑ?новной текÑ?Ñ‚", "Дополнительно...")
- Case 31 : sStyles = Array("Opmaak wissen", "Kop 1", "Kop 2", "Kop 3", "Standaard", "Tekstblok", "Meer...")
- Case 33 : sStyles = Array("Effacer le formatage", "Corps de texte", "Par défaut", "Titre 1", "Titre 2", "Titre 3", "Autres...")
- Case 34 : sStyles = Array("Borrar formato", "Cuerpo de texto", "Encabezado 1", "Encabezado 2", "Encabezado 3", "Predeterminado", "Más...")
- Case 36 : sStyles = Array("Formázás törlése", "Alapértelmezett", "Címsor 1", "Címsor 2", "Címsor 3", "Szövegtörzs", "További...")
- Case 39 : sStyles = Array("Cancella formattazione", "Corpo testo", "Intestazione 1", "Intestazione 2", "Intestazione 3", "Standard", "Extra...")
- Case 46 : sStyles = Array("Radera formatering", "Brödtext", "Överskrift 1", "Överskrift 2", "Överskrift 3", "Standard", "Mer...")
- Case 48 : sStyles = Array("Wyczyść formatowanie", "Domyślnie", "Nagłówek 1", "Nagłówek 2", "Nagłówek 3", "Treść tekstu", "Więcej...")
- Case 49 : sStyles = Array("Formatierung löschen", "Standard", "Textkörper", "Überschrift 1", "Überschrift 2", "Überschrift 3", "Weitere...")
- Case 55 : sStyles = Array("Limpar formatação", "Corpo do texto", "Padrão", "Título 1", "Título 2", "Título 3", "Mais...")
- Case 81 : sStyles = Array("書�設定�解除", "本文", "標準", "見出� 1", "見出� 2", "見出� 3", "詳細...")
- Case 82 : sStyles = Array("서� 지우기", "기본값", "제목 1", "제목 2", "제목 3", "�스트 본문", "�세히...")
- Case 86 : sStyles = Array("清除格�", "默认", "标题 1", "标题 2", "标题 3", "正文", "更多(~M)...")
- Case 88 : sStyles = Array("清除格�", "內文", "標題 1", "標題 2", "標題 3", "�設", "更多...")
- Case 90 : sStyles = Array("Biçimlendirmeyi temizle", "Başlık 1", "Başlık 2", "Başlık 3", "Metin gövdesi", "Varsayılan", "Diğer...")
- Case else : Warnlog "Current language not supported. Please add styles to list!"
- Kontext "Textobjectbar"
- printlog "- Current Styles: "
- For i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- printlog Vorlage.GetSelText
- next i
- Call hCloseDocument
- exit sub
- end select
-
- 'Check number of entrys....have to be seven
- Kontext "Textobjectbar"
- if Vorlage.GetItemCount <> 7 then
- Select case iSprache
- case 82 : warnlog "Korean: Number of styles in styleslistbox wrong"
- case else : Warnlog "Not 7 entrys in Styles & Formatting combobox but: " & Vorlage.GetItemCount
- end select
- end if
-
- For i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- sTemp = Vorlage.GetSelText
- printlog "- check style: " & sTemp
- bStyleInList = false
- For j = 0 to 6
- if sStyles(j) = sTemp then
- bStyleInList = true
- end if
- next j
-
- if bStyleInList = true then
- printlog "- style " & sTemp & " found in list"
- else
- if iSprache <> 82 then Warnlog "- style " & sTemp & " wasn't found in list!"
- end if
- next i
-
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles2
- Dim i as integer
- Dim sTemp as string
-
- printlog "- Apply Style"
- printlog "New writerdocument"
- Call hNewDocument
- printlog "Insert dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Select whole dummytext"
- Call wTypeKeys "<Mod1 A>"
- printlog "Apply style 'Heading 1' through Styles & Formatting combobox"
- Kontext "Textobjectbar"
- for i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- sTemp = Vorlage.GetSelText
- if Instr(sTemp, "1") then
- Vorlage.TypeKeys "<Return>"
- exit for
- end if
- next i
-
- printlog "Check if style has been applied to paragraph"
- Call wTypeKeys "<Mod1 Home><End>"
- Call wTypeKeys "<Left>", 2
-
- Kontext "Textobjectbar"
- if Vorlage.GetSeltext <> sTemp then
- Warnlog "Seems style has not been completely applied to paragraph!"
- end if
-
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles3
-
- printlog "- Create a new style"
- printlog "Open a new writerdocument"
- Call hNewDocument
- printlog "Insert a dummy text"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Select the whole dummy text"
- Call wTypeKeys "<Mod1 A>"
- printlog "Format / Character"
- FormatCharacter
- Kontext
- Active.Setpage TabFont
- Kontext "TabFont"
- printlog "Apply first font in list and select 2nd Typeface"
- if gAsianSup = True then
- FontWest.Select 1
- StyleWest.Select 2
- else
- Font.Select 1
- Style.Select 1
- end if
- TabFont.Ok
-
- printlog "Enter 'MyStyle' in Stylelistbox"
- Kontext "Textobjectbar"
- Vorlage.TypeKeys "<Mod1 A>"
- Vorlage.TypeKeys "MyStyle<Return>"
-
- printlog "Check if style has been applied to the combobox"
- Call wTypeKeys "<Mod1 End>"
-
- wait 500
- Kontext "Textobjectbar"
- try
- Vorlage.Select "MyStyle"
- catch
- Warnlog "Seems style has not been applied to combobox"
- endcatch
-
- printlog "Check if style has been applied to paragraph"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>", 2
-
- Kontext "Textobjectbar"
- if Vorlage.GetSelText <> "MyStyle" then
- Warnlog "Seems style has not been applied to paragraph"
- end if
-
- printlog "Close Document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles4
- Dim i as integer
- Dim sTemp as string
- Dim sStyle as integer
-
- printlog "- Clear formatting: whole paragraph"
- printlog "Open a new writer document"
- Call hNewDocument
- printlog "Insert a dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Select whole dummytext"
- Call wTypeKeys "<Mod1 A>"
- printlog "Apply style 'Heading 1' through Styles & Formatting combobox"
- Kontext "Textobjectbar"
- ' remeber default style
- sStyle = Vorlage.GetSelIndex
- for i = 1 to Vorlage.GetItemCount
- Vorlage.Select i
- sTemp = Vorlage.GetSelText
- if Instr(sTemp, "1") then
- Vorlage.TypeKeys "<Return>"
- exit for
- end if
- next i
-
- printlog "choose 'Clear formatting' in combobox"
- Kontext "Textobjectbar"
- Vorlage.Select 1
- Vorlage.TypeKeys "<Return>"
- wait 500
- printlog "Check if style has been set to default"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>", 3
-
- wait 500
- Kontext "Textobjectbar"
- if Vorlage.GetSelIndex <> sStyle then
- warnlog "Seems paragraph has not been set to default! " & Vorlage.GetSelText & "(" & Vorlage.GetSelIndex & ")"
- end if
-
- printlog "Close Document"
- Call hCloseDocument
-
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles5
-
- printlog "- Clear formatting: whole paragraph with hard formatting of some characters"
- printlog " - 1. Cursor outside of hard formatted string"
- printlog "Open a new writer document"
- Call hNewDocument
- printlog "Insert a dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Highlight first line in dummy text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift End>"
-
- printlog "Format / Bold"
- Kontext "TextObjectbar"
- if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
- Fett.Click
- Wait 500
-
- printlog "Set cursor outside of bold formatted text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Down><Right>"
-
- printlog "Select 'Clear Formatting' in Style-Listbox"
- Kontext "Textobjectbar"
- Vorlage.Select 1
- Vorlage.TypeKeys "<Return>"
- wait 500
-
- printlog "Check that first line is still bold and has not been reset"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>"
-
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 0 then
- Warnlog "Style 'Bold' has been reset!"
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles6
-
- Dim iStandard as integer
-
- printlog "- Clear formatting: whole paragraph with hard formatting of some characters"
- printlog " - 2. Cursor inside of hard formatted string"
- printlog "Open a new writer document"
- Call hNewDocument
- printlog "Insert a dummytext"
- if wBlindtextEinfuegen = false then
- Call hCloseDocument
- exit sub
- end if
-
- printlog "Highlight first line in dummy text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Shift End>"
-
- printlog "Format / Bold"
- Kontext "TextObjectbar"
- if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true )
- Fett.Click
- Wait 500
-
- printlog "Point cursor to first highlighted word of bold formatted text"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>"
-
- printlog "Select 'Format / Clear Direct Formatting' in Style-Listbox"
- FormatDefaultWriter
- wait 500
-
- printlog "first highlighted word should be set to 'Standard'"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<Right>"
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 1 then
- Warnlog "Style 'Bold' has not been reset!"
- end if
-
- printlog "Check that rest of first line is still bold and has not been reset"
- Call wTypeKeys "<Mod1 Home>"
- Call wTypeKeys "<End><Left>"
-
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 1 then
- Warnlog "Style 'Bold' has not been reset!"
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tAssigningStyles7
-
- printlog "More ..."
- printlog "Open a new writer document"
- Call hNewDocument
-
- printlog "Select 'More...' in Style-Listbox"
- Kontext "Textobjectbar"
- Vorlage.Select Vorlage.GetItemCount
- Vorlage.TypeKeys "<Return>"
- wait 500
-
- printlog "The Stylist should have been opened"
- Kontext "Stylist"
- if Not Stylist.Exists then
- Warnlog "'Styles and Formatting' doesn't open if 'More...' is selected in Style-Listbox"
- else
- printlog "In Style group listbox 'Automatic' should be selected"
- if Gruppenliste.GetSelIndex <> 5 then
- Warnlog "Seems 'Automatic' is not selected per default in 'Styles and Formatting'"
- end if
- Stylist.Close
- end if
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' **********************************************************************
-
-testcase tKeyboardShortcutToStyles()
- dim sTempa as string
- dim sTempb as string
- dim sTempc as string
- dim i as integer
- dim x as integer
-
- printlog "open new application document"
- call hNewDocument()
-
- printlog "get current default style from TextObjectBar"
- kontext "TextObjectBar"
- sTempa = Vorlage.getSelText
- sTempc = sTempa
- for i = 3 to 0 step -1
- printlog "Perform the Keycombination <CTRL>+3 (2,1,0) and check, if Style in TextObjectBar changed"
- printlog "- <Ctrl>+<"+i+"> -> Heading "+i+" style"
- Call hTypeKeys("<Mod1 "+i+">")
- sleep 1
- kontext "TextObjectBar"
- sTempb = sTempa
- sTempa = Vorlage.getSelText
- if (sTempa <> sTempb) then
- printlog "OK: Heading changed: '" + sTempa + "'"
- else
- warnlog "Heading didn't change: '" + sTempa + "'"
- end if
- next i
- kontext "DocumentWriter"
- DocumentWriter.TypeKeys("<MOD1 SHIFT 0>")
- sleep (2)
- kontext "TextObjectBar"
- sTempa = Vorlage.getSelText
-
- printlog "should now be the default from the beginning"
- if (uCase(gApplication)<>"HTML") then
- if (sTempa = sTempc) then
- printlog "OK: Heading changed to default: '" + sTempa + "'"
- else
- warnlog "Heading didn't change to default. Should have been: '" + sTempc + "' but was: '" + sTempa + "'"
- end if
- end if
-
- printlog "close document"
- call hCloseDocument()
-endcase
-
diff --git a/testautomation/writer/optional/includes/table/w_204_.inc b/testautomation/writer/optional/includes/table/w_204_.inc
deleted file mode 100644
index a5a94662c350..000000000000
--- a/testautomation/writer/optional/includes/table/w_204_.inc
+++ /dev/null
@@ -1,1157 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Writer Table Test
-'*
-'*************************************************************************
-'*
-'* tTableOption
-'* tTableInsert1
-'* tTableInsert2
-'* tTableInsert3
-'* tTableInsert4
-'* tTableInsert5
-'* tTableNumberFormat
-'* tTableDelete
-'* tTableText
-'* tTableCalculate
-'* tTableEdit
-'*
-'\***********************************************************************
-
-sub w_204_
- Call tTableOption
- Call tTableInsert1
- Call tTableInsert2
- Call tTableInsert3
- Call tTableInsert4
- Call tTableInsert5
- Call tTableNumberFormat
- Call tTableDelete
- Call tTableText
- Call tTableCalculate
- Call tTableEdit
-end sub
-
-testcase tTableOption
- '/// Check Tables' default Option ///
- printlog "/// Check Tables' default Option ///"
-
- Call hNewDocument
-
- '/// TOOLS->OPTIONS->StarOffice Writer->Table ///"
- '/// Number recognition should be OFF by default///"
- '/// two boxes below are checked but disabled ///"
-
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- if AutomatischeZahlenerkennung.IsChecked then
- warnlog "The default for 'Number recognition' should be OFF => 114166 "
- AutomatischeZahlenerkennung.UnCheck
- else
- if AutomatischeAusrichtung.IsChecked then
- try
- AutomatischeAusrichtung.UnCheck
- warnlog "'Number format recognition' should be disabled => 114166 "
- catch
- endcatch
- else
- warnlog "'Number format recognition' should be checked => 114166 "
- end if
- if Zahlenformaterkennung.IsChecked then
- try
- Zahlenformaterkennung.UnCheck
- warnlog "'Alignment' should be disabled => 114166 "
- catch
- endcatch
- else
- warnlog "'Alignment' should be checked => 114166 "
- end if
- end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------
-
-testcase tTableInsert1
- dim i as integer
-
- Call hNewDocument
- Kontext "DocumentWriter"
-
- Printlog "'/// 1. Insert Toolbox -> Insert Table ///"
- Call hToolbarSelect ( "Insert", True )
- Kontext "InsertBar"
- Tabelle.Click
- Kontext "TabelleEinfuegenWriter"
- TabellenName.SetText "one"
- Spalten.Settext "5"
- TabelleEinfuegenWriter.OK
- Call wTypeKeys "one<down>"
-
- Printlog "'///+ ... play with number recognition in TOOLS->OPTIONS->TextDoc->Table ///"
- Printlog "'///+ ... Number recognition OFF ///"
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- AutomatischeZahlenerkennung.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- ' insert test row
- Call hToolbarSelect ( "Table", true )
- ZeileEinfuegen.Click
- Call wTypeKeys "<down>11111<Tab>1"+cSep+"116111<Tab>1"+cDecSep+"116111<Tab>abcd<shift tab><shift tab><shift tab>"
- ' check format
- for i=1 to 4
- FormatNumberFormat
- Kontext "Zahlenformat"
- if (Kategorie.GetSelText <> fLocaleString("LocaleText")) then
- warnlog "wrong format; is: "+Kategorie.GetSelText+" should: "+fLocaleString("LocaleText") ' Text
- end if
- Zahlenformat.Cancel
- FormatParagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (links.isChecked <> true) then warnlog "wrong alignment of tablefield: "+i
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<Tab>"
- next i
- ' go back to start of table
- Call wTypeKeys "<Mod1 Home><Down>"
-
- Printlog "'///+ ... Number recognition ON - ///"
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- AutomatischeZahlenerkennung.Check ' even with that, everything is a TEXT :-(????
- Zahlenformaterkennung.UnCheck ' much better with that! everything with numbers&decimalsep is number with 2 decimal places displayed, but all kept!!!
- AutomatischeAusrichtung.UnCheck ' just the allignment does change too!
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hToolbarSelect ( "Table", true )
- ZeileEinfuegen.Click
- Call wTypeKeys "<down>11111<Tab>1"+cSep+"116111<Tab>1"+cDecSep+"116111<Tab>abcd<shift tab><shift tab><shift tab>"
- for i=1 to 4
- FormatNumberFormat
- Kontext "Zahlenformat"
- if (Kategorie.GetSelText <> fLocaleString("LocaleText")) then
- warnlog "wrong format; is: "+Kategorie.GetSelText+" should: "+fLocaleString("LocaleText") ' Text
- end if
- Zahlenformat.Cancel
- FormatParagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if (Links.IsChecked = false) then warnlog "wrong alignment of tablefield: "+i
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<Tab>"
- next i
- Call wTypeKeys "<Mod1 Home><Down>"
-
- Printlog "'///+ ... Number recognition ON - Number format recognition ///"
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- AutomatischeZahlenerkennung.Check ' even with that, everything is a TEXT :-(????
- Zahlenformaterkennung.Check ' much better with that! everything with numbers&decimalsep is number with 2 decimal places displayed, but all kept!!!
- AutomatischeAusrichtung.UnCheck ' just the allignment does change too!
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Call hToolbarSelect ( "Table", true )
- ZeileEinfuegen.Click
- Call wTypeKeys "<down>11111<Tab>1"+cSep+"116111<Tab>1"+cDecSep+"116111<Tab>abcd<shift tab><shift tab><shift tab>"
- ' number, text, number, text
- for i=1 to 4
- FormatNumberFormat
- Kontext "Zahlenformat"
- Select Case i
- Case 1,2,3
- if (Kategorie.GetSelText <> fLocaleString("LocaleNumber")) then
- warnlog "wrong format; "+ i +"; is: "+Kategorie.GetSelText+" should: "+fLocaleString("LocaleNumber") ' Number
- end if
- Case 4
- if (Kategorie.GetSelText <> fLocaleString("LocaleText")) then
- warnlog "wrong format; "+ i +"; is: "+Kategorie.GetSelText+" should: "+fLocaleString("LocaleText") ' Text
- end if
- end select
- Zahlenformat.Cancel
- Call wTypeKeys "<Tab>"
- next i
- Call wTypeKeys "<Mod1 Home><Down>"
-
- Printlog "'///+ ... Number recognition ON - Number format recognition - Alignment ///"
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- AutomatischeZahlenerkennung.Check ' even with that, everything is a TEXT :-(????
- Zahlenformaterkennung.Check ' much better with that! everything with numbers&decimalsep is number with 2 decimal places displayed, but all kept!!!
- AutomatischeAusrichtung.Check ' just the allignment does change too!
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Call hToolbarSelect ( "Table", true )
- ZeileEinfuegen.Click
- Call wTypeKeys "<down>11111<Tab>1"+cSep+"116111<Tab>1"+cDecSep+"116111<Tab>abcd<shift tab><shift tab><shift tab>"
- ' number-right, text-left, number-right, text-left
- for i=1 to 4
- Select Case i
- Case 1,2,3
- FormatNumberFormat
- Kontext "Zahlenformat"
- if (Kategorie.GetSelText <> fLocaleString("LocaleNumber")) then
- warnlog "wrong format; "+ i +"; is: "+Kategorie.GetSelText+" should: "+fLocaleString("LocaleNumber") ' number
- end if
- Zahlenformat.Cancel
- formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked <> true) then warnlog "wrong alignment of tablefield: "+i +"; should: right"
- tabausrichtungabsatz.Cancel
- Case 4
- FormatNumberFormat
- Kontext "Zahlenformat"
- if (Kategorie.GetSelText <> fLocaleString("LocaleText")) then
- warnlog "wrong format; is: "+ i +"; "+Kategorie.GetSelText+" should: "+fLocaleString("LocaleText") ' Text
- end if
- Zahlenformat.Cancel
- formatparagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if (links.isChecked <> true) then warnlog "wrong alignment of tablefield: "+i+"; should: left"
- TabAusrichtungAbsatz.Cancel
- end select
- Call wTypeKeys "<Tab>"
- next i
-
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------
-
-testcase tTableInsert2
-
- Call hNewDocument
- Printlog "'/// 2. Insert Toolbox -> Insert Table -> Autoformat ///"
- ' using autoformat
- Call hToolbarSelect ( "Insert", True )
- Kontext "InsertBar"
- Tabelle.Click
- Kontext "TabelleEinfuegenWriter"
- Spalten.Settext "5"
- Zeilen.SetText "20"
- Autoformat.Click
- Kontext "AutoformatTabelle"
- AutoFormatTabelle.OK
- Kontext "TabelleEinfuegenWriter"
- TabellenName.SetText "two"
- TabelleEinfuegenWriter.OK
- Call wTypeKeys "two"
-
- Call hCloseDocument
-
-endcase
-
-' --------------------------------------------------------------------
-testcase tTableInsert3
- dim i as integer
- dim sTemp as string
- dim itemp(3) as integer
-
- Call hNewDocument
- Printlog "'/// 3. Menu: Insert -> Table (Shortcut): {strg} + {F12} ///"
- Printlog "'///+ Test Options on 'Insert Table' ///"
- Printlog "'///+ Header ON ///"
- ' table heading active
- ' Don't split table INactive
- ' table border unchecked
- Call wTypeKeys "<Mod1 F12>"
- Kontext "TabelleEinfuegenWriter"
-
- TabellenName.SetText "three"
- Spalten.Settext "5"
- Ueberschrift.Check
- Umrandung.Uncheck
- TabelleEinfuegenWriter.OK
- Call wTypeKeys "three"
-
- ' -------------check if heading 1
- ' if checked: heading; else: contents !! SystemLanguage dependent !! :-(
- Printlog "'///+ check if Header ON ///"
- Kontext "TextObjectbar"
- sleep (1)
- sTemp = Vorlage.GetSelText
- if (sTemp <> fLocaleString("LocaleTableHeading")) then
- Warnlog "--- table heading did not work!"
- warnlog "--- is:" + sTemp + ", should :" + fLocaleString("LocaleTableHeading")
- end if
- '----------------------------------
- Call wTypeKeys "<down>"
- ' -------------check if splitting; it HAS TO split
- Printlog "'///+ check if Table gets splitted - it HAS TO split ///"
-
- InsertFieldsPagenumbers ' get pagenumber & leave it for next calculation
- Call wTypeKeys "<Mod1 A>"
- ToolsCalculate
- itemp(1) = val(GetClipboardText)
- Call hToolbarSelect ( "Table", true )
- for i=1 to 60
- ZeileEinfuegen.Click ' inserted below the current row
- wait 200
- next i
- ToolsUpdateUpdateAll ' update field & get pagenumber & clear
- Call wTypeKeys "<Left><Right>" ' Seems there are focus problems on Solaris...workaround
- Call wTypeKeys "<Mod1 A>"
- ToolsCalculate
- itemp(2) = val(GetClipboardText)
- if (itemp(1)+1 = itemp(2)) then warnlog "--- Table moved to seconde page"
- EditCut
- Call wTypeKeys "got start3"
-
- Call wTypeKeys "<Mod1 end>" ' move to last cell in table
- InsertFieldsPagenumbers ' get pagenumber & clear
- Call wTypeKeys "<Mod1 A>"
- ToolsCalculate
- itemp(3) = val(GetClipboardText)
- if (itemp(2) <> itemp(3)) then
- printlog "--- Table splitted" + itemp(3)
- else
- warnlog "put some more rows in!!!"
- end if
-
- Call hCloseDocument
-endcase
-
-' --------------------------------------------------------------------
-testcase tTableInsert4
- dim i as integer
- dim stemp as string
-
- '/// Open a new writer document
- Call hNewDocument
- '/// Insert some dummy text
- if wBlindTextEinfuegen() = false then
- Call hCloseDocument
- goto endsub
- end if
- '/// Insert a table with parameters:
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
-
- '/// - Set table name: four
- TabellenName.SetText "four"
- '/// - number of columns: 5
- Spalten.Settext "5"
- '/// - number of rows: 16
- Zeilen.Settext "16"
- '/// - Header: uncheck
- Ueberschrift.UnCheck
- '/// - Don't split table: check
- TabelleNichtTrennen.Check
- '/// - Border: check
- Umrandung.check
- TabelleEinfuegenWriter.OK
-
- '/// check if table has no header
- Printlog "check if Header OFF"
- Kontext "TextObjectbar"
- sleep (1)
- if wStyleGet(fLocaleString("LocaleTableHeading")) = true then
- Warnlog "Seems tableheader is activated though header is off"
- end if
-
- '/// Cursor leaves table with <Up> and <End>
- Printlog "check if Table gets splitted"
- Call wTypeKeys "<Up><End><SPACE>"
- '/// Insert dummy text again 3 times
- Call wBlindtextEinfuegen
-' wait 500
- Call wBlindtextEinfuegen
-' wait 500
- Call wBlindtextEinfuegen
- '/// check if table has been moved to Page 2
-
- Call wTypeKeys "<Mod1 End>" ' jump to documents end
- Call wTypeKeys "<Up>" ' move cursor into table
- Call wTypeKeys "<Mod1 Home>" ' move cursor to first cell
-
- '/// Insert / Fields / Pagenumbers to check on which page table is
- InsertFieldsPagenumbers
- Call wTypeKeys "<shift home>"
- ToolsCalculate
-
- if (GetClipboardText = "2") or (GetClipboardText = "3") then
- printlog "Table has been moved correctly"
- else
- warnlog " It seems table has been splitted"
- end if
-
- '/// <B>Table should split if table is bigger than one page</B>
- Call wTypeKeys "<Up>"
- Call wTypeKeys "<shift mod1 home>"
- Call wTypeKeys "<delete>"
- Call wBlindtextEinfuegen
- Call wTypeKeys "<mod1 End>"
- Call wTypeKeys "<up>"
- Call wTypeKeys "<mod1 Home>"
-
- Printlog "Table should split"
- Call hToolbarSelect ( "Table", true )
- for i=1 to 25
- ZeileEinfuegen.Click ' inserted below the current row
- next i
- Call wTypeKeys "<shift end>"
- ToolsCalculate
- stemp = GetClipboardText
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<mod1 End>"
- InsertFieldsPagenumbers
- Call wTypeKeys "<shift home>"
- ToolsCalculate
- if (GetClipboardText <> stemp) then
- printlog "Table has been splitted"
- else
- warnlog " It seems table has not been splitted"
- end if
-
- Call hCloseDocument
-endcase
-
-' --------------------------------------------------------------------
-testcase tTableInsert5
-
- Call hNewDocument
- '/// Insert Text with delimeter & call Tools -> Text<->Table
- Printlog "'/// Insert Text with delimeter & call Tools -> Text<->Table ///"
- Call wTypeKeys "five;2;3;4;5;<return>"
- Call wTypeKeys "a;b;c;d;e;<return>"
- Call wTypeKeys "A;B;C;D;E;"
- Call wTypeKeys "<shift home>"
- Call wTypeKeys "<shift up>"
- Call wTypeKeys "<shift up>"
-
- ToolsTextInTable
- Kontext "TextInTabelleUmwandeln"
- Semikolon.Check
-
- TextInTabelleUmwandeln.OK
- Call wTypeKeys "<end><Mod1 end><down><return>"
-
- Call hCloseDocument
-endcase
-
-' --------------------------------------------------------------------
-
-testcase tTableNumberFormat
-
- Call hNewDocument
- Printlog "'/// Fill table with content: Tools->Options->TextDoc->Number formating/recognition check ALL ///"
- '/// use table 5x10; and try to get every entry from format->numberFormat->Categorie ///'
-
- Call TBOhTabelleEinfuegen ("six",0, 0, 0, 1,"5", "10" )
- Call wTypeKeys "six<down>"
-
- ToolsOptions ' set options for this test
- Call hToolsOptions ("WRITER","Table")
- AutomatischeZahlenerkennung.Check
- Zahlenformaterkennung.Check
- AutomatischeAusrichtung.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- printlog "Checking numberformater"
- '///+ - Currency
- printlog " - Currency"
- call wTypeKeys(fLocaleString("LocaleCurrencyValue"))
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 5) then
- warnlog "The value is not recognized as currency, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as currency"
- end if
- Zahlenformat.Cancel
- formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked <> true) then
- warnlog "wrong alignment of number"
- else
- printlog " - Currencyvalue is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> fLocaleString("LocaleCurrencyValue")) then
- warnlog "The number is not correctly formated. It is: " & GetClipboardText & " but should be: " & fLocaleString("LocaleCurrencyValue")
- else
- printlog " - Currencyvalue is correctly formated"
- end if
-
- '///+ - Unknown currency
- printlog " - Unknown currency"
- call wTypeKeys("10.78 §")
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 11) then
- warnlog "The value is not recognized as string, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as string"
- end if
- Zahlenformat.Cancel
- formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (links.isChecked <> true) then
- warnlog "wrong alignment of number"
- else
- printlog " - Value is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> "10.78 §") then
- warnlog "The number is not correctly formated: should be 10.78 §, but is " & GetClipboardText
- else
- printlog " - Value is correctly formated"
- end if
-
- '///+ - Date
- printlog " - Date"
- call wTypeKeys(fLocaleString("LocaleDateValue"))
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 6) then
- warnlog "The value is not recognized as date, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as date"
- end if
- Zahlenformat.Cancel
- Formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked <> true) then
- warnlog "wrong alignment of number"
- else
- printlog " - Datevalue is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> fLocaleString("LocaleDateOutput")) then
- warnlog "The number is not correctly formated: should be " & fLocaleString("LocaleDateOutput") & ", but is " & GetClipboardText
- else
- printlog " - Datevalue is correctly formated"
- end if
-
- '///+ - Time
- printlog " - Time"
- call wTypeKeys(fLocaleString("LocaleTimeInput"))
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 7) then
- warnlog "The value is not recognized as time, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as date"
- end if
- Zahlenformat.Cancel
- Formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked <> true) then
- warnlog "wrong alignment of number"
- else
- printlog " - Timevalue is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> fLocaleString("LocaleTimeValue")) then
- warnlog "The number is not correctly formated: should be " & fLocaleString("LocaleTimeValue") & ", but is " & GetClipboardText
- else
- printlog " - Timevalue is correctly formated"
- end if
-
- '///+ - Percent
- printlog " - Percent"
- call wTypeKeys(fLocaleString("LocalePercentValue"))
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 4) then
- warnlog "The value is not recognized as percent, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as percent"
- end if
- Zahlenformat.Cancel
- Formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked <> true) then
- warnlog "wrong alignment of number"
- else
- printlog " - Percentvalue is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> fLocaleString("LocalePercentValue")) then
- warnlog "The number is not correctly formated: should be " & fLocaleString("LocalePercentValue") & ", but is " & GetClipboardText
- else
- printlog " - Percentvalue is correctly formated"
- end if
-
- '///+ - Scientific
- printlog " - Scientific"
- call wTypeKeys(fLocaleString("LocaleScientificValue"))
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 8) then
- warnlog "The value is not recognized as scientific, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as scientific"
- end if
- Zahlenformat.Cancel
- Formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked <> true) then
- warnlog "wrong alignment of number"
- else
- printlog " - Scientificvalue is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> fLocaleString("LocaleScientificValue")) then
- warnlog "The number is not correctly formated: should be " & fLocaleString("LocaleScientificValue") & ", but is " & GetClipboardText
- else
- printlog " - Scientificvalue is correctly formated"
- end if
-
- '///+ - Fraction
- printlog " - Fraction"
- call wTypeKeys("58 11/4")
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 9) then
- warnlog "The value is not recognized as fraction, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as fraction"
- end if
- Zahlenformat.Cancel
- Formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked <> true) then
- warnlog "wrong alignment of number"
- else
- printlog " - Fractionvalue is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> "60 3/4") then
- warnlog "The number is not correctly formated: should be 60 3/4, but is " & GetClipboardText
- else
- printlog " - Fractionvalue is correctly formated"
- end if
-
- '///+ - Boolean
- printlog " - Boolean"
- call wTypeKeys(fLocaleString("LocaleBooleanValue"))
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
-
- if (Kategorie.GetSelIndex = 10) then
- printlog " - Value is correctly recognized as boolean"
- elseif iSprache = 86 or iSprache = 82 or iSprache =88 then
- warnlog "Boolean value in chinese and korean not recognized"
- else
- warnlog "The value " & fLocaleString("LocaleBooleanValue") & "is not recognized as boolean, it is " & Kategorie.GetSelText
- end if
-
- Zahlenformat.Cancel
- Formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (rechts.isChecked = true) then
- printlog " - Booleanvalue is correctly alligned"
- elseif iSprache = 86 or iSprache = 82 or iSprache = 88 then
- warnlog "Boolean value in chinese and korean not recognized"
- else
- warnlog "wrong alignment of number"
- end if
-
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> fLocaleString("LocaleBooleanValue")) then
- warnlog "The number is not correctly formated: should be " & fLocaleString("LocaleBooleanValue") & ", but is " & GetClipboardText
- else
- printlog " - Booleanvalue is correctly formated"
- end if
-
- '///+ - String
- printlog " - String"
- call wTypeKeys("testtext")
- call wTypeKeys "<Tab><shift tab>"
- FormatNumberFormat
-
- Kontext "Zahlenformat"
- if (Kategorie.GetSelIndex <> 11) then
- warnlog "The value is not recognized as string, it is " & Kategorie.GetSelText
- else
- printlog " - Value is correctly recognized as string"
- end if
- Zahlenformat.Cancel
- Formatparagraph
- Kontext
- Active.SetPage tabAusrichtungAbsatz
- Kontext "tabAusrichtungAbsatz"
- if (links.isChecked <> true) then
- warnlog "wrong alignment of string"
- else
- printlog " - String is correctly alligned"
- end if
- TabAusrichtungAbsatz.Cancel
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> "Testtext") then
- warnlog "The string is not correctly formated: should be Testtext, but is " & GetClipboardText
- else
- printlog " - String is correctly formated"
- end if
-
- '/// finished the file, now some hardwired tests ///'
- '///+ check, if all decimals are saved, even if not displayed ///'
- Call wTypeKeys "123" & cDecSep & "123456789"
- Call wTypeKeys "<Tab><shift tab>"
- Call wTypeKeys "<home><shift end>"
- wait 500
- EditCopy
- if (GetClipboardText <> "123" & cDecSep & "12") then warnlog "wrong reformating of text tablefield 1; should: " & "123" & cDecSep & "12 is: "+GetClipboardText
- EditUndo
- Call wTypeKeys "<home><shift end>"
- EditCopy
- if (GetClipboardText <> "123" & cDecSep & "123456789") then warnlog "wrong reformating of text tablefield 2; should: 123" & cDecSep & "123456789 is: "+GetClipboardText
-
- Call hCloseDocument ()
-endcase
-
-' --------------------------------------------------------------------
-
-testcase tTableDelete
- dim i as integer
-
- Call hNewDocument
- Printlog "'/// delete rows/columns in a table ///"
-
- Call TBOhTabelleEinfuegen ("seven",0, 0, 0, 1,"20", "20" )
- ' Point cursor to upper left cell
- Call wTypeKeys "<Mod1 Home>", 2
- Call wTypeKeys "1"
- For i = 2 to 20
- Call wTypeKeys "<down><right>"
- Call wTypeKeys CStr(i)
- next i
- Call wTypeKeys "<Mod1 Home>", 2
-
- Printlog "'/// via keys {alt delete} {cursor} -> delete row/column ///"
- ' delete some rows/columns using shortcuts del 2rows 2cols
- Call wTypeKeys "<mod2 delete><right>"
- Call wTypeKeys "<right>"
- Call wTypeKeys "<mod2 delete><left>"
- Call wTypeKeys "<left>"
- Call wTypeKeys "<mod2 delete><down>"
- Call wTypeKeys "<down>"
- Call wTypeKeys "<mod2 delete><up>"
- Call wTypeKeys "<up>"
- Call SpaltenTesten ( 18 )
- Call wTypeKeys "<Mod1 Home>", 2
- Call wTypeKeys "<Mod1 A>"
- EditCopy
- if GetClipboardtext <> "2" then
- Warnlog "Deleting rows/columns via keys has not been worked as accepted! -> Test failed!"
- Call hCloseDocument
- exit sub
- end if
-
- Printlog "'/// via menue Format[Zeile|Spalte]Loeschen ///"
- for i = 1 to 17 ' delete some rows/columns
- FormatZeileLoeschen
- wait 500
- FormatSpalteLoeschen
- wait 500
- next i
- Call wTypeKeys "<Mod1 A>"
- EditCopy
- if GetClipboardtext <> "20" then
- Warnlog "Deleting rows/columns via keys has not been worked as accepted! -> Test failed!"
- Call hCloseDocument
- exit sub
- end if
-
- Printlog "'/// via keys {alt insert} {cursor} -> insert row/column ///"
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<mod2 insert><left>"
- Call wTypeKeys "<mod2 insert><right>"
- Call wTypeKeys "<mod2 insert><down>"
- Call wTypeKeys "<mod2 insert><up>"
- Call SpaltenTesten ( 3 )
- Call wTypeKeys "<Mod1 Home>", 2
- Call wTypeKeys "<Shift End>"
- try
- EditCopy
- Warnlog "Maybe no columns have been inserted!"
- catch
- Call wTypeKeys "<Right>", 2
- Call wTypeKeys "<Shift End>"
- try
- EditCopy
- if GetClipboardtext <> "20" then
- Warnlog "Maybe no columns have been inserted!"
- end if
- catch
- Warnlog "Maybe no columns have been inserted!"
- endcatch
- endcatch
-
- Printlog "'/// delete whole table ///"
- Call wTypeKeys "<mod1 home>", 2 ' delete hole table
- Call wTypeKeys "<Mod1 A>"
- try
- Call wTypeKeys "<MOD1 SHIFT DELETE>" 'EditCut
- Call wTypeKeys "<return>"
- catch
- Warnlog "Unable to delete table!"
- endcatch
- Call hCloseDocument
-endcase
-
-'--------------------------------------------------------------------------------------------------------
-
-testcase tTableText
- dim i as integer
-
- Call hNewDocument
- Printlog "'/// +++ table to text ///"
-
- Call TBOhTabelleEinfuegen ("seven",0, 0, 0, 1,"10", "10" )
-
- for i = 1 to 99 ' fill every cell
- Call wTypeKeys CStr(i)
- Call wTypeKeys "<Tab>"
- next i
-
- ToolsTextInTable ' convert with '+' seperator
- Kontext "TextInTabelleUmwandeln"
- Andere.Check
- AndereText.settext "+"
- TextInTabelleUmwandeln.OK
-
- Call wTypeKeys "<home>" ' calculate every row
- for i = 1 to 10
- Call wTypeKeys "<shift end>"
- ToolsCalculate
- Call wTypeKeys "<shift insert>"
- Call wTypeKeys "+<delete>"
- next i
- Call wTypeKeys "<backspace>0<shift home>"
- ToolsCalculate
- if (GetClipboardText <> "12645") then warnlog "wrong table converting table<->text "
- Call wTypeKeys "<shift insert><return>"
-
- Call hCloseDocument ()
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tTableCalculate
- Printlog "'/// calculating in table ///"
- Call hNewDocument
-
- Call TBOhTabelleEinfuegen ()
- Call wTypeKeys "1<Tab>2<Tab>3<Tab>4<Tab>5<Tab>6<Tab>7<Tab>8<Tab>"
- Call wTypeKeys "<end><Mod1 end><down><return>"
- Call TBOhTabelleEinfuegen ("eight",0, 0, 0, 1,"5", "5" )
-
- '///' should look like: <pre> ///
- '///+ a b c d e ///
- '///+1 1,.1 2,.2 =3,.3 4,.4 =summe<:4,.4 ///
- '///+2 1 2 =3 4 =summe<:4 ///
- '///+3 =2,.1 =18,.9 =2 =-0,31 =32,.6926671... <1.check> ///
- '///+4 =14 =16 gone =<2.check> = ...table1 ?? ///
- '///+5 </pre> ///
-
- '/// this table gets generated one by one ///'
-
- Call wTypeKeys "1"+cDecSep+"1<Tab>" ' insert input A1
- Call wTypeKeys "2"+cDecSep+"2<Tab>"
- Call wTypeKeys "=" '
- Kontext "OL_SW_Rechenleiste" ' C1
- Eingabefeld.SetText "<A1>+<B1>"
- Uebernehmen.click
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "4"+cDecSep+"4<Tab>"
- Call wTypeKeys "<Tab>"
-
- Call wTypeKeys "1<Tab>" ' A2
- Call wTypeKeys "2<Tab>"
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "4<shift tab>"
- Call wTypeKeys "=" '
- Kontext "OL_SW_Rechenleiste" ' C2
- Eingabefeld.SetText "<D2>-<A2>"
- Uebernehmen.click
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<Tab>"
-
- ' automatic sum works only to next formula :-< ///'
- Call hToolbarSelect ( "Table", true )
- formeleingeben.click
- Kontext "OL_SW_Rechenleiste"
- Uebernehmen.click
- Call wTypeKeys "<up>"
-
- Call hToolbarSelect ( "Table", true )
- formeleingeben.click
- Kontext "OL_SW_Rechenleiste"
- Uebernehmen.click
- Call wTypeKeys "<down><Tab>"
-
- Call wTypeKeys "=" ' slip into calculation area
- Kontext "OL_SW_Rechenleiste" ' A3
- Eingabefeld.SetText "sum <A1:A2>"
- Uebernehmen.click
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<F2>" '
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "sum <D2:B1>"
- Uebernehmen.click
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<F2>" '
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "sqrt <E2>"
- Uebernehmen.click
- Call wTypeKeys "<Tab>"
- Call wTypeKeys "<F2>" '
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "cos <E1>"
- Uebernehmen.click
- Call wTypeKeys "<Tab>"
-
- Call wTypeKeys "<F2>" ' E3 check this out :-)
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "sum <A2:D3>"
- Uebernehmen.click
- Call wTypeKeys "<shift home>"
- EditCopy
- if (GetClipboardText <> "32" & cDecSep & "69") then warnlog "wrong calculation should: 32" & cDecSep & "69 is: "+GetClipboardText
- Call wTypeKeys "<end><Tab>"
-
- Call wTypeKeys "<F2>" ' A4
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "2+3*4"
- Uebernehmen.click
- Call wTypeKeys "<shift home>"
- EditCopy
- if (GetClipboardText <> "14") then warnlog "wrong calculation should: "+"14"+" is: "+GetClipboardText
- Call wTypeKeys "<end><Tab>"
-
- Call wTypeKeys "<F2>" ' B4
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "2*2 pow 3"
- Uebernehmen.click
- Call wTypeKeys "<shift home>"
- EditCopy
- if (GetClipboardText <> "16") then warnlog "wrong calculation should: "+"16"+" is: "+GetClipboardText
- Call wTypeKeys "<end><Tab>"
- Call wTypeKeys "<shift tab>"
- sleep (1)
- Call wTypeKeys "<Tab>"
- sleep (1)
-
- '/// one row gets deleted///'
- FormatSpalteLoeschen ' grumel: have to find a cell :-(
- Call wTypeKeys "<F2>" ' C4
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "sum <A1:D3>"
- Uebernehmen.click
- Call wTypeKeys "<shift home>"
- EditCopy
- if (GetClipboardText <> "58" & cDecSep & "89") then warnlog "wrong calculation should: " & "58" & cDecSep & "89" & " is: " & GetClipboardText
- Call wTypeKeys "<end><Tab>"
- Call wTypeKeys "<F2>" ' C4
- Kontext "OL_SW_Rechenleiste"
- Eingabefeld.SetText "sum <"+fLocaleString("LocaleTable")+"1.B1:E1> / <A2:D2>"
- sleep (2)
- Uebernehmen.click
- Call wTypeKeys "<shift home>"
- EditCopy
- if (GetClipboardText <> "1" & cDecSep & "27") then warnlog "wrong calculation should: 1" & cDecSep & "27 is: " & GetClipboardText
- Call wTypeKeys "<end><Tab>"
-
- Call wTypeKeys "<end><Mod1 end><down><return>"
- Call hCloseDocument ()
-endcase
-
-'-------------------------------------------------------------------------------------------
-
-testcase tTableEdit
- dim itemp(5) as integer
-
- Call hNewDocument
- Printlog "'/// edit table ///"
-
- Call TBOhTabelleEinfuegen ("nine-dumy",0, 0, 0, 1,"5", "3" )
- Call wTypeKeys "<end><Mod1 end><Mod1 end><return>"
- Call TBOhTabelleEinfuegen ("nine",0, 0, 0, 1,"5", "3" )
- Call wTypeKeys "nine<Tab>"
-
- Printlog "'/// insert Frame & Graphic in heading ///"
- InsertFrame
- sleep (5)
- Kontext "tabtype"
- sleep (5)
- TabType.ok
- sleep (5)
- Call wTypeKeys "<escape>"
- sleep (5)
- Call hGrafikEinfuegen (gTesttoolPath +"writer\optional\input\options\ga000907.gif")
- sleep (5)
- Call wTypeKeys "<escape>"
- sleep (5)
- Call wTypeKeys "<mod1 end><up><up>"
- sleep (5)
-
- Printlog "'/// insert Frame & Graphic in body ///"
- InsertFrame
- sleep (5)
- Kontext "tabtype"
- sleep (5)
- TabType.ok
- sleep (5)
- Call wTypeKeys "<escape>"
- sleep (5)
- Call hGrafikEinfuegen (gTesttoolPath +"writer\optional\input\options\ga000907.gif")
- sleep (5)
- Call wTypeKeys "<escape>"
- sleep (5)
- Call wTypeKeys "<mod1 end><up><up><Tab>"
-
- Printlog "'/// insert Frame & Table in body ///"
- InsertFrame
- sleep (5)
- Kontext "tabtype"
- sleep (5)
- TabType.ok
- sleep (5)
- Call wTypeKeys "<return>"
- sleep (5)
- try
- Call hTabelleEinfuegen ()
- Call wTypeKeys "<mod1 end><mod1 end><up><up><Tab><Tab>"
- catch
- Warnlog "Hit <Enter>-Key should enable edit mode for selected frames! (srx642z or greater)"
- Call wTypeKeys "<escape>"
- Call wTypeKeys "<down>"
- endcatch
- sleep (5)
-
- Printlog "'/// insert PageBreak ///"
- '/// TBO: check test / insert dummy table ' doesn't work, if the first 'stuff' in a document is the table ///'
- InsertFieldsPagenumbers
- Call wTypeKeys "<shift home>"
- EditCopy
- ToolsCalculate
- sleep (5)
- itemp(1) = val(GetClipboardText)
- EditCut
- InsertManualBreak
- sleep (5)
- Kontext "UmbruchEinfuegen"
- Seitenumbruch.check
- UmbruchEinfuegen.OK
- sleep (5)
- InsertFieldsPagenumbers
- Call wTypeKeys "<shift home>"
- EditCopy
- ToolsCalculate
- sleep (5)
- itemp(3) = val(GetClipboardText)
- if (itemp(1) <> itemp(3)) then
- printlog "--- Pagebreak works in Table, that's good :-)"
- else
- warnlog " Pagebreak doesn't work in Table, that's not good :-("+itemp(1) +" "+ itemp(3)
- end if
-
- sleep (5)
- Call wTypeKeys "<end><Mod1 end><down><return>"
-
- Printlog "'/// the following may not be possible ///"
- Printlog "'///+ Insert table in footnote ///"
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- FussnoteEinfuegen.OK
- try
- InsertTableWriter
- warnlog " Table in Footnote is possible, that's not good :-("
- catch
- endcatch
-
- Call wTypeKeys "<end><Mod1 end><return>"
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/table/w_204a_.inc b/testautomation/writer/optional/includes/table/w_204a_.inc
deleted file mode 100644
index 0132f14ebe5d..000000000000
--- a/testautomation/writer/optional/includes/table/w_204a_.inc
+++ /dev/null
@@ -1,1163 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test the table functionality in Writer
-'*
-'\***********************************************************************
-
-sub w_204a_
-
- Call sTableName
- Call sTableAlignment
- Call sTableMergeCell
- Call TableSplit_copy_heading
- Call TableSplit_custom_heading
- Call TableSplit_custom_heading_apply_style
- Call TableSplit_no_heading
- Call sTableMerge
- Call sTablePagebreak
- Call sTableBorder
- Call sTableIndent
- Call sTableSort
-
-end sub
-
-' ----------------------------------------------------------------------
-
-testcase sTableName
- dim temp(10) as string
- Call hNewDocument
-
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Garfield"
- Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="7") ' insert table
-
- printlog "'/// Format table via Format->Table ///"
- Printlog "'/// change tablename ///"
- TableTableProperties ' get into existing table
- Sleep (2)
- Kontext "TabelleEinfuegenWriter"
- sleep (2)
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
-
- ' 0. right table ?? ///'
- if (TabellenName.GetText <> temp (1) ) then warnlog " --- wrong table? schould be : "+temp (1)+ ", is : "+TabellenName.GetText
-
- '/// 1. try: space included ///'
- temp (1) = "Gar field"
- try
- TabellenName.SetText temp (1)
- catch
- printlog " - couldn't insert : " + temp (1)
- endcatch
- if (TabellenName.GetText = temp (1) ) then warnlog " --- ups, could insert smth. with space? : "+TabellenName.GetText
-
- '/// 2. try: dot included ///'
- temp (1) = "Gar.field"
- try
- TabellenName.SetText temp (1)
- catch
- printlog " - couldn't insert : "+temp (1)
- endcatch
- if (TabellenName.GetText = temp (1) ) then warnlog " --- ups, could insert smth. with dot? : "+TabellenName.GetText
-
- TabTabelle.cancel
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase sTableAlignment
- dim temp(10) as string
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
- dim sBug as string
-
- Call hNewDocument
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Garfield"
- Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="7") ' insert table
-
- ' ' get text to init some constances for this test
- ' temp(2) = NachOben.GetText '----------------------------------------------------
- ' initialisation of some constantzen for this test '------------------------------
- PAGEWIDTH = hGetPageWidth()
- printlog "--- Pagewidth is: " + PAGEWIDTH
- 'MEASUNIT = GetMeasUnit (temp(2))
- 'DECSEP = GetDecimalSeperator(temp(2))
-
- Printlog "'/// set alignment of table ///"
- TableTableProperties
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
- Printlog "'/// Left ///"
- Links.check
- sleep (1)
- if ((Breite.IsWritable AND NachRechts.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (LiberalMeasurement(PAGEWIDTH ,(StrToDouble (Breite.GetText) + StrToDouble (NachRechts.GetText))) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachRechts.GetText))+" should: " + PAGEWIDTH
- end if
- end if
- NachRechts.SetText "2"
- sleep (1)
- temp(1) = NachRechts.GetText
- TabTabelle.OK
- TableTableProperties
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
- if (Links.Ischecked <> TRUE) then warnlog "links state changed"
- if ((Breite.IsWritable AND NachRechts.IsWritable) <> TRUE) then warnlog "edit field not active"
- if (temp(1) <> NachRechts.GetText) then warnlog "value changed"
- if (LiberalMeasurement(PAGEWIDTH ,(StrToDouble (Breite.GetText) + StrToDouble (NachRechts.GetText))) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachRechts.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- '--------------------------------
- NachRechts.SetText "0"
- sleep (1)
- Printlog "'/// FromLeft ///"
- VonLinks.check
- sleep (1)
- if ((Breite.IsWritable AND NachLinks.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + StrToDouble(NachLinks.GetText)) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- NachLinks.SetText "2"
- sleep (1)
- temp(1) = NachLinks.GetText
- TabTabelle.OK
- sleep 1
- TableTableProperties
- Kontext "TabelleEinfuegenWriter"
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
- if (VonLinks.Ischecked <> TRUE) then warnlog "VonLinks state changed"
- 'sBug = NachLinks.GetText
- if ((Breite.IsEnabled AND NachLinks.IsEnabled) <> TRUE) then warnlog "edit field not active "
- 'if (NachLinks.IsWritable <> TRUE) then warnlog "edit field not active "
- 'if sBug <> NachLinks.GetText then warnlog "TESTOOL BUG; is writable loescht feld "
- if (temp(1) <> NachLinks.GetText) then warnlog "value changed"+" should: "+temp(1)+" is: "+ NachLinks.GetText
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + StrToDouble(NachLinks.GetText)) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- '--------------------------------
- NachLinks.SetText "0"
- Printlog "'/// Right ///"
- rechts.check
- sleep (1)
- if ((Breite.IsWritable AND NachLinks.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + StrToDouble(NachLinks.GetText)) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- NachLinks.SetText "2"
- sleep (1)
- temp(1) = NachLinks.GetText
- TabTabelle.OK
- TableTableProperties
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
- if (rechts.Ischecked <> TRUE) then warnlog "rechts state changed"
- if ((Breite.IsWritable AND NachLinks.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (temp(1) <> NachLinks.GetText) then warnlog "value changed"
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + StrToDouble(NachLinks.GetText)) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- '--------------------------------
- NachLinks.SetText "0"
- Printlog "'/// center ///"
- Zentriert.check
- sleep (1)
- if ((Breite.IsWritable AND NachLinks.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + (2 * StrToDouble (NachLinks.GetText))) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- NachLinks.SetText "2"
- sleep (1)
- temp(1) = NachLinks.GetText
- TabTabelle.OK
- TableTableProperties
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
- if (Zentriert.Ischecked <> TRUE) then warnlog "state changed"
- if ((Breite.IsWritable AND NachLinks.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (temp(1) <> NachLinks.GetText) then warnlog "value changed"
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + (2 * StrToDouble (NachLinks.GetText))) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- '--------------------------------
- NachLinks.SetText "0"
- Printlog "'/// manual ///"
- Manuell.check
- sleep (1)
- if ((Breite.IsWritable AND NachLinks.IsWritable AND NachRechts.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText) + StrToDouble (NachRechts.GetText)) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText)+ StrToDouble (NachRechts.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- NachLinks.SetText "2"
- NachRechts.SetText "2"
- sleep (1)
- temp(1) = NachLinks.GetText
- temp(2) = NachRechts.GetText
- TabTabelle.OK
- TableTableProperties
- Kontext
- Active.SetPage TabTabelle
- Kontext "TabTabelle"
- if (Manuell.Ischecked <> TRUE) then warnlog "state changed"
- if ((Breite.IsWritable AND NachLinks.IsWritable) <> TRUE) then warnlog "edit field not active "
- if (temp(1) <> NachLinks.GetText) then warnlog "value changed"
- if (temp(2) <> NachRechts.GetText) then warnlog "value changed"
- if (LiberalMeasurement(PAGEWIDTH ,StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText) + StrToDouble (NachRechts.GetText)) <> TRUE) then
- if PAGEWIDTH < 0 then
- warnlog "Cdbl returns wrong values"
- else
- warnlog "measurement value error "+ "is: "+(StrToDouble (Breite.GetText) + StrToDouble (NachLinks.GetText)+ StrToDouble (NachRechts.GetText))+" should: "+PAGEWIDTH
- end if
- end if
- '--------------------------------
- NachLinks.SetText "0"
- NachRechts.SetText "0"
- TabTabelle.OK
- Printlog "'/// <font color=#FF0000>TODO TBO automatical ---------- MISSING yet </FONT> ///"
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase sTablePagebreak
- Dim temp(10) as string
-
- Call hNewDocument
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Garfield"
- Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="7") ' insert table
-
- Printlog "'/// Check TextFlow: pagebreak ///"
-
- InsertFieldsPagenumbers ' get pagenumber & leave it for next calculation
- Call wTypeKeys "<shift home>"
- ToolsCalculate
- temp(1) = val(GetClipboardText)
-
- TableTableProperties
- Kontext "TabelleEinfuegenWriter"
- Kontext
- Active.SetPage TabTextFlusstabelle
- Kontext "TabTextFlusstabelle"
- Umbruch.Check
- if ((Seite.IsChecked AND Davor.IsChecked) <> TRUE) then
- printlog "--- defaultvalue changed..."
- Seite.Check
- Davor.Check
- end if
- TabTextFlusstabelle.OK
-
- ToolsUpdateUpdateAll ' update field & get pagenumber & clear
- Call wTypeKeys "<shift end>"
- ToolsCalculate
- temp(2) = val(GetClipboardText)
- if ((val(temp(1))+1) <> temp(2)) then
- warnlog "--- Table didn't move, that's not good "+ "from: "+val(temp(1))+" to: "+ temp(2) +" 1+1= "+(val(temp(1))+1)
- else
- printlog " works , moved, ok!"
- end if
-
- Call wTypeKeys "<mod1 end><mod1 end><return>"
-
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase sTableMergeCell
- dim temp(10) as string
-
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
-
- Call hNewDocument
-
- temp (1) = "Table1"
- printlog "Insert a table with 10 columns and 7 rows"
- Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="7") ' insert table
- printlog "Point cursor out of the table"
- Call wTypeKeys "<MOD1 END>", 2
-
- printlog "Insert a table with 10 columns and 10 rows"
- temp (1) = "Table2"
- Call TBOhTabelleEinfuegen (temp (1) ,0,0,1,1,"10",tHeight:="10") ' insert table
-
- Printlog "merging of cells & undo"
- temp (2) = hGetTableName()
- if (temp(2) <> temp(1)) then warnlog " --- wrong table? schould be : "+temp (1)+ ", is : "+temp(2)
-
- Printlog " - merging of cells"
- ac=0 ' ActionCount
- fc=100 ' FieldCount
- Call wTypeKeys "<down><shift right>" ' 2 horizontal (0,1) & (1,1) (x,y)
- TableMergeCells : inc ac : dec fc ' FormatZelleVerbinden
- Call wTypeKeys "<down><shift down>" ' 2 vertical (1,2) & (1,3)
- TableMergeCells : inc ac : dec fc
- Call wTypeKeys "<down><up><shift down><shift up>" ' merge again
- TableMergeCells
-
- printlog "Go to top of table"
- Call wTypeKeys "<mod1 home>"
- printlog "Undo all cell mergers (3 times)"
- for i=1 to ac
- try
- EditUndo
- wait 500
- catch
- Warnlog "Edit / Undo disabled on Undo step: " & i
- endcatch
- next i
-
- printlog "Close document"
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase sTableBorder
- dim temp(10) as string
- temp(1) = "bloed"
-
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
- Call hNewDocument
-
- ' set marks to find
- Call wTypeKeys "<mod1 end><mod1 end>"
- Call wTypeKeys "NULL<return>"
- Call wTypeKeys "Start<return>"
- Call wTypeKeys "End<return>"
- Call wTypeKeys "NULL<return><up><up>"
-
- Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="7") ' insert table
-
- Printlog "'/// set border & undo ///"
- ' assign border to whole table
- Call wTypeKeys "<shift mod1 end>"
- TableTableProperties ' get into existing table
- Sleep (1)
- Kontext "TabelleEinfuegenWriter"
- sleep (1)
- Kontext
- if active.exists (5) then
- Active.SetPage TabUmrandung
- Sleep (1)
- Kontext "TabUmrandung"
- Sleep (1)
- Vorgaben.Typekeys "<end>" ' set border
- StilFarbe.Select StilFarbe.GetItemCount
-
- 'links.IsWriteable 'si checkable, but not now!...
- Position.TypeKeys "<home><right><right><right>" ' 3. from the left
- if (groesse.IsEnabled <> TRUE) then warnlog "position of shadow is not changeable "
- SchattenFarbe.Select SchattenFarbe.GetItemCount - 1
- else
- TableTableProperties ' get into existing table
- Kontext "TabelleEinfuegenWriter"
- sleep (1)
- Kontext
- warnlog "2.trie"
- if active.exists (5) then
- Active.SetPage TabUmrandung
- Sleep (1)
- Kontext "TabUmrandung"
- Sleep (1)
- Vorgaben.Typekeys "<end>" ' set border
- StilFarbe.Select StilFarbe.GetItemCount
-
- 'links.IsWriteable 'si checkable, but not now!...
- Position.TypeKeys "<home><right><right><right>" ' 3. from the left
- if (groesse.IsEnabled <> TRUE) then warnlog "position of shadow is not changeable "
- SchattenFarbe.Select SchattenFarbe.GetItemCount - 1
- else
- warnlog "baeh!"
- end if
- end if
- Kontext
- Active.SetPage TabHintergrund
- Sleep (1)
- Kontext "TabHintergrund"
- Sleep (1)
- Hintergrundfarbe.TypeKeys "<home><down><right><down><right><down><right><down><right>"
- TabHintergrund.OK
- ' just an idea of checking this type of control
- i=0
- TableTableProperties ' get into existing table
- Sleep (1)
- Kontext "TabelleEinfuegenWriter"
- sleep (1)
- Kontext
- Active.SetPage TabUmrandung
- Sleep (1)
- Kontext "TabUmrandung"
- Sleep (1)
- while (groesse.IsEnabled)
- Position.TypeKeys "<left>"
- inc i
- wend
- TabUmrandung.cancel
- if (i <> 3) then warnlog "wrong shadow selected should be 3, was: "+i
-
- ' undo & check where we are ///'
- EditUndo
- temp (2) = hGetTableName()
- if (temp(2) <> temp(1)) then warnlog " --- wrong table? schould be : "+temp (1)+ ", is : "+temp(2)
- EditUndo ' go one step further
- Call wTypeKeys "<up><shift end>"
- EditCopy
- temp(2) = GetClipboardText
- Call wTypeKeys "<down><shift home>"
- EditCopy
- temp(3) = GetClipboardText
- if ((temp(2) <> "Start") AND (temp(3) <> "End")) then
- warnlog "there is smth. wrong with the undo stuff !!!"
- print "whats wrong with the undo stuff"
- end if
- EditRedo ' and back again
- Call wTypeKeys "<up><mod1 home>" ' now we are in (0,0)
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase sTableIndent
- dim temp(10) as string
- dim ac as integer, fc as integer
-
- Call hNewDocument
- ' set marks to find
- Call wTypeKeys "NULL<return>"
- Call wTypeKeys "Start<return>"
- Call wTypeKeys "End<return>"
- Call wTypeKeys "NULL<return><up><up>"
-
- temp (1) = "Garfield"
- Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="7") ' insert table
-
- Printlog "'/// tab, paragraph indent & UNDO ///"
-
- ac=0 ' ActionCount
- fc=100 ' FieldCount
- ' : inc ac : dec fc
- FormatParagraph
- Kontext
- Active.SetPage TabTabulator
- Sleep (1)
- Kontext "TabTabulator"
- Sleep (1)
- Position.SetText "1"
- TypZentriert.Check
- Fuellzeichen5.Check
- FuellzeichenZeichen.SetText "%"
- Neu.Click
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- Vonlinks.SetText "-1"
- VonRechts.SetText "-1"
- TabEinzuegeUndAbstaende.OK
-
-
- Printlog "'/// text attributes ///"
- Call wTypeKeys "John" : inc ac
- Call wTypeKeys "<shift home>"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Sleep (1)
- Kontext "TabFontEffects"
- Sleep (1)
- FontColor.Select FontColor.GetItemCount - 1
- Kontext
- Active.SetPage TabFontPosition
- Sleep (1)
- Kontext "TabFontPosition"
- Sleep (1)
- Super.Check
- n90Degree.Check
- TabFontPosition.OK
-
- EditUndo
- EditUndo
-
- Printlog "'/// cell protection ///"
- Call wTypeKeys "<LEFT><UP>", 10
- Call wTypeKeys "<DOWN>", 3
- Call wTypeKeys "<down><shift down><shift right><Right><Left><Shift right><Shift left>"
- TableCellProtect
- Call wTypeKeys "<LEFT>"
- Call wTypeKeys "x"
- Kontext
- if (Active.Exists <> TRUE) then
- Call wTypeKeys "<LEFT><UP>", 10
- Call wTypeKeys "<DOWN>", 3
- Call wTypeKeys "<down><shift down><shift right><Right><Left><Shift right><Shift left>"
- try
- EditCopy
- catch
- endcatch
- if GetClipboardtext <> "" then
- QAErrorLog "#110549#Protection of cell does not work correct!"
- end if
- ' If protection fails, reselect table with Navigator!
- Call wNavigatorAuswahl(2,1)
- else
- Active.OK
- EditUndo
- Call wTypeKeys "x"
- Kontext
- if (Active.Exists = TRUE) then
- Warnlog "ReProtection of table does not work!" + Active.GetText
- active.OK
- end if
-
- EditUndo
- EditUndo
- 'Printlog "undoCheck is here"
- temp (2) = hGetTableName()
- if (temp(2) <> temp(1)) then warnlog " --- wrong table? schould be : "+temp (1)+ ", is : "+temp(2)
- EditUndo ' go one step further
- Call wTypeKeys "<up><shift end>"
- EditCopy
- temp(2) = GetClipboardText
- Call wTypeKeys "<down><shift home>"
- EditCopy
- temp(3) = GetClipboardText
- if ((temp(2) <> "Start") AND (temp(3) <> "End")) then
- warnlog "there is smth. wrong with the undo stuff !!! is: "+temp(2)+" should: Start; is: "+temp(3)+" should: End;"
- end if
- EditRedo ' and back again
- Call wTypeKeys "<up><mod1 home>" ' now we are in (0,0)
- end if
-
- Printlog "'/// Set graphic in table as background ///"
- try
- TableTableProperties
- catch
- Warnlog "Dialog 'Insert Table' not up!"
- Call hCloseDocument
- goto endsub
- endcatch
-
- try
- Kontext
- Active.SetPage TabHintergrund
- Sleep (1)
- Kontext "TabHintergrund"
- Sleep (1)
- Fuer.Select(2) ' Zeile
- Als.Select(2) ' Grafik
- Durchsuchen.Click
- Kontext "GrafikEinfuegenDlg"
- Dateiname.SetText convertPath(gTesttoolPath +"writer\optional\input\options\ga000907.gif")
- Oeffnen.Click
- Kontext "TabHintergrund"
- TabHintergrund.OK
-
- FormatColumnWidthWriter ' thre is a bigger test in the option test
- Kontext "SpaltenBreite"
- Spalte.SetText "2"
- Breite.SetText "2"
- SpaltenBreite.OK
- FormatRowHeight
- Kontext "ZellenHoehe"
- Hoehe.SetText "2"
- ZellenHoehe.OK
- EditUndo
- EditUndo
-
- EditUndo
-
- ' Printlog "undoCheck is here"
- sleep (3)
- temp (2) = hGetTableName()
- if (temp(2) <> temp(1)) then warnlog " --- wrong table? schould be : "+temp (1)+ ", is : "+temp(2)
- EditUndo ' go one step further
- Call wTypeKeys "<up><shift end>"
- EditCopy
- temp(2) = GetClipboardText
- Call wTypeKeys "<down><shift home>"
- EditCopy
- temp(3) = GetClipboardText
- if ((temp(2) <> "Start") AND (temp(3) <> "End")) then
- warnlog "there is smth. wrong with the undo stuff !!! is: "+temp(2)+" should: Start; is: "+temp(3)+" should: End;"
- end if
- EditRedo ' and back again
- Call wTypeKeys "<mod1 end>" ' go to end of doc
- catch
- Warnlog "Dialog 'Insert Table' not up!"
- endcatch
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase sTableSort
- dim temp(10) as string
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
-
- Call hNewDocument
- ' Kontext "DocumentWriter"
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Sort"
- Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="10") ' insert table
-
- fc = 99
- randomize()
- for i=1 to fc
- Call wTypeKeys str(rnd()) + "<right>"
- next i
- Call wTypeKeys "<shift mod1 home>"
- ToolsSort '-----------------------------------------------------------11111111111111111
- Kontext "Sortieren"
- Spalten.Check 'direction 1
- for i = 1 to Schluesseltyp1.GetItemCount
- Schluesseltyp1.select i
- printlog "possible values for sorting :" + Schluesseltyp1.Getseltext
- next i
- Sortieren.OK
- Kontext
- if active.exists (5) then printlog "active1: "+active.gettext
- Call wTypeKeys "<shift mod1 end>",2
- try
- ToolsSort '-----------------------------------------------------------22222222222222222
- catch
- printlog "WorkAround only seen on linux, can't select immediately, cursor movement needed "
- Call wTypeKeys "<right><left>"
- Call wTypeKeys "<shift mod1 end>",2
- ToolsSort
- endcatch
- Kontext
- if active.exists (5) then
- printlog "active2: "+active.gettext
- active.ok
- end if
- Kontext "Sortieren"
- Zeilen.Check
- Sortieren.OK
- Kontext
- if active.exists (5) then
- printlog "active3: "+active.gettext
- active.ok
- end if
-
- 'Schluessel1
- 'Spalte1
- 'Schluesseltyp1
- 'Aufsteigend1
- 'Absteigend1
- '
- 'Schluessel2
- 'Spalte2
- 'Schluesseltyp2
- 'Aufsteigend2
- 'Absteigend2
- '
- 'Schluessel3
- 'Spalte3
- 'Schluesseltyp3
- 'Aufsteigend3
- 'Absteigend3
- '
- 'Tabulator
- 'Zeichen
- 'Zeichentext
- 'Sonderzeichen
- 'Sprache
- 'ExakterVergleich
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase TableSplit_copy_heading
- printlog "'/// Splitting Tables & UNDO ///"
- printlog "'/// check 'copy heading' ///"
- dim temp(10) as string
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
-
- Call hNewDocument
- ' Kontext "DocumentWriter"
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Split"
- Call TBOhTabelleEinfuegen (temp (1) ,1,1,0,1,"10",tHeight:="10") ' insert table
-
- Printlog "'/// Splitting Tables & UNDO ///"
- Printlog "'/// check 'copy heading' ///"
- temp(2) = "Jon"
- Call wTypeKeys temp(2)+"<down>"
- FormatSplitTable
- Kontext "TabelleAuftrennen"
- UeberschriftKopieren.Check '<------------- this is the key
- TabelleAuftrennen.OK
- ' check where am i
- temp (6) = hGetTableName ()
- if (temp(6) <> (fLocaleString("LocaleTable")+"1")) then warnlog "Split table didn't work! is: "+temp(6)+"; should: "+(fLocaleString("LocaleTable")+"1")
-' if (temp(6) <> (fLocaleString("LocaleTable")+"2")) then warnlog "Split table didn't work! is: "+temp(6)+"; should: "+(fLocaleString("LocaleTable")+"2")
-
- Call wTypeKeys "<up>" ' im in the content of the table
- Sleep 1
- ' -------------check if heading (style)
- Kontext "TextObjectbar"
- if (Vorlage.GetSelText <> fLocaleString("LocaleTableHeading")) then
- Warnlog "tabel heading did not work!is: " & Vorlage.GetSelText & ", should " & fLocaleString("LocaleTableHeading")
- end if
- '----------------------------------
- Call wTypeKeys "<end><shift home>" ' check heading in 'new' table (content)
- EditCopy
- temp(3) = GetClipboardText
- if (temp(2) <> temp(3)) then warnlog "wrong heading! Is: "+temp(3)+" Should: "+temp(2)
- Call wTypeKeys "<up><up>"
- if (hGetTableName () <> (temp(1))) then warnlog "Split table didn't work?"
- Call wTypeKeys "<end><shift home>" ' check heading in 'old' table
- EditCopy
- temp(3) = GetClipboardText
- if (temp(2) <> temp(3)) then warnlog "wrong heading! is: "+temp(3)+" should: "+temp(2)
- EditUndo
- EditUndo
-
- Printlog "'/// check 'custom heading (apply style)' ///"
- ' splitting headers doesn't work -> move down 1 line
- temp(2) = temp(1)
- Call wTypeKeys temp(2)
- ' set some style to verify
- FormatParagraph
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- Vonlinks.SetText "-1"
- VonRechts.SetText "-1"
- temp (4) = Vonlinks.GetText
- temp (5) = Vonrechts.GetText
- TabEinzuegeUndAbstaende.OK
- Call wTypeKeys "<down>",2
- FormatSplitTable
- Kontext "TabelleAuftrennen"
- EigeneMitVorlage.Check '<------------- this is the key
- TabelleAuftrennen.OK
- ' check where am i
- temp (6) = hGetTableName ()
- if (temp(6) <> (fLocaleString("LocaleTable")+"1")) then
- warnlog "Split table didn't work! is: "+temp(6)+"; should: "+(fLocaleString("LocaleTable")+"1")
- end if
- ' -------------check if heading
- Kontext "TextObjectbar"
- if (Vorlage.GetSelText <> fLocaleString("LocaleTableHeading")) then
- Warnlog "Table heading did not work!"
- Warnlog "is: " & Vorlage.GetSelText & ", should " & fLocaleString("LocaleTableHeading")
- Call wTypeKeys "<Escape>"
- end if
- '----------------------------------
-
- FormatParagraph ' check style
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- ' if ((Vonlinks.GetText <>temp (4) ) OR (Vonrechts.GetText <>temp (5) )) then warnlog "style didn't get inherited. is: "+Vonlinks.GetText+"; should: "+temp (4) +";; is: "+Vonrechts.GetText+"; should: "+temp (5) +";;"
- TabEinzuegeUndAbstaende.OK
- Call wTypeKeys "<up><up><up>" ' goto old table
- if (hGetTableName () <> (temp(1))) then warnlog "Split table didn't work? "
- Call wTypeKeys "<end><shift home>" ' check heading in 'old' table
- EditCopy
- temp(3) = GetClipboardText
- if (temp(2) <> temp(3)) then warnlog "wrong heading! is: "+temp(3)+"; should: "+temp(2)
-
- sleep (3)
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase TableSplit_custom_heading
- dim temp(10) as string
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
-
- Call hNewDocument
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Header"
- Call TBOhTabelleEinfuegen (temp (1) ,1,1,0,1,"10",tHeight:="10") ' insert table
- Printlog "'/// check 'custom heading' ///"
- Call wTypeKeys "Header"
- FormatStylesCatalog ' set a style to verify
- Kontext "Vorlagenkatalog"
- Ansicht.TypeKeys "<up><up><up><up>"
- temp (4) = Ansicht.GetText
- Vorlagenkatalog.OK
- ' set some style to verify
- FormatParagraph
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- Vonlinks.SetText "-1"
- VonRechts.SetText "-1"
- temp (2) = Vonlinks.GetText
- temp (3) = Vonrechts.GetText
- TabEinzuegeUndAbstaende.OK
- Call wTypeKeys ("<down>")
- FormatSplitTable
- Kontext "TabelleAuftrennen"
- Eigene.Check '<------------- this is the key
- TabelleAuftrennen.OK
- ' check where am i
- temp (5) = hGetTableName ()
- if (temp(5) <> ( fLocaleString("LocaleTable") + "1" )) then warnlog "Split table didn't work! is: "+ temp(5) + "; should: "+(fLocaleString("LocaleTable") + "1")
- ' -------------check if NO heading (would be a custom style...))
- Call wTypeKeys "<Up>",2
- Call wTypeKeys "<mod1 a>"
- EditCopy
- temp(6) = GetClipboardText
- FormatParagraph ' check style
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- if temp (2) <> Vonlinks.GetText then Warnlog "Indent 'Before text' has been changed!"
- if temp (3) <> Vonrechts.GetText then Warnlog "Indent 'After text' has been changed!"
- TabEinzuegeUndAbstaende.OK
- FormatStylesCatalog ' verify
- Kontext "Vorlagenkatalog"
- if Ansicht.Gettext <> temp(4) then Warnlog "Style in Header has been changed!"
- Vorlagenkatalog.Cancel
- if (hGetTableName () <> temp(1)) then warnlog "Split table didn't work? is: "+hGetTableName () +"; should: "+temp(1)
- if (temp(6) <> temp(1)) then warnlog "wrong heading! is: " + temp(6) + " should: " + temp(1)
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase TableSplit_custom_heading_apply_style
- ' SHOULD BE EASIER TO WORK ON ODIE TOOOOOO
- dim temp(10) as string
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
-
- Call hNewDocument
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Split"
- TBOhTabelleEinfuegen (temp (1) ,1,1,0,1,"10",tHeight:="10") ' insert table
-
- Printlog "'/// Splitting Tables & UNDO ///"
- Printlog "'/// check 'custom heading (apply style)' ///"
- temp(2) = temp(1)
- Call wTypeKeys temp(2)
- ' set some style to verify
- FormatParagraph
- Kontext "TabTabulator"
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- Vonlinks.SetText "-1"
- VonRechts.SetText "-1"
- temp (4) = Vonlinks.GetText
- temp (5) = Vonrechts.GetText
- TabEinzuegeUndAbstaende.OK
- Call wTypeKeys "<down>",2
- FormatSplitTable
- Kontext "TabelleAuftrennen"
- EigeneMitVorlage.Check '<------------- this is the key
- TabelleAuftrennen.OK
- ' check where am i
- temp (6) = hGetTableName ()
- if (temp(6) <> (fLocaleString("LocaleTable")+"1")) then
- warnlog "Split table didn't work! is: "+temp(6)+"; should: "+(fLocaleString("LocaleTable")+"1")
- end if
- ' -------------check if heading
- Kontext "TextObjectbar"
- if (Vorlage.GetSelText <> fLocaleString("LocaleTableHeading")) then
- Warnlog "table heading did not work!"
- warnlog "is: " & Vorlage.GetSelText & ", should " & fLocaleString("LocaleTableHeading")
- 'GetSelText bleibt in der box
- Call wTypeKeys "<Escape>"
- end if
- '----------------------------------
- FormatParagraph ' check style
- Kontext "TabTabulator"
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- TabEinzuegeUndAbstaende.OK
- Call wTypeKeys "<up><up><up>" ' goto old table
- if (hGetTableName () <> (temp(1))) then warnlog "Split table didn't work? "
- Call wTypeKeys "<end><shift home>" ' check heading in 'old' table
- EditCopy
- temp(3) = GetClipboardText
- if (temp(2) <> temp(3)) then warnlog "wrong heading! is: "+temp(3)+"; should: "+temp(2)
- sleep (3)
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase TableSplit_no_heading
- ' SHOULD BE EASIER TO WORK ON ODIE TOOOOOO
- dim temp(10) as string
- dim PAGEWIDTH as double
- dim ac as integer, fc as integer
- dim i as integer
-
- Call hNewDocument
- Call TBOhTabelleEinfuegen ("dummy" ,0,1,0,1,"1",tHeight:="1") ' insert table
- Call wTypeKeys "<mod1 end><mod1 end>"
- temp (1) = "Split"
- Call TBOhTabelleEinfuegen (temp (1) ,1,1,0,1,"10",tHeight:="10") ' insert table
-
- Printlog "'/// Splitting Tables & UNDO ///"
- Printlog "'/// check 'no heading' ///"
- temp(2) = "Header"
- temp(3) = "Content"
- Call wTypeKeys ( temp(2) )
- Call wTypeKeys ( "<down>" )
- Call wTypeKeys ( temp(3) )
- Call wTypeKeys ( "<Home>" )
- ' set some style to verify
- FormatParagraph
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- Vonlinks.SetText "-1"
- VonRechts.SetText "-1"
- temp (4) = Vonlinks.GetText
- temp (5) = Vonrechts.GetText
- TabEinzuegeUndAbstaende.OK
- FormatSplitTable
- Kontext "TabelleAuftrennen"
- Keine.Check
- TabelleAuftrennen.OK
- ' check where am i
- temp (6) = hGetTableName ()
- if (temp(6) <> ( fLocaleString("LocaleTable") + "1" )) then warnlog "Split table didn't work! is: " + temp(6) + "; should: " + (fLocaleString("LocaleTable") + "1" )
- ' -------------check if NO heading (would be a custom style...))
- Kontext "TextObjectbar"
- Call wTypeKeys "<end><shift home>" ' check heading in 'new' table
- try
- EditCopy
- ' Should be 'Content'
- if (GetClipboardText <> temp(3)) then warnlog "wrong content! is: " + GetClipboardText + " should: " + temp(3)
- catch
- Warnlog "Unable to copy content! Maybe not selected!"
- endcatch
- FormatParagraph ' check style
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Sleep (1)
- Kontext "TabEinzuegeUndAbstaende"
- Sleep (1)
- if ((Vonlinks.GetText <>temp (4) ) OR (Vonrechts.GetText <>temp (5) )) then warnlog "style didn't get inherited"
- TabEinzuegeUndAbstaende.OK
- Call wTypeKeys "<up><up>" ' goto header
- if (hGetTableName () <> (temp(1))) then warnlog "Split table didn't work? "
- Call wTypeKeys "<Mod1 A>" ' check heading in 'old' table
- try
- EditCopy
- catch
- Warnlog "Unable to copy content! Maybe not selected!"
- endcatch
- if (GetClipboardText <> temp(2)) then warnlog "wrong heading! is: " + GetClipboardText + " should: " + temp(2)
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-testcase sTableMerge
- dim temp(10) as string
-
- Call hNewDocument
- Call wTypeKeys "<return><mod1 end><mod1 end>"
- Call wTypeKeys "<mod1 end><mod1 end>"
-
- temp(2) = "Arlene"
- temp(3) = "Pooky"
- temp(4) = "Nermal"
-
- Call TBOhTabelleEinfuegen (temp (2) ,0,1,0,1,"10",tHeight:="7") ' insert table Arlene
- sleep (3)
- Call wTypeKeys "<mod1 end><mod1 end>"
- Call TBOhTabelleEinfuegen (temp (3) ,0,1,0,1,"10",tHeight:="7") ' insert table Pooky
- sleep (3)
- Call wTypeKeys "<mod1 end><mod1 end>"
- Call TBOhTabelleEinfuegen (temp (4) ,0,1,0,1,"10",tHeight:="7") ' insert table Nermal
- sleep (3)
-
- Printlog "'/// Join tables & UNDO///"
- Printlog "'/// insert 3 tables: 'Arlene' 'Pooky' 'Nermal' ///"
-
- ' usually lowwer to upper one...
- ' update formulars ....
- Printlog "'/// join Nermal with pooky -> Nermal has to be under Arlene -> undo ///"
- FormatMergeTables
- if (hGetTableName () <> temp(4)) then warnlog "Merge table didn't work? 1 "
- Call wTypeKeys "<mod1 home><up>"
- if (hGetTableName () <> temp(2)) then warnlog "Merge table didn't work? 1+ "
- EditUndo
- Call wTypeKeys "<up><mod1 home>"
-
- Printlog "'/// join Nermal with pooky -> choose lowerTable -> Nermal has to be under Arlene again -> undo ///"
- FormatMergeTables
- Kontext "TabellenVerbinden"
- if TabellenVerbinden.exists (5) <> TRUE then
- warnlog "there is only one table around no question for which table should be connected "
- end if
- MitNachfolgenderTabelleVerbinden.Check
- TabellenVerbinden.OK
- temp (5) = hGetTableName ()
- if (temp (5) <> temp(3)) then warnlog "Merge table didn't work? 2 is:"+temp (5)+" should: "+temp(3)
- Call wTypeKeys "<up>"
- if (hGetTableName () <> temp(2)) then warnlog "Merge table didn't work? 2+ "
- EditUndo
- Call wTypeKeys "<up><mod1 home>"
-
- Printlog "'/// join Pooky with Arlene -> choose upperTable -> Pooky is now above Nermal -> undo ///"
- FormatMergeTables
- Kontext "TabellenVerbinden"
- MitVorherigerTabelleVerbinden.Check
- TabellenVerbinden.OK
- temp (5) = hGetTableName ()
- if (temp (5) <> temp(3)) then warnlog "Merge table didn't work? 3 is:"+temp (5)+" should: "+temp(3)
- Call wTypeKeys "<up>"
- if (hGetTableName () <> temp(3)) then warnlog "Merge table didn't work? 3+ "
- EditUndo
- Call wTypeKeys "<up><mod1 home>"
-
- Printlog "'/// join Arlene with Pooky -> Pooky is above Nermal -> undo ///"
- FormatMergeTables
- Kontext "TabellenVerbinden"
- if TabellenVerbinden.exists then
- warnlog "tzhere shouldn't be a table connect dialog; yust one table to connect to available "
- TabellenVerbinden.cancel
- end if
- sleep (2)
- temp (5) = hGetTableName ()
- if (temp (5) <> temp(2)) then warnlog "Merge table didn't work? 4 is:"+temp (5)+" should: "+temp(2)
- sleep (2)
- Call wTypeKeys "<mod1 end><down>"
- sleep (3)
- if (hGetTableName () <> temp(4)) then warnlog "Merge table didn't work? 4+ "
- sleep (3)
- EditUndo
- sleep (3)
- Call hCloseDocument
-endcase
-
-' ----------------------------------------------------------------------
-
-function hGetPageWidth() as double
- Dim tWidth as double
- try
- FormatPageWriter
- catch
- warnlog ":couldn't get menuentry: FormatPageWriter"
- exit function
- endcatch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- printlog "Test: "+ Breite.GetText +" " +Links.GetText +" " +Rechts.GetText
- tWidth = (StrToDouble(Breite.GetText) - ( StrToDouble(Links.GetText) + StrToDouble(Rechts.GetText)) )
- hGetPageWidth = tWidth
- TabSeite.cancel
-end function
-
diff --git a/testautomation/writer/optional/includes/table/w_204b_.inc b/testautomation/writer/optional/includes/table/w_204b_.inc
deleted file mode 100644
index 56b6e8781b2b..000000000000
--- a/testautomation/writer/optional/includes/table/w_204b_.inc
+++ /dev/null
@@ -1,100 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Writer Table test
-'*
-'\***********************************************************************
-
-sub w_204b_
- Call wSplittingTableCellsIntoEqualProportions
-end sub
-
-
-testcase wSplittingTableCellsIntoEqualProportions
- Dim i as integer
- Dim DaRowHeight as string
- Dim SetRowHeight as boolean
-
- SetRowHeight = True
- printlog "Based on feature ID: 103485"
- printlog " Open a new writer document"
- Call hNewDocument
- printlog "Insert a table with 4 rows and 4 lines"
- Call TBOhTabelleEinfuegen("SplittingTable", 0, 1, 0, 1, "4", "4")
- printlog "Select the table ( Strg + A )"
- Call wTypeKeys ( "<Mod1 A>" )
- printlog "Format / Row / Height"
- Kontext "ZellenHoehe"
- TableAutoFitSetRowHeight
- printlog "In upcoming dialog (Row Height) set height to 1,2cm and check 'Fit to size'"
- if iSystemSprache = 01 or iSystemSprache = 48 or iSystemSprache = 07 then
- Hoehe.Settext "1.20"
- else
- Hoehe.Settext "1,20"
- end if
- Dynamisch.Check
- DaRowHeight = Hoehe.Gettext
- printlog "Close 'Row Height' with 'OK'"
- ZellenHoehe.Ok
- printlog "Point cursor to first cell in first row ( Strg + Home )"
- Call wTypeKeys ( "<Mod1 Home>" )
- For i = 1 to 4
- if wCheckRowHeight( DaRowHeight ) = False then SetRowHeight = False
- Call wTypeKeys ( "<Down>" )
- next i
- if SetRowHeight = True then
- Call wTypeKeys ( "<Up>", 4 )
- printlog "Select 1st and 2nd column"
- Call wTypeKeys ( "<Shift Down>", 3 )
- Call wTypeKeys ( "<Shift Right>" )
- printlog "Format / Cell / Merge to merge all cells"
- TableMergeCells
- printlog "Now split previous merged cell into 4 pieces ( horizontally )"
- printlog "Format / Cell / Split"
- TableSplitCell
- Kontext "ZellenTeilen"
- printlog "In 'Split Cells' Dialog set 'Split cell into' to 4"
- Anzahl.Settext "4"
- printlog "Check 'Horizontally' and 'Into equal proportions'"
- Horizontal.Check
- GleichmaessigTeilen.Check
- printlog "Close dialog with 'OK'"
- ZellenTeilen.Ok
- printlog "Now the cell has to be splitted into 4 rows of height 1,2cm"
- For i = 1 to 4
- if wCheckRowHeight( DaRowHeight ) = False then SetRowHeight = False
- Call wTypeKeys ( "<Down>" )
- next i
- else
- Warnlog "Error setting the row height !"
- end if
-
- Call hCloseDocument
-
-endcase
diff --git a/testautomation/writer/optional/includes/textframes/w_textframes1.inc b/testautomation/writer/optional/includes/textframes/w_textframes1.inc
deleted file mode 100644
index ed3ee9b2dd5e..000000000000
--- a/testautomation/writer/optional/includes/textframes/w_textframes1.inc
+++ /dev/null
@@ -1,1458 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of textframe - 1
-'*
-'\***********************************************************************
-
-sub w_textframes1
-
- Call tTextframes_1 'Test Insert Frame with four ways
- Call tTextframes_2 'Test check Autosize
- Call tTextframes_3 'Test Uncheck Autosize
- Call tTextframes_4 'Test Uncheck Keep ratio
- Call tTextframes_5 'Test check Keep ratio
- Call tTextframes_6 'Test Anchor to page - frame doesn't move with text
- Call tTextframes_7 'Test Anchor to paragraph - text entered ahead of the paragraph ,the frame has to move with its paragraph
- Call tTextframes_8 'Test Anchor to Character - the frame follows the vertical position of the character it is anchored to
- Call tTextframes_9 'Test Anchor as Character - frame behaves as a character, moves with each text insertion ahead of it
- Call tTextframes_10 'Test Anchor in gathering pages&columns test.
- Call tTextframes_11 'Test Anchor in gathering paragraph test.
- Call tTextframes_12 'Horizontal should not be available when frame is anchored as Character
- Call tTextframes_13 'Test Horizontal
- Call tTextframes_14 'Test Vertical
- Call tTextframes_15 'Frame name can be actualized in Navigator - solution 1
- Call tTextframes_16 'Frame name can be actualized in Navigator - solution 2
-
-end sub
-
-'---------------------------------------------------
-
-testcase tTextframes_1
-
- printlog "- Insert / Frame"
- '/// Test Insert Frame
-
- Call hNewDocument
-
- '/// 1. Insert a Frame (with Menu)
- InsertFrame
- Kontext
- try
- Active.Setpage TabType
- Kontext "TabType"
- TabType.Ok
- Wait 500
- catch
- Warnlog "Unable to insert a frame (Dialog is not up)!"
- endcatch
-
- try
- Call fFormatFrame("TabType")
- TabType.Cancel
- catch
- Warnlog "Frame has not been inserted correct with menu!"
- endcatch
-
- Call hCloseDocument
-
- '/// 2. Insert a frame over Toolbox / Insert / Frame
- Call hNewDocument
-
- hSetDocumentContext()
- Call gMouseClick (30, 50)
-
- Call hToolbarSelect("INSERT", true )
- Sleep 1
- Kontext "Insertbar"
- Rahmen.Click
- Sleep 1
-
- Call gMouseDown ( 30,50 )
- Call gMouseMove ( 30,50,30,60 )
- Call gMouseUp ( 30,60 )
- Call gMouseClick ( 50,70 )
- Sleep 1
-
- 'set focus to the frame
- Call wTypeKeys ( "<Shift F4>" )
-
- Sleep 2
-
- try
- Call fFormatFrame("TabType")
- TabType.Cancel
- catch
- Warnlog "Frame has not been inserted correct over toolbox !"
- endcatch
-
- Call hCloseDocument
-
- '/// Create Multi-Column frames over toolbox is not possible with testtool
-
- '/// 3. Paste a frame from clipboard
- Call hNewDocument
-
- '/// -- insert a frame first
- Call wInsertFrame
- '/// -- Copy frame to clipboard
- try
- EditCopy
- catch
- Warnlog "Unable to access 'Edit / Copy'. Maybe disabled !"
- Call hCloseDocument
- goto endsub
- endcatch
-
- Call hCloseDocument
-
- Call hNewDocument
-
- '/// -- Paste Frame into document from clipboard
- EditPaste
- Sleep 1
-
- try
- Call fFormatFrame("TabType")
- TabType.Cancel
- catch
- Warnlog "Frame has not been pasted via clipboard !"
- endcatch
- Call hCloseDocument
-
- '/// 4. Insert a frame via 'Insert / File '
- Call hNewDocument
-
- InsertFileWriter
- Kontext "OeffnenDlg"
- Dateiname.Settext Convertpath (gTesttoolpath + "writer\optional\input\textframe\frame.sxw")
- Oeffnen.Click
- Wait 500
-
- 'set focus to the frame
- Call wTypeKeys ( "<Shift F4>" )
- Wait 500
-
- try
- Call fFormatFrame("TabType")
- TabType.Cancel
- catch
- Warnlog "Frame has not been inserted via insert/file !"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
-
-testcase tTextframes_2
-
- Dim sText as String
- Dim sHeight as String
- Dim sSpacing as String
-
- sText = "ABCDEFG"
- sSpacing = "0"
-
- printlog "- Test check Autosize"
- '/// Test check Autosize
-
- Call hNewDocument
-
- '/// insert/frame / Type , Check Autosize
- InsertFrame
- Kontext
- Active.SetPage TabType
- Kontext "TabType"
- AutoHoehe.Check
- Sleep 1
- TabType.OK
-
- '/// A return on a selected frame points cursor into frame
- Call wTypeKeys "<Return>"
- Wait 500
-
- '/// Input text full of frame
- Call wTypeKeys sText
- Wait 500
-
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Home>"
- Wait 500
-
- EditCopy
- Wait 500
-
- ' Choosed Text length because selected text depends on selected font
- if Len(GetClipboardText) = Len(sText) then Warnlog "Don't get expected text ! Autosize doesn't seem to work properly"
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_3
-
- Dim sText as String
- Dim sExpect as String
- Dim sHeight as String
- Dim sSpacing as String
-
- sText = "ABCDEFG"
- sExpect = "ABCDEFG"
- sSpacing = "0"
-
- printlog "- Test Uncheck Autosize"
- '/// Test Uncheck Autosize
-
- Call hNewDocument
-
- '/// insert/frame / Type , UnCheck Autosize
- InsertFrame
- Kontext
- Active.SetPage TabType
- Kontext "TabType"
- AutoHoehe.UnCheck
- Sleep 1
- TabType.OK
-
- '/// A return on a selected frame points cursor into frame
- Call wTypeKeys "<Return>"
- Wait 500
-
- '/// Input text full of frame
- Call wTypeKeys sText
- Wait 500
-
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Shift Home>"
- Wait 500
-
- EditCopy
- Wait 500
-
- if GetClipboardText <> sExpect then QAerrorlog "#i31690# - Don't get expected text ! Hope to get " + sExpect + " but get " + GetClipboardText
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_4
-
- Dim sWidth as String
- Dim sHeight as String
- Dim sWidthNew1 as String
- Dim sHeightNew1 as String
- Dim sWidthNew2 as String
- Dim sHeightNew2 as String
-
- sWidth = "2"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "1"+ gSeperator + "00" + gMeasurementUnit
-
- sWidthNew1 = "4"+ gSeperator + "00" + gMeasurementUnit
- sHeightNew1 = "1"+ gSeperator + "00" + gMeasurementUnit
-
- sWidthNew2 = "4"+ gSeperator + "00" + gMeasurementUnit
- sHeightNew2 = "3"+ gSeperator + "00" + gMeasurementUnit
-
- printlog "- Test Uncheck Keep ratio"
- '/// Test Uncheck Keep ratio
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// Format / Frame / Type
- Call fFormatFrame("TabType")
-
- '/// + UnCheck Keep ratio
- KeepRatio.UnCheck
-
-
- '/// + Set width and height
- Width.SetText sWidth
- Sleep 1
- Height.SetText sHeight
- Sleep 1
-
- if Width.GetText <> sWidth then Warnlog "Keep ration(Uncheck) doesn't work - width!"
- if Height.GetText <> sHeight then Warnlog "Keep ration(Uncheck) doesn't work - heigth!"
-
- '/// Check if height is changed after width is changed.
- Width.SetText sWidthNew1
- Sleep 1
-
- if Width.GetText <> sWidthNew1 then Warnlog "Keep ration(Uncheck) doesn't work - widthNew1 !"
- if Height.GetText <> sHeightNew1 then Warnlog "Keep ration(Uncheck) doesn't work - heigthNew1 !"
-
- '/// Check if width is changed after height is changed.
- Height.SetText sHeightNew2
- Sleep 1
-
- if Width.GetText <> sWidthNew2 then Warnlog "Keep ration(Uncheck) doesn't work - widthNew2 !"
- if Height.GetText <> sHeightNew2 then Warnlog "Keep ration(Uncheck) doesn't work - heigthNew2 !"
-
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_5
-
- Dim sWidth as String
- Dim sHeight as String
- Dim sWidthNew1 as String
- Dim sHeightNew1 as String
- Dim sWidthNew2 as String
- Dim sHeightNew2 as String
-
- sWidth = "2"+ gSeperator + "00" + gMeasurementUnit
- sHeight = "1"+ gSeperator + "00" + gMeasurementUnit
-
- sWidthNew1 = "4"+ gSeperator + "00" + gMeasurementUnit
- sHeightNew1 = "2"+ gSeperator + "00" + gMeasurementUnit
-
- sWidthNew2 = "6"+ gSeperator + "00" + gMeasurementUnit
- sHeightNew2 = "3"+ gSeperator + "00" + gMeasurementUnit
-
- printlog "- Test check Keep ratio"
- '/// Test check Keep ratio
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// Format / Frame / Type
- Call fFormatFrame("TabType")
-
- '/// + UnCheck Keep ratio
- KeepRatio.UnCheck
-
- '/// + Set width and height
- Width.SetText sWidth
- Sleep 1
- Height.SetText sHeight
- Sleep 1
-
- '/// + Check Keep ratio
- KeepRatio.Check
- Sleep 1
-
- '/// Check if height is changed after width is changed.
- Width.SetText sWidthNew1
- Sleep 1
-
- if Width.GetText <> sWidthNew1 then Warnlog "Keep ration(check) doesn't work - widthNew1 !"
- if Height.GetText <> sHeightNew1 then Warnlog "Keep ration(check) doesn't work - heigthNew1 !"
-
- '/// Check if width is changed after height is changed.
- Height.SetText sHeightNew2
- Sleep 1
-
- if Width.GetText <> sWidthNew2 then Warnlog "Keep ration(check) doesn't work - widthNew2 !"
- if Height.GetText <> sHeightNew2 then Warnlog "Keep ration(check) doesn't work - heigthNew2 !"
-
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_6
-
- Dim sTestFile as String
- Dim sTestText as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorToPage.sxw")
- sTestText = "Bottom"
-
- printlog "- Test Anchor to page - frame doesn't move with text"
- '/// Test Anchor to page - frame doesn't move with text
-
- '/// Open a test file
- '/// + This test file is designed for Anchor To Page test.
- '/// + There are 2 pages in the file , and the frame is in
- '/// + the bottom of first page
- hFileOpenLocally( sTestFile )
-
-
- Check1:
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTestText
- Wait 500
- SearchAll.Click
- Sleep 1
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- Active.No
- endcatch
- end if
- end if
- Kontext "FindAndReplace"
- FindAndReplace.Cancel
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- fCloseNavigator
- Wait 500
- Call wTypeKeys "<Home>"
- Wait 500
- Call wTypeKeys "<BackSpace>"
- Wait 500
- Goto Check1
- end if
-
- fCloseNavigator
- Wait 500
-
- Call wTypeKeys "<Home>"
-
- '/// Press Return before "bottom" , now the "bottom"
- '/// + should be in the second page
- Call wTypeKeys "<Return>" , 15
- Wait 500
-
- Call wTypeKeys "<Shift End>"
- Wait 500
- EditCopy
- if GetClipboardText <> sTestText then Warnlog "The test text isn't right !"
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then Warnlog "The test text should be in second page !"
- fCloseNavigator
- Wait 500
-
- '/// Set focus to the frame , the frame should be
- '/// + still in the first page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then Warnlog "The test frame should be still in first page !"
- fCloseNavigator
- Wait 500
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_7
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorToParagraph.sxw")
- sDummy = "She heard"
-
- printlog "- Test Anchor to paragraph - text entered ahead of the paragraph ,the frame has to move with its paragraph"
- '/// Test Anchor to paragraph - text entered ahead of the paragraph ,the frame has to move with its paragraph
-
- '/// Open a test file
- '/// + This test file is designed for Anchor To Paragraph test.
- '/// + There are 2 paragraphs in the file , and the head of 2nd
- '/// + paragraph is in the bottom of the first page .
- '/// + The frame is in the first line of 2nd paragraph
- hFileOpenLocally( sTestFile )
-
-
- '/// check if the frame is in the first page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Check:
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- fCloseNavigator
- Sleep 1
-
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<MOD1 Home>"
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Wait 500
- SearchAll.Click
- Sleep 1
- FindAndReplace.Cancel
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Backspace>"
- Goto Check
- else
- fCloseNavigator
- Wait 500
- end if
-
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<MOD1 Home>"
-
- '/// Press Return before the second paragraph
- Call wTypeKeys "<Return>" , 3
- Wait 500
-
- '/// Set focus to the frame , the frame should be in the second page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page !"
- fCloseNavigator
- Wait 500
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_8
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorToCharacter.sxw")
- sDummy = "He heard"
-
- printlog "- Test Anchor to Character - the frame follows the vertical position of the character it is anchored to"
- '/// Test Anchor to Character - the frame follows the vertical position of the character it is anchored to
-
- '/// Open a test file
- '/// + This test file is designed for Anchor To Character test.
- '/// + The frame is anchored to the character 't' of That .
- '/// + The frame is in the bottom of the first page
-
- hFileOpenLocally( sTestFile )
-
-
- '/// check if the frame is in the first page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Check1:
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- fCloseNavigator
- Sleep 1
-
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<MOD1 Home>"
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Wait 500
- SearchAll.Click
- Sleep 1
- FindAndReplace.Cancel
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Backspace>"
- Goto Check1
- else
- fCloseNavigator
- Wait 500
- end if
-
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<End>"
-
- '/// Press Return behind the character which the frame is anchored.
- Call wTypeKeys "<Return>" , 8
- Wait 500
-
- '/// Set focus to the frame , the frame should be still in the first page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then Warnlog "The test frame should be in first page !"
- fCloseNavigator
- Wait 500
-
- Call hCloseDocument
-
- hFileOpenLocally( sTestFile )
-
-
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Check2:
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- fCloseNavigator
- Sleep 1
-
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<MOD1 Home>"
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Wait 500
- SearchAll.Click
- Sleep 1
- FindAndReplace.Cancel
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Backspace>"
- Goto Check2
- else
- fCloseNavigator
- Wait 500
- end if
-
- '/// Press Return in front of the character which the frame is anchored.
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<Return>" , 8
- Wait 500
-
- '/// Set focus to the frame , the frame should be in the second page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page !"
- fCloseNavigator
- Wait 500
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_9
-
- Dim sTestFile as String
- Dim sDummy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\AnchorAsCharacter.sxw")
- sDummy = "He heard"
-
- printlog "- Test Anchor as Character - frame behaves as a character, moves with each text insertion ahead of it"
- '/// Test Anchor as Character - frame behaves as a character, moves with each text insertion ahead of it
-
- '/// Open a test file
- '/// + This test file is designed for Anchor as Character test.
- '/// + The frame is anchored as the character.
- '/// + The frame is in the right and bottom of the first page
- hFileOpenLocally( sTestFile )
-
-
- 'check if the frame is in the first page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Check1:
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- fCloseNavigator
- Sleep 1
-
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<MOD1 Home>"
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Wait 500
- SearchAll.Click
- Sleep 1
- FindAndReplace.Cancel
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Backspace>"
- Goto Check1
- else
- fCloseNavigator
- Wait 500
- end if
-
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<End>"
-
- '/// Press Return behind the the frame.
- Call wTypeKeys "<Return>" , 8
- Wait 500
-
- '/// Set focus to the frame , the frame should be still in the first page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then Warnlog "The test frame should be in first page !"
- fCloseNavigator
- Wait 500
-
- Call hCloseDocument
-
- hFileOpenLocally( sTestFile )
-
-
- Check2:
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- fCloseNavigator
- Sleep 1
-
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<MOD1 Home>"
-
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sDummy
- Wait 500
- SearchAll.Click
- Sleep 1
- FindAndReplace.Cancel
-
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Backspace>"
- Goto Check2
- else
- fCloseNavigator
- Wait 500
- end if
-
- '/// Press Return in front of the frame
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<Return>" , 8
- Wait 500
-
- '/// Set focus to the frame , the frame should be in the second page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page !"
- fCloseNavigator
- Wait 500
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_10
-
- Dim sColumn1 as String
- Dim sColumn2 as String
- Dim sTestFile1 as String
- Dim sTestFile2 as String
-
- sColumn1 = "1"
- sColumn2 = "2"
- sTestFile1 = Convertpath (gTesttoolpath + "writer\optional\input\textframe\pageColumn1.sxw")
- sTestFile2 = Convertpath (gTesttoolpath + "writer\optional\input\textframe\pageColumn2.sxw")
-
- printlog "- Test Anchor in gathering pages&columns test."
- '/// Test Anchor in gathering pages&columns test.
-
- '/// Open a test file
- '/// + This test file is designed for Anchor in gathering pages&columns test.
- '/// + There are 2 columns in the page. And the frame is in the second column.
- hFileOpenLocally( sTestFile1,false)
-
-
- 'Press return to ensure the frame is in 2nd column
- Call wTypeKeys "<MOD1 Home>"
- Sleep 1
- Call wTypeKeys "<Return>" , 8
- Sleep 1
-
- '/// Set the column to 1
- fFormatPageWriter("TabSpalten")
- Anzahl.SetText sColumn1
- Sleep 1
- TabSpalten.OK
-
- '/// Check if the frame is in the second page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then Warnlog "The test frame should be in second page -1!"
- fCloseNavigator
- Wait 500
-
- Call hCloseDocument
-
- printlog "- Test Anchor in seperating pages&columns test"
- '/// Test Anchor in seperating pages&columns test
-
- '/// Open a test file2
- '/// + This test file is designed for Anchor in seperating
- '/// + pages&columns test.
- '/// + There are 2 pages. And the frame is in the second page.
- hFileOpenLocally( sTestFile2,false)
-
-
- 'check if the frame is in the 2nd page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<MOD1 Home>"
- Sleep 1
- Call wTypeKeys "<Return>" , 8
- Sleep 1
- end if
- fCloseNavigator
- Wait 500
-
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
-
- '/// Set the column to 2
- fFormatPageWriter("TabSpalten")
- Anzahl.SetText sColumn2
- Sleep 1
- TabSpalten.OK
-
- '/// Check if the frame is in the first page
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then Warnlog "The test frame should be in first page ! -2"
- fCloseNavigator
- Wait 500
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_11
-
- Dim sTestFile as String
- Dim sDummy1 as String
- Dim sDummy2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\pageParagraph.sxw")
- sDummy1 = "He heard"
- sDummy2 = "after he"
-
- printlog "- Test Anchor in gathering paragraph test"
- '/// Test Anchor in gathering paragraph test
-
- '/// Open a test file
- '/// + This test file is designed for Anchor in gathering paragraph test.
- '/// + There are 2 paragraph in the file .
- '/// + The 1st paragraph is in 1st page and the 2nd paragraph is in 2nd page
- '/// + Two paragraphs, a frame is anchored to the second one. When deleting the paragraph mark, the anchor of the frame has to move the the first paragraph.
- hFileOpenLocally( sTestFile )
-
-
-Check1:
- 'First check
- EditSearchAndReplace
- Kontext "FindAndReplace"
-
- SearchFor.SetText sDummy1
- Wait 500
-
- SearchAll.Click
-
- Sleep 1
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- Active.No
- endcatch
- end if
- end if
- Kontext "FindAndReplace"
- FindAndReplace.Cancel
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- fCloseNavigator
- Wait 500
- Call wTypeKeys "<Home>"
- Wait 500
- Call wTypeKeys "<BackSpace>"
- Wait 500
- Goto Check1
- end if
-
- fCloseNavigator
- Wait 500
-
-Check2:
- 'Second check
- EditSearchAndReplace
- Kontext "FindAndReplace"
-
- SearchFor.SetText sDummy2
- Wait 500
-
- SearchAll.Click
- Sleep 1
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Ok
- catch
- Active.No
- endcatch
- end if
- end if
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then
- fCloseNavigator
- Wait 500
- Call wTypeKeys "<MOD1 Home>"
- Wait 500
- Call wTypeKeys "<Return>"
- Wait 500
- Goto Check2
- end if
-
- fCloseNavigator
- Wait 500
-
- '/// Delete the 1st paragraph mark
- Call wTypeKeys "<Home>"
- Wait 500
- Call wTypeKeys "<Backspace>"
- Sleep 1
-
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Check if frame is in 1st page
- Kontext "Navigator"
- if Not Navigator.Exists then ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame should be in the first page! "
- end if
- fCloseNavigator
- Wait 500
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_12
-
- printlog "- Horizontal should not be available when frame is anchored as Character"
- '/// Horizontal should not be available when frame is anchored as Character
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// format / frame / type
- Call fFormatFrame("TabType")
-
- '/// + Check Anchor as Character
- AnchorAsCharacter.Check
- wait 500
-
- '/// + Check if Horizontal is available
- try
- Horizontal.Select 1
- Warnlog "Horizontal Should NOT be available when anchor as Character!"
- catch
- endcatch
-
- try
- HorizontalBy.SetText "1"
- Warnlog "HorizontalBy Should NOT be available when anchor as Character!"
- catch
- endcatch
-
- try
- HorizontalTo.Select 1
- Warnlog "HorizontalTo Should NOT be available when anchor as Character!"
- catch
- endcatch
-
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_13
-
- Dim sHorizontalBy as String
- Dim iHorizontalLeft as Integer
- Dim iHorizontalRight as Integer
- Dim iHorizontalCenter as Integer
- Dim iHorizontalFromLeft as Integer
-
- sHorizontalBy = "1"+ gSeperator + "00" + gMeasurementUnit
-
- iHorizontalLeft = 1
- iHorizontalRight = 2
- iHorizontalCenter = 3
- iHorizontalFromLeft = 4
-
- printlog "Test Horizontal"
- '/// Test Horizontal
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// format / frame / type
- Call fFormatFrame("TabType")
- '/// + Select Horizontal as Left
- printlog "- Horizontal as Left"
-
- Horizontal.Select iHorizontalLeft
-
- try
- HorizontalBy.SetText sHorizontalBy
- Warnlog "HorizontalBy Should NOT be available !"
- catch
- endcatch
-
- HorizontalTo.Select 1
- wait 500
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Horizontal.GetSelIndex <> iHorizontalLeft then Warnlog "Horizontal option is not correct !"
- if HorizontalTo.GetSelIndex <> 1 then Warnlog "HorizontalTo option is not correct !"
- TabType.Cancel
-
- '/// + Select Horizontal as Right
- printlog "- Horizontal as Right"
-
- Call fFormatFrame("TabType")
- Horizontal.Select iHorizontalRight
-
- try
- HorizontalBy.SetText sHorizontalBy
- Warnlog "HorizontalBy Should NOT be available !"
- catch
- endcatch
-
- HorizontalTo.Select 2
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Horizontal.GetSelIndex <> iHorizontalRight then Warnlog "Horizontal option is not correct !"
- if HorizontalTo.GetSelIndex <> 2 then Warnlog "HorizontalTo option is not correct !"
- TabType.Cancel
-
- Call fFormatFrame("TabType")
- '/// + Select Horizontal as Center
- printlog "- Horizontal as Center"
-
- Horizontal.Select iHorizontalCenter
-
- try
- HorizontalBy.SetText sHorizontalBy
- Warnlog "HorizontalBy Should NOT be available !"
- catch
- endcatch
-
- HorizontalTo.Select 3
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Horizontal.GetSelIndex <> iHorizontalCenter then Warnlog "Horizontal option is not correct !"
- if HorizontalTo.GetSelIndex <> 3 then Warnlog "HorizontalTo option is not correct !"
- TabType.Cancel
-
- Call fFormatFrame("TabType")
- '/// + Select Horizontal as From left
- printlog "- Horizontal as From left "
-
- Horizontal.Select iHorizontalFromLeft
-
- try
- HorizontalBy.SetText sHorizontalBy
- catch
- Warnlog "HorizontalBy Should be available !"
- endcatch
-
- HorizontalTo.Select 3
- wait 500
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Horizontal.GetSelIndex <> iHorizontalFromLeft then Warnlog "Horizontal option is not correct !"
- if HorizontalBy.GetText <> sHorizontalBy then Warnlog "HorizontalBy option is not correct !"
- if HorizontalTo.GetSelIndex <> 3 then Warnlog "HorizontalTo option is not correct !"
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_14
-
- Dim sVerticalBy as String
- Dim iVerticalTop as Integer
- Dim iVerticalBottom as Integer
- Dim iVerticalCenter as Integer
- Dim iVerticalFromTop as Integer
-
- sVerticalBy = "1"+ gSeperator + "00" + gMeasurementUnit
-
- iVerticalTop = 1
- iVerticalBottom = 2
- iVerticalCenter = 3
- iVerticalFromTop = 4
-
- printlog "Test Vertical"
- '/// Test Vertical
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// format / frame / type
- Call fFormatFrame("TabType")
- '/// + Select Vertical as Top
- printlog "- Vertical as Top"
-
- Vertical.Select iVerticalTop
-
- try
- VerticalBy.SetText sVerticalBy
- Warnlog "VerticalBy Should NOT be available !"
- catch
- endcatch
-
- VerticalTo.Select 1
- wait 500
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Vertical.GetSelIndex <> iVerticalTop then Warnlog "Vertical option is not correct !"
- if VerticalTo.GetSelIndex <> 1 then Warnlog "VerticalTo option is not correct !"
- TabType.Cancel
-
- '/// + Select Vertical as Right
- printlog "- Vertical as Right"
-
- Call fFormatFrame("TabType")
- Vertical.Select iVerticalBottom
-
- try
- VerticalBy.SetText sVerticalBy
- Warnlog "VerticalBy Should NOT be available !"
- catch
- endcatch
-
- VerticalTo.Select 2
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Vertical.GetSelIndex <> iVerticalBottom then Warnlog "Vertical option is not correct !"
- if VerticalTo.GetSelIndex <> 2 then Warnlog "VerticalTo option is not correct !"
- TabType.Cancel
-
- Call fFormatFrame("TabType")
- '/// + Select Vertical as Center
- printlog "- Vertical as Center"
-
- Vertical.Select iVerticalCenter
-
- try
- VerticalBy.SetText sVerticalBy
- Warnlog "VerticalBy Should NOT be available !"
- catch
- endcatch
-
- VerticalTo.Select 1
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Vertical.GetSelIndex <> iVerticalCenter then Warnlog "Vertical option is not correct !"
- if VerticalTo.GetSelIndex <> 1 then Warnlog "VerticalTo option is not correct !"
- TabType.Cancel
-
- Call fFormatFrame("TabType")
- '/// + Select Vertical as From top
- printlog "- Vertical as From top"
-
- Vertical.Select iVerticalFromTop
-
- try
- VerticalBy.SetText sVerticalBy
- catch
- Warnlog "VerticalBy Should be available !"
- endcatch
-
- VerticalTo.Select 2
- wait 500
- TabType.OK
-
- Call fFormatFrame("TabType")
- if Vertical.GetSelIndex <> iVerticalFromTop then Warnlog "Vertical option is not correct !"
- if VerticalBy.GetText <> sVerticalBy then Warnlog "VerticalBy option is not correct !"
- if VerticalTo.GetSelIndex <> 2 then Warnlog "VerticalTo option is not correct !"
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_15
-
- Dim sOriginalName as String
- Dim sNewName as String
-
- sOriginalName = "TEST1"
- sNewName = "TEST2"
-
- printlog "- Frame name can be actualized in Navigator - solution 1"
- '/// Frame name can be actualized in Navigator - solution 1
-
- Call hNewDocument
-
- '/// insert a frame and name as "TEST1"
- Call wInsertFrame
-
- Call fFormatFrame("TabZusaetze")
- ObjektName.SetText sOriginalName
- TabZusaetze.OK
-
- '/// Open Navigator,
- Call fStartupNavigator("TextFrame" , 1)
- Auswahlliste.TypeKeys "<Down>"
- Auswahlliste.OpenContextMenu
-
- '/// + ContextMenu TextFrame / Edit,
- Call hMenuSelectNr(4)
- Sleep 2
- Call hMenuSelectNr(1)
- Sleep 1
- Kontext "TabZusaetze"
- '/// + Change the frame name in the opened dialogue ,
- try
- ObjektName.SetText sNewName
- TabZusaetze.OK
- catch
- Warnlog "format/grame dialogue isn't opened correctly!"
- Call fCloseNavigator
- goto endsub
- endcatch
-
- '/// + close the navigator
- Call fCloseNavigator
-
- Call wTypeKeys ( "<Shift F4>" )
-
- '/// Check if the name is changed correctly
- Call fFormatFrame("TabZusaetze")
- if ObjektName.GetText <> sNewName then Warnlog "frame name isn't renamed correctly!"
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
-
-testcase tTextframes_16
-
- Dim sOriginalName as String
- Dim sNewName as String
-
- sOriginalName = "TEST1"
- sNewName = "TEST2"
-
- printlog "- Frame name can be actualized in Navigator - solution 2"
- '/// Frame name can be actualized in Navigator - solution 2
-
- Call hNewDocument
-
- '/// insert a frame and name as "TEST1"
- Call wInsertFrame
-
- Call fFormatFrame("TabZusaetze")
- ObjektName.SetText sOriginalName
- TabZusaetze.OK
-
- '/// + Open Navigator ,
- Call fStartupNavigator("TextFrame" , 1)
-
- Auswahlliste.TypeKeys "<Down>"
- Auswahlliste.OpenContextMenu
-
- '/// + ContextMenu TextFrame / Rename
- Call hMenuSelectNr(4)
- Sleep 2
- Call hMenuSelectNr(3)
- Sleep 1
-
- Kontext "ObjekteUmbenennen"
-
- '/// + Change the frame name in the opened dialogue ,
- try
- ObjektName.SetText sNewName
- ObjekteUmbenennen.OK
- catch
- Warnlog "Frame rename dialogue isn't opened correctly!"
- Call fCloseNavigator
- goto endsub
- endcatch
-
- '/// + close navigaotr
- Call fCloseNavigator
-
- Call wTypeKeys ( "<Shift F4>" )
-
- '/// Check if the name is changed correctly
- Call fFormatFrame("TabZusaetze")
- if ObjektName.GetText <> sNewName then Warnlog "frame name isn't renamed correctly!"
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
diff --git a/testautomation/writer/optional/includes/textframes/w_textframes2.inc b/testautomation/writer/optional/includes/textframes/w_textframes2.inc
deleted file mode 100644
index c4cc19006f36..000000000000
--- a/testautomation/writer/optional/includes/textframes/w_textframes2.inc
+++ /dev/null
@@ -1,1159 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of textframe - 2
-'*
-'\***********************************************************************
-
-sub w_textframes2
-
- Call tTextframes_17 'Test protect contents - text insertion in frame must be suppressed
- Call tTextframes_18 'Test protect position - moving frame with mouse/keyboard suppressed
- Call tTextframes_19 'Test if frame can move when protect content is checked
- Call tTextframes_20 'Test frame without wrap
- Call tTextframes_21 'Test frame with wrap ( through)
- Call tTextframes_22 'Test wrap - before/after - 1
- Call tTextframes_23 'Test wrap - before/after - 2
- Call tTextframes_24 'Set more than 1 columns for the frame
- Call tTextframes_25 'Test columns' width
- Call tTextframes_26 'Test columns' spacing
- Call tTextframes_27 'Test columns' seperator line
- Call tTextframes_28 'Test overlap with different wrapping types
- Call tTextframes_29 'Test 'synchronize' distances for border (Check Synchronize)
- Call tTextframes_30 'Test 'synchronize' distances for border (UnCheck Synchronize)
- Call tTextframes_31 'Frame should be non-editable in read-only documents
- Call tTextframes_32 'Test input text into frame in read-only document when checking "Editable in read-only document"
-
-end sub
-
-'---------------------------------------------------
-
-testcase tTextframes_17
-
- Dim sTestText
-
- sTestText = "T"
-
- printlog "- Test protect contents - text insertion in frame must be suppressed"
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 60,60)
-
- '/// Format / Frame / Options , check contents
- Call fFormatFrame("TabZusaetze")
- InhaltSchuetzen.Check
- TabZusaetze.OK
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- Call gMouseClick(40,40)
- Wait 500
-
- '/// check if contents can be inserted into frame
- Call wTypeKeys sTestText
-
- Kontext "Active"
- if Active.Exists then
- Active.Ok
- else
- Warnlog "The contents should not be inserted into frame!"
- end if
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
-
-testcase tTextframes_18
-
- Dim sTestText as String
-
- sTestText = "T"
-
- printlog "- Test protect position - moving frame with mouse/keyboard suppressed"
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 70,70)
-
- '/// Format / Frame / Options , check contents
- Call fFormatFrame("TabZusaetze")
- InhaltSchuetzen.Check
- PositionSchuetzen.Check
- TabZusaetze.OK
-
- '/// Move the frame to right (Right key 4 times)
- Call wTypeKeys "<Right>" , 4
- Wait 500
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- Call gMouseClick(40,40)
- Sleep 2
-
- '/// check if the frame is moved
- Call wTypeKeys sTestText
-
- Kontext "Active"
- if Active.Exists then
- Active.Ok
- else
- Warnlog "The contents should NOT be inserted into the frame!"
- end if
-
- Call wTypeKeys "<Shift Left>"
- try
- EditCopy
- Wait 500
- if GetClipboardText = sTestText then Warnlog "Something wrong in the test !"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
-
-testcase tTextframes_19
-
- Dim sTestText
-
- sTestText = "T"
-
- printlog "- Test if frame can move when protect content is checked"
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 70,70)
-
- '/// Format / Frame / Options , check contents
- Call fFormatFrame("TabZusaetze")
- InhaltSchuetzen.Check
- TabZusaetze.OK
-
- '/// Move the frame to right (Right key 4 times)
- Call wTypeKeys "<Right>" , 4
- Wait 500
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- Call gMouseClick(15,15)
- Wait 500
-
- '/// check if the frame is moved
- Call wTypeKeys sTestText
-
- Kontext "Active"
- if Active.Exists then
- Warnlog "The frame should move by keyboard!"
- Active.Ok
- end if
-
- Call wTypeKeys "<Shift Left>"
- try
- EditCopy
- Wait 500
- if GetClipboardText <> sTestText then Warnlog "Something wrong in the test . Clipboard:" +GetClipboardText
- catch
- Warnlog "The frame should move by keyboard!"
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'---------------------------------------------------
-
-testcase tTextframes_20
-
- Dim sTestFile as String
- Dim sTestText as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\wrap.sxw")
- sTestText = "Test"
-
- printlog "- Test frame without wrap"
-
- '/// Open a test file
- '/// + This test file is designed for without wrap test
- '/// + There are 1 page in the file.
- '/// + The frame is ocupied in the whole 1st page and wraped as Through
- '/// + Some text are behind the frame
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format / Frame / Wrap , check None in setting area
- Call fFormatFrame("TabUmlauf")
- Kein.Check
- wait 500
- TabUmlauf.OK
-
- '/// Check if frame is in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
- Call fCloseNavigator
-
- '/// Check if test text are in 2nd page
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<Home><Shift End>"
-
- try
- EditCopy
- Wait 500
- if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
- catch
- Warnlog "EditCopy can't be executed !"
- endcatch
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then
- Warnlog "The test text isn't in the second page!"
- end if
-
- Call fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_21
-
- Dim sTestFile as String
- Dim sTestText as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\through.sxw")
- sTestText = "Test"
-
- printlog "- Test frame with wrap "
-
- '/// Open a test file
- '/// + This test file is designed for with through wrap test
- '/// + There are 2 page in the file.
- '/// + The frame is ocupied in the whole 1st page and wraped as None
- '/// + Some text are in the 2nd page
-
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format / Frame / Wrap , check through in setting area
- Call fFormatFrame("TabUmlauf")
- Durchlauf.Check
- wait 500
- TabUmlauf.OK
-
- '/// Check if frame are in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
- Call fCloseNavigator
-
- '/// Check if test text are in 1st page
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<Home><Shift End>"
-
- try
- EditCopy
- Wait 500
- if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
- catch
- Warnlog "EditCopy can't be executed !"
- endcatch
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test text isn't in the first page!"
- end if
-
- Call fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_22
-
- Dim sTestFile as String
- Dim sTestText as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\before.sxw")
- sTestText = "Test"
-
- printlog "- Test wrap - before/after - 1"
-
- '/// Open a test file
- '/// + This test file is designed for with before/after wrap test
- '/// + There are 2 page in the file.
- '/// + The frame is ocupied in the whole 1st page and wraped as None
- '/// + there are some space in the left of the frame.
- '/// + Some text are in the 2nd page
-
- hFileOpenLocally( sTestFile )
-
-
- printlog "- Test wrap - before"
-
- '/// Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format / Frame / Wrap , check before in setting area
- Call fFormatFrame("TabUmlauf")
- Links.Check
- wait 500
- TabUmlauf.OK
-
- '/// Check if frame are in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
- Call fCloseNavigator
-
- '/// Check if test text are in 1st page
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<Home><Shift End>"
-
- try
- EditCopy
- Wait 500
- if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
- catch
- Warnlog "EditCopy can't be executed !"
- endcatch
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test text isn't in the first page!"
- end if
-
- Call fCloseNavigator
-
- printlog "- Test wrap - after"
-
- 'Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format / Frame / Wrap , check after in setting area
- Call fFormatFrame("TabUmlauf")
- Rechts.Check
- wait 500
- TabUmlauf.OK
-
- '/// Check if frame are in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
- Call fCloseNavigator
-
- '/// Check if test text are in 2nd page
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<Home><Shift End>"
-
- try
- EditCopy
- Wait 500
- if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
- catch
- Warnlog "EditCopy can't be executed !"
- endcatch
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then
- Warnlog "The test text isn't in the first page!"
- end if
-
- Call fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_23
-
- Dim sTestFile as String
- Dim sTestText as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\after.sxw")
- sTestText = "Test"
-
- printlog "- Test wrap - before/after - 2"
-
- '/// Open a test file
- '/// + This test file is designed for with before/after wrap test
- '/// + There are 2 page in the file.
- '/// + The frame is ocupied in the whole 1st page and wraped as None
- '/// + there are some space in the right of the frame.
- '/// + Some text are in the 2nd page
-
- hFileOpenLocally( sTestFile )
-
-
- printlog "- Test wrap - before"
-
- '/// Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format / Frame / Wrap , check before in setting area
- Call fFormatFrame("TabUmlauf")
- Links.Check
- wait 500
- TabUmlauf.OK
-
- '/// Check if frame are in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
- Call fCloseNavigator
-
- '/// Check if test text are in 1st page
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<Home><Shift End>"
-
- try
- EditCopy
- Wait 500
- if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
- catch
- Warnlog "EditCopy can't be executed !"
- endcatch
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then
- Warnlog "The test text isn't in the first page!"
- end if
-
- Call fCloseNavigator
-
- printlog "- Test wrap - after"
-
- '/// Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format / Frame / Wrap , check after in setting area
- Call fFormatFrame("TabUmlauf")
- Rechts.Check
- wait 500
- TabUmlauf.OK
-
- '/// Check if frame are in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
- Call fCloseNavigator
-
- '/// Check if test text are in 2nd page
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
- Call wTypeKeys "<Home><Shift End>"
-
- try
- EditCopy
- Wait 500
- if GetClipboardText <> sTestText then Warnlog "Test text isn't right , GetClipboardText is " +GetClipboardText
- catch
- Warnlog "EditCopy can't be executed !"
- endcatch
-
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test text isn't in the first page!"
- end if
-
- Call fCloseNavigator
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_24
-
- Dim sColumn as String
-
- sColumn = "3"
-
- printlog "- Set more than 1 columns for the frame"
-
- Call hNewDocument
-
- '/// Insert a frame
- Call wInsertFrame
-
- '/// Format / Frame / columns , set columns to 3 , close the dialogue
- Call fFormatFrame("TabSpalten")
- Anzahl.SetText sColumn
- wait 500
- TabSpalten.OK
-
- '/// Check if the column is set correctly
- Call fFormatFrame("TabSpalten")
- if Anzahl.GetText <> sColumn then Warnlog "the column isn't set correctly ! The column you get is:Anzahl.GetText"
- TabSpalten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_25
-
- Dim sWidth as String
- Dim sSpacingToContent as String
- Dim sColumn as String
- Dim sWidthColumn1 as String
- Dim sWidthColumn2 as String
- Dim sWidthColumn3 as String
-
- sWidth = "6"+ gSeperator + "00" + gMeasurementUnit
- sSpacingToContent = "0"+ gSeperator + "00"
-
- sColumn = "3"
-
- sWidthColumn1 = "1"+ gSeperator + "00" + gMeasurementUnit
- sWidthColumn2 = "2"+ gSeperator + "00" + gMeasurementUnit
- sWidthColumn3 = "3"+ gSeperator + "00" + gMeasurementUnit
-
- printlog "- Test columns' width"
-
- Call hNewDocument
-
- '/// Insert a frame
- Call wInsertFrame
-
- 'Set frame's width
- Call fFormatFrame("TabType")
- Width.SetText sWidth
- wait 500
- TabType.OK
-
- 'Set frame's Spacing to Content
- Call fFormatFrame("TabUmrandung")
- Synchronisieren.Check
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- Links.SetText sSpacingToContent
- Rechts.SetText sSpacingToContent
- Oben.SetText sSpacingToContent
- Unten.SetText sSpacingToContent
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- TabUmrandung.OK
-
- '/// Format / Frame / columns , set columns to 3
- Call fFormatFrame("TabSpalten")
- Anzahl.SetText sColumn
- wait 500
- TabSpalten.OK
-
- '/// + Set 3 columns to different width
- Call fFormatFrame("TabSpalten")
- AutomBreite.Uncheck
- Sleep 1
- TabSpalten.TypeKeys "<SHIFT TAB>"
- Spaltenbreite1.SetText sWidthColumn1
- wait 500
- TabSpalten.TypeKeys "<SHIFT TAB>"
- Spaltenbreite2.SetText sWidthColumn2
- wait 500
- TabSpalten.TypeKeys "<SHIFT TAB>"
- Spaltenbreite3.SetText sWidthColumn3
- wait 500
- TabSpalten.TypeKeys "<SHIFT TAB>"
- TabSpalten.OK
-
- '/// Check if the columns' width is set correctly
- Call fFormatFrame("TabSpalten")
- if Spaltenbreite1.GetText <> sWidthColumn1 then Warnlog "the column1's width isn't set correctly !"
- if Spaltenbreite2.GetText <> sWidthColumn2 then Warnlog "the column2's width isn't set correctly !"
- if Spaltenbreite3.GetText <> sWidthColumn3 then Warnlog "the column3's width isn't set correctly !"
- TabSpalten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_26
-
- Dim sWidth as String
- Dim sSpacingToContent as String
- Dim sColumn as String
- Dim sWidthColumn1 as String
- Dim sWidthColumn2 as String
- Dim sWidthColumn3 as String
- Dim sSpacing1 as String
- Dim sSpacing2 as String
- Dim sNewWidthColumn1 as String
- Dim sNewWidthColumn2 as String
- Dim sNewWidthColumn3 as String
- Dim sNewWidthColumn4 as String
-
- sWidth = "6"+ gSeperator + "00" + gMeasurementUnit
- sSpacingToContent = "0"+ gSeperator + "00"
-
- sColumn = "3"
-
- sWidthColumn1 = "1"+ gSeperator + "00" + gMeasurementUnit
- sWidthColumn2 = "2"+ gSeperator + "00" + gMeasurementUnit
- sWidthColumn3 = "3"+ gSeperator + "00" + gMeasurementUnit
-
- sSpacing1 = "0"+ gSeperator + "10" + gMeasurementUnit
- sSpacing2 = "0"+ gSeperator + "20" + gMeasurementUnit
-
- sNewWidthColumn1 = "1"+ gSeperator + "00" + gMeasurementUnit
- sNewWidthColumn2 = "1"+ gSeperator + "90" + gMeasurementUnit
- sNewWidthColumn3 = "2"+ gSeperator + "80" + gMeasurementUnit
- sNewWidthColumn4 = "2"+ gSeperator + "81" + gMeasurementUnit
-
- printlog "- Test columns' spacing"
-
- Call hNewDocument
-
- '/// Insert a frame
- Call wInsertFrame
-
- 'Set frame's width
- Call fFormatFrame("TabType")
- Width.SetText sWidth
- wait 500
- TabType.TypeKeys "<SHIFT TAB>"
- TabType.OK
-
- 'Set frame's Spacing to Content
- Call fFormatFrame("TabUmrandung")
- Synchronisieren.Check
- wait 500
- Links.SetText sSpacingToContent
- Rechts.SetText sSpacingToContent
- Oben.SetText sSpacingToContent
- Unten.SetText sSpacingToContent
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- TabUmrandung.OK
-
- '/// Format / Frame / columns , set columns to 3
- Call fFormatFrame("TabSpalten")
- Anzahl.SetText sColumn
- wait 500
- TabSpalten.OK
-
- '/// + Set 3 columns to different width
- Call fFormatFrame("TabSpalten")
- AutomBreite.Uncheck
- Sleep 1
- TabSpalten.TypeKeys "<SHIFT TAB>"
- Spaltenbreite1.SetText sWidthColumn1
- wait 500
- TabSpalten.TypeKeys "<SHIFT TAB>"
- Spaltenbreite2.SetText sWidthColumn2
- wait 500
- TabSpalten.TypeKeys "<SHIFT TAB>"
- Spaltenbreite3.SetText sWidthColumn3
- wait 500
- TabSpalten.TypeKeys "<SHIFT TAB>"
- TabSpalten.OK
-
- '/// + Set Spacing1 and Spacing2
- Call fFormatFrame("TabSpalten")
- Abstand12.SetText sSpacing1
- Sleep 2
- Abstand23.SetText sSpacing2
- Sleep 3
- Art.Select 1
- Sleep 1
- TabSpalten.OK
- Sleep 2
-
- '/// Check if the columns' width is set correctly
- Call fFormatFrame("TabSpalten")
- if Spaltenbreite1.GetText <> sNewWidthColumn1 then Warnlog "the column1's width isn't set correctly !"
- if Spaltenbreite2.GetText <> sNewWidthColumn2 then Warnlog "the column2's width isn't set correctly !"
- if (Spaltenbreite3.GetText <> sNewWidthColumn3) then
- if (Spaltenbreite3.GetText <> sNewWidthColumn4) then
- Warnlog "the column3's width isn't set correctly ! (not" & Spaltenbreite3.GetText & " but " & sNewWidthColumn3 & ")"
- end if
- end if
- if Abstand12.GetText <> sSpacing1 then Warnlog "the 1st spacing isn't set correctly !"
- if Abstand23.GetText <> sSpacing2 then Warnlog "the 2nd spacing isn't set correctly !"
- TabSpalten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_27
-
- Dim iLine as Integer
- Dim iPosition as Integer
- Dim sHeight as String
-
- iLine = 3
- iPosition = 2
- sHeight = "50%"
-
- printlog "- Test columns' seperator line"
-
- Call hNewDocument
-
- '/// Insert a frame
- Call wInsertFrame
-
- '/// Format / Frame / columns , set columns to 4
- '/// + default : column is 1 , Line and Height and Position isn't enabled
- Call fFormatFrame("TabSpalten")
- if Anzahl.GetText <> "1" then Warnlog "the default column number is 1 , but get " +Anzahl.GetText
-
- try
- Art.Select iLine
- Warnlog "Line : should be inactived !"
- Hoehe.SetText sHeight
- Warnlog "Height : should be inactived !"
- Position.Select iPosition
- Warnlog "Position : should be inactived !"
- catch
- endcatch
-
- Anzahl.SetText "2"
- Wait 500
- TabSpalten.OK
-
- '/// Check if the columns' width is set correctly
- Call fFormatFrame("TabSpalten")
- Art.Select iLine
- Sleep 2
- Hoehe.SetText sHeight
- Sleep 2
- Position.Select iPosition
- Sleep 2
- TabSpalten.OK
-
- Call fFormatFrame("TabSpalten")
- if Art.GetSelIndex <> iLine then Warnlog "Line isn't correct!"
- Sleep 1
- if Hoehe.GetText <> sHeight then Warnlog "Height isn't correct!"
- Sleep 1
- if Position.GetSelIndex <> iPosition then Warnlog "Position isn't correct!"
- Sleep 1
- TabSpalten.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_28
-
- Dim sFrameName1 as String
- Dim sFrameName2 as String
-
- sFrameName1 = "Test1"
- sFrameName2 = "Test2"
-
- printlog "- Test overlap with different wrapping types"
-
- Call hNewDocument
-
- printlog "Insert a frame"
- Call fInsertFrame(30, 30, 60, 60)
- Sleep 2
- printlog "Naming the frame"
- Call fFormatFrame("TabZusaetze")
- ObjektName.SetText sFrameName1
- TabZusaetze.OK
-
- printlog "Set the frame's wrap"
- Call fFormatFrame("TabUmlauf")
- Kein.Check
- Sleep 1
- TabUmlauf.OK
- Sleep 2
- Call wTypeKeys "<ESCAPE>"
- Sleep 2
-
- printlog "Insert another frame"
- Call fInsertFrame(50, 50, 80, 80)
- Sleep 2
- printlog "Naming the frame"
- Call fFormatFrame("TabZusaetze")
- ObjektName.SetText sFrameName2
- TabZusaetze.OK
-
- printlog "Set the frame's wrap"
- Call fFormatFrame("TabUmlauf")
- Sleep 1
- Durchlauf.Check
- Sleep 1
- TabUmlauf.OK
-
- Call wTypeKeys "<ESCAPE>"
- Sleep 2
-
- printlog "Set focus to second frame"
- Call gMouseClick(60,60) ' Click into frame
- wait 500
- Call wTypeKeys "<ESCAPE>" ' Selects frame holding the cursor
- wait 500
-
- printlog "Check second frame's name"
- Call fFormatFrame("TabZusaetze")
- if ObjektName.GetText <> sFrameName2 then Warnlog "The 2nd frame's name is wrong ! Get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- printlog "Check second frame's wrap status"
- Call fFormatFrame("TabUmlauf")
- if Durchlauf.IsChecked <> TRUE then Warnlog "The 2nd frame's wrap status is wrong ! "
- TabUmlauf.Cancel
-
- printlog "Set focus to first frame"
- Call wTypeKeys "<TAB>"
- Sleep 2
-
- printlog "Check first frame's name"
- Call fFormatFrame("TabZusaetze")
- if ObjektName.GetText <> sFrameName1 then Warnlog "The 1st frame's name is wrong ! Get " +ObjektName.GetText
- TabZusaetze.Cancel
-
- printlog "Check first frame's wrap status"
- Call fFormatFrame("TabUmlauf")
- if Kein.IsChecked <> TRUE then Warnlog "The 1st frame's wrap status is wrong ! "
- TabUmlauf.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_29
-
- Dim sLeft1 as String
- Dim sRight1 as String
- Dim sTop1 as String
- Dim sBottom1 as String
-
- sLeft1 = "0"+ gSeperator + "1"
- sRight1 = "0"+ gSeperator + "2"
- sTop1 = "0"+ gSeperator + "3"
- sBottom1 = "0"+ gSeperator + "4"
-
- printlog "- Test 'synchronize' distances for border (Check Synchronize)"
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// Format / Frame / Borders , check Synchronize ,
- '/// + then set spacing to contents
- '/// + to differect number (left, right, top, bottom)
- Call fFormatFrame("TabUmrandung")
- Synchronisieren.Check
- wait 500
- Links.SetText sLeft1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- Rechts.SetText sRight1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- Oben.SetText sTop1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- Unten.SetText sBottom1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- TabUmrandung.OK
-
- '/// Check if the spacing to contents is right
- Call fFormatFrame("TabUmrandung")
- if Synchronisieren.IsChecked <> TRUE then Warnlog "checkbox synchronize should be checked!"
- if Instr(Links.Gettext, sBottom1) = false then Warnlog "spacing to contents (left) isn't right!"
- if Instr(Rechts.GetText, sBottom1) = false then Warnlog "spacing to contents (right) isn't right!"
- if Instr(Oben.GetText, sBottom1) = false then Warnlog "spacing to contents (top) isn't right!"
- if Instr(Unten.GetText, sBottom1) = false then Warnlog "spacing to contents (bottom) isn't right!"
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_30
-
- Dim sLeft1 as String
- Dim sRight1 as String
- Dim sTop1 as String
- Dim sBottom1 as String
-
- sLeft1 = "0"+ gSeperator + "1"
- sRight1 = "0"+ gSeperator + "2"
- sTop1 = "0"+ gSeperator + "3"
- sBottom1 = "0"+ gSeperator + "4"
-
- printlog "- Test 'synchronize' distances for border (UnCheck Synchronize)"
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// Format / Frame / Borders , Uncheck Synchronize ,
- '/// + then set spacing to contents
- '/// + to differect number (left, right, top, bottom)
- Call fFormatFrame("TabUmrandung")
- Synchronisieren.UnCheck
- wait 500
- Links.SetText sLeft1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- Rechts.SetText sRight1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- Oben.SetText sTop1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- Unten.SetText sBottom1
- wait 500
- TabUmrandung.TypeKeys "<SHIFT TAB>"
- TabUmrandung.OK
-
- '/// Check if the spacing to contents is right
- Call fFormatFrame("TabUmrandung")
- if Synchronisieren.IsChecked = TRUE then Warnlog "checkbox synchronize should be checked!"
- if Instr(Links.Gettext, sLeft1) = false then Warnlog "spacing to contents (left) isn't right!" '<> sLeft1
- if Instr(Rechts.GetText, sRight1) = false then Warnlog "spacing to contents (right) isn't right!"
- if Instr(Oben.GetText, sTop1) = false then Warnlog "spacing to contents (top) isn't right!"
- if Instr(Unten.GetText, sBottom1) = false then Warnlog "spacing to contents (bottom) isn't right!"
- TabUmrandung.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_31
-
- Dim sTestFile as String
-
- sTestFile = ConvertPath (gOfficePath + "user\work\testFileReadOnly.odt" )
-
- if Dir(sTestFile) <> "" then
- setattr sTestFile , 0
- Sleep 2
- kill sTestFile
- end if
-
- printlog "- Frame should be non-editable in read-only documents"
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// Save the file and set the file's property to Read-only
- Call hFileSaveAs (sTestFile ,true)
-
- Call hCloseDocument
- Sleep 1
-
- setattr sTestFile , 1
- Sleep 2
-
- '/// Check if the frame is non-editable
- hFileOpen( sTestFile )
-
- Call wTypeKeys ( "<Shift F4>" )
-
- try
- FormatFrame
- Kontext
- Active.SetPage TabType
- Kontext "TabType"
- TabType.Cancel
- Warnlog "The frame should be non-editable!"
- catch
- endcatch
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_32
-
- Dim sTestFile as String
- Dim sText as String
-
- sText = "Test"
- sTestFile = ConvertPath (gOfficePath + "user\work\testFileReadOnly.odt" )
-
- if Dir(sTestFile) <> "" then
- setattr sTestFile , 0
- Sleep 2
- kill sTestFile
- end if
-
- printlog "- Test input text into frame in read-only document when checking 'Editable in read-only document'"
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 70,70)
-
- '/// Format / Frame / Options , check "Editable in read-only document"
- Call fFormatFrame("TabZusaetze")
- Editierbar.Check
- wait 500
- TabZusaetze.OK
- Call wTypeKeys "<ESCAPE>"
-
- '/// Save the file and set the file's property to Read-only
- Call hFileSaveAs (sTestFile ,true)
-
- Call hCloseDocument
-
- setattr sTestFile , 1
- Sleep 2
-
- '/// Check if the text can be inputed into frame
- hFileOpen( sTestFile )
-
- Call wTypeKeys "<SHIFT F4><RETURN>"
- Wait 500
-
- try
- Call wTypeKeys sText
- Sleep 1
- catch
- Warnlog "Can't input text into frame !"
- endcatch
-
- Call wTypeKeys "<Shift Home>"
- Sleep 1
-
- EditCopy
- Sleep 1
-
- if GetClipboardText <> sText then Warnlog "The inputed text isn't right!"
-
- Call hCloseDocument
-
-endcase
-
-' ------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/textframes/w_textframes3.inc b/testautomation/writer/optional/includes/textframes/w_textframes3.inc
deleted file mode 100644
index d9db6fa32253..000000000000
--- a/testautomation/writer/optional/includes/textframes/w_textframes3.inc
+++ /dev/null
@@ -1,1070 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of textframe - 3
-'*
-'\***********************************************************************
-
-sub w_textframes3
-
- Call tTextframes_33 'Test attribute 'AutoSize' in linked frames
- Call tTextframes_34 'Insert text into original frame must flow into target frame, when first one is full
- Call tTextframes_35 'Show link - under Format.Frame.Options (previous link, next link)
- Call tTextframes_36 'Test link frames which are placed on different pages
- Call tTextframes_37 'Test link frames which are placed on header
- Call tTextframes_38 'Test link frames which are placed on footer
- Call tTextframes_39 'Test drag&drop with a linked frame - keyboard
- Call tTextframes_40 'Test Undo on drag&drop of frames (keyboard)
- Call tTextframes_41 'Test Undo on removing the link
- Call tTextframes_42 'Link frame in header with frame in bodytext should be forbidden
- Call tTextframes_43 'Link frame in footer with frame in bodytext should be forbidden
- Call tTextframes_44 'Link frame when target frame is not empty should be forbidden
- Call tTextframes_45 'Recursed links should be forbidden
- Call tTextframes_46 'Frames which couldn't be linked with the current one is part of another 'chain'
- Call tTextframes_47 'Frames couldn't be linked with the current one is in protected section
- Call tTextframes_48 'Frames could be linked with the current one is set to "editable in protected documents" even it is in protected section
-
-end sub
-
-'---------------------------------------------------
-
-testcase tTextframes_33
-
- printlog "- Test attribute 'AutoSize' in linked frames"
- '/// Test attribute 'AutoSize' in linked frames
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 50,50)
-
- Call wTypeKeys "<ESCAPE>"
- WaitSlot (5)
-
- '/// insert another frame
- Call fInsertFrame(50,50 , 80,80)
-
- printlog "Move the second frame away from the first one."
- Call wTypeKeys "<RIGHT>",10
-
- '/// Set focus to first frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Active frame bar
- Call hToolbarSelect("FRAME", true )
- Wait 500
-
- '/// Click link frame button
- Verketten.Click
- Wait 500
-
- '/// Target the second frame
- Call gMouseClick(60,70)
- Wait 500
-
- '/// Format/Frame / Type ,
- '/// + 'AutoSize' should be turned off in 1st frame (origination)
- Call fFormatFrame("TabType")
- try
- AutoHoehe.Check
- Warnlog "'AutoSize' should be turned off!"
- catch
- endcatch
- TabType.Cancel
-
- '/// Set focus to second frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// + 'AutoSize' should be actived in 2nd frame (target)
- Call fFormatFrame("TabType")
- try
- AutoHoehe.Check
- catch
- Warnlog "'AutoSize' should be actived!"
- endcatch
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_34
-
- Dim sText as String
- Dim sOriginalName as String
- Dim sTargetName as String
-
- sOriginalName = "TEST1"
- sTargetName = "TEST2"
-
- printlog "- Test attribute 'AutoSize' in linked frames"
- '/// Test attribute 'AutoSize' in linked frames
-
- Call hNewDocument
-
- '/// insert a frame , set frame name
- Call fInsertFrame(30,30 , 50,50)
-
- Call fFormatFrame("TabZusaetze")
- ObjektName.SetText sOriginalName
- TabZusaetze.OK
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame , set frame name
- Call fInsertFrame(50,50 , 80,80)
-
- printlog "Move second frame away from the first frame."
- Call wTypeKeys "<RIGHT>", 12
-
- printlog "Name second object."
- Call fFormatFrame("TabZusaetze")
- ObjektName.SetText sTargetName
- TabZusaetze.OK
-
- '/// Set focus to first frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Active frame bar
- Call hToolbarSelect("FRAME", true )
- Wait 500
-
- '/// Click link frame button
- Verketten.Click
- Wait 500
-
- '/// Target the second frame
- Call gMouseClick(60,70)
- Wait 500
-
- Call wTypeKeys "<RETURN>"
- Wait 500
-
- Call wBlindtextEinfuegen
- Wait 500
-
- '/// set focus to the frame which the focus is in
- Call wTypeKeys "<ESCAPE>"
- Sleep 1
-
- '/// Check if the link is showed correctly (Format.Frame.Options)
- Call fFormatFrame("TabZusaetze")
- if ObjektName.GetText <> sTargetName then Warnlog "The focus should be in 2nd frame!"
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_35
-
- Dim iNoLink as Integer
- Dim iLink as Integer
-
- iNoLink = 1
- iLink = 2
-
- printlog "- Show link - under Format.Frame.Options (previous link, next link)"
- '/// Show link - under Format.Frame.Options (previous link, next link)
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 50,50)
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame
- Call fInsertFrame(50,50 , 80,80)
-
- printlog "Move the second frame away from the first one."
- Call wTypeKeys "<RIGHT>",10
-
- '/// Set focus to first frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Active frame bar
- Call hToolbarSelect("FRAME", true )
- Wait 500
-
- '/// Click link frame button
- Verketten.Click
- Wait 500
-
- '/// Target the second frame
- Call gMouseClick(60,70)
- Wait 500
-
- '/// Check if the link is showed correctly (Format.Frame.Options)
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iNoLink then Warnlog "1st frame: privious link should be none"
- if NextLink.GetSelIndex <> iLink then Warnlog "1st frame: next link isn't right!"
- TabZusaetze.Cancel
-
- '/// Set focus to second frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Check if the link is showed correctly (Format.Frame.Options)
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iLink then Warnlog "2nd frame: privious link isn't right!"
- if NextLink.GetSelIndex <> iNoLink then Warnlog "2nd frame: next link should be none"
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_36
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim iNoLink as Integer
- Dim iLink as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\twopages.sxw")
- iNoLink = 1
- iLink = 2
-
- printlog "- Test link frames which are placed on different pages"
- '/// Test link frames which are placed on different pages
-
- Call hNewDocument
-
- '/// Open a test file
- '/// + This test file is designed for testing link
- '/// + frames which are placed on different pages
- '/// + There are 2 pages in the file and 1 frame/page
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to first frame
- Call wTypeKeys ( "<Shift F4>" )
- Wait 500
-
- 'Check if frame is in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
- Call fCloseNavigator
-
- 'Set focus to second frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- 'Check if frame is in 2nd page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then
- Warnlog "The test frame isn't in the second page!"
- end if
- Call fCloseNavigator
-
- '/// Set focus to first frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Set link in Format/Frame/Options
- Call fFormatFrame("TabZusaetze")
- try
- NextLink.Select iLink
- Sleep 1
- catch
- Warnlog "Can't link 2 frames which are placed on different pages!"
- endcatch
- TabZusaetze.OK
-
- '/// Check if the link is correctly
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iNoLink then Warnlog "1st frame: privious link should be none"
- if NextLink.GetSelIndex <> iLink then Warnlog "1st frame: next link isn't right!"
- TabZusaetze.Cancel
-
- '/// Set focus to second frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Check if the link is correctly
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iLink then Warnlog "2nd frame: privious link isn't right!"
- if NextLink.GetSelIndex <> iNoLink then Warnlog "2nd frame: next link should be none"
- TabZusaetze.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_37
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim iNoLink as String
- Dim iLink as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\Header.sxw")
- iNoLink = 1
- iLink = 2
-
- printlog "- Test link frames which are placed on header"
- '/// Test link frames which are placed on header
-
- Call hNewDocument
-
- '/// Open a test file
- '/// + This test file is designed for testing link
- '/// + frames which are placed on header
- '/// + There are 2 frames in the header
-
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to first frame
- Call wTypeKeys ( "<Shift F4>" )
-
- Wait 500
-
- '/// Set link in Format.Frame.Options
- Call fFormatFrame("TabZusaetze")
- try
- NextLink.Select iLink
- Sleep 1
- catch
- Warnlog "Can't link 2 frames which are in the header"
- endcatch
- TabZusaetze.OK
-
- '/// Check if the link is correctly
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iNoLink then Warnlog "1st frame: privious link should be none"
- if NextLink.GetSelIndex <> iLink then Warnlog "1st frame: next link isn't right!"
- TabZusaetze.Cancel
-
- '/// Set focus to second frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Check if the link is correctly
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iLink then Warnlog "2nd frame: privious link isn't right!"
- if NextLink.GetSelIndex <> iNoLink then Warnlog "2nd frame: next link should be none"
- TabZusaetze.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_38
-
- Dim sTestFile as String
- Dim sTestText as String
- Dim iNoLink as String
- Dim iLink as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\Footer.sxw")
- iNoLink = 1
- iLink = 2
-
- printlog "- Test link frames which are placed on footer"
- '/// Test link frames which are placed on footer
-
- Call hNewDocument
-
- '/// Open a test file
- '/// + This test file is designed for testing link
- '/// + frames which are placed on header
- '/// + There are 2 frames in the header
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to first frame
- Call wTypeKeys ( "<Shift F4>" )
- Wait 500
-
- '/// Set link in Format.Frame.Options
- Call fFormatFrame("TabZusaetze")
- try
- NextLink.Select iLink
- Sleep 1
- catch
- Warnlog "Can't link 2 frames which are in the header"
- endcatch
- TabZusaetze.OK
-
- '/// Check if the link is correctly
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iNoLink then Warnlog "1st frame: privious link should be none"
- if NextLink.GetSelIndex <> iLink then Warnlog "1st frame: next link isn't right!"
- TabZusaetze.Cancel
-
- '/// Set focus to second frame
- Call wTypeKeys "<TAB>"
- Wait 500
-
- '/// Check if the link is correctly
- Call fFormatFrame("TabZusaetze")
- if PreviousLink.GetSelIndex <> iLink then Warnlog "2nd frame: privious link isn't right!"
- if NextLink.GetSelIndex <> iNoLink then Warnlog "2nd frame: next link should be none"
- TabZusaetze.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_39
-
- Dim sHorizontalBy1 as String
- Dim sHorizontalBy2 as String
- Dim sVerticalBy1 as String
- Dim sVerticalBy2 as String
- Dim sHorizontalByNew1 as String
- Dim sHorizontalByNew2 as String
- Dim sVerticalByNew1 as String
- Dim sVerticalByNew2 as String
-
- sHorizontalBy1 = "2"+ gSeperator + "00" + gMeasurementUnit
- sVerticalBy1 = "1"+ gSeperator + "00" + gMeasurementUnit
- sHorizontalBy2 = "7"+ gSeperator + "00" + gMeasurementUnit
- sVerticalBy2 = "4"+ gSeperator + "00" + gMeasurementUnit
- sHorizontalByNew1 = "3"+ gSeperator + "00" + gMeasurementUnit
- sVerticalByNew1 = "2"+ gSeperator + "00" + gMeasurementUnit
- sHorizontalByNew2 = "7"+ gSeperator + "00" + gMeasurementUnit
- sVerticalByNew2 = "4"+ gSeperator + "00" + gMeasurementUnit
-
- printlog "- Test drag&drop with a linked frame - keyboard"
- '/// Test drag&drop with a linked frame - keyboard
-
- Call hNewDocument
-
- '/// insert a frame and set Horizontal and Vertical
- Call fInsertFrame(30,30 , 49,49)
-
- Call fFormatFrame("TabType")
- HorizontalBy.SetText sHorizontalBy1
- wait 500
- VerticalBy.SetText sVerticalBy1
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame and set Horizontal and Vertical
- Call fInsertFrame(51,51 , 80,80)
-
- Call fFormatFrame("TabType")
- HorizontalBy.SetText sHorizontalBy2
- wait 500
- VerticalBy.SetText sVerticalBy2
- wait 500
- TabType.OK
-
- Call wTypeKeys "<Tab>"
-
- '/// link two frames
- Call fFormatFrame("TabZusaetze")
- NextLink.Select 2
- Sleep 1
- TabZusaetze.OK
-
- '/// Move 1st frame with keyboard (right and down)
- Call wTypeKeys "<Right>"
- Sleep 1
- Call wTypeKeys "<Down>"
- Sleep 1
-
- Call fFormatFrame("TabType")
- if HorizontalBy.GetText <> sHorizontalByNew1 then QAErrorLog "#110726#1st frame: Horizontal by isn't right!"
- if VerticalBy.GetText <> sVerticalByNew1 then QAErrorLog "#110726#1st frame: Vertical by isn't right!"
- TabType.Cancel
-
- Call wTypeKeys "<Tab>"
-
- '/// Move 2nd frame with keyboard (right and down)
- Call wTypeKeys "<Right>"
- Sleep 1
- Call wTypeKeys "<Down>"
- Sleep 1
-
- '/// Check the result
- Call fFormatFrame("TabType")
- if HorizontalBy.GetText <> sHorizontalByNew2 then QAErrorLog "#110726# 2nd frame: Horizontal by isn't right! "
- if VerticalBy.GetText <> sVerticalByNew2 then QAErrorLog "#110726# 2nd frame: Vertical by isn't right! "
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_40
-
- Dim sHorizontalBy as String
-
- sHorizontalBy = "2"+ gSeperator + "00" + gMeasurementUnit
-
- printlog "- Test Undo on drag&drop of frames (keyboard)"
- '/// Test Undo on drag&drop of frames (keyboard)
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 49,49)
-
- Call fFormatFrame("TabType")
- HorizontalBy.SetText sHorizontalBy
- wait 500
- TabType.OK
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame
- Call fInsertFrame(51,51 , 80,80)
-
- printlog "Move the second frame away from the first one."
- Call wTypeKeys "<RIGHT>",10
-' Call wTypeKeys "<DOWN>",7
-
- Call wTypeKeys "<Tab>"
-
- '/// Active frame bar
- Call hToolbarSelect("FRAME", true )
- Wait 500
-
- '/// Click link frame button
- Verketten.Click
- Wait 500
-
- '/// Target the second frame
- Call gMouseClick(75,30)
- Wait 500
-
- '/// Move 1st frame with keyboard (Left)
- Call wTypeKeys "<Left>"
- Sleep 1
-
- '/// Edit / Undo
- EditUndo
- Wait 500
-
- '/// Check if the frame is moved
- Call fFormatFrame("TabType")
- if HorizontalBy.GetText <> sHorizontalBy then Warnlog "Undo on drag&drop of frames doesn't work!"
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_41
-
- Dim iLink as String
- Dim iNolink as Integer
-
- iLink = 2
- iNolink = 1
-
- printlog "- Test Undo on removing the link"
- '/// Test Undo on removing the link
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 49,49)
-
- Call wTypeKeys "<ESCAPE>"
- WaitSlot (5)
-
- '/// insert another frame
- Call fInsertFrame(51,51 , 80,80)
-
- printlog "Move the second frame away from the first one."
- Call wTypeKeys "<RIGHT>",10
-
- '/// Set focus to 1st frame
- Call wTypeKeys "<Tab>"
-
- '/// Active frame bar
- Call hToolbarSelect("FRAME", true )
- Wait 500
-
- '/// Click link frame button
- Verketten.Click
- Wait 500
-
- '/// Target the second frame
- Call gMouseClick(60,70)
- Wait 500
-
- '/// Remove link
- Kontext "FrameObjectbar"
- VerkettungLoesen.Click
- Wait 500
-
- Call fFormatFrame("TabZusaetze")
- if NextLink.GetSelIndex <> iNoLink then Warnlog "Remove link doesn't work!"
- TabZusaetze.Cancel
-
- '/// Edit / Undo
- EditUndo
- Wait 500
-
- '/// check if the frame is moved
- Call fFormatFrame("TabZusaetze")
- if NextLink.GetSelIndex <> iLink then Warnlog "Undo on removing link doesn't work!"
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_42
-
- Dim iNoLink as Integer
-
- iNoLink = 1
-
- printlog "- Link frame in header with frame in bodytext should be forbidden"
- '/// Link frame in header with frame in bodytext should be forbidden
-
- Call hNewDocument
-
- '/// insert a frame in header
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- Call wInsertFrame
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame in bodytext
- Call fInsertFrame(50,50 , 70,65)
-
- Call wTypeKeys "<Tab>"
-
- '/// Try to link two frames
- Call hToolbarSelect("FRAME", true )
- Wait 500
- Verketten.Click
- Wait 500
- Call gMouseClick(60,60)
- Wait 500
-
- Call fFormatFrame("TabZusaetze")
- if NextLink.GetSelIndex <> iNoLink then Warnlog "There should be no link between 2 frames!"
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_43
-
- Dim iLink as Integer
-
- iLink = 2
-
- printlog "- Link frame in footer with frame in bodytext should be forbidden"
- '/// Link frame in footer with frame in bodytext should be forbidden
-
- Call hNewDocument
-
- '/// insert a frame in footer
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
-
- Call wInsertFrame
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame in bodytext
- Call fInsertFrame(50,50 , 70,70)
-
- Call wTypeKeys "<Tab>"
-
- '/// Try to link two frames
- Call fFormatFrame("TabZusaetze")
- Sleep 1
- try
- NextLink.Select iLink
- Sleep 1
- Warnlog "There should be no link between 2 frames!"
- catch
- endcatch
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_44
-
- Dim sText as String
- Dim iNoLink as Integer
-
- sText = "Test"
- iNoLink = 1
-
- printlog "- Link frame in footer with frame in bodytext should be forbidden"
- '/// Link frame in footer with frame in bodytext should be forbidden
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(50,30 , 50,40)
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame
- Call fInsertFrame(60,50 , 70,65)
- Call wTypeKeys "<ESCAPE>"
-
- '/// input some text in the target frame(2nd frame)
- Call gMouseClick(65,60)
- Call wTypeKeys sText
-
- Call wTypeKeys ( "<Shift F4>" )
-
- '/// link two frames
- Call hToolbarSelect("FRAME", true )
- Wait 500
- Verketten.Click
- Wait 500
- Call gMouseClick(50,60)
- Wait 500
-
- Call fFormatFrame("TabZusaetze")
- if NextLink.GetSelIndex <> iNoLink then Warnlog "There should be no link between 2 frames!"
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_45
-
- Dim iNoLink as Integer
-
- iNoLink = 1
-
- printlog "- Recursed links should be forbidden"
- '/// Recursed links should be forbidden
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 45,45)
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame
- Call fInsertFrame(50,50 , 70,70)
-
- printlog "Move the second frame away from the first one."
- Call wTypeKeys "<RIGHT>",1
-
- '/// set focus to 1st frame
- Call wTypeKeys "<TAB>"
- Sleep 1
-
- '/// link two frames (2nd frame is target frame)
- Kontext "FrameObjectbar"
- Sleep 2
- Verketten.Click
- Wait 500
- Call gMouseClick(60,60)
- Wait 500
-
- '/// link two frames (1st frame is target frame)
- Call wTypeKeys "<TAB>"
- Call hToolbarSelect("FRAME", true )
- Wait 500
- Verketten.Click
- Wait 500
- Call gMouseClick(35,35)
- Wait 500
-
- Call fFormatFrame("TabZusaetze")
- if NextLink.GetItemCount <> iNoLink then Warnlog "There should be no link between 2 frames!" & NextLink.GetItemCount
- TabZusaetze.Cancel
- Wait 500
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_46
-
- Dim iNoLink as Integer
-
- iNoLink = 1
-
- printlog "- Frames couldn't be linked with the current one is part of another 'chain'"
- '/// Frames couldn't be linked with the current one is part of another 'chain'
-
- Call hNewDocument
-
- '/// insert a frame
- Call fInsertFrame(30,30 , 49,49)
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert another frame
- Call fInsertFrame(51,51 , 65,65)
-
- printlog "Move the frame away from the position of the first one."
- Call wTypeKeys "<RIGHT>",4
- Call wTypeKeys "<DOWN>",4
-
- Call wTypeKeys "<ESCAPE>"
- Wait 500
-
- '/// insert 3rd frame
- Call fInsertFrame(70,70 , 80,80)
- Wait 500
-
- printlog "Move the frame away from the position of the first one."
- Call wTypeKeys "<LEFT>",8
- Call wTypeKeys "<UP>",8
-
- '/// set focus to 1st frame
- Call wTypeKeys "<SHIFT F4>" 'make sure object is selected.
- Call wTypeKeys "<TAB>"
- Sleep 1
-
- '/// link two frames 1 & 2 (2nd frame is target frame)
- '/// Active frame bar
- Call hToolbarSelect("FRAME", true )
- Sleep 1
- Verketten.Click
- Sleep 1
- Call gMouseClick(70,70)
- Wait 500
-
- '/// set focus to 3rd frame
- Call wTypeKeys "<TAB>" , 2
-
- '/// link two frames 3 & 2 (2nd frame is target frame)
- Kontext "FrameObjectbar"
- Sleep 2
- Verketten.Click
- Sleep 1
- Call gMouseClick(70,70)
- Wait 500
-
- Call fFormatFrame("TabZusaetze")
- if NextLink.GetSelIndex <> iNoLink then Warnlog "Shouldn't link to 2nd frame ! "
- TabZusaetze.Cancel
- Wait 500
-
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_47
-
- Dim iLink as Integer
-
- iLink = 2
-
- printlog "- Frames couldn't be linked with the current one is in protected section"
- '/// Frames couldn't be linked with the current one is in protected section
-
- Call hNewDocument
-
- '/// Insert a section
- InsertSection
- wait 500
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- wait 500
- TabBereiche.OK
- wait 500
-
- Call wTypeKeys "<UP>" , 1
- Call wTypeKeys "<RETURN>", 6
-
- '/// Insert a frame (A) in the section
- Call wInsertFrame
- Call wTypeKeys "<UP>" , 2
- Call wTypeKeys "<ESCAPE>"
-
- '/// Set the section to be protected
- FormatSections
- Kontext "BereicheBearbeiten"
- Geschuetzt.Check
- sleep 1
- BereicheBearbeiten.OK
-
- Call wTypeKeys "<DOWN>" , 10
-
- '/// Insert another frame (B) out of the section
- Call fInsertFrame(30,70 , 60,90)
-
- Call wTypeKeys "<RIGHT>" , 8
- Call wTypeKeys "<DOWN>" , 8
-
- '/// Link B->A (A is target)
- Call fFormatFrame("TabZusaetze")
- try
- NextLink.Select iLink
- Sleep 1
- QAErrorLog "#110862# Should NOT link 2 frames when target frame is in the protected section!"
- catch
- endcatch
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_48
-
- Dim iLink as Integer
-
- iLink = 2
-
- printlog "- Frames could be linked with the current one is set to 'editable in protected documents' even it is in protected section "
-
- Call hNewDocument
-
- printlog "Insert a section"
- InsertSection
- wait 500
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- wait 500
- TabBereiche.OK
- wait 500
-
- Call wTypeKeys "<UP>" , 1
- Call wTypeKeys "<RETURN>", 6
-
- printlog "Insert a frame (A) in the section , and check 'editable in protected documents'"
- Call wInsertFrame
- Call wTypeKeys "<UP>" , 2
-
- Call fFormatFrame("TabZusaetze")
- Editierbar.Check
- wait 500
- TabZusaetze.OK
-
- Call wTypeKeys "<ESCAPE>"
-
- printlog "Set the section to be protected"
- FormatSections
- Kontext "BereicheBearbeiten"
- Geschuetzt.Check
- sleep 1
- BereicheBearbeiten.OK
-
- Call wTypeKeys "<DOWN>" , 10
- printlog "nsert another frame (B) out of the section"
- Call fInsertFrame(50,50 , 60,60)
-
- printlog "Link B->A (A is target)"
- Call fFormatFrame("TabZusaetze")
- try
- NextLink.Select iLink
- Sleep 1
- catch
- Warnlog "link 2 frames should work!"
- endcatch
- TabZusaetze.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/textframes/w_textframes4.inc b/testautomation/writer/optional/includes/textframes/w_textframes4.inc
deleted file mode 100644
index 6da21bcd513f..000000000000
--- a/testautomation/writer/optional/includes/textframes/w_textframes4.inc
+++ /dev/null
@@ -1,1523 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of textframe - 4
-'*
-'\***********************************************************************
-
-sub w_textframes4
- Call tTextframes_49 ''Follow text flow' should be OFF by default
- Call tTextframes_50 ''Follow text flow' should be ON if document is older than StarOffice 8
- Call tTextframes_51 ''Follow text flow' should be OFF when wrapping mode is 'in front of text'
- Call tTextframes_52 ''Follow text flow' should be OFF when wrapping mode is 'behind text'
- Call tTextframes_53 ''Follow text flow' should be OFF when wrapping mode is 'tight'
- Call tTextframes_54 ''Follow text flow' should be ON when wrapping mode is 'square'
- Call tTextframes_55 'Exceeding layout environment at the bottom - 'Follow text flow'(ON , page area)
- Call tTextframes_56 'Exceeding layout environment at the bottom - 'Follow text flow'(OFF, page area)
- Call tTextframes_57 'Exceeding layout environment at the bottom - 'Follow text flow'(ON , header)
- Call tTextframes_58 'Exceeding layout environment at the bottom - 'Follow text flow'(OFF, header)
- Call tTextframes_59 'Exceeding layout environment at the bottom - 'Follow text flow'(ON , table)
- Call tTextframes_60 'Exceeding layout environment at the bottom - 'Follow text flow'(OFF, table)
- Call tTextframes_61 'Exceeding layout environment at the top - 'Follow text flow'(ON , footer)
- Call tTextframes_62 'Exceeding layout environment at the top - 'Follow text flow'(OFF, footer)
- Call tTextframes_63 'Exceeding layout environment at the left - 'Follow text flow'(ON , table)
- Call tTextframes_64 'Exceeding layout environment at the left - 'Follow text flow'(OFF, table)
- Call tTextframes_65 'Exceeding layout environment at the left - 'Follow text flow'(ON , Frame)
- Call tTextframes_66 'Exceeding layout environment at the left - 'Follow text flow'(OFF, Frame)
- Call tTextframes_67 'Exceeding layout environment at the right - 'Follow text flow'(ON , table)
- Call tTextframes_68 'Exceeding layout environment at the right - 'Follow text flow'(OFF, table)
- Call tTextframes_69 'Exceeding layout environment at the right - 'Follow text flow'(ON , Frame)
- Call tTextframes_70 'Exceeding layout environment at the right - 'Follow text flow'(OFF, Frame)
-end sub
-
-'---------------------------------------------------
-
-testcase tTextframes_49
-
- printlog "- 'Follow text flow' should be OFF by default"
- '/// 'Follow text flow' should be OFF by default
-
- Call hNewDocument
-
- '/// insert a frame
- Call wInsertFrame
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow' should be OFF
- Call fFormatFrame("TabType")
- if FollowTextflow.IsChecked then
- Warnlog "'Follow text flow' should be turned off!"
- end if
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_50
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frame.sxw")
-
- printlog "- 'Follow text flow' should be ON if document is older than StarOffice 8"
- '/// Follow text flow' should be ON if document is older than StarOffice 8
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame and
- '/// + it is StarOffice 7 format
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow' should be ON
- Call fFormatFrame("TabType")
- if NOT FollowTextflow.IsChecked then
- Warnlog "'Follow text flow' should be turned on!"
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_51
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\inFrontText.doc")
-
- printlog "- 'Follow text flow' should be OFF when wrapping mode is 'in front of text'"
- '/// 'Follow text flow' should be OFF when wrapping mode is 'in front of text'
-
- Call hNewDocument
-
- '/// Open a test file , which is a Word file and includes
- '/// + a frame that is in 'in front of text' mode
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow' should be OFF
- Call fFormatFrame("TabType")
- if FollowTextflow.IsChecked then
- Warnlog "'Follow text flow' should be turned off!"
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_52
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\behindText.doc")
-
- printlog "- 'Follow text flow' should be OFF when wrapping mode is 'behind text'"
- '/// 'Follow text flow' should be OFF when wrapping mode is 'behind text'
-
- Call hNewDocument
-
- '/// Open a test file , which is a Word file and includes
- '/// + a frame that is in 'behind text' mode
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to the frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow' should be OFF
- Call fFormatFrame("TabType")
- if FollowTextflow.IsChecked then
- Warnlog "'Follow text flow' should be turned off!"
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_53
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\tight.doc")
-
- printlog "- 'Follow text flow' should be OFF when wrapping mode is 'tight'"
- '/// 'Follow text flow' should be OFF when wrapping mode is 'tight'
-
- Call hNewDocument
-
- '/// Open a test file , which is a Word file and includes
- '/// + a frame that is in 'tight' mode
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to the frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow' should be OFF
- Call fFormatFrame("TabType")
- if FollowTextflow.IsChecked then
- Warnlog "'Follow text flow' should be turned off!"
- end if
- TabType.Cancel
-
- printlog " Close active document "
- hFileCloseAll()
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_54
-
- Dim sTestFile as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\square.doc")
-
- printlog "- 'Follow text flow' should be OFF when wrapping mode is 'square'"
- '/// 'Follow text flow' should be OFF when wrapping mode is 'square'
-
- Call hNewDocument
-
- '/// Open a test file , which is a Word file and includes
- '/// + a frame that is in 'square' mode
- hFileOpenLocally( sTestFile )
-
-
- '/// Set focus to the frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow' should be OFF
- Call fFormatFrame("TabType")
- if FollowTextflow.IsChecked then
- Warnlog "'Follow text flow' should be turned off!"
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_55
-
- Dim iVertical as Integer
- Dim sVerticalBy as String
-
- iVertical = 4 'From top
- sVerticalBy = "50"
-
- printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(ON , page area)"
- '/// Exceeding layout environment at the bottom - 'Follow text flow'(ON , page area)
-
- Call hNewDocument
-
- '/// Insert/Frame / Type ,
- '/// + Select 'from top' in Vertical ,
- '/// + Set 50cm in vertical by area
- '/// + Check 'Follow text flow'
- InsertFrame
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- Vertical.Select iVertical
- Sleep 1
- VerticalBy.SetText sVerticalBy
- Sleep 1
- FollowTextflow.Check
- TabType.Ok
-
- '/// Check if the frame is in 2nd page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "2" then
- Warnlog "The test frame isn't in the second page!"
- end if
-
- Call fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_56
-
- Dim iVertical as Integer
- Dim sVerticalBy as String
-
- iVertical = 4 'From top
- sVerticalBy = "50"
-
- printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(OFF , page area)"
- '/// Exceeding layout environment at the bottom - 'Follow text flow'(OFF , page area)
-
- Call hNewDocument
-
- '/// Insert/Frame / Type ,
- '/// + Select 'from top' in Vertical ,
- '/// + Set 50cm in vertical by area
- '/// + UnCheck 'Follow text flow'
- InsertFrame
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- Vertical.Select iVertical
- Sleep 1
- VerticalBy.SetText sVerticalBy
- Sleep 1
- FollowTextflow.UnCheck
- TabType.Ok
-
- '/// Check if the frame is in 1st page
- Kontext
- ViewNavigator
- Kontext "NavigatorWriter"
- Sleep 1
- if Seitennummer.GetText <> "1" then
- Warnlog "The test frame isn't in the first page!"
- end if
-
- Call fCloseNavigator
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_57
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim sVerticalBy as String
- Dim sPositionY1 as String
- Dim sPositionY2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInHeader.sxw")
- iVertical = 4 'From top
- sVerticalBy = "50"
-
- printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(ON , header)"
- '/// Exceeding layout environment at the bottom - 'Follow text flow'(ON , header)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in header and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
-
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY1 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow'
- '/// + set a much bigger values in from top
- Call fFormatFrame("TabType")
- FollowTextflow.Check
- Vertical.Select iVertical
- Sleep 1
- VerticalBy.SetText sVerticalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY2 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the header
- if fCalculateTolerance( sPositionY1, sPositionY2) > 0.3 then
- Warnlog "Something is wrong ! Perhaps the frame isn't in the header!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_58
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim sVerticalBy as String
- Dim sPositionY1 as String
- Dim sPositionY2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInHeader.sxw")
- iVertical = 4 'From top
- sVerticalBy = "50"
-
- printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(OFF , header)"
- '/// Exceeding layout environment at the bottom - 'Follow text flow'(OFF , header)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in header and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY1 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + UnCheck box 'Follow text flow'
- '/// + set a much bigger values in from top
- Call fFormatFrame("TabType")
- FollowTextflow.UnCheck
- Vertical.Select iVertical
- Sleep 1
- VerticalBy.SetText sVerticalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY2 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the header
- if fCalculateTolerance( sPositionY1, sPositionY2 ) < 18 then
- Warnlog "Something is wrong ! Perhaps the frame is still in the header!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_59
-
- Dim sTestFile as String
- Dim sPositionY1 as String
- Dim sPositionY2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
-
- printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(ON , table)"
- '/// Exceeding layout environment at the bottom - 'Follow text flow'(ON , table)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in table and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys ( "<Tab>" )
-
- FormatAnchorToFrame
- Sleep 1
-
- 'Get the pic Y position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionY1 = Verticalby.Gettext
- TabType.Cancel
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow'
- '/// + set a much bigger values in from top
- Call fFormatFrame("TabType")
- FollowTextflow.Check
- Vertical.Select 4
- Sleep 1
- VerticalBy.SetText "50"
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionY2 = Verticalby.Gettext
- TabType.Cancel
-
- '/// Check if frame is still in the table
- if fCalculateTolerance( sPositionY1, sPositionY2) > 0.3 then
- Warnlog "Something is wrong ! Perhaps the frame isn't in the table!"
- end if
-
- 'Set focus to frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'if the frame is in the table, the focus should be in the table
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- try
- Call fFormatTable("TabTabelle")
- TabTabelle.Cancel
- catch
- Warnlog "The frame isn't in the table!"
- endcatch
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_60
-
- Dim sTestFile as String
- Dim sPositionY1 as String
- Dim sPositionY2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
-
- printlog "- Exceeding layout environment at the bottom - 'Follow text flow'(OFF , table)"
- '/// Exceeding layout environment at the bottom - 'Follow text flow'(OFF , table)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in table and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- printlog "Move the frame into the document-area."
- Call wTypeKeys "<RIGHT>",10
- Call wTypeKeys "<DOWN>",7
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Tab>" )
-
- 'Get the pic Y position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionY1 = Verticalby.Gettext
- TabType.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + UnCheck box 'Follow text flow'
- '/// + set a much bigger values in from top
- Call fFormatFrame("TabType")
- FollowTextflow.UnCheck
- Vertical.Select 4
- Sleep 1
- VerticalBy.ToMax
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionY2 = Verticalby.Gettext
- TabType.Cancel
-
- '/// Check if frame is still in the table
- if fCalculateTolerance( sPositionY1, sPositionY2) <> 0 then
- Warnlog "Something is wrong ! Perhaps the frame is still in the table!"
- end if
-
- 'Set focus to frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'if the frame is in the table, the focus should be in the table
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- try
- Call fFormatTable("TabTabelle")
- TabTabelle.Cancel
- Warnlog "The frame should be in the table!"
- catch
- endcatch
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_61
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim sVerticalBy as String
- Dim sPositionY1 as String
- Dim sPositionY2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFooter.sxw")
- iVertical = 4 'From top
- sVerticalBy = "-50"
-
- printlog "- Exceeding layout environment at the top - 'Follow text flow'(ON , footer)"
- '/// Exceeding layout environment at the top - 'Follow text flow'(ON , footer)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in footer and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY1 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow'
- '/// + set a much bigger values in from top
- Call fFormatFrame("TabType")
- FollowTextflow.Check
- Vertical.Select iVertical
- Sleep 1
- VerticalBy.SetText sVerticalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY2 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the header
- if fCalculateTolerance( sPositionY1, sPositionY2) > 0.8 then
- Warnlog "Something is wrong ! Perhaps the frame isn't in the footer!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_62
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim sVerticalBy as String
- Dim sPositionY1 as String
- Dim sPositionY2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFooter.sxw")
- iVertical = 4 'From top
- sVerticalBy = "-50"
-
- printlog "- Exceeding layout environment at the top - 'Follow text flow'(OFF , footer)"
- '/// Exceeding layout environment at the top - 'Follow text flow'(OFF , footer)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in footer and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY1 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + UnCheck box 'Follow text flow'
- '/// + set a much bigger values in from top
- Call fFormatFrame("TabType")
- FollowTextflow.UnCheck
- Vertical.Select iVertical
- Sleep 1
- VerticalBy.SetText sVerticalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic Y position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionY2 = Verticalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the header
- if fCalculateTolerance( sPositionY1, sPositionY2 ) < 18 then
- Warnlog "Something is wrong ! Perhaps the frame is still in the footer!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_63
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "-50"
-
- printlog "- Exceeding layout environment at the left - 'Follow text flow'(ON , table)"
- '/// Exceeding layout environment at the left - 'Follow text flow'(ON , table)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in table and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys ( "<Tab>" )
-
- 'Get the pic X position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX1 = Horizontalby.Gettext
- TabType.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.Check
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX2 = Horizontalby.Gettext
- TabType.Cancel
-
- '/// Check if frame is still in the table
- if fCalculateTolerance( sPositionX1, sPositionX2) > 0.3 then
- Warnlog "Something is wrong ! Perhaps the frame isn't in the table!"
- end if
-
- 'Set focus to frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'if the frame is in the table, the focus should be in the table
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- try
- Call fFormatTable("TabTabelle")
- TabTabelle.Cancel
- catch
- Warnlog "The frame isn't in the table!"
- endcatch
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_64
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "-50"
-
- printlog "- Exceeding layout environment at the left - 'Follow text flow'(OFF , table)"
- '/// Exceeding layout environment at the left - 'Follow text flow'(OFF , table)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in table and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys ( "<Tab>" )
-
- 'Get the pic Y position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX1 = Horizontalby.Gettext
- TabType.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + UnCheck box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.UnCheck
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX2 = Horizontalby.Gettext
- TabType.Cancel
-
- '/// Check if frame is still in the table
- if fCalculateTolerance( sPositionX1, sPositionX2) <> 0 then
- Warnlog "Something is wrong ! Perhaps the frame is still in the table!"
- end if
-
- 'Set focus to frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'if the frame is in the table, the focus should be in the table
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- try
- Call fFormatTable("TabTabelle")
- TabTabelle.Cancel
- Warnlog "The frame shouldn't in the table!"
- catch
- endcatch
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_65
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "-50"
-
- printlog "- Exceeding layout environment at the left - 'Follow text flow'(ON , Frame)"
- '/// Exceeding layout environment at the left - 'Follow text flow'(ON , Frame)
-
- Call hNewDocument
-
- '/// Open a test file , which includes 2 frames ,
- '/// Frame A is anchored Frame B
- '/// + a picture which is anchored to Frame A
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX1 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>" , 2
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.Check
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX2 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the frame
- if fCalculateTolerance( sPositionX1, sPositionX2) > 0.5 then
- Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_66
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "-50"
-
- printlog "- Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)"
- '/// Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)
-
- Call hNewDocument
-
- '/// Open a test file , which includes 2 frames ,
- '/// Frame A is anchored Frame B
- '/// + a picture which is anchored to Frame A
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX1 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>" , 2
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + UnCheck box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.UnCheck
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX2 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the frame
- if fCalculateTolerance( sPositionX1, sPositionX2) > 0.5 then
- Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_67
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "50"
-
- printlog "- Exceeding layout environment at the right - 'Follow text flow'(ON , table)"
- '/// Exceeding layout environment at the right - 'Follow text flow'(ON , table)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in table and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys ( "<Tab>" )
-
- 'Get the pic X position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX1 = Horizontalby.Gettext
- TabType.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.Check
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX2 = Horizontalby.Gettext
- TabType.Cancel
-
- '/// Check if frame is still in the table
- if fCalculateTolerance( sPositionX1, sPositionX2) > 1 then
- Warnlog "Something is wrong ! Perhaps the frame isn't in the table!"
- end if
-
- 'Set focus to frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'if the frame is in the table, the focus should be in the table
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- try
- Call fFormatTable("TabTabelle")
- TabTabelle.Cancel
- catch
- Warnlog "The frame isn't in the table!"
- endcatch
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_68
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "50"
-
- printlog "- Exceeding layout environment at the right - 'Follow text flow'(OFF , table)"
- '/// Exceeding layout environment at the right - 'Follow text flow'(OFF , table)
-
- Call hNewDocument
-
- '/// Open a test file , which includes a frame in table and
- '/// + a picture which is anchored to frame
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys ( "<Tab>" )
-
- 'Get the pic Y position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX1 = Horizontalby.Gettext
- TabType.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + UnCheck box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.UnCheck
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- Sleep 1
- Call fFormatGraphic("TabType")
- sPositionX2 = Horizontalby.Gettext
- TabType.Cancel
-
- '/// Check if frame is still in the table
- if fCalculateTolerance( sPositionX1, sPositionX2) <> 0 then
- Warnlog "Something is wrong ! Perhaps the frame is still in the table!"
- end if
-
- 'Set focus to frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'if the frame is in the table, the focus should be in the table
- Call wTypeKeys "<ESCape>"
- Sleep 1
-
- try
- Call fFormatTable("TabTabelle")
- TabTabelle.Cancel
- Warnlog "The frame shouldn't in the table!"
- catch
- endcatch
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_69
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "50"
-
- printlog "- Exceeding layout environment at the right - 'Follow text flow'(ON , Frame)"
- '/// Exceeding layout environment at the right - 'Follow text flow'(ON , Frame)
-
- Call hNewDocument
-
- '/// Open a test file , which includes 2 frames ,
- '/// Frame A is anchored Frame B
- '/// + a picture which is anchored to Frame A
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX1 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>" , 2
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.Check
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX2 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the frame
- if fCalculateTolerance( sPositionX1, sPositionX2) > 0.5 then
- Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_70
-
- Dim sTestFile as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
- Dim sPositionX1 as String
- Dim sPositionX2 as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw")
- iHorizontal = 4 'From Left
- sHorizontalBy = "50"
-
- printlog "- Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)"
- '/// Exceeding layout environment at the left - 'Follow text flow'(OFF , Frame)
-
- Call hNewDocument
-
- '/// Open a test file , which includes 2 frames ,
- '/// Frame A is anchored Frame B
- '/// + a picture which is anchored to Frame A
- hFileOpenLocally( sTestFile )
-
-
- 'Set focus to the picture
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX1 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- FormatAnchorToFrame
- Sleep 1
-
- '/// Set focus to the frame
- Call wTypeKeys "<Tab>" , 2
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + UnCheck box 'Follow text flow'
- '/// + set a much bigger values in from left
- Call fFormatFrame("TabType")
- FollowTextflow.UnCheck
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- TabType.OK
-
- 'Set focus to picture
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- 'Get the pic X position
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- sPositionX2 = Horizontalby.Gettext
- TabPositionAndSizeWriter.Cancel
-
- '/// Check if frame is still in the table
- if fCalculateTolerance( sPositionX1, sPositionX2) < 3 then
- Warnlog "Something is wrong ! Perhaps the frame A isn't in frame B!"
- end if
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/textframes/w_textframes5.inc b/testautomation/writer/optional/includes/textframes/w_textframes5.inc
deleted file mode 100644
index 7bcba8594a9c..000000000000
--- a/testautomation/writer/optional/includes/textframes/w_textframes5.inc
+++ /dev/null
@@ -1,739 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Test of textframe - 5
-'*
-'\***********************************************************************
-
-sub w_textframes5
-
- Call tTextframes_71 'Test negative value in Horizontal and vertical
- Call tTextframes_72 ''Vertical to' when anchor is inside frame
- Call tTextframes_73 ''Vertical to' when anchor is inside document body
- Call tTextframes_74 ''Vertical to' when anchor is inside table cell
- Call tTextframes_75 ''Vertical to' when anchor is inside header
- Call tTextframes_76 ''Vertical to' when anchor is inside footer
- Call tTextframes_77 ''Vertical to' when anchor is inside Footnote
- Call tTextframes_78 ''Vertical to' when anchor is inside endnote
- Call tTextframes_80 'Line of text - Top
- Call tTextframes_81 'Line of text - Bottom
- Call tTextframes_82 'Line of text - Center
- Call tTextframes_83 'Line of text - From Bottom (positive)
- Call tTextframes_84 'Line of text - From Bottom (negative)
- Call tTextframes_85 'Import from MS Word
-
-end sub
-
-'---------------------------------------------------
-
-testcase tTextframes_71
-
- Dim iVertical as Integer
- Dim sVerticalBy as String
- Dim iHorizontal as Integer
- Dim sHorizontalBy as String
-
- iHorizontal = 4 'From Left
- sHorizontalBy = "-1"+ gSeperator + "00" + gMeasurementUnit
- iVertical = 4 'From top
- sVerticalBy = "-1"+ gSeperator + "50" + gMeasurementUnit
-
- printlog "- Test negative value in Horizontal and vertical"
- '/// Test negative value in Horizontal and vertical
-
- Call hNewDocument
-
- '/// insert a frame
- '/// + Set Horizontal as "from top" ,
- '/// + set Horizontal by to -1cm ,
- '/// + set Vertical as "from Left" ,
- '/// + set vertical by to -1.5cm
- InsertFrame
- Kontext
- Active.Setpage TabType
- Kontext "TabType"
- Horizontal.Select iHorizontal
- Sleep 1
- HorizontalBy.SetText sHorizontalBy
- Sleep 1
- Vertical.Select iVertical
- Sleep 1
- VerticalBy.SetText sVerticalBy
- Sleep 1
- TabType.Ok
-
- '/// Check if the configuration is effective
- '/// Format/Frame / Type ,
- Call fFormatFrame("TabType")
-
- if fCalculateTolerance( HorizontalBy.GetText, sHorizontalBy ) > 0.2 then
- Warnlog "Something wrong in Horizontal by !"
- end if
- if fCalculateTolerance( VerticalBy.GetText, sVerticalBy ) > 0.2 then
- Warnlog "Something wrong in Vertical by !"
- end if
- TabType.Cancel
-
- Call hCloseDocument
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_72
-
- printlog "- 'Vertical to' when anchor is inside frame"
- '/// 'Vertical to' when anchor is inside frame
-
- Call hNewDocument
-
- '/// Open a test file , which includes 2 frames ,
- '/// Frame A is anchored Frame B
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\textframe\frameInFrame.sxw" )
-
- 'Set focus to Frame B
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check if "Entire frame" and "Frame text area"
- '/// + are in Vertical to area
- Call fFormatFrame("TabType")
- if HorizontalTo.GetSelIndex <> 3 then
- Warnlog "Horizontal To should be 'Entire Frame' but get " & HorizontalTo.GetSelText
- end if
- if VerticalTo.GetSelIndex <> 2 then
- Warnlog "Vertical To should be 'Frame Text Area' but get " & VerticalTo.GetSelText
- end if
-
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_73
-
- printlog "- 'Vertical to' when anchor is inside document body"
- '/// 'Vertical to' when anchor is inside document body
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame in the document body
- hFileOpenLocally( gTesttoolpath & "writer\optional\input\textframe\frame.sxw" )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check if "Entire page" and "Page text area"
- '/// + are in Vertical to area
- Call fFormatFrame("TabType")
- if HorizontalTo.GetSelIndex <> 7 then
- Warnlog "Horizontal To should be 'Entire Page' but get " & HorizontalTo.GetSelText
- end if
- if VerticalTo.GetSelIndex <> 4 then
- Warnlog "Vertical To should be 'Page Text Area' but get " & VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_74
-
- printlog "- 'Vertical to' when anchor is inside table cell"
- '/// 'Vertical to' when anchor is inside table cell
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame in the document body
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\textframe\frameInTable.sxw" )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
-
- '/// Format/Frame / Type ,
- '/// + Check if "Entire page" and "Page text area"
- '/// + are in Vertical to area
- Call fFormatFrame("TabType")
- if HorizontalTo.GetSelIndex <> 7 then
- Warnlog "Horizontal To should be 'Entire Page' but get " & HorizontalTo.GetSelText
- end if
- if VerticalTo.GetSelIndex <> 4 then
- Warnlog "Vertical To should be 'Page Text Area' but get " & VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_75
-
- printlog "- 'Vertical to' when anchor is inside header"
- '/// 'Vertical to' when anchor is inside header
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame in the header
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\textframe\Header.sxw" )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check if "Entire page" and "Page text area"
- '/// + are in Vertical to area
- Call fFormatFrame("TabType")
- if HorizontalTo.GetSelIndex <> 7 then
- Warnlog "Horizontal To should be 'Entire Page' but get " & HorizontalTo.GetSelText
- end if
- if VerticalTo.GetSelIndex <> 4 then
- Warnlog "Vertical To should be 'Page Text Area' but get " & VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_76
-
- printlog "- 'Vertical to' when anchor is inside footer"
- '/// 'Vertical to' when anchor is inside footer
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame in the footer
- hFileOpenLocally( gTesttoolpath + "writer\optional\input\textframe\Footer.sxw" )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check if "Entire page" and "Page text area"
- '/// + are in Vertical to area
- Call fFormatFrame("TabType")
- if HorizontalTo.GetSelIndex <> 7 then
- Warnlog "Horizontal To should be 'Entire Page' but get " & HorizontalTo.GetSelText
- end if
- if VerticalTo.GetSelIndex <> 4 then
- Warnlog "Vertical To should be 'Page Text Area' but get " & VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_77
-
- printlog "- 'Vertical to' when anchor is inside Footnote"
- '/// 'Vertical to' when anchor is inside Footnote
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame in the footnote
- hFileOpen( gTesttoolpath & "writer\optional\input\textframe\frameInFootnote.sxw" )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check if "Entire page" and "Page text area"
- '/// + are in Vertical to area
- Call fFormatFrame("TabType")
- if HorizontalTo.GetSelIndex <> 7 then
- Warnlog "Horizontal To should be 'Entire Page' but get " & HorizontalTo.GetSelText
- end if
- if VerticalTo.GetSelIndex <> 4 then
- Warnlog "Vertical To should be 'Page Text Area' but get " & VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_78
-
- printlog "- 'Vertical to' when anchor is inside endnote"
- '/// 'Vertical to' when anchor is inside endnote
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame in the endnote
- hFileOpenLocally( gTesttoolpath & "writer\optional\input\textframe\frameInEndnote.sxw" )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type ,
- '/// + Check if "Entire page" and "Page text area"
- '/// + are in Vertical to area
- Call fFormatFrame("TabType")
- if HorizontalTo.GetSelIndex <> 7 then
- Warnlog "Horizontal To should be 'Entire Page' but get " & HorizontalTo.GetSelText
- end if
- if VerticalTo.GetSelIndex <> 4 then
- Warnlog "Vertical To should be 'Page Text Area' but get " & VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_80
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim iVerticalTo as Integer
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\lineOfText.sxw")
- iVertical = 1 ' Top
- iVerticalTo = 6 ' Line of text'
- sPositionY = "0"+ gSeperator + "20" + gMeasurementUnit
-
- printlog "- 'Line of text' - Top"
- '/// 'Line of text' - Top
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame which is
- '/// + anchored 'To Character' and a picture which is anchored
- '/// + in the frame
- hFileOpenLocally( sTestFile )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type , select Top in Vertical ,
- '/// + select 'Line of text' in vertical to
- Call fFormatFrame("TabType")
- Vertical.Select iVertical
- Sleep 1
- VerticalTo.Select iVerticalTo
- Sleep 1
- TabType.OK
-
- '/// Check if the result is right
- 'Set focus to the picture
- Call wTypeKeys "<Tab>"
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance( sPositionY, Verticalby.Gettext) > 0.3 then
- Warnlog "The picture's position isn't right !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_81
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim iVerticalTo as Integer
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\lineOfText.sxw")
- iVertical = 2 ' Bottom
- iVerticalTo = 6 ' Line of text'
- sPositionY = "3"+ gSeperator + "50" + gMeasurementUnit
-
- printlog "- 'Line of text' - Bottom"
- '/// 'Line of text' - Bottom
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame which is
- '/// + anchored 'To Character' and a picture which is anchored
- '/// + in the frame
- hFileOpenLocally( sTestFile )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type , select Bottom in Vertical ,
- '/// + select 'Line of text' in vertical to
- Call fFormatFrame("TabType")
- Vertical.Select iVertical
- Sleep 1
- VerticalTo.Select iVerticalTo
- Sleep 1
- TabType.OK
-
- '/// Check if the result is right
- 'Set focus to the picture
- Call wTypeKeys "<Tab>"
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance( sPositionY, Verticalby.Gettext) > 0.3 then
- Warnlog "The picture's position isn't right !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_82
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim iVerticalTo as Integer
- Dim sPositionY as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\lineOfText.sxw")
- iVertical = 4 ' Center
- iVerticalTo = 6 ' Line of text'
- sPositionY = "1"+ gSeperator + "80" + gMeasurementUnit
-
- printlog "- 'Line of text' - Center"
- '/// 'Line of text' - Center
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame which is
- '/// + anchored 'To Character' and a picture which is anchored
- '/// + in the frame
- hFileOpenLocally( sTestFile )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type , select Center in Vertical ,
- '/// + select 'Line of text' in vertical to
- Call fFormatFrame("TabType")
- Vertical.Select iVertical
- Sleep 1
- VerticalTo.Select iVerticalTo
- Sleep 1
- TabType.OK
-
- '/// Check if the result is right
- 'Set focus to the picture
- Call wTypeKeys "<Tab>"
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance( sPositionY, Verticalby.Gettext) > 0.3 then
- Warnlog "The picture's position isn't right !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_83
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim iVerticalTo as Integer
- Dim sPositionY as String
- Dim sVerticalBy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\lineOfText.sxw")
- iVertical = 6 ' From Bottom
- iVerticalTo = 2 ' Line of text'
- sPositionY = "2"+ gSeperator + "30" + gMeasurementUnit
- sVerticalBy = "1"+ gSeperator + "00" + gMeasurementUnit
-
- printlog "- 'Line of text' - From Bottom(positive)"
- '/// 'Line of text' - From Bottom(positive)
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame which is
- '/// + anchored 'To Character' and a picture which is anchored
- '/// + in the frame
- hFileOpenLocally( sTestFile )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type , select From Bottom in Vertical ,
- '/// + select 'Line of text' in vertical to ,
- '/// + input a positive number in vertical by
- Call fFormatFrame("TabType")
- if Vertical.GetItemCount <> 6 then
- warnlog " Missing string in frame options"
- TabType.Cancel
- Call hCloseDocument
- goto endsub
- end if
- Vertical.Select iVertical
- Sleep 1
- VerticalTo.Select iVerticalTo
- Sleep 1
- VerticalBy.SetText sVerticalBy
- TabType.OK
-
- '/// Check if the result is right
- 'Set focus to the picture
- Call wTypeKeys "<Tab>"
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance( sPositionY, Verticalby.Gettext) > 0.3 then
- Warnlog "The picture's position isn't right !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_84
-
- Dim sTestFile as String
- Dim iVertical as Integer
- Dim iVerticalTo as Integer
- Dim sPositionY as String
- Dim sVerticalBy as String
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\lineOfText.sxw")
- iVertical = 6 ' From Bottom
- iVerticalTo = 2 ' Line of text'
- sPositionY = "4"+ gSeperator + "30" + gMeasurementUnit
- sVerticalBy = "-1"+ gSeperator + "00" + gMeasurementUnit
-
- printlog "- 'Line of text' - From Bottom(negative)"
- '/// 'Line of text' - From Bottom(negative)
-
- Call hNewDocument
-
- '/// Open a test file , which includes 1 frame which is
- '/// + anchored 'To Character' and a picture which is anchored
- '/// + in the frame
- hFileOpenLocally( sTestFile )
-
- '/// Set focus to Frame
- Call wTypeKeys ( "<Shift F4>" )
- Sleep 1
-
- '/// Format/Frame / Type , select From Bottom in Vertical ,
- '/// + select 'Line of text' in vertical to ,
- '/// + input a negative number in vertical by
- Call fFormatFrame("TabType")
- if Vertical.GetItemCount <> 6 then
- warnlog " Missing string in frame options"
- TabType.Cancel
- Call hCloseDocument
- goto endsub
- end if
- Vertical.Select iVertical
- Sleep 1
- VerticalTo.Select iVerticalTo
- Sleep 1
- VerticalBy.SetText sVerticalBy
- TabType.OK
-
- '/// Check if the result is right
- 'Set focus to the picture
- Call wTypeKeys "<Tab>"
- FormatAnchorToPage
- Sleep 1
- Call fPositionAndSize("TabPositionAndSizeWriter")
- if fCalculateTolerance( sPositionY, Verticalby.Gettext) > 0.3 then
- Warnlog "The picture's position isn't right !"
- end if
- TabPositionAndSizeWriter.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-'-----------------------------------------------------------------
-
-testcase tTextframes_85
-
- Dim sTestFile as String
- Dim iVerticalTop as Integer
- Dim iVerticalBottom as Integer
- Dim iVerticalCenter as Integer
- Dim iVerticalTo as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\textframe\lineOfText.doc")
- iVerticalTop = 1 ' Top
- iVerticalBottom = 2 ' Bottom
- iVerticalCenter = 4 ' Center
-
- iVerticalTo = 6 ' Line of text'
-
- printlog "- Import from MS Word"
- '/// Import from MS Word
-
- Call hNewDocument
-
- '/// Open a MS Word file , which includes 3 frames ,
- '/// + One is top to the line text ,
- '/// + another one is center to the line text ,
- '/// + the 3rd one is bottom to the line text
- hFileOpenLocally( sTestFile )
-
- '/// Set focus to 1st Frame
- Call wTypeKeys ( "<Shift F4>" )
-
- '/// Format/Frame / Type , check if 'To character' in anchor area
- '/// + check if 'Line of text' in vertical to ,
- '/// + check if 'Top' in Vertical
- Call fFormatFrame("TabType")
- if AnchorAtCharacter.IsChecked <> TRUE then
- Warnlog "The anchor should be To Character!"
- end if
- if Vertical.GetSelIndex <> iVerticalTop then
- Warnlog "should be Top , but get " &Vertical.GetSelText
- end if
- if VerticalTo.GetSelIndex <> iVerticalTo then
- Warnlog "Top:should be line of text , but get " &VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- '/// Set focus to 2nd Frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type , check if 'To character' in anchor area
- '/// + check if 'Line of text' in vertical to ,
- '/// + check if 'Center' in Vertical
- Call fFormatFrame("TabType")
- if AnchorAtCharacter.IsChecked <> TRUE then
- Warnlog "The anchor should be To Character!"
- end if
- if Vertical.GetSelIndex <> iVerticalCenter then
- Warnlog "should be Center , but get " &Vertical.GetSelText
- end if
- if VerticalTo.GetSelIndex <> iVerticalTo then
- Warnlog "Center:should be line of text , but get " &VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- '/// Set focus to 3rd Frame
- Call wTypeKeys "<Tab>"
- Sleep 1
-
- '/// Format/Frame / Type , check if 'To character' in anchor area
- '/// + check if 'Line of text' in vertical to ,
- '/// + check if 'Bottom' in Vertical
- Call fFormatFrame("TabType")
- if AnchorAtCharacter.IsChecked <> TRUE then
- Warnlog "The anchor should be To Character!"
- end if
- if Vertical.GetSelIndex <> iVerticalBottom then
- Warnlog "should be Bottom , but get " &Vertical.GetSelText
- end if
- if VerticalTo.GetSelIndex <> iVerticalTo then
- Warnlog "Bottom:should be line of text , but get " &VerticalTo.GetSelText
- end if
- TabType.Cancel
-
- printlog " Close active document "
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
-endcase
-
-' ------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/tools/tools1.inc b/testautomation/writer/optional/includes/tools/tools1.inc
deleted file mode 100755
index a2a1e04dc0ad..000000000000
--- a/testautomation/writer/optional/includes/tools/tools1.inc
+++ /dev/null
@@ -1,347 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Tools for writer/Optional - 1
-'*
-'\***********************************************************************
-
-
-'This routine is executing file/properties , then tabpage Options
-'*****************************************************************
-function fFileProperties(Options as string)
-
- if ( hUseAsyncSlot( "FileProperties" ) <> -1 ) then
-
- Kontext
- if ( Active.exists( 2 ) ) then
- Select case Options
- case "TabDokument" : active.SetPage TabDokument
- case "TabBeschreibung" : active.SetPage TabBeschreibung
- case "TabBenutzer" : active.SetPage TabBenutzer
- case "TabInternet" : active.SetPage TabInternet
- case "TabStatistik" : active.SetPage TabStatistik
- end Select
- else
- warnlog( "<FileProperties> dialog not open" )
- endif
- else
- warnlog( "Failed to execute <FileProperties>" )
- endif
-
- Kontext Options
-
-end function
-
-
-
-'*****************************************************************
-'This routine is executing format/graphic , then tabpage Options
-'*****************************************************************
-function fFormatGraphic(Options as string) as boolean
- Dim j as integer, sSlotOK as boolean
-
- fFormatGraphic = true
- if ( hUseAsyncSlot( "FormatGraphics" ) <> -1 ) then
- Kontext
- if ( Active.exists( 2 ) ) then
- Select case Options
- case "TabType" : active.SetPage TabType
- case "TabZusaetze" : active.SetPage TabZusaetze
- case "TabUmlauf" : active.SetPage TabUmlauf
- case "TabHyperlinkRahmen" : active.SetPage TabHyperlinkRahmen
- case "TabGrafik" : active.SetPage TabGrafik
- case "TabZuschneiden" : active.SetPage TabZuschneiden
- case "TabUmrandung" : active.SetPage TabUmrandung
- case "TabHintergrund" : active.SetPage TabHintergrund
- case "TabMakro"
- 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
- end select
- else
- warnlog( "Failed to access <Format Graphics> Tabpage" )
- fFormatGraphic = false
- endif
- else
- warnlog( "Failed to execute <FormatGraphics>" )
- fFormatGraphic = false
- endif
-
- Kontext Options
-
-end function
-
-
-
-'*****************************************************************
-'This routine is executing format/frame , then tabpage Options
-'****************************************************************
-function fFormatFrame(Options as string)
-
- if ( hUseAsyncSlot( "FormatFrame" ) <> -1 ) then
-
- Kontext
- if ( Active.exists( 2 ) ) then
- Select case Options
- case "TabType" : active.SetPage TabType
- case "TabZusaetze" : active.SetPage TabZusaetze
- case "TabUmlauf" : active.SetPage TabUmlauf
- case "TabHyperlinkRahmen" : active.SetPage TabHyperlinkRahmen
- case "TabUmrandung" : active.SetPage TabUmrandung
- case "TabHintergrund" : active.SetPage TabHintergrund
- case "TabSpalten" : active.SetPage TabSpalten
- case "TabMakro" : active.SetPage TabMakro
- end Select
- else
- warnlog( "<Format Frame> dialog did not open" )
- endif
- else
- warnlog( "Failed to execute <FormatFrame>" )
- endif
-
- Kontext Options
-
-end function
-
-
-'*************************************************************************
-'This routine is executing format/page in writer , then tabpage Options
-'*************************************************************************
-function fFormatPageWriter(Options as string)
-
- FormatPageWriter
- Kontext
-
- Select case Options
- case "TabVerwalten" : active.SetPage TabVerwalten
- case "TabSeite" : active.SetPage TabSeite
- case "TabHintergrund" : active.SetPage TabHintergrund
- case "TabKopfzeile" : active.SetPage TabKopfzeile
- case "TabFusszeile" : active.SetPage TabFusszeile
- case "TabUmrandung" : active.SetPage TabUmrandung
- case "TabSpalten" : active.SetPage TabSpalten
- case "TabFussnote" : active.SetPage TabFussnote
- case "TabGrid" : active.SetPage TabGrid
- end Select
-
- Kontext Options
-
-end function
-
-
-'*************************************************************************
-'This routine is executing format/paragraph in writer , then tabpage Options
-'*************************************************************************
-function fFormatParagraph(Options as string)
-
- FormatParagraph
- Kontext
-
- Select case Options
- case "TabEinzuegeUndAbstaende" : active.SetPage TabEinzuegeUndAbstaende
- case "TabAusrichtungAbsatz" : active.SetPage TabAusrichtungAbsatz
- case "TabTextfluss" : active.SetPage TabTextfluss
- case "TabAsianTypography" : active.SetPage TabAsianTypography
- case "TabNumerierungAbsatz" : active.SetPage TabNumerierungAbsatz
- case "TabTabulatoren" : active.SetPage TabTabulatoren
- case "TabInitialen" : active.SetPage TabInitialen
- case "TabUmrandung" : active.SetPage TabUmrandung
- case "TabHintergrund" : active.SetPage TabHintergrund
- end Select
-
- Kontext Options
-
-end function
-
-
-'*************************************************************************
-'This routine is executing format/character in writer , then tabpage Options
-'*************************************************************************
-function fFormatCharacter(Options as string)
-
- FormatCharacter
- Kontext
-
- Select case Options
- case "TabFont" : active.SetPage TabFont
- case "TabFontEffects" : active.SetPage TabFontEffects
- case "TabFontPosition" : active.SetPage TabFontPosition
- case "TabAsianLayout" : active.SetPage TabAsianLayout
- case "TabHyperlinkZeichen" : active.SetPage TabHyperlinkZeichen
- case "TabHintergrund" : active.SetPage TabHintergrund
- end Select
-
- Kontext Options
-
-end function
-
-
-
-'*************************************************************************
-'This routine is executing format/table in writer , then tabpage Options
-'*************************************************************************
-function fFormatTable(Options as string)
-
- FormatTable
- Kontext
-
- Select case Options
- case "TabTabelle" : active.SetPage TabTabelle
- case "TabTextflussTabelle" : active.SetPage TabTextflussTabelle
- case "TabSpaltenTabelle" : active.SetPage TabSpaltenTabelle
- case "TabUmrandung" : active.SetPage TabUmrandung
- case "TabHintergrund" : active.SetPage TabHintergrund
- end Select
-
- Kontext Options
-
-end function
-
-
-'*************************************************************************
-'This routine is executing Format/Styles / Catalog in writer , then tabpage Options
-'*************************************************************************
-function fFormatStylesCatalog(Options as string)
-
- FormatStylesCatalog
- Kontext "VorlagenKatalog"
-
- Select case Options
- case "Paragraph" : Vorlagen.Select 1
- case "Character" : Vorlagen.Select 2
- case "Frame" : Vorlagen.Select 3
- case "Page" : Vorlagen.Select 4
- case "Numbering" : Vorlagen.Select 5
- end Select
-
- Kontext Options
-
-end function
-
-
-'******************************************************************************
-'This routine is executing insert/fields/other in writer , then tabpage Options
-'*******************************************************************************
-function fInsertFieldsOther(Options as string)
-
- InsertFieldsOther
- Kontext
-
- Select case Options
- case "TabDokumentFeldbefehle" : active.SetPage TabDokumentFeldbefehle
- case "TabReferenzen" : active.SetPage TabReferenzen
- case "TabFunktionen" : active.SetPage TabFunktionen
- case "TabDokumentinfoFeldbefehle" : active.SetPage TabDokumentinfoFeldbefehle
- case "TabVariablen" : active.SetPage TabVariablen
- case "TabDatenbank" : active.SetPage TabDatenbank
- end Select
-
- Kontext Options
-
-end function
-
-
-'******************************************************
-'* insert a section with tabpage Options **
-'******************************************************
-function fInsertSection(Options as string)
-
- InsertSection
-
- Kontext
- if ( Active.exists( 2 ) ) then
- Select case Options
- case "TabBereiche" : active.SetPage TabBereiche
- case "TabSpalten" : active.SetPage TabSpalten
- case "TabSectionIndent" : active.SetPage TabSectionIndent
- case "TabHintergrund" : active.SetPage TabHintergrund
- case "TabFussEndnoten" : active.SetPage TabFussEndnoten
- end Select
- waitslot()
- else
- warnlog( "Failed to open <Insert Section> dialog" )
- endif
-
- Kontext Options
-
-end function
-
-
-'*************************************************************************
-'This routine is executing Tools/AutoCorrect in writer , then tabpage Options
-'*************************************************************************
-function fToolsAutocorrect(Options as string)
-
- Kontext
- ToolsAutoCorrect
-
- Select case Options
- case "TabErsetzung" : active.SetPage TabErsetzung
- case "TabAusnahmen" : active.SetPage TabAusnahmen
- case "TabOptionenAutokorrektur" : active.SetPage TabOptionenAutokorrektur
- case "TabLocalizedOptions" : active.SetPage TabLocalizedOptions
- case "TabWortergaenzung" : active.SetPage TabWortergaenzung
- end Select
-
- Kontext Options
-
-end function
-
-
-'******************************************************
-'* Open Format/Position and Size diglog with Options **
-'******************************************************
-function fPositionAndSize(Options as string)
-
- Kontext
- FormatPositionAndSize
-
- Select case Options
- case "TabPositionAndSizeWriter" : active.SetPage TabPositionAndSizeWriter
- case "TabDrehung" : active.SetPage TabDrehung
- case "TabSchraegstellen" : active.SetPage TabSchraegstellen
- end Select
-
- Kontext Options
-
-end function
-
diff --git a/testautomation/writer/optional/includes/tools/tools2.inc b/testautomation/writer/optional/includes/tools/tools2.inc
deleted file mode 100755
index 899d30b62775..000000000000
--- a/testautomation/writer/optional/includes/tools/tools2.inc
+++ /dev/null
@@ -1,412 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Tools for writer/Optional - 2
-'*
-'\***********************************************************************
-
-function fStartupNavigator(navigatorItem as String , subItemNum as Integer)
- '/// Start up Navigator , and set focus to the correct position
- Dim j as Integer
-
- Kontext "Navigator"
- if NOT Navigator.Exists then
- ViewNavigator
- end if
- Sleep 2
- Kontext "NavigatorWriter"
- if Auswahlliste.GetItemCount < 11 then
- Inhaltsansicht.Click
- Sleep 1
- end if
- Auswahlliste.TypeKeys "<Home>" '<- Set focus to first entry
- if Auswahlliste.GetItemCount > 11 then '<- If nodes are open
- For j= 1 to 12 '<- close all nodes
- Auswahlliste.Select j
- Sleep 1
- Auswahlliste.TypeKeys "-"
- Sleep 1
- next j
- end if
- Auswahlliste.TypeKeys "<Home>" ' point focus to first entry
- sleep 3
-
- Select case navigatorItem
- case "Headings" : goto GoON
- case "Tables" : Auswahlliste.TypeKeys "<down>"
- case "TextFrame" : Auswahlliste.TypeKeys "<down>" , 2
- case "Graphics" : Auswahlliste.TypeKeys "<down>" , 3
- case "OLEObject" : Auswahlliste.TypeKeys "<down>" , 4
- case "Bookmarks" : Auswahlliste.TypeKeys "<down>" , 5
- case "Section" : Auswahlliste.TypeKeys "<down>" , 6
- case "Hyperlinks" : Auswahlliste.TypeKeys "<down>" , 7
- case "References" : Auswahlliste.TypeKeys "<down>" , 8
- case "Indexes" : Auswahlliste.TypeKeys "<down>" , 9
- case "Notes" : Auswahlliste.TypeKeys "<down>" , 10
- case "DrawObjects" : Auswahlliste.TypeKeys "<down>" , 11
- end Select
- sleep 2
- GoON:
- Auswahlliste.TypeKeys "<return>"
- sleep 2
- Inhaltsansicht.Click
- sleep 2
- Auswahlliste.TypeKeys "<Up>",subItemNum
- sleep 2
-end function
-
-'-------------------------------------------------------------------------
-
-function fCloseNavigator
- Kontext "Navigator"
- hCloseDialog( Navigator, "close" )
-end function
-
-'-------------------------------------------------------------------------
-
-function StrToDouble ( sWert$ ) as Double
- '/// Transfer String to Double , including
- '/// 2.00cm --> 2.00
- '/// 2,00cm --> 2.00
- '/// 20% --> 20
-
- dim sDummy$
- dim i, i1, i2 as integer
- dim a as integer
- dim b as integer
- dim c as double
- dim n as integer
-
- '/// Input : {'a[. ,]b[mm cm " pi pt]' with a, b as integer} as String
- '///+ Output: a[. , ]b as double
-
- ' get rid of measure unit, the only single character is '"' all others are two chars
-
- if (isNumeric (sWert$) = FALSE) then
- if ( (StrComp (right (sWert$, 1), chr$(34) ) = 0) OR (StrComp (right (sWert$, 1), "%") = 0 )) then
- sDummy$ = Left ( sWert$, Len(sWert$)-1 )
- else
- sDummy$ = Left ( sWert$, Len(sWert$)-Len(gMeasurementUnit) )
- end if
- else
- sDummy$ = sWert$
- end if
- ' get position of fraction mark
- i1 = instr (sDummy$, ",") ' wrong output
- i2 = instr (sDummy$, ".")
- if i1 > i2 then i = i1 else i = i2
- ' vorkommateil
- try
- a = val (left (sDummy$,i-1))
- catch
- a = val ( sDummy$ )
- c = 0
- GoTo OK
- endcatch
-
- n = (len (sDummy$)-i)
- b = val (right (sDummy$, n) )
- c = b * 10 ^ -n
- OK:
- StrToDouble = a + c
-end function
-
-'-------------------------------------------------------------------------
-
-function fCalculateTolerance (sNumber1 , sNumber2) as Single
- '/// Change 2 parameters to number , then Compare them and return the result.
- Dim ss as Single
- Dim dNumber1 , dNumber2 as Single
- Dim iCommaLocation1 , iCommaLocation2 as Integer
-
- 'the code below 4 lines is set "2,00cm" to "2.00"cm if needed
- iCommaLocation1 = InStr(sNumber1 , ",")
- if iCommaLocation1 > 0 then
- sNumber1 = Left(sNumber1 , iCommaLocation1-1) + "." + Right(sNumber1,Len(sNumber1) - iCommaLocation1)
- end if
-
- iCommaLocation2 = InStr(sNumber2 , ",")
- if iCommaLocation2 > 0 then
- sNumber2 = Left(sNumber2 , iCommaLocation2-1) + "." + Right(sNumber2,Len(sNumber2) - iCommaLocation2)
- end if
-
- dNumber1 = Val( Left(sNumber1, Len(sNumber1)-Len(gMeasurementUnit) ))
- dNumber2 = Val( Left(sNumber2, Len(sNumber2)-Len(gMeasurementUnit) ))
-
- fCalculateTolerance = Abs( dNumber1 - dNumber2 )
-end function
-
-'-------------------------------------------------------------------------
-
-function fFindWord (sTest) as String
- '/// Set the focus to the word which you want
- Kontext
- EditSearchAndReplace
- Kontext "FindAndReplace"
- SearchFor.SetText sTest
- Sleep 1
- SearchAll.Click
- Sleep 1
- FindAndReplace.Close
-end function
-
-'-------------------------------------------------------------------------
-
-function fGetLanguageName( CountryID as Integer ) as String
- '/// This routine will return the Language name based on CountryID
- select case iSprache
- case 01 : ' English (USA)
- select case CountryID
- case 1: fGetLanguageName = "English (USA)"
- case 31: fGetLanguageName = "Dutch (Netherlands)"
- case 33: fGetLanguageName = "French (France)"
- case 34: fGetLanguageName = "Spanish (Spain)"
- case 39: fGetLanguageName = "Italian (Italy)"
- case 46: fGetLanguageName = "Swedish (Sweden)"
- case 49: fGetLanguageName = "German (Germany)"
- case 55: fGetLanguageName = "Portuguese (Brazil)"
- case 81: fGetLanguageName = "Japanese"
- case 82: fGetLanguageName = "Korean (RoK)"
- case 86: fGetLanguageName = "Chinese (simplified)"
- case 88: fGetLanguageName = "Chinese (traditional)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 31 : ' Dutch
- select case CountryID
- case 1: fGetLanguageName = "Engels (VS)"
- case 31: fGetLanguageName = "Netherlands (NL)"
- case 33: fGetLanguageName = "Frans (Frankrijk)"
- case 34: fGetLanguageName = "Spaans (Spanje)"
- case 39: fGetLanguageName = "Italiaans (Itali�)"
- case 46: fGetLanguageName = "Zweeds (Zweden)"
- case 49: fGetLanguageName = "Duits (Duitsland)"
- case 55: fGetLanguageName = "Portugees (Brazili�)"
- case 81: fGetLanguageName = "Japans"
- case 82: fGetLanguageName = "Korean (RoK)"
- case 86: fGetLanguageName = "Chinese (vereenvoudigd)"
- case 88: fGetLanguageName = "Chinese (traditioneel)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 33 : ' France
- select case CountryID
- case 1: fGetLanguageName = "Anglais (U.S.A.)"
- case 31: fGetLanguageName = "N�erlandais (Pays-Bas)"
- case 33: fGetLanguageName = "Français (France)"
- case 34: fGetLanguageName = "Espagnol (Espagne)"
- case 39: fGetLanguageName = "Italien (Italie)"
- case 46: fGetLanguageName = "Suédois (Suède)"
- case 49: fGetLanguageName = "Allemand (Allemagne)"
- case 55: fGetLanguageName = "Portugais (Brésil)"
- case 81: fGetLanguageName = "Japonais"
- case 82: fGetLanguageName = "Coréen"
- case 86: fGetLanguageName = "Chinois (simple)"
- case 88: fGetLanguageName = "Chinois (traditionnel)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 34 : ' Spanish
- select case CountryID
- case 1: fGetLanguageName = "Inglés (EE.UU.)"
- case 31: fGetLanguageName = "Holand�s (Pa�ses Bajos)"
- case 33: fGetLanguageName = "Francés (Francia)"
- case 34: fGetLanguageName = "Español (España)"
- case 39: fGetLanguageName = "Italiano (Italia)"
- case 46: fGetLanguageName = "Sueco (Suecia)"
- case 49: fGetLanguageName = "Alemán (Alemania)"
- case 55: fGetLanguageName = "Portugués (Brasil)"
- case 81: fGetLanguageName = "Japonés"
- case 82: fGetLanguageName = "Coreano"
- case 86: fGetLanguageName = "Chino (simple)"
- case 88: fGetLanguageName = "Chino (tradicional)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 39 : ' Italy
- select case CountryID
- case 1: fGetLanguageName = "Inglese (US)"
- case 31: fGetLanguageName = "Olandese (Paesi Bassi)"
- case 33: fGetLanguageName = "Francese (Francia)"
- case 34: fGetLanguageName = "Spagnolo (Spagna)"
- case 39: fGetLanguageName = "Italiano (Italia)"
- case 46: fGetLanguageName = "Svedese (Svezia)"
- case 49: fGetLanguageName = "Tedesco (Germania)"
- case 55: fGetLanguageName = "Portoghese (Brasile)"
- case 81: fGetLanguageName = "Giapponese"
- case 82: fGetLanguageName = "Coreano"
- case 86: fGetLanguageName = "Cinese (semplificato)"
- case 88: fGetLanguageName = "Cinese (tradizionale)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 46 : ' Swedish
- select case CountryID
- case 1: fGetLanguageName = "engelska"
- case 31: fGetLanguageName = "Holl�ndska (Nederl�nderna)"
- case 33: fGetLanguageName = "franska (Frankrike)"
- case 34: fGetLanguageName = "spanska (Spanien)"
- case 39: fGetLanguageName = "italienska (Italien)"
- case 46: fGetLanguageName = "svenska (Sverige)"
- case 49: fGetLanguageName = "tyska (Tyskland)"
- case 55: fGetLanguageName = "portugisiska (Brasilien)"
- case 81: fGetLanguageName = "japanska"
- case 82: fGetLanguageName = "koreanska"
- case 86: fGetLanguageName = "kinesiska (enkel)"
- case 88: fGetLanguageName = "kinesiska (trad.)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 49 : ' German
- select case CountryID
- case 1: fGetLanguageName = "Englisch (USA)"
- case 31: fGetLanguageName = "Niederl�ndisch (Niederlande)"
- case 33: fGetLanguageName = "Französisch (Frankreich)"
- case 34: fGetLanguageName = "Spanisch (Spanien)"
- case 39: fGetLanguageName = "Italienisch (Italien)"
- case 46: fGetLanguageName = "Schwedisch (Schweden)"
- case 49: fGetLanguageName = "Deutsch (Deutschland)"
- case 55: fGetLanguageName = "Portugiesisch (Brasilien)"
- case 81: fGetLanguageName = "Japanisch"
- case 82: fGetLanguageName = "Koreanisch"
- case 86: fGetLanguageName = "Chinesisch (einfach)"
- case 88: fGetLanguageName = "Chinesisch (Trad.)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 55 : ' Portuguese
- select case CountryID
- case 1: fGetLanguageName = "Inglês (EUA)"
- case 31: fGetLanguageName = "Holand�s (Holanda)"
- case 33: fGetLanguageName = "Francês (França)"
- case 34: fGetLanguageName = "Espanhol (Espanha)"
- case 39: fGetLanguageName = "Italiano (Itália)"
- case 46: fGetLanguageName = "Sueco (Suécia)"
- case 49: fGetLanguageName = "Alemão (Alemanha)"
- case 55: fGetLanguageName = "Português (Brasil)"
- case 81: fGetLanguageName = "Japonês"
- case 82: fGetLanguageName = "Coreano"
- case 86: fGetLanguageName = "Chinês (simplificado)"
- case 88: fGetLanguageName = "Chinês (Tradicional)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 81 : ' Japanese
- select case CountryID
- case 1: fGetLanguageName = "英語(米国)"
- case 33: fGetLanguageName = "フランス語(フランス)"
- case 34: fGetLanguageName = "スペイン語(スペイン)"
- case 39: fGetLanguageName = "イタリア語(イタリア)"
- case 46: fGetLanguageName = "スウェーデン語(スウェーデン)"
- case 49: fGetLanguageName = "ドイツ語(ドイツ)"
- case 55: fGetLanguageName = "�?ルトガル語(ブラジル)"
- case 81: fGetLanguageName = "日本語"
- case 82: fGetLanguageName = "韓国語"
- case 86: fGetLanguageName = "中国語(簡体字)"
- case 88: fGetLanguageName = "中国語(�?体字)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 82 : ' Korean
- select case CountryID
- case 1: fGetLanguageName = "�?어(미국)"
- case 33: fGetLanguageName = "스페�?�어(스페�?�)"
- case 34: fGetLanguageName = "프랑스어(프랑스)"
- case 39: fGetLanguageName = "�?�탈리아어 (�?�태리)"
- case 46: fGetLanguageName = "스웨�?�어(스웨�?�)"
- case 49: fGetLanguageName = "�?��?�어(�?��?�)"
- case 55: fGetLanguageName = "�?�르투갈어(브�?�질)"
- case 81: fGetLanguageName = "�?�본어"
- case 82: fGetLanguageName = "한국어"
- case 86: fGetLanguageName = "중국어(간체)"
- case 88: fGetLanguageName = "중국어(번체)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 86 : ' Chinese (simplified)
- select case CountryID
- case 1: fGetLanguageName = "英语(美国)"
- case 33: fGetLanguageName = "法语(法国)"
- case 34: fGetLanguageName = "西�?�牙语(西�?�牙)"
- case 39: fGetLanguageName = "�?大利语(�?大利)"
- case 46: fGetLanguageName = "瑞典语(瑞典)"
- case 49: fGetLanguageName = "德语(德国)"
- case 55: fGetLanguageName = "葡�?�牙语(巴西)"
- case 81: fGetLanguageName = "日语"
- case 82: fGetLanguageName = "�?鲜语"
- case 86: fGetLanguageName = "中文(简体字)"
- case 88: fGetLanguageName = "中文(�?体字)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case 88 : ' Chinese (traditional)
- select case CountryID
- case 1: fGetLanguageName = "英語(美國)"
- case 33: fGetLanguageName = "法語(法國)"
- case 34: fGetLanguageName = "西�?�牙語(西�?�牙)"
- case 39: fGetLanguageName = "�?大利語(�?大利)"
- case 46: fGetLanguageName = "瑞典語(瑞典)"
- case 49: fGetLanguageName = "德語(德國)"
- case 55: fGetLanguageName = "葡�?�牙語(巴西)"
- case 81: fGetLanguageName = "日語"
- case 82: fGetLanguageName = "韓語"
- case 86: fGetLanguageName = "中文(簡體字)"
- case 88: fGetLanguageName = "中文(�?體)"
- case else :
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-
- case else : ' Fallback
- QAErrorLog "Now, the test does not support for the language " +iSprache
- fGetLanguageName = ""
- end select
-end function
diff --git a/testautomation/writer/optional/includes/undo/w_undo1.inc b/testautomation/writer/optional/includes/undo/w_undo1.inc
deleted file mode 100755
index 4134d1a8fa9f..000000000000
--- a/testautomation/writer/optional/includes/undo/w_undo1.inc
+++ /dev/null
@@ -1,352 +0,0 @@
-'**************************************************************************
-' 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@oracle.com
-'*
-'* short description : Writer Undo/Redo - Test
-'*
-'\***********************************************************************
-
-testcase tEditUndoRedo
- '/// Edit / Undo - Redo ///
- PrintLog "- Edit / Undo - Redo"
- Printlog " - Set Undobuffer to 2"
- '/// Call Options and Set Number of steps to 2 ///
- ToolsOptions
- Call hToolsOptions("StarOffice","Memory")
- UndoSteps.SetText "2"
- '/// Close Optionsdialog ///
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- '/// New document ///
- Call hNewDocument
- '/// Write any text in document and insert a table ///
- Call wTypeKeys "Clipboard"
- Call hTabelleEinfuegen
- Call wTypeKeys "<Down><Down>text"
-
- '/// Call Edit / Undo 2 times ///
- printlog " - Undo 2 times"
- EditUndo
- Sleep 1
- EditUndo
- Sleep 1
- '/// try Undo more than two 2 times ///
- try
- EditUndo
- Sleep 1
- Warnlog "Possible to perform Undo more than 2 times!"
- EditRedo
- catch
- Sleep 1
- endcatch
- '/// Check if Undo has been worked correctly ///
- Call wTypeKeys "<Shift Home>"
- EditCopy
- if GetClipboardText <> "Clipboard" then Warnlog "Undo is not working correct"
- Call wTypeKeys "<End>"
-
- '/// select Redo 2 times ///
- printlog " - Redo 2 times"
- EditRedo
- Sleep 1
- EditRedo
- Sleep 1
- '/// try Redo more than 2 times ///
- try
- EditRedo
- Warnlog "Able to perform Redo more than 2 times"
- catch
- Sleep 1
- endcatch
- EditCopy
- if GetClipboardText <> "text" then Warnlog "Redo is not working correct"
- '/// Close document ///
- Call hCloseDocument
- Sleep 2
-
- '/// Select Options again and try to set Undobuffer to 0 (min should be 1) ///
- Printlog " - set Undobuffer to 0"
- ToolsOptions
- Call hToolsOptions("StarOffice","Memory")
- UndoSteps.ToMin
- if UndoSteps.GetText <> "1" then
- Warnlog "Undobuffer has not been set to 1!"
- else
- Printlog " - Undobuffer can only set to 1!"
- end if
- '/// Close Optionsdialog ///
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// New document ///
- Call hNewDocument
- Call wTypeKeys "Don't undo this<Return>Undo this"
- '/// Insert any text and try to Undo more than 1 time ///
-
- EditUndo
- try
- EditUndo
- Warnlog "More than one Undo could be performed!"
- catch
- endcatch
- Call wTypeKeys "<Shift Home>"
- Wait 500
- EditCopy
- if GetClipboardText <> "Undo " then Warnlog "The UndoStep couldn't performed correct!"
-
- '/// Close document ///
- Call hCloseDocument
-
- Printlog " - Set Undobuffer to Default ( 20 )"
- '/// Open options again and set Number of steps for Undo to default (20) ///
- ToolsOptions
- Call hToolsOptions("StarOffice","Memory")
- UndoSteps.SetText "20"
-
- '/// Close Options ///
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-endcase
-
-' -----------------------------------------------------------------------------------
-
-testcase tEditUndoTOX
- QaErrorLog "tEditUndoTOX outcommented due to makeover."
- goto endsub
-
- Dim CompareThis as string, Compare1 as string, Compare2 as string, Compare3 as string
- Dim CompareWith1 as string, CompareWith2 as string, MenuEntryEnabled as boolean
- ' Strings depends on the language so this testcase has to be adapted for all languages
- Select Case iSprache
- Case 1: Compare1 = "Undo: "
- Compare2 = "Insert index/table"
- Compare3 = "Remove index/table"
- Case 49:Compare1 = "R�ckg�ngig"
- Compare2 = "Einf�gen Verzeichnis"
- Compare3 = "Verzeichnis aufheben"
- Case else:
- QAErrorlog "Please adapt this testcase for this language!"
- Compare1 = "Undo: "
- Compare2 = "Insert index/table"
- Compare3 = "Remove index/table"
- end select
- CompareWith1 = Compare1 & Compare2
- CompareWith2 = Compare1 & Compare3
-
- '/// Open a new writerdocument
- Call hNewDocument
-
- '/// Insert an index in document
- printlog "Insert Index"
- InsertIndexes
-
- Kontext
- Active.Setpage TabVerzeichnisseVerzeichnis
- Kontext "TabVerzeichnisseVerzeichnis"
- Verzeichnistitel.Settext "MyUndoRedoIndex"
- TabVerzeichnisseVerzeichnis.Ok
-
- '/// Check if Edit/Undo menu shows 'Undo: Insert Index'
- Call hUseMenu()
- try
- MenuSelect(Menugetitemid(2)) ' Opens the Edit - Menu
- MenuEntryEnabled = True
- catch
- MenuEntryEnabled = False
- endcatch
- if MenuEntryEnabled = True then
- CompareThis = hhEntferneTilde(MenuGetItemText(Menugetitemid(1)))
- Call MenuSelect(0)
- if CompareWith1 > "" then
- if CompareThis <> CompareWith1 then
- Warnlog "Edit / Undo entry is wrong: " & CompareThis
- else
- printlog " - Menu Edit / Undo is ok"
- end if
- else
- QAErrorLog "Use this string in this testcase: " & CompareThis
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Edit / Undo in menu is disabled !"
- end if
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up><Home>"
- Wait 500
- '/// Check if Undo dropdown-Icon shows: 'Insert index'
- Select Case CheckUndoEntry ( 1, Compare2 )
- Case 0: Warnlog " - Undo-dropdown is disabled!"
- Case 1: Warnlog " - Entry in Undo-dropdown is wrong!"
- Case 2: printlog " - Entry in Undo-dropdown is ok!"
- end select
-
- '/// Update index with context menu entry: Update index"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- ' Update Index/table in context menu
- printlog "Update Index"
- Call MenuSelect(Menugetitemid(7))
-
- '/// Check if Edit/Undo menu shows 'Undo: Insert Index' after index update
- Call hUseMenu()
- try
- MenuSelect(Menugetitemid(2)) ' Opens the Edit - Menu
- MenuEntryEnabled = True
- catch
- MenuEntryEnabled = False
- endcatch
- if MenuEntryEnabled = True then
- CompareThis = hhEntferneTilde(MenuGetItemText(Menugetitemid(1)))
- Call MenuSelect(0)
- if CompareWith1 > "" then
- if CompareThis <> CompareWith1 then
- Warnlog "Edit / Undo entry is wrong: " & CompareThis
- else
- printlog " - Menu Edit / Undo is ok"
- end if
- else
- QAErrorLog "Use this string in this testcase: " & CompareThis
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Edit / Undo in menu is disabled !"
- end if
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up><Home>"
- Wait 500
- '/// Check if Undo dropdown-Icon shows: 'Insert index' after index update
- Select Case CheckUndoEntry ( 1, Compare2 )
- Case 0: Warnlog " - Undo-dropdown is disabled!"
- Case 1: Warnlog " - Entry in Undo-dropdown is wrong!"
- Case 2: printlog " - Entry in Undo-dropdown is ok!"
- end select
-
- '/// Delete index with context menu entry: Delete index"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- ' Delete Index/table in context menu
- printlog "Remove Index"
- Call MenuSelect(Menugetitemid(9))
-
- '/// Check if Edit/Undo menu shows 'Undo: Remove index' after deleting index
- Call hUseMenu()
- try
- MenuSelect(Menugetitemid(2)) ' Opens the Edit - Menu
- MenuEntryEnabled = True
- catch
- MenuEntryEnabled = False
- endcatch
- if MenuEntryEnabled = True then
- CompareThis = hhEntferneTilde(MenuGetItemText(Menugetitemid(1)))
- Call MenuSelect(0)
- if CompareWith2 > "" then
- if CompareThis <> CompareWith2 then
- Warnlog "Edit / Undo entry is wrong: " & CompareThis
- else
- printlog " - Menu Edit / Undo is ok"
- end if
- else
- QAErrorLog "Use this string in this testcase: " & CompareThis
- Call hCloseDocument
- goto endsub
- end if
- else
- Warnlog "Edit / Undo in menu is disabled !"
- end if
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<Up><Home>"
- Wait 500
- '/// Check if Undo dropdown-Icon shows: 'Remove index' after deleting index
- Select Case CheckUndoEntry ( 1, Compare3 )
- Case 0: Warnlog " - Undo-dropdown is disabled!"
- Case 1: Warnlog " - Entry in Undo-dropdown is wrong!"
- Case 2: printlog " - Entry in Undo-dropdown is ok!"
- end select
-
- printlog "Working undo"
- '/// Edit / Undo 1 time -> Index should be restored
- EditUndo
- Sleep 1
- Call wNavigatorAuswahl ( 10, 1 )
- wait 500
- InsertIndexes
-
- wait 500
- Kontext
- try
- Active.Setpage TabVerzeichnisseVerzeichnis
- catch
- Warnlog "Index dialog has not been opened!"
- Call hCloseDocument
- goto endsub
- endcatch
-
- Kontext "TabVerzeichnisseVerzeichnis"
- if Verzeichnistitel.Gettext = "MyUndoRedoIndex" then
- printlog " - Index has been restored"
- TabVerzeichnisseVerzeichnis.Cancel
- '/// Check if Undo dropdown-Icon shows: 'Insert index'
- Select Case CheckUndoEntry ( 1, Compare2 )
- Case 0: Warnlog " - Undo-dropdown is disabled!"
- Case 1: Warnlog " - Entry in Undo-dropdown is wrong!"
- Case 2: printlog " - Entry in Undo-dropdown is ok!"
- end select
-
- '/// Check if Redo dropdown-Icon shows: 'Remove index' after deleting index
- Select Case CheckRedoEntry ( 1, Compare3 )
- Case 0: Warnlog " - Redo-dropdown is disabled!"
- Case 1: Warnlog " - Entry in Redo-dropdown is wrong!"
- Case 2: printlog " - Entry in Redo-dropdown is ok!"
- end select
-
- '/// Edit / Undo one more time
- '/// Check if Undo dropdown-Icon is disabled
- Select Case CheckUndoEntry ( 1, Compare2 )
- Case 0: printlog " - Undo-dropdown is disabled!"
- Case 1: Warnlog " - Entry in Undo-dropdown is enabled!"
- Case 2: Warnlog " - Entry in Undo-dropdown is enabled!"
- end select
-
- '/// Check if Redo dropdown-Icon shows: 'Insert index' after Undo 2 times
- Select Case CheckRedoEntry ( 1, Compare2 )
- Case 0: Warnlog " - Redo-dropdown is disabled!"
- Case 1: Warnlog " - Entry in Redo-dropdown is wrong!"
- Case 2: printlog " - Entry in Redo-dropdown is ok!"
- end select
-
- else
- Warnlog "Index has not been removed!"
- TabVerzeichnisseVerzeichnis.Cancel
- end if
-
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/undo/w_undo_history_1.inc b/testautomation/writer/optional/includes/undo/w_undo_history_1.inc
deleted file mode 100644
index 142f7ad1e266..000000000000
--- a/testautomation/writer/optional/includes/undo/w_undo_history_1.inc
+++ /dev/null
@@ -1,204 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Writer Undo-History - Test ( Typing, Overwrite, Replace, Delete, Sort, Convert To table)
-'*
-'\***********************************************************************
-
-sub w_undo_history_1
-
- ' a < 20 characters long string
- Call tUndoOverwrite ' Typing & Overwrite
- Call tUndoFindAndReplace ' Replace
- Call tUndoReplaceAll ' Replace all & Delete
- Call tUndoSort ' Sort
- Call tUndoTableConvert ' Text convert to table
-
-end sub
-
-testcase tUndoOverwrite
-
- '/// new document
- Call hNewDocument
- '/// <U><B>CHECK: Typing</B></U>
- printlog "- TYPING"
- '/// write a < 20 characters long string: If20CharactersThere
- Call wTypeKeys "If20CharactersThere"
- '/// string in Undo list has to be: Typing: If20CharactersThere
- Call CheckUndoStringInUndoList ( 1, "'If20Char...rsThere'" )
-
- '/// <U><B>CHECK: Overwrite</B></U>
- printlog "- OVERWRITE"
- '/// press 'Home' key
- Call wTypeKeys "<Home>"
- '/// press 'Ins' key
- Call wTypeKeys "<Insert>"
- '/// write a < 20 characters long string: IsThatDifferent4You
- Call wTypeKeys "IsThatDifferent4You"
- '/// string in Undo list has to be: Overwrite: IsThatDifferent4You
- Call CheckUndoStringInUndoList ( 2, "'IsThatDifferent4You'" )
-
- '/// CloseDocument
- Call hCloseDocument
-endcase
-
-testcase tUndoFindAndReplace
-
- '/// new Document
- '/// <U><B>CHECK: Replace</B></U>
- printlog "- REPLACE"
- Call hNewDocument
- '/// write a < 20 characters long string: If20CharactersThere
- Call wTypeKeys "If20CharactersThere"
- '/// Select text
- Call wTypeKeys "<Shift Home>"
- '/// Edit / Find and Replace
- EditSearchAndReplace
- Kontext "FindAndReplace"
- '/// Type 'ThisReplacementText' in 'Replace with' field
- ReplaceWith.Settext "ThisReplacementText"
- '/// Choose Button 'Replace' and close dialog
- ReplaceBtn.Click
- wait 500
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- catch
- Active.Ok
- endcatch
- end if
- end if
- Kontext "FindAndReplace"
- FindAndReplace.Close
- Kontext "DocumentWriter"
- '/// string in Undo list has to be: Replace: 'IsThatDifferent4You' -> 'ThisReplacementText'
- Call CheckUndoStringInUndoList ( 3, "'If20CharactersThere' -> 'ThisReplacementText'" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoReplaceAll
- Dim CheckString as string
-
- '/// new document
- '/// <U><B>CHECK: Replace all</B></U>
- printlog "- REPLACE ALL"
- Call hNewDocument
- '/// Insert the dummy text and point cursor at the top of the document
- Call wBlindtextEinfuegen
- Call wTypeKeys "<Mod1 Home>"
- '/// Edit / Find and Replace
- EditSearchAndReplace
- Kontext "FindAndReplace"
- '/// Type 'and' in 'Search for' field
- SearchFor.Settext "and"
- '/// Type 'ThisReplacementText' in 'Replace with' field
- ReplaceWith.Settext "###"
- '/// Choose Button 'Replace' and close dialog
- ReplaceAll.Click
- wait 500
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.Ok
- end if
- Kontext "FindAndReplace"
- FindAndReplace.Close
-
- Kontext "DocumentWriter"
- '/// string in Undo list has to be: Replace: '14 occurrences of and'
- Call CheckUndoStringInUndoList ( 5, "14 occurrences of 'and'" )
-
- '/// <U><B>CHECK: Delete</B></U>
- '/// Backspace 4 times to delete characters
- Call wTypeKeys "<Backspace>", 4
- '/// string in Undo list has to be: Delete: '###'
- printlog "- DELETE"
- Call CheckUndoStringInUndoList ( 11, "' ###'" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoSort
-
- '/// new document
- Call hNewDocument
- '/// CHECK: Text sort
- printlog "- TEXT SORT"
- '/// Enter some text like "This<Return>is a<Return>test<Return>"
- Call wTypeKeys "This"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "is a"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "test"
- Call wTypeKeys "<Return>"
- '/// Select all and Tools -> Sort
- Call wTypeKeys "<Mod1 A>"
- ToolsSort
- Kontext "Sortieren"
- Sortieren.Ok
-
- '/// string in Undo list has to be: "Sort text"
- Call CheckUndoStringInUndoList ( 6, "Sort text" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoTableConvert
-
- '/// new document
- Call hNewDocument
- '/// CHECK: Text convert to table
- printlog "TEXT CONVERT TO TABLE"
- '/// Enter some text like "This<Return>is a<Return>test<Return>"
- Call wTypeKeys "This"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "is a"
- Call wTypeKeys "<Return>"
- Call wTypeKeys "test"
- Call wTypeKeys "<Return>"
- '/// Select all and Tools - Text <> Table
- Call wTypeKeys "<Mod1 A>"
- ToolsTextInTable
- Kontext "TextInTabelleUmwandeln"
- Absatz.Check
- TextInTabelleUmwandeln.Ok
- '/// string in Undo list has to be: "Convert text -> table"
- Call CheckUndoStringInUndoList ( 7, "Convert text -> table" )
-
- '/// Close document
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/undo/w_undo_history_2.inc b/testautomation/writer/optional/includes/undo/w_undo_history_2.inc
deleted file mode 100755
index 00ab93506eee..000000000000
--- a/testautomation/writer/optional/includes/undo/w_undo_history_2.inc
+++ /dev/null
@@ -1,528 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Writer Undo-History - Test
-'*
-'\***********************************************************************
-
-sub w_undo_history_2
-
- ' a > 20 characters long string
- Call tUndoOverwriteLong ' Typing & Overwrite
- Call tUndoFindAndReplaceLong ' Replace
- Call tUndoDeleteMultiSelection ' Delete a multi-selection
- Call tUndoParagraph ' Paragraphs
- Call tUndoClipboard ' Copy/Paste
- Call tUndoChanges ' Changes accept an reject
- Call tUndoLineBreak ' Manual breaks - line break
- Call tUndoColumnBreak ' Manual breaks - column break
- Call tUndoPageBreak ' Manual breaks - page break
- Call tUndoFields ' Fields (Insert/Modify / Delete)
- Call tUndoSpecialCharacter ' Special Character (Insert/ Delete)
- Call tUndoStyles ' Styles (Apply/Modify/Find&Replace/Promote/Demote)
-
-end sub
-
-testcase tUndoOverwriteLong
-
- '/// <B>Typing & overwrite a > 20 characters long string</B>
- '/// new document
- Call hNewDocument
- '/// <U><B>CHECK: Typing</B></U>
- printlog "- TYPING"
- '/// write a > 20 characters long string: ThisSentenceHasMoreThan20Characters
- Call wTypeKeys ( "ThisSentenceHasMoreThan20Characters" )
- '/// string in Undo list has to be: Typing: ThisSente...aracters
- Call CheckUndoStringInUndoList ( 1, "'ThisSent...racters'" )
-
- '/// <U><B>CHECK: Overwrite</B></U>
- printlog "- OVERWRITE"
- '/// press 'Home' key
- Call wTypeKeys "<Home>"
- '/// press 'Ins' key
- Call wTypeKeys "<Insert>"
- '/// write a > 20 characters long string: ThePreviousSentenceHasBeenOverwritten
- Call wTypeKeys ( "ThePreviousSentenceHasBeenOverwritten" )
- '/// string in Undo list has to be: Overwrite: ThePrevio...rwritten
- Call CheckUndoStringInUndoList ( 2, "'ThePrevio...rwritten'" )
-
- '/// CloseDocument
- Call hCloseDocument
-endcase
-
-
-testcase tUndoFindAndReplaceLong
-
- '/// <B>Replace a > 20 characters long string</B>
- '/// new Document
- '/// <U><B>CHECK: Replace</B></U>
- printlog "- REPLACE"
- Call hNewDocument
- '/// write a > 20 characters long string: ThePreviousSentenceHasBeenOverwritten
- Call wTypeKeys ( "ThePreviousSentenceHasBeenOverwritten" )
- '/// Select text
- Call wTypeKeys ( "<Shift Home>" )
- '/// Edit / Find and Replace
- EditSearchAndReplace
- Kontext "FindAndReplace"
- '/// Type 'ThisIsAboutALongTextThatHadToBeReplaced' in 'Replace with' field
- ReplaceWith.Settext "ThisIsAboutALongTextThatHadToBeReplaced"
- '/// Choose Button 'Replace' and close dialog
- ReplaceBtn.Click
- wait 500
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- catch
- Active.Ok
- endcatch
- end if
- end if
- Kontext "FindAndReplace"
- FindAndReplace.Close
- Kontext "DocumentWriter"
- '/// string in Undo list has to be: Replace: 'ThePrevio...rwritten' -> 'ThisIsAbo...Replaced'
- Call CheckUndoStringInUndoList ( 3, "'ThePrevio...rwritten' -> 'ThisIsAbo...Replaced'" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoDeleteMultiSelection
-
- '/// <B>Delete a multi-selection</B>
- printlog "- Delete a multi-selection"
- '/// new Document
- Call hNewDocument
- '/// write down: the deletion of a multi-selection
- Call wTypeKeys ( "the deletion of a multi-selection" )
- '/// with Shift + F8 enter multi-selection mode
- Call wTypeKeys ( "<SHIFT F8>" )
- '/// multi-select "the ", " a" and "multi-"
- Call wTypeKeys ( "<MOD1 Left>" )
- Call wTypeKeys ( "<MOD1 SHIFT Left>", 2)
- Call wTypeKeys ( "<Left>" )
- Call wTypeKeys ( "<SHIFT Left>", 2)
- Call wTypeKeys ( "<Left>" )
- Call wTypeKeys ( "<MOD1 Left>", 2)
- Call wTypeKeys ( "<Left>" )
- Call wTypeKeys ( "<MOD1 SHIFT Left>")
- '/// Delete the multi-selection
- Call wTypeKeys ( "<DELETE>" )
- '/// string in Undo-list has to be: 'Delete: multi-selection'"
- Call CheckUndoStringInUndoList ( 4, "Delete multiple selection" )
- '/// Close document
- Call hCloseDocument
-
-endcase
-
-
-testcase tUndoParagraph
-
- '/// <B>Insert and delete a paragraph</B>
- printlog "- Insert Paragraph"
- '/// new document
- Call hNewDocument
- '/// press return to insert a new paragraph
- Call wTypeKeys ( "<Return>" )
- '/// string in Undo-list has to be: "New paragraph"
- Call CheckUndoStringInUndoList ( 8, "New Paragraph" )
- printlog "- Delete Paragraph"
- '/// press Backspace to delete paragraph
- Call wTypeKeys ( "<Backspace>" )
- '/// string in Undo-list has to be: "Delete paragraph"
- Call CheckUndoStringInUndoList ( 8, "Delete Paragraph" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoClipboard
- Dim i as integer
-
- '/// <B>Copy / Paste</B>
- printlog "- Copy/Paste"
- '/// new document
- Call hNewDocument
- '/// Insert some text in document and copy it
- Call wTypeKeys ( "CopyAndPasteInUndoList" )
- Call wTypeKeys ( "<Shift Home>" )
- EditCopy
- Call wTypeKeys ( "<End><Return>" )
- '/// Paste the text in all available formats
- For i = 1 to 4
- Sleep 2
- try
- EditPasteSpecialWriter
- catch
- i=5
- endcatch
- Kontext "InhaltEinfuegen"
- try
- Auswahl.Select i
- printlog " - Paste as: " + Auswahl.GetSeltext
- wait 500
- catch
- Warnlog "Not 4 but " & Auswahl.GetItemCount & " Clipboard-formats"
- endcatch
- InhaltEinfuegen.Ok
- '/// string in Undo-list has to be: "Paste clipboard"
- Call CheckUndoStringInUndoList ( 9 )
- Call wTypeKeys ( "<Return>" )
- next i
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoChanges
-
- '/// <B>Changes accept and reject</B>
- printlog "- Changes accept and reject"
- '/// new document
- Call hNewDocument
- UseBindings
- '/// Select Edit / Changes / Record
- EditChangesRecord
- '/// Insert a string in document
- Call wTypeKeys ( "This is a test" )
- '/// Select Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- '/// Dialog 'Accept or reject changes' has to come up ///
- Kontext "Redlining"
- if Redlining.Exists then
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'
- Akzeptieren.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
- else
- Warnlog "Redlining dialog not up!"
- Call hCloseDocument
- goto endsub
- end if
- '/// string in Undo-list has to be: "Accept change: Insert 'this is a test'")
- Call CheckUndoStringInUndoList ( 10, "Accept" )
-
- '/// Insert a line break in document
- Call wTypeKeys ( "<Return>" )
- '/// Insert a string in document
- Call wTypeKeys ( "This is a test" )
- '/// Select Edit / Changes / Accept or Reject
- EditChangesAcceptOrReject
- '/// Dialog 'Accept or reject changes' has to come up ///
- Kontext "Redlining"
- if Redlining.Exists then
- '/// + Select tabpage 'List'
- TabControl.SetPage TabListe
- '/// + Select 'Accept All'
- wait 500
- ListItem.TypeKeys "<Up>"
- wait 500
- Ablehnen.Click
- Sleep 2
- '/// + Close Redlining dialog
- Redlining.Close
- else
- Warnlog "Redlining dialog not up!"
- Call hCloseDocument
- goto endsub
- end if
-
- '/// string in Undo-list has to be: "Reject change: Insert 'this is a test'")
- Call CheckUndoStringInUndoList ( 10, "Reject" )
-
- Call hCloseDocument
-endcase
-
-
-testcase tUndoLineBreak
-
- '/// <B>Manual breaks (line breaks)</B>
- printlog "Manual breaks (line breaks)"
- printlog "- Insert line break"
- '/// new document
- Call hNewDocument
- '/// Insert a line break (Shift return)
- Call wTypeKeys ( "<SHIFT RETURN>" )
- '/// string in Undo-list has to be: "Insert line break")
- Call CheckUndoStringInUndoList ( 10, "InsertLineBreak" )
-
- '/// Delete line break
- printlog "- Delete line break"
- Call wTypeKeys ( "<SHIFT RETURN><Backspace>" )
- '/// string in Undo-list has to be: "Delete line break")
- Call CheckUndoStringInUndoList ( 10, "DeleteLineBreak" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoColumnBreak
-
- '/// <B>Column breaks</B>
- printlog "- Column breaks"
- '/// new document
- Call hNewDocument
- '/// Format / Columns
- FormatColumns
- Kontext "FormatColumn"
- '/// set number of columns to 2
- Columns.Settext 2
- FormatColumn.Ok
- '/// Insert a column break (Strg+Shift+Return)
- Call wTypeKeys ( "<Mod1 Shift Return>" )
- printlog "Insert a column break"
- '/// string in Undo-list has to be: "Insert column break")
- Call CheckUndoStringInUndoList ( 10, "InsertColumnBreak" )
-
- '/// Delete a column break (Strg+Shift+Return+Backspace)
- printlog "Delete a column break"
- Call wTypeKeys ( "<Mod1 Shift Return><Backspace>" )
- '/// string in Undo-list has to be: "Delete column break")
- Call CheckUndoStringInUndoList ( 10, "DeleteColumnBreak" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoPageBreak
-
- '/// <B>Page breaks</B>
- printlog "- Page breaks"
- '/// new document
- Call hNewDocument
- '/// Format / Columns
- InsertManualBreak
- Kontext "UmbruchEinfuegen"
- printlog "Insert a page break"
- Seitenumbruch.Check
- UmbruchEinfuegen.Ok
- '/// string in Undo-list has to be: "Insert page break")
- Call CheckUndoStringInUndoList ( 10, "InsertPageBreak" )
-
- printlog "Delete a page break"
- InsertManualBreak
- Kontext "UmbruchEinfuegen"
- '/// Insert a page break
- Seitenumbruch.Check
- UmbruchEinfuegen.Ok
- Call wTypeKeys ( "<Backspace>" )
- '/// string in Undo-list has to be: "Delete page break")
- Call CheckUndoStringInUndoList ( 10, "DeletePageBreak" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoFields
-
- '/// <B>Fields (Insert/Modify / Delete)</B>
- printlog "- Fields (Insert)"
- '/// new document
- Call hNewDocument
- '/// Insert Field 'Date'
- InsertFieldsDate
- '/// string in Undo-list has to be: "Insert field")
- Call CheckUndoStringInUndoList ( 10, "InsertField" )
-
- printlog "- Fields (Modify)"
- '/// Press Home-key
- Call wTypeKeys ( "<Home>" )
- '/// Edit fields and select 4th entry in Format-list
- EditFields
- Kontext "FeldbefehlBearbeitenDokument"
- Zahlenformat.Select 4
- FeldbefehlBearbeitenDokument.Ok
- '/// string in Undo-list has to be: "Changed field")
- Call CheckUndoStringInUndoList ( 10, "ChangedField" )
-
- printlog "- Fields (Delete)"
- '/// Press delete-key
- Call wTypeKeys ( "<Delete>" )
- '/// string in Undo-list has to be: "Delete field")
- Call CheckUndoStringInUndoList ( 10, "DeleteField" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoSpecialCharacter
-
- '/// <B>Special Character (Insert / Delete )</B>
- printlog "- Special Character (Insert)"
- '/// new document
- Call hNewDocument
- '/// Insert a special Character
- InsertSpecialCharacterWriter
- Kontext "Sonderzeichen"
- SchriftListe.TypeKeys "<Home>"
- SchriftListe.TypeKeys "<Right>", 3
- Sonderzeichen.Ok
- '/// string in Undo-list has to be: "Insert special character")
- Call CheckUndoStringInUndoList ( 10, "InsertSpecialCharacter" )
-
- printlog "- Special Character (Delete)"
- '/// Delete special character with <Backspace>
- Call wTypeKeys ("<Backspace>" )
- Call CheckUndoStringInUndoList ( 10, "DeleteSpecialCharacter" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoStyles
- Dim i as integer, StyleText as string, UndoText as string
- Dim NewStyle as string
-
- '/// <B>Styles (Apply/Modify/Find&Replace/Promote/Demote)</B>
- printlog "- Styles (Apply)"
- '/// new document
- Call hNewDocument
- '/// type some text
- Call wTypeKeys ( "I have the new style" )
- '/// Select text
- Call wTypeKeys ( "<Shift Home>" )
- '/// Apply Style to a newly created style
- Call wStyleCreate ( "AUndoHistory", "Paragraph" )
- '/// string in Undo-list has to be: "Apply styles: AUndoHistory")
- Call CheckUndoStringInUndoList ( 10, "ApplyStyles" )
-
- '/// Modify Style through Stylist
- if wStyleSelect ( "AUndoHistory" ) = false then
- Warnlog "Defined style has not been found in Stylist->Test aborted"
- Call hCloseDocument
- goto endsub
- end if
-
- Vorlagenliste.OpenContextMenu
- Call hMenuSelectNr(2)
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- FontColor.Select FontColor.GetItemCount
- TabFontEffects.Ok
- Sleep 1
- '/// string in Undo-list has to be: "Change styles: AUndoHistory")
- Call CheckUndoStringInUndoList ( 10, "ChangeStyles" )
-
- printlog "Styles (Replace)"
- '/// Edit / Search and Replace
- EditSearchAndReplace
- kontext "FindAndReplace"
- if SearchForStyles.IsVisible = False then More.Click
- SearchForStyles.Check
- Sleep 1
- ReplaceWithStyle.Select 4
- wait 500
- ReplaceBtn.Click
- NewStyle = ReplaceWithStyle.GetSelText
- Select Case iSprache
- Case 01: StyleText = "Replace style: AUndoHistory -> " & NewStyle
- Case 34: StyleText = "Reemplazar estilo: AUndoHistory -> " & NewStyle
- Case 86: StyleText = "替æ¢æ ·å¼: AUndoHistory -> " & NewStyle
- Case else: QAErrorlog "Please adapt test for this language"
- end select
- wait 500
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.Yes
- catch
- Active.Ok
- endcatch
- end if
- end if
- kontext "FindAndReplace"
- SearchForStyles.UnCheck
- FindAndReplace.Close
-
- '/// string in Undo-list has to be: "Replace Styles: 'AUndoHistory -> ...")
- Kontext "StandardBar"
- try
- Undo.OpenMenu
- Kontext "UndoRedoBox"
- UndoText = UndoRedoList.GetItemText(1)
- if UndoText <> StyleText then
- Warnlog "Wrong text in Undo-List: " & UndoText
- end if
- Kontext "StandardBar"
- Undo.Click
- catch
- Warnlog "Something wrong checking Undo-List!"
- endcatch
-
- printlog "Styles (Promote)"
- '/// point cursor to beginning of document
- Call wTypeKeys ( "<Mod1 Home>" )
- ' To promote style it has to be in the heading group
- ToolsOutlineNumbering
- Kontext
- Active.SetPage TabKapitelnumerierung
- Kontext "TabKapitelnumerierung"
- Absatzvorlage.Select NewStyle
- TabKapitelnumerierung.Ok
-
- Call wNavigatorAuswahl ( 1, 1, true )
- Kontext "NavigatorWriter"
- '/// Select Promote in Navigator
- try
- Senken.Click
- '/// string in Undo-list has to be: "Demote Outline")
- Call CheckUndoStringInUndoList ( 10, "DemoteOutline" )
- catch
- Warnlog "Unable to demote outline"
- endcatch
-
- '/// Select Demote in Navigator
- printlog "Styles (Demote)"
- Kontext "NavigatorWriter"
- try
- Senken.Click
- '/// string in Undo-list has to be: "Promote Outline")
- Call CheckUndoStringInUndoList ( 10, "PromoteOutline" )
- catch
- Warnlog "Unable to promote outline"
- endcatch
-
- '/// CloseDocument
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/undo/w_undo_history_3.inc b/testautomation/writer/optional/includes/undo/w_undo_history_3.inc
deleted file mode 100755
index ded462ff63c1..000000000000
--- a/testautomation/writer/optional/includes/undo/w_undo_history_3.inc
+++ /dev/null
@@ -1,687 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Writer Undo-History - Test
-'*
-'\***********************************************************************
-
-sub w_undo_history_3
-
- Call tUndoSection ' Section (Insert/Modify/Delete)
- Call tUndoHyperlink ' Hyperlink (Insert as Text/as URL button)
- Call tUndoFootnote ' Footnote (Insert/Modify/Delete)
- Call tUndoCaption ' Insert Caption
- Call tUndoAutoText ' Insert Autotext
- Call tUndoBookmark ' Bookmark (Insert/Rename/Delete)
- Call tUndoComment ' Comment (Insert/Delete)
- Call tUndoScript ' Script (Insert/Delete)
- Call tUndoIndexes ' Index/Bibliography entrys (Insert/Delete)
- Call tUndoFrames ' Frames (Insert/Rename/Delete)
- Call tUndoTableGeneral ' Tables Part 1
- Call tUndoTableOptionsMerge ' Tables Part 2
- Call tUndoTableConvertSort ' Tables Part 3
- Call tUndoTableSplitDelete ' Tables Part 4
- Call tUndoHorizontalRuler ' Horizontal ruler
- Call tUndoGraphics ' Graphics (Insert/Replace/Delete)
-
-end sub
-
-testcase tUndoSection
-
- '/// <B>Section (Insert/Modify/Delete)</B>
- printlog "Section (Insert)"
- '/// new document
- Call hNewDocument
- '/// Insert a section
- InsertSection
- Kontext
- Active.Setpage TabBereiche
- Kontext "TabBereiche"
- TabBereiche.Ok
- '/// string in Undo-list has to be: "Insert section")
- Call CheckUndoStringInUndoList ( 10, "InsertSection" )
-
- printlog "Section (Modify)"
- '/// Open navigator and select section
- Call wNavigatorAuswahl ( 7, 1, true )
- Kontext "NavigatorWriter"
- '/// Open contextmenu and choose 'Edit'
- Auswahlliste.OpenContextMenu
- wait 500
- Call hMenuSelectNr(4)
-
- '/// Change Background-Color
- Kontext "BereicheBearbeiten"
- Optionen.Click
- Kontext
- Active.Setpage TabHintergrund
- Kontext "TabHintergrund"
- Hintergrundfarbe.TypeKeys "<Down>", 5
- TabHintergrund.Ok
-
- Kontext "BereicheBearbeiten"
- BereicheBearbeiten.Ok
- '/// string in Undo-list has to be: "Modify section")
- Call CheckUndoStringInUndoList ( 10, "ModifySection" )
-
- printlog "Section (Delete)"
- '/// Open navigator and select section
- Call wNavigatorAuswahl ( 7, 1, true )
- Kontext "NavigatorWriter"
- '/// Open contextmenu and choose 'Edit'
- Auswahlliste.OpenContextMenu
- wait 500
- Call hMenuSelectNr(4)
- '/// In 'Edit sections' dialog choose 'remove'
- Kontext "BereicheBearbeiten"
- Aufheben.Click
- BereicheBearbeiten.Ok
- '/// string in Undo-list has to be: "Delete section")
- Call CheckUndoStringInUndoList ( 10, "DeleteSection" )
-
- '/// Close Document
- Call hCloseDocument
-
-endcase
-
-
-testcase tUndoHyperlink
-
- '///<B>Hyperlink (Insert as Text/as URL button)</B>
- printlog "- Insert hyperlink as text"
- '/// new document
- Call hNewDocument
- '/// Insert / Hyperlink as Text
- InsertHyperlink
- '/// string in Undo-list has to be: "Insert Hyperlink")
- kontext "HyperlinkDialog"
- if ( HyperlinkDialog.exists( 2 ) ) then
- Call wEinfuegenHyperlink(1)
- ZielURL.SetText "www.sun.com"
- Form.Select 1
- Uebernehmen.Click()
-
- kontext "HyperlinkDialog"
- HyperlinkDialog.Close()
- else
- warnlog( "Unable to open <HyperlinkDialog>" )
- endif
- Call CheckUndoStringInUndoList ( 10, "InsertHyperlink" )
-
- Call wTypeKeys "<Return>"
-
- '/// Insert / Hyperlink as Button
- printlog "- Insert hyperlink as Button"
- InsertHyperlink
-
- kontext "HyperlinkDialog"
- if ( HyperlinkDialog.exists( 2 ) ) then
- Call wEinfuegenHyperlink(1)
- ZielURL.Settext "www.sun.com"
- Form.Select 2
- Kontext "Hyperlink"
- Uebernehmen.Click
- kontext "HyperlinkDialog"
- HyperlinkDialog.Close
- else
- warnlog( "Unable to open <HyperlinkDialog>" )
- endif
-
- '/// string in Undo-list has to be: "insert URL Button")
- Call CheckUndoStringInUndoList ( 10, "InsertHyperlinkButton" )
-
- '/// Close Document
- Call hCloseDocument
-
-endcase
-
-
-testcase tUndoFootnote
-
- '/// <B>Footnote (Insert/Modify/Delete)</B>
- printlog "- Footnote (Insert)"
- '/// new document
- Call hNewDocument
- '/// Insert / Footnote
- InsertFootnote
- Kontext "FussnoteEinfuegen"
- FussnoteEinfuegen.Ok
- '/// string in Undo-list has to be: "Insert footnote")
- Call CheckUndoStringInUndoList ( 10, "InsertFootnote" )
-
- printlog "- Footnote (Modify)"
- '/// Tools/Footnote
- ToolsFootnote
- Kontext
- Active.Setpage TabFussnoten
- Kontext "TabFussnoten"
-
- '/// Change any option in footnote dialog
- if Seitenende.IsChecked then
- Dokumentende.Check
- else
- Seitenende.Check
- end if
- '/// Close dialog
- TabFussnoten.Ok
- '/// string in Undo-list has to be: "Modify footnote options")
- Call CheckUndoStringInUndoList ( 10, "ModifyFootnote" )
-
- printlog "- Footnote (Delete)"
- '/// Point cursor directly to the footnote anchor
- Call wTypeKeys "<Mod1 Home>"
- '/// press 'delete' to remove footnote
- Call wTypeKeys "<Delete>"
- '/// string in Undo-list has to be: "Delete footnote options")
- Call CheckUndoStringInUndoList ( 10, "DeleteFootnote" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoCaption
-
- '/// <B>Insert a caption</B>
- printlog "- Insert Caption"
- '/// new document
- Call hNewDocument
- '/// Insert a graphic
- Call hGrafikEinfuegen ( gTesttoolPath & "writer\optional\input\graphics\jolink.jpg" )
- '/// Insert / Caption
- InsertCaption
- Kontext "Beschriftung"
- '/// Insert a caption more than 20 characters long
- Beschriftungstext.Settext "This caption has more than 20 characters"
- Beschriftung.Ok
-
- '/// string in Undo-list has to be: "Insert Caption: This capt...aracters")
- Call CheckUndoStringInUndoList ( 10, "InsertCaption" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoAutoText
-
- '/// <B>Insert autotext</B>
- printlog "- Insert autotext"
- '/// new document
- Call hNewDocument
- '/// Insert dummy text
- Call wBlindtextEinfuegen
-
- '/// string in Undo-list has to be: "Insert Auto Text")
- Call CheckUndoStringInUndoList ( 10, "InsertAutotext" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoBookmark
-
- Warnlog "#i102310# - tUndoBookmark outcommented due to bug."
- goto endsub
-
-
- '/// <B>Bookmark (Insert/Rename/Delete)</B>
- printlog "- Insert Bookmark"
- '/// new document
- Call hNewDocument
- '/// Insert / Bookmark
- InsertBookmark
- Kontext "TextmarkeEinfuegen"
- Textmarken.Settext "I'm a bookmark"
- TextmarkeEinfuegen.Ok
- '/// string in Undo-list has to be: "Insert Bookmark: I'm a bookmark")
- Call CheckUndoStringInUndoList ( 10, "InsertBookmark" )
-
- printlog "- Rename Bookmark"
- '/// Open navigator and select bookmark
- Call wNavigatorAuswahl ( 6, 1, true )
- Kontext "NavigatorWriter"
- '/// Open contextmenu and choose 'Edit'
- Auswahlliste.OpenContextMenu
- wait 500
- Call hMenuSelectNr(4)
- wait 500
- Call hMenuSelectNr(3)
- wait 500
- Kontext "ObjekteUmbenennen"
- Objektname.Settext "a book"
- ObjekteUmbenennen.Ok
- '/// string in Undo-list has to be: "Rename Bookmark: a book")
- Call CheckUndoStringInUndoList ( 10, "RenameBookmark" )
-
- printlog "- Delete Bookmark"
- '/// Open navigator and select bookmark
- Call wNavigatorAuswahl ( 6, 1, true )
- Kontext "NavigatorWriter"
- '/// Open contextmenu and choose 'Edit'
- Auswahlliste.OpenContextMenu
- wait 500
- Call hMenuSelectNr(4)
- wait 500
- Call hMenuSelectNr(2)
- wait 500
- '/// string in Undo-list has to be: "Rename Bookmark: a book")
- Call CheckUndoStringInUndoList ( 10, "DeleteBookmark" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoComment
-
- printlog "New document"
- Call hNewDocument
- printlog "Insert / Comment"
- InsertNoteWriter
- printlog "String in Undo-list has to be: 'Insert Comment'"
- Call CheckUndoStringInUndoList ( 10, "InsertComment" )
- printlog "- Delete Comment"
- printlog "Bring up the Navigator, find the entry 'Comments', expand it, and select the expanded section."
- Call wNavigatorAuswahl( 11, 1 )
- kontext "Navigator"
- Navigator.TypeKeys "<DELETE>"
- '/// Close the Navigator
- ViewNavigator
- '/// string in Undo-list has to be: "Delete comment")
- Call CheckUndoStringInUndoList ( 10, "DeleteComment" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoScript
-
- '/// <B>Script (Insert/Delete)</B>
- printlog "- Insert Script"
- '/// new document
- Call hNewDocument
- '/// Insert / Script
- InsertScript
- Kontext "ScriptEinfuegen"
- ScriptEinfuegen.Ok
- '/// string in Undo-list has to be: "Insert script")
- Call CheckUndoStringInUndoList ( 10, "InsertScript" )
-
- '/// Point cursor directly to the script
- Call wTypeKeys "<Mod1 Home>"
- '/// press 'delete' to remove script
- Call wTypeKeys "<Delete>"
- '/// string in Undo-list has to be: "Delete script")
- Call CheckUndoStringInUndoList ( 10, "DeleteScript" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoIndexes
-
- '/// <B>Indexes (Insert/Delete)</B>
- printlog "- Insert Index entry"
- '/// new document
- Call hNewDocument
- '/// Type a word
- Call wTypeKeys "IndexEntry"
- Call wTypeKeys "<Shift Home>"
- '/// Insert / Indexes and Tables / Entry
- InsertIndexesEntry
- Kontext "VerzeichnisEintragEinfuegen"
- EintragOk.Click
- VerzeichnisEintragEinfuegen.Close
- '/// string in Undo-list has to be: "Insert index entry")
- Call CheckUndoStringInUndoList ( 10, "InsertIndexEntry" )
-
- printlog "delete index entry with 'Backspace'"
- Call wTypeKeys ( "<Backspace>"
- '/// string in Undo-list has to be: "Delete index entry")
- Call CheckUndoStringInUndoList ( 10, "DeleteIndexEntry" )
-
- '/// Type a word
- Call wTypeKeys "BibliographyEntry"
- Call wTypeKeys "<Shift Home>"
- printlog "- Insert Bibliography entry"
- printlog "Insert / Index / Bibliography entry"
- InsertIndexesBibliographyEntry
- Kontext "LiteratureintragEinfuegen"
- EintragEinfuegen.Click
- LiteratureintragEinfuegen.Close
- '/// string in Undo-list has to be: "Insert bibliography entry")
- Call CheckUndoStringInUndoList ( 10, "InsertBibliographyEntry" )
-
- Printlog "delete bibliography entry with 'Backspace'"
- Call wTypeKeys ( "<Backspace>"
- '/// string in Undo-list has to be: "Delete bibliography entry")
- Call CheckUndoStringInUndoList ( 10, "DeleteBibliographyEntry" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoFrames
-
- warnlog( "#111909# - Cannot access <rename> item in context menu" )
- goto endsub
-
- '/// <B>Frames (Insert/Rename/Delete)</B>
- printlog "- Insert Frame"
- '/// new document
- Call hNewDocument
- '/// Insert / Frame
- InsertFrame
- Kontext
- Active.Setpage TabZusaetze
- Kontext "TabZusaetze"
- ObjektName.Settext "MyFrame"
- TabZusaetze.Ok
- '/// string in Undo-list has to be: "Insert frame: MyFrame")
- Call CheckUndoStringInUndoList ( 10, "InsertFrame" )
-
- printlog "- Rename Frame"
- '/// Open navigator and select frame
- Call wNavigatorAuswahl ( 3, 1, true )
- Kontext "NavigatorWriter"
- '/// Open contextmenu and choose 'Edit'
- Auswahlliste.OpenContextMenu
- Call hMenuSelectNr(4)
- Call hMenuSelectNr(3)
- Kontext "ObjekteUmbenennen"
- Objektname.Settext "MyRenamedFrame"
- ObjekteUmbenennen.Ok
- '/// string in Undo-list has to be: "Rename frame: 'MyFrame' -> 'MyRenamedFrame'")
- Call CheckUndoStringInUndoList ( 10, "RenameFrame" )
- printlog "- Delete Frame"
- '/// Type 'Del' to delete the frame
- Call wTypeKeys "<Delete>"
- '/// string in Undo-list has to be: "Delete frame: 'MyRenamedFrame'")
- Call CheckUndoStringInUndoList ( 10, "DeleteFrame" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoTableGeneral
- Dim sTableName as string
-
- '/// <B>Tables Part 1</B>
- printlog "- insert table"
- '/// new document
- Call hNewDocument
- '/// Insert a table
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- sTableName = "MyTable"
- Tabellenname.Settext sTableName
- TabelleEinfuegenWriter.Ok
- '/// string in Undo-list has to be: "Insert table")
- Call CheckUndoStringInUndoList ( 10, "InsertTable" )
- printlog "- Insert a row"
- '/// <B>Insert a row</B>
- Call hToolbarSelect("Table", true)
- ZeileEinfuegen.Click
- '/// string in Undo-list has to be: "Insert row")
- Call CheckUndoStringInUndoList ( 10, "InsertRow" )
- printlog "- Insert a column"
- '/// <B>Insert a column</B>
- Call hToolbarSelect("Table", true)
- SpalteEinfuegen.Click
- '/// string in Undo-list has to be: "Insert column")
- Call CheckUndoStringInUndoList ( 10, "InsertColumn" )
- printlog "- Delete a row"
- '/// <B>Delete a row</B>
- Call hToolbarSelect("Table", true)
- ZeileLoeschen.Click
- '/// string in Undo-list has to be: "Delete row")
- Call CheckUndoStringInUndoList ( 10, "DeleteRow" )
- printlog "- Delete a column"
- '/// <B>Delete a column</B>
- Call hToolbarSelect("Table", true)
- SpalteLoeschen.Click
- '/// string in Undo-list has to be: "Delete column")
- Call CheckUndoStringInUndoList ( 10, "DeleteColumn" )
- printlog "- format a cell"
- '/// <B>Format cell (enable number recognition form that)</B>
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- if Not AutomatischeZahlenerkennung.IsChecked then AutomatischeZahlenerkennung.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- '/// type '1' in a cell
- Call wTypeKeys ( "1" )
- Call wTypeKeys ( "<Right>" )
- '/// string in Undo-list has to be: "Format cell")
- Call CheckUndoStringInUndoList ( 10, "FormatCell" )
-
- ToolsOptions
- Call hToolsOptions ("WRITER","Table")
- if AutomatischeZahlenerkennung.IsChecked then AutomatischeZahlenerkennung.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
-
- '/// CloseDocument
- Call hCloseDocument
-endcase
-
-
-testcase tUndoTableOptionsMerge
-
- '/// <B>Tables Part 2</B>
- printlog "- apply table attributes"
- '/// new document
- Call hNewDocument
- '/// Insert a table
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- TabelleEinfuegenWriter.Ok
-
- printlog "- apply attributes"
- '/// Format / Table
- FormatTable
- '/// change some table options
- Kontext
- Active.Setpage TabTextflussTabelle
- Kontext "TabTextflussTabelle"
- if Umbruch.IsChecked then
- Umbruch.Uncheck
- else
- Umbruch.Check
- end if
- TabTextflussTabelle.Ok
- '/// string in Undo-list has to be: "Apply table attributes")
- Call CheckUndoStringInUndoList ( 10, "ApplyTableAttributes" )
-
- printlog "- merge tables"
- '/// <B>Merge tables</B>
- Call wTypeKeys ( "<Down>" ,2 )
- '/// Insert a second table
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- TabelleEinfuegenWriter.Ok
- '/// Format / Merge / Tables
- FormatMergeTables
- '/// string in Undo-list has to be: "Merge table")
- Call CheckUndoStringInUndoList ( 10, "MergeTable" )
-
- '/// close Document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoTableConvertSort
-
- '/// <B>Tables Part 3</B>
- printlog "- Convert to text"
- '/// new document
- Call hNewDocument
- '/// Insert text "This<Return>is a<Return>table to text<Return>text"
- Call wTypeKeys ("This<Return>is a<Return>table to text<Return>text")
- '/// select all
- Call wTypeKeys ( "<Mod1 A>" )
- '/// Format / Text <-> Table
- ToolsTextInTable
- Kontext "TextInTabelleUmwandeln"
- TextInTabelleUmwandeln.OK
- '/// string in Undo-list has to be: "Convert table -> text")
- Call CheckUndoStringInUndoList ( 10, "ConvertTable" )
-
- printlog "- Sort table"
- '/// <B>Sort table</B>
- Call wTypeKeys ( "<Mod1 A>", 2 )
- '/// Select all -> Tools / Sort
- ToolsSort
- Kontext "Sortieren"
- Sortieren.Ok
- '/// string in Undo-list has to be: "Sort table")
- Call CheckUndoStringInUndoList ( 10, "SortTable" )
-
- '/// Close Document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoTableSplitDelete
-
- '/// <B>Tables Part 4</B>
- printlog "- Split tables"
- '/// new document
- Call hNewDocument
- '/// Insert 2 tables
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- TabelleEinfuegenWriter.Ok
- Call wTypeKeys ( "<Down>", 3 )
- InsertTableWriter
- Kontext "TabelleEinfuegenWriter"
- TabellenName.Settext "AnotherTable"
- TabelleEinfuegenWriter.Ok
- '/// MergeTables
- FormatMergeTables
- wait 500
- '/// Split tables
- FormatSplitTable
- Kontext "TabelleAuftrennen"
- TabelleAuftrennen.Ok
- '/// string in Undo-list has to be: "Split table")
- Call CheckUndoStringInUndoList ( 10, "SplitTable" )
-
- '/// <B>Delete table</B>
- printlog "- Delete table"
- '/// Open navigator and select table
- Call wNavigatorAuswahl ( 2, 1, true )
- Kontext "NavigatorWriter"
- '/// Open contextmenu and choose 'Delete'
- Auswahlliste.OpenContextMenu
- Call hMenuSelectNr(4)
- Call hMenuSelectNr(2)
- '/// string in Undo-list has to be: "Delete table: 'AnotherTable'")
- Call CheckUndoStringInUndoList ( 10, "DeleteTable" )
-
- '/// Close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoHorizontalRuler
-
- '/// <B>HorizontalRuler</B>
- printlog "- Horizontal ruler"
- '/// new document
- Call hNewDocument
- '/// Insert / Horizontal Line
- InsertHorizontalLine
- '/// Select one line
- Kontext "HorizontaleLinieEinfuegen"
- Auswahl.TypeKeys "<Down>", 4
- HorizontaleLinieEinfuegen.Ok
- '/// string in Undo-list has to be: "Insert horizontal ruler")
- Call CheckUndoStringInUndoList ( 10, "InsertRuler" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoGraphics
-
- '/// <B>Graphics (Insert/Delete/Replace)</B>
- printlog "- Insert graphics from file"
- '/// new document
- Call hNewDocument
- '/// Insert a graphic from file
- Call hGrafikEinfuegen ( gTesttoolPath & "writer\optional\input\graphics\jolink.jpg" )
- '/// string in Undo-list has to be: "Insert graphics")
- Call CheckUndoStringInUndoList ( 10, "InsertGraphic" )
-
- '/// <B>Delete graphic</B>
- printlog "- delete graphic"
- '/// press 'delete' to remove graphic
- Call wTypeKeys "<Delete>"
- '/// string in Undo-list has to be: "Delete graphics")
- Call CheckUndoStringInUndoList ( 10, "DeleteGraphic" )
-
- '/// <B>Insert graphic from gallery</B>
- printlog "- insert graphic from gallery"
- Kontext "Gallery"
- if Gallery.NotExists(2) then ToolsGallery
- Sleep (2)
-
- View.OpenContextMenu
- Call hMenuSelectNr(1)
- Call hMenuSelectNr(1)
- '/// string in Undo-list has to be: "Insert graphics")
- Call CheckUndoStringInUndoList ( 10, "InsertGraphic" )
- Sleep (1)
-
- '/// <B>Replace graphic</B>
- printlog "- replace graphic"
- '/// Insert another graphics from gallery
- Kontext "Gallery"
- View.OpenContextMenu
- Call hMenuSelectNr(1)
- Call hMenuSelectNr(1)
- '/// string in Undo-list has to be: "Replace graphics")
- Call CheckUndoStringInUndoList ( 10, "ReplaceGraphic" )
-
- '/// Close gallery
- Kontext "Gallery"
- if Gallery.Exists then ToolsGallery
-
- '/// Close document
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/undo/w_undo_history_4.inc b/testautomation/writer/optional/includes/undo/w_undo_history_4.inc
deleted file mode 100755
index 568d6cd3d295..000000000000
--- a/testautomation/writer/optional/includes/undo/w_undo_history_4.inc
+++ /dev/null
@@ -1,495 +0,0 @@
-'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@oracle.com
-'*
-'* short description : Writer Undo-History - Test
-'*
-'\***********************************************************************
-
-sub w_undo_history_4
-
- Call tUndoOLEObject ' Objects (Insert/Delete)
- Call tUndoFloatingFrame ' Floating Frame (Insert/Delete)
- Call tUndoInsertFile ' Insert file
- Call tUndoAsianPhoneticGuides ' Asian Phonetic Guides
- Call tUndoAutocorrect ' Autocorrect / Autoformat
- Call tUndoDrawObject ' Draw Object (Insert)
- Call tUndoDrawObjectGroup ' Draw Object (Group/ungroup/Name/Delete)
- Call tUndoSpellcheck ' Spellcheck (Autocheck/Spellcheck)
- Call tUndoFormControl ' Form Control (Insert/resize/move/replace/change property/delete)
- Call tUndoHeaderFooter ' Header/Footer insert and delete
-
-end sub
-
-testcase tUndoOLEObject
-
- '/// <B>OLE-Objects (Insert/Delete)</B>
- printlog "- Insert OLE-Object"
- '/// new Document
- Call hNewDocument
- '/// Insert / Object / OLE-Object ///
- InsertObjectOLEObject
- Kontext "OLEObjektEinfuegen"
- Objekttyp.Select 1
- OLEObjektEinfuegen.Ok
- wait 500
- Call wTypeKeys "<Esc>"
- wait 500
- Call gMouseClick(15,5)
- wait 500
- '/// string in Undo-list has to be: "Insert object")
- Call CheckUndoStringInUndoList ( 10, "InsertObject" )
-
- printlog "- delete object"
- '/// Select object with <Shift F4>
- Call wTypeKeys "<Shift F4>"
- wait 500
- '/// <B>Delete object</B>
- Call wTypeKeys "<Delete>"
- wait 500
- '/// press 'delete' to remove object
- '/// string in Undo-list has to be: "Delete object")
- Call CheckUndoStringInUndoList ( 10, "DeleteObject" )
-
- '/// close Document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoFloatingFrame
-
- '/// <B>Floating frames</B>
- printlog "- Insert floating frame"
- '/// new document
- Call hNewDocument
- '/// Insert / Floating frame
- InsertFloatingFrame
- Kontext "TabEigenschaften"
- '/// Choose a file as floating frame
- Inhalt.Settext Convertpath (gTesttoolPath & "writer\optional\input\graphics\jolink.jpg" )
- TabEigenschaften.Ok
- Sleep 2
- '/// string in Undo-list has to be: "Insert floating frame")
- Call CheckUndoStringInUndoList ( 10, "InsertFloatingFrame" )
-
- '/// Delete floating frame
- printlog "- delete floating frame"
- Call wTypeKeys "<Delete>"
- '/// string in Undo-list has to be: "Delete floating frame")
- Call CheckUndoStringInUndoList ( 10, "DeleteFloatingFrame" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoInsertFile
-
- '/// <B>Insert File</B>
- printlog "- Insert file"
- '/// new document
- Call hNewDocument
- '/// Insert / File
- InsertFileWriter
- Sleep 3
- Kontext "OeffnenDlg"
- Sleep 2
- '/// Choose "..\\writer\\input\\htmltest.sxw"
- if OeffnenDlg.Exists then
- Dateiname.Settext Convertpath (gTesttoolPath & "writer\optional\input\undo\htmltest.sxw" )
- Oeffnen.Click
- else
- Warnlog "File open dialog missing"
- Call hCloseDocument
- goto endsub
- end if
-
- '/// string in Undo-list has to be: "Insert document")
- Call CheckUndoStringInUndoList ( 10, "InsertDocument" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoAsianPhoneticGuides
-
- '/// <B>Asian Phonetic Guides</B>
- printlog "- Asian Phonetic Guides"
- '/// new document
- Call hNewDocument
- '/// type some text and select it
- Call wTypeKeys ( "JuppHeidiUndJuppHeida" )
- Call wTypeKeys ( "<Home>" )
- '/// Check if Asian support is enabled, if not enable it
- if gAsianSup = true then
- FormatRuby
- Kontext "RubyDialog"
- RubyText1.Settext "SeppHeidiUndSeppHeida"
- RubyDialog.Ok
- RubyDialog.Close
- else
- Call ActiveDeactivateAsianSupport(True)
- FormatRuby
- Kontext "RubyDialog"
- RubyText1.Settext "SeppHeidiUndSeppHeida"
- RubyDialog.Ok
- RubyDialog.Close
- Call ActiveDeactivateAsianSupport(False)
- end if
-
- '/// string in Undo-list has to be: "Asian Phonectic Guides Setting")
- Call CheckUndoStringInUndoList ( 10, "APGS" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoAutocorrect
-
- '/// <B>Autocorrect / Autoformat</B>
- printlog "- Autocorrect / Autoformat"
- '/// new document
- Call hNewDocument
- '/// <B>Autocorrect</B>
- printlog "- Autocorrect"
- '/// type with quote and blank at the end 'www.sun.com '
- Call wTypeKeys ( "www.sun.com " )
- '/// string in Undo-list has to be: "AutoCorrect")
- Call CheckUndoStringInUndoList ( 10, "AutoCorrect" )
-
- '/// insert a line break
- Call wTypeKeys ( "<Return>" )
- '/// <B>Autoformat</B>
- printlog "- Autoformat"
- '/// type - AutoFormat test<Return>
- Call wTypeKeys ( "- AutoFormat test<Return>" )
- '/// string in Undo-list has to be: "AutoCorrect")
- Call CheckUndoStringInUndoList ( 10, "AutoFormat" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoDrawObject
- '/// <B>Draw object</B>
- printlog "- Draw object"
- '/// new document
- Call hNewDocument
- '/// Insert a freeform line object
-
- ViewZoom
- Kontext "Massstab"
- Optimal.Check
- Massstab.OK
-
- Call hToolbarSelect ("Drawing", true)
- Kontext "Drawbar"
- printlog " - Draw Freeform"
- Freihand.Click
- Call gMouseMove ( 33, 40, 55, 51 )
- Call gMouseMove ( 35, 31, 40, 90 )
- Call gMouseMove ( 41, 91, 55 , 70 )
- Call gMouseClick( 55, 70 )
- Call wTypeKeys ("<Escape>")
-
- '/// string in Undo-list has to be: "Insert draw object: freeform line")
- Call CheckUndoStringInUndoList ( 10, "FreeForm" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoDrawObjectGroup
-
- '/// <B>Group of Drawing objects</B>
- printlog "- Group of Drawing objects"
- '/// new document ///
- Call hNewDocument
- ViewZoom
- Kontext "Massstab"
- Optimal.Check
- Massstab.OK
- Sleep 1
- '/// Insert 2 drawing objects (rectangle) ///
- Call wZeichenobjektEinfuegen ( "Rechteck", 40, 50, 60, 60 )
- Call wTypeKeys "<ESCAPE>"
- Call wTypeKeys "<ESCAPE>"
- Call wZeichenobjektEinfuegen ( "Rechteck", 40, 55, 50, 65 )
- '/// Select both objects ///
- Call wObjektSelektieren ( 35, 35, 70, 70 )
- '/// Select Format / Group / Group ///
- try
- printlog "- group objects"
- FormatGroupGroup
- Sleep 1
- '/// string in Undo-list has to be: "Group draw objects")
- Call CheckUndoStringInUndoList ( 10, "DrawGroup" )
-
- '/// Format / Name object
- printlog "- name objects"
- FormatNameObject
- Kontext "NameDlgObject"
- NameField.Settext "MyGroup"
- NameDlgObject.OK
- '/// string in Undo-list has to be: "Rename 2 Rectangles")
- Call CheckUndoStringInUndoList ( 10, "RenameGroup" )
-
- '/// Select Format / Group / Ungroup ///
- printlog "- ungroup objects"
- FormatUngroupDraw
- '/// string in Undo-list has to be: "Ungroup group object")
- Call CheckUndoStringInUndoList ( 10, "DrawUnGroup" )
-
- '/// Select 1 object and delete it
- Call gMouseClick ( 40, 52 )
- printlog "- delete object"
- Call wTypeKeys "<Delete>"
- '/// string in Undo-list has to be: "Delete 2 Rectangles")
- Call CheckUndoStringInUndoList ( 10, "DeleteGroup" )
- catch
- Warnlog "Unable to execute 'Format / Group / Group' -> disabled!"
- endcatch
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoSpellcheck
- Dim sReplace as string
-
- '/// <B>Spellcheck(Autocheck/Spellcheck)</B>
- printlog "- Spellcheck: Autocheck"
- '/// new document ///
- Call hfileOpenLocally (gTesttoolpath + "writer\optional\input\undo\spellcheck_undo.odt")
-
- '/// Type "This is a testp<End>"
- Call wTypeKeys ( "<End>" ) 'This is a testp
- '/// Select word' testp'
- Call wTypeKeys ( "<Mod1 Shift Left>" )
- '/// Tools / Spellcheck
- ToolsSpellcheckWriter
- Kontext "Spellcheck"
- Suggestions.Select 1
- sReplace = Suggestions.GetSelText
- '///Replace with 1st word in suggestion list
- printlog "-> Replace with word: " & sReplace
- Change.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- end if
- end if
- Kontext "Spellcheck"
- if Spellcheck.Exists then Spellcheck.Close
- '/// string in Undo-list has to be: "Replace: 'Testp' -> 'Test'")
- Call CheckUndoStringInUndoList ( 10, "Autocheck/Spellcheck" )
-
- '/// Uncheck 'Autospellcheck' in Toolbar ///
- ToolsSpellcheckAutoSpellcheck
-
- printlog "- Spellcheck"
- Call wTypeKeys ( "<End><Return>", 2 )
- '/// retype 'testp'
- Call wTypeKeys ( "testp<Shift Home>" )
- ToolsSpellcheckWriter
- Kontext "Spellcheck"
- ' Workaround: For some reasons sometimes dialog is disabled here
- ' Only reproducable by testtool
- try
- Suggestions.Select 1
- catch
- Spellcheck.Close
- ToolsSpellcheckWriter
- Kontext "Spellcheck"
- Suggestions.Select 1
- endcatch
- Change.Click
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- try
- Active.No
- catch
- Active.Ok
- endcatch
- end if
- end if
- Kontext "Spellcheck"
- if Spellcheck.Exists then Spellcheck.Close
-
- '/// string in Undo-list has to be: "Replace: 'Testp' -> 'Test'")
- Call CheckUndoStringInUndoList ( 10, "Autocheck/Spellcheck" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoFormControl
-
- '/// <B>Form Control (Insert/resize/move/replace/change property/delete)</B>
- printlog "- Form control (insert)"
- '/// new document
- Call hNewDocument
- '/// Open 'Form' Toolbox ///
- Call hToolbarSelect ("FormControls", true)
- 'Formsbar.Move 20, 30
- '/// Insert a pushbutton from toolbox ///
- Pushbutton.Click
- Kontext "DocumentWriter"
- DocumentWriter.MouseDown ( 40, 50 )
- DocumentWriter.MouseMove ( 50, 55 )
- DocumentWriter.MouseUp ( 50, 55 )
- Sleep 1
-
- '/// string in Undo-list has to be: "Insert control")
- Call CheckUndoStringInUndoList ( 10, "ControlInsert" )
-
- printlog "- Form control (move)"
- '/// Press '<Up>' to move control
- Call wTypeKeys ( "<Up>" )
- '/// string in Undo-list has to be: "Move control")
- Call CheckUndoStringInUndoList ( 10, "ControlMove" )
-
- printlog "- Form control (resize)"
- '/// Press '<Ctrl+Tab>' to enter handle selection mode
- Call wTypeKeys ( "<Mod1 Tab>" )
- '/// Press '<Up>' to resize control
- Call wTypeKeys ( "<Up>" )
- '/// string in Undo-list has to be: "Resize control")
- Call CheckUndoStringInUndoList ( 10, "ControlResize" )
-
- printlog "- Form control (replace)"
- '/// Select 'Format->Replace with-> Text box'
- FormatReplaceWithTextBox
- wait 500
- '/// string in Undo-list has to be: "Replace control")
- Call CheckUndoStringInUndoList ( 10, "ControlReplace" )
-
- printlog "- Form control (change property)"
- '/// Select 'Format->Control' and change name of control
- FormatControl
- Kontext "ControlPropertiesTabControl"
- ControlPropertiesTabControl.setPage TabGeneralControl
- Kontext "TabGeneralControl"
- NameText.Settext "MyControl"
- FormatControl
- '/// string in Undo-list has to be: "Set property 'Name'")
- Call CheckUndoStringInUndoList ( 10, "ControlChange" )
-
- printlog "- Form control (delete)"
- '/// Press '<Delete>' to delete control
- Call wTypeKeys ( "<Delete>" )
- '/// string in Undo-list has to be: "Delete control")
- Call CheckUndoStringInUndoList ( 10, "ControlDelete" )
-
- '/// close document
- Call hCloseDocument
-endcase
-
-
-testcase tUndoHeaderFooter
-
- QAErrorlog "#i56552#footer deletion cannot be undone"
- goto endsub
- '/// Insert header
- printlog "- Insert header"
- '/// new Document
- Call hNewDocument
- '/// Insert / Header / Default
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
- '/// string in Undo-list has to be: "Header/footer changed")
- Call CheckUndoStringInUndoList ( 10, "Header/Footer" )
-
- '/// Delete header
- printlog "- Delete header"
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(9))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- end if
- end if
- '/// string in Undo-list has to be: "Header/footer changed")
- Call CheckUndoStringInUndoList ( 10, "Header/Footer" )
-
- '/// Insert footer
- printlog "- Insert footer"
- '/// Insert / Header / Default
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
- '/// string in Undo-list has to be: "Header/footer changed")
- Call CheckUndoStringInUndoList ( 10, "Header/Footer" )
-
- '/// Delete footer
- printlog "- Delete footer"
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- MenuSelect(Menugetitemid(4))
- Sleep 2
- MenuSelect(Menugetitemid(10))
- Sleep 2
- MenuSelect(Menugetitemid(1))
- Sleep 2
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
- end if
- end if
- '/// string in Undo-list has to be: "Header/footer changed")
- Call CheckUndoStringInUndoList ( 10, "Header/Footer" )
-
- '/// close document
- Call hCloseDocument
-endcase